/* FrostEngine Developer Guide - the site's styles (inlined by Scripts/Guide/BuildGuideSite.py; a file of its own on the website).
   Layout: an app shell - the course map on the left, one reading column (about 70 characters), and on wide screens a
   quest-log rail on the right with the page's objectives (its checkpoints) and sections. */
:root {
	--bg: #f2f6f8;
	--surface: #ffffff;
	--surface-2: #e6edf1;
	--ink: #14212b;
	--ink-2: #4b5d6a;
	--ink-3: #6f818e;
	--line: #d2dce3;
	--accent: #1c6b87;
	--accent-strong: #134f65;
	--accent-soft: #dcecf2;
	--accent-ink: #ffffff;
	--gold: #9a6206;
	--gold-soft: #f8edd6;
	--gold-line: #e2c27e;
	--ok: #24704a;
	--ok-soft: #dff1e6;
	--bad: #aa2a20;
	--bad-soft: #f9e4e1;
	--lock: #8a98a3;
	--code-bg: #0f1d27;
	--code-ink: #d7e4ec;
	--code-line: #213440;
	--tok-comment: #7f97a6;
	--tok-string: #9ed39a;
	--tok-number: #f2b56b;
	--tok-keyword: #c8a2f0;
	--tok-command: #6fd0ee;
	--tok-option: #f5d36c;
	--tok-key: #8ec5ff;
	--tok-literal: #f59b8c;
	--shadow: 0 1px 2px rgba(18, 38, 51, 0.06), 0 6px 18px rgba(18, 38, 51, 0.06);
	--font-display: "Chakra Petch", "Bahnschrift", "Segoe UI", system-ui, sans-serif;
	--font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--font-mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, Consolas, "Liberation Mono", monospace;
	--radius: 10px;
	--sidebar: 296px;
	--rail: 248px;
	--topbar: 56px;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0c1319;
		--surface: #111b23;
		--surface-2: #172530;
		--ink: #dce7ee;
		--ink-2: #a2b4c2;
		--ink-3: #7d909e;
		--line: #23343f;
		--accent: #63bddb;
		--accent-strong: #8fd2e8;
		--accent-soft: #15303b;
		--accent-ink: #061218;
		--gold: #e3ac43;
		--gold-soft: #2a2010;
		--gold-line: #6b5223;
		--ok: #63c98f;
		--ok-soft: #10281b;
		--bad: #f08479;
		--bad-soft: #2d1614;
		--lock: #6d7d89;
		--code-bg: #081118;
		--code-ink: #d7e4ec;
		--code-line: #1b2c37;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0c1319;
	--surface: #111b23;
	--surface-2: #172530;
	--ink: #dce7ee;
	--ink-2: #a2b4c2;
	--ink-3: #7d909e;
	--line: #23343f;
	--accent: #63bddb;
	--accent-strong: #8fd2e8;
	--accent-soft: #15303b;
	--accent-ink: #061218;
	--gold: #e3ac43;
	--gold-soft: #2a2010;
	--gold-line: #6b5223;
	--ok: #63c98f;
	--ok-soft: #10281b;
	--bad: #f08479;
	--bad-soft: #2d1614;
	--lock: #6d7d89;
	--code-bg: #081118;
	--code-ink: #d7e4ec;
	--code-line: #1b2c37;
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar) + 16px); }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; }
code, kbd, pre { font-family: var(--font-mono); }

/* ---- Top bar ---------------------------------------------------------------------------------------------------- */
.topbar {
	position: sticky;
	top: env(safe-area-inset-top, 0px);
	z-index: 30;
	height: var(--topbar);
	display: flex;
	align-items: center;
	gap: 12px;
	padding-left: max(16px, env(safe-area-inset-left, 0px));
	padding-right: max(16px, env(safe-area-inset-right, 0px));
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}
.brand {
	display: flex;
	align-items: baseline;
	gap: 8px;
	color: var(--ink);
	text-decoration: none;
	white-space: nowrap;
	min-width: 0;
}
.brand-mark {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 19px;
	letter-spacing: 0.02em;
}
.brand-mark span { color: var(--accent); }
.brand-sub {
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
}
.topbar-spacer { flex: 1; }
.icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 36px;
	min-width: 36px;
	padding: 0 10px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: var(--ink-2);
	cursor: pointer;
}
.icon-button:hover { color: var(--ink); border-color: var(--ink-3); }
.icon-button svg { width: 18px; height: 18px; }
.search-button { min-width: 200px; justify-content: flex-start; color: var(--ink-3); }
.search-button kbd { margin-left: auto; }
.menu-button { display: none; }
kbd {
	font-size: 0.8em;
	padding: 1px 6px;
	border: 1px solid var(--line);
	border-bottom-width: 2px;
	border-radius: 5px;
	background: var(--surface-2);
	color: var(--ink-2);
}

