/* Rumo - editorial, minimal. Color only where it carries data (the candidates). */
:root {
  --bg: #000;
  --s1: #0c0c0d;
  --s2: #17171a;
  --s3: #222226;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.16);
  --ink: #fff;
  --ink2: #a3a3a8;
  --ink3: #6a6a70;
  --band: rgba(255, 255, 255, 0.16);
  --red: #ff4458;
  --blue: #3b82ff;
  --grey: #9a9aa2;
  --map-empty: #1a1a1d;
  --map-line: rgba(0, 0, 0, 0.55);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --r: 22px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    --bg: #f4f2ec; --s1: #fbfaf7; --s2: #ece9e1; --s3: #e1ddd3;
    --line: rgba(0, 0, 0, 0.08); --line2: rgba(0, 0, 0, 0.16);
    --ink: #0b0b0c; --ink2: #56565c; --ink3: #8b8b90; --band: rgba(0, 0, 0, 0.12);
    --red: #e3263d; --blue: #1f62e8; --grey: #8d8d94; --map-empty: #e4e0d6; --map-line: rgba(255, 255, 255, 0.7);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 30px -12px rgba(0, 0, 0, 0.12);
    color-scheme: light;
  }
}
:root[data-theme='light'] {
  --bg: #f4f2ec; --s1: #fbfaf7; --s2: #ece9e1; --s3: #e1ddd3;
  --line: rgba(0, 0, 0, 0.08); --line2: rgba(0, 0, 0, 0.16);
  --ink: #0b0b0c; --ink2: #56565c; --ink3: #8b8b90; --band: rgba(0, 0, 0, 0.12);
  --red: #e3263d; --blue: #1f62e8; --grey: #8d8d94; --map-empty: #e4e0d6; --map-line: rgba(255, 255, 255, 0.7);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 30px -12px rgba(0, 0, 0, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; transition: background 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}
body::before { /* film grain, very faint */
  content: ''; position: fixed; inset: -50%; z-index: 0; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.dim { color: var(--ink3); }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; z-index: 50; }
.skip:focus { left: 12px; }

/* ---------------------------------------------------------------- bar */
.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px;
  padding: 12px max(20px, env(safe-area-inset-left)); height: 64px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.mark { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.mark .tick { stroke: var(--ink3); stroke-dasharray: 1.5 3; }
.mark .tip { fill: var(--ink); stroke: none; }
.word { font: 400 28px/1 var(--serif); letter-spacing: -0.01em; }
.races { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.races::-webkit-scrollbar { display: none; }
.races button {
  border: 0; background: transparent; color: var(--ink2); padding: 8px 14px; border-radius: 999px;
  font-weight: 500; font-size: 14px; white-space: nowrap; cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.races button:hover { color: var(--ink); background: var(--s2); }
.races button.on { background: var(--ink); color: var(--bg); }
.races .group { display: flex; gap: 2px; padding-left: 10px; margin-left: 6px; border-left: 1px solid var(--line); }
.races .group span { align-self: center; color: var(--ink3); font-size: 12px; padding: 0 6px; }
.status { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.pill { font: 600 11px/1 var(--sans); letter-spacing: 0.08em; padding: 7px 11px 7px 22px; border-radius: 999px; position: relative; background: var(--s2); color: var(--ink2); }
.pill::before { content: ''; position: absolute; left: 10px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: currentColor; }
.pill.live { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.pill.live::before { animation: blink 1.6s var(--ease) infinite; }
.pill.replay { background: var(--ink); color: var(--bg); }
@keyframes blink { 50% { opacity: 0.25; } }
.clock { font-size: 15px; color: var(--ink2); }
.icon { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; }
.icon svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.5; }
.icon .fill { fill: var(--ink); stroke: none; }
.icon:hover { background: var(--s2); }

.replaybar {
  position: sticky; top: 64px; z-index: 19; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 20px; background: var(--ink); color: var(--bg); font-size: 14px;
}
.replaybar .tag { font: 600 11px var(--sans); letter-spacing: 0.1em; border: 1px solid currentColor; padding: 3px 8px; border-radius: 999px; }
.replaybar .rl { flex: 1; min-width: 180px; }
.replaybar .rctl { display: flex; gap: 8px; align-items: center; }
.replaybar .seg { background: color-mix(in srgb, var(--bg) 14%, transparent); }
.replaybar .seg button { color: var(--bg); opacity: 0.7; }
.replaybar .seg button.on { background: var(--bg); color: var(--ink); opacity: 1; }
.replaybar .btn { border-color: color-mix(in srgb, var(--bg) 30%, transparent); color: var(--bg); }
.replaybar .btn:not(.ghost) { background: var(--bg); color: var(--ink); }

/* ---------------------------------------------------------------- layout */
main {
  position: relative; z-index: 1; max-width: 1360px; margin: 0 auto; padding: 22px 20px 40px;
  display: grid; gap: 16px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: 'verdict map' 'chart map' 'l2 map' 'states states' 'method proof' 'band band';
}
.verdict { grid-area: verdict; } .mapcard { grid-area: map; } .chartcard { grid-area: chart; } .l2card { grid-area: l2; }
.statecard { grid-area: states; } .method { grid-area: method; } .proof { grid-area: proof; } .l2band { grid-area: band; }
.card {
  background: var(--s1); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); min-width: 0;
  animation: enter 0.8s var(--ease) both;
}
main > :nth-child(2) { animation-delay: 0.06s; } main > :nth-child(3) { animation-delay: 0.12s; } main > :nth-child(4) { animation-delay: 0.18s; }
main > :nth-child(5) { animation-delay: 0.24s; } main > :nth-child(n + 6) { animation-delay: 0.3s; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
.chead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.chead h2, .method h2, .proof h2 { margin: 0; font: 400 28px/1.1 var(--serif); letter-spacing: -0.01em; }
.chead h2 .dim { font-size: 20px; font-style: italic; }
.lead { color: var(--ink2); margin: 8px 0 18px; max-width: 60ch; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--s2); }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink2); cursor: pointer; transition: all 0.2s var(--ease); }
.seg button.on { background: var(--s1); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.seg.small button { padding: 5px 10px; font-size: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; transition: all 0.2s var(--ease); }
.btn:hover { background: var(--s2); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: 0.85; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.link { border: 0; background: none; padding: 0; color: var(--ink2); font-size: 14px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 4px; }
.link:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------------------------------------------------------------- verdict */
.verdict { padding: 26px 26px 20px; }
.vhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.eyebrow { margin: 0; font: 500 13px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink2); }
.counted { font-size: 14px; color: var(--ink2); }
.counted b { color: var(--ink); font-weight: 500; font-size: 15px; }
.meter { height: 3px; border-radius: 3px; background: var(--s3); margin: 14px 0 22px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 3px; transition: width 1.2s var(--ease); }

.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cand { display: flex; gap: 14px; align-items: flex-start; }
.cand.right { flex-direction: row-reverse; text-align: right; }
.face { position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--s3); box-shadow: 0 0 0 2px var(--s1), 0 0 0 4px var(--c); }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(0.15) contrast(1.05); }
.face img[hidden] { display: none; }
.face .ini { position: absolute; inset: 0; display: grid; place-items: center; font: 400 26px var(--serif); color: var(--c); }
.cname { margin: 2px 0 0; font: 600 16px/1.25 var(--sans); }
.chance { display: flex; align-items: baseline; gap: 2px; margin-top: 4px; color: var(--c); }
.cand.right .chance { justify-content: flex-end; }
.chance .num { font: 400 clamp(56px, 7vw, 92px)/0.9 var(--serif); font-variant-numeric: normal; letter-spacing: -0.03em; }
.chance .unit { font: 400 28px var(--serif); }
.clabel { margin: 6px 0 0; font-size: 12px; color: var(--ink3); max-width: 15ch; }
.cand.right .clabel { margin-left: auto; }
.says { font-size: 17px; line-height: 1.5; margin: 22px 0 18px; text-wrap: pretty; min-height: 3em; }
.says b { font-weight: 600; }
.says em { font-family: var(--serif); font-size: 1.18em; font-style: italic; }

.track { position: relative; height: 44px; }
.track .half { position: absolute; top: 19px; height: 6px; width: 50%; }
.track .half.l { left: 0; background: linear-gradient(90deg, var(--c0), color-mix(in srgb, var(--c0) 15%, transparent)); border-radius: 6px 0 0 6px; }
.track .half.r { right: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c1) 15%, transparent), var(--c1)); border-radius: 0 6px 6px 0; }
.track .tie { position: absolute; left: 50%; top: 10px; height: 24px; width: 1px; background: var(--line2); }
.band { position: absolute; top: 12px; height: 20px; border-radius: 10px; background: var(--band); border: 1.5px dashed var(--ink); transition: left 1s var(--ease), width 1s var(--ease); }
.bmid { position: absolute; top: 6px; width: 2px; height: 32px; margin-left: -1px; background: var(--ink); transition: left 1s var(--ease); }
.dot { position: absolute; top: 13px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--s1); transition: left 1s var(--ease); }
.tscale { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); margin-top: 2px; }
.nowend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 0; }
.nowend div { background: var(--s2); border-radius: 14px; padding: 12px 14px; }
.nowend dt { font-size: 12px; color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.nowend dd { margin: 4px 0 0; font-size: 17px; }
.k-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); display: inline-block; }
.k-band { width: 18px; height: 10px; border-radius: 5px; border: 1.5px dashed var(--ink); background: var(--band); display: inline-block; }
.multi { display: grid; gap: 10px; margin-top: 16px; }
.multi .row { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; gap: 10px; align-items: center; font-size: 13px; }
.multi .bar { position: relative; height: 10px; border-radius: 5px; background: var(--s2); }
.multi .bar i { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.vfoot { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.vfoot .dim { margin-left: auto; font-size: 12px; }

/* ---------------------------------------------------------------- l2 */
.l2card { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.l2card p { margin: 0; color: var(--ink2); }
.l2k { font: 500 12px/1 var(--sans) !important; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3) !important; }
.l2band { position: relative; z-index: 1; border-radius: var(--r); padding: 44px 32px; background: var(--ink); color: var(--bg); overflow: hidden; }
.l2band::after { /* drawn contour art */
  content: ''; position: absolute; right: -80px; top: -60px; width: 420px; height: 420px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle, transparent 0 18px, color-mix(in srgb, var(--bg) 18%, transparent) 18px 19px);
  mask: radial-gradient(circle, #000 30%, transparent 70%);
}
.l2inner { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.l2band .l2k { color: color-mix(in srgb, var(--bg) 60%, transparent) !important; margin: 0 0 10px; }
.l2band h2 { margin: 0 0 10px; font: 400 clamp(30px, 4vw, 48px)/1.05 var(--serif); letter-spacing: -0.015em; }
.l2band h2 em { opacity: 0.6; }
.l2band p { margin: 0; max-width: 58ch; opacity: 0.75; }
.l2band .btn.primary { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* ---------------------------------------------------------------- map */
.mapcard { display: flex; flex-direction: column; padding-bottom: 16px; }
.search { position: relative; display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.search svg { position: absolute; left: 14px; width: 16px; height: 16px; fill: none; stroke: var(--ink3); stroke-width: 2; pointer-events: none; }
.search input {
  flex: 1; min-width: 0; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--s2); color: var(--ink);
  padding: 0 16px 0 40px; font: 400 15px var(--sans); outline: none; transition: border 0.2s var(--ease);
}
.search input:focus { border-color: var(--line2); }
.qres { position: absolute; left: 0; right: 0; top: 48px; z-index: 6; margin: 0; padding: 6px; list-style: none; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5); max-height: 320px; overflow: auto; }
.qres li { padding: 9px 12px; border-radius: 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.qres li span { color: var(--ink3); font-size: 13px; }
.qres li[aria-selected='true'], .qres li:hover { background: var(--s2); }
.mapwrap { position: relative; flex: 1; min-height: 620px; touch-action: pan-y; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.mtip { position: absolute; pointer-events: none; z-index: 4; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; min-width: 210px; box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.5); font-size: 13px; }
.mtip h4, .detail h4 { margin: 0 0 6px; font: 600 14px var(--sans); }
.mtip h4 span, .detail h4 span { color: var(--ink3); font-weight: 400; }
.mrow { display: flex; justify-content: space-between; gap: 14px; color: var(--ink2); padding: 2px 0; }
.mrow b { color: var(--ink); font: 500 13px var(--mono); }
.mrow i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.mlegend { position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink2); flex-wrap: wrap; }
.mlegend .ramp { width: 150px; height: 8px; border-radius: 4px; }
.detail { margin-top: 12px; background: var(--s2); border-radius: 16px; padding: 14px 16px; animation: enter 0.4s var(--ease); }
.detail .bars { display: grid; gap: 8px; margin-top: 10px; }
.detail .bl { display: grid; grid-template-columns: 76px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; }
.detail .bt { position: relative; height: 8px; border-radius: 4px; background: var(--s3); overflow: hidden; }
.detail .bt i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; transition: width 0.8s var(--ease); }
.detail .x { float: right; border: 0; background: none; color: var(--ink3); cursor: pointer; font-size: 20px; line-height: 1; }

/* ---------------------------------------------------------------- chart */
.key { display: flex; gap: 16px; font-size: 12px; color: var(--ink2); }
.key span { display: flex; align-items: center; gap: 6px; }
.k-solid { width: 18px; height: 2px; background: var(--ink); display: inline-block; }
.k-dash { width: 18px; height: 0; border-top: 2px dashed var(--ink); display: inline-block; }
.chartwrap { position: relative; }
#chart { width: 100%; height: 280px; display: block; overflow: visible; touch-action: pan-y; }
#chart text { fill: var(--ink3); font: 11px var(--mono); }
#chart .grid line { stroke: var(--line); }
#chart .count { fill: none; stroke-width: 2.2; }
#chart .proj { fill: none; stroke-width: 1.6; stroke-dasharray: 5 4; }
#chart .bandp { opacity: 0.1; }
#chart .xh { stroke: var(--line2); }
#chart .lab { font: 500 12px var(--sans); }
#chart .flag { fill: var(--ink2); font: italic 400 14px var(--serif); }
.ctip { position: absolute; top: 0; pointer-events: none; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 12px; min-width: 170px; box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.5); }

/* ---------------------------------------------------------------- states */
.srows { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px 24px; }
.srow { display: grid; grid-template-columns: 34px 1fr 64px; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; transition: background 0.2s var(--ease); background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%; }
.srow:hover { background: var(--s2); }
.srow .uf { font: 600 14px var(--sans); }
.srow .vis { display: grid; gap: 5px; }
.srow .split { position: relative; height: 8px; border-radius: 4px; background: var(--s3); overflow: hidden; display: flex; }
.srow .split i { height: 100%; transition: width 0.8s var(--ease); }
.srow .proj { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); transition: left 0.8s var(--ease); }
.srow .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink3); }
.srow .ch { text-align: right; font: 500 14px var(--mono); }
.srow .ch small { display: block; font: 400 11px var(--sans); color: var(--ink3); }

