/*
Theme Name: The Mechanist Review
Theme URI: https://mechanistreview.com/
Author: The Mechanist Review
Description: A reading-first theme for The Mechanist Review. Articles are laid out like engineering drawings — a title block with each piece's particulars, contents that follow you down long essays, reading lengths drawn as dimension lines — while haiku get nothing but space. Black ink and red markup on white, with a black masthead; the same drawing on near-black by night. Includes a safety net that keeps the /haiku/ archive working when switching themes.
Version: 1.0.2
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mechanist-review
Update URI: false
Tags: blog, one-column, custom-logo, custom-menu, editor-style, threaded-comments, translation-ready, accessibility-ready
*/

/* ==========================================================================
   1. Fonts — Latin subsets of TeX Gyre Schola and Heros Cn (see assets/fonts)
   ========================================================================== */

@font-face {
	font-family: "Mechanist Text";
	src: url("assets/fonts/mechanist-text-regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Mechanist Text";
	src: url("assets/fonts/mechanist-text-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Mechanist Text";
	src: url("assets/fonts/mechanist-text-bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Mechanist Text";
	src: url("assets/fonts/mechanist-text-bolditalic.woff2") format("woff2");
	font-weight: 700;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Mechanist Label";
	src: url("assets/fonts/mechanist-label-regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Mechanist Label";
	src: url("assets/fonts/mechanist-label-bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   2. Tokens — redline (light) and night drafting (dark)
   ========================================================================== */

:root {
	color-scheme: light dark;

	/* Linework is black ink; red is the markup colour, kept for links, marks and active states. */
	--paper: #ffffff;
	--paper-raised: #f7f7f7;
	--ink: #111111;
	--diazo: #111111;
	--diazo-strong: #000000;
	--diazo-soft: #cfcfcf;
	--muted: #555555;
	--grid: #ededed;
	--panel: #f3f3f3;
	--redline: #c8102e;
	--select: #ffd9dc;
	--band: #111111;
	--band-ink: #ffffff;

	--font-text: "Mechanist Text", "Century Schoolbook", "Century Schoolbook L", "TeX Gyre Schola", Georgia, serif;
	--font-label: "Mechanist Label", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
	--font-code: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "DejaVu Sans Mono", monospace;

	--text-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
	--wrap: 76rem;
	--gutter: clamp(1.125rem, 4vw, 2.5rem);
	/* About 66 characters of body text, whatever typeface an element uses. */
	--measure: calc(var(--text-size) * 34.5);
	--rail: 14rem;
	--rail-gap: 3.5rem;
	--line: 2px;
	--hair: 1px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--paper: #111315;
		--paper-raised: #181a1d;
		--ink: #ecece8;
		--diazo: #ecece8;
		--diazo-strong: #ffffff;
		--diazo-soft: #3b3f45;
		--muted: #a9adb3;
		--grid: #1b1e22;
		--panel: #1b1e22;
		--redline: #ff5a52;
		--select: #5c2328;
		--band: #000000;
		--band-ink: #ffffff;
	}
}

/* ==========================================================================
   3. Base
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 1.5rem;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-text);
	font-size: var(--text-size);
	line-height: 1.6;
	font-kerning: normal;
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
}

@media (prefers-color-scheme: dark) {
	body {
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}
}

a {
	color: inherit;
	text-decoration-line: underline;
	text-decoration-color: var(--redline);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--redline);
	text-decoration-color: currentColor;
}

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

::selection {
	background: var(--select);
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	text-wrap: balance;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	top: 1rem;
	left: 1rem;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--font-label);
	text-decoration: none;
}

/* ==========================================================================
   4. Header, masthead and navigation
   ========================================================================== */

.site-header,
.site-footer {
	--paper: var(--band);
	--paper-raised: #1b1b1b;
	--ink: var(--band-ink);
	--diazo: var(--band-ink);
	--diazo-strong: #ffffff;
	--diazo-soft: #4a4a4a;
	--muted: #b8b8b8;
	--grid: #1f1f1f;
	--panel: #1f1f1f;
	--redline: #ff5a52;
	--select: #5c2328;
	background-color: var(--band);
	color: var(--ink);
}

@media (prefers-color-scheme: dark) {
	.site-header {
		border-bottom: var(--hair) solid #2a2d31;
	}

	.site-footer {
		border-top: var(--hair) solid #2a2d31;
	}
}

.site-header__inner {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 2rem;
	padding-block: 1rem;
}

.brand {
	margin: 0;
	font-weight: 400;
	line-height: 1.1;
}

.brand a {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	color: var(--ink);
	text-decoration: none;
}

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

.brand__text {
	font-size: 1.375rem;
	letter-spacing: -0.005em;
}

.brand .mech--small {
	width: 3.25rem;
	height: auto;
	flex: none;
}

.brand--logo .custom-logo {
	display: block;
	max-height: 4rem;
	width: auto;
	/* A logo drawn for a light page stays legible on the black band. */
	padding: 0.35rem 0.6rem;
	background: #ffffff;
}

/* Homepage masthead: wordmark on the left, the linkage standing on the rule. */
.site-header--home {
	background-image:
		linear-gradient(var(--grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid) 1px, transparent 1px);
	background-size: 24px 24px;
	background-position: -1px -1px;
}

.site-header--home .site-header__inner {
	display: block;
	padding-block: 0;
}

.masthead {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 0 3rem;
}

.masthead__text {
	padding-block: clamp(2.25rem, 7vw, 5rem) clamp(1.5rem, 3vw, 2.25rem);
}

.brand--home {
	font-size: clamp(2.75rem, 1.2rem + 5.6vw, 6rem);
	line-height: 0.95;
	letter-spacing: -0.025em;
}

.brand--home a {
	display: inline;
}

.masthead__tagline {
	max-width: 36ch;
	margin: 1.25rem 0 1.5rem;
	font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
	line-height: 1.45;
	color: var(--muted);
}

.masthead__figure {
	align-self: end;
	line-height: 0;
}

.masthead__figure .mech--large {
	width: clamp(13rem, 24vw, 19rem);
	height: auto;
}

@media (max-width: 47.99rem) {
	.masthead {
		grid-template-columns: 1fr;
	}

	.masthead__text {
		padding-bottom: 0.5rem;
	}

	.masthead__figure {
		justify-self: end;
	}

	.masthead__figure .mech--large {
		width: 10.5rem;
	}
}

/* Navigation */
.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1.5rem;
	font-family: var(--font-label);
	font-size: 1.0625rem;
	line-height: 1.2;
}

.nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav__list a,
.site-search summary {
	display: inline-block;
	padding-block: 0.4rem 0.3rem;
	border-bottom: 2px solid transparent;
	color: var(--ink);
	text-decoration: none;
}

.nav__list a:hover,
.site-search summary:hover {
	color: var(--redline);
	border-bottom-color: var(--diazo-soft);
}

.nav__list a[aria-current="page"],
.nav__list .current-menu-item > a,
.nav__list .current_page_item > a {
	color: var(--redline);
	border-bottom-color: var(--redline);
}

.site-search summary {
	cursor: pointer;
	list-style: none;
}

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

.site-search[open] summary {
	color: var(--redline);
	border-bottom-color: var(--redline);
}

.site-search__panel {
	position: absolute;
	z-index: 30;
	top: calc(100% + var(--line));
	left: var(--gutter);
	right: var(--gutter);
	padding: 1rem;
	background: var(--paper);
	border: var(--line) solid var(--diazo);
	border-top-width: 0;
}

@media (min-width: 48rem) {
	.site-search__panel {
		left: auto;
		width: 26rem;
	}
}

/* ==========================================================================
   5. The linkage drawing
   ========================================================================== */

.mech {
	display: block;
	overflow: visible;
	color: var(--diazo);
}

.mech__link,
.mech__body {
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.mech__link {
	fill: none;
}

.mech__body {
	fill: var(--panel);
}

.mech__pin {
	fill: var(--paper);
	stroke: currentColor;
	stroke-width: 1.5;
	vector-effect: non-scaling-stroke;
}

.mech__ground {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.25;
	vector-effect: non-scaling-stroke;
}

.mech__construct {
	fill: none;
	stroke: var(--diazo-soft);
	stroke-width: 1;
	stroke-dasharray: 3 3;
	vector-effect: non-scaling-stroke;
}

.mech__curve {
	fill: none;
	stroke: var(--redline);
	stroke-width: 1.25;
	vector-effect: non-scaling-stroke;
}

.mech__tracer {
	fill: var(--redline);
}

.mech--small .mech__pin {
	stroke-width: 1.25;
}


/* ==========================================================================
   6. Homepage: lead article, index, haiku
   ========================================================================== */

.lead {
	display: grid;
	gap: 1.75rem 3.5rem;
	padding-block: clamp(2rem, 5vw, 3.75rem) clamp(2rem, 4vw, 3rem);
}

.lead__figure {
	display: block;
	order: -1;
}

.lead__figure img {
	display: block;
	width: 100%;
	border: var(--hair) solid var(--diazo-soft);
}

@media (min-width: 64rem) {
	.lead.has-post-thumbnail {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		align-items: center;
	}

	.lead__figure {
		order: 0;
	}
}

.lead__title {
	margin: 0 0 1rem;
	font-size: clamp(1.875rem, 1.2rem + 2.7vw, 3.125rem);
	font-weight: 400;
	line-height: 1.07;
	letter-spacing: -0.015em;
}

.lead__title a,
.index__title a,
.haiku-card__title a,
.post-nav__link {
	color: var(--ink);
	text-decoration: none;
}

.lead__title a:hover,
.index__title a:hover {
	color: var(--redline);
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.lead__excerpt {
	margin: 0 0 1.75rem;
	max-width: 46ch;
	font-size: 1.0625em;
}

/* Section heads */
.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	margin-bottom: 0.25rem;
	padding-bottom: 0.6rem;
	border-bottom: var(--line) solid var(--diazo);
}

.section-title {
	margin: 0;
	font-size: 1.625rem;
	font-weight: 400;
	line-height: 1.2;
}

.section-head__link {
	font-family: var(--font-label);
	font-size: 1rem;
	color: var(--redline);
}

/* Index of articles */
.index {
	padding-block: 1.5rem 3rem;
}

.index__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.index__row + .index__row {
	border-top: var(--hair) solid var(--diazo-soft);
}

.index__item {
	display: grid;
	gap: 0.4rem 2rem;
	padding-block: 1.5rem;
}

@media (min-width: 48rem) {
	.index__item {
		grid-template-columns: 7.5rem minmax(0, 1fr) 12rem;
		align-items: start;
	}
}

.index__date,
.index__kind {
	margin: 0;
	padding-top: 0.3rem;
	font-family: var(--font-label);
	font-size: 0.9375rem;
	color: var(--muted);
	font-variant-numeric: lining-nums tabular-nums;
}

.index__title {
	margin: 0 0 0.45rem;
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.22;
}

.index__excerpt {
	margin: 0 0 0.6rem;
	max-width: 62ch;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--muted);
}

.index__cats {
	margin: 0;
	font-family: var(--font-label);
	font-size: 0.9375rem;
	color: var(--muted);
}

.index__cats a {
	color: inherit;
}

.index__verse {
	font-style: italic;
	color: var(--muted);
}

.index__verse p {
	margin: 0;
}

.index__aside {
	display: grid;
	align-content: start;
	gap: 0.75rem;
	padding-top: 0.35rem;
}

.index__thumb {
	display: block;
}

.index__thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border: var(--hair) solid var(--diazo-soft);
}

@media (max-width: 47.99rem) {
	.index__aside {
		grid-template-columns: 7rem minmax(0, 1fr);
		align-items: center;
		gap: 1rem;
		padding-top: 0.5rem;
	}
}

/* Dimension line: the length of the line is the reading time. */
.dim {
	position: relative;
	display: flex;
	align-items: center;
	width: calc(var(--len, 0.5) * 100%);
	min-width: 1.25rem;
	height: 1.5rem;
	font-family: var(--font-label);
	font-size: 0.875rem;
	line-height: 1;
	color: var(--redline);
	font-variant-numeric: lining-nums tabular-nums;
}

.dim::before,
.dim::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	border-left: var(--hair) solid var(--diazo-soft);
}

.dim::before {
	left: 0;
}

.dim::after {
	right: 0;
}

.dim__line {
	position: absolute;
	left: 1px;
	right: 1px;
	top: 50%;
	border-top: var(--hair) solid currentColor;
}

.dim__line::before,
.dim__line::after {
	content: "";
	position: absolute;
	top: -3.5px;
	border-top: 3.5px solid transparent;
	border-bottom: 3.5px solid transparent;
}

.dim__line::before {
	left: 0;
	border-right: 7px solid currentColor;
}

.dim__line::after {
	right: 0;
	border-left: 7px solid currentColor;
}

.dim__label {
	position: relative;
	margin-inline: auto;
	padding: 0 0.4em;
	background: var(--paper);
	white-space: nowrap;
}

.dim--short .dim__label {
	position: absolute;
	left: calc(100% + 0.5rem);
	margin: 0;
	padding: 0;
	background: none;
}

/* Haiku on the homepage and in the archive: no frames, only space. */
.haiku-strip {
	padding-block: 1.5rem 1rem;
}

.haiku-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 27rem), 1fr));
	gap: 2.75rem 3.5rem;
	padding-top: 2rem;
}

