:root {
  --ink:#202329;
  --muted:#717780;
  --line:#e9ebef;
  --soft:#f7f8fa;
  --blue:#5968ce;
  --blue-soft:#eef0ff;
  --header:68px;
  --wide:1440px;
}

* {
  box-sizing:border-box;
}

html {
  min-width:320px;
  scroll-padding-top:98px;
  scroll-behavior:smooth;
}

body {
  margin:0;
  color:var(--ink);
  background:#fff;
  font:14px/1.6 Inter,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}

button,input {
  font:inherit;
}

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

button {
  cursor:pointer;
  color:inherit;
}

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

button:focus-visible,a:focus-visible,input:focus-visible {
  outline:2px solid var(--blue);
  outline-offset:4px;
}

code,pre,kbd {
  font-family:'Roboto Mono',Consolas,monospace;
}

[hidden] {
  display:none!important;
}

.docs-wide {
  width:min(var(--wide),calc(100% - 72px));
  margin-inline:auto;
}

.skip-link {
  position:fixed;
  top:-80px;
  left:20px;
  padding:10px;
  background:white;
  z-index:200;
}

.skip-link:focus {
  top:10px;
}

.docs-header {
  height:var(--header);
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.97);
  border-bottom:1px solid var(--line);
}

.docs-header-inner {
  height:100%;
  display:flex;
  align-items:center;
  gap:18px;
}

.docs-logo {
  display:flex;
  gap:9px;
  align-items:center;
  font-size:22px;
  letter-spacing:-.7px;
}

.docs-divider {
  height:20px;
  width:1px;
  background:var(--line);
}

.docs-product {
  font-size:13px;
  color:var(--muted);
}

.docs-header-links {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:22px;
  font-size:13px;
}

.docs-login {
  border:1px solid #dcdfe6;
  border-radius:7px;
  padding:7px 12px;
  font-weight:500;
  white-space:nowrap;
}

.docs-login span {
  margin-left:7px;
  color:var(--muted);
}

.docs-search-trigger {
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  width:300px;
  margin-left:auto;
  padding:7px 11px;
  background:#fafbfc;
  border:1px solid #e2e5ea;
  border-radius:7px;
  color:#7b808a;
  font-size:12px;
}

.docs-search-trigger>span:first-child {
  font-size:22px;
  line-height:1;
}

.docs-search-trigger kbd {
  margin-left:auto;
  border:1px solid #e2e5ea;
  border-radius:4px;
  padding:0 4px;
  font-size:10px;
  white-space:nowrap;
}

.docs-menu-button {
  display:none;
  border:0;
  background:transparent;
  font-size:22px;
}

.docs-subnav {
  height:53px;
  display:flex;
  align-items:stretch;
  gap:30px;
  border-bottom:1px solid var(--line);
  font-size:13px;
}

.docs-subnav a {
  display:flex;
  align-items:center;
  color:var(--muted);
  border-bottom:2px solid transparent;
}

.docs-subnav a.active {
  color:var(--blue);
  border-bottom-color:var(--blue);
  font-weight:600;
}

.docs-subnav .catalog-link {
  margin-left:auto;
  font-size:12px;
  gap:8px;
}

.docs-layout {
  display:grid;
  grid-template-columns:218px minmax(0,760px) 190px;
  gap:44px;
  justify-content:space-between;
  align-items:start;
}

.docs-sidebar {
  align-self:stretch;
  border-right:1px solid var(--line);
}

.sidebar-scroll {
  position:sticky;
  top:var(--header);
  max-height:calc(100vh - var(--header));
  overflow:auto;
  padding:32px 20px 25px 0;
  scrollbar-width:thin;
}

.docs-sidebar section+section {
  margin-top:25px;
}

.docs-sidebar h2 {
  font-size:12px;
  margin:0 0 7px 10px;
  font-weight:650;
  color:#343944;
}

.docs-sidebar nav {
  display:grid;
  gap:2px;
}

.docs-sidebar nav a {
  padding:6px 10px;
  border-radius:6px;
  font-size:12px;
  color:#68707c;
  line-height:1.65;
}

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

.docs-sidebar nav a.active {
  background:var(--blue-soft);
  color:#4d5bc0;
  font-weight:600;
}

.sidebar-bottom {
  display:flex;
  align-items:center;
  gap:7px;
  margin:28px 10px 0;
  padding-top:18px;
  border-top:1px solid var(--line);
  font-size:11px;
  color:var(--muted);
}

