/* Quiz Night — Ink / Paper / Signal Red, system Helvetica/Arial.
   Light and dark are both first-class: the tokens below are the light set,
   redefined once for the system preference and once for an explicit choice. */

:root {
  --ink: #0B0B0F;
  --paper: #FFFFFF;
  --signal: #E8342B;

  /* The page ground is tinted and every panel is an opaque, lighter fill, so a
     card always reads as a solid sheet laid over the drifting motif behind it —
     nothing shows through underneath text. */
  --bg: #F1F1F6;            /* page ground */
  --bg-2: #E8E8EF;          /* page bands */
  --panel: #FFFFFF;         /* cards — opaque, distinct from the ground */
  --surface: #ECECF2;       /* buttons, chips, inputs — never equal to --panel */
  --surface-h: #DFDFE8;     /* hover */
  --text: #0B0B0F;
  --muted: #5C5C66;
  --faint: #83838E;
  --line: #DDDDE5;
  --accent: #E8342B;
  --on-accent: #FFFFFF;
  --solid: #0B0B0F;         /* primary button fill */
  --on-solid: #FFFFFF;
  --good: #147A45;
  --good-bg: #E7F5EE;
  --bad: #C02A22;
  --bad-bg: #FCEBE9;
  --shadow: 0 1px 2px rgba(11,11,15,.05), 0 6px 20px rgba(11,11,15,.07);
  --r: 10px;
  --r-lg: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08080C;
    --bg-2: #101015;
    --panel: #191921;
    --surface: #26262F;
    --surface-h: #32323C;
    --text: #F3F3F5;
    --muted: #A0A0AC;
    --faint: #7A7A86;
    --line: #2B2B34;
    --on-accent: #FFFFFF;
    --solid: #F3F3F5;
    --on-solid: #0B0B0F;
    --good: #4FCA8B;
    --good-bg: #12291D;
    --bad: #FF8F86;
    --bad-bg: #31171A;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 6px 20px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #08080C;
  --bg-2: #101015;
  --panel: #191921;
  --surface: #26262F;
  --surface-h: #32323C;
  --text: #F3F3F5;
  --muted: #A0A0AC;
  --faint: #7A7A86;
  --line: #2B2B34;
  --on-accent: #FFFFFF;
  --solid: #F3F3F5;
  --on-solid: #0B0B0F;
  --good: #4FCA8B;
  --good-bg: #12291D;
  --bad: #FF8F86;
  --bad-bg: #31171A;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 6px 20px rgba(0,0,0,.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: the page is at least a full screen tall and main takes up
     the slack, so the footer sits on the bottom edge even on short pages. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 999; background: var(--solid); color: var(--on-solid); padding: 10px 16px; }

/* --------------------------------------------------- the quiz-mark motif */
/* Faint question marks drifting behind the page. This is what stops the site
   reading as a catalogue of films — it says "quiz" before you read a word. */
