/* soothfast default theme — "the straightedge": serif prose, monospace
   instrument labels, ruler-tick graduations, dark code panels. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--accent-soft); }

.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--primary);
  color: var(--on-primary);
  border-bottom: 1px solid rgba(0, 0, 0, .18);
}
.topbar-in {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  padding: 0 24px; height: 54px;
}
.ruler {
  height: 9px;
  background-image:
    repeating-linear-gradient(90deg, var(--on-primary) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, var(--on-primary) 0 1px, transparent 1px 48px);
  background-size: 100% 4px, 100% 9px;
  background-position: left bottom, left bottom;
  background-repeat: no-repeat;
  background-color: var(--primary);
  opacity: .4;
}
.brand {
  display: flex; align-items: baseline; gap: 10px;
  color: var(--on-primary); font-family: var(--mono);
  min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand-mark { align-self: center; width: 22px; height: 22px; flex: none; color: var(--on-primary); }
.brand-mark svg { display: block; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand-ver { font-size: 11px; color: var(--on-primary); letter-spacing: .05em; white-space: nowrap; }

/* Hamburger (mobile-only, see .nav-toggle in the responsive block) and the
   mobile search-icon button share the icon-button look of .theme-toggle. */
.nav-toggle, .search-toggle {
  display: none;
  border: 1px solid var(--on-primary); background: none; color: var(--on-primary); opacity: .8;
  border-radius: 6px; width: 32px; height: 32px;
  flex: none;
  transition: opacity .15s cubic-bezier(.25, 1, .5, 1);
  align-items: center; justify-content: center; padding: 0;
}
.nav-toggle:hover, .search-toggle:hover { opacity: 1; }

