/* NODAL documentation — a buildless, three-column manual. */
.docs-page {
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(199, 248, 120, .06), transparent 60%),
    var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Header ------------------------------------------------------------------ */
.docs-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 18, 15, .92);
  backdrop-filter: blur(14px);
}
.docs-header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.docs-header .brand { flex: 0 0 auto; }
.docs-header .brand-name { font-size: 23px; letter-spacing: -1px; }
.docs-header .brand-icon { width: 24px; height: 24px; }
.docs-brand-suffix {
  margin-left: 4px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font: 9px/1 var(--mono);
  letter-spacing: 1.2px;
}
.docs-header-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}
.docs-header-nav a {
  color: #c3c8bd;
  font-size: 13px;
  padding: 10px 0;
  transition: color .18s;
}
.docs-header-nav a:hover { color: var(--acid); }
.docs-header-nav a.is-active {
  color: var(--acid);
  border-bottom: 1px solid var(--acid);
}
.docs-header-actions { display: flex; align-items: center; gap: 14px; }
.docs-menu-toggle {
  display: none;
  width: 42px; height: 42px;
  padding: 11px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
}
.docs-menu-toggle span { display: block; height: 1px; background: var(--ink); margin: 4px 0; }
.docs-menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.docs-menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Shell ------------------------------------------------------------------- */
.docs-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 208px;
  gap: 52px;
  align-items: start;
  padding-top: 44px;
  padding-bottom: 104px;
}

