/* Affections — Religious Affections Ministries archive theme.
   The RAM brand: navy (#223e5b) and antique gold (#9f852c) on warm ivory.
   Source Serif 4 (variable weight and optical size) for reading; the
   system sans for small UI text. */

@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 200 900;
	font-display: swap;
	src: url("../fonts/SourceSerif4.woff2") format("woff2");
}
@font-face {
	font-family: "Source Serif 4";
	font-style: italic;
	font-weight: 200 900;
	font-display: swap;
	src: url("../fonts/SourceSerif4-Italic.woff2") format("woff2");
}

:root {
	--paper: #f7f5f0;
	--paper-2: #eeebe3;
	--card: #ffffff;
	--ink: #17222f;
	--ink-2: #3b4655;
	--muted: #6b7280;
	--line: #e1ddd3;
	--line-2: #cfc9bc;
	--accent: #223e5b;
	--accent-2: #2f5378;
	--accent-ink: #ffffff;
	--accent-soft: #e5ebf2;
	--gold: #9f852c;
	--gold-text: #7c6620;
	--gold-soft: #f1ead6;
	--navy-deep: #182d44;
	--mark: #f3e3a6;
	--shadow: 0 1px 2px rgba(23, 34, 47, .06), 0 8px 24px -12px rgba(23, 34, 47, .2);
	--shadow-lg: 0 2px 4px rgba(23, 34, 47, .05), 0 24px 48px -20px rgba(23, 34, 47, .32);
	--radius: 14px;
	--radius-sm: 9px;
	--serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
	--sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--wrap: 1200px;
	--text: 700px;
	--gutter: clamp(16px, 4vw, 32px);
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--paper: #10161e;
		--paper-2: #151d28;
		--card: #1a2330;
		--ink: #eee9df;
		--ink-2: #c9cfd8;
		--muted: #949cab;
		--line: #2a3443;
		--line-2: #3a4658;
		--accent: #a9c0dc;
		--accent-2: #c7d6ea;
		--accent-ink: #10161e;
		--accent-soft: #23324a;
		--gold: #d4b85e;
		--gold-text: #d4b85e;
		--gold-soft: #33301f;
		--navy-deep: #0b1119;
		--mark: #5d4d1a;
		--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
		--shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 24px 48px -20px rgba(0, 0, 0, .7);
		color-scheme: dark;
	}
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.0625rem;
	line-height: 1.6;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 600; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; }
mark { background: var(--mark); color: inherit; padding: 0 .1em; border-radius: 3px; }
.icon { flex: none; vertical-align: middle; }

.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; width: 1px; word-wrap: normal !important;
}
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; position: fixed; top: 12px; left: 12px; z-index: 1000; padding: 10px 16px; background: var(--card); color: var(--ink); border-radius: 8px; box-shadow: var(--shadow); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--text { max-width: calc(var(--text) + 2 * var(--gutter)); }
.wrap--wide { max-width: calc(1040px + 2 * var(--gutter)); }
.wrap--results { max-width: calc(880px + 2 * var(--gutter)); }

.kicker {
	font-family: var(--serif);
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--gold-text);
	margin: 0 0 .7rem;
}
.kicker a { color: inherit; text-decoration: none; }

.button {
	display: inline-flex; align-items: center; gap: .5em;
	font-family: var(--sans); font-weight: 600; font-size: .95rem;
	padding: .75em 1.25em; border-radius: 999px; border: 0;
	background: var(--accent); color: var(--accent-ink); text-decoration: none; cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

.pill {
	display: inline-flex; align-items: center; gap: .35em;
	font-family: var(--sans); font-size: .72rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
	color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line);
	padding: .3em .7em; border-radius: 999px; text-decoration: none; max-width: 100%;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pill:hover { border-color: var(--line-2); color: var(--ink); }
.pill--series { color: var(--gold-text); background: var(--gold-soft); border-color: transparent; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	display: inline-flex; align-items: center; gap: .4em;
	font-family: var(--sans); font-size: .875rem; font-weight: 550;
	padding: .45em .95em; border-radius: 999px; text-decoration: none;
	color: var(--ink-2); background: var(--card); border: 1px solid var(--line);
	transition: border-color .15s, color .15s, transform .15s;
}
.chip:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.chip--small { font-size: .78rem; padding: .35em .8em; }
.chip__count { color: var(--muted); font-weight: 500; }

/* ---------- Header ---------- */

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--paper) 86%, transparent);
	backdrop-filter: saturate(1.4) blur(12px);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.brand__logo { display: block; height: 42px; width: auto; }
