/* =========================================================================
   CarTV Cast — site.css
   One stylesheet. No build step. No external requests.
   ========================================================================= */

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  color-scheme: dark;

  --bg:        #08090B;
  --bg-elev:   #101214;
  --panel:     rgba(255,255,255,.045);
  --panel-2:   rgba(255,255,255,.028);
  --hairline:  rgba(255,255,255,.10);
  --hairline-2:rgba(255,255,255,.06);

  --text:      #F2F4F6;
  --text-2:    #A2AAB4;
  --text-3:    #8A929C;

  --accent:      #30DE6A;
  --accent-text: #30DE6A;
  --accent-ink:  #062A13;
  --accent-soft: rgba(48,222,106,.14);

  --warn:      #F7B955;
  --warn-soft: rgba(247,185,85,.10);

  /* The three routes. Colour AND stroke pattern, so they read apart in
     greyscale and for colour-blind readers. */
  --rt-direct:  #30DE6A;
  --rt-receive: #64C8FF;
  --rt-mirror:  #C6A6FF;

  --top-hi: inset 0 1px 0 rgba(255,255,255,.05);

  /* Space scale — 8px base. */
  --s4: 4px;    --s8: 8px;    --s12: 12px;  --s16: 16px;
  --s24: 24px;  --s32: 32px;  --s48: 48px;  --s64: 64px;
  --s96: 96px;  --s128: 128px; --s176: 176px;

  --r-panel: 24px;
  --r-card:  16px;
  --r-pill:  999px;

  --band-pad: clamp(88px, 14vw, 176px);
  --gutter: max(16px, env(safe-area-inset-left));

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg:        #FBFBFD;
    --bg-elev:   #FFFFFF;
    --panel:     rgba(9,12,16,.035);
    --panel-2:   rgba(9,12,16,.022);
    --hairline:  rgba(9,12,16,.10);
    --hairline-2:rgba(9,12,16,.06);

    --text:      #0B0D10;
    --text-2:    #545B64;
    --text-3:    #6B7480;

    --accent:      #22C55E;   /* fills, rules, SVG strokes only */
    --accent-text: #15803D;   /* accent-coloured TEXT lives here (4.9:1) */
    --accent-ink:  #052E14;
    --accent-soft: rgba(34,197,94,.12);

    --warn:      #8A5A00;
    --warn-soft: rgba(138,90,0,.08);

    --rt-direct:  #15803D;
    --rt-receive: #0369A1;
    --rt-mirror:  #6D28D9;

    --top-hi: none;
  }
}

@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1200px) { :root { --gutter: 32px; } }

/* ---------- 2. Base ------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 { font-weight: 600; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

::selection { background: var(--accent-soft); }

/* ---------- 3. Typography ------------------------------------------------ */

.eyebrow {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 var(--s16);
}

h1, .h1 {
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  letter-spacing: -.025em;
  line-height: 1.04;
  max-width: 15ch;
}

h2, .h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -.02em;
  line-height: 1.08;
  max-width: 18ch;
}

h3, .h3 {
  font-size: 1.1875rem;
  letter-spacing: -.01em;
  line-height: 1.3;
}

.lede {
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-2);
  max-width: 34ch;
}

.body { max-width: 68ch; color: var(--text-2); }
.body strong { color: var(--text); font-weight: 600; }

.meta { font-size: .875rem; line-height: 1.55; color: var(--text-3); }
.meta a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.meta a:hover { color: var(--text); }

.num { font-variant-numeric: tabular-nums; }

/* Protocol nouns only: SSDP, AVTransport, HLS, M3U8, ReplayKit. */
.tok {
  font-family: var(--mono);
  font-size: .9em;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: .08em .38em;
  white-space: nowrap;
  color: var(--text);
}

