/*
Theme Name: Haceria Shadowboard
Version: 1.0.7
Description: A home garage's shadow board for Haceria: white painted outlines on brown pegboard, white work cards on concrete.
Author: Haceria
License: GPL-2.0-or-later
Text Domain: haceria-shadowboard
*/

/* ── type ─────────────────────────────────────────────────────────────── */

@font-face {
	font-family: "Bricolage Grotesque";
	src: url("assets/fonts/bricolage-grotesque.woff2") format("woff2-variations"), url("assets/fonts/bricolage-grotesque.woff2") format("woff2");
	font-weight: 500 800;
	font-stretch: 75% 100%;
	font-display: swap;
}

@font-face {
	font-family: "Bitter";
	src: url("assets/fonts/bitter.woff2") format("woff2-variations"), url("assets/fonts/bitter.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Bitter";
	src: url("assets/fonts/bitter-italic.woff2") format("woff2-variations"), url("assets/fonts/bitter-italic.woff2") format("woff2");
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}

:root {
	--board: #8b5a34;
	--board-face: #b9895c;
	--peg: #4e3119;
	--paint: #ffffff;
	--concrete: #e9e8e4;
	--card: #ffffff;
	--slate: #26303a;
	--muted: #59626b;
	--marker: #f2c12e;
	--rule: #cfcdc6;
	--tint: #f6f1ea;
	--heading: "Bricolage Grotesque", "Arial Narrow", sans-serif;
	--body: "Bitter", Georgia, serif;
	--measure: 64ch;
	--pitch: 28px;
	--wrap: 76rem;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background-color: var(--concrete);
	background-image:
		radial-gradient(rgba(38, 48, 58, 0.05) 1px, transparent 1.4px),
		radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1.4px);
	background-size: 9px 11px, 13px 7px;
	color: var(--slate);
	font-family: var(--body);
	font-size: 1.125rem;
	line-height: 1.65;
	font-weight: 400;
}

h1,
h2,
h3,
h4 {
	font-family: var(--heading);
	font-stretch: 78%;
	font-weight: 760;
	line-height: 1.08;
	letter-spacing: -0.005em;
	margin: 0;
	text-wrap: balance;
}

p,
ul,
ol,
dl,
table,
figure,
blockquote,
details {
	margin: 0;
}

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

a {
	color: var(--board);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 0.16em;
}

:focus-visible {
	outline: 3px solid var(--slate);
	outline-offset: 3px;
	border-radius: 2px;
}

.board :focus-visible,
.site-foot :focus-visible {
	outline-color: var(--marker);
}

main {
	flex: 1 0 auto;
}

.site-foot {
	flex: none;
}

.skip {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 50;
	background: var(--marker);
	color: var(--slate);
	padding: 0.5rem 1rem;
	font-family: var(--heading);
	font-weight: 700;
}

.skip:focus {
	top: 1rem;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

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

/* ── the pegboard ─────────────────────────────────────────────────────── */

.board {
	background-color: var(--board);
	background-image: radial-gradient(circle, var(--peg) 0 3px, transparent 3.5px);
	background-size: var(--pitch) var(--pitch);
	background-position: calc(var(--pitch) / 2) calc(var(--pitch) / 2);
	color: var(--paint);
}

.board a {
	color: var(--paint);
}

/* A tag hung from a wire hook: the hook is drawn above, the string runs to the punched hole. */
.tag {
	position: relative;
	display: inline-block;
	padding: 0.5rem 1rem 0.45rem;
	border: 2.5px solid var(--paint);
	border-radius: 4px;
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.2;
	text-decoration: none;
	color: var(--paint);
	background: transparent;
}

.tag::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 0.32rem;
	width: 7px;
	height: 7px;
	margin-left: -3.5px;
	border-radius: 50%;
	background: var(--peg);
	box-shadow: 0 0 0 2px var(--paint);
}

.tag::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: calc(100% - 0.55rem);
	height: 1.3rem;
	width: 0;
	border-left: 2px solid var(--paint);
}

.hooked {
	position: relative;
	padding-top: 1.3rem;
}

.hooked::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 0;
	width: 11px;
	height: 11px;
	margin-left: -5.5px;
	border-radius: 50%;
	background: var(--peg);
	box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* ── header ───────────────────────────────────────────────────────────── */

.site-head {
	position: relative;
	padding-block: 1rem 1.25rem;
	border-bottom: 6px solid var(--peg);
}