.brand__logo--light { display: none; }
@media (prefers-color-scheme: dark) { .brand__logo--dark { display: none; } .brand__logo--light { display: block; } }

.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
	display: block; padding: .5em .85em; border-radius: 999px;
	font-family: var(--sans); font-size: .92rem; font-weight: 550; color: var(--ink-2); text-decoration: none;
}
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--accent); background: var(--accent-soft); }
.site-nav { margin-left: auto; }
.site-header__search { width: min(320px, 30vw); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--ink); padding: 8px; border-radius: 8px; cursor: pointer; }
.nav-toggle__close { display: none; }

@media (max-width: 900px) {
	.site-header__inner { gap: 12px; min-height: 60px; }
	.brand__logo { height: 30px; }
	.nav-toggle { display: inline-flex; }
	.site-header__search { display: none; }
	.site-header__inner { flex-wrap: wrap; }
	.site-nav { display: none; order: 3; flex: 1 0 100%; margin: 0; padding: 4px 0 8px; }
	.site-header__search { order: 4; flex: 1 0 100%; width: auto; padding-bottom: 16px; }
	.site-nav__list { flex-direction: column; }
	.site-nav a { padding: .8em 1em; font-size: 1rem; }
	.nav-open .site-nav { display: block; }
	.nav-open .site-header__search { display: block; }
	.nav-open .nav-toggle__open { display: none; }
	.nav-open .nav-toggle__close { display: inline; }
}

/* ---------- Search box and suggestions ---------- */

.search-box { position: relative; display: flex; align-items: center; width: 100%; }
.search-box__icon { position: absolute; left: 16px; color: var(--muted); display: flex; pointer-events: none; }
.search-box__input {
	width: 100%; font: inherit; color: var(--ink); background: var(--card);
	border: 1px solid var(--line-2); border-radius: 999px;
	padding: .6em 2.6em .6em 2.6em; font-family: var(--sans); font-size: .92rem;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none; appearance: none;
}
.search-box__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-box__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.search-box__kbd {
	position: absolute; right: 12px; font-family: var(--sans); font-size: .72rem; color: var(--muted);
	border: 1px solid var(--line-2); border-radius: 5px; padding: 0 .4em; line-height: 1.5;
}
.search-box__input:focus ~ .search-box__kbd { display: none; }

.search-box--large .search-box__icon { left: 24px; }
.search-box--large .search-box__input {
	font-size: clamp(1rem, 2.2vw, 1.2rem); padding: 1.05em 8.5em 1.05em 3.3em;
	border-width: 1.5px; box-shadow: var(--shadow-lg); font-family: var(--serif);
}
.search-box__submit {
	position: absolute; right: 8px; top: 8px; bottom: 8px;
	padding: 0 1.5em; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--accent); color: var(--accent-ink); font-family: var(--sans); font-weight: 650; font-size: .95rem;
}
.search-box__submit:hover { filter: brightness(1.08); }
@media (max-width: 560px) {
	.search-box--large .search-box__input { padding-right: 1.2em; }
	.search-box__submit { display: none; }
}