.haiku-card {
	display: grid;
	align-items: center;
	gap: 1.5rem;
}

.haiku-card.has-image {
	grid-template-columns: 8.5rem minmax(0, 1fr);
}

@media (max-width: 29.99rem) {
	.haiku-card.has-image {
		grid-template-columns: 5.5rem minmax(0, 1fr);
		gap: 1.1rem;
	}

	.haiku-card__verse {
		font-size: 1.0625rem;
	}
}

.haiku-card__image {
	display: block;
}

.haiku-card__image img {
	display: block;
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
}

.haiku-card__verse {
	font-size: 1.1875rem;
	font-style: italic;
	line-height: 1.55;
}

.haiku-card__verse p,
.haiku-card__verse pre {
	margin: 0;
}

/* Haiku keep the theme's size and alignment whatever the editor set. */
.haiku-card__verse [class*="has-text-align"],
.haiku-single__verse [class*="has-text-align"] {
	text-align: left;
}

.haiku-card__verse [class*="-font-size"],
.haiku-single__verse [class*="-font-size"] {
	font-size: inherit !important;
}

/* One line of verse; if it must wrap, the continuation hangs. */
.verse-line {
	display: block;
	padding-left: 1.25em;
	text-indent: -1.25em;
}

.haiku-card__verse pre,
.haiku-single__verse pre {
	font: inherit;
	white-space: pre-wrap;
	background: none;
	border: 0;
	padding: 0;
}

