/* ============================================================
   SUPPORTING PAGES — gallery, venue, team, join, races, 404
   ============================================================ */

/* ---------- Shared page header ---------- */
.phead {
  padding-block: clamp(7rem, 12vw, 11rem) clamp(2rem, 4vw, 4rem);
  display: grid; gap: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.phead__title {
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.6rem, 1rem + 8vw, 9rem); line-height: 0.84;
  letter-spacing: -0.015em;
}
.phead__lede { max-width: 52ch; color: var(--muted); }

/* ============================================================
   GALLERY — the infinite wall
   ============================================================ */
.wall {
  position: relative;
  height: calc(100svh - 0px);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  background: var(--ground);
}
.wall.drag { cursor: grabbing; user-select: none; }
.wall__plane { position: absolute; top: 0; left: 0; }

/* Each cell is a real <button>, so it needs the browser's button
   chrome stripped before it can behave like a photo. */
.wall__cell {
  position: absolute;
  overflow: hidden;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit; font: inherit;
  cursor: inherit;
  -webkit-tap-highlight-color: transparent;
  /* The cell's contents never affect anything outside it, so the browser
     can skip the rest of the wall when one tile changes. */
  contain: paint;
}

/* Only the plane moves, and only while the wall is actually in motion.
   will-change used to sit on every tile image, which promoted all ~77
   of them to their own compositor layer for the life of the page, each
   carrying a grayscale filter — which is what made the throw stutter. */
.wall.moving .wall__plane { will-change: transform; }

.wall__cell:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
  z-index: 2;
}
.wall__cell img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.82) contrast(1.1);
  transition: filter var(--d3) var(--ease-out), transform var(--d4) var(--ease-out);
}
/* Hover treatment is suppressed while the wall is moving: transitioning
   a filter on a tile that is also being translated forces it to
   re-rasterise every frame. */
.wall:not(.moving) .wall__cell:hover img { filter: grayscale(0) contrast(1.02); transform: scale(1.05); }
.wall.moving .wall__cell img { transition: none; }
.wall__cap {
  position: absolute; inset: auto 0 0 0;
  padding: 0.45rem 0.6rem;
  text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  opacity: 0; transition: opacity var(--d2) var(--ease-out);
}
.wall__cell:hover .wall__cap,
.wall__cell:focus-visible .wall__cap { opacity: 1; }

/* Images must not intercept the drag gesture or offer their own
   native drag, or the throw is fought by the browser. */
.wall__cell img, .wall__cap { pointer-events: none; user-select: none; }

.wall__hud {
  position: absolute; z-index: 5;
  left: var(--gutter); bottom: 1.2rem;
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  pointer-events: auto;
  /* Leave the right-hand corner to the hint so wrapped chips never run under it. */
  max-width: calc(100% - 2 * var(--gutter) - 24rem);
}
@media (max-width: 1100px) {
  .wall__hud { max-width: calc(100% - 2 * var(--gutter)); }
  .wall__hint { display: none; }
}
.chip {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  color: var(--muted);
  transition: color var(--d2) var(--ease-out), border-color var(--d2) var(--ease-out);
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.wall__hint {
  position: absolute; z-index: 5;
  right: var(--gutter); bottom: 1.4rem;
  color: var(--muted);
  pointer-events: none;
}

/* The wall is a full-screen surface that swallows scroll, so it carries
   its own exit rather than relying on the header alone. */
.wall__back {
  position: absolute; z-index: 6;
  left: var(--gutter); top: clamp(5rem, 9vh, 7rem);
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  color: var(--muted);
  transition: color var(--d2) var(--ease-out), border-color var(--d2) var(--ease-out);
}
.wall__back:hover, .wall__back:focus-visible { color: var(--accent); border-color: var(--accent); }
.wall__back i { font-style: normal; display: inline-block; transition: transform var(--d2) var(--ease-out); }
.wall__back:hover i { transform: translateX(-4px); }

/* Lightbox */
.lbox {
  position: fixed; inset: 0; z-index: 940;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 4rem);
  opacity: 0; visibility: hidden;
  transition: opacity var(--d2) var(--ease-out), visibility var(--d2);
}
.lbox.on { opacity: 1; visibility: visible; }
.lbox img { max-width: 100%; max-height: 82vh; object-fit: contain; }
.lbox__bar {
  position: absolute; inset: auto 0 0 0;
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.2rem var(--gutter);
}

/* ============================================================
   VENUE
   ============================================================ */
