/* Tourist Trap
   A comic book about a road trip. The page is a comic page laid on a road map.
   The site name is on a billboard, the menu is a row of exit signs, and a car
   drives along the bottom of the screen as the page scrolls. */

/* The fonts are the Latin subsets that Google Fonts serves. */
@font-face {
  font-family: Bangers;
  src: url("fonts/bangers.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comic Neue";
  src: url("fonts/comic-neue.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comic Neue";
  src: url("fonts/comic-neue-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comic Neue";
  src: url("fonts/comic-neue-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Comic Neue";
  src: url("fonts/comic-neue-bold-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@property --miles {
  syntax: "<integer>";
  inherits: false;
  initial-value: 0;
}

/* Four digits, as on an odometer */
@counter-style odometer {
  system: numeric;
  symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9";
  pad: 4 "0";
}

:root {
  /* Inks. Hex values appear only in this block. */
  --c-ink: #16131c;
  --c-paper: #fffaf0;
  --c-map: #efe2bf;
  --c-map-line: #cdbd93;
  --c-water: #8cc4d6;
  --c-red: #e3342c;
  --c-yellow: #ffd23f;
  --c-orange: #f6921e;
  --c-blue: #1d63c4;
  --c-green: #1b8a4d;
  --c-pink: #ff7eb6;
  --c-teal: #25b0a0;
  --c-asphalt: #3b3944;

  /* Jobs */
  --ink: var(--c-ink);
  --paper: var(--c-paper);
  --map: var(--c-map);
  --map-line: var(--c-map-line);
  --water: var(--c-water);
  --route: var(--c-red);
  --board: var(--c-red);
  --bulb: var(--c-yellow);
  --name: var(--c-yellow);
  --exit: var(--c-green);
  --caption: var(--c-yellow);
  --title: var(--c-red);
  --link: var(--c-blue);
  --link-hot: var(--c-yellow);
  --sfx: var(--c-red);
  --road: var(--c-asphalt);
  --stripe: var(--c-yellow);
  --car: var(--c-teal);
  --well: var(--c-ink);

  /* Shapes */
  --line: 4px;
  --outline-3:
    3px 0 var(--ink), -3px 0 var(--ink), 0 3px var(--ink), 0 -3px var(--ink),
    2px 2px var(--ink), -2px -2px var(--ink), 2px -2px var(--ink), -2px 2px var(--ink);
  --outline-2:
    2px 0 var(--ink), -2px 0 var(--ink), 0 2px var(--ink), 0 -2px var(--ink),
    1.5px 1.5px var(--ink), -1.5px -1.5px var(--ink), 1.5px -1.5px var(--ink), -1.5px 1.5px var(--ink);

  --dash-h: 3.75rem;
  --odo-w: 8.5rem;
  --car-w: 5.5rem;

  --title-font: Bangers, Impact, "Arial Black", sans-serif;
  --body-font: "Comic Neue", "Comic Sans MS", "Chalkboard SE", sans-serif;
  --code-font: "Courier New", Courier, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--map);
  scroll-padding-bottom: calc(var(--dash-h) + 2rem);
}

body {
  margin: 0;
  min-height: 100dvh;
  padding: 0 1rem calc(var(--dash-h) + 5rem);
  overflow-x: clip;
  font: 400 1.125rem/1.6 var(--body-font);
  color: var(--ink);
}

::selection { background: var(--c-pink); color: var(--ink); }

/* ── The map ──────────────────────────────────────────────────────────────
   Fixed behind the page: a grid, a river, some roads and the towns on them. */

.map {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(var(--map-line) 1px, transparent 1px) 0 0 / 100% 5rem,
    linear-gradient(90deg, var(--map-line) 1px, transparent 1px) 0 0 / 5rem 100%,
    var(--map);
}

.map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map .river { fill: none; stroke: var(--water); stroke-width: 14; stroke-linecap: round; }
.map .lake { fill: var(--water); }
.map .lane { fill: none; stroke: var(--map-line); stroke-width: 5; }
.map .casing { fill: none; stroke: var(--ink); stroke-width: 11; stroke-linecap: round; }
.map .route { fill: none; stroke: var(--route); stroke-width: 6; stroke-linecap: round; }
.map .town { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
.map .shield { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; }

.map text {
  font: 700 17px var(--body-font);
  letter-spacing: 0.04em;
  fill: var(--ink);
}

.map .small { font-size: 13px; font-style: italic; font-weight: 400; }
.map .num { font: 400 15px var(--title-font); text-anchor: middle; }

/* The map has been folded in three and in half */
.map::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent calc(33.3% - 1px), rgb(0 0 0 / 0.14) 33.3%, rgb(255 255 255 / 0.6) calc(33.3% + 1px), transparent calc(33.3% + 3px)),
    linear-gradient(90deg, transparent calc(66.6% - 1px), rgb(0 0 0 / 0.14) 66.6%, rgb(255 255 255 / 0.6) calc(66.6% + 1px), transparent calc(66.6% + 3px)),
    linear-gradient(transparent calc(50% - 1px), rgb(0 0 0 / 0.14) 50%, rgb(255 255 255 / 0.6) calc(50% + 1px), transparent calc(50% + 3px));
}

/* ── The billboard ────────────────────────────────────────────────────────
   The dotted border is a row of bulbs. Two colours take turns. */

.billboard {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 2.5rem auto 3rem;
  padding: 0.9rem 2.2rem 0.8rem;
  text-align: center;
  background: linear-gradient(var(--board), var(--board)) padding-box, var(--ink) border-box;
  border: 0.75rem dotted var(--bulb);
  box-shadow: 0 0 0 var(--line) var(--ink), 10px 10px 0 var(--line) rgb(0 0 0 / 0.25);
  rotate: -1.5deg;
  animation: bulbs 0.9s steps(1) infinite;
}

@keyframes bulbs {
  50% { border-color: var(--paper); }
}

/* Two posts */
.billboard::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: calc(100% + 0.75rem);
  height: 2.6rem;
  z-index: -1;
  border-inline: 0.7rem solid var(--ink);
}

.billboard .name {
  display: block;
  font: 400 clamp(2.4rem, 9vw, 4.2rem) / 1 var(--title-font);
  letter-spacing: 0.04em;
  color: var(--name);
  text-decoration: none;
  text-shadow: var(--outline-3), 5px 6px 0 var(--ink);
}

.billboard .name:hover { background: none; color: var(--paper); }

.billboard .tagline {
  margin: 0.5rem 0 0;
  font: 700 0.85rem/1.2 var(--body-font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
}

/* ── The exits ────────────────────────────────────────────────────────── */

.exits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.4rem;
  margin: 0 auto 2.5rem;
}

.exits a {
  position: relative;
  padding: 0.55rem 1.1rem 0.35rem;
  font: 400 1.35rem/1 var(--title-font);
  letter-spacing: 0.06em;
  color: var(--paper);
  text-decoration: none;
  background: var(--exit);
  border: var(--line) solid var(--ink);
  border-radius: 0.5rem;
  box-shadow: inset 0 0 0 2px var(--paper), 5px 5px 0 rgb(0 0 0 / 0.25);
}

.exits a:nth-child(odd) { rotate: 1deg; }
.exits a:nth-child(even) { rotate: -1.2deg; }
.exits a:hover { background: var(--c-blue); color: var(--paper); }

/* The small tab on top of an exit sign */
.exits .exit {
  position: absolute;
  right: 0.6rem;
  bottom: calc(100% + 1px);
  padding: 0.15rem 0.5rem 0.05rem;
  font-size: 0.75rem;
  background: var(--exit);
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 0.35rem 0.35rem 0 0;
}

.exits a:hover .exit { background: var(--c-blue); }

/* ── The page ─────────────────────────────────────────────────────────── */

.page {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 2.75rem 2.5rem;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  box-shadow: 12px 12px 0 rgb(0 0 0 / 0.3);
}

/* The splash panel: a road, a sun, and the monument. Sizes are in cqw, so the
   drawing keeps its proportions at any width. */

.splash {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0 -1.25rem 2rem;
  overflow: hidden;
  container-type: inline-size;
  border: var(--line) solid var(--ink);
}

.splash .sky {
  position: absolute;
  inset: 0 0 38%;
  background: repeating-conic-gradient(from -3deg at 50% 100%, var(--c-yellow) 0 6deg, var(--c-orange) 6deg 12deg);
}

/* Halftone: dots that thin out towards the horizon */
.splash .sky::before {
  content: "";
  position: absolute;
  inset: 0;
  --dot: radial-gradient(var(--c-red) 30%, transparent 32%);
  background:
    var(--dot) 0 0 / 1.6cqw 1.6cqw,
    var(--dot) 0.8cqw 0.8cqw / 1.6cqw 1.6cqw;
  -webkit-mask-image: linear-gradient(black, transparent 75%);
  mask-image: linear-gradient(black, transparent 75%);
}

.splash .sun {
  position: absolute;
  left: 39%;
  bottom: 38%;
  width: 22cqw;
  height: 11cqw;
  background: var(--paper);
  border: 0.6cqw solid var(--ink);
  border-bottom: 0;
  border-radius: 11cqw 11cqw 0 0;
}

.splash .ground {
  position: absolute;
  inset: 62% 0 0;
  background:
    radial-gradient(var(--c-ink) 18%, transparent 20%) 0 0 / 2.4cqw 2.4cqw,
    var(--c-teal);
  border-top: 0.6cqw solid var(--ink);
}

.splash .road {
  position: absolute;
  inset: 62% 0 0;
  background: var(--road);
  clip-path: polygon(48% 0, 52% 0, 80% 100%, 20% 100%);
}

.splash .road::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(var(--stripe) 0 10%, transparent 10% 20%);
  clip-path: polygon(49.7% 0, 50.3% 0, 51.6% 100%, 48.4% 100%);
}

.splash .monument {
  position: absolute;
  left: 6%;
  bottom: 14%;
  display: grid;
  justify-items: center;
}

.splash .glyph {
  font: 700 36cqw/0.86 Georgia, "Times New Roman", serif;
  color: var(--c-pink);
  text-shadow:
    0.6cqw 0 var(--ink), -0.6cqw 0 var(--ink), 0 0.6cqw var(--ink), 0 -0.6cqw var(--ink),
    0.45cqw 0.45cqw var(--ink), -0.45cqw -0.45cqw var(--ink), 0.45cqw -0.45cqw var(--ink), -0.45cqw 0.45cqw var(--ink),
    1.4cqw 1.4cqw 0 var(--ink);
}

.splash .plinth {
  width: 21cqw;
  height: 4.5cqw;
  margin-top: -3cqw;
  background: var(--paper);
  border: 0.6cqw solid var(--ink);
}

.splash .roadsign {
  position: absolute;
  right: 5%;
  bottom: 30%;
  width: 25cqw;
  padding: 1.2cqw 1cqw 0.8cqw;
  font: 400 3cqw/1.05 var(--title-font);
  letter-spacing: 0.04em;
  text-align: center;
  background: var(--paper);
  border: 0.6cqw solid var(--ink);
  rotate: 2deg;
}

.splash .roadsign b { display: block; font-weight: 400; color: var(--c-red); }

.splash .roadsign::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: calc(100% + 0.6cqw);
  height: 9cqw;
  border-inline: 1cqw solid var(--ink);
}

