/* The Raíz look for sculk.network docs: sculk colours, square corners, hard 2px edges, raised pixel buttons,
   sunken wells/fields, and Jersey 10 / Oxanium / Silkscreen / Geist Mono typography. */
@font-face {
	font-family: "Jersey 10";
	font-style: normal;
	font-display: swap;
	font-weight: 400 700;
	src: url("/fonts/jersey-10.woff2") format("woff2");
}
@font-face {
	font-family: "Oxanium Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 200 800;
	src: url("/fonts/oxanium.woff2") format("woff2");
}
@font-face {
	font-family: "Geist Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("/fonts/geist.woff2") format("woff2");
}
@font-face {
	font-family: "Geist Mono Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("/fonts/geist-mono.woff2") format("woff2");
}
@font-face {
	font-family: "Silkscreen";
	font-style: normal;
	font-display: swap;
	font-weight: 400;
	src: url("/fonts/silkscreen.woff2") format("woff2");
}

:root {
	color-scheme: dark light;
	--ink: #0a0f12;
	--panel: #0d1519;
	--panel-alpha: rgb(13 21 25 / 0.94);
	--panel-2: #111b20;
	--raise: #15232a;
	--raise-hi: #1b2e36;
	--line: #1d2c32;
	--line-hi: #2a3f46;
	--edge: #04070a;
	--well-bg: rgb(7 11 13 / 0.82);
	--field-bg: #070b0d;
	--topbar-bg: rgb(10 15 18 / 0.86);
	--topbar-scrolled: rgb(10 15 18 / 0.96);
	--footer-bg: rgb(7 11 13 / 0.92);
	--text: #e3ecea;
	--muted: #8ca2a2;
	--dim: #5a6f72;
	--bone: #c9cdb2;
	--accent: #13a9ad;
	--accent-lo: #05514f;
	--accent-face: #0b7f82;
	--accent-hi: #4be6f0;
	--ok: #45d08f;
	--warn: #e8b44c;
	--danger: #e0564a;
	--btn-band: #0a1317;
	--btn-hl: rgb(255 255 255 / 0.08);
	--callout-bg: rgb(11 22 27 / 0.9);
	--font-sans: "Oxanium Variable", "Geist Variable", ui-sans-serif, system-ui, sans-serif;
	--font-display: "Jersey 10", "Oxanium Variable", monospace;
	--font-label: "Silkscreen", "Geist Mono Variable", monospace;
	--font-mono: "Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, monospace;
	--header-h: 64px;
	--sidebar-w: 276px;
	--toc-w: 236px;
}

@media (prefers-color-scheme: light) {
	:root {
		--ink: #ecf2f1;
		--panel: #f9fbfb;
		--panel-alpha: rgb(249 251 251 / 0.96);
		--panel-2: #e4eded;
		--raise: #dce7e6;
		--raise-hi: #cfe0df;
		--line: #c4d5d3;
		--line-hi: #9bb5b2;
		--edge: #152429;
		--well-bg: #f1f6f6;
		--field-bg: #ffffff;
		--topbar-bg: rgb(244 248 248 / 0.92);
		--topbar-scrolled: rgb(244 248 248 / 0.98);
		--footer-bg: #e6efee;
		--text: #0f1c20;
		--muted: #425a5e;
		--dim: #60787c;
		--bone: #0f2429;
		--accent: #097c80;
		--accent-lo: #064b4d;
		--accent-face: #0a7a7d;
		--accent-hi: #08686b;
		--ok: #137a4c;
		--warn: #9a6507;
		--danger: #b73228;
		--btn-band: #b8cac8;
		--btn-hl: rgb(255 255 255 / 0.7);
		--callout-bg: #e7f0f0;
	}
	#sculk-bg {
		opacity: 0.08;
	}
}

/* Shiki dual themes driven by prefers-color-scheme */
.shiki,
.shiki span {
	color: var(--shiki-dark);
	background-color: transparent;
}
@media (prefers-color-scheme: light) {
	.shiki,
	.shiki span {
		color: var(--shiki-light);
		background-color: transparent;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
	border-radius: 0;
}

html {
	background: var(--ink);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.65;
	scroll-padding-top: calc(var(--header-h) + 20px);
	-webkit-font-smoothing: antialiased;
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--ink);
	color: var(--text);
	display: flex;
	flex-direction: column;
}

#sculk-bg {
	position: fixed;
	inset: 0;
	z-index: 0;
	width: 100vw;
	height: 100dvh;
	pointer-events: none;
	image-rendering: pixelated;
	display: block;
}