.haiku-card__title {
	margin: 1rem 0 0;
	font-family: var(--font-label);
	font-size: 0.9375rem;
	font-weight: 400;
	color: var(--muted);
}

.haiku-card__title a {
	color: inherit;
}

.haiku-card__title a:hover {
	color: var(--redline);
	text-decoration: underline;
}

/* ==========================================================================
   7. Title block
   ========================================================================== */

.titleblock {
	display: flex;
	flex-wrap: wrap;
	gap: var(--hair);
	margin: 0;
	padding: 0;
	background: var(--diazo-soft);
	border: var(--line) solid var(--diazo);
	font-family: var(--font-label);
	font-variant-numeric: lining-nums tabular-nums;
}

.titleblock__cell {
	flex: 1 1 8.5rem;
	min-width: 0;
	padding: 0.55rem 0.8rem 0.65rem;
	background: var(--paper);
}

.titleblock dt {
	margin-bottom: 0.2rem;
	font-size: 0.8125rem;
	line-height: 1.2;
	color: var(--muted);
}

.titleblock dd {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ink);
}

.titleblock dd a {
	color: inherit;
	text-decoration-color: var(--diazo-soft);
}

.titleblock dd a:hover {
	color: var(--redline);
}

.titleblock__sub {
	display: block;
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--muted);
}

