/* ============================================================
   API console — sidebar entries, request editor, response panel
   ============================================================ */

/* ---------- method pills ---------- */

.method-pill {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 5px;
  border-radius: 5px;
  min-width: 40px;
  text-align: center;
  flex-shrink: 0;
  border: 1px solid transparent;
  line-height: 1.2;
}
.method-pill.m-get     { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.method-pill.m-post    { color: #b45309; background: #fffbeb; border-color: #fcd34d; }
.method-pill.m-put     { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.method-pill.m-patch   { color: #6d28d9; background: #f5f3ff; border-color: #ddd6fe; }
.method-pill.m-delete  { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.method-pill.m-head,
.method-pill.m-options { color: #475569; background: #f1f5f9; border-color: #cbd5e1; }

[data-theme="dark"] .method-pill.m-get     { color: #6ee7b7; background: #0d2b21; border-color: #157a5b; }
[data-theme="dark"] .method-pill.m-post    { color: #fcd34d; background: #2b2210; border-color: #92400e; }
[data-theme="dark"] .method-pill.m-put     { color: #93c5fd; background: #12203a; border-color: #1e40af; }
[data-theme="dark"] .method-pill.m-patch   { color: #c4b5fd; background: #1e1b3a; border-color: #5b21b6; }
[data-theme="dark"] .method-pill.m-delete  { color: #fca5a5; background: #2c1416; border-color: #9b2c2c; }
[data-theme="dark"] .method-pill.m-head,
[data-theme="dark"] .method-pill.m-options { color: #cbd5e1; background: #1f2937; border-color: #374151; }

/* ---------- sidebar ---------- */

.side-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--nav-line); }

.side-section-head {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--nav-text-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 12px 9px;
  text-align: left;
}
.side-section-head:hover { color: var(--nav-text); }
.side-section-head.on { color: var(--accent-400); }

.api-list .method-pill { min-width: 38px; }
.slide-row.api-row { gap: 8px; }
.slide-row.api-row .label { font-size: 12px; }

.api-folder { margin-left: calc(var(--api-depth, 0) * 6px); }
.api-folder-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--nav-text-2);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 9px;
  border-radius: var(--r-sm);
  text-align: left;
}
.api-folder-row:hover { background: var(--nav-hover); color: var(--nav-text); }
.api-folder-row[aria-expanded="true"] .chev { transform: rotate(90deg); }
.api-folder-items { padding-left: 10px; }

/* ---------- console shell ---------- */

.api-console { gap: 16px; }

.api-intro h1 { font-family: var(--font-display); font-size: 30px; margin: 10px 0 8px; }
.api-intro p { color: var(--text-2); font-size: 14px; line-height: 1.7; max-width: 70ch; }

.api-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.api-card-head { padding: 20px 22px 14px; }
.api-card-head h2 { font-family: var(--font-display); font-size: 20px; margin: 10px 0 6px; }
.api-card-head p { color: var(--text-2); font-size: 13.5px; line-height: 1.65; }

.api-endpoint-list { border-top: 1px solid var(--line); }
.api-endpoint {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 22px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: background .13s var(--ease);
}
.api-endpoint:last-child { border-bottom: 0; }
.api-endpoint:hover { background: var(--surface-2); }
.api-endpoint-name { font-size: 13.5px; font-weight: 600; flex-shrink: 0; }
.api-endpoint-url {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.api-card-more { padding: 11px 22px; font-size: 12.5px; color: var(--text-3); border-top: 1px solid var(--line); }

/* ==========================================================
   Endpoint page — reference layout
   ----------------------------------------------------------
   Two columns: what the endpoint is on the left, what it looks
   like as code (and what came back) pinned on the right.
   ========================================================== */

.content-inner.api-console { max-width: 1420px; }

.api-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 30px;
  align-items: start;
}

.api-doc {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.api-aside { min-width: 0; }
.api-aside-inner {
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100dvh - var(--topbar-h) - 36px);
}

/* ---------- request head ---------- */

.api-head { min-width: 0; }
.api-head h1 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 11px 0 0;
  line-height: 1.2;
  letter-spacing: -.01em;
}

/* The method + resolved URL, the way a reference page opens. */
.api-endpoint-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  min-width: 0;
}
.api-endpoint-bar code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  overflow-wrap: anywhere;
  min-width: 0;
}

.api-description {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.75;
  margin-top: 16px;
  max-width: 74ch;
}

/* ---------- documentation sections ---------- */

.api-doc-section { min-width: 0; }
.api-doc-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-2);
  padding-bottom: 9px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.api-doc-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand-text);
  background: var(--brand-soft);
  border-radius: var(--r-pill);
  padding: 2px 8px;
}

/* ---------- base URL ---------- */

.api-baseurl { min-width: 0; }
.api-baseurl label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
}
.api-baseurl input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
}
.api-baseurl input:placeholder-shown { color: var(--text-2); }
.api-baseurl-note {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-3);
}
.api-baseurl-note code {
  font-family: var(--font-mono);
  font-size: .92em;
  color: var(--brand-text);
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 5px;
}
.api-baseurl-note strong { color: var(--text-2); font-weight: 600; }

