/* Shared by /privacy and /terms. It used to be copied into both pages, all
   104 lines of it, so an edit to one drifted from the other and a third legal
   page would have meant a third copy. tests/website.test.mjs fails if either
   page grows a stylesheet of its own again.
   The homepage keeps its own styles: it shares only tokens with these two, and
   most of what it needs, no legal page has. */
/* Self-hosted, same three faces as the homepage. No Google Fonts: a request
   there hands every visitor's address to Google, which this policy would then
   have to describe. */
@font-face { font-family: "Josefin Sans"; font-weight: 600; font-display: swap;
  src: url(/fonts/josefin-sans-600.woff2) format("woff2"); }
@font-face { font-family: "Karla"; font-weight: 400; font-display: swap;
  src: url(/fonts/karla-400.woff2) format("woff2"); }
@font-face { font-family: "Karla"; font-weight: 700; font-display: swap;
  src: url(/fonts/karla-700.woff2) format("woff2"); }
@font-face { font-family: "Space Mono"; font-weight: 400; font-display: swap;
  src: url(/fonts/space-mono-400.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --surface: #F1FCFA; --surface-raised: #FFFFFF; --surface-sunken: #D9F4EF;
  --text-primary: #0E2A2A; --text-muted: #3D6A66;
  --border: #C9ECE6; --border-strong: #97D8CF; --focus-ring: #009E8E;
  --surfed-ink: #0A7A82;
  --font-display: "Josefin Sans", "Futura", "Avenir Next", system-ui, sans-serif;
  --font-text: "Karla", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-stamp: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-md: 14px; --r-lg: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* A short page (the 404) would otherwise leave its footer floating in the
   middle of the screen with white space under it. */
body { min-height: 100vh; display: flex; flex-direction: column; margin: 0; background: var(--surface); color: var(--text-primary);
  font: 17px/1.7 var(--font-text); }
img, svg { display: block; max-width: 100%; }
a { color: var(--surfed-ink); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 3px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.label { font-family: var(--font-stamp); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-muted); }

/* The same golden-hour wash as the homepage, shallower: this is a document,
   and the warmth only has to say it is the same place. */
.top { background: linear-gradient(180deg, #FFF1DA 0%, #FDF6EA 55%, var(--surface) 100%); }
header { padding: 22px 0 0; }
header a { display: inline-block; }
header img { height: 40px; width: auto; }
.title { padding: 40px 0 32px; }
.title h1 { margin: 12px 0 0; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(36px, 8vw, 52px); line-height: 1.04; letter-spacing: .2px; }
/* The date is the first thing a reviewer or a returning reader looks for, so
   it gets the stamp-label treatment instead of a grey run-on line. */
.updated { margin-top: 20px; font-size: 15px; }
.updated b { display: block; font-family: var(--font-stamp); font-weight: 400; font-size: 10.5px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); }
.updated span { font-weight: 700; }

/* Contents: closed on a phone, a sticky column on a desk. Both are plain
   HTML, so both work with JavaScript off. The list is the document's own. */
.layout { display: grid; }
.toc ol { margin: 0; padding-left: 1.5em; }
.toc li { margin: 5px 0; font-size: 15px; line-height: 1.4; }
.toc li::marker { font-family: var(--font-stamp); font-size: 12px; color: var(--text-muted); }
.toc a { color: var(--text-primary); text-decoration: none; }
.toc a:hover { color: var(--surfed-ink); text-decoration: underline; }
details.toc { margin: 0 0 22px; background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--r-md); }
details.toc summary { cursor: pointer; padding: 14px 18px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; }
details.toc summary::-webkit-details-marker { display: none; }
details.toc summary::after { content: "+"; font-family: var(--font-stamp); font-size: 16px;
  color: var(--surfed-ink); }
details.toc[open] summary::after { content: "\2212"; }
details.toc ol { padding: 6px 18px 14px 2.4em; border-top: 1px solid var(--border); }
aside.toc { display: none; }
@media (min-width: 980px) {
  .layout { grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; }
  details.toc { display: none; }
  aside.toc { display: block; position: sticky; top: 28px; padding-top: 6px; }
  aside.toc .label { margin-bottom: 10px; }
}

/* The text. About 70 characters a line, Karla at 17 on 1.7. Legal text is long
   and dense and nobody reads it for pleasure; the job is not to make it
   harder. Section numbers are in the stamp face so the heading reads as words
   and the number as an address. */
.doc { max-width: 42rem; padding-bottom: 32px; }
.doc h2 { margin: 48px 0 12px; scroll-margin-top: 24px; font-family: var(--font-display);
  font-weight: 600; font-size: 25px; line-height: 1.2; letter-spacing: .2px; }
.doc h2 .n { font-family: var(--font-stamp); font-weight: 400; font-size: 15px;
  color: var(--surfed-ink); letter-spacing: .04em; margin-right: 4px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 700; }
.doc p { margin: 0 0 16px; }
.doc strong { font-weight: 700; }
.doc .short { font-style: italic; color: var(--text-muted); }
.doc ul, .doc ol { padding-left: 1.2rem; }
.doc li { margin: 6px 0; }
.doc address { font-style: normal; padding: 16px 18px; background: var(--surface-sunken);
  border-radius: var(--r-md); }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
/* Termly's tables scroll inside themselves rather than pushing the page sideways. */
.doc .table { overflow-x: auto; margin: 16px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border);
  vertical-align: top; }
.doc th { color: var(--text-muted); font-weight: 700; }
.doc .credit { color: var(--text-muted); font-size: 14px; margin-top: 40px; }

footer { margin-top: auto; padding: 28px 0 40px; border-top: 1px solid var(--border);
  font-size: 14.5px; color: var(--text-muted); }
footer .row { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer .links a { font-weight: 700; }
footer .links a[aria-current] { color: var(--text-primary); text-decoration: none; }