.titleblock .rev {
	margin-right: 0.3em;
	font-family: var(--font-text);
	font-weight: 400;
	color: var(--redline);
}

.titleblock--compact {
	max-width: 30rem;
}

.titleblock--compact .titleblock__cell {
	flex-basis: 6.5rem;
}

/* ==========================================================================
   8. Articles
   ========================================================================== */

.article__header {
	padding-block: clamp(2.25rem, 5vw, 3.75rem) 2.25rem;
}

.article__title {
	max-width: 22ch;
	margin: 0 0 1rem;
	font-size: clamp(2.25rem, 1.3rem + 3.6vw, 3.875rem);
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -0.02em;
}

.article__dek {
	max-width: 52ch;
	margin: 0 0 1.75rem;
	font-size: 1.25em;
	line-height: 1.45;
	color: var(--muted);
}

.article__header .titleblock {
	max-width: calc(var(--rail) + var(--rail-gap) + var(--measure));
	margin-top: 1.75rem;
}

.article__figure {
	margin-block: 0 2.75rem;
}

.article__figure img {
	display: block;
	width: 100%;
}

.article__figure figcaption,
.page-entry__figure figcaption {
	margin-top: 0.6rem;
	font-family: var(--font-label);
	font-size: 0.875rem;
	color: var(--muted);
}

.article__main > * {
	max-width: var(--measure);
}

@media (min-width: 74rem) {
	.article__grid {
		display: grid;
		grid-template-columns: var(--rail) minmax(0, 1fr);
		column-gap: var(--rail-gap);
		align-items: start;
	}

	.article__rail {
		position: sticky;
		top: 1.5rem;
	}
}

/* Contents */
.toc {
	margin: 0 0 2.5rem;
	border-top: var(--line) solid var(--diazo);
	font-family: var(--font-label);
	font-size: 0.9375rem;
	line-height: 1.3;
}

.toc__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 0;
	font-weight: 700;
	color: var(--ink);
	cursor: pointer;
	list-style: none;
}

.toc__title::-webkit-details-marker {
	display: none;
}

.toc__title::before {
	content: "";
	width: 0;
	height: 0;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	border-left: 6px solid var(--redline);
	transition: transform 0.15s ease;
}

.toc[open] .toc__title::before {
	transform: rotate(90deg);
}

.toc__list {
	margin: 0;
	padding: 0 0 0.75rem;
	list-style: none;
}

.toc__list a {
	display: block;
	padding: 0.32rem 0 0.32rem 0.8rem;
	border-left: var(--line) solid var(--grid);
	color: var(--muted);
	text-decoration: none;
}

