/* docs.paymonetra.com
 *
 * The --pm-* block below is copied from paymonetra-gateway/src/index.css. There
 * is one design system and a second would be worse than plain HTML, so this
 * file adds --doc-* on top of those tokens rather than inventing colours.
 *
 * Two hues only: green and orange. Anything that needs a third is wrong.
 *
 * The trap, stated once because it cost the dashboard two bugs: a token that
 * flips with the theme must never sit on a ground that does not. Everything
 * painted on --pm-deep (the hero band, every code panel) uses --pm-on-deep and
 * the --doc-syn-* set, all of which hold the same value in both themes.
 */

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

:root {
  --pm-brand-50: #e6f2ec;
  --pm-brand-100: #c2dfd1;
  --pm-brand-200: #9bcbb4;
  --pm-brand-300: #6fb494;
  --pm-brand-400: #3f9a72;
  --pm-brand-500: #0a7a52;
  --pm-brand-600: #005b3c;
  --pm-brand-700: #004a30;
  --pm-brand-800: #003d29;
  --pm-brand-900: #00251a;

  --pm-accent-50: #fff1e0;
  --pm-accent-100: #ffe0bf;
  --pm-accent-200: #ffc78a;
  --pm-accent-300: #ffa133;
  --pm-accent-400: #ff8a1a;
  --pm-accent-500: #ff7a00;
  --pm-accent-600: #e66d00;
  --pm-accent-700: #c25a00;
  --pm-accent-fg: #c25a00;

  --pm-fresh-50: #e7fbf9;
  --pm-fresh-100: #d3f9e4;
  --pm-fresh-500: #05c46b;
  --pm-fresh-600: #039e57;
  --pm-fresh-700: #027a44;
  --pm-deep: #04241a;
  --pm-on-deep: #d3f9e4;
  --pm-shadow-soft: 0 26px 60px -34px rgba(4, 36, 26, 0.32);

  --pm-ink-100: #f1f5f9;
  --pm-ink-200: #e2e8f0;
  --pm-ink-300: #cbd5e1;
  --pm-ink-400: #94a3b8;
  --pm-ink-500: #64748b;
  --pm-ink-600: #475569;
  --pm-ink-700: #334155;
  --pm-ink-800: #1e293b;
  --pm-ink-900: #0f172a;

  --pm-paper: #ffffff;
  --pm-app-bg: #f4f7fa;
  --pm-surface: #ffffff;
  --pm-surface-2: #f9fafb;
  --pm-surface-3: #f1f5f9;
  --pm-line: #e5e7eb;
  --pm-line-soft: #eef0f3;

  --pm-success-100: #d1fae5;
  --pm-success-500: #10b981;
  --pm-success-600: #047857;
  --pm-warn-100: #fef3c7;
  --pm-warn-500: #f59e0b;
  --pm-warn-600: #b45309;
  --pm-danger-100: #fee2e2;
  --pm-danger-500: #ef4444;
  --pm-danger-600: #b91c1c;
  --pm-info-100: #dbeafe;
  --pm-info-500: #3b82f6;
  --pm-info-600: #1d4ed8;

  --pm-gradient-brand: linear-gradient(135deg, #005b3c 0%, #003d29 100%);
  --pm-gradient-accent: linear-gradient(135deg, #ff7a00 0%, #cc5f00 100%);

  --pm-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --pm-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --pm-shadow-md: 0 4px 18px rgba(15, 23, 42, 0.06);
  --pm-shadow-lg: 0 8px 32px rgba(15, 23, 42, 0.1);
  --pm-shadow-brand: 0 4px 14px rgba(0, 91, 60, 0.25);

  --pm-brand-fg: #005b3c;
  --pm-focus-ring: rgba(10, 122, 82, 0.28);
  --pm-overlay: rgba(15, 23, 42, 0.44);

  /* --doc-* is this site only. */
  --doc-sidebar: 256px;
  --doc-rail: 210px;
  --doc-measure: 45rem;
  --doc-radius: 12px;
  --doc-radius-sm: 8px;
  --doc-header: 60px;
  /* The page itself is white, as reference docs are: the content is the
     surface, and cards and tables are told apart by a hairline, not a tint. */
  --doc-page: #ffffff;

  --doc-font-brand: 'Clash Display', 'Geist', system-ui, sans-serif;
  --doc-font-display: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --doc-font-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --doc-font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  /* Fixed in both themes. See the note at the top of the file. */
  --doc-code-bg: #04241a;
  --doc-code-fg: #dcf3e6;
  --doc-code-line: rgba(211, 249, 228, 0.14);
  --doc-code-chrome: rgba(211, 249, 228, 0.62);
  --doc-syn-key: #7fe3b0;
  --doc-syn-str: #ffc78a;
  --doc-syn-num: #9bcbb4;
  --doc-syn-lit: #ffa133;
  --doc-syn-com: rgba(211, 249, 228, 0.45);
  --doc-syn-fn: #12d97c;
  --doc-syn-flag: #f0a968;

  /* --pm-accent-fg is the dashboard's accent ink and it is right there. On the
     accent *wash* it measures 3.98:1, which is under the bar for the small
     uppercase label in a warning callout, so text on that wash uses a darker
     step of the same hue: 5.18:1. The token itself is untouched. */
  --doc-ink-on-wash: #a34e04;
}

:root[data-theme='dark'] {
  --pm-app-bg: #0b0f14;
  --pm-paper: #0b0f14;
  --doc-page: #0b0f14;
  --pm-surface: #11161d;
  --pm-surface-2: #161c25;
  --pm-surface-3: #1c2330;
  --pm-line: #2a3140;
  --pm-line-soft: #1e2530;
  --pm-ink-900: #e6edf3;
  --pm-ink-800: #d5dee7;
  --pm-ink-700: #cbd5e1;
  --pm-ink-600: #aab6c4;
  --pm-ink-500: #94a3b8;
  --pm-ink-400: #64748b;
  --pm-ink-300: #475569;
  --pm-ink-200: #2a3140;
  --pm-ink-100: #1c2330;
  --pm-brand-50: #0d2c20;
  --pm-brand-100: #124534;
  --pm-accent-300: #e8964a;
  --pm-accent-400: #e5760f;
  --pm-accent-500: #db6b08;
  --pm-accent-600: #c25f06;
  --pm-accent-700: #a85105;
  --pm-accent-50: #2a1a08;
  --pm-accent-fg: #f0a968;
  --pm-fresh-50: #062b1e;
  --pm-fresh-100: #0a3d2b;
  --pm-fresh-500: #12d97c;
  --pm-fresh-600: #05c46b;
  --pm-fresh-700: #46e39a;
  --pm-shadow-soft: 0 26px 60px -34px rgba(0, 0, 0, 0.6);
  --pm-success-100: #0c2d22;
  --pm-warn-100: #2c2008;
  --pm-danger-100: #2e1215;
  --pm-info-100: #101f38;
  --pm-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --pm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --pm-shadow-md: 0 4px 18px rgba(0, 0, 0, 0.5);
  --pm-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --pm-brand-fg: #8fd3b0;
  --pm-gradient-brand: linear-gradient(135deg, #0a7a52 0%, #04241a 100%);
  --pm-gradient-accent: linear-gradient(135deg, #db6b08 0%, #a34e04 100%);
  --pm-focus-ring: rgba(63, 154, 114, 0.38);
  --pm-overlay: rgba(0, 0, 0, 0.62);

  /* On the dark wash the accent ink already measures 8.47:1, so it is the
     token itself rather than a darker step. */
  --doc-ink-on-wash: #f0a968;
}

/* ----------------------------------------------------------------- fonts -- */

@font-face {
  font-family: 'Clash Display';
  src: url('fonts/clashdisplay-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
/* Geist, the dashboard's typeface, so the docs and the dashboard a developer
   moves between read as one product. Variable, cut to Latin and the symbols
   the pages use; the licence sits beside the files. Clash Display stays for
   the wordmark and the home banner only: it is a display face, and at the
   size of a section heading its narrow space ran words together. */
@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/geistmono-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* ---------------------------------------------------------------- basics -- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--doc-header) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--doc-page);
  color: var(--pm-ink-900);
  font-family: var(--doc-font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--pm-brand-fg);
  text-decoration-color: color-mix(in srgb, var(--pm-brand-fg) 35%, transparent);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: currentColor;
}

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

::selection {
  background: var(--pm-brand-100);
  color: var(--pm-brand-900);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--pm-surface);
  padding: 12px 18px;
  border-radius: 0 0 var(--doc-radius-sm) 0;
}
.skip:focus {
  left: 0;
}

/* ---------------------------------------------------------------- header -- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--doc-header);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  background: color-mix(in srgb, var(--doc-page) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--pm-line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--pm-ink-900);
  flex: none;
}
.brand img {
  height: 26px;
  width: 26px;
  border-radius: 7px;
  display: block;
}
.brand b {
  font-family: var(--doc-font-brand);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0;
}
.brand span {
  font-size: 12px;
  font-weight: 500;
  color: var(--pm-brand-fg);
  background: var(--pm-brand-50);
  border: 1px solid color-mix(in srgb, var(--pm-brand-fg) 22%, transparent);
  padding: 1px 7px;
  border-radius: 999px;
}

.topbar-spacer {
  flex: 1;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-links a {
  color: var(--pm-ink-600);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: var(--doc-radius-sm);
}
.topbar-links a:hover {
  color: var(--pm-ink-900);
  background: var(--pm-surface-3);
}
/* Ink on orange, not white on orange. Measured: white on #FF7A00 is 2.61:1 and
   fails; the deep brand green on the same orange is 6.32:1 and keeps the
   accent at full strength rather than darkening it into a different colour.
   It is also the only pairing that uses both brand hues at once. */
.topbar-links a.cta {
  background: var(--pm-accent-500);
  color: var(--pm-deep);
  font-weight: 700;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--pm-accent-500) 32%, transparent);
}
.topbar-links a.cta:hover {
  background: var(--pm-accent-400);
  color: var(--pm-deep);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--doc-radius-sm);
  border: 1px solid var(--pm-line);
  background: var(--pm-surface);
  color: var(--pm-ink-600);
  cursor: pointer;
  padding: 0;
  flex: none;
}
.icon-button:hover {
  color: var(--pm-ink-900);
  border-color: var(--pm-ink-300);
}
.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root[data-theme='dark'] .theme-sun {
  display: none;
}
:root:not([data-theme='dark']) .theme-moon {
  display: none;
}

