/* ==========================================================================
   Local Match: styles
   Look and feel: night-green ground, big rounded cards, pill buttons, a yellow call to
   action with orange/lilac/mint accents, geometric shapes on the dark panels.
   ========================================================================== */

/* ── BRAND TOKENS (swap these to re-skin) ─────────────────────────────────── */
@font-face { font-family: "Big Shoulders Display"; src: url("../fonts/big-shoulders-display-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: block; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* Type: Big Shoulders Display (made for the City of Chicago's public signage) for big headlines,
     numbers and the clock. Barlow for everything you read. IBM Plex Mono for citations and tags. */
  --font-display: "Big Shoulders Display", "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: var(--font-body); /* small and mid-size headings: display face is too tight below ~24px */
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Brand pack: Freedom Green, Ballot Gold, Voice Red, Ink (assets/brand). Neutrals are the pack's green-greys. */
  --brand-950: #0e1512; /* night green: dark ground, and text on gold */
  --brand-700: #007749; /* Freedom Green: primary buttons, selected states */
  --brand-600: #006b43; /* hover / pressed */
  --brand-500: #009a5c; /* brighter green: borders, highlights, the mark on dark */
  --gold: #ffb81c; /* Ballot Gold: the call to action */
  --red: #de3831; /* Voice Red: the tick, "different", errors */
  --dark-bg:
    radial-gradient(90% 55% at 12% 0%, rgb(0 154 92 / 0.42) 0%, rgb(0 154 92 / 0) 62%),
    radial-gradient(70% 45% at 100% 22%, rgb(255 184 28 / 0.14) 0%, rgb(255 184 28 / 0) 60%),
    #0e1512;

  --oat-50: #f4f7f5; /* off-white text on dark */
  --oat-100: #f6f8f7; /* page */
  --oat-200: #e9eeeb;
  --oat-300: #dde3e0; /* borders, desktop backdrop */

  --ink: #141a17;
  --ink-soft: #5a655f;
  --accent-ink: #0b6b43; /* text-safe green on light */

  --mint: #2fd68f; /* green on dark surfaces */
  --mint-deep: #007749;
  --lilac: #b7c4f7; /* flag blue, tinted */
  --lilac-deep: #3a55e6;

  /* Answer scale: gold ↔ flag blue. Neither end is red or green, so no answer reads as "right". */
  --s-2: #ffb81c;
  --s-1: #ffdb8a;
  --s0: #e4e8e5;
  --s1: #b7c4f7;
  --s2: #5b78f0;

  --focus: #007749;
  --shape: rgba(255, 255, 255, 0.08);

  --cd-h: 46px; /* room reserved at the top of each screen for the countdown pill */
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 30px;
  --shadow-card: 0 1px 0 rgba(20, 26, 23, 0.05), 0 14px 32px -20px rgba(20, 26, 23, 0.45);
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 106.25%;
}
body {
  margin: 0;
  background: var(--oat-300);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
strong, b { font-weight: 600; }
code { font-family: var(--font-mono); font-size: 0.85em; background: var(--oat-200); padding: 1px 6px; border-radius: 6px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.skip:focus { left: 12px; }
.loading { padding: 40px 24px; text-align: center; color: var(--ink-soft); }
[hidden] { display: none !important; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ── Shell ────────────────────────────────────────────────────────────────── */
.app { display: flex; justify-content: center; min-height: 100dvh; }
.screen {
  position: relative;
  width: 100%;
  max-width: 720px;
  min-height: 100dvh;
  background: var(--oat-100);
  overflow: clip;
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 760px) {
  .app { padding: 32px 24px; }
  .screen { min-height: calc(100dvh - 64px); border-radius: 44px; box-shadow: 0 30px 80px -30px rgba(20, 26, 23, 0.5); }
}

.screen--dark { background: var(--dark-bg); color: var(--oat-50); --focus: #ffb81c; }

.pall {
  position: absolute; left: -12%; top: -3%; width: 165%; max-width: none; height: auto; pointer-events: none;
  transform-origin: 20% 40%; animation: pall-drift 30s ease-in-out infinite alternate;
}
.pall__white { stroke: rgb(255 255 255 / 0.05); }
.pall__green { stroke: rgb(0 154 92 / 0.22); }
.pall__gold { stroke: rgb(255 184 28 / 0.24); }
@keyframes pall-drift { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(-3%, 2.5%, 0) rotate(1.6deg); } }

/* brand mark: the tick draws itself in */
.vm, .vl { display: block; }
.vl { height: auto; }
.vm--draw .vm__gold, .vm--draw .vm__red { stroke-dasharray: 1 1; stroke-dashoffset: 1.02; animation: vm-draw 0.5s cubic-bezier(0.3, 0.7, 0.2, 1) forwards; }
.vm--draw .vm__gold { animation-delay: 0.35s; }
.vm--draw .vm__red { animation-delay: 0.8s; }
@keyframes vm-draw { to { stroke-dashoffset: 0; } }

/* ── Type ─────────────────────────────────────────────────────────────────── */
.display {
  font: 800 clamp(2.6rem, 12.5vw, 4.4rem) / 0.98 var(--font-display);
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.display--md { font-size: clamp(3rem, 14vw, 5rem); }
.h1 { font: 800 clamp(2.4rem, 10vw, 3.3rem) / 1 var(--font-display); letter-spacing: 0.005em; text-wrap: balance; }
.h2 { font: 800 2rem / 1.02 var(--font-display); letter-spacing: 0.01em; }
.h3 { font: 700 1.25rem / 1.2 var(--font-head); }
.lede { font-size: 1.08rem; line-height: 1.55; color: rgb(253 251 249 / 0.82); max-width: 46ch; }
.lede--dark { color: var(--ink-soft); margin-top: 12px; }
.eyebrow { font-size: 0.86rem; font-weight: 600; color: var(--accent-ink); letter-spacing: 0.01em; }
.eyebrow--light { color: var(--gold); }
.mono, .tag--mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.01em; }
.mono { font-size: 0.74rem; color: var(--ink-soft); }
.src { font-size: 0.85rem; color: var(--ink-soft); }

/* ── Buttons & controls ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px;
  border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.15 var(--font-body); text-align: center; text-decoration: none;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn--primary { background: var(--brand-700); color: #fff; }
.btn--primary:hover:not([disabled]) { background: var(--brand-600); }
.btn--primary { box-shadow: 0 10px 24px -12px rgb(0 119 73 / 0.8); }
.btn--cta { background: var(--gold); color: var(--brand-950); box-shadow: 0 12px 30px -10px rgb(255 184 28 / 0.65), inset 0 -3px 0 rgb(0 0 0 / 0.12); }
.btn--cta:hover { background: #ffdf70; }
.btn--xl { width: 100%; min-height: 66px; font-size: 1.2rem; font-weight: 700; letter-spacing: 0.005em; }
.btn--xl .icon { width: 1.4em; height: 1.4em; transition: transform 0.2s; }
.btn--xl:hover .icon { transform: translateX(4px); }
.btn--ghost { background: transparent; border-color: var(--brand-700); color: var(--ink); }
.btn--ghost:hover { background: var(--oat-200); }
.btn--ghost-light { background: transparent; border-color: rgb(255 255 255 / 0.32); color: var(--oat-50); }
.btn--ghost-light:hover { background: rgb(255 255 255 / 0.08); }

.round-btn {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none;
  border-radius: 50%; border: 0; background: var(--oat-200); color: var(--ink); text-decoration: none;
}
.round-btn:hover { background: var(--oat-300); }
.round-btn--light { background: rgb(255 255 255 / 0.12); color: var(--oat-50); }
.round-btn--light:hover { background: rgb(255 255 255 / 0.2); }

.text-link { font-weight: 600; }
.text-link--light { color: var(--oat-50); text-align: center; padding: 10px; }
.ext { font-weight: 600; }
.link-report { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9rem; }
.link-report .icon { width: 1em; height: 1em; }

/* ── Top bars ─────────────────────────────────────────────────────────────── */
.topbar { display: flex; align-items: center; gap: 14px; padding: 6px 20px 8px; position: relative; z-index: 1; }
.topbar__title { flex: 1; font-weight: 600; font-size: 0.95rem; }
.topbar__link { font-size: 0.9rem; font-weight: 600; padding: 12px 4px; }

/* ── Intro ────────────────────────────────────────────────────────────────── */
.intro { position: relative; z-index: 1; padding: 6px 22px 30px; max-width: 520px; margin-inline: auto; display: grid; gap: 18px; }
.intro__brand { width: clamp(150px, 46vw, 190px); margin-bottom: 2px; }
.screen--intro .vbar:not(.is-stuck) .vbar__brand { opacity: 0; pointer-events: none; } /* the big lockup sits right below */
.intro .lede { margin-top: -4px; }
.intro__dial { margin: 0; }
.intro__dial-cap { text-align: center; font-size: 0.92rem; color: rgb(253 251 249 / 0.7); }
.facts { display: grid; gap: 12px; margin-top: 8px; }
.fact { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-md); background: rgb(255 255 255 / 0.11); }
.fact h2 { font: 700 1.1rem/1.25 var(--font-head); }
.fact p { font-size: 0.92rem; color: rgb(253 251 249 / 0.76); margin-top: 2px; }
.fact__icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 16px; color: var(--brand-950); }
.fact__icon--mint { background: var(--mint); }
.fact__icon--orange { background: var(--gold); }
.fact__icon--lilac { background: var(--lilac); }
.fact__icon--sun { background: var(--red); color: #fff; }
.intro__cta { display: grid; gap: 12px; margin-top: 12px; }
.intro__status { text-align: center; font-size: 0.88rem; color: rgb(253 251 249 / 0.7); }

/* ── The answer arc (signature) ───────────────────────────────────────────── */
.dial { position: relative; width: 100%; max-width: 340px; aspect-ratio: 340 / 176; margin: 28px auto 64px; --dot: var(--s0); }
.dial[data-score="-2"] { --dot: var(--s-2); }
.dial[data-score="-1"] { --dot: var(--s-1); }
.dial[data-score="0"] { --dot: var(--s0); }
.dial[data-score="1"] { --dot: var(--s1); }
.dial[data-score="2"] { --dot: var(--s2); }
.dial__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dial__track { fill: none; stroke: var(--oat-300); stroke-width: 12; stroke-linecap: round; }
.dial__fill {
  fill: none; stroke: var(--dot); stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: calc(var(--fill) * 1) 100;
  transition: stroke-dasharray 0.4s cubic-bezier(0.3, 0.7, 0.2, 1), stroke 0.2s;
}
.dial[data-score=""] .dial__fill { opacity: 0; }

.dial__dot {
  position: absolute; width: 60px; height: 60px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
}
.dial__dot[data-score="-2"] { --c: var(--s-2); }
.dial__dot[data-score="-1"] { --c: var(--s-1); }
.dial__dot[data-score="0"] { --c: var(--s0); }
.dial__dot[data-score="1"] { --c: var(--s1); }
.dial__dot[data-score="2"] { --c: var(--s2); }
.dial__dot input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dial__face {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; border: 2px solid var(--oat-300); color: var(--ink);
  font-weight: 600; font-size: 0.95rem; box-shadow: 0 2px 0 rgb(20 26 23 / 0.08);
  transition: transform 0.22s cubic-bezier(0.3, 1.5, 0.5, 1), background 0.2s, border-color 0.2s;
}
.dial__dot:hover .dial__face { border-color: var(--brand-600); }
.dial__dot input:checked + .dial__face,
.dial__dot.is-on .dial__face { transform: scale(1.28); background: var(--c); border-color: var(--brand-700); }
.dial__dot input:focus-visible + .dial__face { outline: 3px solid var(--focus); outline-offset: 4px; }
.dial__end {
  position: absolute; top: calc(75.8% + 34px); width: 76px; text-align: center;
  font-size: 0.74rem; line-height: 1.15; color: var(--ink-soft);
}
.dial__end--l { left: 12.4%; transform: translateX(-50%); }
.dial__end--r { left: 87.6%; transform: translateX(-50%); }

.dial__readout { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 5.2rem; text-align: center; }
.dial__word { font: 800 clamp(2.7rem, 12vw, 3.5rem) / 0.95 var(--font-display); letter-spacing: 0.01em; }
.dial__word--empty { font-size: 1.15rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; padding-top: 10px; }
.dial__signed { font: 600 1.2rem / 1 var(--font-head); color: var(--ink-soft); }

/* dial on dark (intro) */
.screen--dark .dial__track { stroke: rgb(255 255 255 / 0.2); }
.screen--dark .dial__face { background: rgb(255 255 255 / 0.14); border-color: rgb(255 255 255 / 0.32); color: var(--oat-50); box-shadow: none; }
.screen--dark .dial__dot.is-on .dial__face { color: var(--brand-950); border-color: var(--oat-50); }
.screen--dark .dial__end { color: rgb(253 251 249 / 0.62); }
.dial--demo { margin-bottom: 60px; }
.dial--demo .dial__fill { animation: fill-in 1.1s 0.5s cubic-bezier(0.3, 0.7, 0.2, 1) both; }
.dial--demo .dial__dot { animation: pop 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.dial--demo .dial__dot:nth-of-type(1) { animation-delay: 0.05s; }
.dial--demo .dial__dot:nth-of-type(2) { animation-delay: 0.15s; }
.dial--demo .dial__dot:nth-of-type(3) { animation-delay: 0.25s; }
.dial--demo .dial__dot:nth-of-type(4) { animation-delay: 0.35s; }
.dial--demo .dial__dot:nth-of-type(5) { animation-delay: 0.45s; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes fill-in { from { stroke-dasharray: 0 100; } }

/* ── Questionnaire ────────────────────────────────────────────────────────── */
.quizbar { display: flex; align-items: center; gap: 14px; padding: 6px 20px 0; }
.progress { flex: 1; height: 10px; border-radius: 999px; background: var(--oat-300); overflow: hidden; }
.quizbar__count { font-weight: 700; min-width: 3.4rem; text-align: right; font-variant-numeric: tabular-nums; }
.quizbar__of { color: var(--ink-soft); font-weight: 500; }
.q { max-width: 460px; margin: 0 auto; padding: 30px 22px 48px; }
.q--enter { animation: rise 0.35s cubic-bezier(0.3, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.q__text { font: 700 clamp(1.5rem, 6vw, 1.85rem) / 1.18 var(--font-head); letter-spacing: -0.005em; margin-top: 8px; text-wrap: pretty; }
.q__actions { margin-top: 22px; display: grid; gap: 10px; }
.q__hint { text-align: center; font-size: 0.88rem; color: var(--ink-soft); }
.switch {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 4px; padding: 14px 16px;
  border-radius: var(--r-md); background: #fff; border: 2px solid var(--oat-300); text-align: left; min-height: 72px;
  transition: border-color 0.2s, background 0.2s;
}
.switch[aria-checked="true"] { border-color: var(--gold); background: #fff6dd; }
.switch__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--oat-200); flex: none; }
.switch[aria-checked="true"] .switch__icon { background: var(--gold); color: var(--brand-950); }
.switch__text { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.switch__text span { font-size: 0.86rem; color: var(--ink-soft); }
.switch__track { position: relative; width: 52px; height: 30px; border-radius: 999px; background: var(--oat-300); flex: none; transition: background 0.2s; }
.switch__thumb { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform 0.2s; }
.switch[aria-checked="true"] .switch__track { background: var(--gold); }
.switch[aria-checked="true"] .switch__thumb { transform: translateX(22px); }

/* ── Pages, forms ─────────────────────────────────────────────────────────── */
.page { padding: 12px 20px 64px; max-width: 640px; margin-inline: auto; display: grid; gap: 22px; align-content: start; }
.page--results { max-width: 680px; padding-top: 28px; }
.page > * { min-width: 0; }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; padding: 0; }
.field__hint { font-size: 0.88rem; color: var(--ink-soft); }
.field__err { color: #a12a00; font-weight: 600; font-size: 0.9rem; }
.req, .opt { font-weight: 500; font-size: 0.8rem; color: var(--ink-soft); margin-left: 6px; }
.input {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 18px;
  border: 2px solid var(--oat-300); background: #fff;
}
textarea.input { resize: vertical; min-height: 110px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.input[aria-invalid="true"] { border-color: #a12a00; }
.chips-radio { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.chip-radio span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 999px; background: #fff; border: 2px solid var(--oat-300); font-weight: 500; transition: background 0.15s, color 0.15s; }
.chip-radio input:checked + span { background: var(--brand-700); border-color: var(--brand-700); color: var(--oat-50); }
.chip-radio input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.check { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.check input { width: 26px; height: 26px; margin: 2px 0 0; flex: none; accent-color: var(--brand-700); }
.check .field__hint { display: block; }
.check--inline { align-items: center; font-weight: 500; }
.field--optin { background: #fff; border-radius: var(--r-md); padding: 16px; gap: 18px; border: 2px solid var(--oat-200); }
.form__actions { display: grid; gap: 12px; }
@media (min-width: 520px) { .form__actions { grid-template-columns: repeat(auto-fit, minmax(200px, max-content)); } }
.privacy { background: #fff; border-radius: var(--r-md); padding: 18px; border: 2px solid var(--oat-200); }
.privacy h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 8px; }
.privacy ul { display: grid; gap: 8px; font-size: 0.93rem; }
.privacy li { padding-left: 14px; border-left: 3px solid var(--mint); }
.alert { padding: 14px 16px; border-radius: var(--r-md); font-size: 0.93rem; }
.alert--warn { background: #fdf0b8; }
.preview { background: #fff; border-radius: var(--r-md); padding: 4px 16px 12px; border: 2px solid var(--oat-200); }
.preview summary { min-height: 48px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.preview pre { font: 400 0.78rem/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--oat-100); padding: 12px; border-radius: 12px; margin: 4px 0 8px; }
.status-msg { font-weight: 600; min-height: 1.4em; }
.privacy-toggle summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: 0.92rem; color: var(--ink-soft); cursor: pointer; }
.privacy-toggle[open] summary { margin-bottom: 6px; }
.privacy-toggle .privacy { border-color: var(--oat-200); }

/* ── Results ──────────────────────────────────────────────────────────────── */
.hero { margin-top: calc(var(--cd-h) * -1); padding-top: var(--cd-h); }
.hero { position: relative; background: var(--dark-bg); color: var(--oat-50); border-radius: 0 0 36px 36px; overflow: clip; --focus: #ffb81c; padding-bottom: 34px; }
.hero__body { position: relative; z-index: 1; padding: 22px 22px 0; display: grid; gap: 10px; max-width: 640px; margin-inline: auto; }
.hero__meta { font-size: 0.95rem; color: rgb(253 251 249 / 0.76); margin-top: 6px; }
.hero__meta a { font-weight: 600; color: var(--oat-50); }
.humility { font-weight: 600; padding-left: 14px; border-left: 4px solid var(--gold); margin: 6px 0; text-wrap: balance; }
.humility--hero { font-size: clamp(1.15rem, 4.6vw, 1.45rem); line-height: 1.25; max-width: 24ch; margin-top: 8px; }
.notice { display: grid; gap: 8px; background: #fff; border-radius: var(--r-md); padding: 14px 16px; font-size: 0.92rem; box-shadow: var(--shadow-card); }
.notice p { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.notice .icon { margin-top: 2px; color: var(--lilac-deep); }
.ctx-cta { font-size: 0.92rem; color: var(--ink-soft); }
.ctx-cta a { font-weight: 600; color: var(--ink); }
.section-note { color: var(--ink-soft); margin-top: 6px; font-size: 0.95rem; }
.cards { display: grid; gap: 18px; margin-top: 18px; }

.pcard { background: #fff; border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-card); }
.pcard--pending { background: transparent; box-shadow: none; border: 2px dashed var(--oat-300); }
.pcard__head { display: flex; align-items: center; gap: 12px; }
.pcard__name { flex: 1; min-width: 0; font: 700 1.2rem/1.2 var(--font-head); overflow-wrap: anywhere; }
.rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--oat-200); font-weight: 700; font-size: 0.85rem; flex: none; }
.coin {
  --coin: 52px; position: relative; display: inline-grid; place-items: center; flex: none; width: var(--coin); height: var(--coin);
  border-radius: 50%; overflow: hidden; background: #fff; isolation: isolate;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgb(20 26 23 / 0.14), 0 10px 20px -10px rgb(20 26 23 / 0.55);
}
.coin img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: linear-gradient(135deg, rgb(255 255 255 / 0.34) 0%, rgb(255 255 255 / 0) 44%); }
.coin--text { background: var(--party); color: var(--on-party); }
.coin--text b { font: 700 calc(var(--coin) * 0.27) / 1 var(--font-body); text-align: center; padding: 0 4px; overflow-wrap: anywhere; }
.pcard__head .coin { --coin: 58px; }
@keyframes coin-in { from { opacity: 0; transform: scale(0.4) rotate(-16deg); } }
.pcard--scored .coin { animation: coin-in 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.match { margin-top: 16px; display: grid; gap: 10px; }
.match__line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 1px; }
.match__num { font: 800 4.2rem/0.85 var(--font-display); letter-spacing: 0.005em; font-variant-numeric: tabular-nums; }
.match__pct { font: 800 2.2rem/1 var(--font-display); }
.match__word { font-weight: 500; color: var(--ink-soft); margin: 0 8px 0 5px; }
.match__none { color: var(--ink-soft); }
.bar { height: 14px; border-radius: 999px; background: var(--oat-200); overflow: hidden; }
.bar__fill { display: block; height: 100%; width: calc(var(--pct) * 1%); background: var(--party); border-radius: inherit; transform-origin: left; animation: grow 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes grow { from { transform: scaleX(0); } }

.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; background: var(--oat-200); color: var(--ink); line-height: 1.4; }
.tag--mono { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; }
.tag--orange { background: #ffebc2; }
.tag--lilac { background: #e3e9ff; }
.tag--sand { background: var(--oat-200); }
.tag--ok { background: #d3f0e2; }
.tag--warn { background: #fdefb0; }

/* party context */
.ctx { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-md); background: var(--oat-100); }
.ctx__title { font: 700 0.9rem/1.3 var(--font-body); }
.ctx__title span { font-weight: 500; color: var(--ink-soft); }
.ctx__list { display: grid; gap: 10px; margin-top: 10px; font-size: 0.93rem; }
.ctx__list dt { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.chip-static { padding: 4px 12px; border-radius: 999px; background: #fff; border: 2px solid var(--oat-300); font-size: 0.85rem; }
.chip-static--you { border-color: var(--lilac-deep); background: #e8edff; font-weight: 600; }
.plain { display: grid; gap: 4px; }
.audit { margin-top: 12px; padding: 4px 0 4px 12px; border-left: 4px solid var(--gold); font-size: 0.93rem; display: grid; gap: 4px; }
.audit--independent { border-left-color: var(--mint); }
.audit__label { font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* a party whose manifesto is scoped to one place, not a national platform — see components.js scopeNote() */
.scope-note { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-md); background: #fdf6dc; border: 1px solid rgb(255 184 28 / 0.4); font-size: 0.9rem; line-height: 1.4; display: grid; gap: 6px; }
.scope-note .tag--warn { align-self: start; }

/* "Why you matched" */
.why { margin-top: 18px; }
.why summary {
  list-style: none; display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center;
  padding: 12px 18px; min-height: 60px; border-radius: 999px; border: 2px solid var(--brand-700); cursor: pointer;
  transition: background 0.2s;
}
.why summary::-webkit-details-marker { display: none; }
.why summary:hover { background: var(--oat-100); }
.why__label { font-weight: 700; }
.why__sub { grid-column: 1; font-size: 0.8rem; color: var(--ink-soft); line-height: 1.25; }
.why__chev { grid-column: 2; grid-row: 1 / span 2; transition: transform 0.25s; }
.why[open] .why__chev { transform: rotate(180deg); }
.why[open] summary { background: var(--brand-700); color: var(--oat-50); }
.why[open] .why__sub { color: rgb(253 251 249 / 0.75); }
.why__body { padding-top: 16px; display: grid; gap: 14px; }
.why__meta { display: grid; gap: 4px; font-size: 0.92rem; }
.why__note { background: #fdf6dc; padding: 10px 12px; border-radius: 14px; font-size: 0.88rem; }
.why__explain { font-size: 0.88rem; color: var(--ink-soft); }
.tally { display: flex; flex-wrap: wrap; gap: 8px; }
.status { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; line-height: 1.3; }
.status--same { background: #d3f0e2; }
.status--close { background: #fdefb0; }
.status--different { background: #fad7d4; }
.status--excluded { background: var(--oat-200); color: var(--ink-soft); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg__btn { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--oat-300); background: #fff; font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
.seg__btn[aria-pressed="true"] { background: var(--brand-700); border-color: var(--brand-700); color: var(--oat-50); }
.rows { display: grid; gap: 12px; }
.why__body[data-filter="same"] .row:not([data-status="same"]),
.why__body[data-filter="close"] .row:not([data-status="close"]),
.why__body[data-filter="different"] .row:not([data-status="different"]) { display: none; }

.row { padding: 16px; border-radius: var(--r-md); background: var(--oat-100); border-left: 5px solid var(--oat-300); display: grid; gap: 10px; }
.row[data-status="same"] { border-left-color: var(--mint); }
.row[data-status="close"] { border-left-color: var(--gold); }
.row[data-status="different"] { border-left-color: var(--red); }
.row__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row__top .mono { flex: 1 1 100%; }
.row__q { font-weight: 600; line-height: 1.35; }
.row__note { font-size: 0.86rem; background: #fff; padding: 8px 12px; border-radius: 12px; }
.row__links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.9rem; }
.row .src { color: var(--ink); font-size: 0.92rem; }
.row .src .tag { margin-right: 6px; }

.track { position: relative; height: 78px; margin: 4px 28px 0; }
.track__line { position: absolute; left: 0; right: 0; top: 34px; height: 4px; border-radius: 2px; background: var(--oat-300); }
.track__gap { position: absolute; top: 34px; height: 4px; border-radius: 2px; background: var(--gold); }
.track__stop { position: absolute; top: 36px; width: 8px; height: 8px; border-radius: 50%; background: var(--oat-300); border: 2px solid var(--oat-100); box-sizing: content-box; transform: translate(-50%, -50%); }
.track__m { position: absolute; width: 20px; height: 20px; border-radius: 50%; transform: translate(-50%, -50%); }
.track__m b { position: absolute; left: 50%; transform: translateX(-50%); font: 700 0.7rem/1 var(--font-body); white-space: nowrap; }
.track__m--you { top: 23px; background: #fff; border: 4px solid var(--brand-700); }
.track__m--you b { bottom: 100%; margin-bottom: 4px; }
.track__m--party { top: 49px; background: var(--party); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--brand-700); }
.track__m--party b { top: 100%; margin-top: 7px; }
.track__ends { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--ink-soft); margin-top: -6px; }
.pair { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pair dt { font-size: 0.72rem; font-weight: 600; color: var(--ink-soft); }
.pair dd { font-weight: 600; font-size: 0.88rem; line-height: 1.25; }
.quote { padding: 4px 0 4px 14px; border-left: 4px solid var(--party); display: grid; gap: 4px; }
.quote p { font-weight: 500; }
.quote cite { font: 400 0.72rem/1.4 var(--font-mono); font-style: normal; color: var(--ink-soft); }

.cta-card { background: var(--gold); color: var(--brand-950); border-radius: var(--r-lg); padding: 22px; display: grid; gap: 10px; justify-items: start; }
.cta-card .btn--primary { background: var(--brand-700); }
.pending { display: grid; }
.cards--pending .pcard { display: grid; gap: 10px; }
.pending__reason { font-size: 0.95rem; }
.pending__link { font-size: 0.9rem; }
/* ── Age-group research card ──────────────────────────────────────────────── */
.research { background: #fff; border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow-card); display: grid; gap: 10px; }
.research__picks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.research__pick {
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--oat-300); background: #fff;
  font-weight: 600; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.research__pick:hover:not(:disabled) { border-color: var(--brand-600); }
.research__pick:disabled { cursor: default; }
.research__pick.is-picked { background: var(--brand-700); border-color: var(--brand-700); color: #fff; transform: scale(1.03); }
.research__pick:disabled:not(.is-picked) { opacity: 0.45; }
.research__thanks { font-weight: 600; color: var(--accent-ink); }

.restart { display: grid; gap: 12px; justify-items: start; padding-top: 8px; }
.restart__ask { display: grid; gap: 10px; justify-items: start; }
.disclaimer { padding-top: 20px; border-top: 2px solid var(--oat-300); font-size: 0.88rem; color: var(--ink-soft); display: grid; gap: 8px; }

/* ── Methodology ──────────────────────────────────────────────────────────── */
.prose { gap: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; }
.toc a { padding: 10px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--oat-300); font-size: 0.88rem; font-weight: 500; text-decoration: none; }
.toc a:hover { border-color: var(--brand-700); }
.msec { margin-top: 34px; display: grid; gap: 12px; scroll-margin-top: 16px; }
.msec h2 { font: 800 2.2rem/1.02 var(--font-display); letter-spacing: 0.01em; }
.msec h3 { font: 700 1.2rem/1.2 var(--font-head); margin-top: 8px; }
.msec--meta { border-top: 2px solid var(--oat-300); padding-top: 18px; }
.steps { display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; padding-left: 46px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--brand-950); font-weight: 700; font-size: 0.9rem; }
.bullets { display: grid; gap: 10px; }
.bullets li { padding-left: 16px; border-left: 4px solid var(--oat-300); }
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; background: #fff; border-radius: var(--r-md); overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--oat-200); }
.table thead th { background: var(--oat-200); font-size: 0.8rem; }
.table--calc { font-variant-numeric: tabular-nums; }
.table--calc td, .table--calc th:not(:first-child) { text-align: right; }
.table tfoot th { text-align: left; }
.table-wrap { overflow-x: auto; border-radius: var(--r-md); }
.table--calc th, .table--calc td { padding: 9px 8px; font-size: 0.85rem; white-space: nowrap; }
.pending-mini { display: grid; gap: 12px; }
.pending-mini li { display: flex; gap: 12px; align-items: flex-start; }
.pending-mini p { font-size: 0.9rem; color: var(--ink-soft); }

.hero .topbar__link { color: var(--oat-50); }

/* ── Questionnaire parts ──────────────────────────────────────────────────── */
.progress--parts { display: flex; gap: 6px; background: none; overflow: visible; border-radius: 0; }
.progress__part { display: block; height: 100%; border-radius: 999px; background: var(--oat-300); overflow: hidden; }
.progress__part i { display: block; height: 100%; border-radius: inherit; background: var(--brand-700); transition: width 0.35s cubic-bezier(0.3, 0.7, 0.2, 1); }
.screen--dark .progress__part { background: rgb(255 255 255 / 0.22); }
.screen--dark .progress__part i { background: var(--gold); }
.screen--dark .round-btn { background: rgb(255 255 255 / 0.12); color: var(--oat-50); }
.screen--dark .quizbar__of { color: rgb(253 251 249 / 0.65); }
.eyebrow--row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.part-chip { padding: 4px 12px; border-radius: 999px; background: var(--brand-700); color: var(--oat-50); font-size: 0.76rem; font-weight: 600; }
.q__prompt { display: block; font-weight: 600; padding: 0; margin: 0 0 6px; }

.screen--part { display: flex; flex-direction: column; }
.part { position: relative; z-index: 1; flex: 1; width: 100%; padding: 32px 22px 64px; max-width: 520px; margin-inline: auto; display: grid; gap: 18px; align-content: center; }
.part__num { font: 500 0.85rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.part__tips { display: grid; gap: 10px; }
.part__tips li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: var(--r-md); background: rgb(255 255 255 / 0.11); font-size: 0.96rem; }
.part__tips .icon { color: var(--mint); margin-top: 2px; }
.part .btn { margin-top: 8px; }

.intro__parts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.intro__parts li { display: grid; justify-items: center; gap: 4px; padding: 14px 6px; border-radius: var(--r-md); background: rgb(255 255 255 / 0.11); text-align: center; }
.intro__parts strong { font: 800 2.8rem/0.9 var(--font-display); letter-spacing: 0.01em; }
.intro__parts span { font-size: 0.84rem; color: rgb(253 251 249 / 0.75); }

/* multiple choice */
.choices { border: 0; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; min-width: 0; }
.choice { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; min-height: 64px; cursor: pointer; transition: transform 0.15s; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.choice__bg { position: absolute; inset: 0; border-radius: var(--r-md); background: #fff; border: 2px solid var(--oat-300); transition: background 0.2s, border-color 0.2s; }
.choice:hover .choice__bg { border-color: var(--brand-500); }
.choice:active { transform: scale(0.99); }
.choice__mark, .choice__text { position: relative; z-index: 1; }
.choice__mark { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--oat-300); color: transparent; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.choice__mark .icon { width: 16px; height: 16px; stroke-width: 3; }
.choice__text { font-weight: 500; line-height: 1.35; transition: color 0.2s; }
.choice input:checked ~ .choice__bg { background: var(--brand-700); border-color: var(--brand-700); }
.choice input:checked ~ .choice__text { color: var(--oat-50); }
.choice input:checked ~ .choice__mark { background: var(--mint); border-color: var(--mint); color: var(--brand-950); animation: mark-pop 0.32s cubic-bezier(0.3, 1.6, 0.5, 1); }
.choice input:focus-visible ~ .choice__bg { outline: 3px solid var(--focus); outline-offset: 3px; }
@keyframes mark-pop { from { transform: scale(0.6); } }

/* voter's own words, in results (multiple-choice only: "You chose …") */
.you-said { font-size: 0.95rem; background: #fff; padding: 10px 12px; border-radius: 14px; overflow-wrap: anywhere; }
.you-said .tag { margin-right: 6px; }

/* ── Splash (preloader) ───────────────────────────────────────────────────── */
.preloader {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow: hidden; color: var(--oat-50);
  background: radial-gradient(120% 80% at 50% 30%, #0f7a50 0%, #0a4a33 40%, #0e1512 80%);
  transition: opacity 0.5s ease, transform 0.5s ease;
  animation: pl-failsafe 0.3s 25s forwards;
}
.preloader.is-leaving { opacity: 0; transform: scale(1.04); pointer-events: none; }
@keyframes pl-failsafe { to { opacity: 0; visibility: hidden; } }
.pl__rings { position: absolute; left: 50%; top: 42%; width: 0; height: 0; }
.pl__rings::before, .pl__rings::after {
  content: ""; position: absolute; left: 0; top: 0; width: min(92vw, 540px); height: min(92vw, 540px);
  border-radius: 50%; border: 2px solid rgb(255 255 255 / 0.07); transform: translate(-50%, -50%) scale(0.45); opacity: 0;
  animation: pl-ring 3.4s ease-out infinite;
}
.pl__rings::after { animation-delay: -1.7s; }
@keyframes pl-ring { from { transform: translate(-50%, -50%) scale(0.45); opacity: 1; } to { transform: translate(-50%, -50%) scale(1.15); opacity: 0; } }
.pl__inner { position: relative; display: grid; justify-items: center; gap: 24px; width: min(100%, 460px); padding: 24px; text-align: center; }
.pl__brand { width: min(50vw, 210px); }
.pl__lockup { width: 100%; height: auto; }
.preloader { --vm-bubble: #009a5c; --vm-red: #e8503f; --vm-ink: #fff; }
.pl__box { width: min(54vw, 220px); height: auto; filter: drop-shadow(0 24px 40px rgb(0 0 0 / 0.4)); }
.pl__body { fill: rgb(253 251 249 / 0.05); stroke: rgb(253 251 249 / 0.42); stroke-width: 2.5; stroke-linejoin: round; }
.pl__liquid { transform: translateY(var(--fy, 224px)); }
.pl__wave--back { fill: var(--gold); opacity: 0.5; animation: pl-wave 2.6s linear infinite; }
.pl__wave--front { fill: url(#pl-grad); animation: pl-wave 1.8s linear infinite reverse; animation-delay: -0.7s; }
@keyframes pl-wave { to { transform: translateX(100px); } }
.pl__slit { fill: var(--brand-950); }
.pl__emblem { fill: none; stroke: rgb(253 251 249 / 0.42); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.pl__paper { transform: translateY(0); }
.is-cast .pl__paper { animation: pl-drop 0.8s cubic-bezier(0.45, 0, 0.75, 0.55) forwards; }
.is-cast .pl__box { animation: pl-thump 0.4s 0.62s ease-out; }
@keyframes pl-drop { to { transform: translateY(150px); } }
@keyframes pl-thump { 40% { transform: scale(1.05); } }
.pl__phrase { font: 800 clamp(2.2rem, 9.5vw, 3rem) / 1 var(--font-display); letter-spacing: 0.01em; min-height: 2.1em; max-width: 14ch; text-wrap: balance; transition: opacity 0.24s, transform 0.24s; }
.pl__phrase.is-out { opacity: 0; transform: translateY(8px); }
.pl__pct { font: 500 0.85rem/1 var(--font-mono); color: rgb(253 251 249 / 0.55); }
.pl__pct span { font-variant-numeric: tabular-nums; }
@media (max-height: 640px) { .pl__box { width: 150px; } .pl__inner { gap: 14px; } }

/* ── Start bar: the intro's main action, pinned so it is always on screen ──── */
.startbar {
  position: sticky; bottom: 0; z-index: 20; display: grid; justify-items: center; gap: 8px;
  padding: 26px 18px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgb(14 21 18 / 0) 0%, rgb(14 21 18 / 0.9) 42%, #0e1512 100%);
}
.startbar .btn { max-width: 520px; animation: cta-pulse 2.6s ease-in-out 1.2s infinite; }
.startbar__note { font-size: 0.82rem; color: rgb(248 247 255 / 0.8); text-align: center; }
@keyframes cta-pulse { 0%, 100% { box-shadow: 0 12px 30px -10px rgb(255 184 28 / 0.65), inset 0 -3px 0 rgb(0 0 0 / 0.12), 0 0 0 0 rgb(255 184 28 / 0.5); } 60% { box-shadow: 0 12px 30px -10px rgb(255 184 28 / 0.65), inset 0 -3px 0 rgb(0 0 0 / 0.12), 0 0 0 14px rgb(255 184 28 / 0); } }

/* ── Start-button "stamp": plays once on click, before the page it leads to loads ──── */
.btn.is-launching { position: relative; animation: btn-stamp 0.32s cubic-bezier(0.3, 0.7, 0.2, 1) both; }
.btn.is-launching::after {
  content: ""; position: absolute; inset: -6px; border-radius: inherit; pointer-events: none;
  border: 3px solid rgb(255 255 255 / 0.9); opacity: 0.9; animation: btn-ring 0.42s ease-out both;
}
@keyframes btn-stamp { 0% { transform: scale(1); } 40% { transform: scale(0.92); } 72% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes btn-ring { from { transform: scale(0.82); opacity: 0.85; } to { transform: scale(1.4); opacity: 0; } }

/* ── Small decorative icon prefixing an eyebrow or section heading ──────────── */
.eyebrow__ico { width: 1em; height: 1em; margin-right: 6px; vertical-align: -0.15em; }
.h-ico { width: 0.8em; height: 0.8em; margin-right: 9px; vertical-align: 0.02em; color: var(--brand-700); }
.screen--dark .h-ico, .hero .h-ico { color: var(--mint); }

/* ── Top bar: live countdown on the left, Voto on the right, on every screen ─ */
.vbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  height: var(--cd-h); padding: 0 18px 0 20px; transition: background 0.25s, box-shadow 0.25s;
}
.vbar.is-stuck { background: rgb(246 248 247 / 0.88); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 rgb(20 26 23 / 0.08); }
.screen--dark .vbar.is-stuck { background: rgb(14 21 18 / 0.84); box-shadow: 0 1px 0 rgb(255 255 255 / 0.08); }
.vbar__brand { display: block; flex: none; width: clamp(72px, 22vw, 96px); line-height: 0; border-radius: 8px; }
.vbar__brand .vl { width: 100%; }

/* brand colours follow the screen: dark pack colours on dark screens */
.vm__bubble { fill: var(--vm-bubble, #007749); }
.vm__red { stroke: var(--vm-red, #de3831); }
.vm__ink { fill: var(--vm-ink, #141a17); }
.screen--dark, .hero { --vm-bubble: #009a5c; --vm-red: #e8503f; --vm-ink: #fff; }
/* on the results page the bar starts over the dark header, then turns to light glass once you scroll */
.screen--results .vbar:not(.is-stuck) { --vm-bubble: #009a5c; --vm-red: #e8503f; --vm-ink: #fff; }

/* the clock: a row of split-flap cards */
.clock { display: grid; justify-items: start; }
.clock__cards { display: flex; align-items: flex-end; }
.clock__unit { display: flex; }
.clock__today { font: 800 1.35rem/1 var(--font-display); letter-spacing: 0.02em; color: var(--gold); display: none; }
.clock[data-phase="today"] .clock__cards { display: none; }
.clock[data-phase="today"] .clock__today { display: block; }
.clock[data-phase="after"] { display: none; }
.clock__lab { font: 600 0.7rem/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }

.clock--mini .clock__cards { gap: 7px; }
.clock--mini .clock__unit { align-items: flex-end; gap: 2px; }
.clock--mini .clock__lab { font-size: 0.6rem; letter-spacing: 0.04em; padding-bottom: 2px; }
.clock--mini .fc { --fc-h: 32px; width: 25px; font-size: 1.32rem; border-radius: 6px; box-shadow: 0 5px 8px -5px rgb(0 0 0 / 0.7); perspective: 200px; }
.clock--mini .fc__top, .clock--mini .fc__flap-top { border-radius: 6px 6px 0 0; }
.clock--mini .fc__bottom, .clock--mini .fc__flap-bottom { border-radius: 0 0 6px 6px; }
.clock--mini .fc::after { display: none; }
.clock--mini .fc::before { height: 1px; margin-top: -0.5px; }
.clock--mini .fc__half span { text-shadow: 0 1px 0 rgb(0 0 0 / 0.4); }

.clock--lg { justify-items: stretch; }
.clock--lg .clock__cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: start; }
.clock--lg .clock__unit { display: grid; justify-items: center; gap: 10px; }

/* split-flap card: top half, bottom half, and two flaps that hinge on the centre line */
.fc {
  --fc-h: clamp(80px, 25vw, 94px);
  position: relative; width: 100%; height: var(--fc-h); perspective: 520px; border-radius: 12px;
  font-size: clamp(3.1rem, 13.5vw, 3.9rem);
  box-shadow: 0 12px 20px -12px rgb(0 0 0 / 0.9);
}
.fc__half { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; color: #f4f7f5; backface-visibility: hidden; }
.fc__half span {
  position: absolute; left: 0; right: 0; height: 200%; display: grid; place-items: center;
  padding-top: 0.14em; /* optically centre the digits on the hinge */
  font: 800 1em/1 var(--font-display); letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgb(0 0 0 / 0.4);
}
.fc__top, .fc__flap-top { top: 0; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, #474c49 0%, #2e3230 100%); }
.fc__bottom, .fc__flap-bottom { bottom: 0; border-radius: 0 0 12px 12px; background: linear-gradient(180deg, #242826 0%, #1a1d1b 100%); }
.fc__bottom span, .fc__flap-bottom span { bottom: 0; }
.fc__top span, .fc__flap-top span { top: 0; }
.fc__flap-top { z-index: 3; transform-origin: 50% 100%; }
.fc__flap-bottom { z-index: 2; transform-origin: 50% 0; transform: rotateX(90deg); }
.fc.is-flipping .fc__flap-top { animation: fc-fold 0.28s cubic-bezier(0.55, 0, 1, 0.6) forwards; }
.fc.is-flipping .fc__flap-bottom { animation: fc-unfold 0.32s 0.28s cubic-bezier(0.2, 0.6, 0.3, 1) forwards; }
@keyframes fc-fold { to { transform: rotateX(-90deg); } }
@keyframes fc-unfold { to { transform: rotateX(0deg); } }
.fc::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: #090c0a; z-index: 5; box-shadow: 0 1px 0 rgb(255 255 255 / 0.05); }
.fc::after { content: ""; position: absolute; left: -1px; right: -1px; top: calc(50% - 4px); height: 8px; z-index: 6; pointer-events: none;
  background: radial-gradient(circle at 0 50%, #141715 3.5px, transparent 4px), radial-gradient(circle at 100% 50%, #141715 3.5px, transparent 4px); }

/* ── Candidate lists (ballot information: visually separate from the match) ─ */
.cands { margin-top: 16px; padding-top: 6px; border-top: 2px dashed var(--oat-300); }
.cands > summary {
  list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-height: 52px; cursor: pointer;
  font-weight: 600; padding-right: 26px; position: relative;
}
.cands > summary::-webkit-details-marker { display: none; }
.cands > summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); transition: transform 0.2s;
}
.cands[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.cands__body { display: grid; gap: 12px; padding: 4px 0 6px; }
.cands__note, .cands__match { font-size: 0.86rem; color: var(--ink-soft); }
.cands__match { font-family: var(--font-mono); font-size: 0.74rem; }
.cands__status, .cands__none { font-size: 0.92rem; color: var(--ink-soft); }
.cands__status--err { color: #a12a00; font-weight: 600; }
.cands__search { min-height: 46px; }
.cands__lists { max-height: min(60vh, 420px); overflow-y: auto; border-radius: var(--r-md); background: var(--oat-100); padding: 4px 14px 10px; }
.cands__h { position: sticky; top: 0; background: var(--oat-100); padding: 12px 0 6px; font: 700 0.85rem/1.2 var(--font-body); }
.cands__h span { font-weight: 500; color: var(--ink-soft); }
.cands__list { display: grid; }
.cands__list li { display: grid; grid-template-columns: 5.6rem 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--oat-200); align-items: baseline; }
.cands__no { font: 500 0.76rem/1.3 var(--font-mono); color: var(--ink-soft); }
.cands__name { font-weight: 500; overflow-wrap: anywhere; }
.cands__count { font-size: 0.82rem; color: var(--ink-soft); }
.others { display: grid; gap: 4px; }
.cands__others { display: grid; }
.cands--nested { margin-top: 0; border-top: 1px solid var(--oat-300); border-style: solid; padding-top: 0; }
.cands__sub { font: 500 0.78rem/1 var(--font-mono); color: var(--ink-soft); }
.pcard--pending .cands { margin-top: 12px; }

/* ── Party ribbons (intro): two bands of coins flowing in opposite directions ─ */
.parties { display: grid; gap: 12px; margin-top: 4px; }
.parties__k { font: 500 0.78rem/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: rgb(244 247 245 / 0.78); }
.parties__k strong { color: var(--gold); font-weight: 500; }
.ribbons {
  position: relative; margin: 16px -22px 12px; display: grid; gap: 10px; transform: rotate(-3.5deg);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.ribbon { overflow: hidden; padding-block: 12px; background: rgb(255 255 255 / 0.07); border-block: 1px solid rgb(255 255 255 / 0.14); }
.ribbon--b { background: rgb(255 184 28 / 0.09); border-color: rgb(255 184 28 / 0.28); }
.ribbon__rail { display: flex; width: max-content; animation: ribbon-flow var(--dur, 50s) linear infinite; will-change: transform; }
.ribbon--b .ribbon__rail { animation-direction: reverse; }
.ribbon__track { display: flex; gap: 18px; padding-right: 18px; }
.ribbon__item { display: block; cursor: pointer; animation: bob 5s ease-in-out infinite; animation-delay: calc(var(--i) * -0.55s); }
.ribbon__item .coin { --coin: 70px; transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1); }
.ribbon__item:hover .coin { transform: scale(1.18); }
.ribbons.is-held .ribbon__rail { animation-play-state: paused; }
@keyframes ribbon-flow { to { transform: translateX(-50%); } }
@keyframes bob { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }
.parties__name { min-height: 1.5em; text-align: center; font: 500 0.82rem/1.4 var(--font-mono); color: rgb(244 247 245 / 0.82); }

/* ── Big countdown (intro) ─────────────────────────────────────────────────── */
.bigclock {
  display: grid; gap: 6px; padding: 20px 18px 22px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.11), rgb(255 255 255 / 0.04)); border: 1px solid rgb(255 255 255 / 0.13);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.6);
}
.bigclock__k { font: 500 0.74rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.bigclock__date { font: 800 clamp(1.7rem, 7.6vw, 2.2rem) / 1.02 var(--font-display); letter-spacing: 0.01em; margin-bottom: 12px; }
.intro__foot { display: flex; align-items: center; gap: 12px; padding-top: 6px; color: rgb(244 247 245 / 0.72); font-size: 0.88rem; }
.flagchip { width: 54px; height: 36px; border-radius: 6px; object-fit: cover; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.28), 0 8px 16px -8px rgb(0 0 0 / 0.7); }

@media (prefers-reduced-motion: reduce) {
  .ribbons { transform: none; -webkit-mask-image: none; mask-image: none; margin-inline: 0; }
  .ribbon--b, .ribbon__track[aria-hidden="true"] { display: none; }
  .ribbon { background: none; border: 0; }
  .ribbon__rail { width: auto; }
  .ribbon__track { flex-wrap: wrap; justify-content: center; }
}

/* question header: icon tile + part chip + category */
.q__head { display: flex; align-items: center; gap: 13px; }
.q__meta { display: grid; gap: 5px; justify-items: start; min-width: 0; }
.q__cat { font-weight: 600; font-size: 0.92rem; color: var(--accent-ink); line-height: 1.2; }

/* ── Category icons ────────────────────────────────────────────────────────── */
.cat-ico { width: 1.25em; height: 1.25em; flex: none; }
.cat-tile {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 15px; color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 10px 18px -10px rgb(0 119 73 / 0.8), inset 0 1px 0 rgb(255 255 255 / 0.28);
}
.cat-tile .cat-ico { width: 27px; height: 27px; }
.q--enter .cat-tile { animation: tile-pop 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes tile-pop { from { opacity: 0; transform: scale(0.5) rotate(-10deg); } }
.row__top .mono .cat-ico, .recap__list .mono .cat-ico { width: 15px; height: 15px; vertical-align: -3px; margin-right: 6px; color: var(--brand-700); }

/* ── Short screens (e.g. small phones): keep "Continue" in reach ───────────── */
@media (max-height: 720px) {
  html { font-size: 100%; }
  :root { --cd-h: 40px; }
  .quizbar, .topbar { padding-top: 6px; }
  .q { padding-top: 6px; padding-bottom: 20px; }
  .q__text { font-size: 1.3rem; margin-top: 4px; line-height: 1.16; }
  .screen--quiz .dial { margin: 0 auto 36px; }
  .dial__readout { min-height: 3rem; gap: 0; }
  .dial__word { font-size: 2.3rem; }
  .dial__word--empty { font-size: 1.05rem; padding-top: 4px; }
  .dial__signed { font-size: 1rem; }
  .switch { min-height: 54px; padding-block: 6px; margin-top: 0; }
  .cat-tile { width: 38px; height: 38px; border-radius: 12px; }
  .cat-tile .cat-ico { width: 22px; height: 22px; }
  .q__head { gap: 10px; }
  .q__actions { margin-top: 8px; }
}

/* ── Motion preferences ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