.quizfield { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.quizfield > span {
  position: absolute; font-weight: 800; user-select: none; line-height: 1;
  animation: drift 26s ease-in-out infinite;
}
/* Two inks, assigned per mark: signal red and near-black. In dark mode the
   black one would vanish, so it flips to white and keeps the pairing. */
.quizfield > span.qf-red { color: var(--accent); opacity: .85; }
.quizfield > span.qf-ink { color: #0B0B0F; opacity: .70; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .quizfield > span.qf-ink { color: #FFFFFF; opacity: .30; }
  :root:not([data-theme="light"]) .quizfield > span.qf-red { opacity: .72; }
}
:root[data-theme="dark"] .quizfield > span.qf-ink { color: #FFFFFF; opacity: .30; }
:root[data-theme="dark"] .quizfield > span.qf-red { opacity: .72; }
.quizfield > span.d2 { animation-name: drift-2; }
.quizfield > span.d3 { animation-name: drift-3; }
.quizfield > span.d4 { animation-name: drift-4; }
.quizfield .qf-knight { width: 1em; height: 1.15em; display: block; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
  33%      { transform: translate(18px, -26px) rotate(calc(var(--rot, 0deg) + 9deg)); }
  66%      { transform: translate(-14px, -12px) rotate(calc(var(--rot, 0deg) - 7deg)); }
}
@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
  40%      { transform: translate(-24px, 20px) rotate(calc(var(--rot, 0deg) - 11deg)); }
  75%      { transform: translate(14px, 10px) rotate(calc(var(--rot, 0deg) + 8deg)); }
}
@keyframes drift-3 {
  0%, 100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
  30%      { transform: translate(22px, 16px) rotate(calc(var(--rot, 0deg) + 12deg)); }
  70%      { transform: translate(-10px, 24px) rotate(calc(var(--rot, 0deg) - 6deg)); }
}
@keyframes drift-4 {
  0%, 100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
  45%      { transform: translate(-20px, -22px) rotate(calc(var(--rot, 0deg) + 14deg)); }
  80%      { transform: translate(-6px, 12px) rotate(calc(var(--rot, 0deg) - 9deg)); }
}
@media (prefers-reduced-motion: reduce) { .quizfield span { animation: none; } }

.sitefield {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.sitefield .quizfield { position: absolute; inset: 0; }
/* Below this width the page fills the screen edge to edge, so there are no
   margins left to drift in — and a mark would have nowhere to go but on top of
   the words. It steps aside rather than crowding the content. */
@media (max-width: 1100px) { .sitefield { display: none; } }

/* --------------------------------------------------------------- brand */
.logo-lockup { height: 28px; width: auto; display: block; }
.logo-lockup.foot { height: 20px; opacity: .9; }

/* --------------------------------------------------------------- topbar */
.topbar {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 13px 26px; background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 500;
}
.brand { display: flex; align-items: center; text-decoration: none; color: var(--text); }
.mainnav { display: flex; gap: 20px; flex-wrap: wrap; }
.mainnav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13px;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.mainnav a:hover { color: var(--text); }
.mainnav a.on { color: var(--text); border-bottom-color: var(--accent); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.searchbar input {
  width: 190px; padding: 8px 13px; border-radius: 99px; font: inherit; font-size: 13px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.searchbar input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.whoami {
  font-size: 12.5px; font-weight: 700; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 99px;
}
.whoami:hover { background: var(--surface-h); }

.themetoggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 34px; padding: 0; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  cursor: pointer;
}
.themetoggle:hover { background: var(--surface-h); }
.themetoggle svg { width: 16px; height: 16px; display: block; }
.themetoggle .i-sun { display: none; }
:root[data-theme="dark"] .themetoggle .i-sun { display: block; }
:root[data-theme="dark"] .themetoggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themetoggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .themetoggle .i-moon { display: none; }
}

main {
  max-width: 1120px; width: 100%; margin: 0 auto; padding: 30px 26px 48px;
  position: relative; z-index: 1;
  flex: 1 0 auto;              /* pushes the footer down to the bottom edge */
}
main.wide { max-width: 1300px; }

/* Text that isn't inside a panel gets a halo of the page colour, so a drifting
   knight can never sit on top of a word and make it hard to read. */
main > h1, main > h2, main > h3, main > p, main > .lede,
main section > h2, .home-stage > h1, .rail-panel > h2, .rail-panel > p,
.index-group > h3, .dest .city-name, .tally-line {
  text-shadow: 0 0 5px var(--bg), 0 0 11px var(--bg), 0 0 18px var(--bg);
}

/* --------------------------------------------------------------- footer */
footer {
  flex: none; border-top: 1px solid var(--line);
  padding: 14px 26px 16px; background: var(--bg-2);
  position: relative; z-index: 2;
}
.foot-inner { max-width: 1120px; margin: 0 auto; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.foot-inner p { color: var(--muted); font-size: 12px; margin: 3px 0 0; }
.foot-inner nav { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-inner nav a { color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600; }
.foot-inner nav a:hover { color: var(--text); }
.credits { max-width: 1120px; margin: 9px auto 0; color: var(--faint); font-size: 10.5px; line-height: 1.5; }
.credits a { color: var(--faint); }

/* --------------------------------------------------------------- basics */
h1 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 8px; line-height: 1.2; }
h2 { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; margin: 34px 0 12px; color: var(--muted); }
h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.lede { color: var(--muted); margin: 0 0 22px; font-size: 15px; max-width: 64ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.req { color: var(--accent); }
code { background: var(--surface); padding: 2px 7px; border-radius: 5px; font-size: 12.5px; }

/* ------------------------------------------------------------- buttons */
/* Every button is a filled surface. Nothing here is ever the same colour as
   the page behind it, so it always reads as something you can press. */
button, .btn {
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  padding: 11px 20px; border-radius: 99px; border: 1px solid transparent;
  background: var(--solid); color: var(--on-solid); text-decoration: none;
  display: inline-block; text-align: center; line-height: 1.2;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
button:active, .btn:active { transform: translateY(0); }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-signal { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-signal:hover { background: #cf2a22; }

/* the "secondary" button is still filled — a surface, not a ghost */
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-h); }

button.small, .btn.small { padding: 7px 14px; font-size: 12.5px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px; margin-bottom: 14px;
}
.card.empty { text-align: center; padding: 36px 20px; }

.flash {
  padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; font-size: 14px;
  border-left: 3px solid var(--muted); background: var(--surface);
}
.flash-error { border-left-color: var(--accent); background: var(--bad-bg); color: var(--bad); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 12px; }
.section-head a { color: var(--muted); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.section-head a:hover { color: var(--accent); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th {
  color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase;
  letter-spacing: .1em; position: sticky; top: 0; background: var(--panel); z-index: 1;
}
tr.is-me td { background: var(--surface); }
tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.is-hidden td { opacity: .45; }

/* ---------------------------------------------------------- scroll areas */
/* Long lists get their own scroller instead of running down the page. */
.scroll-y { overflow-y: auto; overscroll-behavior: contain; }
.scroll-y.h-sm { max-height: 300px; }
.scroll-y.h-md { max-height: 420px; }
.scroll-y.h-lg { max-height: 560px; }
.scroll-y { scrollbar-width: thin; scrollbar-color: var(--surface-h) transparent; }
.scroll-y::-webkit-scrollbar { width: 10px; }
.scroll-y::-webkit-scrollbar-track { background: transparent; }
.scroll-y::-webkit-scrollbar-thumb { background: var(--surface-h); border-radius: 99px; border: 3px solid var(--panel); }
.scroll-y::-webkit-scrollbar-thumb:hover { background: var(--faint); }
.scroll-x { overflow-x: auto; scrollbar-width: thin; }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.inline-form { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.inline-form select { flex: 1; min-width: 190px; }

label.field { display: block; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; color: var(--muted); }
select, input[type=number], input[type=text], input[type=email], input[type=url],
input[type=password], input[type=search], input[type=datetime-local], input[type=date], textarea {
  width: 100%; padding: 11px 13px; border-radius: var(--r); font: inherit; font-size: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; }
.checkline { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; }

/* ----------------------------------------------------------------- hero */
.hero {
  position: relative; margin: -30px -26px 34px; overflow: hidden;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.hero-art { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; opacity: .22; }
.rail { display: flex; gap: 10px; width: max-content; will-change: transform; }
.rail-a { animation: slide-l 74s linear infinite; }
.rail-b { animation: slide-r 92s linear infinite; }
.rail-c { animation: slide-l 104s linear infinite; }
.rail img, .rail .ph { width: 92px; height: 132px; object-fit: cover; border-radius: 6px; background: var(--surface); flex: none; }
@keyframes slide-l { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes slide-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .rail-a, .rail-b, .rail-c { animation: none; } }

.hero-veil {
  position: relative; z-index: 2; padding: 38px 26px 40px;
  background:
    linear-gradient(100deg, var(--bg-2) 0%, color-mix(in srgb, var(--bg-2) 88%, transparent) 52%, color-mix(in srgb, var(--bg-2) 62%, transparent) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-2) 78%, transparent) 0%, color-mix(in srgb, var(--bg-2) 58%, transparent) 40%, var(--bg-2) 100%);
}
.hero-inner { max-width: 1120px; margin: 0 auto; position: relative; z-index: 2; }
.hero-lead { text-align: center; }
.hero-lead .kicker { justify-content: center; }
.hero-lead .lede { margin-left: auto; margin-right: auto; }
.hero-wheel { display: flex; justify-content: center; margin: 6px 0 4px; }
.hero-wheel .wheel { margin: 0; }
.hero h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 0 auto; }
.hero .lede { font-size: 15px; margin-bottom: 0; }
.hero .count-line { font-size: 13.5px; font-weight: 500; color: var(--muted); margin: 10px 0 0; }
.hero .count-line strong { font-weight: 800; color: var(--text); }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.kicker::before { content: ""; width: 20px; height: 2px; background: var(--accent); }

/* -------------------------------------------------------- service cards */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 26px; }
.service {
  position: relative; display: block; text-decoration: none; color: inherit;
  padding: 20px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--panel);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.service:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.service .num { font-size: 10.5px; font-weight: 800; letter-spacing: .16em; color: var(--accent); display: block; margin-bottom: 10px; }
.service h3 { font-size: 15px; margin-bottom: 5px; }
.service p { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.service .go { font-size: 12.5px; font-weight: 700; }
.service .go::after { content: " →"; }

/* --------------------------------------------------------- quiz cards */
/* Deliberately NOT a poster wall. The cover is a thumbnail; what the card is
   actually selling is the quiz — how many questions, and a button to play it. */
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 12px; }
.qtile {
  display: grid; grid-template-columns: 54px 1fr; gap: 13px; align-items: center;
  padding: 12px; border-radius: var(--r-lg);
  background: var(--panel); border: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.qtile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.qtile-art {
  position: relative; width: 54px; height: 78px; border-radius: 7px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); flex: none;
}
.qtile-art img { width: 100%; height: 100%; object-fit: cover; }
.qtile-art .ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: var(--faint);
}
.qtile-body { min-width: 0; }
.qtile-name {
  display: block; font-size: 14px; font-weight: 700; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.qtile-sub {
  display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.qtile-foot { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.pill {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 99px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
}
.pill-play { background: transparent; color: var(--accent); border-color: var(--accent); }
.qtile:hover .pill-play { background: var(--accent); color: var(--on-accent); }

/* ------------------------------------------------------------ prize wheel */
/* Rings of cover art turning in opposite directions, with the spin button at
   the hub. This is the thing that says "game show" rather than "streaming". */
.wheel {
  position: relative; width: min(760px, 92vw); aspect-ratio: 1;
  margin: 2px auto 14px; isolation: isolate;
  --glow: .4;                  /* raised by JS as the cursor crosses a cover */
}
/* The ring divs are full-size transparent boxes stacked on top of each other,
   so the topmost one swallowed every click meant for the rings beneath it.
   Only the covers themselves take pointer events. */
.ring { position: absolute; inset: 0; animation: turn 90s linear infinite; pointer-events: none; }
.ring-item { pointer-events: auto; }
.ring.rev { animation-direction: reverse; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ring { animation: none; } }

.ring-item {
  position: absolute; top: 50%; left: 50%; width: var(--w);
  aspect-ratio: 2 / 3; margin: calc(var(--w) * -0.75) 0 0 calc(var(--w) / -2);
  transform: rotate(var(--a)) translateY(calc(var(--r) * -1));
  border-radius: 6px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(11,11,15,.10);
  transition: filter .15s ease;
}
.ring-item img { width: 100%; height: 100%; object-fit: cover; }
.ring-item .ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--faint); font-weight: 800; }
.ring-item { transition: filter .12s ease, box-shadow .12s ease, outline-color .12s ease;
  outline: 2px solid transparent; outline-offset: 1px; }
.ring-item:hover, .ring-item:focus-visible {
  filter: brightness(1.16) saturate(1.12);
  outline-color: var(--accent);
  box-shadow: 0 4px 16px rgba(232,52,43,.4);
  z-index: 4;
}
/* The cover you've picked stays marked while the ring carries on turning. */
.ring-item.is-picked {
  outline: 3px solid var(--accent); outline-offset: 2px;
  filter: brightness(1.12) saturate(1.1);
  box-shadow: 0 0 0 4px rgb(232 52 43 / .22), 0 6px 20px rgb(232 52 43 / .45);
  z-index: 5;
}

/* The hub is a small red knight with its label underneath — one link, and no
   button laid over the horse. */
.wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 3; text-align: center; width: 26%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; background: none; border-radius: 0; box-shadow: none;
}
.hub-go {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-decoration: none; color: var(--text); padding: 10px 14px;
  transition: transform .18s ease;
}
.hub-go:hover, .hub-go:focus-visible { transform: translateY(-2px); }
.hub-go:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r); }
.hub-knight {
  width: 46%; height: auto; color: var(--accent);
  filter: drop-shadow(0 6px 18px rgb(232 52 43 / calc(var(--glow) * .55)));
  transition: filter .2s ease;
}
.hub-word {
  font-size: 15px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap;
  color: var(--text);
  /* The label sits over the turning covers, so it carries the page colour with
     it rather than relying on whatever happens to be behind it. */
  text-shadow: 0 0 6px var(--bg), 0 0 12px var(--bg), 0 0 20px var(--bg),
               0 0 30px var(--bg);
}
.hub-go:hover .hub-word { color: var(--accent); }
.wheel-hub .hub-pick { position: relative; z-index: 1; }
@media (max-width: 560px) { .hub-word { font-size: 12.5px; } }
.hub-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
/* The title you've picked, named under the button so you know what you'll get. */
.hub-pick {
  max-width: 86%; font-size: 11px; font-weight: 700; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* The knight breathes on its own, and brightens whenever the pointer crosses a
   cover on any ring. */
@keyframes hub-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: .86; }
}
.hub-knight { animation: hub-breathe 3.4s ease-in-out infinite; }
.wheel.is-live { --glow: .95; }
.wheel.is-live .hub-knight { animation-duration: 1.2s; }
.wheel.is-live .hub-go { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .hub-knight { animation: none; } }

/* ------------------------------------------------------------- home page */
.home {
  display: grid; grid-template-columns: 260px 1fr 260px; gap: 46px;
  align-items: start; padding-top: 4px;
}
/* The homepage runs edge to edge so the two top-10 rails sit out by the
   margins rather than crowding the wheel — but a strip is left outside them
   for the knights and question marks to drift down. */
main.home-wide { max-width: none; padding-left: 26px; padding-right: 26px; }
@media (min-width: 1340px) {
  main.home-wide { padding-left: 96px; padding-right: 96px; }
  .home { grid-template-columns: 222px 1fr 222px; gap: 34px; }
}
@media (min-width: 1620px) {
  main.home-wide { padding-left: 124px; padding-right: 124px; }
  .home { grid-template-columns: 262px 1fr 262px; gap: 46px; }
}
.home-stage { text-align: center; }
.home-stage h1 { margin-bottom: 14px; }
/* The question first, in red and deliberately light — it's an invitation, not
   a headline. The count line under it is the one that carries weight. */
.ask {
  margin: 0 0 4px; color: var(--accent); font-weight: 400; font-size: 18px;
  letter-spacing: -.005em;
}
@media (max-width: 1080px) {
  .home { grid-template-columns: 1fr; }
  .home-stage { order: -1; }
}

/* ----------------------------------------------------------- side rails */
.with-rails { display: grid; grid-template-columns: 210px 1fr 210px; gap: 28px; align-items: start; }
@media (max-width: 1080px) { .with-rails { grid-template-columns: 1fr; } }
.rail-panel { position: sticky; top: 80px; }
.rail-panel h2 { margin-top: 0; }
.rail-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 4px 13px; }
.toplist { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toplist li { counter-increment: t; border-bottom: 1px solid var(--line); }
.toplist li:last-child { border-bottom: 0; }
.toplist a {
  display: grid; grid-template-columns: 16px 38px 1fr; gap: 9px; align-items: center;
  padding: 8px 0; text-decoration: none; color: inherit;
}
.toplist a::before {
  content: counter(t); font-size: 11px; font-weight: 800; color: var(--faint);
  font-variant-numeric: tabular-nums; text-align: right;
}
.t-art {
  width: 38px; height: 55px; border-radius: 5px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); flex: none;
}
.t-art img { width: 100%; height: 100%; object-fit: cover; }
.t-art .ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--faint); font-weight: 800; font-size: 13px; }
.t-body { min-width: 0; }
.toplist a:hover .t-name { color: var(--accent); }
.toplist a:hover .t-art { border-color: var(--accent); }
.t-name { font-size: 12.5px; font-weight: 700; line-height: 1.25; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sub { font-size: 10.5px; color: var(--muted); display: block; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-cta { font-size: 11.5px; font-weight: 700; color: var(--accent); text-decoration: none; display: inline-block; margin: 10px 0; }

/* ------------------------------------------------------------- filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-gap { flex: 1 1 20px; }
.findbar { display: flex; gap: 8px; align-items: center; }
.findbar input {
  width: clamp(220px, 32vw, 380px); padding: 9px 15px; border-radius: 99px;
  font-size: 13.5px; background: var(--panel);
}
.findbar .btn-ghost, .findbar button { padding: 9px 18px; font-size: 13.5px; }
.chip {
  display: inline-block; padding: 7px 15px; border-radius: 99px; font-size: 12.5px;
  font-weight: 700; text-decoration: none; border: 1px solid var(--line);
  color: var(--muted); background: var(--surface); cursor: pointer;
}
.chip:hover { background: var(--surface-h); color: var(--text); }
.chip.on { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 26px; }

/* ------------------------------------------------------- lists & rows */
.result-list, .venue-list, .event-list, .mix-list, .reviews, .review-answers { list-style: none; padding: 0; margin: 0; }
.result-list li, .venue-list li, .event-list li, .mix-list li { border-bottom: 1px solid var(--line); }
.result-list li:last-child, .venue-list li:last-child, .event-list li:last-child, .mix-list li:last-child { border-bottom: 0; }
.result { display: flex; gap: 14px; align-items: center; padding: 12px 4px; }
.result-main { flex: 1; min-width: 0; }
.result-main a { text-decoration: none; }
.result-main a:hover strong { color: var(--accent); }
.result-main strong { display: block; font-size: 14.5px; }
.result .meta { color: var(--muted); font-size: 12.5px; }
.mix-list li { display: flex; gap: 12px; align-items: center; padding: 11px 0; }
.mix-main { flex: 1; min-width: 0; }
.mix-main .meta { display: block; color: var(--muted); font-size: 12.5px; }
.venue-list a { display: block; padding: 11px 4px; text-decoration: none; }
.venue-list a:hover strong { color: var(--accent); }
.venue-list .meta { display: block; color: var(--muted); font-size: 12.5px; }

.poster { width: 54px; height: 78px; object-fit: cover; border-radius: 7px; background: var(--surface); flex: none; }
.poster-lg { width: 190px; height: 278px; border-radius: var(--r); }
/* Single-title quizzes get the full-size cover; a mix shows several smaller. */
.poster-xl { width: 250px; height: 366px; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.poster-mix { width: 132px; height: 194px; border-radius: var(--r); }
@media (max-width: 720px) {
  .poster-xl { width: 190px; height: 278px; }
  .poster-lg { width: 150px; height: 220px; }
}
.poster-blank { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--faint); font-weight: 700; font-size: 10px; border: 1px dashed var(--line); padding: 6px; }

/* ------------------------------------------------- the host's round picker */
.pick-list { list-style: none; margin: 8px 0 0; padding: 0; }
.pick-list li {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); margin-top: 7px;
}
.pick-no {
  flex: none; width: 21px; height: 21px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800;
}
.pick-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-x {
  flex: none; padding: 0; width: 24px; height: 24px; border-radius: 50%;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  font-size: 15px; line-height: 1;
}
.pick-x:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); transform: none; box-shadow: none; }

