/* Shared styles for the legal/support pages (privacy, terms, delete-account).
   Tokens copied from index.html so these pages match the landing page. */
:root {
  --ground: #F6F7F9;
  --paper: #FFFFFF;
  --surface-2: #F1F2F5;
  --ink: #14161A;
  --ink-2: #4A4F57;
  --ink-3: #6E737B;
  --line: rgba(15, 18, 24, 0.09);
  --line-strong: rgba(15, 18, 24, 0.16);
  --accent: #0B6E4F;
  --accent-deep: #075939;
  --accent-tint: rgba(11, 110, 79, 0.09);
  --accent-tint-2: rgba(11, 110, 79, 0.3);
  --on-accent: #FFFFFF;
  --warn-tint: rgba(176, 106, 0, 0.1);
  --warn-line: rgba(176, 106, 0, 0.35);
  --radius-md: 8px;
  --radius-lg: 10px;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #08090A;
    --paper: #0E0F11;
    --surface-2: #151619;
    --ink: #EEF0F2;
    --ink-2: #A9AFB8;
    --ink-3: #7A8089;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --accent: #43B389;
    --accent-deep: #7DD6B0;
    --accent-tint: rgba(67, 179, 137, 0.12);
    --accent-tint-2: rgba(67, 179, 137, 0.32);
    --on-accent: #04150E;
    --warn-tint: rgba(240, 170, 60, 0.1);
    --warn-line: rgba(240, 170, 60, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #08090A;
  --paper: #0E0F11;
  --surface-2: #151619;
  --ink: #EEF0F2;
  --ink-2: #A9AFB8;
  --ink-3: #7A8089;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #43B389;
  --accent-deep: #7DD6B0;
  --accent-tint: rgba(67, 179, 137, 0.12);
  --accent-tint-2: rgba(67, 179, 137, 0.32);
  --on-accent: #04150E;
  --warn-tint: rgba(240, 170, 60, 0.1);
  --warn-line: rgba(240, 170, 60, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-deep); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 76rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .wrap { padding: 0 3rem; } }

/* Masthead (same as index.html) */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.masthead-inner { display: flex; align-items: center; justify-content: space-between; height: 4.25rem; gap: 1rem; }
.wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 1.45rem;
  letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
}
.wordmark span { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.9rem;
  text-decoration: none; padding: 0.55rem 1.1rem;
  border-radius: var(--radius-lg); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: var(--radius-md);
  border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-2); border-color: var(--line); }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

/* Document */
.doc { max-width: 44rem; margin: 0 auto; padding: 3rem 0 4.5rem; }
@media (min-width: 768px) { .doc { padding: 4.5rem 0 6rem; } }
.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 1rem;
}
.doc h1 {
  font-family: var(--serif); font-weight: 500; color: var(--ink);
  font-size: clamp(2.1rem, 6vw, 3rem); line-height: 1.1; letter-spacing: -0.015em;
}
.doc .lede { margin-top: 1.1rem; font-size: 1.075rem; color: var(--ink-2); }
.doc .meta { margin-top: 1.25rem; font-size: 0.85rem; color: var(--ink-3); }
.doc h2 {
  font-family: var(--serif); font-weight: 500; color: var(--ink);
  font-size: 1.6rem; line-height: 1.25; letter-spacing: -0.01em;
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line);
  scroll-margin-top: 5rem;
}
.doc h3 { font-size: 1.02rem; font-weight: 600; color: var(--ink); margin-top: 1.75rem; }
.doc p, .doc ul, .doc ol { margin-top: 0.85rem; }
.doc ul, .doc ol { padding-left: 1.25rem; }
.doc li { margin-top: 0.4rem; }
.doc li::marker { color: var(--ink-3); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc code { font-family: var(--mono); font-size: 0.85em; }

.toc {
  margin-top: 2rem; padding: 1.1rem 1.25rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  font-size: 0.92rem;
}
.toc p { margin: 0; font-weight: 600; color: var(--ink); font-size: 0.85rem; }
.toc ol { margin-top: 0.5rem; columns: 2 13rem; column-gap: 2rem; }
.toc li { margin-top: 0; padding-top: 0.2rem; break-inside: avoid; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.table-scroll { margin-top: 1rem; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; line-height: 1.55; }
th, td { text-align: left; vertical-align: top; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--ink); background: var(--surface-2); font-size: 0.82rem; }
td:first-child { color: var(--ink); font-weight: 500; min-width: 9rem; }
@media (max-width: 600px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); }
  tr:last-child { border-bottom: 0; }
  td { padding: 0.15rem 0; border: 0; }
  td:first-child { min-width: 0; }
  td[data-label]::before {
    content: attr(data-label); display: block; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-top: 0.4rem;
  }
}

.callout {
  margin-top: 1.25rem; padding: 1rem 1.15rem;
  border-radius: var(--radius-lg); border: 1px solid var(--accent-tint-2);
  background: var(--accent-tint); color: var(--ink);
}
.callout p:first-child { margin-top: 0; }
.callout.warn { border-color: var(--warn-line); background: var(--warn-tint); }
.placeholder {
  font-family: var(--mono); font-size: 0.88em; padding: 0.05em 0.35em;
  border-radius: 4px; background: var(--warn-tint); border: 1px dashed var(--warn-line); color: var(--ink);
}

.steps { list-style: none; padding-left: 0 !important; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 2.4rem; margin-top: 0.85rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem;
  width: 1.6rem; height: 1.6rem; border-radius: 999px;
  background: var(--accent-tint); border: 1px solid var(--accent-tint-2); color: var(--accent);
  font-size: 0.8rem; font-weight: 600; display: grid; place-items: center; line-height: 1;
}
.cards { display: grid; gap: 1rem; margin-top: 1.25rem; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  padding: 1.25rem; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.card h3 { margin-top: 0; }

/* Footer (same as index.html, plus legal links) */
footer { border-top: 1px solid var(--line); padding: 2.25rem 0; }
.footer-inner { display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; color: var(--ink-3); }
@media (min-width: 768px) { .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-inner a { color: var(--ink-2); text-decoration: none; }
.footer-inner a:hover { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
