:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-subtle: #f8f8f7;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --text: #1d1c1a;
  --text-secondary: #61605c;
  --text-tertiary: #96948e;
  --line: #e9e7e2;
  --line-strong: #d9d6ce;
  --brand: #f4a21c;
  --brand-strong: #dd8310;
  --brand-soft: #fff6e6;
  --blue: #3777eb;
  --blue-soft: #edf4ff;
  --green: #24a66a;
  --green-soft: #eaf8f1;
  --red: #d95757;
  --purple: #7956d8;
  --code-bg: #17191d;
  --code-top: #202329;
  --shadow-sm: 0 1px 2px rgba(27, 25, 20, 0.04), 0 5px 18px rgba(27, 25, 20, 0.04);
  --shadow-lg: 0 22px 70px rgba(23, 21, 17, 0.16);
  --sidebar-width: 264px;
  --toc-width: 206px;
  --header-height: 68px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-sans: Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111210;
  --bg-subtle: #161714;
  --surface: #171815;
  --surface-raised: #1d1e1a;
  --text: #f0efe9;
  --text-secondary: #b4b2aa;
  --text-tertiary: #77766f;
  --line: #2b2c27;
  --line-strong: #393a33;
  --brand: #f5ab2e;
  --brand-strong: #ffc45d;
  --brand-soft: #302513;
  --blue-soft: #17263d;
  --green-soft: #14291f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18), 0 5px 18px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 22px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

::selection {
  background: rgba(244, 162, 28, 0.25);
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 10px;
  left: 10px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.topbar {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 28px;
}

.brand {
  display: inline-flex;
  flex: 0 0 var(--sidebar-width);
  align-items: center;
  min-width: 0;
  letter-spacing: -0.02em;
}

.brand__mark {
  display: inline-flex;
  width: 31px;
  height: 31px;
  margin-right: 10px;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
  border-radius: 9px;
  background: var(--brand);
  box-shadow: 0 5px 12px rgba(232, 142, 11, 0.22);
  transform: rotate(-3deg);
}

.brand__mark span {
  display: block;
  width: 3px;
  border-radius: 4px;
  background: #252114;
  transform: rotate(13deg);
}

.brand__mark span:nth-child(1) { height: 11px; }
.brand__mark span:nth-child(2) { height: 16px; }
.brand__mark span:nth-child(3) { height: 21px; }

.brand__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand__divider {
  width: 1px;
  height: 16px;
  margin: 0 10px;
  background: var(--line-strong);
}

.brand__product {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.brand__status {
  margin-left: 7px;
  padding: 1px 5px;
  border: 1px solid color-mix(in srgb, var(--brand) 48%, var(--line));
  border-radius: 4px;
  color: var(--brand-strong);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.5;
}

.topnav {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 28px;
}

.topnav a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: color 160ms ease;
}

.topnav a:hover,
.topnav a.is-active {
  color: var(--text);
}

.topnav a.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--brand);
  content: "";
}

.topbar__actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 9px;
}

