:root {
  --rosso: #c8102e;
  --kerb: #f5c518;
  --asphalt: #17191d;
  --pitwall: #25282e;
  --chalk: #f2f0ea;
  --muted: #c4c1b8;
  --flag: #2fa84f;
  --pixel: 'Press Start 2P', monospace;
  --sans: 'Barlow', system-ui, sans-serif;
  --nav-h: 44px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--asphalt);
  color: var(--chalk);
  font-family: var(--sans);
  font-size: 17px;
}

:focus-visible { outline: 2px solid var(--kerb); outline-offset: 2px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.scroll-track { height: 1400vh; }

/* ---------- Pit wall: the navigation bar ---------- */
.pitwall {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 16px;
  background: var(--asphalt);
  border-bottom: 1px solid #000;
}

.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--chalk);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}
.badge-num {
  font-family: var(--pixel);
  font-size: 11px;
  color: var(--chalk);
  background: var(--rosso);
  padding: 6px 6px 4px;
  box-shadow: inset 0 -3px 0 var(--kerb);
}

.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--chalk);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--kerb); }
.nav-links a[aria-current] { color: var(--kerb); border-bottom-color: var(--kerb); }

.nav-links a.nav-cta {
  color: #fff;
  background: var(--rosso);
  padding: 7px 14px;
  border-bottom: 0;
  font-weight: 700;
}
.nav-links a.nav-cta:hover { background: #dc1834; color: #fff; }
.nav-links a.nav-cta[aria-current] { color: #fff; box-shadow: inset 0 -3px 0 var(--kerb); }

.sound, .skip {
  font: inherit;
  color: var(--chalk);
  background: none;
  border: 1px solid rgba(242, 240, 234, 0.35);
  cursor: pointer;
}
.sound { width: 32px; height: 28px; display: grid; place-items: center; padding: 0; }
.sound svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.sound svg path:first-child { fill: currentColor; stroke: none; }
.sound .wave { opacity: 0.25; }
.sound[aria-pressed='true'] { color: var(--kerb); border-color: var(--kerb); }
.sound[aria-pressed='true'] .wave { opacity: 1; }
.skip { font-weight: 600; font-size: 14px; padding: 5px 12px; }
.skip:hover, .sound:hover { border-color: var(--chalk); }

/* ---------- Stage: pinned canvas ---------- */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

#world {
  position: absolute;
  left: 0;
  top: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  background: #000;
  z-index: 3;
  transition: height 0.6s ease;
}
.bar-top { top: 0; }

/* Darken the track behind the radio panels so text stays easy to read. */
.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to left, rgba(10, 11, 13, 0.62), rgba(10, 11, 13, 0) 62%);
  opacity: 0;
  transition: opacity 0.4s;
}
.stage.reading::after { opacity: 1; }
.bar-bottom { bottom: 0; }
.stage.lb .bar { height: 9vh; }

/* ---------- HUD ---------- */
.hud {
  position: absolute;
  inset: 0;
  z-index: 4;
  font-family: var(--pixel);
  color: var(--kerb);
  text-shadow: 2px 2px 0 #000;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.stage.racing .hud { opacity: 1; }

.hud-top {
  position: absolute;
  top: max(calc(9vh + 14px), calc(var(--nav-h) + 16px));
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  font-size: clamp(12px, 1.6vw, 20px);
}
.stage:not(.lb) .hud-top { top: calc(var(--nav-h) + 16px); }

.hud-dial {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: clamp(110px, 13vw, 160px);
  aspect-ratio: 1;
}
.stage.lb .hud-dial { bottom: calc(9vh + 10px); }
.dial { width: 100%; height: 100%; }
.dial path { fill: none; stroke-width: 9; }
.dial-bg { stroke: rgba(0, 0, 0, 0.55); }
.dial-rev { stroke: var(--kerb); stroke-dasharray: 100; stroke-dashoffset: 94; transition: stroke-dashoffset 0.08s linear; }

.gear {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  font-size: clamp(22px, 3vw, 34px);
  color: #ff3b30;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 8px 4px;
}

.speed {
  position: absolute;
  left: 58%;
  bottom: 2%;
  white-space: nowrap;
  font-size: clamp(14px, 1.8vw, 22px);
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 6px;
}
.speed small { font-size: 0.5em; margin-left: 4px; }

#minimap {
  position: absolute;
  left: 18px;
  top: calc(max(9vh, var(--nav-h)) + 56px);
  width: 144px;
  height: 108px;
  image-rendering: pixelated;
  background: rgba(0, 0, 0, 0.25);
}