.site-head .wrap {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.site-logo {
	display: block;
	width: clamp(11rem, 22vw, 14.5rem);
}

.site-logo img {
	width: 100%;
}

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

.hooks li {
	padding-top: 1.35rem;
}

.hooks .tag {
	min-width: 6.5rem;
	text-align: center;
	padding: 1.05rem 1.1rem 0.5rem;
	font-size: 1.2rem;
}

.hooks .current-menu-item > .tag,
.hooks .current-cat > .tag,
.hooks .current-menu-parent > .tag,
.hooks .current-post-ancestor > .tag {
	background: var(--paint);
	color: var(--board);
}

.hooks .tag:hover {
	background: rgba(255, 255, 255, 0.14);
}

/* ── home: hero board ─────────────────────────────────────────────────── */

.hero {
	padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem);
	overflow: hidden;
}

.hero .wrap {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: 2rem 3rem;
	align-items: center;
}

.hero h1 {
	font-size: clamp(3.1rem, 8.2vw, 7.4rem);
	font-stretch: 75%;
	font-weight: 800;
	line-height: 0.9;
	letter-spacing: -0.015em;
	color: var(--paint);
	text-wrap: balance;
}

.hero p {
	margin-top: 1.5rem;
	max-width: 34ch;
	font-size: 1.2rem;
	line-height: 1.55;
}

.hero-tools {
	width: 100%;
	max-width: 34rem;
	justify-self: end;
}

@media (prefers-reduced-motion: no-preference) {
	.hero-tools {
		transform-origin: 50% 0;
		animation: settle 1.6s cubic-bezier(0.3, 1.6, 0.4, 1) 0.2s both;
	}

	@keyframes settle {
		0% { transform: rotate(-3deg); }
		45% { transform: rotate(1.6deg); }
		75% { transform: rotate(-0.6deg); }
		100% { transform: rotate(0); }
	}
}

/* ── concrete floor and section headings ──────────────────────────────── */

.floor {
	padding-block: clamp(2.5rem, 5vw, 4rem);
}

.floor-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 2rem;
	border-bottom: 3px solid var(--slate);
	padding-bottom: 0.6rem;
}

.floor-head h2 {
	font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

.floor-head p {
	color: var(--muted);
	font-size: 1rem;
}

/* ── work cards ───────────────────────────────────────────────────────── */

.cards {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
	gap: 2.5rem 2rem;
}

/* Search mixes guides with short page hits: each card keeps its own height. */
.search .cards {
	align-items: start;
}

.workcard {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: 4px;
	box-shadow: 0 2px 0 rgba(38, 48, 58, 0.12);
	padding: 2.25rem 1.75rem 1.75rem;
}

.workcard::before {
	content: "";
	position: absolute;
	top: -0.95rem;
	left: 50%;
	width: 0.8rem;
	height: 1.75rem;
	margin-left: -0.15rem;
	border: 3px solid var(--slate);
	border-top: 0;
	border-left: 0;
	border-radius: 0 0 0.6rem 0;
}

.workcard::after {
	content: "";
	position: absolute;
	top: 0.55rem;
	left: 50%;
	width: 1.6rem;
	height: 0.45rem;
	margin-left: -0.6rem;
	border-radius: 0.3rem;
	background: var(--concrete);
	box-shadow: inset 0 1px 2px rgba(38, 48, 58, 0.35);
}

.workcard-art {
	margin: 0.75rem -0.5rem 1.25rem;
	border-radius: 3px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--board);
}

.workcard-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.niche-tag {
	align-self: flex-start;
	display: inline-block;
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1;
	padding: 0.35rem 0.6rem 0.4rem;
	border: 2px solid var(--board);
	border-radius: 3px;
	color: var(--board);
	text-decoration: none;
}

@media (min-width: 900px) {
	.cards > .workcard:only-child {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		column-gap: 2.5rem;
		align-content: start;
		padding: 2.25rem 2.25rem 2rem;
	}

	.cards > .workcard:only-child > * {
		grid-column: 2;
	}

	.cards > .workcard:only-child > .niche-tag {
		justify-self: start;
	}

	.cards > .workcard:only-child > .workcard-art {
		grid-column: 1;
		grid-row: 1 / span 6;
		margin: 0;
		align-self: start;
	}
}

.workcard h3 {
	font-size: clamp(1.55rem, 2.6vw, 1.95rem);
	margin-top: 0.75rem;
}

.workcard h3 a {
	color: var(--slate);
	text-decoration: none;
}

.workcard h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.workcard h3 a:hover {
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
}

.workcard .excerpt {
	margin-top: 0.6rem;
	color: var(--slate);
}

