:root {
  --bg: #f6f7fb; --card: #fff; --line: #e6e8ef; --text: #0f172a; --muted: #5b6475;
  --up: #0f9d58; --down: #d93025; --accent: #3557ff; --hot: #ff7a00; --soft: #eef1ff;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1220; --card: #121a2b; --line: #1f2a40; --text: #e8edf6; --muted: #93a0b5; --soft: #1a2440;
          --up: #34d399; --down: #f87171; --accent: #7c93ff; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 760px; margin: 0 auto; padding: 8px 14px 24px; }
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
       padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; font-size: 18px; color: var(--text); }
.logo { color: var(--up); }
.top nav { display: flex; gap: 14px; font-size: 14px; }
.top nav a { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin: 12px 0; }
.card.compact { padding: 14px 18px; }
.card.compact h2 { font-size: 17px; margin: 2px 0; text-transform: none; letter-spacing: 0; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
h1 { margin: 4px 0; font-size: 26px; line-height: 1.2; }
h2 { margin: 0 0 8px; font-size: 18px; }
.prose h2 { margin-top: 22px; }
.prose h3 { margin: 16px 0 4px; font-size: 16px; }
.sym { font-size: 44px; font-weight: 900; letter-spacing: .01em; }
.name { font-size: 17px; font-weight: 500; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.up { color: var(--up); }
.down { color: var(--down); }
.warn { color: var(--hot); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--accent); }
.pill.hot { background: color-mix(in srgb, var(--hot) 15%, transparent); color: var(--hot); }
.probs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 14px 0; }
.probs.four { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.probs div { background: var(--soft); border-radius: 14px; padding: 10px 12px; }
.probs span { display: block; font-size: 12px; color: var(--muted); }
.probs strong { font-size: 24px; }
.summary { margin: 10px 0; }
.more { display: inline-block; margin-top: 6px; font-weight: 600; }
.result { font-size: 17px; margin: 10px 0; }
.result.pending { color: var(--muted); }
.livebox { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
           border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.livebox > div { display: flex; flex-direction: column; }
.livebox strong { font-size: 30px; font-weight: 800; }
.spark { width: 100%; max-width: 300px; height: 60px; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.spark.up path { stroke: var(--up); }
.spark.down path { stroke: var(--down); }
.spark .zero { stroke: var(--line); stroke-dasharray: 4 4; }

.timeline { margin: 12px 0 4px; }
.timeline ol { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0; padding: 0; }
.timeline li { position: relative; padding-top: 12px; font-size: 12px; text-align: center; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 3px; background: var(--line); }
.timeline li.done::before { background: var(--accent); }
.timeline li.now::before { background: var(--hot); animation: pulse 1.6s ease-in-out infinite; }
.timeline li.now { color: var(--text); }
.timeline li b { display: block; font-size: 12px; }
.timeline li span { font-size: 11px; }
.next-up { text-align: center; font-size: 14px; margin: 8px 0 0; }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .timeline li.now::before, .dot { animation: none; } }

.race { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--down); margin-right: 4px; animation: pulse 1.6s infinite; }
table.board { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.board th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 4px; }
.board td { padding: 8px 4px; border-top: 1px solid var(--line); }
.board th:first-child { width: 48%; }

.game { border: 2px solid var(--accent); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 6px; }
.choices button { font: inherit; font-size: 20px; font-weight: 800; padding: 14px; border-radius: 14px; cursor: pointer;
                  border: 2px solid var(--line); background: var(--soft); color: var(--text); }
.choices button[data-call="up"].on { background: var(--up); border-color: var(--up); color: #fff; }
.choices button[data-call="down"].on { background: var(--down); border-color: var(--down); color: #fff; }
.choices button:disabled { cursor: default; opacity: .55; }
.choices button.on:disabled { opacity: 1; }
.scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 10px 0; }
.scores div { background: var(--soft); border-radius: 12px; padding: 8px 10px; }
.scores span { display: block; font-size: 11px; color: var(--muted); }
.scores strong { font-size: 18px; }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; padding: 0; }
.badges li { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); }
.badges li.got { border-style: solid; border-color: var(--hot); color: var(--text); background: color-mix(in srgb, var(--hot) 12%, transparent); }
.share { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }

.drivers { list-style: none; margin: 0; padding: 0; }
.drivers li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.drivers li:last-child { border-bottom: 0; }
.drivers .meta { display: block; font-size: 12px; color: var(--muted); }
.meter { display: block; height: 5px; border-radius: 3px; background: var(--line); margin-top: 4px; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

.formguide { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.form { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.form.w { background: var(--up); }
.form.l { background: var(--down); }
.form:hover { text-decoration: none; opacity: .85; }

.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; color: var(--muted); }

.ad { margin: 12px 0; min-height: 120px; text-align: center; }
.ad-label { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.ad-preview { display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 13px; }

.update { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 10; }
.update button { font: inherit; font-weight: 700; padding: 12px 18px; border-radius: 999px; border: 0; cursor: pointer;
                 background: var(--accent); color: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.notice { background: var(--soft); border-radius: 14px; padding: 10px 14px; margin: 12px 0 0; font-size: 14px; }
.crumbs { font-size: 13px; color: var(--muted); margin-top: 12px; }
.signup-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.signup-form input { flex: 1 1 220px; font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
                     background: var(--bg); color: var(--text); }
.signup-form button { font: inherit; font-weight: 700; padding: 12px 18px; border-radius: 12px; border: 0; cursor: pointer;
                      background: var(--accent); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pager { display: flex; justify-content: space-between; margin: 12px 4px; font-weight: 600; }
footer { max-width: 760px; margin: 0 auto; padding: 8px 18px 40px; font-size: 13px; color: var(--muted); }
@media (max-width: 480px) {
  .sym { font-size: 38px; } h1 { font-size: 22px; } .top nav { gap: 10px; font-size: 13px; }
  .timeline li span { display: none; } .race .board th:nth-child(4), .race .board td:nth-child(4) { display: none; }
}
