:root {
	--bg-color:         #FFFFFF;
	--nav-color:        #0083B7;
	--light-nav-color:  #9FD1E4;
	--light-nav-color2: #DFF0F6;
	--off-color:        #EFEFEF;
	--nav-off-color:    #4CA8CC;
	--link-color:       #0083B7;

	--font-color:           #222222;
	--iframe-border-color:  lightgrey;
	--font-dark-color:      #222222;
	--nav-light-font-color: var(--font-color);
	--nav-font-color:       whitesmoke;

	--logo-bg:              #002B36;
	--shadow-color:         rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg-color:         #181A1B;
		--nav-color:        #0083B7;
		--light-nav-color:  #003145;
		--light-nav-color2: #00425B;
		--off-color:        #333333;
		--nav-off-color:    #4CA8CC;
		--link-color:       #0083B7;

		--font-color:           #bebebe;
		--iframe-border-color:  black;
		--font-dark-color:      #222222;
		--nav-light-font-color: var(--font-color);
		--nav-font-color:       whitesmoke;

		--logo-bg:              #002B36;

		--shadow-color:         rgba(0, 0, 0, 0.8);
	}
}

section:not(#demo):not(#sidebar) {
	padding-left: 1em;
	padding-right: 1em;
}

::moz-section {
	background: var(--nav-color);
	color: var(--nav-font-color);
}
::section {
	background: var(--nav-color);
	color: var(--nav-font-color);
}

html {
	scrollbar-gutter: stable;
}

body {
	padding: 0;
	margin: 0;
	font-family: 'Fira Sans', sans-serif;
	background-color: var(--bg-color);
	color: var(--font-color);
}

nav {
	display: flex;
	flex-direction: row;
	align-items: center;

	width: 100%;
	height: 4em;

	background-color: var(--nav-color);
}

.nav-frame {
	max-width: 60em;
	width: 100%;
	display: flex;
	flex-direction: row;
	align-items: center;

	margin-left: auto;
	margin-right: auto;
	padding-left: 1em;
	padding-right: 1em;
}

.nav-frame > a {
	color: var(--nav-font-color);
	text-decoration: none;
}
.nav-entries > a {
	color: var(--nav-font-color);
	text-decoration: none;
}

.nav-link.top {
	font-size: 1.5em;
	font-family: 'Montserrat', sans-serif;
	padding-right: 1em;
}

.nav-entries {
	margin-left: auto;
}

.nav-link.entry {
	font-size: 1.25em;
	padding-right: 1em;
}

.nav-link.entry:last-child {
	padding-right: 0em;
}

.nav-link.menu {
	background-color: var(--nav-color);
	border: none;
	color: var(--nav-font-color);
	cursor: pointer;
	display: none;
	font-size: 1.25em;
}

#dropdown-menu {
	display: none;
	background-color: var(--nav-color);
	padding-top:    0.25em;
	padding-left:   0.5em;
	padding-right:  0.5em;
	padding-bottom: 0.5em;
}
.dropdown.entry {
	color: var(--nav-font-color);
	text-decoration: none;
	margin-left: 1em;
}
.dropdown.entry:first-child {
	margin-left: 0.5em;
}

.root {
	display: grid;
	gap: 0.75em;
	grid-template-columns: 1fr 15em;
	grid-template-rows: auto 1fr auto;

	max-width: 60em;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.root.spall {
	grid-template-columns: 1fr 15em;
	grid-template-rows: auto auto auto 1fr auto;
	max-width: 70em;
}

.root.centered {
	grid-template-columns: 1fr;
	grid-template-rows: 1fr;
	max-width: 70em;
}

.spall-frame-box {
	height: 50em;
	width: 100%;
	margin-right: auto;
	margin-left: auto;

	background-color: black;

	display: flex;
	flex-direction: column;
	align-items: center;
}

.spall-frame-box > .button-box {
	display: flex;
	flex-direction: row;
	width: 10.5em;
	justify-content: space-between;

	margin-top: 22em;
	margin-bottom: 0.5em;
}

.button-box > button {
	font-size: 14pt;
	cursor: pointer;
	border: none;
	border-radius: 5px;
	padding: 0.75em;
	background-color: var(--nav-color);
	color: var(--nav-font-color);
}
.button-box > button:hover {
	background-color: var(--nav-off-color);
}

.button-box > .manual {
	width: 2.75em;
	height: 2.75em;
}

.spall-frame {
	height: 100%;
	width: 100%;
	border: 1px solid var(--iframe-border-color);
}

#underbar {
	grid-row: 3;
	grid-column: span 2;
	margin-bottom: 0.5em;
}

#demo {
	grid-row: 2;
	grid-column: span 2;
}

.root.spall > #content {
	grid-row: 4;
}

.root.centered {
	margin-left: auto;
	margin-right: auto;
}

.root.main {
	grid-template-columns: 1fr;
	grid-template-rows: auto 1fr auto;
}
.banner {
	background-color: var(--logo-bg);
	margin-bottom: 1em;
}

