:root {
  --bg: #ffffff;
  --bg-subtle: #f6f8ff;
  --bg-code: #f6f8ff;
  --bg-panel: #eef2ff;
  --fg: #0a0d35;
  --fg-muted: #5c668d;
  --fg-faint: #7f89b4;
  --accent: #3256ba;
  --accent-bright: #6c83e3;
  --accent-soft: #eef2ff;
  --border: #e3e7f4;
  --border-strong: #cdd5ee;
  --required: #d92d20;
  --chip-bg: #eef2ff;
  --chip-fg: #2b4aa3;
  --nav-active-bg: #f1f3fd;
  --button-bg: #0a0d35;
  --button-fg: #ffffff;
  --button-glow: rgba(108, 131, 227, 0.35);
  --shadow-card: 0 1px 4px rgba(147, 162, 210, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --mono: "Geist Mono", "DM Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --topbar-h: 64px;
  --fs-body: 17px;
  --lh-body: 1.72;
  --fs-h1: 38px;
  --fs-h2: 28px;
  --fs-h3: 21px;
  --fs-section: 30px;
  --fs-nav: 15px;
  --fs-small: 15px;
  --fs-mono: 14px;
  --fs-code: 13.5px;
  --fs-eyebrow: 12.5px;
  --space-section: 46px;
  --space-para: 18px;
}
:root[data-theme='dark'] {
  --bg: #0a0d35;
  --bg-subtle: #10143f;
  --bg-code: #10143f;
  --bg-panel: #141949;
  --fg: #eef1ff;
  --fg-muted: #aab3d9;
  --fg-faint: #7f89b8;
  --accent: #9fb1ff;
  --accent-bright: #879cf4;
  --accent-soft: #1b2157;
  --border: #232a5e;
  --border-strong: #343c7a;
  --required: #ff8f85;
  --chip-bg: #1b2157;
  --chip-fg: #c3ceff;
  --nav-active-bg: #171c4c;
  --button-bg: #eef1ff;
  --button-fg: #0a0d35;
  --button-glow: rgba(135, 156, 244, 0.3);
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.9em; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  height: var(--topbar-h); padding: 0 26px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topbar .brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 19px; color: var(--fg);
}
.topbar .brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 120px; height: auto; }
.brand-tag {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-muted); padding: 3px 9px;
  border: 1px solid var(--border-strong); border-radius: 999px;
}
.topbar .docs-link { font-size: var(--fs-small); font-weight: 500; color: var(--fg-muted); }
.topbar .docs-link:hover { color: var(--accent); text-decoration: none; }
.topbar .spacer { flex: 1; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; cursor: pointer;
  background: transparent; border: 0; border-radius: 8px; color: var(--fg-muted);
}
.theme-toggle:hover { background: var(--bg-subtle); }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: var(--radius-sm);
  background: var(--button-bg); color: var(--button-fg);
  font-size: var(--fs-small); font-weight: 600; line-height: 1.3; white-space: nowrap;
  box-shadow: 0 0 0 3px var(--button-glow);
}
.button:hover { text-decoration: none; opacity: 0.92; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-bright); outline-offset: 2px;
}

.api-switcher { position: relative; min-width: 0; }
.api-switcher > summary {
  display: flex; align-items: center; gap: 6px;
  list-style: none; cursor: pointer;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: var(--fs-small); font-weight: 500; color: var(--fg);
}
.api-switcher-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-switcher > summary .chevron { flex: none; }
.api-switcher > summary::-webkit-details-marker { display: none; }
.api-switcher > summary:hover { background: var(--bg-subtle); }
.api-switcher > summary .chevron { width: 14px; height: 14px; transform: rotate(90deg); color: var(--fg-muted); }
.api-switcher[open] > summary .chevron { transform: rotate(-90deg); }
.api-switcher-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 260px; margin: 0; padding: 6px; list-style: none;
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.api-switcher-menu a {
  display: block; padding: 8px 10px; border-radius: 7px;
  font-size: var(--fs-small); color: var(--fg);
}
.api-switcher-menu a:hover { background: var(--nav-active-bg); text-decoration: none; }
.api-switcher-menu a[aria-current='page'] { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.api-switcher-all { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); }
.api-switcher-all a { color: var(--fg-muted); }