/* --------------------------------------------------------- game rounds */
.round-list { list-style: none; margin: 0; padding: 0; }
.round-list li {
  display: flex; gap: 13px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.round-list li:last-child { border-bottom: 0; }
.round-no {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12px; font-weight: 800; color: var(--muted);
}
.round-main { flex: 1; min-width: 0; }
.round-main strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.round-main .meta { color: var(--muted); font-size: 12px; }

/* ------------------------------------------------ the live quiz directory */
/* The directory reads top to bottom in three width bands: the map and the
   colophon run wide, the city's week runs at reading width, the practice block
   narrower still. */
main.live-page { max-width: none; padding-left: 0; padding-right: 0; }
.w-board { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.w-read  { max-width: 960px;  margin: 0 auto; padding: 0 20px; }
.w-tight { max-width: 680px;  margin: 0 auto; padding: 0 20px; }

.mast { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.mast h1 { font-size: 26px; margin-bottom: 6px; }
.deck { color: var(--muted); font-size: 15px; margin: 0 0 16px; max-width: 62ch; }

.tally { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 4px; }
.tally > div {
  padding: 12px 26px 12px 0; margin-right: 26px; border-right: 1px solid var(--line);
}
.tally > div:last-child { border-right: 0; }
.tally b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.tally span {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-top: 1px;
}

.mapsec { padding-top: 26px; }
.secbar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  flex-wrap: wrap; padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.secbar h2 { margin: 0; }
.lab { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); }
/* The map gets its own three tones — sea, land, border — because reusing the
   page's panel colours left the land almost invisible against it in light mode. */
:root {
  --sea: #E4E6EF;
  --land: #C6C8D8;
  --border: #EFF0F6;
  --dot: #4A4A58;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sea: #0E0E14; --land: #2B2B37; --border: #14141C; --dot: #8E8E9E;
  }
}
:root[data-theme="dark"] {
  --sea: #0E0E14; --land: #2B2B37; --border: #14141C; --dot: #8E8E9E;
}

.board {
  background: var(--sea); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg); overflow-x: auto;
}
.key { display: flex; gap: 20px; flex-wrap: wrap; padding: 9px 0 0; margin: 0;
  font-size: 11.5px; color: var(--muted); }
