/* =====================================================================
   Viva Voce patterns: the components, built only on tokens.css
   ---------------------------------------------------------------------
   Load after tokens.css. Every class starts with vv-. State lives in
   ARIA attributes where one exists (aria-pressed, aria-selected,
   aria-current), so the markup that is accessible is also the markup
   that is styled; there are no .is-active classes to forget.

   Character colour: put a voice class on the element (or an ancestor)
   and every coloured part inside reads it:
     <div class="vv-line vv-voice-2">...</div>
   The voice classes set --voice (for the stage) and --voice-ink (for
   paper). Components use var(--voice); nothing hard-codes a character.

   The live reference for every pattern here is /dev-design.html.
   ===================================================================== */

/* ---------------------------------------------------------------------
   0. Base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  /* No browser tap flash (3 October 2026, §7 #70). Chrome on Android drew a
     blue box over the play button and over any script line a finger touched,
     even mid-scroll. Every control here answers in the design's own way
     (hover, pressed state, the now-speaking tint), and keyboard focus keeps
     its amber ring below, so the flash added nothing but a foreign colour. */
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--vv-stage);
  color: var(--vv-text);
  font-family: var(--vv-font-ui);
  font-size: var(--vv-size-base);
  line-height: var(--vv-leading-ui);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--vv-amber); }
a:hover { color: var(--vv-amber-hover); }

/* Keyboard focus only: :focus-visible matches Tab and the arrow keys, never a
   tap or a click, so the amber ring shows exactly when someone needs to see
   where they are, and never on a phone. Marty's call, 3 October 2026: keep it,
   in the house amber, and nothing in the browser's blue. */
:focus-visible {
  outline: var(--vv-focus-ring);
  outline-offset: var(--vv-focus-offset);
}

::selection { background: var(--vv-amber); color: var(--vv-amber-ink); }

button { font: inherit; color: inherit; }

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

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

/* ---------------------------------------------------------------------
   1. Character colour
   Assign in cast order: narrator is always house light; the seven
   characters with the most lines take 1-7; everyone else is ensemble.
   Colour is never the only signal: always show the name beside it.
   --------------------------------------------------------------------- */
.vv-voice-narrator { --voice: var(--vv-voice-narrator); --voice-ink: var(--vv-ink); }
.vv-voice-reader   { --voice: var(--vv-voice-reader);   --voice-ink: var(--vv-ink); }
.vv-voice-1 { --voice: var(--vv-voice-1); --voice-ink: var(--vv-voice-1-ink); }
.vv-voice-2 { --voice: var(--vv-voice-2); --voice-ink: var(--vv-voice-2-ink); }
.vv-voice-3 { --voice: var(--vv-voice-3); --voice-ink: var(--vv-voice-3-ink); }
.vv-voice-4 { --voice: var(--vv-voice-4); --voice-ink: var(--vv-voice-4-ink); }
.vv-voice-5 { --voice: var(--vv-voice-5); --voice-ink: var(--vv-voice-5-ink); }
.vv-voice-6 { --voice: var(--vv-voice-6); --voice-ink: var(--vv-voice-6-ink); }
.vv-voice-7 { --voice: var(--vv-voice-7); --voice-ink: var(--vv-voice-7-ink); }
.vv-voice-ensemble { --voice: var(--vv-voice-ensemble); --voice-ink: var(--vv-voice-ensemble-ink); }

/* ---------------------------------------------------------------------
   2. Type
   League Gothic is for titles only: a screen's name, a character's
   name, a price, a landing headline. Never for body, labels or buttons.
   --------------------------------------------------------------------- */
.vv-wordmark {
  font-family: var(--vv-font-display);
  font-size: var(--vv-size-wordmark);
  letter-spacing: var(--vv-track-wordmark);
  line-height: 1;
  color: var(--vv-text);
  text-decoration: none;
  text-transform: uppercase;
}