.toc__list a:hover {
	color: var(--redline);
	border-left-color: var(--diazo-soft);
}

.toc__list a.is-current {
	color: var(--ink);
	border-left-color: var(--redline);
}

@media (max-width: 73.99rem) {
	.toc {
		max-width: var(--measure);
		border-bottom: var(--hair) solid var(--diazo-soft);
	}

	.toc--wide-only {
		display: none;
	}
}

@media (min-width: 74rem) {
	.toc {
		max-height: calc(100vh - 3rem);
		overflow-y: auto;
		margin: 0;
		scrollbar-width: thin;
	}

	.toc__title {
		cursor: default;
		pointer-events: none;
	}

	.toc__title::before {
		display: none;
	}
}

/* Article footer: tags and sharing */
.article__footer {
	display: grid;
	gap: 1.25rem;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: var(--hair) solid var(--diazo-soft);
	font-family: var(--font-label);
}

.article__footer-label {
	margin: 0 0 0.4rem;
	font-size: 0.875rem;
	font-weight: 400;
	color: var(--muted);
}

.taglist,
.share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1.1rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 1rem;
}

.share__copy {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-family: var(--font-label);
	font-size: 1rem;
	text-decoration: underline;
	text-decoration-color: var(--diazo-soft);
	text-underline-offset: 0.2em;
	cursor: pointer;
}

.share__copy:hover {
	color: var(--redline);
}

/* Previous / next */
.post-nav {
	display: grid;
	gap: 1.5rem;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: var(--line) solid var(--diazo);
}

@media (min-width: 40rem) {
	.post-nav {
		grid-template-columns: 1fr 1fr;
	}

	.post-nav__link--next {
		grid-column: 2;
		text-align: right;
	}
}

.post-nav__link {
	display: block;
}

.post-nav__label {
	display: block;
	margin-bottom: 0.25rem;
	font-family: var(--font-label);
	font-size: 0.875rem;
	color: var(--muted);
}

.post-nav__title {
	font-size: 1.125rem;
	line-height: 1.3;
}

.post-nav__link:hover .post-nav__title {
	color: var(--redline);
	text-decoration: underline;
}

/* Reading progress */
.progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	height: 3px;
	pointer-events: none;
}

.progress__bar {
	display: block;
	height: 100%;
	background: var(--redline);
	transform-origin: 0 50%;
	transform: scaleX(var(--progress, 0));
}

@supports (animation-timeline: scroll()) {
	.progress__bar {
		animation: mech-progress linear both;
		animation-timeline: scroll(root block);
	}

	@keyframes mech-progress {
		from {
			transform: scaleX(0);
		}
		to {
			transform: scaleX(1);
		}
	}
}

/* ==========================================================================
   9. Post content
   ========================================================================== */

.entry-content {
	max-width: var(--measure);
}

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content p {
	margin: 0 0 1.2em;
}

.entry-content :is(h2, h3, h4, h5, h6) {
	scroll-margin-top: 1.5rem;
	color: var(--ink);
}

.entry-content h2 {
	margin: 2.4em 0 0.75em;
	font-size: 1.5em;
	font-weight: 700;
	line-height: 1.2;
}

.entry-content h2::before {
	content: "";
	display: block;
	width: 2.5rem;
	margin-bottom: 0.65em;
	border-top: 3px solid var(--redline);
}

.entry-content h3 {
	margin: 2em 0 0.6em;
	font-size: 1.2em;
	font-weight: 700;
	line-height: 1.25;
}

.entry-content h4 {
	margin: 1.8em 0 0.5em;
	font-size: 1.05em;
	font-weight: 700;
	line-height: 1.3;
}

.entry-content h5,
.entry-content h6 {
	margin: 1.7em 0 0.45em;
	font-family: var(--font-label);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.005em;
}

.entry-content h6 {
	color: var(--redline);
}

.entry-content :is(ul, ol) {
	margin: 0 0 1.2em;
	padding-left: 1.4em;
}

.entry-content li {
	margin-bottom: 0.4em;
}

.entry-content li > :is(ul, ol) {
	margin: 0.4em 0 0;
}

.entry-content li::marker {
	color: var(--redline);
	font-family: var(--font-label);
}

.entry-content blockquote {
	margin: 2em 0;
	padding: 0.1em 0 0.1em 1.3em;
	border-left: 3px solid var(--redline);
	font-style: italic;
}

.entry-content blockquote p:last-of-type {
	margin-bottom: 0.4em;
}

.entry-content blockquote cite,
.entry-content .wp-block-quote cite {
	display: block;
	font-family: var(--font-label);
	font-size: 0.9375rem;
	font-style: normal;
	color: var(--muted);
}