.landing { max-width: 1120px; margin: 0 auto; padding: 0 26px 48px; }
.hero {
  margin: 26px 0 0; padding: 72px 40px 64px; text-align: center;
  border-radius: 32px;
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg) 100%);
}
.hero .eyebrow {
  margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
}
.hero h1.page-title { font-size: 52px; line-height: 1.1; margin: 0 auto 18px; max-width: 760px; letter-spacing: -0.025em; }
.hero .page-summary { max-width: 640px; margin: 0 auto; font-size: 19px; line-height: 1.55; }
.hero-action { margin: 28px 0 0; }
.access-note {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  margin: 8px 0 0; padding: 26px 30px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg); box-shadow: var(--shadow-card);
}
.access-note h2 { margin: 0 0 6px; font-size: var(--fs-h3); line-height: 1.3; }
.access-note p { margin: 0; font-size: var(--fs-small); line-height: 1.65; color: var(--fg-muted); }
.cards-title { margin: 52px 0 0; font-size: var(--fs-h2); line-height: 1.25; letter-spacing: -0.01em; }
.api-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
  margin: 22px 0 0; padding: 0; list-style: none;
}
.api-card {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg); color: var(--fg); box-shadow: var(--shadow-card);
}
.api-card:hover { border-color: var(--accent-bright); text-decoration: none; background: var(--bg-subtle); }
.api-card-title { font-size: var(--fs-h3); font-weight: 700; line-height: 1.3; }
.api-card-summary { flex: 1; font-size: var(--fs-small); color: var(--fg-muted); line-height: 1.6; }
.api-card-cta { font-size: var(--fs-small); font-weight: 600; color: var(--accent); }

.site-footer {
  margin: 72px 0 0; padding: 26px 0 0;
  border-top: 1px solid var(--border);
  font-size: 14px; line-height: 1.6; color: var(--fg-muted);
}
.site-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; }
.site-footer-logo img { display: block; width: 96px; height: auto; }
.site-footer-links { display: flex; gap: 6px 22px; flex-wrap: wrap; }
.site-footer-links a { color: var(--fg-muted); font-weight: 500; }
.site-footer-links a:hover { color: var(--accent); text-decoration: none; }
.site-footer-legal { margin: 14px 0 0; }
.site-footer-legal span { white-space: nowrap; }
.site-footer-legal .sep { margin: 0 8px; color: var(--border-strong); }

.layout {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr) 440px;
  align-items: start;
}
.sidebar {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  padding: 22px 12px 70px 18px;
  border-right: 1px solid var(--border);
}
.content { min-width: 0; padding: 34px 44px 140px; }
.aside {
  position: sticky; top: var(--topbar-h);
  max-height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  padding: 34px 24px 90px 8px;
}

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list .nav-list { margin-left: 14px; padding-left: 10px; border-left: 1px solid var(--border); }
.nav-row {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px; margin: 2px 0;
  border-radius: 7px;
  color: var(--fg-muted); font-size: var(--fs-nav);
  cursor: pointer;
}
.nav-row:hover { background: var(--nav-active-bg); text-decoration: none; }
.nav-row .label { flex: 1; min-width: 0; }
.nav-row.is-open { color: var(--accent); font-weight: 600; }
.nav-row.is-active { background: var(--nav-active-bg); color: var(--accent); font-weight: 600; }
.nav-row .chevron {
  flex: none; width: 15px; height: 15px; color: var(--fg-faint);
  transition: transform 0.12s ease;
}
.nav-row[aria-expanded='true'] .chevron { transform: rotate(90deg); }
.nav-group > .nav-list[hidden] { display: none; }