/* Mapbox injects its own stylesheet at runtime, after ours, and
   `.mapboxgl-map { position: relative }` beats an absolutely positioned
   container at equal specificity — which collapsed the map to zero
   height. Stacking both children in one grid cell sidesteps the fight
   entirely: the canvas fills the cell whatever position it is given. */
.vmap {
  display: grid;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface);
}
@media (min-width: 900px) { .vmap { aspect-ratio: 4 / 3; } }

.vmap > * { grid-area: 1 / 1; min-width: 0; min-height: 0; }
.vmap__canvas { width: 100%; height: 100%; }
.vmap__canvas .mapboxgl-canvas { outline: none; }

/* Mapbox's own chrome, brought into the palette. */
.vmap .mapboxgl-ctrl-group {
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  border: 1px solid var(--line);
  box-shadow: none;
}
.vmap .mapboxgl-ctrl-group button + button { border-top: 1px solid var(--line); }
.vmap .mapboxgl-ctrl-icon { filter: invert(1) opacity(0.6); }
.vmap .mapboxgl-ctrl-group button:hover .mapboxgl-ctrl-icon { filter: invert(1) opacity(1); }
.vmap .mapboxgl-ctrl-attrib,
.vmap .mapboxgl-ctrl-attrib a {
  background: color-mix(in srgb, var(--ground) 80%, transparent);
  color: var(--muted); font-size: 10px;
}
.vmap .mapboxgl-ctrl-logo { opacity: 0.45; }

/* The address always renders, so the venue is findable even if the
   map never loads. It only hides once the map is actually up. */
.vmap__fallback {
  z-index: 2;
  align-self: end;
  padding: 0.85rem 1rem;
  background: linear-gradient(transparent, color-mix(in srgb, var(--ground) 94%, transparent) 42%);
  color: var(--muted);
  text-transform: none; letter-spacing: 0.04em;
}
.vmap__fallback a { color: var(--accent); }
.vmap__canvas[data-state="ready"] ~ .vmap__fallback { opacity: 0; pointer-events: none; transition: opacity var(--d3) var(--ease-out); }

