/* =========================================================
   docs.css: API documentation
   ========================================================= */
.docs-hero .hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: end; }
.endpoint { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 11px 14px; border-radius: var(--r-md); background: var(--code-bg); border: 1px solid var(--code-line); color: var(--code-ink); }
.endpoint .method { font: 800 11px var(--mono); padding: 4px 9px; border-radius: var(--r-xs); background: rgba(242, 107, 29, .2); color: #ffb067; }
.endpoint code { flex: 1; min-width: 0; padding: 0; background: none; color: #f4f7fd; font-size: 13px; word-break: break-all; }
.endpoint .btn { padding: 6px 12px; font-size: 12px; background: transparent; color: #fff; border-color: var(--code-line); box-shadow: none; }
.endpoint .btn:hover { background: var(--code-line); color: #fff; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.fact { display: inline-flex; gap: 6px; align-items: center; padding: 6px 13px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--mute); font-size: 13px; }
.fact b { color: var(--ink); }
.fact.on b { color: var(--ok); } .fact.off b { color: var(--bad); }
.hero-card { padding: 22px; border-radius: var(--r-lg); background: linear-gradient(180deg, #19223a, #0e1424); color: #fff; border: 1px solid var(--code-line); box-shadow: var(--sh-lg); }
.hero-card h2 { margin: 0 0 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #ffb067; }
.hero-card ul { margin: 0; padding-left: 18px; color: #cbd5e6; font-size: 14.5px; }
.hero-card li { margin: 6px 0; }
.hero-card .mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.hero-card .mini div { padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); }
.hero-card .mini b { display: block; font-size: 17px; }
.hero-card .mini span { font-size: 12px; color: #93a4bd; }

.doc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 210px; align-items: start; padding-top: 8px; }
.doc-side, .doc-toc { position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow: auto; padding: 24px 16px 30px 0; border-right: 1px solid var(--line); }
.doc-toc { padding: 24px 0 30px 18px; border-right: 0; border-left: 1px solid var(--line); }
.doc-side h2, .doc-toc h2 { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.doc-search { position: relative; margin-bottom: 14px; }
.doc-search .ic { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--faint); }
.doc-search .field { padding-left: 38px; font-size: 14px; }
.doc-group { margin: 16px 0; }
.doc-group h3 { margin: 0 0 6px; padding: 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.doc-side a { display: block; margin: 2px 0; padding: 7px 10px; border-left: 3px solid transparent; border-radius: var(--r-sm); color: var(--ink-2); font-size: 14px; text-decoration: none; }
.doc-side a:hover { background: var(--surface-3); color: var(--brand-strong); }
.doc-side a.on { background: var(--brand-soft); border-left-color: var(--brand); color: var(--brand-strong); font-weight: 700; }
.doc-none { padding: 10px; color: var(--mute); font-size: 13px; }
.doc-toc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); color: var(--mute); font-size: 13px; text-decoration: none; }
.doc-toc a:hover { color: var(--brand-strong); }
.doc-toc a.on { border-left-color: var(--brand); color: var(--brand-strong); font-weight: 700; }
.side-backdrop { display: none; position: fixed; inset: var(--nav-h) 0 0; z-index: 48; background: var(--overlay); }

.doc-main { min-width: 0; padding: 24px 32px 60px; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--mute); }
.crumb a { color: var(--mute); } .crumb a:hover { color: var(--brand-strong); }
.mobile-bar { display: none; align-items: center; gap: 10px; margin-bottom: 14px; }
.mobile-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--mute); }

.sec { margin: 0 0 22px; padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); animation: fade .25s ease; }
.sec-head { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.sec-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--brand-strong); }
.sec h2.sec-title { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.03em; }
.sec h3 { display: flex; align-items: center; gap: 8px; margin: 32px 0 12px; font-size: 20px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.sec h3 .anchor { opacity: 0; color: var(--faint); font-weight: 600; }
.sec h3:hover .anchor, .sec h3 .anchor:focus { opacity: 1; color: var(--brand); }
.sec p, .sec li { font-size: 15.5px; color: var(--ink-2); }
.sec ul, .sec ol { margin: 0 0 16px; padding-left: 22px; }
.sec li { margin: 5px 0; }
.lead { font-size: 17px; color: var(--ink-2); max-width: 780px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.note { padding: 14px 16px; margin: 0 0 16px; border: 1px solid var(--warn-line); border-left: 4px solid var(--warn); border-radius: var(--r-md); background: var(--warn-soft); color: var(--ink-2); font-size: 14.5px; }

.console .row { display: flex; flex-wrap: wrap; gap: 10px; }
.console .field { flex: 1; min-width: 200px; width: auto; }
.console .select { width: auto; }
.url-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.url-bar code { flex: 1; min-width: 220px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); font-size: 13px; }
.resp-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; color: var(--mute); }
.empty { padding: 26px; border: 2px dashed var(--line-strong); border-radius: var(--r-md); text-align: center; color: var(--mute); background: var(--surface-2); }
details.qa { margin: 0 0 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
details.qa summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 700; cursor: pointer; list-style: none; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::before { content: "+"; display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 8px; background: var(--brand-soft); color: var(--brand-strong); font: 800 16px var(--mono); }
details.qa[open] { border-color: var(--brand-line); }
details.qa[open] summary::before { content: "\2212"; }
details.qa .a { padding: 0 16px 16px 52px; color: var(--mute); } details.qa .a p { margin: 0; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0; }
.support-box { display: block; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); text-decoration: none !important; transition: border-color var(--t-fast), transform var(--t-fast); }
.support-box:hover { border-color: var(--brand-line); transform: translateY(-2px); }
.support-box b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.support-box span { display: block; margin-top: 4px; font-size: 20px; font-weight: 800; color: var(--brand-strong); word-break: break-all; }

@media (max-width: 1100px) { .doc-layout { grid-template-columns: 250px minmax(0, 1fr); } .doc-toc { display: none; } }
@media (max-width: 860px) {
  .docs-hero .hero-grid { grid-template-columns: 1fr; }
  .doc-layout { display: block; }
  .doc-side { position: fixed; top: var(--nav-h); left: 0; bottom: 0; z-index: 49; width: min(320px, 86vw); height: auto; padding: 20px; background: var(--surface); border-right: 1px solid var(--line); box-shadow: var(--sh-lg); transform: translateX(-105%); transition: transform .2s ease; }
  .doc-side.open { transform: none; }
  .side-backdrop.open { display: block; }
  .doc-main { padding: 20px 0 40px; }
  .mobile-bar { display: flex; }
  .sec { padding: 20px; border-radius: var(--r-md); }
  }
@media (max-width: 560px) { .endpoint { flex-wrap: wrap; } .endpoint code { min-width: 100%; order: 3; } .console .field, .console .select, .console .btn { width: 100%; } table { min-width: 460px; } }
.mt { margin-top: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.sec .chips { margin: 0 0 14px; }
.sec code { word-break: break-word; }
body.page-docs .container { max-width: var(--wrap-wide); }
.tabs { margin: 0 0 18px; } .tabs .cv { margin: 0; }
