/*
 * Vibiz Stack docs. Tokens are the console's (apps/console/src/styles.css) so the
 * docs and the console read as one product: near-black, Inter Tight display,
 * the Vibiz blue only on the primary action. No icon fonts, no emoji.
 */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/docs/_assets/fonts/inter.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Inter Tight Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/docs/_assets/fonts/inter-tight.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Geist Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/docs/_assets/fonts/geist-mono.woff2") format("woff2-variations");
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090a;
  --bg-elev: #0f0f11;
  --card: #141416;
  --card-hover: #1a1a1d;
  --fg: #f6f6f4;
  --fg-2: #c8c8cd;
  --muted: #8a8a93;
  --line: #222226;
  --line-strong: #313137;
  --accent: #0a78c4;
  --accent-fg: #ffffff;
  --pos: #2fd584;
  --hair: rgb(255 255 255 / 0.08);
  --hair-2: rgb(255 255 255 / 0.12);
  --wash: rgb(255 255 255 / 0.025);
  --wash-2: rgb(255 255 255 / 0.05);
  --code-bg: #0e0e10;
  --lip: inset 0 -3px 0 rgb(0 0 0 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.18);
  --glow: radial-gradient(60% 50% at 50% 0%, rgb(10 120 196 / 0.16), transparent 70%);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f2;
  --bg-elev: #fbfbf9;
  --card: #ffffff;
  --card-hover: #f2f2ef;
  --fg: #0b0b0c;
  --fg-2: #2b2b30;
  --muted: #696970;
  --line: #e4e4df;
  --line-strong: #d3d3cd;
  --accent: #0071b3;
  --accent-fg: #ffffff;
  --pos: #087a43;
  --hair: rgb(0 0 0 / 0.08);
  --hair-2: rgb(0 0 0 / 0.13);
  --wash: rgb(0 0 0 / 0.018);
  --wash-2: rgb(0 0 0 / 0.04);
  --code-bg: #fbfbf9;
  --lip: inset 0 -3px 0 rgb(0 0 0 / 0.2), inset 0 1px 0 rgb(255 255 255 / 0.22);
  --glow: radial-gradient(60% 50% at 50% 0%, rgb(0 113 179 / 0.08), transparent 70%);
}
:root {
  --sans: "Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Tight Variable", "Inter Variable", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono Variable", ui-monospace, "SF Mono", Menlo, monospace;
  --accent-hover: color-mix(in oklab, var(--accent) 88%, white);
  --accent-soft: color-mix(in oklab, var(--accent) 14%, transparent);
  --ring: color-mix(in oklab, var(--accent) 55%, transparent);
  --gutter: clamp(16px, 4vw, 40px);
  --top-h: 60px;
  /* The terminal and code panes stay dark in both themes: they are product visuals. */
  --term-bg: #0b0b0d;
  --term-bar: #121215;
  --term-fg: #e9e9ec;
  --term-dim: #7d7d87;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--top-h) + 24px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
::selection {
  background: var(--accent);
  color: var(--accent-fg);
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}
a {
  color: inherit;
}
img,
svg {
  display: block;
}
code,
kbd,
pre {
  font-family: var(--mono);
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--fg);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
}
.skip:focus {
  left: 8px;
}

