/* Cashbanx developer portal — stylesheet shared by every page. */

:root {
  --accent: #0b6b5e;
  --accent-hover: #095a4f;
  --accent-ink: #ffffff;
  --accent-wash: #e9f2f0;
  --accent-edge: #b8d4ce;

  --ground: #f7f9f8;
  --surface: #ffffff;
  --surface-sunk: #eef2f1;
  --line: #d5dedb;
  --line-soft: #e6ecea;
  --ink: #101917;
  --ink-soft: #3d4d49;
  --muted: #5f6f6b;

  --ok: #0f7a52;
  --ok-wash: #e6f4ec;
  --warn: #a8620a;
  --warn-wash: #fbf0e2;
  --bad: #b3402f;
  --bad-wash: #fbecea;

  --code-bg: #10201d;
  --code-ink: #d7e6e2;
  --code-key: #7fd3c4;
  --code-str: #e5c07b;
  --code-num: #a3c9f5;
  --code-lit: #d59bd8;
  --code-punct: #6d8b85;

  --font-display: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;

  --sidebar: 16.5rem;
  --topbar: 3.5rem;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --accent: #2fb39b;
    --accent-hover: #47c6ae;
    --accent-ink: #06201b;
    --accent-wash: #122c27;
    --accent-edge: #245047;

    --ground: #0b1312;
    --surface: #111d1a;
    --surface-sunk: #16241f;
    --line: #24352f;
    --line-soft: #1b2925;
    --ink: #e6efec;
    --ink-soft: #c2d2ce;
    --muted: #8ba39d;

    --ok: #3fbd84;
    --ok-wash: #10281e;
    --warn: #d69440;
    --warn-wash: #2b2013;
    --bad: #e2705c;
    --bad-wash: #2d1714;

    --code-bg: #08110f;
    --code-ink: #cfe0dc;
  }
}

:root[data-theme='dark'] {
  --accent: #2fb39b;
  --accent-hover: #47c6ae;
  --accent-ink: #06201b;
  --accent-wash: #122c27;
  --accent-edge: #245047;

  --ground: #0b1312;
  --surface: #111d1a;
  --surface-sunk: #16241f;
  --line: #24352f;
  --line-soft: #1b2925;
  --ink: #e6efec;
  --ink-soft: #c2d2ce;
  --muted: #8ba39d;

  --ok: #3fbd84;
  --ok-wash: #10281e;
  --warn: #d69440;
  --warn-wash: #2b2013;
  --bad: #e2705c;
  --bad-wash: #2d1714;

  --code-bg: #08110f;
  --code-ink: #cfe0dc;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 1.5rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-synthesis-weight: none;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 60;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s;
}
.skip:focus {
  top: 0.6rem;
  color: var(--accent-ink);
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar .home {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.topbar .home .mark {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 5px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.topbar .crumb {
  color: var(--muted);
  font-size: 0.9rem;
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}
.topbar .spacer {
  flex: 1;
}

.ctl {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}
.ctl:hover {
  border-color: var(--accent-edge);
  color: var(--ink);
}

.langs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.langs a,
.langs span {
  padding: 0 0.6rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--muted);
  background: var(--surface);
}
.langs .on {
  background: var(--accent);
  color: var(--accent-ink);
}
.langs a:hover {
  background: var(--surface-sunk);
  color: var(--ink);
}

.menu-btn {
  display: none;
}

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

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  align-items: start;
  max-width: 84rem;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: var(--topbar);
  max-height: calc(100vh - var(--topbar));
  overflow-y: auto;
  padding: 1.75rem 1rem 3rem 1.25rem;
}
.sidebar .label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem 0.6rem;
}
.sidebar ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar a {
  display: flex;
  gap: 0.6rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.4;
  border-left: 2px solid transparent;
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s;
}
.sidebar a .n {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.55;
  padding-top: 0.1rem;
}
.sidebar a:hover {
  color: var(--ink);
  background: var(--surface-sunk);
}
.sidebar a[aria-current='true'] {
  color: var(--accent);
  background: var(--accent-wash);
  border-left-color: var(--accent);
  font-weight: 600;
}
.sidebar a[aria-current='true'] .n {
  opacity: 1;
}

main {
  padding: 2.5rem 2.5rem 6rem;
  min-width: 0;
}
.prose {
  max-width: 46rem;
}

/* A page with no sidebar: the column becomes the centre rather than what is left of it. */
.shell.plain {
  max-width: 58rem;
  grid-template-columns: minmax(0, 1fr);
}
.shell.plain main {
  padding-top: 3.5rem;
}
.shell.plain .prose {
  max-width: none;
}

/* ---------- page head ---------- */

