/* RepoCity corporate design for the YouTube Analyzer project page; colour values live in tokens.css. */
@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("fonts/source-serif.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Syncopate"; src: url("fonts/syncopate-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --series-1: #b08a3c;
  --series-2: #3987e5;
  --series-3: #d55181;
  --rest: #5e80b0;
  --track: rgba(152, 164, 184, 0.16);
  --dock-h: 68px;
  --bar-h: 60px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--gold-deep) var(--night); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(120% 70% at 50% -10%, #12284a 0%, var(--paper) 45%, var(--night) 100%) fixed, var(--night);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--dock-h) + 24px + env(safe-area-inset-bottom));
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--gold); color: var(--night); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; border-radius: 6px; }
html[lang=de] .en, html[lang=en] .de { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--gold-light); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-strong); }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.88em; color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--gold); color: var(--night); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
main:focus { outline: none; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; color: var(--ink); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.3rem); margin-bottom: 0.9rem; max-width: 28ch; }
h3 { font-size: 1.22rem; }
.lead { font-size: 1.06rem; color: var(--ink-2); max-width: 68ch; margin: 0 0 1.8rem; }
.loading { color: var(--muted); }

/* Header */
.bar { position: sticky; top: 0; z-index: 30; background: rgba(2, 6, 15, 0.94); border-bottom: 1px solid var(--line); }
.bar-row { display: flex; align-items: center; gap: 12px; min-height: var(--bar-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(1px 2px 1.5px rgba(0, 0, 0, 0.6)); }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.32em; color: var(--gold-light); }
.brand-project { font-size: 0.86rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.icon-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 0.86rem; }
.icon-link svg { width: 20px; height: 20px; }
.icon-link:hover { color: var(--gold-light); background: var(--gold-soft); }
.lang { display: flex; border: 1px solid var(--line-gold); border-radius: 10px; overflow: hidden; }
.lang button { background: none; border: 0; color: var(--muted); font: 600 0.76rem var(--font); letter-spacing: 0.06em; min-width: 40px; min-height: 38px; cursor: pointer; }
.lang button[aria-pressed=true] { background: var(--gold); color: var(--night); }
@media (max-width: 520px) { .icon-link-text { display: none; } .brand-project { font-size: 0.8rem; max-width: 44vw; } }

/* Tab panels */
.panel { scroll-margin-top: var(--bar-h); }
.panel[hidden] { display: none; }
.panel:focus { outline: none; }
.panel-head { padding-top: clamp(2rem, 5vw, 3.6rem); }
.panel-head h1 { margin-bottom: 1rem; max-width: 22ch; }
.panel.is-entering { animation: panel-in 380ms var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Hero */
.hero { padding: clamp(1.6rem, 5vw, 4.4rem) 0 clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.6rem, 4vw, 3.6rem); align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 { margin-bottom: 1.3rem; }
.verdict { margin: 0 0 1.6rem; padding: 1.1rem 1.2rem 1.2rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-gold); box-shadow: var(--shadow); }
.verdict-main { margin: 0 0 0.9rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.8rem; color: var(--ink-2); font-size: 0.98rem; line-height: 1.4; }
.verdict-figure { font-family: var(--font-serif); font-weight: 600; font-size: clamp(2.4rem, 2rem + 2vw, 3.3rem); line-height: 1; color: var(--gold-strong); letter-spacing: -0.02em; white-space: nowrap; }
.verdict-main span { flex: 1 1 14rem; }
.verdict-facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; border-top: 1px solid var(--line); padding-top: 0.9rem; }
.verdict-facts dt { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }
.verdict-facts dd { margin: 0.15rem 0 0; color: var(--ink); font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
@media (max-width: 420px) { .verdict-facts { grid-template-columns: 1fr 1fr; } .verdict-facts div:last-child { grid-column: 1 / -1; } }
.shot { margin: 0; }
.shot img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line-gold); box-shadow: var(--shadow); }
.shot figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 0.7rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.button-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.25rem; border-radius: 12px; font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: transform 160ms var(--ease-out), background-color 160ms, color 160ms; }
.button:active { transform: translateY(1px); }
.button-gold { background: var(--gold-metal); color: var(--night); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); }
.button-gold:hover { color: var(--night); filter: brightness(1.06); }
.button-line { border: 1px solid var(--line-gold); color: var(--ink); background: rgba(5, 15, 34, 0.5); }
.button-line:hover { background: var(--gold-soft); color: var(--gold-strong); }
.text-link { font-weight: 600; }
.more { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin: 1.6rem 0 0; }