.search-trigger {
  display: flex;
  width: 210px;
  height: 36px;
  padding: 0 8px 0 11px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-subtle);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-trigger:hover {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.search-trigger svg {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.search-trigger span {
  font-size: 12px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 21px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line-strong);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 10px;
  line-height: 1;
}

.search-trigger kbd {
  margin-left: auto;
}

.site-link {
  display: inline-flex;
  height: 36px;
  padding: 0 10px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.site-link:hover {
  color: var(--brand-strong);
}

.site-link svg {
  width: 13px;
  height: 13px;
  margin-left: 4px;
}

.icon-button,
.menu-button {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.icon-button:hover,
.menu-button:hover {
  border-color: var(--line);
  background: var(--bg-subtle);
  color: var(--text);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.moon-icon,
html[data-theme="dark"] .sun-icon {
  display: none;
}

html[data-theme="dark"] .moon-icon {
  display: block;
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.menu-button span {
  width: 17px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
}

.docs-shell {
  min-height: 100vh;
  padding-top: var(--header-height);
}

.sidebar {
  position: fixed;
  z-index: 80;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.sidebar__inner {
  display: flex;
  height: 100%;
  padding: 24px 18px 18px;
  flex-direction: column;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.sidebar__eyebrow {
  display: flex;
  margin: 0 10px 20px;
  align-items: center;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent);
}

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

.side-nav h2 {
  margin: 0 10px 7px;
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.side-nav a {
  display: flex;
  height: 35px;
  padding: 0 10px;
  align-items: center;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  transition: color 150ms ease, background 150ms ease;
}

.side-nav a:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.side-nav a.is-active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 700;
}

.side-nav a > svg {
  width: 15px;
  height: 15px;
  margin-right: 9px;
}

.side-nav a > code {
  width: 31px;
  margin-right: 6px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 500;
}

.side-nav a > code.post { color: var(--blue); }
.side-nav a > code.delete { color: var(--red); }

.sidebar__help {
  display: flex;
  margin-top: auto;
  padding: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-subtle);
}

.sidebar__help-icon {
  display: inline-flex;
  width: 29px;
  height: 29px;
  margin-right: 9px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
}

.sidebar__help strong,
.sidebar__help a {
  display: block;
  line-height: 1.55;
}

.sidebar__help strong {
  font-size: 10px;
}

.sidebar__help a {
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 600;
}

.sidebar-backdrop {
  display: none;
}

.content {
  min-height: calc(100vh - var(--header-height));
  margin-left: var(--sidebar-width);
}

.article-wrap {
  display: grid;
  width: min(1040px, calc(100% - 64px));
  margin: 0 auto;
  grid-template-columns: minmax(0, 760px) var(--toc-width);
  gap: 72px;
}

.article {
  min-width: 0;
  padding: 42px 0 80px;
}

.breadcrumbs {
  display: flex;
  margin-bottom: 40px;
  align-items: center;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--brand-strong);
}

.breadcrumbs svg {
  width: 13px;
  height: 13px;
  margin: 0 6px;
}

.hero {
  position: relative;
  overflow: clip;
  scroll-margin-top: calc(var(--header-height) + 28px);
}

.hero::after {
  position: absolute;
  z-index: -1;
  top: -70px;
  right: -100px;
  width: 360px;
  height: 270px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 11%, transparent), transparent 70%);
  content: "";
  pointer-events: none;
}

.hero__meta {
  display: flex;
  margin-bottom: 17px;
  gap: 7px;
}

.pill {
  display: inline-flex;
  height: 21px;
  padding: 0 7px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.pill--orange {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.18;
}

.hero__lead {
  max-width: 690px;
  margin: 19px 0 0;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.85;
}

.hero__actions {
  display: flex;
  margin-top: 27px;
  gap: 10px;
}

.button {
  display: inline-flex;
  height: 42px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

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

.button svg {
  width: 14px;
  height: 14px;
  margin-left: 7px;
}

.button--primary {
  background: var(--brand);
  box-shadow: 0 7px 16px rgba(222, 132, 6, 0.18);
  color: #231b0d;
}

.button--primary:hover {
  background: #f8b037;
  box-shadow: 0 9px 20px rgba(222, 132, 6, 0.25);
}

.button--secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text-secondary);
}

.button--secondary:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.notice {
  display: flex;
  margin: 34px 0 38px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand-soft) 75%, var(--surface));
}

.notice > svg {
  width: 18px;
  height: 18px;
  margin: 2px 12px 0 0;
  flex: 0 0 auto;
  color: var(--brand-strong);
}

.notice strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 11px;
}

.notice p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 10.5px;
  line-height: 1.75;
}

.intro-grid {
  display: grid;
  margin: 0 0 78px;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.intro-grid article {
  min-height: 187px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.intro-grid article:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 28px rgba(31, 28, 21, 0.07);
  transform: translateY(-2px);
}

.feature-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
}

.feature-icon svg {
  width: 17px;
  height: 17px;
}

.feature-icon--orange { background: var(--brand-soft); color: var(--brand-strong); }
.feature-icon--blue { background: var(--blue-soft); color: var(--blue); }
.feature-icon--green { background: var(--green-soft); color: var(--green); }

.intro-grid h3 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: -0.01em;
}

.intro-grid p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.75;
}

.article > section:not(.hero) {
  margin-top: 78px;
  scroll-margin-top: calc(var(--header-height) + 30px);
}

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