.entry-content .wp-block-pullquote {
	margin: 2.5em 0;
	padding: 1.25em 0;
	border-top: var(--line) solid var(--diazo);
	border-bottom: var(--line) solid var(--diazo);
	text-align: left;
}

.entry-content .wp-block-pullquote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 1.35em;
	line-height: 1.35;
}

.entry-content figure {
	margin: 2.25em 0;
}

.entry-content figcaption,
.entry-content .wp-element-caption,
.wp-caption-text,
.gallery-caption {
	margin-top: 0.65em;
	font-family: var(--font-label);
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--muted);
	text-align: left;
}

.entry-content .wp-block-image img {
	display: block;
}

.entry-content hr,
.entry-content .wp-block-separator {
	position: relative;
	width: 40%;
	height: 1px;
	margin: 3em auto;
	overflow: visible;
	border: 0;
	background: linear-gradient(90deg, transparent, var(--diazo-soft) 25%, var(--diazo-soft) 75%, transparent);
	opacity: 1;
}

.entry-content hr::after,
.entry-content .wp-block-separator::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 9px;
	height: 9px;
	transform: translate(-50%, -50%);
	border: 1.5px solid var(--diazo);
	border-radius: 50%;
	background: var(--paper);
}

.entry-content code,
.entry-content kbd {
	padding: 0.1em 0.3em;
	font-family: var(--font-code);
	font-size: 0.86em;
	background: var(--panel);
}

.entry-content pre {
	margin: 2em 0;
	padding: 1rem 1.25rem;
	overflow-x: auto;
	font-family: var(--font-code);
	font-size: 0.875rem;
	line-height: 1.55;
	background: var(--panel);
	border-left: var(--line) solid var(--diazo);
}

.entry-content pre code {
	padding: 0;
	background: none;
}

.entry-content .wp-block-verse {
	padding: 0;
	font-family: var(--font-text);
	font-size: 1.1em;
	font-style: italic;
	white-space: pre-wrap;
	background: none;
	border: 0;
	overflow: visible;
}

.entry-content details {
	margin: 1.5em 0;
	padding: 0.75em 0;
	border-top: var(--hair) solid var(--diazo-soft);
	border-bottom: var(--hair) solid var(--diazo-soft);
}

.entry-content summary {
	font-family: var(--font-label);
	font-weight: 700;
	cursor: pointer;
}

.entry-content details[open] > summary {
	margin-bottom: 0.6em;
}

.entry-content sup {
	line-height: 0;
}

.entry-content sup a,
.entry-content .fn a {
	padding: 0 0.1em;
	font-family: var(--font-label);
	font-weight: 700;
	color: var(--redline);
	text-decoration: none;
}

.entry-content .wp-block-footnotes {
	margin-top: 2.5em;
	padding: 1.25em 0 0 1.5em;
	border-top: var(--hair) solid var(--diazo-soft);
	font-size: 0.9375rem;
	line-height: 1.5;
}

/* Tables: drafting-sheet schedules */
.entry-content .wp-block-table {
	margin: 2.25em 0;
	overflow-x: auto;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	border-top: var(--line) solid var(--diazo);
	border-bottom: var(--line) solid var(--diazo);
	font-family: var(--font-label);
	font-size: 0.96875rem;
	line-height: 1.38;
	font-variant-numeric: lining-nums tabular-nums;
}

.entry-content .wp-block-table thead,
.entry-content .wp-block-table tfoot {
	border: 0;
}

.entry-content table th,
.entry-content table td {
	padding: 0.55em 0.8em;
	border: 0;
	border-bottom: var(--hair) solid var(--diazo-soft);
	text-align: left;
	vertical-align: top;
}

.entry-content table thead th,
.entry-content table thead td {
	font-weight: 700;
	color: var(--ink);
	border-bottom: var(--line) solid var(--diazo);
	vertical-align: bottom;
}

.entry-content table tbody tr:last-child > * {
	border-bottom: 0;
}

.entry-content table tfoot td {
	font-weight: 700;
	border-top: var(--line) solid var(--diazo);
	border-bottom: 0;
}

.entry-content .wp-block-table.is-style-stripes {
	border-bottom: 0;
}

.entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: var(--panel);
}

.entry-content .wp-block-table.is-style-stripes td,
.entry-content .wp-block-table.is-style-stripes th {
	border-color: transparent;
}

/* Buttons from the block editor */
.entry-content .wp-block-button__link:not(.has-background) {
	background: var(--diazo);
}

.entry-content .wp-block-button__link:not(.has-background):hover {
	background: var(--redline);
}

.entry-content .wp-block-button__link:not(.has-text-color) {
	color: var(--paper);
}