.workcard-meta {
	margin-top: auto;
	padding-top: 1.25rem;
	display: grid;
	gap: 0.5rem;
	font-size: 0.95rem;
}

.workcard-meta dt {
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
	color: var(--muted);
}

.workcard-meta dd {
	margin: 0;
}

.needs-inline {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.9rem;
}

.marker {
	background-image: linear-gradient(transparent 52%, var(--marker) 52%, var(--marker) 92%, transparent 92%);
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
	padding-inline: 0.1em;
}

.workcard time {
	color: var(--muted);
	font-size: 0.95rem;
}

/* ── the site's own words on the home page ────────────────────────────── */

.home-words {
	display: grid;
	grid-template-columns: minmax(0, 46rem) minmax(16rem, 22rem);
	gap: 2.5rem 3rem;
	align-items: start;
	justify-content: space-between;
}

.sheet {
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: 4px;
	padding: clamp(1.5rem, 4vw, 3rem);
}

.sheet > * + * {
	margin-top: 1.1em;
}

.sheet h2 {
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	margin-top: 1.6em;
}

.sheet > :first-child,
.prose > :first-child {
	margin-top: 0;
}

.sheet.prose > h2:first-child,
.page-sheet .prose > h2:first-child {
	border-top: 0;
	padding-top: 0;
}

.article-rest > h2:first-child {
	margin-top: 2.2em;
}

.home-slot {
	position: sticky;
	top: 1.5rem;
}

.home-slot .hook-panel {
	margin-block: 0;
}

.sheet p,
.sheet li {
	max-width: var(--measure);
}

.between {
	margin-block: 2.5rem;
}

/* ── ad slots: a panel hung apart from the reading ────────────────────── */

.hook-panel {
	position: relative;
	display: block;
	background: rgba(255, 255, 255, 0.55);
	border: 2px dashed var(--rule);
	border-radius: 4px;
	padding: 2.1rem 0.85rem 0.85rem;
	margin-block: 2.75rem;
	max-width: 100%;
	overflow: hidden;
}

.hook-panel::before {
	content: "";
	position: absolute;
	top: 0.7rem;
	left: 0.9rem;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--rule);
}

.hook-panel iframe {
	display: block;
	border: 0;
	margin-inline: auto;
	max-width: 100%;
}

.hook-tag {
	position: absolute;
	top: 0.45rem;
	left: 2rem;
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 600;
	font-size: 0.85rem;
	line-height: 1.3;
	color: var(--muted);
}

.side-slot .hook-panel {
	margin-block: 0;
}

/* ── article ──────────────────────────────────────────────────────────── */

.article {
	display: grid;
	grid-template-columns: minmax(0, 48rem) minmax(17rem, 21rem);
	grid-template-areas:
		"head needs"
		"intro side"
		"rest side";
	column-gap: clamp(2rem, 4vw, 3.5rem);
	justify-content: space-between;
	align-items: start;
	padding-block: clamp(2rem, 4vw, 3.5rem) 4rem;
}

.article-head {
	grid-area: head;
	margin-bottom: 2rem;
}

.article-head h1 {
	font-size: clamp(2.3rem, 5vw, 3.9rem);
	font-stretch: 76%;
	font-weight: 800;
	line-height: 0.98;
	margin-top: 1rem;
}

.article-head .excerpt {
	margin-top: 1rem;
	font-size: clamp(1.15rem, 2vw, 1.3rem);
	line-height: 1.5;
	max-width: 46ch;
}

.article-art {
	margin: 1.75rem 0 0;
	border-radius: 3px;
	overflow: hidden;
	background: var(--board);
	aspect-ratio: 16 / 9;
}

.article-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.byline {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 2px solid var(--concrete);
	font-size: 0.98rem;
	line-height: 1.4;
}

.byline img {
	width: 3.1rem;
	height: 3.1rem;
	border-radius: 6px;
	flex: none;
}

.byline strong {
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
	font-size: 1.1rem;
	display: block;
}

.byline .role {
	display: block;
}

.byline .dates {
	color: var(--muted);
	margin-left: auto;
	text-align: right;
}

.byline .dates span {
	display: block;
}

.needs {
	grid-area: needs;
	border-radius: 4px;
	padding: 1.5rem 1.5rem 1.75rem;
	align-self: start;
}

.needs h2 {
	font-size: 1.9rem;
	font-stretch: 76%;
	font-weight: 800;
}

