/* Hallmark · genre: playful · macrostructure: Bento Grid (home) · theme: custom (tuned) · enrichment: Tier B hand-built SVG speedometer + H-pattern shift gate · nav: N10 floating morph (shrink on scroll, expand on hover) · footer: Ft8 marquee + Ft1 mast
 * vibe: "sunlit showroom, Gulf-livery blue, racing-orange needle"
 * paper: oklch(97.4% 0.006 235) · accent: oklch(70% 0.18 48) racing orange · display: Archivo (wdth 125) · body: Instrument Sans · readout: Azeret Mono
 * axes: light / display-wide-heavy / warm · user-requested: glassmorphism, parallax, magnetic buttons (Hallmark bans lifted at user request; all off under reduced motion)
 * Hallmark · pre-emit critique: P4 H4 E4 S5 R3 V5
 */
@import url("tokens.css");

/* ─── Base ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--space-lg));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: var(--nav-h);
}

main { flex: 1 0 auto; position: relative; isolation: isolate; }
.stage { position: relative; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: 800;
  font-style: normal;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  margin: 0;
  overflow-wrap: anywhere;
  min-width: 0;
  text-wrap: balance;
}
h1 { font-size: var(--text-display); font-weight: 900; }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-md); font-weight: 750; letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--space-sm); }

a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--color-accent); }

strong { font-weight: 600; color: var(--color-ink); }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--color-livery-2); color: var(--color-ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: var(--space-sm);
  top: var(--space-sm);
  z-index: 100;
  padding: var(--space-2xs) var(--space-sm);
  background: var(--color-ink);
  color: var(--color-paper);
  border-radius: var(--radius-round);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.lede {
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--color-ink-2);
  max-width: 34rem;
}

.muted { color: var(--color-muted); }
.readout { font-family: var(--font-readout); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0; }

.eyebrow {
  font-family: var(--font-readout);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent-text);
}

.inline-link { color: var(--color-ink); text-decoration-color: var(--color-accent); }

.tbc {
  border-bottom: 1.5px dashed var(--color-accent);
}
.tbc::after {
  content: "TBC";
  margin-left: 0.35em;
  padding: 0.05em 0.35em;
  font-family: var(--font-readout);
  font-size: 0.62em;
  letter-spacing: 0.08em;
  vertical-align: 0.2em;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

/* ─── Glass ────────────────────────────────────────────── */

.glass {
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-2), inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-edge-2);
  border-radius: var(--radius-lg);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .btn--glass { background: var(--glass-fill-hi); }
  .nav__pill, .nav__sheet, .theme-toggle { background: var(--glass-nav-hi); }
}

/* 3D tilt + glare. JS writes --rx, --ry (deg) and --gx, --gy (%) */
[data-tilt] {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%; --glare-o: 0;
  position: relative;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform var(--dur-long) var(--ease-out), box-shadow var(--dur-long) var(--ease-out);
}
[data-tilt].is-tilting { transition: transform 90ms linear, box-shadow var(--dur-long) var(--ease-out); }
[data-tilt]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(28rem circle at var(--gx) var(--gy), var(--glare), transparent 60%);
  opacity: var(--glare-o);
  transition: opacity var(--dur-long) var(--ease-out);
  mix-blend-mode: soft-light;
}
[data-tilt].is-tilting { box-shadow: var(--shadow-3), inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-edge-2); }

/* ─── Livery stripes (parallax background) ─────────────── */

.livery {
  position: absolute;
  inset: 0;
  overflow: clip;
  pointer-events: none;
  z-index: -1;
}
.livery__band {
  --px: 0px; --py: 0px;
  position: absolute;
  left: -25%;
  width: 150%;
  transform: translate3d(var(--px), var(--py), 0) rotate(-11deg);
  will-change: transform;
}
.livery__band--wide  { height: clamp(7rem, 16vw, 13rem); background: var(--color-livery-2); }
.livery__band--mid   { height: clamp(2.5rem, 5vw, 4rem);  background: var(--color-livery); }
.livery__band--pin   { height: 0.55rem; background: var(--color-accent); }
.livery__band--ghost { height: clamp(4rem, 9vw, 7rem); background: var(--color-livery-3); }

/* Narrow screens: page-head stripes run behind the glass nav instead of through the intro text */
@media (max-width: 47.99rem) {
  .stage--head .livery__band--wide { top: -3.5rem !important; }
  .stage--head .livery__band--pin { top: -0.275rem !important; }
  .stage--head .livery__band--ghost, .stage--head .livery__band--mid { display: none; }
}

/* ─── Buttons ──────────────────────────────────────────── */

.btn {
  --mx: 0px; --my: 0px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 3rem;
  padding: 0 1.45rem;
  border: 1px solid transparent;
  border-radius: var(--radius-round);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transform: translate(var(--mx), var(--my));
  transition:
    transform var(--dur-long) var(--ease-out),
    scale var(--dur-micro) var(--ease-out),
    background-color var(--dur-short) var(--ease-out),
    box-shadow var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn.is-magnet { transition: transform 100ms linear, scale var(--dur-micro) var(--ease-out), background-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.btn:active { scale: 0.955; }
.btn__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  transform: translate(calc(var(--mx) * 0.35), calc(var(--my) * 0.35));
  transition: transform var(--dur-long) var(--ease-out);
}
.btn.is-magnet .btn__label { transition: transform 100ms linear; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  box-shadow: var(--shadow-cta), inset 0 1px 0 var(--glass-edge);
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, var(--glare) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 750ms var(--ease-out);
}
.btn--primary:hover { background: var(--color-accent-hi); }
.btn--primary:hover::before { transform: translateX(130%); }
.btn--primary:active { background: var(--color-accent-lo); }

.btn--glass {
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-color: var(--glass-edge);
  color: var(--color-ink);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--glass-edge-2);
}
.btn--glass:hover { background: var(--glass-fill-hi); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--glass-edge-2); }
/* Glass inside glass can only blur the card it sits on, so give it a denser fill to read as a solid chip. */
.glass .btn--glass { background: var(--glass-fill-hi); }
.glass .btn--glass:hover { background: var(--glass-nav-hi); }

.btn--ink { background: var(--color-ink); color: var(--color-paper); }
.btn--ink:hover { background: var(--color-ink-2); }

.btn--sm { min-height: 2.5rem; padding: 0 1.05rem; font-size: var(--text-sm); }
.btn--lg { min-height: 3.75rem; padding: 0 2.1rem; font-size: var(--text-md); }

.btn:disabled, .btn[aria-disabled="true"] {
  cursor: default;
  box-shadow: none;
  background: var(--color-paper-3);
  color: var(--color-muted);
}
.btn:disabled::before { display: none; }
.btn:disabled:active { scale: 1; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-weight: 600;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
  padding-block: var(--space-2xs);
}
.arrow-link::after {
  content: "→";
  display: inline-block;
  color: var(--color-accent-text);
  transition: transform var(--dur-short) var(--ease-out);
}
.arrow-link:hover::after { transform: translateX(5px); }
.arrow-link:hover { text-decoration: underline; text-decoration-color: var(--color-accent); }

/* ─── Brand mark ───────────────────────────────────────── */

