/* Current thinking rail | travishurlock.com | v20261005e
   Self-contained. Uses the site's :root tokens from styles.css. */

.th-rail {
  --rail-gap: 20px;
  --rail-inner: min(calc(100vw - 64px), 1116px);
  --rail-edge: max(32px, calc((100vw - 1180px) / 2 + 32px));
  --rail-card: calc((var(--rail-inner) - 3 * var(--rail-gap)) / 3.3);
  position: relative;
}

/* Head: section heading left, controls right */
.th-rail__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.th-rail__head .section-head { margin-bottom: 0; }
.th-rail__sub {
  margin: 12px 0 0;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.5;
}
.th-rail__controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.th-rail__count {
  min-width: 7.5ch;
  margin-right: 6px;
  color: var(--text-dim);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.th-rail__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s ease, opacity .2s ease;
}
.th-rail__btn svg { display: block; }
.th-rail__btn:hover:not(:disabled) { border-color: var(--text-dim); }
.th-rail__btn:disabled { opacity: .3; cursor: default; }
/* Focus rings only for keyboard users (rail.js adds .th-rail--kb on
   Tab/arrow keys, removes it on touch or click) */
.th-rail :focus { outline: none; }
.th-rail--kb .th-rail__btn:focus-visible,
.th-rail--kb .th-rail__card:focus-visible,
.th-rail--kb .th-rail__track:focus-visible,
.th-rail--kb .th-rail__close:focus-visible,
.th-rail--kb .th-rail__link:focus-visible,
.th-rail--kb .th-rail__cta:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
.th-rail--fits .th-rail__controls,
.th-rail--fits .th-rail__progress { display: none; }

/* Viewport + track. Left edge aligns to the container, right edge bleeds
   to the window so the next card is visibly cut off. */
.th-rail__viewport { position: relative; }
.th-rail__viewport::before,
.th-rail__viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 72px;
  pointer-events: none;
  transition: opacity .25s ease;
}
.th-rail__viewport::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), rgba(10, 11, 15, 0));
  opacity: 0;
}
.th-rail__viewport::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), rgba(10, 11, 15, 0));
}
.th-rail:not(.is-start) .th-rail__viewport::before { opacity: 1; }
.th-rail.is-end .th-rail__viewport::after { opacity: 0; }

.th-rail__track {
  display: flex;
  gap: var(--rail-gap);
  margin: 0;
  padding: 4px 0 6px var(--rail-edge);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--rail-edge);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.th-rail__track::-webkit-scrollbar { display: none; }
/* End spacing comes from this spacer, not padding-right, so Chrome and
   Safari agree on where the rail ends */
.th-rail__track::after {
  content: "";
  flex: 0 0 1px;
  margin-left: calc(var(--rail-edge) - var(--rail-gap) - 1px);
}

.th-rail__item {
  flex: 0 0 var(--rail-card);
  min-width: 0;
  scroll-snap-align: start;
}

.th-rail__card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}
.th-rail__card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.th-rail__card:hover img { transform: scale(1.02); }

/* Badge sits bottom right, over the cover's URL line */
.th-rail__badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px 0 11px;
  border-radius: 17px;
  background: rgba(10, 11, 15, .74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  font: 600 13px/1 var(--font);
  font-variant-numeric: tabular-nums;
}
.th-rail__badge svg { flex: none; }

.th-rail__caption {
  display: -webkit-box;
  margin: 14px 2px 0;
  overflow: hidden;
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.th-rail__meta {
  margin: 6px 2px 0;
  color: var(--text-faint);
  font-size: 13px;
}

.th-rail__progress {
  position: relative;
  height: 2px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 1px;
  background: var(--border);
}
.th-rail__progress span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30%;
  border-radius: 1px;
  background: var(--text-dim);
}

