/* ==========================================================================
   llm-router /docs -- generated documentation theme.
   Hand-authored, deliberately dependency free: the builder copies this file
   verbatim into site/docs/assets/, so it must work with no build step.
   Tokens mirror landing/index.html so the two halves feel like one product.
   ========================================================================== */
:root {
  --bg: #05070a;
  --bg-grad: #070b11;
  --panel: #0a0e14;
  --panel-2: #0d131a;
  --line: #1a232e;
  --line-soft: #131a23;
  --fg: #c6d3df;
  --fg-dim: #8492a3;
  --fg-faint: #5a6778;
  --mint: #00e59b;
  --blue: #5aa9ff;
  --amber: #ffb44a;
  --purple: #c792ea;
  --red: #ff6f6f;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas,
    "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --r: 10px;
  --wrap: 1180px;
  --nav-h: 58px;
  --side-w: 272px;
  --toc-w: 228px;
  --code-bg: #080c11;
  --shadow: 0 18px 46px -22px rgba(0, 0, 0, 0.85);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.026) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 76%);
  -webkit-mask-image: radial-gradient(
    120% 80% at 50% 0%,
    #000 20%,
    transparent 76%
  );
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
      720px 380px at 8% -8%,
      rgba(0, 229, 155, 0.1),
      transparent 62%
    ),
    radial-gradient(
      640px 360px at 96% 2%,
      rgba(90, 169, 255, 0.08),
      transparent 60%
    );
}

.mono {
  font-family: var(--mono);
  font-variant-ligatures: none;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 90;
  padding: 8px 14px;
  border: 1px solid var(--mint);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--mint);
  font-family: var(--mono);
  font-size: 12.5px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip:focus {
  top: 10px;
}

a {
  color: var(--blue);
  text-decoration-color: rgba(90, 169, 255, 0.35);
  text-underline-offset: 3px;
}

a:hover {
  color: #8cc6ff;
  text-decoration-color: currentColor;
}

:where(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================ topbar */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--nav-h);
  background: rgba(5, 7, 10, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: #fff;
}

.brand svg {
  flex: 0 0 auto;
}

.brand .dash {
  color: var(--mint);
}

.brand-docs {
  color: var(--fg-faint);
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* ---- search */
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: clamp(150px, 30vw, 320px);
}

.search[hidden] {
  display: none;
}

.search-icon {
  position: absolute;
  left: 9px;
  color: var(--fg-faint);
  font-size: 13px;
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 32px;
  padding: 0 34px 0 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.9);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 12.5px;
}

.search input::placeholder {
  color: var(--fg-faint);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: linear-gradient(45deg, transparent 42%, var(--fg-faint) 42%,
      var(--fg-faint) 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, var(--fg-faint) 42%,
      var(--fg-faint) 58%, transparent 58%);
  cursor: pointer;
}

.search kbd {
  position: absolute;
  right: 8px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 15px;
  pointer-events: none;
}

.search input:focus + kbd,
.search.busy kbd {
  opacity: 0;
}

.results {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 70;
  width: min(520px, calc(100vw - 28px));
  max-height: min(64vh, 460px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #080c12;
  box-shadow: var(--shadow);
}

.results[hidden] {
  display: none;
}

.res {
  display: block;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--fg);
  text-decoration: none;
}

.res:hover,
.res.on {
  border-color: var(--line);
  background: var(--panel-2);
}

.res-t {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #dbe6f1;
}

.res-s {
  display: block;
  margin-top: 1px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.res-x {
  display: block;
  margin-top: 4px;
  color: var(--fg-dim);
  font-size: 12.5px;
  line-height: 1.5;
}

.res mark,
.res-x mark {
  background: rgba(0, 229, 155, 0.18);
  color: var(--mint);
  border-radius: 2px;
  padding: 0 1px;
}

.res-foot {
  padding: 7px 10px 4px;
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 11px;
}

.res.none {
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 12.5px;
}

/* ---- version select + repo button */
.vselect {
  position: relative;
  display: flex;
  align-items: center;
}

.vselect::after {
  content: "";
  position: absolute;
  right: 10px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--mint);
  border-bottom: 1.5px solid var(--mint);
  transform: rotate(45deg) translateY(-2px);
  pointer-events: none;
}

