@font-face {
	font-family: "IM Fell Double Pica";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("/fonts/fell-double-pica.woff2") format("woff2");
}

@font-face {
	font-family: "IM Fell Double Pica";
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
	src: url("/fonts/fell-double-pica-italic.woff2") format("woff2");
}

@font-face {
	font-family: "IM Fell English";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("/fonts/fell-english.woff2") format("woff2");
}

@font-face {
	font-family: "IM Fell English";
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
	src: url("/fonts/fell-english-italic.woff2") format("woff2");
}

@font-face {
	font-family: "Literata";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("/fonts/literata.woff2") format("woff2");
}

@font-face {
	font-family: "Literata";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("/fonts/literata-italic.woff2") format("woff2");
}

@font-face {
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("/fonts/plex-sans.woff2") format("woff2");
}

@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/fonts/plex-mono-400.woff2") format("woff2");
}

@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("/fonts/plex-mono-500.woff2") format("woff2");
}

:root {
	--ground: #f2ecdf;
	--sheet: #f6f1e8;
	--field: #fffdf9;
	--ink: #21160b;
	--ink-2: #4f4232;
	--ink-3: #6a5538;
	--line: #ddd2bd;
	--line-soft: #ece5d7;
	--code: #efe7d6;
	--accent: #8e2415;
	--link: #8a2c12;
	--on-accent: #fffdf9;
	--lapis: #1d4f86;
	--ochre: #e0ac3a;
	--band-edge: #120a03;
	--band-gap: #e8d49e;
	--font-display: "IM Fell Double Pica", "Iowan Old Style", Palatino, Georgia, serif;
	--font-accent: "IM Fell English", "Iowan Old Style", Palatino, Georgia, serif;
	--font-body: "Literata", "Iowan Old Style", Georgia, serif;
	--font-ui: "IBM Plex Sans", system-ui, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
	--font-size: 17px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--ground: #17120d;
		--sheet: #1e1812;
		--field: #2a2219;
		--ink: #efe6d6;
		--ink-2: #d2c4ad;
		--ink-3: #ad9a7e;
		--line: #463a2c;
		--line-soft: #352b20;
		--code: #2e251b;
		--accent: #d9694d;
		--link: #e8896b;
		--on-accent: #17120d;
		--lapis: #7ea7d8;
		--ochre: #e6b955;
		--band-edge: #000000;
		--band-gap: #8a7a4f;
		color-scheme: dark;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
	hyphens: auto;
	font-family: var(--font-ui);
}

body {
	margin: 15px;
	background: var(--ground);
	color: var(--ink);
	font: var(--font-size)/1.6 var(--font-body);
	min-height: calc(100vh - 30px);
	display: flex;
	flex-direction: column;
}

.band {
	height: 7px;
	background:
		linear-gradient(var(--band-edge), var(--band-edge)) 0 0/100% 1px no-repeat,
		linear-gradient(var(--band-edge), var(--band-edge)) 0 100%/100% 1px no-repeat,
		repeating-linear-gradient(
			90deg,
			#1d4f86 0 16px,
			var(--band-gap) 16px 18px,
			#8e2415 18px 34px,
			var(--band-gap) 34px 36px,
			#2e7d5b 36px 52px,
			var(--band-gap) 52px 54px,
			#e0ac3a 54px 70px,
			var(--band-gap) 70px 72px
		);
}

a.card:hover,
nav a:hover {
	background: var(--line-soft);
	color: var(--ink);
}

a.card::after {
	content: "→";
	color: var(--ink-3);
	transition: translate 0.15s;
	margin-left: auto;
}

a.card:hover::after {
	translate: 3px 0;
}

h1,
h2,
h3,
h4 {
	font-family: var(--font-display);
	font-weight: 400;
	line-height: 1.15;
	text-wrap: balance;
	margin: 1.4em 0 0.5em;
}

h1 {
	font-size: 2.2rem;
	margin-top: 0.3em;
}

h2 {
	font-size: 1.6rem;
	padding-bottom: 4px;
	border-bottom: 1px solid var(--line);
}

h3 {
	font-size: 1.25rem;
}

h4 {
	font-size: 1.05rem;
}

