@charset "UTF-8";

@media (max-aspect-ratio: 1/1) {
	:root {
		--content-width: 98%;
		--nav-height: 100px;
		--nav-width: var(--content-width);
	}

	body {
		padding-top: var(--nav-height);
		font-size: 14pt;
	}

	#nav {
		right: 0;
		margin: 0 auto;
		border: 1px solid black;
		border-top: none;
		border-radius: 0 0 1mm 1mm;
	}

	#nav.stow {
		top: calc(-1 * var(--nav-height));
	}

	#nav > img {
		margin: 0 1em;
		height: 90%;
	}

	#nav > a {
		padding: 0 0.3em;
	}
}

@media (min-aspect-ratio: 1/1) {
	:root {
		--content-width: clamp(30mm, 80%, 200mm);
		--nav-height: 100vh;
		--nav-width: 45mm;
	}

	body {
		padding-left: var(--nav-width);
	}

	#nav {
		text-align: center;
	}
	#nav > img {
		margin: 1em auto;
		width: 80%;
	}

	#nav > a {
		border-top: 1px solid black;
		padding: 0.1em 0;
	}
	#nav > a:last-of-type {
		border-bottom: 1px solid black;
	}

	#nav > * {
		display: block;
	}
}


body {
	background-color: #333;
	color: #CCD;
	margin: 0;
}

header {
	text-align: center;
	font-size: 14pt;
}
#subtitle {
	font-weight: bold;
	color: #BBC;
}

#nav {
	box-sizing: border-box;
	height: var(--nav-height);
	width: var(--nav-width);
	position: fixed;
	top: 0;
	left: 0;

	padding: 0;

	background-color: #22222A;

	box-shadow: 0 0 10mm -9mm #EEA;

	font-size: 14pt;

	transition: top 200ms;

	/* Pandoc's code highlighting causes source-code text to appear through the
	 * the nav, somehow... */
	z-index: 1;
}
#nav > a {
	text-decoration: none;
	color: #ACF;
}
#nav > a:hover {
	background-color: #11111A;
	font-weight: bold;
	color: #ADF;
}


article#content {
	box-sizing: border-box;
	background-color: #222;

	padding: 2em;
	margin: 1em auto 0 auto;
	width: var(--content-width);
	min-height: calc(95vh - 4em);

	border: 1px solid black;
	border-radius: 0.4em;
	box-shadow: 0 0 10mm -9mm #EEA;

	font-size: 12pt;
}

button {
	height: fit-content;
	width: 5em;
	margin: 0 auto 0 auto;

	color: #CCD;
	background-color: #444;
	border-width: 1px;
	border-color: #DDD3;
}

/*
pre:has(> code), :not(pre) > code {
	background-color: #333338;
	border-radius: 0.3em;
	font-size: 90%;
	padding: 0 3px;
	color: #9BD;
}
*/

pre:has(> code), :not(pre) > code {
	background-color: #333;
	border-radius: 0.3em;
	font-size: 90%;
	padding: 0 3px;
	color: #CFB;
}

pre:has(> code) {
	padding: 0.2em 0 0.2em 0.5em;
	overflow: scroll;
}

a {
	color: #9BF;
}

p:has(+ ul) {
	margin-bottom: 0;
}

ul {
	list-style: outside "- ";
	margin: 0 0 1em 0;
	padding: 0 0 0 1em;
}
ul ::marker {
	font-size: 130%;
	font-weight: bold;
	color: #BCF;
}

aside {
	margin: 1em 4em;
	padding: 0.2em 0.4em;
	border-left: 2px solid #02A7;
	background-color: #3377;
	border-radius: 0.3em;
}

aside > :first-of-type { margin-top: 0; }
aside > :last-of-type  { margin-bottom: 0; }

main p:has(img.centered:first-child:last-child) {
	text-align: center;
}
