@font-face {
	font-family: "Averia Serif Libre";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/averia-serif-libre-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Roboto Condensed";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/roboto-condensed-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Special Elite";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/special-elite-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--fg: #1a1a1a;
	--bg: rgb(255,255,230);
	--header-bg: rgba(255,255,230,0.8);
	--panel-bg: rgba(0,0,0,0);
	--section-bg: rgba(0,0,0,0.075);
	--link-visited: #1a1a1a;
	--link-hover: #1a1a1a;
	--link-active: #737373;
	--h1-shadow: rgba(255,255,230,0.3);
	--button-border: rgb(51,51,51);
	--buttondark-hover-bg: rgb(65,65,65);
}

[data-theme="dark"] {
	--fg: #ffffe6;
	--bg: rgb(51,51,51);
	--header-bg: rgba(51,51,51,0.8);
	--panel-bg: rgba(51,51,51,0.55);
	--section-bg: rgba(37,37,37,0.55);
	--link-visited: #ff66a3;
	--link-hover: #e6005c;
	--link-active: #ffffe6;
	--h1-shadow: rgba(51,51,51,0.3);
	--button-border: rgb(0,0,0);
	--buttondark-hover-bg: rgb(10,10,10);
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	background-color: var(--bg);
	overflow-wrap: break-word;
}

.flex-container {
	display: flex;
	order: 0;
	flex-direction: column;
	width: 32em;
	max-width: calc(100% - 20px);
	margin: auto;
	color: var(--fg);
	background: transparent;
}

.tab {
	margin-left: 5%;
}

.chaptertab {
	margin-left: 11%;
}

.asterisk {
	margin-left: 3%;
	font-family: sans-serif;
	font-size: 0.75em;
	font-style: italic;
}

header {
	order: 1;
	text-align: center;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 0.925em;
	width: auto;
	color: var(--fg);
	background: var(--header-bg);
}

a:link {
	color: var(--fg);
	background-color: transparent;
	text-decoration: none;
}

a:visited {
	color: var(--link-visited);
	font-weight: 600;
	background-color: transparent;
	text-decoration: none;
}

a:hover {
	color: var(--link-hover);
	background-color: rgba(0,0,0,0.075);
	text-decoration: underline overline dashed black;
	outline: 0;
}

a:active {
	color: var(--link-active);
	background-color: transparent;
	text-decoration: none;
	outline: 0;
}

nav {
	order: 2;
	text-align: center;
	font-family: Helvetica, sans-serif;
	font-size: 0.925em;
	width: auto;
	color: var(--fg);
	background: var(--panel-bg);
}

section {
	order: 3;
	align-self: center;
	font-family: "Courier New", monospace;
	font-size: 0.85em;
	padding: 1em;
	width: 70%;
	line-height: 110%;
	text-align: left;
	color: var(--fg);
	background: var(--section-bg);
}

.chapters {
	order: 4;
	align-self: center;
	font-family: "Courier New", monospace;
	font-size: 0.85em;
	text-align: left;
	text-indent: -10%;
	width: 78%;
	line-height: 0.9;
	color: var(--fg);
	background: var(--panel-bg);
}

article {
	order: 6;
	font-family: "Averia Serif Libre", Bookman, Garamond, serif;
	font-size: 1em;
	line-height: 100%;
	padding: 1em;
	width: auto;
	text-align: left;
	color: var(--fg);
	background: var(--panel-bg);
}

.extras {
	order: 7;
	align-self: center;
	font-family: "Courier New", monospace;
	font-size: 1em;
	line-height: 100%;
	text-indent: -5%;
	padding: 1em;
	width: 90%;
	text-align: left;
	color: var(--fg);
	background: transparent;
}

footer {
	order: 10;
	text-align: center;
	font-family: Helvetica, sans-serif;
	font-size: 0.925em;
	width: auto;
	color: var(--fg);
	background: var(--panel-bg);
	padding-bottom: 30px;
}

/* large special elite */
h1 {
	font-family: "Special Elite", cursive;
	font-size: 1.75em;
	text-shadow: 0 0 1px var(--h1-shadow);
}

/* special elite */
h2 {
	font-family: "Special Elite", cursive;
	font-size: 1.25em;
}

/* courier new */
h3 {
	font-family: "Courier New", monospace;
	font-size: 1em;
	font-style: italic;
}

/* part titles */
h4 {
	font-family: "Roboto Condensed", sans-serif;
	font-size: 1.1em;
	margin-left: 12px;
}

/* section */
h5 {
	font-family: "Courier New", monospace;
	font-size: 0.9em;
	font-style: italic;
	margin-left: 24px;
}

/* footnote */
h6 {
	font-family: "Courier New", monospace;
	font-size: 0.775em;
}

hr {
	height: 1px;
	border: 0;
	border-top: 1px solid #ccc;
	padding: 0;
}

strong {
	font-weight: 600;
}

blockquote {
	font-family: "Courier New", monospace;
	font-weight: 600;
	font-size: 0.85em;
	width: 90%;
	margin-left: 5%;
	margin-right: 5%;
	line-height: 100%;
	text-align: left;
	color: var(--fg);
}

sup {
	font-family: "Courier New", monospace;
	font-weight: 500;
}

img {
	display: block;
	width: 30em;
	max-width: 100%;
	height: auto;
}

img.noflex {
	width: 20px;
	height: 20px;
	vertical-align: text-bottom;
	display: inline;
}

.button {
	background-color: transparent;
	border: none;
	color: transparent;
	padding: 0;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	font-size: 1px;
	margin: 0;
	transition-duration: 0.4s;
	cursor: pointer;
}

.buttonlight {
	background-color: rgba(255,255,255,0.35);
	border: 2px solid var(--button-border);
}

.buttonlight:hover {
	background-color: rgb(253,253,253);
}

.buttondark {
	background-color: rgba(89,89,89,0.35);
	border: 2px solid var(--button-border);
}

.buttondark:hover {
	background-color: var(--buttondark-hover-bg);
}
