:root {
  --brand: #087bbe;
  --brand-strong: #0067a3;
  --brand-soft: #eaf7ff;
  --navy: #102d4c;
  --navy-soft: #24435f;
  --green: #0f9f70;
  --green-soft: #e8f8f2;
  --amber: #b56a00;
  --amber-soft: #fff7e5;
  --red: #c74343;
  --red-soft: #fff0f0;
  --page: #f7fafc;
  --surface: #ffffff;
  --surface-2: #f1f6f9;
  --surface-3: #e8f0f5;
  --text: #15324a;
  --muted: #61758a;
  --faint: #8a9baa;
  --border: #dce6ed;
  --border-strong: #c9d7e1;
  --code-bg: #0e263b;
  --code-text: #e8f3fa;
  --shadow-sm: 0 1px 2px rgba(16, 45, 76, 0.05);
  --shadow-md: 0 14px 35px rgba(16, 45, 76, 0.09);
  --topbar-height: 72px;
  --sidebar-width: 278px;
  --radius-sm: 9px;
  --radius: 15px;
  --radius-lg: 24px;
}

html[data-theme="dark"] {
  --brand: #49b7f2;
  --brand-strong: #73c9f7;
  --brand-soft: #123950;
  --navy: #e5f3fb;
  --navy-soft: #bad0de;
  --green: #51d3a7;
  --green-soft: #103e34;
  --amber: #f5b84c;
  --amber-soft: #443219;
  --red: #ff8989;
  --red-soft: #472323;
  --page: #081722;
  --surface: #0d202e;
  --surface-2: #122a3b;
  --surface-3: #193548;
  --text: #e3eef5;
  --muted: #a9bdca;
  --faint: #829aaa;
  --border: #244153;
  --border-strong: #315368;
  --code-bg: #06111a;
  --code-text: #dcecf6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 18px 42px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 26px);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

code,
pre,
kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 15px;
  color: white;
  background: var(--brand-strong);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 48%, transparent);
  outline-offset: 3px;
}

.topbar {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  height: var(--topbar-height);
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--navy);
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--brand), #0ca8d3);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(8, 123, 190, 0.24);
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
}

