/*
Theme Name:  Machado 2026
Description: Standalone theme for the Machado de Assis Digital Corpus Project. Replaces the Twenty Sixteen child theme ("Machado"); keeps its Pods templates and the ?raw=1 plain-text route that Voyant Tools reads.
Author:      Office of Digital Humanities, Brigham Young University
Version:     1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License:     GNU General Public License v2 or later
Text Domain: machado-2026
*/

/* ==========================================================================
   Fonts (self-hosted, SIL Open Font License; see assets/fonts/README.md)
   ========================================================================== */

@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("assets/fonts/source-serif-4-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("assets/fonts/source-serif-4-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Source Serif 4";
	font-style: italic;
	font-weight: 400 600;
	font-display: swap;
	src: url("assets/fonts/source-serif-4-italic-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Source Serif 4";
	font-style: italic;
	font-weight: 400 600;
	font-display: swap;
	src: url("assets/fonts/source-serif-4-italic-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("assets/fonts/inter-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("assets/fonts/inter-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
	--paper: #F7F4ED;
	--ink: #142C3B;
	--ink-hover: #1E3A4C;
	--ink-active: #0B1C27;
	--accent: #A34531;
	--muted: #56616A;
	--rule: #D8D2C6;
	--quiet: #EEE9DF;
	--white: #FFFFFF;
	--control: #7D817C;

	--serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--gutter: 48px;
	--max: 1200px;
	--section: 96px;
	--measure: 720px;
	--ease: 140ms ease;
}

@media (max-width: 1023px) {
	:root { --gutter: 32px; --section: 80px; }
}
@media (max-width: 767px) {
	:root { --gutter: 20px; --section: 56px; }
}
@media (max-width: 360px) {
	:root { --gutter: 16px; --section: 48px; }
}

/* ==========================================================================
   Base
   ========================================================================== */

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 18px;
	line-height: 29px;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

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

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-family: var(--serif);
	font-weight: 400;
	color: var(--ink);
	text-wrap: balance;
}

p { margin: 0; }

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color var(--ease), text-decoration-color var(--ease), background-color var(--ease);
}

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

::selection {
	background: var(--quiet);
	color: var(--ink);
}

/* Elements hidden with the hidden attribute stay hidden whatever their display style. */
[hidden] {
	display: none !important;
}

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

.skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 12px 20px;
	background: var(--white);
	color: var(--ink);
	font: 500 15px/22px var(--sans);
	transform: translateY(-200%);
}
.skip-link:focus {
	transform: none;
}

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

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   Shared type
   ========================================================================== */

.eyebrow {
	margin: 0 0 16px;
	font: 600 12px/18px var(--sans);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}

.meta {
	font: 400 13px/20px var(--sans);
	color: var(--muted);
}

.section-title {
	font-size: 40px;
	line-height: 46px;
	letter-spacing: -0.01em;
}

.page-title {
	font-size: 64px;
	line-height: 68px;
	letter-spacing: -0.02em;
}

.lead {
	max-width: var(--measure);
	margin-top: 20px;
	font: 400 19px/31px var(--sans);
	color: var(--ink);
}

@media (max-width: 767px) {
	.section-title { font-size: 30px; line-height: 36px; }
	.page-title { font-size: 40px; line-height: 44px; }
	.lead { font-size: 17px; line-height: 28px; }
}

/* Editorial links: terracotta, underlined; the underline thickens on hover. */
.link-accent,
.prose a {
	color: var(--accent);
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}
.link-accent:hover,
.prose a:hover {
	text-decoration-thickness: 2px;
}

.link-accent {
	font: 500 15px/22px var(--sans);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
}

.arrow {
	font-family: var(--sans);
	display: inline-block;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 12px 22px;
	border: 1px solid var(--ink);
	border-radius: 2px;
	background: var(--ink);
	color: var(--white);
	font: 500 15px/22px var(--sans);
	text-decoration: none;
	cursor: pointer;
}
.button:hover {
	background: var(--ink-hover);
	border-color: var(--ink-hover);
}
.button:active {
	background: var(--ink-active);
	border-color: var(--ink-active);
}

.button--quiet {
	background: transparent;
	color: var(--ink);
}
.button--quiet:hover {
	background: var(--quiet);
	border-color: var(--ink);
}
.button--quiet:active {
	background: var(--rule);
}

