/* ==========================================================================
   app.css — the component set
   --------------------------------------------------------------------------
   ONE set, used by all four screens. Screens differ by DATA (js/data.js),
   never by a duplicated component.

   EVERY SIZE IN HERE IS FROM THE FIGMA FILE. The nodes each block was read
   from are named in its header comment, so a value can be checked rather
   than trusted. Where a number is a decision rather than a measurement it
   says so.

   TOUCH DEVICE. There is not one :hover rule in this file. A phone has no
   hover state, and building one puts behaviour in the prototype that cannot
   exist in the product. Feedback is PRESSED instead — `.is-press`, set by
   js/app.js on pointerdown and cleared as soon as the pointer moves far
   enough to be a scroll rather than a tap.

   ASSET PATHS ARE ROOT-RELATIVE. A relative URL inside CSS url() resolves
   against the STYLESHEET, not the document — `assets/x.jpg` here would be
   fetched from /demos/apollo-companion/css/assets/x.jpg and fail silently.
   Everything is `/components/...`, served from the repo root by serve.py.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--stage-ground);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--type-family);
  font-size: var(--type-body-m-size);
  line-height: var(--type-line-height);
  color: var(--color-on-surface);
  background: var(--stage-ground);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   THE STAGE AND THE DEVICE
   --------------------------------------------------------------------------
   The screen is 390 x 844 — the artboard the Figma frames are drawn at — and
   it is shown inside a flat simulation of the handset rather than filling the
   browser. Running a phone layout full bleed on a desktop display reads as
   claustrophobic because nothing around it says how big the thing is.

   The device renders at TRUE SIZE and is scaled to fit the window. The
   wrapper carries the SCALED size so the stage can still centre it — a
   transform on its own leaves the layout box at full height and the centring
   goes wrong. Same approach as the arena-journey prototype.
   ========================================================================== */

.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* The stage is a flat ground, deliberately. A glow behind the device reads
   as a product surface of its own and starts competing with the screen. */

.device-fit {
  position: relative;
  flex: none;
  width:  calc(var(--frame-width) * var(--s, 1));
  height: calc(var(--frame-height) * var(--s, 1));
}

.device {
  position: absolute;
  top: 0; left: 0;
  width:  var(--frame-width);
  height: var(--frame-height);
  transform: scale(var(--s, 1));
  transform-origin: top left;
}

/* The bezel. Flat — a drawn slab, not a photographic mock-up, because a
   glossy render would start competing with the screen it frames. */
.device__shell {
  position: absolute;
  inset: -12px;
  border-radius: 60px;
  background: linear-gradient(158deg, #3b3d46, #15161b 42%, #2d2f38);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55),
              inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

/* The screen itself. Everything a screen renders lives inside this, and it
   is the containing block for the tab bar, the composer and the sheet. */
.phone {
  position: absolute;
  inset: 0;
  border-radius: 48px;
  background: var(--color-background);
  overflow: hidden;
  isolation: isolate;
}

/* On a handset the device chrome is not decoration — it is the actual
   hardware — so the frame is dropped and the screen fills the viewport. */
@media (max-width: 460px), (max-height: 560px) {
  .stage { position: static; display: block; }
  .stage::before { display: none; }
  .device-fit, .device {
    position: static;
    width: 100%; height: 100vh;
    transform: none;
  }
  .device__shell { display: none; }
  .phone { border-radius: 0; }
}

/* The one scrolling element. Keeping the scroll inside the frame rather than
   on the document is what lets the tab bar, the composer and the sheet sit
   still while content moves under them. */
.scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { width: 0; height: 0; }

/* Screens that carry a solid top bar rather than a hero start below it. */
.scroll--below { top: calc(var(--statusbar-height) + 56px); }

.scroll__end { height: var(--space-3xl); }
.scroll__end--tabbar   { height: 128px; }
.scroll__end--composer { height: 158px; }

/* ==========================================================================
   THE TOUCH CURSOR
   --------------------------------------------------------------------------
   Carried over from the arena-journey prototype. On a machine with a mouse
   the arrow is hidden and a fingertip is drawn in its place — a soft disc
   that contracts on press. It only exists where a real mouse has moved:
   `has-mouse` is set by js/app.js on the first mouse-type pointer event,
   because a media query is not enough (a touch laptop reports coarse and
   would keep its arrow; a tablet reports fine when a stylus is paired).
   ========================================================================== */

html.has-mouse,
html.has-mouse body,
html.has-mouse a,
html.has-mouse button,
html.has-mouse input,
html.has-mouse [role="link"],
html.has-mouse [tabindex],
html.has-mouse .scroll,
html.has-mouse .rail { cursor: none; }

.touch {
  position: fixed;
  top: 0; left: 0;
  z-index: 95;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%,
              rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.22) 62%, rgba(255, 255, 255, 0.1));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 3px 14px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  display: none;

  /* POSITION IS NOT TRANSITIONED, and this is the whole point of splitting
     `translate` and `scale` out of `transform` rather than composing one
     matrix. While both lived on `transform`, the 130ms transition needed for
     the press also applied to every movement — so the disc re-eased toward
     the pointer on every frame and trailed it by a tenth of a second on an
     ease-in-out curve. It read as a dot being dragged on a piece of elastic.

     Separate properties let the position land instantly (js/app.js writes
     --tx/--ty once per frame on rAF, which is as fast as anything can be)
     while the press still eases. */
  translate: var(--tx, -100px) var(--ty, -100px);
  scale: 1;
  transition: opacity 220ms var(--ease-standard),
              scale 130ms var(--ease-standard);
  will-change: translate, scale;
}
html.has-mouse .touch { display: block; }
.touch.is-on { opacity: 1; }
.touch.is-down {
  scale: 0.72;
  background: radial-gradient(circle at 34% 30%,
              rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.42) 62%, rgba(255, 255, 255, 0.2));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   PRESSED
   --------------------------------------------------------------------------
   The only interaction state in the prototype. `.is-press` is set on the
   nearest pressable ancestor on pointerdown and removed on pointerup — or
   the moment the pointer travels more than a few pixels, so dragging a rail
   never leaves a card looking tapped.
   ========================================================================== */

/* EVERY ENTRANCE FILLS BACKWARDS, NEVER FORWARDS — AND THIS IS WHY.
   A finished animation with `fill: forwards` (or `both`) keeps applying its
   last keyframe for ever, and a value from an animation OUTRANKS a normal
   declaration in the cascade. Every entrance and arrival in this file ends on
   `opacity: 1; transform: none` — the element's own resting state — so the
   forwards half bought nothing and quietly disabled this entire block: the
   rails, the cards, the Continue Watching row, even the hero's Play button
   were pinned at `matrix(1,0,0,1,0,0)` and could not be pressed. Measured on
   the live site: adding `.is-press` by hand changed the computed transform on
   nothing at all.

   `backwards` is the half that was ever needed. It holds the FROM state
   during the delay, which is what stops a block being painted and then taken
   away, and it lets go the moment the animation ends. Nothing about the
   entrances looks different; the press state comes back.

   So: no entrance in this file may fill forwards. If one ever needs to end
   somewhere other than the element's resting state, give it an explicit
   resting style instead of a forwards fill. */

/* IN FAST, OUT SLOW. A tap is about a hundred milliseconds from down to up.
   With the same 180ms easing both ways the transform only ever got about
   half way to its target before it was sent back, so the press you saw was
   half the press that was specified — on a card, half of 1.8% of nothing.
   Down is quick enough to complete under a finger; up is slow enough to read
   as a release rather than a snap. */
.pressable { transition: transform 200ms var(--ease-standard),
                         opacity 200ms var(--ease-standard),
                         background-color 200ms var(--ease-standard); }
.pressable.is-press { transition-duration: 90ms; }
.pressable.is-press { transform: scale(0.965); opacity: 0.85; }

/* A card scales less than a button: at 144 x 216 the same ratio reads as a
   lurch, and the artwork has a border that would visibly detach. But 0.982
   with no dimming at all was a press you had to be told about — 2.6px on a
   144px card, under a finger that is covering it. Enough to feel, still not
   a lurch. */
.card.is-press, .cw.is-press, .tile.is-press, .att.is-press { transform: scale(0.97); opacity: 0.92; }
.row.is-press { background: var(--color-white-5); transform: none; opacity: 1; }

:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ==========================================================================
   MEDIA SLOT
   --------------------------------------------------------------------------
       background-image: var(--src), var(--ph);

   The real file layers OVER the placeholder, so a missing file degrades to a
   quiet tonal panel instead of a dead box. --src defaults to `none`, which is
   a legal background layer. Set it inline:

       style="--src:url(/components/britbox/hero-bluelights.jpg)"

   POSITION IS `center`, always. The design centres every image fill; the
   earlier build offset artwork upward to "protect faces" and that is what
   made the heroes look crooked and cropped their subjects out of view.
   ========================================================================== */

.media {
  --src: none;
  --pos: center;
  /* Artwork fades up once the file has actually decoded — js/app.js preloads
     each --src and sets .is-loaded. A slot with no artwork is never armed,
     so the placeholder shows immediately rather than fading in from nothing. */
  transition: opacity var(--dur-media) var(--ease-rise);
  background-image: var(--src), var(--ph);
  background-size: cover, cover;
  background-position: var(--pos), center;
  background-repeat: no-repeat, no-repeat;
  background-color: var(--color-surface);
}

/* NOT a second fade. .rise already brings the block in, and js/app.js holds
   that arrival until the artwork has decoded, so the picture and its
   container land together. An opacity transition here as well meant every
   image faded twice — once as part of its block and once on its own, over a
   different duration. The class stays because app.js uses it to know what it
   is waiting for; it just no longer animates. */
.media.is-waiting { opacity: 1; }

/* Title treatments and brand marks are transparent PNGs, so they suppress
   both the placeholder layer and the ground — otherwise an opaque plate is
   painted around the lettering. */
.art {
  --src: none;
  background-image: var(--src);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* ==========================================================================
   STATUS BAR  ·  HOME INDICATOR
   StatusBar 47, Home Indicator 32 (31431:766431). The indicator bar is
   128 x 6 at white@50 (I31431:766439;8502:54250).
   ========================================================================== */

.statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 8;
  height: var(--statusbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-2xl) 0 28px;
  font-size: var(--type-body-l-size);
  font-weight: var(--type-weight-semi-bold);
  letter-spacing: -0.02em;
  color: #fff;
  pointer-events: none;
}
.statusbar__glyphs { display: flex; align-items: center; gap: 6px; }
.statusbar__glyphs svg { display: block; }

.home-indicator {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  height: var(--home-indicator);
  display: grid;
  place-items: center;
  pointer-events: none;
}
.home-indicator::after {
  content: "";
  width: 128px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-white-50);
}

/* ==========================================================================
   APP BAR   I31431:766433;4220:39493
   px 16, py 12. Logo container 120 x 40. Icons container gap 20, icon 24,
   avatar 32 on #28cffb with #334655 lettering.
   ========================================================================== */

.chrome-scrim {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  height: calc(var(--statusbar-height) + 64px);
  background: var(--color-background);
  opacity: 0;
  /* Sits under the sticky tab strip, over everything else. */
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-standard);
}
.is-scrolled .chrome-scrim { opacity: 1; }

/* THE TOP CHROME IS ALWAYS LEGIBLE, NOT ONLY ONCE SCROLLED.
   The clock, the brand mark, the cast button and the avatar sit ON the
   artwork, and the artwork is whatever the editorial team put there that
   week: Vera is dark under the title safe area and the chrome reads, but a
   bright sky or a pale interior behind the same white icons leaves nothing
   to read. The scrim above only arrives on scroll, which is exactly the
   moment the problem has gone away.

   So a gradient is fixed over the top of every screen that has artwork
   under it — black at the very top where the status bar is, gone by the
   bottom of the app bar. It is a shadow under the chrome, not a bar: there
   is no edge to it, so nothing reads as a panel that is not one, and the
   image is untouched a third of the way down.

   Taller than the chrome it protects, because a ramp that ends ON the thing
   it is protecting ends in a visible line. */
.chrome-shade {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 4;
  height: calc(var(--statusbar-height) + 64px + var(--space-3xl));
  pointer-events: none;
  background: linear-gradient(to bottom,
              rgba(0, 10, 20, 0.72) 0%,
              rgba(0, 10, 20, 0.52) 32%,
              rgba(0, 10, 20, 0.24) 64%,
              rgba(0, 10, 20, 0) 100%);
  /* It has done its job once the ground behind the chrome is solid; fading
     it out with the scrim's arrival stops the two stacking into a band
     darker than either. */
  transition: opacity var(--dur-base) var(--ease-standard);
}
.is-scrolled .chrome-shade { opacity: 0; }

.appbar {
  position: absolute;
  top: var(--statusbar-height);
  left: 0; right: 0;
  z-index: 6;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-m) var(--frame-gutter);
}

/* The brand mark is an ASSET, not type. The slot is the 120 x 40 the design
   gives it; until the file is dropped in, the placeholder shows and the name
   is carried by the visually-hidden label — no hand-set wordmark stands in
   for a brand mark. See ASSETS.md. */
.brandmark {
  width: 120px;
  height: 40px;
  background-position: left center;
}
.brandmark--empty {
  border: 1px dashed var(--color-surface-variant);
  border-radius: var(--radius-s);
  display: grid;
  place-items: center;
  font-size: var(--type-body-xs-size);
  letter-spacing: 0.08em;
  color: var(--color-surface-variant);
}

.appbar__actions { display: flex; align-items: center; gap: var(--space-xl); }

.avatar {
  width: var(--avatar-xs);
  height: var(--avatar-xs);
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--color-primary-muted);
  color: var(--color-surface-container);
  font-size: var(--type-body-m-size);
  font-weight: var(--type-weight-semi-bold);
}

.iconbtn {
  position: relative;
  width: var(--icon-s);
  height: var(--icon-s);
  display: grid;
  place-items: center;
  flex: none;
  color: var(--color-on-surface);
}


/* Detail screens: back and cast on a disc, so they stay legible over any
   frame of artwork. */
.navbar__right { display: flex; align-items: center; gap: var(--space-s); }

.navbar {
  position: absolute;
  top: var(--statusbar-height);
  left: 0; right: 0;
  z-index: 6;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-m) var(--frame-gutter);
}

/* Detail App Bar  I31431:766443;4266:46227 — 32 x 32 on `surface`, not a
   40px blurred overlay disc. */
.disc {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-on-surface);
}

/* The solid header the floor and the companion use instead of a hero. */
.topbar {
  position: absolute;
  top: var(--statusbar-height);
  left: 0; right: 0;
  z-index: 7;
  height: 56px;
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: 0 var(--frame-gutter);
  /* Glass rather than a solid bar. The thread runs under it and a solid
     slab across the top of a dark screen reads as a cut, where a blurred
     one reads as depth — and it is the same treatment the tab bar already
     uses, so the two screens agree. */
  background: rgba(0, 24, 43, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--color-hairline);
}
.topbar__back {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  flex: none; margin-left: -6px;
  color: var(--color-on-surface);
}
.topbar__main { flex: 1 1 auto; min-width: 0; }
.topbar__title {
  font-size: var(--type-body-l-size);
  font-weight: var(--type-weight-semi-bold);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar__sub {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--type-body-s-size);
  color: var(--color-on-surface-variant);
  font-variant-numeric: tabular-nums;
}
.topbar__sub .pulse { color: var(--accent-active); }
.topbar__act {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 var(--space-m);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-on-surface);
  font-size: var(--type-body-s-size);
  font-weight: var(--type-weight-semi-bold);
}
.topbar__act svg { color: var(--accent-active); }

/* ==========================================================================
   HERO   I31431:766433;4220:37850
   Hero plate 390 x 520. Action Section absolute at the bottom: px 16, pb 24,
   gap 12, centred. Logo aspect 326/108, full width. Meta 14 at white@80 with
   4px round dividers. Tagline 16 at on-surface. Buttons gap 16.
   ========================================================================== */

.hero { position: relative; padding-bottom: var(--space-2xl); }

.hero__plate {
  position: relative;
  height: var(--hero-height);
  overflow: hidden;
}
/* THE FADE IS PAINTED OVER THE IMAGE, NOT MASKED OUT OF IT.
   -------------------------------------------------------------------------
   The frame's masks are transcribed stop for stop in tokens.css and the
   result on screen is identical, but they are applied as a GRADIENT OVER the
   artwork rather than as mask-image on it. The reason is the hero looked
   pixelated and oddly textured at full resolution on a 1440 x 2160 source:

     - a mask-image forces the element onto its own composited layer, and
       inside the device's `transform: scale()` that layer gets rasterised
       once and then scaled, so the photograph is resampled twice;
     - an alpha gradient resolved against a photograph bands, and the banding
       reads as texture in the picture rather than as a fade.

   Painting the same ramp in the page's own background colour on top is one
   paint, no extra layer, no resampling of the bitmap, and the artwork stays
   at the resolution it was shipped at. It is only valid because what sits
   behind the hero IS --color-background; if the hero ever moves onto another
   ground, this has to become a mask again. */
