/* ==========================================================================
   Roadster — roadster-preorder.us
   Design tokens → base → layout → components → sections → legal → utilities
   ========================================================================== */

:root {
  /* Color */
  --bg: #0a0b0d;
  --bg-2: #0f1114;
  --surface: #15181d;
  --surface-2: #1c2027;
  --surface-3: #252a33;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f2ef;
  --text-muted: #a3a8b0;
  --text-dim: #8a909a;
  --accent: #ff4d2e;
  --accent-hover: #ff6a4f;
  --accent-soft: rgba(255, 77, 46, 0.14);
  --on-accent: #0a0b0d;
  --success: #3ddc97;
  --error: #ff8a80;
  --focus: #ffd166;

  /* Car */
  --paint: #c9ced4;
  --caliper: var(--accent);
  --interior: #16181c;

  /* Type */
  --font-display: "Syncopate", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem);
  --fs-2xl: clamp(2rem, 1.2rem + 3.4vw, 4rem);
  --fs-hero: clamp(2rem, 0.6rem + 5.6vw, 5.5rem);

  /* Space (spacious) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --section-y: clamp(4.5rem, 3rem + 7vw, 9rem);

  --container: 1240px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --header-h: 72px;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur: 280ms;
  --dur-slow: 700ms;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.1;
  font-weight: 700;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.display {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.section-lead {
  font-size: var(--fs-md);
  color: var(--text-muted);
  max-width: 56ch;
}

.section-head {
  display: grid;
  gap: var(--space-5);
  margin-bottom: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.section-head--split {
  grid-template-columns: 1fr;
  align-items: end;
}

@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-8);
  }
}

.mono {
  font-family: var(--font-mono);
}

.accent {
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform var(--dur) var(--ease-out);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--on-accent);
  --btn-bd: var(--accent);
}

.btn--primary:hover {
  --btn-bg: var(--accent-hover);
  --btn-bd: var(--accent-hover);
}

.btn--ghost:hover {
  --btn-bg: rgba(255, 255, 255, 0.06);
  --btn-bd: rgba(255, 255, 255, 0.32);
}

.btn--lg {
  min-height: 56px;
  padding: 0 28px;
  font-size: var(--fs-base);
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition:
    background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    backdrop-filter var(--dur) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header--solid {
  background: rgba(10, 11, 13, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}

.brand__mark {
  width: 30px;
  height: 30px;
  color: var(--accent);
}

.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.18em;
}

.nav {
  display: none;
}

.nav__list {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

.nav__link:hover,
.nav__link[aria-current="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions .btn {
  min-height: 44px;
  padding: 0 18px;
}

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  padding: var(--space-6) var(--gutter) var(--space-7);
  background: var(--bg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out),
    visibility 0s linear var(--dur);
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.mobile-nav ul {
  list-style: none;
  display: grid;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  text-decoration: none;
}

.mobile-nav a span {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.mobile-nav .btn {
  margin-top: var(--space-6);
  width: 100%;
}

@media (min-width: 1024px) {
  .nav {
    display: block;
  }
  .menu-toggle,
  .mobile-nav {
    display: none;
  }
}

@media (max-width: 420px) {
  .header-actions .btn--primary {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(1.5rem, 3vw, 3rem));
  padding-bottom: var(--space-7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 70% 62%, rgba(255, 77, 46, 0.16), transparent 70%),
    radial-gradient(40% 40% at 20% 10%, rgba(120, 140, 170, 0.12), transparent 70%),
    linear-gradient(180deg, #0a0b0d 0%, #0d0f12 60%, #0a0b0d 100%);
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.5;
}

.hero__content {
  display: grid;
  gap: var(--space-5);
  max-width: 900px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em;
}

.hero__title .line > span {
  display: inline-block;
}

.hero__title .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}

.hero__lead {
  font-size: var(--fs-md);
  color: var(--text-muted);
  max-width: 50ch;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--space-2);
}

.hero__note {
  font-size: var(--fs-sm);
  color: var(--text-dim);
}

.hero__stage {
  position: relative;
  margin-top: auto;
  padding-top: var(--space-5);
}

.hero__car {
  position: relative;
  width: min(1180px, 100%);
  margin-inline: auto;
  will-change: transform;
}

.road {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.2%;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 60px, transparent 60px 140px);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  animation: road 0.9s linear infinite;
}

@keyframes road {
  to {
    background-position: -140px 0;
  }
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--space-6);
  border-top: 1px solid var(--line);
}

.stat {
  padding: var(--space-5) var(--space-4) var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}

.stat:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.stat:nth-child(even) {
  padding-left: var(--space-5);
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat__unit {
  font-size: 0.45em;
  margin-left: 4px;
  color: var(--text-muted);
}

.stat__label {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .hero__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .stat,
  .stat:nth-child(even) {
    padding: var(--space-5) var(--space-5) var(--space-4);
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .stat:first-child {
    padding-left: 0;
  }
  .stat:last-child {
    border-right: 0;
  }
}

.footnote-mark {
  font-family: var(--font-mono);
  font-size: 0.6em;
  vertical-align: super;
  color: var(--text-dim);
}

/* ---------- Car illustration ---------- */
.car {
  width: 100%;
  height: auto;
  overflow: visible;
}