/* ==========================================================================
   Masthead
   ========================================================================== */

.institution {
	background: var(--ink);
	color: var(--white);
}
.institution__inner {
	display: flex;
	align-items: center;
	min-height: 28px;
}
.institution a {
	font: 500 11px/16px var(--sans);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 6px 0;
}
.institution a:hover {
	text-decoration: underline;
}
.institution a:focus-visible {
	outline-color: var(--white);
}

.site-header {
	border-bottom: 1px solid var(--rule);
}
.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	column-gap: 32px;
	min-height: 96px;
}

.brand {
	display: flex;
	flex-direction: column;
	padding: 12px 0;
	text-decoration: none;
	color: var(--ink);
}
.brand__name {
	font: 400 26px/30px var(--serif);
	letter-spacing: -0.01em;
}
.brand__sub {
	margin-top: 4px;
	font: 600 11px/14px var(--sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.site-nav__list,
.site-nav__sub {
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-nav__list {
	display: flex;
	gap: 36px;
}
.site-nav__sub {
	display: none;
}
.site-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font: 500 15px/22px var(--sans);
	color: var(--ink);
	text-decoration: none;
	text-underline-offset: 8px;
}
.site-nav a:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
}
.site-nav .is-current > a,
.site-nav a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

/* Language toggle and (on phones) the menu button, kept together outside the menu. */
.site-header__tools {
	display: flex;
	align-items: center;
	gap: 12px;
	order: 2;
}
.site-nav {
	order: 1;
	margin-left: auto;
}
.lang-switch {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid var(--control);
	border-radius: 2px;
	color: var(--ink);
	font: 500 14px/20px var(--sans);
	text-decoration: none;
}
.lang-switch:hover {
	border-color: var(--ink);
	background: var(--quiet);
}
.lang-switch__code {
	display: none;
}

.menu-toggle {
	display: none;
	min-height: 44px;
	min-width: 44px;
	padding: 10px 16px;
	border: 1px solid var(--control);
	border-radius: 2px;
	background: transparent;
	color: var(--ink);
	font: 500 15px/22px var(--sans);
	cursor: pointer;
}
.menu-toggle:hover {
	border-color: var(--ink);
}

@media (max-width: 767px) {
	.site-header__inner {
		min-height: 80px;
	}
	.brand__name {
		font-size: 23px;
		line-height: 27px;
	}

	/* With JavaScript the menu collapses behind the toggle; without it the links stay visible. */
	.js .menu-toggle {
		display: inline-flex;
		align-items: center;
	}
	.site-header__tools {
		order: 0;
		gap: 8px;
	}
	.lang-switch__code {
		display: inline;
		letter-spacing: 0.06em;
	}
	.lang-switch__name {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
	.site-nav {
		order: 3;
		flex-basis: 100%;
		margin-left: 0;
		padding-bottom: 16px;
	}
	.js .site-nav {
		display: none;
	}
	.js .site-nav.is-open {
		display: block;
	}
	.site-nav__list {
		flex-direction: column;
		gap: 0;
	}
	.site-nav__list > li {
		border-top: 1px solid var(--rule);
	}
	.site-nav a {
		display: flex;
		min-height: 48px;
		font-size: 17px;
	}
	.site-nav__sub {
		display: block;
		padding: 0 0 8px 20px;
	}
	.site-nav__sub a {
		min-height: 44px;
		font-size: 15px;
		color: var(--muted);
	}
}

/* ==========================================================================
   Page scaffolding
   ========================================================================== */

.site-main {
	display: block;
	padding-bottom: var(--section);
}
.site-main:focus {
	outline: none;
}

.page-header {
	padding-top: 40px;
	margin-bottom: 48px;
}
.page-header--plain {
	padding-top: 64px;
}

.breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
	font: 400 13px/20px var(--sans);
	color: var(--muted);
}
.breadcrumb li {
	display: flex;
	align-items: center;
	min-height: 24px;
}
.breadcrumb li + li::before {
	content: "/";
	margin: 0 10px;
	color: var(--control);
}
.breadcrumb a {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	color: var(--muted);
	text-decoration: underline;
	text-decoration-color: var(--rule);
}
.breadcrumb a:hover {
	color: var(--ink);
	text-decoration-color: currentColor;
}
.breadcrumb [aria-current] {
	color: var(--ink);
}

@media (max-width: 767px) {
	.page-header { padding-top: 24px; margin-bottom: 32px; }
	.page-header--plain { padding-top: 40px; }
	.breadcrumb ol { margin-bottom: 24px; }
}

/* ==========================================================================
   Home: hero
   ========================================================================== */

.hero {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	column-gap: 48px;
	align-items: center;
	padding-block: 88px var(--section);
}

.hero__title {
	font-size: 80px;
	line-height: 84px;
	letter-spacing: -0.03em;
}
.hero__title span {
	display: block;
}

.hero__text {
	max-width: 520px;
	margin-top: 32px;
	font: 400 19px/31px var(--sans);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 32px;
	margin-top: 40px;
}

.hero__figure {
	margin: 0;
}
.hero__frame {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--quiet);
}
.hero__frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/*
 * The Rio panorama (1332 × 463) has a printed legend along its lower fifth
 * and a fold line near x = 700. The crop is a source rectangle (x, y, w, h):
 *   width = 1332 / w, left = -x / w, top = -y / h (as percentages).
 * Desktop 4:3 is (720, 60, 413, 310): the city, harbour and mountains.
 */