.menu-button {
  display: none;
}

/* ---------------------------------------------------------------- search -- */

.search {
  position: relative;
  flex: 0 1 340px;
  max-width: 340px;
}
.search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  border-radius: var(--doc-radius-sm);
  border: 1px solid var(--pm-line);
  background: var(--pm-surface-2);
  color: var(--pm-ink-900);
  font: inherit;
  font-size: 14px;
}
.search input::placeholder {
  color: var(--pm-ink-400);
}
.search svg {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--pm-ink-400);
  stroke-width: 1.8;
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  max-height: 62vh;
  overflow-y: auto;
  background: var(--pm-surface);
  border: 1px solid var(--pm-line);
  border-radius: var(--doc-radius);
  box-shadow: var(--pm-shadow-lg);
  padding: 6px;
  display: none;
}
.search-results.open {
  display: block;
}
.search-results a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--doc-radius-sm);
  text-decoration: none;
  color: var(--pm-ink-900);
}
.search-results a:hover,
.search-results a.on {
  background: var(--pm-brand-50);
}
.search-results b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.search-results small {
  color: var(--pm-ink-500);
  font-size: 12.5px;
}
.search-empty {
  padding: 12px 10px;
  color: var(--pm-ink-500);
  font-size: 14px;
}

/* ---------------------------------------------------------------- layout -- */

