html {
	color-scheme: light dark;
}

body {
	font-family: serif;
	font-size: 1.2rem;
	line-height: 1.5;
	max-width: min(80ch, 100% - 4rem);
	padding: 0 2rem;
	color: var(--text-color);
	margin-inline: auto;
}

:root {
	--blockquote-border-color: rgba(172, 172, 172, 0.5);
	--code-block-bg-color: #292828;
	--divider-color: #272525;
	--header-spacing-vertical: 0.8rem;
	--section-spacing-vertical: 1.5rem;
	--text-color: rgba(255, 255, 255);
}

@media (prefers-color-scheme: light) {
	:root {
		--blockquote-border-color: rgba(172, 172, 172, 0.5);
		--code-block-bg-color: #191616;
		--divider-color: rgba(172, 172, 172, 0.5);
		--text-color: rgba(0, 0, 0);
	}
}


p,
h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--header-spacing-vertical);
}

h1 {
	line-height: 2.8rem;
}


img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	word-break: break-word;
}

nav {
	display: flex;
	flex-direction: row;
	justify-content: space-between;

	ul {
		display: flex;
		flex-direction: row;
		padding: 0;
		gap: 0.8rem;
	}

	li {
		list-style: none;
	}

	a {
		padding: 2px;
		text-decoration: none;
	}
}

hgroup {
	margin-bottom: var(--section-spacing-vertical);

	* {
		margin: 0;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6,
	:not(:last-child) {
		margin-bottom: 0.25rem;
	}

	.chapter {
		font-size: 0.75rem;
		letter-spacing: .075rem;
		text-transform: uppercase;
	}
}

hr {
	border-color: var(--divider-color);
	border-top-width: 1px;
}

blockquote {
	border-left: 2px solid var(--blockquote-border-color);

	p {
		font-style: italic;
		padding: 8px 16px;
	}
}

pre {
	font-size: 1rem;
	overflow: auto;
	max-width: 100%;
	padding: 0.8rem;
	color: white;
	border-radius: 4px;
	background: var(--code-block-bg-color);
}

code:not(pre code) {
	font-weight: bold;
	font-size: 1rem;
}

table {
	td:first-child {
		padding-right: 8px;
	}

	tr {
		td:first-child {
			display: flex;
			align-self: start;
		}
	}

}

section {
	margin-bottom: var(--section-spacing-vertical);
}

@media print {

	.no-print,
	.no-print * {
		display: none !important;
	}
}