/* Privacy and terms (privacy.html, terms.html): long legal documents in the site's design. Loads after base.css.
   Only presentation lives here: the documents' text and structure are the published, signed-off version. */

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { background: radial-gradient(120% 60% at 50% 0%, var(--night-900), #000 55%) no-repeat, #000; }

/* -- Nav: the document links stay visible on phones too ---------------------------------------- */
.nav--doc .nav__links { display: flex; gap: clamp(14px, 3vw, 26px); }
.nav--doc .nav__links a[aria-current='page'] { color: var(--ink); }
.nav--doc { background: rgba(0, 0, 0, 0.82); }   /* dense text scrolls under it: less see-through than on the home */

/* -- Document ---------------------------------------------------------------------------------- */
.doc {
  max-width: calc(760px + 2 * var(--gutter)); margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(56px, 10vh, 110px)) var(--gutter) clamp(72px, 12vh, 120px);
  font-size: 17px; line-height: 1.7; color: #CBD2E0;
}
.doc [id] { scroll-margin-top: calc(var(--nav-h) + 24px); }
.hud-label { font: 600 15px/1.2 var(--text); letter-spacing: 0.02em; color: var(--cyan); margin-bottom: 14px; }
.doc h1 {
  font: 600 clamp(36px, 5.4vw, 60px)/1.06 var(--display); letter-spacing: -0.03em; color: var(--ink);
  margin-bottom: 18px; text-wrap: balance;
}
.doc h2 {
  font: 600 clamp(23px, 2.6vw, 30px)/1.2 var(--display); letter-spacing: -0.02em; color: var(--ink);
  margin: clamp(52px, 8vh, 72px) 0 16px; padding-top: 28px; border-top: 1px solid var(--line); text-wrap: balance;
}
.doc h3 { font: 600 19px/1.35 var(--display); color: var(--ink); margin: 30px 0 10px; }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 8px; padding-left: 0.2em; }
.doc li::marker { color: var(--cyan); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--cyan); text-decoration: none; overflow-wrap: anywhere; }
.doc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.meta { font-size: 14px; color: var(--ink-3); margin-bottom: 26px; }

.lang-switch { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 40px; }
.lang-switch a {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--ink); background: rgba(243, 241, 236, 0.06); border: 1px solid var(--line); transition: background 0.2s, border-color 0.2s;
}
.lang-switch a:hover { text-decoration: none; background: rgba(79, 195, 247, 0.12); border-color: rgba(79, 195, 247, 0.35); }

/* Summary and table of contents: the same glass cards as the home page. */
.panel {
  margin: 28px 0; padding: clamp(22px, 3vw, 30px); border-radius: 24px;
  background: rgba(12, 19, 34, 0.7); border: 1px solid var(--line);
}
.panel > :last-child { margin-bottom: 0; }
.panel .hud-label { margin-bottom: 12px; }
.toc ol { margin: 4px 0 0; padding-left: 0; columns: 2 240px; column-gap: 40px; font-size: 15.5px; }
/* Numbers inside the item: WebKit clips outside markers of a multi-column list (the TOC lost its numbers on iPhone). */
.toc li { margin-bottom: 6px; break-inside: avoid; list-style-position: inside; padding-left: 0; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--cyan); }

.glow-divider {
  height: 1px; margin: 0 auto; max-width: calc(760px + 2 * var(--gutter));
  background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.5) 50%, transparent);
}

/* -- Tables: scroll inside their box on desktop, one card per row on phones ---------------------- */
.table-wrap { width: 100%; overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(12, 19, 34, 0.5); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.doc th { font-size: 13px; font-weight: 600; color: var(--cyan); background: rgba(12, 19, 34, 0.9); white-space: nowrap; }
.doc tr:last-child td { border-bottom: 0; }
.doc td:first-child { color: var(--ink); font-weight: 500; }

@media (max-width: 600px) {
  .doc { font-size: 16px; }
  .table-wrap { border: 0; background: none; overflow: visible; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .doc tr { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 18px; background: rgba(12, 19, 34, 0.7); overflow: hidden; }
  .doc td { padding: 10px 16px; }
  .doc td:last-child { border-bottom: 0; }
  .doc td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--cyan);
  }
}

/* -- Print: black on white, no chrome ---------------------------------------------------------- */
@media print {
  body { background: #fff; color: #111; }
  .nav, .footer, .skip, .lang-switch { display: none; }
  .doc { padding: 0; color: #111; max-width: none; }
  .doc h1, .doc h2, .doc h3, .doc strong, .doc td:first-child { color: #000; }
  .doc a, .hud-label, .doc th, .doc li::marker { color: #0277BD; }
  .panel, .table-wrap, .doc th { background: none; border-color: #ccc; }
  .table-wrap { overflow: visible; }   /* a wide table prints whole, never clipped */
  .doc th, .doc td, .doc h2 { border-color: #ccc; }
  .doc h2 { break-after: avoid; }
  .glow-divider { background: #ccc; }
}