.mark__arc    { fill: none; stroke: var(--color-rule-dark); stroke-width: 3; stroke-linecap: round; }
.mark__fair   { fill: none; stroke: var(--color-livery); stroke-width: 3; stroke-linecap: round; }
.mark__needle { stroke: var(--color-accent); stroke-width: 3; stroke-linecap: round; }
.mark__hub    { fill: var(--color-ink); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  text-decoration: none;
  color: var(--color-ink);
  white-space: nowrap;
  flex: none;
}
.brand__mark { width: 2rem; height: 2rem; flex: none; }
.nav .brand__mark .mark__needle {
  transform-origin: 16px 19px;
  transform: rotate(calc(-70deg + var(--progress, 0) * 140deg));
  transition: transform 160ms linear;
}
.brand__word {
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: 850;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.glyph-mark { width: 1.2rem; height: 1.2rem; flex: none; }
.glyph { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Nav · floating pill that shrinks on scroll and re-expands on hover ── */

.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  padding: var(--space-xs) var(--page-gutter) 0;
  pointer-events: none;
  /* No view-transition-name here: it would make .nav a backdrop root and switch off the blur
     on everything inside it. The pill and toggle carry their own names instead. */
}
.nav__pill {
  pointer-events: auto;
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  height: 3.75rem;
  padding: 0 0.5rem 0 1.1rem;
  border-radius: var(--radius-round);
  background: var(--glass-nav);
  -webkit-backdrop-filter: var(--glass-nav-blur);
  backdrop-filter: var(--glass-nav-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--glass-edge-2);
  transform: translateY(0) scale(1);
  view-transition-name: site-nav;
  transition:
    gap var(--dur-morph) var(--ease-out),
    padding var(--dur-morph) var(--ease-out),
    height var(--dur-morph) var(--ease-out),
    box-shadow var(--dur-morph) var(--ease-out),
    background-color var(--dur-morph) var(--ease-out),
    transform var(--dur-morph) var(--ease-out);
}

.nav__links-wrap {
  display: grid;
  grid-template-columns: 1fr;
  opacity: 1;
  transition:
    grid-template-columns var(--dur-morph) var(--ease-out),
    opacity var(--dur-short) var(--ease-out) 120ms;
}
.nav__links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.125rem;
  min-width: 0;
  overflow: hidden;
  padding-block: 2px;
}
.nav__link {
  position: relative;
  z-index: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  border-radius: var(--radius-round);
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-short) var(--ease-out);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--color-ink); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.3rem;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: var(--radius-round);
  background: var(--color-accent);
}
/* Sliding hover highlight. JS positions it under the hovered link. */
.nav__hl {
  position: absolute;
  top: 2px;
  left: 0;
  height: 2.5rem;
  width: var(--hl-w, 0px);
  border-radius: var(--radius-round);
  background: var(--color-paper-3);
  transform: translateX(var(--hl-x, 0px));
  opacity: 0;
  transition: transform var(--dur-long) var(--ease-out), width var(--dur-long) var(--ease-out), opacity var(--dur-short) var(--ease-out);
  pointer-events: none;
}
.nav__links.is-hl .nav__hl { opacity: 1; }

.nav__cta { flex: none; }

.nav__progress {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: -1px;
  height: 2px;
  border-radius: var(--radius-round);
  background: var(--color-accent);
  transform-origin: left center;
  transform: scaleX(var(--progress, 0));
  opacity: 0;
  transition: opacity var(--dur-morph) var(--ease-out);
}

/* Compact: scrolled down the page, pointer elsewhere. */
.nav.is-compact .nav__pill {
  gap: var(--space-xs);
  height: 3.25rem;
  padding: 0 0.3rem 0 0.85rem;
  transform: translateY(2px) scale(0.98);
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--glass-edge-2);
}
.nav.is-compact .nav__progress { opacity: 1; }
.nav.is-compact:not(.is-peek) .nav__links-wrap {
  grid-template-columns: 0fr;
  opacity: 0;
  transition:
    grid-template-columns var(--dur-morph) var(--ease-out),
    opacity var(--dur-micro) var(--ease-in);
}
.nav.is-compact.is-peek .nav__pill { transform: translateY(2px) scale(1); gap: var(--space-sm); }

.nav__toggle {
  display: none;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 0;
  border-radius: var(--radius-round);
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}
.nav__toggle-bars {
  position: relative;
  width: 14px;
  height: 10px;
}
.nav__toggle-bars::before, .nav__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur-short) var(--ease-out);
}
.nav__toggle-bars::before { top: 1px; }
.nav__toggle-bars::after { bottom: 1px; }
.nav.is-open .nav__toggle-bars::before { transform: translateY(3px) rotate(45deg); }
.nav.is-open .nav__toggle-bars::after { transform: translateY(-3px) rotate(-45deg); }

.nav__sheet {
  pointer-events: auto;
  position: absolute;
  top: calc(100% + var(--space-2xs));
  left: var(--page-gutter);
  right: var(--page-gutter);
  display: grid;
  gap: var(--space-3xs);
  padding: var(--space-sm);
  border-radius: var(--radius-lg);
  background: var(--glass-nav-hi);
  -webkit-backdrop-filter: var(--glass-nav-blur);
  backdrop-filter: var(--glass-nav-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition: opacity var(--dur-short) var(--ease-in), transform var(--dur-short) var(--ease-in), visibility 0s linear var(--dur-short);
}
.nav.is-open .nav__sheet {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-long) var(--ease-out), visibility 0s;
}
.nav__sheet .nav__link { min-height: 3rem; font-size: var(--text-base); padding-inline: var(--space-sm); }
.nav__sheet .nav__link[aria-current="page"] { background: var(--color-paper-3); }
.nav__sheet .nav__link[aria-current="page"]::after { display: none; }
.nav__sheet .btn { margin-top: var(--space-2xs); }

@media (max-width: 63.99rem) {
  .nav { padding-right: calc(var(--page-gutter) + 3.75rem + var(--space-2xs)); }
  .nav__links-wrap, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__pill { width: 100%; justify-content: space-between; }
  .nav.is-compact .nav__pill { transform: none; }
  .nav.is-compact button.theme-toggle { transform: none; }
}
@media (min-width: 64rem) {
  .nav { padding-inline: calc(var(--page-gutter) + 3.75rem + var(--space-sm)); }
  .nav__sheet { display: none; }
}

.nav--bare .nav__pill { padding-right: 1.1rem; }

/* ─── Night-mode toggle: standalone circle at the end of the nav row ── */
.theme-toggle {
  pointer-events: auto;
  position: absolute;
  top: var(--space-xs);
  right: var(--page-gutter);
  display: grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  padding: 0;
  border-radius: var(--radius-round);
  border: 1px solid var(--glass-edge);
  background: var(--glass-nav);
  -webkit-backdrop-filter: var(--glass-nav-blur);
  backdrop-filter: var(--glass-nav-blur);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--glass-edge-2);
  color: var(--color-ink);
  view-transition-name: theme-toggle;
  cursor: pointer;
  overflow: hidden;
  transition:
    width var(--dur-morph) var(--ease-out),
    height var(--dur-morph) var(--ease-out),
    transform var(--dur-morph) var(--ease-out),
    box-shadow var(--dur-short) var(--ease-out),
    background-color var(--dur-short) var(--ease-out);
}
.theme-toggle:hover { background: var(--glass-nav-hi); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--glass-edge-2); }
.theme-toggle:active { scale: 0.92; }
.nav.is-compact .theme-toggle { width: 3.25rem; height: 3.25rem; transform: translateY(2px); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--glass-edge-2); }
.theme-toggle svg {
  grid-area: 1 / 1;
  width: 1.4rem;
  height: 1.4rem;
  transition: transform 560ms var(--ease-spring), opacity var(--dur-short) var(--ease-out);
}
.theme-toggle .icon-sun { color: var(--color-accent-lo); }
.theme-toggle .icon-moon { color: var(--color-livery); opacity: 0; transform: rotate(-100deg) scale(0.4); }
.theme-toggle:hover .icon-sun { transform: rotate(45deg); }
.sun-core { fill: currentColor; }
.sun-rays, .moon-shape { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.moon-shape { fill: currentColor; }
:root[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(100deg) scale(0.4); }
:root[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: none; color: var(--color-tier-fair); }
:root[data-theme="dark"] .theme-toggle:hover .icon-moon { transform: rotate(-18deg); }

/* The circular theme reveal runs its own clip-path animation (core.js), not the page-change one. */
html.theme-vt .nav__pill,
html.theme-vt .theme-toggle { view-transition-name: none; }
html.theme-vt::view-transition-old(root),
html.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root[data-theme="dark"] .listing::after { mix-blend-mode: screen; opacity: 0.5; }

/* ─── Section rhythm ───────────────────────────────────── */

.section { padding-block: var(--space-2xl); }
.section > h2 + p, .section > h2 + .lede { margin-top: var(--space-sm); max-width: var(--measure); color: var(--color-ink-2); }
.section-head { display: grid; gap: var(--space-sm); margin-bottom: var(--space-xl); max-width: 44rem; }
.section-head p { color: var(--color-ink-2); }

/* ─── Home · hero ──────────────────────────────────────── */

.hero {
  position: relative;
  display: grid;
  gap: var(--space-xl);
  align-items: center;
  padding-block: var(--space-xl) var(--space-3xl);
}
.hero__copy { display: grid; gap: var(--space-md); justify-items: start; min-width: 0; }
.hero h1 { font-size: clamp(2.3rem, 3.4vw + 1rem, 4.25rem); }
.hero h1 .hl {
  background: linear-gradient(transparent 62%, var(--color-livery-2) 62%, var(--color-livery-2) 92%, transparent 92%);
  padding-inline: 0.05em;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); }