.hero__plate .media {
  position: absolute;
  inset: 0;
}
/* A light wash under the app bar on screens whose hero DOES run to the top
   (home). On a detail page the status bar has its own ground and this only
   has the nav row to cover. */
.hero__plate::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0; right: 0; top: 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(0, 24, 43, 0.55) 0%, rgba(0, 24, 43, 0) 100%);
  pointer-events: none;
}

/* THE RAMP, and it is the whole of what the mask used to do: carry the type
   over the lower half of the artwork and land on the page colour at the
   bottom edge, so the plate ends without an edge. Taller and stronger than
   the wash it replaces, because the mask was also thinning the photograph
   itself down there and a wash alone was leaving the meta line on open sky.
   Transcribed from hero-mask-3x4.svg — see the note on .hero__plate .media
   for why it is painted rather than masked. */
.hero__plate::after {
  content: "";
  position: absolute;
  /* `top: auto` is not decoration. A duplicate of this rule earlier in the
     file carried `inset: 0`, which pinned the top — and with top AND bottom
     set, `height` is ignored, so the ramp stretched over the whole 520px
     plate instead of its bottom 72%. That is why two rounds of "fix the
     hero" changed nothing: the stops were being applied, just across four
     times the distance. The duplicate is gone; this stays explicit. */
  top: auto;
  left: 0; right: 0; bottom: 0;
  height: 72%;
  background: linear-gradient(to bottom,
    rgba(0, 24, 43, 0) 0%,
    rgba(0, 24, 43, 0.34) 44%,
    rgba(0, 24, 43, 0.8) 72%,
    #00182b 92%);
  pointer-events: none;
}

/* hero-mask-2x3.svg: a longer, earlier fall, because the detail hero carries
   far more type over its lower half. */
.hero--detail .hero__plate::after {
  height: 72%;
  background: linear-gradient(to bottom,
    rgba(0, 24, 43, 0) 0%,
    rgba(0, 24, 43, 0.3) 40%,
    rgba(0, 24, 43, 0.78) 70%,
    #00182b 92%);
}

/* z-index matters: .hero__plate::after is generated as the plate's LAST
   child, so without it the wash paints over the title, the buttons and the
   meta line and the whole action section reads as dimmed. */
.hero__action {
  position: absolute;
  z-index: 1;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-m);
  padding: 0 var(--frame-gutter) var(--space-2xl);
}
/* Tighter inside the lockup than between the blocks. */
.hero__info { display: flex; flex-direction: column; gap: var(--space-m); width: 100%; }
/* A rhythm rather than one gap. Title and caption are one thing, the
   synopsis is the next, and the button is the thing you do after reading
   both — so the distances go 6, 14, 18 rather than 8, 8, 8. */

/* Title treatment. The design gives it the full content width at 326/108,
   so the height follows the width instead of being fixed. */
.hero__logo {
  width: 100%;
  aspect-ratio: 326 / 108;
}

.meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: var(--type-body-m-size);
  color: var(--color-white-80);
}
/* The separator in the design is a 4px disc, not a middot. */
.meta__dot {
  width: 3px; height: 3px;
  flex: none;
  border-radius: var(--radius-full);
  background: currentColor;
  opacity: 0.55;
}

.hero__tagline {
  width: 100%;
  font-size: var(--type-body-l-size);
  color: var(--color-on-surface);
  text-align: center;
}

.hero__buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-l);
  width: 100%;
}

/* ---- The detail hero  I31431:766443;4266:46226 ------------------------
   A taller plate (585, not 520) with rounded top corners, and a content
   block that is LEFT aligned rather than centred: title treatment 218 x 73,
   a full-width 44px primary button, three round actions, then the clamped
   description and the meta line. */

/* The content is IN FLOW here, not pinned to the bottom of the plate, with
   the plate sitting behind it. That is what makes opening the synopsis push
   the meta line and the rest of the page DOWN instead of shoving the title
   and buttons up — an absolutely bottom-anchored block can only grow
   upwards, which is exactly the wrong direction. */
.hero--detail {
  position: relative;
  padding-top: 313px;
  padding-bottom: var(--space-l);
}

/* ---- the top of a detail page  31431:766518 ----------------------------
   THE HERO DOES NOT RUN TO THE TOP EDGE. In the frame the status bar sits on
   its own ground and the artwork begins underneath it; only the nav row —
   back, cast, close — overlays the picture. The plate was running full
   bleed, which put the clock and the battery on whatever the artwork
   happened to be doing and lost the top 47px of every hero to a scrim.

   The scroller starts below the status bar instead of the plate being
   inset, so the artwork still reaches the left and right edges and the
   whole page scrolls under a clean strip. */
.scroll--inset { top: var(--statusbar-height); }
.phone:has(.scroll--inset) { background: var(--color-background); }
.hero--detail .hero__plate {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 585px;
  border-radius: var(--radius-l) var(--radius-l) 0 0;
}
/* relative + z-index, or the absolutely-positioned plate paints over the
   static content it is supposed to sit behind. */
.hero--detail .hero__action {
  position: relative;
  z-index: 1;
  align-items: flex-start;
  gap: var(--space-m);
  padding-bottom: 0;
}
.hero--detail .hero__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  width: 100%;
  padding-bottom: var(--space-m);
}
/* THE BOX MATCHES THE ARTWORK. tt-bluelights-detail.png is 1610 x 537, so a
   218 x 73 box is almost exactly right and there is no dead space in it. */
.hero--detail .hero__logo { width: 232px; height: auto; aspect-ratio: 1610 / 537; }

/* ---- the trailer hero's lockup  (The Hardacres) ------------------------
   These have to sit after .hero--detail .hero__logo, which is the same
   specificity — an earlier rule loses to it silently, which is exactly what
   happened the first time.

   The meta line is a caption to the title treatment here rather than a
   footnote under the synopsis: centred, tight under the logo, with the logo
   given more room to be the thing it is. The two read as one lockup. */
/* tt-hardacres.png is 1576 x 282 — five and a half to one. In a 268 x 88 box
   it rendered 48px tall and left FORTY pixels of empty space above and below
   it, which is the whole of the gap that looked like bad spacing. The box is
   the artwork's own ratio now, and wider, so the lettering is bigger as well
   as tighter. */
.hero--trailer .hero__logo {
  width: 308px; height: auto;
  aspect-ratio: 1576 / 282;
  margin: 0 auto;
}

/* THE LOCKUP'S RHYTHM, in one place and after the rule it has to beat.
   .hero--detail .hero__info sets gap: 20px at the same specificity and
   earlier in the file, so a `gap: 0` written above it loses silently — which
   is what left 20px of flex gap stacked on top of every margin here and made
   the block twice as tall as it reads in the design.

   Title and caption are one thing; the synopsis is the next; the button is
   what you do after reading both. 6, 14, 18 — and nothing else contributing. */
.hero--trailer .hero__info {
  gap: 0;
  padding-bottom: 0;
}
.hero--trailer .hero__info > .meta          { margin: 6px 0 0; justify-content: center; }
.hero--trailer .hero__info > .readmore      { margin-top: 14px; }
.hero--trailer .hero__info > .hero__buttons { margin-top: 18px; }

.hero--detail .hero__buttons { flex-direction: column; gap: var(--space-l); }
.hero--detail .btn--primary {
  width: 100%;
  height: 44px;
  padding: var(--space-m) var(--space-xl);
  font-size: var(--type-body-l-size);
}
.hero--detail .meta { justify-content: flex-start; width: 100%; color: var(--color-on-surface); }
.hero--detail .meta .meta__dot { background: var(--color-on-surface); }

/* The MORE affordance sits ON the last line with a short fade to its left,
   so the truncation reads as deliberate rather than as a clipped paragraph.
   103 x 19, background → overlay-variant, leftwards. */
