/*
 * WYR HQ — retro arcade skin.
 *
 * THREE RULES, in priority order.
 *
 * 1. EVERY AD SLOT IS A FIXED BOX BEFORE ANYTHING LOADS, at its real IAB size.
 *    Five third-party ads is the most reliable way to wreck Cumulative Layout
 *    Shift. If a unit fails to fill, the hole stays exactly the same size.
 *
 * 2. THE ARCADE LOOK COSTS NOTHING PER FRAME. No downloaded fonts (system mono
 *    stack), no blur(), no backdrop-filter, no animated box-shadows — those are
 *    what actually drop frames on a phone already running five ad scripts.
 *    Scanlines are ONE static repeating-gradient; the power bar is another.
 *    Everything that moves, moves via transform or opacity only.
 *
 * 3. THE GAME SETS THE GRID. Cards span the centre column; the two 300x250s
 *    sit at its outer edges so their outer edges line up with the cards'.
 */

:root {
  --bg: #07070c;
  --frame: #12121c;
  --slot: #0c0c14;
  --panel: #1b1b28;
  --line: #2a2a3c;
  --line-hot: #3a3a52;

  --text: #f2f2f7;
  --muted: #8b8ba6;
  --dim: #55556e;

  /* Arcade palette — saturated, high contrast, deliberately few. */
  --red: #ff2e4d;
  --red-soft: #ffe8ec;
  --blue: #2f7bff;
  --blue-soft: #e6efff;
  --amber: #ffb300;
  --green: #2bd97c;

  --gutter: 14px;
  --mob-ad-h: 50px;
  /* Height the game page must leave for the footer strip. Overridden per
   * breakpoint; the frame subtracts it so the two always total 100dvh. */
  --footer-h: 0px;

  /* System mono — arcade character with zero download and zero layout shift. */
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "SF Mono", Menlo,
          Consolas, "Liberation Mono", monospace;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

/* Scanlines. One fixed gradient layer, painted once, never animated. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .022) 0 1px,
    transparent 1px 3px
  );
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── ad slots ───────────────────────────────────────────────────────────── */
.ad {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--slot);
  overflow: hidden;
}
.ad::before {
  content: "AD";
  position: absolute;
  top: 6px;
  left: 8px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--dim);
}
.ad::after {
  content: attr(data-label);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--dim);
}
.ad.filled { border: 0; }
.ad.filled::before, .ad.filled::after { content: none; }
.ad > * { max-width: 100%; }

.ad-sticky {
  position: fixed;
  left: 0; right: 0;
  height: var(--mob-ad-h);
  border-radius: 0;
  border-left: 0; border-right: 0;
  background: #0a0a12;
  z-index: 40;
}
.ad-sticky-top { top: 0; border-top: 0; }
.ad-sticky-bottom { bottom: 0; border-bottom: 0; }

.ad-m {
  width: min(320px, 100%);
  height: var(--mob-ad-h);
  margin: 0 auto;
}
.ad-d { display: none; }

/* ── shell / frame ──────────────────────────────────────────────────────── */
/*
 * `min-height: 100dvh` here was the entire cause of the page scrolling:
 * body is already a 100dvh flex column, so forcing the shell to a full
 * viewport meant the footer could only ever be added on top of it.
 * flex:1 with min-height:0 makes shell and footer SHARE the viewport,
 * so the two together come to exactly 100dvh.
 */
.shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* Top padding clears the sticky top rail. The BOTTOM rail is cleared by
   * the footer's own padding — reserving it here as well double-counted
   * 50px and was most of the mobile overflow. */
  padding: calc(var(--mob-ad-h) + 10px) 0 8px;
  position: relative;
  z-index: 2;
}

.frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

header {
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  flex: none;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }

:where(a, button):focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.brand {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text);
}
.brand span { color: var(--muted); font-weight: 400; }


.stage, .centre { display: contents; }

/* ── phase progress bar ─────────────────────────────────────────
 * Sits directly under the phase box and refills for each phase. A segmented
 * meter rather than a smooth sweep: a solid moving band in peripheral vision
 * reads as a browser loading bar, which was the distracting part. Two static
 * gradients; nothing per-frame except one scaleX.
 */
