/* Industry Wargame report, round 2. Page-specific layer on top of the portal kit (tokens.css).
   Colours come only from kit tokens; mixes use color-mix() over those tokens. */

:root { --firm-netflix: var(--series-8); --firm-disney: var(--series-1); --firm-skydance: var(--series-7); --firm-skydance_peacock: var(--series-7);
  --firm-comcast: var(--series-3); --firm-amazon: var(--series-2); --firm-apple: var(--series-mute); --firm-entrant: var(--series-4); --firm-_industry: var(--series-ref);
  --ease: cubic-bezier(.2,.7,.2,1); }

body.music { --firm-spotify: var(--series-6); --firm-youtube: var(--series-8); --firm-apple: var(--series-5); --firm-amazon: var(--series-3);
  --firm-umg: var(--series-1); --firm-sony: var(--series-7); --firm-wmg: var(--series-2); --firm-indies: var(--series-4); --firm-aiplat: var(--series-ref); }
.disclaimer { border: 1px solid var(--rule-strong); border-left: 4px solid var(--status-warn); background: var(--surface); border-radius: var(--radius-sm); padding: var(--s-4) var(--s-5); }
.disclaimer b { color: var(--ink); }
body.music .players { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.disclaimer { box-shadow: var(--shadow-lift); position: relative; }
.score { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; } .score b { font-family: var(--font-display); font-size: 4rem; line-height: 1; color: var(--ink); }

.topbar .about { font-size: var(--fs-small); white-space: nowrap; flex: none; }
@media (max-width: 560px) { .topbar .topbar-title, .topbar .topbar-nav { display: none; } }
.topbar-inner > .topbar-nav { min-width: 0; flex: 1 1 auto; }
@media (max-width: 420px) { .topbar-inner { gap: var(--s-2); } .theme-btn { padding: 2px 7px; } }

a.skip { position: absolute; left: var(--s-4); top: -4rem; z-index: 100; background: var(--surface); color: var(--ink); padding: var(--s-2) var(--s-4); border-radius: var(--radius-sm); box-shadow: var(--shadow-lift); }
a.skip:focus { top: var(--s-2); }
.pipeline h3 { font-size: 0.9375rem; }
#main:focus { outline: none; }
#xp-fan { min-height: 250px; } #xp-dots { min-height: 120px; } #fl-share { min-height: 240px; } #rp-chart { min-height: 260px; } #robust, #matrix { min-height: 200px; }

/* ---------- cinematic masthead ---------- */
.xhero { position: relative; isolation: isolate; color: var(--on-band); background: var(--band); overflow: hidden; }
.xhero picture, .xhero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.xhero picture img { object-position: 50% 40%; transform: scale(1.06); animation: xh-drift 26s var(--ease) both; }
.xhero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--band) 94%, transparent) 0%, color-mix(in srgb, var(--band) 78%, transparent) 46%, color-mix(in srgb, var(--band) 30%, transparent) 100%),
              linear-gradient(0deg, var(--band) 0%, transparent 38%); }
@keyframes xh-drift { from { transform: scale(1.12) translateX(-1.5%); } to { transform: scale(1.04) translateX(0); } }
.xhero .wrap { padding-top: clamp(3.5rem, 8vw, 7.5rem); padding-bottom: clamp(4.5rem, 8vw, 7rem); }
.xhero .kicker { color: var(--on-band-accent); }
.xhero h1 { font-family: var(--font-display); font-size: clamp(2rem, 1.1rem + 3.9vw, 3.9rem); line-height: 1.04; letter-spacing: -.015em; max-width: 19ch; margin: var(--s-3) 0 var(--s-5); color: var(--on-band); font-weight: 600; }
.xhero h1 em { font-style: italic; color: var(--on-band-accent); }
.xhero .lede { max-width: 58ch; color: var(--on-band-2); font-size: var(--fs-lede); }
.xhero .meta { margin-top: var(--s-6); }
.xhero .meta dt { color: var(--on-band-2); } .xhero .meta dd { color: var(--on-band); }
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); max-width: 46rem; margin-top: var(--s-6); }
.counter { border-top: 1px solid var(--on-band-rule); padding-top: var(--s-3); }
.counter b { display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 1rem + 2.2vw, 2.6rem); line-height: 1; color: var(--on-band); font-variant-numeric: tabular-nums; }
.counter span { display: block; margin-top: var(--s-2); font-size: var(--fs-small); color: var(--on-band-2); line-height: 1.35; }
@media (max-width: 560px) { .counters { grid-template-columns: 1fr; } .counter { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--s-3); align-items: baseline; } .counter span { margin: 0; } }
.theme-btn { margin-left: auto; background: none; border: 1px solid var(--on-band-rule); color: var(--on-band); border-radius: 999px; padding: 2px 10px; font: inherit; font-size: var(--fs-micro); cursor: pointer; flex: none; }
.theme-btn:hover { color: var(--on-band); border-color: var(--on-band-2); }

