:root {
  --bg: #0B0F14; --surface: #121821; --border: #1F2A37;
  --text: #E6EDF3; --text-2: #9FB0C0;
  --accent: #FF6A1A;
  --init: #6EA8FE; --mag: #FF6A1A; --resp: #3DDC97; --flag: #FF4D4D;
  --sans: -apple-system, Inter, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --max: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1.2; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 13px; color: var(--text-2); font-weight: 500; letter-spacing: 0; }
p { margin: 0; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
kbd { font: 11px var(--mono); color: var(--text-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; background: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s5); }

/* header */
.top { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top-inner { display: flex; align-items: center; gap: var(--s5); height: 56px; }
.brand { display: flex; align-items: center; gap: var(--s2); text-decoration: none; }
.brand .word { font-weight: 600; letter-spacing: -0.02em; }
.brand .prod { color: var(--text-2); padding-left: var(--s2); border-left: 1px solid var(--border); }
.tabs { display: flex; gap: var(--s1); margin-left: var(--s4); }
.tabs a { text-decoration: none; color: var(--text-2); padding: 6px var(--s3); border-radius: 6px; display: flex; gap: 6px; align-items: center; transition: color .2s var(--ease), background .2s var(--ease); }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.night { margin-left: auto; display: flex; align-items: center; gap: var(--s2); color: var(--text-2); }
select, input[type=number] { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font: inherit; }
select:hover, input:hover { border-color: #2c3b4d; }

main:focus, main:focus-visible { outline: none; }
main { flex: 1; padding: var(--s5) 0 var(--s7); outline: none; }
.foot { border-top: 1px solid var(--border); color: var(--text-2); font-size: 12px; }
.foot .wrap { display: flex; justify-content: space-between; gap: var(--s4); padding-top: var(--s3); padding-bottom: var(--s3); flex-wrap: wrap; }

/* status banners + badges */
.banner { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin-bottom: var(--s5); }
.banner.sim { border-color: rgba(255,106,26,.45); }
.banner.real { border-color: rgba(61,220,151,.4); }
.banner b { font-weight: 600; }
.banner .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.banner.sim .dot { background: var(--accent); } .banner.real .dot { background: var(--resp); }
.banner .meta { margin-left: auto; color: var(--text-2); font-size: 12px; }
.badge { display: inline-block; font: 600 10px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; padding: 3px 5px; border-radius: 4px; vertical-align: middle; }
.badge.sim { color: var(--accent); border: 1px solid rgba(255,106,26,.5); }
.badge.real { color: var(--resp); border: 1px solid rgba(61,220,151,.45); }
.badge.poc { color: var(--init); border: 1px solid rgba(110,168,254,.5); }

.head { display: flex; align-items: flex-end; gap: var(--s4); margin-bottom: var(--s4); flex-wrap: wrap; }
.head .sub { color: var(--text-2); margin-top: var(--s1); }
.head .tools { margin-left: auto; display: flex; gap: var(--s3); align-items: center; }
.toggle { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; color: var(--text-2); user-select: none; }
.toggle input { appearance: none; width: 30px; height: 18px; border-radius: 9px; background: var(--border); position: relative; cursor: pointer; transition: background .2s var(--ease); margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-2); transition: transform .2s var(--ease), background .2s var(--ease); }
.toggle input:checked { background: rgba(255,77,77,.35); }
.toggle input:checked::after { transform: translateX(12px); background: var(--flag); }
.toggle:has(input:checked) { color: var(--text); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: var(--s5); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.stats { display: flex; gap: var(--s6); margin-bottom: var(--s5); }
.stat .v { font: 600 22px var(--mono); letter-spacing: -0.02em; }
.stat .l { color: var(--text-2); font-size: 12px; }
.stat .v.flag { color: var(--flag); }

/* queue table */
table.q { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.q th { text-align: left; font-weight: 500; color: var(--text-2); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: var(--s2) var(--s2); border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 56px; background: var(--bg); z-index: 1; }
table.q th button { all: unset; cursor: pointer; } table.q th button:focus-visible { outline: 2px solid var(--accent); }
table.q td { padding: 10px var(--s2); border-bottom: 1px solid var(--border); vertical-align: middle; }
table.q tbody tr { cursor: pointer; transition: background .15s var(--ease); }
table.q tbody tr:hover, table.q tbody tr:focus { background: var(--surface); outline: none; }
table.q tbody tr:focus { box-shadow: inset 2px 0 0 var(--accent); }
.flagcell { display: flex; align-items: center; gap: 6px; font-family: var(--mono); }
.flagcell .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.flagcell.hi .pip { background: var(--flag); } .flagcell.mid .pip { background: var(--accent); opacity: .7; }
.flagcell.hi .v { color: var(--flag); font-weight: 600; }
.players { line-height: 1.3; } .players .dp { color: var(--text-2); font-size: 12px; }
.clock { font-family: var(--mono); white-space: nowrap; } .clock .p { color: var(--text-2); }
.game { font: 12px var(--mono); color: var(--text-2); white-space: nowrap; }
.dec { font: 600 11px var(--mono); padding: 3px 6px; border-radius: 4px; border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.dec.bad { color: var(--flag); border-color: rgba(255,77,77,.5); background: rgba(255,77,77,.08); }
.bar { width: 64px; height: 6px; border-radius: 3px; background: var(--border); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }
.barcell { display: flex; align-items: center; gap: 6px; font: 12px var(--mono); color: var(--text-2); }
.reason { color: var(--text-2); font-size: 12px; max-width: 220px; }
.reason.hi { color: var(--text); }
.empty { padding: var(--s7); text-align: center; color: var(--text-2); }

/* detail */
.crumbs { display: flex; gap: var(--s3); align-items: center; color: var(--text-2); margin-bottom: var(--s4); }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text); }
.crumbs .nav { margin-left: auto; display: flex; gap: var(--s2); }
.btn { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font: inherit; cursor: pointer; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.btn:hover { border-color: #2c3b4d; } .btn[disabled] { opacity: .4; cursor: default; }
.btn.primary { white-space: nowrap; flex: none; border-color: rgba(255,106,26,.6); color: var(--accent); }
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s5); }
.stage { position: relative; aspect-ratio: 4 / 3; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.stage svg { width: 100%; height: 100%; display: block; }
.stage .cap { position: absolute; left: var(--s3); bottom: var(--s3); right: var(--s3); display: flex; gap: var(--s2); align-items: center; font-size: 12px; color: var(--text-2); }
.stage .tl { position: absolute; left: var(--s3); top: var(--s3); display: flex; gap: var(--s2); align-items: center; }
.legend { display: flex; gap: var(--s4); font-size: 12px; color: var(--text-2); margin-top: var(--s3); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 2px; vertical-align: middle; margin-right: 6px; background: currentColor; }
.legend .a { color: var(--text-2); } .legend .a::before { background: var(--init); }
.legend .b::before { background: var(--text); }
.legend .c::before { background: var(--accent); height: 8px; width: 8px; border-radius: 50%; }
.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.gauge { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: var(--s4) var(--s3) var(--s3); text-align: center; }
.gauge svg { width: 100%; max-width: 140px; height: auto; display: block; margin: 0 auto; }
.gauge .v { font: 600 26px var(--mono); margin-top: -34px; letter-spacing: -0.02em; }
.gauge .l { color: var(--text-2); font-size: 12px; margin-top: var(--s2); }
.gauge .hint { color: var(--text-2); font-size: 11px; margin-top: 2px; opacity: .8; }
.reasonline { margin-top: var(--s4); padding: var(--s4); border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.reasonline .r { font: 15px/1.5 var(--mono); }
.reasonline.hi { border-color: rgba(255,77,77,.45); }
.reasonline .verdict { display: flex; gap: var(--s2); align-items: center; margin-bottom: var(--s2); font-size: 12px; color: var(--text-2); }
.verdict .tag { font: 600 11px var(--mono); padding: 2px 6px; border-radius: 4px; }
.verdict .tag.hi { background: rgba(255,77,77,.12); color: var(--flag); }
.verdict .tag.mid { background: rgba(255,106,26,.12); color: var(--accent); }
.verdict .tag.lo { background: rgba(61,220,151,.1); color: var(--resp); }
.league { margin-top: var(--s4); }
.league .row { display: flex; gap: var(--s3); align-items: center; margin-bottom: var(--s2); }
.league .grade { font: 600 13px var(--mono); }
.league .grade.bad { color: var(--flag); }
.league blockquote { margin: var(--s2) 0 var(--s3); padding-left: var(--s3); border-left: 2px solid var(--border); color: var(--text); }
.agree { font-size: 12px; color: var(--text-2); }
.agree b { color: var(--resp); font-weight: 600; } .agree b.no { color: var(--accent); }
.stem { margin-top: var(--s4); }
.stem ul { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px var(--s4); }
.stem li { display: flex; gap: var(--s2); align-items: center; font-size: 13px; }
.stem li .ck { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border); display: grid; place-items: center; font-size: 11px; flex: none; color: var(--text-2); }
.stem li.on .ck { border-color: var(--flag); color: var(--flag); background: rgba(255,77,77,.1); }
.stem li .val { margin-left: auto; font: 12px var(--mono); color: var(--text-2); }
.poc { margin-top: var(--s4); font-size: 12px; color: var(--text-2); }
.poc table { border-collapse: collapse; margin-top: var(--s2); font: 12px var(--mono); }
.poc td { padding: 2px var(--s3) 2px 0; }

/* charts */
.chart { width: 100%; }
.hbar { display: grid; grid-template-columns: 150px 1fr 120px; align-items: center; gap: var(--s3); padding: 6px 0; font-size: 13px; position: relative; }
.hbar .lab { color: var(--text); }
.hbar .track { height: 14px; position: relative; }
.hbar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; transition: width .4s var(--ease); }
.hbar .ci { position: absolute; top: 50%; height: 1px; background: var(--text-2); opacity: .7; }
.hbar .ci::before, .hbar .ci::after { content: ""; position: absolute; top: -4px; height: 9px; width: 1px; background: var(--text-2); }
.hbar .ci::before { left: 0; } .hbar .ci::after { right: 0; }
.hbar .val { font: 12px var(--mono); color: var(--text-2); text-align: right; white-space: nowrap; }
.hbar .val b { color: var(--text); font-weight: 600; }
.hbar:hover { background: rgba(255,255,255,.02); }
.axis { display: grid; grid-template-columns: 150px 1fr 120px; gap: var(--s3); font: 11px var(--mono); color: var(--text-2); margin-top: var(--s1); }
.axis .ticks { position: relative; height: 16px; border-top: 1px solid var(--border); }
.axis .ticks span { position: absolute; top: 2px; transform: translateX(-50%); }
.axis-title { font-size: 11px; color: var(--text-2); text-align: center; margin-top: 2px; }
.gridl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); opacity: .6; }
.note { color: var(--text-2); font-size: 12px; margin-top: var(--s3); }
.tip { position: fixed; pointer-events: none; z-index: 20; background: #0E141B; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font: 12px var(--mono); color: var(--text); box-shadow: 0 6px 24px rgba(0,0,0,.4); opacity: 0; transition: opacity .12s; }
.hist { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--border); }
.hist div { flex: 1; background: var(--text-2); opacity: .55; border-radius: 3px 3px 0 0; min-height: 1px; transition: opacity .15s; }
.hist div.on { background: var(--accent); opacity: 1; }
.hist div:hover { opacity: 1; }
table.plain { width: 100%; border-collapse: collapse; font-size: 13px; }
table.plain th { text-align: left; color: var(--text-2); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); padding: 6px 8px 6px 0; }
table.plain td { border-bottom: 1px solid var(--border); padding: 8px 8px 8px 0; }
table.plain td.num, table.plain th.num { text-align: right; }