/* ---------- Lap progress bar: the pit wall's bottom edge ---------- */
.lapbar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  height: 3px;
  background: var(--pitwall);
  z-index: 20;
}
.lapbar i { display: block; height: 100%; width: 0; background: var(--rosso); }
.lapbar b { position: absolute; top: 0; width: 2px; height: 100%; background: var(--kerb); }
.lapbar .s1 { left: 40%; }
.lapbar .s2 { left: 74%; }

/* ---------- Hero: the start, a band across the grid that mirrors the finish ---------- */
.hero {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}
.hero.on { opacity: 1; transform: none; pointer-events: auto; }
.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: end;
  gap: 12px 48px;
  padding: 0 clamp(16px, 4vw, 56px) clamp(18px, 3.5vh, 36px);
  background: var(--asphalt);
}
/* A red and white kerb at the start; the finish gets the chequered flag. */
.hero-stripe {
  grid-column: 1 / -1;
  height: 16px;
  margin: 0 calc(-1 * clamp(16px, 4vw, 56px)) clamp(14px, 3vh, 28px);
  background: repeating-linear-gradient(90deg, var(--rosso) 0 32px, var(--chalk) 32px 64px);
}
.hero h1 {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(28px, 4.6vw, 64px);
  line-height: 1.15;
  margin: 0;
}
.hero-pitch { font-size: clamp(18px, 1.7vw, 22px); font-weight: 600; margin: 0; }
.hero-cta { margin-top: 16px; }
.hero-hint { font-size: 14px; color: var(--muted); margin: 4px 0 0; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--pitwall);
}
.facts div { padding: 0 20px; }
.facts div:first-child { padding-left: 0; }
.facts div + div { border-left: 1px solid rgba(242, 240, 234, 0.22); }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; }
.live {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--flag);
  box-shadow: 0 0 0 3px rgba(47, 168, 79, 0.25);
  vertical-align: 1px;
}

/* ---------- Radio panels ---------- */
.panels {
  position: fixed;
  right: clamp(16px, 3vw, 48px);
  top: 50%;
  width: min(460px, 42vw);
  z-index: 5;
  pointer-events: none;
}