/* ── brand ── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
}
.mark {
  color: var(--fg);
}
.mark-ink {
  fill: var(--bg);
}
.brand-word {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.brand-pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: 600 15px / 1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--lip);
  padding-bottom: 3px;
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-ghost {
  background: var(--wash-2);
  border-color: var(--hair-2);
  color: var(--fg);
}
.btn-ghost:hover {
  background: var(--hair);
}
.btn-lg {
  height: 52px;
  padding: 0 24px;
  font-size: 16px;
  border-radius: 14px;
}
.btn-small {
  height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
  border-radius: 10px;
}
.btn-small.btn-primary {
  padding-bottom: 2px;
}

/* ── badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  background: var(--wash-2);
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: -0.005em;
}

/* ── top bar ── */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--top-h);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--hair);
}
.top-in {
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.top-nav {
  display: flex;
  gap: 4px;
}
.top-nav a {
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.top-nav a:hover {
  color: var(--fg);
}
.top-nav a[aria-current="page"] {
  color: var(--fg);
  background: var(--wash-2);
}
.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 34px;
  min-width: 200px;
  padding: 0 6px 0 12px;
  border-radius: 10px;
  border: 1px solid var(--hair-2);
  background: var(--wash);
  color: var(--muted);
  font: 500 13.5px var(--sans);
  cursor: pointer;
}
.search-btn:hover {
  color: var(--fg);
  border-color: var(--line-strong);
}
kbd {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--hair-2);
  background: var(--wash-2);
  color: var(--muted);
  font-size: 11.5px;
}
.theme-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  font: 500 13.5px var(--sans);
  cursor: pointer;
}
.theme-btn:hover {
  color: var(--fg);
  background: var(--wash-2);
}
[data-theme="dark"] .when-light,
[data-theme="light"] .when-dark {
  display: none;
}
.menu-btn {
  display: none;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--hair-2);
  background: var(--wash);
  color: var(--fg);
  font: 600 13.5px var(--sans);
  cursor: pointer;
}