/* ---- Shell ------------------------------------------------------------------------------------------------------ */
.shell {
	display: grid;
	grid-template-columns: var(--sidebar) minmax(0, 1fr);
	min-height: calc(100vh - var(--topbar));
}
.sidebar {
	position: sticky;
	top: calc(var(--topbar) + env(safe-area-inset-top, 0px));
	height: calc(100vh - var(--topbar));
	overflow-y: auto;
	padding: 18px 14px 40px max(14px, env(safe-area-inset-left, 0px));
	border-right: 1px solid var(--line);
	background: var(--surface);
}
.main {
	min-width: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	padding-block: 28px 80px;
	padding-left: max(16px, env(safe-area-inset-left, 0px));
	padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 1240px) {
	.main.has-rail { grid-template-columns: minmax(0, 1fr) var(--rail); }
}
.content { min-width: 0; max-width: 76ch; width: 100%; margin: 0 auto; }
.rail { display: none; }
@media (min-width: 1240px) {
	.has-rail .rail {
		display: block;
		position: sticky;
		top: calc(var(--topbar) + 28px);
		align-self: start;
		max-height: calc(100vh - var(--topbar) - 56px);
		overflow-y: auto;
	}
}
@media (max-width: 900px) {
	.shell { grid-template-columns: minmax(0, 1fr); }
	.menu-button { display: inline-flex; }
	.search-button { min-width: 0; }
	.search-button .label, .search-button kbd { display: none; }
	.brand-sub { display: none; }
	.sidebar {
		position: fixed;
		inset: calc(var(--topbar) + env(safe-area-inset-top, 0px)) auto 0 0;
		width: min(320px, 88vw);
		height: auto;
		z-index: 25;
		transform: translateX(-102%);
		transition: transform 0.2s ease;
		box-shadow: var(--shadow);
	}
	.sidebar.open { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---- Course map (sidebar) --------------------------------------------------------------------------------------- */
.map-home {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--ink);
	text-decoration: none;
	font-weight: 700;
}
.map-home:hover, .map-home.active { background: var(--accent-soft); color: var(--accent-strong); }
.track { margin-top: 18px; }
.track-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	padding: 0 10px 6px;
}
.track-title {
	font-family: var(--font-display);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-2);
	margin: 0;
}
.track-count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-link {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	gap: 8px;
	align-items: start;
	padding: 6px 10px;
	border-radius: 8px;
	color: var(--ink-2);
	text-decoration: none;
	font-size: 14.5px;
	line-height: 1.35;
}
.lesson-link:hover { background: var(--surface-2); color: var(--ink); }
.lesson-link.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.lesson-link.locked { color: var(--lock); }
.status-dot {
	width: 16px;
	height: 16px;
	margin-top: 2px;
	border-radius: 50%;
	border: 2px solid var(--line);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
}
.status-dot svg { width: 10px; height: 10px; }
.status-dot.started { border-color: var(--gold); background: linear-gradient(90deg, var(--gold) 50%, transparent 50%); }
.status-dot.done { border-color: var(--ok); background: var(--ok); color: var(--surface); }
.status-dot.locked { border-color: transparent; color: var(--lock); }
.sidebar-foot {
	margin-top: 26px;
	padding: 12px 10px 0;
	border-top: 1px solid var(--line);
	display: grid;
	gap: 6px;
}
.sidebar-foot a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.sidebar-foot a:hover { color: var(--accent); }
.scrim { display: none; }
@media (max-width: 900px) {
	.scrim.show { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(5, 12, 17, 0.35); }
}

