:root { color-scheme: dark; --bg: #000; --panel: #1c1c1e; --text: #f2f2f2; --dim: #9c9ca3; --accent: #ff4a1c; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
header .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; padding-bottom: 20px; gap: 16px; }
header .brand { font-weight: 800; color: var(--text); text-decoration: none; font-size: 18px; }
nav a { color: var(--dim); text-decoration: none; margin-left: 16px; padding: 8px 0; display: inline-block; }
nav a:hover { color: var(--text); }
main { padding-bottom: 48px; }
h1 { font-size: clamp(34px, 8vw, 56px); line-height: 1.05; margin: 40px 0 16px; font-weight: 800; }
h2 { font-size: 22px; margin: 40px 0 8px; font-weight: 700; }
p, li { max-width: 62ch; }
.lead { font-size: clamp(19px, 3.4vw, 22px); color: var(--dim); max-width: 36ch; }
.dim { color: var(--dim); }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 4px; }
.steps { list-style: none; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; padding-left: 40px; position: relative; margin: 0 0 16px; }
.steps li::before { content: counter(s); position: absolute; left: 0; color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.stores button { font: inherit; font-weight: 700; color: var(--dim); background: var(--panel); border: 0; border-radius: 8px; padding: 14px 20px; min-height: 52px; cursor: not-allowed; }
.stores small { display: block; font-weight: 400; font-size: 13px; }
details { background: var(--panel); border-radius: 8px; padding: 14px 16px; margin: 0 0 10px; }
summary { cursor: pointer; font-weight: 700; }
summary:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
details p { margin: 10px 0 0; }
mark { background: none; color: var(--accent); font-weight: 700; }
footer { color: var(--dim); font-size: 15px; padding: 24px 0 48px; }
footer a { color: var(--dim); margin-right: 20px; display: inline-block; padding: 8px 0; }
footer a:hover { color: var(--text); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Landing page */
.wide { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.hero { display: grid; gap: 40px; padding-top: 24px; padding-bottom: 24px; align-items: center; }
.hero h1 { margin-top: 24px; }
.flow { padding-top: 56px; padding-bottom: 8px; }
.flow h2 { font-size: clamp(24px, 4vw, 30px); margin: 0 0 20px; }
.cols { display: grid; gap: 28px; }
.cols h3 { font-size: 17px; margin: 0 0 6px; }
.cols p { margin: 0; color: var(--dim); }
.note { margin-top: 32px; font-size: 15px; }
.match { background: var(--panel); border-radius: 8px; padding: 18px; }
.scores { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.scores .right { text-align: right; }
.who { display: block; color: var(--dim); font-size: 13px; font-weight: 600; }
.who.you { color: var(--accent); }
.bal { display: block; font-size: clamp(20px, 3.4vw, 28px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.bal.you { color: var(--accent); }
.lead-bar { height: 6px; background: #2e2e31; border-radius: 3px; overflow: hidden; display: flex; margin-bottom: 16px; }
.lead-bar i { display: block; width: 50%; background: var(--accent); }
.match svg { display: block; width: 100%; height: auto; aspect-ratio: 12 / 5; }
.candles path { fill: none; stroke-width: 1.4; }
.candles .u { stroke: var(--text); fill: var(--text); }
.candles .d { stroke: var(--dim); fill: var(--dim); }
.candles path.u, .candles path.d { fill: none; }
.entry { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 5; fill: none; }
.clock { display: flex; justify-content: space-between; margin-top: 12px; color: var(--dim); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.clock span:first-child { color: var(--accent); }
@media (min-width: 860px) {
  .hero { grid-template-columns: 5fr 7fr; gap: 56px; }
  .cols { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}
.home .wrap { max-width: 1040px; }

.delta { color: var(--dim); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 6px; }
.mk { fill: var(--accent); }
.clock span:first-child.flat, #pos.flat { color: var(--dim); }

/* Match screen copy: tokens from lib/ui.dart (C.bg, C.panel, C.line, C.text, C.dim, C.accent) */
.app { background: #0c0c0d; border-radius: 8px; padding: 8px 14px 14px; max-width: 420px; width: 100%; margin: 0 auto; }
.hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; padding-top: 6px; }
.side .name { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--dim); }
.side .name.you { color: var(--accent); }
.side .num { display: block; margin-top: 2px; font-size: 19px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.side .pct { display: block; font-size: 12px; font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; }
.side.them { text-align: right; }
.clk { height: 44px; display: grid; place-items: center; padding: 0 8px; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.clk.end { font-size: 40px; font-weight: 900; }
.lean { position: relative; height: 4px; background: #2e2e31; margin: 8px 0; }
.lean i { display: block; height: 100%; width: 50%; background: var(--accent); }
.lean u { position: absolute; left: 50%; top: 0; width: 2px; height: 4px; margin-left: -1px; background: #0c0c0d; }
#chart { display: block; width: 100%; height: 250px; }
.slot { height: 62px; padding: 4px 0; }
.card { display: flex; align-items: center; justify-content: space-between; height: 54px; background: var(--panel); border-radius: 8px; transition: transform 90ms; }
.card .info { padding: 0 8px 0 12px; display: flex; flex-direction: column; gap: 3px; }
.card .info span { font-size: 12px; font-weight: 600; color: var(--dim); line-height: 1.2; }
.card .info b { font-size: 15px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.card .close { width: 60px; text-align: center; font-size: 13px; font-weight: 700; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.btn { display: grid; place-items: center; height: 58px; border-radius: 8px; background: var(--text); color: #0c0c0d; font-size: 18px; font-weight: 700; transition: transform 90ms; }
.btn.down, .card.down { transform: scale(.94); }
