:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f8f8fa;
  --ink: #171717;
  --muted: #62636a;
  --faint: #8d8e95;
  --line: #e6e6e8;
  --line-strong: #d8d8dc;
  --accent: #7557ff;
  --accent-soft: #f1edff;
  --cyan: #2ccfc3;
  --code: #15151a;
  --code-line: #292930;
  --shadow: 0 20px 60px rgba(20, 20, 28, .14);
  --sidebar: 260px;
  --topbar: 65px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.topbar {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  height: var(--topbar);
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(290px, 430px) auto minmax(210px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 0 30px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 9px; width: fit-content; font-weight: 750; letter-spacing: -.02em; }
.brand img { border-radius: 8px; }
.brand-muted { color: var(--faint); font-weight: 520; }
.search-trigger {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 11px;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.search-trigger:hover { border-color: var(--line-strong); background: var(--panel); }
.search-trigger svg { width: 17px; }
.search-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-trigger kbd { margin-left: auto; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--faint); background: var(--panel); font-size: 11px; box-shadow: 0 1px 0 var(--line); }
.topnav { display: flex; align-items: center; gap: 23px; white-space: nowrap; }
.topnav a { color: var(--muted); font-size: 14px; font-weight: 560; }
.topnav a:hover, .topnav a.active { color: var(--ink); }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 7px; }
.console-link { margin-right: 5px; font-size: 14px; font-weight: 600; }
.console-link:hover { color: var(--accent); }
.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { background: var(--panel-soft); }
.icon-button svg { width: 19px; }
.moon, .theme-dark .sun { display: none; }
.theme-dark .moon { display: block; }
.search-mobile, .menu-button { display: none; }
.mobile-breadcrumb { display: none; }

.page-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 760px) 188px; gap: 56px; justify-content: center; padding: var(--topbar) 32px 130px; }
.sidebar {
  position: sticky;
  top: var(--topbar);
  align-self: start;
  height: calc(100vh - var(--topbar));
  display: flex;
  flex-direction: column;
  padding: 28px 18px 20px 0;
  border-right: 1px solid var(--line);
}
.sidebar-scroll { overflow: auto; scrollbar-width: none; }
.sidebar-section { margin-bottom: 28px; }
.sidebar-section p { margin: 0 0 8px 12px; color: var(--faint); font-size: 11px; font-weight: 760; letter-spacing: .09em; text-transform: uppercase; }
.sidebar-section a { min-height: 36px; display: flex; align-items: center; gap: 10px; padding: 6px 11px; color: var(--muted); border-radius: 8px; font-size: 14px; line-height: 1.3; }
.sidebar-section a:hover { color: var(--ink); background: var(--panel-soft); }
.sidebar-section a.active { color: var(--accent); background: var(--accent-soft); font-weight: 620; }
.nav-icon { width: 18px; color: var(--faint); text-align: center; font-size: 15px; }
.sidebar-section a.active .nav-icon { color: var(--accent); }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.sidebar-foot a { display: flex; justify-content: space-between; padding: 5px 11px; color: var(--muted); font-size: 13px; }
.sidebar-foot a:hover { color: var(--ink); }
.sidebar-scrim { display: none; }