/* A narration box */
.splash figcaption,
.caption {
  width: fit-content;
  padding: 0.4rem 0.8rem 0.3rem;
  font: 700 0.85rem/1.3 var(--body-font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--caption);
  border: 3px solid var(--ink);
}

.splash figcaption {
  position: absolute;
  left: 2.5%;
  top: 4%;
  max-width: 58%;
}

.caption { margin: 0 0 0.9rem; rotate: -1deg; }

h1 {
  margin: 0 0 1.6rem;
  font: 400 clamp(2.3rem, 7.5vw, 3.7rem) / 1.02 var(--title-font);
  letter-spacing: 0.03em;
  color: var(--title);
  text-shadow: var(--outline-3), 5px 6px 0 var(--ink);
  rotate: -1.2deg;
  transform-origin: 0 50%;
}

/* A narration box that starts a section */
h2 {
  display: table;
  margin: 2.6rem 0 1.1rem -0.5rem;
  padding: 0.35rem 0.9rem 0.15rem;
  font: 400 1.6rem/1.15 var(--title-font);
  letter-spacing: 0.05em;
  background: var(--caption);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  rotate: -1deg;
}

h2:nth-of-type(even) { rotate: 0.8deg; background: var(--c-pink); }

h3 {
  margin: 2rem 0 0.5rem;
  font: 400 1.35rem/1.2 var(--title-font);
  letter-spacing: 0.05em;
  color: var(--c-blue);
}