p,
ul,
ol,
dl,
blockquote,
pre,
table {
	margin: 0 0 1em;
}

p,
li {
	max-width: 70ch;
}

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

a:hover {
	color: var(--accent);
}

hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 2em 0;
}

blockquote {
	padding: 4px 0 4px 16px;
	border-left: 3px solid var(--line);
	color: var(--ink-2);
	font-style: italic;
}

dt {
	font-weight: 600;
}

dd {
	margin: 0 0 0.6em 1.2em;
	color: var(--ink-2);
}

code,
kbd,
samp {
	font: 0.88em var(--font-mono);
	background: var(--code);
	padding: 1px 4px;
}

pre {
	padding: 12px 14px;
	background: var(--code);
	border: 1px solid var(--line);
	overflow-x: auto;
	line-height: 1.45;
}

pre code {
	padding: 0;
	background: none;
}

table {
	border-collapse: collapse;
	width: 100%;
	font: 15px/1.45 var(--font-ui);
	display: block;
	overflow-x: auto;
}

th,
td {
	text-align: left;
	vertical-align: top;
	padding: 7px 10px;
	border-bottom: 1px solid var(--line-soft);
}

th {
	font-weight: 600;
	color: var(--ink-2);
	border-bottom-color: var(--line);
	background: var(--sheet);
}

figure {
	margin: 0 0 1em;
}

figcaption {
	font: italic 15px var(--font-accent);
	color: var(--ink-3);
}

details {
	margin: 0 0 1em;
	padding: 8px 12px;
	border: 1px solid var(--line);
	background: var(--field);
}

summary {
	cursor: pointer;
	font-family: var(--font-accent);
}

input,
select,
textarea {
	font: 15px var(--font-ui);
	color: var(--ink);
	background: var(--field);
	border: 1px solid var(--line);
	padding: 6px 9px;
}

input[type="checkbox"],
input[type="radio"],
input[type="range"] {
	accent-color: var(--accent);
}

form div:has(> input[type="checkbox"]) {
	flex-direction: row;
	align-items: center;
	gap: 8px;
}

button,
.button,
nav a {
	display: inline-block;
	font: 500 14px var(--font-ui);
	color: var(--ink);
	background: var(--field);
	border: 1px solid var(--ink-3);
	padding: 7px 14px;
	cursor: pointer;
	text-decoration: none;
}

nav a {
	padding: 10px;
	margin-bottom: 5px;
	flex: auto;
	max-width: 150px;
	justify-content: center;
	display: flex;
}

nav a.admin {
	margin-left: auto;
}

nav {
	display: flex;
	gap: 5px;
}

main {
	padding: 0.5rem 0;
	flex: 1;
}

.wrapper {
	box-sizing: border-box;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.attribution {
	font-size: 0.8rem;
}

button:hover,
.button:hover,
input[type="submit"]:hover {
	background-color: var(--ochre);
	cursor: pointer;
}

button:disabled {
	opacity: 0.5;
	cursor: default;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--lapis);
	outline-offset: 2px;
}

.card {
	display: block;
	padding: 14px 16px;
	background: var(--field);
	border: 1px solid var(--line);
	flex: 1 1 0;
	text-decoration: none;
}

.card.image {
	flex: auto;
	display: flex;
	flex-direction: column;
}

.card.image:hover img {
	opacity: 60%;
}

.card.image img {
	transition: opacity 0.3s;
}

.card span {
	color: var(--ink);
}

.overview {
	display: flex;
	gap: 20px;
}

.overview > div {
	flex: 1 1 0;
}

.overview .info {
	overflow-y: auto;
	border-left: 1.5px solid var(--line);
	padding-left: 20px;
	flex: 2;
	display: flex;
	flex-direction: column;
}

body:has(.limit) {
	height: calc(100dvh - 30px);
}

body:has(.limit) .wrapper,
main:has(.limit) {
	min-height: 0;
}

main:has(.limit) {
	display: flex;
	flex-direction: column;
}

main > .limit,
main > .overview:has(> .limit) {
	flex: 1;
	min-height: 0;
}

.limit {
	overflow-y: auto;
	overscroll-behavior: contain;
}

