/* Legal pages (/privacy/, /terms/). Tokens, type and header/footer match public/index.html (Dusk). */
:root {
  color-scheme: dark;
  --bg: #0C0916;
  --surface: #151024;
  --raised: #1D1730;
  --border: #2B2442;
  --border-strong: #3B3259;
  --pink: #FF2D5E;
  --pink-hover: #FF5279;
  --pink-ink: #12060C;
  --ice: #8FDBFF;
  --text: #F2EEFA;
  --text-2: #B9B1CC;
  --text-3: #9C93B3;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --maxw: 1240px;
  --gutter: 16px;
  --header-h: 68px;
  --radius-s: 10px;
  --radius-m: 14px;
}
@media (min-width: 640px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; overflow-wrap: break-word;
}
h1, h2, h3, p, ul, ol { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ice); text-underline-offset: 3px; }
a:hover { color: #B8E9FF; }
p, li { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; z-index: 60; background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 12px; top: 12px; }

/* Header (same as the home page) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: var(--radius-s);
  font: 600 0.9375rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--pink); color: var(--pink-ink); }
.btn-primary:hover { background: var(--pink-hover); color: var(--pink-ink); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: #5A4E80; background: var(--surface); color: var(--text); }
.site-header { background: var(--bg); border-bottom: 1px solid var(--border); }
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; min-height: 44px; flex: none; margin-left: -4px; border-radius: 8px; }
.brand img { height: 48px; width: auto; }
.head-actions { display: flex; gap: 8px; margin-left: auto; flex: none; }
@media (max-width: 899px) { .site-header .btn { min-height: 44px; } }
@media (max-width: 419px) {
  .site-header .wrap { gap: 10px; }
  .brand img { height: 42px; }
  .site-header .btn { padding: 0 13px; font-size: 0.875rem; }
}

/* Title */
.doc-head { padding-block: 48px 36px; border-bottom: 1px solid var(--border); }
.doc-head h1 {
  font-family: var(--cond); font-weight: 700;
  font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.375rem); line-height: 1.02; letter-spacing: -0.018em;
}
.doc-head .sub { margin-top: 14px; max-width: 58ch; color: var(--text-2); font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); line-height: 1.55; }
.doc-head .effective { margin-top: 18px; color: var(--text-3); font-size: 0.875rem; }
.doc-head .effective strong { color: var(--ice); font-weight: 600; }

/* Body: contents list + document */
.layout { display: grid; gap: 32px; padding-block: 36px 72px; }
.toc { border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); padding: 18px 20px; font-size: 0.9375rem; }
.toc h2 { color: var(--text-2); font-size: 0.9375rem; font-weight: 600; }
.toc ol { margin-top: 10px; padding-left: 1.4em; color: var(--text-3); display: grid; gap: 4px; }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--text); text-decoration: underline; }

.doc { min-width: 0; max-width: 68ch; }
.doc section { padding-top: 8px; }
.doc section + section { margin-top: 36px; }
.doc h2 {
  font-family: var(--cond); font-weight: 700; color: var(--text);
  font-size: clamp(1.5rem, 1.3rem + 0.7vw, 1.875rem); line-height: 1.15; letter-spacing: -0.01em;
}
.doc h3 { margin-top: 22px; font-size: 1.0625rem; font-weight: 600; color: var(--text); }
.doc p { margin-top: 12px; color: var(--text-2); }
.doc ul { margin-top: 12px; padding-left: 1.25em; color: var(--text-2); }
.doc li { margin-top: 8px; }
.doc li::marker { color: var(--pink); }
.doc strong { color: var(--text); font-weight: 600; }
.doc .lead { color: var(--text); }
.note { margin-top: 18px; border: 1px solid var(--border); border-left: 3px solid var(--pink); border-radius: 0 var(--radius-s) var(--radius-s) 0; background: var(--surface); padding: 14px 18px; }
.note p:first-child { margin-top: 0; }
.contact { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); padding: 18px 20px; }
.contact p { margin-top: 4px; }
.contact p:first-child { margin-top: 0; }

@media (min-width: 960px) {
  .doc-head { padding-block: 72px 48px; }
  .layout { grid-template-columns: 15rem minmax(0, 1fr); gap: 64px; padding-top: 56px; }
  .toc { position: sticky; top: 24px; align-self: start; border: 0; background: none; padding: 0; }
}

/* Footer (same as the home page, plus legal links) */
.site-footer { border-top: 1px solid var(--border); padding-block: 48px 56px; background: var(--bg); }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.foot-top img { height: 44px; width: auto; }
.foot-top p { font-size: 0.875rem; color: var(--text-2); }
.foot-top a { display: inline-block; padding: 12px 0; margin: -12px 0; color: var(--text); text-underline-offset: 3px; }
.foot-legal { display: grid; gap: 12px; margin-top: 24px; max-width: 92ch; font-size: 0.8125rem; line-height: 1.6; color: var(--text-3); }
