:root {
	--available-color-schemes: light dark;
	--background: light-dark(#ffffff, #2a2a2a);
	--secondary-background: light-dark(#e4e4e4, #1c1c1c);
	--text-color: light-dark(#2e2e2e, #ffffff);
	--accent-color: light-dark(#136ca7, #105684);
	--secondary-accent-color: light-dark(#177cc0, #13669c);
	--clock-size: 16rem;
	--highlights: 1;

	color-scheme: var(--available-color-schemes);
}

body {
	background-color: var(--background);
	color: var(--text-color);
	font-family: Arial, sans-serif;
	transition: background-color .3s ease-in-out;
    max-width: 100vw;
    overflow-x: clip;
}

.centered {
	text-align: center;
	justify-self: center;
}

.tooltip {
	cursor: pointer;
}

.tooltiptext {
	visibility: hidden;
	background-color: color-mix(var(--background), var(--accent-color));
	color: var(--text-color);
	font-weight: normal;
	border-radius: 0.75rem;
	padding: 0.5rem 0.5rem;
	text-align: left;
	position: absolute;
	z-index: 1;
	box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}

.tooltip:hover .tooltiptext {
	visibility: visible;
}

.toggle {
    display: flex;
    flex-direction: row;
    align-self: center;
    padding: 0.125rem;
    background: var(--secondary-background);
    border-radius: 0.75rem;
    box-shadow: inset 0 0 calc(var(--highlights) * 0.25rem) black;
    margin: 0.5rem;
    transition: background-color .3s ease-in-out;
}

.toggle-option {
    margin: 0.25rem;
    padding: 0.5rem;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    border-radius: 0.5rem;
    color: var(--text-color);
    transition: all .1s ease-in-out;
}

.selected {
    background: var(--accent-color);
    cursor: default;
    color: white;
    box-shadow: inset 0 0 calc(var(--highlights) * 0.25rem) rgba(255, 255, 255, 0.5);
}

.toggle-option:hover {
    box-shadow: inset 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}

.topnav {
	list-style-type: none;
	margin-top: 0;
	margin-bottom: 3rem;
	padding: 0;
	overflow: hidden;
	background: var(--secondary-background);
	color: var(--text);
	border-radius: .75rem;
	box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
	transition: background-color .2s ease-in-out;
}

.topnav a.active {
	background: var(--accent-color);
    color: white;
	box-shadow: inset 0 0 calc(var(--highlights) * 0.25rem) rgba(255, 255, 255, 0.5);
}

.topnavitem {
	float: left;
}

.topnavitem a,
.dropbtn {
	display: inline-block;
	color: var(--text);
	text-align: center;
	padding: 14px 16px;
	text-decoration: none;
	transition: color .2s ease-in-out, background-color .2s ease-in-out, box-shadow .3s ease-in-out;
	background: var(--secondary-background);
}

.topnavitem a:hover,
.dropdown:hover .dropbtn {
	background: var(--secondary-accent-color);
    color: white;
    transition: color .2s ease-in-out, background-color .2s ease-in-out, color .2s ease-in-out, box-shadow .2s ease-in-out;
	box-shadow: inset 0 0 calc(var(--highlights) * 0.25rem) rgba(255, 255, 255, 0.5);
}

.topnavitem.dropdown {
	display: inline-block;
}

.dropdown-content {
	opacity: 0;
	position: absolute;
	background: var(--secondary-background);
	max-width: 160px;
	box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
	z-index: 1;
	transform: translateY(-10px);
	pointer-events: none;
	transition: color .2s ease-in-out, opacity .3s ease-in-out, transform .3s ease-in-out, box-shadow .3s ease-in-out;
}

.dropdown-content a {
	padding: 12px 16px;
	text-decoration: none;
	display: block;
	text-align: left;
}

.dropdown-content a:hover {
	background: var(--secondary-accent-color);
	color: white;
}

.dropdown:hover .dropdown-content {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.dropdown-submenu {
    position: relative;
}

.submenu-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
	position: relative;
    padding-right: 28px;
}

.submenu-btn::after {
    content: "▶";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75em;
}

.submenu-content {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 160px;
    background: var(--secondary-background);
    box-shadow: 0px 8px 16px rgba(0,0,0,.2);
    pointer-events: none;
    transform: translateX(-10px);
    transition:
        opacity .3s ease,
        transform .3s ease;
}

.dropdown-submenu:hover > .submenu-content {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.button {
	margin: 1rem;
	display: flex;
	justify-self: center;
	padding: 1rem;
	padding-left: 2.5rem;
	padding-right: 2.5rem;
	font-size: medium;
	background: var(--accent-color);
	border: 1px solid var(--secondary-background);
	border-radius: 0.5rem;
	color: white;
	text-decoration: none;
	cursor: pointer;
	box-shadow: inset 0 0 calc(var(--highlights) * 0.25rem) rgba(255, 255, 255, 0.5);
	transition: background-color .15s ease-in-out, box-shadow .15s ease-in-out, font-weight .15s ease-in-out, border .3s ease-in-out;
}

.button:hover {
	box-shadow: inset 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}

h1 {
	text-shadow: calc(var(--highlights) * 0.05rem) calc(var(--highlights) * 0.05rem) calc(var(--highlights) * 0.15rem) var(--text-color);
}

.error-header {
	font-size: 5rem;
	margin-bottom: 1rem;
}

.error-table {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 2rem;
	padding: 0.5rem;
	border-spacing: 0;
}

.error-table-header {
	box-shadow: inset 0 0 calc(var(--highlights) * 0.25rem) rgba(255, 255, 255, 0.5);
	background: var(--accent-color);
	font-weight: bold;
	color: white;
	padding: 0.5rem;
	border: 1px solid var(--text-color);
	font-weight: normal;
}

.home-buttons {
	display: flex;
	justify-self: center;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 1rem;
}

.col {
	padding: 0.5rem;
	border: 1px solid var(--text-color);
	background: var(--secondary-background);
	font-weight: normal;
}

.row {
	padding: 0.5rem;
}

footer {
	background: var(--accent-color);
	color: white;
	text-align: center;
	padding: 0.75rem;
    width: 100%;
	position: fixed;
	margin-top: auto;
	left: 0;
    bottom: 0;
	box-shadow: inset 0 0 calc(var(--highlights) * 0.25rem) rgba(255, 255, 255, 0.5);
}

.hidden {
	display: none;
}

.border-top-right {
	border-top-right-radius: 0.5rem;
}.border-top-left {
	border-top-left-radius: 0.5rem;
}.border-bottom-right {
	border-bottom-right-radius: 0.5rem;
}.border-bottom-left {
	border-bottom-left-radius: 0.5rem;
}