/* Paper palette from the original prototype. Light by default; the header button switches to dark. */
:root {
  color-scheme: light;
  --paper: #e9e6de;
  --card: #f5f3ee;
  --ink: #1c1b18;
  --muted: #66625a;
  --rule: #d2cdc0;
  --red: #b3122a;
  --red-wash: rgba(179, 18, 42, 0.09);
  --good: #2e6b3c;
  --good-wash: rgba(46, 107, 60, 0.12);
  --bulb: #d9a21b;
  --shadow: 0 1px 2px rgba(28, 27, 24, 0.06);
  --sheet-shadow: 0 -10px 40px rgba(28, 27, 24, 0.18);
  --f-ui: "Schibsted Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-num: "Azeret Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 18px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121714; --card: #1a201c; --ink: #ebe7dc; --muted: #a2a89d; --rule: #2f3831;
  --red: #ff6f7b; --red-wash: rgba(255, 111, 123, 0.13); --good: #86c993; --good-wash: rgba(134, 201, 147, 0.14);
  --bulb: #f0c04a;
  --shadow: none; --sheet-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 600px; margin: 0 auto; padding: 0 16px 48px; }
.mono { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0 18px; }
.hleft { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand {
  background: none; border: 0; padding: 0;
  font-weight: 800; font-size: 26px; letter-spacing: -0.03em; line-height: 1;
  display: inline-flex; align-items: center; gap: 10px;
}
.suit { width: 12px; height: 12px; background: var(--red); transform: rotate(45deg); display: inline-block; border-radius: 1px; }
.backbtn {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border: 1px solid var(--rule); background: var(--card); border-radius: 999px;
  padding: 7px 14px 7px 11px; font-size: 15px; font-weight: 600;
}
.backbtn svg { width: 16px; height: 16px; }
.backbtn:hover { border-color: var(--muted); }
.hright { display: flex; align-items: center; gap: 10px; flex: none; }
.dayno { font-family: var(--f-num); font-size: 14px; color: var(--muted); white-space: nowrap; }
.themebtn {
  width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--rule); background: var(--card); border-radius: 50%; color: var(--ink);
}
.themebtn:hover { border-color: var(--muted); }
.themebtn svg { width: 18px; height: 18px; }
.themebtn .i-sun, :root[data-theme="dark"] .themebtn .i-moon { display: none; }
:root[data-theme="dark"] .themebtn .i-sun { display: block; }
@media (max-width: 480px) {
  .brand { font-size: 22px; gap: 8px; }
  .dayno .dn-date { display: none; }
}

