/* legal.css · the privacy policy, the DPA and the terms
 *
 * One stylesheet for three pages that are all the same shape: a narrow column
 * of prose with numbered sections. It borrows every colour, font and spacing
 * value from tokens.css and adds only what long-form text needs and the
 * landing page does not — a reading measure, list styles, and a table that
 * survives a phone.
 *
 * No dark/light switch, for the same reason index.html has none: the page is
 * black on purpose.
 */

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.wrap { max-width: var(--page-max); margin-inline: auto;
  padding-inline: var(--gutter); }

/* ------------------------------------------------------------------ bar */

.nav-wrap { background: var(--color-bar); }
.nav {
  display: flex; align-items: center; gap: var(--space-lg);
  padding-block: var(--space-sm);
}
.mark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; text-decoration: none; letter-spacing: -0.02em;
  color: var(--color-bar-ink); margin-right: auto;
}
.mark svg { width: 22px; height: 22px; display: block; }
.nav a.quiet {
  color: var(--color-bar-dim); text-decoration: none; font-size: var(--text-sm);
}
.nav a.quiet:hover { color: var(--color-bar-ink); }
.nav a[aria-current="page"] { color: var(--color-bar-ink); }

/* ----------------------------------------------------------- the paper */

.doc { padding-block: var(--space-3xl) var(--space-2xl); }
.doc-head { max-width: 46rem; }
.doc h1 {
  font-size: var(--text-2xl); font-weight: 660; line-height: 1.08;
  letter-spacing: -0.025em; margin: 0;
}
.eyebrow {
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--color-muted); margin: 0 0 var(--space-sm);
}
.dates {
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--color-muted); margin-top: var(--space-md);
}

/* The short version, above the numbered sections. Legal pages are not read
   top to bottom, so the answer goes first and the detail is underneath. */
.gist {
  margin-top: var(--space-xl); padding: var(--space-lg);
  max-width: 46rem;
  border: var(--rule) solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.gist p { margin: 0; }
.gist p + p { margin-top: var(--space-sm); }
.gist strong { font-weight: 600; }

/* --------------------------------------------------------------- prose */

.doc section { margin-top: var(--space-2xl); max-width: 42rem; }
.doc h2 {
  font-size: var(--text-xl); font-weight: 620; line-height: 1.2;
  letter-spacing: -0.02em; margin: 0 0 var(--space-md);
  display: flex; gap: 0.75rem; align-items: baseline;
}
.doc h2 .n {
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--color-muted); font-weight: 400; flex: none;
  padding-top: 0.2em;
}
.doc h3 {
  font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.015em;
  margin: var(--space-xl) 0 var(--space-xs);
}
.doc p { margin: 0 0 var(--space-md); color: var(--color-ink-dim); }
.doc p:last-child { margin-bottom: 0; }
.doc strong { color: var(--color-ink); font-weight: 600; }

.doc ul, .doc ol { margin: 0 0 var(--space-md); padding-left: 1.15rem;
  color: var(--color-ink-dim); }
.doc li { margin-bottom: var(--space-xs); }
.doc li::marker { color: var(--color-muted); }

.doc code {
  font-family: var(--font-mono); font-size: 0.9em;
  color: var(--color-ink);
  background: var(--color-raised); border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
}
.doc a[href] { color: var(--color-ink); text-underline-offset: 3px; }
.doc a[href]:hover { color: var(--color-accent-hover); }

/* An aside for the bits that are true but awkward. Not a warning box — the
   point is that it is the same voice, just set apart. */
.doc .aside {
  border-left: 2px solid var(--color-rule);
  padding-left: var(--space-md);
  margin-bottom: var(--space-md);
}

/* Anything the author has to fill in before the page is load-bearing. Loud on
   purpose: a placeholder that blends in is a placeholder that ships. */
.todo {
  background: var(--color-no-soft); color: var(--color-ink);
  border-radius: var(--radius-sm); padding: 0.1em 0.45em;
  font-family: var(--font-mono); font-size: 0.85em;
}

/* --------------------------------------------------------------- table */

.tablewrap { overflow-x: auto; margin-bottom: var(--space-md);
  border: var(--rule) solid var(--color-rule); border-radius: var(--radius); }
.doc table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); }
.doc th, .doc td {
  text-align: left; padding: 0.7rem 0.9rem; vertical-align: top;
  border-bottom: var(--rule) solid var(--color-rule-soft);
}
.doc th { color: var(--color-ink); font-weight: 600; white-space: nowrap; }
.doc td { color: var(--color-ink-dim); }
.doc tr:last-child td { border-bottom: 0; }
.doc td code { white-space: nowrap; }

/* ------------------------------------------------------------- the toc */

.toc { margin-top: var(--space-xl); max-width: 46rem; }
.toc ol { list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--space-2xs); }
.toc a { color: var(--color-ink-dim); text-decoration: none;
  font-size: var(--text-sm); }
.toc a:hover { color: var(--color-ink); }
.toc .n { font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--color-muted); margin-right: 0.6rem; }

/* -------------------------------------------------------------- footer */

footer { border-top: var(--rule) solid var(--color-rule);
  margin-top: var(--space-3xl); padding-block: var(--space-xl);
  color: var(--color-muted); font-size: var(--text-sm); }
.foot-line { display: flex; flex-wrap: wrap; gap: var(--space-lg);
  align-items: center; }
footer a { text-decoration: none; }
footer a:hover { color: var(--color-ink); }
.foot-line .spacer { margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
