@import url(https://fonts.bunny.net/css?family=ibm-plex-sans:400,500,600,700|jetbrains-mono:400,500,600,800);

:root {
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  --bg: #0e021c;
  --bg-deep: #090114;
  --rule: #2c1547;
  --text: #f2eefa;
  --text-muted: #c9c1da;
  --text-dim: #877ba0;
  --text-faint: #5c4f78;
  --accent: #9c60e0;
  --accent-bright: #b787f0;
  --green: #57f287;
  --yellow: #fee75c;
  --red: #ed4245;
  color: var(--text-muted);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: clip;
}
::selection { background: rgba(156, 96, 224, .4); color: #fff; }
a { color: var(--accent-bright); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .25em; }
button, input { font: inherit; }
code, pre, .nav-label, .search-button, .on-this-page h2, .code-head, .copy-button, .callout-label, .pager small, .status { font-family: var(--mono); }
code {
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--rule);
  padding: .05em .35em;
  font-size: .95em;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--rule); border: 4px solid transparent; background-clip: padding-box; border-radius: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }

.shell {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0 64px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  padding: 68px 0 38px;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin-bottom: 40px;
  color: var(--accent);
  font: 800 18px var(--mono);
  letter-spacing: -.04em;
}
.brand:hover { color: var(--accent-bright); text-decoration: none; }
.brand svg { width: 25px; height: 20px; }
.docs-nav { display: flex; flex-direction: column; gap: 10px; }
.nav-link, .search-button, .external-link {
  all: unset;
  display: block;
  cursor: pointer;
  color: var(--text-dim);
  font: 500 15px/1.4 "IBM Plex Sans", system-ui, sans-serif;
}
.nav-link:hover, .search-button:hover, .external-link:hover { color: var(--text); }
.nav-link.active { color: var(--accent); font-weight: 700; }
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.search-button { font-family: var(--mono); font-size: 12px; }
.external-link span { color: var(--accent); }