.vv-marquee, .vv-title-xl, .vv-title-l, .vv-section-title,
.vv-title-m, .vv-title-s, .vv-price {
  margin: 0;
  font-family: var(--vv-font-display);
  font-weight: var(--vv-weight-regular);
  letter-spacing: var(--vv-track-display);
  text-transform: uppercase;
  color: var(--vv-text);
}
.vv-marquee       { font-size: var(--vv-size-marquee);  line-height: var(--vv-leading-display); }
.vv-title-xl      { font-size: var(--vv-size-title-xl); line-height: 0.84; }
.vv-title-l       { font-size: var(--vv-size-title-l);  line-height: 0.85; }
.vv-section-title { font-size: var(--vv-size-section);  line-height: 0.92; }
.vv-price         { font-size: var(--vv-size-price);    line-height: 0.9; }
.vv-title-m       { font-size: var(--vv-size-title-m);  line-height: 1; }
.vv-title-s       { font-size: var(--vv-size-title-s);  line-height: 1; }

.vv-lead  { margin: 0; font-size: var(--vv-size-xl); line-height: 1.55; color: var(--vv-text-2); max-width: 720px; }
.vv-body  { margin: 0; font-size: var(--vv-size-m); line-height: var(--vv-leading-ui); color: var(--vv-text-2); }
.vv-meta  { font-size: var(--vv-size-xs); color: var(--vv-text-2); }
.vv-label { font-size: var(--vv-size-s); font-weight: var(--vv-weight-semibold); color: var(--vv-text-2); }

/* ---------------------------------------------------------------------
   3. Buttons
   One shape: the pill. Amber fill is the one primary action in view;
   everything else is outline. A button's label says what happens.
   --------------------------------------------------------------------- */
.vv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--vv-space-2);
  min-height: var(--vv-hit);
  padding: 0 var(--vv-space-5);
  border-radius: var(--vv-radius-pill);
  border: 1px solid var(--vv-line-strong);
  background: transparent;
  color: var(--vv-text);
  font-size: var(--vv-size-s);
  font-weight: var(--vv-weight-medium);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--vv-dur) var(--vv-ease),
              border-color var(--vv-dur) var(--vv-ease);
}
.vv-btn:hover { border-color: var(--vv-text-2); background: var(--vv-panel); color: var(--vv-text); }
.vv-btn svg { flex: none; }

.vv-btn--primary {
  border-color: transparent;
  background: var(--vv-amber);
  color: var(--vv-amber-ink);
  font-weight: var(--vv-weight-semibold);
}
.vv-btn--primary:hover { background: var(--vv-amber-fill-hover); color: var(--vv-amber-ink); border-color: transparent; }

/* The amber outline: an action tied to something that changed (Re-perform). */
.vv-btn--spot { border-color: var(--vv-amber); font-weight: var(--vv-weight-semibold); }

.vv-btn--sm { min-height: 40px; padding: 0 var(--vv-space-4); }
.vv-btn--xs { min-height: 32px; padding: 0 var(--vv-space-3); font-size: var(--vv-size-xs); }
.vv-btn--lg { min-height: 56px; padding: 0 var(--vv-space-8); font-size: var(--vv-size-l); }
.vv-btn--xl { min-height: 64px; padding: 0 var(--vv-space-8); font-size: 1.1875rem; }

/* Tier-gated: visible, named, never dead. Clicking opens the upgrade
   sheet; it never silently does nothing. */
.vv-btn--locked { border-style: dashed; color: var(--vv-text-2); }
.vv-tier-tag {
  font-size: 0.6875rem; font-weight: var(--vv-weight-bold);
  padding: 2px 8px; border-radius: var(--vv-radius-pill);
  background: var(--vv-amber-soft); color: var(--vv-amber);
}