.content { min-width: 0; padding: 64px 0 0; }
.doc-section { padding: 0 0 66px; border-bottom: 1px solid var(--line); margin-bottom: 62px; }
.hero { padding-top: 0; }
.eyebrow { margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 780; letter-spacing: .11em; }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
h1 { margin: 0; font-size: clamp(38px, 4vw, 48px); line-height: 1.14; letter-spacing: -.045em; font-weight: 740; }
.lead { margin: 8px 0 0; color: var(--muted); font-size: 19px; line-height: 1.48; letter-spacing: -.012em; }
.intro { max-width: 710px; margin: 30px 0 28px; color: #3d3e44; font-size: 16px; line-height: 1.8; }
.copy-page { height: 38px; display: flex; align-items: center; gap: 9px; flex: 0 0 auto; margin-top: 3px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--muted); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.copy-page:hover { color: var(--ink); background: var(--panel-soft); }
.copy-page svg { width: 17px; }
.copy-divider { height: 20px; width: 1px; background: var(--line); }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 28px; }
.action-card { position: relative; min-height: 170px; padding: 25px 24px 23px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); transition: .18s ease; }
.action-card:hover { border-color: #cfcfd5; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20,20,28,.07); }
.card-icon { width: 33px; height: 33px; display: grid; place-items: center; margin-bottom: 14px; color: var(--ink); }
.card-icon svg { width: 28px; }
.action-card h2 { margin: 0 0 3px; font-size: 16px; letter-spacing: -.015em; }
.action-card p { margin: 0; padding-right: 25px; color: var(--muted); line-height: 1.55; }
.card-arrow { position: absolute; top: 25px; right: 23px; color: var(--faint); opacity: 0; transform: translateX(-4px); transition: .18s ease; }
.action-card:hover .card-arrow { opacity: 1; transform: none; }

.doc-section > h2 { margin: 0 0 13px; font-size: 27px; line-height: 1.3; letter-spacing: -.03em; }
.doc-section > p { margin: 0 0 24px; color: #45464d; font-size: 15.5px; }
.doc-section p code { padding: 1px 5px; color: var(--accent); background: var(--accent-soft); border-radius: 5px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; }
.code-card { position: relative; overflow: hidden; margin: 25px 0; border: 1px solid var(--code-line); border-radius: 14px; background: var(--code); box-shadow: 0 14px 34px rgba(0,0,0,.09); }
.code-tabs { display: flex; align-items: center; gap: 6px; padding: 11px 13px 10px; border-bottom: 1px solid var(--code-line); }
.code-tabs button { padding: 6px 10px; color: #92929e; border: 0; border-radius: 7px; background: transparent; font-size: 12px; cursor: pointer; }
.code-tabs button.active { color: #f1efff; background: #292832; }
.code-toolbar { position: absolute; z-index: 2; top: 11px; right: 12px; display: flex; align-items: center; gap: 10px; }
.language-label { color: #747480; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.code-toolbar button { padding: 5px 8px; color: #a6a6b0; background: transparent; border: 0; border-radius: 6px; font-size: 11px; cursor: pointer; }
.code-toolbar button:hover { color: white; background: #282832; }
pre { margin: 0; padding: 23px 24px 25px; overflow-x: auto; color: #d9d9df; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12.5px; line-height: 1.75; tab-size: 2; scrollbar-width: thin; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.token-command { color: #7ae7db; }.token-string { color: #cab8ff; }.token-key { color: #7ae7db; }
.response-card { margin-top: 20px; }
.response-card .code-toolbar { top: 8px; }
.compact-section { padding-bottom: 58px; }
.inline-code { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.inline-code code { overflow-x: auto; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; }
.inline-code button, .endpoint button { padding: 4px 7px; color: var(--muted); border: 0; border-radius: 6px; background: transparent; font-size: 12px; cursor: pointer; }
.inline-code button:hover, .endpoint button:hover { color: var(--ink); background: var(--panel); }
.path-list { display: grid; gap: 10px; }
.path-list a { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 13px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; transition: .15s ease; }
.path-list a:hover { border-color: var(--line-strong); background: var(--panel-soft); }
.path-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: 9px; font-family: monospace; font-weight: 700; }
.path-list strong, .path-list small { display: block; }
.path-list strong { font-size: 14px; }
.path-list small { color: var(--muted); line-height: 1.4; font-size: 13px; }
.path-list b { color: var(--faint); font-weight: 400; }
.note { display: grid; grid-template-columns: 24px 1fr; gap: 11px; margin-top: 24px; padding: 16px 18px; border: 1px solid #d9d0ff; border-radius: 12px; background: #f8f6ff; }
.note-icon { width: 20px; height: 20px; display: grid; place-items: center; margin-top: 3px; color: white; background: var(--accent); border-radius: 50%; font-size: 12px; font-weight: 700; }
.note p { margin: 0; color: #4f485f; font-size: 13.5px; }
.note strong { display: block; color: #302942; }
.api-block { padding-bottom: 48px; margin-bottom: 50px; }
.endpoint { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.endpoint > span { padding: 3px 7px; color: #0a766e; background: #dcf8f4; border-radius: 6px; font-size: 10px; font-weight: 780; letter-spacing: .04em; }
.endpoint.get > span { color: #5f47ca; background: #ebe6ff; }
.endpoint code { overflow-x: auto; white-space: nowrap; color: #33343a; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12.5px; }
.footer-section { margin-bottom: 0; border-bottom: 0; }
.helpful { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.helpful span { margin-right: 4px; }
.helpful button { padding: 5px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; }
.helpful button:hover, .helpful button.selected { color: var(--accent); border-color: #cfc5ff; background: var(--accent-soft); }
.next-page { display: flex; align-items: center; justify-content: space-between; margin: 35px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; }
.next-page:hover { background: var(--panel-soft); }
.next-page small, .next-page strong { display: block; }.next-page small { color: var(--faint); }.next-page strong { font-size: 15px; }
footer { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; color: var(--faint); border-top: 1px solid var(--line); font-size: 12px; }
footer span:last-child { display: flex; gap: 16px; }

.toc { position: sticky; top: calc(var(--topbar) + 45px); align-self: start; padding-top: 3px; }
.toc p { margin: 0 0 9px; color: var(--ink); font-size: 12px; font-weight: 660; }
.toc a { display: block; padding: 4px 0 4px 13px; color: var(--faint); border-left: 1px solid var(--line); font-size: 12px; line-height: 1.45; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }

.ask-bar { position: fixed; z-index: 40; bottom: 18px; left: calc(50% - 260px); width: min(720px, calc(100vw - 40px)); display: flex; align-items: center; padding: 7px 8px 7px 16px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line-strong); border-radius: 15px; box-shadow: 0 18px 50px rgba(20,20,30,.12); backdrop-filter: blur(14px); }
.ask-bar input { min-width: 0; flex: 1; height: 40px; color: var(--ink); background: transparent; border: 0; outline: 0; }
.ask-bar input::placeholder { color: var(--faint); }
.ask-bar button { width: 33px; height: 33px; display: grid; place-items: center; color: white; background: #a6a6aa; border: 0; border-radius: 50%; font-size: 18px; cursor: pointer; }
.ask-bar input:not(:placeholder-shown) + button { background: var(--accent); }

.search-dialog { width: min(650px, calc(100vw - 28px)); margin: 10vh auto 0; padding: 0; color: var(--ink); background: transparent; border: 0; overflow: visible; }
.search-dialog::backdrop { background: rgba(13,13,18,.48); backdrop-filter: blur(3px); }
.search-box { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.search-input-row { display: grid; grid-template-columns: 23px 1fr auto; align-items: center; gap: 10px; padding: 14px 15px; border-bottom: 1px solid var(--line); }
.search-input-row svg { width: 20px; color: var(--muted); }
.search-input-row input { min-width: 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 16px; }
.search-input-row button { padding: 3px 7px; color: var(--faint); background: var(--panel-soft); border: 1px solid var(--line); border-radius: 5px; font-size: 10px; cursor: pointer; }
.search-results { padding: 9px; }
.result-label { margin: 5px 9px 6px; color: var(--faint); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.search-results a { display: flex; align-items: center; justify-content: space-between; padding: 10px 11px; border-radius: 9px; }
.search-results a:hover, .search-results a:focus { background: var(--accent-soft); outline: 0; }
.search-results strong, .search-results small { display: block; }.search-results strong { font-size: 13px; }.search-results small { color: var(--faint); font-size: 11px; }.search-results b { color: var(--faint); font-weight: 400; }
.search-empty { padding: 28px; color: var(--faint); text-align: center; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 87px; padding: 9px 14px; color: white; background: #1e1e22; border-radius: 9px; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: .2s ease; font-size: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.18); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.theme-dark {
  --bg: #111114;
  --panel: #17171b;
  --panel-soft: #1c1c21;
  --ink: #f3f3f5;
  --muted: #a0a0a8;
  --faint: #73737d;
  --line: #2b2b31;
  --line-strong: #3a3a43;
  --accent: #a790ff;
  --accent-soft: #28233d;
  --code: #0b0b0e;
  --code-line: #25252b;
}
.theme-dark .intro, .theme-dark .doc-section > p { color: #b6b6bd; }
.theme-dark .note { border-color: #3b315e; background: #1d192b; }.theme-dark .note p { color: #bcb3d4; }.theme-dark .note strong { color: #eee9ff; }
.theme-dark .endpoint > span { color: #83eee4; background: #133934; }.theme-dark .endpoint.get > span { color: #c3b8ff; background: #2f2852; }.theme-dark .endpoint code { color: #d3d3d8; }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: minmax(220px, 1fr) minmax(240px, 390px) auto; }
  .topnav { display: none; }
  .page-shell { grid-template-columns: 230px minmax(0, 720px); gap: 46px; }
  .toc { display: none; }
  .ask-bar { left: calc(50% - 130px); }
}

@media (max-width: 920px) {
  :root { --topbar: 62px; }
  html { scroll-padding-top: 120px; }
  .topbar { grid-template-columns: 1fr auto; gap: 10px; padding: 0 16px; }
  .brand { gap: 8px; }.brand img { width: 29px; height: 29px; }.brand-muted { display: none; }
  .search-trigger, .console-link { display: none; }
  .search-mobile, .menu-button { display: grid; }
  .mobile-breadcrumb { position: fixed; z-index: 45; top: var(--topbar); left: 0; right: 0; height: 55px; display: flex; align-items: center; gap: 12px; padding: 0 17px; color: var(--muted); background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); font-size: 13px; }
  .mobile-breadcrumb button { width: 26px; height: 30px; padding: 0; display: grid; place-items: center; color: var(--muted); background: transparent; border: 0; cursor: pointer; }.mobile-breadcrumb svg { width: 19px; }.mobile-breadcrumb strong { color: var(--ink); }.crumb-chevron { color: var(--faint); font-size: 20px; }
  .page-shell { display: block; padding: calc(var(--topbar) + 55px) 20px 130px; }
  .sidebar { position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: min(310px, 88vw); height: 100vh; padding: 22px 18px; background: var(--panel); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.15); }
  .sidebar.open { transform: translateX(0); }.sidebar.open::before { content: "Documentation"; display: block; margin: 0 0 22px 11px; font-size: 16px; font-weight: 700; }
  .sidebar-scrim { position: fixed; z-index: 65; inset: 0; display: block; background: rgba(10,10,14,.4); opacity: 0; visibility: hidden; transition: .2s ease; }.sidebar-scrim.show { opacity: 1; visibility: visible; }
  .content { padding: 37px 0 0; }
  .doc-section { padding-bottom: 49px; margin-bottom: 45px; }
  .eyebrow { font-size: 11px; }
  .title-row { display: block; }.copy-page { margin-top: 18px; }
  h1 { font-size: 37px; }.lead { font-size: 17px; }.intro { margin-top: 25px; font-size: 15px; }
  .action-grid { grid-template-columns: 1fr; }.action-card { min-height: 148px; }
  .doc-section > h2 { font-size: 24px; }
  .code-tabs { padding-right: 10px; }.code-tabs button { font-size: 11px; }.code-toolbar { position: static; justify-content: flex-end; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--code-line); }
  pre { padding: 19px; font-size: 11.5px; }
  .response-card .code-toolbar { position: static; }
  .path-list a { grid-template-columns: 36px 1fr auto; padding: 13px; }.path-list small { font-size: 12px; }
  .endpoint { grid-template-columns: auto minmax(0, 1fr) auto; }.endpoint code { font-size: 11px; }
  .ask-bar { left: 20px; right: 20px; bottom: 15px; width: auto; }
  footer { align-items: flex-start; gap: 14px; }.helpful { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .top-actions { gap: 2px; }.icon-button { width: 33px; }.page-shell { padding-left: 18px; padding-right: 18px; }
  .action-card { padding: 21px; }.copy-page span:first-of-type { display: inline; }
  .ask-bar { left: 14px; right: 14px; }
}