/* ---------- 4. Layout ---------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
}

.band { padding-block: var(--band-pad); position: relative; }
.band--rule { border-top: 1px solid var(--hairline-2); }
.band--tight { padding-block: clamp(56px, 8vw, 96px); }

.prose { max-width: 720px; }

.stack > * + * { margin-top: var(--s16); }
.stack-lg > * + * { margin-top: var(--s24); }
.stack-xl > * + * { margin-top: var(--s32); }

.grid {
  display: grid;
  gap: var(--s16);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s24); }

.section-head { margin-bottom: var(--s48); }
.section-head .lede { margin-top: var(--s24); }

/* The spine — a drafted hairline down the left of the content column. */
@media (min-width: 1024px) {
  .band > .wrap { max-width: 1128px; padding-left: 48px; }
  .band > .wrap::before {
    content: "";
    position: absolute;
    inset-inline-start: 16px;
    top: 0; bottom: 0;
    width: 1px;
    background: var(--hairline);
  }
  .band > .wrap::after {
    content: "";
    position: absolute;
    inset-inline-start: 13px;
    top: 12px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent);
  }
  .band--nospine > .wrap::before,
  .band--nospine > .wrap::after { display: none; }
}

/* ---------- 5. Skip link & focus ---------------------------------------- */

.skip {
  position: absolute;
  inset-inline-start: var(--s16);
  top: -100px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  padding: var(--s12) var(--s16);
  border-radius: var(--s12);
  transition: top 120ms ease;
}
.skip:focus { top: var(--s12); text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn:focus-visible, .badge:focus-visible { border-radius: var(--r-pill); }
.card:focus-visible, .panel:focus-visible { border-radius: var(--r-card); }

/* ---------- 6. Header ---------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--hairline-2);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--s16);
  min-height: 56px;
  padding-block: var(--s8);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: var(--s8);
  color: var(--text);
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 24px; height: 24px; flex: none; }

.site-nav { margin-inline-start: auto; display: flex; align-items: center; gap: var(--s4); }
.site-nav a {
  color: var(--text-2);
  font-size: .9375rem;
  padding: var(--s12);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
}
.site-nav a:hover { color: var(--text); text-decoration: none; background: var(--panel); }
@media (max-width: 899px) { .site-nav .nav-hide { display: none; } }

.lang {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: .875rem;
  color: var(--text-2);
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 0 var(--s32) 0 var(--s12);
  min-height: 44px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 14px center, right 9px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
[dir="rtl"] .lang {
  padding: 0 var(--s12) 0 var(--s32);
  background-position: left 9px center, left 14px center;
}
.lang:hover { color: var(--text); }

/* ---------- 7. Buttons, badge, pills ------------------------------------ */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s24);
}

/* App Store badge — drawn here, never hotlinked from Apple. The two text
   lines are real HTML so they translate with the rest of the page. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 20px 0 18px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--top-hi);
  color: var(--text);
}
.badge:hover { text-decoration: none; border-color: var(--text-3); }
.badge-apple { width: 21px; height: 26px; flex: none; margin-top: -3px; }
.badge-text { display: flex; flex-direction: column; line-height: 1.15; text-align: start; }
.badge-text small { font-size: .6875rem; font-weight: 400; color: var(--text-2); }
.badge-text strong { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.02em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s8);
  min-height: 44px;
  padding: var(--s12) var(--s24);
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: .9375rem;
  cursor: pointer;
}
.btn:hover { text-decoration: none; background: var(--panel-2); border-color: var(--text-3); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent); opacity: .9; }

.link-quiet {
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
  min-height: 44px;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--accent-text);
}
.link-quiet svg { width: 14px; height: 14px; flex: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .01em;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  color: var(--text-2);
  white-space: nowrap;
}
.pill--yes { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pill--no  { color: var(--text-2); }
.pill--pro { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* ---------- 8. Panels & cards ------------------------------------------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  box-shadow: var(--top-hi);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  padding: var(--s32);
}

.card {
  background: var(--panel-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s24);
  display: flex;
  flex-direction: column;
  gap: var(--s12);
}
.card h3 { margin: 0; }
.card p { font-size: .9375rem; color: var(--text-2); margin: 0; }
.card .card-ico { width: 28px; height: 28px; color: var(--text-2); }

.caption {
  margin-top: var(--s24);
  font-size: .875rem;
  color: var(--text-3);
  max-width: 62ch;
}
.caption strong { color: var(--text-2); font-weight: 600; }

/* Amber safety note — a standing condition of use, not an alarm. */
.note {
  display: flex;
  gap: var(--s12);
  align-items: flex-start;
  border-inline-start: 3px solid var(--warn);
  background: var(--warn-soft);
  border-radius: 0 var(--s12) var(--s12) 0;
  padding: var(--s12) var(--s16);
  max-width: 52ch;
}
[dir="rtl"] .note { border-radius: var(--s12) 0 0 var(--s12); }
.note svg { width: 18px; height: 18px; flex: none; color: var(--warn); margin-top: 3px; }
.note p { font-size: .9375rem; color: var(--text); }

