/* Colour, type and shape tokens. Light by default, dark when the system asks for it. */
:root {
  color-scheme: light dark;
  --bg: #f4f6f5; --surface: #ffffff; --surface-2: #edf1f0;
  --ink: #14181a; --ink-2: #4e5a59; --ink-3: #6a7675;
  --rule: #dce3e1; --rule-strong: #c3cdcb;
  --accent: #16706a; --accent-soft: #e2efed;
  --warn: #8a6a1f;
  --mark: #f28db6;
  --card-cast: 0 1px 2px rgb(0 0 0 / 0.05), 0 0 0 0.5px rgb(0 0 0 / 0.025);
  --ground-quiet: color-mix(in srgb, var(--ink-2) 60%, var(--ink-3));
  --radius: 7px; --card-radius: 10px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1112; --surface: #171b1c; --surface-2: #1e2425;
    --ink: #e6eae9; --ink-2: #a3aeac; --ink-3: #7e8a89;
    --rule: #262d2e; --rule-strong: #394243;
    --accent: #58c0b4; --accent-soft: #15302e;
    --warn: #d8b45e;
    --card-cast: inset 0 0 0 1px var(--rule);
    --ground-quiet: var(--ink-3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; padding: 24px 16px; background: var(--bg); color: var(--ink); font: 0.8125rem/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { flex: none; }

/* One small card on the ground. */
.sheet { width: 100%; max-width: 384px; }
.brand { display: flex; align-items: center; gap: 9px; margin: 0 0 18px 2px; font-size: 0.875rem; font-weight: 600; letter-spacing: -0.005em; }
.brand a { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand svg { width: 22px; height: 22px; }
.brand .accent { fill: var(--mark); }
.card { background: var(--surface); border-radius: var(--card-radius); box-shadow: var(--card-cast); padding: 22px 22px 20px; }
h1 { margin: 0 0 6px; font-size: 1.1875rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.012em; }
.lede { margin: 0 0 16px; color: var(--ink-2); }
.lede:last-child { margin-bottom: 0; }

.btn { width: 100%; min-height: 34px; padding: 6px 12px; border: 0; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink); font: 500 0.8125rem/1.4 var(--sans); text-align: center; text-decoration: none; cursor: pointer; }
.btn.pri { background: var(--accent); color: var(--surface); box-shadow: none; }
.btn:hover { filter: brightness(1.06); }
.btn svg { width: 16px; height: 16px; }
/* Forced colours drop backgrounds and shadows, so the buttons need a real edge there. */
@media (forced-colors: active) { .btn { border: 1px solid ButtonText; } }

.terms { margin: 10px 0 0; font-size: 0.75rem; color: var(--ink-3); text-align: center; }
.terms a, .foot a { color: var(--ink-2); }
.learn { margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--rule); font-size: 0.75rem; color: var(--ink-2); display: flex; gap: 9px; }
.learn svg { margin-top: 2px; color: var(--ink-3); }
.learn p { margin: 0; }
.foot { margin: 14px 2px 0; font-size: 0.75rem; color: var(--ground-quiet); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.foot p, .foot form { margin: 0; }
.foot nav { display: flex; gap: 16px; }
.link { padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

.state { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin: 0 0 14px; background: var(--accent-soft); color: var(--accent); }
.state.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.state.quiet { background: var(--surface-2); color: var(--ink-3); }
.small { margin: 10px 0 0; font-size: 0.75rem; color: var(--ink-3); text-align: center; }

/* The terms and privacy pages: the same card, wide enough to read in. */
.sheet.doc { max-width: 640px; }
.doc .card { padding-bottom: 22px; overflow-wrap: break-word; }
.doc h2 { margin: 24px 0 6px; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.doc h3 { margin: 14px 0 4px; font-size: 0.8125rem; font-weight: 600; }
.doc p, .doc li { color: var(--ink-2); line-height: 1.6; }
.doc p { margin: 0 0 10px; }
.doc ul { margin: 0 0 10px; padding-left: 18px; }
.doc li { margin: 0 0 4px; }
.doc .card > :last-child { margin-bottom: 0; }
.doc strong { color: var(--ink); font-weight: 600; }
.draft { margin: 14px 0 16px; padding: 10px 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.doc .draft p { margin: 0; color: var(--ink); }
.todo { padding: 0 3px; border: 1px dashed var(--warn); border-radius: 3px; background: transparent; color: var(--ink); }
