/* Privacy, Terms, Page not found and the shared copy: static, framework-free,
   sharing styles.css's tokens (loaded first) rather than duplicating them.
   Legal reading wants long, narrow, calm lines - not the app's own dense
   component classes, which is why this is a page of its own instead of
   another view of the app shell.

   THE APP'S DARK LOOK (Jacob, 29 Sep, `docs/briefs/site-structure.md`, App
   Build item 6). These pages used to be the light paper theme, a different
   site from the dark Bench they are linked from. `body.dark-page` restates
   the tokens the way `#bench-view` does (styles.css): the rack's own
   `--bench` for the page, `--bench-2` for raised things, `--teal-on-dark`
   for links, and the dimmer text colours that hold 4.5:1 on it - body text
   14.4:1, links 10.2:1, the muted line 6.1:1. Every page that wants the look
   puts `class="dark-page"` on its body and its text in a `.legal-page`.

   The header these pages used to draw themselves - `.legal-header`,
   `.legal-brand` - is `shell/frame.js`'s module now (`docs/briefs/
   navigation.md`, Part B1), styled by `shell/frame.css`; nothing here draws
   it any more. */

body.dark-page {
  color-scheme: dark;
  --paper: var(--bench-2);
  --soft: var(--bench-2);
  --line: var(--bench-3);
  --line-strong: #2E4550;
  --muted: #8B9DA5;
  --muted-2: #92A4AC;
  --body-text: #E8ECEE;
  --teal-soft: #10323A;
  --shadow: none;
  background: var(--bench);
  color: var(--body-text);
}

/* The reading column: about seventy characters (Jacob, 29 Sep). The max-width
   is the measure plus the page's side padding, because the box is
   border-box and the padding would otherwise eat into the seventy. */
.legal-page {
  --legal-measure: 70ch;
  --legal-gutter: clamp(18px, 4vw, 56px);
  max-width: calc(var(--legal-measure) + 2 * var(--legal-gutter));
  margin: 0 auto;
  padding: 40px var(--legal-gutter) 24px;
  line-height: 1.65;
}
.legal-page h1 {
  margin: 0 0 4px;
  color: #FFFFFF;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: 0;
}
.legal-updated {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: .85rem;
}
.legal-page h2 {
  margin: 32px 0 10px;
  color: #FFFFFF;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: 0;
}
.legal-page h3 {
  margin: 20px 0 8px;
  color: #FFFFFF;
  font-size: 1.02rem;
  line-height: 1.3;
  letter-spacing: 0;
}
.legal-page strong { color: #FFFFFF; }
.legal-page p, .legal-page ul, .legal-page ol { margin: 0 0 14px; }
.legal-page ul, .legal-page ol { padding-left: 22px; }
.legal-page li { margin: 0 0 6px; }
.legal-page a { color: var(--teal-on-dark); text-underline-offset: 2px; }
.legal-page a:hover { color: #FFFFFF; }
/* A link dressed as a button (the 404 page's three) keeps the app's button
   colours: filled teal with white, and on the dark page the outlined ones
   read in the light teal rather than the paper one. */
.legal-page a.primary-command { color: var(--on-fill); }
.legal-page a.secondary-button { color: var(--teal-on-dark); }
.legal-page a.secondary-button:hover { color: var(--on-fill); }
.legal-page code {
  padding: .1em .35em;
  border-radius: 3px;
  background: var(--bench-2);
  color: var(--body-text);
  font-size: .92em;
}

@media (max-width: 480px) {
  .legal-page { padding-top: 28px; }
}
