/*
 * The legal pages (privacy, terms, imprint).
 *
 * These three are plain static documents copied verbatim out of
 * `src/main/frontend/static` (vite.config.ts's `publicDir`) rather than build
 * entries, and that is deliberate: a privacy policy that needs a JavaScript
 * bundle to render is a privacy policy that does not render for the App Store
 * reviewer, the crawler, or the person who opened it with scripts off. Nothing
 * on these pages runs.
 *
 * The cost of standing outside the build is that the hashed asset names are not
 * knowable here — no `@fontsource` woff2, no `tokens.css`. So the palette is
 * copied from ui/styles/tokens.css (both schemes) and the type falls back to the
 * system stack. If the tokens ever move, these values are the ones to move with
 * them; the page will look a shade off rather than break.
 */

:root {
  color-scheme: light;
  --lo-paper-0: #F6F3EC;
  --lo-paper-1: #FBF9F4;
  --lo-paper-2: #EFEAE0;
  --lo-ink-900: #262522;
  --lo-ink-700: #3A3833;
  --lo-ink-500: #635F57;
  --lo-rule-faint: #DAD3C4;
  --lo-rule: #B9B19E;
  --lo-rule-strong: #635F57;
  --lo-accent: #2E5A6E;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --lo-paper-0: #1C1B19;
    --lo-paper-1: #232220;
    --lo-paper-2: #2B2A27;
    --lo-ink-900: #ECE8DF;
    --lo-ink-700: #D6D2C8;
    --lo-ink-500: #A29D91;
    --lo-rule-faint: #3A3934;
    --lo-rule: #4C4A43;
    --lo-rule-strong: #A29D91;
    --lo-accent: #9DC2D4;
  }
}

body {
  margin: 0;
  font: 400 16px/27px 'iA Writer Quattro', 'Segoe UI', Roboto, system-ui, sans-serif;
  color: var(--lo-ink-700);
  background-color: var(--lo-paper-0);
}

.shell {
  max-width: 42rem;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

a { color: var(--lo-accent); }
a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--lo-paper-0), 0 0 0 4px var(--lo-accent);
  border-radius: 2px;
}

/* ---------------- Masthead & footer ---------------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  border-bottom: 3px double var(--lo-rule-strong);
}

.wordmark {
  font: 400 24px/32px 'Architects Daughter', 'Segoe Print', 'Bradley Hand', cursive;
  color: var(--lo-ink-900);
  text-decoration: none;
}

.masthead-nav a {
  font: 700 12px/16px inherit;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lo-ink-500);
  text-decoration: none;
  margin-left: 24px;
}
.masthead-nav a:hover { text-decoration: underline; }

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-block: 32px;
  border-top: 1px solid var(--lo-rule);
  font-size: 13px;
  line-height: 20px;
  color: var(--lo-ink-500);
}
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer a { color: var(--lo-ink-500); }

/* ---------------- The document itself ---------------- */

main { padding-block: 40px 8px; }

h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 42px;
  font-weight: 700;
  color: var(--lo-ink-900);
  letter-spacing: -0.01em;
}

.dateline {
  margin: 0 0 32px;
  font-size: 13px;
  line-height: 20px;
  color: var(--lo-ink-500);
}

.lede {
  font-size: 18px;
  line-height: 30px;
  color: var(--lo-ink-900);
}

h2 {
  margin: 40px 0 12px;
  font-size: 21px;
  line-height: 29px;
  font-weight: 700;
  color: var(--lo-ink-900);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--lo-rule-faint);
}

h3 {
  margin: 28px 0 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: var(--lo-ink-900);
}

p, ul, ol, dl { margin: 0 0 16px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 8px; }

strong { color: var(--lo-ink-900); }
em { font-style: italic; }

/* A term-and-definition list is the honest shape for "what we hold" and for
   "how long we keep it": the question is always a pair. */
dl.rows { display: grid; grid-template-columns: minmax(9rem, 15rem) 1fr; gap: 8px 24px; }
dl.rows dt { font-weight: 700; color: var(--lo-ink-900); }
dl.rows dd { margin: 0; }
@media (max-width: 34rem) {
  dl.rows { grid-template-columns: 1fr; gap: 2px; }
  dl.rows dd { margin-bottom: 14px; }
}

/* The two callouts this product needs and a template would not have: the thing
   we cannot defend against, and the deletion we cannot perform. Both are set
   apart because burying them in a paragraph is the quiet omission the whole
   document exists to avoid. */
.plainly {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--lo-paper-2);
  border-left: 3px solid var(--lo-accent);
}
.plainly p:last-child { margin-bottom: 0; }
.plainly h3 { margin-top: 0; }

.todo {
  background: var(--lo-paper-2);
  border-bottom: 1px dashed var(--lo-accent);
  padding: 0 3px;
}

.toc {
  margin: 0 0 8px;
  padding: 16px 20px 4px;
  background: var(--lo-paper-1);
  border: 1px solid var(--lo-rule-faint);
  font-size: 15px;
  line-height: 24px;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 4px; }