.key i { display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 6px; vertical-align: -1px; background: var(--faint); }
.key i.k-on { background: var(--accent); }

.index {
  display: grid; gap: 4px 26px;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  padding: 16px 0 4px;
}
.index-group h3 {
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); margin: 8px 0 7px;
}

.dest {
  border-top: 2px solid var(--text); margin-top: 34px; padding-top: 14px;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; flex-wrap: wrap;
}
.dest .clock { margin: 0; }

.rail { margin-top: 14px; }
.days { display: flex; overflow-x: auto; scrollbar-width: none; gap: 0;
  border-bottom: 1px solid var(--line); }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; display: flex; align-items: baseline; gap: 7px;
  padding: 10px 16px; text-decoration: none; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 700;
  font-size: 13px;
}
.day:hover { color: var(--text); }
.day.on { color: var(--text); border-bottom-color: var(--accent); }
.day.empty { color: var(--faint); }
.day .d-n { font-size: 10.5px; font-weight: 800; opacity: .7; }

.tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 0 0; }
.out { padding-top: 2px; }

.warm {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 30px 0 0; padding: 16px 0; display: flex; gap: 16px; align-items: center;
  justify-content: space-between; flex-wrap: wrap;
}
.warm p { font-size: 14px; max-width: 56ch; }