.needs ul {
	list-style: none;
	padding: 0;
	margin: 1.1rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.needs li {
	position: relative;
	padding: 0.45rem 0.8rem 0.45rem 2rem;
	line-height: 1.35;
	font-size: 1rem;
	background: var(--paint);
	color: var(--slate);
	border-radius: 3px;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.needs li::before {
	content: "";
	position: absolute;
	left: 0.7rem;
	top: 50%;
	width: 0.6rem;
	height: 0.6rem;
	margin-top: -0.3rem;
	border-radius: 50%;
	background: var(--board);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4);
}

.needs li span {
	background-image: linear-gradient(transparent 55%, var(--marker) 55%, var(--marker) 92%, transparent 92%);
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

.needs .time {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 2px dashed rgba(255, 255, 255, 0.55);
	font-size: 1rem;
}

.needs .time strong {
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
}

.side-slot {
	grid-area: side;
	position: sticky;
	top: 1.5rem;
	margin-top: 2rem;
}

.article-intro,
.article-rest {
	background: var(--card);
	border-inline: 1px solid var(--rule);
	padding-inline: clamp(1.25rem, 5vw, 3.25rem);
}

.article-intro {
	grid-area: intro;
	border-top: 1px solid var(--rule);
	border-radius: 4px 4px 0 0;
	padding-top: clamp(1.5rem, 4vw, 2.75rem);
}

.article-rest {
	grid-area: rest;
	border-bottom: 1px solid var(--rule);
	border-radius: 0 0 4px 4px;
	padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.article-intro:only-of-type {
	border-bottom: 1px solid var(--rule);
	border-radius: 4px;
	padding-bottom: 2rem;
}

/* ── the reading column and its blocks ────────────────────────────────── */

.prose > * + * {
	margin-top: 1.15em;
}

.prose p,
.prose li,
.prose dd,
.prose summary,
.prose details > p {
	max-width: var(--measure);
}

.prose > p:first-child {
	font-size: 1.22rem;
	line-height: 1.6;
}

.prose h2 {
	font-size: clamp(1.75rem, 3.4vw, 2.35rem);
	margin-top: 1.8em;
	padding-top: 0.9rem;
	border-top: 3px solid var(--slate);
}

.prose h3 {
	font-size: clamp(1.3rem, 2.4vw, 1.55rem);
	font-stretch: 85%;
	font-weight: 700;
	margin-top: 1.8em;
}

.prose h2 + *,
.prose h3 + * {
	margin-top: 0.7em;
}

.prose ul {
	padding-left: 1.4rem;
}

.prose ul li::marker {
	color: var(--board);
}

.prose li + li {
	margin-top: 0.4em;
}

.prose strong {
	font-weight: 650;
}

/* Steps hang from large hooked numbers. */
.prose ol {
	list-style: none;
	padding: 0;
	counter-reset: step;
}

.prose ol > li {
	counter-increment: step;
	position: relative;
	padding: 1.35rem 0 0.4rem 4.6rem;
	min-height: 5.2rem;
}

.prose ol > li + li {
	margin-top: 0.9rem;
}

.prose ol > li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 1.35rem;
	width: 3.3rem;
	height: 3.3rem;
	display: grid;
	place-items: center;
	padding-top: 0.25rem;
	font-family: var(--heading);
	font-stretch: 75%;
	font-weight: 800;
	font-size: 2.1rem;
	line-height: 1;
	color: var(--paint);
	background: var(--board);
	border-radius: 4px;
	clip-path: polygon(14% 0, 86% 0, 100% 18%, 100% 100%, 0 100%, 0 18%);
}

.prose ol > li::after {
	content: "";
	position: absolute;
	left: 1.65rem;
	top: 0;
	width: 0.85rem;
	height: 1.7rem;
	margin-left: -0.15rem;
	border: 3px solid var(--slate);
	border-top: 0;
	border-left: 0;
	border-radius: 0 0 0.6rem 0;
}

.prose ol > li > p:first-child,
.prose ol > li > strong:first-child {
	margin-top: 0;
}

.prose figure {
	margin-block: 2.25rem;
	margin-inline: clamp(-1.5rem, -2vw, 0rem);
}

.prose figure img {
	width: 100%;
	border-radius: 3px;
	border: 1px solid var(--rule);
}

.prose figcaption,
.sheet figcaption {
	margin-top: 0.75rem;
	font-size: 0.98rem;
	line-height: 1.55;
	color: var(--slate);
	max-width: var(--measure);
}

.prose figcaption b {
	display: inline-grid;
	place-items: center;
	min-width: 1.55rem;
	height: 1.55rem;
	margin-right: 0.2rem;
	padding: 0.1rem 0.3rem 0;
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 800;
	font-size: 0.9rem;
	line-height: 1;
	border: 2px solid var(--board);
	border-radius: 3px;
	background: var(--card);
	vertical-align: 0.1em;
}

.prose aside {
	position: relative;
	background: var(--tint);
	border-left: 6px solid var(--board);
	border-radius: 0 4px 4px 0;
	padding: 1.25rem 1.5rem 1.3rem 1.5rem;
	margin-block: 2rem;
	font-size: 1.05rem;
}

.prose aside > * + * {
	margin-top: 0.7em;
}

.prose aside > p:first-child strong:first-child {
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 750;
	font-size: 1.15rem;
}

.prose blockquote {
	border-radius: 4px;
	padding: 1.5rem 1.75rem;
	margin-block: 2.25rem;
	background-color: var(--board);
	background-image: radial-gradient(circle, var(--peg) 0 3px, transparent 3.5px);
	background-size: var(--pitch) var(--pitch);
	color: var(--paint);
}

.prose blockquote p {
	font-family: var(--heading);
	font-stretch: 80%;
	font-weight: 700;
	font-size: clamp(1.35rem, 2.6vw, 1.7rem);
	line-height: 1.2;
	max-width: 36ch;
}

.prose blockquote a {
	color: var(--paint);
}

.prose details {
	border: 2px solid var(--slate);
	border-radius: 4px;
	padding: 0.9rem 1.2rem;
	background: var(--card);
}

.prose details + details {
	margin-top: 0.75rem;
}

.prose summary {
	cursor: pointer;
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1.3;
	list-style: none;
	position: relative;
	padding-right: 2.25rem;
}

.prose summary::-webkit-details-marker {
	display: none;
}

.prose summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: -0.1rem;
	width: 1.6rem;
	height: 1.6rem;
	display: grid;
	place-items: center;
	border: 2px solid var(--board);
	border-radius: 50%;
	color: var(--board);
	font-weight: 800;
}

.prose details[open] summary::after {
	content: "\2212";
}

.prose details[open] > :not(summary) {
	margin-top: 0.75rem;
}

.prose dl {
	display: grid;
	grid-template-columns: minmax(8rem, max-content) 1fr;
	gap: 0.6rem 1.25rem;
}

.prose dt {
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
	padding-top: 0.1rem;
}

.prose dd {
	margin: 0;
}

.table-rack {
	margin-block: 2rem;
	overflow-x: auto;
	border: 1px solid var(--rule);
	border-radius: 4px;
	background: var(--card);
}

.prose table {
	width: 100%;
	min-width: 34rem;
	border-collapse: collapse;
	font-size: 0.98rem;
	line-height: 1.45;
}

.prose caption {
	caption-side: top;
	text-align: left;
	padding: 0.9rem 1rem 0.7rem;
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
	font-size: 1.1rem;
	background: var(--tint);
	border-bottom: 3px solid var(--board);
}

.prose th,
.prose td {
	text-align: left;
	vertical-align: top;
	padding: 0.7rem 1rem;
	border-bottom: 1px solid var(--rule);
}

.prose thead th {
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
	color: var(--muted);
	font-size: 0.95rem;
}

.prose tbody th {
	font-weight: 650;
}

.prose tbody tr:last-child > * {
	border-bottom: 0;
}

.prose small {
	display: block;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--muted);
	padding-top: 1rem;
	border-top: 2px solid var(--concrete);
}

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