.panel {
  position: absolute;
  top: 0;
  width: 100%;
  transform: translate(28px, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, transform 0.35s, visibility 0.35s;
  background: var(--asphalt);
  border: 2px solid #000;
  box-shadow: 0 0 0 2px var(--pitwall), 8px 8px 0 rgba(0, 0, 0, 0.45);
  padding: 20px 22px 22px;
  font-size: 17px;
  line-height: 1.55;
  /* Centred on the screen, so keep clear of the nav bar on short windows. */
  max-height: calc(100vh - 2 * var(--nav-h) - 16px);
  overflow-y: auto;
}
.panel.on { opacity: 1; visibility: visible; transform: translate(0, -50%); pointer-events: auto; }

.radio {
  font-size: 14px;
  font-weight: 600;
  color: var(--kerb);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.radio b { font-weight: 600; color: var(--chalk); }
.dot { width: 8px; height: 8px; background: #ff3b30; }

.panel h2 {
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 12px;
}
.panel p { margin: 0 0 10px; }
.note { color: var(--muted); font-size: 15px; }

.cards, .projects, .ticks, .chips, .steps { list-style: none; padding: 0; margin: 0; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cards li {
  background: var(--pitwall);
  border-left: 3px solid var(--rosso);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cards span { color: var(--muted); font-size: 15px; line-height: 1.35; }

/* Project buttons open the garage */
.projects { display: grid; gap: 8px; }
.project {
  width: 100%;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 4px 12px;
  align-items: center;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--pitwall);
  border: 0;
  border-left: 3px solid var(--rosso);
  padding: 8px;
  cursor: pointer;
}
.project:hover { border-left-color: var(--kerb); background: #2d3037; }
.project img { grid-row: span 2; width: 96px; height: 60px; object-fit: cover; object-position: top left; display: block; }
.project-text { display: flex; flex-direction: column; line-height: 1.25; }
.project-text span { color: var(--muted); font-size: 15px; }
.project-figure { font-size: 14px; color: var(--muted); }
.project-figure b { font-weight: 700; font-size: 16px; color: var(--kerb); margin-right: 2px; }
/* In the race the panel has to fit all the projects, so the number waits for the project page. */
:root:not(.quick, .no-js) .project-figure { display: none; }

.steps { counter-reset: s; display: grid; gap: 8px; margin-bottom: 10px; }
.steps li { counter-increment: s; padding-left: 34px; position: relative; }
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--pixel);
  font-size: 10px;
  background: var(--rosso);
  padding: 5px 6px 3px;
}
.steps strong { display: block; }
.ticks li, .garage-built li { padding-left: 24px; position: relative; margin-bottom: 6px; }
.ticks li::before, .garage-built li::before { content: ''; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; background: var(--kerb); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--pitwall); border: 1px solid #383b42; padding: 4px 9px; font-size: 15px; }

.prices { width: 100%; border-collapse: collapse; font-size: 16px; margin-bottom: 10px; }
.prices th { text-align: left; font-weight: 600; font-size: 14px; color: var(--kerb); padding: 6px 4px; }
.prices td { padding: 7px 4px; border-top: 1px solid var(--pitwall); }
.prices td:not(:first-child) { white-space: nowrap; }

.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--chalk);
  text-decoration: none;
  padding: 13px 18px;
  background: var(--pitwall);
  box-shadow: 4px 4px 0 #000;
}
.btn:hover { background: #33373e; }
.btn-primary { background: var(--rosso); }
.btn-primary:hover { background: #dc1834; }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; }

/* ---------- Finish: contact across the whole track ---------- */
.panel.finale {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: auto;
  transform: translateY(24px);
  border: 0;
  box-shadow: none;
  padding: 0 clamp(16px, 4vw, 56px) clamp(20px, 4vh, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 12px 40px;
  background: var(--asphalt);
}
.panel.finale.on { transform: none; }
.stage.finish .hud-dial, .stage.finish #minimap { opacity: 0; transition: opacity 0.3s; }
.finale-flag {
  grid-column: 1 / -1;
  height: 24px;
  margin: 0 calc(-1 * clamp(16px, 4vw, 56px)) clamp(12px, 3vh, 28px);
  background: repeating-conic-gradient(var(--chalk) 0 25%, #000 0 50%) 0 0 / 24px 24px;
}
.panel.finale h2 {
  font-size: clamp(28px, 4.6vw, 64px);
  line-height: 1.15;
  margin: 0;
}
.finale-side p { font-size: 17px; max-width: 46ch; }
.finale-side .contact-lines { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 16px 0 0; font-size: 15px; }
.contact-lines a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.contact-lines a:hover { color: var(--kerb); }

/* ---------- Garage: one project, full screen ---------- */
.garage {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  background: var(--asphalt);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s;
}
.garage[hidden] { display: none; }
.garage.on { opacity: 1; transform: none; }
.garage-open body { overflow: hidden; }

.garage-media {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  min-height: 0;
  background: #0f1013;
}
.garage-shot {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
}
.garage-thumbs { display: flex; gap: 10px; justify-content: center; }
.garage-thumbs button {
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  opacity: 0.6;
}
.garage-thumbs button[aria-current='true'] { border-color: var(--kerb); opacity: 1; }
.garage-thumbs button:hover { opacity: 1; }
.garage-thumbs img { display: block; width: 96px; height: 60px; object-fit: cover; object-position: top left; }

.garage-info {
  position: relative;
  overflow-y: auto;
  padding: 28px 28px 24px;
  border-left: 2px solid var(--pitwall);
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
.garage-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  font-size: 18px;
  color: var(--chalk);
  background: var(--pitwall);
  border: 0;
  cursor: pointer;
}
.garage-close:hover { background: var(--rosso); }
.garage-count { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.garage-info h2 { font-weight: 700; font-size: 32px; line-height: 1.15; margin: 0 0 6px; }
.garage-kind { margin: 0 0 22px; color: var(--muted); font-size: 17px; }
.garage-figure { margin: 0 0 20px; padding: 14px 0; border-block: 1px solid var(--pitwall); }
.garage-figure b { display: block; font-weight: 700; font-size: 40px; line-height: 1; color: var(--kerb); margin-bottom: 6px; }
.garage-figure span { font-size: 16px; }
.garage-body { margin: 0 0 16px; }
.garage-built { list-style: none; padding: 0; margin: 0 0 18px; }
.garage-meta { display: grid; gap: 8px; margin: 0 0 22px; }
.garage-meta div { display: grid; grid-template-columns: 90px 1fr; }
.garage-meta dt { color: var(--muted); }
.garage-meta dd { margin: 0; font-weight: 600; }
.garage-actions { margin-bottom: 22px; }
.garage-private { margin: 0; padding: 10px 14px; border-left: 4px solid var(--kerb); background: var(--pitwall); font-size: 16px; }
.garage-nav { margin-top: auto; display: flex; justify-content: space-between; gap: 10px; }
.garage-nav button {
  font: inherit;
  font-weight: 600;
  color: var(--chalk);
  background: none;
  border: 1px solid rgba(242, 240, 234, 0.35);
  padding: 8px 12px;
  cursor: pointer;
}
.garage-nav button:hover { border-color: var(--kerb); color: var(--kerb); }

/* ---------- Laptops with short screens ---------- */
@media (max-width: 900px) and (min-aspect-ratio: 4/5) {
  .badge-name { display: none; }
  .garage { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* ---------- Phones held upright ---------- */
@media (max-aspect-ratio: 4/5) {
  .pitwall { gap: 12px; padding: 0 10px; }
  .badge-name { display: none; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 14px; }
  .skip { font-size: 13px; padding: 5px 8px; }
  .stage { top: var(--nav-h); bottom: auto; height: calc(48vh - var(--nav-h)); }
  .stage.lb .bar { height: 0; }
  .hud-top, .stage:not(.lb) .hud-top { top: 12px; font-size: 11px; left: 12px; right: 12px; }
  .hud-dial { width: 68px; left: 8px; bottom: 8px; }
  .stage.lb .hud-dial { bottom: 8px; }
  .gear { font-size: 16px; padding: 4px 5px 2px; }
  .speed { left: 4%; bottom: -14px; font-size: 11px; }
  #minimap { display: none; }
  .hero { top: 48vh; bottom: auto; transform: none; }
  .hero-band { display: block; margin: 12px; padding: 0 16px 18px; border: 2px solid #000; }
  .hero-stripe { margin: 0 -16px 16px; height: 12px; }
  .facts { flex-direction: column; gap: 8px; }
  .facts div, .facts div:first-child { display: flex; justify-content: space-between; gap: 12px; padding: 0; }
  .facts div + div { border-left: 0; }
  .facts dd { margin: 0; text-align: right; }
  .panels { top: 48vh; bottom: 0; left: 0; right: 0; width: auto; }
  .panel {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(52vh - 24px);
    overflow-y: auto;
    transform: translateY(16px);
    font-size: 15px;
    padding: 14px;
  }
  .panel.on { transform: none; }
  .panel h2 { font-size: 22px; }
  .stage.reading::after { opacity: 0; }
  .hero h1 { font-size: 22px; margin-bottom: 10px; }
  .hero-pitch { font-size: 17px; }
  .hero-cta { margin-top: 14px; gap: 8px; }
  .hero-cta .btn { font-size: 15px; padding: 12px 14px; }
  .hero-hint { display: none; }
  .sound { display: none; }
  .nav-links a, .skip { white-space: nowrap; }
  .nav-links a.nav-cta { padding: 7px 10px; }
  .panel.finale {
    position: absolute;
    top: 12px;
    bottom: auto;
    left: 12px;
    right: 12px;
    display: block;
    padding: 0 16px 18px;
    border: 2px solid #000;
  }
  .finale-flag { margin: 0 -16px 16px; height: 16px; background-size: 16px 16px; }
  .panel.finale h2 { font-size: 24px; margin-bottom: 14px; }
  .finale-side p { font-size: 15px; }
  .garage:not([hidden]) { display: block; overflow-y: auto; }
  .garage-media { padding: 56px 12px 12px; }
  .garage-shot { flex: none; max-height: 34vh; }
  .garage-thumbs { justify-content: flex-start; overflow-x: auto; }
  .garage-thumbs img { width: 72px; height: 45px; }
  .garage-info { border-left: 0; overflow: visible; padding: 20px 16px 24px; }
  .garage-close { position: fixed; top: 10px; right: 10px; z-index: 2; }
}

/* ---------- Quick read (Skip the lap) and no JavaScript ---------- */
.no-js .scroll-track, .no-js .stage, .no-js .lapbar, .no-js .sound, .no-js .skip,
.quick .scroll-track, .quick .stage, .quick .lapbar { display: none; }
.no-js .hero, .quick .hero {
  position: static;
  opacity: 1;
  transform: none;
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 32px) 16px 0;
}
.no-js .hero-band, .quick .hero-band { display: block; margin: 0; padding: 0 20px 22px; border: 0; box-shadow: 0 0 0 2px var(--pitwall); }
.no-js .hero-stripe, .quick .hero-stripe { margin: 0 -20px 18px; }
.no-js .hero h1, .quick .hero h1 { font-size: clamp(24px, 4vw, 40px); margin-bottom: 12px; }
.no-js .hero-hint, .quick .hero-hint { display: none; }
.no-js .panels, .quick .panels {
  position: static;
  width: auto;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 64px;
  pointer-events: auto;
}
.no-js .panel, .quick .panel {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  width: auto;
  max-height: none;
  overflow: visible;
  margin: 28px 0;
  box-shadow: 0 0 0 2px var(--pitwall);
}
.no-js .panel.finale, .quick .panel.finale { display: block; padding: 0 20px 22px; }
.no-js .finale-flag, .quick .finale-flag { margin: 0 -20px 18px; }
.no-js .panel.finale h2, .quick .panel.finale h2 { font-size: clamp(24px, 4vw, 40px); margin-bottom: 14px; }

/* Dot grid footer. In the quick read it ends the page; in the race it
   slides up under the finale once the car is past the line. */
.dotgrid { display: none; }
:root:not(.quick, .no-js) {
  --grid-h: clamp(200px, 34vh, 360px);
}
:root:not(.quick, .no-js) .dotgrid {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--grid-h);
  z-index: 5;
  overflow: hidden;
  background: var(--asphalt);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.5s ease, visibility 0.5s;
}
:root.ending:not(.quick) .dotgrid { transform: none; visibility: visible; }
:root.ending:not(.quick) .panel.finale.on { transform: translateY(calc(-1 * var(--grid-h))); }
.panel.finale { transition: opacity 0.35s, transform 0.5s ease, visibility 0.35s; }
@media (max-aspect-ratio: 4/5) {
  /* On phones the finale sits under the track, so the grid takes over the
     track view instead. */
  :root:not(.quick, .no-js) .dotgrid {
    top: var(--nav-h);
    bottom: auto;
    height: calc(48vh - var(--nav-h));
    transform: none;
    opacity: 0;
    transition: opacity 0.6s, visibility 0.6s;
  }
  :root.ending:not(.quick) .dotgrid { opacity: 1; }
  :root.ending:not(.quick) .panel.finale.on { transform: none; }
}
.quick .dotgrid {
  display: block;
  position: relative;
  height: clamp(280px, 48vh, 440px);
  overflow: hidden;
  border-top: 2px solid var(--pitwall);
  background: var(--asphalt);
  opacity: 0;
  transition: opacity 1.2s ease-out;
}
.quick .dotgrid.on { opacity: 1; }
@media (max-width: 600px) { .quick .dotgrid { height: 280px; } }
.dotgrid canvas, .dotgrid-noise { position: absolute; inset: 0; width: 100%; height: 100%; }
.dotgrid-noise { opacity: 0.06; mix-blend-mode: overlay; pointer-events: none; }
.dotgrid-sign {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  font-size: 15px;
  color: var(--muted);
  pointer-events: none;
}
.dotgrid-sign p { margin: 0; }
.dotgrid-sign a { color: var(--chalk); text-decoration: underline; text-underline-offset: 3px; pointer-events: auto; }
.dotgrid-sign a:hover { color: var(--kerb); }
.quick .panels { padding-bottom: 40px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

@media (max-width: 420px) {
  .nav-me { display: none; }
}