.sidebar-bottom code {
  margin-left:auto;
}

.status-dot {
  width:6px;
  height:6px;
  background:#58a783;
  border-radius:50%;
}

.docs-content {
  padding:42px 0 40px;
  min-width:0;
}

.doc-section {
  scroll-margin-top:90px;
}

.article-heading {
  position:relative;
  padding-bottom:2px;
}

.docs-eyebrow {
  font-size:12px;
  color:var(--blue);
  font-weight:600;
  margin:0 0 12px;
}

.article-heading h1 {
  font-size:36px;
  letter-spacing:-1.1px;
  line-height:1.2;
  margin:0 0 23px;
  font-weight:650;
  outline:none;
}

.copy-page {
  float:right;
  display:flex;
  align-items:center;
  gap:6px;
  padding:3px 0;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:11px;
}

.copy-page svg {
  width:13px;
  height:13px;
}

.doc-section>p {
  color:#626976;
  font-size:14px;
  line-height:1.85;
  margin:15px 0;
}

.doc-section#quickstart>.article-heading+p {
  font-size:18px;
  margin-top:0;
  color:#747a86;
  letter-spacing:-.2px;
}

.doc-section h3 {
  font-size:20px;
  letter-spacing:-.4px;
  margin:34px 0 13px;
  line-height:1.5;
  scroll-margin-top:95px;
}

.doc-section a {
  color:var(--blue);
  text-decoration:underline;
  text-underline-offset:3px;
}

.doc-section p code,.callout code {
  font-size:.88em;
  border:1px solid var(--line);
  border-radius:4px;
  padding:2px 5px;
  background:var(--soft);
  color:#4c5260;
}

.quick-links {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin:27px 0 35px;
}

.quick-links a {
  position:relative;
  display:flex;
  flex-direction:column;
  padding:19px;
  border:1px solid #e0e3ee;
  border-radius:9px;
  text-decoration:none;
  color:var(--ink);
  transition:border-color .15s,box-shadow .15s;
}

.quick-links a:hover {
  border-color:#adb5e5;
  box-shadow:0 3px 12px #32395708;
}

.card-icon {
  font:500 19px Consolas,monospace;
  color:var(--blue);
  margin-bottom:12px;
}

.quick-links strong {
  font-size:14px;
}

.quick-links a>span:last-of-type {
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
}

.quick-links b {
  position:absolute;
  right:17px;
  top:17px;
  font-size:15px;
  color:#9da4b8;
  font-weight:400;
}

.callout {
  display:flex;
  gap:12px;
  padding:15px 17px;
  margin:23px 0;
  border:1px solid #e2e6ed;
  border-radius:8px;
  background:#fafbfc;
}

.callout-blue {
  border-color:#e1e5fa;
  background:#f7f8ff;
}

.inline-icon {
  color:var(--blue);
  font-size:17px;
  flex-shrink:0;
}

.callout strong {
  font-size:13px;
}

.callout p {
  font-size:13px;
  margin:4px 0 0;
  color:#656d7b;
  line-height:1.8;
}

.agent-setup-card {
  margin:20px 0 30px;
  border:1px solid #dfe3f0;
  border-radius:12px;
  overflow:hidden;
  background:linear-gradient(120deg,#f7f8ff,#fff);
}

.agent-setup-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:16px;
  padding:20px;
}

