/* 302API docs page, v2 (2026-10-14). Layout follows mainstream API docs: grouped sticky sidebar, 820px reading column,
   dark code blocks with tabs and copy. Scoped to .dx so the rest of the site is untouched. */
html.public-light-background:has(.dx){background:#fff!important}
html.public-light-background body:has(.dx){background:#fff!important;background-image:none!important}
/* The site already adds scroll-padding (header height + 16px); headings only add a small extra gap. */
/* Header spacer: use the fixed header's real height on the docs page (the site default keeps a taller mobile footprint). */
html:has(.dx) .public-subnav-spacer{height:var(--public-subnav-height,56px)!important}
.docs-page:has(.dx){background:#fff!important;min-height:0}

.dx{--ink:#1f2329;--text:#3a4252;--muted:#6b7385;--line:#e6e9ef;--soft:#f7f8fa;--brand:#3e5bf2;--brand-soft:#eef2ff;
  --mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",system-ui,sans-serif;
  font-family:var(--sans);font-synthesis:weight;
  display:grid;grid-template-columns:272px minmax(0,1fr);min-height:calc(100vh - 56px);color:var(--text);
  font-size:16px;line-height:1.8;text-align:left;-webkit-font-smoothing:antialiased}

/* sidebar */
.dx .dx-side{position:sticky;top:var(--public-subnav-height,56px);align-self:start;height:calc(100vh - var(--public-subnav-height,56px));overflow:auto;padding:28px 14px 48px 18px;
  background:#fafbfc;border-right:1px solid var(--line)}
.dx .dx-group{margin:0 0 22px}
.dx .dx-group+.dx-group{padding-top:18px;border-top:1px solid var(--line)}
html.public-light-background .dx.dx p.dx-group-title{margin:0 0 6px;padding:0 12px;font-size:13px;font-weight:700!important;line-height:2;color:var(--ink)!important;letter-spacing:.06em}
html.public-light-background .dx.dx a.dx-nav{display:block;padding:6px 12px;border-radius:8px;font-size:15px;line-height:1.6;
  color:var(--text)!important;text-decoration:none;transition:background .15s,color .15s}
html.public-light-background .dx.dx a.dx-nav:hover{background:#f0f2f5!important;color:var(--ink)!important}
html.public-light-background .dx.dx a.dx-nav.is-active{background:var(--brand-soft)!important;color:var(--brand)!important;font-weight:550}

/* reading column */
.dx .dx-main{min-width:0;padding:40px 56px 96px}
.dx .dx-inner{max-width:820px}
html.public-light-background .dx.dx h1,html.public-light-background .dx.dx h2,
html.public-light-background .dx.dx h3{color:var(--ink)!important;text-align:left;letter-spacing:0}
.dx h1{margin:0 0 12px;font-size:34px;line-height:1.3;font-weight:700}
.dx .dx-lead{margin:0;font-size:17px;line-height:1.8}
.dx .dx-meta{margin:14px 0 0;font-size:13px;color:var(--muted)!important}
.dx .dx-meta span{display:inline-flex;align-items:center;gap:6px;margin-right:16px}
.dx .dx-meta span::before{content:"";width:6px;height:6px;border-radius:50%;background:#22a06b}
.dx section{margin-top:56px;scroll-margin-top:8px}
.dx section:first-of-type{margin-top:40px}
.dx h2{margin:0 0 12px;font-size:26px;line-height:1.35;font-weight:700}
.dx h3{margin:36px 0 10px;font-size:19px;line-height:1.45;font-weight:650;scroll-margin-top:8px}
html.public-light-background .dx.dx p,html.public-light-background .dx.dx li,
html.public-light-background .dx.dx td,html.public-light-background .dx.dx dd{color:var(--text)!important}
.dx p{margin:10px 0}
.dx ul,.dx ol{margin:10px 0;padding-left:1.4em}
.dx li{margin:6px 0}
.dx strong{color:var(--ink);font-weight:650}
html.public-light-background .dx.dx a:not(.dx-nav){color:var(--brand)!important;text-decoration:none}
html.public-light-background .dx.dx a:not(.dx-nav):hover{text-decoration:underline;text-underline-offset:3px}
html.public-light-background .dx.dx :not(pre)>code{background:#f2f4f7!important;color:var(--ink)!important;border:1px solid var(--line);
  border-radius:6px;padding:.08em .38em;font-family:var(--mono);font-size:.86em;overflow-wrap:anywhere}

/* lead line of each section */
html.public-light-background .dx.dx p.dx-intro{font-size:16.5px;color:var(--muted)!important;margin:0 0 18px}

/* tables */
.dx .dx-table{margin:16px 0;border:1px solid var(--line);border-radius:12px;overflow:auto}
.dx table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.65}
.dx th{background:var(--soft);color:var(--muted);font-size:13px;font-weight:600;text-align:left;padding:10px 16px;white-space:nowrap}
.dx td{padding:12px 16px;border-top:1px solid var(--line);vertical-align:top}
.dx td:first-child{color:var(--ink)!important;font-weight:500}

/* steps */
.dx ol.dx-steps{list-style:none;padding:0;margin:18px 0;counter-reset:s}
.dx ol.dx-steps>li{position:relative;padding:0 0 18px 44px;margin:0;counter-increment:s}
.dx ol.dx-steps>li::before{content:counter(s);position:absolute;left:0;top:1px;width:28px;height:28px;border-radius:50%;
  background:var(--brand-soft);color:var(--brand);font-size:14px;font-weight:650;line-height:28px;text-align:center}
.dx ol.dx-steps>li::after{content:"";position:absolute;left:13.5px;top:34px;bottom:4px;width:1px;background:var(--line)}
.dx ol.dx-steps>li:last-child::after{display:none}
.dx ol.dx-steps>li>b{display:block;color:var(--ink);font-weight:650}

/* callouts */
.dx .dx-note{margin:18px 0;padding:14px 18px;border:1px solid #d9e2ff;border-left:4px solid var(--brand);border-radius:10px;background:#f5f7ff}
.dx .dx-note.warn{border-color:#f3dfb2;border-left-color:#e3a008;background:#fffaf0}
.dx .dx-note>b{display:block;margin-bottom:2px;color:var(--ink);font-weight:650}
html.public-light-background .dx.dx .dx-note p{margin:4px 0}

/* code */
.dx .dx-code{margin:16px 0;border-radius:12px;background:#1e222a;overflow:hidden}
.dx .dx-code-bar{display:flex;align-items:center;justify-content:space-between;padding:8px 10px 8px 16px;border-bottom:1px solid rgba(255,255,255,.07)}
.dx .dx-code-bar span{font-family:var(--mono);font-size:12px;color:#8b93a3}
.dx .dx-copy{border:1px solid rgba(255,255,255,.14);background:transparent;color:#c9d1dd;border-radius:6px;padding:2px 10px;font-size:12px;
  line-height:1.8;cursor:pointer}
.dx .dx-copy:hover{background:rgba(255,255,255,.08);color:#fff}
html.public-light-background .dx.dx .dx-code pre{margin:0;padding:16px 18px 20px;background:transparent!important;color:#e6e9ef!important;
  border:0;border-radius:0;font-family:var(--mono);font-size:13.5px;line-height:1.75;overflow:auto;white-space:pre;tab-size:2}
html.public-light-background .dx.dx .dx-code pre code{font-family:inherit;background:transparent!important;color:#e6e9ef!important;border:0;padding:0;font-size:inherit}
html.public-light-background .dx.dx .dx-code .s{color:#a6d189!important}
html.public-light-background .dx.dx .dx-code .k{color:#ca9ee6!important}
.dx .dx-caption{margin:22px 0 -6px;font-size:14px;font-weight:600;color:var(--ink)!important}

/* tabs (CSS-only, radio based) */
.dx .dx-tabs{margin:16px 0}
.dx .dx-tabs>input{position:absolute;opacity:0;pointer-events:none}
.dx .dx-tabs>label{display:inline-block;margin:0 4px 0 0;padding:8px 14px;border-bottom:2px solid transparent;font-size:14px;color:var(--muted);
  cursor:pointer;user-select:none}
.dx .dx-tabs>label:hover{color:var(--ink)}
.dx .dx-tabs>input:checked+label{color:var(--brand);border-bottom-color:var(--brand);font-weight:600}
.dx .dx-tabs>input:focus-visible+label{outline:2px solid var(--brand);outline-offset:2px;border-radius:4px}
.dx .dx-panels{border-top:1px solid var(--line);padding-top:4px}
.dx .dx-panel{display:none}
.dx .dx-tabs>input:nth-of-type(1):checked~.dx-panels>.dx-panel:nth-child(1),
.dx .dx-tabs>input:nth-of-type(2):checked~.dx-panels>.dx-panel:nth-child(2),
.dx .dx-tabs>input:nth-of-type(3):checked~.dx-panels>.dx-panel:nth-child(3),
.dx .dx-tabs>input:nth-of-type(4):checked~.dx-panels>.dx-panel:nth-child(4){display:block}

/* accordions */
.dx details{margin:12px 0;border:1px solid var(--line);border-radius:10px;background:#fff}
.dx details>summary{list-style:none;cursor:pointer;padding:12px 16px;font-size:15px;font-weight:550;color:var(--ink);display:flex;align-items:center;gap:10px}
.dx details>summary::-webkit-details-marker{display:none}
.dx details>summary::before{content:"";width:7px;height:7px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(-45deg);transition:transform .15s;flex:none}
.dx details[open]>summary::before{transform:rotate(45deg)}
.dx details>:not(summary){margin-left:16px;margin-right:16px}
.dx details>:last-child{margin-bottom:14px}

/* glossary */
.dx dl.dx-terms{display:grid;grid-template-columns:150px minmax(0,1fr);margin:16px 0;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.dx dl.dx-terms dt{padding:12px 16px;background:var(--soft);color:var(--ink)!important;font-weight:600;font-size:15px;border-top:1px solid var(--line)}
.dx dl.dx-terms dd{margin:0;padding:12px 16px;font-size:15px;line-height:1.7;border-top:1px solid var(--line)}
.dx dl.dx-terms dt:first-of-type,.dx dl.dx-terms dd:first-of-type{border-top:0}
.dx dl.dx-terms dt small{display:block;font-weight:400;color:var(--muted);font-family:var(--mono);font-size:12px}

/* AI setup prompt block kept from v1 */
.dx .docs-ai-actions{display:flex;align-items:center;gap:12px;margin:10px 0}
html.public-light-background .dx.dx pre.docs-ai-prompt{background:var(--soft)!important;color:var(--text)!important;border:1px solid var(--line);
  border-radius:10px;padding:14px 16px;font-size:13.5px;line-height:1.75;white-space:pre-wrap}

/* mobile */
.dx .dx-mtoc{display:none}
@media(max-width:960px){
  .dx{grid-template-columns:minmax(0,1fr)}
  .dx .dx-side{display:none}
  .dx .dx-main{padding:28px 18px 72px}
  .dx .dx-mtoc{display:block;margin:20px 0 0}
  .dx .dx-mtoc a{display:inline-block;margin:4px 14px 4px 0;font-size:15px}
  .dx h1{font-size:28px}
  .dx h2{font-size:23px}
  .dx table{min-width:560px}
  .dx dl.dx-terms{grid-template-columns:1fr}
  .dx dl.dx-terms dt{background:transparent;padding:12px 16px 0}
  .dx dl.dx-terms dd{border-top:0;padding:2px 16px 12px}
  .dx dl.dx-terms dt small{display:inline;margin-left:8px}
  .dx td,.dx th{padding:10px 12px}
}

/* System CJK fonts ship real bold weights (the site font only has a regular cut). */
html.public-light-background .dx.dx :is(h1,h2,h3,p,li,td,th,dt,dd,a,label,summary,strong,b,span,button){font-family:var(--sans)}
html.public-light-background .dx.dx :is(code,pre,pre *){font-family:var(--mono)!important}
