:root {
  color-scheme: dark;
  --ink: #e7eaf0;
  --muted: #a5adba;
  --paper: #171a1f;
  --surface: #1e2229;
  --raised: #262b33;
  --line: #3a414c;
  --link: #8abaff;
  --link-hover: #b2d2ff;
  --focus: #f3c969;
  --measure: 780px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.65; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: #fff; color: #111; border: 2px solid var(--focus); }
.skip-link:focus { top: 12px; }

.site-header { background: #121519; border-bottom: 1px solid #303640; }
.masthead { width: min(1600px, 100%); min-height: 52px; display: flex; align-items: center; gap: 24px; margin: 0 auto; padding: 8px 30px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: #f6f7f9; font-size: 19px; font-weight: 750; text-decoration: none; }
.brand img { width: 31px; height: 31px; filter: invert(1); }
.edition { color: #aab2bd; font-size: 13px; white-space: nowrap; }
.docs-bar { min-height: 46px; display: flex; align-items: center; gap: 18px; margin: 0; padding: 4px max(30px, calc((100vw - 1540px) / 2)); border-top: 1px solid #303640; background: #1c2128; }
.product-nav { display: flex; align-items: center; gap: 4px; }
.product-nav a { padding: 8px 13px; border-radius: 5px; color: #d4d9e1; text-decoration: none; font-size: 14px; font-weight: 650; }
.product-nav a:hover { background: #303640; color: #fff; }
.product-nav a[aria-current=page] { background: #26384e; color: #a7ccff; box-shadow: inset 0 -2px #68a7ff; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.language-link { display: inline-block; padding: 6px 10px; border: 1px solid #687381; border-radius: 5px; color: #dce1e8; font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.language-link:hover { border-color: #a9cfff; background: #252b33; color: #fff; }

.page-layout { width: min(1600px, 100%); margin: 0 auto; padding: 0 30px; display: grid; grid-template-columns: 240px minmax(0, var(--measure)) 190px; gap: 36px; align-items: start; }
.sidebar { position: sticky; top: 0; max-height: 100vh; overflow: auto; padding: 24px 12px 22px 0; border-right: 1px solid var(--line); }
.sidebar-title, .toc-title { margin: 0 0 12px; color: #b2bac5; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.nav-group { margin: 2px 10px 9px 0; }
.nav-group summary { list-style: none; cursor: pointer; padding: 6px 8px; color: #c0c7d1; font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::before { content: "›"; display: inline-block; width: 17px; color: #929daa; font-size: 17px; line-height: 1; transition: transform .12s; }
.nav-group[open] summary::before { transform: rotate(90deg); }
.nav-group ol, .page-toc ol { list-style: none; padding: 0; margin: 0; }
.nav-group li a { display: block; padding: 5px 8px 5px 25px; border-radius: 4px; color: #cbd1da; text-decoration: none; font-size: 14px; line-height: 1.45; }
.nav-group li a:hover { background: #282e37; color: #fff; }
.nav-group li a[aria-current=page] { background: #16304c; color: #acd0ff; font-weight: 720; border-left: 3px solid #68a7ff; padding-left: 22px; }
.sidebar-footer { display: flex; flex-direction: column; gap: 7px; margin: 18px 12px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.sidebar-footer a { color: #a9caff; text-decoration: none; }
.sidebar-footer a:hover { text-decoration: underline; }

.article { min-width: 0; padding: 35px 0 78px; }
.breadcrumb { margin: 0 0 11px; color: var(--muted); font-size: 13px; }
.breadcrumb a { color: #a8caff; }
.article h1 { margin: 0 0 10px; color: #f4f6f9; font-size: clamp(34px, 4vw, 46px); line-height: 1.14; letter-spacing: -.035em; }
.page-description { max-width: 65ch; margin: 0 0 30px; color: #b7bec8; font-size: 18px; }
.article article { max-width: var(--measure); }
.article h2 { margin: 38px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: #e6eaf0; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; scroll-margin-top: 18px; }
.article h3 { margin: 24px 0 7px; color: #dce1e8; font-size: 18px; line-height: 1.35; scroll-margin-top: 18px; }
.article p, .article li { max-width: 76ch; }
.article li { margin: 6px 0; }
.article ul, .article ol { padding-left: 24px; }
.article .lead { color: #d2d7df; font-size: 18px; }
.article strong { color: #f0f2f5; font-weight: 700; }
.article code { padding: .12em .3em; border: 1px solid #3a414b; border-radius: 4px; background: #252a32; color: #d8e4f6; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .91em; }
.article pre { max-width: 100%; overflow-x: auto; padding: 14px 17px; border: 1px solid #3a414b; border-radius: 6px; background: #101317; color: #e7eaf0; line-height: 1.6; }
.article pre code { padding: 0; border: 0; background: transparent; color: inherit; }
.note { display: block; margin: 24px 0; padding: 15px 18px; border: 1px solid #46576b; border-left: 4px solid #65a7ff; background: #1c2836; color: #dce5f1; }
.source-links { color: var(--muted); font-size: 14px; }
.guide-map { width: 100%; margin: 18px 0 30px; border-collapse: collapse; font-size: 14px; }
.guide-map th, .guide-map td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.guide-map th { background: #252a32; color: #e5e9ef; font-size: 13px; }
.guide-map td:first-child { width: 34%; font-weight: 650; }
.page-switch { margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 650; }
.page-toc { position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow: auto; padding: 36px 0 20px; }
.page-toc ol { padding-left: 12px; border-left: 1px solid var(--line); }
.page-toc li a { display: block; padding: 4px 0; color: #aeb6c2; font-size: 13px; line-height: 1.45; text-decoration: none; }
.page-toc li a:hover { color: var(--link-hover); text-decoration: underline; }
.site-footer { display: flex; justify-content: center; gap: 12px 24px; flex-wrap: wrap; padding: 18px max(24px, calc((100vw - 1540px) / 2)); border-top: 1px solid var(--line); background: #121519; color: #a5adba; font-size: 13px; }

@media (max-width: 1240px) {
  .page-layout { grid-template-columns: 225px minmax(0, 1fr); gap: 32px; padding: 0 24px; }
  .page-toc { display: none; }
}
@media (max-width: 760px) {
  .masthead { min-height: 48px; gap: 8px 14px; padding: 7px 16px; }
  .brand { gap: 8px; font-size: 17px; }
  .brand img { width: 27px; height: 27px; }
  .edition { margin-left: auto; font-size: 12px; }
  .docs-bar { width: 100%; justify-content: space-between; gap: 8px; padding: 4px 16px; }
  .product-nav { min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; }
  .product-nav a { padding: 7px 10px; white-space: nowrap; }
  .language-link { padding: 5px 8px; }
  .page-layout { display: block; padding: 0 18px; }
  .sidebar { position: static; max-height: none; overflow: visible; padding: 12px 0 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-title { margin-bottom: 5px; }
  .sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px; overflow: visible; }
  .nav-group { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
  .nav-group summary { padding: 7px 8px; line-height: 1.25; }
  .nav-group ol { max-height: 42vh; overflow: auto; padding: 0 5px 6px; }
  .nav-group li a { padding: 6px 8px; font-size: 13px; }
  .nav-group li a[aria-current=page] { padding-left: 5px; }
  .sidebar-footer { display: none; }
  .article { padding: 24px 0 56px; }
  .article h2 { margin-top: 32px; font-size: 21px; }
  .article h3 { font-size: 17px; }
  .page-description { margin-bottom: 24px; font-size: 16px; }
  .guide-map { font-size: 13px; }
  .guide-map th, .guide-map td { padding: 8px; }
  .site-footer { justify-content: flex-start; padding: 16px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