.bar {
  flex: none;
  margin: 8px var(--gutter) 0;
  height: 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #0a0a12;
  overflow: hidden;
  padding: 2px;
}
.bar span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(1);
  background: repeating-linear-gradient(
    to right,
    var(--amber) 0 6px,
    transparent 6px 9px
  );
}
body.urgent .bar span {
  background: repeating-linear-gradient(to right, var(--red) 0 6px, transparent 6px 9px);
}

/* ── the question ─────────────────────────────────────────────
 * The heading leads the column and is larger than the countdown at EVERY
 * breakpoint. It is the thing being asked; the timer is only a constraint on
 * answering it, and a 42px timer over a 17px prompt inverted that.
 */
.ask { flex: none; padding: 0 var(--gutter); text-align: center; }
.prompt {
  margin: 0;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 8px rgba(255, 179, 0, .28);
}
/* Never hidden — short screens shrink the gaps instead. A rule people cannot
 * see is a rule they will only discover by being caught out by it. */
.rule {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── phase box ── the single countdown ─────────────────────────────── */
.phase {
  flex: none;
  margin: 10px var(--gutter) 0;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 42px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.phase-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phase-value {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  flex: none;
}
body.urgent .phase-value,
body.urgent .phase-label { color: var(--red); }

/* ── cards ──────────────────────────────────────────────────────────────── */
.game {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 var(--gutter);
  flex: 1;
  min-height: 0;
}

.card {
  flex: 1;
  min-height: 74px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 34px 16px 14px;
  border-radius: 6px;
  border: 2px solid transparent;
  font-family: inherit;
  font-size: clamp(14px, 3.9vw, 16px);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: #14141c;
  cursor: pointer;
  /* Hard offset shadow, no blur — the arcade edge, and free to paint. */
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .55);
  transition: transform .1s ease, opacity .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.card:active { transform: translate(2px, 2px); }
.card-a { background: var(--red-soft); }
.card-b { background: var(--blue-soft); }

.card .tag {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.card-a .tag { background: var(--red); }
.card-b .tag { background: var(--blue); }

.card.chosen { border-color: currentColor; }
.card-a.chosen { border-color: var(--red); }
.card-b.chosen { border-color: var(--blue); }
.card.chosen::after {
  content: "✓";
  position: absolute;
  top: 9px; right: 11px;
  width: 21px; height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
}
.card-a.chosen::after { background: var(--red); }
.card-b.chosen::after { background: var(--blue); }

/* Counts stay hidden for the whole voting phase — a running total while people
 * are still choosing produces bandwagon voting and the number stops meaning
 * anything. */
.count {
  font-family: var(--mono);
  font-size: clamp(20px, 6vw, 26px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity .2s ease;
}
.card-a .count { color: var(--red); }
.card-b .count { color: var(--blue); }
body.reveal .count { height: auto; opacity: 1; }
body.reveal .card.dim { opacity: .82; }

body.waiting .card { opacity: .8; cursor: default; pointer-events: none; }

/* ── results panel ───────────────────────────────────────────────
 * A | thin split bar | B, vertically centred, inside ONE dark box. Only the
 * bar carries red and blue — flooding the whole panel with both made it shout
 * louder than the cards it is reporting on.
 *
 * The box holds its height during voting and shows "results hidden" instead,
 * so nothing shifts when the reveal lands.
 */
.status-row {
  display: flex;
  gap: 10px;
  margin: 0 var(--gutter);
  flex: none;
}
.status {
  flex: 1;
  min-width: 0;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.results-hidden {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
}

.split { display: none; width: 100%; align-items: center; gap: 12px; }
body.reveal .results-hidden { display: none; }
body.reveal .split { display: flex; }

/* Side columns with hard overflow protection: a 999,999,999 count must never
 * push the bar out of the panel or collide with the other side. */
.side {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 34%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.side-head {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.side-a .side-head b { color: var(--red); }
.side-b .side-head b { color: var(--blue); }
.side-n {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tug {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.tug-bar {
  width: 100%;
  height: 8px;
  display: flex;
  background: #0a0a12;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.tug-a, .tug-b {
  height: 100%;
  width: 0;
  /* One subtle move into the result. Width animates only here, and only when
   * the split actually changes — not ten times a second. */
  transition: width .45s ease;
}
.tug-a { background: var(--red); }
.tug-b { background: var(--blue); }
.tug-cap {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.share {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 108px;
  padding: 0 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .1s ease, border-color .1s ease;
}
.share:hover { border-color: var(--line-hot); }
.share:active { transform: translate(1px, 1px); }
.share svg { width: 14px; height: 14px; }

.mpu-row { display: flex; gap: 10px; justify-content: center; }

/* ── desktop ────────────────────────────────────────────────────────────────
 * Scaled to fill the viewport instead of the mockup's literal 776px, which on
 * a large monitor left most of the screen empty. Ads are at their REAL IAB
 * sizes here — 728x90, 160x600, 300x250 — so the Adsterra codes drop straight
 * in without the boxes changing size.
 *
 * The two 300x250s sit at the outer edges of the centre column so their outer
 * edges align with the cards above them.
 */
@media (min-width: 1000px) {
  .ad-sticky, .ad-m { display: none; }
  .ad-d { display: flex; }

  .shell {
    --desktop-edge: clamp(10px, 1.5vmin, 24px);
    --desktop-rail: 160px;
    padding: var(--desktop-edge);
    min-height: 0;
    justify-content: center;
    align-items: center;
  }

  .frame {
    flex: 0 1 auto;
    gap: 0;
    width: calc(100vw - (2 * var(--desktop-edge)));
    /* The footer is a sibling, so its height has to come out of the frame's
     * budget. Without this term the frame alone is a full viewport and the
     * footer can only push the page into scrolling. */
    height: calc(100dvh - (2 * var(--desktop-edge)) - var(--footer-h));
    min-height: 760px;
    margin: 0 auto;
    padding: 22px 24px 24px;
    background: var(--frame);
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  header { padding: 0 0 14px; }
  .brand { font-size: 16px; }

  /* The reserved strip fills the frame; a fixed 728x90 creative remains
   * centred inside it without causing layout shift. */
  .ad-leader { width: 100%; height: 90px; margin: 0 auto; }

  .stage {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: var(--desktop-rail) minmax(0, 1fr) var(--desktop-rail);
    gap: 22px;
    align-items: stretch;
    margin-top: 14px;
  }
  .centre {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
  }

  /* A 160x600 creative sits at the top of a rail that can grow on taller
   * screens. The rail itself owns the reserved space. */
  .ad-sky { width: 100%; height: 100%; min-height: 600px; }
  .ad-sky::after { writing-mode: vertical-rl; }

  .ask { padding: 0; }
  .prompt { font-size: clamp(26px, 1.7vw, 30px); letter-spacing: .12em; }
  .rule { font-size: 11px; margin-top: 8px; }

  .phase { margin: 14px 0 0; min-height: 48px; padding: 8px 18px; gap: 16px; }
  .phase-label { font-size: 11px; }
  .phase-value { font-size: clamp(22px, 1.3vw, 25px); }
  .bar { margin: 10px 0 0; height: 12px; }

  .game {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-height: 0;
    margin-top: 14px;
  }

  .cards {
    flex-direction: row;
    gap: clamp(20px, 1.3vw, 30px);
    padding: 0;
    flex: 1;
    min-height: 190px;
  }
  .card {
    flex: 1 1 0;
    min-height: 190px;
    padding: clamp(44px, 5dvh, 62px) clamp(22px, 2vw, 40px) 18px;
    font-size: clamp(17px, 1vw, 23px);
    border-radius: 8px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, .55);
  }
  .card .tag { top: 13px; width: 30px; height: 30px; font-size: 13px; }
  .count { font-size: 30px; }

  .status-row { flex: 0 0 clamp(64px, 7.5dvh, 84px); margin: 18px 0 0; gap: 14px; }
  .status { min-height: 0; height: 100%; }
  .status { padding: 10px 20px; }
  .split { gap: 22px; }
  .side-head { font-size: 11px; }
  .side-n { font-size: 19px; }
  .tug-bar { height: 10px; }
  .tug-cap { font-size: 10px; }
  .results-hidden { font-size: 11px; }
  .share { min-width: clamp(130px, 9vw, 176px); font-size: clamp(13px, .75vw, 15px); }

  /* Outer edges align with the cards; the gap between absorbs the slack. */
  .mpu-row { margin-top: 18px; justify-content: center; gap: 20px; }
  .ad-mpu { width: 300px; height: 250px; }
}

/* Short desktop windows. A 600px skyscraper plus a 90px leaderboard cannot fit
 * a 625px viewport, so the game gives up height — the ad boxes never do. */
@media (min-width: 1000px) and (max-height: 900px) {
  .shell { padding: 4px 0; }
  /* The 760px floor is taller than a 768px laptop can spare once the
   * footer is accounted for, so it forced the exact overflow it was meant
   * to prevent. Below 900px the frame simply takes what is available. */
  .frame { min-height: 0; }
  .frame { padding: 12px 16px 14px; }
  header { padding: 0 0 8px; }
  .stage { margin-top: 8px; gap: 16px; }
  .prompt { font-size: 22px; }
  .rule { font-size: 10px; margin-top: 5px; }
  .phase { margin-top: 8px; min-height: 40px; padding: 6px 14px; }
  .phase-value { font-size: 21px; }
  .bar { margin-top: 6px; height: 10px; }
  .game { margin-top: 10px; }
  .cards { min-height: 170px; }
  .card { min-height: 120px; padding: 36px 18px 12px; font-size: 16px; }
  .count { font-size: 22px; }
  .status-row { margin-top: 10px; }
  .status { min-height: 58px; padding: 6px 14px; }
  .mpu-row { margin-top: 10px; }
}

/* Short phones. Five 320x50 units are 250px of a 640px screen before the game
 * exists, so the furniture around the cards shrinks — never the ad boxes. */
@media (max-width: 619px) and (max-height: 700px) {
  .frame { gap: 4px; }
  .ask { padding: 0 10px; }
  .prompt { font-size: 16px; }
  .rule { margin-top: 3px; }
  .phase { margin-top: 4px; min-height: 30px; padding: 3px 8px; }
  .phase-value { font-size: 15px; }
  .bar { margin-top: 4px; height: 6px; }
  .cards { gap: 5px; }
  .card { min-height: 50px; padding: 24px 10px 6px; font-size: 12.5px; }
  .status { min-height: 40px; }
  .status-row { gap: 6px; }
  .shell { padding: calc(var(--mob-ad-h) + 6px) 0 6px; }
  .frame { gap: 6px; }
  .brand { font-size: 13px; }
  .prompt { font-size: 18px; letter-spacing: .07em; }
  .rule { font-size: 9px; margin-top: 4px; }
  .phase { margin-top: 6px; min-height: 34px; padding: 4px 10px; gap: 8px; }
  .phase-label { font-size: 9px; }
  .phase-value { font-size: 17px; }
  .bar { margin-top: 5px; height: 8px; }
  .game { gap: 7px; }
  .cards { gap: 7px; }
  .card { min-height: 58px; padding: 28px 12px 8px; font-size: 13.5px; }
  .card .tag { width: 22px; height: 22px; top: 6px; font-size: 11px; }
  .count { font-size: 18px; }
  .status { min-height: 48px; padding: 5px 8px; }
  .split { gap: 8px; }
  .side-head { font-size: 9px; }
  .side-n { font-size: 13px; }
  .tug-cap { font-size: 8px; }
  .results-hidden { font-size: 9px; }
  .share { min-width: 88px; font-size: 11px; }
}

/* Tablet: keep the mobile game, drop the sticky rails. `width: 100%` is
 * load-bearing — an auto margin on the cross axis of a flex column cancels the
 * default stretch, so max-width alone collapses these to label width. */
@media (min-width: 620px) and (max-width: 999px) {
  .ad-sticky {
    position: static;
    height: var(--mob-ad-h);
    width: 100%;
    max-width: 468px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 4px;
  }
  .ad-m { width: 100%; max-width: 468px; margin: 0 auto; }
  .shell {
    min-height: 0;
    padding: 12px 0;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
  }
  .cards { flex-direction: row; }
  .card { min-height: 150px; }
  .prompt { font-size: 24px; }
  .phase-value { font-size: 21px; }
}

/* ── question pages (SEO surface) ───────────────────────────────────────── */
.qpage { max-width: 680px; margin: 0 auto; padding: 32px var(--gutter) 64px; position: relative; z-index: 2; }
.qpage h1 { font-size: clamp(23px, 5.5vw, 32px); line-height: 1.25; margin: 0 0 20px; }
.qpage .opt {
  padding: 16px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 10px;
  color: #14141c;
  box-shadow: 3px 3px 0 rgba(0,0,0,.5);
}
.qpage .opt-a { background: var(--red-soft); }
.qpage .opt-b { background: var(--blue-soft); }
.qpage .tally { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 21px; display: block; margin-top: 6px; }
.qpage .opt-a .tally { color: var(--red); }
.qpage .opt-b .tally { color: var(--blue); }
.qpage p { color: #c2c2d2; line-height: 1.65; }
.qpage .cta {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 22px;
  border-radius: 6px;
  background: var(--amber);
  color: #07070c;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}
.qpage nav { margin-top: 40px; font-size: 14px; }
.qpage nav a { color: var(--muted); }
.topic-page { max-width: 860px; }
.topic-page nav { margin: 0 0 28px; }
.topic-list { margin: 28px 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.topic-list li { margin: 0; }
.topic-list a {
  display: block;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  line-height: 1.45;
  text-decoration: none;
}
.topic-list a:hover { border-color: #4b5672; transform: translateY(-1px); }

/* Crawlable guides, directories and trust pages. */
.content-header {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
}
.content-header .brand { color: var(--text); text-decoration: none; }
.crumbs { margin: 0 0 28px !important; color: var(--muted); }
.crumbs a { color: #b7c9ee !important; }
.lede { font-size: clamp(17px, 2vw, 20px); color: #d9dbe5 !important; }
.answer-block {
  margin: 24px 0;
  padding: 20px;
  border-left: 4px solid var(--amber);
  background: var(--panel);
}
.qpage h2 { margin: 30px 0 8px; font-size: clamp(18px, 3vw, 23px); }
.answer-block h2:first-child { margin-top: 0; }
.related-links { display: flex; flex-wrap: wrap; gap: 10px; }
.related-links a {
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 28px 0; }
.directory-grid > a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}
.directory-grid > a:hover { border-color: #4b5672; }
.directory-grid span { color: #b6b8c7; line-height: 1.5; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 750; color: var(--text); }
.steps li { margin-bottom: 14px; color: #c2c2d2; line-height: 1.6; }
.info-page { max-width: 780px; }
.meta { color: var(--muted) !important; font-family: var(--mono); font-size: 12px; }

.site-footer {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  position: relative;
  z-index: 2;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  border-top: 1px solid var(--line);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.site-footer > span { margin-left: auto; }
/*
 * On the game page the footer is chrome, not content: one line, no
 * wrapping, scrolls sideways if it must. Every link stays a real anchor
 * so Privacy, Terms, Methodology and the hubs keep their crawl value —
 * it is only the height that changes, from 68px/185px down to ~30px.
 */
body[data-page-type="game"] {
  /* Measured: 25px of links plus the 50px sticky-rail clearance below. */
  --footer-h: 75px;
}
body[data-page-type="game"] .site-footer {
  padding: 6px 0 calc(6px + var(--mob-ad-h));
  gap: 4px 12px;
  font-size: 9px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
body[data-page-type="game"] .site-footer::-webkit-scrollbar { display: none; }
body[data-page-type="game"] .site-footer nav { flex-wrap: nowrap; }
body[data-page-type="game"] .site-footer a,
body[data-page-type="game"] .site-footer button,
body[data-page-type="game"] .site-footer > span { white-space: nowrap; }

/* ── consent (UK/EU only) ───────────────────────────────────────────────── */
.consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Deliberately a flat wash, not backdrop-filter: blur is the single most
   * expensive thing you can put over a full-screen layer on a phone. */
  background: rgba(4, 4, 8, .88);
}
.consent {
  width: 100%;
  max-width: 380px;
  padding: 20px;
  background: var(--frame);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #c2c2d2;
}
.consent h2 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text);
}
.consent .row { display: flex; gap: 8px; margin-top: 14px; }
.consent button {
  flex: 1;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.consent button.primary { background: var(--amber); color: #07070c; border-color: var(--amber); }
.consent a { color: #b7c9ee; }

@media (max-width: 700px) {
  .game-header .site-nav { display: none; }
  .content-header { align-items: flex-start; gap: 14px; }
  .content-header .site-nav { font-size: 9px; gap: 8px 10px; }
  .directory-grid { grid-template-columns: 1fr; }
  .site-footer > span { width: 100%; margin-left: 0; }
  /* ...but never on the game page, where a second row would reintroduce
   * the scroll this whole change exists to remove. */
  body[data-page-type="game"] .site-footer > span { width: auto; margin-left: auto; }
}

@media (min-width: 1000px) {
  /* No sticky ad rail on desktop, so no clearance needed below. */
  body[data-page-type="game"] { --footer-h: 30px; }
  body[data-page-type="game"] .site-footer { padding: 6px 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Large monitors — the heading keeps its lead over the countdown. */
@media (min-width: 1600px) and (min-height: 900px) {
  .prompt { font-size: 32px; }
  .phase-value { font-size: 26px; }
  .side-n { font-size: 21px; }
}

/* ── game-page height overrides, deliberately last ─────────────────────────
 * These must come AFTER the base `body[data-page-type="game"]` rules. Equal
 * specificity means source order decides, and defining them earlier in the
 * file meant the base 75px footer silently beat every small-screen override.
 */
@media (max-width: 619px) and (max-height: 760px) {
  body[data-page-type="game"] { --footer-h: 60px; }
  body[data-page-type="game"] .site-footer {
    padding: 3px 0 calc(3px + var(--mob-ad-h));
    font-size: 8px;
  }
}

/* Ultra-short phones (roughly iPhone SE and below). Five 320x50 rails plus the
 * footer are over half the screen before the game exists, so the game's own
 * furniture is squeezed to the minimum that stays legible. The ad boxes are
 * never touched. */
/* Raised from 600px to 660px: a 360x640 phone was 40px over because the
 * moderate compression left the min-height floors too tall. */
@media (max-width: 619px) and (max-height: 660px) {
  .frame { gap: 3px; }
  .brand { font-size: 12px; }
  .prompt { font-size: 14px; letter-spacing: .05em; }
  .rule { font-size: 8px; margin-top: 2px; }
  .phase { margin-top: 3px; min-height: 26px; padding: 2px 8px; gap: 6px; }
  .phase-label { font-size: 8px; }
  .phase-value { font-size: 14px; }
  .bar { margin-top: 3px; height: 5px; }
  .cards { gap: 4px; }
  .card { min-height: 44px; padding: 20px 8px 5px; font-size: 12px; }
  .card .tag { width: 18px; height: 18px; top: 4px; font-size: 9px; }
  .status { min-height: 36px; padding: 3px 6px; }
  .side-n { font-size: 11px; }
  .share { min-width: 74px; font-size: 10px; }
}

/* ── height containment chain ──────────────────────────────────────────────
 * A flex item defaults to `min-height: auto`, which means it refuses to shrink
 * below its own content. With a million questions of varying length, a long
 * one simply pushed the whole page taller and reintroduced scrolling — which
 * is why the overflow moved around between rounds instead of being constant.
 *
 * Every link in the chain therefore declares `min-height: 0`, so the bounded
 * height set by the shell actually reaches the cards. The option text scrolls
 * inside its own card in the rare worst case rather than resizing the page.
 * Ad boxes are deliberately excluded: they must never shrink.
 */
body[data-page-type="game"] .frame,
body[data-page-type="game"] .game,
body[data-page-type="game"] .cards,
body[data-page-type="game"] .centre { min-height: 0; }

body[data-page-type="game"] .card {
  min-height: 0;
  overflow: hidden;
}
/* The option text never scrolls. Both choices have to be fully readable the
 * moment the round starts — fitOption() in app.js steps the size down until it
 * fits instead. `overflow: hidden` here is only a backstop so a pathological
 * string can never push the page. */
body[data-page-type="game"] .card > span:not(.tag):not(.count) {
  max-height: 100%;
  overflow: hidden;
  display: block;
  width: 100%;
}

/* Ultra-short phones (~568px and below). At this size five 320x50 rails plus
 * the footer are already 316px of the screen, so every remaining floor is set
 * to the smallest value that is still legible and tappable. Ad boxes are the
 * one thing that never gives. */
@media (max-width: 619px) and (max-height: 590px) {
  .shell { padding: calc(var(--mob-ad-h) + 4px) 0 4px; }
  body[data-page-type="game"] { --footer-h: 58px; }
  body[data-page-type="game"] .site-footer { padding: 2px 0 calc(2px + var(--mob-ad-h)); }
  .frame { gap: 2px; }
  .game { gap: 4px; }
  .game-header { padding: 0 10px; }
  .brand { font-size: 11px; }
  .prompt { font-size: 13px; }
  .rule { font-size: 7.5px; margin-top: 1px; }
  .phase { margin-top: 2px; min-height: 22px; padding: 1px 6px; }
  .phase-value { font-size: 13px; }
  .bar { margin-top: 2px; height: 4px; }
  .cards { gap: 3px; }
  .card { padding: 17px 7px 4px; font-size: 11.5px; line-height: 1.25; }
  .card .tag { width: 16px; height: 16px; top: 3px; font-size: 8px; }
  .status { min-height: 32px; }
  .status-row { gap: 5px; }
  .share { min-width: 66px; font-size: 9px; }
}

/* ── the no-scroll guarantee ────────────────────────────────────────────────
 * Everything above budgets the height arithmetically, which held right up
 * until a long question arrived and pushed one card past its share — so the
 * overflow appeared and vanished depending on which of the million questions
 * was live. Pinning the game page to exactly one viewport makes it structural
 * instead: the containment chain above forces every flexible row to fit, and
 * the option text scrolls inside its own card in the worst case.
 *
 * Scoped to the game page only. Content pages must still scroll normally.
 */
body[data-page-type="game"] {
  height: 100dvh;
  overflow: hidden;
}

/* ── card padding on short phones ──────────────────────────────────────────
 * The badge reserves 34px at the top of every card. On a 667px phone, where
 * five ad rails and the footer already take nearly half the screen, that
 * padding was the difference between an option fitting and being cut off.
 * The badge shrinks and rides higher so the text gets the room instead.
 */
@media (max-width: 619px) and (max-height: 780px) {
  .card { padding: 22px 12px 8px; }
  .card .tag { width: 19px; height: 19px; top: 4px; font-size: 10px; }
  .ask { padding: 0 10px; }
  .rule { font-size: 8.5px; margin-top: 3px; }
}

@media (max-width: 619px) and (max-height: 680px) {
  .card { padding: 19px 10px 6px; }
  .card .tag { width: 17px; height: 17px; top: 3px; font-size: 9px; }
}

/* Tightest tier, and deliberately the last block in the file. The ~680px rules
 * above match here too, and on equal specificity source order wins — defining
 * this any earlier meant the looser padding silently overrode it. */
@media (max-width: 619px) and (max-height: 590px) {
  .card { padding: 15px 6px 4px; }
  .card .tag { width: 15px; height: 15px; top: 2px; font-size: 8px; }
  .ask { padding: 0 6px; }
  .prompt { font-size: 12px; }
  .rule { font-size: 7px; margin-top: 1px; }
  .phase { min-height: 20px; }
  .status { min-height: 30px; }
}

/* ── ad-blocker resilience ──────────────────────────────────────────────────
 * The stage is a three-column grid and its items were auto-placed. An ad
 * blocker that hides or removes the two rails takes them out of grid flow, so
 * the centre column slid into track 1 — the 160px rail — and the whole game
 * squeezed to 160px wide. Roughly a third of desktop visitors run a blocker,
 * so a third of desktop visitors saw a broken page.
 *
 * Pinning each item to an explicit track makes the layout independent of
 * whether the ad elements exist at all.
 */
@media (min-width: 1000px) {
  .stage > #d2 { grid-column: 1; grid-row: 1; }
  .stage > .centre { grid-column: 2; grid-row: 1; }
  .stage > #d3 { grid-column: 3; grid-row: 1; }
}