/* Player dialog */
.th-rail__dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}
.th-rail__dialog::backdrop {
  background: rgba(5, 6, 9, .88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.th-rail__dialog[open] .th-rail__panel { animation: thRailIn .28s cubic-bezier(.2, .7, .2, 1); }
@keyframes thRailIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.th-rail__panel {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(260px, 400px);
  align-items: center;
  justify-content: center;
  gap: 48px;
  width: 100%;
  height: 100%;
  padding: 48px 72px;
}
.th-rail__media {
  height: min(86vh, 900px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}
.th-rail__media video,
.th-rail__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.th-rail__copy {
  max-height: 86vh;
  overflow-y: auto;
}
.th-rail__title {
  margin: 0 0 8px;
  font: 900 44px/1.04 var(--font-display);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.th-rail__date {
  margin: 0 0 20px;
  color: var(--text-faint);
  font-size: 13px;
}
.th-rail__summary {
  margin: 0 0 16px;
  color: var(--text-body);
  font-size: 17px;
  line-height: 1.6;
}
.th-rail__footnote {
  margin: 0 0 20px;
  color: var(--text-faint);
  font-size: 12.5px;
  line-height: 1.5;
}
.th-rail__note {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 14px;
}
.th-rail__link {
  display: inline-block;
  margin-top: 4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.th-rail__link:hover { text-decoration-color: var(--text); }
.th-rail__close {
  /* Matches the site's existing lightbox close (.reel-lightbox__close) */
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(23, 26, 34, .85);
  color: var(--text);
  font: 400 16px/1 var(--font);
  cursor: pointer;
}
.th-rail__close:hover { background: var(--surface-2); }
.th-rail__panel:focus { outline: none; }
.th-rail__cta { margin: 4px 0 20px; }
.th-rail__cta + .th-rail__link { display: block; width: fit-content; }

/* Tablet: 2 cards plus a peek */
@media (max-width: 960px) {
  .th-rail { --rail-card: calc((var(--rail-inner) - 2 * var(--rail-gap)) / 2.3); }
  .th-rail__panel { gap: 32px; padding: 48px 40px; }
  .th-rail__title { font-size: 36px; }
}

/* Mobile: 1 card plus a peek, swipe. Dialog stacks. */
@media (max-width: 640px) {
  .th-rail {
    --rail-gap: 14px;
    --rail-edge: 32px; /* matches .container padding so cards line up with the heading */
    --rail-card: 76vw;
  }
  .th-rail__head { margin-bottom: 24px; }
  .th-rail__count { display: none; }
  .th-rail__btn { width: 40px; height: 40px; }
  .th-rail__viewport::before,
  .th-rail__viewport::after { width: 32px; }
  /* Block flow, not grid: a grid row with overflow:hidden can collapse
     to zero and let the copy slide over the image */
  .th-rail__panel {
    display: block;
    padding: 72px 20px 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .th-rail__media {
    height: auto;
    width: min(100%, calc(62vh * 9 / 16));
    margin: 0 auto 24px;
  }
  .th-rail__copy { max-height: none; overflow: visible; }
  .th-rail__title { font-size: 32px; }
  .th-rail__summary { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .th-rail__track { scroll-behavior: auto; }
  .th-rail__card img,
  .th-rail__btn,
  .th-rail__viewport::before,
  .th-rail__viewport::after { transition: none; }
  .th-rail__card:hover img { transform: none; }
  .th-rail__dialog[open] .th-rail__panel { animation: none; }
}

/* ==========================================================================
   Mobile/tablet panning for Selected proof (#proof) and the production
   stack (#how-i-work). Same pattern as Current thinking: cards line up
   with the heading, the next card peeks in, arrows + progress line.
   Desktop layouts are untouched. rail.js adds .th-pan, controls and
   progress; the .th-pan__track is the scroller.
   ========================================================================== */
.th-pan__controls,
.th-pan__progress { display: none; }

/* --- Selected proof: below 960px --- */
@media (max-width: 960px) {
  #proof {
    --pan-gap: 20px;
    --pan-edge: 32px;
    --pan-card: calc((100vw - 2 * var(--pan-edge) - 2 * var(--pan-gap)) / 2.3);
  }
  #proof .th-pan__controls { display: flex; }
  #proof .th-pan__progress { display: block; }
  #proof .proof-grid { display: flex; }
  #proof .proof-card { flex: 0 0 var(--pan-card); min-width: 0; scroll-snap-align: start; }
}

/* --- Production stack: below 860px (where the rows stack) --- */
@media (max-width: 860px) {
  #how-i-work {
    --pan-gap: 20px;
    --pan-edge: 32px;
    --pan-card: calc((100vw - 2 * var(--pan-edge) - 2 * var(--pan-gap)) / 2.3);
  }
  #how-i-work .th-pan__controls { display: flex; }
  #how-i-work .th-pan__progress { display: block; }
  #how-i-work .tool-system { border-top: 0; }
  #how-i-work .tool-system__track { display: flex; }
  #how-i-work .tool-row {
    flex: 0 0 var(--pan-card);
    min-width: 0;
    scroll-snap-align: start;
    min-height: 0;
    align-content: start;
    padding: 24px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius, 14px);
    background: var(--surface);
  }
  #how-i-work .tool-system__note { margin-top: 20px; }
}

@media (max-width: 640px) {
  #proof, #how-i-work { --pan-gap: 14px; --pan-card: 80vw; }
}

/* Shared scroller, scoped to each block's breakpoint so desktop is untouched */
@media (max-width: 960px) {
  #proof .th-pan__track {
  gap: var(--pan-gap);
  margin: 0 calc(-1 * var(--pan-edge));
  padding: 4px 0 6px var(--pan-edge);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pan-edge);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  }
  #proof .th-pan__track::-webkit-scrollbar { display: none; }
  #proof .th-pan__track::after {
  content: "";
  flex: 0 0 1px;
  margin-left: calc(var(--pan-edge) - var(--pan-gap) - 1px);
  }
}
@media (max-width: 860px) {
  #how-i-work .th-pan__track {
  gap: var(--pan-gap);
  margin: 0 calc(-1 * var(--pan-edge));
  padding: 4px 0 6px var(--pan-edge);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pan-edge);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  }
  #how-i-work .th-pan__track::-webkit-scrollbar { display: none; }
  #how-i-work .th-pan__track::after {
  content: "";
  flex: 0 0 1px;
  margin-left: calc(var(--pan-edge) - var(--pan-gap) - 1px);
  }
}
.th-pan__controls { gap: 10px; margin: 0 0 24px; }
.th-pan__progress { margin-top: 28px; }
@media (max-width: 640px) {
  .th-pan__controls .th-rail__btn { width: 40px; height: 40px; }
}
.th-pan.th-rail--fits .th-pan__controls,
.th-pan.th-rail--fits .th-pan__progress { display: none; }