.readmore__fade {
  position: absolute;
  right: 0; bottom: 0;
  width: 103px; height: 19px;
  width: 132px;
  background: linear-gradient(to left,
              var(--color-background) 0%,
              var(--color-background) 42%,
              rgba(0, 24, 43, 0) 100%);
  pointer-events: none;
}

/* Pagination dots  I31431:766433;4220:37851 — five 8px dots, gap 8, py 16. */
.dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  padding: var(--space-l) 0;
  filter: drop-shadow(0 0 8px var(--color-overlay));
}
.dots i {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-white-50);
  transition: background var(--dur-base) var(--ease-standard);
}
.dots i.on { background: var(--color-on-surface); }

/* ==========================================================================
   BUTTONS
   Primary: h 40, px 20, py 8, radius 8, gap 12, icon 20, label 14 semibold.
   Icon button: p 10, radius full, bg surface, border 1px primary@30.
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-m);
  height: 40px;
  padding: var(--space-s) var(--space-xl);
  border-radius: var(--radius-s);
  font-size: var(--type-body-m-size);
  font-weight: var(--type-weight-semi-bold);
  white-space: nowrap;
}
.btn svg { display: block; flex: none; }
.btn--primary { background: var(--accent-action); color: var(--color-on-primary); }
.btn--ghost   { background: var(--color-surface); border: 1px solid var(--color-primary-30); color: var(--color-on-surface); }
.btn--grow    { flex: 1 1 0; min-width: 0; }
.btn--block   { display: flex; width: 100%; }

/* NO PADDING ON A CENTRED GRID.
   The disc is 40, the icon is 20, and place-items:center is the whole job.
   The 10px padding that used to be here left a content box of 18px inside a
   border-box of 40 — so a 20px icon overflowed it, and an overflow in a
   fixed-height border box spills DOWNWARD rather than evenly. Every icon in
   the row sat about a pixel low, which is what the three of them side by
   side made obvious. */
.btn-round {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  flex: none;
  border: 1px solid var(--color-primary-30);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-primary);
}
.btn-round svg { display: block; }
.btn-row { display: flex; justify-content: center; gap: var(--space-l); }

/* ==========================================================================
   RAIL   31431:766434 / 766435 / 766436
   Outer: pl 16, pb 24 (16 on the Continue Watching and Top 10 rails).
   Header: pb 12, pr 16 — title 18 semibold, chevron 24, subtitle 12.
   Track: gap 12.
   ========================================================================== */

.rail { padding-left: var(--frame-gutter); padding-bottom: var(--space-2xl); }
.rail--tight { padding-bottom: var(--space-l); }

.rail__head {
  padding-right: var(--frame-gutter);
  padding-bottom: var(--space-m);
}
.rail__top {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.rail__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--type-body-xl-size);
  font-weight: var(--type-weight-semi-bold);
  color: var(--color-on-surface);
}
.rail__more { flex: none; width: var(--icon-s); height: var(--icon-s); color: var(--color-on-surface); }
.rail__sub {
  font-size: var(--type-body-s-size);
  color: var(--color-on-surface-variant);
}

.rail__track {
  display: flex;
  align-items: flex-start;
  gap: var(--space-m);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.rail__track::-webkit-scrollbar { width: 0; height: 0; }
.rail__track > * { flex: none; scroll-snap-align: start; }

/* A PRESS MUST NOT RE-SNAP THE RAIL.
   -------------------------------------------------------------------------
   The snap target is the rail's direct child, and for a card without a
   caption that child IS the `.card`. So `.card.is-press { transform:
   scale(.97) }` shrinks the very box the snapping is measured from: the
   card's left edge moves inward, `scroll-snap-align: start` now wants a
   different offset, and the container scrolls to it. Pressing a card moved
   the rail — by a couple of pixels, under the finger, which is exactly where
   it is most obvious.

   A card WITH a caption sits inside `.titled`, which is the snap target
   instead and is never transformed, which is why it only happened to some of
   them.

   Snapping is suspended for as long as anything in the rail is pressed. The
   rail is already resting on a snap point when the press begins, so there is
   nothing for it to snap to when it comes back. */
.rail__track:has(.is-press) { scroll-snap-type: none; }
.rail__track--mid { align-items: center; }

/* The last card needs the right gutter, or a rail scrolled to its end sits
   flush against the bezel. A pseudo-element rather than padding, because
   padding-right on a flex scroller is dropped by WebKit. */
.rail__track::after { content: ""; flex: none; width: var(--frame-gutter); height: 1px; }

/* ==========================================================================
   CARDS
   Vertical Main Card 144 x 216, radius 8, border 1px white@20 — and NO
   caption underneath. The design labels a card with an optional plate INSIDE
   the artwork, not with type below it.
   ========================================================================== */

.card {
  display: block;
  width: var(--card-2x3-width);
  height: var(--card-2x3-height);
  position: relative;
  border: 1px solid var(--color-white-20);
  border-radius: var(--radius-s);
  overflow: hidden;
}
.card .media { position: absolute; inset: 0; }

/* Label Container  I31431:766434;2651:17366;1141:13219 — primary plate on the
   bottom edge, px 4, py 2, radius 2 on the top corners, 10px semibold. */
.card__label {
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-2xs) var(--radius-2xs) 0 0;
  background: var(--accent-active);
  color: var(--color-on-primary);
  font-size: var(--type-body-xs-size);
  font-weight: var(--type-weight-semi-bold);
  white-space: nowrap;
}
.card__label svg { display: block; }

/* Top 10  I31431:766436;1278:15567 — card 111 x 167, numeral 80px in a
   50 x 65 box pulled 10px into the artwork, bottom aligned. */
.rank-card { display: flex; align-items: flex-end; }
.rank-card .card { width: 111px; height: 167px; }
.rank-card { align-items: flex-end; }
.rank-card .card { position: relative; z-index: 1; }
.rank-card__n {
  position: relative;
  z-index: 0;
  width: 50px; height: 65px;
  margin-right: -10px;
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  font-size: 80px;
  line-height: 0.82;
  font-weight: var(--type-weight-semi-bold);
  color: transparent;
  -webkit-text-stroke: 2px var(--color-on-surface-variant);
  user-select: none;
}

/* Continue Watching — "Enriched Card"  I31431:766435;2651:17127
   256 wide on surface, border white@20, radius 8. Art 256/144. Progress 4px
   on surface-variant. Info p 8, gap 4. Play icon 48 at left -1, top 79. */
.cw {
  display: block;
  width: 256px;
  border: 1px solid var(--color-white-20);
  border-radius: var(--radius-s);
  background: var(--color-surface);
  overflow: hidden;
  position: relative;
  text-align: left;
}
.cw__art {
  position: relative;
  width: 100%;
  aspect-ratio: 256 / 144;
  border-bottom: 1px solid var(--color-white-20);
  overflow: hidden;
}
.cw__art .media { position: absolute; inset: 0; }
.cw__play {
  position: absolute;
  left: -1px;
  top: 79px;
  padding: var(--space-s);
  color: var(--color-on-surface);
  z-index: 1;
}
.cw__play svg { display: block; width: 48px; height: 48px; }

.progress {
  display: block;
  height: 4px;
  width: 100%;
  background: var(--color-surface-variant);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  background: var(--accent-progress);
}

.cw__info {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-s);
}
.cw__text { flex: 1 1 auto; min-width: 0; }
.cw__title {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--type-body-l-size);
  font-weight: var(--type-weight-semi-bold);
  color: var(--color-on-surface);
}
.cw__title .meta__dot { background: var(--color-on-surface); }
.cw__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw__sub {
  font-size: var(--type-body-s-size);
  color: var(--color-on-surface-variant);
}
.cw__more { flex: none; width: var(--icon-m); height: var(--icon-m); display: grid; place-items: center; color: var(--color-on-surface); }

/* Brand block  31431:766437 — a 390/520 plate with a 230-wide title
   treatment, a left-aligned tagline and three poster cards, all inside an
   action section 23.61px off the bottom. */
.brandblock { position: relative; padding-bottom: var(--space-l); }
.brandblock__plate {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 520;
  overflow: hidden;
}
/* Painted, not masked — see the note on .hero__plate. */
.brandblock__plate .media {
  position: absolute;
  inset: 0;
}
/* color/overlay-variant over the art, per the frame, plus the same ramp the
   hero uses so the lockup at the bottom holds up. */
