@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #131316;
  --surface: #19191e;
  --surface-raised: #212126;
  --surface-hover: #27272d;
  --line: #2b2b33;
  --line-strong: #3a3a46;
  --text: #eeeef0;
  --body-text: #b7b8c2;
  --muted: #a1a1af;
  --subtle: #9394a1;
  --accent: #bab1ff;
  --accent-hover: #d7d4ff;
  --accent-soft: #252036;
  --link-accent: #d7d4ff;
  --link-underline: #625785;
  --success: #a8d4b3;
  --warning: #e6bd85;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, .docs-sidebar { scrollbar-width: thin; scrollbar-color: transparent transparent; }
html.is-scrolling, .docs-sidebar:hover, .docs-sidebar:focus-within { scrollbar-color: rgba(255,255,255,.22) transparent; }
html::-webkit-scrollbar, .docs-sidebar::-webkit-scrollbar { width: 6px; }
html::-webkit-scrollbar-track, .docs-sidebar::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb, .docs-sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
html.is-scrolling::-webkit-scrollbar-thumb, .docs-sidebar:hover::-webkit-scrollbar-thumb, .docs-sidebar:focus-within::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.75; margin: 0; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.docs-header { align-items: center; background: var(--bg); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 280px minmax(0, 1fr) 208px; height: 64px; padding: 0 28px 0 30px; position: sticky; top: 0; z-index: 20; }
.brand { align-items: center; display: inline-flex; gap: 10px; width: max-content; }
.brand-mark { align-items: center; background: var(--accent); border-radius: 8px; color: var(--bg); display: inline-flex; font-size: 17px; font-weight: 700; height: 29px; justify-content: center; width: 29px; }
.brand-mask { flex: none; object-fit: contain; }
.brand-name { font-size: 18px; font-weight: 600; letter-spacing: -.025em; }
.brand-name em { color: var(--subtle); font-size: 11px; font-style: normal; font-weight: 500; letter-spacing: 0; margin-left: 5px; }
.top-nav { align-items: center; display: flex; gap: 30px; justify-content: center; }
.top-nav a { align-items: center; border-bottom: 1px solid transparent; color: var(--muted); display: inline-flex; font-size: 13px; min-height: 44px; transition: color 180ms ease, border-color 180ms ease; }
.top-nav a:hover { color: var(--text); }
.top-nav a.is-current { border-bottom-color: var(--accent); color: var(--text); }
.mobile-header-actions, .mobile-breadcrumb { display: none; }