/* Keyboard-only focus rings; nothing left behind after a tap */
.th-pan:not(.th-rail--kb) .proof-card:focus,
.th-pan:not(.th-rail--kb) .th-pan__track:focus { outline: none; }
.th-pan.th-rail--kb .th-rail__btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

/* Desktop drag-to-pan (mouse). Cards keep their pointer cursor so they
   still read as clickable; the rail shows grab, and grabbing while dragging. */
.th-rail__track img,
.th-pan__track img,
#proof .proof-grid img {
  -webkit-user-drag: none;
  user-select: none;
}
@media (hover: hover) and (pointer: fine) {
  .th-rail__track { cursor: grab; }
  .th-rail__track.is-dragging,
  .th-pan__track.is-dragging,
  .th-rail__track.is-dragging *,
  .th-pan__track.is-dragging * {
    cursor: grabbing !important;
    user-select: none;
  }
}

/* Progress line with a scrubber dot. The line is the track, the filled
   part shows how far through you are, the dot shows where you are and
   can be dragged. A 28px tall hit area keeps it easy to grab. */
.th-rail__progress {
  --p: 0;
  height: 28px;
  margin-top: 14px;
  overflow: visible;
  background: none;
  border-radius: 0;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.th-rail__progress::before,
.th-rail__progress::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  border-radius: 1px;
  pointer-events: none;
}
.th-rail__progress::before { right: 0; background: var(--border); }
.th-rail__progress::after {
  width: calc(var(--p) * (100% - 14px) + 7px);
  background: var(--text-dim);
}
.th-rail__progress span {
  top: 50%;
  bottom: auto;
  left: calc(var(--p) * (100% - 14px));
  z-index: 1;
  width: 14px !important;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 4px var(--bg);
  transform: none !important;
  transition: scale .15s ease;
  cursor: grab;
}
.th-rail__progress:hover span { scale: 1.15; }
.th-rail__progress.is-scrubbing span { scale: 1.25; cursor: grabbing; }
.th-rail__progress.is-scrubbing { cursor: grabbing; }
@media (prefers-reduced-motion: reduce) {
  .th-rail__progress span { transition: none; }
}