/* Shared */
.lab { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.panel {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 24px 20px; display: flex; flex-direction: column; gap: 26px;
}
.primary, .secondary {
  width: 100%; border-radius: 14px; padding: 16px 20px;
  font-weight: 700; font-size: 17px;
  display: flex; justify-content: center; align-items: center; gap: 10px;
  transition: opacity .15s ease, transform .1s ease;
}
.primary { border: 0; background: var(--ink); color: var(--paper); }
.secondary { border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.primary svg, .secondary svg { width: 19px; height: 19px; flex: none; }
.primary:active, .secondary:active { transform: translateY(1px); }
.primary:disabled { opacity: 0.3; cursor: default; }
.textbtn { background: none; border: 0; padding: 4px 0; color: var(--muted); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.textbtn:hover { color: var(--ink); }
.blk { display: flex; flex-direction: column; gap: 16px; }
.blk h2 { margin: 0; font-size: 22px; letter-spacing: -0.015em; }
.loading { padding: 96px 0; text-align: center; color: var(--muted); }
.notice { gap: 14px; }
.notice h2 { margin: 0; font-size: 22px; letter-spacing: -0.015em; }
.notice p { margin: 0; color: var(--muted); }
.noscript { text-align: center; padding: 40px 16px; }

/* Home */
#home { display: flex; flex-direction: column; gap: 56px; padding-top: 12px; }
.home-top { display: flex; flex-direction: column; gap: 56px; }
.hero { display: flex; flex-direction: column; gap: 18px; }
.eyebrow { font-size: 15px; font-weight: 500; color: var(--muted); }
.hero h1 { margin: 0; font-size: clamp(42px, 13vw, 60px); line-height: 1; letter-spacing: -0.04em; font-weight: 800; }
.lede { margin: 0; font-size: 19px; line-height: 1.5; max-width: 34ch; }
.hero .primary, .hero .notice { margin-top: 10px; }
.status { font-size: 15px; color: var(--muted); text-align: center; }
.status b { color: var(--ink); }

/* Decoration under the play button, wide screens only */
.hero-art { display: none; }
.hero-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero-art .a-line { fill: none; stroke: var(--rule); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; }
.hero-art .a-card { fill: var(--card); stroke: var(--ink); stroke-width: 2; }
.hero-art .a-ink { fill: var(--ink); }
.hero-art .a-pip { fill: var(--paper); }
.hero-art .a-inkdot { fill: var(--ink); }
.hero-art .a-red { fill: var(--red); }
.hero-art .a-txt { fill: var(--ink); font: 700 20px var(--f-ui); }
.hero-art .a-coin { fill: var(--bulb); stroke: var(--ink); stroke-width: 2; }
.hero-art .a-ring { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: .45; }
.hero-art .a-cointxt { fill: var(--ink); font: 700 28px var(--f-ui); }
.hero-art .a-ticket { fill: var(--red-wash); stroke: var(--red); stroke-width: 2; }
.hero-art .a-perf { stroke: var(--red); stroke-width: 2; stroke-dasharray: 3 4; }
.hero-art .a-tk { fill: var(--red); font: 600 18px var(--f-num); }
.hero-art .fl { animation: floaty 7s ease-in-out infinite; }
.hero-art .f2 { animation-delay: -1.4s; }
.hero-art .f3 { animation-delay: -2.8s; }
.hero-art .f4 { animation-delay: -4.2s; }
.hero-art .f5 { animation-delay: -5.6s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .hero-art .fl { animation: none; } }

.steps { list-style: none; margin: 0; padding: 0; }
.steps > li { display: grid; grid-template-columns: 34px 1fr; gap: 0 16px; padding: 22px 0; border-top: 1px solid var(--rule); }
.steps > li:last-child { border-bottom: 1px solid var(--rule); }
.steps .n {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ink);
  display: grid; place-items: center; font-family: var(--f-num); font-size: 14px; font-weight: 600;
}
.steps h3 { margin: 4px 0 6px; font-size: 19px; letter-spacing: -0.01em; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }
.examples { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.examples li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.examples svg { width: 22px; height: 22px; flex: none; }
.examples .mono { min-width: 8.5ch; font-size: 15px; }
.examples span:last-child { color: var(--muted); }
.story { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.story b { color: var(--ink); font-weight: 600; }

.past { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.past li { border-bottom: 1px solid var(--rule); }
.past button {
  width: 100%; background: none; border: 0; padding: 16px 2px; min-height: 56px;
  display: grid; grid-template-columns: 3.2ch 1fr auto; gap: 14px; align-items: baseline; text-align: left;
  font-size: 16px;
}
.past .pn { font-family: var(--f-num); font-size: 14px; color: var(--muted); }
.past .pd { font-weight: 500; }
.past .pd small { color: var(--muted); font-weight: 400; font-size: 14px; }
.past .ps { font-family: var(--f-num); font-size: 14px; color: var(--muted); }
.past .ps.played { color: var(--ink); font-weight: 600; }
.past button:hover .ps { color: var(--red); }
.past li.more { border-bottom: 0; }
.past li.more button { display: block; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 15px; min-height: 0; }

/* Play: one column on phones, two on wide screens */
#play { display: flex; flex-direction: column; gap: 16px; }
.col-q, .col-a { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pseg { display: flex; flex-direction: column; gap: 7px; }
.pbar { height: 5px; border-radius: 3px; background: var(--rule); }
.pseg.cur .pbar { background: var(--red); }
.pseg.done .pbar { background: var(--ink); }
.plab { font-family: var(--f-num); font-size: 13px; color: var(--muted); }
.pseg.cur .plab, .pseg.done .plab { color: var(--ink); }

.qcard { gap: 16px; padding: 26px 22px 28px; }
.qtop { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.kind { font-size: 13px; font-weight: 600; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 11px; color: var(--muted); white-space: nowrap; }
.prompt { margin: 0; font-size: clamp(22px, 6.2vw, 27px); line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; }

/* Clue: a lightbulb button under the question; the clue shows when pressed */
.clue { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cluebtn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--rule); background: var(--paper); border-radius: 999px;
  padding: 7px 16px 7px 11px; font-size: 15px; font-weight: 600;
}
.cluebtn svg { width: 20px; height: 20px; }
.cluebtn:hover { border-color: var(--muted); }
.cluebtn[aria-expanded="true"] { border-color: var(--bulb); }
.cluebtn[aria-expanded="true"] .glow { fill: var(--bulb); stroke: var(--bulb); }
.cluetext {
  margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--paper);
  border-left: 3px solid var(--bulb); font-size: 16px; line-height: 1.5;
}

/* Guess: two linked fields */
.readout { display: flex; flex-direction: column; gap: 12px; }
.ro-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.calcbtn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--rule); background: var(--paper); border-radius: 999px;
  padding: 6px 13px 6px 10px; font-size: 14px; font-weight: 600;
}
.calcbtn svg { width: 17px; height: 17px; }
.calcbtn:hover, .calcbtn[aria-expanded="true"] { border-color: var(--ink); }
.dual { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: end; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; cursor: text; }
.fl { font-size: 14px; font-weight: 600; color: var(--muted); }
.fbox {
  display: flex; align-items: baseline; gap: 4px; height: 64px; padding: 0 14px;
  border: 1.5px solid var(--rule); border-radius: 14px; background: var(--paper);
}
.fbox:focus-within { border-color: var(--ink); }
.fbox input {
  flex: 1; min-width: 0; align-self: center; border: 0; background: transparent; color: var(--ink);
  font-family: var(--f-num); font-size: 30px; font-weight: 500; font-variant-numeric: tabular-nums;
  padding: 0; outline: none; letter-spacing: -0.02em;
}
.fbox input::placeholder { color: var(--rule); }
.fbox .suf { align-self: center; font-family: var(--f-num); font-size: 20px; color: var(--muted); }
.eq { font-family: var(--f-num); font-size: 22px; color: var(--muted); padding-bottom: 16px; }
.ro-cmp { font-size: 16px; color: var(--muted); min-height: 3em; line-height: 1.5; }
.err { font-size: 15px; color: var(--red); }
.err:empty { display: none; }

/* Slider: more room for everyday odds, less for the extreme end */
.slider { display: flex; flex-direction: column; }
.rangewrap { position: relative; }
.rtrack { position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--rule); }
.rtick { position: absolute; top: 50%; width: 2px; height: 14px; margin: -7px 0 0 -1px; border-radius: 1px; background: var(--muted); opacity: .5; }
.range { -webkit-appearance: none; appearance: none; position: relative; z-index: 1; display: block; width: 100%; height: 48px; margin: 0; background: transparent; touch-action: pan-y; }
.range::-webkit-slider-runnable-track { height: 48px; background: transparent; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; margin-top: 9px; border-radius: 50%;
  background: var(--ink); border: 4px solid var(--card); box-shadow: 0 0 0 1.5px var(--ink), 0 2px 6px rgba(0,0,0,.18);
}
.range::-moz-range-track { height: 48px; background: transparent; }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); border: 4px solid var(--card); box-shadow: 0 0 0 1.5px var(--ink); }
.range.unset::-webkit-slider-thumb { background: var(--card); box-shadow: 0 0 0 1.5px var(--muted); }
.range.unset::-moz-range-thumb { background: var(--card); box-shadow: 0 0 0 1.5px var(--muted); }
.range:focus-visible { outline-offset: 2px; }
.marks { position: relative; height: 46px; }
.mark {
  position: absolute; top: 0; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; padding: 2px 0; min-width: 24px; color: var(--muted);
}
.mark svg { width: 20px; height: 20px; }
.mark span { font-family: var(--f-num); font-size: 12px; white-space: nowrap; line-height: 1.2; }
.mark:hover, .mark[aria-pressed="true"] { color: var(--ink); }
.mark[aria-pressed="true"] span { font-weight: 600; }
.ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Sticky action */
.actions {
  position: sticky; bottom: 0; z-index: 5;
  padding: 18px 0 calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--paper) 30%);
}