/* On the collection index it sits between the blurb and the endpoint list. */
.api-card-base {
  padding: 14px 22px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

/* ---------- parameter fields ---------- */

.api-fields { display: flex; flex-direction: column; gap: 16px; }

.api-field { min-width: 0; }
.api-field-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.api-field-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.api-field-type {
  font-size: 11.5px;
  font-style: italic;
  color: var(--text-3);
}
.api-field-req {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--bad-fg);
}
.api-field input { font-family: var(--font-mono); font-size: 12.5px; }
.api-field.missing input { border-color: var(--warn-line); }
.api-field-desc { margin-top: 7px; font-size: 12.5px; }

.api-urlbar {
  display: flex;
  gap: 9px;
  align-items: stretch;
}
.api-urlbar select {
  width: auto;
  min-width: 108px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  flex-shrink: 0;
}
.api-urlbar select.m-get    { color: #047857; }
.api-urlbar select.m-post   { color: #b45309; }
.api-urlbar select.m-put    { color: #1d4ed8; }
.api-urlbar select.m-patch  { color: #6d28d9; }
.api-urlbar select.m-delete { color: #b91c1c; }
.api-urlbar input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12.5px;
  min-width: 0;
}
.api-urlbar .btn, .api-urlbar .icon-btn { flex-shrink: 0; }

.api-issues { display: flex; flex-direction: column; gap: 8px; }
.api-issues:empty { display: none; }

/* ---------- code panel (right column) ---------- */

.api-code-panel,
.api-response {
  /* Dark in both themes: a code sample reads as a terminal, not as a card. */
  background: #0d1220;
  border: 1px solid #1e2942;
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.api-code-head,
.api-response-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #1e2942;
  background: #111a2c;
  flex-shrink: 0;
}
.api-code-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #6b7a99;
  flex-shrink: 0;
}

.api-lang-tabs { display: flex; gap: 2px; margin-left: auto; }
.api-lang-tab {
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  color: #8592ad;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .13s var(--ease), background .13s var(--ease);
}
.api-lang-tab:hover { color: #dfe6f5; background: #1b2540; }
.api-lang-tab.on { color: #fff; background: var(--brand-600); }

.api-code-copy {
  background: none;
  border: 0;
  color: #6b7a99;
  padding: 5px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  flex-shrink: 0;
  transition: color .13s var(--ease), background .13s var(--ease);
}
.api-code-copy:hover { color: #dfe6f5; background: #1b2540; }

.api-code-block {
  margin: 0;
  padding: 14px 15px;
  overflow: auto;
  max-height: 340px;
  min-height: 0;
}
.api-code-block code {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: #c8d3e8;
  white-space: pre;
}

.api-code-foot { padding: 11px 12px; border-top: 1px solid #1e2942; flex-shrink: 0; }
.api-code-foot .btn-primary { justify-content: center; }

/* ---------- response panel ---------- */

.api-response-empty {
  /* Block, not flex: as a flex container every word of the prompt became its
     own item and the sentence broke apart mid-phrase. */
  display: block;
  padding: 26px 20px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #6b7a99;
  text-align: center;
}
.api-response.sending .api-response-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.api-response-empty strong { color: #b9c5dc; }

.spinner-sm { width: 14px; height: 14px; border-width: 2px; flex-shrink: 0; }
/* On the dark panel and on the brand-coloured button, the default track and
   head colours have almost no contrast. */
.api-response .spinner-sm { border-color: #26314d; border-top-color: var(--brand-400); }
.btn-primary .spinner-sm {
  border-color: rgba(255, 255, 255, .35);
  border-top-color: #fff;
}

/* Indeterminate bar: the proxy gives no progress events, so this says "still
   working" without pretending to know how far along it is. */
.api-progress { height: 2px; background: #1e2942; overflow: hidden; flex-shrink: 0; }
.api-progress > i {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand-500), var(--accent-400));
  animation: api-progress-slide 1.1s var(--ease) infinite;
}
@keyframes api-progress-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(340%); }
}
@media (prefers-reduced-motion: reduce) {
  .api-progress > i { animation: none; width: 100%; }
}

/* ---------- tabs ---------- */

.api-resp-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  border-bottom: 1px solid #1e2942;
  background: #0f1728;
  overflow-x: auto;
  flex-shrink: 0;
}
.api-tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color .13s var(--ease), background .13s var(--ease);
}
.api-resp-tabs .api-tab { color: #8592ad; font-size: 12px; padding: 6px 10px; }
.api-resp-tabs .api-tab:hover { color: #dfe6f5; background: #1b2540; }
.api-resp-tabs .api-tab.on { color: #fff; border-bottom-color: var(--brand-400); background: none; }

.api-subsection + .api-subsection { margin-top: 22px; }
.api-subsection:first-child { margin-top: 0; }
.api-subsection h4 {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .045em;
  color: var(--text-2);
  margin-bottom: 8px;
}
.api-sub-hint {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.6;
  margin-bottom: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

/* ---------- editable rows ---------- */

.api-table { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.api-table-head, .api-row-edit {
  display: grid;
  grid-template-columns: 30px minmax(120px, 1fr) minmax(140px, 1.6fr) minmax(0, 1.1fr) 34px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
}
.api-table-head {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
}
.api-row-edit { border-bottom: 1px solid var(--line); }
.api-row-edit:last-of-type { border-bottom: 0; }
.api-row-edit.off { opacity: .45; }
.api-row-edit input[type=text] {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
}
.api-row-edit input[readonly] { background: var(--surface-3); color: var(--text-2); }
.api-check { display: grid; place-items: center; }
.api-check input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.api-row-desc {
  font-size: 11.5px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-addrow { margin: 8px 10px; }
.api-empty-rows {
  padding: 16px;
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
}

/* ---------- path variables ---------- */

.api-pathvars { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.api-pathvar label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin-bottom: 5px;
}
.api-pathvar code { font-family: var(--font-mono); font-weight: 600; color: var(--brand-text); }
.api-pathvar input { font-family: var(--font-mono); font-size: 12.5px; }
.api-pathvar.missing input { border-color: var(--bad-line); }
/* These sit outside `.field`, so they don't inherit its hint styling. */
.api-pathvar .hint, .api-var .hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }
.req-flag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--bad-fg);
  background: var(--bad-bg);
  border: 1px solid var(--bad-line);
  padding: 1px 5px;
  border-radius: var(--r-pill);
}
.req-flag.warn {
  color: var(--warn-fg);
  background: var(--warn-bg);
  border-color: var(--warn-line);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ---------- body ---------- */

.api-body-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.api-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: all .13s var(--ease);
}
.api-chip:hover { border-color: var(--line-strong); color: var(--text); }
.api-chip.on { background: var(--brand-soft); border-color: var(--brand-200); color: var(--brand-text); font-weight: 600; }
[data-theme="dark"] .api-chip.on { border-color: var(--brand-700); }

.api-body-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; flex-wrap: wrap; }
.api-body-bar select { width: auto; min-width: 110px; font-size: 12px; padding: 5px 9px; }
.api-body-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-3);
}
.api-body-status.ok { color: var(--ok-fg); }
.api-body-status.bad { color: var(--bad-fg); }

.api-code-input {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  tab-size: 2;
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  min-height: 140px;
}
.api-code-input.invalid { border-color: var(--bad-line); background: var(--bad-bg); }

.api-auth-fields { max-width: 520px; }
.api-vars { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-bottom: 16px; }
.api-var label { display: flex; align-items: center; gap: 7px; font-size: 12px; margin-bottom: 5px; }
.api-var code { font-family: var(--font-mono); color: var(--brand-text); font-weight: 600; }
.api-var input { font-family: var(--font-mono); font-size: 12.5px; }

.api-implied { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.api-implied > div, .api-kv-list > div {
  display: grid;
  grid-template-columns: minmax(140px, 240px) 1fr;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  align-items: baseline;
}
.api-implied > div:last-child, .api-kv-list > div:last-child { border-bottom: 0; }
.api-implied code, .api-kv-list code { font-family: var(--font-mono); color: var(--brand-text); font-weight: 600; }
.api-implied span, .api-kv-list span {
  font-family: var(--font-mono);
  color: var(--text-2);
  overflow-wrap: anywhere;
}

/* ---------- code snippets ---------- */

.api-snippet + .api-snippet { margin-top: 16px; }
.api-snippet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
}
.api-snippet pre, .api-response-body, .api-example pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 15px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: var(--text);
  max-height: 520px;
  white-space: pre;
}

/* ---------- response body (inside the dark panel) ---------- */

.api-response-head .api-meta { color: #8592ad; }
.api-response-head .api-code-copy { margin-left: auto; }

.api-response-body-wrap {
  padding: 12px 14px;
  overflow: auto;
  min-height: 0;
  max-height: 420px;
}
.api-response-body {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  max-height: none;
  color: #c8d3e8;
}
.api-response-body-wrap .api-empty-rows {
  background: none;
  border-color: #1e2942;
  color: #6b7a99;
}
.api-response-body-wrap .api-kv-list > div { border-bottom-color: #1e2942; }
.api-response-body-wrap .api-kv-list code { color: var(--brand-300); }
.api-response-body-wrap .api-kv-list span { color: #a9b6cf; }
.api-response-body-wrap .api-example { border-color: #1e2942; }
.api-response-body-wrap .api-example pre {
  background: #0a0f1a;
  border-color: #1e2942;
  color: #c8d3e8;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  border: 1px solid;
}
.status-pill.ok    { color: var(--ok-fg);   background: var(--ok-bg);   border-color: var(--ok-line); }
.status-pill.redir { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.status-pill.warn  { color: var(--warn-fg); background: var(--warn-bg); border-color: var(--warn-line); }
.status-pill.err   { color: var(--bad-fg);  background: var(--bad-bg);  border-color: var(--bad-line); }
.status-pill.info  { color: var(--text-2);  background: var(--surface-3); border-color: var(--line); }
[data-theme="dark"] .status-pill.redir { color: #93c5fd; background: #12203a; border-color: #1e40af; }

.api-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
}
.api-meta.warn { color: var(--warn-fg); }

.api-example { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; }
.api-example summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.api-example pre { margin: 0 13px 13px; }

/* ---------- JSON tokens ---------- */

.tok-key  { color: #7c3aed; }
.tok-str  { color: #047857; }
.tok-num  { color: #b45309; }
.tok-bool { color: #1d4ed8; }
.tok-null { color: var(--text-3); }

[data-theme="dark"] .tok-key  { color: #c4b5fd; }
[data-theme="dark"] .tok-str  { color: #6ee7b7; }
[data-theme="dark"] .tok-num  { color: #fcd34d; }
[data-theme="dark"] .tok-bool { color: #93c5fd; }

/* ---------- admin ---------- */

.dropzone.compact { padding: 24px 20px; margin: 12px 14px; }
.dropzone.compact h3 { font-size: 15px; }
.stype-pill.api { background: var(--brand-soft); color: var(--brand-text); }

/* ---------- rendered Markdown ----------
   Postman descriptions are Markdown; utils.js `markdown()` renders them into
   a `.md` container. Everything here is scoped to that container so it can
   never reach the course views. */

.md { color: var(--text-2); font-size: 13.5px; line-height: 1.75; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }

.md p { margin: 0 0 10px; }
.md strong { color: var(--text); font-weight: 650; }
.md em { font-style: italic; }

.md h3, .md h4, .md h5, .md h6 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.35;
  margin: 18px 0 8px;
}
.md h3 { font-size: 15.5px; }
.md h4 { font-size: 14px; }
.md h5, .md h6 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }

.md code {
  font-family: var(--font-mono);
  font-size: .89em;
  padding: 1px 4px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--brand-text);
  overflow-wrap: anywhere;
}

.md-code {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  overflow-x: auto;
}
.md-code code {
  padding: 0;
  background: none;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre;
}

.md-list { margin: 0 0 12px; padding-left: 20px; }
.md-list li { margin: 4px 0; padding-left: 3px; }
.md-list li::marker { color: var(--text-3); }
.md ol.md-list li::marker { font-variant-numeric: tabular-nums; font-weight: 600; }

.md-quote {
  margin: 0 0 12px;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--brand-200);
  color: var(--text-3);
}
[data-theme="dark"] .md-quote { border-left-color: var(--brand-700); }

.md-rule { margin: 16px 0; border: 0; border-top: 1px solid var(--line); }

/* Collection card: lead paragraph, with the rest folded away. */
.api-card-lead { margin-top: 8px; max-width: 78ch; }

.api-card-more-desc { margin-top: 10px; max-width: 78ch; }
.api-card-more-desc > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-text);
  padding: 4px 0;
  user-select: none;
}
.api-card-more-desc > summary::-webkit-details-marker { display: none; }
.api-card-more-desc > summary .chev { display: inline-flex; transition: transform .2s var(--ease); }
.api-card-more-desc[open] > summary .chev { transform: rotate(90deg); }
.api-card-more-desc > .md { padding: 6px 0 2px 17px; }

/* ---------- responsive ---------- */

/* Below this the two columns are too narrow to be worth keeping side by side,
   so the code and response panels move under the documentation. */
@media (max-width: 1180px) {
  .api-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .api-aside-inner { position: static; max-height: none; }
  .api-code-block { max-height: 280px; }
}

@media (max-width: 780px) {
  .api-code-head { flex-wrap: wrap; }
  .api-lang-tabs { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
  .api-code-copy { margin-left: auto; }

  .api-urlbar { flex-wrap: wrap; }
  .api-urlbar input { flex-basis: 100%; order: 3; }
  .api-table-head { display: none; }
  .api-row-edit {
    grid-template-columns: 26px 1fr 30px;
    grid-template-areas: 'check key del' '. value value';
    row-gap: 6px;
  }
  .api-row-edit .api-check { grid-area: check; }
  .api-row-edit .api-key { grid-area: key; }
  .api-row-edit .api-value { grid-area: value; }
  .api-row-edit .api-row-desc { display: none; }
  .api-row-edit .icon-btn { grid-area: del; }
  .api-endpoint { flex-wrap: wrap; }
}