.hero__frame--panorama {
	--crop-width: 322.5%;
	--crop-left: -174.3%;
	--crop-top: -19.35%;
}
.hero__frame--panorama img {
	position: absolute;
	top: var(--crop-top);
	left: var(--crop-left);
	width: var(--crop-width);
	max-width: none;
	height: auto;
	object-fit: initial;
}
.hero__caption {
	margin-top: 12px;
	font: 400 13px/20px var(--sans);
	color: var(--muted);
}

@media (max-width: 1199px) {
	.hero__title { font-size: 56px; line-height: 60px; }
}
@media (max-width: 1023px) {
	.hero { column-gap: 32px; padding-top: 64px; }
}
@media (max-width: 767px) {
	.hero {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 48px;
		padding-top: 48px;
	}
	.hero__title { font-size: 44px; line-height: 46px; }
	.hero__title span { display: inline; }
	.hero__text { margin-top: 24px; font-size: 17px; line-height: 28px; }
	.hero__actions { margin-top: 32px; }
	.hero__actions .button { width: 100%; }
	.hero__frame { aspect-ratio: 16 / 9; }
	/* Mobile 16:9 is (710, 60, 551, 310). */
	.hero__frame--panorama {
		--crop-width: 241.7%;
		--crop-left: -128.9%;
		--crop-top: -19.35%;
	}
}
@media (max-width: 360px) {
	.hero__title { font-size: 40px; line-height: 44px; }
	.site-header__inner { column-gap: 10px; }
	.site-header__tools { gap: 6px; }
	.brand__name { font-size: 20px; line-height: 24px; }
	.brand__sub { font-size: 10px; letter-spacing: 0.08em; }
	.lang-switch,
	.menu-toggle { padding-inline: 12px; }
}

/* ==========================================================================
   Home: routes into the collection
   ========================================================================== */