.vselect select {
  -webkit-appearance: none;
  appearance: none;
  height: 32px;
  padding: 0 26px 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.9);
  color: var(--mint);
  font-family: var(--mono);
  font-size: 12.5px;
  cursor: pointer;
}

.vselect select:hover {
  border-color: #263546;
  color: #4ff3b6;
}

.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.9);
  color: var(--fg-dim);
  text-decoration: none;
}

.iconbtn:hover {
  border-color: #263546;
  color: var(--fg);
}

.burger {
  display: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.9);
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.burger:hover {
  color: var(--mint);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(3, 5, 8, 0.72);
  backdrop-filter: blur(2px);
}

.scrim[hidden] {
  display: none;
}

/* ============================================================ shell */
.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  gap: 0;
  max-width: 1600px;
  margin: 0 auto;
  padding-top: var(--nav-h);
}

.sidebar {
  position: sticky;
  top: var(--nav-h);
  align-self: start;
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 20px 12px 28px 16px;
  border-right: 1px solid var(--line-soft);
  scrollbar-width: thin;
  scrollbar-color: #1e2833 transparent;
}

.sidebar::-webkit-scrollbar {
  width: 9px;
}

.sidebar::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 8px;
  background: #1e2833;
  background-clip: padding-box;
}

.side-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.side-v {
  font-size: 13px;
  color: var(--fg);
  font-weight: 600;
}

.side-tag {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.side-tag.live {
  border-color: rgba(0, 229, 155, 0.35);
  background: rgba(0, 229, 155, 0.08);
  color: var(--mint);
}

.side-tag.old {
  border-color: rgba(255, 180, 74, 0.28);
  background: rgba(255, 180, 74, 0.07);
  color: var(--amber);
}

.side-hub {
  display: block;
  margin-bottom: 16px;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(13, 19, 26, 0.6);
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
}

.side-hub:hover {
  border-color: var(--line);
  color: var(--mint);
}

.nav-sec {
  margin-bottom: 4px;
}

.nav-sec-title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav-sec-title a {
  display: block;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--fg-faint);
  text-decoration: none;
}

.nav-sec-title a:hover {
  color: var(--blue);
}

.nav-sec ul {
  margin: 2px 0 10px;
  padding: 0 0 0 8px;
  border-left: 1px solid var(--line-soft);
  list-style: none;
}

.nav-sec:not(.open) ul {
  display: none;
}

.nav-sec li a {
  display: block;
  padding: 4px 8px;
  border-radius: 5px;
  color: var(--fg-dim);
  font-size: 13.2px;
  line-height: 1.45;
  text-decoration: none;
}

.nav-sec li a:hover {
  background: rgba(90, 169, 255, 0.07);
  color: var(--fg);
}

.nav-sec li a.active {
  background: rgba(0, 229, 155, 0.09);
  box-shadow: inset 2px 0 0 var(--mint);
  color: var(--mint);
  font-weight: 600;
}

.side-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.side-foot a {
  color: var(--fg-faint);
  font-size: 12px;
  text-decoration: none;
}

.side-foot a:hover {
  color: var(--mint);
}

/* ---- main column */
.main {
  min-width: 0;
  padding: 26px 34px 0;
}

.main > * {
  max-width: 900px;
}

.foot {
  margin-top: 46px;
  padding: 16px 0 26px;
  border-top: 1px solid var(--line-soft);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
  color: var(--fg-faint);
  font-size: 11.5px;
}

.foot-inner a {
  color: var(--fg-dim);
  text-decoration: none;
}

.foot-inner a:hover {
  color: var(--mint);
}

/* ---- right toc */
.dtoc {
  position: sticky;
  top: var(--nav-h);
  align-self: start;
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 30px 18px 28px 6px;
  scrollbar-width: thin;
}