/* Sections in tab 1 */
.block { padding: clamp(2.6rem, 6vw, 4.4rem) 0; border-top: 1px solid var(--line); }
.block-alt { background: rgba(5, 15, 34, 0.55); }
.videos { display: grid; gap: 1.1rem; }
.video { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.video-head { display: grid; grid-template-columns: 1fr auto; gap: 0.8rem 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.video-head > * { min-width: 0; }
.video-head h3 { margin: 0.35rem 0 0.45rem; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag { font-size: 0.76rem; font-weight: 600; padding: 0.12rem 0.55rem; border-radius: 999px; background: var(--gold-soft); color: var(--gold-light); border: 1px solid var(--line-gold); }
.facts { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.84rem; color: var(--muted); }
.facts strong { color: var(--ink); font-weight: 600; }
.yt { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; white-space: nowrap; align-self: start; min-height: 40px; }
.yt svg { width: 16px; height: 16px; }
details.q { border-top: 1px solid var(--line); }
details.q:first-of-type { border-top: 0; }
details.q summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: center; padding: 0.75rem 1.3rem; min-height: 48px; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary:hover { background: rgba(201, 169, 110, 0.06); }
details.q[open] summary { background: rgba(201, 169, 110, 0.08); }
.score { font-weight: 700; font-size: 0.78rem; padding: 0.14rem 0.5rem; border-radius: 999px; background: var(--good-soft); color: var(--good); white-space: nowrap; }
.score.low { background: var(--bad-soft); color: var(--bad); }
.qtext { font-size: 0.95rem; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.qtext em { font-style: normal; font-size: 0.74rem; font-weight: 600; color: var(--gold); margin-left: 0.45rem; white-space: nowrap; }
.lat { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.qbody { padding: 0.4rem 1.3rem 1.3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.qbody > * { min-width: 0; }
.qbody h4 { font-size: 0.82rem; font-weight: 600; color: var(--gold-light); margin: 0 0 0.4rem; }
.answer { font-size: 0.92rem; color: var(--text); overflow-wrap: anywhere; }
.answer p, .judge p { margin: 0 0 0.6rem; }
.answer ul, .answer ol { margin: 0 0 0.6rem; padding-left: 1.2rem; }
.judge { font-size: 0.88rem; color: var(--ink-2); background: rgba(2, 6, 15, 0.5); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .qbody { grid-template-columns: 1fr; padding: 0.4rem 1rem 1.1rem; }
  .video-head { grid-template-columns: 1fr; padding: 1rem; }
  details.q summary { padding: 0.7rem 1rem; gap: 0.6rem; }
}
@media (max-width: 420px) { details.q summary { grid-template-columns: auto 1fr; } .lat { grid-column: 2; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.8rem; counter-reset: step; }
.steps li { position: relative; padding: 1rem 1rem 1.1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-2); }
.steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 0.6rem; border-radius: 50%; border: 1px solid var(--line-gold); color: var(--gold-light); font-size: 0.78rem; font-weight: 700; }
.steps b { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 0.3rem; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }
.limits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; }
.limits li { font-size: 0.94rem; color: var(--ink-2); padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid var(--line); background: rgba(5, 15, 34, 0.55); }
.limits b { color: var(--ink); display: block; margin-bottom: 0.2rem; }
@media (max-width: 760px) { .limits { grid-template-columns: 1fr; } }

.foot { border-top: 1px solid var(--line); padding: 1.8rem 0 1rem; font-size: 0.86rem; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 2rem; }
.foot p { margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.foot a { color: var(--ink-2); }

/* Bottom tab bar: a dock centred on wide screens, full width with safe area on phones. */
.dock { position: fixed; z-index: 40; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(600px, calc(100% - 28px)); }
.dock-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; border-radius: 22px; background: rgba(8, 18, 38, 0.96); border: 1px solid var(--line-gold); box-shadow: 0 18px 40px rgba(0, 3, 10, 0.7), 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
.dock-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; padding: 6px 4px; border-radius: 16px; color: var(--muted); text-decoration: none; font-size: 0.74rem; font-weight: 600; line-height: 1.1; text-align: center; transition: color 160ms, background-color 200ms var(--ease-out); }
.dock-tab svg { width: 23px; height: 23px; }
.dock-tab:hover { color: var(--ink); }
.dock-tab[aria-selected=true] { color: var(--night); background: var(--gold-metal); }
.dock-tab:focus-visible { outline-offset: -2px; }
@media (max-width: 600px) {
  .dock { left: 0; right: 0; bottom: 0; transform: none; width: 100%; }
  .dock-list { border-radius: 18px 18px 0 0; border-bottom: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .dock-tab { font-size: 0.7rem; }
  body { padding-bottom: calc(var(--dock-h) + 12px + env(safe-area-inset-bottom)); }
}

/* Tooltip shared by the charts */
.tip { position: fixed; z-index: 50; pointer-events: none; max-width: 260px; padding: 0.55rem 0.7rem; border-radius: 10px; background: var(--surface-solid); border: 1px solid var(--line-gold); color: var(--ink); font-size: 0.8rem; line-height: 1.4; box-shadow: var(--shadow); }
.tip b { color: var(--gold-light); display: block; }

/* Tab 2: organigram */
.org { position: relative; margin: 0.6rem 0 2rem; }
.org-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.org-lanes { display: none; }
.org-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto auto auto; column-gap: clamp(28px, 4vw, 56px); row-gap: 64px; padding: 34px 0 8px; }
.lane-label { position: absolute; left: 0; font-size: 0.76rem; font-weight: 600; color: var(--gold); }
.org-cell { display: grid; min-width: 0; }
.node { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; text-align: left; min-height: 104px; padding: 0.85rem 0.95rem; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color 200ms, transform 200ms var(--ease-out), box-shadow 200ms; }
.node:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.node[aria-pressed=true] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 16px 34px rgba(0, 3, 10, 0.6); }
.node.is-auto { border-style: dashed; background: rgba(8, 18, 38, 0.82); }
.node-title { font-family: var(--font-serif); font-size: 1.08rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.node-sub { font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
.node-pulse { position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.6); }
.node.is-auto .node-pulse { background: var(--spot); }
.node.is-lit .node-pulse { animation: pulse 900ms var(--ease-out); }
@keyframes pulse { from { box-shadow: 0 0 0 0 rgba(234, 215, 174, 0.75); } to { box-shadow: 0 0 0 12px rgba(234, 215, 174, 0); } }
.wire { fill: none; stroke: var(--line-gold); stroke-width: 1.5; }
.wire.is-auto { stroke: rgba(94, 128, 176, 0.55); stroke-dasharray: 5 6; }
.wire-label { fill: var(--muted); font: 600 11px var(--font); }
.spark { fill: var(--gold-strong); filter: drop-shadow(0 0 4px rgba(243, 227, 191, 0.9)); }
.spark.is-auto { fill: #9fc0ef; filter: drop-shadow(0 0 4px rgba(120, 165, 230, 0.9)); }
.org-detail { margin-top: 1.6rem; padding: 1.3rem 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-gold); box-shadow: var(--shadow); }
.org-detail h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.org-detail p { margin: 0 0 0.8rem; max-width: 72ch; color: var(--ink-2); }
.org-detail h3 { font-family: var(--font); font-size: 0.86rem; font-weight: 600; color: var(--gold-light); margin: 1rem 0 0.5rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chips li { font-size: 0.84rem; padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid var(--line-gold); background: var(--gold-soft); color: var(--ink); }
.org-detail .source { font-size: 0.8rem; color: var(--muted); margin: 0.9rem 0 0; }
@media (min-width: 861px) {
  .org-lanes { display: block; position: absolute; inset: 0; pointer-events: none; }
}
@media (max-width: 860px) {
  .org-grid { grid-template-columns: 1fr; row-gap: 14px; padding: 0 0 0 30px; }
  .org-cell { grid-column: auto !important; grid-row: auto !important; }
  .node { min-height: 0; }
  .org-detail { margin: 2px 0 6px; }
}

/* Tab 3: figures */
.figures { display: grid; gap: 1.4rem; padding-bottom: 2rem; }
.figures > *, .figure { min-width: 0; }
.figure { margin: 0; padding: clamp(1.1rem, 3vw, 1.7rem); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.figure h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); margin-bottom: 0.4rem; max-width: 34ch; }
.figure .takeaway { font-size: 1rem; color: var(--ink); margin: 0 0 1.2rem; max-width: 70ch; }
.figure .explain { font-size: 0.88rem; color: var(--muted); margin: -0.6rem 0 1.2rem; max-width: 70ch; }
.figure .source { font-size: 0.78rem; color: var(--muted); margin: 1rem 0 0; overflow-wrap: anywhere; }
.figure .source a { color: var(--ink-2); }
.figure details { margin-top: 0.8rem; }
.figure summary { cursor: pointer; font-size: 0.86rem; font-weight: 600; color: var(--gold-light); min-height: 40px; display: inline-flex; align-items: center; }
.figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.figure-pair > * { min-width: 0; }
@media (max-width: 900px) { .figure-pair { grid-template-columns: 1fr; } }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0 0 0.9rem; padding: 0; list-style: none; font-size: 0.82rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 0.45rem; }
.swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; margin: 0 0 1.4rem; }
.stat { padding: 0.9rem 1rem; border-radius: 12px; background: rgba(2, 6, 15, 0.45); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-serif); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 600; color: var(--gold-strong); line-height: 1.1; }
.stat span { font-size: 0.8rem; color: var(--muted); line-height: 1.3; display: block; margin-top: 0.25rem; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }

.rows { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr) auto; align-items: center; gap: 0.4rem 0.9rem; }
.row-label { font-size: 0.86rem; color: var(--ink-2); line-height: 1.25; overflow-wrap: anywhere; }
.row-label small { display: block; color: var(--muted); font-size: 0.76rem; }
.row-value { font-size: 0.86rem; color: var(--ink); text-align: right; white-space: nowrap; font-weight: 600; }
.row.is-pick .row-label { color: var(--gold-light); font-weight: 600; }
.track { position: relative; height: 22px; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--track); border-radius: 2px; }
.bar-fill { position: absolute; left: 0; top: 4px; bottom: 4px; border-radius: 0 4px 4px 0; background: var(--rest); }
.is-pick .bar-fill { background: var(--gold); }
.dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid var(--surface-solid); cursor: default; }
.dot:focus-visible { outline-offset: 1px; border-radius: 50%; }
.span-line { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: var(--gold); }
.axis { display: grid; grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr) auto; gap: 0 0.9rem; margin-top: 4px; }
.axis-scale { position: relative; height: 18px; font-size: 0.72rem; color: var(--muted); }
.axis-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.axis-scale span:first-child { transform: none; }
.axis-scale span:last-child { transform: translateX(-100%); }
@media (max-width: 560px) {
  .row, .axis { grid-template-columns: minmax(0, 1fr) auto; }
  .row-label { grid-column: 1 / -1; }
  .row .track { grid-column: 1; }
  .axis > :first-child { display: none; }
}

