/* xPlain Live: Studio screen. Tokens from scratch/design/design-brief.md; layout from mockup-studio. */
:root {
  --bg: #0A1B2E;
  --surface: #11263D;
  --surface-deep: #0E2236;
  --inset: #071423;
  --text: #FFFFFF;
  --text-soft: #D6E2F0;
  --muted: #A9BCD3;
  --hairline: rgba(255, 255, 255, 0.12);
  --accent: #3FD0FF;
  --completed: #3BD16F;
  --failed: #FF4B47;
  --failed-text: #FF6B67;
  --plate-text: #0A1B2E;
  --pitch: #10294A;
  --switch-border: rgba(255, 255, 255, 0.10);
  --home: #F25CE6;   /* Analyst mode's team lines: the home team in magenta (not the accent cyan, which marks the
                        page itself), the away team in amber; both clear of the green / red of the outcomes */
  --away: #FFB547;
  --not-commentated: #C3A6F2;   /* Producer's log: a surprise that was not commentated (not the accent of On air) */
  --scroll-thumb: rgba(63, 208, 255, 0.55);   /* every scroll area: the accent, softened, on the inset navy */
  --scroll-track: var(--inset);
  --font: 'Archivo', 'Noto Sans', sans-serif;   /* Noto Sans covers Greek, which Archivo lacks */
}

* { box-sizing: border-box; }
/* scrollbars, app-wide: a thin cyan thumb on a navy track, full cyan while the scroll area is hovered. Browsers
   with scrollbar-color use it; the ::-webkit-scrollbar rules are for Safari, which lacks it. */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) var(--scroll-track); }
*:hover { scrollbar-color: var(--accent) var(--scroll-track); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scroll-track); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::-webkit-scrollbar-corner { background: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the 1440 x 900 stage is scaled to fit the window (app.js sets --scale) */
#viewport { position: fixed; inset: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
#stage {
  position: relative; flex: none; width: 1440px; height: 900px; overflow: hidden;
  background: var(--bg); color: var(--text); transform: scale(var(--scale, 1)); transform-origin: center center;
}

/* score bug */
.scorebug {
  position: absolute; top: 28px; left: 40px; display: flex; align-items: center; gap: 14px; height: 44px;
  padding: 0 16px; background: var(--surface); border: 1px solid var(--switch-border); border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.40); font-weight: 700; font-size: 18px;
}
/* goal flash: a soft ring round the score plate; app.js animates its opacity and scale only */
.goal-ring {
  position: absolute; inset: -1px; border-radius: 6px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 3px var(--ring, var(--accent)), 0 0 22px 4px var(--ring, var(--accent));
}
.scorebug .code { letter-spacing: 0.02em; }
.scorebug .score { font-size: 24px; font-weight: 800; }
/* the digit a goal changed, in the accent while its flash runs (app.js scoredSide); colour only */
.scorebug .score #score-home, .scorebug .score #score-away { transition: color 0.25s; }
.scorebug .score .scored { color: var(--accent); }
.scorebug .divider { width: 1px; height: 22px; background: rgba(255, 255, 255, 0.18); }
.scorebug .minute { display: flex; align-items: center; gap: 8px; }
.scorebug .half { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.scorebug .half:empty { display: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--failed); display: inline-block; }
.scorebug.break .live-dot { display: none; }
.live-dot.big { width: 10px; height: 10px; box-shadow: 0 0 0 3px rgba(255, 75, 71, 0.25); }

/* product mark + mode switch */
.topright { position: absolute; top: 28px; right: 40px; display: flex; align-items: center; gap: 18px; }
.mark { font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.mark span { font-weight: 500; color: var(--accent); }
/* the logo's bubble in front of the words, in em so it scales with them (the header, the walkthrough's marks and its
   big logo); its body spans the capitals and its tail drops below the baseline; the negative block margins keep it
   from growing the line, so the words sit where they did */
.logo-bubble { width: 1.18em; height: 1.18em; vertical-align: 0.07em; margin: -0.05em 0.26em -0.4em 0; }
.seg { display: flex; background: var(--surface); border: 1px solid var(--switch-border); border-radius: 6px; padding: 3px; }
.seg button {
  height: 36px; padding: 0 14px; border: none; border-radius: 4px; background: transparent; color: var(--text);
  font-size: 14px; font-weight: 500;
}
.seg button.on { background: var(--accent); color: var(--plate-text); font-weight: 700; }
.seg button:disabled { color: var(--muted); opacity: 0.55; }

/* title */
.title {
  position: absolute; top: 100px; left: 40px; margin: 0;
  font-weight: 800; font-size: 54px; line-height: 1; letter-spacing: -0.02em;
}

/* pitch */
.pitch {
  position: absolute; top: 196px; left: 40px; width: 780px; height: 520px; border-radius: 4px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
/* the pitch drawing (the pitch's own svg, not the tab's chevrons) is pinned to its fixed slot:
   nothing in or around the pitch can move it */
.pitch > #pitch-svg { position: absolute; top: 0; left: 0; display: block; border-radius: 4px; }

/* possession: a tab fixed at the left end of the pitch's top edge. Its content changes in place:
   code then chevrons pointing right when attacking right, chevrons pointing left then code when
   attacking left. A short cross-fade marks a change. */
.possession { position: absolute; left: 0; right: 0; top: -30px; height: 30px; pointer-events: none; }
.possession[hidden] { display: none; }
.tab {
  position: absolute; top: 0; left: 0; height: 30px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--switch-border); border-bottom: none;
  border-radius: 4px 4px 0 0;
}
.tab-code { font-size: 15px; font-weight: 800; letter-spacing: 0.04em; }
.chevrons path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chevrons path { animation: chevron 1.6s ease-in-out infinite; opacity: 0.35; }
.chevrons path:nth-child(2) { animation-delay: 0.2s; }
.chevrons path:nth-child(3) { animation-delay: 0.4s; }
@keyframes chevron { 0%, 100% { opacity: 0.35; } 35% { opacity: 1; } }
.possession.left .tab { flex-direction: row-reverse; }
.possession.left .chevrons { transform: scaleX(-1); }

/* replay badge: above the pitch's top-right corner, on the possession tab's row; shown whenever the
   view is not live (a replayed moment or step mode). Leaving is the bottom-right Back to live. */
/* the same tab as the possession tab (size, shape, border, type), mirrored to the right end */
.replaybar { position: absolute; right: 0; top: -30px; height: 30px; display: none; }
.replaybar.on { display: block; }
.replay-badge {
  height: 30px; display: flex; align-items: center; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--switch-border); border-bottom: none;
  border-radius: 4px 4px 0 0;
  font-size: 15px; font-weight: 500; letter-spacing: 0.02em; color: var(--accent);
}

