/* RTS Terrain Studio manual - offline single page documentation.
   No external requests: system fonts only, all icons are inline SVG. */

/* ------------------------------------------------------------------ tokens */
:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --topbar-h: 56px;
  --sidebar-w: 300px;
  --content-w: 880px;
  --radius: 10px;
  --radius-sm: 6px;

  --bg: #f7f8fa;
  --bg-elev: #ffffff;
  --bg-sunken: #eef1f5;
  --bg-hover: #e8edf3;
  --text: #1c2430;
  --text-soft: #4a5566;
  --text-faint: #6b7686;
  --border: #dde3ea;
  --border-strong: #c7d0db;

  --accent: #2f6f4f;
  --accent-strong: #245a40;
  --accent-soft: #e3f1e9;
  --accent-text: #ffffff;
  --link: #22684a;

  --code-bg: #f3f5f8;
  --code-text: #1f2a37;
  --inline-code-bg: #eef1f5;
  --pre-bg: #1e2430;
  --pre-text: #e3e8ef;
  --pre-border: #2b3342;

  --tok-keyword: #c792ea;
  --tok-type: #7fd1c7;
  --tok-string: #c3e88d;
  --tok-comment: #7d8899;
  --tok-number: #f78c6c;
  --tok-fn: #82aaff;
  --tok-preproc: #ffcb6b;

  --note-bg: #eaf2fd;  --note-border: #3d7fd9;  --note-title: #245ea8;
  --tip-bg: #e8f6ee;   --tip-border: #2f9a5f;   --tip-title: #1f7246;
  --warn-bg: #fdf3e2;  --warn-border: #d98a1c;  --warn-title: #9a5b06;

  --mark-bg: #ffe58a;
  --mark-text: #1c2430;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .18);

  --hero-a: #1f4d39;
  --hero-b: #2f6f4f;
  --hero-c: #5c8f3d;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161d;
    --bg-elev: #191e27;
    --bg-sunken: #0e1117;
    --bg-hover: #222936;
    --text: #e2e7ee;
    --text-soft: #b5bfcc;
    --text-faint: #8b96a6;
    --border: #2a313d;
    --border-strong: #39424f;
    --accent: #5cc08b;
    --accent-strong: #79d3a2;
    --accent-soft: #1d3329;
    --accent-text: #0d1a13;
    --link: #74cf9d;
    --code-bg: #1d232d;
    --code-text: #dfe5ec;
    --inline-code-bg: #232a35;
    --pre-bg: #0f1319;
    --pre-border: #262d39;
    --note-bg: #16243a;  --note-border: #4d8ee6;  --note-title: #8ab8f5;
    --tip-bg: #14291e;   --tip-border: #3fae6f;   --tip-title: #7fd4a2;
    --warn-bg: #2d2313;  --warn-border: #d9952e;  --warn-title: #f1bd6a;
    --mark-bg: #8a6d12;
    --mark-text: #fff6d6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .55);
    --hero-a: #10281d;
    --hero-b: #1b4532;
    --hero-c: #36592a;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #12161d;
  --bg-elev: #191e27;
  --bg-sunken: #0e1117;
  --bg-hover: #222936;
  --text: #e2e7ee;
  --text-soft: #b5bfcc;
  --text-faint: #8b96a6;
  --border: #2a313d;
  --border-strong: #39424f;
  --accent: #5cc08b;
  --accent-strong: #79d3a2;
  --accent-soft: #1d3329;
  --accent-text: #0d1a13;
  --link: #74cf9d;
  --code-bg: #1d232d;
  --code-text: #dfe5ec;
  --inline-code-bg: #232a35;
  --pre-bg: #0f1319;
  --pre-border: #262d39;
  --note-bg: #16243a;  --note-border: #4d8ee6;  --note-title: #8ab8f5;
  --tip-bg: #14291e;   --tip-border: #3fae6f;   --tip-title: #7fd4a2;
  --warn-bg: #2d2313;  --warn-border: #d9952e;  --warn-title: #f1bd6a;
  --mark-bg: #8a6d12;
  --mark-text: #fff6d6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .55);
  --hero-a: #10281d;
  --hero-b: #1b4532;
  --hero-c: #36592a;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font-sans);
  overflow-x: hidden;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--accent-text); padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--topbar-h); z-index: 40;
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: -.01em;
}
.brand:hover { color: var(--text); }
.brand-logo { width: 30px; height: 30px; flex: none; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.version {
  flex: none; font: 600 12px/1 var(--font-mono); padding: 4px 7px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-strong); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.topbar-spacer { flex: 1; }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); color: var(--text-soft);
  cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ------------------------------------------------------------------ search */
