:root {
  color-scheme: light;
  --page: #ffffff;
  --rail: #f6f9fd;
  --surface: #ffffff;
  --surface-soft: #f1f6fc;
  --ink: #071b3b;
  --text: #243755;
  --muted: #5b6b84;
  --line: #d7e0ec;
  --line-strong: #b9c8dc;
  --accent: #0969da;
  --accent-strong: #0756b4;
  --accent-soft: #e8f2ff;
  --info: #0b67d1;
  --success: #18794e;
  --warning: #946200;
  --danger: #b42318;
  --code: #071a34;
  --code-2: #0c2342;
  --code-text: #edf5ff;
  --code-muted: #9fb1c9;
  --code-blue: #7db8ff;
  --code-green: #8dd8ae;
  --code-orange: #ffc36b;
  --code-pink: #ff91a8;
  --header-height: 68px;
  --sidebar-width: 260px;
  --toc-width: 220px;
  --article-width: 840px;
  --font-ui: "Avenir Next", Avenir, Inter, "Segoe UI", system-ui, sans-serif;
  --font-reading: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-code: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --focus: #f0b400;
}

[data-theme="dark"] {
  color-scheme: dark;
  --page: #071326;
  --rail: #0b1a2f;
  --surface: #0c1c33;
  --surface-soft: #102541;
  --ink: #f1f6ff;
  --text: #d7e2f1;
  --muted: #9fb0c7;
  --line: #273b56;
  --line-strong: #405775;
  --accent: #69aaff;
  --accent-strong: #91c1ff;
  --accent-soft: #12345e;
  --info: #7db8ff;
  --success: #79d4a7;
  --warning: #ffd170;
  --danger: #ff9b91;
  --code: #030b18;
  --code-2: #071527;
  --code-text: #f0f6ff;
  --code-muted: #a7b8cf;
  --focus: #ffd24a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-strong);
}

img,
svg {
  display: block;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--page);
  font-weight: 800;
}

.skip-link:focus {
  transform: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(360px, 1fr) auto;
  min-height: var(--header-height);
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  height: 100%;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  color: var(--accent);
}

.brand-mark path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 3.2;
}

.top-nav {
  display: flex;
  height: 100%;
  align-items: stretch;
  gap: 4px;
  padding-left: 20px;
}

.top-nav a {
  position: relative;
  display: inline-flex;
  min-width: 92px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  color: var(--accent);
}

.top-nav a[aria-current="page"]::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  background: var(--accent);
  content: "";
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
}

.icon-button,
.menu-toggle,
.search-trigger {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button,
.menu-toggle {
  display: inline-grid;
  width: 42px;
  place-items: center;
  padding: 0;
}

.icon-button:hover,
.menu-toggle:hover,
.search-trigger:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-button svg,
.menu-toggle svg,
.search-trigger svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.menu-toggle {
  display: none;
}

.search-trigger {
  display: flex;
  width: clamp(210px, 22vw, 340px);
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}

.search-trigger kbd {
  margin-left: auto;
}

kbd {
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
}

.version-label {
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.site-grid {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--toc-width);
  min-height: calc(100vh - var(--header-height));
}

.sidebar,
.page-toc {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  align-self: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--rail);
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 20px 14px 88px;
}

.sidebar nav {
  display: grid;
  gap: 22px;
}

