/*
Theme Name: Risr Shop Table
Theme URI: https://risr.me/
Description: Folded stacks on a shop table: the theme of Risr, written for this website alone.
Version: 1.0.0
Requires PHP: 8.2
Text Domain: risr-shoptable
License: Theme code all rights reserved; Syne and Be Vietnam Pro are under the SIL Open Font License 1.1 (assets/fonts).
*/

@font-face { font-family: "Syne"; src: url("assets/fonts/syne-latin-var.woff2") format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("assets/fonts/bvp-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("assets/fonts/bvp-400italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("assets/fonts/bvp-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url("assets/fonts/bvp-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
	--chalk: #f1f0ee;
	--surface: #ffffff;
	--heather: #706a7a;
	--lilac: #b9b3c2;
	--stone: #d9d6d0;
	--ink: #1e1d22;
	--muted: #5b5663;
	--link: #4c4657;
	--head: "Syne", "Be Vietnam Pro", system-ui, sans-serif;
	--body: "Be Vietnam Pro", system-ui, sans-serif;
	--measure: 36rem;
	--wide: 46rem;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--rise: clamp(0.75rem, 3.2vw, 3rem);
	--layer-gap: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--chalk); color: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; font: 400 1.125rem/1.65 var(--body); overflow-wrap: break-word; }
body > main { flex: 1 0 auto; width: 100%; }
body > main.frame { width: min(100% - 2 * var(--gutter), 75rem); }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--head); font-weight: 700; line-height: 1.15; letter-spacing: 0.01em; text-wrap: balance; }
p { margin: 0 0 1.1em; }
.skip-to-stack { position: absolute; left: -100vw; top: 0.75rem; z-index: 30; padding: 0.6rem 1rem; background: var(--surface); color: var(--ink); font: 700 1rem/1 var(--head); }
.skip-to-stack:focus { left: 0.75rem; }
.frame { width: min(100% - 2 * var(--gutter), 75rem); margin-inline: auto; }

/* Header: the shelf front. The wordmark at the left, each menu word resting on its own short stack. */
.shelf-front { border-bottom: 2px solid var(--ink); }
.shelf-front__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; padding-top: 1.25rem; }
.shelf-front__logo { display: block; padding-bottom: 1.1rem; }
.shelf-front__logo img { width: auto; height: 3rem; }
.stack-menu { display: flex; gap: clamp(1rem, 3.5vw, 2.75rem); margin: 0; padding: 0; list-style: none; }
.stack-menu a {
	display: block;
	padding: 0.2rem 0.6rem 1.7rem 0;
	color: var(--ink);
	font: 700 1.0625rem/1.2 var(--head);
	text-decoration: none;
	background:
		linear-gradient(var(--stone) 0 0) 10px calc(100% - 20px) / calc(100% - 10px) 5px no-repeat,
		linear-gradient(var(--lilac) 0 0) 5px calc(100% - 11px) / calc(100% - 10px) 5px no-repeat,
		linear-gradient(var(--heather) 0 0) 0 calc(100% - 2px) / calc(100% - 10px) 5px no-repeat;
	transition: background-position 0.15s ease;
}
.stack-menu a:hover, .stack-menu a:focus-visible {
	background-position: 10px calc(100% - 22px), 5px calc(100% - 12px), 0 calc(100% - 2px);
}
.stack-menu .current-menu-item > a, .stack-menu .current-menu-ancestor > a, .stack-menu .current-cat > a, .stack-menu a[aria-current="page"] {
	padding-bottom: 2.3rem;
	background:
		linear-gradient(var(--ink) 0 0) 15px calc(100% - 29px) / calc(100% - 10px) 5px no-repeat,
		linear-gradient(var(--stone) 0 0) 10px calc(100% - 20px) / calc(100% - 10px) 5px no-repeat,
		linear-gradient(var(--lilac) 0 0) 5px calc(100% - 11px) / calc(100% - 10px) 5px no-repeat,
		linear-gradient(var(--heather) 0 0) 0 calc(100% - 2px) / calc(100% - 10px) 5px no-repeat;
}