.search { position: relative; width: min(420px, 42vw); }
.search-input {
  width: 100%; height: 38px; padding: 0 64px 0 36px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-sunken); color: var(--text); font: inherit; font-size: 14px;
}
.search-input::placeholder { color: var(--text-faint); }
.search-input:focus { outline: none; border-color: var(--accent); background: var(--bg-elev); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--text-faint); pointer-events: none; }
.search-hint {
  position: absolute; right: 8px; top: 8px; font: 11px/20px var(--font-mono); color: var(--text-faint);
  border: 1px solid var(--border); border-radius: 4px; padding: 0 6px; pointer-events: none; background: var(--bg-elev);
}
.search-input:focus + .search-hint { display: none; }

.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 6px; list-style: none;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 340px;
}
.search-results li { margin: 0; }
.search-result {
  display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; cursor: pointer;
}
.search-result:hover, .search-result[aria-selected="true"] { background: var(--accent-soft); color: var(--text); }
.search-result .sr-path { display: block; font-size: 11.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.search-result .sr-title { display: block; font-weight: 600; font-size: 14.5px; }
.search-result .sr-snippet { display: block; font-size: 13px; color: var(--text-soft); line-height: 1.45; margin-top: 2px; }
.search-empty { padding: 14px 10px; color: var(--text-faint); font-size: 14px; }
.search-results mark, mark.search-hit {
  background: var(--mark-bg); color: var(--mark-text); border-radius: 2px; padding: 0 1px;
}

/* ------------------------------------------------------------------ sidebar */
.sidebar {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--sidebar-w); z-index: 30;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 12px 40px;
  background: var(--bg-elev); border-right: 1px solid var(--border);
  scrollbar-width: thin;
}
.nav-title {
  margin: 0 10px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint);
}
.nav, .nav ul { list-style: none; margin: 0; padding: 0; }
.nav-group { margin: 1px 0; }
.nav-group-head { display: flex; align-items: stretch; border-radius: var(--radius-sm); }
.nav-group-head:hover { background: var(--bg-hover); }
.nav-chapter {
  flex: 1; display: block; padding: 7px 4px 7px 10px; color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 14.5px; line-height: 1.35;
}
.nav-chapter:hover { color: var(--text); }
.nav-toggle {
  flex: none; width: 32px; border: 0; background: transparent; color: var(--text-faint); cursor: pointer; border-radius: var(--radius-sm);
  display: grid; place-items: center;
}
.nav-toggle:hover { color: var(--text); }
.nav-toggle svg { width: 14px; height: 14px; transition: transform .18s ease; }
.nav-group.open > .nav-group-head .nav-toggle svg { transform: rotate(90deg); }
.nav-items { display: none; padding: 2px 0 8px 10px !important; margin-left: 10px !important; border-left: 1px solid var(--border); }
.nav-group.open > .nav-items { display: block; }
.nav-item {
  display: block; padding: 4.5px 10px; margin: 1px 0; border-radius: var(--radius-sm);
  color: var(--text-soft); text-decoration: none; font-size: 13.8px; line-height: 1.4;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav-group.active > .nav-group-head .nav-chapter { color: var(--accent-strong); }
.nav-chapter code, .nav-item code { font-size: .9em; background: none; padding: 0; }

.sidebar-footer { margin: 24px 10px 0; font-size: 12.5px; color: var(--text-faint); }

.backdrop {
  display: none; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 25; background: rgba(8, 12, 18, .45);
}

/* ------------------------------------------------------------------ content */
.content {
  margin-left: var(--sidebar-w);
  padding: calc(var(--topbar-h) + 28px) 40px 80px;
  min-width: 0;
}
.content-inner { max-width: var(--content-w); margin: 0 auto; }

section.chapter {
  padding-bottom: 32px; margin-bottom: 40px; border-bottom: 1px solid var(--border);
}
section.chapter:last-of-type { border-bottom: 0; }
section { scroll-margin-top: calc(var(--topbar-h) + 16px); }

h1, h2, h3, h4, h5 { line-height: 1.25; letter-spacing: -.015em; color: var(--text); scroll-margin-top: calc(var(--topbar-h) + 16px); position: relative; }
h2 { font-size: 2rem; margin: 8px 0 18px; padding-top: 8px; font-weight: 750; }
h3 { font-size: 1.45rem; margin: 44px 0 12px; font-weight: 700; padding-top: 12px; border-top: 1px dashed var(--border); }
h4 { font-size: 1.12rem; margin: 30px 0 8px; font-weight: 650; }
h5 { font-size: 1rem; margin: 22px 0 6px; }
h2 code, h3 code, h4 code { font-size: .88em; }

.anchor {
  margin-left: .35em; padding: 0 .2em; color: var(--text-faint); text-decoration: none; font-weight: 500;
  opacity: 0; transition: opacity .12s ease;
}
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, .anchor:focus { opacity: 1; }
.anchor:hover { color: var(--accent); }

p, ul, ol, dl { margin: 0 0 14px; }
ul, ol { padding-left: 1.5em; }
li { margin: 4px 0; }
li > p { margin: 4px 0; }
strong { font-weight: 650; }

code {
  font-family: var(--font-mono); font-size: .875em;
  background: var(--inline-code-bg); color: var(--code-text); padding: .12em .38em; border-radius: 4px;
  overflow-wrap: break-word;
}

kbd {
  display: inline-block; min-width: 1.6em; padding: .05em .45em; text-align: center;
  font: 600 .8em/1.6 var(--font-mono); color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px;
  white-space: nowrap; vertical-align: .08em;
}

.menu {
  display: inline; padding: .1em .45em; border-radius: 5px; font-weight: 600; font-size: .94em;
  background: var(--accent-soft); color: var(--accent-strong);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* steps */
ol.steps { list-style: none; counter-reset: step; padding-left: 0; margin: 12px 0 18px; }
ol.steps > li {
  counter-increment: step; position: relative; padding: 2px 0 10px 44px; margin: 0;
}
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text); font: 700 13px/1 var(--font-sans);
}
ol.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 2px; width: 1px; background: var(--border-strong);
}