.hero__note {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}
.pill-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-round);
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  white-space: nowrap;
}
.pill-note::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: var(--radius-round);
  background: var(--color-tier-good);
}

@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-2xl); padding-top: var(--space-2xl); }
}

/* ─── Speedometer ─────────────────────────────────────── */

.gauge {
  margin: 0;
  padding: clamp(1rem, 3vw, 1.75rem);
  display: grid;
  gap: var(--space-sm);
  justify-items: center;
  width: 100%;
  max-width: 34rem;
  justify-self: center;
}
.gauge__svg { width: 100%; height: auto; overflow: visible; }

.g-bezel  { fill: var(--color-paper-3); stroke: var(--color-white); stroke-width: 3; }
.g-chrome { fill: none; stroke: var(--color-rule); stroke-width: 1.5; }
.g-face   { fill: var(--color-white); }
.g-under  { fill: none; stroke: var(--color-rule-dark); stroke-width: 15; opacity: 0.35; }
.g-zone   { fill: none; stroke-width: 12; stroke-linecap: butt; transition: stroke-width var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out); }
.g-zone--lower  { stroke: var(--color-tier-lower-edge); }
.g-zone--great  { stroke: var(--color-tier-great); }
.g-zone--good   { stroke: var(--color-tier-good); }
.g-zone--fair   { stroke: var(--color-tier-fair); }
.g-zone--higher { stroke: var(--color-tier-higher); }
.gauge.has-focus .g-zone { opacity: 0.35; }
.gauge.has-focus .g-zone.is-focus { opacity: 1; stroke-width: 20; }
.g-hit { fill: none; stroke: transparent; stroke-width: 44; cursor: pointer; pointer-events: stroke; }

.g-redline { fill: none; stroke: var(--color-redline); stroke-width: 4; }
.g-tick { stroke: var(--color-rule-dark); stroke-width: 2; stroke-linecap: round; }
.g-tick--major { stroke: var(--color-ink); stroke-width: 3; }
.g-label {
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-anchor: middle;
  dominant-baseline: middle;
}
.g-label--lower  { fill: var(--color-tier-lower-ink); }
.g-label--great  { fill: var(--color-tier-great-ink); }
.g-label--good   { fill: var(--color-tier-good-ink); }
.g-label--fair   { fill: var(--color-tier-fair-ink); }
.g-label--higher { fill: var(--color-tier-higher-ink); }
.g-readout {
  font-family: var(--font-readout);
  font-weight: 600;
  font-size: 34px;
  text-anchor: middle;
  fill: var(--color-ink);
}
.g-sub {
  font-family: var(--font-readout);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-anchor: middle;
  fill: var(--color-muted);
}
.g-needle { stroke: var(--color-accent); stroke-width: 5; stroke-linecap: round; }
.g-needle-tail { stroke: var(--color-ink); stroke-width: 7; stroke-linecap: round; }
.g-hub { fill: var(--color-ink); }
.g-hub-cap { fill: var(--color-accent); }
.g-needle-group { transform-origin: 200px 210px; transform: rotate(-104deg); }
.g-rev-glow { fill: var(--color-redline); opacity: 0; transition: opacity var(--dur-short) var(--ease-out); }
.gauge.is-redline .g-rev-glow { opacity: 0.12; }

.gauge__meaning {
  min-height: 3.2em;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  max-width: 26rem;
}
.gauge__meaning strong { color: var(--color-ink); }

.gauge__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2xs);
}
.zone-chip {
  --tier: var(--color-tier-none);
  --tier-ink: var(--color-tier-none-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 2.25rem;
  padding: 0 0.8rem;
  border-radius: var(--radius-round);
  border: 1px solid var(--color-rule);
  background: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--tier-ink);
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}
.zone-chip::before {
  content: "";
  width: 0.6rem; height: 0.6rem;
  border-radius: var(--radius-round);
  background: var(--tier);
  box-shadow: inset 0 0 0 1px var(--color-rule-dark);
}
.zone-chip:hover, .zone-chip.is-focus { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--tier); }
.zone-chip:active { transform: translateY(0); }

.gauge__row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2xs); }

.rev-btn { touch-action: none; user-select: none; -webkit-user-select: none; }
.rev-btn.is-held { background: var(--color-redline); color: var(--color-paper); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius-round);
  border: 1px solid var(--color-rule);
  background: var(--color-white);
  cursor: pointer;
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.icon-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.icon-btn svg { width: 0.9rem; height: 0.9rem; }
.icon-fill { fill: var(--color-ink); }
.icon-play { display: none; }
[aria-pressed="true"] > .icon-pause { display: none; }
[aria-pressed="true"] > .icon-play { display: block; }

/* ─── Marquee ticker ──────────────────────────────────── */

.ticker {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--color-rule);
  background: var(--color-white);
  padding-block: var(--space-xs);
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 42s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__set { display: flex; flex: none; align-items: center; list-style: none; margin: 0; padding: 0; }
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding-inline: var(--space-md);
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: 800;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--color-ink);
}
.ticker__item::after {
  content: "";
  width: 0.55rem; height: 0.55rem;
  border-radius: var(--radius-round);
  background: var(--color-accent);
  margin-left: var(--space-md);
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ─── Home · bento ────────────────────────────────────── */

.bento-sec { position: relative; padding-block: var(--space-3xl); }
.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-md);
}
.tile {
  display: grid;
  align-content: start;
  gap: var(--space-sm);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  min-width: 0;
}
.tile h3 { font-size: var(--text-lg); }
.tile > p { color: var(--color-ink-2); max-width: 40rem; }
.tile__hint { font-size: var(--text-sm); color: var(--color-muted); }

@media (min-width: 48rem) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tile--a { grid-column: span 4; }
  .tile--d { grid-column: span 2; }
  .tile--b { grid-column: span 2; }
  .tile--c { grid-column: span 4; }
  .tile--e { grid-column: span 3; }
  .tile--f { grid-column: span 3; }
}

/* Illustrative listing card with a label-reading scan */
.listing {
  margin: 0;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 1px solid var(--color-rule);
  box-shadow: var(--shadow-1);
}
.listing__thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  background: var(--color-livery-3);
}
.listing__thumb .car-outline { width: 82%; }
.listing__title { font-weight: 600; }
.listing__price { margin-top: var(--space-2xs); font-size: var(--text-md); }
.listing::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 35%;
  background: linear-gradient(90deg, transparent, var(--color-livery-2), transparent);
  opacity: 0.7;
  transform: translateX(-120%);
  pointer-events: none;
  mix-blend-mode: multiply;
}
.is-in .listing::after, .tile--a:hover .listing::after { animation: scan 1400ms var(--ease-in-out) 1; }
@keyframes scan { to { transform: translateX(320%); } }
@media (max-width: 30rem) {
  .listing { grid-template-columns: minmax(0, 1fr); }
}