/* ---- Home ------------------------------------------------------------------------------------------------------- */
.home-hero { padding: 12px 0 8px; }
.eyebrow {
	font-family: var(--font-display);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 6px;
}
.home-hero h1, .page-head h1 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: 0.005em;
	text-wrap: balance;
	margin: 0 0 12px;
}
.home-hero h1 { font-size: clamp(30px, 5vw, 46px); }
.lede { font-size: 18.5px; color: var(--ink-2); max-width: 62ch; margin: 0; }
.continue-card {
	margin-top: 24px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	padding: 18px 20px;
	border: 1px solid var(--gold-line);
	border-radius: var(--radius);
	background: var(--gold-soft);
}
.continue-card p { margin: 0; }
.continue-card .what { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); font-family: var(--font-display); font-weight: 600; }
.continue-card .title { font-size: 18px; font-weight: 700; }
.button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 8px;
	border: 1px solid var(--accent);
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
}
.button:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.button.secondary { background: transparent; color: var(--accent); }
.button.secondary:hover { background: var(--accent-soft); color: var(--accent-strong); }
.button[disabled] { opacity: 0.5; cursor: not-allowed; }
.tracks-grid {
	margin-top: 28px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: 16px;
}
.track-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 18px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	min-width: 0;
}
.track-card h2 { font-family: var(--font-display); font-size: 21px; margin: 0; line-height: 1.2; }
.track-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.track-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.progress { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.track-card .button { align-self: flex-start; margin-top: auto; }
.how-it-works {
	margin-top: 36px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 18px;
}
.how-it-works div { min-width: 0; }
.how-it-works h3 { font-size: 16px; margin: 0 0 4px; }
.how-it-works p { margin: 0; font-size: 15px; color: var(--ink-2); }
.section-title { font-family: var(--font-display); font-size: 24px; margin: 40px 0 0; }

/* ---- Page ------------------------------------------------------------------------------------------------------- */
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(28px, 4.2vw, 38px); }
.page-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.page-meta span { display: inline-flex; align-items: center; gap: 6px; }
.page-meta svg { width: 15px; height: 15px; }
.prose { min-width: 0; }
.prose h2 { font-family: var(--font-display); font-size: 25px; line-height: 1.25; margin: 40px 0 10px; text-wrap: balance; }
.prose h3 { font-size: 19px; line-height: 1.3; margin: 30px 0 8px; text-wrap: balance; }
.prose h4, .prose h5, .prose h6 { font-size: 16.5px; margin: 24px 0 6px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin: 4px 0; }
.prose li > p { margin: 0 0 8px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ol > li::marker { font-weight: 700; color: var(--ink-2); }
.prose :not(pre) > code {
	font-size: 0.88em;
	padding: 1px 5px;
	border-radius: 5px;
	background: var(--surface-2);
	color: var(--ink);
	overflow-wrap: anywhere;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.prose blockquote { margin: 0 0 14px; padding: 2px 0 2px 16px; border-left: 3px solid var(--line); color: var(--ink-2); }
.heading-link { margin-left: 8px; font-weight: 400; color: var(--ink-3); text-decoration: none; opacity: 0; }
.prose :is(h2, h3, h4):hover .heading-link, .heading-link:focus-visible { opacity: 1; }
.prose img { display: block; margin: 8px 0 16px; border: 1px solid var(--line); border-radius: 8px; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 8px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.prose th, .prose td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 700; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose th.align-center, .prose td.align-center { text-align: center; }
.prose th.align-right, .prose td.align-right { text-align: right; }
/* A link to a lesson of a track this build leaves out (BuildGuideSite.py --tracks). */
.soon { color: var(--ink-2); }
.soon-tag {
	display: inline-block;
	padding: 0 7px;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 0.75em;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--ink-3);
	white-space: nowrap;
	vertical-align: 0.1em;
}
.callout { margin: 0 0 16px; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.callout > :last-child { margin-bottom: 0; }
.callout-label { font-family: var(--font-display); font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 4px !important; }
.callout-note { border-color: var(--accent); background: var(--accent-soft); }
.callout-note .callout-label { color: var(--accent-strong); }
.callout-tip { border-color: var(--ok); background: var(--ok-soft); }
.callout-tip .callout-label { color: var(--ok); }
.callout-warning, .callout-important { border-color: var(--gold-line); background: var(--gold-soft); }
.callout-warning .callout-label, .callout-important .callout-label { color: var(--gold); }

/* Code blocks */
.code {
	position: relative;
	margin: 0 0 16px;
	border-radius: 8px;
	background: var(--code-bg);
	color: var(--code-ink);
	border: 1px solid var(--code-line);
	min-width: 0;
}
.code-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	padding: 4px 6px 4px 12px;
	border-bottom: 1px solid var(--code-line);
	font-size: 12px;
	color: var(--tok-comment);
	font-family: var(--font-mono);
}
.code-bar .verified { color: var(--tok-string); display: inline-flex; align-items: center; gap: 5px; }
.code-bar .verified svg { width: 12px; height: 12px; }
.code-bar .copy {
	margin-left: auto;
	border: 1px solid var(--code-line);
	background: transparent;
	color: var(--code-ink);
	border-radius: 6px;
	padding: 3px 9px;
	font-size: 12px;
	cursor: pointer;
}
.code-bar .copy:hover { border-color: var(--tok-comment); }
.code pre { margin: 0; padding: 12px 14px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; tab-size: 4; }
.tok-comment { color: var(--tok-comment); font-style: italic; }
.tok-string { color: var(--tok-string); }
.tok-number { color: var(--tok-number); }
.tok-keyword { color: var(--tok-keyword); }
.tok-command { color: var(--tok-command); font-weight: 700; }
.tok-option { color: var(--tok-option); }
.tok-key { color: var(--tok-key); }
.tok-literal { color: var(--tok-literal); }

/* ---- Checkpoints ------------------------------------------------------------------------------------------------ */
.checkpoint {
	margin: 26px 0;
	border: 1px solid var(--gold-line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.checkpoint.passed { border-color: var(--ok); }
.cp-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	padding: 10px 16px;
	background: var(--gold-soft);
	border-bottom: 1px solid var(--gold-line);
}
.checkpoint.passed .cp-head { background: var(--ok-soft); border-bottom-color: var(--ok); }
.cp-kind { white-space: nowrap; font-family: var(--font-display); font-weight: 600; font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.checkpoint.passed .cp-kind { color: var(--ok); }
.cp-title { font-weight: 700; flex: 1 1 auto; min-width: 0; }
.cp-state { margin-left: auto; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.checkpoint.passed .cp-state { color: var(--ok); font-weight: 700; }
.cp-body { padding: 16px; }
.cp-body > :last-child { margin-bottom: 0; }
.cp-prompt > :last-child { margin-bottom: 12px; }
.cp-options { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.cp-option {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	gap: 10px;
	align-items: start;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 8px;
	cursor: pointer;
	background: var(--bg);
}
.cp-option:hover { border-color: var(--accent); }
.cp-option input { margin: 4px 0 0; accent-color: var(--accent); }
.cp-option.right { border-color: var(--ok); background: var(--ok-soft); }
.cp-option > span > :last-child { margin-bottom: 0; }
.cp-option p { margin: 0; }
.cp-command { margin-bottom: 12px; }
.cp-field {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-mono);
	font-size: 13.5px;
}
textarea.cp-field { min-height: 120px; resize: vertical; }
.cp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.cp-feedback { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-size: 15px; }
.cp-feedback > :last-child, .cp-feedback ul { margin-bottom: 0; }
.cp-feedback.bad { background: var(--bad-soft); color: var(--ink); border: 1px solid var(--bad); }
.cp-feedback.good { background: var(--ok-soft); color: var(--ink); border: 1px solid var(--ok); }
.cp-feedback strong:first-child { color: inherit; }
.cp-feedback ul { padding-left: 1.2em; margin: 6px 0 0; }
.link-button { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.locked-stage {
	margin: 4px 0 26px;
	padding: 22px 18px;
	border: 1px dashed var(--line);
	border-radius: var(--radius);
	text-align: center;
	color: var(--ink-3);
	font-size: 15px;
}
.locked-stage svg { width: 22px; height: 22px; display: block; margin: 0 auto 6px; }

.page-end {
	margin-top: 36px;
	padding: 20px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: var(--surface);
	display: grid;
	gap: 12px;
}
.page-end.complete { border-color: var(--ok); background: var(--ok-soft); }
.page-end h2 { font-family: var(--font-display); font-size: 20px; margin: 0; }
.page-end p { margin: 0; color: var(--ink-2); }
.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 18px; }
.pager a {
	display: block;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: 8px;
	text-decoration: none;
	color: var(--ink);
	background: var(--surface);
	min-width: 0;
}
.pager a:hover { border-color: var(--accent); }
.pager .dir { display: block; font-size: 12.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--font-display); font-weight: 600; }
.pager .next { text-align: right; }

.lock-screen { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lock-screen h2 { font-family: var(--font-display); margin: 0 0 8px; }
.lock-screen p { color: var(--ink-2); }
.lock-screen .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* ---- Rail ------------------------------------------------------------------------------------------------------- */
.rail h2 {
	font-family: var(--font-display);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-2);
	margin: 0 0 8px;
}
.rail section + section { margin-top: 26px; }
.objectives { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.objectives li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.objectives li.done { color: var(--ink); }
.objectives .box { width: 14px; height: 14px; margin-top: 2px; border: 2px solid var(--gold); border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; }
.objectives li.done .box { border-color: var(--ok); background: var(--ok); color: var(--surface); }
.objectives .box svg { width: 9px; height: 9px; }
.objectives a { color: inherit; text-decoration: none; }
.objectives a:hover { color: var(--accent); }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.toc a { color: var(--ink-2); text-decoration: none; display: block; line-height: 1.35; }
.toc a:hover { color: var(--accent); }
.toc .level-3 { padding-left: 12px; font-size: 13.5px; }

/* ---- Search ----------------------------------------------------------------------------------------------------- */
.search-overlay {
	position: fixed;
	inset: 0;
	z-index: 50;
	background: rgba(5, 12, 17, 0.45);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: calc(8vh + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
}
.search-panel {
	width: min(680px, 100%);
	max-height: 76vh;
	display: flex;
	flex-direction: column;
	border-radius: 12px;
	background: var(--surface);
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.search-panel input {
	border: 0;
	border-bottom: 1px solid var(--line);
	padding: 16px 18px;
	font-size: 17px;
	background: transparent;
	color: var(--ink);
	outline: none;
	width: 100%;
}
.search-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.search-results li a {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--ink);
	text-decoration: none;
}
.search-results li a:hover, .search-results li a.selected { background: var(--accent-soft); }
.search-results .where { display: block; font-size: 12.5px; color: var(--ink-3); }
.search-results .snippet { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.search-results mark { background: var(--gold-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty { padding: 18px; color: var(--ink-3); font-size: 15px; }

/* ---- Settings --------------------------------------------------------------------------------------------------- */
.settings { display: grid; gap: 14px; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.setting p { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; }
.setting-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.setting .setting-status { margin-top: 8px; }
.setting .setting-status:empty { display: none; }
.setting .setting-status.good { color: var(--ok); }
.setting .setting-status.bad { color: var(--bad); }
.store-note { margin: 12px 0 0; font-size: 14.5px; color: var(--ink-3); }
.toast {
	position: fixed;
	z-index: 60;
	left: 50%;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	padding: 10px 16px;
	border-radius: 8px;
	background: var(--ink);
	color: var(--bg);
	font-size: 14.5px;
	box-shadow: var(--shadow);
	max-width: calc(100vw - 32px);
}
.noscript { max-width: 70ch; margin: 40px auto; padding: 0 16px; }
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.continue-card .sub { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.cp-note { font-size: 14px; color: var(--ink-3); margin: -6px 0 0; }
.cp-hint { margin-top: 8px; }
.cp-hint > :last-child { margin-bottom: 0; }
.cp-detail { color: var(--ink-3); font-family: var(--font-mono); font-size: 12.5px; overflow-wrap: anywhere; }
@media (max-width: 560px) {
	.continue-card { grid-template-columns: minmax(0, 1fr); }
	.setting { grid-template-columns: minmax(0, 1fr); }
}

/* ---- On the website (BuildGuideSite.py --mode website): a link to the site's home page and the site's darker ground -- */
.site-home {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding-right: 12px;
	border-right: 1px solid var(--line);
	color: var(--ink);
	font-size: 18px;
	font-weight: 650;
	letter-spacing: -0.03em;
	text-decoration: none;
	white-space: nowrap;
}
.site-home svg { width: 16px; height: 16px; color: var(--ink-3); }
.site-home:hover { color: var(--ink); }
.site-home:hover svg { color: var(--accent); }
.site-home-light { font-weight: 400; color: var(--ink-2); }
.site-home-dot { color: var(--accent); }
[data-site="website"] .brand-mark { display: none; }
[data-site="website"] .brand-sub { display: inline; }
@media (max-width: 480px) {
	[data-site="website"] .brand-sub { display: none; }
}
:root[data-site="website"][data-theme="dark"] { --bg: #080c12; --surface: #0e141d; }
@media (prefers-color-scheme: dark) {
	:root[data-site="website"]:not([data-theme="light"]) { --bg: #080c12; --surface: #0e141d; }
}
