/* ============================================================
   HDH — Learning Low-Latency Action Verification for Frozen VLAs
   Deep-blue theme (dark only)
   ============================================================ */
:root {
  --bg: #050b1a;
  --bg-2: #08132b;
  --panel: #0b1834;
  --line: rgba(120, 160, 235, 0.14);
  --line-2: rgba(120, 160, 235, 0.28);
  --text: #e7eefc;
  --text-2: #b3c1e0;
  --muted: #7d8fb6;
  --accent: #5c9dff;
  --accent-2: #8ec5ff;
  --accent-ink: #031230;
  --accent-soft: rgba(92, 157, 255, 0.14);
  --warm: #f4b860;
  --sky: #38bdf8;
  --fig-bg: #ffffff;
  --overlay: rgba(3, 10, 28, 0.74);
  --shadow: 0 24px 60px -32px rgba(0, 4, 20, 0.9);
  --hero-dim: rgba(5, 11, 26, 0.6);
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 14px;
  --max: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
.hero-grid > *, .round > *, .stages > *, .sgrid > *, .scoreboard > *, .versus > *, .results > *, .card { min-width: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; transition: background 0.3s, color 0.3s; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.12; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--font-mono); font-size: 0.86em; }
b { color: var(--text); font-weight: 600; }
.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }

