/* OxaBank API reference. The site's dark page, drawn with the demos' workspace
   vocabulary: solid surfaces on hairlines, radius 12 cards, sentence-case labels,
   methods as soft tinted tags, a restrained code palette. Framed by an auto-height
   iframe: no sticky parts, no viewport-height layouts; the page is as tall as its content. */
:root {
  --bg: #0c0f16;
  --surface: #12161f;
  --surface-2: #181d28;
  --code-bg: #0e1119;
  --text: #f2f4f8;
  --text-2: #c9ced8;
  --muted: #8a93a3;
  --faint: #5c6473;
  --accent: #e2231a;
  --edge: rgba(232, 236, 242, 0.1);
  --edge-hi: rgba(232, 236, 242, 0.2);
  --line: rgba(232, 236, 242, 0.07);
  --get: #4cc38a;   --get-soft: rgba(18, 134, 90, 0.2);
  --post: #e8a64a;  --post-soft: rgba(184, 110, 10, 0.2);
  --del: #ff8a82;   --del-soft: rgba(226, 35, 26, 0.18);
  --put: #b9b2d6;   --put-soft: rgba(150, 140, 200, 0.16);
  --ok: #4cc38a;
  --no: #ff8a82;
  --param: #ff8a82;
  --type: #a9b1bf;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--bg); }
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
a { color: inherit; }
code, .mono { font-family: var(--mono); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }

.page { padding: 0 0 32px; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- header: a spec line, not a box ---------- */
.head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 8px; }
/* the site page around this frame carries the title, so the frame starts at the facts */
.head > .panel:first-child { display: none; }
.panel { min-width: 0; }
.eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.eyebrow .dot { display: none; }
h1 { margin: 0; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ver { font: 600 12px/1 var(--mono); padding: 5px 8px; border-radius: 6px; color: var(--text-2); background: var(--surface-2); }
.subset { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--text); }
.prose { font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.prose p { margin: 10px 0 0; }
.prose p:first-child { margin-top: 0; }
.prose b, .prose strong { color: var(--text); font-weight: 600; }
.prose code, .tree code, .sum-line code {
  font-size: .92em; padding: 1px 5px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); word-break: break-word;
}
.head .prose { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

.facts { margin: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 0 48px; padding: 4px 0 0; }
.facts > div { min-width: 0; }
.facts > div:nth-child(3) { display: none; }
.facts dt { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 8px; }
.facts dd { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text); min-width: 0; }
.facts dd small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.facts dd code { font: 13px/1.45 var(--mono); color: var(--text); word-break: break-all; }
.dl { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  border: 0; background: none; padding: 0; color: var(--text); font-size: 14px; font-weight: 600;
}
.btn:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.btn svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.btn .ext { font: 500 12px/1 var(--mono); color: var(--muted); }
@media (max-width: 900px) {
  .facts { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .dl { flex-direction: row; gap: 22px; flex-wrap: wrap; }
}

/* ---------- filters: tabs on a hairline, then a tag index ---------- */
.filters { display: grid; gap: 0; margin: 28px 0 36px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 0 32px; align-items: flex-end; border-bottom: 1px solid var(--line); }
.seg { display: flex; gap: 28px; }
.seg button {
  border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--muted);
  font-size: 15px; font-weight: 600; padding: 12px 0 13px; cursor: pointer; transition: color .15s, border-color .15s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--accent); }