.brand > span:last-child {
  display: grid;
  line-height: 1.1;
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0.13em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.language-switch {
  padding: 3px;
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.language-button {
  min-width: 38px;
  padding: 6px 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.language-button.is-active {
  color: var(--brand-strong);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.icon-button,
.mobile-menu-button {
  min-height: 38px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.icon-button:hover,
.mobile-menu-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.theme-icon {
  color: var(--brand);
  font-size: 20px;
  line-height: 1;
}

.control-label,
.mobile-menu-button {
  font-size: 12px;
  font-weight: 750;
}

.mobile-menu-button {
  display: none;
}

.page-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 80;
  top: var(--topbar-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  padding: 24px 18px 17px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.search-wrap {
  position: relative;
  margin-bottom: 18px;
}

.search-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 37px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  font-size: 13px;
}

.search-wrap input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

.search-wrap input::placeholder {
  color: var(--faint);
}

.search-icon {
  position: absolute;
  top: 4px;
  left: 12px;
  color: var(--muted);
  font-size: 21px;
  transform: rotate(-15deg);
}

.search-wrap kbd {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 1px 6px;
  color: var(--faint);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11px;
}

.search-results {
  position: absolute;
  z-index: 110;
  top: 48px;
  right: 0;
  left: 0;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.search-result {
  width: 100%;
  padding: 9px 10px;
  display: block;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 7px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font-size: 12.5px;
}

.search-result:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.search-empty {
  padding: 9px;
  color: var(--muted);
  font-size: 12px;
}

.section-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  margin: 17px 10px 7px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.nav-label:first-child {
  margin-top: 0;
}

.nav-link {
  position: relative;
  padding: 8px 11px;
  color: var(--muted);
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 580;
  transition: 140ms ease;
}

.nav-link:hover {
  color: var(--navy);
  background: var(--surface-2);
}

.nav-link.is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-weight: 750;
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  background: var(--brand);
  border-radius: 3px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px 9px 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 10.5px;
}

.status-dot,
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 14%, transparent);
}

main {
  margin-left: var(--sidebar-width);
  padding: calc(var(--topbar-height) + 32px) clamp(24px, 5vw, 72px) 32px;
}

.doc-section,
.facts-grid,
.site-footer {
  width: min(1100px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.doc-section {
  padding: 70px 0 18px;
}

.hero {
  min-height: 575px;
  padding-top: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  align-items: center;
  gap: clamp(36px, 5vw, 70px);
}

.eyebrow {
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.17em;
}

.hero h1 {
  max-width: 690px;
  margin: 0 0 22px;
  color: var(--navy);
  font-size: clamp(39px, 5.2vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.046em;
}

.hero-lead {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
}

.hero-actions {
  margin-top: 31px;
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 11px;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  font-weight: 780;
  transition: transform 130ms ease, box-shadow 130ms ease, background 130ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border: 1px solid transparent;
  box-shadow: 0 10px 24px rgba(8, 123, 190, 0.23);
}

.button-primary:hover {
  box-shadow: 0 13px 30px rgba(8, 123, 190, 0.3);
}

.button-secondary {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.hero-panel {
  position: relative;
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
}

.hero-panel::before {
  width: 280px;
  height: 280px;
  right: -7%;
  bottom: -12%;
  background: color-mix(in srgb, var(--brand) 11%, transparent);
}

.hero-panel::after {
  width: 130px;
  height: 130px;
  top: -9%;
  left: -9%;
  background: color-mix(in srgb, var(--green) 10%, transparent);
}

.endpoint-window {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.window-bar {
  height: 48px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.window-bar > span {
  width: 8px;
  height: 8px;
  background: var(--border-strong);
  border-radius: 50%;
}

.window-bar > span:first-child {
  background: #ff7970;
}

.window-bar > span:nth-child(2) {
  background: #f8c451;
}

.window-bar > span:nth-child(3) {
  background: #58c87e;
}

.window-bar small {
  margin-left: auto;
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.endpoint-window > .endpoint-line {
  padding: 24px 24px 18px;
}

.endpoint-line {
  display: flex;
  align-items: center;
  gap: 11px;
}

.endpoint-line code {
  color: var(--text);
  font-size: 12.5px;
  word-break: break-all;
}

.method {
  flex: 0 0 auto;
  padding: 3px 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  font-style: normal;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.method-get {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.mini-code {
  margin: 0 24px 24px;
  padding: 14px 17px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.mini-code p {
  margin: 0;
  padding: 7px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.mini-code p:last-child {
  border-bottom: 0;
}

.mini-code span {
  color: var(--faint);
}

.mini-code strong {
  color: var(--navy);
  font-weight: 650;
}

.response-preview {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--code-text);
  background: var(--code-bg);
  font-size: 10.5px;
}

.response-status {
  padding: 3px 7px;
  color: #061b12;
  background: #65d7a5;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 900;
}

.response-preview code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facts-grid {
  padding-bottom: 38px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
}

.facts-grid article {
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}

.fact-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 850;
}

.facts-grid article > div {
  display: grid;
}

.facts-grid small {
  color: var(--muted);
  font-size: 10px;
}

.facts-grid strong {
  color: var(--navy);
  font-size: 12.5px;
}

.section-heading {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 17px;
}

.section-number {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 11px;
  font-size: 11px;
  font-weight: 900;
}

.kicker {
  margin: 1px 0 5px;
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(27px, 3vw, 39px);
  line-height: 1.16;
  letter-spacing: -0.032em;
}

.section-intro {
  max-width: 850px;
  margin: 0 0 28px 59px;
  color: var(--muted);
  font-size: 16px;
}

.steps {
  margin: 28px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
}

.step-card,
.feature-grid article,
.transaction-grid article,
.report-grid article,
.security-grid article {
  padding: 21px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.step-card > span {
  width: 30px;
  height: 30px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--brand);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.step-card h3,
.feature-grid h3,
.transaction-grid h3,
.security-grid h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 15px;
}

.step-card p,
.feature-grid p,
.transaction-grid p,
.report-grid p,
.security-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 12px;
}

.callout.warning {
  background: var(--amber-soft);
  border-left-color: var(--amber);
}

.callout.info {
  background: var(--brand-soft);
  border-left-color: var(--brand);
}

.callout.success {
  background: var(--green-soft);
  border-left-color: var(--green);
}

.callout-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: white;
  background: var(--amber);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.callout.info .callout-icon {
  background: var(--brand);
}

.callout.success .callout-icon {
  background: var(--green);
}

.callout strong {
  display: block;
  color: var(--navy);
  font-size: 13.5px;
}

.callout p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.code-card {
  margin: 24px 0;
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid color-mix(in srgb, var(--border-strong) 62%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.code-title {
  min-height: 46px;
  padding: 8px 13px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--code-text);
  background: color-mix(in srgb, var(--code-bg) 88%, white 12%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.code-title > span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-title strong {
  font-weight: 650;
}

.copy-button {
  padding: 5px 9px;
  color: #bcd1de;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  cursor: pointer;
  font-size: 10px;
}

.copy-button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

pre {
  margin: 0;
  padding: 20px;
  overflow: auto;
  color: var(--code-text);
  font-size: 12px;
  line-height: 1.72;
  tab-size: 2;
}

pre code {
  color: inherit;
}

.table-wrap {
  margin: 25px 0;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 12.5px;
}

th {
  color: var(--navy);
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

td code,
.response-guide code,
.feature-grid code {
  padding: 2px 5px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 5px;
  font-size: 11.5px;
}

.required {
  padding: 2px 6px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: stretch;
  gap: 18px;
}

.split-grid > .code-card {
  margin: 0;
}

.response-guide,
.callback-checklist {
  padding: 23px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.response-guide h3,
.callback-checklist h3,
.checklist-card h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 15px;
}

.response-guide dl {
  margin: 0;
}

.response-guide dl > div {
  padding: 10px 0;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.response-guide dl > div:last-child {
  border-bottom: 0;
}

.response-guide dt,
.response-guide dd {
  margin: 0;
}

.response-guide dd {
  color: var(--muted);
  font-size: 12.5px;
}

.compact-section {
  padding-top: 60px;
}

.feature-grid,
.transaction-grid,
.report-grid,
.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 15px;
  display: grid;
  place-items: center;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 900;
}

.flow {
  margin: 30px 0;
  padding: 23px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.flow-step {
  min-height: 104px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface-2);
  border-radius: 11px;
}

.flow-step > span {
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
}

.flow-step strong {
  margin: 5px 0 2px;
  color: var(--navy);
  font-size: 13px;
}

.flow-step small {
  color: var(--muted);
  font-size: 10px;
}

.flow-step.final {
  background: var(--green-soft);
}

.flow-arrow {
  color: var(--faint);
}

.transaction-tag {
  margin-bottom: 14px;
  display: inline-block;
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.transaction-grid article > code,
.report-grid article > code {
  margin-top: 15px;
  padding: 9px 10px;
  display: block;
  overflow-x: auto;
  color: var(--code-text);
  background: var(--code-bg);
  border-radius: 8px;
  font-size: 9.5px;
  white-space: nowrap;
}

.rules-grid {
  margin-top: 17px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.rules-grid > div {
  padding: 16px;
  background: var(--surface-2);
}

.rules-grid strong {
  color: var(--navy);
  font-size: 11px;
}

.rules-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.callback-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(290px, 0.88fr);
}

.callback-checklist ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: callback-steps;
}

.callback-checklist li {
  position: relative;
  padding: 10px 0 10px 37px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  counter-increment: callback-steps;
  font-size: 12.5px;
}

.callback-checklist li:last-child {
  border-bottom: 0;
}

.callback-checklist li::before {
  content: counter(callback-steps);
  position: absolute;
  top: 10px;
  left: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 900;
}

.report-grid {
  grid-template-columns: repeat(2, 1fr);
}

.report-grid .endpoint-line {
  margin-bottom: 13px;
}

.endpoint-filters {
  margin: 22px 0 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-button,
.tabs button {
  padding: 7px 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.filter-button:hover,
.filter-button.is-active,
.tabs button:hover,
.tabs button.is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
}

.endpoint-list {
  display: grid;
  gap: 10px;
}

.endpoint-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}

.endpoint-card[hidden] {
  display: none;
}

.endpoint-summary {
  width: 100%;
  min-height: 68px;
  padding: 14px 17px;
  display: grid;
  grid-template-columns: auto minmax(150px, 0.85fr) minmax(200px, 1.4fr) auto;
  align-items: center;
  gap: 14px;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.endpoint-summary:hover {
  background: var(--surface-2);
}

.endpoint-name {
  display: grid;
  gap: 2px;
}

.endpoint-name strong {
  color: var(--navy);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.endpoint-name small {
  color: var(--faint);
  font-size: 9px;
}

.endpoint-purpose {
  color: var(--muted);
  font-size: 12px;
}

.chevron {
  color: var(--faint);
  font-size: 16px;
  transition: transform 150ms ease;
}

.endpoint-card.is-open .chevron {
  transform: rotate(180deg);
}

.endpoint-details {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.endpoint-details[hidden] {
  display: none;
}

.endpoint-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  padding: 4px 8px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 9.5px;
}

.meta-pill strong {
  color: var(--navy);
}

.endpoint-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.endpoint-code {
  margin: 0;
  padding: 14px;
  max-height: 310px;
  background: var(--code-bg);
  border-radius: 10px;
  font-size: 10.5px;
}

.tabs {
  margin: 24px 0 10px;
  display: flex;
  gap: 7px;
}

.tab-panel .code-card {
  margin-top: 0;
}

.tab-panel[hidden] {
  display: none;
}

.status-table td:first-child {
  width: 90px;
}

.http-code {
  min-width: 43px;
  padding: 3px 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
}

.http-code.ok {
  color: var(--green);
  background: var(--green-soft);
}

.http-code.accepted {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.http-code.warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.http-code.danger {
  color: var(--red);
  background: var(--red-soft);
}

.security-grid {
  grid-template-columns: repeat(4, 1fr);
}

.security-grid article > span {
  margin-bottom: 13px;
  display: inline-block;
  color: var(--brand);
  font-size: 13px;
}

.checklist-card {
  margin-top: 17px;
  padding: 23px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px 18px;
}

.checklist label {
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
}

.checklist input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--brand);
}

.site-footer {
  margin-top: 72px;
  padding: 34px 0 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 11px;
}

.site-footer p {
  margin: 0;
}

.site-footer > a {
  color: var(--brand-strong);
  text-decoration: none;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.footer-brand .brand-mark {
  width: 32px;
  height: 32px;
  font-size: 18px;
}

.footer-brand strong {
  font-size: 11px;
}

.footer-brand small {
  font-size: 7px;
}

.toast {
  position: fixed;
  z-index: 300;
  right: 22px;
  bottom: 22px;
  padding: 10px 14px;
  color: white;
  background: var(--code-bg);
  border-radius: 9px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 170ms ease;
  font-size: 12px;
  font-weight: 700;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

noscript {
  position: fixed;
  z-index: 500;
  right: 15px;
  bottom: 15px;
  left: 15px;
  padding: 14px;
  color: #4d3200;
  background: #fff1c7;
  border: 1px solid #ecc96e;
  border-radius: 10px;
}

@media (max-width: 1120px) {
  :root {
    --sidebar-width: 250px;
  }

  main {
    padding-right: 35px;
    padding-left: 35px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.82fr);
  }

  .steps,
  .security-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-height: 64px;
  }

  .topbar {
    padding: 0 16px;
  }

  .control-label {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .sidebar {
    z-index: 160;
    width: min(320px, 88vw);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 18px 0 45px rgba(0, 0, 0, 0.18);
  }

  .mobile-overlay {
    position: fixed;
    z-index: 150;
    inset: var(--topbar-height) 0 0;
    display: block;
    background: rgba(4, 16, 25, 0.44);
    backdrop-filter: blur(2px);
  }

  .mobile-overlay[hidden] {
    display: none;
  }

  main {
    margin-left: 0;
    padding: calc(var(--topbar-height) + 24px) 24px 30px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-panel {
    max-width: 600px;
  }

  .facts-grid {
    margin-top: 30px;
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid,
  .transaction-grid {
    grid-template-columns: 1fr;
  }

  .flow {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }

  .endpoint-summary {
    grid-template-columns: auto minmax(140px, 0.8fr) minmax(180px, 1.2fr) auto;
  }
}

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

  .brand strong {
    font-size: 12px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }

  .language-button {
    min-width: 32px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .mobile-menu-button {
    padding-right: 9px;
    padding-left: 9px;
  }

  .mobile-menu-button span:last-child {
    display: none;
  }

  main {
    padding-right: 17px;
    padding-left: 17px;
  }

  .doc-section {
    padding-top: 54px;
  }

  .hero {
    padding-top: 39px;
  }

  .hero h1 {
    font-size: clamp(36px, 11vw, 52px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .facts-grid,
  .steps,
  .report-grid,
  .security-grid,
  .checklist,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 12px;
  }

  .section-number {
    width: 36px;
    height: 36px;
  }

  .section-heading h2 {
    font-size: 28px;
  }

  .section-intro {
    margin-left: 0;
    font-size: 14.5px;
  }

  .endpoint-summary {
    grid-template-columns: auto 1fr auto;
  }

  .endpoint-purpose {
    grid-column: 2 / 3;
    font-size: 11px;
  }

  .chevron {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .endpoint-details {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .footer-brand small {
    display: block;
  }
}

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

@media print {
  .topbar,
  .sidebar,
  .hero-actions,
  .copy-button,
  .endpoint-filters,
  .tabs,
  .toast {
    display: none !important;
  }

  body {
    color: #15324a;
    background: white;
  }

  main {
    margin: 0;
    padding: 0;
  }

  .doc-section {
    break-inside: avoid;
  }
}