.search {
  margin-left: auto;
  position: relative;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  padding: 5px 10px;
  width: 260px;
  color: var(--faint);
}
.search input {
  border: 0; outline: 0; background: none; width: 100%;
  font-family: var(--mono); font-size: 12.5px; color: var(--ink);
}
.search input::placeholder { color: var(--faint); }
.search kbd {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
  white-space: nowrap;
}
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: -60px;
  max-height: 60vh; overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 60;
}
.search-hit {
  display: block; padding: 8px 10px; border-radius: 6px;
  color: var(--ink);
  transition: background-color .15s cubic-bezier(.25, 1, .5, 1);
}
.search-hit:hover, .search-hit.sel { background: var(--secondary-container); text-decoration: none; }
.search-hit-title { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.search-hit-title small { color: var(--faint); font-weight: 400; }
.search-hit-text { font-size: 13px; color: var(--muted); line-height: 1.45; }
.search-empty { padding: 10px; font-family: var(--mono); font-size: 12px; color: var(--faint); }

.repo-link {
  color: var(--on-primary); opacity: .8; display: grid; place-items: center;
  transition: opacity .15s cubic-bezier(.25, 1, .5, 1);
}
.repo-link:hover { opacity: 1; }
.theme-toggle {
  border: 1px solid var(--on-primary); background: none; color: var(--on-primary); opacity: .8;
  border-radius: 6px; width: 32px; height: 32px;
  display: grid; place-items: center; padding: 0;
  transition: opacity .15s cubic-bezier(.25, 1, .5, 1);
}
.theme-toggle:hover { opacity: 1; }
/* Both icons share the same grid cell; the toggle crossfades+rotates
   between them instead of an instant display:none/block swap. */
.theme-toggle .ic-sun, .theme-toggle .ic-moon {
  grid-area: 1 / 1;
  transition: opacity .25s cubic-bezier(.25, 1, .5, 1), transform .25s cubic-bezier(.25, 1, .5, 1);
}
.theme-toggle .ic-moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
:root[data-theme="dark"] .theme-toggle .ic-moon { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="dark"] .theme-toggle .ic-sun { opacity: 0; transform: rotate(90deg) scale(.5); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ic-moon { opacity: 1; transform: rotate(0) scale(1); }
  :root:not([data-theme="light"]) .theme-toggle .ic-sun { opacity: 0; transform: rotate(90deg) scale(.5); }
}

/* ---------- shell ---------- */
.shell {
  max-width: 1400px; margin: 0 auto;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 250px;
}

/* ---------- left nav ---------- */
.sidenav {
  position: sticky; top: 63px;
  height: calc(100vh - 63px);
  overflow-y: auto;
  padding: 28px 8px 40px 24px;
  border-right: 1px solid var(--line);
}
.nav-group { margin-bottom: 26px; }
.nav-group > .label { display: block; margin-bottom: 8px; }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group li a {
  display: block;
  font-family: var(--mono); font-size: 13px;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 6px;
  transition: background-color .15s cubic-bezier(.25, 1, .5, 1), color .15s cubic-bezier(.25, 1, .5, 1);
}
.nav-group li a:hover { color: var(--ink); text-decoration: none; background: var(--secondary-container); }
.nav-group li a.active {
  color: var(--on-primary);
  background: var(--primary);
  font-weight: 600;
}

/* ---------- article ---------- */
.doc { padding: 44px 56px 90px; min-width: 0; }
.doc > * { max-width: 720px; }

h1 {
  font-size: 34px; line-height: 1.15; font-weight: 700;
  letter-spacing: -.015em; margin: 0 0 18px;
  text-wrap: balance;
}
h2 {
  font-size: 23px; font-weight: 700; letter-spacing: -.01em;
  margin: 52px 0 14px; padding-top: 14px;
  position: relative;
  text-wrap: balance;
}
h2::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 44px; height: 5px;
  background-image: repeating-linear-gradient(90deg, var(--accent) 0 1px, transparent 1px 6px);
}
h3 { font-size: 17.5px; margin: 34px 0 10px; }
h4, h5, h6 { font-size: 16px; margin: 26px 0 8px; }
h1 .anchor, h2 .anchor, h3 .anchor, h4 .anchor, h5 .anchor, h6 .anchor {
  color: var(--faint); font-size: .72em; margin-left: 8px; opacity: 0;
}
h1:hover .anchor, h2:hover .anchor, h3:hover .anchor,
h4:hover .anchor, h5:hover .anchor, h6:hover .anchor,
.anchor:focus-visible { opacity: 1; }

p { margin: 0 0 16px; max-width: 68ch; }
li { margin: 3px 0; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }
blockquote {
  margin: 22px 0; padding: 0 0 0 28px;
  color: var(--muted);
  font-style: italic;
}
.doc code:not(pre code) {
  font-family: var(--mono); font-size: .84em;
  background: var(--accent-soft); color: var(--ink);
  padding: .12em .38em; border-radius: 4px;
}
/* The API reference's `` `name` <sup>kind</sup> `` heading form: reset the
   UA default (vertical-align: super) or the kind label floats above the
   adjacent code pill instead of sitting on the same visual center. */
h1 sup, h2 sup, h3 sup, h4 sup, h5 sup, h6 sup {
  vertical-align: middle; font-size: .78em;
}

/* ---------- evidence chips ---------- */
/* A chip is an instrument, not a status badge: hairline bezel, modest
   corner radius (never a pill), item/value/limit read as three deliberately
   different weights — and where there's a real number to plot, a calibrated
   scale underneath draws the actual-vs-limit relationship to scale, the
   same "graduated ruler" language as the topbar. */
.claimline { margin: 6px 0 16px; }
.chip {
  display: inline-flex; flex-direction: column; align-items: stretch;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .01em;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 5px 11px;
  max-width: 100%;
}
.chip-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 7px; }
.chip-mark { flex: none; align-self: center; font-weight: 700; }
.chip-item { font-weight: 700; }
.chip-sep { opacity: .45; }
.chip-detail { font-weight: 500; }
.chip-limit { opacity: .7; font-size: .92em; }
.chip-pass { background: var(--pass-bg); border-color: var(--pass-border); color: var(--pass); }
.chip-fail { background: var(--fail-bg); border-color: var(--fail-border); color: var(--fail); }
.chip-warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); }
.chip-bind { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }

