:root {
	--desk: #e7f3f4;
	--sheet: #ffffff;
	--ink: #1e2a32;
	--muted: #4d616b;
	--line: #c9dbdf;
	--crayon: #c81e3a;
	--crayon-ink: #ffffff;
	--measure: 72rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--desk);
	color: var(--ink);
	font-family: "Source Sans 3", "Segoe UI", sans-serif;
	font-size: 1.125rem;
	line-height: 1.45;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

button,
input { font: inherit; }

.screen-reader {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.wrap {
	width: min(var(--measure), calc(100% - 2rem));
	margin-inline: auto;
}

.top {
	background: var(--sheet);
	border-bottom: 1px solid var(--line);
}

.top__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	padding: 0.85rem 0;
}

.brand {
	font-family: Fraunces, Georgia, serif;
	font-weight: 650;
	font-size: 1.45rem;
	letter-spacing: -0.02em;
	text-decoration: none;
	margin-inline-end: auto;
}

.brand:hover { color: var(--crayon); }

.find {
	display: flex;
	gap: 0.4rem;
	flex: 1 1 16rem;
	max-width: 28rem;
}

.find input {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--line);
	background: var(--sheet);
	color: var(--ink);
	border-radius: 999px;
	padding: 0.45rem 0.9rem;
}

.find button,
.print {
	border: 0;
	background: var(--crayon);
	color: var(--crayon-ink);
	border-radius: 999px;
	padding: 0.45rem 0.95rem;
	cursor: pointer;
}

.find button:hover,
.print:hover { filter: brightness(1.08); }

.find input:focus,
.find button:focus,
.print:focus,
.nav a:focus,
.sheet:focus,
.themes__list a:focus {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.nav {
	display: flex;
	gap: 1rem;
}

.nav a { text-decoration: none; font-weight: 600; }

.nav a:hover { color: var(--crayon); }

main { padding: 1.75rem 0 3rem; }

.intro h1,
.drawing h1 {
	font-family: Fraunces, Georgia, serif;
	font-weight: 560;
	font-size: clamp(2rem, 4vw, 3.1rem);
	line-height: 1.12;
	letter-spacing: -0.03em;
	margin: 0 0 0.6rem;
	max-width: 18ch;
}

.intro p,
.intro__note {
	margin: 0;
	max-width: 38rem;
	color: var(--muted);
}

.themes { margin-top: 2rem; }

.themes h2,
.pile { margin-top: 2.25rem; }

.themes h2 {
	font-size: 1.15rem;
	margin: 0 0 0.7rem;
}

.themes__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.themes__list a {
	display: inline-flex;
	gap: 0.45rem;
	align-items: baseline;
	text-decoration: none;
	background: var(--sheet);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0.35rem 0.75rem;
}

.themes__list span {
	color: var(--muted);
	font-size: 0.92rem;
}

.themes__list a:hover { border-color: var(--ink); }

.pile__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.sheet {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	text-decoration: none;
	min-width: 0;
}

.sheet__paper {
	background: var(--sheet);
	border: 1px solid var(--line);
	padding: 0.45rem;
}

.sheet__paper img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: contain;
	background: var(--sheet);
}

.sheet__name {
	font-weight: 600;
	line-height: 1.25;
}

.sheet:hover .sheet__name { color: var(--crayon); }

.empty { color: var(--muted); }

.drawing__sheet {
	margin: 1rem 0 0;
	background: var(--sheet);
	border: 1px solid var(--line);
	padding: 0.6rem;
}

.drawing__sheet img {
	width: min(100%, 52rem);
	margin-inline: auto;
}

.crumb { margin: 0 0 0.35rem; }

.crumb a { color: var(--muted); }

.drawing__text {
	max-width: 40rem;
	margin-top: 1.25rem;
}

.pager { margin-top: 1.5rem; }

.pager .nav-links {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.foot {
	border-top: 1px solid var(--line);
	background: var(--sheet);
	padding: 1rem 0 1.4rem;
	color: var(--muted);
}

.foot p { margin: 0; }

@media (max-width: 700px) {
	.top__row {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
	}

	.brand {
		margin: 0;
		font-size: 1.2rem;
	}

	.nav { margin: 0; }

	.find {
		grid-column: 1 / -1;
		max-width: none;
	}
}

@media (min-width: 720px) {
	.pile__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1040px) {
	.pile__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

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

@media print {
	.top,
	.foot,
	.find,
	.nav,
	.print,
	.crumb,
	.drawing__text { display: none !important; }

	body { background: #fff; }

	main,
	.wrap { width: auto; max-width: none; margin: 0; padding: 0; }

	.drawing__sheet { border: 0; padding: 0; }

	.drawing h1 {
		font-size: 16pt;
		max-width: none;
		margin-bottom: 8pt;
	}

	.drawing__sheet img { width: 100%; }
}