a {
	color: var(--accent-hi);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
a:hover {
	color: var(--accent);
}

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

/* Raíz primitives: raised blocks, sunken fields, framed panels, wells, chips, eyebrows */
.btn {
	--face: var(--raise);
	--band: var(--btn-band);
	--hl: var(--btn-hl);
	--band-h: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	white-space: nowrap;
	cursor: pointer;
	text-decoration: none;
	padding: 0.5rem 0.85rem calc(0.5rem + var(--band-h) - 2px);
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: 0.8125rem;
	line-height: 1.1;
	color: var(--text);
	background: var(--face);
	border: 2px solid var(--edge);
	box-shadow:
		inset 0 calc(var(--band-h) * -1) 0 var(--band),
		inset 2px 2px 0 var(--hl);
	clip-path: inset(0);
	transition:
		clip-path 90ms steps(3),
		padding 90ms steps(3),
		box-shadow 90ms steps(3),
		background-color 120ms,
		filter 120ms;
}
.btn:hover {
	--face: var(--raise-hi);
	color: var(--text);
	filter: brightness(1.05);
}
.btn:active {
	clip-path: inset(var(--band-h) 0 0 0);
	padding-top: calc(0.5rem + var(--band-h));
	padding-bottom: calc(0.5rem - 2px);
	box-shadow:
		inset 0 calc(var(--band-h) + 2px) 0 var(--edge),
		inset 0 calc(var(--band-h) + 4px) 0 var(--hl),
		inset 2px 0 0 var(--hl);
}
.btn-sm {
	--band-h: 3px;
	padding: 0.35rem 0.65rem calc(0.35rem + var(--band-h) - 2px);
	font-size: 0.75rem;
}
.btn-sm:active {
	padding-top: calc(0.35rem + var(--band-h));
	padding-bottom: calc(0.35rem - 2px);
}
.btn-primary {
	--face: var(--accent-face);
	--band: var(--accent-lo);
	--hl: rgb(110 240 248 / 0.45);
	color: #fff;
	text-shadow: 1px 1px 0 rgb(2 40 42 / 0.7);
}
.btn-primary:hover {
	--face: #0d8c8f;
	color: #fff;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.22rem 0.55rem;
	font-family: var(--font-mono);
	font-weight: 500;
	font-size: 0.75rem;
	line-height: 1.2;
	color: var(--muted);
	background: var(--field-bg);
	border: 2px solid var(--edge);
	box-shadow: inset 0 0 0 1px var(--line);
	white-space: nowrap;
}
.chip-accent {
	color: var(--accent-hi);
	box-shadow: inset 0 0 0 1px rgb(19 169 173 / 0.5);
	background: rgb(11 127 130 / 0.14);
}
.chip-warn {
	color: var(--warn);
	box-shadow: inset 0 0 0 1px rgb(232 180 76 / 0.45);
}
.chip-ok {
	color: var(--ok);
	box-shadow: inset 0 0 0 1px rgb(69 208 143 / 0.45);
}
.pixel-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	flex: none;
	background: currentColor;
}

.eyebrow {
	font-family: var(--font-label);
	font-size: 0.6875rem;
	line-height: 1;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--accent-hi);
}

/* Top bar matching SiteBar */
.topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	height: var(--header-h);
	border-bottom: 2px solid var(--edge);
	background: var(--topbar-bg);
	backdrop-filter: blur(6px);
	transition:
		background-color 180ms,
		box-shadow 180ms;
}
.topbar[data-scrolled] {
	background: var(--topbar-scrolled);
	box-shadow: 0 6px 0 rgb(0 0 0 / 0.25);
}
.topbar-inner {
	max-width: 96rem;
	height: 100%;
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.menu-btn {
	display: none;
	width: 36px;
	height: 36px;
	padding: 0;
	font-family: var(--font-mono);
	font-size: 18px;
}

.brand-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--bone);
	font-family: var(--font-display);
	font-size: 28px;
	line-height: 1;
	letter-spacing: 0.02em;
	flex: none;
}
.brand-link:hover {
	color: var(--bone);
}
.brand-link .glyph {
	width: 27px;
	height: 27px;
	display: block;
}
.brand-link .tld {
	color: var(--accent-hi);
}

.topbar-nav {
	display: flex;
	align-items: center;
	gap: 2px;
	margin-left: 8px;
}
.bar-link {
	position: relative;
	padding: 8px 10px;
	color: var(--muted);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	transition: color 120ms;
}
.bar-link::after {
	content: "";
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 3px;
	height: 2px;
	background: var(--accent-hi);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 140ms steps(3);
}
.bar-link:hover,
.bar-link.active {
	color: var(--text);
}
.bar-link:hover::after,
.bar-link.active::after {
	transform: scaleX(1);
}