.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gridline { stroke: rgba(152, 164, 184, 0.14); stroke-width: 1; }
.chart .tick { fill: var(--muted); font: 11px var(--font); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .point { stroke: var(--surface-solid); stroke-width: 2; }
.chart .label { font: 600 12px var(--font); fill: var(--ink-2); }
.chart .pick-band { fill: rgba(201, 169, 110, 0.12); }

.heat { display: grid; grid-template-columns: minmax(4.6rem, 8rem) repeat(5, minmax(0, 1fr)); gap: 3px; font-size: 0.8rem; }
.heat > * { min-width: 0; }
.heat .h-col { color: var(--muted); font-size: 0.74rem; text-align: center; padding: 0 2px 4px; overflow-wrap: anywhere; line-height: 1.2; align-self: end; }
.heat .h-row { color: var(--ink-2); font-size: 0.78rem; align-self: center; line-height: 1.2; overflow-wrap: anywhere; }
.heat .cell { border-radius: 4px; padding: 0.45rem 0.1rem; text-align: center; color: var(--night); font-weight: 700; line-height: 1.15; }
.heat .cell small { display: block; font-weight: 500; font-size: 0.68rem; opacity: 0.85; }
.heat .cell.is-pick { outline: 2px solid var(--gold-strong); outline-offset: 1px; }
@media (max-width: 480px) { .heat { font-size: 0.74rem; grid-template-columns: 4.2rem repeat(5, minmax(0, 1fr)); } .heat .cell small { display: none; } }

table.values { width: 100%; border-collapse: collapse; font-size: 0.84rem; margin-top: 0.4rem; table-layout: auto; }
table.values th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.78rem; padding: 0.4rem 0.4rem; border-bottom: 1px solid var(--line-gold); vertical-align: bottom; }
table.values td { padding: 0.42rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
table.values td.num, table.values th.num { text-align: right; }
table.values td.num { white-space: nowrap; }
table.values tr.is-pick td { color: var(--gold-light); background: rgba(201, 169, 110, 0.07); }
@media (max-width: 480px) { table.values { font-size: 0.78rem; } table.values th, table.values td { padding: 0.36rem 0.22rem; } }

/* Tab 4: presentation */
.film { margin: clamp(1rem, 3vw, 2.4rem) 0 2rem; }
.film-stage { position: relative; aspect-ratio: 16 / 9; min-height: 420px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-gold); background: radial-gradient(90% 80% at 50% 0%, #17325a 0%, var(--paper) 55%, var(--night) 100%); box-shadow: var(--shadow); }
@media (max-width: 700px) { .film-stage { aspect-ratio: auto; height: min(74svh, 600px); min-height: 460px; } }
.scene { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; padding: clamp(1.2rem, 4vw, 2.6rem); opacity: 0; visibility: hidden; transition: opacity 600ms var(--ease-out), visibility 0s 600ms; }
.scene.is-on { opacity: 1; visibility: visible; transition: opacity 600ms var(--ease-out); }
.scene-art { position: relative; display: grid; place-items: center; min-height: 0; }
.scene-caption { position: relative; }
.scene-chapter { font-size: 0.8rem; font-weight: 600; color: var(--gold); margin: 0 0 0.35rem; }
.scene-title { font-family: var(--font-serif); font-size: clamp(1.6rem, 1.1rem + 2.4vw, 3rem); color: var(--ink); margin: 0; line-height: 1.1; max-width: 22ch; text-wrap: balance; }
.scene-text { margin: 0.6rem 0 0; color: var(--ink-2); max-width: 56ch; font-size: clamp(0.92rem, 0.85rem + 0.3vw, 1.05rem); }
.scene.is-on .scene-title { animation: title-in 900ms var(--ease-out) both; }
@keyframes title-in { from { clip-path: inset(0 0 100% 0); transform: translateY(14px); } to { clip-path: inset(0 0 0 0); transform: none; } }
.film-controls { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.film-play { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--gold-metal); color: var(--night); cursor: pointer; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); }
.film-play svg { width: 22px; height: 22px; }
.film-play .i-pause, .film-play[aria-pressed=true] .i-play { display: none; }
.film-play[aria-pressed=true] .i-pause { display: block; }
.film-chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; flex: 1; min-width: 0; }
.chapter { width: 100%; display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding: 6px 0; min-height: 44px; border: 0; background: none; color: var(--muted); font: 600 0.74rem var(--font); text-align: left; cursor: pointer; }
.chapter-bar { position: relative; height: 4px; border-radius: 4px; background: var(--track); overflow: hidden; }
.chapter-bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: var(--gold); }
.chapter[aria-current=true] { color: var(--gold-light); }
.chapter.is-done .chapter-bar i { transform: scaleX(1); }
.chapter-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .chapter-name { display: none; } .chapter { min-height: 36px; justify-content: center; } }