.brandblock__plate::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(0, 24, 43, 0.6) 0%,
      rgba(0, 24, 43, 0) 30%,
      rgba(0, 24, 43, 0.9) 80%,
      var(--color-background) 100%),
    var(--color-overlay-variant);
}
.brandblock__plate::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 58%;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(0, 24, 43, 0) 0%, rgba(0, 24, 43, 0.72) 62%, #00182b 100%);
}
/* z-index 2 clears the plate's own wash (::before, z-index 1). The lockup
   and the poster cards are drawn OVER the masked art — they are not part of
   it, and inheriting its fade is what made the Shetland cards look washed. */
.brandblock__action {
  position: absolute;
  z-index: 2;
  left: 0; right: 0;
  bottom: 23.61px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-m);
  padding: 0 var(--frame-gutter);
}
.brandblock__logo { width: 230px; height: 69.385px; background-position: left center; }
.brandblock__tagline { font-size: var(--type-body-l-size); color: var(--color-on-surface); }
.brandblock__cards { display: flex; gap: var(--space-m); }

/* ==========================================================================
   TAB BAR   31431:766439
   Container pt 16, pb 25, px 25. The pill is a glass plate: black at 60% over
   white at 6%, 67% opacity, radius 1000. Tab 54 tall, icon 24, label 10.
   The selected tab carries a #121212 plate and an iOS-blue label — that is
   what the component specifies, and it is deliberately not the brand accent.
   ========================================================================== */

.tabbar {
  position: absolute;
  left: 0; right: 0;
  bottom: var(--home-indicator);
  z-index: 30;
  padding: var(--space-l) 25px 25px;
  pointer-events: none;
}
/* The plate. The frame builds it from four stacked layers (a colour-burn
   wash, two gradients, a screen-blend glass pass and a 0 8px 40px shadow) at
   67% over a -4px bleed. Reproduced here as a blurred gradient with the same
   bleed, an inner hairline for the glass edge, and a deeper shadow — a flat
   two-stop fill was what made it read as a drawn rectangle rather than as a
   piece of floating chrome. */
.tabbar__pill {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 0 2px;
  border-radius: 1000px;
  background: linear-gradient(rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)),
              linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.72));
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45),
              0 1px 0 rgba(255, 255, 255, 0.10) inset,
              0 0 0 0.5px rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  pointer-events: auto;
}

.tabbar__item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 8px 9px;
  color: #f5f5f5;
}
.tabbar__item svg { display: block; position: relative; z-index: 1; }
.tabbar__item span {
  position: relative;
  z-index: 1;
  font-size: 10px;
  line-height: 12px;
  font-weight: 600;
  text-align: center;
}
.tabbar__item[aria-current="page"] { color: var(--tab-selected); }
.tabbar__item[aria-current="page"]::before {
  content: "";
  position: absolute;
  inset: 0 -1px;
  border-radius: 100px;
  background: #121212;
}

/* ==========================================================================
   SEGMENTED CONTROL
   The active tab is an underline and a weight change, never a filled pill —
   a pill here would spend the accent on navigation.

   The indicator TRAVELS: js/app.js measures the outgoing and incoming tabs
   and animates a single bar between them, and scrolls the strip so the
   selected tab is always in view. That is the horizontal movement a tab
   change is supposed to have.
   ========================================================================== */

/* Detail Segmented Control  I31431:766444;3608:38439 — items carry their own
   px 16 / py 12 and there is NO gap between them; the indicator is 3px with
   rounded top corners and spans the whole item, padding included. */
.segmented {
  position: relative;
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--color-hairline);
  scrollbar-width: none;
  scroll-behavior: smooth;
  transition: border-color var(--dur-base) var(--ease-standard);
}
.segmented::-webkit-scrollbar { width: 0; height: 0; }

.segmented__tab {
  flex: none;
  padding: var(--space-m) var(--frame-gutter);
  font-size: var(--type-body-l-size);
  color: var(--color-on-surface-variant);
  white-space: nowrap;
  transition: color var(--dur-base) var(--ease-standard);
}
.segmented__tab[aria-selected="true"] {
  color: var(--color-on-surface);
  font-weight: var(--type-weight-semi-bold);
}

.segmented__bar {
  position: absolute;
  bottom: 0;
  height: 3px;
  border-radius: var(--radius-full) var(--radius-full) 0 0;
  background: var(--accent-active);
  transform: translateX(var(--x, 0));
  width: var(--w, 0);
  transition: transform var(--dur-tab) var(--ease-tab),
              width var(--dur-tab) var(--ease-tab);
}
/* ---- the tab strip sticks under the nav row ---------------------------
   These panels run to two and a half thousand pixels, and losing the tabs
   off the top of a list that long means scrolling back up to change what
   you are looking at. It pins directly under the back/cast row.

   64px is that row's height. The scroller already starts below the status
   bar (.scroll--inset), so the sticky offset is measured from there and not
   from the top of the handset.

   The background is the page's own colour, so at rest — sitting under the
   hero with the page behind it — it is invisible, and it only reads as a
   bar once there is content passing beneath it. The nav row above gets its
   ground from .chrome-scrim, which already fades in on .is-scrolled. */
.segmented-wrap {
  position: sticky;
  top: 64px;
  z-index: 6;
  background: var(--color-background);
}

/* NO LINE ONCE IT IS AGAINST ITS STOP.
   At rest the hairline under the tabs is the design file's and it separates
   the strip from the panel below it. Stuck, it is a rule drawn across the
   screen with the page sliding under it — and that is the one place it reads
   as a seam rather than as a separator, because there is already a nav row
   above it and the two together make a box nothing asked for.

   What replaces it is a short fade off the bottom edge of the strip: the
   strip's own ground going to nothing over sixteen pixels, so content
   dissolves as it passes under instead of being cut off at a line. Over the
   page at rest it is invisible — it is the same colour as what is behind it. */
.phone.is-tabs-stuck .segmented { border-bottom-color: transparent; }
.segmented-wrap::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: var(--space-l);
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to bottom,
              var(--color-background), var(--color-background-0));
  transition: opacity var(--dur-base) var(--ease-standard);
}
.phone.is-tabs-stuck .segmented-wrap::after { opacity: 1; }
/* NO PADDING AND NO SECOND RULE. .segmented already draws a 1px bottom
   border; the hairline added here was a second line 16px below the first,
   with a band of sticky background between them — which is exactly what it
   looked like. The breathing room the panel needs belongs to the PANEL, so
   it scrolls away instead of sticking. */
.panels { padding-top: var(--space-l); }

/* The panel slides in from the side the new tab sits on, so the movement
   agrees with the direction the indicator travelled. */
.panels { position: relative; overflow: hidden; }
.panel[hidden] { display: none; }
.panel.is-in-right { animation: slide-in-right var(--dur-tab) var(--ease-tab) backwards; }
.panel.is-in-left  { animation: slide-in-left  var(--dur-tab) var(--ease-tab) backwards; }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slide-in-left  { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

/* Chips — the companion's lens filter. */
.chips {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: var(--space-s);
  overflow-x: auto;
  padding: var(--space-m) var(--frame-gutter);
  background: var(--color-background);
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.chips::-webkit-scrollbar { width: 0; height: 0; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 var(--space-m);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-on-surface-variant);
  font-size: var(--type-body-s-size);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard);
}
.chip svg { display: block; }
.chip.is-press { transform: scale(0.96); }
/* SELECTED IS FILLED. An accent border on a dark pill is a difference you
   have to go looking for; a filled pill with dark text is one you cannot
   miss, and it is the same accent-with-on-primary pairing the buttons use. */
.chip[aria-pressed="true"] {
  background: var(--accent-active);
  border-color: var(--accent-active);
  color: var(--color-on-primary);
  font-weight: var(--type-weight-semi-bold);
}
.chip[aria-pressed="true"] svg { color: var(--color-on-primary); }

/* CATCH ME UP. Not one of the example questions — the one thing a second
   screen gets asked for more than anything else — so it is tinted, it keeps
   first place in the row, and a hairline separates it from the examples. */
.chip--catchup {
  position: relative;
  margin-right: var(--space-s);
  padding-right: var(--space-m);
  background: var(--lens-tint);
  border-color: rgba(166, 226, 245, 0.35);
  color: var(--color-primary);
  font-weight: var(--type-weight-semi-bold);
}
.chip--catchup svg { color: var(--color-primary); }
.chip--catchup::after {
  content: "";
  position: absolute;
  right: calc(var(--space-s) * -1);
  top: 6px; bottom: 6px;
  width: 1px;
  background: var(--color-hairline);
}

