/* Reset — Eric Meyer's "Reset CSS" v2.0 (public domain),
   http://meyerweb.com/eric/tools/css/reset/ */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* Base
   The reset predates <main>, hence the extra display rule.
   Colors give ~19:1 contrast (WCAG AAA needs 7:1); the measure stays
   under 80 characters per line; sizes are in em so user font settings
   and zoom are honored. */

main {
	display: block;
}
body {
	font-family: sans-serif;
	line-height: 1.5;
	color: #111;
	background: #fffff8;
	max-width: 36em;
	margin: 0 auto;
	padding: 0 1em;
}

/* Typography */

h1 {
	font-size: 1.5em;
	font-weight: bold;
	margin: 1em 0 0.75em;
}
h2 {
	font-size: 1.25em;
	font-weight: bold;
	margin: 1.5em 0 0.75em;
}
h3 {
	font-size: 1em;
	font-style: italic;
	font-weight: normal;
	margin: 1.5em 0 1em;
}
p, main ul, main ol, blockquote, pre, table {
	margin: 0 0 1em;
}
main ul {
	list-style: disc;
	padding-left: 1.5em;
}
main ol {
	list-style: decimal;
	padding-left: 1.5em;
}
li {
	margin-bottom: 0.25em;
}
/* A list hugs the line that introduces it, instead of sitting a full
   paragraph's height below it. Old browsers that ignore the adjacent
   selector simply keep the wider default spacing. */
main p + ul,
main p + ol {
	margin-top: -0.5em;
}
em, cite, dfn, i {
	font-style: italic;
}
strong, b, th {
	font-weight: bold;
}
code, pre, kbd, samp {
	font-family: monospace, monospace;
	font-size: 1em;
}
pre {
	overflow: auto;
}
blockquote {
	border-left: 3px solid #767676;
	padding-left: 1em;
}
hr {
	border: 0;
	border-top: 1px solid #767676;
	margin: 1.5em 0;
}
img {
	max-width: 100%;
	height: auto;
}

/* Links — always underlined; colors keep more than 7:1 contrast
   against the background. */

a {
	text-decoration: underline;
}
a:link {
	color: #0000c8;
}
a:visited {
	color: #551a8b;
}
a:focus {
	outline: 2px solid;
	outline-offset: 2px;
}
/* External-link marker. Internal links are always root-relative, so
   an href starting with "http" means external. Scoped to main: the
   footer's self-URL is absolute but not external. The second content
   declaration adds alternative text for screen readers; browsers that
   do not understand it keep the first, older browsers that ignore
   generated content show plain links — both without harm. */
main a[href^="http"]:after {
	content: "\200A\2197"; /* hair space before the arrow */
	content: "\200A\2197" / "external";
}

/* Dark scheme — follows the visitor's system preference; the light
   colors above stay the default. Browsers without media-query support
   ignore this block and keep the light rendering. Contrast stays
   above 7:1 (WCAG AAA): text 15.2:1, links 9.0:1, visited 9.6:1. */

html {
	color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
	body {
		color: #e8e8e0;
		background: #121212;
	}
	a:link {
		color: #8cb4ff;
	}
	a:visited {
		color: #d0a9ff;
	}
}

/* Skip link — visually hidden until it receives keyboard focus. */

.skip {
	position: absolute;
	left: -999em;
}
.skip:focus {
	position: static;
	display: inline-block;
}

/* Menu */

nav {
	border-bottom: 1px solid #767676;
	padding: 0.75em 0;
	margin-bottom: 1.5em;
}
nav ul {
	margin: 0;
}
nav li {
	display: inline;
	margin-right: 1em;
}
nav a[aria-current] {
	font-weight: bold;
}

/* Footer */

footer {
	border-top: 1px solid #767676;
	margin: 3em 0 1.5em;
	padding-top: 0.75em;
}
footer p {
	margin: 0;
	word-wrap: break-word; /* legacy alias, for old browsers */
	overflow-wrap: break-word;
}