#practice { padding: 34px 0 0; }
.pr-head h2 { margin-top: 0; }

.sources { padding: 34px 0 8px; }
.op-list { list-style: none; margin: 0 0 14px; padding: 0; font-size: 13px;
  columns: 2; column-gap: 30px; }
.op-list li { padding: 3px 0; break-inside: avoid; }
@media (max-width: 700px) { .op-list { columns: 1; } }

.worldmap { display: block; width: 100%; height: auto; min-width: 560px; }
.wm-land path {
  fill: var(--land); stroke: var(--border); stroke-width: .5;
  stroke-linejoin: round;
}
/* The resting dot colour is a token rather than a themed override, so the
   "on tonight" and "selected" rules below still win in both themes. */
.wm-dot circle {
  fill: var(--dot); stroke: var(--sea); stroke-width: 1.5;
  transition: fill .15s ease, stroke .15s ease; cursor: pointer;
}
.wm-dot:hover circle { fill: var(--accent); stroke: var(--accent); }
/* A city with a quiz on tonight, where it is. */
.wm-dot.tonight circle { fill: var(--accent); }
.wm-dot.on circle {
  fill: var(--accent); stroke: var(--sea); stroke-width: 3;
  filter: drop-shadow(0 0 7px rgb(232 52 43 / .85));
}
.city-link {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-size: 12.5px; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 99px; margin: 0 5px 5px 0;
}
.city-link:hover { border-color: var(--accent); color: var(--accent); }
.city-link.on { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.tally-n { font-size: 10.5px; font-weight: 800; opacity: .65; }

.city-name { font-size: 20px; font-weight: 700; text-transform: none; letter-spacing: -.01em;
  color: var(--text); margin: 0; }
.tally-line { margin: 0 0 12px; }

.listing-list { list-style: none; margin: 0; padding: 0; }
.listing-list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.listing-list li:last-child { border-bottom: 0; }
.listing-time {
  flex: none; width: 54px; font-size: 14px; font-weight: 800;
  font-variant-numeric: tabular-nums; padding-top: 1px;
}
.listing-main { flex: 1; min-width: 0; }
.listing-main strong { display: block; font-size: 14.5px; }
.listing-main .meta { display: block; color: var(--muted); font-size: 12.5px; }
.listing-main .note { color: var(--accent); }
.listing-main .quote { font-style: italic; margin-top: 3px; }
.listing-actions { flex: none; display: flex; gap: 9px; align-items: center; }
.listing-actions .src {
  font-size: 11px; font-weight: 700; color: var(--muted); text-decoration: none;
  border-bottom: 1px dotted var(--faint);
}
.listing-actions .src:hover { color: var(--accent); border-bottom-color: var(--accent); }
@media (max-width: 620px) {
  .listing-list li { flex-wrap: wrap; }
  .listing-actions { width: 100%; }
}

/* -------------------------------------------------------------- events */
.event-row { display: flex; gap: 16px; align-items: center; padding: 14px 4px; text-decoration: none; }
.event-date { flex: none; width: 58px; text-align: center; border: 1px solid var(--line); border-radius: var(--r); padding: 7px 4px; background: var(--surface); }
.event-date .d { font-size: 19px; font-weight: 800; line-height: 1; }
.event-date .m { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.event-main { flex: 1; min-width: 0; }
.event-main strong { display: block; font-size: 14.5px; }
.event-main .meta { color: var(--muted); font-size: 12.5px; }
.event-row:hover strong { color: var(--accent); }
.seats { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--surface); color: var(--muted); flex: none; border: 1px solid var(--line); }
.seats.low { color: var(--accent); border-color: var(--accent); }
.seats.none { text-decoration: line-through; }

.rank { margin: 0; padding-left: 22px; }
.rank li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.rank li:last-child { border-bottom: 0; }
.rank-name { font-weight: 700; margin-right: 6px; }
.contact-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ----------------------------------------------------------------- map */
.map { height: 400px; border-radius: var(--r-lg); border: 1px solid var(--line); margin-bottom: 20px; background: var(--surface); z-index: 1; }
.map-sm { height: 240px; }
.leaflet-container { border-radius: var(--r-lg); font: inherit; }

/* -------------------------------------------------------------- quiz UI */
.progress { height: 6px; background: var(--surface); border-radius: 99px; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); }
.progress > div { height: 100%; background: var(--accent); transition: width .3s ease; }