p { margin: 0 0 1.1rem; }

.opening::first-letter {
  float: left;
  margin: 0.04em 0.1em 0 0;
  font: 400 5.4em/0.82 var(--title-font);
  color: var(--c-yellow);
  text-shadow: var(--outline-3), 4px 5px 0 var(--ink);
}

/* Comic lettering stresses a word with bold italics */
strong { font-weight: 700; font-style: italic; }

a {
  font-weight: 700;
  color: var(--link);
  text-decoration: underline 2px;
  text-underline-offset: 0.18em;
}

a:hover { background: var(--link-hot); color: var(--ink); }

a:focus-visible {
  outline: var(--line) dashed var(--ink);
  outline-offset: 3px;
}

ul, ol { margin: 0 0 1.2rem; padding-left: 1.7rem; }
li { margin: 0.3rem 0; padding-left: 0.2rem; }
.page ul > li::marker { content: "★ "; color: var(--c-red); }
.page ol > li::marker { font-family: var(--title-font); color: var(--c-red); }

/* A speech balloon. The tail is two triangles: ink, then paper inside it. */
blockquote {
  position: relative;
  width: fit-content;
  max-width: 32rem;
  margin: 2.2rem auto 4.2rem;
  padding: 1.1rem 1.7rem 1rem;
  text-align: center;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 2.6rem / 2.2rem;
}