.car__paint {
  fill: var(--paint);
  transition: fill var(--dur-slow) var(--ease-out);
}

.car__interior {
  fill: var(--interior);
  transition: fill var(--dur-slow) var(--ease-out);
}

.car__caliper {
  fill: var(--caliper);
}

.car [data-rim] {
  transition: opacity var(--dur) var(--ease-out);
}

.car[data-wheels="aero"] [data-rim="forged"],
.car[data-wheels="forged"] [data-rim="aero"] {
  opacity: 0;
}

.car--driving .rim-spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 0.55s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  padding: 20px 0;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__group {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  list-style: none;
}

.marquee__group li {
  display: flex;
  align-items: center;
  gap: 40px;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--text-muted);
}

.marquee__group li::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

/* Bento */
.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.card:hover {
  border-color: var(--line-strong);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card__text {
  color: var(--text-muted);
}

.card__figure {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.card__figure small {
  font-size: 0.3em;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-left: 6px;
}

.card--feature {
  background:
    radial-gradient(80% 80% at 100% 100%, rgba(255, 77, 46, 0.16), transparent 60%),
    var(--surface);
}

.card--feature .weave {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 70%;
  aspect-ratio: 1;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 0 6px, transparent 6px 12px);
  border-radius: 50%;
  mask-image: radial-gradient(circle, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 70%);
  pointer-events: none;
}

.meter {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.meter__row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.meter__bar {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.meter__bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), #ffb199);
  transform-origin: left;
  transform: scaleX(var(--v, 0.5));
  transition: transform 1.2s var(--ease-out);
}

@media (min-width: 720px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento .card--feature {
    grid-column: span 2;
    min-height: 320px;
  }
}

@media (min-width: 1100px) {
  .bento {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(240px, auto);
  }
  .bento .card {
    grid-column: span 2;
  }
  .bento .card--feature {
    grid-column: span 4;
    grid-row: span 2;
  }
  .bento .card--wide {
    grid-column: span 3;
  }
}

/* ---------- Performance / modes ---------- */
.modes {
  display: grid;
  gap: var(--space-6);
}

.tablist {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  width: fit-content;
}

.tab {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.tab:hover {
  color: var(--text);
}

.tab[aria-selected="true"] {
  background: var(--text);
  color: var(--bg);
}

.mode-panel {
  display: grid;
  gap: var(--space-6);
  padding: clamp(1.5rem, 1rem + 2vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.mode-panel[hidden] {
  display: none;
}

.mode-panel__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  text-transform: uppercase;
}

.mode-panel__text {
  color: var(--text-muted);
  max-width: 52ch;
  margin-top: var(--space-3);
}

.mode-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.mode-figure dt {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mode-figure dd {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mode-bars {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .mode-panel {
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }
  .mode-figures {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-column: 1 / -1;
    padding-top: var(--space-5);
    border-top: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .mode-panel:not([hidden]) {
    animation: fade-up 420ms var(--ease-out);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- Configurator ---------- */
.config {
  display: grid;
  gap: var(--space-6);
}

.config__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: var(--space-6) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(70% 55% at 50% 70%, rgba(255, 255, 255, 0.07), transparent 70%),
    var(--surface);
  overflow: hidden;
}

.config__stage .car {
  max-width: 820px;
}

.config__caption {
  position: absolute;
  top: var(--space-5);
  left: var(--space-5);
  right: var(--space-5);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.config__caption strong {
  color: var(--text);
  font-weight: 500;
}

.config__panel {
  display: grid;
  gap: var(--space-6);
}

.opt-group {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.opt-group legend {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.opt-group legend output {
  color: var(--text);
  letter-spacing: 0.02em;
  text-transform: none;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.swatch {
  position: relative;
}

.swatch input,
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.swatch label {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c);
  box-shadow:
    inset 0 -8px 14px rgba(0, 0, 0, 0.35),
    inset 0 6px 10px rgba(255, 255, 255, 0.25),
    0 0 0 1px var(--line-strong);
  cursor: pointer;
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.swatch label:hover {
  transform: scale(1.06);
}

.swatch input:checked + label {
  box-shadow:
    inset 0 -8px 14px rgba(0, 0, 0, 0.35),
    inset 0 6px 10px rgba(255, 255, 255, 0.25),
    0 0 0 2px var(--bg),
    0 0 0 4px var(--text);
}

.swatch input:focus-visible + label {
  outline: 2px solid var(--focus);
  outline-offset: 6px;
}

.choices {
  display: grid;
  gap: 10px;
}

.choice label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  min-height: 56px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}

.choice label:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.choice input:checked + label {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choice input:focus-visible + label {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.choice__name {
  font-weight: 600;
}

.choice__meta {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 400;
}

.choice__price {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.summary {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
}

.summary__label {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.summary__total {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.summary__fine {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  line-height: 1.5;
}

@media (min-width: 1024px) {
  .config {
    grid-template-columns: 1.45fr 1fr;
    align-items: start;
  }
  .config__stage {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    min-height: 520px;
  }
}

/* ---------- Specs ---------- */
.blueprint {
  margin-bottom: var(--space-7);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg);
  overflow: hidden;
}

.blueprint svg {
  width: 100%;
  height: auto;
}

.blueprint text {
  font-family: var(--font-mono);
  font-size: 18px;
  fill: var(--text-muted);
  letter-spacing: 0.06em;
}

.spec-grid {
  display: grid;
  gap: var(--space-6) var(--space-7);
}

@media (min-width: 800px) {
  .spec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.spec-group h3 {
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.spec-list {
  margin: 0;
}

.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.spec-list dt {
  color: var(--text-muted);
}

.spec-list dd {
  margin: 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.disclaimer {
  margin-top: var(--space-6);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  max-width: 90ch;
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  display: grid;
  gap: 0;
  counter-reset: step;
}

.timeline__item {
  position: relative;
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5) 0 var(--space-5) 44px;
  border-left: 1px solid var(--line-strong);
  margin-left: 11px;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: calc(var(--space-5) + 6px);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--text-dim);
}

.timeline__item.is-current::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.timeline__when {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.timeline__title {
  font-size: var(--fs-lg);
  font-weight: 600;
}

.timeline__text {
  color: var(--text-muted);
  max-width: 48ch;
}

@media (min-width: 960px) {
  .timeline {
    grid-template-columns: repeat(4, 1fr);
  }
  .timeline__item {
    margin-left: 0;
    padding: 44px var(--space-5) 0 0;
    border-left: 0;
    border-top: 1px solid var(--line-strong);
  }
  .timeline__item::before {
    left: 0;
    top: -7px;
  }
}

/* ---------- Reserve form ---------- */
.reserve {
  display: grid;
  gap: var(--space-7);
}

@media (min-width: 1024px) {
  .reserve {
    grid-template-columns: 1fr 1.25fr;
    align-items: start;
  }
}

.reserve__aside {
  display: grid;
  gap: var(--space-5);
}

.checklist {
  list-style: none;
  display: grid;
  gap: var(--space-4);
}

.checklist li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  color: var(--text-muted);
}

.checklist svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  margin-top: 2px;
}

.checklist strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.form-card {
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.form-grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .field--full {
    grid-column: 1 / -1;
  }
}

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.field label,
.field .label {
  font-size: var(--fs-sm);
  font-weight: 500;
}

.field .optional {
  color: var(--text-dim);
  font-weight: 400;
}

.input,
.select {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-2);
  font-size: var(--fs-base);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.input::placeholder {
  color: var(--text-dim);
}

.input:hover,
.select:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23a3a8b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}

.select option {
  background: var(--surface);
}

.field.has-error .input,
.field.has-error .select {
  border-color: var(--error);
}

.field__hint {
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.field__error {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--error);
}

.field__error svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.field.has-error .field__error {
  display: flex;
}

.check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  cursor: pointer;
}

.check input {
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.check input::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--on-accent);
  border-bottom: 2px solid var(--on-accent);
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform var(--dur-fast) var(--ease-out);
}

.check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.check input:checked::after {
  transform: rotate(-45deg) translate(1px, -1px) scale(1);
}

.check a {
  color: var(--text);
}

.field.has-error .check input {
  border-color: var(--error);
}

.build-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.build-summary strong {
  color: var(--text);
  font-weight: 500;
}

.build-summary a {
  white-space: nowrap;
  color: var(--text);
}

.error-summary {
  display: none;
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--error);
  border-radius: var(--r-md);
  background: rgba(255, 138, 128, 0.08);
}

.error-summary.is-visible {
  display: block;
}

.error-summary h3 {
  font-size: var(--fs-base);
  margin-bottom: var(--space-2);
}

.error-summary ul {
  list-style: none;
  display: grid;
  gap: 4px;
}

.error-summary a {
  color: var(--error);
  font-size: var(--fs-sm);
}

.form-actions {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.form-legal {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  line-height: 1.55;
}

.form-legal a {
  color: var(--text-muted);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn[aria-busy="true"] .spinner {
  display: inline-block;
}

.btn[aria-busy="true"] .btn__arrow {
  display: none;
}

.form-success {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
  text-align: left;
}

.form-success[hidden] {
  display: none;
}

.form-success__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(61, 220, 151, 0.12);
  color: var(--success);
}

.form-success__icon svg {
  width: 28px;
  height: 28px;
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  text-transform: uppercase;
}

.form-success p {
  color: var(--text-muted);
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: var(--space-7);
}

@media (min-width: 960px) {
  .faq {
    grid-template-columns: 1fr 1.6fr;
  }
}

.accordion {
  border-top: 1px solid var(--line);
}

.accordion details {
  border-bottom: 1px solid var(--line);
}

.accordion summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  min-height: 72px;
  padding: var(--space-4) 0;
  font-size: var(--fs-md);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary .plus {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.accordion summary .plus::before,
.accordion summary .plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform var(--dur) var(--ease-out);
}

.accordion summary .plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.accordion details[open] summary .plus::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.accordion summary:hover .plus {
  border-color: var(--text);
}

.accordion__body {
  padding: 0 0 var(--space-5);
  color: var(--text-muted);
  max-width: 64ch;
}

.accordion__body a {
  color: var(--text);
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  padding-block: var(--section-y);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(50% 70% at 50% 100%, rgba(255, 77, 46, 0.22), transparent 70%);
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  text-transform: uppercase;
  max-width: 18ch;
  margin-inline: auto;
}

.cta-band p {
  margin: var(--space-5) auto var(--space-6);
  color: var(--text-muted);
  max-width: 48ch;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--space-8) 0 var(--space-6);
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: var(--fs-sm);
}

.footer-grid {
  display: grid;
  gap: var(--space-7);
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

.footer-about p {
  margin-top: var(--space-4);
  color: var(--text-muted);
  max-width: 36ch;
}

.footer-col h2 {
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 2px;
}

.footer-col a,
.footer-col button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  text-decoration: none;
  text-align: left;
  transition: color var(--dur-fast) var(--ease-out);
}

.footer-col a:hover,
.footer-col button:hover {
  color: var(--text);
}

.privacy-icon {
  width: 30px;
  height: 14px;
  flex: none;
}

.footer-bottom {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: var(--fs-xs);
  line-height: 1.6;
}

@media (min-width: 800px) {
  .footer-bottom {
    grid-template-columns: 1fr auto;
  }
}

/* ---------- Cookie consent ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 150;
  display: grid;
  gap: var(--space-4);
  max-width: 560px;
  padding: var(--space-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: rgba(21, 24, 29, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(calc(100% + 32px));
  transition: transform 480ms var(--ease-out);
}

.cookie-banner.is-visible {
  transform: none;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner h2 {
  font-size: var(--fs-base);
  font-weight: 600;
}

.cookie-banner p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.cookie-banner p a {
  color: var(--text);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cookie-banner__actions .btn {
  flex: 1 1 auto;
  min-height: 44px;
}

@media (min-width: 640px) {
  .cookie-banner {
    left: 24px;
    bottom: 24px;
    right: auto;
  }
}

.dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.dialog__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border-bottom: 1px solid var(--line);
}

.dialog__head h2 {
  font-size: var(--fs-lg);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.dialog__body {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
}

.dialog__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: var(--space-5);
  border-top: 1px solid var(--line);
}

.dialog__foot .btn {
  flex: 1 1 auto;
}

.pref {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}

.pref:last-child {
  border-bottom: 0;
}

.pref__title {
  font-weight: 600;
}

.pref__desc {
  grid-column: 1 / -1;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.pref__state {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  align-self: center;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}

.switch input {
  appearance: none;
  width: 48px;
  height: 28px;
  margin: 0;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out);
}

.switch input::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text);
  transform: translateY(-50%);
  transition: transform var(--dur) var(--ease-out);
}

.switch input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.switch input:checked::after {
  transform: translate(20px, -50%);
  background: var(--on-accent);
}

.gpc-note {
  display: none;
  margin-top: var(--space-2);
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(61, 220, 151, 0.08);
  border: 1px solid rgba(61, 220, 151, 0.3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.gpc-note.is-visible {
  display: block;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 160;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--bg);
  font-size: var(--fs-sm);
  font-weight: 500;
  visibility: hidden;
  transform: translate(-50%, calc(100% + 40px));
  transition:
    transform 360ms var(--ease-out),
    visibility 0s linear 360ms;
}

.toast.is-visible {
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

/* ---------- Reveal animations ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 800ms var(--ease-out),
      transform 800ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  .js .hero__title .line > span {
    transform: translateY(105%);
    animation: line-up 1s var(--ease-out) forwards;
    animation-delay: calc(120ms + var(--i, 0) * 110ms);
  }

  .js .hero__car .car {
    animation: drive-in 1.6s var(--ease-out) both 250ms;
  }
}

@keyframes line-up {
  to {
    transform: none;
  }
}

@keyframes drive-in {
  from {
    opacity: 0;
    transform: translateX(-12%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html {
    scroll-behavior: auto;
  }
  .marquee__track {
    animation: none;
  }
  .road {
    animation: none;
  }
}

/* ---------- Legal pages ---------- */
.legal-hero {
  padding: calc(var(--header-h) + var(--space-8)) 0 var(--space-7);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(50% 80% at 90% 0%, rgba(255, 77, 46, 0.12), transparent 70%),
    var(--bg);
}

.legal-hero h1 {
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  text-transform: uppercase;
  letter-spacing: -0.015em;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  padding-block: var(--space-8) var(--section-y);
}

@media (min-width: 1024px) {
  .legal-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: var(--space-9);
  }
}

.toc {
  align-self: start;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

@media (min-width: 1024px) {
  .toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow-y: auto;
  }
}

.toc h2 {
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.toc ol {
  list-style: none;
  display: grid;
  gap: 2px;
  counter-reset: toc;
}

.toc a {
  display: block;
  padding: 6px 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.4;
}

.toc a:hover,
.toc a[aria-current="true"] {
  color: var(--text);
}

.prose {
  max-width: 76ch;
  color: #d6d7d9;
  font-size: var(--fs-base);
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.6em;
  padding-top: 0.6em;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
  display: grid;
  gap: 0.5em;
}

.prose li::marker {
  color: var(--accent);
}

.prose a {
  color: var(--text);
}

.prose strong {
  color: var(--text);
}

.prose .callout {
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--surface);
  color: var(--text-muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prose th {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose .caps {
  text-transform: uppercase;
  font-size: 0.92em;
  letter-spacing: 0.01em;
}

.prose address {
  font-style: normal;
}

/* Error page */
.error-page {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: var(--header-h) var(--gutter) var(--space-7);
  text-align: center;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 3rem + 12vw, 12rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text-muted);
}

.error-page h1 {
  margin-top: var(--space-4);
  font-size: var(--fs-xl);
}

.error-page p {
  margin: var(--space-4) auto var(--space-6);
  color: var(--text-muted);
  max-width: 44ch;
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .cookie-banner,
  .toc,
  .skip-link {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .prose,
  .prose h2,
  .prose h3,
  .prose strong,
  .prose a {
    color: #000;
  }
  .legal-hero {
    padding-top: 0;
    background: none;
  }
}

/* Stat: label (dt) sits under the value (dd) visually, while DOM order stays dt → dd */
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
}