.car-outline path, .car-outline circle { fill: var(--color-white); stroke: var(--color-ink-2); stroke-width: 2.4; stroke-linejoin: round; }
.car-outline path + path { fill: var(--color-livery-2); }
.car-outline circle { fill: var(--color-tyre); stroke: var(--color-white); stroke-width: 4; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-3xs); margin-top: var(--space-2xs); }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--color-paper-2);
  border: 1px solid var(--color-rule);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-ink-2);
  white-space: nowrap;
}
.chip--label { background: var(--tier); border-color: var(--tier); color: var(--tier-on); }
.chip--label.is-read { box-shadow: 0 0 0 3px var(--color-paper), 0 0 0 5px var(--color-accent); }
.chip--rec { background: var(--color-livery-3); border-color: var(--color-livery-2); color: var(--color-ink-2); }
.chip--wo { background: var(--color-redline); border-color: var(--color-redline); color: var(--color-on-deep); }

/* Tier colour hooks */
.t-lower  { --tier: var(--color-tier-lower);  --tier-ink: var(--color-tier-lower-ink);  --tier-on: var(--color-on-bright); --tier-edge: var(--color-tier-lower-edge); }
.t-great  { --tier: var(--color-tier-great);  --tier-ink: var(--color-tier-great-ink);  --tier-on: var(--color-on-bright); --tier-edge: var(--color-tier-great); }
.t-good   { --tier: var(--color-tier-good);   --tier-ink: var(--color-tier-good-ink);   --tier-on: var(--color-on-deep); --tier-edge: var(--color-tier-good); }
.t-fair   { --tier: var(--color-tier-fair);   --tier-ink: var(--color-tier-fair-ink);   --tier-on: var(--color-on-bright); --tier-edge: var(--color-tier-fair); }
.t-higher { --tier: var(--color-tier-higher); --tier-ink: var(--color-tier-higher-ink); --tier-on: var(--color-on-bright); --tier-edge: var(--color-tier-higher); }
.t-none   { --tier: var(--color-tier-none);   --tier-ink: var(--color-tier-none-ink);   --tier-on: var(--color-on-deep); --tier-edge: var(--color-tier-none); }
.t-lower.chip--label { border-color: var(--color-tier-lower-edge); }

/* Tier toggles (popup label list) */
.tiers { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3xs); }
.tier {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  width: 100%;
  min-height: 2.75rem;
  padding: 0 var(--space-xs);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-ink-2);
  text-align: left;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}
button.tier:hover { background: var(--color-white); border-color: var(--color-rule); transform: translateX(3px); }
button.tier:active { transform: translateX(1px) scale(0.99); }
.tier__box {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.2rem; height: 1.2rem;
  border-radius: 5px;
  border: 1.5px solid var(--color-rule-dark);
  background: var(--color-white);
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-spring);
}
.tier__box svg { width: 0.75rem; height: 0.75rem; }
.tier__check {
  fill: none;
  stroke: var(--tier-on);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14;
  stroke-dashoffset: 14;
  transition: stroke-dashoffset var(--dur-short) var(--ease-out);
}
.tier__dot { flex: none; width: 0.55rem; height: 0.55rem; border-radius: var(--radius-round); background: var(--tier); box-shadow: inset 0 0 0 1px var(--tier-edge); }
.tier.is-on { color: var(--color-ink); }
.tier.is-on .tier__box { background: var(--tier); border-color: var(--tier-edge); transform: scale(1.06); }
.tier.is-on .tier__check { stroke-dashoffset: 0; }
.tier__label { flex: 1 1 auto; min-width: 0; }
.tier__count { color: var(--color-muted); font-size: var(--text-sm); }

/* Switch rows */
.switches { display: grid; gap: var(--space-2xs); }
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-md);
  background: var(--color-white);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
div.switch-row { cursor: default; }
button.switch-row:hover { border-color: var(--color-rule-dark); box-shadow: var(--shadow-1); }
.switch-row__title { display: block; font-weight: 600; font-size: var(--text-sm); line-height: 1.35; color: var(--color-ink); }
.switch-row__sub { display: block; font-size: var(--text-xs); color: var(--color-muted); }
.switch-row p + p { margin-top: 0.1rem; }
.switch {
  position: relative;
  flex: none;
  width: 2.6rem; height: 1.5rem;
  border-radius: var(--radius-round);
  background: var(--color-paper-3);
  box-shadow: inset 0 0 0 1px var(--color-rule);
  transition: background-color var(--dur-short) var(--ease-out);
}
.switch::after {
  content: "";
  position: absolute;
  top: 0.2rem; left: 0.2rem;
  width: 1.1rem; height: 1.1rem;
  border-radius: var(--radius-round);
  background: var(--color-thumb);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-long) var(--ease-spring);
}
.switch.is-on { background: var(--color-accent); box-shadow: none; }
.switch.is-on::after { transform: translateX(1.1rem); }
button.switch-row:active .switch::after { width: 1.35rem; }
button.switch-row:active .switch.is-on::after { transform: translateX(0.85rem); }

/* Status bar (the one the extension draws above AutoTrader's results) */
.strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 1px solid var(--color-rule);
  box-shadow: var(--shadow-1);
  font-size: var(--text-sm);
  transition: border-color var(--dur-short) var(--ease-out);
}
.strip[hidden] { display: none; }
.strip.is-paused { border-style: dashed; box-shadow: none; }
.strip__brand { display: inline-flex; align-items: center; gap: var(--space-2xs); font-weight: 700; white-space: nowrap; }
.strip.is-paused .strip__brand .glyph-mark { opacity: 0.45; filter: grayscale(1); }
.strip__tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3xs); flex: 1 1 14rem; min-width: 0; }
.strip__cap { color: var(--color-muted); font-weight: 600; font-size: var(--text-xs); margin-right: 2px; }
.stile {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-round);
  background: var(--color-paper-2);
  border: 1px solid var(--color-rule-2);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  animation: pop-in var(--dur-long) var(--ease-out) both;
}
.stile__dot { width: 0.55rem; height: 0.55rem; border-radius: var(--radius-round); background: var(--tier, var(--color-accent)); box-shadow: inset 0 0 0 1px var(--tier-edge, transparent); }
.t-none .stile__dot { background: transparent; border: 1.5px dashed var(--color-tier-none); box-shadow: none; }
.stile svg { width: 0.9rem; height: 0.9rem; color: var(--color-muted); }
.strip__off {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.85rem;
  border-radius: var(--radius-round);
  border: 1px solid var(--color-rule);
  background: var(--color-paper);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}
button.strip__off:hover { background: var(--color-white); border-color: var(--color-rule-dark); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }

/* Mini results grid (home tile C and guide demo) */
.cars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2xs);
}
@media (min-width: 40rem) { .cars { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.car {
  display: grid;
  gap: 0.2rem;
  padding: var(--space-2xs);
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 1px solid var(--color-rule);
  box-shadow: var(--shadow-1);
  min-width: 0;
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.car:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.car[hidden] { display: none; }
.car__thumb { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); background: var(--color-livery-3); }
.car__thumb .car-outline { width: 78%; }
.car .chips { margin-top: 0.2rem; min-height: 1.45rem; }
.car__title { font-size: var(--text-xs); font-weight: 600; color: var(--color-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car__price { font-size: var(--text-sm); }
.cars-empty {
  padding: var(--space-lg);
  text-align: center;
  color: var(--color-muted);
  border: 1.5px dashed var(--color-rule-dark);
  border-radius: var(--radius-md);
}
.cars-empty[hidden] { display: none; }

.tile__count { font-size: var(--text-sm); color: var(--color-ink-2); }
.tile__count b { font-family: var(--font-readout); font-weight: 600; color: var(--color-ink); }

/* Slot-machine odometer */
.odo {
  display: inline-flex;
  gap: 4px;
  padding: 7px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-chassis);
  box-shadow: inset 0 2px 6px oklch(10% 0.03 258 / 0.6), var(--shadow-2);
  width: fit-content;
  cursor: pointer;
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.odo:hover { transform: translateY(-2px); box-shadow: inset 0 2px 6px oklch(10% 0.03 258 / 0.6), var(--shadow-3); }
.odo:active { transform: translateY(0) scale(0.98); }
.odo.is-win { animation: odo-win 900ms var(--ease-out) 1; }
@keyframes odo-win {
  0%   { box-shadow: inset 0 2px 6px oklch(10% 0.03 258 / 0.6), 0 0 0 0 var(--color-accent); }
  100% { box-shadow: inset 0 2px 6px oklch(10% 0.03 258 / 0.6), 0 0 0 14px transparent; }
}
.odo__digit {
  position: relative;
  display: block;
  overflow: hidden;
  width: clamp(2rem, 4vw, 2.7rem);
  height: clamp(2.8rem, 5.6vw, 3.8rem);
  border-radius: 5px;
  background: var(--color-white);
  font-family: var(--font-readout);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  color: var(--color-ink);
}
.odo__digit:last-child { background: var(--color-accent); }
.odo__strip {
  display: grid;
  text-align: center;
  line-height: clamp(2.8rem, 5.6vw, 3.8rem);
  will-change: transform;
  transition: filter 160ms linear;
}
.odo__digit.is-spinning .odo__strip { filter: blur(1.6px); }
.odo__digit.is-landed { animation: reel-thunk 260ms var(--ease-out) 1; }
@keyframes reel-thunk { 40% { transform: translateY(1.5px); } }
.odo__digit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(oklch(23% 0.035 258 / 0.28), transparent 32%, transparent 68%, oklch(23% 0.035 258 / 0.28));
  pointer-events: none;
}
.odo-caption { font-family: var(--font-readout); font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-muted); }
.facts { list-style: none; margin: var(--space-2xs) 0 0; padding: 0; display: grid; gap: var(--space-3xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.facts li { display: flex; align-items: center; gap: var(--space-2xs); }
.facts li::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: var(--radius-round); background: var(--color-tier-good); flex: none; }

/* Pause tile */
.pause-demo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin-top: var(--space-2xs); }
.pause-demo__state { font-family: var(--font-readout); font-size: var(--text-sm); color: var(--color-ink-2); }

/* ─── Window sticker (spec plate) ─────────────────────── */

.sticker-sec { padding-block: var(--space-2xl) var(--space-3xl); display: grid; gap: var(--space-xl); }
@media (min-width: 60rem) {
  .sticker-sec { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; }
  .sticker-sec .section-head { position: sticky; top: calc(var(--nav-h) + var(--space-xl)); }
}
.sticker {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  border: 1px solid var(--color-rule);
  box-shadow: var(--shadow-2);
}
.sticker__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-livery);
  border-bottom: 4px solid var(--color-accent);
}
.sticker__title {
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: 900;
  font-size: var(--text-md);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.sticker__ver { font-family: var(--font-readout); font-size: var(--text-sm); font-weight: 600; }
.sticker-table { width: 100%; border-collapse: collapse; }
.sticker-table th, .sticker-table td { padding: var(--space-xs) var(--space-md); text-align: left; vertical-align: top; font-size: var(--text-sm); }
.sticker-table tr + tr th, .sticker-table tr + tr td { border-top: 1px dashed var(--color-rule); }
.sticker-table th {
  width: 38%;
  font-family: var(--font-readout);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding-top: 0.95rem;
}
.sticker-table tr { transition: background-color var(--dur-short) var(--ease-out); }
.sticker-table tr:hover { background: var(--color-livery-3); }
.sticker-table .is-zero { font-weight: 700; color: var(--color-tier-good-ink); }
.sticker__foot {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  border-top: 1px solid var(--color-rule);
  background: var(--color-paper-2);
  font-family: var(--font-readout);
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.barcode { display: flex; gap: 2px; align-items: stretch; height: 1.1rem; }
.barcode span { width: 2px; background: var(--color-ink); }
.barcode span:nth-child(3n) { width: 1px; }
.barcode span:nth-child(4n) { width: 3px; }
@media (max-width: 30rem) {
  .sticker-table th, .sticker-table td { display: block; width: auto; }
  .sticker-table th { padding-bottom: 0; }
  .sticker-table td { padding-top: var(--space-3xs); border-top: 0 !important; }
}

/* ─── Closer ──────────────────────────────────────────── */

.closer-sec { position: relative; padding-block: var(--space-3xl); }
.closer {
  display: grid;
  justify-items: center;
  gap: var(--space-md);
  text-align: center;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 3rem);
}
.closer h2 { font-size: var(--text-display-s); max-width: 18ch; }
.closer p { color: var(--color-ink-2); max-width: 36rem; }

/* ─── Footer ──────────────────────────────────────────── */

.foot { margin-top: auto; background: var(--color-white); border-top: 1px solid var(--color-rule); }
.foot .ticker { border-top: 0; background: var(--color-livery-3); }
.foot .ticker__item { font-size: var(--text-base); }
.foot__inner {
  display: grid;
  gap: var(--space-lg);
  padding-block: var(--space-2xl) var(--space-xl);
}
.foot__tagline { margin-top: var(--space-2xs); color: var(--color-ink-2); font-size: var(--text-sm); }
.foot__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-md); }
.foot__links a { display: inline-flex; min-height: 2.5rem; align-items: center; text-decoration: none; font-weight: 600; font-size: var(--text-sm); color: var(--color-ink-2); white-space: nowrap; }
.foot__links a:hover { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); }
.foot__legal { grid-column: 1 / -1; font-size: var(--text-xs); color: var(--color-muted); max-width: 70ch; padding-top: var(--space-md); border-top: 1px solid var(--color-rule-2); }
@media (min-width: 48rem) {
  .foot__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
}

/* ─── Content page head ───────────────────────────────── */

.page-head {
  position: relative;
  padding-block: var(--space-2xl) var(--space-xl);
  display: grid;
  gap: var(--space-md);
}
.page-head h1 { font-size: var(--text-display-s); max-width: 20ch; }
.page-head .lede { max-width: 42rem; }

/* ─── Welcome · Narrative Workflow + shift gate ───────── */

.welcome-head { position: relative; padding-block: var(--space-2xl) var(--space-xl); display: grid; gap: var(--space-md); justify-items: start; }
.welcome-head h1 { max-width: 16ch; }
.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.6em;
  padding: 0 0.35em;
  border-radius: 5px;
  border: 1px solid var(--color-rule-dark);
  border-bottom-width: 2px;
  background: var(--color-white);
  font-family: var(--font-readout);
  font-size: 0.8em;
}

