:root {
  --paper: #f4ecdc;
  --paper-2: #ebe0c9;
  --ink: #1d1a16;
  --ink-soft: #5b5247;
  --rule: #cdbf9f;
  --red: #b8321f;
  --board: #16191d;
  --board-2: #22272d;
  --amber: #ffb547;
  --green: #2f7d4a;
  --display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px);
  background-size: 4px 4px;
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 18px 48px; }

/* ---------- masthead ---------- */
.mast {
  border-bottom: 3px double var(--ink);
  padding: 22px 0 10px;
  text-align: center;
  position: relative;
}
.mast .logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(42px, 11vw, 64px);
  letter-spacing: .04em;
  line-height: .9;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
}
.mast .logo span { color: var(--red); }
.mast .tag {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 15px;
  margin-top: 6px;
}
.dateline {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--display);
  text-transform: uppercase; letter-spacing: .08em; font-size: 13px;
  border-bottom: 1px solid var(--ink);
  padding: 7px 0; margin-bottom: 22px;
}
.dateline nav a { text-decoration: none; margin-left: 14px; }
.dateline nav a:hover, .dateline nav a.on { color: var(--red); }

/* ---------- progress ---------- */
.pips { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.pip {
  width: 38px; height: 8px; background: var(--paper-2); border: 1px solid var(--rule);
}
.pip.done { background: var(--ink); border-color: var(--ink); }
.pip.now { background: var(--red); border-color: var(--red); }

/* ---------- card ---------- */
.card {
  background: #fbf6ea;
  border: 1px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 22px 22px 24px;
}
.kicker {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-size: 13px;
  border-bottom: 1px solid var(--rule); padding-bottom: 8px; margin-bottom: 14px;
}
.kicker .sport { color: var(--red); font-weight: 600; }
.headline {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(23px, 5.6vw, 31px);
  line-height: 1.18;
  margin: 0 0 20px;
  text-wrap: balance;
}
.ask {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .12em;
  text-align: center; font-size: 14px; color: var(--ink-soft); margin-bottom: 10px;
}

/* ---------- scoreboard year ---------- */
.board {
  background: var(--board);
  border: 4px solid var(--board-2);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 8px;
  margin: 0 auto 16px; max-width: 320px;
}
.digit {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(48px, 13vw, 68px);
  line-height: 1;
  color: var(--amber);
  text-shadow: 0 0 12px rgba(255,181,71,.45);
  background: var(--board-2);
  border-radius: 3px;
  width: 1.05ch; text-align: center;
  padding: 6px 4px 8px;
  font-variant-numeric: tabular-nums;
}
.board.answer .digit { color: #7dff9a; text-shadow: 0 0 12px rgba(125,255,154,.4); }

.slider-row { display: flex; align-items: center; gap: 10px; }
.nudge {
  font-family: var(--display); font-size: 22px; font-weight: 600;
  width: 44px; height: 44px; flex: none;
  background: var(--paper); border: 1px solid var(--ink); color: var(--ink);
  cursor: pointer; border-radius: 50%;
  touch-action: manipulation;
}
.nudge:active { background: var(--paper-2); }

input[type=range] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 44px; background: transparent; cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 6px; background: var(--ink); border-radius: 3px;
}
input[type=range]::-moz-range-track { height: 6px; background: var(--ink); border-radius: 3px; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; margin-top: -12px;
  border-radius: 50%; background: var(--red); border: 3px solid #fbf6ea;
  box-shadow: 0 0 0 1px var(--ink);
}
input[type=range]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--red);
  border: 3px solid #fbf6ea; box-shadow: 0 0 0 1px var(--ink);
}
.ticks {
  position: relative; height: 16px;
  margin: -4px 54px 0;
  font-family: var(--display); font-size: 12px; color: var(--ink-soft);
}
.ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
input[type=range]:focus { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--amber), 0 0 0 4px var(--ink); }

.btn {
  display: block; width: 100%;
  margin-top: 18px;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .1em;
  font-size: 19px; font-weight: 600;
  background: var(--ink); color: var(--paper);
  border: none; padding: 14px; cursor: pointer;
  transition: transform .06s;
}
.btn:hover { background: var(--red); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--paper-2); }