.suggest {
	position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow-lg); padding: 8px; max-height: min(70vh, 560px); overflow: auto;
	font-family: var(--sans); text-align: left;
}
.site-header__search .suggest { min-width: 380px; right: 0; left: auto; }
@media (max-width: 560px) { .site-header__search .suggest { min-width: 0; left: 0; } }
.suggest__group { padding: 4px 0; }
.suggest__group + .suggest__group { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.suggest__label { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 4px 10px; margin: 0; }
.suggest__item {
	display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
	color: var(--ink); text-decoration: none; line-height: 1.3;
}
.suggest__item[aria-selected="true"], .suggest__item:hover { background: var(--paper-2); }
.suggest__item .icon { color: var(--muted); }
.suggest__photo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.suggest__text { display: flex; flex-direction: column; min-width: 0; }
.suggest__title { font-size: .95rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest__meta { font-size: .78rem; color: var(--muted); }
.suggest__all { justify-content: center; color: var(--accent); font-weight: 600; font-size: .9rem; }
.suggest__empty { padding: 12px; color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Hero (home) ---------- */

.hero {
	position: relative; overflow: hidden; isolation: isolate;
	padding: clamp(48px, 9vw, 112px) 0 clamp(40px, 7vw, 80px);
	background: radial-gradient(900px 420px at 50% 0%, #2f5378, transparent 70%), linear-gradient(#223e5b, #182d44);
	color: #f3eee3;
}
.hero::before {
	content: ""; position: absolute; z-index: -1; right: -60px; bottom: -80px; width: 420px; height: 636px;
	background: url("../images/ram-flame-light.png") no-repeat center / contain; opacity: .06;
}
.hero::after {
	content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
	background: linear-gradient(90deg, transparent, #9f852c, transparent);
}
.hero .kicker { color: #d9c27a; }
.hero__title { color: #fff; }
.hero__lede { color: rgba(243, 238, 227, .82) !important; }
.hero .search-box__input { border-color: transparent; }
.hero .search-box__submit { background: #9f852c; color: #fff; }
.hero .chip { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .18); color: #f3eee3; }
.hero .chip:hover { border-color: #d9c27a; color: #fff; }
.hero__stats dd { color: #fff; }
.hero__stats dt { color: rgba(243, 238, 227, .65) !important; }
@media (prefers-color-scheme: dark) { .hero { background: radial-gradient(900px 420px at 50% 0%, #1d3350, transparent 70%), linear-gradient(#142233, #0b1119); } }
.hero__inner { max-width: calc(860px + 2 * var(--gutter)); text-align: center; }
.hero__title { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 600; letter-spacing: -.02em; margin-bottom: .45em; }
.hero__lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 640px; margin: 0 auto 2rem; }
.hero .search-box { max-width: 760px; margin: 0 auto; }
.hero__chips { justify-content: center; margin-top: 22px; }
.hero__stats { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(20px, 5vw, 56px); margin: 38px 0 0; }
.hero__stats div { display: flex; flex-direction: column-reverse; align-items: center; }
.hero__stats dd { margin: 0; font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 600; line-height: 1; }
.hero__stats dt { font-family: var(--sans); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* ---------- Sections ---------- */

.section { padding: clamp(40px, 6vw, 72px) 0; }
.section--tint { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head__title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }
.section-head .kicker { margin-bottom: .4rem; }
.section-head__link { font-family: var(--sans); font-weight: 600; font-size: .9rem; text-decoration: none; display: inline-flex; gap: .35em; align-items: center; white-space: nowrap; }

/* ---------- Cards ---------- */

.card-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .card-grid--3, .card-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid--3, .card-grid--4 { grid-template-columns: 1fr; } }

.card {
	position: relative; display: flex; flex-direction: column;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__media img { transform: scale(1.03); }
.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__eyebrow { margin: 0; min-height: 0; display: flex; gap: 6px; }
.card__eyebrow:empty { display: none; }
.card__title { font-size: 1.2rem; line-height: 1.25; margin: 0; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:hover { color: var(--accent); }
.card__excerpt { color: var(--ink-2); font-size: .97rem; margin: 0; }
.card__meta { margin: auto 0 0; padding-top: 6px; display: flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.card__meta .avatar { width: 24px; height: 24px; }
.card .pill, .card__meta a { position: relative; z-index: 2; }
.card:not(.has-image) .card__body { padding-top: 22px; }
.card:not(.has-image).card--card { border-top: 3px solid var(--gold); }

.card__rank {
	position: absolute; z-index: 3; top: 14px; left: 14px;
	width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
	background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .95rem; box-shadow: var(--shadow);
}
.card--mini { flex-direction: row; align-items: center; border: 0; border-radius: 0; background: none; }
.card--mini:hover { transform: none; box-shadow: none; }
.card--mini .card__rank { position: static; flex: none; width: 2.2rem; height: auto; background: none; color: var(--gold); box-shadow: none; font-size: 1.6rem; font-weight: 600; border-radius: 0; justify-content: start; }
.card--mini .card__body { padding: 0; gap: 4px; }
.card--mini .card__title { font-size: 1.05rem; }
.card--mini .card__eyebrow { display: none; }

.card--row { flex-direction: row-reverse; align-items: stretch; }
.card--row .card__body { padding: 18px 22px; }
.card--row.has-image::before { display: none; }
.row-list { display: grid; gap: 14px; }
.card--row .card__title { font-size: 1.25rem; }

/* Popular block */
.popular { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.popular__lead .card__title { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
.popular__lead .card__media { aspect-ratio: 16 / 9; }
.popular__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: none; }
.popular__list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.popular__list li:first-child { padding-top: 4px; }
@media (max-width: 860px) { .popular { grid-template-columns: 1fr; } }

/* ---------- Series ---------- */

.series-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.series-card { position: relative; }
.series-card[hidden] { display: none; }
.series-card__link {
	display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink);
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: 6px 6px 0 -1px var(--paper-2), 6px 6px 0 0 var(--line), 12px 12px 0 -1px var(--paper-2), 12px 12px 0 0 var(--line);
	transition: transform .2s ease, box-shadow .2s ease; margin: 0 12px 12px 0; overflow: hidden;
}
.section--tint .series-card__link { box-shadow: 6px 6px 0 -1px var(--paper), 6px 6px 0 0 var(--line), 12px 12px 0 -1px var(--paper), 12px 12px 0 0 var(--line); }
.series-card__link:hover { transform: translate(-2px, -2px); }
.series-card__stack { display: block; aspect-ratio: 21 / 9; background: linear-gradient(135deg, #223e5b, #182d44); overflow: hidden; }
.series-card__stack img { width: 100%; height: 100%; object-fit: cover; }
.series-card__glyph { display: grid; place-items: center; height: 100%; color: var(--accent); opacity: .7; }
.series-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.series-card__count { font-family: var(--sans); font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-text); }
.series-card__title { font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
.series-card__by { font-family: var(--sans); font-size: .82rem; color: var(--muted); }

.series-box { margin: 0 0 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font-family: var(--sans); }
.series-box summary { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; list-style: none; }
.series-box summary::-webkit-details-marker { display: none; }
.series-box__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-text); flex: none; }
.series-box__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.series-box__part { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.series-box__name { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; color: var(--ink); }
.series-box__toggle { font-size: .85rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.series-box__toggle::after { content: " ▾"; }
.series-box[open] .series-box__toggle::after { content: " ▴"; }
.series-box__list { margin: 0; padding: 4px 18px 6px 48px; border-top: 1px solid var(--line); max-height: 360px; overflow: auto; font-size: .93rem; }
.series-box__list li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.series-box__list li:last-child { border-bottom: 0; }
.series-box__list a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: .2em; }
.series-box__list a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.series-box__list .is-current { color: var(--muted); }
.series-box__now { display: inline-block; margin-left: .4em; padding: .1em .55em; border-radius: 999px; font-size: .72rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-text); background: var(--gold-soft); vertical-align: middle; }
.series-box__all { margin: 0; padding: 10px 18px 14px; font-size: .88rem; font-weight: 600; }
.series-box__all a { text-decoration: none; }

.series-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 2.5rem 0; }
.series-pager__link { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.series-pager__link:hover { border-color: var(--accent); transform: translateY(-1px); }
.series-pager__link--next { text-align: right; grid-column: 2; }
.series-pager__label { font-family: var(--sans); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; color: var(--accent); display: inline-flex; gap: .3em; align-items: center; }
.series-pager__link--next .series-pager__label { justify-content: flex-end; }
.series-pager__title { font-weight: 600; line-height: 1.3; }
@media (max-width: 560px) { .series-pager { grid-template-columns: 1fr; } .series-pager__link--next { grid-column: 1; } }

.series-list { list-style: none; margin: 0; padding: 0; counter-reset: part; }
.series-list__item { counter-increment: part; position: relative; padding-left: 64px; }
.series-list__item::before {
	content: counter(part); position: absolute; left: 0; top: 20px; width: 42px; height: 42px; border-radius: 50%;
	display: grid; place-items: center; background: var(--card); border: 1.5px solid var(--line-2); color: var(--accent); font-weight: 700;
}
.series-list__item::after { content: ""; position: absolute; left: 20px; top: 66px; bottom: -20px; width: 2px; background: var(--line); }
.series-list__item:last-child::after { display: none; }
.series-list__link { display: flex; flex-direction: column; gap: 4px; padding: 20px 0 24px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.series-list__title { font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.series-list__link:hover .series-list__title { color: var(--accent); }
.series-list__excerpt { color: var(--ink-2); font-size: .98rem; }
.series-list__meta { font-family: var(--sans); font-size: .8rem; color: var(--muted); }

/* ---------- Authors ---------- */

.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--paper-2); }
.avatar--initials {
	display: inline-grid; place-items: center; width: var(--size, 48px); height: var(--size, 48px);
	background: hsl(var(--hue, 0) 32% 86%); color: hsl(var(--hue, 0) 38% 28%);
	font-family: var(--serif); font-weight: 650; font-size: calc(var(--size, 48px) * .38); letter-spacing: .02em;
}
@media (prefers-color-scheme: dark) { .avatar--initials { background: hsl(var(--hue, 0) 20% 26%); color: hsl(var(--hue, 0) 40% 84%); } }

.author-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .author-grid { grid-template-columns: repeat(2, 1fr); } }
.author-chip { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 22px 12px 18px; border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: background .15s, transform .15s; }
.author-chip:hover { background: var(--card); transform: translateY(-2px); box-shadow: var(--shadow); }
.author-chip .avatar { width: 112px; height: 112px; margin-bottom: 10px; box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--line); }
.author-chip__name { font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.author-chip__meta { font-family: var(--sans); font-size: .8rem; color: var(--muted); }

.author-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
@media (max-width: 420px) { .author-cards { grid-template-columns: 1fr; } }
.author-card__link { display: flex; gap: 18px; align-items: flex-start; height: 100%; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.author-card__link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.author-card .avatar { width: 96px; height: 96px; }
.author-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.author-card__name { font-size: 1.2rem; font-weight: 600; }
.author-card__meta { font-family: var(--sans); font-size: .8rem; color: var(--accent); font-weight: 600; }
.author-card__bio { font-size: .95rem; color: var(--ink-2); line-height: 1.5; }

.profile { padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); background: linear-gradient(var(--paper-2), var(--paper)); border-bottom: 1px solid var(--line); }
.profile__inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; max-width: calc(1000px + 2 * var(--gutter)); }
.profile__photo .avatar { width: clamp(140px, 20vw, 200px); height: clamp(140px, 20vw, 200px); box-shadow: 0 0 0 6px var(--card), 0 0 0 7px var(--line-2), var(--shadow-lg); }
.profile__photo .avatar--initials { --size: clamp(140px, 20vw, 200px) !important; font-size: 3.4rem; }
.profile__name { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: .3em; }
.profile__bio { font-size: 1.1rem; color: var(--ink-2); max-width: 640px; }
.profile__bio p:last-child { margin-bottom: 0; }
.profile__stats { display: flex; gap: 32px; margin: 22px 0 24px; flex-wrap: wrap; }
.profile__stats div { display: flex; flex-direction: column-reverse; }
.profile__stats dd { margin: 0; font-size: 1.6rem; font-weight: 600; line-height: 1; }
.profile__stats dt { font-family: var(--sans); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.profile__search { position: relative; display: flex; align-items: center; max-width: 420px; }
.profile__search input { width: 100%; font-family: var(--sans); font-size: .95rem; padding: .7em 1em .7em 2.6em; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--ink); }
.profile__search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
@media (max-width: 640px) { .profile__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; } .profile__stats { justify-content: center; } .profile__search { margin: 0 auto; width: 100%; } }

/* ---------- Topics ---------- */

.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .topic-grid { grid-template-columns: 1fr; } }
.topic-grid > li { display: flex; }
.topic-grid .topic-tile { flex: 1; }
.topic-tile { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.topic-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.topic-tile__name { font-weight: 600; font-size: 1.05rem; }
.topic-tile__count { font-family: var(--sans); font-size: .8rem; color: var(--muted); background: var(--paper-2); padding: .15em .6em; border-radius: 999px; }
.topic-grid--large .topic-tile { padding: 22px; }

/* ---------- Page heads ---------- */

.page-head { padding: clamp(40px, 7vw, 80px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); background: linear-gradient(var(--paper-2), var(--paper)); }
.page-head__title { font-size: clamp(2rem, 5vw, 3.1rem); max-width: 900px; }
.page-head__lede { font-size: 1.15rem; color: var(--ink-2); max-width: 700px; }
.page-head__meta { font-family: var(--sans); font-size: .88rem; color: var(--muted); }
.page-head .chips { margin-top: 18px; }
.page-head .button { margin-top: 10px; }
.filter-box { position: relative; display: flex; align-items: center; max-width: 380px; margin-top: 20px; color: var(--muted); }
.filter-box .icon { position: absolute; left: 14px; }
.filter-box input { width: 100%; padding: .7em 1em .7em 2.6em; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font-family: var(--sans); font-size: .95rem; color: var(--ink); }

/* ---------- Search results ---------- */

.search-hero { padding: clamp(36px, 6vw, 64px) 0 24px; background: linear-gradient(var(--paper-2), var(--paper)); border-bottom: 1px solid var(--line); }
.search-hero .wrap { max-width: calc(880px + 2 * var(--gutter)); }
.search-hero .page-head__title { margin-bottom: .3em; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.filter { display: inline-flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 150px; max-width: 240px; }
.filter__label { font-family: var(--sans); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-left: 4px; }
.filter select {
	font-family: var(--sans); font-size: .88rem; color: var(--ink); background: var(--card);
	border: 1px solid var(--line-2); border-radius: 10px; padding: .55em 2em .55em .8em; width: 100%;
	-webkit-appearance: none; appearance: none; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b7265' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right .7em center;
}
.filter select:focus { outline: none; border-color: var(--accent); }
.search-summary { font-family: var(--sans); font-size: .92rem; color: var(--ink-2); margin: 18px 0 0; }
.search-summary__clear { margin-left: .6em; font-weight: 600; }
.section--results { padding-top: 24px; }

.results { list-style: none; margin: 0; padding: 0; }
.result { display: flex; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.result__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.result__eyebrow { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.result__eyebrow:empty { display: none; }
.result__title { font-size: 1.35rem; margin: 0; line-height: 1.25; }
.result__title a { color: var(--ink); text-decoration: none; }
.result__title a:hover { color: var(--accent); text-decoration: underline; }
.result__snippet { margin: 0; color: var(--ink-2); font-size: .98rem; line-height: 1.55; }
.result__thumb { flex: none; width: 128px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--paper-2); margin-top: 6px; }
.result__thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) { .result__thumb { width: 84px; height: 84px; } .result { gap: 14px; } .result__title { font-size: 1.15rem; } }

.empty { padding: 24px 0; }
.empty ul { color: var(--ink-2); padding-left: 1.2em; }
.empty h3 { margin-top: 2rem; }

/* ---------- Pagination ---------- */

.pagination { margin-top: 36px; }
.pagination ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination a, .pagination span {
	display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px;
	border-radius: 999px; border: 1px solid var(--line); background: var(--card);
	font-family: var(--sans); font-size: .9rem; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pagination .dots { border: 0; background: none; }

/* ---------- Article ---------- */

.article__header { padding-top: clamp(40px, 7vw, 80px); padding-bottom: 28px; }
.article__eyebrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.article__eyebrow:empty { display: none; }
.article__title { font-size: clamp(2rem, 5.2vw, 3.2rem); font-weight: 650; letter-spacing: -.02em; line-height: 1.1; margin-bottom: .6em; }
.article--page .article__title { margin-bottom: .2em; }
.article__hero { margin: 0 auto 40px; }
.article__hero img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); max-height: 560px; object-fit: cover; }
.article__tags { margin: 2.5rem 0 0; }

.byline { display: flex; align-items: center; gap: 12px; font-family: var(--sans); }
.byline .avatar { width: 44px; height: 44px; }
.byline .avatar--initials { --size: 44px !important; }
.byline__text { display: flex; flex-direction: column; line-height: 1.3; }
.byline__name { font-weight: 650; color: var(--ink); text-decoration: none; font-size: .98rem; }
a.byline__name:hover { color: var(--accent); }
.byline__meta { font-size: .85rem; color: var(--muted); }

.prose { font-size: clamp(1.08rem, 1.6vw, 1.2rem); line-height: 1.72; color: var(--ink); overflow-wrap: break-word; }
.prose > * + * { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure, .prose table, .prose pre { margin: 0 0 1.25em; }
.prose h2 { font-size: 1.65em; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 1.32em; margin: 1.6em 0 .5em; }
.prose h4 { font-size: 1.1em; margin: 1.4em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); }
.prose strong { font-weight: 650; }
.prose hr { border: 0; height: 1px; background: var(--line-2); margin: 2.5em auto; width: 40%; }
.prose img { border-radius: 8px; }
.prose blockquote {
	margin-left: 0; padding: .2em 0 .2em 1.3em; border-left: 3px solid var(--accent);
	color: var(--ink-2); font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose figure, .prose .wp-caption { max-width: 100%; }
.prose figcaption, .prose .wp-caption-text { font-family: var(--sans); font-size: .82rem; color: var(--muted); text-align: center; margin-top: .6em; }
.prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.prose .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
@media (max-width: 560px) { .prose .alignleft, .prose .alignright { float: none; margin: 0 auto 1em; max-width: 100%; display: block; } }
.prose table { width: 100%; border-collapse: collapse; font-size: .9em; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .55em .75em; text-align: left; }
.prose pre { background: var(--paper-2); padding: 1em; border-radius: 8px; overflow-x: auto; font-size: .85em; }
.prose iframe { border: 0; }
.prose::after { content: ""; display: table; clear: both; }

.prose > p:first-of-type::first-letter {
	float: left; font-size: 3.6em; line-height: .85; font-weight: 650; padding: .06em .1em 0 0; color: var(--gold);
}
.article--page .prose > p:first-of-type::first-letter { all: unset; }

/* Pull quotes */
.pullquote {
	margin: 1.8em 0; padding: 1.1em 0; border-block: 1px solid var(--line-2);
	font-size: 1.35em; line-height: 1.4; font-style: italic; font-weight: 500; color: var(--accent); text-align: center; border-color: var(--gold);
}
.pullquote p { margin: 0; }
.pullquote::before { content: "“"; display: block; font-size: 2.4em; line-height: .5; margin-top: .25em; color: var(--gold); font-style: normal; }
@media (min-width: 900px) {
	.pullquote--right, .pullquote--left { width: 46%; font-size: 1.15em; text-align: left; }
	.pullquote--right { float: right; margin: .4em -12% 1em 1.5em; }
	.pullquote--left { float: left; margin: .4em 1.5em 1em -12%; }
}

/* Footnotes */
sup.footnote { line-height: 0; font-size: .7em; vertical-align: super; margin-left: 1px; }
sup.footnote a {
	display: inline-block; min-width: 1.5em; padding: .2em .35em; border-radius: 999px; text-align: center;
	font-family: var(--sans); font-weight: 700; text-decoration: none; background: var(--accent-soft); color: var(--accent);
}
sup.footnote a:hover { background: var(--accent); color: var(--accent-ink); }
.footnotes-section { margin-top: 3em; padding-top: 1.4em; border-top: 1px solid var(--line-2); }
.footnotes-title { font-family: var(--sans); font-size: .78rem !important; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 1em !important; }
ol.footnotes { font-size: .85em; line-height: 1.55; color: var(--ink-2); padding-left: 1.6em; }
ol.footnotes li { margin-bottom: .7em; scroll-margin-top: 100px; }
ol.footnotes li:target { background: var(--mark); border-radius: 6px; box-shadow: 0 0 0 6px var(--mark); }
.footnote-back-link-wrapper { white-space: nowrap; color: var(--muted); }
.footnote-back-link { text-decoration: none; }
.fn-pop {
	position: absolute; z-index: 70; max-width: min(380px, calc(100vw - 32px));
	background: var(--card); color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 12px;
	box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: .92rem; line-height: 1.5;
}
.fn-pop .footnote-back-link-wrapper { display: none; }
.fn-pop p:last-child { margin-bottom: 0; }

/* Downloads, documents, audio, video */
.download-button {
	display: inline-flex; align-items: center; gap: .7em; margin: .2em .4em .4em 0;
	padding: .7em 1.1em; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card);
	font-family: var(--sans); font-size: .92rem; font-weight: 600; color: var(--ink) !important; text-decoration: none !important;
	transition: border-color .15s, transform .15s, box-shadow .15s;
}
.download-button:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.download-button__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); flex: none; }
.download-button__meta { font-weight: 500; font-size: .78rem; color: var(--muted); }
.download-button--small { padding: .45em .8em; font-size: .85rem; }
.download-button--small .download-button__icon { width: 26px; height: 26px; }
.doc-embed { margin: 1.5em 0; }
.doc-embed iframe { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 420px; }
.doc-embed figcaption { text-align: left; }
.video-embed { aspect-ratio: 16 / 9; margin: 1.5em 0; }
.video-embed iframe { width: 100%; height: 100%; border-radius: 10px; }
.audio-player { margin: 1.5em 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.audio-player audio { width: 100%; }
.audio-player figcaption { text-align: left; }
.link-list { list-style: none; padding: 0 !important; border-top: 1px solid var(--line); }
.link-list li { padding: .7em 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.link-list li::marker { content: none; }
.link-list a { font-weight: 600; text-decoration: none; }
.link-list__meta { font-family: var(--sans); font-size: .8em; color: var(--muted); margin-left: .4em; }
.page-list ul { list-style: none; padding-left: 1.2em; border: 0; }

/* Author box */
.author-box {
	display: flex; gap: 22px; align-items: flex-start; margin: 3rem 0 4rem; padding: 26px;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.author-box__photo { flex: none; }
.author-box .avatar { width: 96px; height: 96px; }
.author-box .avatar--initials { --size: 96px !important; }
.author-box__name { font-size: 1.4rem; margin: 0 0 .4em; }
.author-box__bio { color: var(--ink-2); font-size: 1rem; line-height: 1.6; }
.author-box__bio p { margin-bottom: .7em; }
.author-box__more { font-family: var(--sans); font-weight: 650; font-size: .9rem; text-decoration: none; display: inline-flex; gap: .35em; align-items: center; }
@media (max-width: 560px) { .author-box { flex-direction: column; align-items: center; text-align: center; padding: 22px 18px; } }

.related .card-grid { margin-top: 0; }
.page-links { font-family: var(--sans); margin-top: 2em; }

/* ---------- Footer ---------- */

.site-footer { background: #182d44; color: rgba(243, 238, 227, .8); padding: 56px 0 40px; margin-top: 0; border-top: 3px solid #9f852c; }
@media (prefers-color-scheme: dark) { .site-footer { background: #0b1119; } }
.site-footer__logo { display: block; width: min(320px, 80%); height: auto; margin-bottom: 18px; }
.site-footer__inner { display: grid; grid-template-columns: 2fr 1fr; gap: 32px 48px; }

.site-footer__about p:last-child { max-width: 560px; font-size: .98rem; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__nav a { color: inherit; text-decoration: none; font-family: var(--sans); font-size: .92rem; }
.site-footer__nav a:hover { color: #fff; text-decoration: underline; }
.site-footer__legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 20px; margin: 0; font-family: var(--sans); font-size: .8rem; opacity: .75; }
@media (max-width: 700px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* ---------- Motion preferences ---------- */

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

@media print {
	.site-header, .site-footer, .related, .series-pager, .author-box__more, .article__tags { display: none !important; }
	body { background: #fff; color: #000; }
}