/* ── related cards under an article ───────────────────────────────────── */

.related {
	grid-column: 1 / -1;
	margin-top: 3.5rem;
}

/* The question owns the board; the publication furniture stays quiet. */
body.question-page {
	min-height: 100svh;
	background: var(--board);
	background-image: radial-gradient(rgba(78, 49, 25, 0.28) 1.2px, transparent 1.5px);
	background-size: 28px 28px;
	color: var(--paint);
}

.question-page .site-head.slim {
	flex: none;
	padding: 0.65rem 1rem 0.25rem;
	border: 0;
	background: none;
}

.question-page .site-head.slim .wrap {
	width: 100%;
	justify-content: flex-start;
}

.question-page .site-head.slim .site-logo {
	width: 6.75rem;
}

.question-page .question-screen {
	display: flex;
	align-items: center;
	padding: clamp(1.25rem, 4svh, 3rem) 0;
}

.question-page .question-screen > .wrap {
	width: min(100% - 2.25rem, 64rem);
}

.question-page .question-board {
	padding: 0;
	border: 0;
	background: none;
}

.question-page fieldset.peg-choice {
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	display: flex;
	flex-wrap: wrap;
	gap: clamp(1rem, 2.8svh, 1.85rem) 1.25rem;
}

.question-page fieldset.peg-choice legend {
	float: left;
	flex: 1 1 100%;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--paint);
	font-family: var(--heading);
	font-stretch: 82%;
	font-weight: 800;
	font-size: clamp(2.7rem, 6.4vw, 5.75rem);
	line-height: 1;
	letter-spacing: -0.025em;
	text-wrap: balance;
	clip-path: none;
}