.section-number {
  display: inline-flex;
  width: 34px;
  height: 34px;
  margin: 5px 14px 0 0;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
}

.eyebrow {
  margin: 0 0 2px !important;
  color: var(--brand-strong) !important;
  font-family: var(--font-mono);
  font-size: 8px !important;
  font-weight: 500;
  letter-spacing: 0.11em;
  line-height: 1.4 !important;
}

.section-heading h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.35;
}

.article section > p,
.article section > div + p {
  margin: 0 0 22px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.9;
}

.article section > h3 {
  margin: 34px 0 12px;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.steps {
  position: relative;
  margin: 31px 0 0;
  padding: 0;
  list-style: none;
}

.steps::before {
  position: absolute;
  top: 29px;
  bottom: 30px;
  left: 17px;
  width: 1px;
  background: var(--line);
  content: "";
}

.steps li {
  position: relative;
  display: flex;
  padding-bottom: 29px;
}

.steps li:last-child { padding-bottom: 0; }

.step-index {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 35px;
  height: 35px;
  margin-right: 16px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}

.steps h3 {
  margin: 3px 0 3px;
  font-size: 13px;
}

.steps p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.75;
}

.token-demo {
  display: flex;
  width: min(100%, 485px);
  height: 43px;
  margin-top: 12px;
  padding: 0 7px 0 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-subtle);
}

.token-demo code {
  min-width: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-demo button,
.endpoint-card button {
  display: inline-flex;
  height: 28px;
  margin-left: auto;
  padding: 0 8px;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
}

.token-demo button:hover,
.endpoint-card button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.token-demo button svg {
  width: 12px;
  height: 12px;
  margin-right: 5px;
}

.endpoint-card {
  margin: 20px 0;
  padding: 13px 15px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.endpoint-card__label {
  margin-bottom: 7px;
  color: var(--text-tertiary);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.endpoint-card__url {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
}

.endpoint-card__url strong {
  color: var(--brand-strong);
  font-weight: 500;
}

.callout {
  display: flex;
  margin: 20px 0 26px;
  padding: 13px 15px;
  border-left: 3px solid var(--blue);
  border-radius: 0 9px 9px 0;
  background: var(--blue-soft);
}

.callout svg {
  width: 17px;
  height: 17px;
  margin: 3px 10px 0 0;
  flex: 0 0 auto;
  color: var(--blue);
}

.callout p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 10.5px;
  line-height: 1.75;
}

.callout strong { color: var(--text); }

.inline-code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-subtle);
  color: var(--brand-strong);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.code-panel {
  overflow: hidden;
  border: 1px solid #30333a;
  border-radius: var(--radius-md);
  background: var(--code-bg);
  box-shadow: 0 12px 28px rgba(18, 19, 22, 0.15);
}

.code-panel__header {
  display: flex;
  height: 45px;
  padding: 0 9px 0 15px;
  align-items: center;
  border-bottom: 1px solid #2e3137;
  background: var(--code-top);
}

.code-tabs {
  display: flex;
  height: 100%;
  gap: 20px;
}

.code-tabs button {
  position: relative;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7f838c;
  font-family: var(--font-mono);
  font-size: 9px;
  cursor: pointer;
}

.code-tabs button:hover,
.code-tabs button.is-active { color: #e2e4e8; }

.code-tabs button.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--brand);
  content: "";
}

.copy-code {
  display: inline-flex;
  height: 28px;
  margin-left: auto;
  padding: 0 7px;
  align-items: center;
  border: 1px solid #383b42;
  border-radius: 6px;
  background: #25282e;
  color: #9a9da5;
  font-size: 8px;
  cursor: pointer;
}