.root.centered > #header {
	margin-bottom: 0.5em;
}

#header {
	grid-row: 1;
	grid-column: 1/2;
	margin-top: 1.5em;
	margin-bottom: -0.5em;
}

.header-line {
	display: flex;
	flex-direction: row;
	align-items: center;
}
.header-line > h1 {
	margin-right: 0.25em;
}
.github-link {
	display: flex;
	flex-direction: row;
	align-items: center;

	font-size: 16pt;
	text-decoration: none;
	color: black;
	margin-right: 0.125em;
}
.github-link:hover {
	color: grey;
}
.sponsors-link {
	display: flex;
	flex-direction: row;
	align-items: center;

	font-size: 16pt;
	text-decoration: none;
	color: deeppink;
}
.sponsors-link:hover {
	color: hotpink;
}

#banner-header {
	display: flex;
	flex-direction: column;
	height: fit-content;
	padding-top: 1em;
	padding-bottom: 1em;
	max-width: 60em;
	margin-left: auto;
	margin-right: auto;
}

#content {
	grid-row: 2;
	grid-column: 1;
}

.root.spall > #sidebar {
	grid-row: 4;
}

#sidebar {
	grid-row: 2;
	grid-column: 2;

	display: flex;
	flex-direction: column;
}

#sidebar > ul {
	align-self: start;
	position: sticky;
	top: 1em;
	width: 100%;

	margin: 0;
	padding: 0;

	list-style: none;

	border-radius: 8px;
	box-shadow: var(--shadow-color) 0px 0px 5px 0px, var(--shadow-color) 0px 0px 1px 0px;
}

.slug-entry {
	display: flex;
	flex-direction: row;
	padding: 0.5em;

	color: var(--font-color);
	text-decoration: none;
}
.slug-entry:first-child {
	border-top-right-radius: 8px;
	border-top-left-radius: 8px;
}
.slug-entry:last-child {
	border-bottom-right-radius: 8px;
	border-bottom-left-radius: 8px;
}

.slug-entry:not(.selected):hover {
	background-color: var(--light-nav-color2);
}
.slug-entry:not(.selected):active {
	transform: scale(1.02);
}

.slug-entry.selected {
	background-color: var(--light-nav-color);
}
.slug-entry.selected > li > p {
	color: var(--nav-light-font-color);
}
.slug-entry > li {
	margin: 0;
	padding: 0;
}
.slug-entry > li > p {
	margin: 0;
	padding: 0;
}
.slug-entry.special {
	color: var(--nav-font-color);
	background-color: var(--nav-color);

	display: flex;
	flex-direction: row;
	justify-content: center;
}
.slug-entry.special:hover {
	background-color: var(--nav-off-color);
	cursor: pointer;
}
.slug-entry.special.invisible {
	display: none;
}

.button-dumb {
	display: flex;
	flex-direction: row;
	align-items: center;
}

.literally-me {
	font-size: 16pt;
	font-style: normal;
	margin-right: 0.25em;
}


.content-highlight > h1 {
	margin-bottom: 0.5em;
}

.content-highlight:last-child > .side-by-side {
	margin-bottom: 0;
}

.side-by-side {
	display: flex;
	flex-direction: row;
	margin-bottom: 3em;
}

.side-by-side > *:first-child {
	border-top-left-radius: 12px;
	border-bottom-left-radius: 12px;
}
.side-by-side > *:last-child {
	border-top-right-radius: 12px;
	border-bottom-right-radius: 12px;
}

.side-by-side > p {
	font-size: 1.125em;
	padding: 1em;
	color: var(--font-color);
	background-color: var(--off-color);
}

.side-by-side > img {
	padding: 1em;
	object-fit: contain;
	height: auto;
	max-width: 25em;
	background-color: #002B36;
}

@media only screen and (max-width: 450px) {
	nav {
		height: 3em;
		margin-bottom: 0;
	}
	.nav-frame {
		font-size: 1.125em;
		padding-left: 0.5em;
	}
	.nav-link.entry {
		display: none;
	}
	.nav-link.menu {
		margin-left: auto;
		display: block;
	}
	.root {
		grid-template-columns: 100vw 0;
		grid-template-rows: auto 1fr auto;
		gap: 0.5em;
	}
	.root.spall {
		grid-template-columns: 100vw 0;
	}

	#header {
		margin-top: 1em;
		padding-left: 1em;
		padding-right: 1em;
	}

	#content {
		grid-column: span 2;
		padding-left: 1em;
		padding-right: 1em;
	}

	#sidebar {
		display: none;
	}

	#nav-footer {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.link-row {
		font-size: 1.5em;
	}

	pre > code {
		font-size: 0.9em;
	}

	.announce {
		font-size: 1.45em !important;
	}

	.side-by-side {
		flex-direction: column;
	}

	.side-by-side > img {
		max-width: calc(100vw - 4em);
	}

	.side-by-side > p {
		font-size: 1em;
	}

	.side-by-side > *:first-child {
		border-top-right-radius: 12px;
		border-top-left-radius: 12px;
		border-bottom-left-radius: 0px;
	}

	.side-by-side > *:last-child {
		border-bottom-right-radius: 12px;
		border-bottom-left-radius: 12px;
		border-top-right-radius: 0px;
	}
}

