@font-face {
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 400;
  src: url("material-symbols-rounded.woff2") format("woff2");
  font-display: block;
}

:root {
  --page: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --surface-blue: #eef4ff;
  --ink: #101828;
  --text: #344054;
  --muted: #667085;
  --quiet: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #cfd7e6;
  --brand: #2563eb;
  --brand-dark: #1746b0;
  --cyan: #0891b2;
  --green: #15803d;
  --green-bright: #16a34a;
  --green-soft: #ecfdf3;
  --amber: #b45309;
  --amber-soft: #fff7e8;
  --purple: #7c3aed;
  --purple-soft: #f5f0ff;
  --red: #c4322b;
  --red-soft: #fff1f2;
  --code: #0c1422;
  --code-head: #111c2e;
  --code-text: #dce9ff;
  --topbar-height: 68px;
  --shadow-small: 0 5px 18px rgba(16, 24, 40, 0.07);
  --shadow-modal: 0 24px 70px rgba(16, 24, 40, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.menu-open,
body.search-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

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

code {
  overflow-wrap: anywhere;
}

.material-symbols-rounded {
  display: inline-block;
  direction: ltr;
  font-family: "Material Symbols Rounded";
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  letter-spacing: normal;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  z-index: 300;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.topbar {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  height: var(--topbar-height);
  border-bottom: 1px solid rgba(228, 231, 236, 0.92);
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(1680px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 270px minmax(300px, 620px) 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 8px;
  background: #07111b;
  box-shadow: 0 7px 18px rgba(37, 99, 235, 0.25);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.search-trigger {
  width: 100%;
  height: 40px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.search-trigger:hover {
  border-color: #b9ccff;
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.06);
}

.search-trigger .material-symbols-rounded {
  color: var(--brand);
  font-size: 19px;
}

kbd {
  min-width: 38px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--quiet);
  font-family: inherit;
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}

.top-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.version-chip {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #cae8d5;
  border-radius: 999px;
  background: var(--green-soft);
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.13);
}

.header-button,
.button {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.header-button .material-symbols-rounded,
.button .material-symbols-rounded {
  font-size: 18px;
}

.primary-action {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
}

.primary-action:hover {
  border-color: #1d2939;
  background: #1d2939;
  transform: translateY(-1px);
}

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

.secondary-action:hover {
  border-color: #b9ccff;
  background: var(--surface-blue);
  color: var(--brand-dark);
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
}

.mobile-only {
  display: none;
}

.page-shell {
  width: min(1680px, calc(100% - 40px));
  margin: 0 auto;
  padding-top: var(--topbar-height);
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  padding: 24px 22px 20px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cfd7e6 transparent;
}

.contract-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.contract-state > .material-symbols-rounded {
  color: var(--green-bright);
  font-size: 23px;
}

.contract-state > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.contract-state b {
  color: var(--ink);
  font-size: 12px;
}

.contract-state small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.side-nav {
  padding-top: 20px;
}

.nav-group + .nav-group {
  margin-top: 22px;
}

.nav-group p {
  margin: 0 0 7px;
  padding: 0 10px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.nav-group a {
  min-height: 34px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.nav-group a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.nav-group a.active {
  background: var(--surface-soft);
  color: var(--brand-dark);
  font-weight: 680;
}

.nav-group a .material-symbols-rounded {
  color: #7b8ba5;
  font-size: 18px;
}

.nav-group a.active .material-symbols-rounded {
  color: var(--brand);
}

.method-mini {
  width: 24px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border: 1px solid;
  border-radius: 4px;
  font-size: 7px;
  font-weight: 850;
  line-height: 1;
}

.method-mini.get {
  border-color: #98e5f5;
  background: var(--surface-soft);
  color: #0e7490;
}

.method-mini.post {
  border-color: #a6f0c2;
  background: var(--surface-soft);
  color: #067647;
}

.sidebar-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  padding: 16px 10px 0;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 10px;
}

.sidebar-footer a {
  text-decoration: none;
}

.sidebar-footer a:hover {
  color: var(--brand);
}

.content {
  min-width: 0;
  overflow-x: hidden;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
}

.hero,
.doc-section {
  scroll-margin-top: 90px;
  padding: 62px clamp(36px, 5vw, 74px);
}

.doc-section {
  border-top: 1px solid var(--line);
}

.hero {
  background: var(--surface-soft);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.breadcrumbs span:first-child {
  color: var(--brand);
}

.breadcrumbs .material-symbols-rounded {
  color: var(--quiet);
  font-size: 16px;
}

.hero-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 40px;
  align-items: start;
}

.section-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.3;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: 48px;
  line-height: 1.08;
  font-weight: 780;
}

.hero-heading p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.hero-mark {
  width: 116px;
  height: 116px;
  overflow: hidden;
  border: 8px solid white;
  border-radius: 26px;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.18);
}

.hero-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
}

.hero-actions .button {
  height: 44px;
  padding: 0 16px;
}

.base-url-bar {
  min-height: 62px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  padding: 10px 12px 10px 15px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: var(--surface);
}

.base-url-bar > .material-symbols-rounded {
  color: var(--brand);
  font-size: 21px;
}

.base-url-bar > span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.base-url-bar small {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 800;
}

.base-url-bar code {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.copy-button {
  min-width: 112px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #cdd7e7;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease, transform 160ms ease, box-shadow 220ms ease;
}

.copy-button:hover {
  border-color: #aebdd2;
  background: var(--surface-soft);
}

.copy-button:active {
  transform: scale(0.97);
}

.copy-button .material-symbols-rounded {
  font-size: 17px;
}

.copy-button.copied {
  border-color: #16a34a;
  background: #16a34a;
  color: white;
  box-shadow: 0 7px 18px rgba(22, 163, 74, 0.2);
}

.copy-button.copied .copy-icon {
  animation: copy-check 280ms ease both;
}

@keyframes copy-check {
  0% { transform: scale(0.55) rotate(-12deg); opacity: 0.3; }
  70% { transform: scale(1.12) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fact-grid > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-content: center;
  column-gap: 8px;
  min-height: 82px;
  padding: 12px 14px;
}

.fact-grid > div + div {
  border-left: 1px solid var(--line);
}

.fact-grid .material-symbols-rounded {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--brand);
  font-size: 20px;
}

.fact-grid b {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.fact-grid small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.notice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 11px;
  margin-top: 24px;
  padding: 14px 15px;
  border: 1px solid;
  border-radius: 8px;
}

.notice > .material-symbols-rounded {
  margin-top: 1px;
  font-size: 21px;
}

.notice b {
  display: block;
  margin-bottom: 2px;
  color: currentColor;
  font-size: 12px;
}

.notice p {
  margin: 0;
  color: currentColor;
  font-size: 12px;
  line-height: 1.6;
}

.info-notice {
  border-color: #cddcff;
  background: var(--surface-blue);
  color: #344b79;
}

.info-notice > .material-symbols-rounded {
  color: var(--brand);
}

.warning-notice {
  border-color: #f3d297;
  background: var(--amber-soft);
  color: #7c4a0b;
}

.warning-notice > .material-symbols-rounded {
  color: var(--amber);
}

.success-notice {
  border-color: #b7e4c7;
  background: var(--green-soft);
  color: #166534;
}

.success-notice > .material-symbols-rounded {
  color: var(--green-bright);
}

.danger-notice {
  border-color: #fecaca;
  background: var(--red-soft);
  color: #8a2020;
}

.danger-notice > .material-symbols-rounded {
  color: var(--red);
}

.section-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 30px;
}

.section-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: var(--surface-blue);
  color: var(--brand);
  font-size: 23px;
}

.section-heading .section-kicker {
  margin-bottom: 5px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.2;
  font-weight: 760;
}

.section-heading p {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.doc-section h3 {
  margin: 32px 0 13px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.doc-section > h3:first-child {
  margin-top: 0;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.steps-row > div {
  min-width: 0;
  min-height: 106px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-content: center;
  column-gap: 9px;
  padding: 14px;
  background: var(--surface-soft);
}

.steps-row > div + div {
  border-left: 1px solid var(--line);
}

.steps-row span {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.steps-row b {
  color: var(--ink);
  font-size: 12px;
}

.steps-row small {
  color: var(--muted);
  font-size: 9px;
}

.code-tabs {
  width: max-content;
  display: flex;
  gap: 3px;
  margin-top: 24px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.code-tabs button {
  min-width: 78px;
  height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.code-tabs button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.1);
}

.code-panel {
  display: none;
}

.code-panel.active {
  display: block;
}

.code-block {
  min-width: 0;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #26344f;
  border-radius: 8px;
  background: var(--code);
}

.code-block.compact {
  max-width: 820px;
}

.code-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 7px 6px 16px;
  border-bottom: 1px solid #26344f;
  background: var(--code-head);
  color: #a9b8ce;
  font-size: 10px;
  font-weight: 700;
}

.code-head .copy-button {
  border-color: #34425a;
  background: #17243a;
  color: #dce9ff;
}

.code-head .copy-button:hover {
  border-color: #51627e;
  background: #1d2c45;
}

.code-head .copy-button.copied {
  border-color: #22c55e;
  background: #15803d;
  color: white;
}

.code-block pre {
  max-width: 100%;
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: var(--code-text);
  font-size: 12px;
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: #41516b transparent;
}

.code-block pre code {
  white-space: pre;
  overflow-wrap: normal;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.principle-grid > div {
  min-height: 150px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.principle-grid .material-symbols-rounded {
  color: var(--brand);
  font-size: 22px;
}

.principle-grid .pager-symbol {
  position: relative;
  width: 22px;
  height: 22px;
  display: inline-block;
  border: 2px solid var(--brand);
  border-radius: 7px;
}

.principle-grid .pager-symbol::before,
.principle-grid .pager-symbol::after {
  content: "";
  position: absolute;
  background: var(--brand);
}

.principle-grid .pager-symbol::before {
  top: 5px;
  left: 8px;
  width: 8px;
  height: 2px;
  box-shadow: 0 5px 0 var(--brand), 0 10px 0 var(--brand);
}

.principle-grid .pager-symbol::after {
  top: 5px;
  left: 4px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  box-shadow: 0 5px 0 var(--brand), 0 10px 0 var(--brand);
}

.principle-grid b {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 13px;
}

.principle-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.principle-grid code,
.schema-table code,
.supporting code,
.notice code,
.migration-table code {
  padding: 1px 5px;
  border: 1px solid #d8e5ff;
  border-radius: 5px;
  background: var(--surface-blue);
  color: var(--brand-dark);
  font-size: 0.93em;
}

.endpoint-stack {
  display: grid;
  gap: 8px;
}

.endpoint-bar {
  min-height: 54px;
  display: grid;
  grid-template-columns: 58px minmax(220px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.endpoint-bar.featured {
  border-color: #cddcff;
  background: var(--surface-blue);
}

.endpoint-bar > code {
  color: var(--ink);
  font-size: 12px;
  font-weight: 680;
}

.http-method {
  width: 54px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.http-method.get {
  border-color: #7ddded;
  background: var(--surface-soft);
  color: #0e7490;
}

.http-method.post {
  border-color: #a6f0c2;
  background: var(--surface-soft);
  color: #067647;
}

.http-method.put {
  border-color: #d8c5ff;
  background: var(--purple-soft);
  color: var(--purple);
}

.http-method.delete {
  border-color: #fecaca;
  background: var(--red-soft);
  color: var(--red);
}

.method-cluster {
  width: max-content;
  display: flex;
  gap: 4px;
}

.method-cluster .http-method {
  width: 38px;
  font-size: 7px;
}

.endpoint-bar:has(.method-cluster) {
  grid-template-columns: auto minmax(220px, auto) minmax(0, 1fr) auto;
}

.endpoint-summary {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.api-badge {
  min-width: 34px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border: 1px solid #b7e4c7;
  border-radius: 999px;
  background: var(--green-soft);
  color: #166534;
  font-size: 9px;
  font-weight: 800;
}

.schema-table,
.error-table,
.rate-table,
.migration-table {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.schema-table > div,
.error-table > div,
.rate-table > div,
.migration-table > div {
  min-height: 48px;
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 9px 13px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 11px;
}

.schema-table > div {
  grid-template-columns: minmax(120px, 0.8fr) minmax(90px, 0.55fr) minmax(240px, 2fr);
}

.schema-table > div:first-child,
.error-table > div:first-child,
.rate-table > div:first-child,
.migration-table > div:first-child {
  border-top: 0;
}

.schema-table .schema-head,
.error-table .error-head,
.rate-table .rate-head,
.migration-table .migration-head {
  min-height: 38px;
  background: var(--surface-soft);
  color: var(--quiet);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.schema-table > div > span:nth-child(2) {
  color: var(--purple);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.split-content,
.split-code {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.split-content h3 {
  margin-top: 0;
}

.split-content .code-block,
.split-code .code-block {
  margin-top: 0;
}

.small-table {
  margin-top: 0;
}

.option-grid,
.proxy-summary,
.pack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 20px;
}

.option-grid > div,
.pack-grid > div {
  min-height: 132px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.option-grid .material-symbols-rounded {
  color: var(--brand);
  font-size: 22px;
}

.option-grid b,
.pack-grid b {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 12px;
}

.option-grid p,
.pack-grid p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.option-grid code,
.pack-grid small {
  display: inline-block;
  margin-top: 8px;
  color: var(--brand-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.lifecycle {
  display: grid;
  grid-template-columns: 1fr 24px 1fr 24px 1fr;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
}

.lifecycle > div {
  min-height: 82px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-content: center;
  column-gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.lifecycle > .material-symbols-rounded {
  color: var(--quiet);
  font-size: 20px;
}

.lifecycle > div > span {
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.lifecycle > div.active {
  border-color: #cddcff;
  background: var(--surface-blue);
}

.lifecycle > div.active > span {
  background: var(--brand);
  color: white;
}

.lifecycle > div.success {
  border-color: #b7e4c7;
  background: var(--green-soft);
}

.lifecycle > div.success > span {
  background: var(--green-bright);
  color: white;
}

.lifecycle b {
  color: var(--ink);
  font-size: 11px;
}

.lifecycle small {
  color: var(--muted);
  font-size: 9px;
}

.status-grid,
.order-statuses {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.order-statuses {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-grid > div,
.order-statuses > div {
  min-height: 88px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.status-grid p,
.order-statuses p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.status-pill {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid;
  border-radius: 999px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 750;
}

.status-pill.waiting,
.status-pill.processing {
  border-color: #cddcff;
  background: var(--surface-blue);
  color: var(--brand-dark);
}

.status-pill.completed {
  border-color: #b7e4c7;
  background: var(--green-soft);
  color: #166534;
}

.status-pill.expired,
.status-pill.refunded {
  border-color: #f3d297;
  background: var(--amber-soft);
  color: #8a4b08;
}

.status-pill.failed {
  border-color: #fecaca;
  background: var(--red-soft);
  color: #9f2823;
}

.status-pill.review {
  border-color: #d8c5ff;
  background: var(--purple-soft);
  color: var(--purple);
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 20px;
}

.term-grid > div {
  min-height: 104px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  column-gap: 8px;
  padding: 14px 18px;
  border: 1px solid #d8e5ff;
  border-radius: 8px;
  background: var(--surface-blue);
}

.term-grid b {
  color: var(--brand-dark);
  font-size: 27px;
  line-height: 1;
}

.term-grid span {
  align-self: end;
  color: var(--muted);
  font-size: 11px;
}

.term-grid code {
  grid-column: 1 / -1;
  margin-top: 10px;
  color: var(--brand-dark);
  font-size: 10px;
}

.inline-errors {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.inline-errors code {
  padding: 5px 8px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: var(--red-soft);
  color: #9f2823;
  font-size: 10px;
}

.proxy-summary > div {
  min-height: 106px;
  display: grid;
  grid-template-columns: 25px 1fr;
  align-content: center;
  column-gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.proxy-summary .material-symbols-rounded {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--cyan);
  font-size: 21px;
}

.proxy-summary b {
  color: var(--ink);
  font-size: 11px;
}

.proxy-summary code {
  color: var(--muted);
  font-size: 9px;
}

.country-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.country-list span {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
}

.country-list b {
  min-width: 25px;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.pack-code {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #d8c5ff;
  border-radius: 5px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 8px;
  font-weight: 850;
}

.pack-code.green {
  border-color: #b7e4c7;
  background: var(--green-soft);
  color: #166534;
}

.pack-code.gray {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--muted);
}

.pack-code.amber {
  border-color: #f3d297;
  background: var(--amber-soft);
  color: #8a4b08;
}

.state-machine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.state-machine code {
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 10px;
}

.state-machine .material-symbols-rounded {
  color: var(--quiet);
  font-size: 17px;
}

.state-machine .branch {
  margin: 0 5px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 700;
}

.event-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.event-table > div {
  min-height: 45px;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.4fr);
  align-items: center;
  gap: 14px;
  padding: 8px 13px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.event-table > div:first-child {
  border-top: 0;
}

.event-table code {
  color: var(--brand-dark);
  font-size: 10px;
}

.event-table span {
  color: var(--muted);
}

.retry-line {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.retry-line span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e5ff;
  border-radius: 6px;
  background: var(--surface-blue);
  color: var(--brand-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
}

.supporting {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.error-table > div {
  grid-template-columns: 50px minmax(180px, 0.85fr) minmax(280px, 1.6fr);
}

.error-table b {
  color: var(--ink);
  font-size: 11px;
}

.error-table code {
  color: var(--red);
  font-size: 10px;
}

.rate-table > div {
  grid-template-columns: minmax(120px, 0.6fr) minmax(100px, 0.55fr) minmax(270px, 1.8fr);
}

.rate-table b {
  color: var(--ink);
  font-size: 11px;
}

.rate-table code {
  color: var(--brand-dark);
  font-size: 10px;
}

.header-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.header-strip code {
  padding: 5px 8px;
  border: 1px solid #d8e5ff;
  border-radius: 6px;
  background: var(--surface-blue);
  color: var(--brand-dark);
  font-size: 9px;
}

.implementation-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.implementation-list > div {
  min-height: 82px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border-top: 1px solid var(--line);
}

.implementation-list > div:first-child {
  border-top: 0;
}

.implementation-list > div > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-blue);
  color: var(--brand);
  font-size: 10px;
  font-weight: 850;
}

.implementation-list b {
  color: var(--ink);
  font-size: 12px;
}

.implementation-list p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.implementation-list em {
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--quiet);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.database-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.database-grid code {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 9px;
  text-align: center;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check-list > div {
  min-height: 54px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid #b7e4c7;
  border-radius: 7px;
  background: var(--green-soft);
  color: #315b3c;
  font-size: 10px;
  line-height: 1.45;
}

.check-list .material-symbols-rounded {
  color: var(--green-bright);
  font-size: 19px;
}

.migration-table > div {
  grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 0.95fr) minmax(280px, 1.5fr);
}

.migration-table > div > code {
  font-size: 9px;
}

.page-footer {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(36px, 5vw, 74px);
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.page-footer > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-footer img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.page-footer span {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.page-footer b {
  color: var(--ink);
  font-size: 11px;
}

.page-footer small {
  margin-top: 3px;
  color: var(--quiet);
  font-size: 9px;
}

.page-footer > div:last-child {
  display: flex;
  gap: 14px;
}

.page-footer a {
  color: var(--muted);
  font-size: 10px;
  text-decoration: none;
}

.page-footer a:hover {
  color: var(--brand);
}

.context-rail {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  padding: 24px 0 24px 22px;
  overflow-y: auto;
}

.rail-block {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.rail-block + .rail-block,
.rail-block + .rail-download {
  margin-top: 10px;
}

.rail-label {
  display: block;
  margin-bottom: 12px;
  color: var(--quiet);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.rail-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 11px;
}

.rail-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.rail-block dl {
  margin: 14px 0 0;
}

.rail-block dl > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.rail-block dt {
  color: var(--quiet);
}

.rail-block dd {
  margin: 0;
  color: var(--text);
  font-weight: 650;
  text-align: right;
}

.rail-url {
  display: block;
  padding: 9px;
  border: 1px solid #d8e5ff;
  border-radius: 6px;
  background: var(--surface-blue);
  color: var(--brand-dark);
  font-size: 9px;
  line-height: 1.55;
}

.full-copy {
  width: 100%;
  margin-top: 9px;
}

.on-page {
  display: flex;
  flex-direction: column;
}

.on-page a {
  padding: 5px 0;
  color: var(--muted);
  font-size: 10px;
  text-decoration: none;
}

.on-page a:hover {
  color: var(--brand);
}

.rail-download {
  min-height: 62px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid #cddcff;
  border-radius: 8px;
  background: var(--surface-blue);
  color: var(--brand-dark);
  text-decoration: none;
}

.rail-download > .material-symbols-rounded {
  font-size: 22px;
}

.rail-download span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.rail-download b {
  font-size: 10px;
}

.rail-download small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.search-modal {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 18px 18px;
  background: rgba(16, 24, 40, 0.5);
  backdrop-filter: blur(5px);
}

.search-modal.open {
  display: flex;
}

.search-dialog {
  width: min(660px, 100%);
  max-height: 70vh;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-modal);
}

.search-field {
  height: 58px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
}

.search-field > .material-symbols-rounded {
  color: var(--brand);
  font-size: 22px;
}

.search-field input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.search-results {
  max-height: calc(70vh - 58px);
  padding: 8px;
  overflow-y: auto;
}

.search-result {
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text);
  text-decoration: none;
}

.search-result:hover,
.search-result:focus {
  background: var(--surface-blue);
  outline: 0;
}

.search-result > .material-symbols-rounded {
  color: var(--brand);
  font-size: 19px;
}

.search-result span:nth-child(2) {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}

.search-result small {
  color: var(--quiet);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.search-empty {
  padding: 28px 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1480px) {
  .topbar-inner,
  .page-shell {
    width: min(1320px, calc(100% - 32px));
  }

  .topbar-inner {
    grid-template-columns: 250px minmax(280px, 560px) 1fr;
  }

  .page-shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .context-rail {
    display: none;
  }

  .sidebar {
    padding-right: 18px;
  }
}

@media (max-width: 1120px) {
  .version-chip,
  .top-actions > .secondary-action {
    display: none;
  }

  .topbar-inner {
    grid-template-columns: 230px minmax(240px, 1fr) auto;
  }

  .page-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .hero,
  .doc-section {
    padding-right: 42px;
    padding-left: 42px;
  }

  .option-grid,
  .proxy-summary,
  .pack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .country-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .topbar-inner,
  .page-shell {
    width: 100%;
  }

  .topbar-inner {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 0 10px 0 14px;
  }

  .search-trigger,
  .top-actions > .primary-action,
  .top-actions > .secondary-action,
  .version-chip {
    display: none;
  }

  .mobile-only {
    display: grid;
    place-items: center;
  }

  .page-shell {
    display: block;
    padding-top: var(--topbar-height);
  }

  .sidebar {
    position: fixed;
    z-index: 90;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    width: min(300px, 88vw);
    height: auto;
    padding: 18px;
    transform: translateX(-104%);
    border-right: 1px solid var(--line);
    background: var(--page);
    box-shadow: 24px 0 50px rgba(16, 24, 40, 0.15);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: none;
  }

  .content {
    width: 100%;
    border-right: 0;
    border-left: 0;
  }

  .hero-heading {
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 24px;
  }

  .hero-mark {
    width: 84px;
    height: 84px;
    border-width: 6px;
    border-radius: 20px;
  }

  .hero h1 {
    font-size: 42px;
  }
}

@media (max-width: 700px) {
  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-copy small {
    display: none;
  }

  .hero,
  .doc-section {
    padding: 38px 20px;
  }

  .hero-heading {
    display: block;
  }

  .hero-mark {
    display: none;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-heading p {
    font-size: 14px;
  }

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

  .hero-actions .button {
    width: 100%;
  }

  .base-url-bar {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .base-url-bar .copy-button {
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .fact-grid > div:nth-child(3) {
    border-left: 0;
  }

  .fact-grid > div:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }

  .section-heading {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
  }

  .section-icon {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

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

  .steps-row,
  .principle-grid,
  .option-grid,
  .proxy-summary,
  .pack-grid,
  .status-grid,
  .order-statuses,
  .term-grid,
  .split-content,
  .split-code,
  .check-list {
    grid-template-columns: 1fr;
  }

  .steps-row > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .endpoint-bar,
  .endpoint-bar:has(.method-cluster) {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
  }

  .endpoint-summary {
    display: none;
  }

  .endpoint-bar > code {
    font-size: 10px;
  }

  .method-cluster .http-method {
    width: 30px;
  }

  .schema-table,
  .error-table,
  .rate-table,
  .migration-table {
    overflow-x: auto;
  }

  .schema-table > div,
  .error-table > div,
  .rate-table > div,
  .migration-table > div {
    min-width: 650px;
  }

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

  .lifecycle > .material-symbols-rounded {
    justify-self: center;
    transform: rotate(90deg);
  }

  .country-list,
  .database-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .retry-line {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .event-table {
    overflow-x: auto;
  }

  .event-table > div {
    min-width: 590px;
  }

  .implementation-list > div {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .implementation-list em {
    grid-column: 2;
    justify-self: start;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 26px 20px;
  }

  .page-footer > div:last-child {
    flex-wrap: wrap;
  }
}

@media (max-width: 430px) {
  .brand-copy strong {
    font-size: 13px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .breadcrumbs {
    margin-bottom: 20px;
  }

  .code-tabs {
    width: 100%;
  }

  .code-tabs button {
    min-width: 0;
    flex: 1;
  }

  .code-block pre {
    padding: 15px;
    font-size: 11px;
  }

  .copy-button {
    min-width: 105px;
  }

  .code-head {
    padding-left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
