@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #080a0f;
  --bg-raised: #10141c;
  --border: rgba(255, 255, 255, 0.08);
  --amber: #f5b700;
  --amber-soft: rgba(245, 183, 0, 0.12);
  --text: #f8fafc;
  --text-muted: #d9dce4;
  --text-dim: #8b93a5;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .font-display {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.01em;
}

a {
  color: var(--amber);
}

/* Top bar */
.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(8, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
}

.legal-brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(155deg, #ffd643, var(--amber) 55%, #b45309);
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 15px;
  flex-shrink: 0;
}

.legal-brand .name-gold {
  color: var(--amber);
}

.legal-back {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.legal-back:hover {
  color: var(--text);
  border-color: rgba(245, 183, 0, 0.35);
  background: rgba(255, 255, 255, 0.03);
}

/* Doc nav (links between the three docs) */
.doc-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto 8px;
  padding: 0 20px;
}

.doc-switch a {
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.doc-switch a.active {
  color: #0a0a0a;
  background: var(--amber);
  border-color: var(--amber);
}

.doc-switch a:not(.active):hover {
  color: var(--text);
  border-color: rgba(245, 183, 0, 0.4);
}

/* Main document */
main.legal-doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 20px 90px;
}

.legal-hero {
  margin-bottom: 30px;
}

.legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(245, 183, 0, 0.3);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.legal-hero h1 {
  font-size: clamp(26px, 4.4vw, 36px);
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.15;
}

.legal-meta {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.legal-summary {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.legal-summary strong {
  color: var(--text);
}

/* Table of contents */
.legal-toc {
  margin: 28px 0 34px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.legal-toc h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 10px;
  font-weight: 800;
}

.legal-toc ol {
  margin: 0;
  padding-left: 18px;
  columns: 1;
  font-size: 13.5px;
  line-height: 1.9;
}

.legal-toc a {
  color: var(--text-muted);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--amber);
  text-decoration: underline;
}

@media (min-width: 640px) {
  .legal-toc ol {
    columns: 2;
    column-gap: 28px;
  }
}

/* Body content */
.legal-body section {
  margin-bottom: 30px;
  scroll-margin-top: 74px;
}

.legal-body h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.legal-body h2 .num {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.legal-body h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin: 18px 0 8px;
}

.legal-body p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.legal-body ul,
.legal-body ol.clauses {
  margin: 0 0 12px;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-muted);
}

.legal-body li {
  margin-bottom: 6px;
}

.legal-body strong {
  color: var(--text);
  font-weight: 700;
}

.legal-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-callout {
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 13px;
  line-height: 1.65;
  margin: 14px 0;
  border: 1px solid;
}

.legal-callout.amber {
  background: rgba(245, 183, 0, 0.08);
  border-color: rgba(245, 183, 0, 0.3);
  color: #f4d68a;
}

.legal-callout.neutral {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text-muted);
}

.legal-disclaimer {
  margin-top: 44px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.7;
}

.legal-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 50px;
  color: var(--text-dim);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.legal-footer a {
  color: var(--text-dim);
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