#nav-footer {
	grid-row: 3;
	grid-column: span 2;

	margin-bottom: 1rem;
}

.link-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
}

.link-row > a {
	text-decoration: none;
}

.newer-link {
	margin-right: auto;
}
.newer-link > i {
	margin-right: 0.25em;
}

.older-link {
	margin-left: auto;
}
.older-link > i {
	margin-left: 0.25em;
}

p, h1, h2, h3, h4, h5 {
	font-weight: normal;
	margin: 0;
	padding: 0;
}

h1 {
	margin-bottom: 0.25rem;
}

h2 {
	margin-bottom: 1rem;
}

h3 {
	margin-bottom: 0.5rem;
}

h4 {
	margin-bottom: 0.5rem;
}

h5 {
	font-size: 16px;
	margin-bottom: 0.5rem;
}

p {
	padding-bottom: 1.5rem;
	line-height: 1.65rem;
}

pre {
	display: block;
	margin: 0;
	margin-top: -1.25rem;
	margin-bottom: 1em;
	padding: 0.5rem;
	background-color: var(--off-color);
	overflow-x: auto;
	max-width: 55em;
}

code {
	padding: .1rem .1rem .1rem .1rem;
	border-radius: .2rem;
	font-family: 'Fira Code', monospace;
	font-size: 0.9rem;
	background-color: var(--off-color);
}

pre > code {
	padding: 0;
	border-radius: 0;
	tab-size: 4;
}


a {
	color: var(--link-color);
}

li {
	margin-bottom: 0.5em;
}

p+ul {
	margin-top: -0.75em;
}
ul {
	margin-top: 0em;
}

.announce {
	font-family: 'Montserrat', sans-serif;
	color: var(--nav-color);
	font-size: 3em;

	margin-left: auto;
	margin-right: auto;
}

figure {
	display: flex;
	flex-direction: column;
	align-items: center;

	margin-top: 0;
	margin-left: 0;
	margin-right: 0;
}

figure > .video-wrapper > video {
	margin-bottom: 0;
}

figcaption {
	margin-top: 0.5em;
}

img {
	max-width: 100%;
	max-height: 100%;
}

#content > img {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

p+table {
	margin-top: -1.0em;
}

table {
	border-collapse: collapse;
	margin-bottom: 1em;
}

th {
	background-color: var(--off-color);
	border: 1px solid var(--font-color);
	font-weight: normal;
	text-align: left;
	padding: 0.5em;
}
td {
	border: 1px solid var(--font-color);
	text-align: left;
	padding: 0.5em;
}

p > img {
	image-rendering: crisp-edges;
	image-rendering: pixelated;
}

.spall-link {
	display: flex;
	flex-direction: row;
	justify-content: center;
	margin-bottom: 1em;
}

.spall-link > a {
	padding: 1em;
	border-radius: 5px;
	background-color: var(--nav-color);
	color: var(--nav-font-color);
	text-decoration: none;
}

#content > img {
	margin-bottom: 1em;
}

.warning {
	display: flex;
	flex-direction: column;
	align-items: center;

	padding: 0.5em;
	background-color: palegoldenrod;
	color: var(--font-dark-color);
	border: 1px solid orange;
	border-radius: 10px;
	margin-bottom: 1em;

	max-width: 38.5em;
}

.short-notes-box {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: space-between;
	gap: 1em;

	margin-bottom: 0.5em;
}

.short-notes-box > .video-wrapper {
	max-width: 25em;
}

.info {
	display: flex;
	flex-direction: column;
	align-items: center;

	padding: 0.5em;
	background-color: #bcf6ea;
	color: var(--font-dark-color);
	border: 1px solid #6DCBB8;
	border-radius: 10px;
}

.warning > p {
	text-align: center;
	margin: 0;
	padding: 0;
}
.info > p {
	margin: 0;
	padding: 0;
}

.video-frame {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	margin-bottom: 0.25em;
	margin-top: -1em;
}
.video-frame > iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.video-wrapper {
	display: flex;
	flex-direction: column;
}
.video-wrapper > video {
	max-width: 600px;
	width: 100%;
	height: auto;
	margin-bottom: 1em;
	margin-left: auto;
	margin-right: auto;
}

.pre-spall-link {
	padding: 0;
	margin-bottom: 0.5em;
}

.spall-itch-link {
	max-width: 552px;
}

.direction {
	box-sizing: border-box;
	padding-bottom: 0.75em;
}

.direction > h2 {
	margin-bottom: 0.35em;
}