.main-wrap { min-width: 0; padding-bottom: 100px; }
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px) 160px;
  gap: 0 56px;
  align-items: start;
}
.doc { min-width: 0; }
.article-head { padding: 72px 0 68px; }
h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.08;
}
.deck {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--text-dim);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}
.doc section {
  padding: 60px 0 70px;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 20px;
}
.doc section > h2 {
  margin: 0 0 27px;
  color: var(--text);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.doc h3 {
  margin: 38px 0 14px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.02em;
}
p { margin: 0 0 21px; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 600; }
.lead { max-width: 740px; color: var(--text); font-size: 18px; line-height: 1.65; }
.doc ul, .doc ol { margin: 20px 0; padding-left: 25px; }
.doc li { margin: 8px 0; }
.doc li::marker { color: var(--text-faint); }

.on-this-page {
  position: sticky;
  top: 68px;
  padding-top: 76px;
}
.on-this-page h2 {
  margin: 0 0 14px;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.on-this-page a {
  display: block;
  padding: 5px 0;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.on-this-page a:hover { color: var(--text); text-decoration: none; }
.on-this-page .edit {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--text-dim);
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  margin-top: 32px;
}
.quick-card {
  position: relative;
  padding: 24px 36px 24px 0;
  border-top: 1px solid var(--rule);
  color: var(--text-muted);
}
.quick-card::after {
  content: "→";
  position: absolute;
  top: 23px;
  right: 0;
  color: var(--accent);
}
.quick-card:hover { text-decoration: none; }
.quick-card:hover strong { color: var(--accent-bright); }
.quick-card strong { display: block; color: var(--text); font-size: 18px; transition: color .15s; }
.quick-card span { display: block; margin-top: 5px; color: var(--text-dim); font-size: 14px; font-weight: 400; line-height: 1.5; }

.code-block {
  position: relative;
  max-width: 800px;
  margin: 28px 0;
  background: var(--bg-deep);
  border: 1px solid var(--rule);
}
.code-head {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 18px;
  border-bottom: 1px solid var(--rule);
  color: var(--text-faint);
  font-size: 11px;
}
.code-head .dots { display: none; }
.code-block pre {
  margin: 0;
  padding: 19px 22px;
  overflow-x: auto;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.65;
}
.code-block.headless pre { padding-right: 72px; }
.code-block code { padding: 0; border: 0; background: transparent; color: inherit; font-size: inherit; }
.code-block .prompt { color: var(--accent); font-weight: 800; }
.code-block .comment { color: var(--text-faint); }
.code-block .keyword { color: var(--accent-bright); }
.code-block .string { color: var(--green); }
.copy-button {
  position: absolute;
  right: 12px;
  top: 8px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 10px;
  cursor: pointer;
}
.copy-button:hover { color: var(--text); }

.callout {
  max-width: 800px;
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 2px solid var(--accent);
  background: var(--bg-deep);
}
.callout.warning { border-left-color: var(--yellow); }
.callout-label {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.callout.warning .callout-label { color: var(--yellow); }
.callout p { margin: 0; color: var(--text-dim); font-size: 14px; }

.steps { max-width: 800px; margin: 30px 0; counter-reset: step; border-top: 1px solid var(--rule); }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px 1fr;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.step::before { content: counter(step) "."; color: var(--text-faint); font-family: var(--mono); font-size: 12px; }
.step h3 { margin: 0 0 5px; }
.step p { margin: 0; color: var(--text-dim); font-size: 14px; }

.table-wrap { max-width: 800px; margin: 28px 0; overflow-x: auto; border: 1px solid var(--rule); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  color: var(--text-faint);
  background: var(--bg-deep);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}
th, td { padding: 13px 15px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th:last-child, td:last-child { border-right: 0; }
.status { white-space: nowrap; font-size: 11px; }
.status.yes { color: var(--green); }
.status.partial { color: var(--yellow); }
.status.no { color: var(--red); }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 42px;
  border-top: 1px solid var(--rule);
}
.pager a { min-height: 108px; padding: 22px 0; }
.pager a + a { text-align: right; }
.pager a:only-child { grid-column: 2; text-align: right; }
.pager a:hover { text-decoration: none; }
.pager small {
  display: block;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}
.pager strong { display: block; margin-top: 13px; color: var(--text-dim); font-size: 15px; }
.pager a:hover strong { color: var(--text); }

.search-modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: none;
  place-items: start center;
  padding: 14vh 20px 20px;
  background: rgba(9,1,20,.78);
  backdrop-filter: blur(4px);
}
.search-modal.open { display: grid; }
.search-panel {
  width: min(580px, 100%);
  border: 1px solid var(--rule);
  background: var(--bg);
  box-shadow: 0 24px 80px #050009;
}
.search-input {
  width: 100%;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  outline: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
}
.search-results { max-height: 360px; padding: 8px; overflow-y: auto; }
.search-result { display: block; padding: 11px 12px; }
.search-result:hover, .search-result:focus { background: var(--bg-deep); text-decoration: none; outline: 0; }
.search-result b { display: none; }
.search-result strong { display: block; color: var(--text); font-size: 14px; }
.search-result span span { display: block; color: var(--text-dim); font-size: 12px; font-weight: 400; }
.search-empty { padding: 26px; color: var(--text-dim); font-size: 13px; }

@media (max-width: 1040px) {
  .article-grid { grid-template-columns: minmax(0, 760px); }
  .on-this-page { display: none; }
}
@media (max-width: 900px) {
  .shell { display: block; padding-top: 44px; }
  .sidebar {
    position: static;
    max-height: none;
    padding: 0 0 20px;
    margin-bottom: 38px;
    border-bottom: 1px solid var(--rule);
  }
  .brand { margin-bottom: 22px; }
  .docs-nav { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; }
  .sidebar-links { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; padding-top: 16px; }
}
@media (max-width: 640px) {
  .shell { padding: 32px 18px 0; }
  .article-head { padding: 34px 0 54px; }
  .doc section { padding: 50px 0 58px; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-card { padding-right: 30px; }
  .pager { grid-template-columns: 1fr; }
  .pager a + a { border-top: 1px solid var(--rule); text-align: left; }
  .table-wrap { margin-left: -18px; margin-right: -18px; border-left: 0; border-right: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