.nav-group h2 {
  margin: 0 10px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.nav-list a:hover {
  background: var(--surface-soft);
  color: var(--accent);
}

.nav-list a[aria-current="page"],
.nav-list a[aria-current="location"] {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.nav-step {
  display: inline-grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

a[aria-current="location"] .nav-step {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.sidebar-note {
  margin: 28px 10px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.doc-main {
  min-width: 0;
  background: var(--page);
}

.doc-article {
  width: min(var(--article-width), calc(100% - 64px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a {
  font-weight: 700;
  text-decoration: none;
}

.breadcrumbs svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.doc-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-reading);
  font-size: clamp(43px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.doc-lede {
  max-width: 760px;
  margin: 14px 0 24px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 28px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.doc-meta strong {
  color: var(--text);
}

.article-section {
  margin-top: 54px;
  scroll-margin-top: calc(var(--header-height) + 28px);
}

.article-section + .article-section {
  padding-top: 4px;
}

.article-section h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.article-section h3 {
  margin: 34px 0 12px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.3;
}

.article-section p,
.article-section li {
  font-size: 17px;
}

.article-section p {
  margin: 0 0 18px;
}

.article-section ul,
.article-section ol {
  margin: 0 0 22px;
  padding-left: 26px;
}

.article-section li + li {
  margin-top: 8px;
}

.article-section code:not(pre code),
.inline-code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: var(--font-code);
  font-size: 0.88em;
}

.evidence-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.evidence-line::before {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
}

.evidence-line.guidance::before {
  background: var(--warning);
}

.evidence-line.observed::before {
  background: var(--success);
}

.callout {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--info) 42%, var(--line));
  border-left: 4px solid var(--info);
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface));
}

.callout.warning {
  border-color: color-mix(in srgb, var(--warning) 42%, var(--line));
  border-left-color: var(--warning);
  background: color-mix(in srgb, var(--warning) 8%, var(--surface));
}

.callout.danger {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
}

.callout svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--info);
  stroke-width: 2;
}

.callout.warning svg {
  stroke: var(--warning);
}

.callout.danger svg {
  stroke: var(--danger);
}

.callout p,
.callout ul {
  margin: 0;
  font-size: 15px;
}

.callout p + p,
.callout p + ul {
  margin-top: 8px;
}

.code-frame {
  margin: 24px 0 28px;
  overflow: hidden;
  border: 1px solid #263c5d;
  border-radius: 7px;
  background: var(--code);
}

.code-head {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 9px 7px 16px;
  border-bottom: 1px solid #2a3d59;
  background: var(--code-2);
  color: #dbe8fa;
  font-size: 12px;
  font-weight: 800;
}

.copy-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid #536781;
  border-radius: 5px;
  background: transparent;
  color: #edf5ff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.copy-button:hover {
  border-color: var(--code-blue);
  color: var(--code-blue);
}

.copy-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

pre {
  max-width: 100%;
  margin: 0;
  overflow: auto;
  padding: 20px;
  background: var(--code);
  color: var(--code-text);
  font-family: var(--font-code);
  font-size: 14px;
  line-height: 1.62;
  tab-size: 2;
}

pre code {
  font-family: inherit;
}

.tok-comment { color: var(--code-muted); }
.tok-keyword { color: var(--code-blue); }
.tok-string { color: var(--code-orange); }
.tok-number { color: var(--code-pink); }
.tok-global { color: var(--code-green); }

.copy-status {
  min-height: 20px;
  margin: -18px 0 18px;
  color: var(--success);
  font-size: 13px;
  font-weight: 700;
}

.table-wrap {
  max-width: 100%;
  margin: 22px 0 28px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 14px;
}

th,
td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--rail);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

td code,
th code {
  font-family: var(--font-code);
  font-size: 12px;
}

.step-list {
  margin: 24px 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.step-list li {
  position: relative;
  padding: 4px 0 22px 46px;
  counter-increment: steps;
}

.step-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  content: counter(steps);
  font-size: 13px;
  font-weight: 800;
}

.step-list li:not(:last-child)::after {
  position: absolute;
  top: 33px;
  bottom: 1px;
  left: 14px;
  border-left: 1px solid var(--line-strong);
  content: "";
}