.month {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 6px;
}

.month + .band {
	margin-bottom: 10px;
}

.overview .gallery {
	flex: 4;
}

.image-detail img {
	object-fit: contain;
	max-height: 80vh;
	max-width: 100%;
	align-self: center;
}

main:has(> .fill) {
	display: flex;
	flex-direction: column;
}

.fill {
	flex: 1;
}

.overview .image-detail {
	flex: 5;
	justify-content: center;
	display: flex;
}

.cards {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.no-top-margin {
	margin-top: 0;
}

.card.image img {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.personal-info {
	display: flex;
	gap: 10px;
	margin-bottom: 10px;

	div.image {
		max-width: 128px;
		flex: 1 1 0;
	}

	div {
		display: flex;
		flex-direction: column;
	}
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.read-more-content {
	max-height: 15em;
	overflow: hidden;
	mask-image: linear-gradient(black 60%, transparent);
}

.read-more-box:has(.read-more:checked) .read-more-content {
	max-height: none;
	mask-image: none;
}

.read-more-toggle {
	cursor: pointer;
	color: var(--link);
	text-decoration: underline;
}

.read-more-toggle .when-open,
.read-more-box:has(.read-more:checked) .when-closed {
	display: none;
}

.read-more-box:has(.read-more:checked) .when-open {
	display: inline;
}

.read-more:focus-visible ~ .read-more-toggle {
	outline: 2px solid var(--lapis);
	outline-offset: 2px;
}

.depicted {
	display: flex;
	flex-direction: column;
	gap: 1.5em;
}

.depicted h4 {
	margin: 0 0 0.3em;
}

.details {
	margin-top: 10px;
}

.details div {
	display: flex;
	gap: 12px;
}

.details dt {
	flex: 0 0 5em;
	color: var(--ink-2);
}

.details dd {
	margin: 0;
}

.artist-info {
	margin-top: auto;
}

.card.compact {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--ink);
	text-align: center;
	flex: 1 1 300px;
}

.cards:has(> .card.image)::after {
	content: "";
	flex: 999;
}

.card.compact img {
	width: var(--pfp-size, 32px);
}

.card.compact div span {
	flex: 1 1 0;
}

.card.compact div {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.form-list {
	--pfp-size: 64px;
}

.info a {
	text-decoration: none;
}

footer {
	border-top: 1px solid var(--line-soft);
	font: italic 14px var(--font-accent);
	color: var(--ink-3);
	flex-grow: 0;
	flex-shrink: 0;
}

footer :not(.band) {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}

.small-info {
	font: 14px var(--font-accent);
	color: var(--ink-3);
}

.page-intro {
	font: 0.8em var(--font-accent);
	color: var(--ink-3);
}

form div {
	display: flex;
	flex-direction: column;
	margin: 10px 0;
}

form h3 {
	margin-top: 1.8em;
}

.form-actions {
	flex-direction: row;
	gap: 10px;
}

.required::after {
	content: " *";
	color: var(--accent);
}

.admin-cards .card {
	--icon: url("/icons/plus-circle.svg");
}

.admin-cards .card {
	display: flex;
	align-items: center;
	gap: 5px;

	> div {
		display: flex;
		flex-direction: column;
	}
}

.edit {
	display: flex;
	padding-bottom: 5px;

	a {
		width: 100%;
		--icon: url("/icons/edit-pencil.svg");
	}
}

.add-new {
	--icon: url("/icons/plus-circle.svg")
}

main:has(.limit) > .add-new {
	flex: 0 0 auto;
}

.icon::before {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: 0.3em;
	vertical-align: -0.125em;
	background: var(--icon) center / contain
	no-repeat;
}

@media (max-width: 860px) {
	.overview:not(.fill) {
		flex-direction: column-reverse;

		.info {
			border-bottom: 1.5px solid var(--line);
			padding-bottom: 20px;
		}
	}

	.overview.fill {
		flex-direction: column;
	}

	.overview .info {
		border-left: none;
		padding: 0;
	}

	body:has(.limit) {
		height: auto;
	}

	.limit,
	.overview .info {
		overflow-y: visible;
		overscroll-behavior: auto;
	}
}
