:root {
  --page-bg: #fff;
  --ink: #242638;
  --muted: #7c8498;
  --muted-strong: #5d667c;
  --line: #e2e5ed;
  --line-soft: #eef0f5;
  --violet: #7355d6;
  --violet-dark: #6348c6;
  --violet-pale: #f2eefb;
  --green: #35a77f;
  --gold: #a37f40;
  --code-bg: #222536;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--page-bg); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
code, pre { font-family: "JetBrains Mono", Consolas, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.site-header { height: 68px; border-bottom: 1px solid var(--line); background: #fff; }
.header-inner { width: min(1248px, calc(100% - 64px)); height: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.brand, .header-nav { display: flex; align-items: center; }
.brand { gap: 11px; font-size: 19px; letter-spacing: -0.03em; }
.logo-mark { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 9px; color: #fff; background: var(--violet); font-weight: 700; }
.brand-divider { width: 1px; height: 23px; margin: 0 3px 0 2px; background: var(--line); }
.product-name { color: var(--muted); font-size: 14px; letter-spacing: 0; }
.header-nav { gap: 25px; color: var(--muted); font-size: 13px; }
.header-nav a:hover { color: var(--violet); }
.header-nav span { display: inline-flex; align-items: center; gap: 8px; }
.header-nav i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.docs-shell { width: min(1248px, calc(100% - 64px)); margin: 0 auto; padding: 43px 0 58px; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 43px; }
.sidebar { align-self: start; position: sticky; top: 24px; }
.sidebar-title { margin-bottom: 20px; color: var(--muted-strong); font-size: 12px; font-weight: 700; }
.side-nav { display: grid; gap: 7px; }
.side-nav a { min-height: 38px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border-radius: 7px; color: var(--muted); transition: color 160ms ease, background 160ms ease; }
.side-nav a span { width: 14px; color: #8991a5; font-size: 17px; text-align: center; }
.side-nav a:hover, .side-nav a.active { color: var(--violet); background: var(--violet-pale); font-weight: 600; }
.side-nav a.active span { color: var(--violet); }
.sidebar-note { margin-top: 21px; padding: 18px 11px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.sidebar-note strong { color: var(--ink); }
.sidebar-note p { margin: 10px 0 0; line-height: 1.65; }
.docs-main { min-width: 0; max-width: 960px; }
.eyebrow { color: var(--violet); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; }
h1 { margin: 12px 0 6px; font-size: 32px; line-height: 1.2; letter-spacing: -0.04em; }
.lead { margin: 0; color: var(--muted); font-size: 16px; }
.cc-callout { min-height: 47px; display: flex; align-items: center; gap: 12px; margin-top: 15px; padding: 0 18px; border-radius: 9px; color: var(--muted-strong); background: #f7f3fc; }
.cc-callout:hover { color: var(--violet); }
.callout-icon { color: var(--violet); font-size: 22px; }
.cc-callout > span:last-child { margin-left: auto; color: var(--violet); font-weight: 600; }
.doc-section { margin-top: 34px; scroll-margin-top: 22px; }
.section-heading { display: flex; align-items: baseline; gap: 11px; margin-bottom: 13px; }
.section-heading > span { color: var(--violet); font-family: "JetBrains Mono", Consolas, monospace; font-size: 12px; font-weight: 700; }
h2 { margin: 0; font-size: 21px; letter-spacing: -0.035em; }
.section-copy { margin: 0 0 12px; color: var(--muted); }
.info-card, .endpoint-table { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.info-row { min-height: 67px; display: grid; grid-template-columns: 1.02fr 1.72fr 30px; align-items: center; gap: 20px; padding: 10px 17px; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row > div { display: grid; gap: 2px; }
.info-row strong { color: var(--muted-strong); font-size: 12px; font-weight: 600; }
.info-row small { color: #9299aa; font-size: 11px; }
.info-row code { color: #4d5568; font-size: 14px; font-weight: 600; }
.copy-button { width: 28px; height: 28px; border: 0; color: #8590a7; background: transparent; border-radius: 6px; }
.copy-button:hover { color: var(--violet); background: var(--violet-pale); }
.security-note { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--gold); font-size: 12px; }
.security-note b { font-size: 16px; }
.code-panel { overflow: hidden; border-radius: 9px; color: #e6e9f2; background: var(--code-bg); box-shadow: 0 1px 1px rgba(25,27,44,0.14); }
.code-toolbar { min-height: 37px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid rgba(255,255,255,0.1); color: #b5bad0; font-size: 12px; }
.copy-code { border: 0; color: #b5bad0; background: transparent; font-size: 12px; }
.copy-code:hover { color: #fff; }
pre { overflow-x: auto; margin: 0; padding: 18px 17px 20px; color: #d8dbea; font-size: 12px; line-height: 1.75; white-space: pre-wrap; }
.protocol-tabs { display: flex; gap: 25px; border-bottom: 1px solid var(--line); }
.protocol-tab { height: 36px; padding: 0 0 9px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 13px; }
.protocol-tab:hover, .protocol-tab.active { color: var(--violet); }
.protocol-tab.active { border-bottom-color: var(--violet); font-weight: 700; }
.model-row { min-height: 50px; display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 0 13px; border: 1px solid #e7e2f5; border-radius: 8px; color: var(--muted); background: #faf8ff; font-size: 12px; }
.model-row button { border: 0; color: var(--muted-strong); background: transparent; font-weight: 700; }
.model-row strong { margin-left: auto; color: var(--violet); font-size: 12px; }
.request-panel { margin-top: 13px; }
.protocol-note { margin-top: 11px; font-size: 12px; }
.endpoint-row { min-height: 43px; display: grid; grid-template-columns: 1fr 1.15fr 1.45fr; align-items: center; gap: 14px; padding: 0 15px; border-top: 1px solid var(--line-soft); color: var(--muted-strong); font-size: 12px; }
.endpoint-row:first-child { border-top: 0; }
.endpoint-row code { color: #4f586d; font-size: 12px; }
.endpoint-head { color: var(--muted); background: #fafbfe; font-size: 11px; }
.error-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 16px; }
.error-grid > div { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.error-grid strong { font-family: "JetBrains Mono", Consolas, monospace; font-size: 13px; }
.error-grid span { color: var(--muted); font-size: 12px; }
.docs-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 34px; padding-top: 21px; border-top: 1px solid var(--line); color: var(--muted); }
.docs-footer a { color: var(--violet); font-weight: 700; }
.toast { position: fixed; right: 28px; bottom: 28px; z-index: 5; max-width: min(360px, calc(100vw - 40px)); padding: 12px 16px; border: 1px solid #dcd6f2; border-radius: 9px; color: var(--ink); background: #fff; box-shadow: 0 12px 32px rgba(47, 35, 89, 0.16); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 860px) {
  .header-inner, .docs-shell { width: min(100% - 40px, 680px); }
  .docs-shell { display: block; padding-top: 30px; }
  .sidebar { position: static; margin-bottom: 33px; }
  .sidebar-title, .sidebar-note { display: none; }
  .side-nav { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; }
  .side-nav a { flex: 0 0 auto; white-space: nowrap; }
  .docs-main { max-width: none; }
}
@media (max-width: 560px) {
  .site-header { height: 64px; }
  .header-inner, .docs-shell { width: min(100% - 28px, 520px); }
  .brand { font-size: 16px; }
  .brand-divider, .product-name, .header-nav > a { display: none; }
  .header-nav { font-size: 12px; }
  .docs-shell { padding-top: 25px; }
  h1 { font-size: 28px; }
  .lead { font-size: 14px; }
  .cc-callout { align-items: flex-start; flex-wrap: wrap; padding: 12px 14px; }
  .cc-callout > span:last-child { width: 100%; margin-left: 34px; }
  .info-row { grid-template-columns: 1fr 30px; gap: 5px; }
  .info-row code { grid-column: 1 / -1; grid-row: 2; }
  .info-row > div { grid-column: 1; grid-row: 1; }
  .info-row .copy-button { grid-column: 2; grid-row: 1; }
  .protocol-tabs { gap: 14px; overflow-x: auto; }
  .protocol-tab { flex: 0 0 auto; font-size: 12px; }
  .model-row { align-items: flex-start; flex-wrap: wrap; padding: 10px 12px; }
  .model-row strong { width: 100%; margin-left: 0; }
  .endpoint-row { grid-template-columns: 1fr; gap: 2px; padding: 11px 14px; }
  .endpoint-head { display: none; }
  .error-grid { grid-template-columns: 1fr; gap: 12px; }
  .docs-footer { flex-direction: column; }
}

[hidden] { display: none !important; }
.ui-icon { display: inline-block; width: 19px; height: 19px; vertical-align: middle; flex-shrink: 0; }
button, a, input, select, summary, pre { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #aa93f0; outline-offset: 3px; }
select { font: inherit; cursor: pointer; max-width: 100%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

body { font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif; }
pre, .endpoint-row code { font-size: 14px; }
pre { white-space: pre; }
.info-row small { font-size: 12px; }
.endpoint-row { min-height: 47px; padding-top: 10px; padding-bottom: 10px; }
.endpoint-row code { overflow-wrap: anywhere; }
.info-row { grid-template-columns: 220px minmax(0, 1fr) 30px; }
.model-row select { border: 0; padding: 8px; color: var(--ink); background: transparent; font-weight: 600; }
.endpoint-table + .section-copy { margin-top: 16px; }
@media (max-width: 860px) { .info-row { grid-template-columns: 160px minmax(0,1fr) 30px; } }
@media (max-width: 560px) {
  .header-inner, .docs-shell { width: calc(100% - 40px); }
  .sidebar { display: none; }
  .header-nav > a { display: block; }
  .header-nav > span { display: none; }
  .docs-shell { padding-top: 30px; }
  h1 { font-size: 26px; line-height: 1.35; }
  .doc-section { margin-top: 36px; }
  .section-heading h2 { font-size: 20px; }
  .info-row { grid-template-columns: 1fr 30px; padding: 16px; }
  .info-row small { font-size: 12px; }
  .info-row code { overflow-wrap: anywhere; }
  .protocol-tabs { gap: 18px; }
  .protocol-tab { min-height: 44px; }
  .copy-code, .copy-button { min-height: 44px; min-width: 44px; }
  .code-toolbar { min-height: 44px; }
  .security-note { align-items: flex-start; }
  .cc-callout { gap: 8px; }
  .cc-callout > span:last-child { margin-left: 0; }
  .endpoint-row { padding: 16px; gap: 8px; }
  .endpoint-row span { font-size: 13px; }
}

.endpoint-row { grid-template-columns: .85fr 1.8fr 1.35fr; }
@media(max-width:560px) { .endpoint-row { grid-template-columns:1fr; } .header-nav a { min-height:44px; display:inline-flex; align-items:center; } .model-row select { min-height:44px; } }

/* Operator model catalog. Cards on narrow screens, no page-level horizontal scroll. */
[hidden]{display:none!important}.catalog-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0;color:var(--muted);font-size:12px}.catalog-tools label{display:flex;align-items:center;gap:12px}.catalog-tools input{font:inherit;padding:10px 12px;border:1px solid var(--line);border-radius:7px;width:280px;max-width:100%;background:#fff}.catalog-tools input:focus{outline:2px solid var(--violet)}.catalog-table-wrap{border:1px solid var(--line);border-radius:10px;overflow:hidden}.catalog-table{border-collapse:collapse;width:100%;font-size:11px;text-align:left}.catalog-table caption{text-align:left;padding:14px 16px;color:var(--muted-strong);background:var(--violet-pale);font-size:12px}.catalog-table th,.catalog-table td{padding:13px 10px;border-bottom:1px solid var(--line);line-height:1.8}.catalog-table thead{background:#faf9fc;color:var(--muted)}.catalog-table tbody th{font-weight:500;position:relative;padding-right:33px}.catalog-table th code{font-size:11px;overflow-wrap:anywhere}.catalog-table td{font-variant-numeric:tabular-nums;white-space:nowrap}.catalog-table tr:last-child>*{border-bottom:0}.model-copy{position:absolute;right:3px;top:50%;transform:translateY(-50%)}.model-copy svg{width:14px;height:14px}.model-badge{display:inline-block;color:#956618;background:#fff6df;font-size:10px;padding:0 5px;border-radius:4px;margin:4px 0 0 5px}.catalog-note{font-size:12px;line-height:1.8;color:var(--muted);margin:12px 0 0}
@media(max-width:1050px){.catalog-table{font-size:10px}.catalog-table td,.catalog-table th{padding-left:7px;padding-right:7px}}
@media(max-width:700px){.catalog-tools{align-items:flex-end}.catalog-tools label{display:grid;gap:5px;min-width:0;flex:1}.catalog-tools input{width:100%}.catalog-tools>span{white-space:nowrap;padding-bottom:10px}.catalog-table,.catalog-table tbody{display:block}.catalog-table thead{display:none}.catalog-table caption{display:block}.catalog-table tr{display:grid;grid-template-columns:1fr 1fr;padding:12px 14px;border-top:1px solid var(--line)}.catalog-table tbody th{grid-column:1/-1;padding:3px 30px 10px 0;border:0}.catalog-table th code{font-size:12px}.catalog-table td{border:0;padding:5px 0;white-space:normal;font-size:11px}.catalog-table td::before{content:attr(data-label);display:block;color:var(--muted)}.catalog-table td:nth-child(4){grid-column:1/-1;grid-row:4}.catalog-table td:nth-child(5){grid-column:1/-1}.model-copy{width:36px;height:36px}}