/* ---------- calibrated scale ---------- */
.chip-gauge { margin-top: 6px; max-width: 220px; }
.chip-scale { display: block; width: 100%; height: 16px; overflow: visible; }
.chip-scale-rail { stroke: currentColor; opacity: .28; stroke-width: 1.5; }
.chip-scale-cap { stroke: currentColor; opacity: .4; stroke-width: 1.5; }
.chip-scale-limit { stroke: currentColor; opacity: .55; stroke-width: 1.5; stroke-dasharray: 2 2; }
.chip-scale-fill { stroke: currentColor; stroke-width: 2.4; stroke-dashoffset: 0; }
.chip-scale-marker {
  fill: currentColor; stroke: var(--panel); stroke-width: 1.6;
  transform-box: fill-box; transform-origin: center;
}
.chip-scale-axis {
  display: flex; justify-content: space-between;
  font-size: 9.5px; letter-spacing: .03em; opacity: .6;
  margin-top: 2px;
}

/* The sweep: a needle settling into its measured position as the chip
   scrolls into view. Pure CSS, per-element — no JS orchestration needed.
   Progressive enhancement only: the base rules above already render the
   correct final state, so browsers without scroll-driven animations (or
   with reduced motion requested) simply never see anything but that. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .chip-scale-fill {
      stroke-dasharray: var(--fill-len) var(--fill-len);
      stroke-dashoffset: var(--fill-len);
      animation: chip-scale-draw 1 linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 35%;
    }
    .chip-scale-marker {
      transform: scale(0);
      opacity: 0;
      animation: chip-scale-pop 1 linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 40%;
    }
  }
}
@keyframes chip-scale-draw { to { stroke-dashoffset: 0; } }
@keyframes chip-scale-pop { to { transform: scale(1); opacity: 1; } }

/* ---------- code panels ---------- */
.code {
  margin: 24px 0 28px;
  border-radius: var(--radius);
  background: var(--code-bg);
  border: 1px solid var(--code-edge);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.code-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 12px 8px 18px;
  border-bottom: 1px solid var(--code-edge);
}
.code-lang {
  font-family: var(--mono); font-size: 11px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--code-muted);
}
.code-copy {
  margin-left: auto;
  background: none; border: 0; color: var(--code-muted);
  font-family: var(--mono); font-size: 11.5px;
  padding: 4px 8px; border-radius: 5px;
}
.code-copy:hover { color: var(--code-ink); background: rgba(255, 255, 255, .06); }
.code pre {
  margin: 0; padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.62;
  color: var(--code-ink);
  tab-size: 4;
}
.tok-kw  { color: var(--tok-kw); }
.tok-ty  { color: var(--tok-ty); }
.tok-str { color: var(--tok-str); }
.tok-num { color: var(--tok-num); }
.tok-mac { color: var(--tok-mac); }
.tok-com { color: var(--tok-com); font-style: italic; }
.tok-fn  { color: var(--tok-fn); font-weight: 600; }

.run-out {
  border-top: 1px solid var(--code-edge);
  background: rgba(0, 0, 0, .22);
}
.run-out-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 18px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--code-muted);
}
.run-out-static .run-out-head { padding-bottom: 8px; }
/* <summary> only on the collapsible (has-output) variant */
summary.run-out-head {
  cursor: pointer; user-select: none;
  list-style: none;
}
summary.run-out-head::-webkit-details-marker { display: none; }
summary.run-out-head::marker { content: ""; display: none; }
summary.run-out-head:hover { color: var(--code-ink); }
summary.run-out-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 3px; }
.run-out-label { display: inline-flex; align-items: center; gap: 6px; }
.run-out-chevron { flex: none; transition: transform .15s cubic-bezier(.25, 1, .5, 1); }
details.run-out[open] > summary .run-out-chevron { transform: rotate(90deg); }
.run-out pre { padding: 8px 20px 14px; margin: 0; color: var(--tok-str); font-size: 13px; }

