@import "reset.css";
@import "highlight.css";

:root {
	--w95-primary: #c0c0c0;
	--w95-primary-dark: #808080;
	--w95-primary-light: #fff;
	--w95-highlighted: #000080;
	--w95-background: #008080;

	--primary-color:         #666;
	--primary-color-light:   color-mix(in srgb, var(--primary-color), #fff 33%);
	--primary-color-lighter: color-mix(in srgb, var(--primary-color), #fff 50%);
	--primary-color-dark:    color-mix(in srgb, var(--primary-color), #000 33%);
	--primary-color-darker:  color-mix(in srgb, var(--primary-color), #000 50%);
}

html {
	margin: 0 16px;
}

body {
	max-width: 768px;
	width: 100%;
	min-width: 0;
	margin: 0 auto;
	font-size: 16px;
}

body > header {
	background-color: #000;
	color: #fff;
	height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	grid-area: header;
	margin-top: 20px;
}

body > nav {
	grid-area: nav;
	display: flex;
	gap: 12px;
	justify-content: center;
	align-items: center;
	height: 48px;
}

body > main {
	line-height: 1.3;
	grid-area: main;
	display: flex;
	flex-flow: column;
	gap: 1em;

	> h1:first-of-type {
		order: -2;
	}

	> #metadata {
		order: -1;
	}

	* { margin: 0; }

	.footnote-ref > sup { font-size: 11px; }

	> p:last-child {
		margin-bottom: 1em;
	}
}

hr {
	border: none;
	border-top: 1px solid #d0d0d0;
}

section#footnotes {
	font-size: 11px;
	background-color: #efefef;
	border-radius: 8px;

	> ol {
		margin: 1em 0;
		padding: 2px 20px 2px 32px;
	}

	> ol .footnote-back {
		margin-left: 4px;
	}

	> hr {
		display: none;
	}
}

body > footer {
	grid-area: footer;
	margin: 20px 0 20px 0;
	font-size: 11px;
	display: flex;
	align-items: center;
	background-color: #000;
	color: #fff;
	padding: 8px;

	> *:nth-child(1) {
		font-style: italic;
		font-family: serif;
		flex: 1;
		margin-left: 8px;
	}

	> *:nth-child(2) {
		display: flex;
		justify-content: center;
		flex: 2;

		> a {
			flex: 0 0 auto;
			image-rendering: crisp-edges;
		}
	}

	> *:nth-child(3) {
		flex: 1;
		text-align: right;
		margin-right: 8px;
	}
}

@media screen and (max-width: 480px) {
	body > footer {
		flex-flow: column;
		gap: 8px;

		> *:nth-child(1) {
			order: 1;
			text-align: center;
		}

		> *:nth-child(3) {
			order: 2;
		}
	}
}

a {
	color: #1e6ef4;
	text-decoration: none;

	&:hover {
		text-decoration: underline;
	}
}

pre {
	border-radius: 8px;
	background-color: #efefef;
	padding: 8px 12px;
}

p > code {
	background-color: #efefef;
	padding: 1px 2px;
	border-radius: 2px;
}

#metadata {
	font-size: 11px;
	color: #808080;
	font-style: italic;

	#metadata-date { font-style: normal; }
}