.pagehead {
  margin-bottom: 2.5rem;
}
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0 0 0.6rem;
}
.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  max-width: 40rem;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.meta span {
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--surface-sunk);
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  padding: 0.15rem 0.7rem;
}
.meta b {
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- headings ---------- */

h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
  margin: 3.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--topbar) + 1rem);
}
h2:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
h2 .n {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  display: block;
  margin-bottom: 0.25rem;
  letter-spacing: 0.04em;
}
h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.6rem;
  scroll-margin-top: calc(var(--topbar) + 1rem);
}
.anchor {
  opacity: 0;
  margin-left: 0.4rem;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8em;
  font-weight: 400;
  transition: opacity 0.15s;
}
h2:hover .anchor,
h3:hover .anchor,
.anchor:focus-visible {
  opacity: 1;
}

p {
  margin: 0 0 1rem;
}
ul,
ol.list {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
}
ul li,
ol.list li {
  margin-bottom: 0.5rem;
}
ul li::marker {
  color: var(--accent);
}
strong,
b {
  font-weight: 650;
  color: var(--ink);
}

/* ---------- inline code ---------- */

code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: var(--surface-sunk);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 0.08em 0.35em;
  word-break: break-word;
}

/* ---------- code blocks ---------- */

.code {
  position: relative;
  background: var(--code-bg);
  border-radius: var(--radius);
  margin: 0 0 1.5rem;
  overflow: hidden;
}
.code pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--code-ink);
  tab-size: 2;
}
.code pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}
.copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  height: 1.75rem;
  padding: 0 0.6rem;
  border: 1px solid #2a4741;
  border-radius: 4px;
  background: rgba(21, 40, 36, 0.075);
  color: #8fb0a9;
  font: 600 0.7rem/1 var(--font-body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.code:hover .copy,
.copy:focus-visible {
  opacity: 1;
}

/* A touch device fires no hover and shows no focus ring, so the button would stay invisible
   for good — and invisible at zero opacity still takes the tap, which is worse than absent. */
@media (hover: none) {
  .copy {
    opacity: 1;
  }
}
.copy:hover {
  color: var(--code-key);
  border-color: var(--code-key);
}
.copy[data-done='1'] {
  color: var(--code-key);
  border-color: var(--code-key);
  opacity: 1;
}

.tok-key {
  color: var(--code-key);
}
.tok-str {
  color: var(--code-str);
}
.tok-num {
  color: var(--code-num);
}
.tok-lit {
  color: var(--code-lit);
}
.tok-punct {
  color: var(--code-punct);
}
.tok-cm {
  color: var(--code-punct);
  font-style: italic;
}

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

.tabs {
  margin: 0 0 1.5rem;
}
.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: -1px;
}
.tablist button {
  font: 600 0.78rem/1 var(--font-mono);
  letter-spacing: 0.01em;
  padding: 0.6rem 0.85rem;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s;
}
.tablist button:hover {
  color: var(--ink);
  background: var(--surface-sunk);
}
.tablist button[aria-selected='true'] {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--line);
  border-bottom: 1px solid var(--surface);
}
.tabpanel {
  border: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  overflow: hidden;
}
.tabpanel .code {
  margin: 0;
  border-radius: 0;
}
.tabpanel > p {
  margin: 0;
  padding: 0.8rem 1.1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- tables ---------- */

/* Only the tall table scrolls inside itself, which is what makes the sticky header worth having. */
.tablewrap.tall {
  max-height: 30rem;
  overflow-y: auto;
}

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 1.5rem;
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th,
td {
  padding: 0.55rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
thead th {
  background: var(--surface-sunk);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--surface-sunk);
}
td.mono,
th.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
td.mono {
  color: var(--ink);
}
td.num {
  font-variant-numeric: tabular-nums;
}
.absent {
  color: var(--muted);
  font-style: italic;
}

/* ---------- filter ---------- */

.filter {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.75rem;
}
.filter input {
  flex: 1;
  max-width: 22rem;
  height: 2.2rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
}
.filter input::placeholder {
  color: var(--muted);
}
.filter input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.filter .count {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.noresult {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 100px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill-ok {
  background: var(--ok-wash);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 25%, transparent);
}
.pill-warn {
  background: var(--warn-wash);
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 25%, transparent);
}
.pill-bad {
  background: var(--bad-wash);
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 25%, transparent);
}
.pill-flat {
  background: var(--surface-sunk);
  color: var(--muted);
  border-color: var(--line);
}

.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--warn-wash);
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 0.6rem;
}

/* ---------- callout ---------- */

.note {
  background: var(--accent-wash);
  border: 1px solid var(--accent-edge);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.5rem;
}
.note .title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.3rem;
  color: var(--ink);
}
.note p:last-child {
  margin-bottom: 0;
}
.note.warn {
  background: var(--warn-wash);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
}

/* ---------- endpoint ---------- */