/* Legal line, promoted out of footer grey. */
.legal-line {
  font-size: clamp(1.5rem, 3.4vw, 2.375rem);
  line-height: 1.24;
  letter-spacing: -.015em;
  font-weight: 400;
  color: var(--text);
  max-width: 30ch;
}

/* ---------- 9. Hero ------------------------------------------------------ */

.hero { padding-block: clamp(48px, 7vw, 88px) var(--band-pad); }
.hero-grid {
  display: grid;
  gap: var(--s48);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s64); }
}
.hero h1 { margin-bottom: var(--s24); }
.hero h1 .br-wide { display: none; }
@media (min-width: 768px) { .hero h1 .br-wide { display: inline; } }

.trust-strip {
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  font-size: .875rem;
  color: var(--text-2);
  margin-top: var(--s32);
  padding-top: var(--s24);
  border-top: 1px solid var(--hairline-2);
}
@media (min-width: 768px) {
  .trust-strip { flex-direction: row; gap: 0; }
  .trust-strip li { padding-inline: var(--s16); border-inline-start: 1px solid var(--hairline); }
  .trust-strip li:first-child { padding-inline-start: 0; border-inline-start: 0; }
}
.trust-strip li { list-style: none; }

/* ---------- 10. Route legend -------------------------------------------- */

.legend {
  display: grid;
  gap: var(--s12);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  margin-top: var(--s32);
  list-style: none;
}
.legend li {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s16);
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  gap: var(--s8);
}
.legend .route-name {
  display: flex;
  align-items: center;
  gap: var(--s8);
  font-weight: 600;
  font-size: .9375rem;
}
.legend .route-name svg { width: 28px; height: 10px; flex: none; }
.legend p { font-size: .8125rem; color: var(--text-3); }

.rt-direct  { color: var(--rt-direct); }
.rt-receive { color: var(--rt-receive); }
.rt-mirror  { color: var(--rt-mirror); }

/* ---------- 11. Diagrams ------------------------------------------------- */

/* Labels are positioned HTML, never text inside the SVG: 22 locales, RTL,
   and German labels 30-40% longer than English. */
.diagram {
  position: relative;
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--panel-2);
  overflow: hidden;
}
.diagram > svg { width: 100%; height: auto; display: block; color: var(--text-2); }

/* Free-standing illustrations use the same pen. */
.illus svg { width: 100%; height: auto; color: var(--text-2); }
[dir="rtl"] .diagram > svg { transform: scaleX(-1); }

.dlabel {
  position: absolute;
  font-size: clamp(.625rem, 1.15vw, .8125rem);
  line-height: 1.25;
  font-weight: 600;
  color: var(--text-2);
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: 30%;
  pointer-events: none;
}
[dir="rtl"] .dlabel { transform: translate(50%, -50%); }
.dlabel--start { transform: translate(0, -50%); text-align: start; }
[dir="rtl"] .dlabel--start { transform: translate(0, -50%); }
.dlabel small { display: block; font-weight: 400; font-size: .92em; color: var(--text-3); }