.question-page fieldset.peg-choice legend::before,
.question-page fieldset.peg-choice p:has(> button)::before {
	content: none;
}

.question-page #peg-choice-description {
	flex: 1 1 100%;
	margin: 0;
	max-width: 43rem;
	color: var(--paint);
	font-family: var(--body);
	font-size: clamp(0.9rem, 1.6vw, 1.05rem);
	line-height: 1.5;
}

.question-page fieldset.peg-choice p:has(> button) {
	flex: 1 1 42%;
	display: flex;
	margin: 0;
	position: relative;
}

.question-page fieldset.peg-choice button {
	appearance: none;
	position: relative;
	width: 100%;
	min-height: clamp(7rem, 19svh, 11rem);
	padding: 1.2rem 3.5rem;
	border: 2px solid var(--paint);
	border-radius: 5px;
	background: var(--paint);
	color: var(--board);
	font-family: var(--heading);
	font-stretch: 82%;
	font-weight: 800;
	font-size: clamp(2.5rem, 4.8vw, 4rem);
	line-height: 1;
	text-align: left;
	cursor: pointer;
	touch-action: manipulation;
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
	animation: answer-catch 14s ease-in-out 2s 3;
}

.question-page fieldset.peg-choice p:has(> button) + p > button {
	animation-delay: 8s;
}

.question-page fieldset.peg-choice button::before {
	content: "";
	position: absolute;
	left: 1.3rem;
	top: calc(50% - 0.35rem);
	width: 0.7rem;
	height: 0.7rem;
	border-radius: 50%;
	background: var(--board);
	box-shadow: inset 0 1px 2px var(--peg);
}

.question-page fieldset.peg-choice button:hover,
.question-page fieldset.peg-choice button:focus-visible {
	border-color: var(--marker);
	background: var(--paint);
	color: var(--peg);
	animation: none;
}

.question-page fieldset.peg-choice button:focus-visible {
	outline: 3px solid var(--marker);
	outline-offset: 5px;
}

.question-page fieldset.peg-choice button:active {
	background: var(--marker);
}

.question-page fieldset.peg-choice[aria-busy="true"] button {
	animation: none;
	cursor: progress;
}

.question-page fieldset.peg-choice[aria-busy="true"] button:not([aria-busy="true"]) {
	opacity: 0.65;
}

.question-page fieldset.peg-choice button[aria-busy="true"] {
	border-color: var(--marker);
	background: var(--paint);
	color: var(--board);
}

.question-page fieldset.peg-choice button[aria-busy="true"]::after {
	content: "";
	position: absolute;
	right: 1.2rem;
	top: calc(50% - 0.65rem);
	width: 1.3rem;
	height: 1.3rem;
	border: 2px solid var(--rule);
	border-top-color: var(--board);
	border-radius: 50%;
	animation: answer-turn 800ms linear infinite;
}

.question-page fieldset.peg-choice [role="status"] {
	flex: 1 1 100%;
	min-height: 4.5em;
	margin: 0;
	padding: 0;
	background: none;
	color: var(--paint);
	box-shadow: none;
	font-family: var(--body);
	font-size: 0.875rem;
	line-height: 1.5;
	text-align: left;
}

.question-page .site-foot.slim {
	margin: 0;
	padding: 0.75rem 1.125rem 1rem;
	border: 0;
	background: none;
	color: var(--paint);
}

.question-page .site-foot.slim .wrap {
	display: block;
	width: min(100%, 64rem);
}

.question-page .site-foot.slim p {
	margin: 0 0 0.35rem;
	font: 0.75rem/1.5 var(--body);
}

.question-page .site-foot.slim a {
	color: inherit;
}

.question-page .site-foot.slim .hooks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 0.85rem;
	margin: 0;
	padding: 0;
}

.question-page .site-foot.slim .hooks li {
	padding: 0;
}