/* ---------- claim ledger (attached to the code block it covers) ---------- */
.ev-ledger {
  border-top: 1px solid var(--code-edge);
  padding: 8px 10px 10px;
}
.ev-ledger-head {
  padding: 2px 8px 6px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--code-muted);
}
.ev-row {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 3px 10px;
  font-family: var(--mono); font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
}
.ev-row + .ev-row { margin-top: 1px; }
.ev-item { color: var(--code-ink); font-weight: 600; }
.ev-metric { color: var(--code-muted); text-transform: uppercase; font-size: 10px; letter-spacing: .05em; }
.ev-actual { margin-left: auto; color: var(--code-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ev-unmeasured { color: var(--code-muted); font-weight: 400; font-style: italic; }
.ev-op, .ev-bound { color: var(--code-muted); }
.ev-detail { margin-left: auto; color: var(--code-muted); }

.ev-row-pass { background: rgba(87, 201, 124, .12); }
.ev-row-pass .ev-mark { color: var(--code-pass); }
.ev-row-fail { background: rgba(224, 104, 92, .14); }
.ev-row-fail .ev-mark { color: var(--code-fail); }
.ev-row-warn { background: rgba(217, 169, 75, .12); }
.ev-row-warn .ev-mark { color: var(--code-warn); }
.ev-row-bind { background: rgba(152, 171, 255, .12); }
.ev-row-bind .ev-mark { color: var(--tok-kw); }

/* ---------- evidence panel ---------- */
/* Dark instrument treatment for a claim/measured ledger standing on its own
   (e.g. the generated API reference) instead of attached under a code
   block — same background/edge as .code so .ev-row/.ev-ledger read with
   the same contrast without a code figure wrapping them. */
.evidence-panel {
  margin: 14px 0 22px;
  border-radius: var(--radius);
  background: var(--code-bg);
  border: 1px solid var(--code-edge);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.evidence-panel .ev-ledger { border-top: none; }
.evidence-panel .ev-ledger + .ev-ledger { border-top: 1px solid var(--code-edge); }

/* ---------- route reconciliation (generated `docs routes` pages) ---------- */
.route-summary {
  display: flex; align-items: center; gap: 14px;
  margin: 6px 0 22px;
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
}
.route-gauge-svg { display: block; width: 220px; height: 14px; overflow: visible; flex: none; }
.route-gauge-rail { stroke: var(--line-strong); stroke-width: 3; }
.route-gauge-fill { stroke: var(--pass); stroke-width: 3; }
.route-gauge-fill.has-gaps { stroke: var(--fail); }
.route-summary-text strong { color: var(--ink); font-weight: 700; }

.route-group {
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.route-group summary {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; cursor: pointer;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  color: var(--ink); background: var(--surface-variant);
  list-style: none;
}
.route-group summary::-webkit-details-marker { display: none; }
.route-group summary::marker { content: ""; display: none; }
.route-group summary:hover { background: var(--line); }
.route-group summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.route-group-chevron {
  flex: none; color: var(--muted);
  transition: transform .15s cubic-bezier(.25, 1, .5, 1);
}
.route-group[open] > summary .route-group-chevron { transform: rotate(90deg); }
.route-group .tablewrap { margin: 0; }
.route-group .tablewrap table { font-size: 12.5px; }
.route-group .tablewrap th:first-child, .route-group .tablewrap td:first-child { padding-left: 16px; }
.route-group .tablewrap th:last-child, .route-group .tablewrap td:last-child { padding-right: 16px; }

.route-status { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; white-space: nowrap; }
.route-status-pass { color: var(--pass); }
.route-status-fail { color: var(--fail); }
.route-measured { color: var(--muted); font-weight: 400; }

/* ---------- generated spec reference (`spec html`) ---------- */
/* Collapsed, tag-grouped rows you expand on click — the recognizable shape
   of a standardized API reference (Swagger UI, the AsyncAPI generator,
   ReDoc): scan a compact method + path + summary line, open one to see
   detail, instead of a page of always-open cards. Rows opt out of the
   prose column's 720px cap (same reasoning `.evidence-panel` already
   uses) since a parameter table needs real width. Method badges are
   solid-filled and colored by what the verb actually costs a caller —
   read (accent), create (pass), mutate (warn), destroy (fail) — the same
   evidence palette `.route-status`/`.chip` already use, immediately
   legible as "the blue one is GET" without inventing a decorative
   per-verb rainbow. No side-stripe accents: state lives in the badge and
   the row background on hover/open, not a colored border rail. */
.doc > .spec-group, .doc > .spec-row, .doc > .spec-rowlist {
  max-width: none;
}

.spec-method {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 60px; flex: none;
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: .03em;
  color: var(--on-primary);
  border-radius: 5px;
  padding: 4px 9px;
}
.spec-method-get, .spec-method-receive { background: var(--primary); }
.spec-method-post, .spec-method-send { background: var(--pass); }
.spec-method-put, .spec-method-patch { background: var(--warn); }
.spec-method-delete { background: var(--fail); }
.spec-method-options, .spec-method-head, .spec-method-trace { background: var(--secondary); }

/* ---------- collapsed row: one operation / schema / channel ---------- */
.spec-rowlist { margin: 4px 0 8px; }
.spec-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 8px;
  background: var(--panel);
  overflow: hidden;
}
.spec-row summary {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
}
.spec-row summary::-webkit-details-marker { display: none; }
.spec-row summary::marker { content: ""; display: none; }
.spec-row summary:hover { background: var(--surface-variant); }
.spec-row summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.spec-row[open] > summary { border-bottom: 1px solid var(--line); }
.spec-row-path, .spec-row-name {
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--ink);
}
.spec-row-desc {
  color: var(--muted); font-size: 13px;
  margin-left: auto; text-align: right; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spec-row-chevron {
  flex: none; color: var(--muted);
  transition: transform .15s cubic-bezier(.25, 1, .5, 1);
}
.spec-row[open] > summary .spec-row-chevron { transform: rotate(90deg); }

.spec-body { padding: 6px 20px 18px; }
.spec-subhead {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin: 16px 0 8px;
}
.spec-body > .spec-subhead:first-child { margin-top: 14px; }
.spec-status-line {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--mono); font-size: 13px;
  padding: 8px 0; border-top: 1px solid var(--line);
}
.spec-body .spec-status-line:first-of-type { border-top: none; }
.spec-status-code { font-weight: 700; border-radius: 4px; padding: 1px 7px; }
.spec-status-2xx { color: var(--pass); background: var(--pass-bg); }
.spec-status-3xx { color: var(--accent); background: var(--accent-soft); }
.spec-status-4xx, .spec-status-5xx { color: var(--fail); background: var(--fail-bg); }
.spec-status-desc { color: var(--muted); }
.spec-ct { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin: 2px 0 8px; }

.spec-required {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--fail);
}
.spec-optional {
  display: inline-block; font-size: 10px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint);
}