.toc-title {
  margin: 0 0 8px;
  color: var(--fg-faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc-body ul {
  margin: 0;
  padding: 0 0 0 10px;
  border-left: 1px solid var(--line-soft);
  list-style: none;
}

.toc-body ul ul {
  padding-left: 9px;
}

.toc-body li a {
  display: block;
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--fg-faint);
  font-size: 12.3px;
  line-height: 1.42;
  text-decoration: none;
}

.toc-body li a:hover {
  color: var(--fg);
}

.toc-body li a.on {
  color: var(--mint);
  font-weight: 600;
}

.dtoc-empty {
  margin: 0;
  color: var(--fg-faint);
  font-size: 12px;
}

/* ---- breadcrumb ------------------------------------------------------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.crumbs a {
  color: var(--fg-dim);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--mint);
}

.crumbs .sep {
  color: var(--line);
}

.crumbs em {
  color: var(--fg);
  font-style: normal;
}

/* ---- prose ------------------------------------------------------------ */
.prose {
  font-size: 15.5px;
  overflow-wrap: break-word;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  scroll-margin-top: calc(var(--nav-h) + 18px);
  color: #e6eef7;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.prose h1 {
  margin: 0 0 18px;
  font-size: 30px;
}

.prose h2 {
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 21.5px;
}

.prose h3 {
  margin: 30px 0 10px;
  font-size: 17.5px;
}

.prose h4 {
  margin: 22px 0 8px;
  color: var(--fg);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.prose h2 code,
.prose h3 code,
.prose h4 code {
  font-size: 0.94em;
}

.prose p {
  margin: 0 0 15px;
}

.prose ul,
.prose ol {
  margin: 0 0 15px;
  padding-left: 22px;
}

.prose li {
  margin: 5px 0;
}

.prose li > ul,
.prose li > ol {
  margin: 5px 0 0;
}

.prose li::marker {
  color: var(--fg-faint);
}

.prose strong {
  color: #dde7f1;
  font-weight: 650;
}

.prose em {
  color: var(--fg);
}

.prose abbr[title] {
  border-bottom: 1px dotted var(--fg-faint);
  text-decoration: none;
}

.prose a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(90, 169, 255, 0.28);
}

.prose a:hover {
  color: var(--mint);
  border-bottom-color: rgba(0, 229, 155, 0.55);
}

.prose code {
  padding: 0.1em 0.38em;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: rgba(13, 19, 26, 0.9);
  color: #9fe8cd;
  font-family: var(--mono);
  font-size: 0.87em;
}

.prose a code {
  color: inherit;
  border-color: rgba(90, 169, 255, 0.3);
}

.prose kbd {
  padding: 0.1em 0.42em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.82em;
}

.headerlink {
  margin-left: 0.4em;
  color: var(--line);
  font-weight: 400;
  text-decoration: none;
  border: 0 !important;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.prose h1:hover .headerlink,
.prose h2:hover .headerlink,
.prose h3:hover .headerlink,
.prose h4:hover .headerlink,
.headerlink:focus-visible {
  opacity: 1;
  color: var(--mint);
}

/* ---- code blocks ----------------------------------------------------- */
.prose .codehilite {
  position: relative;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--code-bg);
  box-shadow: var(--shadow);
  overflow-x: auto;
  scrollbar-width: thin;
}

.prose .codehilite pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.62;
  tab-size: 4;
}

.prose .codehilite code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

.prose .codehilite::-webkit-scrollbar {
  height: 9px;
}

.prose .codehilite::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: #1e2833;
}

.copy {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(13, 19, 26, 0.92);
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.prose .codehilite:hover .copy,
.copy:focus-visible {
  opacity: 1;
}

.copy:hover {
  color: var(--mint);
  border-color: rgba(0, 229, 155, 0.45);
}

.copy.done {
  color: var(--mint);
  border-color: rgba(0, 229, 155, 0.45);
  opacity: 1;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
}

/* ---- quotes, admonitions, rules ------------------------------------- */
.prose blockquote {
  margin: 0 0 18px;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--line);
  color: var(--fg-dim);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose .admonition {
  margin: 0 0 18px;
  padding: 12px 16px 12px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--r) var(--r) 0;
  background: linear-gradient(
    180deg,
    rgba(90, 169, 255, 0.07),
    rgba(90, 169, 255, 0.02)
  );
  font-size: 14.6px;
}