/* A folded layer: white, square, topped by the band of its folded edge. */
.layer {
	position: relative;
	z-index: 1;
	background:
		linear-gradient(var(--lilac) 0 0) 0 14px / 100% 2px no-repeat,
		linear-gradient(var(--heather) 0 0) 0 0 / 100% 10px no-repeat,
		var(--surface);
	border: 2px solid var(--ink);
	padding: calc(10px + 1.5rem) clamp(1.1rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2rem);
}
.layer > :last-child { margin-bottom: 0; }
/* The two layers it rests on, stepping down and to the left. */
.stacked { position: relative; margin-left: calc(2 * var(--layer-gap)); margin-bottom: calc(2 * var(--layer-gap)); }
.stacked::before, .stacked::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--ink); }
.stacked::before { z-index: 0; background: var(--lilac); transform: translate(calc(-1 * var(--layer-gap)), var(--layer-gap)); }
.stacked::after { z-index: -1; background: var(--stone); transform: translate(calc(-2 * var(--layer-gap)), calc(2 * var(--layer-gap))); }
.stacked { isolation: isolate; }

/* Home: the rising stack. */
.rise { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--gutter); align-items: end; padding-top: clamp(2.5rem, 7vw, 5.5rem); border-bottom: 3px solid var(--ink); }
.rise__words { padding-bottom: clamp(2rem, 5vw, 4rem); }
.rise__line { margin: 0 0 1.5rem; font-size: clamp(2.6rem, 7.2vw, 6.25rem); font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.rise__lede { max-width: 31rem; margin: 0; color: var(--muted); font-size: 1.25rem; line-height: 1.55; }
.rise__stack img { width: 100%; max-width: 30rem; margin-left: auto; }

.home-layers { padding-top: clamp(3rem, 7vw, 5rem); }
.home-layers > * + * { margin-top: clamp(2.5rem, 6vw, 4rem); }
.home-layers .stacked--top { margin-left: calc(2 * var(--rise) + 2 * var(--layer-gap)); }
.home-layers .stacked--next { max-width: 54rem; margin-left: calc(var(--rise) + 2 * var(--layer-gap)); }

.guide-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.25rem, 3.5vw, 2.5rem); align-items: center; }
.guide-card__art { display: block; background: var(--chalk); border: 2px solid var(--ink); }
.guide-card__art img { width: 100%; }
.guide-card__niche { display: inline-block; margin-bottom: 0.75rem; color: var(--muted); font: 700 0.9375rem/1.3 var(--head); text-decoration: none; }
.guide-card__title { margin-bottom: 0.75rem; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.guide-card__title a { color: var(--ink); text-decoration: none; }
.guide-card__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.guide-card__excerpt { margin-bottom: 0.9rem; }
.guide-card__date { margin: 0; color: var(--muted); font-size: 0.9375rem; }

.home-text h2 { margin: 0 0 1rem; font-size: clamp(1.45rem, 2.8vw, 1.9rem); }
.home-text .home-text__body { max-width: var(--measure); }

/* Plain chalk shelves for advertising: labelled, apart from the stacks. */
.shelf-bay { display: block; clear: both; width: 100%; margin-block: clamp(2.5rem, 6vw, 4rem); padding-block: 0.9rem 1.25rem; background: var(--chalk); border-block: 2px solid var(--stone); }
/* Each frame keeps its placement's own width (the runtime holds it inside the column); a frame without one is fluid. */
.shelf-bay iframe { display: block; max-width: 100%; margin-inline: auto; border: 0; }
.shelf-bay iframe:not([width]) { width: 100%; }
.size-strip { display: block; margin: 0 0 0.6rem; color: var(--muted); font: 600 0.8125rem/1.3 var(--body); letter-spacing: 0.02em; text-align: center; }
.home-shelves { margin-top: clamp(3rem, 7vw, 5rem); }

/* Article: the title block is two folded layers beside the featured drawing. */
.title-stack { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: var(--gutter); align-items: end; padding-top: clamp(2rem, 6vw, 4rem); }
.title-stack__top { margin-left: var(--rise); }
.title-stack__niche { display: inline-block; margin-bottom: 1rem; color: var(--muted); font: 700 1rem/1.3 var(--head); text-decoration: none; }
.title-stack__niche:hover { color: var(--ink); text-decoration: underline; }
.title-stack h1 { margin-bottom: 1rem; font-size: clamp(1.6rem, 6.4vw, 3rem); font-weight: 700; line-height: 1.08; }
@media (min-width: 52rem) { .title-stack h1 { font-size: clamp(2.2rem, 3.4vw, 3rem); } }
.title-stack__excerpt { margin: 0; color: var(--muted); font-size: 1.25rem; line-height: 1.55; }
.title-stack__by { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: -2px; padding: 1rem clamp(1.1rem, 3vw, 2rem); background: var(--lilac); border: 2px solid var(--ink); }
.byline { display: flex; align-items: center; gap: 0.75rem; }
.byline img { width: 2.75rem; height: 2.75rem; border: 2px solid var(--ink); }
.byline__name { display: block; font: 700 1rem/1.25 var(--head); }
.byline__role { display: block; font-size: 0.9375rem; line-height: 1.3; }
.title-stack__dates { margin: 0; font-size: 0.9375rem; line-height: 1.45; }
.title-stack__dates span { display: block; }
.title-stack__art { margin: 0; background: var(--surface); border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--stone); }
.title-stack__art img { width: 100%; }