/* Sidebar ----------------------------------------------------------------- */
.docs-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.docs-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.docs-search-icon {
  position: absolute;
  left: 12px;
  width: 15px; height: 15px;
  color: var(--muted);
  pointer-events: none;
}
.docs-search input {
  width: 100%;
  min-height: 42px;
  padding: 10px 40px 10px 35px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
}
.docs-search input::placeholder { color: #7f8878; }
.docs-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.docs-search-key {
  position: absolute;
  right: 10px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font: 9px/1.6 var(--mono);
  pointer-events: none;
}
.docs-search-count,
.docs-search-empty {
  margin: 0 0 10px;
  color: var(--muted);
  font: 9px/1.6 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.docs-search-empty { color: #c9a86a; }
.docs-nav-group { margin-bottom: 24px; }
.docs-nav-group-title {
  margin: 0 0 8px;
  color: #818b78;
  font: 9px/1.6 var(--mono);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.docs-nav-list { list-style: none; margin: 0; padding: 0; }
.docs-nav-list a {
  display: block;
  padding: 7px 10px;
  border-left: 1px solid var(--line);
  color: #b9c0b2;
  font-size: 12.5px;
  line-height: 1.5;
  transition: color .16s, border-color .16s, background .16s;
}
.docs-nav-list a:hover { color: var(--ink); background: rgba(255, 255, 255, .025); }
.docs-nav-list a.is-active {
  color: var(--acid);
  border-left-color: var(--acid);
  background: rgba(199, 248, 120, .05);
}

/* Article ----------------------------------------------------------------- */
.docs-main { min-width: 0; }
.docs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: #7f8878;
  font: 9px/1.6 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.docs-breadcrumb a:hover { color: var(--acid); }
.docs-breadcrumb strong { color: #b6bdad; font-weight: 500; }
.docs-eyebrow {
  margin: 0 0 12px;
  color: var(--acid);
  font: 9px/1.6 var(--mono);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.docs-article h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 3.1vw, 42px);
  line-height: 1.1;
  letter-spacing: -.04em;
  font-weight: 600;
}
.docs-summary {
  margin: 0 0 38px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  color: #aeb6a5;
  font-size: 16px;
  line-height: 1.75;
}
.docs-body { font-size: 14.5px; line-height: 1.78; color: #c4cabe; }
.docs-body > *:first-child { margin-top: 0; }
.docs-body h2 {
  margin: 52px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -.02em;
  scroll-margin-top: 96px;
}
.docs-body h3 {
  margin: 30px 0 10px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.4;
  scroll-margin-top: 96px;
}
.docs-body p { margin: 0 0 16px; }
.docs-body strong { color: var(--ink); font-weight: 600; }
.docs-body em { color: #d7ddcf; }
.docs-body a {
  color: var(--acid);
  border-bottom: 1px solid rgba(199, 248, 120, .35);
}
.docs-body a:hover { border-bottom-color: var(--acid); }
.docs-body ul,
.docs-body ol { margin: 0 0 18px; padding-left: 22px; }
.docs-body li { margin: 6px 0; }
.docs-body li::marker { color: #7f8878; }
.docs-body code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #1b1f19;
  color: #dbe7c9;
  font: 12px/1.6 var(--mono);
  word-break: break-word;
}
.docs-body pre code { padding: 0; border: 0; background: none; color: inherit; font-size: 12.5px; }
.docs-body hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

.docs-code {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #141712;
  overflow: hidden;
}
.docs-code figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  color: #8b9581;
  font: 9px/1.6 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.docs-copy {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: #aeb6a5;
  font: 9px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 8px;
  cursor: pointer;
}
.docs-copy:hover { color: var(--acid); border-color: #5a664c; }
.docs-code pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  color: #d7e6c4;
  font: 12.5px/1.7 var(--mono);
  tab-size: 2;
}

.docs-callout {
  margin: 22px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid #7f8878;
  border-radius: 4px;
  background: var(--panel);
}
.docs-callout strong {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #c9d0bf;
}
.docs-callout p { margin: 0; font-size: 13.5px; }
.docs-callout-info { border-left-color: var(--acid); }
.docs-callout-warn { border-left-color: #e0b463; background: #1e1c15; }
.docs-callout-warn strong { color: #e9c88a; }
.docs-callout-success { border-left-color: #8fd18a; }

.docs-table-scroll { margin: 22px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 5px; }
.docs-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.docs-body th,
.docs-body td { padding: 10px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.docs-body th {
  background: #1b1f18;
  color: #aeb6a5;
  font: 9px/1.5 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.docs-body tr:last-child td { border-bottom: 0; }
.docs-body td code { white-space: nowrap; }

.docs-steps { list-style: none; margin: 24px 0; padding: 0; counter-reset: docs-step; }
.docs-steps li {
  position: relative;
  margin: 0 0 22px;
  padding: 0 0 0 46px;
  counter-increment: docs-step;
}
.docs-steps li::before {
  content: counter(docs-step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 1px;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 1px solid #4a5540;
  border-radius: 50%;
  color: var(--acid);
  font: 10px/1 var(--mono);
}
.docs-steps h3 { margin: 3px 0 6px; font-size: 15.5px; }
.docs-steps p { margin: 0; font-size: 13.5px; color: #aeb6a5; }

.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.docs-cards article {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
}
.docs-cards h3 { margin: 0 0 6px; font-size: 14px; }
.docs-cards p { margin: 0 0 10px; font-size: 12.5px; color: #aeb6a5; }
.docs-card-link { margin-top: auto; font: 10px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; border-bottom: 0 !important; }

.docs-kv {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  margin: 22px 0;
  border-top: 1px solid var(--line);
}
.docs-kv dt,
.docs-kv dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.docs-kv dt { color: #9aa391; font-size: 12.5px; }
.docs-kv dd { color: #c4cabe; font-size: 13px; }

/* Pager ------------------------------------------------------------------- */
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 64px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.docs-pager-link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color .18s, background .18s;
}
.docs-pager-link:hover { border-color: #5a664c; background: rgba(255, 255, 255, .02); }
.docs-pager-link span { color: var(--muted); font: 9px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.docs-pager-link strong { color: var(--ink); font-size: 13px; font-weight: 500; }
.docs-pager-next { text-align: right; align-items: flex-end; }
.docs-pager-link[hidden] { display: none; }

/* TOC --------------------------------------------------------------------- */
.docs-toc {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}
.docs-toc-title {
  margin: 0 0 10px;
  color: #818b78;
  font: 9px/1.6 var(--mono);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.docs-toc-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.docs-toc-list a {
  display: block;
  padding: 6px 0 6px 12px;
  color: #9fa896;
  font-size: 11.5px;
  line-height: 1.5;
  transition: color .16s;
}
.docs-toc-list a:hover { color: var(--acid); }

.docs-footer { margin-top: 0; }
.docs-footer .footer-brand { font-size: 56px; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1180px) {
  .docs-shell { grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
  .docs-toc { display: none; }
}
@media (max-width: 900px) {
  .docs-header-nav { display: none; }
  .docs-menu-toggle { display: block; }
  .docs-shell { display: block; padding-top: 26px; }
  .docs-sidebar {
    position: fixed;
    z-index: 60;
    top: 0; left: 0; bottom: 0;
    width: min(330px, 86vw);
    max-height: none;
    padding: 24px 18px 40px;
    background: var(--panel);
    border-right: 1px solid var(--line);
    transform: translateX(-102%);
    transition: transform .24s ease;
    overflow-y: auto;
  }
  .docs-sidebar.is-open { transform: translateX(0); }
  .docs-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    border: 0;
    background: rgba(0, 0, 0, .55);
    cursor: pointer;
  }
  .docs-main { max-width: 760px; margin-inline: auto; }
  .docs-article h1 { font-size: 32px; }
  .docs-body h2 { margin-top: 42px; }
  .docs-footer .footer-brand { font-size: 64px; }
  body.docs-drawer-open { overflow: hidden; }
}
@media (max-width: 560px) {
  .docs-header-inner { gap: 14px; min-height: 64px; }
  .docs-brand-suffix { display: none; }
  .docs-header-actions { margin-left: auto; }
  .docs-header .brand-name { font-size: 21px; }
  .docs-shell { padding-bottom: 70px; }
  .docs-summary { font-size: 15px; }
  .docs-body { font-size: 14px; }
  .docs-kv { grid-template-columns: 1fr; border-top: 0; }
  .docs-kv dt { border-bottom: 0; padding-bottom: 0; }
  .docs-pager { grid-template-columns: 1fr; }
  .docs-pager-next { text-align: left; align-items: flex-start; }
  .docs-footer .footer-brand { font-size: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .docs-sidebar, .docs-nav-list a, .docs-copy { transition: none; }
}