.entry-content .wp-block-button__link {
	border-radius: 0;
	font-family: var(--font-label);
	font-weight: 700;
	text-decoration: none;
}

/* Wide alignments reach into the right margin on large screens. */
@media (min-width: 74rem) {
	.entry-content .alignwide,
	.entry-content .alignfull {
		width: calc(100% + 6rem);
		max-width: none;
	}
}

@media (min-width: 90rem) {
	.entry-content .alignwide,
	.entry-content .alignfull {
		width: calc(100% + 12rem);
	}
}

.page-links {
	margin-top: 2rem;
	font-family: var(--font-label);
}

/* WordPress core classes */
.alignleft {
	float: left;
	margin: 0.3em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.3em 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption {
	max-width: 100%;
}

.sticky,
.bypostauthor {
	position: relative;
}

/* ==========================================================================
   10. Haiku pages
   ========================================================================== */

.haiku-single {
	display: grid;
	align-items: center;
	gap: 2rem 4.5rem;
	max-width: calc(68rem + 2 * var(--gutter));
	padding-block: clamp(2rem, 8vw, 6.5rem) clamp(2rem, 5vw, 4rem);
}

@media (min-width: 48rem) {
	.haiku-single.has-image {
		grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	}
}

.haiku-single__image {
	margin: 0;
}

@media (max-width: 47.99rem) {
	/* Keep the poem on the first screen. */
	.haiku-single__image {
		max-width: 13rem;
	}
}

.haiku-single__image img {
	display: block;
	width: 100%;
}

.haiku-single__title {
	margin: 0 0 1.5rem;
	font-family: var(--font-label);
	font-size: 1.0625rem;
	font-weight: 400;
	color: var(--muted);
}

.haiku-single__verse {
	font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
	font-style: italic;
	line-height: 1.45;
}

.haiku-single__verse p {
	margin: 0;
}

.haiku-single__date {
	margin: 2rem 0 0;
	font-family: var(--font-label);
	font-size: 0.9375rem;
	color: var(--muted);
}

.haiku-single__after {
	max-width: calc(68rem + 2 * var(--gutter));
}

.haiku-single__after .post-nav {
	margin-top: 0;
}

/* ==========================================================================
   11. Pages, archives, search, 404
   ========================================================================== */

.page-entry__header,
.archive-header {
	padding-block: clamp(2.25rem, 5vw, 3.75rem) 1.75rem;
}

.page-entry__title,
.archive-header__title {
	max-width: 24ch;
	margin: 0;
	font-size: clamp(2.25rem, 1.3rem + 3.6vw, 3.875rem);
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -0.02em;
}

.page-entry__figure {
	margin-block: 0 2.5rem;
}

.page-entry__figure img {
	display: block;
	width: 100%;
}

.archive-header__count {
	margin: 0.9rem 0 0;
	font-family: var(--font-label);
	font-size: 1rem;
	color: var(--muted);
}

.archive-header__desc {
	max-width: 60ch;
	margin-top: 0.75rem;
	color: var(--muted);
}

.archive-header__search {
	max-width: 30rem;
	margin-top: 1.5rem;
}

.archive-header + .index {
	padding-top: 0;
}

.archive-header + .index .index__list {
	border-top: var(--line) solid var(--diazo);
}

.notfound__text {
	max-width: 52ch;
	margin: 1.25rem 0 0;
}

.empty {
	padding-block: 2rem 4rem;
	color: var(--muted);
}

/* ==========================================================================
   12. Forms and comments
   ========================================================================== */

.search-form {
	display: flex;
	gap: 0.5rem;
}

.search-form__input,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	min-width: 0;
	padding: 0.6rem 0.75rem;
	border: var(--hair) solid var(--diazo-soft);
	border-radius: 0;
	background: var(--paper-raised);
	color: var(--ink);
	font-family: var(--font-text);
	font-size: 1rem;
	line-height: 1.4;
}

.search-form__input:focus,
.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--redline);
	outline: var(--hair) solid var(--redline);
	outline-offset: 0;
}

.search-form__input::placeholder {
	color: var(--muted);
	opacity: 1;
}

