:root {
  --canvas: #ffffff;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #0f766e;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/*
 * Three states, the same as the app: an explicit choice wins in both
 * directions, and the OS only decides when no choice was made. These pages are
 * plain HTML outside the React bundle, so the choice reaches them through the
 * inline script in each <head> rather than through the token stylesheet -- but
 * someone who set the app to Dark must not get a white page when they open the
 * terms, and someone who set it to Light must not get a dark one at night.
 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --canvas: #0f172a;
    --ink: #f1f5f9;
    --ink-soft: #cbd5e1;
    --muted: #94a3b8;
    --border: #1e293b;
    --accent: #5eead4;
  }
}

:root[data-theme='dark'] {
  --canvas: #0f172a;
  --ink: #f1f5f9;
  --ink-soft: #cbd5e1;
  --muted: #94a3b8;
  --border: #1e293b;
  --accent: #5eead4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.legal-header {
  border-bottom: 4px solid var(--ink);
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  gap: 16px;
  align-items: center;
}

.legal-header a { color: var(--ink); text-decoration: none; }
.legal-header a:hover { text-decoration: underline; }
.legal-header .spacer { margin-left: auto; }

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

h1 {
  color: var(--ink);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.updated {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 32px;
}

h2 {
  color: var(--ink);
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin: 40px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

h2:first-of-type { border-top: 0; padding-top: 0; }

h3 {
  color: var(--ink);
  font-size: 0.95rem;
  margin: 24px 0 6px;
}

p, li { margin: 0 0 12px; }
ul { padding-left: 20px; }
strong { color: var(--ink); }

a { color: var(--accent); }

.lede {
  border-left: 3px solid var(--ink);
  padding-left: 16px;
  color: var(--ink);
}

.table-wrap { overflow-x: auto; margin: 0 0 16px; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  font-size: 14px;
}

th, td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--ink);
}

.callout {
  border: 2px solid var(--ink);
  padding: 16px 18px;
  margin: 20px 0;
}

.callout p:last-child { margin-bottom: 0; }

footer {
  border-top: 4px solid var(--ink);
  margin-top: 56px;
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

footer a { color: var(--muted); }
