:root {
  --canvas: #060912;
  --surface: #0e1626;
  --surface-raised: #141e31;
  --brand: #6d5dfb;
  --cyan: #58e5ff;
  --text: #f4f7ff;
  --soft: #b5c0d6;
  --muted: #7e8ba5;
  --line: #26364b;
  --max: 1180px;
  --reading: 760px;
  --body: "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Arial Black", "Trebuchet MS", system-ui, sans-serif;
  --utility: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 88% 0%, rgba(109,93,251,.13), transparent 34rem),
    radial-gradient(circle at 0% 22%, rgba(88,229,255,.055), transparent 28rem),
    var(--canvas);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.72;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
::selection { background: rgba(88,229,255,.25); color: white; }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 80; background: linear-gradient(90deg,var(--brand),var(--cyan)); box-shadow: 0 0 14px rgba(88,229,255,.6); }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.topbar { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(38,54,75,.72); background: rgba(6,9,18,.78); backdrop-filter: blur(18px); }
.nav { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 900; letter-spacing: -.02em; }
.brand svg { width: 38px; height: 38px; filter: drop-shadow(0 0 12px rgba(88,229,255,.24)); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; color: var(--soft); font-size: 13px; font-weight: 800; transition: color .2s,border-color .2s,background .2s; }
.nav-link:hover { color: white; border-color: #3a506c; background: var(--surface-raised); }
.nav-link.primary { color: white; border-color: transparent; background: linear-gradient(135deg,var(--brand),#4859d8); }

.legal-hero { padding: 96px 0 68px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 15px; color: var(--cyan); font-family: var(--utility); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow::before { content: "[ "; color: #9a8cff; }
.eyebrow::after { content: " ]"; color: #9a8cff; }
h1 { max-width: 900px; margin: 0; font-family: var(--display); font-size: clamp(45px,7vw,88px); line-height: .96; letter-spacing: -.06em; text-transform: uppercase; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.legal-meta span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--soft); font-family: var(--utility); font-size: 10px; letter-spacing: .05em; }

.layout { display: grid; grid-template-columns: 260px minmax(0,var(--reading)); gap: clamp(50px,8vw,110px); align-items: start; padding: 70px 0 110px; }
.toc { position: sticky; top: 104px; }
.toc-title { margin: 0 0 13px; color: var(--muted); font-family: var(--utility); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.toc nav { display: grid; max-height: calc(100vh - 155px); overflow: auto; padding-right: 8px; }
.toc a { padding: 8px 0 8px 13px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.35; transition: color .2s,border-color .2s; }
.toc a:hover,.toc a.active { color: white; border-left-color: var(--cyan); }

.legal-copy { min-width: 0; color: var(--soft); font-size: 16px; }
.legal-copy > p:first-child { margin-top: 0; color: var(--text); font-size: 19px; line-height: 1.65; }
.legal-copy h2 { scroll-margin-top: 105px; margin: 68px 0 18px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--text); font-size: clamp(25px,3vw,34px); line-height: 1.2; letter-spacing: -.025em; }
.legal-copy h2:first-of-type { margin-top: 44px; }
.legal-copy h3 { scroll-margin-top: 105px; margin: 34px 0 10px; color: var(--text); font-size: 19px; line-height: 1.35; }
.legal-copy p { margin: 0 0 18px; }
.legal-copy strong { color: var(--text); }
.legal-copy ul,.legal-copy ol { margin: 12px 0 24px; padding-left: 24px; }
.legal-copy li { padding-left: 7px; margin: 9px 0; }
.legal-copy li::marker { color: var(--cyan); font-family: var(--utility); }
.legal-copy a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.noscript { white-space: pre-wrap; color: var(--soft); font-family: var(--body); }

.back-top { position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #3a506c; border-radius: 15px; background: rgba(14,22,38,.9); color: white; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s,transform .2s; backdrop-filter: blur(12px); }
.back-top.visible { opacity: 1; pointer-events: auto; transform: none; }
footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 12px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a:hover { color: white; }

@media (max-width: 850px) {
  .layout { grid-template-columns: 1fr; gap: 34px; }
  .toc { position: static; }
  .toc nav { max-height: none; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .legal-hero { padding-top: 72px; }
}
@media (max-width: 620px) {
  .shell { width: min(calc(100% - 28px),var(--max)); }
  .nav { min-height: 68px; }
  .brand span { display: none; }
  .nav-link { padding-inline: 11px; font-size: 11px; }
  .legal-hero { padding: 62px 0 50px; }
  .layout { padding: 48px 0 84px; }
  .toc nav { grid-template-columns: 1fr; }
  .legal-copy { font-size: 15px; }
  .footer-row { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { transition-duration: .001ms !important; }
}
