:root {
	--pad: 4em;
	--width: 40em;

	--color-soft: #f4f4f4;
	--color-soft-text: #3a3a3a;
	--color-how: #d6e9f1;
	--color-how-text: #195b76;
	--color-meta: #f2e0d8;
	--color-meta-text: #753418;
}

@media screen and (width <= 34em) {
	:root {
		--pad: 2em;
	}
}

*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;

	max-width: var(--width);
	margin: 0 auto;
	padding: 0 var(--pad); 

	line-height: 1.7;
}

header {
	background-image: url("img/thread.webp");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

header > div {
	display: inline-flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 1em;
	width: 100%;
}

main {
	padding-bottom: 4em;
}

footer {
	text-align: center;
	font-style: italic;
}

footer img {
	width: 200px;
	margin-bottom: 3em;
}

.front-matter {
	font-style: italic;
	padding: 1em 1.5em;
	font-size: 0.8em;
	background-color: var(--color-soft);
	color: var(--color-soft-text);
}

figure {
	margin: 2em calc(-1 * var(--pad)); 
}

figure img {
	display: block;
	width: 100%;
	height: auto;
	margin-top: 1em;
}

aside, figcaption {
	padding: 1.5em 2em;
	line-height: 1.3;
	background-color: var(--color-soft);
	color: var(--color-soft-text);
}

h1, h2, h3 {
	margin-top: 1.5em;
	line-height: 1.2;
}

p {
	margin-bottom: 1.5em;
}

.how {
	background-color: var(--color-how);
	color: var(--color-how-text);
}

.meta {
	background-color: var(--color-meta);
	color: var(--color-meta-text);
}