/* advisor */
.advisor { display: grid; grid-template-columns: 300px 1fr; gap: var(--s5); align-items: stretch; }
.advisor label { display: block; color: var(--text-2); font-size: 12px; margin: var(--s3) 0 var(--s1); }
.advisor select { width: 100%; }
.advisor .out { display: flex; flex-direction: column; justify-content: center; }
.big { font: 600 64px/1 var(--mono); letter-spacing: -0.04em; }
.big small { font-size: 24px; color: var(--text-2); }
.out .n { color: var(--text-2); margin-top: var(--s2); }
.out .call { margin-top: var(--s4); font-size: 15px; }
.out .call b { font-weight: 600; }
.meter { height: 8px; border-radius: 4px; background: var(--border); position: relative; margin-top: var(--s4); }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); transition: width .4s var(--ease); }
.meter .base { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); }
.meter-l { display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--text-2); margin-top: 6px; }
.disabled-field { opacity: .55; }

/* Whistle Physics clip id + embedded NBA video on the event page (2026-11-12) */
.head .wpid { margin-left: auto; display: grid; gap: 2px; padding: var(--s2) var(--s3); border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.wpid .l { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.wpid .v { font-weight: 600; font-size: 18px; color: var(--accent); text-decoration: none; letter-spacing: -0.01em; }
.wpid .v:hover { text-decoration: underline; }
.vid { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-top: var(--s3); }
.vid video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vid video[hidden] { display: none; }
.vfail { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); padding: var(--s4); text-align: center; background: var(--surface); }
.vfail[hidden] { display: none; }
.vfail span { color: var(--text-2); font-size: 12px; }
.vcredit { font-size: 11px; }
.vlinks { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }

section + section { margin-top: var(--s6); }
.fade-in { animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 960px) {
  .detail, .grid2, .advisor { grid-template-columns: 1fr; }
  .tabs a kbd, .foot .keys { display: none; }
  .top-inner { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; }
  table.q .opt { display: none; }
}
@media (max-width: 640px) {
  .tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * var(--s2)); padding: 0 var(--s2); }
  table.q th { position: static; }
  table.q .bar { width: 36px; }
  table.q th:last-child, table.q td.reason, table.q th:nth-child(5), table.q td:nth-child(5) { display: none; }
  table.q .players { min-width: 110px; }
  table.plain { font-size: 12px; }
}
@media (max-width: 420px) {
  .hbar, .axis { grid-template-columns: 96px minmax(0, 1fr) 88px; gap: var(--s2); }
  .hbar .lab { overflow-wrap: anywhere; }
}