/* ---------- reveal ---------- */
.reveal { text-align: center; }
.reveal .verdict {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .06em;
  font-size: 26px; font-weight: 700; margin: 4px 0 2px;
}
.reveal .verdict.exact { color: var(--green); }
.reveal .detail { color: var(--ink-soft); font-size: 15px; }
.points {
  font-family: var(--display); font-weight: 700; font-size: 44px; color: var(--red);
  margin: 6px 0 0;
}
.running {
  text-align: center; font-family: var(--display); text-transform: uppercase;
  letter-spacing: .1em; font-size: 14px; margin-top: 16px; color: var(--ink-soft);
}
.running b { color: var(--ink); font-size: 18px; }

/* ---------- summary ---------- */
.final-score {
  text-align: center; font-family: var(--display); font-weight: 700;
  font-size: clamp(56px, 16vw, 84px); line-height: 1; margin: 4px 0;
}
.final-score small { font-size: .32em; color: var(--ink-soft); font-weight: 500; }
.box { width: 100%; border-collapse: collapse; margin: 18px 0 6px; font-size: 14px; }
.box th {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .08em;
  font-weight: 500; font-size: 12px; text-align: left; border-bottom: 2px solid var(--ink); padding: 6px 4px;
}
.box td { border-bottom: 1px dotted var(--rule); padding: 8px 4px; vertical-align: top; }
.box td.n { font-family: var(--display); font-size: 16px; text-align: right; white-space: nowrap; }
.box th.n { text-align: right; }
.box .clue { font-family: var(--serif); line-height: 1.3; }

.namebox { display: flex; gap: 8px; margin-top: 18px; }
.namebox input {
  flex: 1; font: inherit; font-size: 17px; padding: 12px;
  border: 1px solid var(--ink); background: #fff; min-width: 0;
}
.namebox .btn { width: auto; margin: 0; padding: 12px 18px; font-size: 16px; }
.msg { font-size: 14px; margin-top: 8px; color: var(--ink-soft); min-height: 1em; }
.msg.err { color: var(--red); }
.rankline {
  text-align: center; font-family: var(--display); text-transform: uppercase;
  letter-spacing: .08em; font-size: 18px; margin-top: 14px;
}
.next {
  text-align: center; margin-top: 22px; font-family: var(--display);
  text-transform: uppercase; letter-spacing: .1em; font-size: 13px; color: var(--ink-soft);
}
.next b { display: block; font-size: 30px; color: var(--ink); letter-spacing: .04em; }
.two { display: flex; gap: 10px; }
.two .btn { flex: 1; }

/* ---------- leaderboard ---------- */
.lb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.lb-head h1 { font-family: var(--display); text-transform: uppercase; margin: 0; font-size: 28px; letter-spacing: .04em; }
.lb-nav button {
  font-family: var(--display); font-size: 18px; width: 40px; height: 36px;
  background: var(--paper); border: 1px solid var(--ink); cursor: pointer;
}
.lb-nav button:disabled { opacity: .3; cursor: default; }
.lb-sub { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--ink-soft); }
.lb td.rank { font-family: var(--display); font-size: 18px; width: 44px; }
.lb td.name { font-weight: 600; font-size: 16px; }
.lb tr.me td { background: #f9e3b5; }
.lb tr:nth-child(1) td.rank { color: var(--red); }
.empty { text-align: center; padding: 28px 0; color: var(--ink-soft); font-family: var(--serif); font-style: italic; }

/* ---------- how to play ---------- */
.how {
  margin-top: 28px; border-top: 1px solid var(--ink); padding-top: 10px; font-size: 14px; color: var(--ink-soft);
}
.how summary { font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; cursor: pointer; color: var(--ink); }
.how ul { padding-left: 18px; line-height: 1.6; }

.loading { text-align: center; padding: 60px 0; font-family: var(--display); text-transform: uppercase; letter-spacing: .15em; color: var(--ink-soft); }

@keyframes flip { from { transform: rotateX(90deg); opacity: .2; } to { transform: none; opacity: 1; } }
.board.answer .digit { animation: flip .35s ease-out both; }
.board.answer .digit:nth-child(2) { animation-delay: .08s; }
.board.answer .digit:nth-child(3) { animation-delay: .16s; }
.board.answer .digit:nth-child(4) { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) { .board.answer .digit { animation: none; } }

/* fixes */
.lb-nav { display: flex; gap: 6px; flex: none; }
.lb-head { gap: 12px; }
.two .btn { display: flex; align-items: center; justify-content: center; font-size: 16px; padding: 12px 8px; white-space: nowrap; }
.mast .kick-sub { font-family: var(--display); text-transform: uppercase; letter-spacing: .45em; font-size: 13px; margin-top: 4px; padding-left: .45em; }
