:root {
  --paper: #fbfbf8;
  --surface: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #e3e7ee;
  --line-strong: #cfd6e2;
  --brand: #4e5bff;
  --brand-soft: #eef0ff;
  --navy: #071a2e;
  --code: #0b1d31;
  --green: #197a4d;
  --header: 68px;
  --sidebar: 272px;
  --toc: 224px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 28px); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; }
code, pre, kbd { font-family: "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace; }
:focus-visible { outline: 3px solid rgba(78, 91, 255, .28); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: 12px; padding: 10px 14px; color: white; background: var(--navy); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.docs-header { position: sticky; z-index: 30; top: 0; height: var(--header); display: grid; grid-template-columns: var(--sidebar) minmax(280px, 560px) 1fr auto; align-items: center; gap: 28px; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); }
.docs-brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.docs-brand span { font-size: 15px; font-weight: 700; letter-spacing: 2.8px; }
.docs-brand i { padding-left: 10px; border-left: 1px solid var(--line-strong); color: var(--muted); font-size: 13px; font-style: normal; }
.search-trigger { min-width: 0; height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 14px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); background: var(--paper); cursor: pointer; }
.search-trigger:hover { border-color: var(--brand); background: var(--surface); }
.search-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd { padding: 3px 7px; border: 1px solid var(--line); border-radius: 4px; color: #475467; background: white; font-size: 11px; }
.docs-header nav { justify-self: end; display: flex; align-items: center; gap: 28px; font-size: 13px; }
.docs-header nav a:hover { color: var(--brand); }
.docs-header nav a:last-child { padding: 9px 14px; border-radius: 4px; color: white; background: var(--ink); }
.menu-trigger { display: none; border: 0; background: transparent; cursor: pointer; }

.docs-shell { min-height: calc(100vh - var(--header)); display: grid; grid-template-columns: var(--sidebar) minmax(0, 860px) var(--toc); justify-content: center; }
.docs-sidebar { position: sticky; top: var(--header); height: calc(100vh - var(--header)); overflow-y: auto; padding: 34px 28px 28px; border-right: 1px solid var(--line); background: #f7f8fa; }
.docs-sidebar section { margin-bottom: 28px; }
.docs-sidebar section > p, .docs-toc > p { margin: 0 0 9px; color: #98a2b3; font: 600 10px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .09em; text-transform: uppercase; }
.docs-sidebar section > a { display: block; margin: 2px 0; padding: 8px 10px; border-radius: 5px; color: #475467; font-size: 13px; line-height: 1.35; }
.docs-sidebar section > a:hover { color: var(--ink); background: white; }
.docs-sidebar section > a[aria-current="page"] { color: #3540dd; background: var(--brand-soft); font-weight: 650; }
.docs-help { display: grid; gap: 5px; margin-top: 36px; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 12px; }
.docs-help span { color: var(--muted); }.docs-help a { margin-top: 4px; color: var(--brand); }
.mobile-search { display: none; }

.docs-main { min-width: 0; padding: 58px 64px 80px; background: var(--surface); }
.docs-article { max-width: 740px; }
.docs-article > h1 { margin: 0 0 22px; font-size: clamp(34px, 4vw, 50px); line-height: 1.05; letter-spacing: -.045em; }
.docs-article > h1 + p { margin-top: 0; color: #475467; font-size: 18px; line-height: 1.65; }
.docs-article h2 { margin: 58px 0 16px; padding-top: 4px; font-size: 26px; line-height: 1.18; letter-spacing: -.025em; }
.docs-article h3 { margin: 34px 0 12px; font-size: 18px; line-height: 1.3; }
.docs-article p, .docs-article li { color: #344054; font-size: 15px; line-height: 1.75; }
.docs-article ul, .docs-article ol { padding-left: 24px; }
.docs-article li + li { margin-top: 7px; }
.docs-article a { color: #3540dd; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.docs-article strong { color: var(--ink); }
.docs-article blockquote { margin: 28px 0; padding: 18px 20px; border: 1px solid #cdd3ff; border-left: 4px solid var(--brand); border-radius: 6px; background: var(--brand-soft); }
.docs-article blockquote p { margin: 0; color: #303b67; }
.docs-article :not(pre) > code { padding: 2px 6px; border: 1px solid #e5e7f8; border-radius: 4px; color: #3440cc; background: #f5f6ff; font-size: .88em; overflow-wrap: anywhere; }
.docs-article pre { position: relative; max-width: 100%; overflow-x: auto; margin: 22px 0; padding: 44px 20px 20px; border-radius: 8px; color: #e7edf5; background: var(--code); font-size: 13px; line-height: 1.65; }
.docs-article pre::before { content: "CODE"; position: absolute; left: 20px; top: 15px; color: #8092a7; font-size: 9px; letter-spacing: .12em; }
.copy-code { position: absolute; z-index: 2; right: 10px; top: 9px; padding: 5px 8px; border: 1px solid #31465e; border-radius: 4px; color: #bdc9d6; background: #112941; font-size: 10px; cursor: pointer; }
.copy-code:hover { color: white; border-color: #61768d; }
.docs-article table { width: 100%; display: table; margin: 24px 0 30px; border-collapse: collapse; font-size: 13px; }
.docs-article th { color: #475467; background: #f8f9fb; font-size: 11px; letter-spacing: .03em; text-align: left; text-transform: uppercase; }
.docs-article th, .docs-article td { padding: 12px 13px; border: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.docs-article hr { margin: 44px 0; border: 0; border-top: 1px solid var(--line); }
.docs-article input[type="checkbox"] { accent-color: var(--brand); }

.docs-toc { position: sticky; top: var(--header); height: calc(100vh - var(--header)); overflow-y: auto; padding: 58px 26px; border-left: 1px solid var(--line); background: var(--paper); }
.docs-toc nav { display: grid; gap: 10px; }
.docs-toc a { color: var(--muted); font-size: 11px; line-height: 1.35; }
.docs-toc a:hover { color: var(--brand); }
.docs-toc a.h3 { padding-left: 12px; }

.docs-pagination { max-width: 740px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); }
.docs-pagination a { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.docs-pagination a:hover { border-color: var(--brand); background: var(--brand-soft); }
.docs-pagination span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.docs-pagination strong { font-size: 13px; }.docs-pagination .next { text-align: right; }

.search-dialog { width: min(680px, calc(100vw - 32px)); max-height: min(680px, calc(100vh - 80px)); padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 24px 80px rgba(7, 26, 46, .22); }
.search-dialog::backdrop { background: rgba(7, 26, 46, .48); backdrop-filter: blur(2px); }
.search-dialog form { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.search-dialog input { min-width: 0; height: 46px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 15px; }
.search-dialog form button { border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.search-results { max-height: 510px; overflow-y: auto; padding: 10px; }
.search-results > p { margin: 16px; color: var(--muted); font-size: 13px; }
.search-result { display: grid; gap: 4px; padding: 13px 14px; border-radius: 6px; }
.search-result:hover, .search-result[aria-selected="true"] { background: var(--brand-soft); }
.search-result strong { font-size: 14px; }.search-result span { color: var(--muted); font-size: 12px; line-height: 1.4; }

@media (max-width: 1120px) {
  :root { --toc: 0px; }
  .docs-shell { grid-template-columns: var(--sidebar) minmax(0, 860px); }
  .docs-toc { display: none; }
  .docs-main { padding-left: 48px; padding-right: 48px; }
}

@media (max-width: 780px) {
  .docs-header { grid-template-columns: 1fr auto; gap: 12px; padding: 0 18px; }
  .docs-header .search-trigger, .docs-header nav { display: none; }
  .menu-trigger { display: block; }
  .docs-shell { display: block; }
  .docs-sidebar { position: fixed; z-index: 25; top: var(--header); left: 0; width: min(320px, 88vw); transform: translateX(-102%); transition: transform .18s ease; box-shadow: 14px 0 40px rgba(7, 26, 46, .12); }
  .docs-sidebar.is-open { transform: none; }
  .mobile-search { width: 100%; display: block; margin-bottom: 26px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--muted); background: white; text-align: left; }
  .docs-main { padding: 42px 22px 64px; }
  .docs-article > h1 { font-size: 36px; }
  .docs-article > h1 + p { font-size: 16px; }
  .docs-article h2 { margin-top: 46px; font-size: 23px; }
  .docs-article table { display: block; overflow-x: auto; white-space: nowrap; }
  .docs-pagination { grid-template-columns: 1fr; }
}

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