/* Icon buttons always carry aria-label. */
.vv-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--vv-hit); height: var(--vv-hit);
  border-radius: var(--vv-radius-pill);
  border: 1px solid var(--vv-line-strong);
  background: transparent;
  cursor: pointer;
  transition: background-color var(--vv-dur) var(--vv-ease);
}
.vv-icon-btn:hover { background: var(--vv-panel); }
.vv-icon-btn--filled { border: 0; background: var(--vv-panel-hi); }
.vv-icon-btn--play   { width: 56px; height: 56px; border: 0; background: var(--vv-amber); color: var(--vv-amber-ink); }
.vv-icon-btn--hero   { width: 80px; height: 80px; border: 0; background: var(--vv-amber); color: var(--vv-amber-ink);
                       box-shadow: 0 0 0 10px var(--vv-amber-ring); }
.vv-icon-btn--play:hover, .vv-icon-btn--hero:hover { background: var(--vv-amber-fill-hover); }

/* ---------------------------------------------------------------------
   4. Segmented controls and tabs
   Segmented = a mode (Full narration / Dramatized; Table read /
   Performance). Tabs = a panel's views (Notes / Pronunciation / Cast).
   --------------------------------------------------------------------- */
.vv-segmented, .vv-tabs {
  display: inline-flex; gap: var(--vv-space-1);
  padding: var(--vv-space-1);
  border-radius: var(--vv-radius-pill);
  background: var(--vv-panel);
  border: 1px solid var(--vv-line);
}
.vv-tabs { display: flex; }
.vv-segmented > button, .vv-tabs > button {
  border: 0; border-radius: var(--vv-radius-pill);
  padding: 9px 18px;
  background: transparent; color: var(--vv-text-2);
  font-size: var(--vv-size-s); font-weight: var(--vv-weight-medium);
  cursor: pointer;
}
.vv-tabs > button { flex: 1; padding: 0; height: 34px; font-size: var(--vv-size-xs); }
.vv-segmented > button[aria-pressed="true"],
.vv-tabs > button[aria-selected="true"] {
  background: var(--vv-text); color: var(--vv-stage); font-weight: var(--vv-weight-semibold);
}

/* ---------------------------------------------------------------------
   5. Status marks
   --------------------------------------------------------------------- */
/* A dot and a few words: "Edited since you last heard it". */
.vv-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--vv-size-xs); font-weight: var(--vv-weight-semibold);
  color: var(--vv-amber);
}
.vv-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.vv-status--voice { color: var(--voice); }  /* "Now speaking" in the speaker's colour */

/* Numbered badge linking a mark in the script to its note. */
.vv-badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--vv-amber); color: var(--vv-amber-ink);
  font-family: var(--vv-font-ui); font-size: 0.75rem; font-weight: var(--vv-weight-bold);
  font-style: normal; line-height: 1;
}
.vv-badge--inline { width: 20px; height: 20px; margin: 0 6px; vertical-align: 2px; font-size: 0.6875rem; }
.vv-badge--open   { background: transparent; border: 1.5px solid var(--vv-amber); color: var(--vv-amber); }
.vv-badge--on-paper { background: var(--vv-ink); color: var(--vv-amber); }

/* Callout: a warm box with an icon, for warnings that ask for action. */
.vv-callout {
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--vv-space-4);
  border-radius: var(--vv-radius-sm);
  background: var(--vv-amber-soft);
  font-size: var(--vv-size-m); line-height: 1.4;
}
.vv-callout svg { flex: none; color: var(--vv-amber); }

/* ---------------------------------------------------------------------
   6. The studio frame (desktop)
   --------------------------------------------------------------------- */
.vv-studio {
  display: grid;
  grid-template-rows: var(--vv-appbar) minmax(0, 1fr) var(--vv-dock);
  height: 100dvh;
  overflow: hidden;
}
.vv-studio__body {
  display: grid;
  grid-template-columns: var(--vv-rail) minmax(0, 1fr) var(--vv-aside);
  min-height: 0;
}
.vv-studio--screenplay .vv-studio__body { grid-template-columns: var(--vv-rail-screenplay) minmax(0, 1fr) var(--vv-aside); }
.vv-studio--screenplay { grid-template-rows: var(--vv-appbar) minmax(0, 1fr) 200px; }