/* callouts */
.note, .tip, .warning {
  position: relative; margin: 18px 0; padding: 12px 16px 12px 46px;
  border-radius: var(--radius-sm); border-left: 4px solid; font-size: .96em;
}
.note > :last-child, .tip > :last-child, .warning > :last-child { margin-bottom: 0; }
.note > :first-child, .tip > :first-child, .warning > :first-child { margin-top: 0; }
.note::before, .tip::before, .warning::before {
  position: absolute; left: 13px; top: 12px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font: 800 13px/1 var(--font-sans); color: #fff;
}
.note { background: var(--note-bg); border-color: var(--note-border); }
.note::before { content: "i"; background: var(--note-border); font-family: Georgia, serif; font-style: italic; }
.tip { background: var(--tip-bg); border-color: var(--tip-border); }
.tip::before { content: "\2713"; background: var(--tip-border); }
.warning { background: var(--warn-bg); border-color: var(--warn-border); }
.warning::before { content: "!"; background: var(--warn-border); }

/* tables */
.table-wrap { margin: 14px 0 20px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); }
table.ref { width: 100%; border-collapse: collapse; font-size: 14.2px; line-height: 1.5; }
.table-wrap > table.ref { margin: 0; }
table.ref:not(.table-wrap > table) { margin: 14px 0 20px; border: 1px solid var(--border); }
table.ref th, table.ref td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
table.ref thead th {
  background: var(--bg-sunken); font-weight: 650; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft);
  white-space: nowrap;
}
table.ref tbody tr:last-child td { border-bottom: 0; }
table.ref tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
table.ref td:first-child { font-weight: 550; }
table.ref td[colspan] { background: var(--bg-sunken); }
table.ref code { font-size: .86em; }

