/* CSS variables */
:root {
	--pale-blue: #2563eb;
	/* Dark mode custom colors */
	--dark-fg: #f0f0f0;
	--dark-bg: #0a0a0a;
}

html {
	font-family: sans-serif;
	margin: auto;
}

@media (prefers-color-scheme: dark) {
	html {
		color: var(--dark-fg);
		background-color: var(--dark-bg);
	}
}

nav {
	display: flex;
	flex-direction: row;
	align-items: center;
	column-gap: 1rem;
	padding-bottom: 0.1rem;
	border-style: none none solid none;
	border-width: 0.15rem;
}

.nav-account {
	display: flex;
	align-items: center;
	gap: 1rem;
}

@media print {
	nav {
		display: none;
	}
}

a.nav-home {
	font-size: 1.5rem;
	font-weight: bold;
	color: black;
	text-decoration: none;
	margin-right: auto;
}

a.nav-home:hover {
	text-decoration: underline;
}

a.nav-home:visited {
	color: black;
}

a.nav-link {
	font-size: 1.25rem;
	color: black;
	text-decoration: none;
	display: flex;
	align-items: center;
}

a.nav-link:hover {
	text-decoration: underline;
}

a.nav-link:visited {
	color: black;
}

@media (prefers-color-scheme: dark) {
	a.nav-home,
	a.nav-home:visited,
	a.nav-link,
	a.nav-link:visited {
		color: var(--dark-fg);
	}
}

a {
	color: var(--pale-blue);
}

a:hover {
	text-decoration: none;
}

a:visited {
	color: MediumBlue;
}

@media (prefers-color-scheme: dark) {
	a {
		color: DodgerBlue;
	}
	a:visited {
		color: var(--pale-blue);
	}
}

form {
	max-width: 400px;
	display: flex;
	flex-direction: column;
	row-gap: 0.5rem;
}

form > div {
	display: flex;
	flex-direction: column;
	row-gap: 0.25rem;
}

form input[type=text], form [type=password], form select, form button {
	width: 100%;
	box-sizing: border-box;
	display: block;
}

form input, form select {
	line-height: 1.5;
	padding: 0.25rem 0.5rem;
	font-size: 1rem;
	font-family: sans-serif;
	border-style: solid;
	border-width: 1px;
	border-color: DarkGray;
}

form > fieldset {
	margin-left: 0rem;
	margin-right: 0rem;
	display: flex;
	flex-direction: column;
	row-gap: 0.25rem;
}

form input:read-only {
	background-color: Gainsboro;
}

@media (prefers-color-scheme: dark) {
	form input, form select {
		color: var(--dark-fg);
		background-color: #404040;
		border-style: none;
	}
	form input:read-only {
		color: #a0a0a0;
		background-color: #282828;
	}
}

form button {
	margin-top: 1rem;
	color: var(--dark-fg);
	background-color: var(--pale-blue);
	border-style: none;
	line-height: 1.5;
	padding: 0.25rem 0.5rem;
	font-size: 1rem;
	font-family: sans-serif;
}

form button:hover {
	background-color: DodgerBlue;
}

form button.danger {
	background-color: Crimson;
}

.error {
	color: red;
}

/* Let the existing navbar wrap cleanly on narrow screens. */
@media (max-width: 760px) {
	nav {
		flex-wrap: wrap;
		row-gap: 0.5rem;
	}

	nav .nav-account {
		flex: 1 1 100%;
		flex-wrap: wrap;
		justify-content: flex-end;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