.endpoint {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  margin: 0 0 1.25rem;
  word-break: break-all;
}
.endpoint .verb {
  background: var(--code-key);
  color: #06201b;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

/* ---------- doc cards (index) ---------- */

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  margin-bottom: 2rem;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.card:hover {
  border-color: var(--accent-edge);
  transform: translateY(-2px);
}
.card h3 {
  margin: 0;
  font-size: 1.05rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}
.card .links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
}
.card .links a {
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.3rem 0.7rem;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.card .links a:hover {
  background: var(--accent-wash);
  border-color: var(--accent-edge);
}

/* ---------- footer ---------- */

footer.doc {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 46rem;
}

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

@media (max-width: 60rem) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .menu-btn {
    display: inline-flex;
  }
  .topbar .crumb {
    display: none;
  }
  .sidebar {
    position: fixed;
    inset: var(--topbar) auto 0 0;
    width: min(20rem, 82vw);
    background: var(--surface);
    border-right: 1px solid var(--line);
    z-index: 50;
    transform: translateX(-102%);
    /* `transform` alone moves it out of sight and leaves it in the tab order: a keyboard user
       would walk all 13 invisible sections before reaching the text. */
    visibility: hidden;
    transition:
      transform 0.2s ease,
      visibility 0.2s;
    max-height: none;
    height: calc(100vh - var(--topbar));
  }
  .sidebar[data-open='1'] {
    transform: none;
    visibility: visible;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.22);
  }
  .scrim {
    position: fixed;
    inset: var(--topbar) 0 0;
    background: rgba(6, 20, 17, 0.4);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }
  .scrim[data-open='1'] {
    opacity: 1;
    pointer-events: auto;
  }
  main {
    padding: 2rem 1.25rem 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- print ---------- */

@media print {
  @page {
    size: A4;
    margin: 16mm 14mm;
  }

  /*
    The dark theme is stamped by `:root[data-theme="dark"]`, which is not screen-only — it still
    applies when printing. Without redefining the tokens here, anyone who printed after toggling
    dark got `.note` and `thead` on a dark ground the printer drops, leaving light text on white
    paper. Restoring the light palette fixes the whole sheet at once instead of patching every
    component that reads it.
  */
  :root,
  :root[data-theme='dark'],
  :root[data-theme='light'] {
    --accent: #0b6b5e;
    --accent-hover: #095a4f;
    --accent-ink: #ffffff;
    --accent-wash: #f0f5f4;
    --accent-edge: #b8d4ce;
    --ground: #ffffff;
    --surface: #ffffff;
    --surface-sunk: #f2f4f4;
    --line: #b9c4c1;
    --line-soft: #d5dedb;
    --ink: #101917;
    --ink-soft: #26332f;
    --muted: #4a5a56;
    --ok: #0b5c3e;
    --ok-wash: #eef6f1;
    --warn: #7c4906;
    --warn-wash: #f8f2e9;
    --bad: #8a3124;
    --bad-wash: #f8eeec;
    --code-bg: #f4f6f5;
    --code-ink: #101917;
  }

  body {
    background: #fff;
    color: var(--ink);
    font-size: 10pt;
  }

  .topbar,
  .sidebar,
  .scrim,
  .copy,
  .filter,
  .anchor,
  .skip,
  .tablist {
    display: none !important;
  }

  .shell {
    display: block;
    max-width: none;
  }
  main {
    padding: 0;
  }
  .prose {
    max-width: none;
  }

  /*
    The dictionary filter is hidden above, but the rows it hid stay hidden — so a search for
    "cashback" before Ctrl+P printed 6 fields out of 55, with nothing on the sheet explaining the
    absence. Same treatment the tabs get just below.
  */
  tbody tr[hidden] {
    display: table-row !important;
  }
  .noresult {
    display: none !important;
  }

  /* A tab hidden on screen is a whole section of the document; on paper they all go in. */
  .tabpanel {
    display: block !important;
    border: 1px solid var(--line);
    margin-bottom: 1rem;
  }

  .code,
  .endpoint {
    background: var(--code-bg);
    color: var(--ink);
  }
  .code pre,
  .tok-key,
  .tok-str,
  .tok-num,
  .tok-lit,
  .tok-punct,
  .tok-cm {
    color: var(--ink);
  }
  .endpoint .verb {
    background: none;
    color: var(--ink);
    font-weight: 700;
  }

  h2 {
    break-after: avoid;
    margin-top: 2rem;
  }
  h3 {
    break-after: avoid;
  }
  tr,
  .code,
  .note,
  .tabpanel {
    break-inside: avoid;
  }

  .tablewrap,
  .tablewrap.tall {
    max-height: none;
    overflow: visible;
  }

  a {
    color: var(--ink);
    text-decoration: none;
  }
}