.qhead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.qcount { font-weight: 800; color: var(--text); }
.qprompt { font-size: 19px; font-weight: 700; letter-spacing: -.005em; margin: 12px 0; line-height: 1.3; }
.qdetail { background: var(--surface); border-left: 3px solid var(--accent); padding: 13px 15px; border-radius: 0 var(--r) var(--r) 0; margin-bottom: 16px; font-size: 14.5px; }

.choices { display: grid; gap: 10px; margin: 0 0 18px; counter-reset: opt; }
.choice {
  display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center;
  width: 100%; text-align: left; padding: 14px 16px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 15px; cursor: pointer; counter-increment: opt;
  transition: background .13s ease, border-color .13s ease, transform .1s ease;
}
.choice::before {
  content: counter(opt, upper-alpha);
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 12px; font-weight: 800; color: var(--muted);
}
.choice:hover { background: var(--surface-h); border-color: var(--muted); transform: translateX(2px); }
.choice.is-correct { border-color: var(--good); background: var(--good-bg); color: var(--good); }
.choice.is-correct::before { background: var(--good); border-color: var(--good); color: #fff; }
.choice.is-wrong { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.choice.is-wrong::before { background: var(--bad); border-color: var(--bad); color: #fff; }
.choice[disabled] { cursor: default; transform: none; }

.verdict { font-weight: 800; margin-bottom: 4px; font-size: 16px; }
.verdict.good { color: var(--good); }
.verdict.bad { color: var(--bad); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--surface);
  color: var(--muted); font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; border: 1px solid var(--line);
}
.badge-official { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* -------------------------------------------------------------- results */
.scorecircle { text-align: center; position: relative; overflow: hidden; }
.scorecircle .big { font-size: 46px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.scoreline { font-size: 15px; font-weight: 700; margin: 10px 0 0; }
.review-answers li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review-answers li:last-child { border-bottom: 0; }
.review-answers .mark-i { font-weight: 800; margin-right: 8px; }
.mark-i.good { color: var(--good); }
.mark-i.bad { color: var(--bad); }

/* ------------------------------------------------------------- feedback */
.stars { color: var(--accent); letter-spacing: 1px; }
.rating-row { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; }
.rating-row .muted:first-child { min-width: 76px; }
.stars-input { border: 0; padding: 0; margin: 0 0 12px; }
.stars-input legend { font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 7px; }
.stars-choices { display: flex; gap: 6px; }
.stars-choices label {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 38px; border-radius: var(--r); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); font-weight: 700;
}
.stars-choices label:hover { background: var(--surface-h); }
.stars-choices input { position: absolute; opacity: 0; width: 0; height: 0; }
.stars-choices label:has(input:checked) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.stars-choices label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.reviews li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.reviews li:last-child { border-bottom: 0; }
.review-head { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; }
.review-body { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; }

.code-chip {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; letter-spacing: .16em; font-weight: 700;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  padding: 3px 9px; border-radius: 5px;
}
/* Detail pages put the cover on the left at a size where you can actually
   recognise it, with everything else in a column beside it. */
.set-head, .show-head {
  display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: start;
}
.set-meta, .show-meta { min-width: 0; }
.set-art { display: flex; gap: 10px; }
.start-form {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  max-width: 520px;
}
.start-form .inline-form input { flex: 1; min-width: 180px; }
@media (max-width: 720px) {
  .set-head, .show-head { grid-template-columns: 1fr; gap: 18px; }
  .set-art { justify-content: flex-start; }
}
.qcard-poster { width: 40px; height: 58px; object-fit: cover; border-radius: 5px; background: var(--surface); }

/* ---------------------------------------------------------- small screens */
@media (max-width: 880px) {
  .topbar { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; padding: 12px 16px; align-items: center; }
  .brand { grid-column: 1; }
  .topbar-right { grid-column: 2; grid-row: 1; margin-left: 0; }
  .topbar-right .searchbar { display: none; }
  .mainnav {
    grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; overflow-x: auto; gap: 18px;
    scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px;
  }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { white-space: nowrap; }
  main { padding: 22px 16px 54px; }
  .hero { margin: -22px -16px 26px; }
  .hero-veil { padding: 34px 16px 28px; }
  .hero h1 { font-size: 20px; }
  h1 { font-size: 19px; }
  .card { padding: 16px; }
  .qgrid { grid-template-columns: 1fr; }
}
