
:root {
  --ink: #16181d;
  --ink-2: #4a5058;
  --ink-3: #868d96;
  --line: #e7e9ec;
  --line-2: #f2f3f5;
  --bg: #ffffff;
  --bg-2: #fafbfc;
  --brand: #ED3028;
  --charcoal: #352F36;

  /* One dark surface for every code panel, so the eye reads them as a column
     rather than as separate boxes. */
  --code-bg: #22212a;
  --code-bg-2: #1b1a22;
  --code-ink: #dcd9e3;
  --code-line: rgba(255,255,255,.07);

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --side-w: 276px;
  --top-h: 56px;
  --gut: 44px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 20px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14.5px; line-height: 1.68;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Inline code sits INSIDE sentences, so it must not shout. A tint and a hair
   of padding is enough to mark it; a grey block breaks the reading line. */
code { font-family: var(--mono); font-size: 0.855em; }
.prose code, .fields code, .card-v code, td code {
  background: #f4f5f7; border: 1px solid #e8eaed; border-radius: 4px;
  padding: 0.5px 4px; color: #3a3f47; white-space: nowrap;
}

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 40; height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 22px;
  background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 7px; background: var(--brand); color: #fff;
  font-weight: 800; font-size: 14px; line-height: 1;
}
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -0.012em; }
.ver {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px;
}
.ghost {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 7px; padding: 5px 11px;
}
.ghost:hover { background: var(--bg-2); border-color: #d9dce0; text-decoration: none; color: var(--ink); }

/* ---------- layout ---------- */
.shell { display: flex; align-items: flex-start; }
.side {
  position: sticky; top: var(--top-h);
  width: var(--side-w); flex: 0 0 var(--side-w);
  height: calc(100vh - var(--top-h)); overflow-y: auto;
  border-right: 1px solid var(--line); padding: 16px 10px 60px;
  scrollbar-width: thin;
}
.side::-webkit-scrollbar { width: 8px; }
.side::-webkit-scrollbar-thumb { background: #e2e5e9; border-radius: 8px; }
.main { flex: 1 1 auto; min-width: 0; padding: 0 0 80px; }

/* ---------- nav ---------- */
.filter {
  width: 100%; height: 32px; margin-bottom: 10px; padding: 0 10px;
  font: inherit; font-size: 12.5px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 7px; background: var(--bg-2);
}
.filter::placeholder { color: var(--ink-3); }
.filter:focus { outline: none; border-color: var(--brand); background: #fff; }
.nav-group { margin-top: 16px; }
.nav-head {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); padding: 0 9px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 9px; border-radius: 6px;
  color: var(--ink-2); font-size: 13px; line-height: 1.5;
}
.nav-item:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }
.nav-item.active { background: rgba(237,48,40,.06); color: var(--brand); font-weight: 600; }
.nav-item.active .m { opacity: 1; }
.nav-plain { font-weight: 600; color: var(--ink); font-size: 13.5px; padding: 5px 9px; }
.np { font-family: var(--mono); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item.hidden, .nav-group.hidden { display: none; }

/* ---------- method chips ---------- */
.m {
  display: inline-block; min-width: 42px; text-align: center;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .05em;
  padding: 2px 5px; border-radius: 4px; color: #fff; flex: 0 0 auto;
  opacity: .92;
}
.m-get { background: #17794a; }
.m-post { background: #1a56c4; }
.m-put, .m-patch { background: #a35c00; }
.m-delete { background: #c9302a; }

/* ---------- content ---------- */
.tag-block { border-top: 1px solid var(--line); }
.tag-block > h2 {
  margin: 0; padding: 52px var(--gut) 2px;
  font-size: 24px; font-weight: 700; letter-spacing: -0.025em;
}
.tag-desc { margin: 0; padding: 0 var(--gut) 10px; color: var(--ink-2); max-width: 60ch; font-size: 14.5px; }

.op {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: var(--gut); padding: 26px var(--gut) 32px;
  border-top: 1px solid var(--line-2);
}
.tag-block > .op:first-of-type { border-top: none; }
#introduction { border-top: none; padding-top: 34px; }

.op-doc { min-width: 0; }
.op-code { min-width: 0; position: sticky; top: calc(var(--top-h) + 22px); align-self: start; }

.op-doc h1 { margin: 0 0 10px; font-size: 32px; font-weight: 750; letter-spacing: -0.035em; }
.op-doc h3 {
  margin: 0 0 7px; display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 600; scroll-margin-top: 84px;
}
.op-doc h3 .p { font-family: var(--mono); font-size: 13.5px; color: var(--ink); word-break: break-all; }
.hash { opacity: 0; color: var(--ink-3); font-weight: 400; transition: opacity .12s; }
.op:hover .hash { opacity: 1; }
.hash:hover { color: var(--brand); text-decoration: none; }
.op-doc h4 {
  margin: 24px 0 8px; font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}
.summary { margin: 0 0 9px; font-size: 15.5px; font-weight: 500; color: var(--ink); }
.modes { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.badge-open {
  display: inline-block; margin: 4px 0 0; padding: 2px 9px;
  font-size: 10.5px; font-weight: 650; border-radius: 999px;
  background: #ecf7f0; color: #17794a; letter-spacing: .01em;
}

.prose { color: var(--ink-2); max-width: 62ch; }
.prose h3 { display: block; margin: 28px 0 7px; font-size: 16px; font-weight: 680; color: var(--ink); letter-spacing: -0.012em; }
.prose h4 { margin: 22px 0 6px; font-size: 13.5px; font-weight: 680; text-transform: none; letter-spacing: 0; color: var(--ink); }
.prose h5 { margin: 16px 0 4px; font-size: 13px; font-weight: 680; color: var(--ink); }
.prose p { margin: 0 0 11px; }
.prose ul { margin: 0 0 12px; padding-left: 18px; }
.prose li { margin: 3px 0; }
.prose strong { color: var(--ink); font-weight: 620; }
.md-code {
  margin: 0 0 14px; padding: 11px 13px; overflow-x: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 7px;
  font-family: var(--mono); font-size: 12px; line-height: 1.62; color: #3a3f47;
}
.md-code code { background: none; border: 0; padding: 0; white-space: pre; }

/* ---------- tables ---------- */
.fields, .md-table {
  width: 100%; border-collapse: collapse; margin: 0 0 14px;
  font-size: 13px; table-layout: auto;
}
.fields th, .md-table th {
  text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
  padding: 0 12px 6px 0; border-bottom: 1px solid var(--line);
}
.fields td, .md-table td {
  padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line-2);
  vertical-align: top; color: var(--ink-2); line-height: 1.6;
}
.fields tr:last-child td, .md-table tr:last-child td { border-bottom: 0; }
.fields td:first-child { white-space: nowrap; }
.fields .ty { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.req {
  display: block; margin-top: 2px; font-family: var(--sans);
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--brand);
}
.enum { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.fields p, .md-table p { margin: 0 0 6px; }
.fields p:last-child, .md-table p:last-child { margin-bottom: 0; }
.errors td:first-child { white-space: normal; }
.md-table td:first-child { white-space: nowrap; }

/* ---------- the summary card in the introduction ---------- */
.card {
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2); padding: 4px 14px; margin-bottom: 14px;
}
.card-row {
  display: flex; align-items: baseline; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--line-2);
}
.card-row:last-child { border-bottom: 0; }
.card-k {
  flex: 0 0 92px; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
.card-v { font-family: var(--mono); font-size: 12.5px; color: var(--ink); word-break: break-all; }
.card-v.plain { font-family: var(--sans); font-size: 13px; color: var(--ink-2); }
.card-v .tk { color: var(--brand); }

/* ---------- code panels ---------- */
.panel {
  border-radius: 10px; overflow: hidden; margin-bottom: 12px;
  background: var(--code-bg); border: 1px solid rgba(0,0,0,.14);
  box-shadow: 0 1px 2px rgba(16,18,22,.06);
}
.tabs {
  display: flex; gap: 1px; padding: 0 6px; overflow-x: auto;
  background: var(--code-bg-2); border-bottom: 1px solid var(--code-line);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font: inherit; font-size: 11.5px; font-weight: 600;
  padding: 8px 11px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: rgba(220,217,227,.55); cursor: pointer;
  white-space: nowrap;
}
.tab:hover { color: #fff; }
.tab.on { color: #fff; border-bottom-color: var(--brand); }
.panel-head {
  padding: 8px 13px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: rgba(220,217,227,.5); background: var(--code-bg-2);
  border-bottom: 1px solid var(--code-line);
}
.panel-head .status { color: #59d999; margin-left: 6px; }
.sample {
  display: none; position: relative; margin: 0; padding: 13px 14px 15px;
  overflow-x: auto; font-family: var(--mono); font-size: 12px;
  line-height: 1.7; color: var(--code-ink); white-space: pre; tab-size: 2;
}
.sample.on { display: block; }
.sample::-webkit-scrollbar { height: 8px; }
.sample::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; }
.copy {
  position: absolute; top: 9px; right: 11px;
  font: inherit; font-family: var(--sans); font-size: 10.5px; font-weight: 650;
  padding: 3px 9px; border-radius: 5px; cursor: pointer;
  background: rgba(255,255,255,.1); color: rgba(220,217,227,.85);
  border: 1px solid rgba(255,255,255,.13); opacity: 0; transition: opacity .14s;
}
.panel:hover .copy, .copy:focus { opacity: 1; }
.copy:hover { background: rgba(255,255,255,.19); color: #fff; }
.copy.done { background: #17794a; border-color: #17794a; color: #fff; opacity: 1; }

/* ---------- syntax tokens ---------- */
.t-key     { color: #8ec7ff; }
.t-str     { color: #a5e6a0; }
.t-num     { color: #f3c07b; }
.t-lit     { color: #e39ff5; }
.t-kw      { color: #ff9d8a; font-weight: 600; }
.t-comment { color: #6f6b7d; font-style: italic; }
.t-punc    { color: rgba(220,217,227,.45); }
.t-flag    { color: #f3c07b; }
.t-url     { color: #a5e6a0; }
.t-var     { color: #8ec7ff; }
.t-fn      { color: #c9b3ff; }
.t-const   { color: #f3c07b; }
.t-tag     { color: #6f6b7d; }
.t-sym     { color: #e39ff5; }

.foot {
  padding: 40px var(--gut); border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 12.5px;
}

/* ---------- narrow ---------- */
@media (max-width: 1240px) {
  .op { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .op-code { position: static; }
  .prose, .tag-desc { max-width: none; }
}
@media (max-width: 880px) {
  :root { --gut: 20px; }
  .shell { flex-direction: column; }
  .side {
    position: static; width: 100%; flex-basis: auto; height: auto;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 12px 18px;
  }
}