.prose .admonition-title,
.prose .admonition .admonition-title {
  margin: 0 0 6px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.prose .admonition > *:last-child {
  margin-bottom: 0;
}

.prose .admonition.note {
  border-left-color: var(--blue);
}

.prose .admonition.warning,
.prose .admonition.caution,
.prose .admonition.danger,
.prose .admonition.error {
  border-left-color: var(--amber);
  background: linear-gradient(
    180deg,
    rgba(255, 180, 74, 0.075),
    rgba(255, 180, 74, 0.02)
  );
}

.prose .admonition.warning .admonition-title,
.prose .admonition.caution .admonition-title,
.prose .admonition.danger .admonition-title,
.prose .admonition.error .admonition-title {
  color: var(--amber);
}

.prose .admonition.tip,
.prose .admonition.hint,
.prose .admonition.important {
  border-left-color: var(--mint);
  background: linear-gradient(
    180deg,
    rgba(0, 229, 155, 0.07),
    rgba(0, 229, 155, 0.02)
  );
}

.prose .admonition.tip .admonition-title,
.prose .admonition.hint .admonition-title,
.prose .admonition.important .admonition-title {
  color: var(--mint);
}

.prose hr {
  margin: 30px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

/* ---- tables ---------------------------------------------------------- */
.tablewrap {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: auto;
  scrollbar-width: thin;
}

.tablewrap table {
  margin: 0;
  border: 0;
}

.prose table {
  width: 100%;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-collapse: collapse;
  font-size: 13.6px;
}

.prose thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-2);
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 10.8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.prose th,
.prose td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.prose tbody tr:nth-child(even) {
  background: rgba(10, 14, 20, 0.62);
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

.prose td code {
  white-space: nowrap;
}

/* ---- definition lists (options, env vars) --------------------------- */
.prose dl {
  margin: 0 0 18px;
  padding: 0;
}

.prose dt {
  margin-top: 12px;
  color: #dce7f2;
  font-family: var(--mono);
  font-size: 13.4px;
  font-weight: 600;
}

.prose dd {
  margin: 3px 0 0 0;
  padding-left: 14px;
  border-left: 1px solid var(--line-soft);
  color: var(--fg-dim);
  font-size: 14.4px;
}

/* ---- pager ----------------------------------------------------------- */
.pager {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 34px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line-soft);
}

.pager:empty {
  display: none;
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel), rgba(8, 12, 17, 0.6));
  text-decoration: none;
  transition: border-color 0.14s ease, transform 0.14s ease;
}

.pager a:hover {
  border-color: rgba(0, 229, 155, 0.4);
  transform: translateY(-1px);
}

.pager .next {
  align-items: flex-end;
  text-align: right;
}

.pager .dir {
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pager .pt {
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
}

.pager a:hover .pt {
  color: var(--mint);
}

/* ---- page footer meta ------------------------------------------------ */
.doc-meta {
  margin-top: 26px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: rgba(10, 14, 20, 0.5);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12.4px;
  line-height: 1.7;
}

.meta-k {
  min-width: 92px;
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.doc-meta a {
  color: var(--fg-dim);
  text-decoration: none;
}

.doc-meta a:hover {
  color: var(--mint);
}

.doc-meta .hint {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
  color: var(--fg-faint);
  font-size: 11.8px;
  line-height: 1.6;
}

/* ---- version hub ----------------------------------------------------- */
.hub-hero {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-soft);
}

.hub-hero h1 {
  margin: 6px 0 10px;
  font-size: clamp(27px, 4.4vw, 40px);
  letter-spacing: -0.025em;
  color: #eaf2fa;
}

.eyebrow {
  margin: 0;
  color: var(--mint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.lede {
  margin: 0 0 14px;
  max-width: 720px;
  color: var(--fg-dim);
  font-size: 16.5px;
}

.vline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 18px;
}

.vchip {
  padding: 3px 9px;
  border: 1px solid rgba(0, 229, 155, 0.4);
  border-radius: 999px;
  background: rgba(0, 229, 155, 0.08);
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
}

.vmeta {
  color: var(--fg-faint);
  font-size: 12.2px;
}

.vmeta code {
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 11.6px;
}

.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 12.4px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: border-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  border-color: rgba(0, 229, 155, 0.42);
  background: linear-gradient(
    180deg,
    rgba(0, 229, 155, 0.16),
    rgba(0, 229, 155, 0.05)
  );
  color: #7ff2cb;
}

.btn.primary:hover {
  border-color: var(--mint);
  color: var(--mint);
}

.btn.ghost:hover {
  border-color: rgba(90, 169, 255, 0.45);
  color: var(--blue);
}

.hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 26px;
  align-items: start;
  padding-top: 26px;
}