/* The reading column: about 66 characters. */
.reading { width: min(100% - 2 * var(--gutter), var(--measure)); margin: clamp(2.5rem, 6vw, 4rem) auto 0; }
.reading > :first-child { margin-top: 0; }
.reading h2 {
	margin: 3.25rem 0 1.25rem;
	padding-bottom: 1.1rem;
	font-size: clamp(1.55rem, 3.2vw, 2rem);
	background:
		linear-gradient(var(--lilac) 0 0) 0 calc(100% - 3px) / 100% 2px no-repeat,
		linear-gradient(var(--heather) 0 0) 0 100% / 100% 10px no-repeat;
}
.reading h3 { margin: 2.25rem 0 0.75rem; font-size: 1.3rem; }
.reading ul { padding-left: 1.25rem; }
.reading ul > li { margin-bottom: 0.4rem; }
.reading ul > li::marker { color: var(--heather); content: "\25A0\2002"; font-size: 0.8em; }
.reading strong { font-weight: 700; }

.reading ol { margin: 1.75rem 0; padding: 0; list-style: none; counter-reset: fold; }
.reading ol > li {
	position: relative;
	margin-top: -2px;
	padding: 1rem 1.1rem 1rem 4rem;
	background: linear-gradient(var(--stone) 0 0) 0 0 / 100% 5px no-repeat, var(--surface);
	border: 2px solid var(--ink);
	counter-increment: fold;
}
.reading ol > li::before {
	content: counter(fold);
	position: absolute; left: 1rem; top: 1rem;
	display: grid; place-items: center;
	width: 2.1rem; height: 2.1rem;
	background: var(--heather); color: var(--surface);
	font: 700 1.125rem/1 var(--body);
}