/* ---------- nav ---------- */
#progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 100; background: linear-gradient(90deg, var(--accent), var(--sky)); }
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 90; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); transition: background 0.3s, border-color 0.3s; }
.nav.nav-on-hero { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.06em; color: var(--text); font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, #1e3a8a, var(--accent) 60%, var(--sky)); display: grid; place-items: center; color: #fff; font-size: 13px; box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { color: var(--text-2); font-size: 13.5px; padding: 6px 10px; border-radius: 8px; transition: 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--accent); }
.nav-links a.cta { color: var(--accent-ink); background: var(--accent); font-weight: 600; margin-left: 6px; }
.nav-links a.cta:hover { filter: brightness(1.08); }
.nav-toggle { display: none; width: 40px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; }
.nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform 0.3s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(92vh, 940px); display: flex; align-items: center; padding: 120px 0 56px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; background: #020716; }
.hero-bg video { width: 100%; height: 100%; object-fit: cover; opacity: 0.32; filter: saturate(0.7) hue-rotate(-8deg); }
.hero-bg::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(60% 70% at 85% 15%, rgba(56, 120, 255, 0.28), transparent 65%), radial-gradient(50% 60% at 0% 100%, rgba(30, 64, 175, 0.35), transparent 60%); }
.hero-bg::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, var(--hero-dim) 0%, var(--hero-dim) 40%, var(--bg) 100%); }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.chip { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); border-radius: 999px; padding: 5px 12px; margin-bottom: 20px; }
.kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 10px var(--sky); }
.title { font-size: clamp(36px, 4.7vw, 60px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
.title .nw { white-space: nowrap; }
.title .grad { background: linear-gradient(90deg, var(--accent) 0%, var(--sky) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subtitle { margin-top: 16px; font-family: var(--font-display); font-size: clamp(18px, 2vw, 23px); color: var(--text-2); font-weight: 500; }
.tagline { margin: 16px 0 0; max-width: 540px; font-size: 16.5px; color: var(--text-2); }
.authors { margin-top: 22px; font-size: 14.5px; line-height: 1.8; color: var(--text-2); }
.authors span { white-space: nowrap; }
.authors sup { font-size: 10px; color: var(--accent); margin-left: 1px; }
.affil { margin-top: 6px; font-size: 13px; color: var(--muted); }
.affil sup { color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px; border: 1px solid var(--line-2); color: var(--text); background: color-mix(in srgb, var(--bg-2) 80%, transparent); transition: 0.2s; }
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.disabled { opacity: 0.6; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn .sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--line-2); }

.player { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); background: #000; box-shadow: var(--shadow); }
.player .screen { position: relative; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; object-fit: cover; }
.player .lbl { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12px; color: #fff; }
.player .lbl b { color: #fff; background: var(--overlay); padding: 5px 10px; border-radius: 7px; font-weight: 600; }
.player .lbl span { color: #cfe2ff; background: var(--overlay); padding: 5px 8px; border-radius: 7px; font-size: 11px; font-variant-numeric: tabular-nums; }
.player .lbl em { font-style: normal; color: #fff; font-weight: 600; }
.player .idx { position: absolute; right: 12px; top: 12px; font-family: var(--font-mono); font-size: 11px; color: #fff; background: var(--overlay); padding: 4px 8px; border-radius: 7px; }
.player .who-tag { position: absolute; left: 12px; top: 12px; font-family: var(--font-mono); font-size: 11px; color: #a9cdff; background: var(--overlay); border: 1px solid rgba(140, 190, 255, 0.45); padding: 4px 9px; border-radius: 7px; }
.player .list { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px; background: var(--panel); }
.player .list button { font: 500 11.5px/1 var(--font-mono); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; cursor: pointer; transition: 0.2s; }
.player .list button:hover { color: var(--text); border-color: var(--line-2); }
.player .list button.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.stats { margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-2); padding: 20px; }
.stat .v { font-family: var(--font-display); font-size: clamp(28px, 3.2vw, 38px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.stat .v small { font-size: 0.5em; color: var(--muted); font-weight: 500; margin-left: 2px; }
.stat.hi .v { color: var(--accent); }
.stat .l { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.4; text-wrap: balance; }

/* ---------- sections ---------- */
section { padding: 88px 0; position: relative; scroll-margin-top: 70px; }
section + section { border-top: 1px solid var(--line); }
section.alt { background: linear-gradient(180deg, color-mix(in srgb, var(--bg-2) 70%, var(--bg)) 0%, var(--bg) 100%); }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; letter-spacing: -0.03em; margin-top: 12px; max-width: 780px; text-wrap: balance; }
.lede { margin-top: 14px; font-size: 17.5px; color: var(--text-2); max-width: 780px; }
.sec-head { margin-bottom: 36px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.figure { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--fig-bg); padding: 10px; cursor: zoom-in; position: relative; }
.figure img { width: 100%; border-radius: 8px; }
.figure::after { content: "click to enlarge"; position: absolute; right: 14px; bottom: 14px; font: 500 11px var(--font-mono); color: #fff; background: rgba(3, 10, 28, 0.78); padding: 5px 9px; border-radius: 6px; opacity: 0; transition: 0.2s; pointer-events: none; }
.figure:hover::after { opacity: 1; }
.caption { margin-top: 12px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.caption b { color: var(--text-2); }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; background: rgba(2, 7, 20, 0.92); opacity: 0; pointer-events: none; transition: opacity 0.2s; cursor: zoom-out; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(1600px, 100%); max-height: 100%; object-fit: contain; background: #fff; padding: 8px; border-radius: 10px; }
.lightbox .x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); background: rgba(3,10,28,0.8); color: #fff; font: 600 18px/1 var(--font-mono); cursor: pointer; }

details.more { margin-top: 16px; }
details.more summary { cursor: pointer; font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 999px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; }
details.more[open] summary::after { content: "−"; }
details.more > *:not(summary) { margin-top: 16px; }
details.abstract { margin: 8px 0 32px; }
details.abstract p { font-size: 15px; color: var(--text-2); max-width: 820px; border-left: 2px solid var(--accent); padding-left: 16px; }

/* ---------- method ---------- */
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.stage .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; }
.stage h3 { font-size: 22px; margin: 6px 0 10px; }
.stage p { color: var(--text-2); font-size: 14.5px; margin: 0; }
.round { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.round h3 { font-size: 18px; margin-bottom: 10px; }
.steps { counter-reset: s; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding: 9px 0 9px 36px; color: var(--text-2); font-size: 14.5px; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.steps li:first-child::before { top: 1px; }
.gate { font-family: var(--font-mono); font-size: 13.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; color: var(--text); overflow-x: auto; white-space: nowrap; margin: 0 0 12px; }
.gate .kw { color: var(--accent); }
.gate .cm { color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 14px 0 0; font-size: 14px; }
.kv dt { font-family: var(--font-mono); font-size: 12px; color: var(--accent); padding-top: 2px; }
.kv dd { margin: 0; color: var(--text-2); }

/* ---------- simulation results ---------- */
.results { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 14px; align-items: stretch; }
.chart-card { padding: 22px; display: flex; flex-direction: column; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-head h3 { font-size: 19px; }
.chart-head p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); font-family: var(--font-mono); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.legend i.ours { background: var(--accent); }
.legend i.vlm { background: var(--warm); }
#tradeoff { width: 100%; height: auto; display: block; font-family: var(--font-mono); margin-top: auto; }
#tradeoff text { fill: var(--muted); font-size: 11px; }
#tradeoff .lab { fill: var(--text-2); font-size: 12px; }
#tradeoff .lab.ours { fill: var(--accent); font-weight: 600; }
#tradeoff .grid { stroke: var(--line); }
#tradeoff .axis { stroke: var(--line-2); }
#tradeoff .base { stroke: var(--muted); stroke-dasharray: 4 5; opacity: 0.7; }
#tradeoff .pt { fill: var(--muted); stroke: var(--panel); stroke-width: 2; transition: r 0.15s; cursor: pointer; }
#tradeoff .pt.vlm { fill: var(--warm); }
#tradeoff .pt.ours { fill: var(--accent); }
#tradeoff .halo { fill: var(--accent); opacity: 0.18; }
#tradeoff .pt:hover { r: 9; }
.bars { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.brow { display: grid; grid-template-columns: 86px 1fr 46px; align-items: center; gap: 10px; font-size: 13px; }
.brow .n { color: var(--text-2); font-family: var(--font-mono); font-size: 12px; }
.brow .track { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; position: relative; }
.brow .track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 5px; background: var(--muted); transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.brow.vlm .track i { background: var(--warm); }
.brow.ours .track i { background: var(--accent); opacity: 0.75; }
.brow.best .track i { background: linear-gradient(90deg, var(--accent), var(--sky)); opacity: 1; }
.brow .v { font-family: var(--font-mono); font-size: 12.5px; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.brow.best .n, .brow.best .v { color: var(--accent); font-weight: 600; }
.callout { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line-2); font-size: 13.5px; color: var(--text-2); }
.callout b { color: var(--accent); }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; font-size: 12.5px; color: var(--text); box-shadow: var(--shadow); opacity: 0; transition: opacity 0.12s; max-width: 260px; line-height: 1.45; }
.tip.show { opacity: 1; }
.tip .k { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.tip .v { font-weight: 600; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 14px; background: var(--panel); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
table.tbl th, table.tbl td { padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl th { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
table.tbl th:first-child, table.tbl td:first-child { text-align: left; }
table.tbl td .pm { color: var(--muted); font-size: 0.85em; }
table.tbl tr.ours td { background: var(--accent-soft); color: var(--text); font-weight: 600; }
table.tbl tr.ours td:first-child { color: var(--accent); }
table.tbl td.best { color: var(--accent); font-weight: 700; }

/* ---------- simulation gallery ---------- */
.sgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.stile { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.stile video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #000; }
.stile figcaption { padding: 10px 12px; border-top: 1px solid var(--line); }
.sname { font-family: var(--font-display); font-size: 14px; font-weight: 600; line-height: 1.25; }
.ssub { margin-top: 3px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.ssub b { color: var(--accent); }

/* ---------- real robot ---------- */
.scoreboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.sb { padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.sb.win { border-color: var(--accent); background: var(--accent-soft); }
.sb .who { font-size: 13px; color: var(--text-2); }
.sb .who b { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.sb.win .who b { color: var(--accent); }
.sb .n { margin-top: 6px; font-family: var(--font-display); font-weight: 700; font-size: 36px; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.sb .n small { font-size: 0.45em; color: var(--muted); font-weight: 500; margin-left: 2px; }
.sb.win .n { color: var(--accent); }
.sb .bar { margin-top: 10px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.sb .bar i { display: block; height: 100%; width: var(--w, 0); border-radius: 3px; background: var(--muted); }
.sb.win .bar i { background: linear-gradient(90deg, var(--accent), var(--sky)); }
.sb .sub { margin-top: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.sb.gain .n { color: var(--sky); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { font: 600 13.5px/1 var(--font-body); color: var(--text-2); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 10px 15px; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.tab .sc { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.tab.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.tab.active .sc { color: var(--accent); }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.vs-badge { align-self: center; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--text-2); border: 1px solid var(--line-2); background: var(--panel); }
.vcol { display: flex; flex-direction: column; gap: 8px; }
.vpanel { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; position: relative; }
.vpanel.win { border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), var(--shadow); }
.vpanel video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; cursor: pointer; }
.vpanel .meta { position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; gap: 6px; }
.vpanel .meta .chip { background: var(--overlay); color: #fff; border-color: rgba(255,255,255,0.25); }
.vpanel.win .meta .chip:first-child { color: #a9cdff; border-color: rgba(140,190,255,0.55); }
.vpanel .meta .chip.ok { color: #86efac; border-color: rgba(134,239,172,0.5); }
.vpanel .meta .chip.bad { color: #fca5a5; border-color: rgba(252,165,165,0.5); }
.vpanel .clock { position: absolute; right: 10px; top: 10px; z-index: 2; text-align: right; background: var(--overlay); padding: 5px 10px; border-radius: 8px; font-family: var(--font-mono); color: #fff; }
.vpanel .clock .t { font-size: 16px; font-weight: 600; display: block; font-variant-numeric: tabular-nums; }
.vpanel .clock small { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.65); }
.vpanel .foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 24px 12px 12px; background: linear-gradient(180deg, transparent, rgba(2,7,20,0.85)); display: flex; justify-content: space-between; align-items: flex-end; color: #fff; pointer-events: none; }
.vpanel .foot .who { font-weight: 700; font-size: 15px; font-family: var(--font-display); }
.vpanel .foot .model { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.7); }
.vpanel .foot .speed { font-family: var(--font-mono); font-size: 11px; color: #a9cdff; border: 1px solid rgba(140,190,255,0.5); border-radius: 6px; padding: 3px 7px; }
.vpanel .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 3; background: rgba(255,255,255,0.15); cursor: pointer; }
.vpanel:hover .prog { height: 6px; }
.vpanel .prog i { display: block; height: 100%; width: 0; background: #cbd5e1; }
.vpanel.win .prog i { background: linear-gradient(90deg, #5c9dff, #38bdf8); }
.vpanel .stamp { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: rgba(2,7,20,0.62); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.03em; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.vpanel .stamp.ok { color: #86efac; }
.vpanel .stamp.bad { color: #fca5a5; }
.vpanel .stamp small { display: block; font: 600 11px var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 6px; }
.vpanel .stamp.show { opacity: 1; }
.vpanel.paused::after { content: "▶"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: #fff; background: rgba(2,7,20,0.72); pointer-events: none; }
.eps { display: flex; gap: 6px; flex-wrap: wrap; }
.eps button { font: 500 11.5px/1 var(--font-mono); color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.eps button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.eps button.ok::before { background: #22c55e; }
.eps button.bad::before { background: #ef4444; }
.eps button:hover { color: var(--text); border-color: var(--line-2); }
.eps button.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.ladder { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 4px 16px; }
.lrow { display: grid; grid-template-columns: 140px 1fr 70px; align-items: center; gap: 14px; padding: 12px 0; }
.lrow + .lrow { border-top: 1px dashed var(--line); }
.lrow .who { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.lrow.win .who { color: var(--accent); }
.lrow .dots { display: flex; flex-wrap: wrap; gap: 3px; }
.lrow .dots i { width: 10px; height: 10px; border-radius: 2px; background: var(--line); }
.lrow .dots i.on { background: var(--muted); }
.lrow.win .dots i.on { background: var(--accent); }
.lrow .pct { font-family: var(--font-display); font-weight: 700; font-size: 20px; text-align: right; color: var(--text-2); }
.lrow.win .pct { color: var(--accent); }
.vdesc { margin-top: 14px; color: var(--text-2); font-size: 14.5px; }

/* ---------- bibtex / footer ---------- */
.bib { position: relative; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 20px 22px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); overflow-x: auto; line-height: 1.7; }
.bib pre { margin: 0; white-space: pre; }
.bib .copy { position: absolute; top: 12px; right: 12px; font: 600 11.5px var(--font-mono); color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.ack { margin-top: 28px; font-size: 14.5px; color: var(--muted); }
footer { padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
footer .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot-brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.06em; color: var(--text); }
.foot-meta { flex: 1; }
.foot-links { display: flex; gap: 6px; flex-wrap: wrap; }
.foot-links a { color: var(--text-2); font-family: var(--font-mono); font-size: 11.5px; padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; }
.foot-links a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stages, .scoreboard { grid-template-columns: 1fr 1fr; }
  .sgrid { grid-template-columns: repeat(2, 1fr); }
  .round, .results { grid-template-columns: 1fr; }
  .versus { grid-template-columns: 1fr; }
  .vs-badge { justify-self: center; }
}
@media (max-width: 760px) {
  section { padding: 56px 0; }
  .sec-head { margin-bottom: 22px; }
  .lede { font-size: 15.5px; }
  .card { padding: 18px 16px; }
  .nav-toggle { display: flex; }
  .nav .wrap { flex-wrap: wrap; height: auto; min-height: 56px; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 20px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden; opacity: 0; pointer-events: none; transition: max-height 0.3s, opacity 0.25s; }
  .nav-links.is-open { max-height: 80vh; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 4px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links a.cta { margin: 10px 0 0; border-radius: 10px; text-align: center; }
  .hero { min-height: 0; padding: 86px 0 36px; }
  .hero-bg video { display: none; }
  .title { font-size: clamp(32px, 9.5vw, 42px); }
  .subtitle { font-size: 16px; margin-top: 10px; }
  .tagline { font-size: 14.5px; margin-top: 10px; }
  .authors { font-size: 13.5px; line-height: 1.7; margin-top: 14px; }
  .affil { font-size: 11.5px; }
  .actions { gap: 8px; margin-top: 16px; }
  .btn { padding: 10px 14px; font-size: 13px; }
  .btn .sub { display: none; }
  .player .list button { font-size: 10.5px; padding: 5px 8px; }
  .stats { margin-top: 26px; }
  .stat { padding: 14px 12px; }
  .stat .v { font-size: 24px; }
  .stat .l { font-size: 11.5px; }
  .stages, .scoreboard { grid-template-columns: 1fr; gap: 10px; }
  .stage h3 { font-size: 20px; }
  .gate { font-size: 12px; }
  .chart-card { padding: 14px 12px; }
  .brow { grid-template-columns: 70px 1fr 42px; }
  table.tbl { font-size: 12.5px; }
  table.tbl th, table.tbl td { padding: 8px; }
  table.tbl td:first-child, table.tbl th:first-child { position: sticky; left: 0; background: var(--panel); z-index: 1; }
  .sb .n { font-size: 30px; }
  .tab { padding: 9px 12px; font-size: 12.5px; }
  .vpanel .clock .t { font-size: 14px; }
  .vpanel .foot .model { display: none; }
  .ladder { padding: 2px 12px; }
  .lrow { grid-template-columns: 1fr auto; gap: 8px; }
  .lrow .dots { grid-column: 1 / -1; grid-row: 2; }
  .lrow .dots i { width: 8px; height: 8px; }
  .sgrid { gap: 8px; }
  .sname { font-size: 12.5px; }
  .bib { font-size: 11.5px; padding: 16px 14px; }
}
