:root {
  --cyan: #22d3ee;
  --gold: #eab308;
  --violet: #a78bfa;
  --bg: #0f1219;
  --card: #111318;
  --elevated: #15171d;
  --border: #1e293b;
  --text: #ffffff;
  --secondary: #94a3b8;
  --tertiary: #64748b;
  --muted: #475569;
  --font: "Inter Variable", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--secondary);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.78;
}
a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 20px;
  background: rgba(17, 19, 24, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}
.topbar-left, .brand, .topnav, .topbar-right { display: flex; align-items: center; }
.topbar-left { gap: 30px; min-width: 0; }
.brand {
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand svg { flex: none; }
.topnav { gap: 4px; }
.topnav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.topnav a:hover, .topnav a.active { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.topnav a.active { color: #b8f5ff; background: rgba(34, 211, 238, 0.08); }
.open-app {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.06);
  color: #b8f5ff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
}
.open-app:hover { border-color: rgba(34, 211, 238, 0.45); background: rgba(34, 211, 238, 0.1); }

.legal-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 760px) 210px;
  justify-content: center;
  max-width: 1440px;
  min-height: calc(100vh - 82px);
  margin: 0 auto;
  background:
    radial-gradient(circle at 60% -20%, rgba(34, 211, 238, 0.08), transparent 32rem),
    var(--bg);
}
.sidebar, .toc {
  position: sticky;
  top: 56px;
  align-self: start;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 44px 24px;
}
.sidebar { border-right: 1px solid var(--border); }
.toc { border-left: 1px solid var(--border); }
.side-title {
  margin: 0 0 14px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.toc .side-title { padding: 0; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a {
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--tertiary);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.25;
}
.side-nav a:hover { color: var(--text); }
.side-nav a.active {
  color: #b8f5ff;
  background: rgba(34, 211, 238, 0.08);
  box-shadow: inset 2px 0 var(--cyan);
  font-weight: 650;
}
.toc a {
  display: block;
  padding: 5px 0;
  color: var(--tertiary);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.45;
}
.toc a:hover { color: var(--text); }

.main { min-width: 0; padding: 70px 72px 80px; }
.eyebrow {
  margin-bottom: 15px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
h1 {
  max-width: 680px;
  margin: 0 0 24px;
  color: var(--text);
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.98;
}
h1::after {
  content: "";
  display: block;
  width: 74px;
  height: 3px;
  margin-top: 26px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--gold), var(--violet));
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin: 0 0 34px;
  color: var(--tertiary);
  font-size: 12px;
}
.intro {
  margin: 0 0 38px;
  color: #bdc6d3;
  font-size: 16px;
  line-height: 1.72;
}
h2 {
  margin: 54px 0 17px;
  padding-top: 4px;
  scroll-margin-top: 80px;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
}
p { margin: 0 0 18px; }
strong { color: var(--text); font-weight: 650; }
code {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #101620;
  color: #cdeff4;
  font: 0.86em ui-monospace, SFMono-Regular, Menlo, monospace;
}
.callout {
  margin: 28px 0;
  padding: 16px 18px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-left: 3px solid var(--violet);
  border-radius: 0 9px 9px 0;
  background: rgba(167, 139, 250, 0.05);
  color: #bdc6d3;
  font-size: 14px;
}
.contact-card {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(34, 211, 238, 0.13);
  border-radius: 11px;
  background: linear-gradient(145deg, #0b1018, #0d141e);
}
.contact-card a, .article-footer a {
  color: #74e7f7;
  text-decoration-color: rgba(116, 231, 247, 0.35);
  text-underline-offset: 3px;
}
.article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 70px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.site-footer {
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: #080a10;
  color: var(--muted);
  font-size: 10.5px;
}
.site-footer a { color: var(--tertiary); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }

@media (max-width: 1100px) {
  .legal-shell { grid-template-columns: 210px minmax(0, 760px); }
  .toc { display: none; }
}
@media (max-width: 820px) {
  .topnav { display: none; }
  .legal-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 48px 22px 64px; }
  h1 { font-size: 42px; }
  h2 { margin-top: 45px; }
}
@media (max-width: 480px) {
  .topbar { padding: 0 14px; }
  .open-app { padding: 0 10px; }
  .site-footer { justify-content: flex-end; }
  .site-footer span { display: none; }
}

