:root {
  --doc-width: 1280px;
  --doc-gutter: 28px;
  color-scheme: light;
  --canvas: #ffffff;
  --surface: #f3f6f9;
  --surface-hover: #eaeff5;
  --text: #111822;
  --muted: #566374;
  --line: #dfe5ec;
  --line-strong: #cbd5e1;
  --accent: #0062b0;
  --active: #eaf3fa;
  --preview: #f8fafc;
  --code: #f6f8fa;
  --card-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.03);
  --subtle-shadow: 0 4px 14px -6px rgba(15, 23, 42, 0.06);
  --raised-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px var(--line);
  --glow: rgba(0, 98, 176, 0.07);
  --syn-kw: #0550ae;
  --syn-str: #0a3069;
  --syn-cmt: #616b76;
  --syn-num: #953800;
  --syn-typ: #8250df;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0f141a;
  --surface: #171f28;
  --surface-hover: #1e2834;
  --text: #edf2f7;
  --muted: #9aa8b8;
  --line: #263240;
  --line-strong: #344456;
  --accent: #68ccf8;
  --active: #183044;
  --preview: #363636;
  --code: #131921;
  --card-shadow: 0 16px 38px -12px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.28);
  --subtle-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.35);
  --raised-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--line-strong);
  --glow: rgba(104, 204, 248, 0.08);
  --syn-kw: #79c0ff;
  --syn-str: #a5d6ff;
  --syn-cmt: #8b949e;
  --syn-num: #ffa657;
  --syn-typ: #d2a8ff;
}
:root[data-theme="high-contrast"] {
  color-scheme: dark;
  --canvas: #000;
  --surface: #000;
  --surface-hover: #000;
  --text: #fff;
  --muted: #fff;
  --line: #fff;
  --line-strong: #fff;
  --accent: #0ff;
  --active: #000;
  --preview: #3b3b3b;
  --code: #000;
  --card-shadow: none;
  --subtle-shadow: none;
  --raised-shadow: 0 0 0 1px var(--line);
  --glow: transparent;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(ellipse 960px 360px at 50% -140px, var(--glow), transparent 72%) no-repeat, var(--canvas);
  color: var(--text);
  font: 15px/1.65 "Segoe UI Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, pre:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--active); color: var(--text); }
* { scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }
svg { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.skip-link { position: fixed; top: -80px; left: 16px; background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; z-index: 30; }
.skip-link:focus { top: 10px; }

.document-layout {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 48px;
  max-width: var(--doc-width);
  margin: 0 auto;
  padding: 36px var(--doc-gutter) 0;
}
.sidebar {
  align-self: start;
  position: sticky;
  top: 92px;
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 116px);
  min-height: 0;
}
.documentation-directory { flex: 1; min-height: 0; }
.documentation-directory[open] { display: flex; flex-direction: column; }
.documentation-directory::details-content { display: flex; flex: 1; min-height: 0; }
.directory-content { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.documentation-directory > summary { display: none; }
.directory-search {
  display: block;
  position: relative;
}
.directory-search::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background: var(--muted);
  pointer-events: none;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.directory-search::after {
  content: "⌘K";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 6px;
  font-size: 11px;
  line-height: 1.4;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--canvas);
  color: var(--muted);
  pointer-events: none;
}
.directory-search input {
  width: 100%;
  min-width: 0;
  padding: 8px 42px 8px 32px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.directory-search input::placeholder { color: var(--muted); opacity: 1; }
.directory-search input:focus {
  background: var(--canvas);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--active);
  outline: none;
}
.directory-groups {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: 14px;
  padding-right: 4px;
  display: grid;
  align-content: start;
  gap: 2px;
}
.directory-groups details {
  margin: 0;
}
/* A branch hidden by search must not leave an empty row in its parent list. */
.directory-branch:has(> details[hidden]) { display: none; }
.directory-groups summary,
.page-outline-menu > summary {
  list-style: none;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background-color 0.15s ease;
}
.directory-groups summary::-webkit-details-marker,
.page-outline-menu > summary::-webkit-details-marker { display: none; }
.directory-groups summary:hover,
.page-outline-menu > summary:hover { background: var(--surface); }
.directory-groups summary::after,
.page-outline-menu > summary::after {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--muted);
  transition: transform 0.18s ease;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Cpath d='m9 6 6 6-6 6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Cpath d='m9 6 6 6-6 6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.directory-groups details[open] > summary::after,
.page-outline-menu[open] > summary::after {
  transform: rotate(90deg);
}
.directory-groups ul,
.page-navigation {
  list-style: none;
  margin: 2px 0 8px 14px;
  padding: 2px 0 2px 10px;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 2px;
}
.directory-groups a,
.page-navigation a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  text-decoration: none;
  color: var(--muted);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  position: relative;
  overflow-wrap: anywhere;
}
.directory-groups a:hover,
.page-navigation a:hover {
  background: var(--surface);
  color: var(--text);
}
.directory-groups a[aria-current="page"],
.page-navigation a[aria-current="location"] {
  background: var(--active);
  color: var(--accent);
  font-weight: 600;
}
.directory-groups a[aria-current="page"]::before,
.page-navigation a[aria-current="location"]::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 99px;
  background: var(--accent);
}
.directory-groups a span:first-child { min-width: 0; overflow-wrap: anywhere; }
.directory-groups .reference-kind { flex: none; font-size: 10px; color: var(--muted); }
.directory-note, .directory-status { color: var(--muted); font-size: 11.5px; margin: 10px 4px 0; line-height: 1.5; }