.search { position: relative; flex: 0 1 380px; margin-left: auto; min-width: 0; }
.search svg { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.search input {
  width: 100%; font: inherit; font-size: 14px; color: var(--text); background: transparent;
  border: 0; padding: 12px 0 13px 26px; outline: none;
}
.search input::placeholder { color: var(--faint); }
.search:focus-within { box-shadow: inset 0 -2px 0 var(--text); }
.chips { columns: 5 150px; column-gap: 36px; margin: 18px 0 0; }
.chip {
  display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 10px; break-inside: avoid;
  border: 0; background: none; color: var(--text-2); cursor: pointer; text-align: left;
  font-size: 13.5px; font-weight: 500; padding: 5px 0 5px 12px; box-shadow: inset 2px 0 0 transparent; transition: color .15s, box-shadow .15s;
}
.chip:hover { color: var(--text); box-shadow: inset 2px 0 0 var(--edge-hi); }
.chip[aria-pressed="true"] { color: var(--text); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.chip .n { flex: none; color: var(--faint); font-weight: 500; overflow-wrap: normal; }
.chip[aria-pressed="true"] .n { color: var(--accent); }
.status { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.status button { border: 0; background: none; padding: 0; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 12.5px; }
@media (max-width: 640px) {
  .filters-row { gap: 0; }
  .seg { gap: 20px; width: 100%; }
  .seg button { font-size: 14px; }
  .search { flex: 1 1 100%; margin-left: 0; border-top: 1px solid var(--line); }
  .chips { columns: 2; column-gap: 20px; }
}

/* ---------- audiences and groups: a document, rows on hairlines ---------- */
.aud { margin: 0 0 44px; }
.aud-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 4px; }
.aud-head h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.aud-head .cnt { font-size: 13.5px; color: var(--muted); }
.aud-lede { margin: 0 0 20px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.group { margin: 0 0 26px; }
.group-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--text); }
.group-head h3 { margin: 0; font: inherit; }
.group-head .n { color: var(--faint); font-weight: 500; font-size: 13px; }
.ops { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--edge); }