.topbar-spacer {
	flex: 1;
}

/* Sunken .field search box */
.search-wrap {
	position: relative;
	width: min(290px, 34vw);
}
.search-input {
	width: 100%;
	height: 36px;
	padding: 0 36px 0 10px;
	background: var(--field-bg);
	color: var(--text);
	border: 2px solid var(--edge);
	box-shadow:
		inset 0 2px 0 rgb(0 0 0 / 0.45),
		0 0 0 1px var(--line);
	font-family: var(--font-sans);
	font-size: 14px;
	transition: box-shadow 120ms steps(2);
}
.search-input::placeholder {
	color: var(--dim);
}
.search-input:hover:not(:focus) {
	box-shadow:
		inset 0 2px 0 rgb(0 0 0 / 0.45),
		0 0 0 1px var(--line-hi);
}
.search-input:focus {
	outline: none;
	box-shadow:
		inset 0 2px 0 rgb(0 0 0 / 0.45),
		0 0 0 1px var(--accent),
		0 0 0 4px rgb(75 230 240 / 0.14);
}
.search-kbd {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--dim);
	border: 1px solid var(--line);
	padding: 0 5px;
	pointer-events: none;
}
.search-results {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: min(460px, 92vw);
	max-height: 68vh;
	overflow-y: auto;
	background: var(--panel);
	border: 2px solid var(--edge);
	box-shadow:
		inset 0 0 0 1px var(--line-hi),
		0 10px 0 rgb(0 0 0 / 0.35);
	z-index: 60;
	display: none;
}
.search-results.open {
	display: block;
	animation: pop-in 140ms steps(3) both;
}
.search-item {
	display: block;
	padding: 10px 12px;
	text-decoration: none;
	border-bottom: 1px solid var(--line);
	color: var(--text);
}
.search-item:last-child {
	border-bottom: none;
}
.search-item:hover,
.search-item.active {
	background: var(--raise);
	color: var(--text);
}
.search-item-meta {
	font-family: var(--font-label);
	font-size: 10px;
	color: var(--accent-hi);
	text-transform: uppercase;
}
.search-item-title {
	font-weight: 600;
	font-size: 14px;
	margin-top: 2px;
}
.search-item-excerpt {
	font-size: 12.5px;
	color: var(--muted);
	margin-top: 2px;
	line-height: 1.4;
}
.search-empty {
	padding: 14px 12px;
	color: var(--muted);
	font-size: 13.5px;
}

.channel-controls {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
}

/* Main 3-column framed layout floating over the sculk canvas */
.shell {
	position: relative;
	z-index: 1;
	flex: 1;
	width: 100%;
	max-width: 96rem;
	margin: 0 auto;
	padding: 20px 16px 36px;
	display: grid;
	grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
	gap: 18px;
	align-items: start;
}

/* Framed Raíz panels for sidebar, content surface, and TOC */
.panel {
	background: var(--panel-alpha);
	border: 2px solid var(--edge);
	box-shadow:
		inset 0 0 0 1px var(--line),
		inset 0 3px 0 rgb(255 255 255 / 0.025);
}

.sidebar {
	position: sticky;
	top: calc(var(--header-h) + 16px);
	max-height: calc(100vh - var(--header-h) - 32px);
	overflow-y: auto;
	padding: 16px 12px 24px;
}
.nav-group {
	margin-bottom: 20px;
}
.nav-group:last-child {
	margin-bottom: 0;
}
.nav-group-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 8px 6px;
	margin-bottom: 6px;
	border-bottom: 2px solid var(--edge);
	box-shadow: 0 1px 0 var(--line);
}
.nav-group-title {
	font-family: var(--font-label);
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--accent-hi);
	text-decoration: none;
}
.nav-group-version {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--dim);
}
.nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.nav-link {
	display: block;
	padding: 6px 9px;
	font-size: 13.5px;
	line-height: 1.35;
	color: var(--muted);
	text-decoration: none;
	border-left: 3px solid transparent;
	transition:
		background-color 100ms steps(2),
		color 100ms steps(2);
}
.nav-link:hover {
	color: var(--text);
	background: var(--panel-2);
}
.nav-link.current {
	color: var(--text);
	background: var(--raise);
	border-left-color: var(--accent-hi);
	box-shadow: inset 0 0 0 1px var(--line-hi);
	font-weight: 600;
}