.copy-code:hover { color: #e4e5e7; }

.copy-code svg {
  width: 11px;
  height: 11px;
  margin-right: 5px;
}

.code-panel__body {
  overflow-x: auto;
}

pre {
  margin: 0;
  font-family: var(--font-mono);
  tab-size: 2;
}

.code-panel pre {
  min-height: 232px;
  padding: 20px 22px 23px;
  color: #d4d6da;
  font-size: 10.5px;
  line-height: 1.8;
}

.syn-purple { color: #c59cff; }
.syn-string { color: #8fa9ff; }
.syn-url { color: #69d8b5; }
.syn-yellow { color: #e9c97a; }
.syn-key { color: #8eb3ff; }
.syn-bool { color: #c89ef4; }
.syn-number { color: #e0a276; }

.response-grid {
  display: grid;
  margin-top: 27px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.response-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.response-card__title {
  display: flex;
  height: 42px;
  padding: 0 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg-subtle);
  font-size: 9px;
}

.response-card__title span {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
}

.response-card--success .response-card__title span {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.response-card--error .response-card__title span {
  background: var(--red);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 12%, transparent);
}

.response-card pre {
  min-height: 210px;
  padding: 17px;
  background: var(--code-bg);
  color: #d4d6da;
  font-size: 9.5px;
  line-height: 1.85;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  text-align: left;
}

th {
  height: 42px;
  padding: 0 14px;
  background: var(--bg-subtle);
  color: var(--text-tertiary);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  height: 51px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 10px;
}

td code {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 9px;
}

.status-code {
  display: inline-flex;
  width: 35px;
  height: 21px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
}

.status-code--amber { background: var(--brand-soft); color: var(--brand-strong); }
.status-code--red { background: color-mix(in srgb, var(--red) 11%, var(--surface)); color: var(--red); }
.status-code--gray { background: var(--bg-subtle); color: var(--text-secondary); }
.status-code--purple { background: color-mix(in srgb, var(--purple) 11%, var(--surface)); color: var(--purple); }

.method-list {
  overflow: hidden;
  margin-top: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.method-list details + details {
  border-top: 1px solid var(--line);
}

.method-list summary {
  display: grid;
  min-height: 57px;
  padding: 0 16px;
  align-items: center;
  grid-template-columns: 46px 140px 1fr 16px;
  color: var(--text-secondary);
  font-size: 10px;
  cursor: pointer;
  list-style: none;
  transition: background 150ms ease;
}

.method-list summary::-webkit-details-marker { display: none; }
.method-list summary:hover { background: var(--bg-subtle); }

.method-list summary code {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}

.method-list summary > svg {
  width: 14px;
  height: 14px;
  transition: transform 180ms ease;
}

.method-list details[open] summary > svg { transform: rotate(180deg); }

.method-verb {
  display: inline-flex;
  width: 35px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 500;
}

.method-verb--get { background: var(--green-soft); color: var(--green); }
.method-verb--post { background: var(--blue-soft); color: var(--blue); }

.method-detail {
  padding: 2px 16px 15px 62px;
  background: color-mix(in srgb, var(--bg-subtle) 52%, transparent);
}

.method-detail > p {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 10px;
}

.param-row {
  display: grid;
  min-height: 32px;
  padding: 7px 0;
  align-items: center;
  border-top: 1px solid var(--line);
  grid-template-columns: 120px 58px 1fr;
  color: var(--text-secondary);
  font-size: 9px;
}

.param-row code {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 9px;
}

.param-row span:nth-child(2) {
  color: var(--text-tertiary);
  font-size: 8px;
}

.param-row span.required { color: var(--red); }

.flow {
  display: grid;
  margin: 28px 0 25px;
  padding: 22px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  grid-template-columns: 1fr 48px 1fr 48px 1fr;
}

.flow__node {
  position: relative;
  display: flex;
  min-height: 118px;
  padding: 16px 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  flex-direction: column;
  text-align: center;
}

.flow__node > span {
  position: absolute;
  top: 8px;
  left: 9px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 7px;
}

.flow__node > svg {
  width: 23px;
  height: 23px;
  margin: 3px 0 9px;
  color: var(--brand-strong);
}

.flow__node strong {
  font-size: 10px;
}

.flow__node small {
  margin-top: 2px;
  color: var(--text-tertiary);
  font-size: 8px;
}

.flow__arrow {
  display: flex;
  align-items: center;
}

.flow__arrow span {
  width: 100%;
  height: 1px;
  background: var(--line-strong);
}

.flow__arrow svg {
  width: 11px;
  height: 11px;
  margin-left: -6px;
  color: var(--text-tertiary);
}

.checklist {
  display: grid;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  grid-template-columns: repeat(2, 1fr);
  gap: 9px 20px;
}

.checklist h3 {
  margin: 0 0 4px;
  grid-column: 1 / -1;
  font-size: 12px;
}

.checklist label {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 9.5px;
  cursor: pointer;
}

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

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

.next-grid a {
  display: grid;
  min-height: 83px;
  padding: 15px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  grid-template-columns: 35px 1fr 16px;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.next-grid a:hover {
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.next-grid__icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-family: var(--font-mono);
  font-size: 8px;
}

.next-grid strong,
.next-grid small { display: block; }
.next-grid strong { font-size: 10.5px; }
.next-grid small { margin-top: 2px; color: var(--text-tertiary); font-size: 8.5px; }
.next-grid svg { width: 14px; height: 14px; color: var(--text-tertiary); }

.article-footer {
  display: flex;
  margin-top: 82px;
  padding-top: 25px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--text-tertiary);
  font-size: 9px;
}

.article-footer > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-footer .permalink {
  gap: 7px;
}

.permalink a {
  color: var(--brand-strong);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
}

.permalink a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.permalink button {
  display: inline-flex;
  width: 25px;
  height: 25px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-tertiary);
  cursor: pointer;
}

.permalink button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.permalink button svg {
  width: 11px;
  height: 11px;
}

.feedback-button {
  display: inline-flex;
  width: 29px;
  height: 27px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-size: 11px;
  cursor: pointer;
}

.feedback-button:hover,
.feedback-button.is-selected {
  border-color: color-mix(in srgb, var(--brand) 60%, var(--line));
  background: var(--brand-soft);
}

.article-footer p { margin: 0; }

.toc {
  min-width: 0;
}

.toc__inner {
  position: sticky;
  top: calc(var(--header-height) + 40px);
  margin-top: 92px;
}

.toc__inner > strong {
  display: block;
  margin-bottom: 11px;
  color: var(--text);
  font-size: 9px;
  font-weight: 700;
}

.toc nav {
  display: flex;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  flex-direction: column;
}

.toc a {
  position: relative;
  padding: 5px 0;
  color: var(--text-tertiary);
  font-size: 9px;
  transition: color 150ms ease;
}

.toc a:hover { color: var(--text); }

.toc a.is-active {
  color: var(--brand-strong);
  font-weight: 600;
}

.toc a.is-active::before {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: -13px;
  width: 2px;
  border-radius: 2px;
  background: var(--brand);
  content: "";
}

.toc__meta {
  display: flex;
  margin-top: 22px;
  padding: 12px 0;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--text-tertiary);
  font-size: 8px;
}

.toc__meta strong { color: var(--text-secondary); font-size: 8px; }

.back-to-top {
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top svg { width: 16px; height: 16px; }

.search-modal {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: none;
  padding: 12vh 18px 18px;
  justify-content: center;
}

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

.search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 21, 18, 0.5);
  backdrop-filter: blur(5px);
}

.search-dialog {
  position: relative;
  width: min(100%, 600px);
  height: fit-content;
  max-height: 67vh;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
}

.search-dialog__input {
  display: flex;
  height: 58px;
  padding: 0 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.search-dialog__input > svg {
  width: 19px;
  height: 19px;
  margin-right: 10px;
  color: var(--text-tertiary);
}

.search-dialog__input input {
  min-width: 0;
  height: 100%;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.search-dialog__input input::placeholder { color: var(--text-tertiary); }

.search-dialog__results {
  max-height: 390px;
  padding: 8px;
  overflow-y: auto;
}

.search-result {
  display: grid;
  min-height: 58px;
  padding: 9px 11px;
  align-items: center;
  border-radius: 9px;
  grid-template-columns: 32px 1fr 14px;
  cursor: pointer;
}

.search-result:hover,
.search-result.is-selected {
  background: var(--brand-soft);
}

.search-result__icon {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--brand-strong);
  font-family: var(--font-mono);
  font-size: 8px;
}

.search-result strong,
.search-result small { display: block; }
.search-result strong { font-size: 10.5px; }
.search-result small { margin-top: 1px; color: var(--text-tertiary); font-size: 8.5px; }
.search-result > svg { width: 12px; height: 12px; color: var(--text-tertiary); }

.search-empty {
  padding: 42px 18px;
  color: var(--text-tertiary);
  font-size: 11px;
  text-align: center;
}

.search-dialog footer {
  display: flex;
  height: 38px;
  padding: 0 14px;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--text-tertiary);
  font-size: 8px;
  gap: 16px;
}

.search-dialog footer span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.search-dialog footer kbd {
  min-width: 18px;
  height: 17px;
  padding: 0 3px;
  font-size: 8px;
}

.toast {
  position: fixed;
  z-index: 600;
  right: 22px;
  bottom: 22px;
  display: flex;
  height: 40px;
  padding: 0 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.toast svg {
  width: 14px;
  height: 14px;
  margin-right: 7px;
  color: var(--green);
}

@media (max-width: 1180px) {
  .article-wrap {
    width: min(820px, calc(100% - 56px));
    grid-template-columns: minmax(0, 1fr);
  }

  .toc { display: none; }
  .search-trigger { width: 168px; }
  .site-link { display: none; }
}

@media (max-width: 900px) {
  :root { --header-height: 62px; }

  .topbar__inner { padding: 0 18px; }
  .brand { flex: 1; }
  .topnav { display: none; }
  .search-trigger { width: 36px; padding: 0; justify-content: center; }
  .search-trigger svg { margin: 0; }
  .search-trigger span,
  .search-trigger kbd { display: none; }
  .menu-button { display: inline-flex; }

  .sidebar {
    width: min(310px, 86vw);
    box-shadow: var(--shadow-lg);
    transform: translateX(-105%);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .sidebar.is-open { transform: translateX(0); }

  .sidebar-backdrop {
    position: fixed;
    z-index: 70;
    inset: var(--header-height) 0 0;
    display: block;
    background: rgba(20, 19, 16, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
  }

  .sidebar-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .content { margin-left: 0; }

  .article-wrap {
    width: min(760px, calc(100% - 44px));
  }

  .article { padding-top: 31px; }
  .breadcrumbs { margin-bottom: 30px; }
}

@media (max-width: 680px) {
  .topbar__inner { padding: 0 13px; }
  .brand__product,
  .brand__divider,
  .brand__status { display: none; }

  .article-wrap { width: min(100% - 28px, 620px); }
  .article { padding: 25px 0 55px; }
  .breadcrumbs { margin-bottom: 26px; }
  .hero h1 { font-size: 37px; }
  .hero__lead { font-size: 15px; line-height: 1.75; }
  .hero__actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .notice { margin-top: 27px; }

  .intro-grid {
    margin-bottom: 58px;
    grid-template-columns: 1fr;
  }

  .intro-grid article { min-height: auto; }
  .article > section:not(.hero) { margin-top: 60px; }
  .section-heading h2 { font-size: 22px; }
  .section-number { width: 31px; height: 31px; margin-right: 11px; }

  .endpoint-card__url {
    align-items: flex-start;
    flex-wrap: wrap;
    font-size: 9.5px;
  }

  .endpoint-card__url button { margin-left: auto; }
  .code-panel pre { min-height: 0; padding: 17px; font-size: 9.5px; }
  .response-grid { grid-template-columns: 1fr; }

  .method-list summary {
    min-height: 68px;
    padding: 8px 12px;
    grid-template-columns: 43px 1fr 16px;
    gap: 1px;
  }

  .method-list summary > span:nth-child(3) {
    grid-column: 2 / 3;
  }

  .method-list summary > svg {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .method-detail { padding: 7px 13px 13px; }

  .param-row {
    grid-template-columns: 1fr 50px;
  }

  .param-row span:last-child {
    margin-top: 4px;
    grid-column: 1 / -1;
  }

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

  .flow__arrow {
    width: 1px;
    height: 29px;
    margin: 0 auto;
    flex-direction: column;
  }

  .flow__arrow span { width: 1px; height: 100%; }
  .flow__arrow svg { margin: -6px 0 0; transform: rotate(90deg); }
  .checklist { grid-template-columns: 1fr; }
  .next-grid { grid-template-columns: 1fr; }

  .article-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .article-footer > div { flex-wrap: wrap; }
  .article-footer > div span { width: 100%; }
  .article-footer .permalink { width: 100%; }
  .permalink a { overflow-wrap: anywhere; }
  .back-to-top { right: 14px; bottom: 14px; }
  .toast { right: 14px; bottom: 14px; }
}

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