.shell {
  display: grid;
  grid-template-columns: var(--doc-sidebar) minmax(0, 1fr) var(--doc-rail);
  gap: 34px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: var(--doc-header);
  max-height: calc(100vh - var(--doc-header));
  overflow-y: auto;
  padding: 26px 4px 60px;
}
.sidebar h4 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pm-ink-500);
  margin: 22px 0 7px 10px;
}
.sidebar h4:first-child,
.sidebar > .modes-drawer + h4 {
  margin-top: 0;
}
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar a {
  display: block;
  padding: 5px 10px;
  border-radius: var(--doc-radius-sm);
  color: var(--pm-ink-600);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.45;
  /* Endpoint paths are long. Wrapping one is fine; clipping it so the reader
     cannot tell simulate_payment from anything else is not. */
  overflow-wrap: anywhere;
}
/* An endpoint row: the verb in a fixed column so the titles line up. */
.sidebar a.with-verb {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}
.sidebar a.with-verb .verb {
  font-size: 9.5px;
  padding: 1px 0;
  text-align: center;
  letter-spacing: 0.03em;
}

/* A group that folds. Styled as the plain group heading, plus a chevron. */
.nav-group {
  margin: 0;
}
.nav-group > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pm-ink-500);
  margin: 22px 0 7px;
  padding: 2px 10px;
  border-radius: 6px;
}
.nav-group > summary::-webkit-details-marker {
  display: none;
}
.nav-group > summary::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.nav-group[open] > summary::after {
  transform: rotate(45deg);
}
.nav-group > summary:hover {
  color: var(--pm-ink-900);
}
.nav-group > summary .nav-badge {
  letter-spacing: 0.07em;
}
.sidebar > .nav-group:first-child > summary,
.sidebar > .modes + .nav-group > summary {
  margin-top: 0;
}

/* Guides | API reference. In the header on a wide screen, at the top of the
   drawer on a phone. */
