:root {
  color-scheme: dark;
  --black: #000;
  --panel: #050505;
  --panel-raised: #090909;
  --line: #1b1b1d;
  --line-bright: #2a2530;
  --text: #f1eff4;
  --muted: #96919d;
  --faint: #5f5a66;
  --accent: #a855f7;
  --accent-soft: #c084fc;
  --accent-wash: rgba(168, 85, 247, .08);
  --ok: #72f1b8;
  --max: 1240px;
}

* { box-sizing: border-box; }

html {
  background: var(--black);
  scroll-behavior: smooth;
  scrollbar-color: #33283c #000;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 440px at 50% -180px, rgba(168, 85, 247, .13), transparent 68%),
    #000;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .26;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 4px;
}

::selection { background: rgba(168, 85, 247, .38); color: #fff; }

.reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 100;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #e0aaff);
  box-shadow: 0 0 16px rgba(168, 85, 247, .85);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,.075);
  background: rgba(0, 0, 0, .82);
  backdrop-filter: blur(18px) saturate(140%);
}

.header-inner {
  width: min(calc(100% - 40px), var(--max));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(168,85,247,.35)); }
.brand-word { width: auto; height: 12px; opacity: .94; }

.header-context {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.header-context .slash { color: #353039; }
.header-context strong { color: #b9b4be; font-weight: 500; }

.header-nav { display: flex; align-items: center; gap: 8px; }

.header-link {
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.header-link:hover { color: #fff; background: #090909; border-color: #202024; }
.header-link[aria-current="page"] { color: var(--accent-soft); background: var(--accent-wash); border-color: rgba(168,85,247,.2); }

.hero {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 88px 0 58px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--accent-soft);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

h1 {
  max-width: 850px;
  margin: 0;
  color: #fff;
  font-size: clamp(46px, 7vw, 86px);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: .98;
}

.hero-copy {
  max-width: 750px;
  margin: 27px 0 0;
  color: #aaa5af;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(7,7,7,.8);
  color: var(--muted);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: .04em;
}

.meta-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(114,241,184,.6); }

.legal-shell {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 238px minmax(0, 760px);
  gap: clamp(48px, 7vw, 100px);
  justify-content: start;
  padding: 54px 0 112px;
}

.toc { position: relative; }

.toc-inner {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 132px);
  overflow: auto;
  padding-right: 18px;
  scrollbar-width: none;
}

.toc-inner::-webkit-scrollbar { display: none; }

.toc-label {
  margin: 0 0 15px;
  color: var(--faint);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.toc ol { list-style: none; padding: 0; margin: 0; }

.toc a {
  display: block;
  padding: 7px 0 7px 13px;
  border-left: 1px solid #242126;
  color: #706b76;
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease;
}

.toc a:hover { color: #c9c5cc; border-left-color: #65586d; }
.toc a.active { color: var(--accent-soft); border-left-color: var(--accent); }

.document { min-width: 0; }

.notice {
  position: relative;
  margin: 0 0 44px;
  padding: 19px 20px 19px 46px;
  border: 1px solid rgba(168,85,247,.2);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(168,85,247,.075), rgba(168,85,247,.025));
  color: #aaa5af;
  font-size: 13px;
}

.notice::before {
  content: "//";
  position: absolute;
  top: 18px;
  left: 18px;
  color: var(--accent-soft);
  font: 600 12px/1 "Cascadia Code", Consolas, monospace;
}

.document section {
  padding: 47px 0 9px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 86px;
}

.document section:first-of-type { border-top: 0; padding-top: 0; }

.section-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: .12em;
}

h2 {
  margin: 0 0 22px;
  color: #f6f4f7;
  font-size: clamp(25px, 3vw, 32px);
  font-weight: 560;
  letter-spacing: -.03em;
  line-height: 1.2;
}

h3 {
  margin: 31px 0 10px;
  color: #d8d4db;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

p { margin: 0 0 18px; color: #aaa5af; }
p strong, li strong { color: #dedbe1; font-weight: 600; }

.document a:not(.contact-link) {
  color: #d4a6ff;
  text-decoration-color: rgba(192,132,252,.35);
  text-underline-offset: 3px;
}

.document ul {
  margin: 0 0 21px;
  padding: 0;
  list-style: none;
}

.document li {
  position: relative;
  margin: 9px 0;
  padding-left: 23px;
  color: #aaa5af;
}

.document li::before {
  content: "›";
  position: absolute;
  left: 2px;
  top: -1px;
  color: var(--accent);
  font: 18px/1.72 "Cascadia Code", Consolas, monospace;
}

.legal-callout {
  margin: 25px 0;
  padding: 21px 22px;
  border-left: 2px solid var(--accent);
  background: #070608;
  color: #b4afb9;
}

.legal-callout p:last-child { margin-bottom: 0; }

.caps {
  color: #c5c0c9;
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: .015em;
}

.contact-card {
  margin-top: 24px;
  padding: 23px;
  border: 1px solid var(--line-bright);
  border-radius: 11px;
  background: var(--panel-raised);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  color: #bbb6c0;
}

.placeholder { color: #f0b8ff; }

.site-footer {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 25px 0 45px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--faint);
  font: 11px/1.5 "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-footer nav { display: flex; gap: 20px; }
.site-footer a { text-decoration: none; transition: color .18s ease; }
.site-footer a:hover { color: var(--accent-soft); }

.mobile-toc { display: none; }

@media (max-width: 840px) {
  .header-context { display: none; }
  .header-inner, .hero, .legal-shell, .site-footer { width: min(calc(100% - 30px), var(--max)); }
  .hero { padding-top: 62px; }
  .legal-shell { display: block; padding-top: 28px; }
  .toc { display: none; }
  .mobile-toc {
    display: block;
    width: 100%;
    margin-bottom: 36px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #050505;
    color: #c7c3ca;
    font: 12px/1.4 "Cascadia Code", Consolas, monospace;
  }
  .mobile-toc option { background: #050505; }
}

@media (max-width: 560px) {
  .header-inner { height: 62px; }
  .brand-word { display: none; }
  .header-link { padding: 7px 8px; font-size: 12px; }
  .hero { padding: 48px 0 42px; }
  .hero-copy { font-size: 16px; }
  .meta-row { align-items: flex-start; flex-direction: column; }
  .document section { padding-top: 39px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  body { background: #fff; color: #111; font-size: 11pt; }
  body::before, .reading-progress, .site-header, .toc, .mobile-toc, .site-footer { display: none !important; }
  .hero, .legal-shell { width: 100%; max-width: none; }
  .hero { padding: 0 0 25px; border-color: #bbb; }
  h1, h2, h3, p, li, .caps { color: #111 !important; }
  .legal-shell { display: block; padding: 30px 0; }
  .document section { break-inside: avoid; border-color: #ccc; }
  .notice, .legal-callout, .contact-card { background: transparent; border-color: #aaa; }
}
