:root {
	--foreground-color: black;
	--background-color:  #C0C0C0;
	--key-color: #555;
	--hover-color: #0f0;
}

html {
	/* Stop iOS Safari from inflating text inside wide content blocks,
	   which otherwise makes the two pages render at different sizes. */
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}
body {
	font-size: 0.9em;
	box-sizing: content-box;
	margin: 0;
	font-family: Simple Console;
	background-color: var(--background-color);
}
a {
	color: var(--foreground-color);
	text-decoration: none;
	/* Disable the iOS Safari long-press link preview/callout. */
	-webkit-touch-callout: none;
}
a:hover {
	text-decoration: underline;
}

figure {
	margin: 0;
}
figcaption {
	margin-top: 0.5em;
	color: var(--key-color);
}

section {
	margin-bottom: 3em;
	padding-top: 0.5em;
}

/* section:not(:first-of-type) {
	border-top: 1px solid var(--foreground-color);
} */

main {
	margin: 0;
	display: block;
	color: black;
	/* background-color: rgba(0, 0, 0, 0.7); */
	background-color: var(--background-color);
	box-sizing: border-box;
	padding: 1ch 2ch 16ch 2ch;
	position: absolute;
	top: 0;
	right: 0;
}

main.narrow {
	height: 100%;
	z-index: 1;
	overflow-y: auto;
	width: 42ch;
}
main.wide {
	width: 84ch;
	/* Never exceed the viewport: stays 84ch on desktop, clamps to
	   full width on phones, keeping the same font size on both pages. */
	max-width: 100%;
}

h1 {
	font-size: 1em;
	margin: 0 0 4em 0;
}

h2 {
	font-size: 1em;
	margin: 0 0 1em 0;
}

.key + .key {
	margin-left: 0.5em;
}

.key {
	font-size: 0.7em;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.8em;
	aspect-ratio: 1;
	margin-left: 0;
	color: var(--key-color);
	border: 1px solid var(--key-color);
	border-radius: 0.4em;
}

.editions-list {
	display: grid;
	grid-template-columns: max-content max-content max-content max-content 1fr;
	column-gap: 1em;
}
.editions-list .edition,
.editions-list .rule {
	display: grid;
	grid-template-columns: subgrid;
	grid-column: 1 / -1;
	color: var(--foreground-color);
}
.editions-list .edition:hover,
.editions-list .edition:hover * {
	background-color: var(--hover-color);
	color: var(--background-color);
	text-decoration: none;
}
.editions-note {
	grid-column: 1 / -1;
	/* margin-top: 1em; */
}
.editions-list .reserved {
	text-align: center;
}
.editions-list .number {
	display: inline-flex;
}
.editions-list .number .num {
	min-width: 2ch;
	text-align: right;
}
.editions-list .owner {
	text-align: left;
}
.keys-list {
	display: grid;
	grid-template-columns: max-content 1fr;
	/* grid-auto-rows: 1.5em; */
	column-gap: 1em;
	row-gap: 0.25em;
	align-items: center;
}
.keys-note {
	grid-column: 1 / -1;
	margin-top: 1em;
}