.question-page .site-foot.slim .hooks li::before,
.question-page .site-foot.slim .hooks li::after,
.question-page .site-foot.slim .tag::before,
.question-page .site-foot.slim .tag::after {
	content: none;
}

.question-page .site-foot.slim .tag {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--paint);
	font: 0.75rem/1.6 var(--body);
	min-width: 0;
	animation: none;
	transform: none;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	box-shadow: none;
}

@keyframes answer-catch {
	0%, 79%, 100% { box-shadow: inset 0 0 0 0 transparent; }
	86%, 90% { box-shadow: inset 0 0 0 3px var(--marker); }
}

@keyframes answer-turn {
	to { transform: rotate(1turn); }
}

@media (max-width: 40rem) {
	.question-page fieldset.peg-choice legend { font-size: clamp(2.4rem, 10.5vw, 3.7rem); }
	.question-page fieldset.peg-choice p:has(> button) { flex-basis: 100%; }
	.question-page fieldset.peg-choice button { min-height: clamp(5.5rem, 14svh, 8rem); }
}

@media (max-width: 40rem) and (max-height: 700px) {
	.question-page .question-screen { padding-block: 0.8rem; }
	.question-page fieldset.peg-choice { row-gap: 0.85rem; }
	.question-page fieldset.peg-choice legend { font-size: 2.35rem; }
	.question-page fieldset.peg-choice button { min-height: 5.25rem; }
	.question-page #peg-choice-description { font-size: 0.8rem; }
	.question-page .site-foot.slim { padding-top: 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
	.question-page fieldset.peg-choice button,
	.question-page fieldset.peg-choice button[aria-busy="true"]::after {
		animation: none;
		transition: none;
	}
}

/* Regular pages leave room to scroll their footer above the cookie notice. */
body:has(> .bench-card:not([hidden])) .site-foot {
	padding-bottom: calc(2rem + var(--notice-room, 11rem));
}

/* ── the cookie choice on the cookies page ────────────────────────────── */

div.peg-choice {
	margin-block: 2rem;
	padding: 1.4rem 1.5rem;
	background: var(--tint);
	border: 2px solid var(--board);
	border-radius: 4px;
}

div.peg-choice > * + * {
	margin-top: 0.8rem;
}

.peg-status {
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
	color: var(--board);
}

.peg-status:empty {
	display: none;
}

.bench-card button,
div.peg-choice button {
	appearance: none;
	cursor: pointer;
	min-width: 7.5rem;
	padding: 0.6rem 1.2rem 0.5rem;
	margin-right: 0.6rem;
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.2;
	color: var(--slate);
	background: var(--card);
	border: 2.5px solid var(--slate);
	border-radius: 4px;
}

.bench-card button:hover,
div.peg-choice button:hover {
	background: var(--slate);
	color: var(--paint);
}

/* ── the measurement notice, a card on the bench at the foot of the window ── */

.bench-card {
	position: fixed;
	z-index: 40;
	left: 1rem;
	right: 1rem;
	bottom: 1rem;
	max-width: 46rem;
	margin-inline: auto;
	padding: 1.1rem 1.25rem 1.2rem;
	background: var(--card);
	color: var(--slate);
	border: 1px solid var(--rule);
	border-top: 6px solid var(--board);
	border-radius: 4px;
	box-shadow: 0 10px 30px rgba(38, 48, 58, 0.25);
	font-size: 1rem;
	line-height: 1.5;
}

.bench-card p {
	margin: 0 0 0.85rem;
}

/* ── archive band, pages, search, missing page ────────────────────────── */

.band {
	padding-block: clamp(2rem, 5vw, 3.5rem);
	overflow: hidden;
}

.band .wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 1.5rem 3rem;
	align-items: center;
}

.band h1 {
	font-size: clamp(2.8rem, 7vw, 5.6rem);
	font-stretch: 75%;
	font-weight: 800;
	line-height: 0.92;
}

.band p {
	margin-top: 1rem;
	font-size: 1.15rem;
	max-width: 46ch;
}

.band-tools {
	width: clamp(9rem, 22vw, 15rem);
}

.page-sheet {
	max-width: 50rem;
	margin-block: clamp(2rem, 4vw, 3rem) 4rem;
}

.page-sheet h1 {
	font-size: clamp(2.2rem, 5vw, 3.4rem);
	font-stretch: 76%;
	font-weight: 800;
	line-height: 1;
}

.page-sheet .lede {
	margin-top: 0.9rem;
	font-size: 1.2rem;
	color: var(--slate);
}

.page-sheet .prose {
	margin-top: 2rem;
}