#sections {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.sec-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}

.sec-card {
  display: flex;
  flex-direction: column;
  padding: 16px 17px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel), rgba(8, 12, 17, 0.55));
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.sec-card:hover {
  border-color: rgba(0, 229, 155, 0.32);
  transform: translateY(-2px);
}

.sec-card h2 {
  margin: 0 0 6px;
  font-size: 15.5px;
  letter-spacing: -0.005em;
}

.sec-card h2 a {
  color: #e6eef7;
  text-decoration: none;
}

.sec-card h2 a:hover {
  color: var(--mint);
}

.sec-card > p {
  margin: 0 0 11px;
  color: var(--fg-dim);
  font-size: 13.4px;
  line-height: 1.6;
}

.sec-card ul {
  margin: 0;
  padding: 10px 0 0;
  border-top: 1px dashed var(--line-soft);
  list-style: none;
}

.sec-card li {
  margin: 0;
  padding: 2px 0;
}

.sec-card li a {
  display: block;
  padding: 2px 0 2px 13px;
  color: var(--fg-dim);
  font-size: 13.1px;
  text-decoration: none;
  position: relative;
}

.sec-card li a::before {
  content: "\203A";
  position: absolute;
  left: 1px;
  color: var(--fg-faint);
}

.sec-card li a:hover {
  color: var(--blue);
}