.spec-oneof { margin: 8px 0 4px; padding-left: 0; list-style: none; }
.spec-oneof > li {
  margin: 12px 0; padding: 12px 14px 2px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-variant);
}
.spec-oneof > li > .tablewrap { margin: 0 0 12px; }

/* Type/field tables inside a row sit flush against the row's own edge. */
.spec-row .tablewrap, .spec-oneof .tablewrap { margin: 6px 0 4px; }
.spec-row .tablewrap table { font-size: 12.5px; }

/* ---------- parameter reference + inline "Try it out" ---------- */
/* Available values, defaults, and a live value editor live in the same
   table a reader already reads the parameter's description from — not a
   second hidden form disconnected from the reference, and not read-only
   prose that never shows what an enum actually accepts. */
.spec-param-meta-type { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.spec-param-meta { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.spec-param-meta em { font-style: italic; color: var(--ink); font-weight: 500; }

.spec-try-col { width: 240px; }
.spec-try-col input, .spec-try-col select {
  width: 100%; box-sizing: border-box;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 6px 9px;
}
.spec-try-col input:focus, .spec-try-col select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
/* An empty required field reads as unmet, not just as a disabled Execute
   button elsewhere on the row. */
.spec-try-col input:required:invalid { border-color: var(--fail); }

.spec-try-body {
  margin: 10px 0;
  border-radius: var(--radius);
  background: var(--code-bg);
  border: 1px solid var(--code-edge);
  padding: 12px 14px 14px;
}
.spec-try-bodytext {
  width: 100%; box-sizing: border-box; min-height: 90px; resize: vertical;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--code-ink); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--code-edge); border-radius: 6px;
  padding: 8px 10px;
}
.spec-try-bodytext:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.spec-try-actions { display: flex; gap: 8px; margin: 10px 0; }
.spec-try-server {
  flex: 1; min-width: 0;
  font-family: var(--mono); font-size: 12px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 7px 10px;
}
.spec-try-send {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--on-primary); background: var(--primary);
  border: 0; border-radius: 6px;
  padding: 7px 16px;
}
.spec-try-send:hover { filter: brightness(1.08); }
.spec-try-send:disabled {
  background: var(--line-strong); color: var(--muted);
  cursor: not-allowed; filter: none;
}
.spec-try-result {
  margin: 10px 0;
  border-radius: var(--radius);
  background: var(--code-bg);
  border: 1px solid var(--code-edge);
  padding: 12px 14px 14px;
}
.spec-try-status {
  font-family: var(--mono); font-size: 11.5px; color: var(--code-muted);
  margin-bottom: 8px; word-break: break-all;
}
.spec-try-status.spec-try-ok { color: var(--code-pass); }
.spec-try-status.spec-try-err { color: var(--code-fail); }
.spec-try-out {
  margin: 0; max-height: 360px; overflow: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
  color: var(--code-ink); white-space: pre-wrap; word-break: break-word;
}

