/* ==========================================================================
   Roadster Order — independent guide
   ========================================================================== */

@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0b0c;
  --bg-2: #111113;
  --surface: #161618;
  --surface-2: #1d1d20;
  --line: #2a2a2e;
  --line-soft: #1f1f23;
  --text: #f2efe9;
  --text-2: #b9b5ad;
  --text-3: #8a867f;
  --accent: #ff4b2b;
  --accent-soft: rgba(255, 75, 43, 0.12);
  --ok: #7fd18b;
  --warn: #f2c14e;

  --serif: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --sans: "Jost", "Futura", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;

  --z-header: 40;
  --z-banner: 100;
}

*, *::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(--sans);
  font-size: 17px;
  font-weight: 350;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.08; }
button { font: inherit; color: inherit; }

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 500;
}
.skip-link:focus { top: 12px; }

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

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

/* ---------- Type helpers ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.display em { font-style: italic; color: var(--accent); }

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--text-2);
  max-width: 60ch;
  font-weight: 300;
}

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

/* ---------- Notice ribbon ---------- */

.ribbon {
  background: var(--accent);
  color: #140502;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 8px var(--gutter);
  line-height: 1.4;
}
.ribbon a { font-weight: 600; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  background: rgba(11, 11, 12, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.brand-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none;
  font-size: 14px;
  color: var(--text-2);
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.is-active { color: var(--text); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .brand-tag { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-3); background: var(--surface); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 0;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.hero h1 {
  font-size: clamp(46px, 8.4vw, 120px);
  margin: 20px 0 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-figure {
  position: relative;
  margin: clamp(40px, 6vw, 72px) 0 0;
  border-top: 1px solid var(--line);
}
.hero-figure img {
  width: 100%;
  aspect-ratio: 1600 / 1088;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}
@media (min-width: 900px) {
  .hero-figure img { aspect-ratio: 21 / 9; object-position: 50% 62%; }
}

.credit {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.5;
  margin-top: 8px;
}
.credit a { color: var(--text-3); }
.credit a:hover { color: var(--text-2); }

/* Countdown */
.countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 28px;
  padding: 20px 0 0;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}
.countdown-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  flex-basis: 100%;
}
.countdown-unit { display: flex; flex-direction: column; min-width: 64px; }
.countdown-num {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}
.countdown-cap {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 6px;
}
.countdown-done { font-size: 18px; color: var(--text-2); }

/* ---------- Stats strip ---------- */

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
.stat {
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat:nth-child(2n) { border-right: 0; }
.stat:nth-last-child(-n + 1) { border-bottom: 0; }
.stat-value {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.stat-value small { font-family: var(--sans); font-size: 0.32em; color: var(--text-2); margin-left: 4px; font-weight: 400; }
.stat-label { font-size: 14px; color: var(--text-2); margin-top: 10px; }
.stat-note { font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-top: 4px; letter-spacing: 0.04em; }

@media (max-width: 599px) {
  .stat:nth-child(5) { grid-column: 1 / -1; border-right: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-bottom: 1px solid var(--line); }
}
@media (min-width: 600px) and (max-width: 979px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat, .stat:nth-child(2n) { border-right: 1px solid var(--line); }
  .stat:nth-child(3n) { border-right: 0; }
  .stat:nth-child(n + 4) { border-bottom: 0; }
}
@media (min-width: 980px) {
  .stats-grid { grid-template-columns: repeat(5, 1fr); }
  .stat, .stat:nth-child(2n) { border-right: 1px solid var(--line); border-bottom: 0; padding: 40px 24px; }
  .stat:last-child { border-right: 0; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 10vw, 140px) 0; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 820px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 {
  font-size: clamp(36px, 5.2vw, 72px);
  margin: 18px 0 20px;
}

/* Status (confirmed / claimed / unknown) */
.status-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 900px) { .status-grid { grid-template-columns: repeat(3, 1fr); } }
.status-col { background: var(--bg); padding: 28px 24px 32px; }
.status-col h3 {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.status-col h3 svg { width: 18px; height: 18px; flex: none; }
.status-col.is-ok h3 svg { color: var(--ok); }
.status-col.is-claim h3 svg { color: var(--warn); }
.status-col.is-open h3 svg { color: var(--text-3); }
.status-col ul { list-style: none; margin: 0; padding: 0; }
.status-col li {
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 15.5px;
  color: var(--text-2);
}
.status-col li strong { color: var(--text); font-weight: 500; }

/* Specs table */
.spec-layout { display: grid; gap: 48px; }
@media (min-width: 1000px) { .spec-layout { grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; } }
.spec-aside figure { margin: 0; }
.spec-aside img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 1000px) { .spec-aside { position: sticky; top: calc(var(--header-h) + 32px); } }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.spec-table caption {
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-bottom: 14px;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 16px 12px 16px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.spec-table thead th {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  border-top: 0;
  padding-top: 0;
}
.spec-table tbody th { font-weight: 400; color: var(--text-2); width: 38%; }
.spec-table td { font-variant-numeric: tabular-nums; }
.spec-table td .src { display: block; font-family: var(--mono); font-size: 11px; color: var(--text-3); margin-top: 4px; }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.tag-ok { color: var(--ok); }
.tag-claim { color: var(--warn); }
.tag-open { color: var(--text-3); }

/* SpaceX package — split feature */
.feature {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 960px) { .feature { grid-template-columns: 1fr 1fr; gap: 80px; } }
.feature figure { margin: 0; }
.feature img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.feature-list { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: f; }
.feature-list li {
  counter-increment: f;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--text-2);
}
.feature-list li::before {
  content: counter(f, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  padding-top: 4px;
}
.feature-list strong { color: var(--text); font-weight: 500; display: block; margin-bottom: 2px; }

.quote {
  margin: 40px 0 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--accent);
}
.quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  margin: 0 0 10px;
}
.quote cite { font-style: normal; font-size: 14px; color: var(--text-3); }

/* Design gallery */
.gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(12, 1fr); gap: 20px; }
  .g-1 { grid-column: span 7; }
  .g-2 { grid-column: span 5; }
  .g-3 { grid-column: span 5; }
  .g-4 { grid-column: span 7; }
}
.gallery figure { margin: 0; }
.gallery .frame { overflow: hidden; background: var(--surface); }
.gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
@media (hover: hover) { .gallery figure:hover img { transform: scale(1.03); } }
.gallery figcaption { margin-top: 12px; }
.gallery figcaption strong { display: block; font-weight: 500; font-size: 16px; }
.gallery figcaption span { font-size: 14.5px; color: var(--text-2); }

.design-notes {
  display: grid;
  gap: 32px;
  margin-top: 64px;
}
@media (min-width: 760px) { .design-notes { grid-template-columns: repeat(3, 1fr); } }
.design-notes h3 { font-family: var(--serif); font-size: 26px; margin-bottom: 10px; }
.design-notes p { color: var(--text-2); font-size: 15.5px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 40px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 760px) { .timeline li { grid-template-columns: 180px 1fr; } }
.timeline time {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding-top: 6px;
}
.timeline h3 { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 8px; }
.timeline p { color: var(--text-2); margin: 0; max-width: 64ch; }
.timeline li.is-next time { color: var(--accent); }
.timeline li.is-next h3::after {
  content: "Upcoming";
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 3px 7px;
  margin-left: 12px;
  vertical-align: middle;
  border-radius: 2px;
}

/* Compare generations */
.compare { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 900px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare-col { background: var(--bg); }
.compare-col figure { margin: 0; }
.compare-col img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.compare-body { padding: 28px 24px 32px; }
.compare-body h3 { font-family: var(--serif); font-size: 32px; margin-bottom: 4px; }
.compare-body .years { font-family: var(--mono); font-size: 12px; color: var(--text-3); letter-spacing: 0.08em; }
.compare-body dl { margin: 24px 0 0; display: grid; grid-template-columns: auto 1fr; }
.compare-body dt, .compare-body dd {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
}
.compare-body dt { color: var(--text-3); padding-right: 20px; }
.compare-body dd { text-align: right; font-variant-numeric: tabular-nums; }
.compare-col .credit { padding: 0 24px; }

/* Price & reservation */
.price-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .price-grid { grid-template-columns: 1fr 1fr 1fr; } }
.price-card {
  border: 1px solid var(--line);
  padding: 28px 24px;
  background: var(--bg-2);
}
.price-card .label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.price-card .amount {
  font-family: var(--serif);
  font-size: clamp(40px, 4.4vw, 56px);
  line-height: 1.1;
  margin: 12px 0 10px;
  font-variant-numeric: lining-nums tabular-nums;
}
.price-card p { color: var(--text-2); font-size: 15px; margin: 0; }

.alert {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
}
.alert svg { width: 24px; height: 24px; color: var(--accent); margin-top: 2px; }
.alert h3 { font-family: var(--sans); font-size: 18px; font-weight: 500; margin-bottom: 8px; }
.alert p { color: var(--text-2); margin: 0 0 8px; font-size: 15.5px; }
.alert p:last-child { margin: 0; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  min-height: 48px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 26px);
  transition: color 0.2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: #fff; }
.faq summary .plus {
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  position: relative;
  transition: transform 0.25s var(--ease), border-color 0.2s var(--ease);
}
.faq summary .plus::before, .faq summary .plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1px;
  background: var(--text);
  transform: translate(-50%, -50%);
}
.faq summary .plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: opacity 0.2s; }
.faq details[open] summary .plus { border-color: var(--accent); }
.faq details[open] summary .plus::after { opacity: 0; }
.faq .answer { padding: 0 0 28px; color: var(--text-2); max-width: 72ch; }