/* ── landing ── */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap.narrow {
  max-width: 820px;
}
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px);
  background: var(--glow);
}
.hero.small {
  padding-bottom: clamp(32px, 5vw, 64px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-stack > *,
.hero-grid > *,
.split > *,
.examples > *,
.ex {
  min-width: 0;
}
.hero-stack {
  display: grid;
  gap: clamp(48px, 7vw, 88px);
}
.hero-stack .display {
  font-size: clamp(48px, 8.4vw, 112px);
}
.hero-stack .hero-visual {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}
.hero-meta.center {
  justify-content: center;
}
.hero-copy .badge {
  margin-bottom: 26px;
}
.display {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(46px, 7.2vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.052em;
  margin: 0;
  text-wrap: balance;
}
.display-2 {
  font-family: var(--display);
  font-weight: 750;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 18px 0 0;
  text-wrap: balance;
}
.lede {
  font-size: clamp(18px, 1.5vw, 20px);
  line-height: 1.6;
  color: var(--fg-2);
  max-width: 34em;
  margin: 24px 0 0;
  text-wrap: pretty;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.cta-row.center {
  justify-content: center;
}
.hero-meta {
  display: flex;
  gap: 10px;
  margin: 26px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.hero-meta a {
  color: var(--muted);
  text-underline-offset: 3px;
}
.hero-meta a:hover {
  color: var(--fg);
}
.band {
  padding: clamp(64px, 9vw, 128px) 0 0;
}
.band.last {
  padding-bottom: clamp(72px, 10vw, 140px);
}
.sec-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}
.sec-head.left {
  text-align: left;
  margin: 0;
}
.sec-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin: 18px auto 0;
  max-width: 40em;
  text-wrap: pretty;
}
.sec-head.left .sec-sub {
  margin-left: 0;
}
.sec-sub code,
.lede code,
.facts code {
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--wash-2);
  border: 1px solid var(--hair);
  color: var(--fg-2);
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.facts {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 14px;
}
.facts li {
  padding-left: 18px;
  border-left: 2px solid var(--hair-2);
  color: var(--muted);
  font-size: 16px;
}
.facts strong {
  color: var(--fg);
  font-weight: 600;
}
.facts a {
  color: var(--fg-2);
}
.closer {
  text-align: center;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 48px);
  border: 1px solid var(--hair);
  border-radius: 28px;
  background: var(--glow), var(--wash);
}
.closer .sec-sub {
  margin-top: 16px;
}
.center-text {
  text-align: center;
}
.center-text .lede {
  margin-left: auto;
  margin-right: auto;
}

/* ── terminal ── */
.term,
.pane {
  border-radius: 16px;
  background: var(--term-bg);
  border: 1px solid rgb(255 255 255 / 0.09);
  box-shadow:
    0 40px 80px -40px rgb(0 0 0 / 0.7),
    0 0 0 1px rgb(0 0 0 / 0.3);
  overflow: hidden;
  color: var(--term-fg);
  min-width: 0;
}
[data-theme="light"] .term,
[data-theme="light"] .pane {
  box-shadow:
    0 30px 60px -30px rgb(20 20 10 / 0.35),
    0 0 0 1px rgb(0 0 0 / 0.06);
}
.term-bar,
.pane-bar {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  background: var(--term-bar);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}
.lights {
  display: inline-flex;
  gap: 7px;
  width: 64px;
  flex: none;
}
.lights i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}
.lights i:nth-child(2) {
  background: #febc2e;
}
.lights i:nth-child(3) {
  background: #28c840;
}
.lights-pad {
  width: 64px;
  flex: none;
}
.term-title {
  flex: 1;
  text-align: center;
  font: 500 12.5px var(--sans);
  color: var(--term-dim);
}
.term-body {
  margin: 0;
  padding: 18px 20px 22px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #c9c9d1;
}
.hero-term .term-body {
  font-size: 13px;
  padding: 22px 26px 26px;
}
.split .term-body {
  font-size: 12px;
}
.t-prompt {
  color: var(--term-dim);
  user-select: none;
}
.t-strong {
  color: #fff;
  font-weight: 600;
}
.t-dim {
  color: var(--term-dim);
}

/* ── code pane ── */
.pane-tab {
  margin-left: 6px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  font: 500 12.5px var(--mono);
  color: #e6e6ea;
  background: var(--term-bg);
  border-left: 1px solid rgb(255 255 255 / 0.06);
  border-right: 1px solid rgb(255 255 255 / 0.06);
  box-shadow: inset 0 2px 0 var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pane-copy {
  margin-left: auto;
}
.pane-body {
  margin: 0;
  padding: 16px 0 18px;
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
  color: #d4d4db;
  counter-reset: ln;
}
.pane-body code {
  display: block;
  white-space: pre;
  padding-right: 24px;
}
.ln {
  display: inline-block;
  width: 3.4em;
  padding-right: 1.4em;
  text-align: right;
  color: #4d4d56;
  user-select: none;
}
.pane-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  height: 28px;
  align-items: center;
  padding: 0 14px;
  border-top: 1px solid rgb(255 255 255 / 0.06);
  background: var(--term-bar);
  font: 500 11.5px var(--sans);
  color: var(--term-dim);
}

/* ── tabs (pills) ── */
.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}
.pill {
  position: relative;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  background: var(--wash);
  color: var(--muted);
  font: 600 14.5px var(--sans);
  letter-spacing: -0.01em;
  cursor: pointer;
  overflow: hidden;
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s;
}
.pill:hover {
  color: var(--fg);
}
.pill.is-on {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}
.pill span {
  position: relative;
  z-index: 1;
}
.pill-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  overflow: hidden;
}
.pill.is-on .pill-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--bg) 55%, transparent);
  transform-origin: left;
  transform: scaleX(0);
}
.examples.is-playing .pill.is-on .pill-bar::after {
  animation: fill var(--tab-ms, 7000ms) linear forwards;
}
@keyframes fill {
  to {
    transform: scaleX(1);
  }
}
.examples {
  max-width: 920px;
  margin: 0 auto;
}
.ex-cap {
  text-align: center;
  color: var(--muted);
  margin: 18px 0 0;
  font-size: 15.5px;
}
.ex-cap a {
  color: var(--fg-2);
  text-underline-offset: 3px;
}

/* ── product cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--hair);
  background: var(--wash);
  text-decoration: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.card:hover {
  border-color: var(--hair-2);
  background: var(--wash-2);
}
.card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}
.card code {
  margin-top: auto;
  padding-top: 22px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── copy buttons ── */
.copy {
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--hair-2);
  background: transparent;
  color: var(--muted);
  font: 600 12px var(--sans);
  cursor: pointer;
}
.copy:hover {
  color: var(--fg);
}
.copy.done {
  color: var(--pos);
  border-color: color-mix(in oklab, var(--pos) 40%, transparent);
}
.pane .copy,
.term .copy {
  border-color: rgb(255 255 255 / 0.12);
  color: var(--term-dim);
}

