/* ============================================================================
   LEGAL PAGES
   ----------------------------------------------------------------------------
   One readable column in the same token system as the rest of the site. No
   sky, no glass: these are documents, and a document that is hard to read is
   a document nobody reads, which defeats the point of having one.

   Every colour comes from design/tokens.css. There are no literals in here,
   because unlike the hero these pages do not sit on a photograph.
   ========================================================================== */

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: var(--t-body);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding-left: 1.25em; }

/* A class rule that sets `display` beats the user-agent's
   `[hidden] { display: none }`, because a class outranks a bare attribute
   selector. An element toggled with `el.hidden = true` then stays on screen
   with the attribute silently set, which is exactly how the download list
   shipped expanded. One global rule costs nothing and closes the whole class
   of bug. */
[hidden] { display: none !important; }
a { color: var(--brand-text); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; border-radius: var(--r-sm); }

.legal-skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 10;
  padding: var(--s-3) var(--s-5);
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-pill); box-shadow: var(--e-3);
  font: var(--t-label); text-decoration: none;
  transition: top var(--d-fast) var(--ease-out);
}
.legal-skip:focus { top: var(--s-4); }

.legal-nav {
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}
.legal-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--s-3);
  max-width: 76ch; margin: 0 auto; padding: var(--s-4) var(--s-5);
}
.legal-nav a { color: var(--body); text-decoration: none; font: var(--t-body-sm); }
.legal-nav a:hover { color: var(--brand-text); }
.legal-home { font: var(--t-title-sm); color: var(--ink) !important; }

.legal-wrap { max-width: 76ch; margin: 0 auto; padding: var(--s-9) var(--s-5) var(--s-11); }

.legal-title { font: var(--t-display-md); color: var(--ink); }
.legal-stamp {
  margin-top: var(--s-3);
  font: var(--t-caption);
  color: var(--muted);
}

/* The one-paragraph answer, before the detail. Somebody who reads only this
   should still come away with the true version. */
.legal-lede {
  margin-top: var(--s-6);
  padding: var(--s-5);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.legal-wrap h2 {
  margin-top: var(--s-8);
  font: var(--t-title-lg);
  color: var(--ink);
}
.legal-wrap h3 {
  margin-top: var(--s-6);
  font: var(--t-title-sm);
  color: var(--ink);
}
.legal-wrap p,
.legal-wrap ul,
.legal-wrap ol { margin-top: var(--s-4); line-height: 1.68; }
.legal-wrap li { margin-top: var(--s-2); }

.legal-table {
  width: 100%;
  margin-top: var(--s-5);
  border-collapse: collapse;
  font: var(--t-body-sm);
}
.legal-table th,
.legal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}
.legal-table th { color: var(--ink); font-weight: 600; }
.legal-table-wrap { overflow-x: auto; }

.legal-foot {
  margin-top: var(--s-9);
  padding-top: var(--s-5);
  border-top: 1px solid var(--hairline);
  font: var(--t-caption);
  color: var(--muted);
}
.legal-foot a { color: var(--muted); }

code {
  padding: 1px 5px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.875em;
}