/* ---------- Map markers ---------- */
.mapin { position: relative; width: 0; height: 0; }
.mapin__dot {
  position: absolute; left: -7px; top: -7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--ground), 0 0 18px var(--accent);
}
.mapin__pulse {
  position: absolute; left: -22px; top: -22px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--accent);
  animation: mapin-pulse 2.4s var(--ease-out) infinite;
}
@keyframes mapin-pulse {
  0%   { transform: scale(0.45); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
.mapin__label, .maplm__label {
  position: absolute; left: 16px; top: -12px;
  display: grid; gap: 0.15rem;
  padding: 0.4rem 0.6rem;
  white-space: nowrap;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  border: 1px solid var(--line);
  color: var(--ink);
}
.mapin__label { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.mapin__label em, .maplm__label em {
  font-style: normal; color: var(--muted); font-size: 0.85em;
}

.maplm { position: relative; width: 0; height: 0; }
.maplm__dot {
  position: absolute; left: -4px; top: -4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted); box-shadow: 0 0 0 2px var(--ground);
}
.maplm__label { opacity: 0.72; }

@media (prefers-reduced-motion: reduce) { .mapin__pulse { animation: none; opacity: 0.5; } }

.vgrid { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); }
@media (min-width: 900px) { .vgrid { grid-template-columns: 1.15fr 0.85fr; align-items: start; } }

.vlist { display: grid; }
.vlist__row {
  display: flex; justify-content: space-between; gap: 1.5rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.vlist__row:first-child { border-top: 1px solid var(--line); }
.vlist__val { font-family: var(--display-face); font-weight: 700; text-transform: uppercase; text-align: right; }

/* ============================================================
   TEAM
   ============================================================ */
.tgrid {
  display: grid; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.tcard {
  background: var(--ground);
  padding: clamp(1.2rem, 2.4vw, 2rem);
  display: grid; gap: 0.7rem; align-content: start;
  min-height: clamp(280px, 34vh, 380px);
  position: relative; overflow: hidden;
}
.tcard__face {
  margin: 0 0 0.4rem;
  aspect-ratio: 4 / 5; width: 100%;
  background: var(--surface);
  overflow: hidden;
}
.tcard__face img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transition: filter var(--d3) var(--ease-out), transform var(--d4) var(--ease-out);
}
/* Colour arrives on hover — the wall reads as one set at rest, and each
   person becomes themselves when you stop on them. */
.tcard:hover .tcard__face img { filter: none; transform: scale(1.035); }
.tcard__name {
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.1rem, 0.95rem + 0.7vw, 1.5rem); line-height: 1;
}
.tcard__bio { color: var(--muted); font-size: 0.9rem; }
.tcard__role {
  color: var(--accent);
  margin-top: auto; padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.tcard { align-content: stretch; grid-template-rows: auto auto auto 1fr auto; }
.tgrid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

.crewpage { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.crewpage__cta {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

/* ============================================================
   JOIN / VOLUNTEERS
   ============================================================ */
/* The role cards, the flow and the application live in styles/volunteer.css.
   What stays here is the newsletter form further down the same page. */
.form { display: grid; gap: 1.1rem; max-width: 620px; }
.field { display: grid; gap: 0.4rem; }
.field input, .field select, .field textarea {
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  padding: 0.65rem 0;
  transition: border-color var(--d2) var(--ease-out);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--accent);
}
.field select option { background: var(--surface); color: var(--ink); }
.formnote { color: var(--muted); font-size: 0.85rem; }

/* ============================================================
   RACES INDEX + RECAP
   ============================================================ */
.rgrid {
  display: grid; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.recap__meta {
  display: grid; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.recap__cell { background: var(--ground); padding: 1rem 1.2rem; display: grid; gap: 0.35rem; }
.recap__val { font-family: var(--display-face); font-weight: 700; text-transform: uppercase; font-size: clamp(1rem, 0.9rem + 0.6vw, 1.45rem); line-height: 1; }
.recap__hero {
  position: relative;
  min-height: clamp(360px, 56vh, 640px);
  display: grid; place-items: center;
  border-block: 1px solid var(--line);
  overflow: hidden;
}
.recap__circuit { width: min(70vw, 520px); aspect-ratio: 1; color: var(--accent); }
.recap__strip { display: grid; gap: 1px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); background: var(--line); border: 1px solid var(--line); }
.recap__strip figure { margin: 0; aspect-ratio: 4/3; overflow: hidden; background: var(--surface); }
.recap__strip img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.7) contrast(1.1); transition: filter var(--d3) var(--ease-out); }
.recap__strip figure:hover img { filter: grayscale(0) contrast(1.02); }

.pager { display: flex; justify-content: space-between; gap: 1rem; padding-block: clamp(2rem,4vw,3.5rem); border-top: 1px solid var(--line); }

/* ============================================================
   404 — SESSION SUSPENDED
   ============================================================ */
.suspended {
  min-height: 100svh;
  display: grid; place-content: center; justify-items: center;
  gap: 1.6rem; text-align: center;
  padding: var(--gutter);
}
.suspended__flag {
  width: clamp(120px, 16vw, 200px);
  aspect-ratio: 3 / 2;
  background: var(--accent);
  animation: wave 2.6s var(--ease-io) infinite;
  transform-origin: left center;
}
@keyframes wave {
  0%, 100% { transform: skewY(0deg) scaleX(1); }
  50%      { transform: skewY(-3.5deg) scaleX(0.97); }
}
.suspended__title {
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 1rem + 6vw, 6rem); line-height: 0.9;
}

/* ============================================================
   SOUND TOGGLE
   ============================================================ */
.sound {
  position: fixed; z-index: 810;
  right: var(--gutter); bottom: 1.1rem;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ground) 80%, transparent);
  color: var(--muted);
}
.sound:hover { color: var(--ink); }
.sound__bars { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.sound__bars i { width: 2px; height: 3px; background: currentColor; display: block; }
.sound[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.sound[aria-pressed="true"] .sound__bars i { animation: eq 0.9s ease-in-out infinite; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(2) { animation-delay: 0.15s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(3) { animation-delay: 0.3s; }
@keyframes eq { 50% { height: 11px; } }
[data-state="lightsout"] .sound { bottom: 3.1rem; }



/* ============================================================
   FORMS — volunteer + newsletter
   ============================================================ */
.form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { grid-column: 1 / -1; }
@media (min-width: 620px) { .field--half { grid-column: span 1; } }

.checks {
  border: 1px solid var(--line);
  padding: clamp(0.9rem, 2vw, 1.3rem);
  gap: 0.55rem;
  margin: 0;
}
.checks legend { padding-inline: 0.4rem; }
.check {
  display: grid; grid-template-columns: auto 1fr;
  gap: 0.7rem; align-items: start;
  font-size: 0.9rem; color: var(--muted);
  cursor: pointer;
  transition: color var(--d2) var(--ease-out);
}
.check:hover { color: var(--ink); }
.check input {
  appearance: none;
  width: 1.05rem; height: 1.05rem;
  margin-top: 0.15rem;
  border: 1px solid var(--line-light);
  background: transparent;
  display: grid; place-items: center;
  cursor: pointer;
  transition: border-color var(--d2) var(--ease-out), background var(--d2) var(--ease-out);
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after {
  content: ""; width: 0.42rem; height: 0.22rem;
  border: 2px solid var(--accent-ink);
  border-top: 0; border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}
.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Newsletter ---------- */
.signup {
  padding-block: var(--space-section);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.signup__grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (min-width: 900px) { .signup__grid { grid-template-columns: 1fr 1fr; } }
.signup__copy { display: grid; gap: 1.1rem; }
.signup__copy p { color: var(--muted); max-width: 44ch; }
.signup__list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.8rem; }
.signup__list li {
  display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.6rem;
  padding-bottom: 0.8rem; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 0.92rem;
}
.signup__form { max-width: none; }

/* ============================================================
   THE SEASON IN 3D

   Each round is a real object: a glowing ribbon of the circuit you
   can take hold of and turn, with the round's numbers beside it.
   The card carries a flat SVG fallback underneath, so a visitor
   without WebGL still gets the shape rather than an empty box.
   ============================================================ */
.t3dhead {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
}

.t3d {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}

.t3d__card {
  background: var(--ground);
  display: grid;
  grid-template-rows: auto auto;
  transition: background var(--d2) var(--ease-out);
}
.t3d__card:hover { background: color-mix(in srgb, var(--surface) 70%, var(--ground)); }

.t3d__art {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  overflow: hidden;
  /* A pool of the round's colour under the ribbon, so the glow has
     something to sit in rather than floating on flat black. */
  background:
    radial-gradient(70% 60% at 50% 58%,
      color-mix(in srgb, var(--accent) 11%, transparent) 0%, transparent 72%),
    #050507;
}
.t3d__art > * { grid-area: 1 / 1; }

.t3d__stage {
  width: 100%; height: 100%;
  display: block;
  cursor: grab;
  touch-action: pan-y;   /* vertical scroll still belongs to the page */
  opacity: 0;
  transition: opacity var(--d4) var(--ease-out);
}
.t3d__stage.is-held { cursor: grabbing; }
.t3d__card.is-ready .t3d__stage { opacity: 1; }

/* The flat circuit shows only if 3D could not start. */
.t3d__fallback { display: none; place-items: center; padding: 12%; color: var(--accent); }
.t3d__card.is-flat .t3d__fallback { display: grid; }
.t3d__fallback .circuit { width: 100%; height: 100%; }

.t3d__meta {
  padding: clamp(1.1rem, 2.4vw, 1.7rem);
  display: grid; gap: 0.5rem;
  border-top: 1px solid var(--line);
}
.t3d__top { display: flex; justify-content: space-between; align-items: center; }
.t3d__no { color: var(--accent); }
.t3d__flag { font-size: 1.1rem; line-height: 1; }

.t3d__name {
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.1rem); line-height: 0.95;
}
.t3d__circuit { color: var(--muted); }

.t3d__stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 1rem;
  margin: 0.5rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.t3d__stats div { display: grid; gap: 0.1rem; }
.t3d__stats dt { color: var(--muted); font-size: 0.5625rem; }
.t3d__stats dd { margin: 0; font-variant-numeric: tabular-nums; }

.t3d__go {
  justify-self: start;
  margin-top: 0.7rem;
  color: var(--muted);
  transition: color var(--d2) var(--ease-out);
}
.t3d__go i { font-style: normal; display: inline-block; transition: transform var(--d2) var(--ease-out); }
.t3d__card:hover .t3d__go { color: var(--accent); }
.t3d__card:hover .t3d__go i { transform: translateX(5px); }

/* A round already raced is spent; the next one is the only one lit. */
/* Dimmed, not erased. At saturate(0.25)/0.66 a raced circuit went to
   flat cream and the corner detail vanished with the colour. */
.t3d__card[data-round="raced"] .t3d__art { filter: saturate(0.6); opacity: 0.85; }
.t3d__card[data-round="raced"]:hover .t3d__art { filter: none; opacity: 1; }
.t3d__card[data-round="next"] {
  outline: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: -1px;
}
.t3d__card[data-round="next"] .t3d__no::after { content: " · next"; }

.t3d__room { color: var(--muted); }
.t3d__room[data-hosted="true"] { color: var(--ink); }

/* Rounds already raced step back: their own smaller grid under the
   rest, flat outline instead of the turnable object, the colour and
   the type turned right down. Still a link to the round report. */
.t3dhead--raced { margin-top: clamp(3rem, 6vw, 5.5rem); }
.t3d--raced { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.t3d--raced .t3d__card { opacity: 0.5; transition: opacity var(--d2) var(--ease-out), background var(--d2) var(--ease-out); }
.t3d--raced .t3d__card:hover,
.t3d--raced .t3d__card:focus-within { opacity: 1; }
.t3d--raced .t3d__art { aspect-ratio: 16 / 10; background: #050507; filter: grayscale(1); }
.t3d--raced .t3d__card:hover .t3d__art { filter: none; }
.t3d--raced .t3d__fallback { padding: 10%; }
.t3d--raced .t3d__name { font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.5rem); color: var(--muted); }
.t3d--raced .t3d__no { color: var(--muted); }
.t3d--raced .t3d__no::after { content: " · raced"; }
.t3d--raced .t3d__stats, .t3d--raced .t3d__room { display: none; }

/* ---------- The next round ----------------------------------------
   The lead of the season page. Same object as the cards, at the size
   of a poster: the circuit takes most of the width, the copy runs
   down the side in the house display face, the count in tabular
   figures so the line does not shuffle every second. */
.feat { padding-block: clamp(2.5rem, 5vw, 4.5rem) 0; }
.feat__card {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  grid-template-rows: none;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
}
.feat__card:hover { background: var(--ground); }
.feat__art {
  aspect-ratio: 4 / 3;
  max-height: 82svh;
  background:
    radial-gradient(64% 58% at 50% 54%,
      color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 74%),
    #050507;
}
.feat__copy {
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(0.7rem, 1.4vw, 1.1rem);
  padding: clamp(1.4rem, 3.2vw, 3rem);
  border-left: 1px solid var(--line);
}
.feat__no {
  font-family: var(--display-face); font-weight: 700;
  font-size: clamp(3.4rem, 1.4rem + 6vw, 8rem); line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
  display: grid; gap: 0.8rem;
}
.feat__no .mono { -webkit-text-stroke: 0; color: var(--muted); line-height: 1; }
.feat__name {
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.4rem, 1rem + 4.4vw, 5.6rem); line-height: 0.86;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.feat__circuit { color: var(--muted); }
.feat__when {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; margin: 0.4rem 0 0;
  background: var(--line); border: 1px solid var(--line);
}
.feat__when div { background: var(--ground); padding: 0.8rem 1rem; display: grid; gap: 0.35rem; }
.feat__when dt { color: var(--muted); }
.feat__when dd {
  margin: 0;
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.6rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.feat__when dd .mono { color: var(--muted); font-weight: 400; display: block; margin-top: 0.35rem; }
.feat__clock {
  font-family: var(--display-face); font-weight: 700;
  font-size: clamp(1.9rem, 1rem + 2.6vw, 3.6rem); line-height: 1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--ink);
}
.feat__clock em { font-style: normal; color: var(--muted); font-size: 0.5em; padding-inline: 0.1em 0.4em; }
.feat__live { color: var(--accent); text-transform: uppercase; }
.feat__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.feat__tags span { padding: 0.4rem 0.6rem; border: 1px solid var(--line); color: var(--muted); }
.feat__tags [data-hosted="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.feat__go {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  background: var(--accent); color: var(--accent-ink);
  transition: transform var(--d2) var(--ease-out);
}
.feat__go i { font-style: normal; display: inline-block; transition: transform var(--d2) var(--ease-out); }
.feat__go:hover i, .feat__go:focus-visible i { transform: translateX(5px); }
.feat__go:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (max-width: 900px) {
  .feat__card { grid-template-columns: minmax(0, 1fr); }
  .feat__art { aspect-ratio: 1; }
  .feat__copy { border-left: 0; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  .t3d__stage { transition: none; }
}

/* ---------- Round page ---------------------------------------
   The circuit gets the same turnable 3D treatment as the season
   grid, and the page gets a way back out of itself — there was
   none, which left the round pages as a dead end.
   -------------------------------------------------------------- */
.recap__back {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin: 0 0 clamp(1rem, 2vw, 1.8rem) var(--gutter);
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color var(--d2) var(--ease-out), border-color var(--d2) var(--ease-out);
}
.recap__back:hover, .recap__back:focus-visible { color: var(--accent); border-color: var(--accent); }
.recap__back i { font-style: normal; display: inline-block; transition: transform var(--d2) var(--ease-out); }
.recap__back:hover i { transform: translateX(-4px); }

/* Bigger, and closer to square. A lap spun on its axis sweeps a disc,
   which a 16:9 letterbox can only frame by leaving its sides empty;
   at 4:3 the track (fitted to `fill` in track3d.js) reaches most of
   the panel both ways. Capped by the viewport so it never needs a
   scroll to see whole. */
.recap__card {
  width: min(100% - 2 * var(--gutter), 1280px);
  margin-inline: auto;
  border: 1px solid var(--line);
}
.recap__art { aspect-ratio: 4 / 3; max-height: 84svh; }
@media (max-width: 720px) { .recap__art { aspect-ratio: 1; } }

/* ============================================================
   NEXT SEASON — 2027

   A look-ahead, and it must not read like the live calendar. No
   glow, no 3D, no countdown, no ticket link: quiet cards that say
   "this is coming" without implying you can book one.
   ============================================================ */
.next27 { padding-block: var(--space-section); border-top: 1px solid var(--line); }
.next27__title {
  font-family: var(--display-face); font-weight: 700;
  font-size: clamp(3rem, 1rem + 9vw, 9rem); line-height: 0.82;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 55%, transparent);
}

.next27__changes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
}
.n27chg {
  background: var(--ground);
  padding: clamp(0.9rem, 2vw, 1.3rem);
  display: grid; gap: 0.3rem;
}
.n27chg__k {
  justify-self: start;
  padding: 0.15em 0.5em;
  border: 1px solid currentColor;
  color: var(--muted);
}
.n27chg[data-kind="in"] .n27chg__k { color: var(--accent); }
.n27chg strong {
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: 1.05rem;
}

.next27__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.n27 {
  position: relative;
  background: var(--ground);
  padding: clamp(0.9rem, 1.6vw, 1.2rem);
  display: grid; gap: 0.25rem; align-content: start;
  min-height: clamp(150px, 18vh, 190px);
  transition: background var(--d2) var(--ease-out);
}
.n27:hover { background: var(--surface); }
.n27__top { display: flex; justify-content: space-between; align-items: center; }
.n27__no { color: var(--muted); }
.n27__flag { font-size: 1rem; line-height: 1; }
.n27__name {
  font-family: var(--display-face); font-weight: 700; text-transform: uppercase;
  font-size: clamp(0.95rem, 0.8rem + 0.5vw, 1.25rem); line-height: 1;
  margin-top: 0.4rem;
}
.n27__circuit, .n27__date { color: var(--muted); }
.n27__date { font-variant-numeric: tabular-nums; margin-top: 0.3rem; }
.n27__tag {
  justify-self: start; margin-top: 0.45rem;
  padding: 0.15em 0.5em;
  border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  color: var(--accent);
}
.next27__note { margin-top: 1.4rem; max-width: 70ch; }

/* The fixed pill that replaced Director's Cut: straight to Race Control. */
.rcpill {
  position: fixed; z-index: 810;
  /* Shares the next-race card's right edge; the Sound toggle that used
     to sit beside it is gone. */
  right: var(--gutter); bottom: 1.1rem;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.9rem 0.5rem 0.75rem;
  border: 1px solid var(--accent); border-radius: 999px;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: blur(10px);
  color: var(--ink); text-decoration: none;
  transition: background var(--d2) var(--ease-out), color var(--d2) var(--ease-out);
}
.rcpill i {
  width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent); animation: rcpulse 2.4s var(--ease-out) infinite;
}
.rcpill:hover, .rcpill:focus-visible { background: var(--accent); color: var(--accent-ink); }
.rcpill:hover i, .rcpill:focus-visible i { background: var(--accent-ink); }
[data-state="lightsout"] .rcpill { bottom: 3.1rem; }
@keyframes rcpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 70%, 100% { box-shadow: 0 0 0 0.7rem transparent; } }
@media (max-width: 820px) { .rcpill { right: var(--gutter); bottom: 4.2rem; } }
@media (prefers-reduced-motion: reduce) { .rcpill i { animation: none; } }