.page-outline {
  grid-area: outline;
  position: sticky;
  top: 104px;
  align-self: start;
  min-width: 0;
  max-height: calc(100dvh - 128px);
  overflow-y: auto;
}

.document-main {
  display: grid;
  align-content: start;
  grid-template-columns: minmax(0, 1fr) 176px;
  grid-template-areas: "intro outline" "body outline";
  column-gap: 32px;
  align-items: start;
  min-width: 0;
}
.document-intro { grid-area: intro; min-width: 0; }
.document-body { grid-area: body; min-width: 0; }
.document-heading {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.document-heading .document-eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.document-heading h1 {
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.028em;
  margin: 0 0 12px;
  font-weight: 700;
}
.document-heading p {
  margin: 0;
  color: var(--muted);
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.7;
}
h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.4;
}
h3 {
  font-size: 16.5px;
  font-weight: 650;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.appearance { margin-top: 28px; }
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-heading h2 { margin: 0; }
.section-heading > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.section-heading > a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--active);
}
.theme-options {
  display: flex;
  background: color-mix(in srgb, var(--line) 55%, transparent);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.theme-options button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 13px;
  border-radius: 5px;
}
.theme-options button:hover:not([aria-pressed="true"]):not(:disabled) {
  color: var(--text);
}
.theme-options button[aria-pressed="true"] {
  background: var(--canvas);
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--raised-shadow);
}
.preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--canvas);
  box-shadow: var(--card-shadow);
}
.tab-list {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 20px;
}
.tab-list button {
  flex: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 13px 2px 11px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.tab-list button { transition: color 0.15s ease, border-color 0.15s ease; }
.tab-list button:hover {
  color: var(--text);
}
.tab-list button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}
.tab-list button:focus-visible { outline-offset: -4px; }
.state-tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.preview-toolbar .state-tabs { flex: 1; min-width: 0; border: 0; background: none; }
.preview-toolbar .theme-options { flex: none; margin: 6px 12px 6px auto; }
.preview-stage { background: var(--preview-light, var(--preview)); }
[data-component]:is([data-preview-theme="dark"], [data-preview-theme="high-contrast"]) .preview-stage { background: var(--preview-dark, var(--preview)); }
.preview-panel {
  min-height: var(--preview-height, 196px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  position: relative;
}
.preview-panel[aria-busy="true"] img, .preview-panel[data-image-error] img { visibility: hidden; }
.preview-panel[aria-busy="true"]::after { content: attr(data-loading-label); position: absolute; color: var(--muted); font-size: 13px; }
.preview-panel[data-image-error]::after { content: attr(data-error-label); position: absolute; color: var(--muted); font-size: 13px; padding: 16px; }
.preview-panel picture { display: block; max-width: 100%; }
.preview-panel img { display: block; max-width: 100%; height: auto; }
.preview-display { position: relative; min-height: var(--preview-height, 196px); }
/* A running example fits its reported content; taller samples scroll inside Qt. */
[data-live-state="ready"] .preview-display {
  min-height: clamp(var(--preview-min, 196px), var(--live-height, var(--preview-height, 196px)),
    max(var(--preview-min, 196px), min(720px, 80dvh)));
}
.live-stage { position: absolute; inset: 0; background: var(--preview-light, var(--preview)); }
[data-component]:is([data-preview-theme="dark"], [data-preview-theme="high-contrast"]) .live-stage { background: var(--preview-dark, var(--preview)); }
.live-stage iframe { display: block; width: 100%; height: 100%; border: 0; }
[data-live-state="loading"] iframe { visibility: hidden; }
.live-feedback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
}
.live-feedback p { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.live-feedback button {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  transition: opacity 0.15s ease;
}
.live-feedback button:hover { opacity: 0.9; }
[data-live-state="error"] .live-feedback {
  position: static;
  flex-direction: row;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 10px 18px;
  background: var(--surface);
}
:root:is([data-theme="dark"], [data-theme="high-contrast"]) .live-feedback button { color: #0f141a; }

[hidden] { display: none !important; }
html:not(.js) .preview-panel[hidden], html:not(.js) .code-example [role="tabpanel"][hidden] { display: block !important; }
html:not(.js) .tab-list, html:not(.js) .copy-code, html:not(.js) .theme-options { display: none; }

.explanation { color: var(--muted); font-size: 13.5px; margin: 12px 0; max-width: 75ch; }
#usage, #api { margin-top: 56px; }
code, pre { font-family: "Cascadia Code", "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.usage-example { margin-top: 28px; }
.usage-example > p { margin: 0 0 14px; color: var(--muted); font-size: 14px; max-width: 75ch; }
.code-example {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--code);
  box-shadow: var(--subtle-shadow);
}
.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding-right: 6px;
}
.copy-code {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 5px 4px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.copy-code:hover {
  background: var(--canvas);
  border-color: var(--line);
  color: var(--text);
}
pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.75;
  tab-size: 4;
}
::highlight(fluent-kw) { color: var(--syn-kw); }
::highlight(fluent-str) { color: var(--syn-str); }
::highlight(fluent-cmt) { color: var(--syn-cmt); }
::highlight(fluent-num) { color: var(--syn-num); }
::highlight(fluent-typ) { color: var(--syn-typ); }

.document-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 52px;
  padding: 26px 0 44px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.copy-status {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 10px 18px;
  color: var(--canvas);
  background: var(--text);
  border-radius: 999px;
  max-width: calc(100vw - 48px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  font-size: 13px;
  font-weight: 500;
  z-index: 30;
}
.guide-section { margin-top: 36px; }
.guide-section > p { max-width: 72ch; margin: 0 0 20px; color: var(--muted); font-size: 14.5px; line-height: 1.75; }
.reference-links { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 14px 0 0; }
.reference-links a {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.reference-links a:hover {
  border-color: var(--accent);
  background: var(--active);
  color: var(--accent);
}
.api-search {
  display: block;
  position: relative;
  max-width: 420px;
  margin: 0 0 28px;
}
.api-search::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background: var(--muted);
  pointer-events: none;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.api-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px 9px 34px;
  background: var(--surface);
  font-size: 13.5px;
}
.api-search input:focus {
  background: var(--canvas);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--active);
  outline: none;
}
.api-search input::placeholder { color: var(--muted); opacity: 1; }
[data-api-empty] {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 24px;
}
.api-type { margin-top: 32px; }
.api-type > h3 { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; margin: 0 0 8px; }
.api-type > h3 code {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--text);
}
.api-type-description {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 8px 0 18px;
  max-width: 72ch;
}
.api-inheritance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
  margin: 8px 0 20px;
}
.api-inheritance a {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.api-inheritance a:hover {
  border-color: var(--accent);
  background: var(--active);
}
.api-group { margin-top: 24px; }
.api-group h4 {
  font-size: 13.5px;
  margin: 0 0 10px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.api-list {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--canvas);
  overflow: hidden;
  box-shadow: var(--subtle-shadow);
}
.api-member {
  border-top: 1px solid var(--line);
  padding: 13px 18px;
}
.api-member:first-child { border-top: 0; }
.api-member:hover {
  background: color-mix(in srgb, var(--surface) 55%, var(--canvas));
}
.api-member:target {
  background: var(--active);
}
.api-member dt { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; font-weight: 550; }
.api-member dt a { color: var(--text); text-decoration: none; }
.api-member dt a:hover { color: var(--accent); text-decoration: underline; }
.api-member dd { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.api-member dd:empty { display: none; }
.api-member p { margin: 0; max-width: 75ch; }
.api-accessors { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11.5px; margin-top: 8px; }
.api-accessors span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}
.api-accessors code { color: var(--text); font-weight: 550; }
.api-enum-values { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.api-enum-values li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}
.api-enum-values code {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.api-inherited {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin-top: 14px;
  padding: 0;
  overflow: hidden;
}
.api-inherited > summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  overflow-wrap: anywhere;
}
.api-inherited > summary::-webkit-details-marker { display: none; }
.api-inherited > summary:focus-visible { outline-offset: -2px; }
.api-inherited > summary:hover { background: var(--surface-hover); }
.api-inherited > summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  background: var(--muted);
  transition: transform 0.18s ease;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Cpath d='m9 6 6 6-6 6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Cpath d='m9 6 6 6-6 6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.api-inherited[open] { background: var(--canvas); }
.api-inherited[open] > summary {
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.api-inherited[open] > summary::after { transform: rotate(90deg); background: var(--accent); }
.api-inherited .api-group { margin: 16px; }
.document-neighbor {
  display: grid;
  gap: 2px;
  min-width: min(220px, 100%);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--canvas);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--subtle-shadow);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.document-neighbor span { color: var(--muted); font-size: 12px; }
.document-neighbor strong { font-size: 15px; font-weight: 600; }
.document-neighbor strong::before { content: "← "; content: "← " / ""; color: var(--muted); }
.document-neighbor[rel="next"] { margin-left: auto; text-align: right; }
.document-neighbor[rel="next"] strong::before { content: none; }
.document-neighbor[rel="next"] strong::after { content: " →"; content: " →" / ""; color: var(--muted); }
.document-neighbor:hover { border-color: var(--accent); background: var(--active); }
.document-neighbor:hover strong { color: var(--accent); }
@media (max-width: 1199px) {
  .document-main { display: block; }
  .page-outline {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--line);
  }
  .page-outline-menu > summary { padding: 12px 0; }
  .page-navigation { margin-bottom: 12px; max-height: 40vh; overflow-y: auto; }
}
@media (max-width: 1060px) {
  .document-layout { gap: 32px; grid-template-columns: 210px minmax(0, 1fr); }
}
@media (max-width: 960px) {
  :root { --doc-gutter: 20px; }
  .document-layout { display: block; padding: 24px var(--doc-gutter) 0; }
  .sidebar { position: static; margin-bottom: 24px; height: auto; }
  .directory-content { height: auto; }
  .documentation-directory[open], .documentation-directory::details-content { display: block; }
  .documentation-directory {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    padding: 4px 14px;
  }
  .documentation-directory[open] {
    padding-bottom: 14px;
  }
  .documentation-directory > summary {
    display: list-item;
    padding: 8px 0;
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
  }
  .directory-search { display: block; margin-top: 8px; }
  .directory-search::after { display: none; }
  .directory-search input { font-size: 16px; background: var(--canvas); }
  .directory-groups { flex: auto; max-height: 320px; background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
  .document-heading p { font-size: 15px; }
  .appearance { margin-top: 24px; }
  .preview-panel { min-height: var(--preview-height, 196px); padding: 14px; }
  .tab-list { padding: 0 14px; gap: 16px; }
  .copy-code span { display: none; }
  pre { padding: 14px 16px; }
  #usage, #api { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::before, ::after { transition-duration: 0s !important; }
}
@media (forced-colors: active) {
  .preview img { forced-color-adjust: none; }
  .preview-stage { forced-color-adjust: none; }
  .tab-list button[aria-selected="true"] { border-bottom-color: Highlight; }
}
@media (prefers-color-scheme: dark) {
  :root:not(.js) {
    color-scheme: dark;
    --canvas: #0f141a;
    --surface: #171f28;
    --surface-hover: #1e2834;
    --text: #edf2f7;
    --muted: #9aa8b8;
    --line: #263240;
    --line-strong: #344456;
    --accent: #68ccf8;
    --active: #183044;
    --preview: #363636;
    --code: #131921;
    --raised-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--line-strong);
    --glow: rgba(104, 204, 248, 0.08);
  }
  :root:not(.js) .preview-stage { background: var(--preview-dark, var(--preview)); }
}