/* ---------- section banners (art-directed images) ---------- */
.banner { position: relative; border-radius: var(--radius); overflow: hidden; min-height: clamp(13rem, 28vw, 22rem); display: flex; align-items: flex-end; color: var(--on-band); background: var(--band); box-shadow: var(--shadow); isolation: isolate; }
.banner picture, .banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--band) 88%, transparent) 0%, color-mix(in srgb, var(--band) 55%, transparent) 50%, transparent 85%), linear-gradient(0deg, color-mix(in srgb, var(--band) 85%, transparent) 0%, transparent 60%); }
@media (max-width: 560px) { .banner::after { background: linear-gradient(0deg, color-mix(in srgb, var(--band) 94%, transparent) 0%, color-mix(in srgb, var(--band) 80%, transparent) 65%, color-mix(in srgb, var(--band) 30%, transparent) 100%); } }
.banner > div { padding: var(--s-6); max-width: 46rem; }
.banner .kicker { color: var(--on-band-accent); }
.banner h2 { color: var(--on-band); font-family: var(--font-display); margin-top: var(--s-2); }
.banner p:not(.kicker) { color: var(--on-band-2); margin-top: var(--s-3); }
@media (max-width: 560px) { .banner > div { padding: var(--s-5) var(--s-4); } }