/* ── reveal ── */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .examples.is-playing .pill.is-on .pill-bar::after {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── docs layout ── */
.docs {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 232px;
  gap: 0 clamp(24px, 3vw, 56px);
  padding: 0 var(--gutter);
}
.side {
  position: sticky;
  top: var(--top-h);
  align-self: start;
  height: calc(100dvh - var(--top-h));
  overflow-y: auto;
  padding: 28px 8px 48px 0;
  scrollbar-width: thin;
}
.side-sec + .side-sec {
  margin-top: 26px;
}
.side h4,
.toc h4 {
  margin: 0 0 8px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.side ul,
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--fg-2);
  text-decoration: none;
  line-height: 1.35;
}
.side a:hover {
  color: var(--fg);
  background: var(--wash);
}
.side a[aria-current="page"] {
  color: var(--fg);
  background: var(--wash-2);
  font-weight: 600;
}
.doc {
  min-width: 0;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 44px 0 80px;
}
.doc-head h1 {
  font-family: var(--display);
  font-size: clamp(36px, 4.4vw, 52px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 18px 0 0;
  text-wrap: balance;
}
.doc-desc {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  margin: 16px 0 0;
  text-wrap: pretty;
}
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hair);
}
.toc {
  position: sticky;
  top: var(--top-h);
  align-self: start;
  max-height: calc(100dvh - var(--top-h));
  overflow-y: auto;
  padding: 48px 0 40px;
}
.toc a {
  display: block;
  padding: 4px 10px;
  border-left: 1px solid var(--hair);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
}
.toc .d3 a {
  padding-left: 22px;
  font-size: 13px;
}
.toc a:hover {
  color: var(--fg);
}
.toc a.is-active {
  color: var(--fg);
  border-left-color: var(--fg);
}

/* ── prose ── */
.prose {
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--fg-2);
}
.prose > :first-child {
  margin-top: 28px;
}
.prose h2,
.prose h3,
.prose h4 {
  position: relative;
  color: var(--fg);
  font-family: var(--display);
  letter-spacing: -0.03em;
  scroll-margin-top: calc(var(--top-h) + 20px);
}
.prose h2 {
  font-size: 28px;
  font-weight: 750;
  line-height: 1.15;
  margin: 56px 0 14px;
}
.prose h3 {
  font-size: 20.5px;
  font-weight: 700;
  line-height: 1.25;
  margin: 36px 0 10px;
}
.prose h4 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 8px;
}
.anchor {
  position: absolute;
  left: -0.9em;
  width: 0.9em;
  color: var(--muted);
  opacity: 0;
  text-decoration: none;
  font-weight: 500;
}
.prose :is(h2, h3, h4):hover .anchor {
  opacity: 1;
}
.prose p,
.prose ul,
.prose ol {
  margin: 14px 0;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li {
  margin: 6px 0;
}
.prose li::marker {
  color: var(--muted);
}
.prose strong {
  color: var(--fg);
  font-weight: 650;
}
.prose a {
  color: var(--fg);
  text-decoration-color: color-mix(in oklab, var(--fg) 35%, transparent);
  text-underline-offset: 3px;
}
.prose a:hover {
  text-decoration-color: var(--fg);
}
.prose :not(pre) > code {
  font-size: 0.86em;
  padding: 1.5px 6px;
  border-radius: 6px;
  background: var(--wash-2);
  border: 1px solid var(--hair);
  color: var(--fg);
  overflow-wrap: anywhere;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 40px 0;
}
.note {
  margin: 22px 0;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--hair));
  background: var(--accent-soft);
  color: var(--fg-2);
}
.note p {
  margin: 0;
}
.note p + p {
  margin-top: 8px;
}
.codeblock {
  margin: 20px 0;
  border-radius: 14px;
  border: 1px solid var(--hair-2);
  background: var(--code-bg);
  overflow: hidden;
}
.codeblock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--hair);
  font: 550 12px var(--sans);
  color: var(--muted);
}
.codeblock pre {
  margin: 0;
  padding: 14px 16px 16px;
  overflow-x: auto;
  font-size: 13.2px;
  line-height: 1.7;
  color: var(--fg);
}
.codeblock code {
  white-space: pre;
}
.table {
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid var(--hair);
  border-radius: 14px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
}
.prose th {
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--wash);
}
.prose th,
.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}
.prose tr:last-child td {
  border-bottom: 0;
}
.prose td:first-child {
  color: var(--fg);
}
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 64px;
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--hair);
  background: var(--wash);
  text-decoration: none;
}
.pager a:hover {
  border-color: var(--hair-2);
}
.pager span {
  font-size: 12.5px;
  color: var(--muted);
}
.pager strong {
  font-size: 15.5px;
  font-weight: 600;
}
.pager .next {
  text-align: right;
}

