:root {
  color-scheme: dark;
  --bg: #050912;
  --bg-soft: #08111f;
  --surface: #0b1627;
  --surface-2: #0e1c30;
  --line: #18304f;
  --line-soft: rgba(106, 157, 222, 0.18);
  --text: #f5f8ff;
  --muted: #91a1b9;
  --blue: #2d7cff;
  --cyan: #20bfea;
  --violet: #6d67ff;
  --green: #47d5a2;
  --warning: #f5be59;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
body::before {
  position: fixed; inset: 0; z-index: -2; content: ""; pointer-events: none;
  background:
    radial-gradient(circle at 82% 3%, rgba(45,124,255,.17), transparent 29rem),
    radial-gradient(circle at 12% 34%, rgba(32,191,234,.08), transparent 25rem),
    linear-gradient(180deg, #060b15 0, #050912 44rem);
}
body::after {
  position: fixed; inset: 0; z-index: -1; content: ""; opacity: .25; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
  background-size: 54px 54px; mask-image: linear-gradient(to bottom, #000, transparent 52rem);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 12px 16px; border-radius: 10px; background: var(--text); color: #06101e; font-weight: 800; }
.skip-link:focus { top: 16px; }

.docs-header {
  position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 28px;
  min-height: 76px; padding: 0 max(24px, calc((100vw - 1440px) / 2)); border-bottom: 1px solid rgba(121,164,224,.16);
  background: rgba(5,9,18,.88); backdrop-filter: blur(20px);
}
.docs-brand { display: inline-flex; width: max-content; align-items: center; gap: 11px; }
.docs-brand img { width: 40px; height: 40px; }
.docs-brand span { display: grid; }
.docs-brand strong { font-size: 18px; letter-spacing: -.03em; }
.docs-brand small { margin-top: 2px; color: #69809f; font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.docs-header > nav { display: flex; align-items: center; gap: 24px; color: #a7b5c9; font-size: 13px; font-weight: 650; }
.docs-header > nav a:hover { color: var(--text); }
.docs-header .portal-link { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.language-switch { display: flex; align-items: center; gap: 8px; }
.language-switch span { width: 1px; height: 14px; background: var(--line); }
.language-switch button { min-width: 44px; min-height: 44px; padding: 5px; border: 0; background: none; color: #61738f; font-size: 12px; font-weight: 850; cursor: pointer; }
.language-switch button[aria-pressed="true"] { color: var(--cyan); }
.mobile-nav-toggle { display: none; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 12px; font-weight: 750; }

.docs-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: 76px; align-items: end; width: min(1360px, calc(100% - 48px)); margin: 0 auto; padding: 86px 0 62px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #62a1ff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.eyebrow::before { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 14px var(--blue); content: ""; }
.docs-hero h1 { max-width: 820px; margin: 18px 0 20px; font-size: clamp(42px, 5vw, 70px); letter-spacing: -.055em; line-height: .98; }
.docs-hero-copy p { max-width: 760px; margin: 0; color: #a0aec2; font-size: 17px; line-height: 1.75; }
.docs-search-wrap { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(9,20,36,.82); box-shadow: var(--shadow); }
.docs-search-wrap label { display: block; margin-bottom: 11px; color: #a7b5c9; font-size: 12px; font-weight: 750; }
.docs-search-field { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 15px; border: 1px solid #274569; border-radius: 11px; background: #060d18; }
.docs-search-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,124,255,.18); }
.docs-search-field span { color: var(--cyan); font-size: 24px; }
.docs-search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.docs-search-field input::placeholder { color: #5f718b; }
.quick-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.quick-tags button { padding: 6px 9px; border: 1px solid var(--line-soft); border-radius: 999px; background: rgba(29,53,86,.28); color: #8195b0; font-size: 10px; cursor: pointer; }
.quick-tags button:hover { border-color: var(--blue); color: var(--text); }
.search-results { position: absolute; top: calc(100% - 15px); right: 24px; left: 24px; z-index: 20; overflow: hidden; border: 1px solid #29466b; border-radius: 12px; background: #081321; box-shadow: 0 22px 60px rgba(0,0,0,.5); }
.search-results button { display: grid; width: 100%; gap: 4px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line-soft); background: none; text-align: left; cursor: pointer; }
.search-results button:last-child { border-bottom: 0; }
.search-results button:hover, .search-results button:focus { background: #10213a; outline: 0; }
.search-results strong { font-size: 13px; }
.search-results small { color: var(--muted); }
.search-empty { padding: 18px; color: var(--muted); font-size: 13px; }

.role-paths { display: flex; align-items: center; gap: 8px; width: min(1360px, calc(100% - 48px)); margin: 0 auto 30px; padding: 16px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.role-paths span { margin-right: 8px; color: #71849f; font-size: 12px; }
.role-paths button { padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: transparent; color: #8194ae; font-size: 11px; font-weight: 750; cursor: pointer; }
.role-paths button:hover, .role-paths button.active { border-color: rgba(45,124,255,.55); background: rgba(45,124,255,.12); color: #dce8ff; }

.docs-layout { display: grid; grid-template-columns: 236px minmax(0, 840px) 190px; gap: 48px; align-items: start; width: min(1360px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 110px; }
.docs-sidebar, .article-tools { position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #233a5a transparent; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; color: #dce7f7; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.sidebar-close { display: none; border: 0; background: none; font-size: 24px; }
.docs-sidebar nav { display: grid; gap: 4px; }
.nav-group { margin-bottom: 18px; }
.nav-group > strong { display: block; margin-bottom: 7px; color: #617994; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.nav-group a { display: block; margin-left: -10px; padding: 8px 10px; border-left: 2px solid transparent; border-radius: 0 8px 8px 0; color: #91a2b8; font-size: 12px; line-height: 1.35; }
.nav-group a:hover { color: var(--text); }
.nav-group a.active { border-left-color: var(--blue); background: rgba(45,124,255,.1); color: #eaf1ff; }
.sidebar-help { display: grid; gap: 8px; margin-top: 25px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg, rgba(24,57,101,.38), rgba(10,22,39,.8)); }
.sidebar-help span { color: #5e93dc; font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.sidebar-help strong { font-size: 13px; line-height: 1.35; }
.sidebar-help a { color: var(--cyan); font-size: 11px; font-weight: 750; }

.docs-article { min-width: 0; outline: none; }
.article-header { padding-bottom: 34px; border-bottom: 1px solid var(--line-soft); }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.article-meta span { padding: 6px 9px; border: 1px solid var(--line-soft); border-radius: 999px; color: #7790ae; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.article-meta .article-role { border-color: rgba(45,124,255,.35); color: #7fb0ff; }
.article-header h2 { max-width: 760px; margin: 0 0 16px; font-size: clamp(34px, 4vw, 54px); letter-spacing: -.045em; line-height: 1.04; }
.article-header > p { max-width: 760px; margin: 0; color: #a1afc2; font-size: 17px; line-height: 1.7; }
.article-start { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 25px; }
.article-start a { display: grid; gap: 7px; min-height: 116px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.article-start a:hover { border-color: #315986; transform: translateY(-1px); }
.article-start small { color: #6285b1; font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.article-start strong { font-size: 13px; line-height: 1.4; }
.article-section { padding: 40px 0; border-bottom: 1px solid var(--line-soft); }
.article-section h3 { margin: 0 0 16px; font-size: 25px; letter-spacing: -.025em; scroll-margin-top: 110px; }
.article-section p { margin: 0 0 16px; color: #b2bfd0; font-size: 15px; line-height: 1.78; }
.article-section ul, .article-section ol { display: grid; gap: 10px; margin: 18px 0 0; padding-left: 22px; color: #b2bfd0; font-size: 14px; line-height: 1.65; }
.article-section li::marker { color: var(--blue); font-weight: 850; }
.steps { display: grid; gap: 11px; margin-top: 20px; counter-reset: doc-step; }
.step { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(10,22,39,.72); counter-increment: doc-step; }
.step::before { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: rgba(45,124,255,.14); color: #7db0ff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 850; content: counter(doc-step, decimal-leading-zero); }
.step strong { display: block; margin-bottom: 5px; font-size: 14px; }
.step p { margin: 0; color: #92a4bc; font-size: 13px; line-height: 1.6; }
.callout { display: grid; grid-template-columns: 34px 1fr; gap: 12px; margin: 22px 0; padding: 17px; border: 1px solid rgba(45,124,255,.34); border-radius: 13px; background: rgba(45,124,255,.08); }
.callout::before { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: rgba(45,124,255,.18); color: #83b3ff; font-weight: 900; content: "i"; }
.callout.warning { border-color: rgba(245,190,89,.3); background: rgba(245,190,89,.07); }
.callout.warning::before { background: rgba(245,190,89,.14); color: var(--warning); content: "!"; }
.callout.success { border-color: rgba(71,213,162,.28); background: rgba(71,213,162,.07); }
.callout.success::before { background: rgba(71,213,162,.14); color: var(--green); content: "✓"; }
.callout strong { display: block; margin-bottom: 4px; font-size: 13px; }
.callout p { margin: 0; color: #9fb0c6; font-size: 13px; line-height: 1.6; }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.definition-grid div { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(10,22,39,.6); }
.definition-grid strong { display: block; margin-bottom: 6px; font-size: 13px; }
.definition-grid span { color: #91a2ba; font-size: 12px; line-height: 1.55; }
.docs-table-wrap { overflow-x: auto; margin-top: 20px; border: 1px solid var(--line); border-radius: 13px; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.docs-table th, .docs-table td { padding: 13px 15px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.docs-table th { background: #0d1c30; color: #d7e2f2; }
.docs-table td { color: #9dadc2; }
.docs-table tr:last-child td { border-bottom: 0; }
code { padding: 2px 6px; border: 1px solid #203955; border-radius: 5px; background: #07101c; color: #73cff0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; }
.next-guides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 38px; }
.next-guides button { min-height: 96px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); text-align: left; cursor: pointer; }
.next-guides button:hover { border-color: #315986; background: var(--surface-2); }
.next-guides small { display: block; margin-bottom: 7px; color: #5e7da8; font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.next-guides strong { font-size: 13px; line-height: 1.4; }

.article-tools { display: grid; gap: 12px; }
.article-tools > div { padding-bottom: 15px; border-bottom: 1px solid var(--line-soft); }
.article-tools span { display: block; margin-bottom: 10px; color: #5d7593; font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.article-tools nav { display: grid; gap: 8px; }
.article-tools nav a { color: #8192a9; font-size: 10px; line-height: 1.4; }
.article-tools nav a:hover { color: var(--text); }
.article-tools button, .article-tools > a { padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(12,27,47,.7); color: #9eb0c7; font-size: 10px; text-align: left; cursor: pointer; }
.article-tools button:hover, .article-tools > a:hover { border-color: #315986; color: var(--text); }

.docs-footer { display: grid; grid-template-columns: 1fr minmax(300px, 560px) auto; gap: 30px; align-items: center; min-height: 150px; padding: 30px max(24px, calc((100vw - 1360px) / 2)); border-top: 1px solid var(--line-soft); background: #050a12; }
.docs-footer > div { display: flex; align-items: center; gap: 10px; }
.docs-footer img { width: 35px; height: 35px; }
.docs-footer span { display: grid; }
.docs-footer strong { font-size: 14px; }
.docs-footer small { color: #61738d; font-size: 9px; }
.docs-footer p { color: #667b98; font-size: 11px; line-height: 1.6; }
.docs-footer > a { color: #8ba0ba; font-size: 11px; }

@media (max-width: 1160px) {
  .docs-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .article-tools { display: none; }
  .docs-hero { gap: 40px; }
}
@media (max-width: 860px) {
  .docs-header { grid-template-columns: 1fr auto auto; padding: 0 18px; }
  .docs-header > nav { display: none; }
  .mobile-nav-toggle { display: block; }
  .docs-hero { grid-template-columns: 1fr; width: min(100% - 32px, 720px); padding: 58px 0 38px; }
  .role-paths { display: flex; flex-wrap: wrap; overflow-x: visible; width: calc(100% - 32px); white-space: normal; }
  .role-paths button { min-height: 44px; }
  .docs-layout { display: block; width: min(100% - 32px, 760px); }
  .docs-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 80; width: min(330px, 88vw); max-height: none; padding: 24px; border-right: 1px solid var(--line); background: #07111e; box-shadow: 30px 0 80px rgba(0,0,0,.55); transform: translateX(-105%); transition: transform 180ms ease; }
  .docs-sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .docs-footer { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .docs-header { min-height: 66px; gap: 10px; }
  .docs-brand img { width: 34px; height: 34px; }
  .docs-brand small { display: none; }
  .language-switch { display: flex; }
  .docs-hero h1 { font-size: 39px; }
  .docs-search-wrap { padding: 17px; }
  .article-start, .definition-grid, .next-guides { grid-template-columns: 1fr; }
  .article-header h2 { font-size: 36px; }
  .article-section { padding: 32px 0; }
}
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #111; }
  body::before, body::after, .docs-header, .docs-hero, .role-paths, .docs-sidebar, .article-tools, .docs-footer, .next-guides { display: none !important; }
  .docs-layout { display: block; width: 100%; padding: 0; }
  .docs-article p, .article-section ul, .article-section ol { color: #333; }
  .step, .callout, .definition-grid div { break-inside: avoid; border-color: #ccc; background: #fff; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
