:root {
  --void: #000;
  --ink: #fff;
  --ash: #9a9a9a;
  --mist: #c4c4c4;
  --dim: #5e5e5e;
  --hair: rgba(255, 255, 255, 0.08);
  --fill: rgba(255, 255, 255, 0.055);
  --fill-2: rgba(255, 255, 255, 0.09);
  --card: #0b0b0d;
  --iris: #8052ff;
  --spark: #ffb829;
  --teal: #2fd3b0;
  --bad: #ff5d6c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
html, body { margin: 0; }

body {
  background: var(--void) radial-gradient(1100px 520px at 90% -10%, rgba(128, 82, 255, 0.14), transparent 60%) fixed;
  color: var(--ink);
  font: 400 15.5px/1.7 Inter, ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

a { color: #c6b3ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
  padding: 0 clamp(16px, 3vw, 32px);
  background: rgba(0, 0, 0, 0.82);
  border-bottom: 1px solid var(--hair);
}
@supports (backdrop-filter: blur(1px)) { .top { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(14px); } }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand svg { width: 24px; height: 24px; }
.brand span { font-size: 19px; letter-spacing: -0.04em; }
.brand em { font-style: normal; color: var(--ash); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 3px; }

.search { margin-left: auto; position: relative; width: min(340px, 50vw); }
.search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.search input:focus { border-color: rgba(128, 82, 255, 0.6); }
.search svg { position: absolute; left: 13px; top: 11px; width: 16px; height: 16px; stroke: var(--ash); fill: none; stroke-width: 2; }
.top .links { display: flex; gap: 6px; }
.top .links a { color: var(--ash); font-size: 14px; padding: 8px 12px; border-radius: 999px; }
.top .links a:hover { color: var(--ink); background: var(--fill); text-decoration: none; }
.menu { display: none; background: var(--fill); border: 0; color: var(--ink); width: 38px; height: 38px; border-radius: 999px; cursor: pointer; }

.wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); max-width: 1320px; margin: 0 auto; }

nav.side {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow-y: auto;
  padding: 28px 20px 40px clamp(16px, 3vw, 32px);
  border-right: 1px solid var(--hair);
}
nav.side h4 { margin: 22px 0 6px; color: var(--ash); font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
nav.side h4:first-child { margin-top: 0; }
nav.side a { display: block; padding: 5px 10px; margin: 0 -10px; border-radius: 8px; color: var(--mist); font-size: 14px; line-height: 1.45; }
nav.side a:hover { background: var(--fill); color: var(--ink); text-decoration: none; }
nav.side a.on { background: rgba(128, 82, 255, 0.16); color: #fff; }
nav.side a.hide { display: none; }

main { padding: 36px clamp(16px, 4vw, 64px) 120px; max-width: 900px; }

.hero { padding: 26px 0 30px; border-bottom: 1px solid var(--hair); margin-bottom: 10px; }
.eyebrow { margin: 0 0 12px; color: var(--spark); font-size: 13px; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; }
h1 { margin: 0 0 16px; font-size: clamp(38px, 5.6vw, 60px); line-height: 1.02; font-weight: 400; letter-spacing: -0.04em; }
.lead { margin: 0; color: var(--mist); font-size: 18px; font-weight: 300; max-width: 620px; }

section { padding-top: 34px; }
section.hide { display: none; }
h2 { margin: 0 0 12px; font-size: 28px; font-weight: 400; letter-spacing: -0.025em; }
h3 { margin: 30px 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
h2 a.anchor, h3 a.anchor { color: var(--dim); margin-left: 8px; font-weight: 400; opacity: 0; }
h2:hover a.anchor, h3:hover a.anchor { opacity: 1; text-decoration: none; }
p { margin: 0 0 14px; color: #e4e4e4; }
ul, ol { margin: 0 0 16px; padding-left: 22px; color: #e4e4e4; }
li { margin: 4px 0; }
strong { color: #fff; font-weight: 600; }

code { font: 400 0.86em/1.5 "JetBrains Mono", ui-monospace, monospace; background: var(--fill-2); padding: 2px 6px; border-radius: 6px; color: #e9e1ff; white-space: nowrap; }

.code { position: relative; margin: 0 0 18px; background: #070709; border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; }
.code .lang { position: absolute; top: 9px; left: 14px; color: var(--dim); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.code pre { margin: 0; padding: 32px 16px 16px; overflow-x: auto; font: 400 13px/1.65 "JetBrains Mono", ui-monospace, monospace; color: #dcdcdc; }
.code pre code { background: none; padding: 0; color: inherit; white-space: pre; font-size: inherit; }
.code button { position: absolute; top: 7px; right: 8px; height: 26px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--fill-2); color: var(--mist); font: 600 11.5px Inter, sans-serif; cursor: pointer; }
.code button:hover { color: #fff; }
.k { color: #c6b3ff; }
.s { color: #9fe3c9; }
.c { color: #6a6a6a; }
.n { color: #ffc966; }

.table { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--hair); border-radius: 14px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--ash); font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 12px 14px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
td { padding: 11px 14px; border-top: 1px solid var(--hair); vertical-align: top; color: #e2e2e2; }
tr:first-child td { border-top: 0; }
td:first-child { white-space: nowrap; }
td code { white-space: nowrap; }

.note { padding: 14px 16px; border-radius: 14px; margin: 0 0 18px; background: rgba(128, 82, 255, 0.1); color: #ddd2ff; font-size: 14.5px; }
.note.warn { background: rgba(255, 184, 41, 0.09); color: #ffdc94; }
.note strong { color: inherit; }

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 44px; margin: 0 0 18px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: rgba(128, 82, 255, 0.2); color: #d5c7ff; font-size: 13px; font-weight: 600; display: grid; place-items: center; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 24px 0 6px; }
.cards a { display: block; padding: 18px; border-radius: 16px; border: 1px solid var(--hair); background: var(--card); color: var(--ink); }
.cards a:hover { border-color: rgba(128, 82, 255, 0.5); text-decoration: none; }
.cards b { display: block; font-weight: 600; margin-bottom: 4px; }
.cards span { color: var(--ash); font-size: 13.5px; }

kbd { display: inline-block; min-width: 1.8em; padding: 0 7px; border-radius: 7px; background: var(--fill-2); border: 1px solid var(--hair); font: 600 0.82em/1.7 Inter, sans-serif; text-align: center; }

.empty { display: none; padding: 40px 0; color: var(--ash); }
body.searching .hero { display: none; }

footer { margin-top: 60px; padding-top: 20px; border-top: 1px solid var(--hair); color: var(--dim); font-size: 13px; }

@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  main { min-width: 0; }
  p code, li code { white-space: normal; overflow-wrap: anywhere; }
  .brand em { display: none; }
  .top { gap: 12px; }
  nav.side { display: none; position: fixed; inset: 68px 0 0; z-index: 9; background: #050506; border: 0; width: 100%; height: auto; }
  body.nav nav.side { display: block; }
  .menu { display: grid; place-items: center; }
  .top .links { display: none; }
  .search { width: auto; flex: 1; }
}