/* Main article panel */
.content-col {
	min-width: 0;
	padding: 26px clamp(20px, 3.6vw, 44px) 44px;
	animation: view-in 180ms steps(3) backwards;
}
.page-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 20px;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--edge);
	box-shadow: 0 1px 0 var(--line);
	font-size: 13px;
	color: var(--muted);
}

/* Prose typography matching theme.css (Jersey 10 h1/h2, Oxanium body, Geist Mono code) */
.prose {
	max-width: 78ch;
}
.prose h1 {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(38px, 4.4vw, 52px);
	line-height: 1.04;
	letter-spacing: 0.015em;
	margin: 0 0 18px;
	color: var(--bone);
	text-shadow: 3px 3px 0 rgb(0 0 0 / 0.35);
}
.prose h2 {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 31px;
	line-height: 1.1;
	letter-spacing: 0.015em;
	margin: 34px 0 14px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--edge);
	box-shadow: 0 1px 0 var(--line);
	color: var(--bone);
}
.prose h3 {
	font-family: var(--font-sans);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	margin: 26px 0 10px;
	color: var(--text);
}
.prose h4 {
	font-family: var(--font-sans);
	font-size: 15.5px;
	font-weight: 700;
	margin: 20px 0 8px;
	color: var(--text);
}
.heading-anchor {
	margin-left: 8px;
	font-family: var(--font-mono);
	font-size: 0.55em;
	color: var(--dim);
	text-decoration: none;
	opacity: 0;
}
.prose h2:hover .heading-anchor,
.prose h3:hover .heading-anchor,
.prose h4:hover .heading-anchor,
.heading-anchor:focus {
	opacity: 1;
}
.prose p {
	margin: 0 0 14px;
}
.prose ul,
.prose ol {
	margin: 0 0 16px;
	padding-left: 24px;
}
.prose li {
	margin: 5px 0;
}
.prose img {
	max-width: 100%;
	height: auto;
	border: 2px solid var(--edge);
}
.prose hr {
	border: 0;
	border-top: 2px solid var(--edge);
	box-shadow: 0 1px 0 var(--line);
	margin: 28px 0;
}
.prose code {
	font-family: var(--font-mono);
	font-size: 0.86em;
	padding: 1px 5px;
	background: var(--well-bg);
	border: 1px solid var(--line);
	color: var(--accent-hi);
}
.prose pre code {
	padding: 0;
	background: none;
	border: none;
	color: inherit;
	font-size: 13.5px;
	line-height: 1.55;
}

/* Sunken wells for code blocks and Mermaid diagrams */
.code-wrap,
.mermaid-block {
	margin: 16px 0 20px;
	background: var(--well-bg);
	border: 2px solid var(--edge);
	box-shadow: inset 0 0 0 1px var(--line);
}
.code-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 10px;
	border-bottom: 2px solid var(--edge);
	box-shadow: 0 1px 0 var(--line);
	background: var(--panel-2);
	font-family: var(--font-label);
	font-size: 10px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}
.copy-btn {
	--face: var(--raise);
	--band: var(--btn-band);
	--hl: var(--btn-hl);
	--band-h: 2px;
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 600;
	padding: 3px 9px calc(3px + var(--band-h));
	border: 2px solid var(--edge);
	background: var(--face);
	color: var(--text);
	box-shadow:
		inset 0 calc(var(--band-h) * -1) 0 var(--band),
		inset 1px 1px 0 var(--hl);
	cursor: pointer;
}
.copy-btn:hover {
	--face: var(--raise-hi);
	color: var(--accent-hi);
}
.code-wrap pre,
.mermaid-src {
	margin: 0;
	padding: 14px 16px;
	overflow-x: auto;
	background: transparent;
}

/* Tables inside sunken wells */
.table-wrap {
	width: 100%;
	overflow-x: auto;
	margin: 16px 0 20px;
	border: 2px solid var(--edge);
	box-shadow: inset 0 0 0 1px var(--line);
	background: var(--well-bg);
}
.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.prose th,
.prose td {
	text-align: left;
	padding: 9px 12px;
	border-bottom: 1px solid var(--line);
	border-right: 1px solid var(--line);
	vertical-align: top;
}
.prose tr:last-child td {
	border-bottom: none;
}
.prose th:last-child,
.prose td:last-child {
	border-right: none;
}
.prose th {
	background: var(--panel-2);
	font-family: var(--font-label);
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--bone);
	border-bottom: 2px solid var(--edge);
}

