html {
	color: var(--text-color);
	background-color: var(--background-color);
	box-sizing: border-box;
	font-family: serif;
}

*, *::before, *::after {
	box-sizing: inherit;
}

body {
	display: flex;
	margin: 0;
	min-height: 100vh;
	max-width: 100%;
	overflow-x: hidden;
}

body > header {
	background-color: var(--background-highlights-color);
	padding: 1ch;
	margin: 0 2em 0 0;
	min-height: 100%;
	width: 40ch;
	z-index: 1;
}

body > header > h1 {
	margin: 0.5ch auto;
	width: fit-content;
}

body > section {
	padding: 1ch;
	display: flex;
	flex-direction: column;
	flex: 1;
}

body > section > article {
	flex: 1;
}

h1 {
	color: var(--emphasis-text-color);
	font-size: 2em;
}

hr {
	width: 80%;
	border: none;
	border-top: 1px solid var(--text-color);
}

a:link {
	color: var(--blue-color);
	border-color: var(--blue-color);
}

a:visited {
	color: var(--violet-color);
	border-color: var(--violet-color);
}

p img {
	vertical-align: middle;
	margin: 0 0.5em;
}

article {
	max-width: 80ch;
}

article img {
	max-width: 100%;
	height: auto;
}

#enclave-webring {
	width: 256px;
	height: 64px;
}

@keyframes spin {
	to {
	transform: rotate(0deg);
	}
}

h1:not(header h1), h2:not(header h2), h3:not(header h3) {
	position: relative;
	background: var(--background-highlights-color);
	border-width: 1px;
	border-style: outset;
	border-color: var(--box-l1-outer-topleft-color) var(--box-l1-outer-botright-color) var(--box-l1-outer-botright-color) var(--box-l1-outer-topleft-color);
	padding: 0.8ch;
	width: fit-content;
}

h1:not(header h1):before, h2:not(header h2):before, h3:not(header h3):before {
	position: absolute;
	content: "";
	display: block;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-width: 1px;
	border-style: outset;
	border-color: var(--box-l1-inner-topleft-color) var(--box-l1-inner-botright-color) var(--box-l1-inner-botright-color) var(--box-l1-inner-topleft-color);
	pointer-events: none;
}

@media (prefers-contrast: no-preference), (prefers-contrast: less) {
	body > header {
		box-shadow: 0.5em 0 2em -0.5em black;
	}

	footer {
		position: relative;
	}

	footer:before {
		position: absolute;
		content: "";
		display: block;
		top: 1ch;
		left: -45ch;
		width: 100vw;
		height: 100%;
		z-index: -1;
		background-color: var(--footer-background-color);
	}
}

@media (prefers-contrast: more) {
	body > header {
		border-style: solid;
		border-width: 0 1ch 0 0;
		border-color: var(--text-color);
	}
}

footer {
	max-width: 80ch;
	padding-top: 1em;
	padding-bottom: 1em;
}

footer > section {
	display: inline-block;
	vertical-align: middle;
	max-width: 46ch;
}

footer > section ul {
	max-width: 80ch;
	padding: 0;
	text-align: center;
}

footer > section > h3 {
	display: none;
}

footer > section ul > li {
	display: inline-block;
	width: 88px;
	height: 31px;
	overflow: hidden;
	container-type: size;
	background-color: var(--background-highlights-color);
}

footer > section ul > li > a {
	display: inline-block;
	width: 88px;
	height: 31px;
	font-size: small;
	text-align: center;
	line-height: 200%;
	border: 2px outset currentcolor;
}

footer > section ul > li > img {
	border: 2px outset currentcolor;
}

footer > section ul > li img {
	image-rendering: pixelated;
	margin-top: -2px;
	margin-left: -2px;
}