/* Sources */
.sources { columns: 1; column-gap: 40px; font-size: 14.5px; padding-left: 20px; margin: 0; color: var(--text-2); }
@media (min-width: 800px) { .sources { columns: 2; } }
.sources li { break-inside: avoid; padding: 4px 0 8px; }
.sources a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line); }
.sources a:hover { text-decoration-color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 64px 0 40px;
  font-size: 14.5px;
  color: var(--text-2);
}
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a {
  display: inline-block;
  padding: 6px 0;
  text-decoration: none;
  color: var(--text-2);
}
.site-footer li a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-disclaimer { max-width: 60ch; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-3);
}
.linklike {
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: inherit;
}
.linklike:hover { color: var(--text); }

/* ---------- Cookie notice ---------- */

.cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: var(--z-banner);
  max-width: 520px;
  margin-left: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(12px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), visibility 0.3s;
}
.cookie.is-visible { transform: none; opacity: 1; visibility: visible; }
.cookie h2 { font-family: var(--sans); font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.cookie p { font-size: 14.5px; color: var(--text-2); margin: 0 0 16px; }
.cookie p a { color: var(--text); }
.cookie .btn { min-height: 44px; padding: 10px 18px; font-size: 14px; }

/* ---------- Legal pages ---------- */

.legal { padding: clamp(48px, 7vw, 96px) 0 clamp(72px, 9vw, 120px); }
.legal-head { max-width: 820px; margin-bottom: 48px; }
.legal-head h1 { font-family: var(--serif); font-size: clamp(40px, 6vw, 72px); margin: 18px 0 16px; letter-spacing: -0.02em; }
.legal-meta { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); letter-spacing: 0.04em; }

.legal-layout { display: grid; gap: 48px; }
@media (min-width: 1000px) { .legal-layout { grid-template-columns: 240px 1fr; gap: 72px; } }

.toc { font-size: 14px; }
@media (min-width: 1000px) { .toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; } }
.toc h2 { font-family: var(--mono); font-size: 11.5px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.toc ol { margin: 0; padding: 0 0 0 18px; color: var(--text-3); }
.toc li { padding: 3px 0; }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--text); text-decoration: underline; }

.prose { max-width: 72ch; color: var(--text-2); }
.prose h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 34px);
  color: var(--text);
  margin: 56px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--sans); font-weight: 500; font-size: 18px; color: var(--text); margin: 28px 0 10px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--text); text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 500; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0 24px; }
.prose th, .prose td { text-align: left; padding: 12px 12px 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--text); font-weight: 500; }
.prose .callout { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; margin: 24px 0; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; align-items: center; }
.notfound h1 { font-family: var(--serif); font-size: clamp(64px, 12vw, 160px); line-height: 1; }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

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

@media print {
  .site-header, .ribbon, .cookie, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .prose, .prose h2, .prose h3, .prose strong { color: #000; }
}

@media (max-width: 640px) {
  .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .prose th, .prose td { min-width: 120px; }
}