.shift {
  display: grid;
  gap: var(--space-lg);
  padding-bottom: var(--space-3xl);
  align-items: start;
}
.gate {
  position: sticky;
  top: calc(var(--nav-h) + var(--space-2xs));
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-lg);
}
.gate.is-jolt { animation: jolt 260ms var(--ease-out) 1; }
@keyframes jolt {
  30% { translate: 0 2px; }
  60% { translate: 0 -1px; }
}
.gate__svg { width: 5rem; height: auto; flex: none; touch-action: none; overflow: visible; }
.gate__body { display: grid; gap: var(--space-3xs); min-width: 0; flex: 1; }
.gate__gear { font-family: var(--font-readout); font-weight: 600; font-size: var(--text-md); line-height: 1; white-space: nowrap; }
.gate__label { font-weight: 600; font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gate__help { display: none; font-size: var(--text-xs); color: var(--color-muted); }

.gate-plate { fill: var(--color-paper-2); stroke: var(--color-rule); stroke-width: 1.5; }
.gate-slot { fill: none; stroke: var(--color-ink); stroke-width: 18; stroke-linecap: round; stroke-linejoin: round; opacity: 0.88; }
.gate-slot-hi { fill: none; stroke: var(--color-ink-2); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.gate-num {
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: 900;
  font-size: 22px;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: var(--color-muted);
  transition: fill var(--dur-short) var(--ease-out);
}
.gate-num.is-on { fill: var(--color-accent-text); }
.gate-num--r { fill: var(--color-rule-dark); }
.gate-link { cursor: pointer; }
.gate-link:hover .gate-num { fill: var(--color-ink); }
.gate-link:focus-visible { outline: none; }
.gate-link:focus-visible .gate-num { fill: var(--color-focus); text-decoration: underline; }
.gate-knob-shadow { fill: oklch(23% 0.035 258 / 0.25); }
.gate-knob { fill: var(--color-accent); stroke: var(--color-white); stroke-width: 4; }
.gate-knob-shine { fill: var(--glare); }
[data-knob] { cursor: grab; }
.gate.is-dragging [data-knob] { cursor: grabbing; }

.leds { display: flex; gap: 4px; }
.led {
  width: 10px; height: 10px;
  border-radius: var(--radius-round);
  background: var(--color-led-off);
  box-shadow: inset 0 0 0 1px var(--color-rule);
  transition: background-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.led.is-lit.led--g { background: var(--color-led-green); box-shadow: 0 0 8px var(--color-led-green); }
.led.is-lit.led--a { background: var(--color-led-amber); box-shadow: 0 0 8px var(--color-led-amber); }
.led.is-lit.led--r { background: var(--color-led-red);   box-shadow: 0 0 8px var(--color-led-red); }
.leds.is-flash .led { animation: led-flash 360ms steps(2, jump-none) 4; }
@keyframes led-flash { 50% { background: var(--color-led-red); box-shadow: 0 0 10px var(--color-led-red); } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-md); counter-reset: none; }
.step {
  display: grid;
  gap: var(--space-sm);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  opacity: 0.6;
  transition: opacity var(--dur-long) var(--ease-out), box-shadow var(--dur-long) var(--ease-out), border-color var(--dur-long) var(--ease-out);
  scroll-margin-top: calc(var(--nav-h) + 7rem);
}
.step.is-active { opacity: 1; border-color: var(--color-white); box-shadow: var(--shadow-3), inset 0 0 0 2px var(--color-accent); }
.step__gear {
  font-family: var(--font-display);
  font-stretch: var(--stretch-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 0.9;
  color: var(--color-livery);
  transition: color var(--dur-long) var(--ease-out);
}
.step.is-active .step__gear { color: var(--color-accent); }
.step h2 { font-size: var(--text-lg); }
.step__body { color: var(--color-ink-2); max-width: var(--measure); }
.step__visual { margin-top: var(--space-2xs); min-width: 0; }
.step__visual .tiers, .step__visual .switches { max-width: 26rem; }

.keys { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs); color: var(--color-muted); }
.key {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 2.5rem;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 1px solid var(--color-rule);
  border-bottom-width: 3px;
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
}
.key svg { width: 1.1rem; height: 1.1rem; }
.url-chip {
  display: inline-block;
  max-width: 100%;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-round);
  background: var(--color-white);
  border: 1px solid var(--color-rule);
  font-family: var(--font-readout);
  font-size: var(--text-sm);
  color: var(--color-muted);
  overflow-wrap: anywhere;
}
.url-chip b { color: var(--color-ink); font-weight: 600; background: var(--color-livery-2); border-radius: 4px; padding-inline: 2px; }

.finish {
  display: grid;
  justify-items: start;
  gap: var(--space-md);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  margin-bottom: var(--space-3xl);
}
.finish h2 { font-size: var(--text-display-s); }
.finish p { color: var(--color-ink-2); max-width: var(--measure); }
.finish__links { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); align-items: center; }

@media (min-width: 60rem) {
  .shift { grid-template-columns: 17rem minmax(0, 1fr); gap: var(--space-2xl); }
  .gate {
    top: calc(var(--nav-h) + var(--space-lg));
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
    padding: var(--space-md);
  }
  .gate__svg { width: 100%; }
  .gate__gear { font-size: var(--text-lg); }
  .gate__label { font-size: var(--text-base); white-space: normal; }
  .gate__help { display: block; }
  .leds { justify-content: space-between; }
  .led { width: 14px; height: 14px; }
  .step { min-height: 56svh; align-content: center; }
}

/* ─── How it works · the road map ─────────────────────── */

.road-sec { padding-bottom: var(--space-2xl); }
.road-wrap { position: relative; }
.road {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-md);
  padding-left: 3.25rem;
}
.road::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1.1rem;
  border-radius: var(--radius-round);
  background:
    linear-gradient(var(--color-white) 50%, transparent 50%) center / 2px 18px repeat-y,
    var(--color-ink-2);
}
.road__car {
  position: absolute;
  left: 0.1rem;
  top: 0;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-round);
  background: var(--color-accent);
  box-shadow: var(--shadow-cta);
  transform: translateY(var(--car-y, 0px));
  transition: transform 900ms var(--ease-in-out);
  z-index: 2;
}
.road__car svg { width: 2.3rem; }
.road__car .car-outline path { fill: var(--color-white); stroke: var(--color-ink); stroke-width: 5; }
.road__car .car-outline path + path { fill: var(--color-ink-2); }
.road__car .car-outline circle { display: none; }
.node {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  gap: var(--space-2xs);
  padding: var(--space-md);
  cursor: default;
  transition: box-shadow var(--dur-long) var(--ease-out), border-color var(--dur-long) var(--ease-out);
}
.node.is-here { box-shadow: var(--shadow-3), inset 0 0 0 2px var(--color-accent); }
.node p { color: var(--color-ink-2); font-size: var(--text-sm); }
.node__where {
  /* Pinned to the card's bottom edge so the tags line up across the row; text centred inside. */
  align-self: end;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  margin-top: var(--space-xs);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-round);
  text-align: center;
  line-height: 1.25;
  text-wrap: balance;
  background: var(--color-livery-3);
  font-family: var(--font-readout);
  font-size: var(--text-xs);
  color: var(--color-ink-2);
}
.node--out .node__where { background: var(--color-accent); color: var(--color-accent-ink); }
.node__num { font-family: var(--font-readout); font-size: var(--text-xs); color: var(--color-muted); }

@media (min-width: 60rem) {
  .road { grid-template-columns: repeat(5, minmax(0, 1fr)); padding-left: 0; padding-top: 4.5rem; }
  .road::before {
    left: 0.5rem; right: 0.5rem; top: 1.3rem; bottom: auto;
    width: auto; height: 1.1rem;
    background:
      linear-gradient(90deg, var(--color-white) 50%, transparent 50%) center / 18px 2px repeat-x,
      var(--color-ink-2);
  }
  .road__car { left: 0; top: 0.35rem; width: 4rem; transform: translateX(var(--car-x, 0px)); }
  .road__car svg { width: 3.2rem; }
  .node { cursor: pointer; }
  .node::before {
    content: "";
    position: absolute;
    top: -3.4rem;
    left: 50%;
    width: 2px;
    height: 3.2rem;
    background: var(--color-rule-dark);
  }
}