.modes {
  display: flex;
  align-self: stretch;
  gap: 4px;
  margin-left: 14px;
}
.modes a {
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pm-ink-600);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.modes a:hover {
  color: var(--pm-ink-900);
}
.modes a.on {
  color: var(--pm-ink-900);
  border-bottom-color: var(--pm-brand-fg);
}
.modes-drawer {
  display: none;
}
.sidebar a:hover {
  color: var(--pm-ink-900);
  background: var(--pm-surface-3);
}
.sidebar a[aria-current='page'] {
  color: var(--pm-brand-fg);
  background: var(--pm-brand-50);
  font-weight: 600;
}

.content {
  min-width: 0;
  padding: 34px 0 96px;
}
.prose {
  max-width: var(--doc-measure);
}

.rail {
  position: sticky;
  top: var(--doc-header);
  max-height: calc(100vh - var(--doc-header));
  overflow-y: auto;
  padding: 34px 0 60px;
  font-size: 13.5px;
}
.rail h4 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pm-ink-400);
  margin: 0 0 8px;
}
.rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--pm-line);
}
/* ink-500 on the app background measures 4.43:1, which is under the bar by
   a hair. The rail is navigation, not decoration. */
.rail a {
  display: block;
  padding: 4px 0 4px 13px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--pm-ink-600);
  text-decoration: none;
  line-height: 1.42;
}
.rail a:hover {
  color: var(--pm-ink-900);
}
.rail a.on {
  color: var(--pm-brand-fg);
  border-left-color: var(--pm-brand-fg);
  font-weight: 600;
}
.rail li.d3 a {
  padding-left: 24px;
  font-size: 13px;
}

/* --------------------------------------------------------------- content -- */

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--doc-font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--pm-ink-900);
  scroll-margin-top: calc(var(--doc-header) + 20px);
}
.prose h1 {
  font-size: 2.05rem;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.prose h2 {
  font-size: 1.42rem;
  margin: 2.8rem 0 0.8rem;
}
.prose h3 {
  font-size: 1.1rem;
  letter-spacing: -0.012em;
  margin: 2.1rem 0 0.6rem;
}
.prose h4 {
  font-size: 0.98rem;
  letter-spacing: -0.006em;
  margin: 1.7rem 0 0.5rem;
}
.prose p {
  margin: 0 0 1.05rem;
  color: var(--pm-ink-700);
}
.prose li {
  color: var(--pm-ink-700);
  margin: 0.3rem 0;
}
.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 1.05rem;
}
.prose strong {
  color: var(--pm-ink-900);
  font-weight: 700;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--pm-line);
  margin: 2.2rem 0;
}
.prose blockquote {
  margin: 0 0 1.05rem;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--pm-brand-200);
  color: var(--pm-ink-600);
}
.prose img {
  max-width: 100%;
}

.lede {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--pm-ink-600);
  margin: 0 0 1.6rem;
}

.anchor {
  float: left;
  margin-left: -0.85em;
  width: 0.85em;
  color: var(--pm-ink-300);
  text-decoration: none;
  opacity: 0;
  font-weight: 500;
}
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
.anchor:focus {
  opacity: 1;
}

.prose :not(pre) > code {
  font-family: var(--doc-font-mono);
  font-size: 0.84em;
  background: var(--pm-surface-3);
  border: 1px solid var(--pm-line-soft);
  border-radius: 5px;
  padding: 0.12em 0.36em;
  color: var(--pm-ink-800);
  word-break: break-word;
}

/* ----------------------------------------------------------------- table -- */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.4rem;
  border: 1px solid var(--pm-line);
  border-radius: var(--doc-radius);
  background: var(--pm-surface);
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
  line-height: 1.55;
}
.prose th {
  text-align: left;
  font-weight: 600;
  color: var(--pm-ink-600);
  font-size: 13px;
  padding: 9px 14px;
  background: var(--pm-surface-2);
  border-bottom: 1px solid var(--pm-line);
  white-space: nowrap;
}
.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--pm-line-soft);
  color: var(--pm-ink-700);
  vertical-align: top;
}
.prose tr:last-child td {
  border-bottom: 0;
}
.prose table.defs td:first-child {
  white-space: nowrap;
  color: var(--pm-ink-900);
  font-weight: 500;
  width: 1%;
}
/* Error codes break at the underscore otherwise, and "merchant_suspend ed"
   across two lines is not a code anybody can search for. The wrapper scrolls. */
.prose table.codes td:first-child {
  white-space: nowrap;
  width: 1%;
}
/* Same reason, everywhere: a code span is a token to be copied, not prose. The
   outcomes table split "underpaid" across two lines before this. */
.prose td > code:only-child,
.prose th > code:only-child {
  white-space: nowrap;
}

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