/* Route colours must win over .dlabel's own colour. */
.dlabel.rt-direct  { color: var(--rt-direct); }
.dlabel.rt-receive { color: var(--rt-receive); }
.dlabel.rt-mirror  { color: var(--rt-mirror); }

.diagram--desktop { display: none; }
@media (min-width: 600px) {
  .diagram--desktop { display: block; }
  .diagram--stacked { display: none; }
}

/* ---------- 12. Comparison table ---------------------------------------- */

.table-scroll { overflow-x: auto; margin-top: var(--s32); -webkit-overflow-scrolling: touch; }
table.cmp {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: .9375rem;
}
table.cmp caption { text-align: start; font-size: .875rem; color: var(--text-3); padding-bottom: var(--s12); }
table.cmp th, table.cmp td {
  text-align: start;
  padding: var(--s12) var(--s16);
  border-bottom: 1px solid var(--hairline-2);
  vertical-align: top;
}
table.cmp thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; }
table.cmp tbody th { font-weight: 600; color: var(--text); white-space: nowrap; }
table.cmp td { color: var(--text-2); }

/* ---------- 13. The ledger ----------------------------------------------- */

.ledger { margin-top: var(--s48); }
.ledger-head {
  display: none;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  font-weight: 600;
  padding-bottom: var(--s12);
  border-bottom: 1px solid var(--hairline);
}
.ledger-row {
  display: grid;
  gap: var(--s4) var(--s32);
  grid-template-columns: 1fr;
  padding: var(--s16) 0;
  border-bottom: 1px solid var(--hairline-2);
  position: relative;
}
@media (min-width: 768px) {
  .ledger-head, .ledger-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .ledger-head { display: grid; gap: var(--s32); }
}
.ledger-row dt { font-weight: 600; color: var(--text); }
.ledger-row dd { margin: 0; color: var(--text-2); font-size: .9375rem; }
.ledger-row dd small { display: block; color: var(--text-3); font-size: .8125rem; margin-top: 2px; }
.ledger-row--none dd { color: var(--accent-text); font-weight: 600; }

/* The spine resolves into the ledger's leader lines. */
@media (min-width: 1024px) {
  .ledger-row::before {
    content: "";
    position: absolute;
    inset-inline-start: -32px;
    top: 27px;
    width: 24px;
    height: 1px;
    background: var(--hairline);
  }
}

/* ---------- 14. Pricing -------------------------------------------------- */