.legend { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); margin-top: var(--space-lg); font-size: var(--text-sm); color: var(--color-ink-2); }
.legend__item { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.legend__swatch { width: 0.9rem; height: 0.9rem; border-radius: 4px; background: var(--color-livery-3); border: 1px solid var(--color-livery); }
.legend__swatch--out { background: var(--color-accent); border-color: var(--color-accent); }

.ledger { display: grid; gap: var(--space-md); padding-block: var(--space-2xl); }
@media (min-width: 48rem) { .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ledger__col { padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: var(--space-sm); align-content: start; }
.ledger__col ul { margin: 0; padding-left: 1.1em; color: var(--color-ink-2); display: grid; gap: var(--space-2xs); }
.ledger__col--out { background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink); }
.ledger__col--out h2 { color: var(--color-paper); }
.ledger__col--out ul { color: var(--color-paper-3); }
.ledger__big { font-family: var(--font-display); font-stretch: var(--stretch-display); font-weight: 900; font-size: var(--text-display); line-height: 1; color: var(--color-accent); }

.limits { list-style: none; margin: var(--space-lg) 0 0; padding: 0; display: grid; gap: var(--space-sm); }
@media (min-width: 48rem) { .limits--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.limits > li {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 1px solid var(--color-rule);
  color: var(--color-ink-2);
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}
.limits > li:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--color-livery); }
.limits > li strong { display: block; margin-bottom: var(--space-3xs); color: var(--color-ink); }

.perm-table { width: 100%; margin-top: var(--space-lg); border-collapse: separate; border-spacing: 0; background: var(--color-white); border: 1px solid var(--color-rule); border-radius: var(--radius-md); overflow: hidden; }
.perm-table th, .perm-table td { padding: var(--space-sm) var(--space-md); text-align: left; vertical-align: top; font-size: var(--text-sm); }
.perm-table thead th { background: var(--color-paper-2); font-family: var(--font-readout); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted); }
.perm-table tbody tr td { border-top: 1px solid var(--color-rule-2); }
.perm-table tbody tr { transition: background-color var(--dur-short) var(--ease-out); }
.perm-table tbody tr:hover { background: var(--color-livery-3); }
.perm-table td:first-child { width: 40%; }
.after-table { margin-top: var(--space-md); color: var(--color-ink-2); }
@media (max-width: 40rem) {
  .perm-table thead { display: none; }
  .perm-table tr, .perm-table td { display: block; width: auto !important; }
  .perm-table tbody tr + tr { border-top: 1px solid var(--color-rule-2); }
  .perm-table tbody tr td { border-top: 0; }
  .perm-table td + td { padding-top: 0; }
}
.tier-name { display: inline-flex; align-items: center; gap: var(--space-2xs); white-space: nowrap; color: var(--tier-ink); }
.tier-name::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: var(--radius-round); background: var(--tier); box-shadow: inset 0 0 0 1px var(--tier-edge); }
.t-none.tier-name::before { background: transparent; border: 1.5px dashed var(--color-tier-none); box-shadow: none; }

.aside-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
}
.aside-cta p { font-family: var(--font-display); font-stretch: var(--stretch-display); font-weight: 800; font-size: var(--text-md); }

/* ─── Guide · live demo ───────────────────────────────── */

.demo {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  align-items: start;
}
@media (min-width: 64rem) {
  .demo { grid-template-columns: 22rem minmax(0, 1fr); }
  .demo-pop { position: sticky; top: calc(var(--nav-h) + var(--space-md)); }
}
.demo-pop { padding: var(--space-md); display: grid; gap: var(--space-sm); }
.demo-pop__head { display: flex; align-items: center; gap: var(--space-xs); }
.demo-pop__head .glyph-mark { width: 2.25rem; height: 2.25rem; }
.demo-pop__titles { flex: 1; min-width: 0; }
.demo-pop__title { font-weight: 700; font-size: var(--text-sm); }
.demo-pop__title span { color: var(--color-muted); font-weight: 400; }
.demo-pop__sub { font-family: var(--font-readout); font-size: var(--text-xs); color: var(--color-ink-2); }
.demo-power {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.1rem;
  padding: 0 0.8rem;
  border-radius: var(--radius-round);
  border: 1px solid var(--color-tier-good);
  background: var(--color-white);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-tier-good-ink);
  cursor: pointer;
  white-space: nowrap;
}
.demo-power::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: var(--radius-round); background: var(--color-tier-good); }
.demo-power[aria-pressed="false"] { border-color: var(--color-rule-dark); color: var(--color-muted); }
.demo-power[aria-pressed="false"]::before { background: var(--color-rule-dark); }
.demo-pop__note { font-size: var(--text-xs); color: var(--color-muted); padding: var(--space-2xs) var(--space-xs); border-radius: var(--radius-sm); background: var(--color-livery-3); }
.demo-pop__label { display: flex; justify-content: space-between; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted); }
.demo-pop__label span:last-child { font-family: var(--font-readout); }
.demo-pop__body { display: grid; gap: var(--space-sm); }
.demo-pop__foot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2xs); }
.demo-results { display: grid; gap: var(--space-sm); min-width: 0; }
@media (min-width: 64rem) { .demo-results .cars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 80rem) { .demo-results .cars { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.controls { display: grid; gap: var(--space-2xs); margin: var(--space-lg) 0 0; }
.controls__item {
  display: grid;
  gap: var(--space-2xs);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 1px solid var(--color-rule);
}
@media (min-width: 48rem) { .controls__item { grid-template-columns: 16rem minmax(0, 1fr); gap: var(--space-lg); } }
.controls dt { font-weight: 700; }
.controls dd { margin: 0; color: var(--color-ink-2); }

/* ─── FAQ ─────────────────────────────────────────────── */

.faq { display: grid; gap: var(--space-sm); padding-bottom: var(--space-3xl); }
.faq-search {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0 var(--space-md);
  min-height: 3.5rem;
  border-radius: var(--radius-round);
  margin-bottom: var(--space-sm);
}
.faq-search svg { width: 1.2rem; height: 1.2rem; color: var(--color-muted); flex: none; }
.faq-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--text-md);
  color: var(--color-ink);
  outline: none;
  min-height: 3rem;
}
.faq-search input::placeholder { color: var(--color-muted); }
.faq-search:focus-within { box-shadow: var(--shadow-2), 0 0 0 3px var(--color-focus); }
.faq-count { font-family: var(--font-readout); font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
.qa {
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 1px solid var(--color-rule);
  transition: box-shadow var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
  interpolate-size: allow-keywords;
}
.qa[hidden] { display: none; }
.qa:hover { border-color: var(--color-rule-dark); }
.qa[open] { box-shadow: var(--shadow-2); border-color: var(--color-livery); }
.qa summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  min-height: 3.5rem;
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  border-radius: var(--radius-md);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "";
  flex: none;
  width: 1.9rem; height: 1.9rem;
  border-radius: var(--radius-round);
  background:
    linear-gradient(var(--color-ink), var(--color-ink)) center / 10px 2px no-repeat,
    linear-gradient(var(--color-ink), var(--color-ink)) center / 2px 10px no-repeat,
    var(--color-paper-2);
  transition: transform var(--dur-long) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}
.qa[open] summary::after {
  transform: rotate(135deg);
  background:
    linear-gradient(var(--color-accent-ink), var(--color-accent-ink)) center / 10px 2px no-repeat,
    linear-gradient(var(--color-accent-ink), var(--color-accent-ink)) center / 2px 10px no-repeat,
    var(--color-accent);
}
.qa::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size var(--dur-long) var(--ease-out), content-visibility var(--dur-long) allow-discrete;
}
.qa[open]::details-content { block-size: auto; }
.qa__a { padding: 0 var(--space-md) var(--space-md); color: var(--color-ink-2); max-width: var(--measure); }
.qa mark { background: var(--color-livery-2); color: inherit; border-radius: 3px; padding-inline: 1px; }
.faq-empty { padding: var(--space-lg); text-align: center; color: var(--color-muted); border: 1.5px dashed var(--color-rule-dark); border-radius: var(--radius-md); }
.faq-empty[hidden] { display: none; }

/* ─── Changelog · mile markers ────────────────────────── */

