/* Shared base for every page on the site: tokens, type, and the header and footer.
   Light and dark follow the system, like the app. One accent, system font, 8-pt grid. */
:root {
  color-scheme: light dark;
  --bg: #fbfbfd;
  --bg-raised: #ffffff;
  --bg-sunken: #f2f2f7;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #0a7aff;
  --accent-fg: #ffffff;
  --safe: #248a3d;
  --review: #b25000;
  --careful: #d70015;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1d1f;
    --bg-raised: #2a2a2d;
    --bg-sunken: #161618;
    --fg: #f5f5f7;
    --muted: #a1a1a6;
    --line: #3a3a3d;
    --accent: #0a84ff;
    --safe: #30d158;
    --review: #ff9f0a;
    --careful: #ff453a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}

* { 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;
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 0.5rem; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1rem; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.measure { max-width: 42rem; }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 56px; }
.wordmark { font-weight: 600; font-size: 1.0625rem; color: var(--fg); display: inline-flex; align-items: center; gap: 8px; }
.wordmark:hover { text-decoration: none; }
.wordmark svg { width: 20px; height: 20px; }
.site-nav { display: flex; gap: 20px; margin-left: auto; }
.site-nav a { color: var(--muted); font-size: 0.9375rem; }
.site-nav a:hover { color: var(--fg); text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 32px 0 48px; color: var(--muted); font-size: 0.9375rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; }
.site-footer a { color: var(--muted); }
.site-footer .legal { margin-left: auto; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px; font-weight: 600; font-size: 1rem; border: 1px solid transparent; cursor: pointer; font-family: inherit; white-space: nowrap; }
.button:hover { text-decoration: none; }
.button-primary { background: var(--accent); color: var(--accent-fg); }
.button-primary:hover { filter: brightness(1.06); }
.button-secondary { background: var(--bg-raised); color: var(--fg); border-color: var(--line); }
.button-secondary:hover { border-color: var(--muted); }
.button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Long-form pages (privacy, EULA) */
.doc { max-width: 44rem; margin: 0 auto; padding: 48px 24px 0; }
.doc h1 { font-size: 2rem; margin-top: 16px; }
.doc h2 { font-size: 1.25rem; margin-top: 2.5rem; }
.doc h3 { font-size: 1.05rem; margin-top: 1.75rem; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.35rem; }
.doc .updated { color: var(--muted); font-size: 0.9375rem; }
.draft { border: 1px solid var(--review); color: var(--review); border-radius: 10px; padding: 12px 16px; font-size: 0.9375rem; margin: 0 0 24px; }
.placeholder { background: color-mix(in srgb, var(--review) 14%, transparent); border-radius: 4px; padding: 0 4px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .site-nav { display: none; }
  .site-footer .legal { margin-left: 0; }
}