.reading figure { margin: 2.5rem 0; }
.reading figure img { width: 100%; background: var(--surface); border: 2px solid var(--ink); }
.reading figcaption { margin-top: 0.75rem; padding-left: 0.9rem; border-left: 4px solid var(--lilac); color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
@media (min-width: 56rem) {
	.reading figure, .reading .size-strips-shelf { margin-inline: calc((var(--measure) - var(--wide)) / 2); }
}

/* Asides: folded hang tags, cut at one end, with a turned corner. */
.reading aside {
	position: relative;
	margin: 2.25rem 0;
	padding: 1.2rem 1.6rem 1.2rem 2.6rem;
	background:
		linear-gradient(225deg, var(--chalk) 0 14px, var(--lilac) 14px 28px, transparent 28px),
		linear-gradient(90deg, var(--heather) 0 0.7rem, transparent 0.7rem),
		var(--stone);
	clip-path: polygon(1.4rem 0, 100% 0, 100% 100%, 1.4rem 100%, 0 calc(100% - 1.4rem), 0 1.4rem);
}
.reading aside > :last-child { margin-bottom: 0; }
.reading aside strong:first-child { font-family: var(--head); }

.reading blockquote { margin: 2.25rem 0; padding: 0.2rem 0 0.2rem 1.5rem; border-left: 6px solid var(--heather); box-shadow: -12px 0 0 var(--lilac); font-size: 1.3rem; line-height: 1.5; }
.reading blockquote > :last-child { margin-bottom: 0; }

.reading details { margin: 0; background: var(--surface); border: 2px solid var(--ink); }
.reading details + details { margin-top: -2px; }
.reading summary { display: flex; justify-content: space-between; gap: 1rem; padding: 0.95rem 1.1rem; font: 700 1.05rem/1.35 var(--head); list-style: none; cursor: pointer; }
.reading summary::-webkit-details-marker { display: none; }
.reading summary::after {
	content: ""; flex: none; width: 1.4rem; height: 1.05rem; margin-top: 0.2rem;
	background:
		linear-gradient(var(--heather) 0 0) 6px 0 / calc(100% - 6px) 3px no-repeat,
		linear-gradient(var(--heather) 0 0) 3px 50% / calc(100% - 6px) 3px no-repeat,
		linear-gradient(var(--heather) 0 0) 0 100% / calc(100% - 6px) 3px no-repeat;
}
.reading details[open] summary { background: var(--stone); }
.reading details[open] summary::after { background: linear-gradient(var(--ink) 0 0) 0 50% / 100% 3px no-repeat; }
.reading details > :not(summary) { padding-inline: 1.1rem; }
.reading details > :not(summary):first-of-type { padding-top: 0.9rem; }

.reading dl { margin: 1.75rem 0; border-top: 2px solid var(--ink); }
.reading dt { padding-top: 0.9rem; font: 700 1.05rem/1.3 var(--head); }
.reading dd { margin: 0.25rem 0 0; padding-bottom: 0.9rem; border-bottom: 1px solid var(--stone); }

/* Tables: size strips with an ink head row; they scroll on phones. */
.size-strips-shelf { margin: 2.25rem 0; }
.size-strips-label { margin: 0; padding: 0.75rem 1rem; background: var(--stone); border: 2px solid var(--ink); border-bottom: 0; font: 700 1rem/1.3 var(--head); }
.size-strips { overflow-x: auto; background: var(--surface); border: 2px solid var(--ink); }
.size-strips:focus-visible { outline-offset: 4px; }
.size-strips table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
.size-strips caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.size-strips thead th { padding: 0.7rem 1rem; background: var(--ink); color: var(--chalk); font: 700 0.9375rem/1.3 var(--head); text-align: left; vertical-align: bottom; }
.size-strips td, .size-strips tbody th { padding: 0.7rem 1rem; border-top: 1px solid var(--stone); text-align: left; vertical-align: top; }
.size-strips tbody th { font-weight: 700; }
.size-strips tbody tr:nth-child(even) > * { background: #f7f6f4; }

/* The close of an article: the team's note and more layers. */
.team-note { width: min(100% - 2 * var(--gutter), var(--measure)); margin: 3.5rem auto 0; }
.team-note .layer { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.1rem; }
.team-note img { width: 3.5rem; height: 3.5rem; border: 2px solid var(--ink); }
.team-note h2 { margin-bottom: 0.4rem; font-size: 1.2rem; }
.team-note p { margin: 0; font-size: 1rem; }

.more-layers { margin-top: clamp(3rem, 7vw, 5rem); }
.more-layers > h2, .layer-list-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.5rem; }

/* Archive: one column of layers, each a little to the right of the one below. */
.layer-list-head { padding-top: clamp(2.5rem, 7vw, 5rem); padding-bottom: 1rem; }
.layer-list-head h1 { margin-bottom: 0.75rem; font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 800; line-height: 1; }
.layer-list-head p { max-width: var(--measure); margin: 0; color: var(--muted); font-size: 1.2rem; }
.layer-list { margin: 2rem 0 0; padding: 0; list-style: none; max-width: 60rem; }
.layer-list > li { margin-left: calc(var(--n, 0) * var(--rise)); }
.layer-list > li + li { margin-top: -2px; }
.layer-row { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.25rem; align-items: start; padding: calc(10px + 1rem) 1.25rem 1.25rem; }
.layer-row__art { border: 2px solid var(--ink); background: var(--chalk); }
.layer-row h2 { margin-bottom: 0.4rem; font-size: 1.3rem; }
.layer-row h2 a { color: var(--ink); text-decoration: none; }
.layer-row h2 a:hover { text-decoration: underline; }
.layer-row p { margin: 0 0 0.5rem; font-size: 1rem; }
.layer-row time { color: var(--muted); font-size: 0.9375rem; }

/* Footer: the base layer, an ink fold with its fold line and waistband notch. */
.base-layer { position: relative; margin-top: clamp(4rem, 10vw, 7rem); padding: 3.25rem 0 2.5rem; background: var(--ink); color: var(--chalk); }
.base-layer::before { content: ""; position: absolute; left: 0; right: 0; top: 1rem; height: 2px; background: var(--heather); }
.base-layer::after { content: ""; position: absolute; top: 0; left: calc(50% - 0.8rem); width: 1.6rem; height: 0.8rem; background: var(--chalk); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.base-layer a { color: var(--chalk); }
.base-layer a:hover { color: var(--lilac); }
.base-layer :focus-visible { outline-color: var(--lilac); }
.base-layer__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem var(--gutter); }
.base-layer__logo img { width: auto; height: 2.75rem; }
.base-layer__tagline { margin: 1rem 0 0.4rem; font: 700 1.25rem/1.3 var(--head); }
.base-layer__publisher { margin: 0; color: var(--lilac); font-size: 0.9375rem; }
.base-layer__publisher a { color: var(--chalk); }
.base-menu { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 2rem; font-size: 0.9375rem; }
.base-menu li { margin-bottom: 0.55rem; break-inside: avoid; }

/* Measurement notice: a quiet strip on the table edge. */
.table-edge { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.7rem var(--gutter); background: var(--surface); border-top: 2px solid var(--ink); color: var(--ink); font-size: 0.875rem; line-height: 1.45; }
.table-edge p { flex: 1 1 24rem; margin: 0; }
.table-edge a { color: var(--link); }
.table-edge button, .fold-line button { min-width: 7rem; min-height: 44px; padding: 0.5rem 1.1rem; background: var(--chalk); color: var(--ink); border: 2px solid var(--ink); border-radius: 0; font: 700 0.9375rem/1 var(--head); cursor: pointer; }
.table-edge button:hover, .fold-line button:hover { background: var(--stone); }

@media (max-width: 52rem) {
	.rise { grid-template-columns: 1fr; }
	.rise__stack img { max-width: 20rem; }
	.guide-card { grid-template-columns: 1fr; }
	.home-layers .stacked--top, .home-layers .stacked--next { margin-left: calc(2 * var(--layer-gap)); }
	.title-stack { grid-template-columns: 1fr; }
	.title-stack__top { margin-left: 0; }
	.title-stack__art { order: -1; max-width: 30rem; }
	.base-layer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 34rem) {
	:root { --layer-gap: 7px; }
	body { font-size: 1.0625rem; }
	.shelf-front__logo img { height: 2.1rem; }
	.stack-menu { gap: 1rem; }
	.stack-menu a { font-size: 1rem; }
	.layer-row { grid-template-columns: 1fr; }
	.team-note .layer { grid-template-columns: 1fr; gap: 0.75rem; }
	.layer-row__art { max-width: 12rem; }
	.table-edge { padding-block: 0.6rem; font-size: 0.8125rem; }
	.table-edge button { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 22rem) {
	.shelf-front__logo img { height: 1.85rem; }
	.stack-menu { gap: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* Institutional pages: the title on a folded layer that rests on two more. */
.page-stack { padding-top: clamp(2rem, 6vw, 4rem); }
.page-stack .stacked { max-width: 48rem; margin-left: calc(var(--rise) + 2 * var(--layer-gap)); }
.page-stack h1 { margin-bottom: 0.75rem; font-size: clamp(2rem, 5.6vw, 3.6rem); font-weight: 800; line-height: 1.05; }
.page-stack__lede { margin: 0; color: var(--muted); font-size: 1.2rem; line-height: 1.55; }
.page-team { width: min(100% - 2 * var(--gutter), var(--measure)); margin: 3rem auto 0; }

/* Policy pages: a plainer title, its date on a stone strip, then the reading column. */
.policy-head { padding-top: clamp(2rem, 6vw, 4rem); }
.policy-head h1 { max-width: 48rem; margin-bottom: 1rem; font-size: clamp(1.9rem, 4.8vw, 3rem); font-weight: 800; line-height: 1.08; }
.policy-head p { display: inline-block; margin: 0; padding: 0.35rem 0.75rem; background: var(--stone); font-size: 0.9375rem; }
.policy-shelf { width: min(100% - 2 * var(--gutter), var(--measure)); margin: 3.5rem auto 0; padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.policy-shelf h2 { margin-bottom: 0.75rem; font-size: 1.1rem; }
.policy-shelf ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 1.5rem; font-size: 0.9375rem; }
.policy-shelf li { margin-bottom: 0.45rem; break-inside: avoid; }
.policy-shelf a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: none; }

/* The measurement choice on the cookies page. */
.fold-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 1.5rem 0; padding: 1.1rem 1.1rem 1.2rem; background: var(--surface); border: 2px solid var(--ink); box-shadow: -10px 10px 0 var(--lilac); }
.fold-line p { flex: 1 0 100%; margin: 0; }
.stack-count { display: block; flex: 1 0 100%; margin: 0; color: var(--muted); font-size: 0.9375rem; }
.stack-count:empty { display: none; }

/* Search and the missing page. */
.search-fold { display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 34rem; margin-top: 1.5rem; }
.search-fold label { flex: 1 0 100%; font: 700 1rem/1.3 var(--head); }
.search-fold input[type="search"] { flex: 1 1 14rem; min-height: 48px; padding: 0.55rem 0.8rem; background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: 0; font: 400 1.0625rem/1.3 var(--body); }
.search-fold button { min-height: 48px; padding: 0.55rem 1.2rem; background: var(--ink); color: var(--chalk); border: 2px solid var(--ink); border-radius: 0; font: 700 1rem/1 var(--head); cursor: pointer; }
.search-fold button:hover { background: var(--heather); border-color: var(--heather); }
.empty-shelf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: var(--gutter); align-items: end; padding-top: clamp(2.5rem, 7vw, 5rem); }
.empty-shelf h1 { margin-bottom: 1rem; font-size: clamp(2.2rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.02; }
.empty-shelf p { max-width: 30rem; color: var(--muted); font-size: 1.2rem; }
.empty-shelf__drawing { max-width: 22rem; margin-left: auto; }
.empty-shelf__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; font: 700 1rem/1.3 var(--head); }
.no-layers { max-width: var(--measure); margin-top: 2rem; padding: 1.25rem; background: var(--surface); border: 2px dashed var(--heather); }
.no-layers p:last-child { margin-bottom: 0; }

.pagination-steps { display: flex; justify-content: space-between; gap: 1rem; max-width: 60rem; margin-top: 2.5rem; font: 700 1rem/1.3 var(--head); }

/* While the measurement notice shows, the end of the page can still scroll clear of it. */
body:has(.table-edge:not([hidden])) { padding-bottom: 9rem; }

@media (max-width: 52rem) {
	.page-stack .stacked { margin-left: calc(2 * var(--layer-gap)); }
	.empty-shelf { grid-template-columns: 1fr; }
	.empty-shelf__drawing { max-width: 14rem; margin-left: 0; }
}
@media (max-width: 34rem) {
	.policy-shelf ul { columns: 1; }
	body:has(.table-edge:not([hidden])) { padding-bottom: 11rem; }
}