/* Blockquotes & GitHub alerts */
.prose blockquote {
	margin: 16px 0 20px;
	padding: 12px 16px;
	border: 2px solid var(--edge);
	border-left: 4px solid var(--accent);
	box-shadow: inset 0 0 0 1px var(--line);
	background: var(--callout-bg);
}
.prose blockquote > :last-child {
	margin-bottom: 0;
}
.callout-title {
	display: block;
	font-family: var(--font-label);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 6px;
	color: var(--accent-hi);
}
.callout-warning {
	border-left-color: var(--warn);
}
.callout-warning .callout-title {
	color: var(--warn);
}
.callout-caution {
	border-left-color: var(--danger);
}
.callout-caution .callout-title {
	color: var(--danger);
}
.callout-tip {
	border-left-color: var(--ok);
}
.callout-tip .callout-title {
	color: var(--ok);
}

/* Home product cards: raised Raíz blocks */
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
	margin: 22px 0 28px;
}
.product-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 18px 22px;
	background: var(--panel-2);
	border: 2px solid var(--edge);
	box-shadow:
		inset 0 -4px 0 var(--btn-band),
		inset 2px 2px 0 var(--btn-hl);
	text-decoration: none;
	color: var(--text);
	transition:
		background-color 120ms steps(2),
		transform 90ms steps(2);
}
.product-card:hover {
	background: var(--raise);
	color: var(--text);
	box-shadow:
		inset 0 -4px 0 var(--accent-lo),
		inset 2px 2px 0 rgb(75 230 240 / 0.25);
}
.product-card:active {
	transform: translateY(2px);
}
.product-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.product-card-name {
	font-family: var(--font-display);
	font-size: 30px;
	line-height: 1;
	color: var(--bone);
}
.product-card-desc {
	font-size: 14px;
	color: var(--muted);
	margin: 0;
}

.notice-box {
	padding: 18px 20px;
	border: 2px solid var(--edge);
	border-left: 4px solid var(--warn);
	box-shadow: inset 0 0 0 1px var(--line);
	background: var(--callout-bg);
	margin: 20px 0;
}
.notice-box h2 {
	margin-top: 0;
	border-bottom: none;
	box-shadow: none;
	padding-bottom: 0;
}

/* Right-hand TOC panel */
.toc {
	position: sticky;
	top: calc(var(--header-h) + 16px);
	max-height: calc(100vh - var(--header-h) - 32px);
	overflow-y: auto;
	padding: 16px 14px;
	font-size: 13px;
}
.toc.toc-empty {
	visibility: hidden;
	pointer-events: none;
}
.toc-title {
	margin: 0 0 10px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--edge);
	box-shadow: 0 1px 0 var(--line);
}
.toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.toc-item a {
	display: block;
	padding: 4px 0;
	color: var(--muted);
	text-decoration: none;
	line-height: 1.35;
}
.toc-item a:hover {
	color: var(--accent-hi);
}
.toc-l3 a {
	padding-left: 12px;
	font-size: 12.5px;
}

/* Site footer matching AppFrame */
.site-footer {
	position: relative;
	z-index: 1;
	margin-top: auto;
	border-top: 2px solid var(--edge);
	background: var(--footer-bg);
	box-shadow: inset 0 1px 0 var(--line);
}
.site-footer-inner {
	max-width: 96rem;
	margin: 0 auto;
	padding: 18px 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 18px;
	font-size: 13.5px;
	color: var(--muted);
}
.site-footer-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.backdrop {
	display: none;
}

@keyframes pop-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
}
@keyframes view-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}

@media (max-width: 1180px) {
	.shell {
		grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
	}
	.toc {
		display: none;
	}
}

@media (max-width: 860px) {
	.menu-btn {
		display: inline-flex;
	}
	.topbar-nav,
	.channel-switch {
		display: none;
	}
	.search-wrap {
		width: min(210px, 44vw);
	}
	.shell {
		grid-template-columns: minmax(0, 1fr);
		padding: 12px 10px 28px;
	}
	.sidebar {
		position: fixed;
		top: var(--header-h);
		left: 0;
		bottom: 0;
		max-height: none;
		width: min(300px, 85vw);
		z-index: 50;
		transform: translateX(-100%);
		transition: transform 140ms steps(4);
	}
	body.nav-open .sidebar {
		transform: translateX(0);
	}
	body.nav-open .backdrop {
		display: block;
		position: fixed;
		inset: var(--header-h) 0 0 0;
		background: rgb(0 0 0 / 0.6);
		z-index: 45;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0s;
		transition-duration: 0s;
	}
}