figure.code {
  margin: 0 0 1.4rem;
  border-radius: var(--doc-radius);
  overflow: hidden;
  background: var(--doc-code-bg);
  /* The panel is deep green in both themes, which on a near-black dark page is
     only a few points from the ground. The hairline keeps its edge. */
  border: 1px solid rgba(211, 249, 228, 0.1);
}
figure.code figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--doc-code-line);
  color: var(--doc-code-chrome);
  font-size: 12.5px;
  font-weight: 500;
}
/* The size and the line height belong on the <pre>. Set only on the <code>
   inside it, every line still took the body's 27px line box, which is what
   made a twenty-line payload half a screen tall. */
figure.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
}
figure.code code {
  font-family: var(--doc-font-mono);
  font-size: inherit;
  line-height: inherit;
  color: var(--doc-code-fg);
  white-space: pre;
  font-variant-ligatures: none;
}
.copy {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--doc-code-chrome);
  background: transparent;
  border: 1px solid var(--doc-code-line);
  border-radius: 6px;
  padding: 2px 9px;
  cursor: pointer;
  flex: none;
}
.copy:hover {
  color: var(--pm-on-deep);
  border-color: rgba(211, 249, 228, 0.4);
}
.copy[data-done] {
  color: var(--pm-fresh-500);
  border-color: color-mix(in srgb, var(--pm-fresh-500) 45%, transparent);
}

.t-key {
  color: var(--doc-syn-key);
}
.t-str {
  color: var(--doc-syn-str);
}
.t-num {
  color: var(--doc-syn-num);
}
.t-lit {
  color: var(--doc-syn-lit);
}
.t-com {
  color: var(--doc-syn-com);
  font-style: italic;
}
.t-fn {
  color: var(--doc-syn-fn);
}
.t-flag {
  color: var(--doc-syn-flag);
}

/* Languages as tabs in the panel's own header, with Copy on the right of the
   same row: one panel, not a strip of pills floating over a second header
   that repeated the language. */
.tabs {
  position: relative;
  margin: 0 0 1.4rem;
  border-radius: var(--doc-radius);
  overflow: hidden;
  background: var(--doc-code-bg);
  border: 1px solid rgba(211, 249, 228, 0.1);
}
.tabs-strip {
  display: flex;
  gap: 2px;
  min-height: 40px;
  padding: 0 84px 0 6px;
  border-bottom: 1px solid var(--doc-code-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-strip button {
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--doc-code-chrome);
  cursor: pointer;
  white-space: nowrap;
}
.tabs-strip button:hover {
  color: var(--pm-on-deep);
}
.tabs-strip button[aria-selected='true'] {
  color: var(--pm-on-deep);
  border-bottom-color: var(--pm-fresh-500);
}
.tabs [role='tabpanel'][hidden] {
  display: none;
}
.tabs figure.code {
  margin: 0;
  border: 0;
  border-radius: 0;
}
.tabs figure.code figcaption {
  position: absolute;
  top: 0;
  right: 0;
  border: 0;
  padding: 0 8px;
}
.tabs figure.code figcaption > span {
  display: none;
}

/* ----------------------------------------------------------- notes, meta -- */

.note {
  --note-hue: var(--pm-brand-fg);
  --note-wash: var(--pm-brand-50);
  display: flex;
  gap: 12px;
  margin: 0 0 1.4rem;
  padding: 14px 16px;
  border-radius: var(--doc-radius);
  background: var(--note-wash);
  border: 1px solid color-mix(in srgb, var(--note-hue) 24%, transparent);
}
.note.warn {
  --note-hue: var(--doc-ink-on-wash);
  --note-wash: var(--pm-accent-50);
}
.note-body {
  min-width: 0;
}
.note-body > :last-child {
  margin-bottom: 0;
}
.note b {
  display: block;
  color: var(--note-hue);
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 2px;
}
.note p {
  margin-bottom: 0.6rem;
  color: var(--pm-ink-700);
}
.note-mark {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--note-hue);
}
.note-mark svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.verb {
  font-family: var(--doc-font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 5px;
  flex: none;
}
.verb-get {
  background: var(--pm-brand-50);
  color: var(--pm-brand-fg);
  border: 1px solid color-mix(in srgb, var(--pm-brand-fg) 26%, transparent);
}
.verb-post {
  background: var(--pm-accent-50);
  color: var(--doc-ink-on-wash);
  border: 1px solid color-mix(in srgb, var(--pm-accent-fg) 30%, transparent);
}

.endpoint-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin: 0 0 1.4rem;
  border: 1px solid var(--pm-line);
  border-radius: var(--doc-radius);
  background: var(--pm-surface);
}
.endpoint-bar code {
  font-family: var(--doc-font-mono);
  font-size: 13.5px;
  color: var(--pm-ink-900);
  background: none;
  border: 0;
  padding: 0;
  word-break: break-all;
}
.endpoint-bar .host {
  color: var(--pm-ink-400);
}
.endpoint-bar .auth {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--pm-ink-500);
  white-space: nowrap;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 0 0 1.6rem;
}
.card {
  display: block;
  padding: 16px 18px;
  border-radius: var(--doc-radius);
  border: 1px solid var(--pm-line);
  background: var(--pm-surface);
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.card:hover {
  border-color: color-mix(in srgb, var(--pm-brand-fg) 40%, transparent);
  box-shadow: var(--pm-shadow-md);
}
.card b {
  display: block;
  font-family: var(--doc-font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: var(--pm-ink-900);
  margin-bottom: 3px;
}
.card span {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--pm-ink-500);
}
.card .verb {
  margin-bottom: 7px;
  display: inline-block;
}

/* The hero band and the deep card sit on --pm-deep, which is the same value in
   both themes, so everything on them is fixed too. */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 46px 40px 42px;
  margin: 0 0 34px;
  background: linear-gradient(140deg, #04241a 0%, #005b3c 62%, #027a44 100%);
  box-shadow: var(--pm-shadow-soft);
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto -80px -160px auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(5, 196, 107, 0.34), transparent 68%);
  pointer-events: none;
}
/* The one heading still in the display face. Its own word spacing, because
   Clash Display's space is narrow enough that "Collect in naira" read as one
   word at -0.025em. */