.releases { position: relative; display: grid; gap: var(--space-xl); padding-bottom: var(--space-3xl); }
.release { display: grid; gap: var(--space-sm); }
.release__rail { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--space-sm); }
.release__dot {
  flex: none;
  width: 1.1rem; height: 1.1rem;
  border-radius: var(--radius-round);
  background: var(--color-white);
  border: 4px solid var(--color-livery);
}
.release--latest .release__dot { border-color: var(--color-accent); animation: pulse 1600ms var(--ease-out) 3; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--color-accent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.release__card { padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: var(--space-sm); min-width: 0; }
.release__date { white-space: nowrap; }
@media (min-width: 48rem) {
  /* Road line down the left, starting at the title's edge; the version rail rides along as you scroll. */
  .releases::before {
    content: "";
    position: absolute;
    left: calc(var(--page-gutter) + 0.55rem - 2px);
    top: 2rem;
    bottom: calc(var(--space-3xl) + 1rem);
    width: 4px;
    border-radius: var(--radius-round);
    background: linear-gradient(var(--color-accent), var(--color-livery));
  }
  .release { grid-template-columns: 13rem minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
  .release__rail {
    position: sticky;
    top: calc(var(--nav-h) + var(--space-lg));
    align-items: flex-start;
    padding-top: 1.75rem;
  }
  .release .release__meta { flex-direction: column; align-items: flex-start; }
}
.release__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.release__ver { padding: 0.2rem 0.65rem; border-radius: var(--radius-round); background: var(--color-ink); color: var(--color-paper); font-size: var(--text-sm); }
.release--latest .release__ver { background: var(--color-accent); color: var(--color-accent-ink); }
.release__current { padding: 0.15rem 0.6rem; border-radius: var(--radius-round); background: var(--color-livery-3); color: var(--color-ink-2); font-weight: 600; font-size: var(--text-xs); }
.release h2 { font-size: var(--text-lg); }
.release ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.release li { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: var(--space-sm); color: var(--color-ink-2); }
.change-kind {
  justify-self: start;
  align-self: start;
  margin-top: 0.15rem;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-readout);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-paper-2);
  color: var(--color-ink-2);
}
.change-kind--added { background: var(--color-tier-great); color: var(--color-on-bright); }
.change-kind--changed { background: var(--color-livery-2); color: var(--color-ink); }
.change-kind--fixed { background: var(--color-tier-fair); color: var(--color-on-bright); }

/* ─── Contact · bays ──────────────────────────────────── */

.bays { list-style: none; margin: 0; padding: 0 0 var(--space-3xl); display: grid; gap: var(--space-md); }
@media (min-width: 48rem) { .bays { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bay { padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: var(--space-sm); align-content: start; }
.bay__num { font-family: var(--font-display); font-stretch: var(--stretch-display); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--color-livery); }
.bay__what { color: var(--color-ink-2); }
.bay ul { margin: 0; padding-left: 1.1em; color: var(--color-ink-2); font-size: var(--text-sm); display: grid; gap: 0.2rem; }
.bay__actions { display: flex; flex-wrap: wrap; gap: var(--space-2xs); align-items: center; }
.copy-btn[data-copied="true"] { background: var(--color-tier-great); color: var(--color-on-bright); }
.bay__mail { font-weight: 600; overflow-wrap: anywhere; }

/* ─── Privacy · document ──────────────────────────────── */

.doc { display: grid; gap: var(--space-xl); padding-bottom: var(--space-3xl); }
@media (min-width: 60rem) {
  .doc { grid-template-columns: 16rem minmax(0, 1fr); gap: var(--space-2xl); align-items: start; }
  .toc { position: sticky; top: calc(var(--nav-h) + var(--space-lg)); }
}
.toc { padding: var(--space-md); display: grid; gap: var(--space-sm); }
.toc h2 { font-size: var(--text-sm); font-family: var(--font-readout); font-stretch: normal; font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-muted); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; counter-reset: toc; }
.toc a {
  display: flex;
  gap: var(--space-2xs);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--color-ink-2);
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.toc a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font-family: var(--font-readout); font-size: var(--text-xs); color: var(--color-muted); padding-top: 0.15em; }
.toc a:hover { background: var(--color-white); color: var(--color-ink); }
.toc a.is-active { background: var(--color-ink); color: var(--color-paper); }
.toc a.is-active::before { color: var(--color-accent); }
.fuel { display: grid; gap: var(--space-3xs); }
.fuel__label { display: flex; justify-content: space-between; font-family: var(--font-readout); font-size: var(--text-xs); color: var(--color-muted); }
.fuel__bar { display: block; height: 8px; border-radius: var(--radius-round); background: var(--color-paper-3); overflow: hidden; }
.fuel__fill { display: block; height: 100%; background: var(--color-accent); transform-origin: left; transform: scaleX(var(--read, 0)); transition: transform 120ms linear; }
.prose { max-width: var(--measure); padding: clamp(1.25rem, 4vw, 3rem); }
.prose h2 { font-size: var(--text-lg); margin-top: var(--space-xl); scroll-margin-top: calc(var(--nav-h) + var(--space-lg)); }
.prose h2:first-child { margin-top: 0; }
.prose h2 + p, .prose h2 + ul { margin-top: var(--space-sm); }
.prose p, .prose li { color: var(--color-ink-2); }
.prose ul { padding-left: 1.1em; margin: var(--space-sm) 0 0; display: grid; gap: 0.25rem; }
.prose ul + p { margin-top: var(--space-sm); }

/* ─── Uninstalled · letter ───────────────────────────── */

.letter { max-width: 44rem; margin: var(--space-2xl) auto var(--space-3xl); padding: clamp(1.5rem, 5vw, 3.5rem); display: grid; gap: var(--space-md); }
.letter h1 { font-size: var(--text-display-s); }
.letter__body { display: grid; gap: var(--space-sm); color: var(--color-ink-2); font-size: var(--text-md); }
.letter__body p + p { margin-top: 0; }
.letter__sign { font-weight: 600; }
.feedback { display: grid; gap: var(--space-md); margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px dashed var(--color-rule-dark); }
.feedback fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.feedback legend { font-family: var(--font-display); font-stretch: var(--stretch-display); font-weight: 800; font-size: var(--text-md); margin-bottom: var(--space-xs); padding: 0; }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 3rem;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 1px solid var(--color-rule);
  cursor: pointer;
  transition: border-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.choice:hover { border-color: var(--color-rule-dark); transform: translateX(3px); }
.choice input { width: 1.15rem; height: 1.15rem; accent-color: var(--color-accent-lo); flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent), var(--shadow-1); }
.choice:has(input:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.field { display: grid; gap: var(--space-3xs); }
.field label { font-weight: 600; }
.field__hint { font-size: var(--text-sm); color: var(--color-muted); }
.field textarea {
  min-height: 8rem;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-rule-dark);
  background: var(--color-white);
  font: inherit;
  color: var(--color-ink);
  resize: vertical;
}
.field textarea:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 1px; }
.field__count { justify-self: end; font-family: var(--font-readout); font-size: var(--text-xs); color: var(--color-muted); }
.feedback__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-lg); }

/* ─── Scroll reveal (uses the individual `translate` property so it never fights tilt/magnet transforms) ── */

.rv-on .rv { opacity: 0; translate: 0 18px; }
.rv-on .rv.is-in {
  opacity: 1;
  translate: none;
  transition: opacity 640ms var(--ease-out) var(--rv-delay, 0ms), translate 640ms var(--ease-out) var(--rv-delay, 0ms);
}

/* ─── Page transitions (cross-document View Transitions, Chrome 126+) ── */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 200ms var(--ease-in) both; }
::view-transition-new(root) { animation: vt-in 380ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

/* ─── Touch / coarse pointers ─────────────────────────── */

@media (pointer: coarse) {
  .btn { min-height: 3rem; }
  .btn--sm { min-height: 2.75rem; }
}

/* ─── Reduced motion ──────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
    transition-delay: 0ms !important;
  }
  .ticker__track { animation: none; }
  .livery__band { transform: rotate(-11deg); }
  [data-tilt] { transform: none; }
  .btn, .btn__label { transform: none; }
  .rv-on .rv { opacity: 1; translate: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