/* Scene artwork */
.screen { position: relative; width: min(560px, 92%); aspect-ratio: 16 / 9; border-radius: 16px; border: 1px solid var(--line-gold); background: linear-gradient(160deg, #0f2342, #050c1b); overflow: hidden; box-shadow: var(--shadow); }
.screen-play { position: absolute; left: 50%; top: 42%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-metal); color: var(--night); }
.screen-play svg { width: 26px; height: 26px; margin-left: 4px; }
.screen-url { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 0.5rem 0.8rem; border-radius: 10px; background: rgba(2, 6, 15, 0.7); color: var(--ink-2); font-size: clamp(0.72rem, 0.6rem + 0.5vw, 0.9rem); white-space: nowrap; overflow: hidden; border: 1px solid var(--line); }
.scene.is-on .screen-url .typed { display: inline-block; overflow: hidden; vertical-align: bottom; animation: type 1.8s steps(28) 0.5s both; }
@keyframes type { from { max-width: 0; } to { max-width: 100%; } }
.wave { display: flex; align-items: center; gap: 3px; height: 64px; width: min(520px, 90%); }
.wave i { flex: 1; height: 20%; border-radius: 2px; background: var(--gold); opacity: 0.75; }
.scene.is-on .wave i { animation: wave 1.1s ease-in-out infinite alternate; }
@keyframes wave { from { transform: scaleY(0.4); } to { transform: scaleY(2.6); } }
.lines { width: min(560px, 94%); display: grid; gap: 8px; margin-top: 18px; }
.lines p { margin: 0; display: grid; grid-template-columns: 4.2rem 1fr; gap: 10px; font-size: clamp(0.78rem, 0.7rem + 0.35vw, 0.95rem); color: var(--ink-2); }
.lines time { color: var(--gold-light); font-weight: 600; }
.scene.is-on .lines p { animation: line-in 700ms var(--ease-out) both; }
.scene.is-on .lines p:nth-child(2) { animation-delay: 0.6s; }
.scene.is-on .lines p:nth-child(3) { animation-delay: 1.2s; }
@keyframes line-in { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
.blocks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; width: min(520px, 92%); }
.blocks i { aspect-ratio: 1.5; border-radius: 6px; border: 1px solid var(--line-gold); background: var(--gold-soft); }
.scene.is-on .blocks i { animation: block-in 800ms var(--ease-out) both; animation-delay: calc(var(--n) * 70ms); }
.blocks i.is-hit { background: var(--gold); border-color: var(--gold-strong); }
.scene.is-on .blocks i.is-hit { animation: block-in 800ms var(--ease-out) both, hit 1.4s 2.2s ease-in-out infinite alternate; animation-delay: calc(var(--n) * 70ms), 2.2s; }
@keyframes block-in { from { opacity: 0; transform: translateY(-18px) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes hit { to { box-shadow: 0 0 18px rgba(243, 227, 191, 0.75); } }
.chat { width: min(560px, 96%); display: grid; gap: 10px; }
.bubble { padding: 0.7rem 0.95rem; border-radius: 14px; font-size: clamp(0.82rem, 0.74rem + 0.35vw, 1rem); line-height: 1.45; max-width: 92%; }
.bubble.ask { justify-self: end; background: var(--gold-metal); color: var(--night); border-bottom-right-radius: 4px; font-weight: 600; }
.bubble.say { justify-self: start; background: var(--raised); border: 1px solid var(--line-gold); color: var(--ink); border-bottom-left-radius: 4px; }
.stamp { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--gold-soft); color: var(--gold-light); border: 1px solid var(--line-gold); font-weight: 600; font-size: 0.85em; white-space: nowrap; }
.stamp svg { width: 0.9em; height: 0.9em; }
.scene.is-on .bubble.ask { animation: line-in 700ms var(--ease-out) 0.3s both; }
.scene.is-on .bubble.say { animation: line-in 900ms var(--ease-out) 1.4s both; }
.bench-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: min(620px, 96%); }
.bench-row span { padding: 0.65rem 0.6rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(2, 6, 15, 0.5); color: var(--ink-2); font-size: clamp(0.72rem, 0.66rem + 0.3vw, 0.9rem); text-align: center; line-height: 1.25; }
.scene.is-on .bench-row span { animation: lamp 600ms var(--ease-out) both; animation-delay: calc(var(--n) * 260ms + 300ms); }
@keyframes lamp { from { opacity: 0.25; } to { opacity: 1; border-color: var(--line-gold); color: var(--ink); } }
@media (max-width: 560px) { .bench-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.skills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: min(640px, 96%); }
.skills span { padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--line-gold); background: var(--gold-soft); color: var(--ink); font-size: clamp(0.74rem, 0.68rem + 0.3vw, 0.92rem); }
.scene.is-on .skills span { animation: block-in 700ms var(--ease-out) both; animation-delay: calc(var(--n) * 90ms); }
.end-mark { width: clamp(64px, 12vw, 110px); height: auto; }
.scene.is-on .end-mark { animation: block-in 1.2s var(--ease-out) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .scene.is-on .wave i { animation: none; }
}