/* Touch screens (phones, tablets): no arrow buttons. Swiping, the peeking
   card and the progress dot already do the job, and the arrows only cost
   space. Mouse/keyboard devices (incl. touchscreen laptops) keep them. */
@media (hover: none) and (pointer: coarse) {
  .th-rail__controls,
  #proof .th-mrail__controls,
  #proof .th-pan__controls,
  #how-i-work .th-pan__controls { display: none; }
}

/* 30 Years banner: lock the layer order. Layers that animate with a
   transform can be painted above later layers in Safari, which let the
   THIRTY/YEARS text show through the avatar. Explicit z-index keeps the
   avatar in front at every stage of the animation. */
.brand-banner__stage { isolation: isolate; }
.brand-banner__back { z-index: 0; }
.brand-banner__thirty,
.brand-banner__years { z-index: 1; }
.brand-banner__avatar { z-index: 2; }
.brand-banner__signature { z-index: 3; }
.brand-banner__building { z-index: 4; }


/* Player stays dark wherever the rail sits (the section can be light
   grey): reset the site colours inside the dialog so the copy and the
   close button are always visible. */
.th-rail__dialog {
  --bg: #0a0b0f;
  --bg-alt: #111319;
  --surface: #171a22;
  --surface-2: #1d212b;
  --border: #272c38;
  --text: #f2f1ee;
  --text-body: #adb3c0;
  --text-dim: #9aa0ad;
  --text-faint: #666d7d;
  --accent-2: #E5FF53;
  color: var(--text);
}
.th-rail__panel { padding-bottom: 112px; }