h1.page-title { font-size: var(--fs-h1); line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.015em; }

.page-summary { font-size: 1.12em; line-height: 1.5; color: var(--fg-muted); margin: -4px 0 22px; }
.op-path {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: var(--fs-mono); color: var(--fg-muted);
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 11px; margin-bottom: 24px;
}
.op-path .verb { color: var(--accent); font-weight: 700; }

.op-path .verb-webhook { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.92em; }

.op-path .verb-badge { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.92em; }
.variant-title { font-size: var(--fs-h3); line-height: 1.3; margin: 30px 0 10px; }
.variant-title code { background: var(--chip-bg); color: var(--chip-fg); border-radius: 4px; padding: 1px 6px; }
.prose p { margin: 0 0 var(--space-para); }
.prose h2 { font-size: var(--fs-h2); line-height: 1.25; margin: 42px 0 14px; letter-spacing: -0.01em; }
.prose h3 { font-size: var(--fs-h3); line-height: 1.3; margin: 32px 0 10px; }
.prose ul, .prose ol { margin: 0 0 var(--space-para); padding-left: 26px; }
.prose li { margin: 7px 0; }
.prose code, .param-desc code, td code {
  background: var(--chip-bg); color: var(--chip-fg);
  border-radius: 4px; padding: 1px 5px;
}
.prose pre { background: var(--bg-code); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin: 0 0 var(--space-para); overflow-x: auto; font-size: var(--fs-code); line-height: 1.6; }
.prose pre code { background: none; color: inherit; padding: 0; }
.prose blockquote { margin: 0 0 var(--space-para); padding: 4px 18px; border-left: 3px solid var(--border-strong); color: var(--fg-muted); }
.table-scroll { overflow-x: auto; margin: 0 0 22px; }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); }
th, td { border: 1px solid var(--border); padding: 10px 13px; text-align: left; vertical-align: top; }
th { background: var(--bg-subtle); font-weight: 600; }

h2.section-title { font-size: var(--fs-section); line-height: 1.25; margin: var(--space-section) 0 16px; letter-spacing: -0.01em; }
.media-pill {
  display: inline-block; font-family: var(--mono); font-size: var(--fs-eyebrow); letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--fg-muted);
  border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 5px 12px; margin-bottom: 18px;
}
.tab-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.tab {
  font-family: var(--mono); font-size: var(--fs-mono); color: var(--fg-muted);
  background: transparent; border: 1px solid transparent; border-radius: 7px;
  padding: 6px 14px; cursor: pointer;
}
.tab.is-selected { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.disclosure {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: var(--fs-mono); letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--fg); font-weight: 700;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.disclosure .chevron { width: 14px; height: 14px; transition: transform 0.12s ease; }
.disclosure[aria-expanded='true'] .chevron { transform: rotate(90deg); }
.required-flag {
  display: block; margin: 4px 0 8px 20px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--required); font-weight: 700;
}

.params { list-style: none; margin: 0 0 10px; padding: 0 0 0 22px; border-left: 1px solid var(--border); }
.params .params { margin-top: 10px; margin-bottom: 6px; }
.param { position: relative; padding: 11px 0 11px 16px; }
.param::before {
  content: ''; position: absolute; left: -1px; top: 22px;
  width: 9px; height: 1px; background: var(--border-strong);
}
.param-name { font-family: var(--mono); font-size: 14.5px; font-weight: 700; color: var(--fg); }
.param-type { font-family: var(--mono); font-size: var(--fs-mono); color: var(--fg-faint); margin-left: 9px; }

a.param-type-link { color: var(--accent); text-decoration: none; }
a.param-type-link:hover { text-decoration: underline; }
.param-required { font-size: 12px; text-transform: uppercase; color: var(--required); font-weight: 700; margin-left: 9px; letter-spacing: 0.05em; }