.prose td code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.88em;
}
.routes {
  list-style: none;
  padding: 0 !important;
  margin: 18px 0 8px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
}
.routes li {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hair);
}
.routes li:last-child {
  border-bottom: 0;
}
.route-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.prose .route-line code {
  padding: 0;
  border: 0;
  background: none;
  font-weight: 550;
  font-size: 13.5px;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.method {
  flex: none;
  min-width: 54px;
  font: 650 11.5px var(--mono);
  letter-spacing: 0.02em;
  color: var(--muted);
}
.m-post {
  color: #6fb7ff;
}
.m-get {
  color: #5ed69a;
}
.m-delete {
  color: #ff8a80;
}
.m-patch,
.m-put {
  color: #f7c47a;
}
[data-theme="light"] .m-post {
  color: #0d5fb3;
}
[data-theme="light"] .m-get {
  color: #087a43;
}
[data-theme="light"] .m-delete {
  color: #c4322a;
}
[data-theme="light"] :is(.m-patch, .m-put) {
  color: #8a5208;
}
.route-auth {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
}
.routes p {
  margin: 6px 0 0 !important;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--fg-2);
}

/* ── syntax ── */
.t-kw {
  color: #c792ea;
}
.t-str {
  color: #a5d6a7;
}
.t-com {
  color: #6b6b75;
  font-style: italic;
}
.t-num {
  color: #f7c47a;
}
.t-fn {
  color: #82b8ff;
}
.t-prop {
  color: #82b8ff;
}
.t-tag {
  color: #ff8a80;
}
.t-var {
  color: #f7c47a;
}
.t-flag {
  color: #9aa4b8;
}
.t-cmd {
  color: #ffffff;
  font-weight: 600;
}
[data-theme="light"] .codeblock .t-kw {
  color: #7b2fbf;
}
[data-theme="light"] .codeblock .t-str {
  color: #2f7a3a;
}
[data-theme="light"] .codeblock .t-com {
  color: #8a8a93;
}
[data-theme="light"] .codeblock .t-num,
[data-theme="light"] .codeblock .t-var {
  color: #a35a00;
}
[data-theme="light"] .codeblock :is(.t-fn, .t-prop) {
  color: #0d5fb3;
}
[data-theme="light"] .codeblock .t-tag {
  color: #c4322a;
}
[data-theme="light"] .codeblock .t-flag {
  color: #55607a;
}
[data-theme="light"] .codeblock .t-cmd {
  color: #000;
}

/* ── skills page ── */
.harness {
  margin-top: 34px;
}
.harness .pills {
  justify-content: flex-start;
  margin-bottom: 12px;
}
.harness-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14.5px;
}
.all-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-2);
}
.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--hair-2);
  background: var(--code-bg);
  min-width: 0;
}
.cmd {
  align-items: flex-start;
}
.cmd code {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12.5px;
  line-height: 1.6;
  padding-top: 2px;
}
.cmd .copy {
  flex: none;
}
.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.skill {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--hair);
  background: var(--wash);
  min-width: 0;
}
.skill-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.skill h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.skill-count {
  font-size: 12.5px;
  color: var(--muted);
}
.skill p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.skill-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: auto;
}
.skill-files a {
  font: 500 12.5px var(--mono);
  color: var(--muted);
  text-underline-offset: 3px;
}
.skill-files a:hover {
  color: var(--fg);
}
.faq details {
  border-bottom: 1px solid var(--hair);
  padding: 20px 4px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
}
.faq details[open] summary::after {
  content: "–";
}
.faq p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.65;
  max-width: 44em;
}