/* recap card: the pitch's slot (780 x 520), Studio rules only: no box, a cyan rule under each heading
   (.thead), hairline rows, tabular figures, numbers right-aligned */
.recap { position: absolute; top: 196px; left: 40px; width: 780px; height: 520px; display: flex; flex-direction: column; }
.recap[hidden] { display: none; }
#stage.recap-on .pitch { display: none; }
/* the result: one line under the title, a step below it (24px names, the score in the accent), closed by a
   hairline; the title already says HT or FT */
.rc-result { display: flex; align-items: baseline; gap: 16px; padding: 2px 0 14px; margin-bottom: 22px;
  border-bottom: 1px solid var(--hairline); }
.rc-side { min-width: 0; font-size: 24px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-result .rc-num { flex: none; font-size: 34px; font-weight: 800; font-stretch: 85%; line-height: 1; color: var(--accent);
  font-variant-numeric: tabular-nums; }
.rc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 36px; }
.rc-row {
  display: flex; align-items: baseline; gap: 14px; padding: 9px 12px; border-bottom: 1px solid var(--hairline);
  font-size: 17px; font-variant-numeric: tabular-nums;
}
.rc-row .rc-min { width: 52px; flex: none; font-weight: 800; }
.rc-row .rc-who { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-row .rc-tag { flex: none; font-size: 14px; font-weight: 500; color: var(--muted); }
.rc-row .rc-after { width: 44px; flex: none; text-align: right; font-weight: 700; color: var(--text-soft); }
.rc-row .rc-team { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-row .rc-n { width: 88px; flex: none; text-align: right; font-weight: 800; }
.rc-passing .rc-n:last-child { width: 104px; }
.rc-row .rc-n.pos { color: var(--completed); }
/* Expected and vs expected keep two decimals everywhere; the decimals sit a step smaller, so they stay quiet */
.dec { font-size: 0.62em; font-weight: 700; letter-spacing: 0; }
.rc-row .dec { font-size: 0.8em; }
.rc-row .rc-n.neg { color: var(--failed-text); }
.rc-colhead { padding-top: 6px; padding-bottom: 6px; }
.rc-colhead .rc-n { white-space: nowrap; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
/* the star: a .thead like Goals and Passing, then one row: the shirt number in the accent, the name over a
   muted meta line (position, team, the star's goals), and the card's numbers under the Passing column words */
.rc-starblock { margin-top: 26px; }
.rc-starblock[hidden] { display: none; }
/* the cyan star after "Star player", the same icon as Player's title (.star-icon) */
.rc-star-icon { margin-left: 8px; font-size: 20px; vertical-align: -2px; }
.st { width: 100%; display: flex; align-items: center; gap: 18px; padding: 14px 12px; border: none; border-radius: 0;
  border-bottom: 1px solid var(--hairline); background: transparent; color: var(--text); font: inherit; text-align: left; }
.st:hover { background: rgba(255, 255, 255, 0.04); }
.st:hover .st-name-text { color: var(--accent); }
.st:hover .st-go { transform: translateX(3px); }
.st-num { flex: none; min-width: 64px; font-size: 56px; font-weight: 800; font-stretch: 85%; line-height: 0.85;
  color: var(--accent); font-variant-numeric: tabular-nums; }
.st-num .st-hash { font-size: 0.5em; font-weight: 700; margin-right: 2px; vertical-align: 0.5em; color: var(--muted); }
.st-who { flex: 1; min-width: 0; display: block; }
.st-name { display: flex; align-items: center; gap: 6px; font-size: 26px; font-weight: 800; line-height: 1.1; }
.st-name-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-go { flex: none; color: var(--accent); transition: transform 150ms ease-out; }
.st-meta { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; font-size: 15px; color: var(--muted); white-space: nowrap; }
.st-pos { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; }
.st-goal { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.st-stats { flex: none; display: grid; grid-template-columns: repeat(4, auto); column-gap: 26px; row-gap: 6px;
  align-items: baseline; text-align: right; }
.st-stats .pv-label { font-size: 12px; letter-spacing: 0.08em; }
.st-val { font-size: 32px; font-weight: 800; font-stretch: 85%; line-height: 1; font-variant-numeric: tabular-nums; }
.st-val.pos { color: var(--completed); }
.st-val.neg { color: var(--failed-text); }
/* the text follows the star (no push to the card's bottom); fitRecapText steps it down if a long recap
   would run past the card */
.rc-text { margin: 24px 0 0; font-size: 19px; font-weight: 500; line-height: 1.45; color: #E6EEF7; }
/* Recap / Map: the tables' half selector's size, on the title's row (centred on the 54px title) at the slot's
   right edge, so the pitch's tabs (possession, replay) keep their room in the Map view */
.seg.recapview { position: absolute; top: 110px; right: 620px; padding: 3px; }
.seg.recapview[hidden] { display: none; }
.seg.recapview button { height: 28px; padding: 0 14px; font-size: 13px; }

/* half selector */
.seg.scope { position: absolute; top: 150px; right: 40px; padding: 3px; }
.seg.scope button { height: 28px; padding: 0 14px; font-size: 13px; }

/* ranking tables */
.tables { position: absolute; top: 196px; left: 860px; width: 540px; display: flex; flex-direction: column; gap: 26px; }
.thead {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 2px solid var(--accent); padding-bottom: 6px;
}
.thead h2 { margin: 0; font-weight: 800; font-size: 22px; }
.tsub { font-size: 15px; color: var(--muted); }
.row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
/* the row of the plate's moment: surface background with a cyan bar on its left edge */
.row.sel { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
/* rows are buttons: a click replays the moment */
.row[role="button"] { cursor: pointer; }
.row[role="button"]:hover:not(.sel) { background: rgba(17, 38, 61, 0.6); }
.row[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.row .rank { width: 28px; font-weight: 800; font-size: 20px; }
.row .who { flex: 1; min-width: 0; }
.row .player { font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { font-size: 14px; font-weight: 500; color: var(--muted); }
.row .track { width: 150px; height: 14px; position: relative; border-radius: 2px; background: rgba(255, 255, 255, 0.08); }
.row .bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.row .bar.neg { background: var(--failed); }
.row .bar.pos { background: var(--completed); }
.row .value { width: 64px; text-align: right; font-weight: 800; font-size: 20px; }
.row .move { width: 44px; text-align: right; font-size: 13px; font-weight: 700; color: var(--muted); }
.row .move.new { color: var(--accent); }
.empty { padding: 14px 12px; font-size: 15px; color: var(--muted); border-bottom: 1px solid var(--hairline); }
.footnote { font-size: 15px; color: var(--muted); line-height: 1.4; }   /* the same size as the table subtitles (.tsub) */

/* lower third: a cyan name tab on top of a dark body (left: the line and the facts; right: PVA).
   The wrapper is anchored at the bottom, so a 2-line line grows the plate upward at once. Content
   changes cross-fade in 150 ms (app.js, opacity only). */
.plate { position: absolute; left: 40px; bottom: 40px; width: 920px; }
.lower { display: flex; flex-direction: column; align-items: flex-start; }
.nametab {
  height: 30px; padding: 0 14px; display: flex; align-items: center; gap: 12px;
  background: var(--accent); color: var(--plate-text); border-radius: 4px 4px 0 0;
}
/* hidden but keeping its row, so the narration nav always sits on the name tab's line */
.lower.waiting .nametab { visibility: hidden; }
.lower.goal .tab-div, .lower.goal .tab-when { display: none; }

/* narration nav: chevrons and "7 / 12", right-aligned on the name tab's row, no boxes */
.narrnav { position: absolute; top: 0; right: 0; height: 30px; display: flex; align-items: center; }
.narrnav[hidden] { display: none; }
.narrnav button {
  width: 32px; height: 32px; padding: 0; border: none; background: transparent; color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.narrnav button:disabled { color: var(--muted); opacity: 0.35; }
.narr-count {
  min-width: 7ch; text-align: center; font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tab-name { font-size: 16px; font-weight: 800; font-stretch: 78%; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.tab-div { width: 1px; height: 14px; background: rgba(10, 27, 46, 0.35); }
.tab-num { font-size: 14px; font-weight: 800; font-stretch: 78%; letter-spacing: 0.04em; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.tab-num:empty, .tab-num:empty + .tab-div { display: none; }
.tab-when { font-size: 14px; font-weight: 700; font-stretch: 78%; letter-spacing: 0.04em; white-space: nowrap; }
/* One fixed height in every state (one or two lines, goal, waiting, any language): 2 border +
   5 + 48 (two lines) + 4 + 1 (rule) + 4 + 34 (meta row: the switch) + 4 = 102, the most that fits
   between the pitch (12px gap) and the controls' bottom edge. A line that would need three lines
   is set smaller by app.js (down to 15px), never clipped. */
.body {
  width: 100%; height: 102px; display: flex; align-items: stretch; background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0 4px 4px 4px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.40);
}
.lower.waiting .body { border-radius: 4px; }
/* scoped to the plate body: .possession.left also carries the class "left" */
.body > .left {
  position: relative; flex: 1; min-width: 0; padding: 5px 18px 4px;
  display: flex; flex-direction: column; gap: 4px;
}
/* the line's slot is always two lines high (one line sits centred in it), so the rule and the
   meta row below never move */
.line {
  font-size: 18px; font-weight: 500; line-height: 24px; color: #E6EEF7;
  height: 48px; flex: none; display: flex; align-items: center;
}
/* off-screen copy of the line, used once at load to find a font size that fits two lines */
.lower .line.measure {
  font-weight: 500; position: absolute; left: 18px; right: 18px; top: 0; height: auto; display: block;
  visibility: hidden; pointer-events: none;
}
.rule { height: 1px; flex: none; background: var(--hairline); }
.metarow { height: 34px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.meta { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lower .meta {
  font-size: 13px; font-weight: 700; letter-spacing: 1.3px; line-height: 16px; color: var(--text-soft);
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* narration language: "NARRATION" and an EN / ES / EL segmented control */
.narrlang { flex: none; display: flex; align-items: center; gap: 10px; }
.narrlang-label { font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.seg.lang { padding: 3px; gap: 2px; border: 1px solid var(--switch-border); border-radius: 5px; background: var(--inset); }
.seg.lang button {
  min-width: 44px; height: 26px; padding: 0 8px; border-radius: 3px;
  font-size: 13px; font-weight: 800; letter-spacing: 1px; color: var(--text-soft);
}
.seg.lang button.on { background: var(--accent); color: var(--plate-text); font-weight: 800; }
/* before the first narrated moment: dimmed, the set language still marked */
.seg.lang button { transition: opacity 0.4s ease; }
.seg.lang button:disabled { opacity: 0.45; }
@media (prefers-reduced-motion: reduce) { .seg.lang button { transition: none; } }
.xp { text-transform: none; }   /* "xP" keeps its casing inside upper-case labels */
.lower.waiting .line { color: var(--muted); font-weight: 400; }
/* before the first surprise: the live dot (the tabs' waiting-title pulse) ahead of the plate's text */
.lower.waiting.opening .line::before {
  content: ''; flex: none; width: 8px; height: 8px; margin-right: 12px; border-radius: 50%; background: var(--accent);
  animation: live-pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .lower.waiting.opening .line::before { animation: none; } }
/* the opening's offer of 60x: easy to see, in the accent; the 60x button it points to gets the accent ring */
.lower.waiting.hint .line { color: var(--text); font-size: 20px; font-weight: 700; }
.lower.waiting.hint .body { border-color: var(--accent); }
.lower .hint-key { color: var(--accent); white-space: nowrap; }
.seg.speed button.hint:not(.on) { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); font-weight: 700; }
.body > .right {
  width: 116px; flex: none; border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.pvanum { font-size: 30px; font-weight: 800; font-stretch: 85%; line-height: 1; white-space: nowrap; }
.lower.completed .pvanum { color: var(--completed); }
.lower.failed .pvanum { color: var(--failed-text); }
/* the same column in every state: a muted dash over "PVA" while waiting, "GOAL" over the minute on a goal */
.lower.waiting .pvanum { color: var(--muted); }
.lower.goal .pvanum { color: var(--accent); letter-spacing: 0.02em; }
.lower.goal .pvalabel { font-size: 13px; letter-spacing: 0.06em; color: var(--text-soft); }
/* recap state: the name tab without its minute, "HT" / "FT" in the PVA column; at half time a cyan
   line under the text drains over the pause (holdRecap: the card's reading time), then play resumes */
.lower.recap-plate .tab-div, .lower.recap-plate .tab-when { display: none; }
.lower.recap-plate .pvanum { color: var(--accent); letter-spacing: 0.02em; }
.drain { position: absolute; left: 18px; right: 18px; top: 50px; height: 2px; background: var(--accent); opacity: 0;
  transform-origin: left center; pointer-events: none; }
.lower.recap-plate.ticking .drain { opacity: 0.8; }   /* the scaleX drain is a Web Animation in app.js */
.pvalabel { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); }

/* controls */
.controls { position: absolute; right: 40px; bottom: 40px; width: 200px; display: flex; flex-direction: column; gap: 6px; }
.playrow { display: flex; gap: 6px; }
.playbtn {
  width: 44px; height: 44px; flex: none; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--surface); color: var(--text); display: flex; align-items: center; justify-content: center;
}
.seg.speed { flex: 1; }
.seg.speed button { flex: 1; height: 36px; padding: 0; font-size: 13px; }
.live {
  height: 44px; width: 200px; border: 1.5px solid var(--text); border-radius: 6px; background: transparent;
  color: var(--text); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.live.is-live { opacity: 0.55; }
.steps { display: flex; gap: 6px; }
.steps button {
  flex: 1; height: 44px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.18); background: var(--surface);
  color: var(--text); display: flex; align-items: center; justify-content: center;
}
.steps button:disabled { opacity: 0.4; }

.status {
  position: absolute; left: 40px; top: 196px; width: 780px; padding: 18px 20px; background: var(--inset);
  border-radius: 4px; color: var(--muted); font-size: 17px;
}

@media (prefers-reduced-motion: reduce) {
  .chevrons path { animation: none; opacity: 1; }
}

/* --- Player mode ("Player focus", player.js): one player's match. #stage.mode-player swaps the
   title and the tables for the player's name, the Change player button and the player's column;
   everything else is shared with Studio. */
.player-head, .player-change, .player-view { display: none; }
#stage.mode-player .title, #stage.mode-player .tables { display: none; }
#stage.mode-player .player-head, #stage.mode-player .player-change, #stage.mode-player .player-view { display: flex; }
/* the name in the title's type, the team after it in the subtitle's */
.player-head {
  position: absolute; top: 100px; left: 40px; width: 1360px; margin: 0; align-items: baseline; gap: 18px;
  font-weight: 800; font-size: 54px; line-height: 1; letter-spacing: -0.02em; white-space: nowrap;
}
.player-team { font-size: 22px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.player-num { margin-right: -6px; color: var(--accent); font-stretch: 85%; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.player-num[hidden] { display: none; }
/* the full-time star player's star, right after the name (player.js starShown); its title says why */
.star-icon { width: 1em; height: 1em; fill: var(--accent); }
.player-star { display: inline-flex; align-self: center; margin-left: -6px; font-size: 40px; cursor: help; }
/* when full time shows it: a quiet fade in, no bounce or spin; none under reduced motion */
.player-star:not([hidden]) { animation: star-in 700ms ease-out both; }
@keyframes star-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .player-star:not([hidden]) { animation: none; } }
.player-star[hidden] { display: none; }
.player-num .num-hash { font-size: 0.5em; font-weight: 700; margin-right: 2px; vertical-align: 0.5em; color: var(--muted); }
/* the picker button, on the scope selector's row at the column's left edge; the same height as the selector */
.player-change {
  position: absolute; top: 150px; left: 860px; height: 36px; padding: 0 14px; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--switch-border); border-radius: 6px; color: var(--text);
  font-size: 13px; font-weight: 700;
}
.player-change svg { color: var(--accent); }
.player-change[aria-expanded="true"] { border-color: var(--accent); }
.player-change[aria-expanded="true"] svg { transform: rotate(180deg); }
/* the picker: a floating list over the player's column, the two teams side by side; the current
   player has a check and the cyan bar, a player with no pass yet is muted */
/* Two equal columns that never grow past the panel (minmax(0, 1fr): a long name is cut, it does not widen
   its column). Each row is four fixed cells, so every number sits under the one above: the shirt number
   right-aligned, the name (the one cell that gives), the position, the passes right-aligned under PASSES. */
.player-picker {
  position: absolute; top: 196px; left: 860px; width: 540px; height: 520px; z-index: 5; align-content: start;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 18px; padding: 14px 16px 16px;
  background: var(--surface); border: 1px solid var(--switch-border); border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.player-picker[hidden] { display: none; }
.pk-col { min-width: 0; }
.pk-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  border-bottom: 2px solid var(--accent); padding: 0 8px 7px; margin-bottom: 2px;
}
.pk-team { min-width: 0; font-size: 17px; font-weight: 800; font-stretch: 78%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-sub { flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pk-opt {
  width: 100%; height: 36px; padding: 0 8px; display: flex; align-items: center; gap: 8px;
  border: none; border-bottom: 1px solid var(--hairline); border-radius: 0; background: transparent;
  color: var(--text); font-size: 15px; font-weight: 600; text-align: left;
}
.pk-num { flex: none; width: 26px; text-align: right; font-size: 13px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums; }
.pk-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-pos { flex: none; width: 30px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); }
.pk-n { flex: none; width: 24px; text-align: right; font-size: 15px; font-weight: 500; color: var(--muted);
  font-variant-numeric: tabular-nums; }
.pk-opt.none .pk-name { color: var(--muted); font-weight: 500; }
.pk-opt:hover { background: rgba(255, 255, 255, 0.05); }
.pk-opt[aria-selected="true"] { background: rgba(63, 208, 255, 0.08); box-shadow: inset 3px 0 0 var(--accent); }
.pk-opt[aria-selected="true"] .pk-num { color: var(--accent); }
.pk-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* the player's column, in the tables' slot and the pitch's height (196..716): numbers, the band bar,
   the moments (Studio's rows); the key and the footnote sit on the pitch's bottom line */
.player-view { position: absolute; top: 196px; left: 860px; width: 540px; height: 520px; flex-direction: column; }
/* the numbers: one grid, four equal columns; labels share one baseline, values the next (tabular
   figures); a hairline closes the row, as under a table row */
.pv-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 12px; row-gap: 8px; align-items: baseline;
  padding-bottom: 14px; border-bottom: 1px solid var(--hairline);
}
.pv-label { font-size: 13px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); }
.pv-value { margin-top: 8px; font-size: 36px; font-weight: 800; font-stretch: 85%; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pv-value .pv-sub { margin-left: 8px; font-size: 18px; font-weight: 600; font-stretch: 100%; color: var(--muted); }
.pv-value.pos { color: var(--completed); }
.pv-value.neg { color: var(--failed-text); }
.pv-stats { margin-bottom: 22px; }
.player-view .thead + .pv-bandbar { margin-top: 14px; }
/* the five narration tiers (very easy .. very difficult), darker is harder: white down to a very dark purple,
   used nowhere else in the app (clear of the accent cyan, DUS magenta, the team colours and the outcome green /
   red). The two darkest (hardest) are under 3:1 on --bg, so they carry a light 1px edge (--tier-edge). */
:root { --tier-0: #FFFFFF; --tier-1: #CBBAEB; --tier-2: #9A76D4; --tier-3: #6B3BAA; --tier-4: #3A1463;
  --tier-edge: inset 0 0 0 1px rgba(255, 255, 255, 0.45); }
.pv-bandbar { display: flex; gap: 3px; height: 14px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); }
.pv-bandbar .band { min-width: 4px; border-radius: 2px; }
.band.t0, .key.t0 { background: var(--tier-0); }
.band.t1, .key.t1 { background: var(--tier-1); }
.band.t2, .key.t2 { background: var(--tier-2); }
.band.t3, .key.t3 { background: var(--tier-3); box-shadow: var(--tier-edge); }
.band.t4, .key.t4 { background: var(--tier-4); box-shadow: var(--tier-edge); }
.pv-bands { display: flex; justify-content: space-between; margin: 10px 0 26px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.pv-bands b { margin-left: 4px; font-weight: 800; color: var(--text); }
.pv-bands .key { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; }
/* the moments: Studio's rows, the minute in the rank's place; three rows show, more scroll inside */
.pv-rows { max-height: 166px; overflow-y: auto; }
.pv-rows .row .when { width: 56px; flex: none; font-weight: 800; font-size: 20px; }
.pv-rows .row .meta { text-transform: none; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-rows .row .track { width: 110px; }
/* rows are not buttons here: hover or focus lights the moment's pass on the map */
.pv-rows .row:hover, .pv-rows .row:focus-visible { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); outline: none; }
.pv-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.pv-legend { display: flex; justify-content: space-between; font-size: 15px; font-weight: 500; color: var(--text-soft); }
.pv-legend > span { display: flex; align-items: center; gap: 8px; }
/* the pass map: while a moment row is lit, the other passes step back */
/* a ring on a pass that starts on the touchline is drawn whole, past the pitch's edge */
#stage.mode-player #pitch-svg { overflow: visible; }
#passes.spot g:not(.hot) { opacity: 0.25; }
#passes g { transition: opacity 120ms ease-out; }
/* Player mode drops what steps or replays: the replay badge, Back to live and the step buttons. The
   plate is Studio's, with the player's own narrated moments. */
#stage.mode-player .replaybar, #stage.mode-player .controls .live, #stage.mode-player .controls .steps { display: none; }
@media (prefers-reduced-motion: reduce) { #passes g { transition: none; } }

/* --- Producer mode (the control room, producer.js): the log of lines the clock has reached in the pitch's
   slot, the selected line's steps and final text in the tables' slot. Studio's rows, rules and tokens; no
   boxes. The score bug, the plate and the controls are Studio's. */
.producer-log, .producer-detail { display: none; }
#stage.mode-producer .pitch, #stage.mode-producer .tables, #stage.mode-producer .scope,
#stage.mode-producer .recap, #stage.mode-producer .recapview { display: none; }
#stage.mode-producer .producer-log, #stage.mode-producer .producer-detail { display: flex; }
.producer-log { position: absolute; top: 196px; left: 40px; width: 780px; height: 520px; flex-direction: column; }
.pr-rows { flex: 1; min-height: 0; overflow-y: auto; }
.pr-rows[hidden] { display: none; }
.pr-row .pr-min { width: 52px; flex: none; font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.pr-row .pr-status { width: 136px; flex: none; font-size: 15px; font-weight: 700; color: var(--muted); }
.pr-row .pr-status.on { color: var(--accent); }
.pr-row .pr-status.nc { color: var(--not-commentated); }
.pr-row .pr-tries { width: 96px; flex: none; text-align: right; font-size: 14px; font-weight: 500; color: var(--muted); }
.pr-row .pr-retry { width: 64px; flex: none; text-align: right; font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent); }
/* the right slot stops 24px above the playback controls (their top edge is at 716px): a clear gap, and an open
   check list scrolls inside the slot, never under the controls */
.producer-detail { position: absolute; top: 196px; left: 860px; width: 540px; height: 496px; flex-direction: column;
  overflow-y: auto; }
.producer-detail[hidden] { display: none; }
.pr-steps { display: flex; flex-direction: column; }
.pr-step { padding: 8px 4px; border-bottom: 1px solid var(--hairline); }
.pr-step-top { display: flex; align-items: baseline; gap: 10px; }
.pr-mark { width: 16px; flex: none; font-weight: 800; color: var(--accent); }
.pr-step.fail .pr-mark { color: var(--failed-text); }
.pr-agent { flex: none; font-weight: 700; font-size: 16px; }
.pr-kind { flex: none; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pr-info { flex: 1; min-width: 0; text-align: right; font-size: 14px; font-weight: 500; color: var(--muted); }
.pr-checks { padding-left: 26px; }
.pr-sum { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; font-size: 14px; color: var(--text-soft); }
.pr-toggle { padding: 0; border: none; background: transparent; color: var(--accent); font-size: 14px; font-weight: 600; }
.pr-toggle:hover { text-decoration: underline; }
.pr-note { margin-top: 2px; font-size: 14px; color: var(--muted); }
.pr-checklist { columns: 2; column-gap: 18px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px;
  line-height: 18px; color: var(--muted); }
.pr-checklist li { break-inside: avoid; }
.pr-checklist li::before { content: '✓ '; color: var(--accent); }
.pr-checklist li.fail { color: var(--failed-text); }
.pr-checklist li.fail::before { content: '✕ '; color: var(--failed-text); }
.pr-reasons { margin: 4px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.35; color: var(--text-soft); }
.pr-reasons b { color: var(--failed-text); font-weight: 700; }
.pr-onair { margin-top: 18px; display: flex; flex-direction: column; }
/* Live retake (a moment line): the button at the right of the Agents heading, a pending row while it runs */
.producer-detail .thead .tsub { flex: 1; margin-left: 14px; }
/* the two panels' headings are one height, so their titles and rules line up; the buttons sit at the bottom of the
   heading row and do not push its title down */
.producer-log > .thead, .producer-detail > .thead { height: 40px; box-sizing: border-box; flex: none; }
.pr-retake-actions { display: flex; align-items: center; gap: 14px; flex: none; align-self: flex-end; }
.pr-retake { height: 32px; padding: 0 14px; border: 1.5px solid var(--accent); border-radius: 6px; background: transparent;
  color: var(--accent); font-size: 14px; font-weight: 700; }
.pr-retake:disabled { opacity: 0.55; }
.pr-step.pending .pr-mark { color: var(--muted); }
.pr-retake-error { margin-top: 10px; color: var(--failed-text); }
.pr-onair > .pr-note.pr-retake-failed { color: var(--failed-text); }   /* Foundry failed: no line */
.pr-onair > .pr-note { padding: 6px 4px 0; }
/* the line in the plate's NARRATION language only */
.pr-text { margin: 0; padding: 8px 4px 0; font-size: 20px; line-height: 1.4; color: var(--text-soft); }
/* the producer's choice under a new line (Put on air / Keep stored line), or Back to stored line under an aired one */
.pr-air { display: flex; align-items: center; gap: 18px; padding: 12px 4px 0; }

/* --- Analyst mode (analyst.js): both teams against the model. The passing swing and the model's reasons for the
   shown surprise in the pitch's slot; the teams' passing and their passes per tier in the tables' slot. Studio's
   rules, rows and tokens; no boxes. The score bug, the scope selector, the plate and Play / speed are Studio's. */
.analyst-left, .analyst-right { display: none; }
#stage.mode-analyst .pitch, #stage.mode-analyst .tables, #stage.mode-analyst .recap,
#stage.mode-analyst .recapview, #stage.mode-analyst .controls .live, #stage.mode-analyst .controls .steps { display: none; }
#stage.mode-analyst .analyst-left, #stage.mode-analyst .analyst-right { display: flex; }
.analyst-left { position: absolute; top: 196px; left: 40px; width: 780px; height: 520px; flex-direction: column; }
.an-chartbox { position: relative; height: 270px; margin-top: 8px; flex: none; }
#an-chart { display: block; overflow: visible; }
.an-chart-empty { position: absolute; left: 0; right: 0; top: 0; }
.an-chart-empty[hidden] { display: none; }
.an-grid line { stroke: var(--hairline); stroke-width: 1; }
.an-grid line.zero { stroke: rgba(255, 255, 255, 0.40); }
.an-grid line.half { stroke: rgba(255, 255, 255, 0.30); stroke-dasharray: 4 4; }
.an-axis { fill: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.an-goals line.goal { stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.6; }
.an-goals .home { stroke: var(--home); fill: var(--home); }
.an-goals .away { stroke: var(--away); fill: var(--away); }
.an-goal { stroke: none; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.an-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.an-line.home { stroke: var(--home); }
.an-line.away { stroke: var(--away); }
.an-end .an-code { font-size: 15px; font-weight: 800; letter-spacing: 0.04em; }
.an-end .an-val { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.an-end.home text { fill: var(--home); }
.an-end.away text { fill: var(--away); }
/* the surprises: green when completed against the odds, red when an easy pass failed; the shown one ringed */
.an-dot { outline: none; }
.an-dot .hit { fill: transparent; pointer-events: none; }
#an-chart.picking { cursor: pointer; }
.an-dot .dot { stroke: var(--bg); stroke-width: 1.5; }
.an-dot.surprise_success .dot { fill: var(--completed); }
.an-dot.surprise_failure .dot { fill: var(--failed); }
.an-dot .ring { fill: none; stroke: var(--text); stroke-width: 2; visibility: hidden; }
.an-dot.on .ring { visibility: visible; }
.an-dot.on .dot { r: 5.5px; }
.an-dot.near .dot { stroke: var(--text); }
.an-dot:focus-visible .hit { stroke: var(--accent); stroke-width: 2; }
/* the model's reasons: one row per driver and one for the rest, a bar each way from the centre of its track */
.an-shap { margin-top: 14px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.an-shap-rows { flex: none; }
.an-shap-row { display: flex; align-items: center; gap: 14px; height: 30px; padding: 0 12px; border-bottom: 1px solid var(--hairline); }
.an-shap-words { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; overflow: hidden; }
.an-shap-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 16px; font-weight: 700; }
.an-shap-topic { flex: none; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.an-shap-row.rest .an-shap-label { font-weight: 500; color: var(--text-soft); }
.an-shap-track { position: relative; flex: none; width: 220px; height: 12px; border-radius: 2px; background: rgba(255, 255, 255, 0.06); }
.an-shap-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: rgba(255, 255, 255, 0.40); }
.an-shap-bar { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
/* the bars say which way a factor moved the model's odds, not the outcome: the Player tier purple (darker is
   harder), no green / red, no team colour */
.an-shap { --easier: var(--tier-0); --harder: var(--tier-4); }
.an-shap-bar.up { left: 50%; background: var(--easier); }
.an-shap-bar.down { right: 50%; background: var(--harder); box-shadow: var(--tier-edge); }
.an-shap-row.rest .an-shap-bar { opacity: 0.5; }
.an-shap-val { flex: none; width: 64px; text-align: right; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* the key takes the room of 4px off each row and 4px off the gap above, so the footer stays where it was */
.an-shap-row.an-shap-key { height: 20px; border-bottom: none; }
.an-shap-keys { flex: none; width: 220px; display: flex; }
.an-shap-keyside { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.an-shap-keyside.down { justify-content: flex-end; padding-right: 6px; }
.an-shap-keyside.up { padding-left: 6px; }
.an-shap-swatch { flex: none; width: 10px; height: 10px; border-radius: 2px; }
.an-shap-swatch.up { background: var(--easier); }
.an-shap-swatch.down { background: var(--harder); box-shadow: var(--tier-edge); }
.an-shap-footrow { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.an-shap-foot { min-width: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.an-replay { flex: none; height: 30px; padding: 0 12px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--switch-border); border-radius: 6px; color: var(--text);
  font-size: 13px; font-weight: 700; }
.an-replay svg { color: var(--accent); }
.an-replay[hidden] { display: none; }
.an-shap .tsub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-left: 16px; }
/* the teams: the recap card's Passing rows with a Passes column; the tiers as completed / passes and vs expected */
.analyst-right { position: absolute; top: 196px; left: 860px; width: 540px; height: 520px; flex-direction: column; gap: 26px; }
.analyst-right .rc-row .rc-n { width: 82px; }
.analyst-right .rc-row .rc-n:last-child { width: 100px; }
.analyst-right .rc-colhead .rc-n { font-size: 11px; }
.an-key { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 2px; }
.an-key.home { background: var(--home); }
.an-key.away { background: var(--away); }
.an-tier .rc-team { display: flex; align-items: center; font-weight: 600; }
.an-tier .an-cell { width: 150px; flex: none; display: flex; justify-content: flex-end; align-items: baseline; gap: 12px; }
.rc-colhead.an-tier .an-cell { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--muted); }
.an-frac { font-weight: 700; color: var(--text-soft); }
.an-vs { width: 64px; text-align: right; font-weight: 800; }
.an-vs.pos { color: var(--completed); }
.an-vs.neg { color: var(--failed-text); }
.analyst-right .footnote { margin-top: auto; }

/* --- the welcome screen and tour (intro.js): a layer over the whole stage on a plain visit, in the app's own
   tokens and type, its chrome where the app's chrome sits (the slides' mark is the header's mark, placed by
   intro.js), so the tour reads as the app's first screens, not a page in front of it. Shown only while <html>
   has "intro-on" (set before the first paint). */
.intro { display: none; position: absolute; inset: 0; z-index: 20; }
html.intro-on .intro:not([hidden]) { display: block; }
.in-bg { position: absolute; inset: 0; background: var(--bg); }
.in-screen { position: absolute; inset: 0; }
.in-screen[hidden], .in-nav[hidden], .in-skip[hidden], .in-mark[hidden] { display: none; }
/* while the logo glides into the header, the header's mark waits for it */
#stage.intro-gliding .topright .mark { visibility: hidden; }
.in-mark { position: absolute; top: 37px; right: 40px; font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.in-mark span, .in-big span { font-weight: 500; color: var(--accent); }
/* welcome and Start match: the logo, the tagline and the buttons in one centred column */
.in-big-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.in-big { display: inline-block; margin: 0; font-size: 120px; font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  transform-origin: 0 0; }
.in-tag { margin: 22px 0 0; font-size: 28px; color: var(--text-soft); }
.in-btns { display: grid; grid-auto-rows: 56px; gap: 14px; margin-top: 56px; }
.in-btns .in-b { height: 56px; padding: 0 34px; font-size: 20px; }
/* welcome and Start match: the match is synthetic, said quietly under the buttons */
.in-synth { margin: 22px 0 0; font-size: 15px; color: var(--muted); }
/* ... and a match that did not load says so there too, else it showed only after the tour (app.js showStatus) */
.in-error { margin: 18px 0 0; max-width: 780px; font-size: 17px; color: var(--failed-text); text-align: center; }
/* the app's buttons: the accent fill of a picked .seg button, or outlined like Back to live */
.in-b {
  height: 42px; padding: 0 20px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.2); background: transparent;
  color: var(--text-soft); font-size: 16px; font-weight: 700; transition: border-color 150ms, color 150ms, background 150ms;
}
.in-b:hover { border-color: rgba(255, 255, 255, 0.45); color: var(--text); }
.in-b.go { border: none; background: var(--accent); color: var(--plate-text); }
.in-b.go:hover { filter: brightness(1.12); color: var(--plate-text); }
/* a slide: the kicker on the score bug's line, the mode and its line centred, the screenshot in the pitch's
   shadow, the notes at the sides with their arrows */
.in-kicker { position: absolute; top: 40px; left: 40px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); }
.in-mode { position: absolute; top: 92px; left: 0; right: 0; text-align: center; }
.in-mode h2 { margin: 0; font-size: 44px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.in-mode p { margin: 10px 0 0; font-size: 20px; color: var(--text-soft); }
.in-shot { position: absolute; left: 300px; top: 220px; width: 840px; height: 525px; border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.in-shot img { display: block; width: 100%; height: 100%; border-radius: 8px; }
.in-arrows { position: absolute; inset: 0; width: 1440px; height: 900px; pointer-events: none; overflow: visible; }
.in-arrows path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
.in-arrows circle { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.in-note { position: absolute; width: 230px; font-size: 17px; line-height: 1.35; color: var(--text-soft); }
.in-note b { display: block; margin-bottom: 4px; font-size: 18px; color: var(--text); }
.in-nav { position: absolute; bottom: 48px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 28px; }
.in-dots span { display: inline-block; width: 10px; height: 10px; margin: 0 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.25);
  transition: background 150ms; }
.in-dots span.on { background: var(--accent); }
.in-skip { position: absolute; bottom: 52px; right: 40px; padding: 4px 0; border: none; background: transparent;
  color: var(--muted); font-size: 15px; font-weight: 600; }
.in-skip:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .in-b, .in-dots span { transition: none; } }

/* before the first surprise, in every tab: a white title after the live dot (a slow cyan pulse), and a muted line
   on what will land there */
.empty.waiting { padding: 14px 12px 18px; }
.waiting-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--text); }
.waiting-title::before, .pr-step.idle.rating .pr-mark::before {
  content: ''; flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: live-pulse 1.6s ease-in-out infinite; }
.waiting-sub { margin-top: 6px; padding-left: 18px; font-size: 15px; line-height: 1.4; color: var(--muted); }
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(63, 208, 255, 0.55); }
  50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(63, 208, 255, 0); }
}
@media (prefers-reduced-motion: reduce) { .waiting-title::before, .pr-step.idle.rating .pr-mark::before { animation: none; } }
/* Producer before the first surprise: the four agents as a traced line's rows, a dot where its tick goes (Analyst's
   pulses: it is rating every pass), on the log's grid: the dot 12px in, the name 18px after it, the first row level
   with the log's waiting title */
.pr-step.idle { padding: 15px 12px 13px; }
.pr-step.idle .pr-mark { width: 8px; align-self: center; display: flex; }
.pr-step.idle:not(.rating) .pr-mark::before { content: ''; display: inline-block; box-sizing: border-box; width: 8px; height: 8px;
  border-radius: 50%; border: 1.5px solid var(--muted); opacity: 0.6; }
.pr-step.idle.rating .pr-info { color: var(--text-soft); font-variant-numeric: tabular-nums; }

/* a phone held upright (a touch screen, so a narrow desktop window keeps the app): the stage would shrink to a strip,
   so the notice covers it and asks for landscape; the stage stays scaled and running underneath (hidden, so nothing
   in it takes taps or focus) */
.rotate { display: none; }
@media (orientation: portrait) and (max-width: 600px) and (pointer: coarse) {
  #viewport { visibility: hidden; }
  .rotate {
    display: flex; position: fixed; inset: 0; z-index: 100; flex-direction: column; align-items: center;
    justify-content: center; gap: 14px; text-align: center; background: var(--bg); color: var(--text);
    padding: max(32px, env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-right, 0px))
      max(32px, env(safe-area-inset-bottom, 0px)) max(28px, env(safe-area-inset-left, 0px));
  }
  .rotate-mark { font-size: 34px; }
  .rotate-tag { margin: 0; font-size: 16px; color: var(--text-soft); }
  .rotate-icon { margin-top: 28px; color: var(--accent); }
  .rotate-title { margin: 0; font-size: 24px; font-weight: 800; }
  .rotate-text { margin: 0; max-width: 30ch; font-size: 16px; line-height: 1.45; color: var(--muted); }
}
