:root {
  color-scheme: dark light;
  --bg: #050505;
  --bg-elevated: rgba(18, 18, 18, 0.92);
  --fg: #f5f2ea;
  --fg-muted: #a1a1a1;
  --brand-fg: #f8f7f3;
  --border: rgba(255, 255, 255, 0.10);
  --accent: #10a37f;
  --accent-weak: rgba(16, 163, 127, 0.12);
  --link: #10a37f;
  --link-hover: #2dd4bf;
  --callout-bg: rgba(16, 163, 127, 0.08);
  --callout-border: rgba(16, 163, 127, 0.24);
  --footer-border: rgba(255, 255, 255, 0.07);
  --code-bg: #0f172a;
  --code-fg: #f5f2ea;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.48);
  --radius: 14px;
  --radius-lg: 22px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --content-max: 860px;
  --nav-width: 280px;
  --title-size: clamp(1.75rem, 2.2vw, 2.7rem);
  --byline-size: 1.05rem;
  --body-size: 0.86rem;
  --small-size: 0.82rem;
  --nav-item-size: 0.77rem;
  --nav-item-min-height: 28px;
  --nav-item-pad-y: 2px;
  --nav-item-pad-x: 7px;
  --nav-item-radius: 7px;
  --line-height: 1.65;
  --line-height-tight: 1.15;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4ef;
  --bg-elevated: rgba(255, 255, 255, 0.94);
  --fg: #111111;
  --fg-muted: #5d5d5d;
  --brand-fg: #111111;
  --border: rgba(17, 17, 17, 0.10);
  --accent: #10a37f;
  --accent-weak: rgba(16, 163, 127, 0.10);
  --link: #0f9d7a;
  --link-hover: #0a7c60;
  --callout-bg: rgba(16, 163, 127, 0.08);
  --callout-border: rgba(16, 163, 127, 0.20);
  --footer-border: rgba(17, 17, 17, 0.08);
  --code-bg: #e6e0d4;
  --code-fg: #111111;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"][data-use-app-colors="true"] {
  --bg: #f3f5f8;
  --bg-elevated: rgba(255, 255, 255, 0.96);
  --fg: #111111;
  --fg-muted: #5b6470;
  --brand-fg: #111111;
  --border: rgba(17, 24, 39, 0.08);
  --accent: #10a37f;
  --accent-weak: rgba(16, 163, 127, 0.10);
  --link: #0f9d7a;
  --link-hover: #0a7c60;
  --callout-bg: rgba(16, 163, 127, 0.07);
  --callout-border: rgba(16, 163, 127, 0.18);
  --footer-border: rgba(17, 24, 39, 0.08);
  --code-bg: #e8e3d9;
  --code-fg: #111111;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

html[data-app-mode="true"][data-theme="light"] {
  --bg: var(--app-background-light, #f3f5f8);
  --bg-elevated: var(--app-content-light, rgba(255, 255, 255, 0.96));
  --fg: var(--app-text-light, #111111);
  --brand-fg: var(--app-text-light, #111111);
  --fg-muted: rgba(17, 24, 39, 0.62);
  --border: rgba(17, 24, 39, 0.08);
  --accent: var(--app-accent, #10a37f);
  --accent-weak: var(--app-accent-weak, rgba(16, 163, 127, 0.10));
  --link: var(--app-link, #0f9d7a);
  --link-hover: var(--app-link-hover, #0a7c60);
  --callout-bg: rgba(16, 163, 127, 0.07);
  --callout-border: rgba(16, 163, 127, 0.18);
  --footer-border: rgba(17, 24, 39, 0.08);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  --body-size: 0.94rem;
  --small-size: 0.84rem;
  --nav-item-size: 0.87rem;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #030303;
  --bg-elevated: rgba(16, 16, 16, 0.96);
  --fg: #f8f7f3;
  --fg-muted: #9b9b9b;
  --brand-fg: #ffffff;
  --border: rgba(255, 255, 255, 0.12);
  --accent: #10a37f;
  --accent-weak: rgba(16, 163, 127, 0.14);
  --link: #10a37f;
  --link-hover: #34d399;
  --callout-bg: rgba(16, 163, 127, 0.10);
  --callout-border: rgba(16, 163, 127, 0.26);
  --code-bg: #111827;
  --code-fg: #f5f2ea;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.54);
}

html[data-app-mode="true"][data-theme="dark"] {
  --bg: var(--app-background-dark, #030303);
  --bg-elevated: var(--app-content-dark, rgba(16, 16, 16, 0.96));
  --fg: var(--app-text-dark, #f8f7f3);
  --brand-fg: var(--app-text-dark, #ffffff);
  --fg-muted: rgba(255, 255, 255, 0.66);
  --border: rgba(255, 255, 255, 0.12);
  --accent: var(--app-accent, #10a37f);
  --accent-weak: var(--app-accent-weak, rgba(16, 163, 127, 0.14));
  --link: var(--app-link, #10a37f);
  --link-hover: var(--app-link-hover, #34d399);
  --callout-bg: rgba(16, 163, 127, 0.10);
  --callout-border: rgba(16, 163, 127, 0.26);
  --code-bg: #111827;
  --code-fg: #f5f2ea;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.54);
  --body-size: 0.94rem;
  --small-size: 0.84rem;
  --nav-item-size: 0.87rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: var(--body-size);
  line-height: var(--line-height);
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 100;
}

.skip-link:focus {
  top: 16px;
}

.site-shell {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: var(--space-2);
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

html[data-app-mode="true"] .site-shell {
  width: 100%;
  max-width: var(--app-mode-shell-max-width, 1320px);
  padding-top: var(--space-1);
  padding-left: var(--space-1);
  padding-right: var(--space-2);
}

html[data-app-mode="true"] .site-sidebar {
  padding-top: calc(var(--space-2) / 2);
  padding-left: calc(var(--space-2) / 2);
  padding-right: calc(var(--space-2) / 2);
}

.surface-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-header {
  margin: 0;
}

.content-panel {
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.shell-top {
  min-width: 0;
  padding: clamp(2px, 0.6vw, 4px) 0 clamp(4px, 0.8vw, 6px) 0;
  border-bottom: 1px solid var(--footer-border);
}

.shell-top.has-hero {
  border-bottom: 0;
}

.site-sidebar {
  position: sticky;
  top: var(--space-2);
  padding: clamp(6px, 1vw, 8px);
  max-height: calc(100vh - (var(--space-2) * 2));
  width: 100%;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

html[data-theme="light"] .site-sidebar {
  border-right-color: rgba(17, 17, 17, 0.08);
}

.site-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.mobile-nav-toggle {
  display: none;
}

  .nav-backdrop {
    display: none;
  }

  .nav-backdrop[hidden] {
    display: none;
  }

.sidebar-top {
  margin-bottom: var(--space-1);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sidebar-brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.sidebar-search {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sidebar-search-input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--fg);
  font: inherit;
}

.sidebar-search-input::placeholder {
  color: var(--fg-muted);
}

.sidebar-search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sidebar-search-status {
  font-size: 0.72rem;
  color: var(--fg-muted);
  margin-left: 2px;
}

.sidebar-search-results {
  display: block;
  max-height: 34vh;
  overflow: auto;
}

.sidebar-search-results[hidden] {
  display: none;
}

.sidebar-search-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-result {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--fg);
  background: var(--bg-elevated);
}

.search-result:hover {
  background: var(--accent-weak);
}

.search-result-title {
  font-weight: 700;
  line-height: var(--line-height-tight);
}

.search-result-snippet {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--fg-muted);
  line-height: 1.45;
}

.product {
  font-size: 0.75rem;
  color: var(--brand-fg);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  min-width: 0;
}

.product-version {
  color: var(--fg-muted);
  font-weight: 600;
  text-transform: none;
  white-space: nowrap;
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.theme-toggle:hover {
  background: var(--accent-weak);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html[data-app-mode="true"] .theme-toggle,
html[data-app-mode="true"] .sidebar-brandrow {
  display: none;
}

.theme-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-sun {
  display: none;
}

html[data-theme="light"] .theme-icon-sun {
  display: block;
}

html[data-theme="light"] .theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-icon-moon {
  display: block;
}

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

.page-title {
  margin: 0;
  font-size: clamp(1.5rem, 1.8vw, 2.3rem);
  line-height: var(--line-height-tight);
  letter-spacing: -0.03em;
}

.byline {
  margin: var(--space-2) 0 0 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
  max-width: 68ch;
}

.breadcrumbs {
  margin-top: var(--space-2);
  color: var(--fg-muted);
  font-size: 0.78rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  margin: 0;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.breadcrumbs li + li::before {
  content: "/";
  margin: 0 var(--space-2);
  color: var(--fg-muted);
}

.breadcrumbs a,
.breadcrumbs span {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
  color: var(--fg);
  font-weight: 600;
}

.hero-shell {
  min-width: 0;
  margin-top: var(--space-3);
}

.hero {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.hero-doodle {
  max-height: 240px;
  object-fit: contain;
}

html[data-app-mode="true"] .hero-doodle {
  max-height: 180px;
}

.page-nav {
  padding: 0;
  font-size: var(--nav-item-size);
}

.page-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-nav > ul > li + li {
  margin-top: var(--space-1);
}

.page-nav li ul {
  margin-top: 2px;
  margin-left: var(--space-2);
  padding-left: var(--space-2);
  border-left: 1px solid var(--border);
}

.page-nav details {
  margin: 0;
}

.page-nav summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  min-height: var(--nav-item-min-height);
  padding: var(--nav-item-pad-y) var(--nav-item-pad-x);
  border-radius: var(--nav-item-radius);
  background: transparent;
  border: 1px solid transparent;
  color: var(--fg);
  user-select: none;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.page-nav summary::-webkit-details-marker {
  display: none;
}

.page-nav summary::marker {
  content: "";
}

.page-nav summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.7;
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 120ms ease, opacity 120ms ease;
  flex: 0 0 auto;
}

.page-nav details[open] > summary::after {
  opacity: 0.95;
  transform: rotate(45deg);
}

.page-nav summary:hover {
  background: var(--accent-weak);
}

.page-nav summary a,
.page-nav summary span {
  color: inherit;
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-height: auto;
  padding: 0;
  border-radius: 0;
  text-decoration: none;
}

.page-nav a,
.page-nav span {
  display: inline-flex;
  align-items: center;
  min-height: var(--nav-item-min-height);
  padding: var(--nav-item-pad-y) var(--nav-item-pad-x);
  border-radius: var(--nav-item-radius);
  color: var(--fg);
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.page-nav a:hover {
  background: var(--accent-weak);
}

.page-nav details[open] > summary {
  color: var(--fg);
}

.page-nav summary.nav-current,
.page-nav a[aria-current="page"],
.page-nav summary a[aria-current="page"],
.page-nav .nav-branch > details[open] > summary > a[aria-current="page"] {
  color: var(--app-nav-current-fg, var(--app-link-contrast, #ffffff));
  -webkit-text-fill-color: var(--app-nav-current-fg, var(--app-link-contrast, #ffffff));
  background: var(--app-nav-current-bg, var(--accent));
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(16, 163, 127, 0.25);
}

.page-nav .nav-branch > span {
  color: var(--fg-muted);
  font-weight: 600;
  padding-left: 0;
}

.page-nav .nav-branch > details > summary > a,
.page-nav .nav-branch > details > summary > span {
  color: var(--fg-muted);
  font-weight: 650;
}

.page-nav .nav-branch > details[open] > summary > a,
.page-nav .nav-branch > details[open] > summary > span {
  color: var(--fg);
}

.page-nav .nav-branch > details[open] > summary.nav-current > a[aria-current="page"] {
  color: inherit;
  -webkit-text-fill-color: inherit;
  background: transparent;
  box-shadow: none;
}

.page-nav .nav-branch > details > ul {
  margin-top: 2px;
}

.page-body {
  min-width: 0;
  padding: clamp(8px, 1.1vw, 12px);
}

.site-footer {
  margin-top: var(--space-1);
  padding: var(--space-2) 2px 0;
  border-top: 1px solid var(--footer-border);
  color: var(--fg-muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.site-footer-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.site-footer-build,
.site-footer-copyright {
  font-weight: 600;
}

.site-footer-build {
  text-align: left;
}

.site-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.site-main .site-header {
  margin-bottom: 0;
}

.site-header.has-hero + .page-body {
  margin-top: calc(var(--space-4) * -0.5);
}

body:not(.home-page) .site-header:not(.has-hero) + .page-body {
  padding-top: 0;
}

body:not(.home-page) .site-header:not(.has-hero) + .page-body > :first-child {
  margin-top: 0.2rem;
}

html[data-app-mode="true"] body.home-page .site-header {
  display: none;
}

body.home-page .page-body {
  padding-top: 0;
}

body.home-page .home-panel > h2 {
  margin-top: 0;
}

html[data-app-mode="true"] body.home-page .page-body {
  padding-top: var(--space-3);
}

.home-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  margin-bottom: var(--space-5);
  padding: clamp(16px, 2.5vw, 28px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.home-hero-copy {
  min-width: 0;
}

.home-kicker {
  margin: 0 0 0.45rem 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.home-hero-copy h2 {
  margin: 0 0 0.8rem 0;
  max-width: 16ch;
  font-size: clamp(1.55rem, 2.7vw, 2.45rem);
  line-height: 1.06;
}

.home-hero-copy p:not(.home-kicker) {
  max-width: 44rem;
  color: var(--fg-muted);
  font-size: 0.98rem;
}

.home-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.home-primary-link,
.home-secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
}

.home-primary-link {
  border-color: rgba(16, 163, 127, 0.42);
  background: var(--accent);
  color: #001f19;
}

.home-secondary-link {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .home-secondary-link {
  background: rgba(17, 17, 17, 0.04);
}

.home-primary-link:hover,
.home-secondary-link:hover,
.home-topic-link:hover {
  border-color: var(--accent);
  color: var(--link-hover);
}

.home-primary-link:hover {
  color: #001f19;
}

.home-quickstart-link {
  border-color: #f0d68a;
  background: linear-gradient(180deg, #e2c36f 0%, #c99a35 100%);
  color: #171106;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.home-quickstart-link:hover {
  border-color: #f5dd96;
  background: linear-gradient(180deg, #eccf7e 0%, #d2a13d 100%);
  color: #171106;
}

.home-hero-figure {
  margin: 0;
  min-width: 0;
}

.home-hero-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.home-support-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.home-section-heading h2 {
  margin: 0 0 0.45rem 0;
}

.home-section-heading p {
  margin-bottom: 0;
  color: var(--fg-muted);
}

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-3);
}

.home-card {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
}

.home-card h3 {
  margin: 0 0 0.55rem 0;
  font-size: 1rem;
}

.home-card p {
  margin: 0 0 var(--space-3) 0;
  color: var(--fg-muted);
  font-size: 0.84rem;
}

.home-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.home-topic-link,
.home-link {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.28rem 0.52rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--link);
  background: rgba(16, 163, 127, 0.08);
  font-size: 0.79rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.page-body h2 {
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  line-height: var(--line-height-tight);
  margin: 2.2rem 0 0.9rem;
  letter-spacing: -0.02em;
}

.page-body h3 {
  font-size: 1.05rem;
  line-height: var(--line-height-tight);
  margin: 1.75rem 0 0.7rem;
}

.page-body h4 {
  font-size: 0.96rem;
  line-height: var(--line-height-tight);
  margin: 1.35rem 0 0.55rem;
  letter-spacing: -0.01em;
}

.page-body hr {
  max-width: var(--content-max);
  margin: 2rem 0 1.75rem;
  border: 0;
  border-top: 1px solid var(--border);
}

.help-anchor {
  display: block;
  height: 0;
  scroll-margin-top: 7rem;
}

.page-body p,
.page-body li {
  line-height: var(--line-height);
}

.page-body code {
  padding: 0.15em 0.35em;
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--code-fg);
  font-size: 0.96em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-body pre {
  width: 100%;
  max-width: 100%;
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-fg);
  overflow: auto;
}

.page-body pre code {
  display: block;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 0.92em;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-body p {
  margin: 0 0 1rem;
  max-width: var(--content-max);
}

.page-body ul,
.page-body ol {
  padding-left: 1.35rem;
  max-width: var(--content-max);
}

.page-body li + li {
  margin-top: 0.35rem;
}

.page-body img {
  max-width: 100%;
}

.inline-media {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  margin: 0 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.theme-media {
  display: block;
  max-width: 100%;
}

.theme-media .inline-media {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  margin: 0;
}

html[data-theme="light"] .theme-media-dark {
  display: none;
}

html[data-theme="dark"] .theme-media-light {
  display: none;
}

.help-mdl2-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  margin: 0 0.25rem 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--fg);
  font-family: "Segoe MDL2 Assets";
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
}

html.has-mdl2-icons .help-mdl2-icon {
  display: inline-flex;
}

.help-navitem {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  margin: 0 0.15rem;
  padding: 0.15rem 0.55rem 0.15rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: var(--bg-elevated);
  color: var(--fg);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.help-navitem-icon {
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "Segoe MDL2 Assets";
  font-size: 0.95rem;
  line-height: 1;
}

html.has-mdl2-icons .help-navitem-icon {
  display: inline-flex;
}

.help-accentbutton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.85rem;
  margin: 0 0.15rem;
  padding: 0.18rem 0.7rem;
  border: 1px solid var(--app-nav-current-bg, var(--accent));
  border-radius: 0.45rem;
  background: var(--app-nav-current-bg, var(--accent));
  color: var(--app-link-contrast, #111111);
  -webkit-text-fill-color: var(--app-link-contrast, #111111);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18), 0 1px 0 rgba(255, 255, 255, 0.24) inset;
}

@media print {
  .help-mdl2-icon,
  .help-navitem-icon {
    display: none !important;
  }
}

.expand {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--callout-border);
  border-radius: var(--radius);
  background: var(--callout-bg);
}

.expand summary {
  cursor: pointer;
  font-weight: 600;
}

.expand-body {
  margin-top: 0.85rem;
  color: var(--fg);
}

.expanded {
  display: block;
}

@media (max-width: 980px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .home-hero-card {
    grid-template-columns: 1fr;
  }

  .home-hero-copy h2 {
    max-width: 100%;
  }

  .home-card-grid {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    position: fixed;
    top: var(--space-3);
    left: var(--space-3);
    width: min(88vw, 320px);
    max-height: calc(100vh - (var(--space-3) * 2));
    transform: translateX(calc(-100% - var(--space-5)));
    transition: transform 0.2s ease;
    z-index: 120;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0;
    box-shadow: var(--shadow);
    backdrop-filter: none;
  }

  body.nav-open .site-sidebar {
    transform: translateX(0);
  }

  .mobile-nav-toggle {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--fg);
    border-radius: 999px;
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: var(--space-3);
    right: var(--space-3);
    z-index: 140;
    box-shadow: var(--shadow);
    cursor: pointer;
  }

  .mobile-nav-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 110;
  }

  .nav-backdrop:not([hidden]) {
    display: block;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .site-main {
    order: 2;
  }

  .site-sidebar {
    order: 1;
  }

  .sidebar-top {
    margin-bottom: var(--space-3);
    flex: 0 0 auto;
  }

  .sidebar-search {
    position: sticky;
    top: 0;
    padding-top: 2px;
    background: var(--bg-elevated);
    z-index: 1;
  }

  .page-nav {
    flex: 1 1 auto;
    overflow: auto;
    padding-top: 0;
  }
}

@media (max-width: 720px) {
  .site-shell {
    padding: var(--space-1);
  }

  .shell-top,
  .page-nav,
  .page-body {
    padding: var(--space-2);
  }

  .site-sidebar {
    width: calc(100vw - (var(--space-1) * 2));
  }

  .sidebar-search-results {
    max-height: 28vh;
  }

  .page-nav a,
  .page-nav span {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
  }

  .page-nav li ul {
    margin-left: var(--space-2);
    padding-left: var(--space-2);
  }
}

/* HelpTranslator structural locale direction support */
html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] code,
html[dir="rtl"] kbd,
html[dir="rtl"] samp {
  direction: ltr;
  unicode-bidi: isolate;
}

html[dir="rtl"] pre {
  direction: rtl;
  text-align: right;
  unicode-bidi: isolate;
}

html[dir="rtl"] pre code {
  direction: ltr;
  text-align: inherit;
  unicode-bidi: isolate;
}
