:root {
  color-scheme: dark;
  --bg: #11100e;
  --panel: #191713;
  --panel-2: #232018;
  --ink: #f3ead7;
  --muted: #b9ad96;
  --faint: #7d735f;
  --line: rgba(243, 234, 215, 0.12);
  --line-strong: rgba(243, 234, 215, 0.2);
  --gold: #f0c95a;
  --green: #72c6a3;
  --shadow: rgba(0, 0, 0, 0.36);
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(240, 201, 90, 0.08), transparent 34rem),
    linear-gradient(180deg, #0e0d0b 0%, var(--bg) 42rem);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; }
code {
  padding: 0.12rem 0.34rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 0.92em;
}
pre {
  margin: 1rem 0;
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0a09;
}
pre code { padding: 0; border: 0; background: transparent; }
.skip-link {
  position: fixed;
  left: 1rem;
  top: 0.75rem;
  z-index: 30;
  transform: translateY(-200%);
  padding: 0.45rem 0.7rem;
  border-radius: 7px;
  background: var(--gold);
  color: #20180a;
}
.skip-link:focus-visible { transform: translateY(0); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 66px;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 16, 14, 0.92);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 750;
}
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand span { font-size: 1.05rem; }
.toplinks {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.toplinks a {
  padding: 0.52rem 0.72rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}
.toplinks a:hover,
.toplinks a:focus-visible,
.toplinks a[aria-current="page"] {
  color: var(--gold);
  background: rgba(240, 201, 90, 0.1);
  outline: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  min-height: calc(100dvh - 66px);
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
}
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
h1 {
  max-width: 11ch;
  margin: 0 0 1rem;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-wrap: balance;
}
.hero-copy,
.lead,
.section-head p,
.proof p,
.step p,
.doc-content p {
  text-wrap: pretty;
}
.hero-copy {
  max-width: 44rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
  text-decoration: none;
  touch-action: manipulation;
}
.button.primary {
  border-color: rgba(240, 201, 90, 0.42);
  color: #20180a;
  background: var(--gold);
}
.button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hero-art {
  position: relative;
  min-height: 460px;
  display: grid;
  place-items: center;
}
.hero-art::before {
  content: "";
  position: absolute;
  width: min(86%, 430px);
  aspect-ratio: 1;
  border: 1px solid rgba(240, 201, 90, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(240, 201, 90, 0.08);
}
.hero-art img {
  position: relative;
  width: auto;
  height: min(76%, 340px);
  max-width: 42%;
  object-fit: contain;
  transform: translateY(0);
  filter: drop-shadow(0 28px 60px var(--shadow));
}

.band {
  border-top: 1px solid var(--line);
  padding: 4.5rem 1.5rem;
}
.band-inner { max-width: 1120px; margin: 0 auto; }
.section-head { max-width: 760px; margin-bottom: 2rem; }
.section-head h2,
.doc-content h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}
.section-head p { margin: 0; color: var(--muted); font-size: 1.08rem; }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.proof {
  min-height: 190px;
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.035);
  border-right: 1px solid var(--line);
}
.proof:last-child { border-right: 0; }
.proof strong { display: block; margin-bottom: 0.55rem; color: var(--gold); font-size: 1.05rem; }
.proof p { margin: 0; color: var(--muted); }
.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}
.step { padding: 1rem; background: var(--panel); }
.step span {
  display: block;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}
.step strong { display: block; margin-bottom: 0.4rem; color: var(--ink); }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.docs-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr) 250px;
  min-height: calc(100dvh - 66px);
}
.side,
.toc {
  position: sticky;
  top: 66px;
  height: calc(100dvh - 66px);
  overflow-y: auto;
  border-color: var(--line);
  background: rgba(25, 23, 19, 0.72);
}
.side { border-right: 1px solid var(--line); padding: 1rem; }
.toc { border-left: 1px solid var(--line); padding: 1.15rem; }
.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc li { margin: 0; }
.toc ul ul {
  margin-left: 0.65rem;
  padding-left: 0.6rem;
  border-left: 1px solid var(--line);
}
.side h2,
.toc h2 {
  margin: 0.8rem 0 0.7rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
}
.side a,
.toc a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
}
.side a:hover,
.side a:focus-visible,
.toc a:hover,
.toc a:focus-visible,
.side .active {
  color: var(--gold);
  background: rgba(240, 201, 90, 0.08);
  outline: none;
}
.doc-content {
  max-width: 920px;
  width: 100%;
  padding: 2.2rem clamp(1.25rem, 4vw, 3rem) 5rem;
}
.doc-content h1 {
  max-width: 14ch;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
}
.doc-content h2 {
  margin-top: 3rem;
  padding-top: 0.5rem;
  scroll-margin-top: 90px;
}
.doc-content h3 { margin: 1.4rem 0 0.4rem; color: var(--gold); scroll-margin-top: 90px; }
.lead { max-width: 760px; color: var(--muted); font-size: 1.16rem; }
.callout {
  margin: 1.4rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(240, 201, 90, 0.22);
  border-radius: 8px;
  background: rgba(240, 201, 90, 0.1);
}
.doc-content table {
  width: 100%;
  margin: 1rem 0 1.4rem;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.doc-content th,
.doc-content td {
  padding: 0.85rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.doc-content th {
  color: var(--gold);
  background: rgba(240, 201, 90, 0.1);
}
.doc-content td { color: var(--muted); }
.doc-content td:first-child { color: var(--ink); font-weight: 700; }
.doc-index {
  display: grid;
  gap: 1px;
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}
.doc-index a {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--panel);
  text-decoration: none;
}
.doc-index strong { color: var(--ink); }
.doc-index span { color: var(--muted); }

@media (max-width: 1040px) {
  .docs-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .toc { display: none; }
  .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof:nth-child(2) { border-right: 0; }
  .proof:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .flow { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 0.9rem; }
  .toplinks a { padding: 0.45rem 0.5rem; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-art { min-height: 360px; }
  .hero-art::before { width: min(88%, 360px); }
  .hero-art img {
    width: auto;
    height: min(74%, 280px);
    max-width: 42%;
    transform: translateY(0);
  }
  .docs-shell { display: block; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .doc-content { padding-top: 1.4rem; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof { border-right: 0; border-bottom: 1px solid var(--line); }
  .proof:last-child { border-bottom: 0; }
}