/* ── search ── */
.search {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
}
.search-scrim {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.55);
  backdrop-filter: blur(4px);
}
.search-panel {
  position: relative;
  width: min(640px, 100%);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--hair-2);
  background: var(--bg-elev);
  box-shadow: 0 40px 100px -30px rgb(0 0 0 / 0.8);
  overflow: hidden;
}
.search-input {
  width: 100%;
  height: 58px;
  padding: 0 20px;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: transparent;
  color: var(--fg);
  font: 500 17px var(--sans);
  outline: none;
}
.search-input::-webkit-search-cancel-button {
  display: none;
}
.search-results {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
}
.search-results a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}
.search-results a.is-active,
.search-results a:hover {
  background: var(--wash-2);
}
.search-results .r-title {
  font-weight: 600;
  font-size: 15px;
}
.search-results .r-meta {
  font-size: 12.5px;
  color: var(--muted);
}
.search-results .r-snip {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-results mark {
  background: none;
  color: var(--fg);
  font-weight: 650;
}
.search-empty {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 14.5px;
}
.search-foot {
  display: flex;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--hair);
  font-size: 12px;
  color: var(--muted);
}
.search-foot kbd {
  margin-right: 3px;
}

/* ── footer ── */
.foot {
  border-top: 1px solid var(--hair);
  background: var(--bg);
}
.foot-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px var(--gutter) 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 40px;
}
.is-docs .foot-in {
  max-width: 1440px;
}
.foot-brand p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 20em;
}
.foot-cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}
.foot h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.foot a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.foot a:hover {
  color: var(--fg);
}
.foot-base {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px var(--gutter) 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  border-top: 1px solid var(--hair);
  font-size: 13px;
  color: var(--muted);
}
.is-docs .foot-base {
  max-width: 1440px;
}

/* ── responsive ── */
@media (max-width: 1180px) {
  .docs {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}
@media (max-width: 980px) {
  .hero-grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .skills {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot-in {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .docs {
    grid-template-columns: minmax(0, 1fr);
  }
  .menu-btn {
    display: inline-flex;
    align-items: center;
  }
  .side {
    position: fixed;
    top: var(--top-h);
    left: 0;
    bottom: 0;
    z-index: 35;
    width: min(320px, 86vw);
    height: auto;
    padding: 20px 16px 40px;
    background: var(--bg-elev);
    border-right: 1px solid var(--hair);
    transform: translateX(-102%);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .menu-open .doc {
    opacity: 0.25;
  }
  .menu-open .side {
    transform: none;
    box-shadow: 30px 0 80px -20px rgb(0 0 0 / 0.6);
  }
  .top-nav {
    display: none;
  }
  .search-btn {
    min-width: 0;
    gap: 8px;
  }
  .search-btn kbd {
    display: none;
  }
}
@media (max-width: 640px) {
  .top-in {
    gap: 12px;
  }
  .brand-pill,
  .top-right .btn {
    display: none;
  }
  .theme-btn {
    padding: 0 8px;
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .card {
    min-height: 0;
  }
  .foot-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pills {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding: 0 var(--gutter);
  }
  .pill {
    flex: none;
  }
  .term-body,
  .pane-body {
    font-size: 11.5px;
  }
  .pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .pager .next {
    text-align: left;
  }
  .doc {
    padding-top: 28px;
  }
  .anchor {
    display: none;
  }
}

/* An id in a table's first column stays whole: the table scrolls instead. */
.prose td:first-child code {
  white-space: nowrap;
}
