:root {
	--bg: #ffffff;
	--fg: #1c1d21;
	--muted: #5d6068;
	--line: #dfe1e6;
	--panel: #f5f6f8;
	--accent: #2f6fdb;
	--spelling: #d92626;
	--grammar: #e69500;
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #16171a;
		--fg: #e6e7ea;
		--muted: #a0a3ab;
		--line: #2c2e33;
		--panel: #1e2024;
		--accent: #6d9cf0;
	}
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
	color: var(--accent);
}

header,
main,
footer {
	max-width: 880px;
	margin: 0 auto;
	padding: 0 16px;
}

header {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	align-items: baseline;
	padding-top: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--line);
}

header .brand {
	font-weight: 700;
	color: var(--fg);
	text-decoration: none;
}

header nav {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

main {
	padding-top: 32px;
	padding-bottom: 48px;
}

footer {
	padding-top: 16px;
	padding-bottom: 32px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 14px;
}

h1 {
	font-size: 2rem;
	line-height: 1.2;
	margin: 0 0 8px;
}

h2 {
	margin-top: 40px;
}

.lead {
	font-size: 1.15rem;
	color: var(--muted);
}

.button {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--accent);
	border-radius: 6px;
	text-decoration: none;
	margin: 4px 8px 4px 0;
}

.button.primary {
	background: var(--accent);
	color: var(--bg);
}

table {
	border-collapse: collapse;
	width: 100%;
	margin: 16px 0;
}

th,
td {
	text-align: left;
	padding: 8px 12px;
	border: 1px solid var(--line);
	vertical-align: top;
}

th {
	background: var(--panel);
	font-weight: 600;
}

code {
	background: var(--panel);
	padding: 1px 4px;
	border-radius: 4px;
	font-size: 0.92em;
}

pre {
	background: var(--panel);
	padding: 12px;
	border-radius: 6px;
	overflow-x: auto;
}

pre code {
	padding: 0;
}

.spelling {
	color: var(--spelling);
	font-weight: 600;
}

.grammar {
	color: var(--grammar);
	font-weight: 600;
}

.toc {
	background: var(--panel);
	padding: 12px 16px 12px 32px;
	border-radius: 6px;
}

/* A screenshot still to capture: the data-file attribute names the image that replaces it. */
.shot {
	margin: 16px 0;
	padding: 24px 16px;
	border: 2px dashed var(--line);
	border-radius: 8px;
	color: var(--muted);
	text-align: center;
	font-size: 14px;
}

.shot::before {
	content: "Screenshot to capture: " attr(data-file);
	display: block;
	font-weight: 600;
	color: var(--fg);
	margin-bottom: 4px;
}

figure {
	margin: 16px 0;
}

figure img {
	max-width: 100%;
	border: 1px solid var(--line);
	border-radius: 6px;
}