blockquote::before,
blockquote::after {
  content: "";
  position: absolute;
  left: 3.2rem;
  top: 100%;
  border: 0 solid transparent;
  border-top-color: var(--ink);
  border-width: 2.1rem 1.5rem 0 0.3rem;
}

blockquote::after {
  left: calc(3.2rem + 5px);
  margin-top: -5px;
  border-top-color: var(--paper);
  border-width: 1.75rem 1.15rem 0 0.12rem;
}

blockquote p {
  margin: 0;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

blockquote footer {
  position: absolute;
  left: 5.6rem;
  top: calc(100% + 0.9rem);
  font: 400 1rem/1 var(--title-font);
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--c-blue);
}

/* The other speaker's balloon points from the right */
blockquote.right::before { left: auto; right: 3.2rem; border-width: 2.1rem 0.3rem 0 1.5rem; }
blockquote.right::after { left: auto; right: calc(3.2rem + 5px); border-width: 1.75rem 0.12rem 0 1.15rem; }
blockquote.right footer { left: auto; right: 5.6rem; color: var(--c-red); }

/* A sound effect */
.sfx {
  margin: 1.5rem 0;
  font: 400 clamp(2.6rem, 9vw, 4.2rem) / 1 var(--title-font);
  letter-spacing: 0.05em;
  text-align: right;
  color: var(--sfx);
  text-shadow:
    3px 0 var(--c-yellow), -3px 0 var(--c-yellow), 0 3px var(--c-yellow), 0 -3px var(--c-yellow),
    2px 2px var(--c-yellow), -2px -2px var(--c-yellow), 2px -2px var(--c-yellow), -2px 2px var(--c-yellow),
    6px 7px 0 var(--ink);
  rotate: -4deg;
}