/* Icons shipped as files. An externally referenced SVG never sees the page's
   CSS, so each one carries the colour the frame gives it; `.ic` only has to
   stop it being squeezed by a flex parent. */
.ic { display: block; flex: none; }

/* OPTICAL CENTRING, MEASURED.
   -------------------------------------------------------------------------
   Every one of these is a 20 x 20 export and every one is centred in its own
   box — but the INK is not. Reading each file's path bounds gives the real
   centre of what you can see:

     bb-plus        10.00, 10.00     centred
     bb-download     9.95, 10.19     0.19 low
     bb-share        9.38, 10.06     0.62 left
     bb-back         9.49, 10.00     0.51 left
     bb-cast         9.63, 10.44     0.37 left, 0.44 low

   Half a pixel is nothing on its own; three of these side by side in 40px
   discs is a row that does not line up, which is what it looked like. The
   nudge is a PERCENTAGE of the icon's own box, so it holds at 20 and at 24.

   bb-play is deliberately NOT corrected: its ink centre sits 0.26 right,
   which is a triangle optically centred — moving it to the geometric centre
   would make it look left. */
.ic[src$="bb-share-20.svg"]    { transform: translate(3.1%, -0.3%); }
.ic[src$="bb-back-20.svg"]     { transform: translateX(2.55%); }
.ic[src$="bb-cast-20.svg"]     { transform: translate(1.85%, -2.2%); }
.ic[src$="bb-download-20.svg"] { transform: translateY(-0.95%); }

/* Dropdown  I31431:766446;4486:33219 — surface, radius 8, item px16/py8 with
   a 16 semibold label, and a 20px chevron sitting on pr 12. */
.dropdown-wrap { padding-bottom: var(--space-l); }
.dropdown {
  display: flex;
  align-items: center;
  width: 100%;
  padding-right: var(--space-m);
  border-radius: var(--radius-s);
  background: var(--color-surface);
  overflow: hidden;
}
.dropdown__item {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--space-s) var(--frame-gutter);
  text-align: left;
  font-size: var(--type-body-l-size);
  font-weight: var(--type-weight-semi-bold);
  color: var(--color-on-surface);
}

/* ==========================================================================
   LIST ROWS
   ========================================================================== */

.list { padding: 0 var(--frame-gutter); }

.row {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  width: 100%;
  padding: var(--space-m) 0;
  border-bottom: 1px solid var(--color-hairline);
  text-align: left;
}
.row:last-child { border-bottom: 0; }

.row__main { flex: 1 1 auto; min-width: 0; }
.row__name {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  font-size: var(--type-body-l-size);
  font-weight: var(--type-weight-semi-bold);
  color: var(--color-on-surface);
}
.row__note { font-size: var(--type-body-s-size); color: var(--color-on-surface-variant); }
.row__value {
  flex: none;
  font-size: var(--type-body-m-size);
  color: var(--color-on-surface-variant);
  text-align: right;
}

.row__thumb {
  width: 44px; height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  overflow: hidden;
  background-color: var(--color-surface);
  color: var(--color-on-surface-variant);
  font-size: var(--type-body-m-size);
  font-weight: var(--type-weight-semi-bold);
}
.row__thumb--square { border-radius: var(--radius-s); width: 56px; height: 56px; }
/* The cast treatment. Every portrait is cropped face-centred and square by
   tools/headshot.swift before it ships, so the row only has to put it in a
   circle at one size and the column reads as one set rather than six
   different photographs cropped six different ways. */
.row__thumb--round { width: 52px; height: 52px; border-radius: var(--radius-full); }
.row__thumb[style*="--src:url"] > span { display: none; }

/* ONE SCORE, ONE COVER.
   The Hardacres' music is an original score with no release — MusicBrainz
   has no release group for it, so there is no cover art to source and the
   five rows were carrying five episode stills instead, which made a cue
   sheet look like an episode list and borrowed photography for a job
   photography was not doing.

   A score is one record, so its cues get the one cover every music app
   would show them under, and for a score that cover is the series' own key
   art — which is what a soundtrack release actually ships with. The hairline
   is the only thing this adds: it reads as a sleeve rather than as another
   still in a column of stills. */
.row__thumb--score { box-shadow: inset 0 0 0 1px var(--color-hairline); }

/* "Playing now". An accent marker on one row, not a restyle of it — the
   list stays one kind of thing and the current item is still findable at a
   glance. */

/* THE ROW THAT IS HAPPENING NOW.
   Under the name, not beside it. A pill on the title line competes with the
   title for the same pixels and wraps anything longer than three words onto
   a second line — which is exactly what the chapter list looked like. This
   is a note, and notes go where notes go. */
.row__now {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: var(--type-body-s-size);
  font-weight: var(--type-weight-semi-bold);
  color: var(--accent-active);
}
.row__now::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: var(--radius-full);
  background: currentColor;
  animation: pulse 2.4s var(--ease-standard) infinite;
}

.list__head {
  padding: var(--space-l) var(--frame-gutter) var(--space-s);
  font-size: var(--type-body-l-size);
  font-weight: var(--type-weight-semi-bold);
  color: var(--color-on-surface);
}

/* Locked rows — nothing past the timecode the viewer has reached. */
.row--locked .row__name, .row--locked .row__note { color: var(--color-surface-variant); }
.row--locked .row__thumb { background-image: none; background: var(--color-surface); color: transparent; }
.redact {
  display: inline-block;
  height: 10px;
  width: var(--w, 120px);
  border-radius: var(--radius-2xs);
  background: var(--color-surface-variant);
  opacity: 0.45;
  vertical-align: middle;
}

/* ==========================================================================
   EPISODE
   ========================================================================== */

/* Episode List Item. The SAME component carries Episodes and Trailers &
   Extras — the list gap is 24, the internal gaps are 8, and there is no
   hairline between items. */
.episodes { display: flex; flex-direction: column; gap: var(--space-2xl); padding-bottom: var(--space-l); }
.episode { display: flex; flex-direction: column; gap: var(--space-s); }

/* Episode Card — 358 x 202.04 on surface, 1px white@20, radius 8. */
.episode__still {
  position: relative;
  width: 100%;
  height: 202.04px;
  border: 1px solid var(--color-white-20);
  border-radius: var(--radius-s);
  background: var(--color-surface);
  overflow: hidden;
}
.episode__still .media { position: absolute; inset: 0; }
.episode__play {
  position: absolute;
  z-index: 1;
  left: -1px; bottom: -1px;
  padding: var(--space-m);
  line-height: 0;
}
.episode__progress { position: absolute; left: 0; right: 0; bottom: 0; }

.episode__meta-box { display: flex; flex-direction: column; gap: var(--space-s); }

/* Container: the info block and the 24px action side by side, gap 16, top
   aligned — the action tracks the TITLE, not the whole block. */
.episode__row { display: flex; align-items: flex-start; gap: var(--space-l); }
.episode__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--space-s); }
.episode__act { flex: none; width: var(--icon-s); height: var(--icon-s); }

.episode__title {
  height: 24px;
  font-size: var(--type-body-l-size);
  font-weight: var(--type-weight-semi-bold);
  color: var(--color-on-surface);
}
.episode__meta {
  display: flex; align-items: center; gap: var(--space-s);
  font-size: var(--type-body-m-size);
  color: var(--color-on-surface-variant);
}
.episode__synopsis { font-size: var(--type-body-m-size); color: var(--color-on-surface-variant); }

/* Tag — on the page ground with an outline border, not a tinted chip. */
.tag {
  padding: var(--space-2xs) var(--space-s);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-xs);
  background: var(--color-background);
  font-size: var(--type-body-xs-size);
  font-weight: var(--type-weight-semi-bold);
  color: var(--color-on-surface);
}

