/* Original:
html {
	--black: #000000;
	--white: #eeeeee;
	--darkgray: #222222;
	--medgray: #888888;
	--lightgray: #cccccc;
	--lightergray: #dddddd;
	--progtop: #d3d3d3;
	--progbot: #c4c4c4;
	--link: #875;
	--alink: #aa8;
}
*/

html {
	--black: #130b04; /* Used for overall background in night mode and text in day mode */
	--white: #fff9dd; /* Used for overall background in day mode and menu options when hovered */
	--darkgray: #442200; /* Used for transcript text/background depending on mode */
	--medgray: #7e6801; /* Used for the menu lines, "close" button on the transcript, and "about" background */
	--lightgray: #eddc8e; /* Used for text in night mode, menu background, progress bar outline */
	--lightergray: #fbf0be; /* Used for menu lines and "close" button hover, transcript text/background */
	--progtop: var(--alink); /* Top half of the progress bar */
	--progbot: var(--link); /* Bottom half of the progress bar */
	--link: #9d520f; /* Links */
	--alink: #ff7800; /* Hovered links */
}

body {
	background-color: var(--white);
	color: var(--black);
}

body.night { /* ADDED DMS */
	background-color: var(--black);
	
	/* Override the link and progbar colors for night mode */
	--progtop: var(--alink); /* Top half of the progress bar */
	--progbot: var(--link); /* Bottom half of the progress bar */
	--link: #cfac05; /* Links */
	--alink: #ffd200; /* Hovered links */
}

body.enlarge { /* ADDED DMS */
	font-size: 2em;
}

/* NEW DMS to use a and h2 elements where appropriate */
h2 { /* This undoes the normal h2 styling from https://searchfox.org/mozilla-central/source/layout/style/res/html.css */
	display: inline;
	font-size: 1em;
	font-weight: normal;
}

#aacontainer {
	max-width: 60ch;
	margin: auto;
	position: relative;
	line-height: 1.35em;
}

#aaouterstatus {
	padding-top: 20px;
	min-height: 1.2em;
	line-height: 1em;
}

#aastatusborder {
	height: .1em;
	background-color: var(--black);
	opacity: 0;
	animation-fill-mode: both;
}

.night #aastatusborder { /* ADDED DMS */
	background-color: var(--lightgray);
}

#aastatus {
	padding-left: .3em;
	padding-right: .3em;
	font-family: Helvetica, sans-serif;
	min-height: 1.2em;
	overflow: hidden;
	display: none;
	animation-name: fadein;
	animation-duration: .9s;
	animation-delay: .1s;
	animation-fill-mode: both;
}

.aaprogress {
	background-color: var(--progbot);
	height: .31em;
	border-top: .19em solid var(--progtop);
}

.aaouterprogress {
	border-radius: .3em;
	border: .1em solid var(--lightgray);
	margin-top: .2em;
	text-align: left;
	overflow: hidden;
}

#aamenubutton {
	height: 1.3em;
	width: 1.0em;
	float: right;
	margin-left: .3em;
	padding-right: .3em;
	position: relative;
}

#aamenulines {
	margin-top: .3em;
	width: 1.0em;
	height: .125em;
	border-top: .375em double var(--medgray);
	border-bottom: .125em solid var(--medgray);
	cursor: pointer;
	float: right;
}

#aamenulines:hover {
	border-color: var(--lightergray);
}

.aacb {
	width: 1em;
	height: 1em;
	vertical-align: middle;
}

#aamenu {
	z-index: 1;
	display: none;
	position: relative;
	top: .5em;
	left: -18.6ch;
	width: 19.7ch;
	overflow: hidden;
	font-size: .8em;
}

#aamenulist {
	background-color: var(--lightgray);
	border: 2px solid #eee;
	border-radius: .3em;
	padding: .2em;
	z-index: 1;
}

#aamenulist div {
	margin: 1px;
	overflow: hidden;
	cursor: pointer;
}

#aamenulist div:hover {
	color: var(--white);
}

#aaform {
	margin: 0;
}

#aamain {
	overflow-y: auto;
	font-family: Garamond, serif;
	height: 80%;
	margin: .3em;
	padding-right: 1.3em;
	clear: right;
}

#aascriptouter {
	height: 80%;
	margin: .3em;
	padding-right: 1.3em;
	clear: right;
	display: none;
}

#aascriptinner {
	width: 100%;
	border: 0px;
	padding: .2em;
	/* ADDED DMS */
	background-color: var(--lightergray);
	color: var(--darkgray);
}

.night #aascriptinner { /* ADDED DMS */
	background-color: var(--darkgray);
	color: var(--lightergray);
}

#aascriptclose {
	border: .1em solid black;
	border-radius: .3em;
	width: 20ch;
	text-align: center;
	margin: auto;
	padding: .1em;
	background-color: var(--medgray);
}

#aascriptclose:hover {
	background-color: var(--lightergray);
}

#aainput {
	width: 100%;
	border: none;
	outline: none;
	font-family: Garamond, serif;
	font-size: 1em;
	display: none;
	background-color: transparent;
	color: var(--black);
	padding: 0;
	height: 1.1em;
}

.night #aainput { /* ADDED DMS */
	color: var(--lightgray);
}

@keyframes fadein {
	0% {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

p {
	margin: 0;
	animation-name: fadein;
	animation-duration: .9s;
	animation-delay: .1s;
	animation-fill-mode: both;
	color: var(--black);
	width: 100%;
}

.night p { /* ADDED DMS */
	color: var(--lightgray);
}

#aastatus p {
	animation-name: none;
	animation-duration: 0;
	animation-delay: 0;
}

a {
	text-decoration: inherit;
}

.aalink {
	color: var(--link);
	cursor: pointer;
}

.aalink:hover {
	color: var(--alink);
}

.aailink {
	color: var(--link);
}

.aailink:hover {
	color: var(--alink);
}

@keyframes fadelink {
	0% {
		color: var(--link);
	}
	to {
		color: inherit;
	}
}

.aadeadlink {
	animation-name: fadelink;
	animation-duration: .9s;
	animation-delay: .1s;
	animation-fill-mode: both;
	cursor: text;
}

.aahidelink {
	color: inherit;
	cursor: text; /* ADDED DMS since now they're <a>s */
}

.aareveal {
	margin-top: .8em;
	margin-bottom: .8em;
	color: var(--link);
	animation-name: fadein;
	animation-duration: .9s;
	animation-delay: .1s;
	animation-fill-mode: both;
	text-align: center;
	font-size: .8em;
}

.aareveal:hover {
	color: var(--alink);
}

#aaaboutouter {
	position: absolute;
	top: 20%;
	width: 100%;
	z-index: 2;
	display: none;
}

#aaerrorouter {
	position: absolute;
	top: 20%;
	width: 100%;
	z-index: 2;
	display: none;
}

#aaaboutinner {
	background-color: var(--medgray);
	border: .1em solid black;
	border-radius: .3em;
	width: 20em;
	margin: auto;
	padding: 1em;
}

.aaaboutline {
	text-align: center;
}

#aaaboutmeta {
	white-space: pre-line;
}

.aaerrorline {
	margin-top: 1em;
	margin-bottom: 1em;
}

img {
	max-width: 100%;
}

.aaspacen {
	display: inline-block;
}

.aaspanb {
	font-weight: bold;
}

.aaspani {
	font-style: italic;
}

.aaspanf {
	font-family: webkit-workaround, monospace;
	font-size: 1em;
}

.aaspanunb {
	font-weight: normal;
}

.aaspanuni {
	font-style: normal;
}

.aaspanunf {
	font-family: Garamond, serif;
}