.routes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
}
.routes li + li {
	border-left: 1px solid var(--rule);
}
.route {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 16px;
	height: 100%;
	padding: 32px;
	text-decoration: none;
	color: var(--ink);
}
.routes li:first-child .route {
	padding-left: 0;
}
.routes li:last-child .route {
	padding-right: 0;
}
.route__number {
	grid-column: 1 / -1;
	margin-bottom: 20px;
	font: 500 13px/20px var(--sans);
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
.route__label {
	font: 400 32px/38px var(--serif);
	letter-spacing: -0.01em;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: text-decoration-color var(--ease);
}
.route__text {
	grid-column: 1;
	margin-top: 8px;
	font: 400 15px/22px var(--sans);
	color: var(--muted);
}
.route .arrow {
	grid-column: 2;
	grid-row: 2 / span 2;
	align-self: end;
	font-size: 20px;
	color: var(--accent);
}
.route:hover .route__label {
	text-decoration-color: currentColor;
}

@media (max-width: 1023px) {
	.route { padding: 28px 24px; }
	.route__label { font-size: 28px; line-height: 34px; }
}
@media (max-width: 767px) {
	.routes {
		grid-template-columns: minmax(0, 1fr);
		border-bottom: 0;
	}
	.routes li {
		border-bottom: 1px solid var(--rule);
	}
	.routes li + li {
		border-left: 0;
	}
	.route,
	.routes li:first-child .route,
	.routes li:last-child .route {
		padding: 24px 0;
	}
	.route__number { margin-bottom: 8px; }
	.route__label { font-size: 26px; line-height: 32px; }
}

/* ==========================================================================
   Home: start with a random short story
   ========================================================================== */

.start {
	padding-top: var(--section);
}
.start__heading {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 24px;
	border-top: 1px solid var(--ink);
}
.start__lead {
	font: 600 12px/18px var(--sans);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}
.start__title {
	max-width: 960px;
	font-size: 64px;
	line-height: 68px;
	letter-spacing: -0.02em;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.14em;
}
.start__title:hover {
	text-decoration-color: currentColor;
}
.start__meta {
	margin-top: 16px;
	font: 400 15px/22px var(--sans);
	color: var(--muted);
}
.start__genre {
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.start__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0 32px;
	margin-top: 16px;
}

@media (max-width: 1023px) {
	.start__title { font-size: 52px; line-height: 58px; }
}
@media (max-width: 767px) {
	.start__title { font-size: 38px; line-height: 44px; }
	.start__actions { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Home: about band
   ========================================================================== */

.about-band {
	margin-top: var(--section);
	padding-block: 80px;
	background: var(--quiet);
}
.about-band__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	column-gap: 48px;
}
.about-band__body {
	max-width: var(--measure);
}
.about-band__text {
	font: 400 19px/31px var(--sans);
}
.about-band__body .link-accent {
	margin-top: 16px;
}
.about-band__contact {
	margin-top: 24px;
}
.about-band__contact .link-accent {
	margin-top: 0;
	font-size: 13px;
}
.about-band .prose {
	font-size: 19px;
	line-height: 31px;
}

.cite-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 32px;
	margin-top: 56px;
	padding-top: 20px;
	border-top: 1px solid var(--rule);
}
.cite-row .eyebrow {
	margin: 0;
}
.cite-row__text {
	flex: 1 1 360px;
	max-width: var(--measure);
	font: 400 17px/28px var(--serif);
}

@media (max-width: 767px) {
	.about-band { padding-block: 56px; }
	.about-band__grid {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 24px;
	}
	.about-band__text,
	.about-band .prose { font-size: 17px; line-height: 28px; }
	.cite-row { flex-direction: column; margin-top: 40px; }
	.cite-row__text { flex-basis: auto; }
}

/* ==========================================================================
   Catalog (text lists, corpus lists)
   ========================================================================== */

.genre-nav {
	margin-bottom: 40px;
	border-bottom: 1px solid var(--rule);
}
.genre-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0 32px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.genre-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	font: 500 15px/22px var(--sans);
	text-decoration: none;
	text-underline-offset: 14px;
	color: var(--muted);
}
.genre-nav a:hover {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
}
.genre-nav a[aria-current="page"] {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.catalog-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
	margin-bottom: 32px;
}
.catalog-tools__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: min(100%, 420px);
}
.catalog-tools label {
	font: 500 15px/22px var(--sans);
}
.catalog-tools input {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--control);
	border-radius: 2px;
	background: var(--white);
	color: var(--ink);
	font: 400 17px/24px var(--sans);
}
.catalog-tools input:hover {
	border-color: var(--ink);
}
.catalog-tools input:focus-visible {
	outline-offset: 2px;
}
.catalog-tools input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}
.catalog-tools__status {
	flex-basis: 100%;
	min-height: 20px;
	font: 400 13px/20px var(--sans);
	color: var(--muted);
}