.vv-appbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--vv-space-6);
  padding: 0 var(--vv-space-6);
  border-bottom: 1px solid var(--vv-line);
}
.vv-appbar__group { display: flex; align-items: center; gap: var(--vv-space-3); }
.vv-crumbs { display: flex; align-items: center; gap: 10px; font-size: var(--vv-size-m); color: var(--vv-text-2); }
.vv-crumbs [aria-current="page"] { color: var(--vv-text); font-weight: var(--vv-weight-semibold); }

/* Left rail: chapters or scenes */
.vv-rail {
  display: flex; flex-direction: column; gap: 6px;
  padding: var(--vv-space-6) var(--vv-space-4);
  border-right: 1px solid var(--vv-line);
  min-height: 0; overflow-y: auto;
}
.vv-rail__heading { padding: 0 var(--vv-space-3) 10px; }
.vv-rail__item {
  display: flex; justify-content: space-between; align-items: center; gap: var(--vv-space-3);
  padding: var(--vv-space-3);
  border-radius: var(--vv-radius-sm);
  color: var(--vv-text-2); text-decoration: none;
  font-size: var(--vv-size-m);
}
.vv-rail__item:hover { background: var(--vv-panel); color: var(--vv-text); }
.vv-rail__item[aria-current="page"] {
  background: var(--vv-panel-raised); color: var(--vv-text); font-weight: var(--vv-weight-semibold);
}
.vv-rail__item[aria-current="page"] .vv-rail__name::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px;
  border-radius: 50%; background: var(--vv-amber); vertical-align: 1px;
}
/* Scene rows: number column, slugline, then time of day and length. */
.vv-rail__item--scene {
  display: grid; grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 6px; row-gap: 4px; font-size: var(--vv-size-xs);
}
.vv-rail__slug { font-family: var(--vv-font-screenplay); font-size: var(--vv-size-xs); }
.vv-rail__item--scene[aria-current="page"] .vv-rail__slug { font-weight: var(--vv-weight-bold); }
.vv-rail__detail { grid-column: 2; display: flex; justify-content: space-between; color: var(--vv-text-2); }

/* Hours meter: quota is never hidden */
.vv-meter {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: var(--vv-space-4) var(--vv-space-3);
  border-radius: var(--vv-radius-md);
  background: var(--vv-panel);
  font-size: var(--vv-size-s);
}
.vv-meter__track { height: 6px; border-radius: var(--vv-radius-pill); background: var(--vv-line); overflow: hidden; }
.vv-meter__fill  { height: 100%; width: calc(var(--pct, 0) * 1%); background: var(--vv-amber); }

/* ---------------------------------------------------------------------
   7. The script (prose)
   --------------------------------------------------------------------- */
.vv-script {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 22px;
  padding: var(--vv-space-5) var(--vv-space-14) 0;
}
.vv-script::after {  /* the fade where the script runs off the bottom */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(to bottom, transparent, var(--vv-stage));
  pointer-events: none;
}
.vv-scene-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--vv-space-4); }

.vv-line { display: flex; flex-direction: column; gap: 6px; max-width: var(--vv-measure); }
.vv-line__speaker { font-size: var(--vv-size-xs); font-weight: var(--vv-weight-semibold); color: var(--voice); }
.vv-line__text {
  margin: 0;
  font-family: var(--vv-font-script);
  font-size: var(--vv-size-script);
  line-height: var(--vv-leading-script);
  color: var(--vv-text);
}
.vv-line--past { opacity: 0.55; }
.vv-line--past .vv-line__text { color: var(--vv-text-2); }

