:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --canvas: #eef1f5;
  --surface: #fff;
  --text: #151922;
  --muted: #5c6575;
  --line: #d5dae2;
  --accent: #5636d9;
  --accent-ink: #fff;
  --accent-soft: #eeeaff;
  --success: #087a52;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px rgba(15, 23, 42, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html[data-theme="dark"] { color-scheme: dark; --bg: #101216; --canvas: #1d2129; --surface: #171a20; --text: #f2f4f8; --muted: #a8b0bf; --line: #303640; --accent: #9a83ff; --accent-ink: #111016; --accent-soft: #292343; --success: #55cf99; --danger: #ff8b96; --shadow: 0 1px 2px rgba(0, 0, 0, .34); }
@media (prefers-color-scheme: dark) { html[data-theme="system"] { color-scheme: dark; --bg: #101216; --canvas: #1d2129; --surface: #171a20; --text: #f2f4f8; --muted: #a8b0bf; --line: #303640; --accent: #9a83ff; --accent-ink: #111016; --accent-soft: #292343; --success: #55cf99; --danger: #ff8b96; --shadow: 0 1px 2px rgba(0, 0, 0, .34); } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.65 Inter, ui-sans-serif, sans-serif; }
[hidden] { display: none !important; }
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.docs-header { position: sticky; top: 0; z-index: 30; min-height: 72px; display: grid; grid-template-columns: 280px minmax(250px, 650px) 1fr; align-items: center; gap: 28px; padding: 10px 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); }
.docs-nav-toggle { display: none; }
.docs-brand { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.docs-brand img { width: 31px; }
.docs-search { position: relative; }
.docs-search input { width: 100%; height: 43px; padding: 0 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--canvas); color: var(--text); }
.search-results { position: absolute; top: 49px; left: 0; right: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 20px 50px rgba(13, 60, 105, .18); }
.search-results a { display: grid; padding: 10px; border-radius: 8px; }
.search-results a:hover { background: var(--accent-soft); }
.search-results small { color: var(--muted); }
.search-empty { display: grid; padding: 10px; border-radius: 8px; }
.docs-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.docs-actions button, .docs-actions a { min-height: 40px; padding: 0 13px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 650; cursor: pointer; }
.docs-actions a { border-color: transparent; color: var(--accent); }
.version-control { position: relative; }
.version-menu { position: absolute; top: 47px; right: 0; width: 190px; display: grid; gap: 3px; padding: 7px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.version-menu a { min-height: 42px; padding: 0 10px; border: 0; color: var(--muted); font-size: 13px; }
.version-menu a:hover, .version-menu a[aria-current="page"] { background: var(--accent-soft); color: var(--text); }
.docs-layout { display: grid; grid-template-columns: 280px minmax(0, 900px) 230px; justify-content: center; min-height: calc(100vh - 72px); }
.docs-nav { position: sticky; top: 72px; height: calc(100vh - 72px); overflow: auto; padding: 28px; border-right: 1px solid var(--line); background: var(--canvas); }
.docs-nav-header { display: none; }
.docs-nav section { display: grid; gap: 4px; margin-bottom: 25px; }
.docs-nav strong { margin-bottom: 5px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.docs-nav a { padding: 7px 9px; border-radius: 8px; color: var(--muted); font-size: 13px; }
.docs-nav a:hover { color: var(--text); background: var(--accent-soft); }
.docs-article { min-width: 0; padding: 45px clamp(30px, 5vw, 75px) 80px; }
.breadcrumbs { display: flex; gap: 9px; margin-bottom: 30px; color: var(--muted); font-size: 12px; }
.breadcrumbs a, .on-this-page a, .docs-footer a { min-width: 28px; min-height: 28px; display: inline-flex; align-items: center; }
.docs-article h1 { margin: 0 0 18px; font-size: clamp(38px, 4vw, 57px); line-height: 1.08; letter-spacing: -.045em; }
.docs-article h2 { margin: 43px 0 10px; font-size: 25px; letter-spacing: -.025em; }
.docs-article h3 { margin-top: 32px; }
.docs-article p, .docs-article li { color: var(--muted); }
.lead { font-size: 19px; }
.title-row { display: flex; align-items: center; gap: 14px; }
.title-row h1 { flex: 1; }
.title-row span { padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 9px; color: var(--accent); font-size: 12px; font-weight: 750; white-space: nowrap; }
.notice, .success { margin: 28px 0; padding: 17px 20px; border: 1px solid var(--line); border-radius: 11px; background: var(--accent-soft); }
.success { border-color: color-mix(in srgb, var(--success) 30%, var(--line)); background: color-mix(in srgb, var(--success) 10%, var(--surface)); color: var(--success); }
.docs-article pre { position: relative; margin: 14px 0 20px; padding: 20px 75px 20px 22px; overflow: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--canvas); color: var(--text); }
.docs-article pre code { font: 13px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.docs-article pre button { position: absolute; top: 11px; right: 11px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); cursor: pointer; }
.docs-article code { padding: 2px 5px; border-radius: 5px; background: var(--canvas); color: var(--text); }
.unsafe-link { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.on-this-page { position: sticky; top: 72px; height: calc(100vh - 72px); display: grid; align-content: start; gap: 9px; padding: 35px 25px; border-left: 1px solid var(--line); font-size: 12px; }
.on-this-page a { color: var(--muted); }
.on-this-page a:hover { color: var(--accent); }
.on-this-page .toc-level-3 { padding-left: 12px; }
.docs-feedback { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px 16px; margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--line); }
.docs-feedback > div { display: flex; gap: 7px; }
.docs-feedback button { min-width: 52px; min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); cursor: pointer; }
.docs-feedback button:hover { border-color: var(--accent); background: var(--accent-soft); }
.docs-feedback button:disabled { cursor: default; opacity: .65; }
.docs-feedback [data-feedback-status] { color: var(--muted); font-size: 13px; }
.docs-feedback.is-complete [data-feedback-status] { color: var(--success); }
.docs-feedback.is-error [data-feedback-status] { color: var(--danger); }
.archive-notice { display: grid; gap: 2px; margin-bottom: 26px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--accent-soft); }
.archive-notice span { color: var(--muted); }
.archive-notice a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.docs-home > p { max-width: 680px; font-size: 19px; }
.docs-home-intro { display: grid; grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr); align-items: center; gap: 28px; margin-bottom: 30px; }
.docs-home-intro p { color: var(--muted); font-size: 18px; }
.docs-home-intro img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 11px; background: #101216; box-shadow: var(--shadow); }
.home-actions { display: flex; gap: 10px; margin: 30px 0 45px; }
.home-actions a, a.primary { min-height: 44px; display: inline-flex; align-items: center; padding: 0 17px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; }
.home-actions .primary, a.primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.docs-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.docs-card-grid a { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.docs-card-grid a:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.docs-card-grid span { display: block; width: 26px; height: 26px; margin-bottom: 22px; border: 2px solid var(--accent); border-radius: 8px; }
.docs-card-grid h2 { margin: 0; font-size: 18px; }
.docs-card-grid p { margin-bottom: 0; }
.quick-links { margin-top: 55px; }
.quick-links > a { display: flex; justify-content: space-between; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.quick-links span { color: var(--accent); font-size: 13px; }
.api-list { display: grid; gap: 10px; margin-top: 35px; }
.api-list section { padding: 18px; border: 1px solid var(--line); border-radius: 11px; }
.api-list p { margin-bottom: 0; }
.docs-footer { display: flex; flex-wrap: wrap; gap: 22px; padding: 25px 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
@media (max-width: 1100px) {
  .docs-header { grid-template-columns: 220px minmax(240px, 1fr) auto; gap: 16px; }
  .docs-actions > a { display: none; }
  .docs-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .on-this-page { display: none; }
}
@media (max-width: 760px) {
  .docs-header { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; padding: 10px 14px; }
  .docs-nav-toggle { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
  .docs-nav-toggle > span[aria-hidden] { width: 17px; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
  .docs-brand strong { display: none; }
  .docs-search { grid-column: 1 / -1; grid-row: 2; }
  .docs-actions { grid-column: 3; grid-row: 1; }
  .docs-actions .theme-button { width: 40px; padding: 0; justify-content: center; }
  .docs-layout { display: block; }
  .docs-home-intro { grid-template-columns: 1fr; }
  .docs-nav { position: fixed; z-index: 51; top: 0; left: 0; width: min(340px, calc(100vw - 40px)); height: 100dvh; display: block; padding: 0 22px 28px; border-right: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .18s ease; }
  .docs-nav[data-open] { transform: translateX(0); }
  .docs-nav-header { position: sticky; top: 0; z-index: 2; min-height: 64px; display: flex; align-items: center; justify-content: space-between; margin: 0 -22px 20px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .docs-nav-header button { min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--accent-soft); color: var(--text); font-weight: 700; }
  .docs-nav section { margin-bottom: 25px; }
  .docs-nav-scrim { position: fixed; z-index: 50; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(3, 7, 18, .56); }
  .docs-article { padding: 35px 20px 70px; }
  .docs-article h1 { font-size: clamp(36px, 11vw, 48px); }
  .title-row { align-items: flex-start; flex-direction: column; }
  .docs-card-grid { grid-template-columns: 1fr; }
  .docs-feedback { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  .docs-header { grid-template-columns: 42px 1fr auto; }
  .docs-brand { display: none; }
  .version-control > button { min-width: 70px; }
  .docs-article pre { padding: 58px 18px 18px; }
  .quick-links > a { align-items: flex-start; flex-direction: column; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
