:root {
	color-scheme: light dark;
	--bg: #ffffff;
	--panel: #f7f8fb;
	--text: #172033;
	--muted: #5f6b7a;
	--border: #d8dee8;
	--link: #1f5fbf;
	--code: #f1f4f8;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1115;
		--panel: #171a21;
		--text: #eef1f6;
		--muted: #aab2c0;
		--border: #2d3440;
		--link: #78a8ff;
		--code: #222734;
	}
}

body {
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
	margin: 0;
}

.page-shell {
	display: grid;
	grid-template-columns: 16rem minmax(0, 1fr) 14rem;
	margin: 0 auto;
	max-width: 96rem;
}

.sidebar {
	align-self: start;
	border-right: 1px solid var(--border);
	max-height: 100vh;
	overflow-y: auto;
	padding: 2rem 1.5rem;
	position: sticky;
	top: 0;
}

.section-nav {
	align-self: start;
	max-height: 100vh;
	overflow-y: auto;
	padding: 2rem 1.25rem;
	position: sticky;
	top: 0;
}

.nav-section + .nav-section {
	margin-top: 2rem;
}

.section-nav h2,
.nav-section h2 {
	color: var(--muted);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	margin: 0 0 0.5rem;
	text-transform: uppercase;
}

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

.section-nav a,
.nav-section a {
	border-radius: 0.45rem;
	color: var(--muted);
	display: block;
	padding: 0.4rem 0.55rem;
	text-decoration: none;
}

.section-nav a:hover,
.nav-section a:hover,
.nav-section a[aria-current="page"] {
	background: var(--code);
	color: var(--text);
}

.section-nav .level-3 {
	padding-left: 1.35rem;
}

.content {
	display: flex;
	flex-direction: column;
	max-width: 56rem;
	min-height: 100vh;
	padding: 2rem 3rem 2rem;
}

.doc-content {
	padding-bottom: 3rem;
}

.content h1,
.content h2,
.content h3 {
	line-height: 1.25;
}

.content h1 {
	font-size: 2.4rem;
	margin-top: 0;
}

.content h2 {
	border-top: 1px solid var(--border);
	font-size: 1.55rem;
	margin-top: 2.4rem;
	padding-top: 1.6rem;
}

.content h3 {
	font-size: 1.2rem;
	margin-top: 2rem;
}

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

.content img {
	border-radius: 0.75rem;
	height: auto;
	max-width: 100%;
}

.content pre,
.content code {
	background: var(--code);
	border-radius: 0.35rem;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	font-size: 0.92em;
}

.content code {
	padding: 0.12rem 0.3rem;
}

.content pre {
	overflow-x: auto;
	padding: 1rem;
}

.content pre code {
	padding: 0;
}

.content table {
	border-collapse: collapse;
	display: block;
	overflow-x: auto;
	width: 100%;
}

.site-footer {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 0.75rem;
	color: var(--muted);
	font-size: 0.9rem;
	margin-top: auto;
	padding: 1rem 1.15rem;
}

.site-footer a {
	color: var(--link);
}

.content th,
.content td {
	border: 1px solid var(--border);
	padding: 0.55rem 0.7rem;
	text-align: left;
}

.content th {
	background: var(--panel);
}

@media (max-width: 760px) {
	.page-shell {
		display: block;
	}

	.section-nav,
	.sidebar {
		border-bottom: 1px solid var(--border);
		border-right: 0;
		max-height: none;
		overflow-y: visible;
		padding: 1rem;
		position: static;
	}

	.content {
		padding: 1.25rem 1rem 3rem;
	}
}