.agent-setup-provider {
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.agent-setup-provider img {
  flex:none;
}

.agent-setup-provider strong,.agent-setup-provider span {
  display:block;
}

.agent-setup-provider span {
  color:var(--muted);
  font-size:12px;
}

.agent-setup-copy {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:10px 14px;
  border:1px solid var(--blue);
  border-radius:8px;
  background:var(--blue);
  color:white;
  font-weight:600;
  transition:background .15s,border-color .15s;
}

.agent-setup-copy:hover {
  background:#4655b6;
  border-color:#4655b6;
}

.agent-setup-copy:active {
  background:#39479d;
}

.agent-setup-copy svg {
  width:17px;
  height:17px;
  flex:none;
}

.agent-setup-preview {
  border-top:1px solid #e3e6f0;
  background:rgba(255,255,255,.6);
}

.agent-setup-preview summary {
  padding:12px 20px;
  cursor:pointer;
  color:var(--muted);
  font-size:13px;
}

.agent-setup-preview summary:hover,.agent-setup-preview[open] summary {
  color:var(--blue);
  background:var(--blue-soft);
}

.agent-setup-preview summary:focus-visible,.agent-setup-preview pre:focus-visible {
  outline:2px solid var(--blue);
  outline-offset:-3px;
}

.agent-setup-preview pre {
  max-height:360px;
  margin:0;
  padding:20px;
  overflow:auto;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font:13px/1.8 Inter,Arial,sans-serif;
  background:white;
}

.code-example {
  margin:22px 0;
  overflow:hidden;
  border:1px solid #e0e3e9;
  border-radius:9px;
  background:#f8f9fb;
}

.code-tabs,.code-title {
  display:flex;
  align-items:center;
  min-height:42px;
  padding:0 12px;
  border-bottom:1px solid #e5e8ee;
  background:#f1f3f7;
  font-size:11px;
  color:#6e7786;
}

.code-tabs button:not(.icon-button) {
  align-self:stretch;
  padding:0 13px;
  background:transparent;
  border:0;
  border-bottom:2px solid transparent;
  color:#858c98;
  font-size:12px;
}

.code-tabs button.active {
  color:var(--blue);
  border-bottom-color:var(--blue);
}

.code-tabs .copy-code,.code-title .copy-code {
  margin-left:auto;
}

.icon-button {
  display:grid;
  place-items:center;
  width:29px;
  height:29px;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#858d9b;
}

.icon-button:hover {
  background:#e4e8f0;
  color:#4e5980;
}

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

.code-example pre {
  display:none;
  margin:0;
  padding:19px 21px;
  overflow:auto;
  max-height:580px;
  font-size:12px;
  line-height:1.85;
  color:#3e4b68;
  tab-size:2;
}

.code-example pre.active {
  display:block;
}

.code-example code {
  white-space:pre;
}

.syntax-string {
  color:#2d7c67;
}

.syntax-key {
  color:#6556ac;
}

.syntax-number {
  color:#b27336;
}

.syntax-comment {
  color:#929aa8;
}

.docs-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}
.docs-table th, .docs-table td {
  padding: 12px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--line, #e5e7eb);
}
.docs-table th { background: #f8f9fa; font-weight: 600; }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table td code { white-space: nowrap; font-size: 11px; }
#new-api .code-tabs { overflow-x: auto; }
#new-api .code-tabs button { flex-shrink: 0; white-space: nowrap; }

.header-table {
  display:grid;
  grid-template-columns:1fr 1fr;
  margin:25px 0;
  border-block:1px solid var(--line);
}

.header-table>div {
  min-width:0;
  padding:17px 10px;
}

.header-table strong {
  font-size:12px;
  display:block;
  margin-bottom:7px;
}

.header-table code {
  font-size:10px;
  overflow-wrap:anywhere;
  color:#566591;
}

.endpoint-heading {
  display:flex;
  gap:14px;
  align-items:center;
  padding:13px 14px;
  background:#fafbfc;
  border:1px solid var(--line);
  border-radius:7px;
  margin-top:23px;
}

.endpoint-heading code {
  font-size:12px;
  overflow-wrap:anywhere;
}

.method {
  padding:2px 7px;
  border-radius:4px;
  font:600 10px/1.8 Consolas,monospace;
}

.method.post {
  background:#eef0ff;
  color:#5968bf;
}

.method.get {
  background:#e7f6ef;
  color:#24815d;
}

.method.delete {
  background:#fbe9e9;
  color:#b44343;
}

.parameter-list {
  margin-top:20px;
}

.parameter-list>div {
  display:grid;
  grid-template-columns:160px 150px 1fr;
  gap:12px;
  align-items:baseline;
  padding:16px 0;
  border-bottom:1px solid var(--line);
}

.parameter-list code {
  font-size:12px;
  overflow-wrap:anywhere;
}

.parameter-note {
  margin-top:16px;
  font-size:12px;
  line-height:1.8;
  color:var(--muted);
}

.parameter-list span {
  font-size:10px;
  color:var(--blue);
}

.parameter-list p {
  margin:0;
  font-size:12px;
  line-height:1.8;
  color:var(--muted);
}

.stream-grid,.usage-flow {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  border:1px solid var(--line);
  border-radius:8px;
  margin:24px 0;
}

.stream-grid article,.usage-flow>div {
  padding:17px;
  border-right:1px solid var(--line);
}

.stream-grid article:last-child,.usage-flow>div:last-child {
  border:0;
}

.stream-grid span,.usage-flow span {
  display:block;
  font-size:10px;
  color:var(--blue);
  margin-bottom:14px;
}

.stream-grid strong,.usage-flow strong {
  font-size:12px;
}

.stream-grid p,.usage-flow p {
  font-size:12px;
  color:var(--muted);
  line-height:1.75;
}

.error-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1px;
  background:var(--line);
  border:1px solid var(--line);
  border-radius:7px;
  overflow:hidden;
  margin-top:22px;
}