/* ---------- players ---------- */
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: var(--s-4); }
.player { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.player:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.player figure { position: relative; aspect-ratio: 4 / 3; background: var(--band); overflow: hidden; }
.player figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; transition: transform .8s var(--ease); }
.player:hover figure img { transform: scale(1.05); }
.player figure::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--fc); }
.player .pb { padding: var(--s-4); display: grid; gap: var(--s-2); flex: 1; align-content: start; }
.player h3 { font-size: var(--fs-h3); display: flex; align-items: center; gap: var(--s-2); }
.player .role { font-size: var(--fs-small); color: var(--ink-3); }
.player dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); margin: var(--s-2) 0; }
.player dt { font-size: var(--fs-micro); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.player dd { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.player p.strat { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.45; }
@media (max-width: 560px) {
  .players { grid-template-columns: 1fr; gap: var(--s-3); }
  .player { display: grid; grid-template-columns: 6.5rem 1fr; }
  .player figure { aspect-ratio: auto; height: 100%; min-height: 8rem; }
  .player figure::after { left: auto; top: 0; width: 4px; height: auto; }
  .player .pb { padding: var(--s-3); gap: var(--s-1); }
  .player p.strat { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .player dl { margin: var(--s-1) 0; }
}
.dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--fc); display: inline-block; flex: none; }

/* ---------- turn diagram ---------- */
.turn { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s-5); display: grid; gap: var(--s-5); }
.turn-track { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-3); counter-reset: st; }
.turn-track::before { content: ""; position: absolute; left: 10%; right: 10%; top: 1.6rem; height: 2px; background: var(--rule-strong); }
.turn-track .runner { position: absolute; top: calc(1.6rem - 5px); left: 10%; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent); transition: left .7s var(--ease); }
.st { position: relative; background: none; border: 0; padding: 0; text-align: center; cursor: pointer; font: inherit; color: var(--ink-2); display: grid; justify-items: center; gap: var(--s-2); }
.st i { counter-increment: st; width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--rule-strong); font-style: normal; font-weight: 700; color: var(--ink-2); position: relative; z-index: 1; transition: all .3s var(--ease); }
.st i::before { content: counter(st); }
.st b { font-size: var(--fs-small); color: var(--ink); }
.st span { font-size: var(--fs-micro); color: var(--ink-3); line-height: 1.3; max-width: 13ch; }
.st[aria-selected="true"] i { background: var(--accent); border-color: var(--accent); color: var(--surface); transform: scale(1.08); }
.st:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--radius-sm); }
.turn-panel { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--s-5); align-items: start; min-height: 13rem; }
.turn-panel h3, .turn-panel h4 { font-size: var(--fs-h3); margin-bottom: var(--s-2); }
.turn-panel p { color: var(--ink-2); }
.specimen { background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: var(--s-4); font-family: var(--font-mono); font-size: .78rem; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.specimen .k { color: var(--accent-ink); } .specimen .w { color: var(--status-serious); }
.turn-scale { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: baseline; border-top: 1px solid var(--rule); padding-top: var(--s-4); font-size: var(--fs-small); color: var(--ink-3); }
.turn-scale b { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .turn-track { grid-template-columns: 1fr; gap: var(--s-2); }
  .turn-track::before { left: 1.6rem; right: auto; top: 1.6rem; bottom: 1.6rem; width: 2px; height: auto; }
  .turn-track .runner { display: none; }
  .st { grid-template-columns: 3.2rem 1fr; justify-items: start; text-align: left; column-gap: var(--s-3); }
  .st i { grid-row: span 2; } .st span { max-width: none; }
  .turn-panel { grid-template-columns: 1fr; }
}

/* ---------- controls ---------- */
.ctl { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: end; }
.ctl label, .lbl { display: block; font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-bottom: var(--s-1); font-weight: 600; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 2px; background: var(--surface-2); gap: 2px; }
.seg button { border: 0; background: none; font: inherit; font-size: var(--fs-small); padding: .38rem .8rem; border-radius: 999px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.seg button:focus-visible, .chip:focus-visible, .play:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
select.sel { font: inherit; font-size: var(--fs-small); padding: .4rem 2rem .4rem .7rem; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface); font: inherit; font-size: var(--fs-small); padding: .28rem .7rem .28rem .5rem; color: var(--ink-3); cursor: pointer; }
.chip .dot { opacity: .35; }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--fc); background: color-mix(in srgb, var(--fc) 9%, var(--surface)); }
.chip[aria-pressed="true"] .dot { opacity: 1; }
.chip.focus { box-shadow: 0 0 0 2px var(--fc); }
.scrub { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-3); align-items: center; }
.play { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: var(--accent); color: var(--surface); cursor: pointer; display: grid; place-items: center; }
.play svg { width: 14px; height: 14px; fill: currentColor; }
.scrub output { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); min-width: 5.5em; text-align: right; }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------- explorer ---------- */
.xp { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-lift); overflow: hidden; }
.xp-head { padding: var(--s-5); background: var(--surface-2); border-bottom: 1px solid var(--rule); display: grid; gap: var(--s-4); }
.xp-body { padding: var(--s-5); display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: var(--s-6); }
.xp-say { font-family: var(--font-display); font-size: clamp(1.1rem, .95rem + .6vw, 1.4rem); line-height: 1.35; color: var(--ink); grid-column: 1 / -1; min-height: 3.8em; }
.xp-say em { font-style: normal; color: var(--accent-ink); }
.xp-say .neg { color: var(--status-critical); } .xp-say .pos { color: var(--accent-ink); }
.xp h3, .xp h4 { font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: var(--s-2); }
.xp .note { font-size: var(--fs-small); color: var(--ink-3); margin-top: var(--s-2); }
.league { width: 100%; border-collapse: collapse; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.league td { padding: .42rem .3rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.league tr { cursor: pointer; } .league tr:hover td { background: var(--surface-2); }
.league tr.on td:first-child { font-weight: 700; color: var(--ink); }
.league td.n { text-align: right; white-space: nowrap; }
.league td.bar { width: 42%; }
.league svg { display: block; width: 100%; height: 14px; overflow: visible; }
@media (max-width: 900px) { .xp-body { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .xp-head, .xp-body { padding: var(--s-4); } .ctl { gap: var(--s-3); } .seg button { padding: .34rem .62rem; } }

/* ---------- generic chart chrome ---------- */
.vz { position: relative; width: 100%; }
.vz svg { display: block; width: 100%; overflow: visible; font-family: var(--font-body); }
.vz text { fill: var(--ink-3); font-size: 11px; }
.vz .lab { fill: var(--ink); font-weight: 600; }
.vz .grid { stroke: var(--chart-grid); }
.vz .base { stroke: var(--chart-base); }
.vz .zero { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.vz .cursor { stroke: var(--ink); stroke-width: 1; opacity: .5; }
.vz .halo { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--surface); padding: .45rem .6rem; border-radius: var(--radius-sm); font-size: var(--fs-small); line-height: 1.35; max-width: 18rem; box-shadow: var(--shadow-lift); }
.tip b { display: block; }
.legend-x { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--fs-small); color: var(--ink-2); margin-bottom: var(--s-3); }
.legend-x span { display: inline-flex; align-items: center; gap: .4rem; }
.legend-x i { width: 14px; height: 10px; border-radius: 2px; background: var(--c); display: inline-block; }
.legend-x i.ln { height: 3px; } .legend-x i.dt { width: 10px; border-radius: 50%; }
.legend-x i.hol { background: var(--surface); border: 2px solid var(--series-ref); width: 10px; border-radius: 50%; }

/* ---------- flows ---------- */
.flows { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-6); }
@media (max-width: 900px) { .flows { grid-template-columns: 1fr; } }
.race .row { display: grid; grid-template-columns: 8.5rem 1fr; align-items: center; gap: var(--s-2); height: 30px; position: absolute; left: 0; right: 0; transition: transform .45s var(--ease); }
.race { position: relative; }
.race .nm { font-size: var(--fs-small); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: .4rem; align-items: center; }
.race .trk { position: relative; height: 18px; margin-right: 3.4rem; margin-left: 2.6rem; }
.race .br { position: absolute; top: 0; height: 18px; background: var(--fc); border-radius: 2px; transition: left .35s linear, width .35s linear; }
.race .vl { position: absolute; top: 1px; font-size: var(--fs-small); font-variant-numeric: tabular-nums; color: var(--ink-2); transition: left .35s linear; white-space: nowrap; }
.race .ax { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--ink-3); }

