/* ═════════════════════════════════════════════════════════════════
   legal.css — /privacy · /terms · /support

   These are DOCUMENTS, not the landing page. No snap scroll, no
   pinned sections, no dock, no CTA — someone arrives here from an
   App Store listing or from inside the app, usually to find one
   fact, often on a phone, sometimes while annoyed. The only job is
   that it reads.

   Built on the same library so the type and the black match the
   product, and nothing else is borrowed.
   ═════════════════════════════════════════════════════════════════ */

/* 🔴 iOS SAFARI OVERRIDES AUTHORED TYPE SIZES WITHOUT THIS. Its text
   autosizing inflates type inside narrow blocks; on a long document
   in one column that is exactly the shape it targets. Learned the
   expensive way on the landing page, 2026-09-24. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

html, body { background: var(--bg); }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  /* ⚠️ EVERY SIZE IS clamp(REM FLOOR, VIEWPORT SHARE, REM CAP).
     rem follows browser zoom and the reader's own font setting; a
     bare viewport unit ignores both, which is what broke
     vantasociety.org on zoom. The floor is what a person can read. */
  font-size: clamp(1rem, .96rem + .25vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Keyboard users land here first; it is invisible until focused. */
/* ⚠️ CLIPPED, NOT PARKED AT left:-9999px. The off-screen trick puts
   a real box 9999px outside the viewport, which counts as horizontal
   overflow — it was the only thing my own overflow check flagged on
   all six page/viewport combinations. clip-path takes it out of the
   picture without moving it. */
.skip {
  position: absolute; top: var(--s4); left: var(--gutter); z-index: 10;
  clip-path: inset(50%); white-space: nowrap;
  background: var(--inverse); color: var(--text-inverse);
  padding: var(--s4) var(--s5); border-radius: var(--r-pill);
  text-decoration: none;
}
.skip:focus { clip-path: none; }

/* ─── The bar ────────────────────────────────────────────────── */
.doc__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s5);
  max-width: 74ch; margin-inline: auto;
  padding: clamp(18px, 4svh, 34px) var(--gutter) 0;
}

.doc__home {
  display: inline-flex; align-items: center; gap: var(--s4);
  color: var(--text); text-decoration: none;
  font-size: clamp(.9375rem, .9rem + .2vw, 1rem); letter-spacing: -.01em;
}

/* The Möbius mark, mounted by orb.js. A fixed box: the mark scales
   to it by viewBox, never the other way round — see fitToBox(). */
.doc__mark { display: block; width: 26px; height: 26px; flex: none; }

.doc__nav { display: flex; gap: var(--s5); }

.doc__nav a,
.doc__foot a,
.doc__foot span {
  font-family: var(--font-mono);
  font-size: var(--t-label); letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--text-3); text-decoration: none;
}
.doc__nav a:hover, .doc__foot a:hover { color: var(--text); }

/* ─── The document ───────────────────────────────────────────── */
.doc {
  /* ⚠️ A MEASURE, NOT A CONTAINER WIDTH. 74ch keeps the line length
     readable at every type size instead of getting wider as the type
     does — which is what a px max-width would do. */
  max-width: 74ch;
  margin-inline: auto;
  padding: clamp(28px, 6svh, 56px) var(--gutter) clamp(40px, 8svh, 72px);
}

.doc h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.9vw, 2.75rem);
  line-height: 1.1; letter-spacing: -.03em;
  margin: 0 0 var(--s7);
}

.doc h2 {
  font-size: clamp(1.1875rem, 1.1rem + .5vw, 1.5rem);
  line-height: 1.25; letter-spacing: -.02em;
  margin: clamp(32px, 6svh, 56px) 0 var(--s5);
  padding-top: clamp(20px, 3.5svh, 32px);
  border-top: 1px solid var(--line);
}

/* The FAQ questions in support.md, and the labelled blocks in
   privacy.md. Not a rule above them — they sit INSIDE a section. */
.doc h3 {
  font-size: clamp(1rem, .97rem + .2vw, 1.0625rem);
  line-height: 1.4; letter-spacing: -.01em;
  margin: var(--s7) 0 var(--s3);
}

.doc p { margin: 0 0 var(--s5); color: var(--text-2); }

.doc h1 + p { color: var(--text-2); }

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

.doc ul { margin: 0 0 var(--s5); padding-left: 1.15em; color: var(--text-2); }

.doc li { margin-bottom: var(--s3); }

.doc li::marker { color: var(--text-3); }

/* ⚠️ `anywhere`, not `break-word`. The Apple EULA URL is 78
   characters with no spaces in it; on a 320px phone it is wider than
   the column and pushes the whole document sideways. */
.doc a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-color: var(--line-bright);
  overflow-wrap: anywhere;
}
.doc a:hover { text-decoration-color: currentColor; }

/* ─── The foot ───────────────────────────────────────────────── */
.doc__foot {
  max-width: 74ch; margin-inline: auto;
  padding: clamp(24px, 4svh, 36px) var(--gutter) calc(clamp(28px, 5svh, 48px) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.doc__foot nav { display: flex; flex-wrap: wrap; gap: var(--s5); margin-bottom: var(--s5); }

.doc__foot span[aria-current] { color: var(--text); }

.doc__foot p {
  margin: 0; color: var(--text-3);
  font-size: clamp(.8125rem, .79rem + .15vw, .875rem); line-height: 1.55;
}

/* ─── Print ──────────────────────────────────────────────────────
   Someone will save the privacy policy as a PDF — a reviewer, a
   lawyer, an enterprise buyer. Black-on-black does not survive that,
   and the furniture is not part of the document. */
@media print {
  html, body { background: #fff; color: #000; }
  .doc__top, .doc__foot nav, .skip { display: none; }
  .doc { max-width: none; }
  .doc p, .doc ul, .doc__foot p { color: #000; }
  .doc a { color: #000; }
  .doc h2 { border-top-color: #ccc; }
}