/* ---------------------------------------------------------------- method / proof */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 52px; color: var(--ink2); }
.steps li b { color: var(--ink); font-weight: 600; display: block; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -6px; font: italic 400 38px/1 var(--serif); color: var(--ink3); }
.fine { margin: 20px 0 0; font-size: 13px; color: var(--ink3); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stats div { background: var(--s2); border-radius: 16px; padding: 14px; }
.stats b { display: block; font: 400 44px/1 var(--serif); letter-spacing: -0.02em; }
.stats span { display: block; margin-top: 6px; font-size: 12px; color: var(--ink2); line-height: 1.4; }
.tests { display: grid; gap: 0; margin: 0; }
.lose { color: var(--red); }

/* ---------------------------------------------------------------- footer + dock */
.foot { position: relative; z-index: 1; max-width: 1360px; margin: 0 auto; padding: 8px 24px 110px; color: var(--ink3); font-size: 13px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot p { margin: 0; max-width: 80ch; }
.dock {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 30; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.6); transition: transform 0.5s var(--ease); font-size: 14px; white-space: nowrap; cursor: pointer;
}
.dock.show { transform: translate(-50%, 0); }
.dock i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dock span { display: flex; align-items: center; gap: 7px; }
.dock .dp { opacity: 0.6; font-size: 12px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  main { grid-template-columns: 1fr; grid-template-areas: 'verdict' 'map' 'chart' 'l2' 'states' 'method' 'proof' 'band'; padding: 14px 12px 30px; gap: 12px; }
  .mapwrap { min-height: 0; aspect-ratio: 1 / 1.02; flex: none; }
}
@media (max-width: 640px) {
  .bar { gap: 8px 10px; padding: 10px 12px 8px; height: auto; flex-wrap: wrap; }
  .races { order: 3; flex: 1 0 100%; margin: 0 -12px; padding: 2px 12px 2px; }
  .races button { padding: 7px 12px; font-size: 13px; }
  .brand { margin-right: auto; }
  .word { font-size: 24px; }
  .clock { display: none; }
  .replaybar { position: static; padding: 10px 12px; gap: 8px; font-size: 13px; }
  .replaybar .rl { flex: 1 0 calc(100% - 70px); min-width: 0; line-height: 1.35; }
  .replaybar .rctl { width: 100%; }
  .replaybar .rctl .btn { padding: 6px 12px; font-size: 13px; }
  .replaybar .seg button { padding: 5px 9px; }
  .card { padding: 18px; border-radius: 18px; }
  .verdict { padding: 20px 18px 16px; }
  .face { width: 48px; height: 48px; }
  .cand { flex-direction: column; gap: 10px; }
  .cand.right { flex-direction: column; align-items: flex-end; }
  .chance .num { font-size: 64px; }
  .says { font-size: 16px; }
  .nowend { gap: 8px; }
  .nowend div { padding: 10px 12px; }
  .nowend dd { font-size: 15px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  .stats b { font-size: 32px; }
  .srows { grid-template-columns: 1fr; }
  #chart { height: 220px; }
  .l2band { padding: 30px 22px; }
  .vfoot .dim { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------- map navigation */
.face .ini[hidden] { display: none; }
.face img { animation: faceIn 0.5s var(--ease) both; }
@keyframes faceIn { from { opacity: 0; transform: scale(1.06); } }
.crumbs { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.crumb { all: unset; cursor: pointer; color: var(--ink3); transition: color 0.2s var(--ease); }
.crumb:hover, .crumb:focus-visible { color: var(--ink); }
.crumb.cur { color: var(--ink); cursor: default; }
.csep { color: var(--ink3); font-weight: 300; }
.back {
  position: absolute; top: 10px; left: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--s1) 86%, transparent);
  backdrop-filter: blur(8px); color: var(--ink); font: 500 13px var(--sans); cursor: pointer; animation: backIn 0.35s var(--ease) both;
}
.back:hover { border-color: var(--line2); }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes backIn { from { opacity: 0; transform: translateX(-6px); } }
.hint { position: absolute; top: 14px; right: 12px; margin: 0; z-index: 2; font-size: 12px; color: var(--ink3); pointer-events: none; }
@media (max-width: 640px) { .hint { display: none; } .mapwrap { min-height: 460px; } }
.mlegend .lg { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.mlegend .ramp { display: inline-block; width: 44px; height: 6px; border-radius: 3px; }

/* ---------------------------------------------------------------- proof list */
.tkey { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink2); padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.tkey .keys { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.tkey i, .test .tr i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.kr, .test .tr .r { background: var(--ink); }
.kc, .test .tr .c { background: transparent; box-shadow: inset 0 0 0 2px var(--ink3); }
.tkey .kc { margin-left: 8px; }
.test { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) 30px; grid-template-rows: auto auto; column-gap: 14px; row-gap: 8px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); cursor: pointer; width: 100%; }
.test:hover .t1 b { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink3); }
.test:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.test .t1 { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; min-width: 0; }
.test .t1 b { font-weight: 500; }
.test .t1 small { color: var(--ink3); font-size: 12px; white-space: nowrap; }
.test .tr { position: relative; height: 18px; grid-column: 1; }
.test .tr::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 2px; border-radius: 1px; background: var(--s3); }
.test .tr .gap { position: absolute; top: 8px; height: 2px; background: var(--ink3); opacity: .55; }
.test .tr i { position: absolute; top: 4.5px; transform: translateX(-50%); }
.test .tr .c { background: var(--s1); }
.test .nums { grid-column: 1; display: flex; gap: 14px; font: 500 12px var(--mono); color: var(--ink2); margin-top: -4px; }
.test .nums b { color: var(--ink); font-weight: 500; }
.test .play { grid-column: 2; grid-row: 1 / span 3; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; transition: background .2s var(--ease); }
.test:hover .play { background: var(--ink); }
.test:hover .play svg { fill: var(--bg); }
.test .play svg { width: 10px; height: 10px; fill: var(--ink); margin-left: 2px; }
.more { margin-top: 14px; }
.mtools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.test .nums { font: 400 13px var(--sans); color: var(--ink2); flex-wrap: wrap; gap: 4px 16px; }
.test .nums b { font-weight: 600; font-variant-numeric: tabular-nums; }
.test .nums .vr { color: var(--ink); }
.test .tr .gap { background: repeating-linear-gradient(90deg, var(--ink3) 0 3px, transparent 3px 6px); opacity: .9; }
.test .tr::after { content: '0%'; position: absolute; left: 0; top: -2px; font: 400 9px var(--mono); color: var(--ink3); display: none; }

/* ---------------------------------------------------------------- L2 */
.l2top { display: flex; align-items: center; gap: 10px; }
.l2logo { height: 20px; width: 20px; color: var(--ink); }
.l2live { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.l2live div { background: var(--s2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.l2live b { display: block; font: 400 26px/1 var(--serif); letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.l2live span { display: block; margin-top: 4px; font-size: 11px; line-height: 1.3; color: var(--ink3); }
.l2uses { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 760px; }
.l2uses li { border-top: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); padding-top: 10px; }
.l2uses b { display: block; font-weight: 600; font-size: 14px; }
.l2uses span { display: block; font-size: 13px; opacity: 0.7; margin-top: 2px; }
@media (max-width: 640px) { .l2uses { grid-template-columns: 1fr; } .l2live b { font-size: 22px; } }

/* ---------------------------------------------------------------- map: state strip + zoom */
.ufstrip { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 0 8px; padding: 2px 0; -webkit-mask: linear-gradient(90deg, #000 92%, transparent); mask: linear-gradient(90deg, #000 92%, transparent); }
.ufstrip::-webkit-scrollbar { display: none; }
.ufstrip button { flex: 0 0 auto; min-width: 40px; height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink2); font: 600 12px var(--sans); cursor: pointer; position: relative; transition: background .2s var(--ease), color .2s var(--ease); }
.ufstrip button::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 14px; height: 2px; border-radius: 1px; transform: translateX(-50%); background: var(--uc, transparent); }
.ufstrip button:hover { color: var(--ink); border-color: var(--line2); }
.ufstrip button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.zoomctl { position: absolute; right: 10px; bottom: 34px; z-index: 3; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--s1) 88%, transparent); backdrop-filter: blur(8px); }
.zoomctl button { width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink); font: 400 20px/1 var(--sans); cursor: pointer; display: grid; place-items: center; }
.zoomctl button + button { border-top: 1px solid var(--line); }
.zoomctl button:hover { background: var(--s2); }
.zoomctl svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#map.grab { cursor: grab; } #map.grabbing { cursor: grabbing; }
