/* ─────────────────────────────────────────────────────────────────────────────
   Shared styling for the legal pages (privacy.html, terms.html).
   Same brand tokens as index.html, but tuned for long-form reading:
   narrower measure, larger line-height, visible heading hierarchy.
   ───────────────────────────────────────────────────────────────────────────── */
:root {
  --navy:   #0D1B2A;
  --blue:   #2563EB;
  --emerald:#10B981;
  --ink:    #0F172A;
  --slate:  #334155;
  --muted:  #64748B;
  --faint:  #94A3B8;
  --line:   #E2E8F0;
  --soft:   #F1F5F9;
  --softer: #F8FAFC;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ── Nav (matches index.html) ───────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(13,27,42,.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo:hover { text-decoration: none; }
.logo-word {
  font-size: .8rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: #fff; line-height: 1;
}
.logo-word em { font-style: normal; color: #34D399; margin-left: .3em; font-weight: 700; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { font-size: .875rem; font-weight: 500; color: rgba(226,232,240,.78); }
.nav-links a:hover { color: #fff; text-decoration: none; }
@media (max-width: 720px) { .nav-links { gap: 18px; } .nav-links a { font-size: .8125rem; } }

/* ── Page header ────────────────────────────────────────────────────────────── */
.doc-head {
  background: var(--navy); color: #fff; position: relative; overflow: hidden;
  padding: clamp(48px, 6vw, 76px) 0 clamp(40px, 5vw, 60px);
}
.doc-head::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 80% at 15% 0%, rgba(37,99,235,.4), transparent 65%);
}
.doc-head > * { position: relative; }
.doc-head .eyebrow {
  font-size: .6875rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: #34D399; margin-bottom: 14px;
}
.doc-head h1 {
  font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800;
  letter-spacing: -.028em; line-height: 1.12;
}
.doc-meta {
  margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 28px;
  font-size: .8125rem; color: rgba(148,163,184,.92);
}
.doc-meta b { color: rgba(226,232,240,.95); font-weight: 600; }

/* ── Draft notice ───────────────────────────────────────────────────────────── */
.notice {
  margin: 32px 0 0; padding: 20px 22px; border-radius: 14px;
  background: #FFFBEB; border: 1px solid #FDE68A;
}
.notice h4 {
  font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: #92400E; margin-bottom: 8px;
}
.notice p { font-size: .875rem; color: #78350F; line-height: 1.65; }
.notice p + p { margin-top: 8px; }

/* ── Layout: sticky contents + body ─────────────────────────────────────────── */
.doc-layout {
  display: grid; grid-template-columns: 232px 1fr; gap: 56px;
  padding: clamp(40px, 5vw, 64px) 0 clamp(72px, 8vw, 104px);
  align-items: start;
}
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; gap: 32px; } }

.toc { position: sticky; top: 92px; }
@media (max-width: 900px) {
  .toc { position: static; padding: 20px; background: var(--softer); border: 1px solid var(--line); border-radius: 14px; }
}
.toc h4 {
  font-size: .6875rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 14px;
}
.toc a {
  display: block; font-size: .8125rem; color: var(--muted);
  padding: 5px 0; line-height: 1.45;
}
.toc a:hover { color: var(--blue); text-decoration: none; }

/* ── Long-form body ─────────────────────────────────────────────────────────── */
.doc-body { max-width: 720px; }

.doc-body > p:first-of-type { font-size: 1.0625rem; color: var(--slate); }

.doc-body h2 {
  font-size: 1.375rem; font-weight: 750; letter-spacing: -.018em;
  color: var(--navy); line-height: 1.3;
  margin: 48px 0 14px; padding-top: 28px; border-top: 1px solid var(--line);
}
.doc-body h2:first-of-type { margin-top: 32px; }
.doc-body h2 .num {
  display: inline-block; min-width: 30px;
  color: var(--faint); font-weight: 650; font-size: 1.0625rem;
}

.doc-body h3 {
  font-size: 1rem; font-weight: 700; color: var(--navy);
  margin: 28px 0 8px; letter-spacing: -.008em;
}

.doc-body p { margin-bottom: 16px; color: var(--slate); font-size: .9375rem; }
.doc-body strong { color: var(--ink); font-weight: 650; }

.doc-body ul, .doc-body ol { margin: 0 0 18px; padding-left: 0; list-style: none; }
.doc-body li {
  position: relative; padding-left: 24px; margin-bottom: 10px;
  color: var(--slate); font-size: .9375rem; line-height: 1.65;
}
.doc-body ul > li::before {
  content: ""; position: absolute; left: 6px; top: 11px;
  width: 5px; height: 5px; border-radius: 999px; background: var(--faint);
}
.doc-body ol { counter-reset: li; }
.doc-body ol > li { counter-increment: li; }
.doc-body ol > li::before {
  content: counter(li) "."; position: absolute; left: 0; top: 0;
  color: var(--faint); font-weight: 650; font-size: .875rem;
}

/* Callout for the clauses that carry real weight */
.callout {
  margin: 22px 0; padding: 18px 20px; border-radius: 12px;
  background: var(--softer); border-left: 3px solid var(--blue);
}
.callout p { margin-bottom: 0; font-size: .9rem; }
.callout p + p { margin-top: 10px; }
.callout.warn { background: #FEF2F2; border-left-color: #EF4444; }
.callout.warn p { color: #7F1D1D; }

/* Tables */
.doc-body table {
  width: 100%; border-collapse: collapse; margin: 20px 0 24px;
  font-size: .875rem; display: block; overflow-x: auto;
}
.doc-body thead { background: var(--softer); }
.doc-body th {
  text-align: left; padding: 11px 14px; font-weight: 700; color: var(--navy);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.doc-body td {
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  color: var(--slate); vertical-align: top;
}
.doc-body tbody tr:last-child td { border-bottom: 0; }

/* Placeholders the operator must fill before publishing */
.fill {
  background: #FEF3C7; color: #92400E; font-weight: 650;
  padding: 1px 6px; border-radius: 5px; font-size: .9em;
  border: 1px dashed #FBBF24;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.footer { background: var(--navy); padding: 44px 0 36px; }
.footer-row {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between;
  align-items: center;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-links a { font-size: .875rem; color: rgba(226,232,240,.8); }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-copy {
  margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8125rem; color: rgba(148,163,184,.75);
}