/* Reveal */
.verdict { display: flex; flex-direction: column; gap: 8px; }
.mult { font-size: clamp(48px, 15vw, 64px); font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.mult small { font-family: var(--f-ui); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; color: var(--muted); margin-left: 4px; }
.vrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 4px; }
.pill { font-size: 14px; font-weight: 700; border-radius: 999px; padding: 4px 12px; border: 1.5px solid transparent; white-space: nowrap; }

/* How close a guess was, from green (great) through neutral to red (far off). Matches the tiers. */
.tone-great { background: var(--good-wash); color: var(--good); }
.tone-good { border-color: var(--good); color: var(--good); }
.tone-ok { background: var(--paper); border-color: var(--rule); color: var(--ink); }
.tone-bad { background: var(--red-wash); color: var(--red); }
.tone-worse { background: var(--red); color: var(--card); }
.tname.tone-great, .tname.tone-good, .qm.tone-great, .qm.tone-good { background: none; border: 0; color: var(--good); }
.tname.tone-ok, .qm.tone-ok { background: none; border: 0; color: var(--ink); }
.tname.tone-bad, .tname.tone-worse, .qm.tone-bad, .qm.tone-worse { background: none; border: 0; color: var(--red); }
.vlean { font-size: 16px; color: var(--muted); }
.cmp { margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.cmp > div { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.cmp dt { font-size: 15px; color: var(--muted); }
.cmp dd { margin: 0; text-align: right; }
.cmp dd .mono { font-size: 20px; font-weight: 500; }
.cmp dd small { display: block; font-family: var(--f-num); font-size: 13px; color: var(--muted); }
.cmp .ans dd .mono { color: var(--red); }

.strip { position: relative; height: 104px; margin: 0 10px; }
.strip .track { position: absolute; left: 0; right: 0; top: 45px; height: 2px; background: var(--rule); }
.strip .tick { position: absolute; top: 40px; width: 1px; height: 12px; background: var(--rule); }
.strip .tl { position: absolute; top: 84px; font-family: var(--f-num); font-size: 12px; color: var(--muted); white-space: nowrap; }
.strip .pin { position: absolute; }
.strip .pin.you { top: 39px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--ink); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--ink); }
.strip .pin.ans { top: 39.5px; width: 13px; height: 13px; margin-left: -6.5px; background: var(--red); transform: rotate(45deg); border-radius: 1px; }
.strip .pl { position: absolute; font-family: var(--f-num); font-size: 13px; white-space: nowrap; }
.strip .pl.you { top: 12px; }
.strip .pl.ans { top: 60px; color: var(--red); }