/* ---------- synthesized example value ---------- */
/* A schema table says what shape a body must have; a synthesized example
   shows what one actually looks like — both are useful, so both are one
   click apart via the shared `.tabs` component rather than picking one. */
.spec-example {
  margin: 0; padding: 12px 14px;
  background: var(--code-bg); border: 1px solid var(--code-edge); border-radius: 8px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  color: var(--code-ink); white-space: pre-wrap; word-break: break-word;
  overflow-x: auto;
}
.spec-row .tabs, .spec-op .tabs { margin: 8px 0 4px; }

/* ---------- admonitions ---------- */
/* Severity reuses the evidence-chip palette (accent/warn/fail bg tints) so
   a callout and a claim chip read as the same instrument, not two systems. */
.adm {
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  padding: 14px 20px 6px;
}
.adm-title {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 8px;
}
.adm-title::before { content: "◆"; font-size: 7px; }
/* The kind (note/tip/info/…) is a category tag, not the headline — dimmed
   relative to the custom title so the two don't compete at equal weight. */
.adm-kind { opacity: .62; }
.adm p { font-size: 15.5px; color: var(--muted); }
.adm-warning { background: var(--warn-bg); }
.adm-warning .adm-title { color: var(--warn); }
.adm-danger { background: var(--fail-bg); }
.adm-danger .adm-title { color: var(--fail); }

