/*
 * The public legal pages (ADR-0082): privacy, terms, account deletion.
 *
 * Plain documents outside the React app, so a store reviewer, a lawyer or a parent without the app
 * can read them. The colours repeat the design tokens (packages/design-tokens) because a static page
 * cannot import them; the consent notice beside these files does the same.
 */
:root {
  --ink: #10223b;          /* textPrimary */
  --ink-soft: #5b6b7f;     /* textSecondary */
  --paper: #ffffff;        /* surface */
  --rule: #dce5ef;         /* border */
  --brand: #1d4ed8;        /* primaryStrong */
  --flag-bg: #fff4e2;
  --flag-ink: #6b4a14;
  --flag-rule: #d97706;    /* warning */
  --draft-bg: #8c1f1f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ececea;
    --ink-soft: #a9b4c2;
    --paper: #121a26;
    --rule: #2c3a4d;
    --brand: #8fb3ff;
    --flag-bg: #332a18;
    --flag-ink: #f0d9a8;
    --flag-rule: #a8741f;
    --draft-bg: #6e1a1a;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

.draft {
  background: var(--draft-bg);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  font-size: 15px;
  line-height: 1.5;
}
.draft strong { display: block; font-size: 16px; }
.draft p { margin: 6px 0 0; }

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 24px 16px calc(64px + env(safe-area-inset-bottom));
}

nav.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 15px;
  margin: 0 0 8px;
}
nav.legal a[aria-current="page"] { color: var(--ink); font-weight: 650; text-decoration: none; }

h1 { font-size: 26px; line-height: 1.25; margin: 12px 0 4px; }
h2 { font-size: 19px; line-height: 1.35; margin: 32px 0 8px; padding-top: 16px; border-top: 1px solid var(--rule); }
h3 { font-size: 16px; margin: 20px 0 6px; }

.meta { color: var(--ink-soft); font-size: 14px; margin: 0 0 4px; }
.lede { font-size: 18px; color: var(--ink-soft); }

p, li { margin: 10px 0; overflow-wrap: anywhere; }
ul, ol { padding-left: 1.25rem; }
strong { font-weight: 650; }

.flag {
  background: var(--flag-bg);
  color: var(--flag-ink);
  border-left: 3px solid var(--flag-rule);
  padding: 12px 14px;
  margin: 16px 0;
  font-size: 15.5px;
  border-radius: 0 6px 6px 0;
}
.flag p { margin: 6px 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13px/1.5 ui-monospace, Menlo, Consolas, monospace; }
summary { cursor: pointer; padding: 12px 0; overflow-wrap: anywhere; }
.flag .tag { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-top: 0; }

table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15.5px; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 650; width: 32%; }

footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 14px; }