.vv-line--now {
  gap: 10px;
  max-width: calc(var(--vv-measure) + 40px);
  margin: 0 -20px;
  padding: 18px 20px;
  border-radius: var(--vv-radius-lg);
  background: color-mix(in srgb, var(--voice) var(--vv-now-mix), transparent);
}
.vv-line--now .vv-line__text { font-size: var(--vv-size-script-now); line-height: 1.5; }

/* Attribution: the narrator's words inside a line ("cried her mother,"). */
.vv-attr { font-style: italic; color: var(--vv-text-2); }

/* Note marks inside the text; each is followed by a .vv-badge--inline. */
.vv-mark-echo {
  text-decoration: underline dotted var(--vv-amber);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.vv-mark-tag { outline: 1.5px dashed var(--vv-amber); outline-offset: 3px; border-radius: var(--vv-radius-xs); }

/* ---------------------------------------------------------------------
   8. Notes
   The panel's promise line sits under the tabs, always:
   "How it sounds, never what you wrote."
   --------------------------------------------------------------------- */
.vv-aside {
  display: flex; flex-direction: column; gap: var(--vv-space-3);
  padding: 22px var(--vv-space-5);
  border-left: 1px solid var(--vv-line);
  min-height: 0; overflow-y: auto;
}
.vv-note {
  display: flex; flex-direction: column; gap: 10px;
  padding: var(--vv-space-4);
  border-radius: var(--vv-radius-md);
  border: 1px solid var(--vv-line);
  background: var(--vv-panel);
}
.vv-note__head  { display: flex; align-items: center; justify-content: space-between; gap: var(--vv-space-3); }
.vv-note__title { display: flex; align-items: center; gap: 10px; font-size: var(--vv-size-base); font-weight: var(--vv-weight-semibold); }
.vv-note__time  { font-size: var(--vv-size-xs); color: var(--vv-text-2); font-variant-numeric: tabular-nums; }
.vv-note__body  { margin: 0; font-size: var(--vv-size-m); line-height: var(--vv-leading-ui); color: var(--vv-text-2); }
.vv-note__actions { display: flex; flex-wrap: wrap; gap: var(--vv-space-2); }
/* A note already passed in playback collapses to one row; it is a button. */
.vv-note--compact {
  flex-direction: row; align-items: center; justify-content: space-between;
  padding: 14px var(--vv-space-4);
  border-radius: 14px;
  text-align: left; color: var(--vv-text); cursor: pointer;
}
.vv-note--compact .vv-note__title { font-size: var(--vv-size-m); }

/* ---------------------------------------------------------------------
   9. The dock: transport and timeline
   Positions are percentages of the chapter, set inline:
     style="--at: 62.5; --len: 1.3"   (blocks)
     style="--at: 61"                  (markers)
     style="--pos: 0.655"              (playhead, a fraction)
   --------------------------------------------------------------------- */
.vv-dock {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px var(--vv-space-6) var(--vv-space-5);
  border-top: 1px solid var(--vv-line);
  background: var(--vv-stage-sunk);
}
.vv-transport { display: flex; align-items: center; gap: 18px; }
.vv-time { font-size: var(--vv-size-base); color: var(--vv-text-2); font-variant-numeric: tabular-nums; }
.vv-time strong { color: var(--vv-text); font-weight: var(--vv-weight-semibold); margin-right: 6px; }

.vv-timeline {
  --label-col: 112px;
  position: relative;
  display: grid; grid-template-columns: var(--label-col) minmax(0, 1fr);
  column-gap: var(--vv-space-4); row-gap: 6px;
}
.vv-timeline__markers { grid-column: 2; position: relative; height: 22px; }
.vv-marker {
  position: absolute; top: 0; left: calc(var(--at) * 1%);
  transform: translateX(-50%);
  width: 20px; height: 20px; font-size: 0.6875rem;
}
.vv-lane-label { font-size: var(--vv-size-xs); font-weight: var(--vv-weight-semibold); line-height: 16px; color: var(--voice); }
.vv-lane { position: relative; height: 16px; border-radius: var(--vv-radius-xs); background: var(--vv-lane); }
.vv-lane__block {
  position: absolute; top: 0; height: 100%;
  left: calc(var(--at) * 1%); width: calc(var(--len) * 1%);
  border-radius: var(--vv-radius-xs);
  background: var(--voice);
}
.vv-playhead {
  position: absolute; top: 0; bottom: 0; width: 2px;
  left: calc(var(--label-col) + var(--vv-space-4) + (100% - var(--label-col) - var(--vv-space-4)) * var(--pos));
  background: var(--vv-text); border-radius: 2px; pointer-events: none;
}

/* ---------------------------------------------------------------------
   10. Voiceprint
   Bars are the REAL loudness envelope of the audio, never decoration:
   96 RMS buckets stored with the render (see the guide). Heights are
   percentages: <span class="vv-voiceprint__bar" style="--h: 62"></span>
   --------------------------------------------------------------------- */
.vv-voiceprint { display: flex; align-items: center; gap: 3px; height: 64px; overflow: hidden; }
.vv-voiceprint__bar {
  flex: none; width: 4px; height: calc(var(--h, 50) * 1%);
  border-radius: 2px; background: var(--voice);
}
.vv-voiceprint--lg { height: 84px; gap: 4px; }
.vv-voiceprint--lg .vv-voiceprint__bar { width: 5px; border-radius: 3px; }
.vv-voiceprint--sm { height: 38px; gap: 2px; }
.vv-voiceprint--sm .vv-voiceprint__bar { width: 3px; }

/* ---------------------------------------------------------------------
   11. Casting: the character select
   --------------------------------------------------------------------- */
.vv-casting {
  display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--vv-space-12);
  padding: var(--vv-space-14);
  min-height: 100dvh;
}
.vv-casting__side  { display: flex; flex-direction: column; gap: 26px; }
.vv-casting__stage { display: flex; flex-direction: column; gap: var(--vv-space-5); min-height: 0; }