.catalog {
	list-style: none;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--rule);
}
.catalog-row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 140px 72px 24px;
	column-gap: 24px;
	align-items: baseline;
	min-height: 88px;
	padding-block: 26px;
	border-top: 1px solid var(--rule);
}
.catalog-row__title {
	font: 400 26px/34px var(--serif);
	letter-spacing: -0.005em;
}
.catalog-row__title a {
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}
/* One link per row: the title link covers the row. */
.catalog-row__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.catalog-row__title a:focus-visible {
	outline: none;
}
.catalog-row:focus-within {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}
.catalog-row__sub {
	display: block;
	margin-top: 4px;
	font: italic 400 17px/26px var(--serif);
	color: var(--muted);
}
.catalog-row__genre {
	font: 600 12px/18px var(--sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}
.catalog-row__year {
	justify-self: end;
	font: 500 15px/22px var(--sans);
	font-variant-numeric: tabular-nums;
}
.catalog-row .arrow {
	justify-self: end;
	color: var(--accent);
	transition: transform var(--ease);
}
.catalog-row:hover .catalog-row__title a {
	text-decoration-color: currentColor;
}
.catalog-row:hover .arrow {
	transform: translateX(3px);
}

/* Corpus rows: title, then a "View corpus" cue. */
.catalog--corpora .catalog-row {
	grid-template-columns: minmax(0, 1fr) auto;
}
.catalog-row__cue {
	font: 500 15px/22px var(--sans);
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	white-space: nowrap;
}
.catalog-row:hover .catalog-row__cue {
	text-decoration-thickness: 2px;
}

.catalog-empty {
	padding: 40px 0;
	border-top: 1px solid var(--rule);
}
.catalog-empty p {
	margin-bottom: 20px;
	font: 400 19px/31px var(--sans);
}

@media (max-width: 767px) {
	.genre-nav { margin-bottom: 32px; }
	.genre-nav ul { gap: 0 24px; }
	.catalog-row {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"title arrow"
			"meta  meta";
		row-gap: 6px;
		min-height: 0;
		padding-block: 20px;
	}
	.catalog-row__title {
		grid-area: title;
		font-size: 23px;
		line-height: 30px;
	}
	.catalog-row .arrow { grid-area: arrow; }
	.catalog-row__year {
		font-size: 14px;
		line-height: 18px;
	}
	/* Genre and year share the second line: "NOVEL · 1899". */
	.catalog-row__meta {
		grid-area: meta;
		display: flex;
		align-items: baseline;
		gap: 8px;
	}
	.catalog-row__meta .catalog-row__year::before {
		content: "·";
		margin-right: 8px;
		color: var(--muted);
	}
	.catalog--corpora .catalog-row {
		grid-template-areas:
			"title"
			"cue";
		grid-template-columns: minmax(0, 1fr);
	}
	.catalog-row__cue { grid-area: cue; justify-self: start; }
}
@media (min-width: 768px) {
	/* On wide screens the meta wrapper disappears and its children join the row grid. */
	.catalog-row__meta {
		display: contents;
	}
	.catalog-row__genre { grid-column: 2; }
	.catalog-row__year { grid-column: 3; }
	.catalog-row > .arrow { grid-column: 4; }
}

/* ==========================================================================
   Single work / corpus
   ========================================================================== */

.record-header .page-title {
	max-width: 960px;
}
.record-subtitle {
	margin-top: 12px;
	font: italic 400 22px/30px var(--serif);
	color: var(--muted);
}
.record-meta {
	margin-top: 20px;
	font: 400 15px/22px var(--sans);
	color: var(--muted);
}
.record-meta a {
	color: var(--ink);
}

.record-body {
	display: grid;
	grid-template-columns: minmax(0, var(--measure)) minmax(240px, 1fr);
	column-gap: 72px;
	align-items: start;
}
.record-body--solo {
	grid-template-columns: minmax(0, var(--measure));
}
.record-actions {
	padding-top: 24px;
	border-top: 1px solid var(--ink);
}
.record-actions__note {
	margin-top: 12px;
	font: 400 13px/20px var(--sans);
	color: var(--muted);
}
.record-actions__note + .record-actions__note {
	margin-top: 4px;
}

.record-section {
	margin-top: var(--section);
}
.record-section__head {
	margin-bottom: 32px;
}
.record-section__head .meta {
	margin-top: 8px;
}

/* Story text: kept exactly as stored, line breaks included, but wrapped to the column. */
.work-text {
	max-width: 68ch;
	margin: 0;
	font: 400 19px/31px var(--serif);
	color: var(--ink);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	tab-size: 4;
}

@media (max-width: 1023px) {
	.record-body { column-gap: 48px; }
}
@media (max-width: 767px) {
	.record-body,
	.record-body--solo {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 32px;
	}
	.record-actions .button { width: 100%; }
	.record-subtitle { font-size: 19px; line-height: 27px; }
	.work-text { font-size: 17px; line-height: 29px; }
}

/* ==========================================================================
   Prose (page content and descriptions)
   ========================================================================== */

.prose {
	max-width: var(--measure);
	font: 400 19px/31px var(--serif);
}
.prose > * + * {
	margin-top: 20px;
}
.prose h2 {
	margin-top: 56px;
	font-size: 32px;
	line-height: 38px;
}
.prose h3 {
	margin-top: 48px;
	font-size: 26px;
	line-height: 32px;
}
.prose h2 + *,
.prose h3 + * {
	margin-top: 16px;
}
.prose ul,
.prose ol {
	padding-left: 1.3em;
}
.prose li + li {
	margin-top: 8px;
}
.prose blockquote {
	margin: 28px 0;
	padding-left: 24px;
	border-left: 2px solid var(--rule);
	font-style: italic;
}
.prose img {
	display: block;
}
.prose figure {
	margin-inline: 0;
}
.prose figcaption,
.prose .wp-caption-text {
	margin-top: 8px;
	font: 400 13px/20px var(--sans);
	color: var(--muted);
}
.prose hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin-block: 48px;
}
.prose .alignleft { float: left; margin: 6px 24px 12px 0; }
.prose .alignright { float: right; margin: 6px 0 12px 24px; }
.prose .aligncenter { margin-inline: auto; }