/* code blocks */
.code-block { position: relative; margin: 14px 0 20px; }
pre {
  margin: 14px 0 20px; padding: 16px 18px; overflow-x: auto;
  background: var(--pre-bg); color: var(--pre-text); border: 1px solid var(--pre-border); border-radius: var(--radius);
  font: 13.4px/1.6 var(--font-mono); tab-size: 4;
  scrollbar-width: thin;
}
.code-block > pre { margin: 0; padding-top: 34px; }
pre code { background: none; color: inherit; padding: 0; font-size: inherit; border-radius: 0; overflow-wrap: normal; white-space: pre; }
.code-lang {
  position: absolute; top: 8px; left: 14px; font: 600 11px/1 var(--font-sans); letter-spacing: .06em; text-transform: uppercase;
  color: #8b96a6; pointer-events: none;
}
.copy-btn {
  position: absolute; top: 6px; right: 6px; height: 26px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/1 var(--font-sans); color: #c5cdd8; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 5px; cursor: pointer;
}
.copy-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.copy-btn.copied { color: #9be3b7; border-color: rgba(155, 227, 183, .5); }
.copy-btn svg { width: 13px; height: 13px; }

.tok-k { color: var(--tok-keyword); }
.tok-t { color: var(--tok-type); }
.tok-s { color: var(--tok-string); }
.tok-c { color: var(--tok-comment); font-style: italic; }
.tok-n { color: var(--tok-number); }
.tok-f { color: var(--tok-fn); }
.tok-p { color: var(--tok-preproc); }

/* figures */
figure { margin: 20px 0 24px; }
figure img {
  display: block; margin: 0 auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow);
  background: var(--bg-sunken);
}
figcaption { margin-top: 8px; text-align: center; font-size: 13.5px; color: var(--text-faint); }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; overflow: hidden; margin: 0 0 36px; padding: 44px 40px 40px;
  border-radius: 16px; color: #f2f7f3;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .12) 0%, transparent 45%),
    linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 100%);
  box-shadow: var(--shadow);
}
.hero-art { position: absolute; right: -20px; bottom: -6px; width: 56%; max-width: 460px; opacity: .9; pointer-events: none; }
.hero-content { position: relative; max-width: 560px; }
.hero-eyebrow {
  display: inline-block; margin-bottom: 14px; padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em; background: rgba(255, 255, 255, .14); color: #eaf5ee;
}
.hero h1 { margin: 0 0 10px; font-size: clamp(2rem, 4.6vw, 2.9rem); line-height: 1.08; letter-spacing: -.03em; color: #fff; font-weight: 800; }
.hero-tagline { margin: 0 0 24px; font-size: 1.08rem; line-height: 1.55; color: #d9eadf; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 8px;
  font-weight: 600; font-size: 14.5px; text-decoration: none; color: #fff;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
  transition: background .15s ease, transform .15s ease;
}
.hero-btn:hover { background: rgba(255, 255, 255, .22); color: #fff; transform: translateY(-1px); }
.hero-btn.primary { background: #fff; color: #1f4d39; border-color: #fff; }
.hero-btn.primary:hover { background: #eaf5ee; color: #1f4d39; }
.hero-btn svg { width: 16px; height: 16px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font-size: 13px; color: #c9ddd0; }
.hero-meta span::before { content: "\2022"; margin-right: 8px; color: rgba(255, 255, 255, .5); }
.hero-meta span:first-child::before { content: none; }

/* ------------------------------------------------------------------ misc */
.target-flash { animation: flash 1.6s ease; }
@keyframes flash {
  0%, 30% { background: color-mix(in srgb, var(--mark-bg) 35%, transparent); }
  100% { background: transparent; }
}

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 35;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text-soft); box-shadow: var(--shadow); cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--accent); }
.to-top svg { width: 18px; height: 18px; }

.page-footer { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-faint); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  :root { --sidebar-w: 270px; }
  .content { padding-left: 28px; padding-right: 28px; }
}

@media (max-width: 900px) {
  .menu-btn { display: inline-grid; }
  .sidebar {
    width: min(86vw, 320px); transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; }
  .content { margin-left: 0; padding: calc(var(--topbar-h) + 20px) 16px 64px; }
  .search { width: auto; flex: 1; min-width: 0; }
  .search-hint { display: none; }
  .search-results { position: fixed; top: calc(var(--topbar-h) + 4px); left: 8px; right: 8px; min-width: 0; }
  .topbar-spacer { display: none; }
  .brand-name { display: none; }
  .hero { padding: 30px 22px 28px; border-radius: 12px; }
  .hero-art { width: 80%; opacity: .35; }
  h2 { font-size: 1.7rem; }
  h3 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .version { display: none; }
  .hero-btn { flex: 1 1 calc(50% - 10px); justify-content: center; }
  ol.steps > li { padding-left: 38px; }
  .note, .tip, .warning { padding-left: 40px; }
}

/* ------------------------------------------------------------------ print */
@media print {
  /* html:root:not(...) outranks the dark theme selectors, so print is always light. */
  html:root:not([data-print-dark]) {
    --bg: #fff; --bg-elev: #fff; --bg-sunken: #f2f2f2; --bg-hover: #f2f2f2;
    --text: #000; --text-soft: #222; --text-faint: #444; --border: #bbb; --border-strong: #999;
    --accent: #2f6f4f; --accent-strong: #245a40; --accent-soft: #e3f1e9; --accent-text: #fff; --link: #000;
    --code-bg: #f3f3f3; --code-text: #111; --inline-code-bg: #eee;
    --note-bg: #fff; --note-border: #3d7fd9; --note-title: #245ea8;
    --tip-bg: #fff; --tip-border: #2f9a5f; --tip-title: #1f7246;
    --warn-bg: #fff; --warn-border: #d98a1c; --warn-title: #9a5b06;
    --mark-bg: transparent; --mark-text: inherit;
    --pre-bg: #f6f6f6; --pre-text: #111; --pre-border: #ccc;
    --tok-keyword: #6f2da8; --tok-type: #00676b; --tok-string: #2d6a00; --tok-comment: #666; --tok-number: #a63c00; --tok-fn: #1a4fa0; --tok-preproc: #8a5a00;
    color-scheme: light;
  }
  html { scroll-behavior: auto; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, .sidebar, .backdrop, .to-top, .copy-btn, .anchor, .skip-link, .search-results, .hero-art { display: none !important; }
  .content { margin: 0; padding: 0; }
  .content-inner { max-width: none; }
  .hero { background: none; color: #000; box-shadow: none; border: 1px solid #bbb; padding: 18px; }
  .hero h1, .hero-tagline, .hero-eyebrow, .hero-meta { color: #000; background: none; }
  .hero-links { display: none; }
  section.chapter { break-before: page; border: 0; }
  section.chapter:first-of-type { break-before: auto; }
  h2, h3, h4 { break-after: avoid; }
  pre, table, figure, .note, .tip, .warning { break-inside: avoid; }
  pre { white-space: pre-wrap; border: 1px solid #ccc; }
  pre code { white-space: pre-wrap; }
  .table-wrap { overflow: visible; border: 0; }
  a { color: #000; text-decoration: none; }
  .menu { background: none; color: #000; border: 1px solid #999; }
  .note, .tip, .warning { background: none !important; }
  figure.screenshot img { box-shadow: none; }
}

/* Portrait screenshots (editor window) keep their natural width. */
figure.screenshot.portrait img { max-width: 430px; width: 100%; margin: 0 auto; display: block; }