/* ---------- replay ---------- */
.replay { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-6); }
@media (max-width: 900px) { .replay { grid-template-columns: 1fr; } }
.feed { display: grid; gap: var(--s-2); max-height: 33rem; overflow: auto; padding-right: 4px; }
.dec { display: grid; grid-template-columns: 2.6rem 1fr; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface); animation: dec-in .45s var(--ease) both; }
.dec img { width: 2.6rem; height: 2.6rem; border-radius: var(--radius-sm); object-fit: cover; background: var(--band); }
.dec .who { font-weight: 700; font-size: var(--fs-small); color: var(--ink); display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; }
.dec q { display: block; font-size: var(--fs-small); color: var(--ink-2); margin-top: 2px; quotes: "\201C" "\201D"; }
.dec .nt { font-size: var(--fs-micro); color: var(--status-serious); margin-top: 2px; }
.pill { font-size: var(--fs-micro); font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--rule); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pill.up { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.pill.dn { color: var(--div-neg); border-color: color-mix(in srgb, var(--div-neg) 40%, transparent); }
.evt { font-size: var(--fs-small); padding: var(--s-2) var(--s-3); border-left: 3px solid var(--series-ref); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-2); }
@keyframes dec-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- backtest ---------- */
.score-x { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: center; }
.score-x svg { width: 7.5rem; height: 7.5rem; }
.score-x b { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; color: var(--ink); }

/* ---------- next theatre ---------- */
.next { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.next img { width: 100%; height: 100%; object-fit: cover; min-height: 15rem; }
.next > div { padding: var(--s-6); display: grid; gap: var(--s-3); align-content: center; }
@media (max-width: 760px) { .next { grid-template-columns: 1fr; } .next > div { padding: var(--s-5) var(--s-4); } }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .xhero picture img { animation: none; transform: none; }
  .player, .player figure img, .race .row, .race .br, .race .vl, .turn-track .runner { transition: none; }
  .dec { animation: none; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt5 { margin-top: var(--s-5); } .mt4 { margin-top: var(--s-4); }