.hero h1 {
  position: relative;
  font-family: var(--doc-font-brand);
  font-weight: 600;
  font-size: 2.6rem;
  line-height: 1.12;
  letter-spacing: -0.005em;
  word-spacing: 0.12em;
  margin: 0 0 14px;
  color: #ffffff;
  max-width: 18ch;
}
.hero p {
  position: relative;
  margin: 0 0 24px;
  max-width: 54ch;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--pm-on-deep);
}
.hero .kicker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pm-on-deep);
  background: rgba(211, 249, 228, 0.12);
  border: 1px solid rgba(211, 249, 228, 0.24);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 18px;
}
.hero-actions {
  position: relative;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 20px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--pm-accent-500);
  color: var(--pm-deep);
  font-weight: 700;
  box-shadow: 0 10px 26px -10px rgba(255, 122, 0, 0.7);
}
.btn-primary:hover {
  background: var(--pm-accent-400);
  color: var(--pm-deep);
}
/* --pm-on-deep over this wash on the hero's lightest stop is 3.98:1. White
   is the only value that clears the bar everywhere the band goes. */
.btn-ghost {
  background: rgba(211, 249, 228, 0.1);
  border-color: rgba(211, 249, 228, 0.42);
  color: #ffffff;
}
.btn-ghost:hover {
  background: rgba(211, 249, 228, 0.18);
  color: #fff;
}

/* --------------------------------------------------------------- pricing -- */

.rates {
  margin: 0 0 1.6rem;
}
.rate-headline {
  padding: 26px 28px;
  border-radius: 18px;
  background: var(--pm-gradient-brand);
  box-shadow: var(--pm-shadow-soft);
  margin-bottom: 18px;
}
/* No opacity here. Fading --pm-on-deep to 0.8 over the darker end of the brand
   gradient drops it under the bar, and a label that is only sometimes readable
   is worse than one a shade dimmer everywhere. */
.rate-headline small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pm-on-deep);
  margin-bottom: 6px;
}
.rate-headline b {
  display: block;
  font-family: var(--doc-font-display);
  font-weight: 700;
  font-size: 3.1rem;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.03em;
}
.rate-headline span {
  display: block;
  margin-top: 8px;
  color: var(--pm-on-deep);
  font-size: 15px;
}
.rate-row {
  display: grid;
  grid-template-columns: minmax(0, 12fr) minmax(0, 13fr) auto;
  align-items: baseline;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--pm-line);
  border-radius: var(--doc-radius);
  background: var(--pm-surface);
  margin-bottom: 9px;
}
.rate-row .label {
  font-weight: 600;
  color: var(--pm-ink-900);
  min-width: 0;
}
.rate-row .label em {
  display: inline-block;
  margin-left: 8px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pm-accent-fg);
  background: var(--pm-accent-50);
  border: 1px solid color-mix(in srgb, var(--pm-accent-fg) 30%, transparent);
  border-radius: 999px;
  padding: 1px 8px;
  vertical-align: 1px;
}
/* Not .note: that class is the callout box, and reusing it here painted every
   fee's footnote as a green panel. */