.math { display: flex; flex-direction: column; gap: 12px; }
.math h3 { margin: 0; font-size: 19px; letter-spacing: -0.01em; }
#rMath { display: flex; flex-direction: column; gap: 12px; }
.math p { margin: 0; font-size: 16px; line-height: 1.6; }
.math b { font-family: var(--f-num); font-weight: 600; font-size: 15px; }
.src { font-size: 14px; color: var(--muted); }
.src a { color: var(--muted); text-underline-offset: 3px; }

/* Calculator sheet */
.calc {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 600px;
  background: var(--card); border: 1px solid var(--rule); border-bottom: 0; border-radius: 22px 22px 0 0;
  box-shadow: var(--sheet-shadow);
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px;
}
.calc-head { display: flex; justify-content: space-between; align-items: center; }
.calc-head b { font-size: 17px; }
.iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--rule); background: var(--paper); border-radius: 50%; padding: 0; }
.iconbtn svg { width: 18px; height: 18px; }
.calc-row { display: flex; gap: 8px; }
.calc-expr {
  flex: 1; min-width: 0; height: 52px; padding: 0 14px;
  font-family: var(--f-num); font-size: 20px; color: var(--ink);
  border: 1.5px solid var(--rule); border-radius: 12px; background: var(--paper); outline: none;
}
.calc-expr:focus { border-color: var(--ink); }
.calc-expr::placeholder { color: var(--muted); opacity: .6; font-size: 16px; }
.calc-row .iconbtn { width: 52px; height: 52px; border-radius: 12px; }
.calc-res { font-family: var(--f-num); font-size: 18px; min-height: 1.5em; color: var(--muted); overflow-wrap: anywhere; }
.calc-res.ok { color: var(--ink); }
.keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.key { height: 46px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); font-family: var(--f-num); font-size: 19px; padding: 0; }
.key.op { background: var(--card); font-weight: 600; }
.key:active { transform: translateY(1px); }
.calc-use { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; align-items: center; }
.calc-use .hint { font-size: 14px; color: var(--muted); }
.use { flex: 1 1 140px; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 15px; }

