/* Shared shell for the document pages (/terms, /privacy, /support, 404).
   Tokens mirror the app's Palette (ios/Litra/DesignSystem.swift) so the site and
   the product read as one thing. The landing keeps its own inline styles — it is
   bespoke and must paint without waiting on a second request. */

:root {
  --bg: #FBEFDD;
  --raise: #FFF7EA;
  --ink: #1A1A1A;
  --muted: #6E6E73;
  --faint: #9A9088;
  --line: rgba(26, 26, 26, .12);
  --brand: #8F5B14;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0E10;
    --raise: #17171A;
    --ink: #F4F4F5;
    --muted: #9A9A9F;
    --faint: #6E6E73;
    --line: rgba(244, 244, 245, .14);
    --brand: #D9AC62;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Onest, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 37rem puts a line of this text at ~65 characters, measured on the shipped
   face and size (Onest 17px averages ~8.3px a character here). At the previous
   44rem a full-width desktop line ran to ~79, which is past the point where the
   eye starts losing the return sweep — and these are the pages a reader is
   least motivated to stay on. Tables scroll inside .scroller, so nothing here
   depends on the wider column. */
.wrap { max-width: 37rem; margin: 0 auto; padding: 0 1.5rem; }

/* Header ------------------------------------------------------------------ */

.top {
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
  margin-bottom: 3rem;
}
.top .wrap { display: flex; align-items: baseline; gap: 1rem; }
.mark {
  font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink);
}
.mark:hover { text-decoration: none; color: var(--brand); }
.top nav { margin-left: auto; display: flex; gap: 1.25rem; font-size: .9375rem; }
.top nav a { color: var(--muted); }
.top nav a[aria-current="page"] { color: var(--brand); }

/* Document ---------------------------------------------------------------- */

main { padding-bottom: 5rem; }

h1 {
  font-size: 2.25rem; font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.15; margin: 0 0 .5rem;
}
.dateline { margin: 0 0 2.5rem; color: var(--muted); font-size: .9375rem; }
.lede { font-size: 1.0625rem; color: var(--ink); }

h2 {
  font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em;
  margin: 3rem 0 .75rem; scroll-margin-top: 1.5rem;
}
h3 {
  font-size: 1rem; font-weight: 600;
  margin: 1.75rem 0 .5rem;
}
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: .4rem; }
li::marker { color: var(--faint); }
strong { font-weight: 600; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .875em;
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .08em .35em;
  white-space: nowrap;
}

/* Table of contents ------------------------------------------------------- */

/* Plain text, deliberately. These are legal and support documents and every box
   drawn round a paragraph on one is a decision about which sentence matters —
   a decision a reader (or a reviewer) is better off making themselves. Their
   only chrome now is the type. The tables went the same way and for a harder
   reason: `min-width` on a table puts a privacy policy behind a sideways scroll
   on the phone most people will open it on. */
.toc { margin: 0 0 1.5rem; }
.toc h2 {
  margin: 0 0 .35rem; font-size: .75rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.toc ol { margin: 0; padding-left: 1.15rem; font-size: .9375rem; line-height: 1.75; }
.toc li { margin: 0; }

/* Lead paragraph, where a page opens with a summary of itself. */
.note { margin: 0 0 1.5rem; }
.note p:last-child { margin-bottom: 0; }

/* Footer ------------------------------------------------------------------ */

footer.site {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: .875rem;
}
footer.site .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: baseline; }
footer.site nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 1.25rem; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--brand); }

@media (max-width: 34rem) {
  h1 { font-size: 1.875rem; }
  .top { margin-bottom: 2rem; }
  .top nav { gap: 1rem; font-size: .875rem; }
}
