/*
 * KLVR legal-page shared stylesheet — /privacy /terms /support /notice.
 *
 * Palette locked to the site brand tokens (Part 5): navy #070D18,
 * surface #111A2C, gold #D4AF37, silver #C8CCD4. No off-brand
 * greys/blues.
 *
 * Typography law (Part 5):
 *   - Ceremonial serif for display/hero (h1) only, via system serif.
 *   - System sans stack for all body/UI.
 *   - Tabular-nums for figures via font-variant-numeric.
 *   - NO Google Fonts / Manrope / JetBrains / Cinzel webfont loads on
 *     these pages — everything resolves to system stacks.
 *
 * Reading layout (Part 5): ~65ch measure, 1.6 line-height, sticky
 * table-of-contents on /terms and /privacy.
 */

:root {
  color-scheme: dark;
  --navy: #070D18;
  --navy-2: #0C1424;
  --surface: #111A2C;
  --surface-hi: #172238;
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.16);
  --ink: #F6F2E8;
  --muted: #B8C0CF;
  --gold: #D4AF37;
  --gold-bright: #F0C869;
  --silver: #C8CCD4;
}

* { box-sizing: border-box; }

html {
  background: var(--navy);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(212,175,55,0.14), transparent 32rem),
    linear-gradient(145deg, #05101d 0%, #08172a 52%, #101827 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-bright); }

.tabular {
  font-variant-numeric: tabular-nums;
}

/* ────────── page frame ────────── */

.page {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.site-header .brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.site-header .brand strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.site-header .brand span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}

/* ────────── two-column layout: ToC rail + article ────────── */

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  padding: 56px 0 92px;
}

.toc {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(17,26,44,0.6);
  backdrop-filter: blur(6px);
}

.toc h2 {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc ol li {
  counter-increment: toc;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.35;
}

.toc ol li::before {
  content: counter(toc) ". ";
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.toc a { color: var(--ink); }
.toc a:hover { color: var(--gold-bright); }

/* On narrow screens the sticky ToC becomes a top block. */
@media (max-width: 860px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 0 72px;
  }
  .toc {
    position: static;
    max-height: none;
  }
}

/* ────────── article body ────────── */

.legal-article {
  max-width: 65ch;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal-article h1 {
  margin: 0 0 8px;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.updated {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.lede {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.65;
}

/* At-a-glance panel used at the top of /privacy. */
.glance {
  margin: 8px 0 40px;
  padding: 18px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(17,26,44,0.55);
}

.glance h2 {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.glance ul {
  margin: 0;
  padding-left: 20px;
}

.glance ul li {
  padding: 3px 0;
}

.legal-article section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.legal-article section:first-of-type {
  border-top: none;
  padding-top: 4px;
}

.legal-article h2 {
  margin: 0 0 6px;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
}

.section-number {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  padding-right: 8px;
}

.plain-point {
  margin: 4px 0 14px;
  color: var(--gold-bright);
  font-style: italic;
  font-size: 15px;
}

.legal-article p {
  margin: 0 0 14px;
}

.legal-article p:last-child {
  margin-bottom: 0;
}

.legal-article ul,
.legal-article ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.legal-article li {
  padding: 3px 0;
}

.legal-article .lettered {
  padding-left: 22px;
  list-style: none;
  counter-reset: lettered;
}

.legal-article .lettered > li {
  counter-increment: lettered;
  position: relative;
  padding: 4px 0 4px 0;
}

.legal-article .lettered > li::before {
  content: "(" counter(lettered, lower-alpha) ") ";
  position: absolute;
  left: -22px;
  color: var(--muted);
}

.contact-card {
  margin: 28px 0 0;
  padding: 18px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(17,26,44,0.55);
}

.contact-card a { color: var(--gold-bright); }

/* ────────── footer ────────── */

.site-footer {
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer nav {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 620px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