/* Done */
#done { display: flex; flex-direction: column; gap: 48px; }
.col-d { display: flex; flex-direction: column; gap: 48px; min-width: 0; }
.sc-top { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--muted); }
.sc-top b { color: var(--ink); }
.score { font-size: clamp(64px, 20vw, 88px); font-weight: 600; line-height: 1; letter-spacing: -0.04em; margin-top: 8px; }
.score-sub { font-size: 15px; color: var(--muted); margin-top: 10px; }
.tname { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.tnote { font-size: 17px; color: var(--muted); }
.lean { margin: 0; font-size: 16px; padding: 14px 16px; border-radius: 12px; background: var(--paper); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--rule); padding-top: 20px; }
.stats div { display: flex; flex-direction: column; gap: 2px; }
.stats b { font-family: var(--f-num); font-size: 22px; font-weight: 600; }
.stats span { font-size: 13px; color: var(--muted); }
.tiers summary { cursor: pointer; font-size: 15px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.tiers ol { list-style: none; margin: 12px 0 0; padding: 0; }
.tiers li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; font-size: 15px; }
.tiers li span:last-child { font-family: var(--f-num); font-size: 14px; color: var(--muted); }
.tiers li.me { background: var(--paper); font-weight: 700; }

.qlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.qlist li { padding: 18px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.qhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.qhead .qi { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.qhead .qm { font-family: var(--f-num); font-size: 16px; font-weight: 600; white-space: nowrap; }
.qlist .qt { margin: 0; font-size: 16px; line-height: 1.45; }
.qrow { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--f-num); font-size: 13px; color: var(--muted); }
.qrow .a { color: var(--red); }

.share { margin: 0; padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-links { display: flex; flex-wrap: wrap; gap: 8px; }
.share-links a {
  padding: 9px 15px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card);
  color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600;
}
.share-links a:hover { border-color: var(--ink); }
.nextup { align-items: center; text-align: center; gap: 6px; padding: 28px 16px; border: 1px dashed var(--rule); border-radius: var(--r); }
.countdown { font-size: 40px; font-weight: 500; letter-spacing: -0.02em; }
.nextup .sub { font-size: 14px; color: var(--muted); }
.nextup .primary { margin-top: 10px; }

footer { font-size: 13px; color: var(--muted); text-align: center; padding-top: 40px; }

@media (min-width: 520px) {
  .panel { padding: 28px 28px; }
  .qcard { padding: 30px 28px 32px; }
}

/* Wide screens: play button and "how it works" side by side; question on the left stays put, answer on the right */
@media (min-width: 900px) {
  .wrap.wide { max-width: 1160px; padding-left: 32px; padding-right: 32px; }
  #home { padding-top: 24px; gap: 64px; }
  .home-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
  .hero { padding-top: 8px; }
  .hero h1 { font-size: 76px; }
  .lede { font-size: 21px; }
  .past { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
  .past li.more { grid-column: 1 / -1; }
  #play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
  .col-q { position: sticky; top: 24px; }
  .prompt { font-size: 30px; }
  .qcard { padding: 36px 34px 40px; }
  .mark svg { width: 24px; height: 24px; }
  .mark span { font-size: 13px; }
  .marks { height: 52px; }
  #done { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
  /* Score and share stay in view while the right column scrolls (top is set in app.js if it's taller than the screen) */
  #doneLeft { position: sticky; top: 24px; }
  .hero-art { display: block; margin-top: 36px; }
  .calc { left: auto; right: 24px; bottom: 24px; width: 380px; border-radius: 22px; border-bottom: 1px solid var(--rule); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