.vv-spotlight {
  position: relative; overflow: hidden; flex: 1;
  display: flex; flex-direction: column; gap: 18px;
  padding: 34px var(--vv-space-10);
  border-radius: var(--vv-radius-2xl);
  border: 1px solid var(--vv-line);
  background: var(--vv-panel);
}
.vv-spotlight::before {  /* the light falls in the character's colour */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 18% 0%, color-mix(in srgb, var(--voice) 20%, transparent) 0%, transparent 58%);
}
.vv-spotlight > * { position: relative; }
.vv-spotlight__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--vv-space-6); }
.vv-spotlight__name { color: var(--voice); }
.vv-spotlight__quote {
  margin: 0; max-width: 800px;
  font-family: var(--vv-font-script); font-style: italic;
  font-size: var(--vv-size-script-quote); line-height: 1.35;
}
.vv-spotlight__actions { margin-top: auto; display: flex; align-items: center; gap: var(--vv-space-4); }

.vv-voice-picker { display: flex; flex-direction: column; align-items: flex-end; gap: var(--vv-space-2); flex: none; }
.vv-voice-picker__control {
  display: flex; align-items: center; gap: var(--vv-space-2);
  padding: 5px; border-radius: var(--vv-radius-pill); background: var(--vv-stage);
}
.vv-voice-picker__name { min-width: 200px; text-align: center; font-size: 1.125rem; font-weight: var(--vv-weight-semibold); }

/* "What the text shows": Stage 2's evidence, never a guess. */
.vv-evidence {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--vv-space-8);
  padding-top: var(--vv-space-4); border-top: 1px solid var(--vv-line);
}
.vv-evidence dt { font-size: var(--vv-size-s); color: var(--vv-text-2); }
.vv-evidence dd { margin: 6px 0 0; font-size: var(--vv-size-l); line-height: var(--vv-leading-ui); }

