:root {
	color-scheme: light;
	--line: light-dark(#aaa, #555);
	--column: 12rem;
	--logo: 8.75rem;
	/* The classic strip down the left edge runs behind the menu to the foot of the page and covers two fifths of the centered logo. */
	--strip: calc((var(--column) - var(--logo)) / 2 + 0.4 * var(--logo));
}
/* The theme is the checkbox; it is parked off-screen while its moon label in the page toggles it. */
:root:has(#dark:checked) {
	color-scheme: dark;
}
#dark {
	appearance: none;
	position: fixed;
}
main > label {
	float: right;
	margin-left: 1rem;
	color: GrayText;
	cursor: pointer;
}
main > label svg {
	display: block;
	height: 1.5rem;
}
main > label:hover, :root:has(#dark:focus-visible) main > label {
	color: CanvasText;
}
body {
	margin: 0;
	font-family: system-ui, sans-serif;
	line-height: 1.5;
	background: linear-gradient(to right, light-dark(#999, #333) var(--strip), light-dark(#eee, #1c1c1c) 0);
	display: grid;
	grid-template-columns: var(--column) minmax(0, 1fr);
}
header {
	grid-row: 1 / span 2;
	padding: 1rem 0.75rem;
}
header img {
	display: block;
	width: var(--logo);
	height: auto;
	margin: 0 auto 1rem;
	/* White lettering and the gray ring need separation from the strip and the page in both themes. */
	filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.7));
}
/* The classic sidebar: white buttons stacked edge to edge, the dark gap between them drawn by the grid background. */
header nav {
	display: grid;
	gap: 1px;
	border: 1px solid CanvasText;
	background: CanvasText;
	font-size: 0.8rem;
	font-weight: bold;
}
header nav a {
	padding: 0.3rem 0.6rem;
	background: Canvas;
	color: CanvasText;
	text-decoration: none;
}
header nav a:hover {
	background: light-dark(#ddd, #444);
}
main, footer {
	padding: 1rem 2rem;
	max-width: 52rem;
}
footer {
	font-size: 0.85rem;
	color: GrayText;
}
footer a {
	margin-right: 1rem;
}
h1, h2 {
	font-weight: normal;
	border-bottom: 1px solid var(--line);
}
h1 {
	margin-top: 0;
}
h2 {
	clear: both;
}
main > nav {
	font-size: 0.85rem;
}
main > nav a {
	margin-right: 0.75rem;
}
main > nav [aria-current] {
	font-weight: bold;
	text-decoration: none;
	color: inherit;
}
img {
	max-width: 100%;
	height: auto;
}
.right {
	float: right;
	margin: 0 0 0.5rem 1rem;
}
.center {
	text-align: center;
}
table {
	border-collapse: collapse;
}
td, th {
	padding: 0.2rem 0.6rem;
	border: 1px solid var(--line);
	vertical-align: top;
	text-align: left;
}
th {
	background: light-dark(#e2e2e2, #2a2a2a);
}
dd {
	margin-bottom: 0.5rem;
}
pre {
	overflow-x: auto;
}

@media (max-width: 45rem) {
	:root {
		--strip: 0;
	}
	body {
		grid-template-columns: 1fr;
	}
	header {
		grid-row: auto;
		display: flex;
		gap: 1rem;
		align-items: start;
	}
	header img {
		width: 4.5rem;
		margin: 0;
	}
	header nav {
		flex: 1;
		grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
	}
	main, footer {
		padding: 1rem;
	}
}