.price-grid { display: grid; gap: var(--s24); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.price {
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--panel);
  box-shadow: var(--top-hi);
  padding: var(--s32);
  display: flex;
  flex-direction: column;
  gap: var(--s16);
}
.price--feature { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.price .amount {
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price .amount span { font-size: 1rem; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.price ul { list-style: none; display: flex; flex-direction: column; gap: var(--s8); font-size: .9375rem; color: var(--text-2); }
.price ul li { display: flex; gap: var(--s8); align-items: flex-start; }
.price ul li::before {
  content: "";
  width: 6px; height: 6px; margin-top: 9px; flex: none;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- 15. FAQ ------------------------------------------------------ */

.faq { margin-top: var(--s48); border-top: 1px solid var(--hairline-2); }
.faq details { border-bottom: 1px solid var(--hairline-2); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s16);
  padding: var(--s24) 0;
  min-height: 44px;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 11px; height: 11px;
  margin-top: 7px;
  border-inline-end: 1.5px solid var(--text-3);
  border-bottom: 1.5px solid var(--text-3);
  transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 11px; }
.faq summary:hover { color: var(--accent-text); }
.faq .answer { padding: 0 0 var(--s24); max-width: 68ch; color: var(--text-2); font-size: .9375rem; }
.faq .answer > * + * { margin-top: var(--s12); }

/* ---------- 16. Two-column "it does / it does not" ----------------------- */

.does-grid { display: grid; gap: var(--s24); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: var(--s48); }
.does {
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s24);
  background: var(--panel-2);
}
.does h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: var(--s16); }
.does ul { list-style: none; display: flex; flex-direction: column; gap: var(--s12); font-size: .9375rem; color: var(--text-2); }
.does li { display: flex; gap: var(--s12); align-items: flex-start; }
.does li svg { width: 16px; height: 16px; flex: none; margin-top: 4px; }
.does--yes li svg { color: var(--accent); }
.does--no li svg { color: var(--text-3); }

/* ---------- 17. Footer --------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: var(--s64);
  background: var(--bg-elev);
}
.footer-grid {
  display: grid;
  gap: var(--s32);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.footer-grid h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: var(--s12); }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; }
.footer-grid a { color: var(--text-2); font-size: .9375rem; }
/* Standalone navigation links get a 44px target; inline prose links do not need one. */
.footer-grid ul a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-grid a:hover { color: var(--text); }
.footer-legal {
  margin-top: var(--s48);
  padding-top: var(--s24);
  border-top: 1px solid var(--hairline-2);
  display: flex;
  flex-direction: column;
  gap: var(--s16);
}
.footer-legal p { font-size: .8125rem; color: var(--text-3); max-width: 78ch; line-height: 1.6; }
.footer-legal .safety { color: var(--warn); font-weight: 600; }

/* ---------- 18. Legal document pages ------------------------------------ */

.doc { padding-block: clamp(48px, 8vw, 96px); }
.doc .prose > * + * { margin-top: var(--s16); }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: 22ch; }
.doc h2 {
  font-size: 1.3125rem;
  max-width: 40ch;
  margin-top: var(--s48);
  padding-top: var(--s24);
  border-top: 1px solid var(--hairline-2);
}
.doc h3 { font-size: 1.0625rem; margin-top: var(--s24); }
.doc p, .doc li { color: var(--text-2); font-size: 1rem; }
.doc ul, .doc ol { padding-inline-start: var(--s24); display: flex; flex-direction: column; gap: var(--s8); }
.doc li { list-style: disc; }
.doc ol li { list-style: decimal; }
.doc .updated { font-size: .875rem; color: var(--text-3); }
/* `.doc p` is more specific than `.legal-line`, so restate the type here.
   Inside a legal document the line is emphasised but must not out-shout the
   numbered heading above it; on index.html it stays at headline size. */
.doc .legal-line {
  margin-top: var(--s24);
  font-size: 1.375rem;
  line-height: 1.4;
  max-width: 46ch;
  color: var(--text);
}
.safety-strong { color: var(--warn); font-weight: 600; }
.doc dl.ledger-row dt { margin-top: 0; }

/* ---------- 19. 404 ------------------------------------------------------ */

.oops { min-height: 58vh; display: flex; align-items: center; }

/* ---------- 20. Motion --------------------------------------------------- */

/* The visible state is the CSS default. JS opts in to animating, so the page
   is fully correct with JS disabled. */
.js-anim [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms cubic-bezier(.22,.61,.36,1), transform 400ms cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--d, 0ms);
}
.js-anim [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js-anim [data-reveal] { opacity: 1 !important; transform: none !important; transition-duration: 0ms !important; }
  * { animation-duration: 0ms !important; transition-duration: 0ms !important; }
}

/* ---------- 21. Utilities ------------------------------------------------ */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.plain-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  font-size: .9375rem;
  color: var(--text-2);
}

.center { text-align: center; }
.mt-8 { margin-top: var(--s8); }
.mt-16 { margin-top: var(--s16); }
.mt-24 { margin-top: var(--s24); }
.mt-32 { margin-top: var(--s32); }
.mt-48 { margin-top: var(--s48); }
.nowrap { white-space: nowrap; }

@media print {
  .site-header, .site-nav, .lang, .badge { display: none; }
  body { background: #fff; color: #000; }
}