/* A strip of road */
hr {
  height: 1.5rem;
  margin: 2.8rem -2.75rem;
  border: solid var(--ink);
  border-width: var(--line) 0;
  background:
    repeating-linear-gradient(90deg, var(--stripe) 0 1.6rem, transparent 1.6rem 3.2rem) 0 50% / 100% 3px no-repeat,
    var(--road);
}

code { font: 700 0.9em var(--code-font); }

:not(pre) > code {
  padding: 0.05em 0.35em;
  white-space: nowrap;
  background: var(--c-yellow);
  border: 2px solid var(--ink);
}

/* Evidence. Each block is tagged Exhibit A, B, C… */
.page { counter-reset: exhibit; }

pre {
  position: relative;
  margin: 2.4rem 0 1.8rem;
  padding: 1.3rem 1.3rem 1.1rem;
  overflow-x: auto;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--paper);
  background: var(--well);
  border: var(--line) solid var(--ink);
  box-shadow: 7px 7px 0 var(--c-blue);
  counter-increment: exhibit;
}

pre::before {
  content: "Exhibit " counter(exhibit, upper-alpha);
  position: sticky;
  left: 0;
  display: block;
  width: fit-content;
  margin: -0.4rem 0 0.8rem;
  padding: 0.15rem 0.6rem 0;
  font: 400 0.95rem/1.3 var(--title-font);
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--c-yellow);
  rotate: -2deg;
}

pre code { font-size: inherit; font-weight: 400; }

.kw { color: var(--c-pink); }
.fn { color: var(--c-yellow); }
.typ { color: var(--c-water); }
.num { color: var(--c-orange); }
.str { color: var(--c-teal); }
.com { color: var(--c-map-line); font-style: italic; }

.table-scroll {
  margin: 1.6rem 0;
  padding: 0 8px 8px 0;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 1rem;
  border: var(--line) solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

th, td {
  padding: 0.45rem 0.8rem;
  text-align: left;
  border-bottom: 2px solid var(--ink);
}

th {
  padding-top: 0.6rem;
  font: 400 1.1rem/1.2 var(--title-font);
  letter-spacing: 0.08em;
  color: var(--c-yellow);
  background: var(--ink);
}

tbody tr:nth-child(even) { background: var(--map); }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 700; white-space: nowrap; }

/* A blob of ink */
.swatch {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.5em;
  vertical-align: -0.22em;
  background: var(--c);
  border: 2px solid var(--ink);
  border-radius: 55% 45% 50% 50% / 45% 55% 45% 55%;
}

/* A large-letter postcard */
.postcard {
  position: relative;
  max-width: 27rem;
  margin: 2.6rem auto;
  padding: 1.2rem 1.5rem 1.1rem;
  text-align: center;
  background:
    radial-gradient(var(--paper) 22%, transparent 24%) 0 0 / 0.7rem 0.7rem,
    var(--water);
  border: var(--line) solid var(--ink);
  box-shadow: inset 0 0 0 0.45rem var(--paper), 9px 9px 0 rgb(0 0 0 / 0.3);
  rotate: 2deg;
}

.postcard p { margin: 0; }

.postcard .greet {
  font: 700 1rem/1.2 var(--body-font);
  font-style: italic;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.postcard .place {
  padding: 0.1em 0 0;
  font: 400 clamp(3.4rem, 15vw, 5.6rem) / 0.95 var(--title-font);
  letter-spacing: 0.06em;
  color: var(--c-red);
  text-shadow: var(--outline-3), 6px 7px 0 var(--ink);
}

.postcard .note {
  width: fit-content;
  margin: 0.5rem auto 0;
  padding: 0.2rem 0.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--paper);
  border: 2px solid var(--ink);
}

