:root {
  --bg: #0f1117; --surface: #161b27; --card: #1e2535;
  --border: rgba(255,255,255,0.08); --text: #e8ecf4;
  --text-muted: #8a95aa; --accent: #3b82f6; --accent-hover: #2563eb;
  --danger: #ef4444; --radius: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Top bar */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 56px; background: var(--surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
}
.top-bar-logo { font-size: 16px; font-weight: 700; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.top-bar-logo span { color: var(--accent); }
.top-bar-right { display: flex; align-items: center; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; font-size: 13px; font-weight: 600; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; transition: background 0.15s, border-color 0.15s; font-family: inherit; text-decoration: none; }
.btn-secondary { background: var(--card); color: var(--text); }
.btn-secondary:hover { border-color: rgba(255,255,255,0.15); }

/* Legal layout */
.legal-wrap { max-width: 820px; margin: 0 auto; padding: 48px 24px 96px; }
.legal-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.legal-title { font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 10px; }
.legal-updated { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }

/* Intro / summary callout */
.legal-callout {
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 36px;
  font-size: 14px; line-height: 1.7; color: var(--text-muted);
}
.legal-callout strong { color: var(--text); font-weight: 600; }

/* Table of contents */
.legal-toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 40px; }
.legal-toc h2 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.legal-toc ol { list-style: none; counter-reset: toc; columns: 2; column-gap: 32px; }
.legal-toc li { counter-increment: toc; margin-bottom: 7px; break-inside: avoid; }
.legal-toc a { color: var(--text); text-decoration: none; font-size: 13.5px; display: flex; gap: 8px; align-items: baseline; transition: color 0.15s; }
.legal-toc a:hover { color: var(--accent); }
.legal-toc a::before { content: counter(toc) "."; color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 18px; }
@media (max-width: 600px) { .legal-toc ol { columns: 1; } }

/* Sections */
.legal-section { margin-bottom: 36px; scroll-margin-top: 72px; }
.legal-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.legal-section h2 .sec-num { color: var(--accent); font-variant-numeric: tabular-nums; font-size: 16px; }
.legal-section h3 { font-size: 15px; font-weight: 600; margin: 20px 0 8px; color: var(--text); }
.legal-section p { font-size: 14.5px; line-height: 1.75; color: var(--text-muted); margin-bottom: 12px; }
.legal-section p strong, .legal-section li strong { color: var(--text); font-weight: 600; }
.legal-section a { color: var(--accent); text-decoration: none; }
.legal-section a:hover { text-decoration: underline; }
.legal-section ul, .legal-section ol { margin: 0 0 14px 22px; }
.legal-section li { font-size: 14.5px; line-height: 1.75; color: var(--text-muted); margin-bottom: 7px; }

/* Definition / data table */
.legal-table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 13.5px; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 14px; border: 1px solid var(--border); vertical-align: top; line-height: 1.6; }
.legal-table th { background: var(--surface); color: var(--text); font-weight: 600; font-size: 12.5px; }
.legal-table td { color: var(--text-muted); }
.legal-table td strong { color: var(--text); }

/* Contact card */
.legal-contact { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-top: 8px; }
.legal-contact p { margin-bottom: 8px; }
.legal-contact .contact-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); margin-bottom: 8px; }
.legal-contact .contact-row i { color: var(--accent); font-size: 18px; }

.legal-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); text-decoration: none; margin-top: 8px; }
.legal-back:hover { color: var(--accent); }

/* Footer */
.legal-footer { border-top: 1px solid var(--border); padding: 28px 24px; text-align: center; }
.legal-footer-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.legal-footer-links a { font-size: 13px; color: var(--text-muted); text-decoration: none; }
.legal-footer-links a:hover { color: var(--text); }
.legal-footer-copy { font-size: 12px; color: var(--text-muted); }