/* Ruled link lists (Collaborators, Additional Resources). */
.prose--ruled ul {
	list-style: none;
	padding: 0;
	border-bottom: 1px solid var(--rule);
}
.prose--ruled li,
.prose--ruled li + li {
	margin: 0;
	border-top: 1px solid var(--rule);
}
.prose--ruled li a {
	display: block;
	padding: 18px 0;
	font-size: 22px;
	line-height: 30px;
	color: var(--ink);
	text-decoration-color: transparent;
}
.prose--ruled li a:hover {
	text-decoration-color: currentColor;
	text-decoration-thickness: 1px;
}

@media (max-width: 767px) {
	.prose { font-size: 17px; line-height: 29px; }
	.prose h2 { font-size: 27px; line-height: 33px; }
	.prose h3 { font-size: 23px; line-height: 30px; }
	.prose--ruled li a { font-size: 19px; line-height: 27px; }
}

.page-section {
	max-width: var(--measure);
	margin-top: 72px;
	padding-top: 24px;
	border-top: 1px solid var(--rule);
}
.page-section h2 {
	margin-bottom: 16px;
	font-size: 30px;
	line-height: 36px;
}
.page-section p {
	font: 400 19px/31px var(--serif);
}
.page-section a {
	color: var(--accent);
}

/* Index, search and 404 listings. */
.entry-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--rule);
}
.entry-list > li {
	padding-block: 28px;
	border-top: 1px solid var(--rule);
}
.entry-list h2 {
	font-size: 26px;
	line-height: 34px;
}
.entry-list h2 a {
	text-decoration-color: transparent;
}
.entry-list h2 a:hover {
	text-decoration-color: currentColor;
}
.entry-list .entry-summary {
	margin-top: 8px;
	font: 400 16px/26px var(--sans);
	color: var(--muted);
}
.pagination {
	margin-top: 40px;
	font: 500 15px/22px var(--sans);
}
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}
.pagination a {
	color: var(--accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	background: var(--ink);
	color: var(--white);
	padding-block: 48px;
	font: 400 15px/22px var(--sans);
}
.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 32px 48px;
}
.site-footer .brand {
	color: var(--white);
	padding: 0;
}
.site-footer .brand__sub {
	color: #C9D3DA;
}
.site-footer a:focus-visible {
	outline-color: var(--white);
}
.footer-contact {
	margin-top: 20px;
}
.footer-contact a,
.footer-links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--white);
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.45);
}
.footer-contact a:hover,
.footer-links a:hover {
	text-decoration-color: var(--white);
	text-decoration-thickness: 2px;
}
.footer-links ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.footer-legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 32px;
	flex-basis: 100%;
	padding-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	font-size: 13px;
	line-height: 20px;
	color: #C9D3DA;
}

.footer-units {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}
.footer-units li + li::before {
	content: "·" / "";
	margin: 0 12px;
}
.footer-units a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--white);
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.45);
}
.footer-units a:hover {
	text-decoration-color: var(--white);
	text-decoration-thickness: 2px;
}

@media (max-width: 767px) {
	.site-footer__inner { flex-direction: column; gap: 24px; }
	.footer-legal { flex-direction: column; align-items: flex-start; }
	.footer-links ul { gap: 0 24px; }
}