.error-grid>div {
  background:#fff;
  padding:15px;
  display:flex;
  align-items:center;
  gap:9px;
}

.error-grid strong {
  font:600 12px Consolas,monospace;
}

.error-grid span {
  font-size:11px;
  color:var(--muted);
}

.docs-page-toc {
  position:sticky;
  top:102px;
  padding-top:42px;
  max-height:calc(100vh - 105px);
  overflow:auto;
  scrollbar-width:thin;
}

.docs-page-toc>p {
  font-size:11px;
  font-weight:600;
  margin:0 0 13px;
}

.docs-page-toc nav {
  display:flex;
  flex-direction:column;
  border-left:1px solid var(--line);
  gap:3px;
}

.docs-page-toc nav a {
  display:block;
  margin-left:-1px;
  border-left:2px solid transparent;
  padding:5px 0 5px 13px;
  font-size:11px;
  line-height:1.7;
  color:#858b95;
}

.docs-page-toc nav a.active {
  color:var(--blue);
  border-left-color:var(--blue);
}

.docs-help {
  margin-top:35px;
  padding:19px 0;
  border-top:1px solid var(--line);
}

.help-symbol {
  display:block;
  color:var(--blue);
  font-size:27px;
  margin-bottom:8px;
}

.docs-help strong {
  font-size:12px;
}

.docs-help p {
  font-size:11px;
  color:#8a909a;
  line-height:1.9;
  margin:8px 0 13px;
}

.docs-help a {
  font-size:11px;
  color:var(--blue);
  display:flex;
  justify-content:space-between;
}

.docs-base-url {
  position:relative;
  margin-top:15px;
  border-top:1px solid var(--line);
  padding-top:17px;
}

.docs-base-url>span {
  font-size:10px;
  color:#979daa;
  display:block;
}

.docs-base-url code {
  display:block;
  margin-top:8px;
  font-size:9px;
  overflow-wrap:anywhere;
  color:#727b90;
  padding-right:24px;
}

.docs-base-url button {
  position:absolute;
  right:0;
  bottom:-4px;
}

.doc-pagination {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px;
  margin-top:50px;
}

.doc-pagination a {
  border:1px solid var(--line);
  border-radius:8px;
  padding:17px;
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
}

.doc-pagination a:hover {
  border-color:#bac1df;
}

.doc-pagination small {
  color:#979dab;
  font-size:11px;
}

.doc-pagination strong {
  font-size:13px;
  font-weight:500;
  color:#5968a2;
}

.doc-pagination a:last-child {
  text-align:right;
  grid-column:2;
}

.article-footer {
  display:flex;
  justify-content:space-between;
  border-top:1px solid var(--line);
  margin-top:32px;
  padding-top:22px;
  font-size:10px;
  color:#999fac;
}

#docs-search-dialog {
  width:min(620px,calc(100% - 32px));
  margin:12vh auto auto;
  border:1px solid #dde1ec;
  border-radius:12px;
  padding:0;
  box-shadow:0 24px 80px #1e264033;
  color:var(--ink);
}

#docs-search-dialog::backdrop {
  background:#19203750;
  backdrop-filter:blur(3px);
}

.search-input-row {
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
}

.search-input-row>span {
  font-size:25px;
  color:var(--blue);
}

.search-input-row input {
  min-width:0;
  flex:1;
  border:0;
  outline:none;
  background:transparent;
  font-size:14px;
  color:var(--ink);
}

.search-input-row button {
  border:1px solid var(--line);
  background:white;
  border-radius:4px;
  color:var(--muted);
  font:11px Consolas,monospace;
  padding:4px;
}

#docs-search-results {
  max-height:50vh;
  overflow:auto;
  padding:8px;
}

#docs-search-results a {
  display:block;
  padding:12px 14px;
  border-radius:7px;
}

#docs-search-results a:focus,#docs-search-results a:hover {
  background:var(--blue-soft);
  outline:none;
}

#docs-search-results strong {
  font-size:13px;
  display:block;
}