.param-optional { font-size: 12px; text-transform: uppercase; color: var(--fg-faint); font-weight: 700; margin-left: 9px; letter-spacing: 0.05em; }
.response-headers { margin-bottom: 18px; }
h3.subsection-title {
  font-family: var(--mono); font-size: var(--fs-mono); letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--fg); font-weight: 700; margin: 0 0 6px;
}
.param-desc { margin: 6px 0 0; color: var(--fg-muted); font-size: var(--fs-small); }
.param-desc p { margin: 0 0 10px; }
.possible-values { margin-top: 8px; font-size: var(--fs-small); color: var(--fg-muted); }
.possible-values strong { color: var(--fg); }
.chip {
  display: inline-block; font-family: var(--mono); font-size: 13.5px;
  background: var(--chip-bg); color: var(--chip-fg);
  border-radius: 4px; padding: 2px 7px; margin: 0 2px;
}
.example-pane pre {
  background: var(--bg-code); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; overflow-x: auto; font-size: var(--fs-code); line-height: 1.6;
}
[hidden] { display: none !important; }

.card { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 22px; background: var(--bg); }
.card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px;
  font-family: var(--mono); font-size: var(--fs-eyebrow); letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 700; color: var(--fg);
}
.card-header + .card-body { border-top: 1px solid var(--border); }
.card-body { padding: 14px 16px; }
.card-action {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-muted); background: none; border: 0; cursor: pointer; font-weight: 700;
}
.card-action:hover { color: var(--accent); }
.copy-button { padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: 999px; }
.auth-note { margin: 0; font-size: var(--fs-small); color: var(--fg-muted); line-height: 1.65; }

.lang-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; padding: 12px 12px 0; }
.lang-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  height: 66px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
  color: var(--fg-muted);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
}
.lang-tab svg { width: 25px; height: 25px; }
.lang-tab.is-selected { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.variant-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 0; }
.variant-pill {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--accent); color: var(--accent); border-radius: 999px;
  padding: 3px 12px; background: var(--accent-soft);
}
.code-panel { padding: 12px; }

.code-block {
  display: flex; background: var(--bg-code); border: 1px solid var(--border);
  border-radius: 8px; overflow-y: auto; max-height: 460px;
  font-family: var(--mono); font-size: var(--fs-code); line-height: 1.6;
}
.code-gutter {
  flex: none; padding: 10px 8px; text-align: right; color: var(--fg-faint);
  background: var(--bg-subtle); border-right: 1px solid var(--border); user-select: none;
}
.code-gutter span { display: block; }
.code-lines { flex: 1; min-width: 0; overflow-x: auto; padding: 10px 12px; margin: 0; white-space: pre; }

@media (max-width: 1400px) {
  .layout { grid-template-columns: 272px minmax(0, 1fr); }
  .aside { grid-column: 2; position: static; max-height: none; padding: 0 44px 70px; }
}
@media (max-width: 900px) {

  :root { --fs-body: 16px; --fs-h1: 30px; --fs-h2: 23px; --fs-h3: 19px; --fs-section: 25px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .aside { grid-column: 1; padding: 0 22px 70px; }
  .content { padding: 24px 22px 80px; }
  .topbar { gap: 12px; padding: 0 16px; }
  .brand-logo { width: 104px; }
  .brand-tag { display: none; }
  .topbar .button { padding: 8px 12px; }
  .landing { padding: 0 16px 60px; }
  .hero { margin-top: 16px; padding: 44px 20px 40px; border-radius: 24px; }
  .hero h1.page-title { font-size: 34px; }
  .hero .page-summary { font-size: 17px; }
  .access-note { flex-direction: column; align-items: flex-start; padding: 22px; }
  .site-footer-legal span { display: block; white-space: normal; }
  .site-footer-legal .sep { display: none; }
}
@media (max-width: 600px) {

  .topbar:has(.api-switcher) .button { display: none; }
  .api-switcher-menu { min-width: 0; width: max-content; max-width: calc(100vw - 32px); }
}