/* ---------- one operation ---------- */
.op { min-width: 0; border-bottom: 1px solid var(--line); }
.op.open { background: rgba(255, 255, 255, .018); }
.op.flash { animation: flash 1.6s ease-out 1; }
@keyframes flash { 0% { box-shadow: inset 3px 0 0 var(--accent); background: rgba(226, 35, 26, .08); } 100% { box-shadow: inset 3px 0 0 transparent; } }
.op-head { display: flex; align-items: stretch; min-width: 0; }
.op-toggle {
  flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: 62px minmax(0, auto) minmax(0, 1fr) 16px; gap: 4px 14px; align-items: center;
  border: 0; background: transparent; text-align: left; cursor: pointer; padding: 13px 6px 13px 2px;
}
.op-toggle:hover { background: rgba(255, 255, 255, .02); }
.op-toggle .chev { width: 14px; height: 14px; color: var(--faint); transition: transform .15s; justify-self: end; }
.op-toggle[aria-expanded="true"] .chev { transform: rotate(90deg); color: var(--text); }
.m {
  display: inline-block; text-align: center; font: 700 11px/1 'Montserrat', sans-serif; letter-spacing: .02em;
  padding: 5px 0; width: 58px; border-radius: 6px;
}
.m.GET { color: var(--get); background: var(--get-soft); }
.m.POST { color: var(--post); background: var(--post-soft); }
.m.DELETE { color: var(--del); background: var(--del-soft); }
.m.PUT, .m.PATCH { color: var(--put); background: var(--put-soft); }
.path { font: 500 13px/1.4 var(--mono); color: var(--text); word-break: break-all; }
.path .pp { color: var(--param); }
.op-sum { font-size: 13px; color: var(--muted); line-height: 1.4; min-width: 0; }
.flag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 5px; color: var(--post); background: var(--post-soft); vertical-align: 1px; }
@media (max-width: 860px) {
  .op-toggle { grid-template-columns: 62px minmax(0, 1fr) 16px; }
  .op-toggle .op-sum { grid-column: 2 / 3; grid-row: 2; }
  .op-toggle .chev { grid-column: 3; grid-row: 1; }
}
@media (max-width: 420px) {
  .op-toggle { grid-template-columns: minmax(0, 1fr) 16px; padding-left: 12px; }
  .op-toggle .m { grid-column: 1; grid-row: 1; justify-self: start; width: auto; padding: 5px 8px; }
  .op-toggle .path { grid-column: 1 / -1; grid-row: 2; }
  .op-toggle .op-sum { grid-column: 1 / -1; grid-row: 3; }
  .op-toggle .chev { grid-column: 2; grid-row: 1; }
  .op-head .icon-btn { align-self: flex-start; height: 40px; margin-top: 6px; }
}
.icon-btn {
  flex: none; width: 40px; border: 0; background: transparent; color: var(--faint); cursor: pointer; border-radius: 8px;
  display: grid; place-items: center; margin: 4px 4px 4px 0;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn.done { color: var(--ok); }

.op-body { padding: 4px 2px 24px 78px; display: grid; gap: 18px; min-width: 0; }
.op-body > * { min-width: 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); padding: 6px 10px; border-radius: 7px; background: var(--surface-2); }
.pill b { color: var(--text); font-weight: 600; }
.pill svg { width: 13px; height: 13px; }
.try { color: var(--bg); background: var(--text); text-decoration: none; font-weight: 600; }
.try b { color: var(--bg); }
.try:hover { background: #fff; }
.warn { margin: 0; font-size: 13px; line-height: 1.5; color: var(--post); padding: 10px 12px; border-radius: 9px; background: var(--post-soft); }

.sec { display: grid; gap: 8px; min-width: 0; }
.lbl { margin: 0; font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lbl .ct { font: 500 11.5px/1 var(--mono); color: var(--muted); }
.lbl .req { color: var(--no); font-weight: 600; font-size: 12px; }

/* parameters: the table scrolls inside itself */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--edge); border-radius: 10px; background: var(--code-bg); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 12.5px; }
th, td { text-align: left; padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
td .mono { font-size: 12px; }
td.in { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
td.nm { font-family: var(--mono); color: var(--text); white-space: nowrap; }
td.ty { font-family: var(--mono); color: var(--type); font-size: 11.5px; }
td.rq { color: var(--no); font-size: 11.5px; font-weight: 600; }
td.ds { color: var(--muted); line-height: 1.5; min-width: 200px; }
td.ds .c { display: block; margin-top: 3px; font-family: var(--mono); font-size: 11px; color: var(--faint); }

/* schema + example side by side when there is room */
.pair { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 10px; align-items: start; min-width: 0; }
@media (max-width: 980px) { .pair { grid-template-columns: minmax(0, 1fr); } }
.pair > div { min-width: 0; }

.tree { border: 1px solid var(--edge); border-radius: 10px; background: var(--code-bg); padding: 4px 0; font-size: 12.5px; min-width: 0; }
.tree-top { padding: 7px 12px 9px; border-bottom: 1px solid var(--line); margin-bottom: 2px; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.tree-top .d { display: block; font-family: 'Montserrat', sans-serif; color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.5; }
.node { padding: 0; }
.node > .row, .node > summary { list-style: none; padding: 6px 12px; display: block; }
.node > summary { cursor: pointer; border-radius: 6px; }
.node > summary::-webkit-details-marker { display: none; }
.node > summary:hover { background: var(--surface-2); }
.node > summary .nm::before {
  content: ''; display: inline-block; width: 0; height: 0; margin-right: 7px; vertical-align: 1px;
  border-left: 5px solid var(--faint); border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .12s;
}
.node[open] > summary .nm::before { transform: rotate(90deg); border-left-color: var(--text); }
.node > .row .nm { padding-left: 12px; }
/* descriptions and values sit under the field name, past the disclosure triangle */
.node > .row > :not(.line1), .node > summary > :not(.line1) { margin-left: 12px; }
.kids { margin: 0 0 4px 17px; padding-left: 0; border-left: 1px solid var(--line); }
.line1 { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.nm { font-family: var(--mono); color: var(--text); font-weight: 500; }
.ty { font-family: var(--mono); color: var(--type); font-size: 11.5px; }
.ty .ref { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 2px; }
.nul { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.rq { font-size: 11px; font-weight: 600; color: var(--no); }
.cons { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.nd { color: var(--muted); line-height: 1.5; margin-top: 2px; font-size: 12px; }
.enum { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.enum code { font: 11px/1 var(--mono); padding: 4px 6px; border-radius: 5px; background: var(--surface-2); color: var(--text-2); }
.enum .more { font-size: 11px; color: var(--faint); align-self: center; }
.cyc { color: var(--faint); font-size: 11.5px; font-style: italic; }

.ex { border: 1px solid var(--edge); border-radius: 10px; background: var(--code-bg); min-width: 0; overflow: hidden; }
.ex-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--line); }
.ex-head .src { font-size: 12px; color: var(--muted); flex: 1 1 auto; }
.ex-tabs { display: flex; flex-wrap: wrap; gap: 14px; padding: 4px 12px 0; border-bottom: 1px solid var(--line); }
.ex-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; padding: 6px 0 7px; cursor: pointer; }
.ex-tabs button:hover { color: var(--text); }
.ex-tabs button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--accent); }
.ex-sum { margin: 8px 12px 0; font-size: 12px; color: var(--muted); }
.mini { border: 1px solid var(--edge-hi); background: transparent; color: var(--text-2); font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.mini:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
pre {
  margin: 0; padding: 10px 12px; font: 11.5px/1.6 var(--mono); color: var(--text-2);
  max-height: 420px; overflow: auto; white-space: pre; tab-size: 2;
}

/* responses */
.resps { display: grid; gap: 0; border-top: 1px solid var(--line); }
.resp { min-width: 0; }
.resp { border-bottom: 1px solid var(--line); }
.resp > summary, .resp > .resp-row { list-style: none; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 10px 2px; }
.resp > summary { cursor: pointer; }
.resp > summary::-webkit-details-marker { display: none; }
.resp > summary:hover { background: var(--surface-2); }
.resp .code-n { font: 700 12.5px/1.4 var(--mono); }
.resp .code-n.ok { color: var(--ok); } .resp .code-n.no { color: var(--no); } .resp .code-n.mid { color: var(--muted); }
.resp .rd { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.resp .rd p { margin: 0 0 4px; } .resp .rd p:last-child { margin: 0; }
.resp .tog { font-size: 12px; color: var(--faint); white-space: nowrap; }
.resp[open] .tog .closed, .resp:not([open]) .tog .opened { display: none; }
.resp-body { padding: 0 0 12px; display: grid; gap: 8px; min-width: 0; }

/* the code that answers the call */
.by { margin: 0; font: 12px/1.45 var(--mono); color: var(--text); word-break: break-all; }
.by b { color: var(--post); font-weight: 600; }
.mods { display: flex; flex-wrap: wrap; gap: 6px; }
.mods span { font: 11.5px/1 var(--mono); padding: 5px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }
pre.code { padding: 10px 0; max-height: 520px; background: var(--code-bg); border: 1px solid var(--edge); border-radius: 10px; }
.code .ln { display: block; padding: 0 12px 0 0; }
.code .ln i { display: inline-block; width: 44px; padding-right: 12px; text-align: right; color: #3d4452; font-style: normal; user-select: none; }
.code .ln.fn { background: rgba(232, 166, 74, .08); box-shadow: inset 2px 0 0 var(--post); }
.code .ln.gap { color: #3d4452; }
.nomap { margin: 0; font-size: 12.5px; color: var(--faint); }
/* restrained palette: strings green, keywords red, numbers amber, types light */
.tk-c { color: #5f6878; font-style: italic; } .tk-s { color: #7fcca5; } .tk-k { color: #ff8a82; } .tk-t { color: #e3e6ec; } .tk-m { color: var(--text-2); } .tk-n { color: #e8a64a; }
.js-k { color: var(--text); } .js-s { color: #7fcca5; } .js-n { color: #e8a64a; } .js-b { color: #ff8a82; }

.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }
.loading { padding: 40px 16px; color: var(--muted); font-size: 13.5px; }

@media (max-width: 560px) {
  .panel { padding: 16px; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .seg { display: flex; }
  .seg button { flex: 1 1 auto; }
  .op-body { padding: 2px 2px 20px; }
  .resp > summary, .resp > .resp-row { grid-template-columns: 38px minmax(0, 1fr); }
  .resp .tog { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* inset focus rings on full-width controls, so the frame's edge never clips them */
.op-toggle:focus-visible, .resp > summary:focus-visible, .node > summary:focus-visible { outline-offset: -2px; }