/* Version history shares the documentation typography and theme tokens. */
.document-heading .document-version-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.release-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, .55fr); align-items: center; gap: 14px 16px; margin: 4px 0 8px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; }
.release-filters[hidden], .release-entry[hidden], .release-empty[hidden], .release-result[hidden] { display: none; }
.release-filters label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.release-filters input[type="search"], .release-filters select { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--canvas); color: var(--text); height: 36px; box-sizing: border-box; padding: 0 10px; font: inherit; font-size: 14px; caret-color: var(--accent); }
.release-filters .release-checkbox { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.release-checkbox input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }
.release-filters button { justify-self: end; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.release-filters button:hover { text-decoration: underline; text-underline-offset: 4px; }
.release-filters input:focus-visible, .release-filters select:focus-visible, .release-filters button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.release-result { grid-column: 1 / -1; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.release-empty { color: var(--muted); }
.release-entry { padding: 32px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.release-entry > p, .release-changes, .migration-note > p { max-width: 72ch; }
.release-entry > p { margin: 12px 0 0; line-height: 1.7; }
.release-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.release-heading h2 { margin: 0; font-size: 22px; font-variant-numeric: tabular-nums; }
.release-heading h2 a { color: var(--text); text-decoration: none; }
.release-heading h2 a:hover { text-decoration: underline; }
.release-heading time, .release-date { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.release-state { color: var(--muted); font-size: 13px; }
.release-entry:not(#unreleased) .release-state { color: var(--accent); font-weight: 600; }
.release-breaking { font-size: 12px; font-weight: 600; color: var(--accent); border: 1px solid currentColor; padding: 0 6px; border-radius: 4px; line-height: 1.6; }
.release-changes { margin: 14px 0 0; padding-left: 20px; }
.release-changes li { margin: 6px 0; line-height: 1.65; }
.release-entry :not(pre) > code, .migration-commit code { font-size: .88em; padding: 1px 4px; border-radius: 4px; background: var(--surface); overflow-wrap: anywhere; }
.release-links { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; }
.migration-note { margin-top: 22px; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); scroll-margin-top: 20px; }
.migration-note h3 { font-size: 16px; margin: 0 0 8px; }
.migration-note h3 a { color: var(--text); text-decoration: none; }
.migration-note h3 a:hover { text-decoration: underline; }
.migration-note > p { margin: 6px 0; line-height: 1.65; }
.migration-note :not(pre) > code { background: var(--canvas); }
.migration-comparison { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 16px; }
.migration-comparison h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.migration-comparison pre { margin: 0; padding: 12px 14px; background: var(--code); border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; font-size: 12.5px; line-height: 1.7; }
.migration-commit { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.migration-commit code { background: var(--canvas); }
@media (max-width: 640px) {
  .release-filters { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .release-filters button { justify-self: start; }
  .release-heading time, .release-date { margin-left: 0; flex-basis: 100%; }
  .migration-note { padding: 16px; }
}
