:root {
  --bg: #0b0e14;
  --surface: #151b26;
  --line: #2a3344;
  --text: #eef1f6;
  --muted: #a3adbd;
  --accent: #ff5a36;        /* the one accent: brake-glow orange */
  --accent-text: #0b0e14;
  --green: #3ddc84;
  --yellow: #ffd23f;
  --red: #ff5d5d;
  --black: #5b6475;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.note:empty { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Language menu: first line of the footer, full width, easy to tap. */
.langpick { flex-basis: 100%; display: flex; align-items: center; gap: 8px; color: var(--text); margin-bottom: 4px; }
.langpick select {
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 15px; min-height: 44px; padding: 0 10px;
}
.me { margin: 0; font-weight: 600; }
.me:empty { display: none; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Hidden above the page (not off to the side, which breaks right-to-left layouts) until focused. */
.skip { position: absolute; top: -100px; inset-inline-start: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; }
.skip:focus { top: 8px; }

.page { max-width: 520px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.flag {
  height: 12px; border-radius: 3px;
  background: repeating-conic-gradient(var(--text) 0 25%, var(--bg) 0 50%) 0 0 / 12px 12px;
  opacity: .9;
}
h1, h2 { margin: 0; line-height: 1.2; }
h1 { font-size: 28px; }
h2 { font-size: 20px; margin-top: 8px; }
.logo { font-size: 44px; letter-spacing: -1px; }
.logo span { color: var(--accent); }
.pitch { font-size: 20px; margin: 0; }
.date, .fine { color: var(--muted); margin: 0; }
.fine { font-size: 14px; }
.links { display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: center; }
.links a { min-height: 48px; display: inline-flex; align-items: center; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  min-height: 48px; padding: 0 20px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.big { min-height: 56px; font-size: 19px; width: 100%; }
.btn:disabled { background: var(--surface); border-color: var(--line); color: var(--muted); cursor: default; }

/* Question screen: globe fills the screen, clue on top, button at the bottom. */
.play { position: fixed; inset: 0; }
#map { position: absolute; inset: 0; background: #05070b; }
.hud, .dock, .reveal { position: absolute; left: 0; right: 0; padding: 12px 16px; max-width: 560px; margin: 0 auto; }
.hud { top: 0; padding-top: max(12px, env(safe-area-inset-top)); pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-row { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.home-link { text-decoration: none; color: var(--accent); font-weight: 800; min-height: 48px; display: inline-flex; align-items: center; }
.clue {
  margin: 0; background: rgb(21 27 38 / .92); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; font-size: 19px; font-weight: 600; backdrop-filter: blur(6px);
}
.skeleton { color: var(--muted); font-weight: 400; }
.dock { bottom: 0; padding-bottom: calc(max(16px, env(safe-area-inset-bottom)) + 24px); } /* clears the map attribution */
.reveal {
  bottom: 0; background: var(--surface); border-top: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0; padding-bottom: calc(max(16px, env(safe-area-inset-bottom)) + 24px);
  display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto;
}
.reveal[hidden] { display: none; }
.reveal-head { display: flex; gap: 12px; align-items: center; }
.answer { margin: 0; font-size: 19px; font-weight: 700; }
.meta, .story { margin: 0; color: var(--muted); }
.meta strong { color: var(--text); }
.unit { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; font: inherit; font-size: 13px; padding: 2px 8px; margin-left: 6px; cursor: pointer; }

.dot { width: 28px; height: 28px; border-radius: 50%; flex: none; border: 2px solid var(--line); }
.dot.green { background: var(--green); } .dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); } .dot.black { background: var(--black); }

/* Results */
.total { margin: 0; font-size: 22px; color: var(--muted); }
.total strong { font-size: 48px; color: var(--text); }
.dots { list-style: none; padding: 0; margin: 0; display: flex; gap: 10px; }
.dots li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.answers { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.answers p { margin: 2px 0 0; color: var(--muted); }
.nick label { display: block; margin-bottom: 6px; color: var(--muted); }
.nick input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit;
}

/* Leaderboard */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 14px; }
td:last-child, th:last-child { text-align: right; }
tr.you td { color: var(--accent); font-weight: 700; }

#toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 20;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
#toast.show { opacity: 1; }
.maplibregl-ctrl-attrib { font-size: 11px; }

footer.site {
  max-width: 520px; margin: 0 auto; padding: 8px 16px 32px;
  display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px;
}
footer.site a { color: var(--muted); min-height: 32px; display: inline-flex; align-items: center; }
body.playing footer.site, body.playing .consent { display: none; } /* never block question 1 */

.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0 auto; max-width: 560px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgb(0 0 0 / .4);
}
.consent p { margin: 0 0 12px; }
.consent .row .btn { flex: 1; } /* Accept and Reject: same size, same weight */

.age { border: 0; padding: 0; margin: 0 0 10px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.age legend { float: left; color: var(--muted); margin-right: 4px; }
.age label { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.ad { min-height: 100px; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; } /* no empty box when Google has no ad */
.ts { display: flex; justify-content: center; }
.ts:not(:empty) { margin-bottom: 8px; }

/* Legal pages */
.legal h2 { font-size: 19px; }
.legal p, .legal li { color: var(--text); }
.legal table { font-size: 15px; }
.draft { border: 1px dashed var(--yellow); border-radius: var(--radius); padding: 10px 14px; color: var(--yellow); }

/* Share buttons on Results: one per service so we can count shares per service. */
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-row .btn { min-height: 44px; padding: 0 14px; font-size: 15px; }
.share-row .btn.primary { order: -1; }
.subscribe { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.subscribe input[type=email] { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.consent-line { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.consent-line input { margin-top: 3px; width: 20px; height: 20px; flex: none; }

/* Pro, account, teams */
.stack { display: flex; flex-direction: column; gap: 12px; }
.perks { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 8px; }
.tabs { display: flex; gap: 8px; }
.tabs [aria-selected="true"] { border-color: var(--accent, #ff5a36); }
.series { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.series select { min-height: 44px; }
.sent { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; text-align: center; }
.sent h2 { margin: 0; }
.sent-icon { font-size: 40px; margin: 0; }
.error { color: #ff8a8a; margin: 0; }
.tabs { flex-wrap: wrap; }
.series-tabs .btn { min-height: 40px; padding: 8px 14px; }