/* The clamped description with its MORE affordance. */
.readmore { position: relative; width: 100%; text-align: left; }
.readmore p {
  font-size: var(--type-body-m-size);
  color: var(--color-on-surface);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.readmore.is-open p { -webkit-line-clamp: unset; display: block; }
/* I31431:766443;…;4236:34623 — surface-variant plate, px 8 / py 2, radius 4,
   10px semibold. */
.readmore__more {
  position: absolute;
  right: 0; bottom: 0;
  padding: var(--space-2xs) var(--space-s);
  border-radius: var(--radius-xs);
  background: var(--color-surface-variant);
  color: var(--color-on-surface);
  font-size: var(--type-body-xs-size);
  font-weight: var(--type-weight-semi-bold);
}
.readmore.is-open .readmore__more { position: static; display: inline-block; margin-top: var(--space-s); }
.readmore.is-open .readmore__fade { display: none; }


/* ==========================================================================
   ARRIVAL
   --------------------------------------------------------------------------
   Items settle in rather than appearing. Unhurried on purpose: a long, eased
   travel over a short distance reads as composure, where a fast bounce over
   a long one reads as a website. js/app.js sets --i per item for the stagger
   and reveals below-the-fold blocks as they come into view.
   ========================================================================== */

/* NOT hidden by default. An item is only made invisible once JS has taken
   responsibility for revealing it (.is-armed), so if the observer never
   fires — no IntersectionObserver, a panel that was hidden when it was
   scanned, a script error — the content is simply there. Content that
   depends on an animation to be visible at all is a bug waiting to happen. */
.rise.is-armed { opacity: 0; }
.rise.is-in {
  animation: rise var(--dur-rise) var(--ease-rise) backwards;
  animation-delay: calc(var(--i, 0) * var(--stagger-rise));
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* THE RIPPLE. A revealed block brings its own contents in behind it, one
   short beat apart, so a rail arrives as a run of cards rather than as a
   single slab. Eight steps is enough for any rail on screen at once; past
   that they share the last delay, which nobody can see. */
.rise.is-in .rail__track > *,
.rise.is-in .grid-cards > *,
.rise.is-in .brandblock__cards > *,
.rise.is-in .episodes > * {
  animation: rise var(--dur-rise) var(--ease-rise) backwards;
}
.rise.is-in :is(.rail__track, .grid-cards, .brandblock__cards, .episodes) > *:nth-child(1) { animation-delay: calc(var(--i, 0) * var(--stagger-rise)); }
.rise.is-in :is(.rail__track, .grid-cards, .brandblock__cards, .episodes) > *:nth-child(2) { animation-delay: calc(var(--i, 0) * var(--stagger-rise) + 1 * var(--stagger-item)); }
.rise.is-in :is(.rail__track, .grid-cards, .brandblock__cards, .episodes) > *:nth-child(3) { animation-delay: calc(var(--i, 0) * var(--stagger-rise) + 2 * var(--stagger-item)); }
.rise.is-in :is(.rail__track, .grid-cards, .brandblock__cards, .episodes) > *:nth-child(4) { animation-delay: calc(var(--i, 0) * var(--stagger-rise) + 3 * var(--stagger-item)); }
.rise.is-in :is(.rail__track, .grid-cards, .brandblock__cards, .episodes) > *:nth-child(5) { animation-delay: calc(var(--i, 0) * var(--stagger-rise) + 4 * var(--stagger-item)); }
.rise.is-in :is(.rail__track, .grid-cards, .brandblock__cards, .episodes) > *:nth-child(6) { animation-delay: calc(var(--i, 0) * var(--stagger-rise) + 5 * var(--stagger-item)); }
.rise.is-in :is(.rail__track, .grid-cards, .brandblock__cards, .episodes) > *:nth-child(7) { animation-delay: calc(var(--i, 0) * var(--stagger-rise) + 6 * var(--stagger-item)); }
.rise.is-in :is(.rail__track, .grid-cards, .brandblock__cards, .episodes) > *:nth-child(n+8) { animation-delay: calc(var(--i, 0) * var(--stagger-rise) + 7 * var(--stagger-item)); }

@media (prefers-reduced-motion: reduce) {
  .rise, .rise.is-armed, .rise.is-in { opacity: 1; animation: none; transform: none; }
  .rise.is-in :is(.rail__track, .grid-cards, .brandblock__cards, .episodes) > * { animation: none; }
  .media, .media.is-waiting { opacity: 1; transition: none; }
}

/* ==========================================================================
   THE ENTRANCE
   --------------------------------------------------------------------------
   THREE MOVEMENTS, and nothing else is allowed one.

     resolve   a picture comes up with a shade of scale coming off it. 1.04
               to 1 over nearly a second reads as something coming into
               focus; the same picture sliding would read as a slideshow.
     rise      content travels ten pixels up. Short, because the distance is
               not the point — the arrival is.
     settle    chrome fades in place and does not move at all. A frame that
               travels is a frame you end up watching instead of the thing
               inside it, and every version of this that moved the top bar
               looked cheap.

   TWO SCHEDULES, because the two kinds of screen are read differently.
   js/app.js sets data-enter and the --enter indices; every duration and
   delay is here.

     [data-enter="hero"]     home, both detail pages
       0.00  the picture        hero plate / trailer / brand plate
       0.14  the frame          app bar or back bar
       0.20  the lockup         title treatment, meta, synopsis, buttons
       0.40  the panel          companion entry, tab strip, pagination
       0.50  the foot           tab bar
       0.42  the content        rails and panels, released by js/app.js

     [data-enter="thread"]   the companion
       0.00  the live chrome    header
       0.08  the television     playback strip
       0.16  the lenses         chip row
       0.22  the conversation   turns, BOTTOM-MOST FIRST
       0.30  the foot           composer

   The stages overlap at the edges deliberately. Four strictly separated
   stages took a second and a half and felt like a loading screen; starting
   the next while the last is still settling reads as one movement with
   several parts, which is what it is.
   ========================================================================== */

@keyframes enter-resolve {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: none; }
}
@keyframes enter-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes enter-settle {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes enter-foot {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---- hero screens ------------------------------------------------------ */

/* NOTHING HERE MAY NAME A .rise BLOCK.
   The entrance owns the first screenful; the arrival system owns everything
   that scrolls into view, and a few elements were in both — the companion
   card and the brand block's plate were animated by the entrance AND armed
   as arrivals, which is what the double-load looked like on the way in. One
   element, one animation, one owner. js/app.js enforces it (see entrance()),
   but the rule starts here: if a selector below ever matches something
   carrying .rise, the .rise is the one that goes. */

.phone.is-enter[data-enter="hero"] .hero__plate,
.phone.is-enter[data-enter="hero"] .trailer {
  animation: enter-resolve 1.15s var(--ease-rise) backwards;
}
.phone.is-enter[data-enter="hero"] .appbar,
.phone.is-enter[data-enter="hero"] .navbar {
  animation: enter-settle 0.62s var(--ease-standard) 0.24s backwards;
}
.phone.is-enter[data-enter="hero"] .hero__action > *,
.phone.is-enter[data-enter="hero"] .hero__info > * {
  animation: enter-rise 0.68s var(--ease-rise) backwards;
  animation-delay: calc(0.36s + var(--enter, 0) * 0.085s);
}
/* .hero__info is a wrapper, not an item — it must not animate as well as its
   own children, or everything inside it fades twice. */
.phone.is-enter[data-enter="hero"] .hero__info { animation: none; }

.phone.is-enter[data-enter="hero"] .dots {
  animation: enter-rise 0.6s var(--ease-rise) 0.62s backwards;
}
.phone.is-enter[data-enter="hero"] .segmented-wrap {
  animation: enter-settle 0.6s var(--ease-standard) 0.66s backwards;
}
.phone.is-enter[data-enter="hero"] .tabbar {
  animation: enter-foot 0.62s var(--ease-rise) 0.74s backwards;
}

/* ---- trailer heroes ----------------------------------------------------
   The Hardacres. Same three movements, half the distance between them: the
   video is only 219px of a 844px screen, so everything under it has to be
   there almost as soon as it is or the page reads as empty. The video fades
   and does not scale — see entrance() in js/app.js. */

.phone.is-enter[data-enter="trailer"] .trailer {
  animation: enter-settle 0.72s var(--ease-standard) backwards;
}
.phone.is-enter[data-enter="trailer"] .navbar {
  animation: enter-settle 0.5s var(--ease-standard) 0.1s backwards;
}
.phone.is-enter[data-enter="trailer"] .hero__action > *,
.phone.is-enter[data-enter="trailer"] .hero__info > * {
  animation: enter-rise 0.56s var(--ease-rise) backwards;
  animation-delay: calc(0.16s + var(--enter, 0) * 0.055s);
}
.phone.is-enter[data-enter="trailer"] .hero__info { animation: none; }
.phone.is-enter[data-enter="trailer"] .segmented-wrap {
  animation: enter-settle 0.5s var(--ease-standard) 0.42s backwards;
}
.phone.is-enter[data-enter="trailer"] .tabbar {
  animation: enter-foot 0.52s var(--ease-rise) 0.46s backwards;
}

/* ---- the companion ----------------------------------------------------- */

.phone.is-enter[data-enter="thread"] .topbar {
  animation: enter-settle 0.56s var(--ease-standard) backwards;
}
.phone.is-enter[data-enter="thread"] .chips {
  animation: enter-settle 0.56s var(--ease-standard) 0.2s backwards;
}
/* Bottom-most first — see the --enter indices in js/app.js. */
.phone.is-enter[data-enter="thread"] .thread > .turn {
  animation: enter-rise 0.64s var(--ease-rise) backwards;
  animation-delay: calc(0.34s + var(--enter, 0) * 0.11s);
}
.phone.is-enter[data-enter="thread"] .composer {
  animation: enter-foot 0.62s var(--ease-rise) 0.42s backwards;
}

@media (prefers-reduced-motion: reduce) {
  .phone.is-enter *,
  .phone.is-enter[data-enter="hero"] .hero__plate,
  .phone.is-enter[data-enter="hero"] .trailer { animation: none !important; }
}

/* THE SHEET LOCKS WHAT IS BEHIND IT. Without this the scroller kept taking
   scroll while the sheet was open, which re-ran the arrival sweep and left
   the page visibly crawling underneath. */
.is-sheet-open .scroll { pointer-events: none; }


/* ==========================================================================
   MOTION PREFERENCES
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .segmented, .chips { scroll-behavior: auto; }
}

/* ==========================================================================
   THE TRAILER CARD   —   THIS CONCEPT'S ONE NEW COMPONENT
   --------------------------------------------------------------------------
   No Figma node behind it, because the rail it sits in is the proposal.

   It is the design's 2:3 card and nothing else: `.tcard` is applied ON TOP of
   `.card`, so the size, the radius, the border and the press all come from
   the component above rather than from a second definition that can drift
   away from it. What is added is a clip that plays while this is the card
   being looked at, and the title's own lockup — because the artwork
   underneath is the clean right-align cut and carries no lettering of its
   own, which is what lets the preview and the morph run without the picture
   changing.

   THERE IS NO :hover RULE HERE, and there is not one anywhere else in this
   prototype either. The card previews because it is the one nearest the
   middle of the rail — see js/home.js. A phone has no hover state, and a
   review build that invents one is making a promise the product cannot keep.
   ========================================================================== */

.tcard {
  /* .card is a <div role="link"> in the component set and a <button> here,
     so the button's own defaults have to be put back. */
  display: block;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
}

/* ---- A CARD AND A HALF --------------------------------------------------
   216 x 324 — exactly one and a half of the component set's 144 x 216, and
   the same 2:3 — so the rail shows ONE card whole and the edge of the next.

   At 144 the rail showed two and a bit, and a row of small stills with one
   of them quietly moving reads as a rail of posters with a glitch in it.
   The thing being proposed here is a preview, and a preview has to be big
   enough to be the reason you look at the row. One card in view also makes
   the question the rail is asking — this one? — a question about a single
   programme rather than about a shelf.

   The card KEEPS its proportion rather than growing taller, because the
   feed it opens into is a full-height frame and the morph is a box growing
   into another box. A card at a different ratio would have to change shape
   on the way, which is the one thing that transition cannot do quietly. */
.rail--trailers .card { width: 216px; height: 324px; }

/* `--pos` only where the source is raw landscape footage cropped live; the
   rendered clips are already cropped and stay centred. See css/feed.css. */
.tcard__vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  opacity: 0;
  transition: opacity var(--dur-media) var(--ease-rise);
}

/* The clip is revealed only once a decoded frame exists behind the class —
   js/home.js waits for readyState rather than for play(), because `play`
   fires when playback is REQUESTED and fading the still at that moment
   leaves a hole in the card. */
.tcard.is-rolling .tcard__vid { opacity: 1; }

/* EXCEPT ON THE WAY BACK OUT OF THE FEED, where there is nothing to fade
   from. The layer is still on top, holding the same clip at the same
   second, and dissolving onto this card; the card is not a still coming up
   behind a video, it is becoming the thing already on the screen. A 0.5s
   fade there is a second picture arriving in the middle of a 0.38s
   movement. See js/home.js handBack(). */
.tcard.is-instant .tcard__vid { transition: none; }

.tcard__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
              rgba(0, 24, 43, 0.88) 0%,
              rgba(0, 24, 43, 0.32) 34%,
              rgba(0, 24, 43, 0) 58%);
}

