/* No webfonts, no external requests: the page is fully self-contained, which is
   what lets _headers ship a `default-src 'none'` CSP without exceptions. */
:root {
  --bg: #fbfaf8;
  --ink: #16151a;
  --muted: #6c6a75;
  --rule: #e2dfd9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #100f13;
    --ink: #f2f0ec;
    --muted: #8d8a96;
    --rule: #26242c;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  /* Explicit minmax(0, 1fr) rather than the implicit `auto` column: it pins the
     track to the container instead of letting a future wide child (a long word,
     a preformatted block) push the track past the viewport. Verified no
     horizontal overflow at 320px and 390px, 2026-09-18. */
  grid-template-columns: minmax(0, 1fr);
  padding: 2rem 1.5rem;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Inter, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  align-self: center;
  justify-self: center;
  max-width: 34rem;
  width: 100%;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 11vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* The period is decoration, not a word: dim it so it reads as a mark. */
h1 span { color: var(--muted); }

.note {
  margin: 1.75rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}

.note a {
  color: inherit;
  text-underline-offset: 0.2em;
}

footer {
  justify-self: center;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* Long-form pages (privacy.html, tos.html): left-aligned prose at the top of the
   viewport instead of the centred placeholder. */
body.doc main {
  align-self: start;
  max-width: 40rem;
  text-align: left;
}
body.doc h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); }
body.doc h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}
body.doc p, body.doc ul { margin: 0.75rem 0; }
body.doc ul { padding-left: 1.25rem; }
body.doc main a { color: inherit; text-underline-offset: 0.2em; }
body.doc .note { margin-top: 1rem; padding-top: 1rem; }

footer nav { display: inline; }
footer a { color: inherit; text-underline-offset: 0.2em; }
footer nav a { margin-left: 0.75rem; }