/* ---------- content tabs (CSS-only radio switching) ---------- */
.tabs {
  margin: 24px 0 30px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}
.tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tabs > label {
  display: inline-block;
  padding: 10px 18px 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  margin-bottom: -1px;
  transition: background-color .15s cubic-bezier(.25, 1, .5, 1), color .15s cubic-bezier(.25, 1, .5, 1),
    border-color .15s cubic-bezier(.25, 1, .5, 1);
}
.tabs > label:hover { color: var(--ink); }
.tabs > input:checked + label {
  color: var(--on-primary);
  background: var(--primary);
  border-bottom-color: var(--primary);
}
.tabs > input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -2px; }
.tabs > .tab-panel {
  display: none;
  padding: 6px 20px 12px;
  border-top: 1px solid var(--line);
}
.tabs > input:nth-of-type(1):checked ~ section:nth-of-type(1),
.tabs > input:nth-of-type(2):checked ~ section:nth-of-type(2),
.tabs > input:nth-of-type(3):checked ~ section:nth-of-type(3),
.tabs > input:nth-of-type(4):checked ~ section:nth-of-type(4),
.tabs > input:nth-of-type(5):checked ~ section:nth-of-type(5),
.tabs > input:nth-of-type(6):checked ~ section:nth-of-type(6),
.tabs > input:nth-of-type(7):checked ~ section:nth-of-type(7),
.tabs > input:nth-of-type(8):checked ~ section:nth-of-type(8) { display: block; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; margin: 22px 0 30px; }
.tablewrap table {
  border-collapse: collapse; width: 100%;
  font-size: 13.5px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.tablewrap th {
  text-align: left; font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  padding: 8px 14px 8px 0;
}
.tablewrap td {
  border-bottom: 1px solid var(--line);
  padding: 9px 14px 9px 0;
}

/* ---------- right rail ---------- */
.rail {
  position: sticky; top: 63px;
  height: calc(100vh - 63px);
  overflow-y: auto;
  padding: 28px 24px 40px 20px;
  border-left: 1px solid var(--line);
  font-family: var(--mono);
}
.toc-list { list-style: none; margin: 8px 0 0; padding: 0; }
.toc-list a {
  display: block; font-size: 12.5px; color: var(--muted);
  padding: 4px 0 4px 12px;
  border-left: 1px solid var(--line);
}
.toc-list a.toc-l3 { padding-left: 24px; }
.toc-list a:hover { color: var(--ink); text-decoration: none; }
.toc-list a.current {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* ---------- footer ---------- */
.doc-foot {
  margin-top: 70px; padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11.5px; color: var(--faint);
}

/* ---------- responsive ---------- */
@media (max-width: 1160px) {
  .shell { grid-template-columns: 240px minmax(0, 1fr); }
  .rail { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .doc { padding: 34px 22px 70px; }

  /* The sidenav becomes an off-canvas drawer instead of just vanishing —
     losing all navigation and search on mobile is a bigger problem than
     the desktop three-column layout not fitting. */
  .nav-toggle, .search-toggle { display: flex; }
  .brand-ver { display: none; }

  .sidenav {
    position: fixed; top: 0; left: 0; z-index: 70;
    width: min(300px, 84vw); height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform .2s ease;
    padding-top: 63px;
  }
  .sidenav.open { transform: translateX(0); }

  .nav-backdrop {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(10, 11, 14, .4);
  }
  .nav-backdrop[hidden] { display: none; }

  /* On desktop the search box sits inline; on mobile the icon button opens
     it as a full-width overlay under the topbar instead. */
  .search {
    display: none;
    position: fixed; top: 54px; left: 0; right: 0; z-index: 65;
    width: auto; margin: 0;
    border-radius: 0;
    border-width: 0 0 1px;
    padding: 10px 16px;
    box-shadow: var(--shadow);
  }
  .search.open { display: flex; }
  .search kbd { display: none; }
  .search-results { left: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