.page-sheet .updated {
	margin-top: 0.75rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.about-mark {
	float: right;
	width: 5.5rem;
	margin: 0 0 1rem 1.5rem;
	border-radius: 8px;
}

.page-sheet .about-mark + h1 {
	margin-top: 0.4rem;
}

.searchform {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
	max-width: 36rem;
}

.searchform input[type="search"] {
	flex: 1 1 14rem;
	min-width: 0;
	padding: 0.7rem 0.9rem;
	font: inherit;
	color: var(--slate);
	background: var(--card);
	border: 2.5px solid var(--slate);
	border-radius: 4px;
}

.searchform button {
	appearance: none;
	cursor: pointer;
	padding: 0.7rem 1.3rem 0.6rem;
	font-family: var(--heading);
	font-stretch: 85%;
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--paint);
	background: var(--board);
	border: 2.5px solid var(--board);
	border-radius: 4px;
}

.board .searchform input[type="search"] {
	border-color: var(--paint);
}

.board .searchform button {
	background: var(--paint);
	color: var(--board);
	border-color: var(--paint);
}

.empty-place {
	width: clamp(8rem, 20vw, 12rem);
}

.nothing {
	padding: 1.75rem;
	text-align: left;
}

/* ── footer ───────────────────────────────────────────────────────────── */

.site-foot {
	border-top: 6px solid var(--peg);
	padding-block: 2.5rem 2rem;
	margin-top: 2rem;
}

.site-foot .wrap {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 1.5rem 2rem;
	align-items: start;
}

.site-foot .foot-mark {
	width: 4.5rem;
	border-radius: 8px;
	box-shadow: 0 0 0 3px var(--paint);
}

.site-foot p {
	font-size: 1rem;
	line-height: 1.55;
	max-width: 60ch;
}

.site-foot .hooks {
	margin-top: 0.5rem;
	gap: 0.9rem;
}

.site-foot .hooks li {
	padding-top: 1.1rem;
}

.site-foot .tag {
	font-size: 0.95rem;
	padding: 0.85rem 0.75rem 0.35rem;
	border-width: 2px;
}

.site-foot .small {
	grid-column: 1 / -1;
	font-size: 0.92rem;
	opacity: 0.92;
}

/* ── narrow screens ───────────────────────────────────────────────────── */

@media (max-width: 1100px) {
	.article {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"head"
			"needs"
			"intro"
			"side"
			"rest";
		max-width: 50rem;
	}

	.needs {
		margin-bottom: 2rem;
	}

	.side-slot {
		position: static;
		margin-top: 0;
		background: var(--card);
		border-inline: 1px solid var(--rule);
		padding: 0 clamp(1.25rem, 5vw, 3.25rem) 0.5rem;
	}

	.home-words {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 760px) {
	.hero .wrap,
	.band .wrap {
		grid-template-columns: minmax(0, 1fr);
	}

	.hero-tools {
		justify-self: start;
		max-width: 22rem;
	}

	.band-tools {
		display: none;
	}

	.site-head .wrap {
		align-items: center;
	}

	.hooks {
		gap: 0.8rem;
	}

	.hooks .tag {
		min-width: 0;
		font-size: 1rem;
		padding-inline: 0.8rem;
	}

	.byline {
		flex-wrap: wrap;
	}

	.byline .dates {
		margin-left: 0;
		text-align: left;
		flex-basis: 100%;
	}

	.prose ol > li {
		padding-left: 3.9rem;
	}

	.prose ol > li::before {
		width: 2.8rem;
		height: 2.8rem;
		font-size: 1.75rem;
	}

	.prose ol > li::after {
		left: 1.4rem;
	}

	.prose dl {
		grid-template-columns: 1fr;
		gap: 0.2rem;
	}

	.prose dd + dt {
		margin-top: 0.8rem;
	}

	.site-foot .wrap {
		grid-template-columns: minmax(0, 1fr);
	}

	.bench-card {
		left: 0.5rem;
		right: 0.5rem;
		bottom: 0.5rem;
	}

	.site-foot {
		--notice-room: 16.5rem;
	}

}

.prose code {
	font-family: var(--heading);
	font-stretch: 90%;
	font-weight: 650;
	font-size: 0.95em;
	padding: 0.05em 0.35em;
	background: var(--tint);
	border: 1px solid var(--rule);
	border-radius: 3px;
}

/* The missing page: the board fills the window down to the footer. */
.error404 main {
	display: flex;
	flex-direction: column;
}

.error404 main > .band {
	flex: 1 0 auto;
	display: flex;
	align-items: center;
}