.rate-row .rate-note {
  color: var(--pm-ink-500);
  font-size: 14px;
  min-width: 0;
}
.rate-row.soon .rate {
  color: var(--pm-ink-400);
}
.rate-row .rate {
  font-family: var(--doc-font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--pm-brand-fg);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.rates-state {
  padding: 22px;
  border: 1px dashed var(--pm-line);
  border-radius: var(--doc-radius);
  color: var(--pm-ink-500);
  text-align: center;
}
.rates-stamp {
  font-size: 13px;
  color: var(--pm-ink-400);
  margin-top: 10px;
}
.skeleton {
  background: linear-gradient(90deg, var(--pm-surface-3) 25%, var(--pm-surface-2) 50%, var(--pm-surface-3) 75%);
  background-size: 220% 100%;
  animation: shimmer 1.3s linear infinite;
  border-radius: 6px;
  color: transparent;
}
@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

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

.pager {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 3rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--pm-line);
}
.pager a {
  flex: 1;
  max-width: 48%;
  padding: 13px 16px;
  border: 1px solid var(--pm-line);
  border-radius: var(--doc-radius);
  background: var(--pm-surface);
  text-decoration: none;
}
.pager a.next {
  margin-left: auto;
  text-align: right;
}
.pager small {
  display: block;
  font-size: 12px;
  color: var(--pm-ink-400);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}
.pager b {
  font-weight: 600;
  color: var(--pm-ink-900);
}

.foot {
  border-top: 1px solid var(--pm-line);
  background: var(--pm-surface);
  margin-top: 40px;
}
.foot-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  color: var(--pm-ink-500);
}
.foot-inner a {
  color: var(--pm-ink-600);
  text-decoration: none;
}
.foot-inner a:hover {
  color: var(--pm-brand-fg);
}
.foot-inner .sep {
  margin-left: auto;
}

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

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: var(--doc-sidebar) minmax(0, 1fr);
  }
  .rail {
    display: none;
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 18px;
  }
  .menu-button {
    display: inline-grid;
  }
  .sidebar {
    display: none;
    position: fixed;
    top: var(--doc-header);
    left: 0;
    bottom: 0;
    width: min(310px, 84vw);
    z-index: 45;
    background: var(--pm-surface);
    border-right: 1px solid var(--pm-line);
    padding: 20px 14px 40px;
    box-shadow: var(--pm-shadow-lg);
  }
  .sidebar.open {
    display: block;
  }
  .scrim {
    position: fixed;
    inset: var(--doc-header) 0 0 0;
    background: var(--pm-overlay);
    z-index: 44;
  }
  /* The bar has six things in it and 390px to put them in. Measured: without
     these three rules the header pushed the page 121px wide on a phone. */
  .topbar {
    gap: 10px;
    padding: 0 14px;
  }
  .search {
    flex: 1 1 60px;
    min-width: 0;
    max-width: none;
  }
  .topbar-links a:not(.cta) {
    display: none;
  }
  .hero {
    padding: 32px 22px 30px;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .prose h1 {
    font-size: 1.85rem;
  }
  .rate-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .brand span {
    display: none;
  }
  .topbar-links a.cta {
    padding: 7px 11px;
  }
}

@media (max-width: 460px) {
  .brand b {
    display: none;
  }
}

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

@media print {
  .topbar,
  .sidebar,
  .rail,
  .pager,
  .copy {
    display: none !important;
  }
  .shell {
    grid-template-columns: 1fr;
  }
}

/* The New badge in the sidebar. Set from the date on the contract's own
   `*Live, …*` marker and gone 30 days later, so it is never a thing somebody
   has to remember to remove. Accent, because green is already the current-page
   colour and two greens in one row say nothing. */
.nav-badge {
  display: inline-block;
  margin-left: 7px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--doc-ink-on-wash);
  background: var(--pm-accent-50);
  border: 1px solid color-mix(in srgb, var(--doc-ink-on-wash) 30%, transparent);
  border-radius: 999px;
  padding: 0 6px;
  line-height: 15px;
  vertical-align: 1px;
}

/* The section a reference page belongs to. Lighter than the current page,
   because it says "you are somewhere under here", not "you are here". */
.sidebar a[aria-current='true'] {
  color: var(--pm-brand-fg);
  font-weight: 600;
}

/* ------------------------------------------------------------ disclosure -- */

.aside {
  margin: 0 0 1.4rem;
  border: 1px solid var(--pm-surface-3);
  border-radius: var(--doc-radius);
  background: var(--pm-surface);
}
.aside > summary {
  cursor: pointer;
  list-style: none;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--pm-ink-700);
  font-size: 14px;
  font-weight: 600;
}
.aside > summary::-webkit-details-marker {
  display: none;
}
.aside > summary::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.aside[open] > summary::before {
  transform: rotate(45deg);
}
.aside > summary:hover {
  color: var(--pm-brand-fg);
}
.aside > summary:focus-visible {
  outline: 2px solid var(--pm-brand-fg);
  outline-offset: -2px;
  border-radius: var(--doc-radius);
}
.aside-body {
  padding: 0 16px 2px;
}
.aside-body > :last-child {
  margin-bottom: 0.9rem;
}

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

