:root {
  color-scheme: dark;
  --topbar: 66px;
  --sidebar: 278px;
  --bg: #090d14;
  --panel: #0e141d;
  --panel-2: #121925;
  --line: #222c3b;
  --line-soft: rgba(255,255,255,.065);
  --text: #eef2f8;
  --muted: #94a0b3;
  --subtle: #657286;
  --blue: #4f8ef7;
  --blue-light: #6ba1f9;
  --cyan: #4bd4e8;
  --green: #43d19e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--text); background: var(--bg); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
.skip-link { position: fixed; z-index: 100; top: -60px; left: 16px; padding: 9px 14px; border-radius: 8px; color: #fff; background: var(--blue); transition: top .2s; }
.skip-link:focus { top: 12px; }

.topbar { position: fixed; z-index: 40; inset: 0 0 auto; height: var(--topbar); display: grid; grid-template-columns: minmax(260px, 1fr) minmax(280px, 600px) minmax(260px, 1fr); align-items: center; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(9,13,20,.92); backdrop-filter: blur(18px); }
.topbar-left { display: flex; align-items: center; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: #f6f8fb; font-size: 15px; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: white; background: linear-gradient(145deg, var(--blue-light), #376dda); box-shadow: 0 8px 22px rgba(79,142,247,.23); transform: rotate(-5deg); }
.brand-divider { width: 1px; height: 20px; margin-inline: 2px; background: var(--line); }
.brand strong { color: #9aa6b8; font-weight: 580; }
.search-trigger { width: 100%; height: 39px; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid #283346; border-radius: 9px; color: #7f8b9e; background: #0f151f; cursor: pointer; transition: border-color .2s, background .2s; }
.search-trigger:hover { border-color: #3b4c66; background: #121a26; }
.search-trigger svg, .search-input-row svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.search-trigger span { text-align: left; font-size: 13px; }
kbd { min-width: 24px; height: 23px; display: grid; place-items: center; border: 1px solid #303c50; border-radius: 5px; color: #7b899d; background: #151d29; font: 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; box-shadow: inset 0 -1px rgba(0,0,0,.35); }
.top-links { display: flex; align-items: center; justify-content: flex-end; gap: 22px; font-size: 12px; font-weight: 650; }
.top-links > a:first-child { color: #909caf; }
.icon-button { border: 0; background: none; cursor: pointer; }
.menu-button { display: none; width: 40px; height: 40px; margin-right: 4px; align-items: center; justify-content: center; }
.menu-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.docs-layout { min-height: 100vh; padding-top: var(--topbar); }
.sidebar { position: fixed; z-index: 30; top: var(--topbar); bottom: 0; left: 0; width: var(--sidebar); display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #0a0f17; }
.sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 19px 30px; scrollbar-width: thin; scrollbar-color: #283346 transparent; }
.version-select { display: flex; align-items: center; justify-content: space-between; padding: 10px 11px; border: 1px solid #252f40; border-radius: 8px; color: #a8b2c2; background: #0f151f; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.version-select span { display: flex; align-items: center; gap: 8px; }
.version-select i { width: 6px; height: 6px; border-radius: 50%; background: #f0b15f; box-shadow: 0 0 0 4px rgba(240,177,95,.08); }
.version-select small { color: #637086; font-size: 9px; }
.side-nav section { margin-top: 28px; }
.side-nav h2 { margin: 0 0 8px 10px; color: #59667a; font-size: 9px; font-weight: 760; letter-spacing: .14em; text-transform: uppercase; }
.side-nav a, .side-nav button { position: relative; width: 100%; min-height: 38px; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; margin: 1px 0; padding: 8px 10px; border: 0; border-radius: 7px; color: #8290a4; background: transparent; font-size: 12px; text-align: left; }
.side-nav a.active { color: #e9eef6; background: rgba(79,142,247,.12); }
.side-nav a.active::before { content: ""; position: absolute; left: -19px; width: 2px; height: 22px; border-radius: 2px; background: var(--blue); box-shadow: 0 0 12px rgba(79,142,247,.55); }
.side-nav button:disabled { opacity: .58; cursor: not-allowed; }
.nav-icon { display: grid; place-items: center; color: #64738a; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.side-nav a.active .nav-icon { color: var(--blue-light); }
.side-nav em { padding: 2px 5px; border: 1px solid #283345; border-radius: 4px; color: #68768a; background: #101721; font-size: 7px; font-style: normal; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; padding: 15px 28px; border-top: 1px solid var(--line-soft); color: #617086; font-size: 9px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(67,209,158,.6); }
.sidebar-backdrop { display: none; }

.main { margin-left: var(--sidebar); display: grid; grid-template-columns: minmax(0, 760px) 180px; justify-content: center; gap: 74px; min-height: calc(100vh - var(--topbar)); padding: 62px 55px 100px; }
.article { width: 100%; min-width: 0; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; color: #667388; font-size: 10px; }
.breadcrumbs b { color: #394457; font-weight: 400; }
.breadcrumbs strong { color: #a5afbf; font-weight: 600; }
.preview-label { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 15px; color: var(--blue-light); font-size: 9px; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.preview-label span { width: 17px; height: 1px; background: var(--blue); }
.article h1 { max-width: 670px; margin: 0; font-size: clamp(40px, 5vw, 61px); line-height: 1.05; letter-spacing: -.052em; }
.lead { margin: 19px 0 34px; color: #a7b1c0; font-size: 19px; }
.notice { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 19px 20px; border: 1px solid rgba(79,142,247,.24); border-radius: 11px; background: rgba(79,142,247,.07); }
.notice-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: var(--blue-light); background: rgba(79,142,247,.15); font-family: Georgia, serif; font-weight: 700; }
.notice strong { font-size: 13px; }
.notice p { margin: 4px 0 0; color: #8f9bad; font-size: 12px; line-height: 1.65; }
.article hr { margin: 48px 0; border: 0; border-top: 1px solid var(--line); }
.article section { scroll-margin-top: 100px; }
.article h2 { margin: 0 0 11px; font-size: 24px; letter-spacing: -.025em; }
.article section > p { margin: 0 0 23px; color: var(--muted); font-size: 14px; }
.topic-grid { display: grid; gap: 10px; }
.topic-card { display: grid; grid-template-columns: 36px 1fr; gap: 15px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(130deg, #101721, #0d131c); }
.topic-card > span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(79,142,247,.22); border-radius: 9px; color: var(--blue-light); background: rgba(79,142,247,.07); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.topic-card h3 { margin: 0 0 3px; font-size: 13px; }
.topic-card p { margin: 0; color: #7e8a9d; font-size: 11px; }
.release-state { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 52px; padding: 27px; border: 1px solid var(--line); border-radius: 13px; background: #0d131c; }
.release-state h2 { max-width: 570px; margin: 5px 0 7px; font-size: 20px; }
.release-state p { max-width: 590px; margin: 0; color: #7f8b9d; font-size: 12px; }
.release-kicker { color: #65748a; font-size: 8px; font-weight: 760; letter-spacing: .13em; text-transform: uppercase; }
.state-badge { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 7px 10px; border: 1px solid rgba(240,177,95,.2); border-radius: 7px; color: #d6a763; background: rgba(240,177,95,.07); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.state-badge span { width: 5px; height: 5px; border-radius: 50%; background: #f0b15f; }
.article-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 65px; padding-top: 21px; border-top: 1px solid var(--line); color: #5f6d81; font-size: 10px; }
.article-footer a { color: #8ea9d5; font-weight: 650; }

.on-this-page { position: sticky; top: calc(var(--topbar) + 45px); height: fit-content; padding-left: 17px; border-left: 1px solid var(--line); }
.on-this-page h2 { margin: 0 0 13px; color: #a1adbd; font-size: 10px; }
.on-this-page a { position: relative; display: block; padding: 5px 0; color: #657286; font-size: 9px; }
.on-this-page a.active { color: var(--blue-light); }
.on-this-page a.active::before { content: ""; position: absolute; left: -18px; top: 8px; width: 2px; height: 13px; border-radius: 2px; background: var(--blue); }

.search-dialog { width: min(620px, calc(100% - 30px)); margin-top: 14vh; padding: 0; border: 1px solid #2c394d; border-radius: 13px; color: var(--text); background: #0d131c; box-shadow: 0 30px 100px rgba(0,0,0,.65); }
.search-dialog::backdrop { background: rgba(3,6,10,.72); backdrop-filter: blur(4px); }
.search-box { margin: 0; }
.search-input-row { height: 55px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; padding: 0 14px; border-bottom: 1px solid var(--line); color: #7e8a9c; }
.search-input-row input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 14px; }
.search-input-row input::placeholder { color: #5e6a7d; }
.search-input-row button { padding: 5px 8px; border: 1px solid #303c50; border-radius: 5px; color: #77859a; background: #141c28; font-size: 9px; cursor: pointer; }
.search-empty { display: flex; min-height: 220px; align-items: center; justify-content: center; flex-direction: column; padding: 35px; text-align: center; }
.search-empty-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 13px; border: 1px solid #273244; border-radius: 11px; color: #65738a; background: #111824; }
.search-empty strong { font-size: 12px; }
.search-empty p { margin: 5px 0 0; color: #667388; font-size: 10px; }

@media (max-width: 1050px) {
  .topbar { grid-template-columns: minmax(220px, .8fr) minmax(250px, 1.2fr) auto; }
  .main { grid-template-columns: minmax(0, 760px); }
  .on-this-page { display: none; }
}

@media (max-width: 800px) {
  .topbar { grid-template-columns: 1fr minmax(180px, 320px); padding: 0 14px; }
  .menu-button { display: flex; }
  .top-links { display: none; }
  .sidebar { transform: translateX(-102%); box-shadow: 20px 0 60px rgba(0,0,0,.4); transition: transform .25s ease; }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-backdrop { position: fixed; z-index: 25; inset: var(--topbar) 0 0; background: rgba(2,5,9,.64); }
  .sidebar-open .sidebar-backdrop { display: block; }
  .main { margin-left: 0; padding-inline: 35px; }
}

@media (max-width: 560px) {
  :root { --topbar: 60px; }
  .topbar { grid-template-columns: 1fr auto; }
  .brand-divider, .brand strong { display: none; }
  .search-trigger { width: 40px; height: 38px; display: grid; grid-template-columns: 1fr; place-items: center; padding: 0; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .main { padding: 38px 20px 75px; }
  .breadcrumbs { margin-bottom: 35px; }
  .article h1 { font-size: 40px; }
  .lead { font-size: 16px; }
  .notice { grid-template-columns: 29px 1fr; padding: 16px; }
  .release-state { align-items: flex-start; flex-direction: column; }
  .article-footer { align-items: flex-start; flex-direction: column; gap: 10px; }
}

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