.search-form__button,
.comment-form .submit,
.button {
	flex: none;
	padding: 0.65rem 1.2rem;
	border: 0;
	border-radius: 0;
	background: var(--diazo);
	color: var(--paper);
	font-family: var(--font-label);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.search-form__button:hover,
.comment-form .submit:hover,
.button:hover {
	background: var(--redline);
}

.comments {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: var(--line) solid var(--diazo);
}

.comments__title,
.comment-reply-title {
	margin: 0 0 1.25rem;
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1.2;
}

.comment-reply-title small {
	margin-left: 0.75rem;
	font-family: var(--font-label);
	font-size: 0.9375rem;
}

.comment-list {
	margin: 0 0 2.5rem;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin: 0;
	padding-left: clamp(1rem, 4vw, 2.5rem);
	list-style: none;
	border-left: var(--hair) solid var(--diazo-soft);
}

.comment-body {
	padding-block: 1.25rem;
	border-bottom: var(--hair) solid var(--diazo-soft);
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1rem;
	margin-bottom: 0.6rem;
	font-family: var(--font-label);
	font-size: 0.9375rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.comment-author .avatar {
	display: block;
	width: 40px;
	height: 40px;
}

.comment-author .fn {
	font-style: normal;
	font-weight: 700;
}

.comment-author .says {
	display: none;
}

.comment-metadata a,
.comment-metadata {
	color: var(--muted);
	text-decoration: none;
}

.comment-content p {
	margin: 0 0 0.8em;
}

.reply {
	font-family: var(--font-label);
	font-size: 0.9375rem;
}

.comment-awaiting-moderation {
	font-family: var(--font-label);
	color: var(--muted);
}

.comment-form p {
	margin: 0 0 1rem;
}

.comment-form label {
	display: block;
	margin-bottom: 0.3rem;
	font-family: var(--font-label);
	font-size: 0.9375rem;
}

.comment-notes,
.logged-in-as {
	font-family: var(--font-label);
	font-size: 0.9375rem;
	color: var(--muted);
}

.comment-form .required {
	color: var(--redline);
}

.comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.comment-form-cookies-consent input {
	margin-top: 0.3rem;
}

.comment-form-cookies-consent label {
	display: inline;
	color: var(--muted);
}

.comments-pagination,
.comment-navigation {
	margin-bottom: 2rem;
	font-family: var(--font-label);
}

/* ==========================================================================
   13. Pagination
   ========================================================================== */

.pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 2.5rem 0 0;
	padding: 0;
	list-style: none;
	font-family: var(--font-label);
}

.pagination li > .page-numbers {
	display: inline-block;
	min-width: 2.5rem;
	padding: 0.45rem 0.75rem;
	border: var(--hair) solid var(--diazo-soft);
	color: var(--ink);
	text-align: center;
	text-decoration: none;
}

.pagination li > a.page-numbers:hover {
	border-color: var(--redline);
	color: var(--redline);
}

.pagination li > .current {
	background: var(--diazo);
	border-color: var(--diazo);
	color: var(--paper);
}

.pagination li > .dots {
	border-color: transparent;
}

/* ==========================================================================
   14. Footer
   ========================================================================== */

.site-footer {
	margin-top: clamp(3rem, 8vw, 6rem);
	font-size: 1rem;
}

.site-footer__grid {
	display: grid;
	gap: 2rem 4rem;
	padding-block: 2.5rem;
}

@media (min-width: 48rem) {
	.site-footer__grid {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	}
}

.site-footer h2 {
	margin: 0 0 0.7rem;
	font-family: var(--font-label);
	font-size: 1rem;
	font-weight: 700;
	color: var(--ink);
}

.site-footer__about p {
	max-width: 54ch;
	margin: 0 0 0.75rem;
	color: var(--muted);
}

.site-footer__about a {
	color: var(--ink);
}

.footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--font-label);
	font-size: 1.0625rem;
}

.footer__list li + li {
	margin-top: 0.4rem;
}

.footer__list a {
	color: var(--ink);
	text-decoration: none;
}

.footer__list a:hover {
	color: var(--redline);
	text-decoration: underline;
}

.site-footer__base {
	padding-block: 0 2.25rem;
	font-family: var(--font-label);
	font-size: 0.9375rem;
	color: var(--muted);
}

.site-footer__base::before {
	content: "";
	display: block;
	margin-bottom: 1.25rem;
	border-top: var(--hair) solid var(--diazo-soft);
}

.site-footer__base p {
	margin: 0;
}

/* ==========================================================================
   15. Print
   ========================================================================== */

@media print {
	:root,
	.site-header {
		--paper: #fff;
		--ink: #000;
		--diazo: #000;
		--diazo-soft: #999;
		--muted: #333;
		--panel: #f2f2f2;
		--grid: transparent;
		--band: #fff;
		--band-ink: #000;
		--redline: #000;
	}

	.site-nav,
	.masthead__figure,
	.toc,
	.article__rail,
	.share,
	.post-nav,
	.comments,
	.site-footer,
	.progress {
		display: none !important;
	}

	.article__grid {
		display: block;
	}

	.entry-content,
	.article__main > * {
		max-width: none;
	}

	.entry-content a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
		color: #555;
		word-break: break-all;
	}
}

/* ==========================================================================
   16. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}

	/* Scroll-linked, so it only moves when the reader does. */
	.progress__bar {
		animation-duration: auto !important;
	}
}