/* Two panes, the way reference docs are read: what the call means on the
   left, the request and the response pinned on the right while the left
   scrolls. The examples span both rows and the body row takes the slack, so
   a tall example never opens a gap under the title. */
.shell.wide {
  grid-template-columns: var(--doc-sidebar) minmax(0, 1fr);
}
.shell.wide .prose {
  max-width: none;
}
.ep {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: 'head examples' 'body examples';
  column-gap: 40px;
  align-items: start;
}
.ep-head {
  grid-area: head;
}
.ep-body {
  grid-area: body;
}
.ep-examples {
  grid-area: examples;
  position: sticky;
  top: calc(var(--doc-header) + 24px);
  max-height: calc(100vh - var(--doc-header) - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-top: 6px;
}
.ep-examples .tabs,
.ep-examples figure.code {
  margin-bottom: 14px;
}
.ep-head > :last-child,
.ep-body > :last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------- params -- */

.params {
  margin: 0 0 1.6rem;
  border-top: 1px solid var(--pm-line);
}
.params-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pm-ink-500);
  padding: 14px 0 2px;
}
.param {
  padding: 12px 0;
  border-bottom: 1px solid var(--pm-line-soft);
}
.param-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.prose .param-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pm-ink-900);
  background: none;
  border: 0;
  padding: 0;
}
.param-type {
  font-family: var(--doc-font-mono);
  font-size: 12.5px;
  color: var(--pm-ink-500);
}
.param-req,
.param-opt {
  font-size: 12px;
  font-weight: 600;
}
.param-req {
  color: var(--doc-ink-on-wash);
}
.param-opt {
  color: var(--pm-ink-500);
}
.param-desc {
  margin-top: 4px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--pm-ink-700);
}

/* ---------------------------------------------------------- narrow ends -- */

@media (max-width: 1180px) {
  .shell.wide .prose {
    max-width: var(--doc-measure);
  }
  .ep {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: 'head' 'examples' 'body';
  }
  .ep-examples {
    position: static;
    max-height: none;
    overflow: visible;
    padding-top: 0;
    margin-bottom: 1.2rem;
  }
}

@media (max-width: 1040px) {
  .modes-top {
    display: none;
  }
}

@media (max-width: 1040px) {
  .sidebar .modes-drawer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 0 18px;
    padding: 4px;
    border-radius: 10px;
    background: var(--pm-surface-3);
  }
  .sidebar .modes-drawer a {
    justify-content: center;
    padding: 7px 8px;
    border: 0;
    margin: 0;
    border-radius: 7px;
    font-size: 14px;
  }
  .sidebar .modes-drawer a.on {
    background: var(--pm-surface);
    color: var(--pm-ink-900);
    font-weight: 600;
    box-shadow: var(--pm-shadow-xs);
  }
}

/* --------------------------------------------------------------- routes -- */

.routes {
  margin: 0 0 1.6rem;
  border: 1px solid var(--pm-line);
  border-radius: var(--doc-radius);
  background: var(--pm-surface);
  overflow: hidden;
}
.prose a.route {
  display: grid;
  grid-template-columns: 46px minmax(0, 17rem) minmax(0, 1fr);
  gap: 4px 14px;
  align-items: baseline;
  padding: 11px 14px;
  border-top: 1px solid var(--pm-line-soft);
  color: var(--pm-ink-900);
  text-decoration: none;
}
.prose a.route:first-child {
  border-top: 0;
}
.prose a.route:hover {
  background: var(--pm-surface-2);
}
.route .verb {
  text-align: center;
  font-size: 10.5px;
  padding: 1px 0;
}
.prose .route code {
  font-family: var(--doc-font-mono);
  font-size: 13px;
  color: var(--pm-ink-900);
  background: none;
  border: 0;
  padding: 0;
  overflow-wrap: anywhere;
}
.route-what {
  font-size: 14px;
  line-height: 1.5;
  color: var(--pm-ink-600);
}
.card b,
.card span {
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .shell.wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .prose a.route {
    grid-template-columns: 46px minmax(0, 1fr);
  }
  .route-what {
    grid-column: 2;
  }
}

/* Beside the examples the column is narrow, and the full address wrapped
   the bar onto three lines. The path is what tells one route from another;
   the host is in the curl example on the right. */
.ep-head .endpoint-bar .host {
  display: none;
}
