/* ============================================================================
   Legal pages (/privacy, /terms) — long-form reading layout.
   Sticky table of contents on desktop; TOC collapses to a scrollable chip row
   on phones so the document itself gets the full width.
   ========================================================================== */

.legal-wrap{padding:44px 26px 90px}

/* ---- masthead ---- */
.legal-head{max-width:780px;margin-bottom:38px}
.legal-head h1{font-size:clamp(22px,3vw,30px);font-weight:800;letter-spacing:-1px;
  color:#eaf6ff;margin:12px 0 0;text-shadow:var(--glow)}
.legal-sub{color:var(--muted);font-size:13px;margin:16px 0 0;line-height:1.6}
.legal-meta{display:flex;flex-wrap:wrap;gap:10px 22px;margin-top:22px;padding-top:18px;
  border-top:1px solid var(--line);font-family:'JetBrains Mono',monospace;font-size:12px;color:var(--faint)}
.legal-meta b{color:var(--muted);font-weight:600}
.legal-meta a{color:#D4AF37}

/* ---- two-column shell ---- */
.legal-cols{display:grid;grid-template-columns:236px minmax(0,1fr);gap:52px;align-items:start}

/* ---- sticky table of contents ---- */
.legal-toc{position:sticky;top:86px;display:flex;flex-direction:column;gap:1px}
.legal-toc .toc-hd{font-family:'JetBrains Mono',monospace;font-size:10.5px;letter-spacing:2px;
  text-transform:uppercase;color:var(--faint);padding:0 10px 10px}
.legal-toc a{padding:5px 9px;border-radius:8px;color:var(--muted);font-size:11px;
  line-height:1.4;border-left:2px solid transparent;transition:.15s}
.legal-toc a:hover{color:var(--ink);background:#0f1a2e;border-left-color:#D4AF37}

/* ---- document body ---- */
.legal-body{max-width:780px;color:#c3d2e6;font-size:12px;line-height:1.75}
.legal-body .legal-lead{font-size:13px;line-height:1.7;color:#d7e8ff;
  padding-bottom:26px;margin-bottom:8px;border-bottom:1px solid var(--line)}
.legal-body section{scroll-margin-top:92px;padding:22px 0}
.legal-body h2{font-size:14.5px;font-weight:700;color:#eaf6ff;margin:0 0 14px;letter-spacing:-.2px}
.legal-body p{margin:0 0 15px}
.legal-body p:last-child{margin-bottom:0}
.legal-body ul{margin:0 0 15px;padding-left:0;list-style:none}
.legal-body li{position:relative;padding:8px 0 8px 26px;border-bottom:1px solid rgba(31,41,55,.6)}
.legal-body li:last-child{border-bottom:0}
.legal-body li::before{content:'◈';position:absolute;left:0;top:8px;color:#D4AF37;font-size:12px}
.legal-body strong,.legal-body b{color:#eaf6ff;font-weight:700}
.legal-body em{color:#d7e8ff;font-style:italic}
.legal-body a{color:#D4AF37;text-decoration:underline;text-underline-offset:2px}
.legal-body a:hover{color:#EBD68F}
.legal-body .muted{color:var(--faint);font-size:11px}

/* ---- footer legal links ---- */
.legal-links a{color:var(--muted);text-decoration:none}
.legal-links a:hover{color:#D4AF37}

/* ---- tablet ---- */
@media(max-width:1000px){
  .legal-cols{grid-template-columns:1fr;gap:26px}
  .legal-toc{position:static;flex-direction:row;flex-wrap:nowrap;gap:6px;
    overflow-x:auto;-webkit-overflow-scrolling:touch;
    padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
  .legal-toc .toc-hd{display:none}
  .legal-toc a{flex:none;white-space:nowrap;border:1px solid var(--line);border-left-width:1px;
    border-radius:999px;font-size:12.5px;padding:7px 13px}
  .legal-toc a:hover{border-color:#D4AF37;background:transparent}
}

/* ---- phone ---- */
@media(max-width:560px){
  .legal-wrap{padding:30px 18px 64px}
  .legal-body{font-size:11.5px;line-height:1.72}
  .legal-body .legal-lead{font-size:12.5px}
  .legal-body h2{font-size:14px}
  .legal-body section{padding:18px 0}
  .legal-meta{gap:8px 16px;font-size:11.5px}
}