.vv-roster { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--vv-space-4); }
.vv-roster__card {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--vv-space-2);
  padding: var(--vv-space-4);
  border-radius: 18px; border: 1px solid var(--vv-line);
  background: var(--vv-panel); color: var(--vv-text);
  text-align: left; overflow: hidden; cursor: pointer;
  transition: border-color var(--vv-dur) var(--vv-ease), background-color var(--vv-dur) var(--vv-ease);
}
.vv-roster__card:hover { border-color: var(--vv-line-strong); }
.vv-roster__card[aria-pressed="true"] {
  padding: 15px;
  border: 2px solid var(--vv-amber);
  background: var(--vv-panel-raised);
  box-shadow: 0 0 0 5px var(--vv-amber-ring);
}
.vv-roster__name { font-family: var(--vv-font-display); font-size: 1.875rem; line-height: 1; text-transform: uppercase; color: var(--voice); }
.vv-roster__sub  { font-size: var(--vv-size-xs); line-height: var(--vv-leading-tight); color: var(--vv-text-2); }
.vv-roster__sub--warn { color: var(--vv-amber); font-weight: var(--vv-weight-semibold); }

/* ---------------------------------------------------------------------
   12. The screenplay page
   Measured in ch so lines break where Final Draft and Fountain break
   them: 60-character action lines, dialogue 10ch in and 35ch wide,
   parentheticals 16ch in, character cues 22ch in. (The canvas mockup's
   page was narrower than standard; this is the real measure.)
   --------------------------------------------------------------------- */
.vv-page-desk {  /* the dark area the page sits on, with a left gutter */
  position: relative; overflow: hidden;
  display: flex; justify-content: flex-start;
  padding: var(--vv-space-6) 0 0 152px;
}
.vv-page {
  width: 74ch; flex: none;
  padding: 3em 7ch 0;
  border-radius: 6px 6px 0 0;
  background: var(--vv-page); color: var(--vv-ink);
  box-shadow: var(--vv-shadow-page);
  font-family: var(--vv-font-screenplay);
  font-size: var(--vv-size-screenplay);
  line-height: var(--vv-leading-screenplay);
}
.vv-page p { margin: 0; }
.vv-page__slug   { font-weight: var(--vv-weight-bold); text-transform: uppercase; margin-bottom: var(--vv-leading-screenplay); }
.vv-page__action { margin-bottom: var(--vv-leading-screenplay); }
.vv-page__cue    { margin-left: 22ch; font-weight: var(--vv-weight-bold); text-transform: uppercase; color: var(--voice-ink); }
.vv-page__paren  { margin-left: 16ch; max-width: 25ch; }
.vv-page__dialogue { margin-left: 10ch; max-width: 35ch; margin-bottom: var(--vv-leading-screenplay); }
.vv-page__block--now {
  margin: 0 -10px var(--vv-leading-screenplay); padding: 8px 10px; border-radius: 6px;
  background: color-mix(in srgb, var(--voice) 20%, transparent);
}
.vv-page__block--now .vv-page__dialogue { margin-bottom: 0; }
.vv-page__block--edited { margin: 0 -6px var(--vv-leading-screenplay); padding: 4px 6px; border-radius: var(--vv-radius-xs); background: color-mix(in srgb, var(--vv-amber) 18%, transparent); }
.vv-page .vv-mark-echo { text-decoration-color: var(--vv-mark-on-paper); text-underline-offset: 4px; }

/* Margin notes beside the page, in the gutter: Edited, Now speaking. */
.vv-gutter-note {
  position: absolute; left: var(--vv-space-6); width: 110px;
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--vv-space-2);
  font-size: var(--vv-size-xs); line-height: 1.4; color: var(--vv-text-2);
}

/* ---------------------------------------------------------------------
   13. Landing
   Dark is the performance; paper is the page. Alternate them.
   --------------------------------------------------------------------- */
