/* Terms and Privacy. Colours are the app's DESIGN.md tokens, light and dark. */
:root {
  color-scheme: light dark;
  --bg: #F8F7FC; --surface: #FFFFFF; --raised: #F2EEFA; --border: #E7E0EF;
  --fg: #171321; --muted: #746F80; --primary: #7C3AED;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0B14; --surface: #191421; --raised: #241B35; --border: #342A42;
    --fg: #F7F3FF; --muted: #A8A0B2; --primary: #A78BFA;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--primary); }
.top {
  max-width: 760px; margin: 0 auto; padding: 20px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 800; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; gap: 4px; }
.top nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 10px 12px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center;
}
.top nav a[aria-current="page"] { color: var(--fg); background: var(--raised); }
main { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; }
h1 { font-size: 32px; line-height: 1.2; margin: 12px 0 4px; }
h2 { font-size: 21px; line-height: 1.3; margin: 40px 0 10px; }
h3 { font-size: 17px; margin: 22px 0 6px; }
.meta { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.lead { font-size: 17px; }
p, li { overflow-wrap: anywhere; }
ul { padding-left: 22px; }
li { margin: 6px 0; }
.summary, .toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 20px; margin: 24px 0;
}
.summary h2 { margin-top: 4px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
section { scroll-margin-top: 16px; }
.foot {
  max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 14px;
}
.foot a { color: var(--muted); }
@media (max-width: 560px) {
  h1 { font-size: 28px; }
  .toc ol { columns: 1; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  td { border: 0; padding: 4px 0; }
  td:first-child { font-weight: 600; }
}