.postcard .stamp {
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 3.2rem;
  font: 400 1.2rem/1 var(--title-font);
  color: var(--paper);
  background: var(--c-pink);
  border: 3px dotted var(--paper);
  outline: 2px solid var(--ink);
  rotate: 7deg;
}

.colophon {
  margin-top: 2.6rem;
  padding-top: 1rem;
  font-size: 0.9rem;
  border-top: 3px dashed var(--ink);
}

.colophon p:last-child { margin-bottom: 0; }

/* ── The dashboard ────────────────────────────────────────────────────────
   A strip of road along the bottom. The car is as far along it as the reader
   is down the page, and the odometer counts the miles. Both follow the scroll
   position. Without scroll timelines the car waits at the start. */

.dash {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  height: var(--dash-h);
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, var(--stripe) 0 2.2rem, transparent 2.2rem 4.4rem) 0 62% / 100% 4px no-repeat,
    var(--road);
  border-top: var(--line) solid var(--ink);
}

.car {
  position: absolute;
  left: 0.6rem;
  bottom: 0.45rem;
  width: var(--car-w);
}

.car svg { display: block; width: 100%; height: auto; }
.car .body { fill: var(--car); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.car .glass { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.car .tyre { fill: var(--ink); }
.car .hub { fill: var(--paper); }
.car .lamp { fill: var(--c-yellow); stroke: var(--ink); stroke-width: 2; }
.car .trim { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }

.odo {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: var(--odo-w);
  margin: 0;
  font: 400 1rem/1 var(--title-font);
  letter-spacing: 0.1em;
  color: var(--paper);
  background: var(--ink);
}

.odo .digits {
  padding: 0.3rem 0.45rem 0.15rem;
  font-size: 1.3rem;
  letter-spacing: 0.18em;
  color: var(--ink);
  background: var(--paper);
  counter-reset: miles var(--miles);
}

.odo .digits::before { content: counter(miles, odometer); }

@keyframes drive { to { transform: translateX(calc(100vw - var(--car-w) - var(--odo-w) - 1.2rem)); } }
@keyframes count { to { --miles: 214; } }

@supports (animation-timeline: scroll()) {
  .car {
    animation: drive linear both;
    animation-timeline: scroll(root block);
  }

  .odo .digits {
    animation: count linear both;
    animation-timeline: scroll(root block);
  }
}

/* ── Narrow screens ───────────────────────────────────────────────────── */

@media (max-width: 700px) {
  :root { --dash-h: 3.25rem; --odo-w: 7rem; --car-w: 4.6rem; --line: 3px; }
  body { padding-inline: 0.6rem; font-size: 1.0625rem; }
  .billboard { margin-top: 1.8rem; padding-inline: 1.2rem; border-width: 0.6rem; }
  .exits { gap: 1.2rem 0.9rem; }
  .exits a { font-size: 1.15rem; padding-inline: 0.8rem; }
  .page { padding: 1rem 1.2rem 2rem; box-shadow: 7px 7px 0 rgb(0 0 0 / 0.3); }
  .splash { margin-inline: -0.5rem; }
  .splash figcaption { max-width: 70%; padding: 0.25rem 0.5rem 0.2rem; font-size: 0.68rem; }
  h2 { margin-left: -0.25rem; font-size: 1.4rem; }
  hr { margin-inline: -1.2rem; }
  blockquote { padding-inline: 1.2rem; }
  .odo { font-size: 0.85rem; gap: 0.35rem; }
  .odo .digits { font-size: 1.1rem; }
  .postcard .place { font-size: 3rem; }
  .postcard .stamp { width: 2.2rem; height: 2.6rem; font-size: 1rem; }
}

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