.lesson-check {
  margin: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.lesson-check summary,
.toc-mobile summary {
  min-height: 48px;
  padding: 12px 4px;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.lesson-check > div {
  padding: 0 4px 16px;
}

.toc-mobile {
  display: none;
  margin: 24px 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.toc-mobile summary {
  padding: 12px 14px;
}

.toc-mobile ol {
  margin: 0;
  padding: 0 14px 14px 34px;
}

.toc-mobile a {
  text-decoration: none;
}

.learning-paths,
.example-index {
  margin: 24px 0;
  border-top: 1px solid var(--line-strong);
}

.path-row,
.example-row {
  display: grid;
  grid-template-columns: 190px 1fr auto;
  gap: 22px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.path-row h3,
.example-row h3 {
  margin: 0;
  font-size: 17px;
}

.path-row p,
.example-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.path-row a,
.example-row a {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.chapter {
  margin-top: 58px;
  padding-top: 34px;
  border-top: 1px solid var(--line-strong);
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.chapter-number {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--font-reading);
  font-size: 36px;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.objectives {
  margin: 22px 0 30px;
  padding: 17px 20px;
  border-left: 3px solid var(--accent);
  background: var(--rail);
}

.objectives strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
}

.objectives ul {
  margin: 0;
  padding-left: 20px;
}

.api-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}

.filter-field {
  display: flex;
  width: min(420px, 100%);
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
}

.filter-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.filter-field svg {
  width: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}

.filter-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.api-entry {
  padding: 34px 0 10px;
  border-top: 1px solid var(--line-strong);
  scroll-margin-top: calc(var(--header-height) + 18px);
}

.api-entry[hidden] {
  display: none;
}

.api-entry h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-code);
  font-size: 28px;
  letter-spacing: -0.025em;
}

.api-kind {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.signature {
  position: relative;
  margin: 18px 0;
  padding: 15px 54px 15px 16px;
  overflow-x: auto;
  border-radius: 5px;
  background: var(--code);
  color: var(--code-text);
  font-family: var(--font-code);
  font-size: 13px;
  white-space: pre;
}

.signature .copy-button {
  position: absolute;
  top: 7px;
  right: 7px;
}

.no-results {
  margin: 24px 0;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.pager a {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.pager a:hover {
  border-color: var(--line-strong);
  background: var(--rail);
}

.pager a:last-child {
  justify-content: flex-end;
  text-align: right;
}

.pager svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.page-footer {
  margin-top: 50px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.page-toc {
  border-left: 1px solid var(--line);
  padding: 34px 18px;
}

.page-toc h2 {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-toc ol {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-toc a {
  display: block;
  padding: 7px 8px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
}

.page-toc a:hover,
.page-toc a.active {
  border-left-color: var(--accent);
  color: var(--accent);
}

.sidebar-scrim {
  display: none;
}

.search-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: min(720px, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.search-dialog::backdrop {
  background: rgba(2, 13, 30, 0.62);
  backdrop-filter: blur(2px);
}

.search-dialog form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.search-dialog form svg {
  width: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}

.search-dialog input {
  width: 100%;
  min-height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
}

.dialog-close {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.search-help {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.search-results {
  max-height: 520px;
  margin: 0;
  overflow-y: auto;
  padding: 8px;
  list-style: none;
}

.search-results a {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: 5px;
  color: var(--text);
  text-decoration: none;
}

.search-results a:hover,
.search-results a:focus-visible {
  background: var(--accent-soft);
}

.search-results strong {
  color: var(--ink);
  font-size: 14px;
}

.search-results span {
  color: var(--muted);
  font-size: 12px;
}

.search-empty {
  padding: 26px 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: var(--sidebar-width) minmax(300px, 1fr) auto;
  }

  .top-nav a {
    min-width: 76px;
    padding: 0 8px;
  }

  .site-grid {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .page-toc {
    display: none;
  }

  .toc-mobile {
    display: block;
  }
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .brand {
    padding-right: 8px;
    padding-left: 10px;
  }

  .menu-toggle {
    display: inline-grid;
    margin-left: 10px;
  }

  .top-nav {
    display: none;
  }

  .search-trigger {
    width: 42px;
    justify-content: center;
    padding: 0;
  }

  .search-trigger span,
  .search-trigger kbd,
  .version-label {
    display: none;
  }

  .top-actions {
    justify-self: end;
    padding-right: 10px;
  }

  .site-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    z-index: 90;
    width: min(320px, calc(100vw - 44px));
    height: calc(100vh - var(--header-height));
    max-height: calc(100vh - var(--header-height));
    transform: translateX(-104%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 40px rgba(2, 13, 30, 0.2);
  }

  .nav-open .sidebar {
    transform: none;
  }

  .sidebar-scrim {
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: 80;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(2, 13, 30, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .nav-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .doc-article {
    width: min(var(--article-width), calc(100% - 48px));
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 62px;
  }

  body {
    font-size: 15px;
  }

  .topbar {
    min-height: var(--header-height);
  }

  .brand {
    gap: 9px;
    font-size: 16px;
  }

  .brand-mark {
    width: 25px;
  }

  .top-actions {
    gap: 7px;
  }

  .icon-button,
  .menu-toggle,
  .search-trigger {
    width: 40px;
    min-height: 40px;
  }

  .doc-article {
    width: calc(100% - 32px);
    padding-top: 26px;
  }

  .breadcrumbs {
    margin-bottom: 18px;
  }

  .doc-title {
    font-family: var(--font-ui);
    font-size: clamp(38px, 12vw, 52px);
    font-weight: 850;
    letter-spacing: -0.045em;
  }

  .doc-lede {
    font-size: 18px;
  }

  .article-section {
    margin-top: 44px;
  }

  .article-section h2 {
    font-size: 27px;
  }

  .article-section p,
  .article-section li {
    font-size: 16px;
  }

  .chapter h2 {
    font-family: var(--font-ui);
    font-size: 30px;
  }

  .article-section h2,
  .article-section h3,
  .article-section code:not(pre code),
  .inline-code {
    overflow-wrap: anywhere;
  }

  pre {
    padding: 17px;
    font-size: 13px;
  }

  .code-head {
    padding-left: 12px;
  }

  .callout {
    grid-template-columns: 1fr;
  }

  .path-row,
  .example-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .pager a:last-child {
    justify-content: flex-start;
    text-align: left;
  }

  .table-wrap {
    margin-right: -16px;
    margin-left: -16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  th,
  td {
    min-width: 130px;
  }
}

@media (max-width: 360px) {
  .brand {
    gap: 5px;
    padding-right: 4px;
    padding-left: 7px;
  }

  .brand-mark {
    width: 20px;
  }

  .brand span {
    font-size: 0;
  }

  .brand span::after {
    content: "Wave3D";
    font-size: 14px;
  }

  .top-actions {
    gap: 4px;
    padding-right: 5px;
  }

  .icon-button,
  .menu-toggle,
  .search-trigger {
    width: 38px;
    min-height: 38px;
  }

  .menu-toggle {
    margin-left: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .nav-list a[aria-current],
  .top-nav a[aria-current] {
    outline: 2px solid CanvasText;
  }
}

@media print {
  :root {
    --page: #fff;
    --ink: #000;
    --text: #111;
    --muted: #444;
    --line: #bbb;
  }

  .topbar,
  .sidebar,
  .page-toc,
  .toc-mobile,
  .pager,
  .copy-button,
  .sidebar-scrim,
  .search-dialog {
    display: none !important;
  }

  .site-grid {
    display: block;
  }

  .doc-article {
    width: 100%;
    padding: 0;
  }

  .doc-title {
    font-size: 38pt;
  }

  .article-section,
  .chapter,
  .api-entry {
    break-inside: avoid;
  }

  a {
    color: #000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.78em;
    overflow-wrap: anywhere;
  }
}