#docs-search-results small {
  font-size:10px;
  color:var(--blue);
}

#docs-search-results p {
  font-size:12px;
  color:var(--muted);
  margin:4px 0 0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

#search-empty {
  color:var(--muted);
  text-align:center;
  padding:25px;
  font-size:13px;
}

.search-footer {
  display:flex;
  align-items:center;
  gap:6px;
  border-top:1px solid var(--line);
  padding:10px 18px;
  color:#999;
  font-size:10px;
}

.search-footer span {
  margin-left:auto;
}

.search-footer kbd {
  padding:1px 5px;
  border:1px solid var(--line);
  border-radius:3px;
}

.copy-toast {
  position:fixed;
  bottom:25px;
  left:50%;
  transform:translate(-50%,12px);
  z-index:150;
  background:#283044;
  color:white;
  border-radius:7px;
  padding:10px 17px;
  font-size:12px;
  opacity:0;
  pointer-events:none;
  transition:.15s;
}

.copy-toast.show {
  opacity:1;
  transform:translate(-50%,0);
}

@media(min-width:1500px) {
  .docs-layout {
    gap:60px;
    grid-template-columns:235px minmax(0,760px) 200px;
  }
}

@media(max-width:1150px) {
  .docs-wide {
    width:calc(100% - 48px);
  }
  .docs-layout {
    grid-template-columns:190px minmax(0,1fr);
    gap:36px;
  }
  .docs-page-toc {
    display:none;
  }
  .docs-search-trigger {
    width:230px;
  }
  .docs-header-links {
    gap:15px;
  }
  .docs-product,.docs-divider {
    display:none;
  }
}

@media(max-width:760px) {
  :root {
    --header:60px;
  }
  .docs-wide {
    width:calc(100% - 32px);
  }
  .docs-header-inner {
    gap:12px;
  }
  .docs-logo {
    font-size:20px;
  }
  .docs-header-links>a {
    display:none;
  }
  .docs-header-links {
    margin:0;
  }
  .docs-search-trigger {
    width:34px;
    height:34px;
    padding:5px 8px;
    background:white;
    border:0;
  }
  .docs-search-trigger>span:not(:first-child),.docs-search-trigger kbd {
    display:none;
  }
  .docs-menu-button {
    display:block;
  }
  .docs-subnav {
    height:48px;
    gap:20px;
    font-size:12px;
    overflow:auto;
    white-space:nowrap;
  }
  .docs-subnav .catalog-link {
    display:none;
  }
  .docs-layout {
    display:block;
  }
  .docs-sidebar {
    display:none;
    position:fixed;
    inset:var(--header) 0 0;
    z-index:40;
    background:white;
    padding:0 25px;
    overflow:auto;
  }
  .menu-open {
    overflow:hidden;
  }
  .menu-open .docs-sidebar {
    display:block;
  }
  .sidebar-scroll {
    position:static;
    max-height:none;
    padding-bottom:40px;
  }
  .docs-sidebar h2 {
    font-size:13px;
  }
  .docs-sidebar nav a {
    font-size:14px;
    padding:9px 12px;
  }
  .docs-content {
    padding-top:30px;
  }
  .article-heading h1 {
    font-size:30px;
  }
  .copy-page span {
    display:none;
  }
  .copy-page {
    padding-top:4px;
  }
  .doc-section>p {
    font-size:14px;
  }
  .quick-links {
    gap:10px;
  }
  .quick-links a {
    padding:15px;
  }
  .quick-links strong {
    font-size:13px;
  }
  .quick-links a>span:last-of-type {
    font-size:11px;
  }
  .code-example pre {
    padding:16px;
    font-size:11px;
  }
  .agent-setup-toolbar {
    padding:16px;
  }
  .agent-setup-copy {
    width:100%;
  }
  .agent-setup-preview summary {
    padding:12px 16px;
  }
  .agent-setup-preview pre {
    padding:16px;
    max-height:320px;
  }
  .parameter-list>div {
    grid-template-columns:minmax(0,1fr) auto;
  }
  .parameter-list p {
    grid-column:1/-1;
  }
  .stream-grid,.usage-flow {
    grid-template-columns:1fr;
  }
  .stream-grid article,.usage-flow>div {
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .error-grid {
    grid-template-columns:1fr 1fr;
  }
  .header-table {
    grid-template-columns:1fr;
  }
  .doc-pagination a {
    padding:13px;
  }
  .doc-pagination strong {
    font-size:12px;
  }
}

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