/* AN ABSOLUTELY POSITIONED LOCKUP DOES NOT STRETCH BETWEEN left AND right.
   Written as left/right/width:auto — the way a <div> is told to fill a gap —
   a replaced element takes its width from its intrinsic size capped by
   max-width and solves `right` with whatever is left. Blue Lights' lockup is
   1540 wide, max-width resolved to the card's 144, and it drew 144 wide
   starting 8px in: eight pixels hanging off the right edge with the S cut in
   half. The box is stated outright instead, and every lockup then sits on the
   same baseline whatever its proportions — which a rail of eight different
   wordmarks needs more than it needs each one at its own size. */
/* AT THE FOOT OF THE CARD, AND CENTRED AMONG THEMSELVES.
   -------------------------------------------------------------------------
   Two different things, and the first two attempts each got one of them.

   WHERE THE BLOCK SITS: at the bottom, 16px up, which is where a lockup
   belongs on a card. (It spent one round in the middle of the picture,
   which reads as a poster rather than as a card in a row.)

   HOW THE ARTWORK SITS INSIDE IT: centred on BOTH axes, which is what makes
   eight different lockups line up with each other. `background-position:
   center bottom` — the obvious reading of "at the bottom" — stands every
   lockup on its own baseline, so a wide wordmark drawing 41px tall and a
   stacked badge drawing 56 have their feet together and their middles 7px
   apart. Centred in a fixed box, they share a middle, and the box is what
   is anchored to the foot of the card.

   The BOX is 184 x 56 and its proportion is the point; the long version is
   in feed.css. `contain` fits artwork to whichever side runs out first, so
   a wide, short box caps every wide lockup on its width and every stacked
   one on its height: the old 128 x 30 drew Blue Lights edge to edge and
   Death in Paradise as a postage stamp in the middle of it. A box near
   enough to square catches both. */
.tcard__logo {
  position: absolute;
  left: var(--space-l);
  bottom: var(--space-l);
  width: calc(100% - var(--space-l) * 2);
  height: 56px;
  background-size: contain;
  background-position: center;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.62));
}

/* The typeset fallback, in the same box and at the same weight on the card
   that a lockup has. Karen Pirie is the live case — see ASSETS.md. */
.tcard__logo--type {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 21px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.62);
}

/* ---- the card's sound control ------------------------------------------
   TOP RIGHT, ON THE SAME 16px INSET the lockup keeps at its sides, so the
   two pieces of furniture on the card are in the same margin.

   It replaced a small play glyph in the top LEFT corner. That glyph was
   saying "there is something to watch here" on a card that is already
   playing something, which is a label for a state the card is not in; sound
   is the only thing about a muted autoplaying preview a reader cannot work
   out by looking at it.

   It is a SIBLING of the card, not a child, because the card is a <button>
   and a button inside a button is invalid. See ui.trailerCard(). */
.tcard-wrap { position: relative; }

/* ONLY THE CARD THAT IS PLAYING HAS ONE. Eight controls down the rail were
   eight offers to change one setting, seven of them attached to a still
   photograph. js/home.js puts `is-live` on the wrapper of whichever card is
   previewing and takes it off when the preview hands over. */
.tcard-wrap .tcard__mute {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-standard);
}

.tcard-wrap.is-live .tcard__mute { opacity: 1; pointer-events: auto; }

/* THE SAME INSET AS THE LOCKUP AT THE BOTTOM — which is now 16, so this is
   16. The two are the only furniture on the card and they have to sit in
   one margin; a control at 8 over a wordmark at 16 reads as a mistake on a
   card this size even though it did not at 144 wide. */
.tcard__mute {
  position: absolute;
  top: var(--space-l);
  right: var(--space-l);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: rgba(0, 24, 43, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background .12s var(--ease-standard),
              transform .12s var(--ease-rise);
}

/* Lighter on press, never darker: on artwork this dark a control that
   darkens has disappeared rather than responded. */
.tcard__mute.is-press {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(0.9);
}

.tcard__mute .ic { width: 20px; height: 20px; }