.docs-app { display: grid; grid-template-columns: 280px minmax(0, 1fr) 208px; min-height: calc(100vh - 64px); }
.docs-sidebar { border-right: 1px solid var(--line); min-width: 0; padding: 14px 16px 24px 20px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; }
.search-box { align-items: center; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; display: flex; gap: 10px; margin: 0 0 10px; min-height: 44px; padding: 6px 10px; transition: border-color 180ms ease, background 180ms ease; }
.search-box:focus-within { background: var(--surface-raised); border-color: var(--accent); }
.search-box svg { color: var(--muted); flex: none; height: 17px; width: 17px; }
.search-box input { background: transparent; border: 0; color: var(--text); font-size: 13px; min-width: 0; outline: none; width: 100%; }
.search-box input::placeholder { color: var(--muted); }
.search-shortcut { border: 1px solid var(--line-strong); border-radius: 5px; color: var(--subtle); font-family: var(--mono); font-size: 10px; line-height: 20px; padding: 0 5px; white-space: nowrap; }
.search-empty, .search-status { color: var(--muted); font-size: 12px; margin: 7px 8px; }
.docs-nav { display: grid; gap: 18px; }
.nav-group { min-width: 0; }
.nav-group h2 { color: var(--text); font-size: 13px; font-weight: 600; margin: 0 0 8px; padding: 0 8px; }
.nav-group > summary { align-items: center; color: var(--text); cursor: pointer; display: flex; font-size: 13px; font-weight: 600; justify-content: space-between; list-style: none; min-height: 34px; padding: 0 8px; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { color: var(--subtle); content: "⌄"; font-size: 14px; font-weight: 400; margin-left: 8px; }
.nav-group:not([open]) > summary::after { content: "›"; }
.nav-count { align-items: center; color: var(--subtle); display: inline-flex; flex: none; font-family: var(--mono); font-size: 10px; font-weight: 400; justify-content: center; line-height: 1; min-height: 20px; min-width: 24px; }
.nav-group nav { display: grid; gap: 1px; padding: 1px 0 0; }
.nav-link { align-items: center; border-radius: 6px; color: var(--muted); display: flex; font-size: 13px; min-height: 34px; overflow-wrap: anywhere; padding: 6px 9px; position: relative; transition: background 180ms ease, color 180ms ease; }
.nav-link:hover { background: var(--surface-hover); color: var(--text); }
.nav-link.is-current { background: var(--accent-soft); color: var(--accent-hover); }
.nav-link.is-current::before { background: var(--accent); border-radius: 0 2px 2px 0; content: ""; height: 16px; left: 0; position: absolute; width: 2px; }
.sidebar-footer { border-top: 1px solid var(--line); color: var(--subtle); font-family: var(--mono); font-size: 11px; line-height: 1.8; margin-top: 24px; padding: 14px 8px 0; }
.sidebar-footer strong { color: var(--success); font-weight: 500; }
.status-dot { background: var(--warning); border-radius: 50%; box-shadow: 0 0 0 4px rgba(230,189,133,.09); display: inline-block; height: 6px; margin: 0 8px 1px 1px; width: 6px; }

.docs-main { min-width: 0; padding: 38px 42px 88px; }
.document { margin: 0 auto; max-width: 780px; }
.page-header { padding-right: 0; position: relative; scroll-margin-top: 84px; }
.page-kicker, .section-kicker { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
.page-header h1, .not-found h1 { font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 10px; overflow-wrap: anywhere; }
.page-lede { color: var(--body-text); font-size: 15px; line-height: 1.8; margin: 0; max-width: 700px; }
.intro-content { margin-top: 24px; }
.intro-content p, .document-section p { color: var(--body-text); font-size: 15px; line-height: 1.8; margin: 0 0 18px; max-width: 700px; }
.document-section { margin-top: 36px; padding-top: 0; scroll-margin-top: 84px; }
.document-section h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.4; margin: 0 0 10px; }
.document-section h3, .table-wrap h3 { font-size: 15px; font-weight: 600; line-height: 1.5; margin: 20px 0 8px; }
.inline-link { color: var(--link-accent); text-decoration-color: var(--link-underline); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .24em; text-decoration-skip-ink: auto; transition: color 180ms ease, text-decoration-color 180ms ease, text-decoration-thickness 180ms ease; }
.inline-link:hover, .inline-link:focus-visible { color: var(--text); text-decoration-color: var(--accent-hover); text-decoration-thickness: 2px; }
.document strong, .document em { color: var(--text); }
.on-page { border-left: 1px solid var(--line); margin: 40px 0 0; max-height: 280px; padding: 0 14px; position: sticky; top: 88px; }
.on-page h2 { color: var(--muted); font-size: 12px; font-weight: 500; margin: 0 0 12px; }
.on-page nav { display: grid; gap: 8px; }
.on-page a { border-left: 2px solid transparent; color: var(--subtle); font-size: 12px; line-height: 1.5; margin-left: -15px; padding-left: 13px; }
.on-page a:hover { color: var(--text); }
.on-page a.is-current { border-left-color: var(--accent); color: var(--accent-hover); }
.site-footer { border-top: 1px solid var(--line); color: var(--subtle); display: flex; font-size: 12px; justify-content: space-between; letter-spacing: 0; padding: 18px 28px; }
.site-footer a:hover { color: var(--text); }
.not-found { margin: 13vh auto; max-width: 600px; padding: 0 24px; }
.not-found .inline-link { display: inline-block; margin-top: 24px; }
.skip-link { background: var(--accent); border-radius: 6px; color: var(--bg); left: 12px; padding: 10px 14px; position: fixed; top: 8px; transform: translateY(-160%); z-index: 100; }
.skip-link:focus { transform: translateY(0); }

.search-results { background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: 8px; margin: 0 0 16px; max-height: min(55vh, 440px); overflow: auto; padding: 5px; }
.search-result { border-radius: 6px; display: grid; gap: 2px; min-width: 0; padding: 8px; }
.search-result:hover, .search-result:focus-visible { background: var(--surface-hover); }
.search-result-title { color: var(--text); font-size: 12px; font-weight: 500; }
.search-result code { color: var(--subtle); font-family: var(--mono); font-size: 10px; overflow-wrap: anywhere; }
.resource-list, .topic-list { display: grid; gap: 0; }
.resource-row, .topic-row { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; min-height: 58px; padding: 10px 2px; transition: background 160ms ease; }
.resource-row:first-child, .topic-row:first-child { border-top: 1px solid var(--line); }
.resource-row:has(> .resource-meta) { align-items: start; display: grid; gap: 4px 16px; grid-template-areas: "title meta" "route route"; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); justify-content: initial; padding: 12px 2px; }
.resource-row:has(> .resource-meta) .resource-title { grid-area: title; min-width: 0; }
.resource-row:has(> .resource-meta) .resource-meta { grid-area: meta; min-width: 0; }
.resource-row:has(> .resource-meta) > code { grid-area: route; min-width: 0; text-align: left; }
.resource-row:hover, .topic-row:hover { background: var(--surface); }
.resource-row:hover .resource-title, .topic-row:hover strong { color: var(--accent-hover); }
.resource-title, .topic-row strong { color: var(--text); font-size: 13px; font-weight: 500; }
.resource-row code { color: var(--body-text); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.resource-meta, .topic-row small { color: var(--muted); font-size: 12px; }
.topic-row > span:first-child { display: grid; gap: 2px; }
.endpoint-line { align-items: baseline; background: transparent; border: 0; border-radius: 0; display: flex; gap: 12px; margin: 18px 0 8px; max-width: 100%; min-width: 0; padding: 0; }
.endpoint-line .method { background: transparent; color: var(--success); flex: none; font-family: var(--mono); font-size: 12px; font-weight: 500; line-height: 24px; padding: 0; }
.endpoint-line code { color: var(--text); font-family: var(--mono); font-size: 13px; line-height: 24px; overflow-wrap: anywhere; }
.endpoint-line button, .code-copy { align-items: center; background: transparent; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer; display: inline-flex; flex: none; font-size: 12px; justify-content: center; margin-left: auto; min-height: 36px; padding: 5px 8px; transition: background 160ms ease, color 160ms ease; }
.endpoint-line button:hover, .code-copy:hover { background: var(--surface-hover); color: var(--text); }
.endpoint-line button.is-copied, .code-copy.is-copied { color: var(--success); }
.code-example { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin: 10px 0 18px; max-width: 100%; overflow: hidden; }
.code-toolbar { align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; gap: 8px; min-height: 40px; padding: 0 10px 0 14px; }
.code-label { color: var(--subtle); font-family: var(--mono); font-size: 11px; }
.code-copy { min-height: 32px; padding: 3px 8px; }
.code-example pre { background: var(--surface); border: 0; font-family: var(--mono); font-size: 13px; font-weight: 400; line-height: 1.8; margin: 0; max-width: 100%; overflow: auto; padding: 16px 18px; scrollbar-color: var(--line-strong) var(--surface); tab-size: 2; }
.code-example pre:focus-visible { outline-offset: -3px; }
.code-example code { color: var(--text); font-family: inherit; font-size: inherit; font-weight: 400; line-height: inherit; white-space: pre; }
.code-tabs { border-bottom: 1px solid var(--line); display: flex; gap: 4px; margin-top: 0; overflow-x: auto; padding: 5px 8px 0; }
.code-tabs [role="tab"] { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer; font-size: 12px; min-height: 38px; padding: 4px 10px; white-space: nowrap; }
.code-tabs [role="tab"]:focus-visible { outline-offset: -3px; }
.code-tabs [role="tab"]:hover { color: var(--text); }
.code-tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent-hover); }
.code-panel[hidden] { display: none; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.table-wrap:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.param-table { border-collapse: collapse; font-size: 13px; line-height: 1.7; min-width: 540px; text-align: left; width: 100%; }
.param-table th { color: var(--muted); font-size: 12px; font-weight: 500; }
.param-table td { color: var(--body-text); }
.param-table th, .param-table td { border-bottom: 1px solid var(--line); padding: 11px 12px; vertical-align: top; }
.param-table th:first-child, .param-table td:first-child { padding-left: 0; }
.param-table th:nth-child(2), .param-table td:nth-child(2) { min-width: 112px; width: 112px; }
.param-table td:nth-child(2) code { overflow-wrap: normal; word-break: normal; }
.param-table code { background: transparent; border: 0; border-radius: 0; color: var(--accent); font-family: var(--mono); font-size: 12px; font-weight: 400; padding: 0; }
.document :where(.intro-content p, .document-section p, .prose-list li) code, .mapping-list dd code { background: var(--surface-raised); border: 1px solid var(--line); border-radius: 4px; color: var(--accent-hover); font-family: var(--mono); font-size: 13px; font-weight: 400; padding: 1px 4px; overflow-wrap: anywhere; }
.param-table th[scope="row"] { font-weight: 400; }
.parameter-name { color: var(--text); font-family: var(--mono); font-size: 13px; }
.parameter-meta { color: var(--subtle); display: block; font-size: 12px; margin-top: 3px; }
.enum-values { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.contract-note { background: transparent; border: 0; color: var(--body-text); font-size: 13px; line-height: 1.7; margin: 16px 0; padding: 0; }
.status-label { color: var(--warning); font-weight: 500; }
.source-details, .schema-details { border-top: 1px solid var(--line); margin-top: 18px; }
.source-details > summary, .schema-details > summary { color: var(--muted); cursor: pointer; font-size: 12px; min-height: 42px; padding: 10px 0; }
.source-details > summary:hover, .schema-details > summary:hover { color: var(--text); }
.mapping-list { display: grid; gap: 8px; padding: 2px 0 14px; }
.mapping-list > div { align-items: baseline; display: grid; gap: 6px 12px; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr); }
.mapping-list dt { color: var(--subtle); font-size: 12px; }
.mapping-list dd { color: var(--body-text); font-size: 12px; margin: 0; overflow-wrap: anywhere; }
.schema-details { margin: 8px 0 0; }
.schema-details > summary { min-height: 36px; }
.schema-details .param-table { margin-bottom: 12px; }
.prose-list { color: var(--body-text); font-size: 15px; line-height: 1.8; padding-left: 21px; }
.prose-list li { margin: 6px 0; }
.document p.response-caption { color: var(--subtle); font-size: 12px; line-height: 1.6; margin: -7px 0 15px; }
.page-pagination { border-top: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; margin-top: 44px; padding-top: 18px; }
.page-pagination a { color: var(--muted); display: grid; font-size: 12px; gap: 3px; max-width: 48%; min-height: 44px; }
.page-pagination a:hover { color: var(--text); }
.page-pagination .next { margin-left: auto; text-align: right; }
.page-pagination small { color: var(--subtle); font-size: 12px; }
.sidebar-backdrop, .sidebar-close { display: none; }
.syntax-key { color: var(--accent); }
.syntax-string { color: var(--success); }
.syntax-literal { color: var(--warning); }

@media (max-width: 1200px) {
  .docs-header { grid-template-columns: 260px minmax(0, 1fr) 20px; }
  .docs-app { grid-template-columns: 260px minmax(0, 1fr); }
  .on-page { display: none; }
  .docs-main { padding-right: 48px; padding-left: 52px; }
}

@media (max-width: 800px) {
  .endpoint-line button, .code-copy, .code-tabs [role="tab"], .nav-link, .nav-group > summary { min-height: 44px; }
  .docs-header { display: flex; height: 64px; justify-content: space-between; padding: 0 20px; }
  .brand-name { font-size: 18px; }
  .brand-name em, .top-nav { display: none; }
  .mobile-header-actions { align-items: center; display: flex; gap: 8px; }
  .mobile-header-actions button, .crumb-menu { align-items: center; background: transparent; border: 0; cursor: pointer; display: inline-flex; justify-content: center; min-height: 44px; min-width: 44px; padding: 8px; }
  .mobile-header-actions svg, .crumb-menu svg { color: var(--muted); height: 22px; width: 22px; }
  .docs-app { display: block; min-height: 0; }
  .docs-sidebar { background: var(--bg); border-bottom: 1px solid var(--line); border-right: 0; height: auto; max-width: none; overflow: visible; padding: 14px 24px 20px; position: static; transform: none; visibility: visible; width: auto; }
  html.js .docs-sidebar { border-bottom: 0; border-right: 1px solid var(--line-strong); bottom: 0; box-shadow: 16px 0 40px rgba(0,0,0,.35); height: auto; left: 0; max-width: min(340px, calc(100vw - 48px)); overflow-y: auto; padding: 14px 16px 26px; position: fixed; right: auto; top: 64px; transform: translateX(-105%); transition: transform 180ms ease, visibility 180ms ease; visibility: hidden; width: 86vw; z-index: 31; }
  html.js .docs-sidebar.is-open { transform: translateX(0); visibility: visible; }
  html.js .sidebar-close { align-items: center; background: transparent; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); cursor: pointer; display: flex; font-size: 12px; justify-content: center; margin: 0 0 12px auto; min-height: 44px; padding: 8px 12px; }
  .sidebar-close:hover { background: var(--surface-hover); color: var(--text); }
  .sidebar-backdrop:not([hidden]) { background: rgba(0,0,0,.58); border: 0; display: block; inset: 64px 0 0; position: fixed; z-index: 30; }
  .sidebar-footer { margin-top: 26px; }
  .mobile-breadcrumb { align-items: center; color: var(--muted); display: flex; font-size: 13px; gap: 10px; padding: 13px 24px 18px; }
  .mobile-breadcrumb .crumb-chevron { color: var(--subtle); font-size: 24px; font-weight: 300; line-height: 1; }
  .mobile-breadcrumb strong { color: var(--text); font-size: 13px; font-weight: 500; }
  .docs-main { padding: 0 24px 44px; }
  .document { max-width: none; padding: 0; }
  .page-header .page-kicker { display: none; }
  .page-header h1, .not-found h1 { font-size: 28px; }
  .page-lede { font-size: 15px; }
  .search-box input { font-size: 16px; }
  .document-section { margin-top: 30px; }
  .document-section h2 { font-size: 21px; }
  .site-footer { gap: 8px 20px; padding: 16px 24px; }
  .resource-row, .topic-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .resource-row code { text-align: left; }
  .resource-row:has(> .resource-meta) { align-items: stretch; display: grid; gap: 4px; grid-template-areas: "title" "route" "meta"; grid-template-columns: minmax(0, 1fr); padding: 12px 2px; }
}

@media (max-width: 420px) {
  .docs-header { padding-left: 16px; padding-right: 16px; }
  .mobile-breadcrumb { gap: 7px; padding-left: 16px; padding-right: 16px; }
  .docs-main { padding-left: 16px; padding-right: 16px; }
  .endpoint-line { gap: 8px; }
  .endpoint-line code { font-size: 12px; }
  .endpoint-line button { min-height: 44px; padding: 4px 7px; }
  .mapping-list > div { grid-template-columns: 1fr; gap: 2px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