/* Foot bar: previous / next post (dark glass) */
.th-rail__foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 40px) max(14px, env(safe-area-inset-bottom));
  background: rgba(16, 18, 24, .5);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
          backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.th-rail__fpos {
  color: var(--text-dim);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.th-rail__fbtn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  justify-self: start;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.th-rail__fbtn--next { align-items: flex-end; text-align: right; justify-self: end; }
.th-rail__fbtn:hover:not(:disabled) { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.th-rail__fbtn:disabled { visibility: hidden; }
.th-rail__fdir { font-size: 15px; font-weight: 600; line-height: 1; }
.th-rail__fname {
  max-width: 34ch;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.2;
}
.th-rail__fbtn:focus { outline: none; }
.th-rail.is-kbd .th-rail__fbtn:focus-visible,
.th-rail--kb .th-rail__fbtn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
@media (max-width: 640px) {
  .th-rail__fbtn { padding: 10px 14px; }
  .th-rail__fname { display: none; }
  .th-rail__panel { padding-bottom: 96px; }
}

/* Subscribe link under the Current thinking heading, and Share in the player */
.th-rail__subscribe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: 600 15px/1.2 var(--font);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}
.th-rail__subscribe::after { content: "\2192"; color: var(--accent); text-decoration: none; }
.th-rail__subscribe:hover { text-decoration-color: currentColor; }

/* Foot bar centre: Share and Subscribe as two clear, labelled buttons
   either side of the position, well away from Previous / Next.
   Desktop: a tooltip says exactly what each does. Touch: the visible
   label does the same job (no hover needed). */
.th-rail__fmid { display: flex; align-items: center; gap: 14px; }
.th-rail__act {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  color: var(--text);
  font: 600 13.5px/1 var(--font);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.th-rail__act svg { flex: none; }
.th-rail__act:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.th-rail__act:focus { outline: none; }
.th-rail--kb .th-rail__act:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
@media (hover: hover) {
  .th-rail__act::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translate(-50%, 4px);
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(242, 241, 238, .96);
    color: #0a0b0f;
    font: 600 12px/1 var(--font);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
  }
  .th-rail__act:hover::after,
  .th-rail__act:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 640px) {
  .th-rail__foot { gap: 8px; }
  .th-rail__flbl { display: none; }
  .th-rail__fbtn { padding: 0; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; }
  .th-rail__fbtn--next { align-items: center; }
  .th-rail__fdir { font-size: 18px; }
  .th-rail__fmid { gap: 8px; }
  .th-rail__act { flex-direction: column; justify-content: center; gap: 3px; height: 48px; padding: 0 12px; border-radius: 14px; font-size: 10.5px; }
  .th-rail__fpos { font-size: 12px; }
}

/* Card meta row: date left, a modest orange Play / View button right.
   Ink on orange is 6.4:1, so it reads on both grey and dark. */
.th-rail__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 2px 0;
}
.th-rail__row .th-rail__meta { margin: 0; }
.th-rail__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px 0 9px;
  border: 0;
  border-radius: 14px;
  background: var(--accent, #FF5A3C);
  color: #0a0b0f;
  font: 600 12.5px/1 var(--font);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.th-rail__go svg { flex: none; width: 11px; height: 11px; }
.th-rail__go:hover { background: #ff7a61; }
.th-rail__item:hover .th-rail__go { transform: translateX(-2px); }
.th-rail__card .th-rail__badge { display: none; }

/* Player: posts with several slides show a gallery with the scrubber */
.th-rail__media.is-gallery {
  height: auto;
  aspect-ratio: auto;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  width: calc(min(80vh, 840px) * 9 / 16);
}
.th-rail__media.is-gallery .carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  height: auto;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}
.th-rail__media.is-gallery .carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s ease;
}
.th-rail__media.is-gallery .carousel__slide.is-active { opacity: 1; }
.th-rail__media.is-gallery .carousel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 640px) {
  .th-rail__media.is-gallery { width: min(100%, calc(56vh * 9 / 16)); }
}

/* Slide breadcrumbs under the white paper (and any multi-slide post) */
.th-rail__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.th-rail__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(242, 241, 238, .3);
  cursor: pointer;
  transition: width .3s cubic-bezier(.2, .7, .2, 1), background .3s ease;
}
.th-rail__dot:hover { background: rgba(242, 241, 238, .55); }
.th-rail__dot.is-active { width: 26px; background: var(--accent, #FF5A3C); }
.th-rail__dot:focus { outline: none; }
.th-rail--kb .th-rail__dot:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.th-rail__media.is-gallery .carousel { cursor: pointer; touch-action: pan-y; }

/* Corner fit: the posters are exactly 9:16, so fill the frame (no
   half-pixel letterbox line), and force clean rounded clipping in Safari
   (it can ignore rounded corners on layers with blur or fades). */
.th-rail__media img { object-fit: cover; }
.th-rail__media,
.th-rail__media.is-gallery .carousel,
.th-rail__card {
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  isolation: isolate;
}
.th-rail__media.is-gallery { -webkit-mask-image: none; }

/* Cards: date + Play/View row pinned to the bottom of every card, so the
   rows line up across the rail whatever the caption length */
.th-rail__item { display: flex; flex-direction: column; }
.th-rail__row { margin-top: auto; padding-top: 8px; }
