/* Laytuh legal + utility pages (privacy, terms, data deletion, auth-callback, 404).
   Same tokens as assets/site.css (docs/design/tokens.json) so these pages read as the same site. */
:root {
  --font-sans: "Nunito", system-ui, -apple-system, sans-serif;
  --font-display: "Fredoka", var(--font-sans);
  --coral: #FF5335;
  --rose: #FF1A75;
  --violet: #7C14D4;
  --brand-grad: linear-gradient(135deg, var(--coral) 0%, var(--rose) 50%, var(--violet) 100%);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-full: 9999px;
  --nav-h: 64px;
  --measure: 68ch;
}
html[data-theme="dark"] {
  --bg: #0B0C12;
  --surface: #1B1C2A;
  --surface-raised: #262839;
  --border: rgba(255, 255, 255, 0.10);
  --text-1: #F5F3FF;
  --text-2: #A3A9BD;
  --text-3: #A3A9BD;
  --header-bg: rgba(11, 12, 18, 0.80);
  --ph-bg: rgba(255, 83, 53, 0.16);
  --ph-text: #FF9A87;
}
html[data-theme="light"] {
  --bg: #F1F0F7;
  --surface: #FFFFFF;
  --surface-raised: #EAE8F3;
  --border: rgba(20, 19, 28, 0.10);
  --text-1: #14131C;
  --text-2: #50556A;
  --text-3: #50556A;
  --header-bg: rgba(241, 240, 247, 0.85);
  --ph-bg: rgba(255, 83, 53, 0.14);
  --ph-text: #B8260C;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 200; background: var(--surface); padding: 8px 12px; border-radius: var(--r-sm); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.header-row {
  max-width: 1140px; height: 100%; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand-link { display: flex; align-items: center; }
.brand-link img { height: 28px; width: auto; display: block; }
.doc-nav { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; }
.doc-nav a {
  display: inline-block; text-decoration: none;
  font-size: 0.85rem; font-weight: 500; color: var(--text-2);
  padding: 6px 12px; border-radius: var(--r-full);
}
.doc-nav a:hover { color: var(--text-1); background: var(--surface-raised); }
.doc-nav a[aria-current="page"] { color: #fff; background: var(--brand-grad); font-weight: 700; }
.theme-btn {
  background: var(--surface-raised); border: 1px solid var(--border); color: var(--text-1);
  width: 36px; height: 36px; border-radius: var(--r-full);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.theme-btn svg { width: 16px; height: 16px; }
html[data-theme="dark"] .icon-sun, html[data-theme="light"] .icon-moon { display: none; }

/* Page */
.page {
  max-width: 1140px; margin: 0 auto; padding: 56px 20px 96px;
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px;
}
.page-head { grid-column: 1 / -1; max-width: var(--measure); }
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; line-height: 1.05;
  letter-spacing: -0.02em;
}
.page-head .lede { margin-top: 16px; font-size: 1.1rem; color: var(--text-2); }
.page-head .dates { margin-top: 12px; font-size: 0.85rem; color: var(--text-3); }

/* The short version: the one loud element on the page */
.short {
  grid-column: 1 / -1; max-width: var(--measure);
  position: relative; border-radius: var(--r-lg); padding: 28px 28px 24px;
  background: var(--surface);
}
.short::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: var(--brand-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.short h2 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin-bottom: 12px; }
.short ul { list-style: none; display: grid; gap: 10px; }
.short li { padding-left: 22px; position: relative; color: var(--text-1); }
.short li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-grad);
}

/* Table of contents */
.toc { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; font-size: 0.88rem; }
.toc h2 { font-size: 0.85rem; font-weight: 700; color: var(--text-3); margin-bottom: 10px; }
.toc ol { list-style: none; display: grid; gap: 2px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 8px; text-decoration: none; color: var(--text-2);
  padding: 5px 10px; border-radius: var(--r-sm); border-left: 2px solid transparent;
}
.toc a::before { content: counter(toc); color: var(--text-3); min-width: 1.2em; font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--text-1); background: var(--surface-raised); }

/* Body copy */
.doc { max-width: var(--measure); counter-reset: sec; }
.doc section { padding-top: 8px; margin-bottom: 44px; }
.doc h2 {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.2;
  margin-bottom: 14px; counter-increment: sec;
}
.doc h2::before { content: counter(sec) "  "; white-space: pre; color: var(--rose); }
.doc h3 { font-size: 1.05rem; font-weight: 700; margin: 22px 0 8px; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 12px; }
.doc strong { color: var(--text-1); font-weight: 650; }
.doc ul, .doc ol.steps { margin: 12px 0 0 1.2em; display: grid; gap: 8px; }
.doc a { color: var(--text-1); text-decoration-color: var(--rose); text-underline-offset: 3px; }
.doc a:hover { text-decoration-thickness: 2px; }

/* Provider / data tables */
.table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 520px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { font-weight: 700; color: var(--text-1); background: var(--surface-raised); }
td { color: var(--text-2); }
tr:last-child td { border-bottom: none; }

/* Deletion steps: a real sequence, so numbered */
.path {
  display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-weight: 650; color: var(--text-1);
}
.path span { background: var(--surface-raised); border: 1px solid var(--border); padding: 2px 10px; border-radius: var(--r-full); }
.callout {
  margin-top: 16px; padding: 16px 18px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border);
}
.callout p { color: var(--text-2); }

/* Owner-fill placeholders: loud on purpose so nobody ships them */
.ph { background: var(--ph-bg); color: var(--ph-text); font-weight: 700; padding: 0 4px; border-radius: 4px; }

/* Footer */
.footer-wrap { border-top: 1px solid var(--border); padding: 32px 0; font-size: 0.8rem; color: var(--text-3); }
.footer-flex {
  max-width: 1140px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-flex .brand { display: flex; align-items: center; gap: 10px; }
.footer-flex img { height: 22px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text-3); text-decoration: none; }
.footer-links a:hover { color: var(--text-1); }

/* Small single-message pages (auth-callback, 404) */
.solo { min-height: calc(100vh - var(--nav-h) - 90px); display: grid; place-items: center; padding: 48px 20px; text-align: center; }
.solo-inner { max-width: 440px; }
.solo img.mark { width: 72px; height: 72px; border-radius: 16px; margin: 0 auto 20px; display: block; }
.solo h1 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1.15; margin-bottom: 10px; }
.solo p { color: var(--text-2); }
.btn-cta {
  display: inline-flex; margin-top: 24px; background: var(--brand-grad); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 0.9rem; padding: 11px 24px; border-radius: var(--r-full);
  box-shadow: 0 4px 18px rgba(255, 83, 53, 0.38);
}

@media (max-width: 860px) {
  .page { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 36px; }
  .page > * { min-width: 0; }
  .toc { position: static; }
  .toc ol { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .doc-nav a { padding: 6px 8px; font-size: 0.8rem; }
}
@media (max-width: 560px) {
  .brand-link img { height: 22px; }
  .header-row { padding: 0 16px; gap: 8px; }
  .doc-nav { gap: 0; flex-wrap: nowrap; }
  .page, .footer-flex { padding-left: 16px; padding-right: 16px; }
  .doc-nav .hide-sm { display: none; }
  .short { padding: 22px 18px 18px; }
}
@media print {
  .site-header, .toc, .footer-wrap, .theme-btn { display: none; }
  body { background: #fff; color: #000; }
  .page { display: block; }
}
.doc ol.steps + p, .doc ul + p, .doc .table-wrap + p { margin-top: 14px; }