.vv-landing { overflow-x: hidden; }
.vv-stage-light {  /* the spotlight above the hero and the closing CTA */
  position: absolute; pointer-events: none;
  background: radial-gradient(ellipse at 50% 20%, var(--vv-amber-glow) 0%, rgba(244, 183, 64, 0.07) 38%, transparent 70%);
}
.vv-container { width: min(100% - 2 * var(--vv-space-18), var(--vv-content)); margin-inline: auto; }
.vv-section { padding-top: var(--vv-space-section); }
.vv-section--paper { margin-top: var(--vv-space-section); padding: 120px 0; }

.vv-card {
  display: flex; flex-direction: column; gap: var(--vv-space-3);
  padding: var(--vv-space-7);
  border-radius: var(--vv-radius-lg);
  border: 1px solid var(--vv-line);
  background: var(--vv-panel);
  box-shadow: var(--vv-shadow-card);
}

.vv-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--vv-space-6); align-items: stretch; }
.vv-plan {
  display: flex; flex-direction: column; gap: var(--vv-space-5);
  padding: 36px var(--vv-space-8);
  border-radius: var(--vv-radius-xl);
  border: 1px solid var(--vv-line);
  background: var(--vv-panel);
}
.vv-plan--featured {
  padding: 35px 31px;
  border: 2px solid var(--vv-amber);
  background: #2A211A;
  box-shadow: 0 0 0 8px rgba(244, 183, 64, 0.08), var(--vv-shadow-panel);
}
.vv-plan--featured .vv-title-s { color: var(--vv-amber); }
.vv-plan > .vv-btn { margin-top: auto; }
.vv-checklist {
  list-style: none; margin: 0; padding: var(--vv-space-5) 0 0;
  display: flex; flex-direction: column; gap: var(--vv-space-3);
  border-top: 1px solid var(--vv-line);
  font-size: var(--vv-size-l); line-height: 1.4;
}
.vv-checklist li { display: flex; gap: var(--vv-space-3); }
.vv-checklist li::before {  /* a drawn check: no icon font, no image */
  content: ""; flex: none;
  width: 12px; height: 7px; margin: 6px 4px 0 2px;
  border-left: 2.2px solid var(--vv-amber); border-bottom: 2.2px solid var(--vv-amber);
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------------------
   14. Mobile companion
   Desktop is where work is made; the phone is where it is heard.
   --------------------------------------------------------------------- */
.vv-listen {
  display: flex; flex-direction: column; gap: var(--vv-space-5);
  max-width: 430px; min-height: 100dvh; margin-inline: auto;
  padding: var(--vv-space-5) var(--vv-space-6) var(--vv-space-7);
}
.vv-chapter-tile {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  height: 250px; padding: 22px;
  border-radius: 26px; border: 1px solid var(--vv-line);
  background: var(--vv-panel);
}
.vv-chapter-tile::before {
  content: ""; position: absolute; left: -40px; top: -140px; width: 440px; height: 420px;
  background: radial-gradient(ellipse at 50% 30%, var(--vv-tile-glow) 0%, transparent 62%);
}
.vv-chapter-tile > * { position: relative; }
.vv-chapter-tile__num { font-family: var(--vv-font-display); font-size: 8.25rem; line-height: 0.82; color: var(--vv-amber); }

.vv-scrubber { position: relative; height: 24px; display: flex; align-items: center; }
.vv-scrubber__track { position: absolute; inset-inline: 0; height: 6px; border-radius: var(--vv-radius-pill); background: var(--vv-line); }
.vv-scrubber__fill  { position: absolute; left: 0; height: 6px; width: calc(var(--pct) * 1%); border-radius: var(--vv-radius-pill); background: var(--vv-amber); }
.vv-scrubber__thumb { position: absolute; left: calc(var(--pct) * 1% - 9px); width: 18px; height: 18px; border-radius: 50%; background: var(--vv-text); }
.vv-scrubber__mark  { position: absolute; top: -2px; left: calc(var(--at) * 1% - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--vv-amber); }