.sec-card .more {
  margin-top: 9px;
  color: var(--fg-faint);
  font-size: 11.4px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.sec-card .more:hover {
  color: var(--mint);
}

.hub-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.box {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(10, 14, 20, 0.66);
}

.box h2 {
  margin: 0 0 9px;
  color: var(--fg-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.box p {
  margin: 0 0 8px;
  color: var(--fg-dim);
  font-size: 12.8px;
  line-height: 1.62;
}

.box code {
  color: #9fe8cd;
  font-family: var(--mono);
  font-size: 11.8px;
}

.box.note {
  border-left: 3px solid var(--mint);
  background: linear-gradient(
    180deg,
    rgba(0, 229, 155, 0.055),
    rgba(0, 229, 155, 0.015)
  );
}

.box dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 12px;
  margin: 0;
}

.box dt {
  margin: 0;
  color: var(--fg-faint);
  font-size: 11.6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.box dd {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--fg);
  font-size: 12.4px;
  overflow-wrap: anywhere;
}

.box .tiny,
.tiny {
  color: var(--fg-faint);
  font-size: 11.6px;
  line-height: 1.55;
}

.vlist {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  max-height: 268px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.vrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 12.6px;
}

.vrow:hover {
  background: rgba(26, 35, 46, 0.5);
}

.vrow a {
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 12.2px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vrow a:hover {
  color: var(--mint);
}

.vrow .mono {
  color: var(--fg-faint);
  font-size: 11px;
}

.vrow em {
  grid-column: 1 / -1;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 9.6px;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vrow.current {
  background: rgba(0, 229, 155, 0.07);
  box-shadow: inset 2px 0 0 var(--mint);
}

.vrow.current a {
  color: var(--mint);
  font-weight: 700;
}

/* ---- responsive ------------------------------------------------------ */
/* Two columns by default; the right "on this page" rail appears only when
   there is real room for it, otherwise it would be squeezed into the
   content column of a 2-column grid. */
.dtoc {
  display: none;
}

@media (min-width: 1200px) {
  .shell {
    grid-template-columns: var(--side-w) minmax(0, 1fr) var(--toc-w);
  }

  .dtoc {
    display: block;
  }
}

@media (max-width: 1199px) {
  .hub-side {
    position: static;
  }
}

@media (max-width: 979px) {
  .burger {
    display: inline-flex;
  }

  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    z-index: 58;
    width: min(320px, 86vw);
    max-height: calc(100vh - var(--nav-h));
    border-right: 1px solid var(--line);
    background: var(--bg);
    box-shadow: var(--shadow);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    overscroll-behavior: contain;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    padding: 22px 22px 40px;
  }
}

@media (max-width: 860px) {
  .hub-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .topbar-inner {
    gap: 8px;
    padding: 0 12px;
  }

  .brand-docs,
  .search kbd,
  .vselect::after {
    display: none;
  }

  .search {
    flex: 1 1 96px;
    min-width: 96px;
  }

  .search input {
    min-width: 0;
    width: 100%;
  }

  .results {
    position: fixed;
    top: calc(var(--nav-h) + 4px);
    left: 8px;
    right: 8px;
    width: auto;
    max-height: 62vh;
  }

  .vselect select {
    max-width: 108px;
  }

  .main {
    padding: 18px 15px 34px;
  }

  .prose h1 {
    font-size: 25px;
  }

  .prose h2 {
    font-size: 19px;
    margin-top: 32px;
  }

  .prose h3 {
    font-size: 16.5px;
  }

  .pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-meta {
    padding: 12px;
  }

  .meta-k {
    min-width: 100%;
  }

  .foot-inner {
    flex-direction: column;
    gap: 4px;
  }

  .sec-card {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .pager a:hover,
  .sec-card:hover,
  .btn:hover {
    transform: none;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
  }

  body::before,
  body::after,
  .topbar,
  .sidebar,
  .dtoc,
  .pager,
  .copy,
  .skip,
  .scrim,
  .hub-actions {
    display: none !important;
  }

  .shell {
    display: block;
  }

  .main {
    padding: 0;
    max-width: none;
  }

  .prose h1,
  .prose h2,
  .prose h3,
  .prose h4,
  .prose strong {
    color: #111;
  }

  .prose a,
  .prose code {
    color: #0645ad;
    border: 0;
    background: none;
  }

  .prose .codehilite,
  .prose table,
  .tablewrap,
  .doc-meta {
    border-color: #ccc;
    background: #fafafa;
    box-shadow: none;
    color: #222;
    overflow: visible;
  }

  .prose .admonition {
    background: #f6f6f6;
  }

  .doc-meta {
    margin-top: 18px;
  }
}

/* Multi-repo: sidebar repo group headers */
.nav-repo {
  padding: 0.5rem 1rem 0.25rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}
.nav-repo:first-child {
  border-top: none;
  margin-top: 0.5rem;
}
.nav-repo .repo-name {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Multi-repo: repo chip on hub cards and search results */
.repo-chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

/* Multi-repo: section header for repo groups on hub */
.repo-h {
  grid-column: 1 / -1;
  margin: 1.5rem 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

/* Multi-repo: satellite info line on hub hero */
.satellite-line {
  margin: 0.5rem 0 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.sat-chip {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: var(--surface-2);
  font-size: 0.75rem;
}
.sat-chip a {
  color: var(--accent);
}

/* Multi-repo: search result repo label */
.res-r {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border-radius: 9999px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 500;
  margin-left: 0.5rem;
  vertical-align: baseline;
}

/* Multi-repo: repositories box on hub */
.repo-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.repo-row:last-child {
  border-bottom: none;
}
.repo-row a {
  color: var(--accent);
}

/* Multi-repo: page meta repo row */
.meta-repo {
  display: flex;
  justify-content: space-between;
}
