/*
 * Fondly Missed Journal — front-end styles.
 *
 * One stylesheet, no build step. Tokens are the marketing surface's
 * (frontend/tailwind.config.js "site-*"); header and footer mirror
 * PublicHeader / PublicFooter in frontend/src/components/ContentPageShell.jsx.
 * Fonts are declared in theme.json and printed by core (@font-face).
 *
 * Contrast (WCAG 2.x, computed):
 *   ink #161615 on paper ............ 15.87:1
 *   ink-soft #2B2A27 on paper ....... 12.58:1   article body
 *   muted #5A5852 on paper .......... 6.23:1    (7.11:1 on white, 6.82:1 on card)
 *   indigo #243566 on paper ......... 10.36:1   links (11.82:1 on white)
 *   white on indigo ................. 11.82:1   primary button, active chip
 *   footer text #C4C2BA on deep ..... 9.25:1
 *   footer quiet #9A98A0 on deep .... 5.79:1    (the app's #7A7880 is 3.79:1)
 *   field edge #8A877E .............. 3.15:1 on paper, 3.59:1 on white (1.4.11)
 */

/* ---------------------------------------------------------------- tokens */

:root {
	--fm-paper: #f1f0eb;
	--fm-ink: #161615;
	--fm-ink-soft: #2b2a27;
	--fm-muted: #5a5852;
	--fm-indigo: #243566;
	--fm-indigo-deep: #161e36;
	--fm-rule: #c9c6bc;
	--fm-white: #fff;
	--fm-edge: #8a877e;
	--fm-footer-text: #c4c2ba;
	--fm-footer-quiet: #9a98a0;

	--fm-card: rgba(255, 255, 255, 0.7);
	--fm-rule-20: rgba(201, 198, 188, 0.2);
	--fm-rule-55: rgba(201, 198, 188, 0.55);
	--fm-placeholder: linear-gradient(
		to bottom right,
		rgba(36, 53, 102, 0.1),
		var(--fm-paper),
		rgba(201, 198, 188, 0.4)
	);

	--fm-serif: Newsreader, Georgia, "Times New Roman", serif;
	--fm-sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
	--fm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--fm-page: 1180px;
	--fm-measure: 680px;
	--fm-gutter: 24px;
	--fm-header-top: var(--wp-admin--admin-bar--height, 0px);
}

@media (min-width: 640px) {
	:root {
		--fm-gutter: 28px;
	}
}

/* ------------------------------------------------------------------ base */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 96px;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: clip;
	background: var(--fm-paper);
	color: var(--fm-ink);
	font-family: var(--fm-sans);
	font-size: 16px;
	line-height: 1.6;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.fm-main {
	flex: 1 0 auto;
}

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

a {
	color: var(--fm-indigo);
}

::selection {
	background: rgba(36, 53, 102, 0.16);
	color: var(--fm-ink);
}

:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--fm-indigo);
	outline-offset: 2px;
}

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

.fm-skip {
	position: absolute;
	top: -200px;
	left: 12px;
	z-index: 200;
	padding: 14px 18px;
	border-radius: 6px;
	background: var(--fm-indigo);
	color: var(--fm-white);
	font: 700 14px/1 var(--fm-sans);
	text-decoration: none;
}

.fm-skip:focus {
	top: calc(var(--fm-header-top) + 12px);
}

/* --------------------------------------------------------------- buttons */

.fm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: 6px;
	font: 700 14px/1.2 var(--fm-sans);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fm-btn--primary {
	background: var(--fm-indigo);
	color: var(--fm-white);
}

.fm-btn--primary:hover {
	background: var(--fm-indigo-deep);
	color: var(--fm-white);
}

.fm-btn--quiet {
	background: var(--fm-paper);
	border-color: var(--fm-rule);
	color: var(--fm-ink);
	font-weight: 600;
}

.fm-btn--quiet:hover {
	background: rgba(255, 255, 255, 0.6);
	color: var(--fm-ink);
}

.fm-back,
.fm-textlink {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	color: var(--fm-indigo);
	font: 600 14px/1.3 var(--fm-sans);
	text-decoration: none;
	text-underline-offset: 3px;
}

.fm-back:hover,
.fm-textlink:hover {
	color: var(--fm-indigo-deep);
	text-decoration: underline;
}

/* ---------------------------------------------------------------- header */

.fm-header {
	position: sticky;
	top: var(--fm-header-top);
	z-index: 90;
	border-bottom: 1px solid rgba(201, 198, 188, 0.8);
	background: rgba(241, 240, 235, 0.9);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

/* Phones scroll the admin bar away, so the header sticks to the very top. */
@media (max-width: 600px) {
	.admin-bar .fm-header {
		top: 0;
	}
}

.fm-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	max-width: var(--fm-page);
	margin: 0 auto;
	padding: 14px var(--fm-gutter);
}

.fm-wordmark {
	margin: 0;
	color: var(--fm-ink);
	font-family: var(--fm-serif);
	font-size: 22px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.01em;
	text-decoration: none;
	white-space: nowrap;
}

.fm-header__nav {
	display: flex;
	align-items: center;
	gap: 16px;
}

.fm-nav {
	display: none;
	align-items: center;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fm-nav__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--fm-muted);
	font: 500 14px/1.4 var(--fm-sans);
	text-decoration: none;
	text-underline-offset: 6px;
	transition: color 0.15s ease;
}

.fm-nav__link:hover,
.fm-nav__link[aria-current] {
	color: var(--fm-ink);
}

.fm-nav__link[aria-current] {
	text-decoration: underline;
	text-decoration-color: var(--fm-rule);
	text-decoration-thickness: 1px;
}

.fm-signin {
	display: none;
	align-items: center;
	min-height: 44px;
	color: var(--fm-ink);
	font: 600 14px/1.4 var(--fm-sans);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.fm-signin:hover {
	color: var(--fm-indigo);
}

/* Mobile menu: <details>, no script. */
.fm-menu__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	margin-right: -6px;
	border-radius: 8px;
	color: var(--fm-ink);
	list-style: none;
	cursor: pointer;
	transition: color 0.15s ease;
}

.fm-menu__toggle::-webkit-details-marker {
	display: none;
}

.fm-menu__toggle::marker {
	content: "";
}

.fm-menu__toggle:hover {
	color: var(--fm-indigo);
}

.fm-menu__icon {
	display: block;
}

.fm-menu__icon--close,
.fm-menu[open] .fm-menu__icon--open {
	display: none;
}

.fm-menu[open] .fm-menu__icon--close {
	display: block;
}

.fm-menu__panel {
	position: absolute;
	top: calc(100% + 4px);
	right: var(--fm-gutter);
	z-index: 100;
	display: flex;
	flex-direction: column;
	width: min(88vw, 320px);
	padding: 8px;
	border: 1px solid var(--fm-rule);
	border-radius: 12px;
	background: var(--fm-paper);
	box-shadow: 0 18px 40px -24px rgba(22, 22, 21, 0.45);
}

.fm-menu__list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fm-menu__link {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 16px;
	border-radius: 8px;
	color: var(--fm-ink);
	font: 500 15px/1.3 var(--fm-sans);
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.fm-menu__link:hover {
	background: rgba(255, 255, 255, 0.7);
}

.fm-menu__link[aria-current] {
	color: var(--fm-indigo);
	font-weight: 600;
}

.fm-menu__rule {
	margin: 6px 0;
	border: 0;
	border-top: 1px solid var(--fm-rule);
}

.fm-menu__cta {
	margin-top: 4px;
	font-size: 15px;
}

@media (min-width: 640px) {
	.fm-header__nav {
		gap: 28px;
	}

	.fm-signin {
		display: inline-flex;
	}
}

@media (min-width: 768px) {
	.fm-nav {
		display: flex;
	}

	.fm-menu {
		display: none;
	}
}

/* The narrowest phones: keep wordmark, button and menu on one line. */
@media (max-width: 389px) {
	.fm-header__nav {
		gap: 8px;
	}

	.fm-wordmark {
		font-size: 20px;
	}

	.fm-header__cta {
		padding-inline: 14px;
	}
}

/* Below 360px the button would push the page sideways; it stays in the menu. */
@media (max-width: 359px) {
	.fm-header__cta {
		display: none;
	}
}

/* ---------------------------------------------------------------- footer */

.fm-footer {
	background: var(--fm-indigo-deep);
	color: var(--fm-footer-text);
}

.fm-footer :focus-visible {
	outline-color: var(--fm-paper);
}

.fm-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 40px;
	max-width: var(--fm-page);
	margin: 0 auto;
	padding: 56px var(--fm-gutter) 40px;
}

.fm-footer__brand {
	max-width: 300px;
}

.fm-wordmark--light {
	margin-bottom: 14px;
	color: var(--fm-paper);
	font-size: 21px;
}

.fm-footer__tagline {
	margin: 0;
	color: var(--fm-footer-quiet);
	font: 400 14.5px/1.7 var(--fm-sans);
}

.fm-footer__cols {
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
}

.fm-footer__label {
	margin: 0 0 14px;
	color: var(--fm-footer-quiet);
	font: 600 12px/1.35 var(--fm-sans);
}

.fm-footer__col ul {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fm-footer__col a {
	display: inline-block;
	padding: 1px 0;
	color: var(--fm-footer-text);
	font: 400 14px/1.6 var(--fm-sans);
	text-decoration: none;
	transition: color 0.15s ease;
}

.fm-footer__col a:hover {
	color: var(--fm-paper);
}

.fm-footer__bar {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.fm-footer__copy {
	max-width: var(--fm-page);
	margin: 0 auto;
	padding: 20px var(--fm-gutter);
	color: var(--fm-footer-quiet);
	font: 400 12.5px/1.6 var(--fm-sans);
}

/* ------------------------------------------------------ listing headers */

.fm-page {
	max-width: var(--fm-page);
	margin: 0 auto;
	padding: 56px var(--fm-gutter) 96px;
}

.fm-head {
	display: grid;
	gap: 28px;
	margin-bottom: 28px;
}

.fm-head__text {
	max-width: var(--fm-measure);
}

.fm-eyebrow {
	margin: 0 0 12px;
	color: var(--fm-indigo);
	font: 500 14px/1.4 var(--fm-sans);
}

.fm-eyebrow a {
	color: inherit;
	text-decoration: none;
	text-underline-offset: 3px;
}

.fm-eyebrow a:hover {
	text-decoration: underline;
}

.fm-title {
	margin: 0;
	color: var(--fm-ink);
	font-family: var(--fm-serif);
	font-size: clamp(34px, 5vw, 52px);
	font-weight: 500;
	line-height: 1.08;
	text-wrap: balance;
}

.fm-intro {
	max-width: 620px;
	margin: 20px 0 0;
	color: var(--fm-muted);
	font: 400 18px/1.7 var(--fm-sans);
	text-wrap: pretty;
}

.fm-head__note {
	margin: 16px 0 0;
	color: var(--fm-muted);
	font: 500 14px/1.5 var(--fm-sans);
}

@media (min-width: 960px) {
	.fm-head--with-search {
		grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
		align-items: end;
		column-gap: 64px;
	}
}

/* Search */

.fm-search {
	display: flex;
	gap: 8px;
	width: 100%;
}

.fm-search__field {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.fm-search__icon {
	position: absolute;
	top: 50%;
	left: 14px;
	color: var(--fm-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.fm-search__input {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 12px 14px 12px 42px;
	border: 1px solid var(--fm-edge);
	border-radius: 6px;
	background: var(--fm-white);
	color: var(--fm-ink);
	font: 400 15px/1.4 var(--fm-sans);
	-webkit-appearance: none;
	appearance: none;
}

.fm-search__input::placeholder {
	color: var(--fm-muted);
	opacity: 1;
}

.fm-search__input:focus-visible {
	border-color: var(--fm-indigo);
	outline-offset: 1px;
}

.fm-search__submit {
	min-height: 48px;
	flex: none;
}

/* Category chips */

.fm-chips {
	margin: 0 0 48px;
}

.fm-chips__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fm-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 6px 14px;
	border: 1px solid rgba(201, 198, 188, 0.6);
	border-radius: 24px;
	background: var(--fm-white);
	color: var(--fm-ink);
	font: 500 13.5px/1.3 var(--fm-sans);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

/* A 44px-tall hit area without making the pill itself chunky. */
.fm-chip::after {
	content: "";
	position: absolute;
	inset: -4px -2px;
}

.fm-chip:hover {
	border-color: var(--fm-rule);
	color: var(--fm-indigo);
}

.fm-chip[aria-current] {
	border-color: var(--fm-indigo);
	background: var(--fm-indigo);
	color: var(--fm-white);
}

/* --------------------------------------------------------------- listing */

.fm-listing__body {
	display: grid;
	gap: 56px;
}

.fm-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

@media (min-width: 640px) {
	.fm-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* An odd card out at the end spans the row, image beside text,
	   so the grid closes cleanly instead of leaving a gap. */
	.fm-grid > .fm-card:last-child:nth-child(odd) {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: center;
	}

	.fm-grid > .fm-card:last-child:nth-child(odd) .fm-card__body {
		padding: 28px 32px;
	}
}

/* 16:9 frame. Images are letterboxed on paper, never cropped. */
.fm-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--fm-paper);
}

.fm-media__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.fm-media__placeholder {
	position: absolute;
	inset: 0;
	background: var(--fm-placeholder);
}

/* Card */

.fm-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--fm-rule-20);
	border-radius: 10px;
	background: var(--fm-card);
	transition: border-color 0.2s ease;
}

.fm-card:hover,
.fm-card:focus-within {
	border-color: var(--fm-rule-55);
}

.fm-card__media {
	display: block;
}

.fm-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px 24px 24px;
}

.fm-card__category {
	display: inline-block;
	align-self: flex-start;
	margin: -4px 0 6px;
	padding: 4px 0;
	color: var(--fm-indigo);
	font: 600 12px/1.4 var(--fm-sans);
	text-decoration: none;
	text-underline-offset: 3px;
}

.fm-card__category:hover {
	text-decoration: underline;
}

.fm-card__title {
	margin: 0 0 8px;
	color: var(--fm-ink);
	font-family: var(--fm-serif);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.3;
	text-wrap: balance;
}

.fm-card__title a,
.fm-feature__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.fm-card__title a:hover,
.fm-feature__title a:hover {
	color: var(--fm-indigo);
}

.fm-card__excerpt {
	display: -webkit-box;
	margin: 0 0 16px;
	overflow: hidden;
	color: var(--fm-muted);
	font: 400 15px/1.7 var(--fm-sans);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

/* Featured (newest) article: open, not boxed, so it reads as the lead. */

.fm-feature {
	display: grid;
	gap: 24px;
	align-items: center;
}

.fm-feature__media .fm-media {
	border: 1px solid var(--fm-rule-20);
	border-radius: 10px;
	transition: border-color 0.2s ease;
}

.fm-feature:hover .fm-media {
	border-color: var(--fm-rule-55);
}

.fm-feature__title {
	margin: 0 0 14px;
	color: var(--fm-ink);
	font-family: var(--fm-serif);
	font-size: clamp(28px, 3.3vw, 40px);
	font-weight: 500;
	line-height: 1.12;
	text-wrap: balance;
}

.fm-feature__excerpt {
	margin: 0 0 20px;
	color: var(--fm-muted);
	font: 400 16.5px/1.7 var(--fm-sans);
	text-wrap: pretty;
}

@media (min-width: 880px) {
	.fm-feature {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: 52px;
	}
}

/* No cover: a text-led panel across the full width. On wide screens the
   title takes the left and the excerpt settles to its baseline on the right. */

.fm-feature--text {
	display: block;
	padding: 32px 24px 30px;
	border: 1px solid var(--fm-rule-55);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.55);
	transition: border-color 0.2s ease;
}

.fm-feature--text:hover,
.fm-feature--text:focus-within {
	border-color: var(--fm-rule);
}

.fm-feature--text .fm-feature__title {
	margin: 0;
	font-size: clamp(30px, 4.2vw, 48px);
	line-height: 1.08;
}

.fm-feature--text .fm-feature__body {
	margin-top: 18px;
}

@media (min-width: 640px) {
	.fm-feature--text {
		padding: 44px 48px 42px;
	}
}

@media (min-width: 880px) {
	.fm-feature--text {
		padding: 56px 64px 52px;
	}

	.fm-feature--text .fm-feature__text {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		align-items: end;
		gap: 56px;
	}

	.fm-feature--text .fm-feature__body {
		margin-top: 0;
	}

	.fm-feature--text .fm-feature__excerpt {
		margin-bottom: 16px;
	}
}

/* Meta line: Author · Date · N min read */

.fm-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 0;
	color: var(--fm-muted);
	font: 400 13px/1.5 var(--fm-sans);
}

.fm-meta--card {
	margin-top: auto;
}

.fm-meta--article {
	font-size: 14px;
}

.fm-meta a {
	color: var(--fm-indigo);
	text-decoration: none;
	text-underline-offset: 3px;
}

.fm-meta a:hover {
	text-decoration: underline;
}

/* Pagination */

.fm-pagination {
	margin-top: 64px;
}

.fm-pagination__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fm-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid transparent;
	border-radius: 6px;
	color: var(--fm-ink);
	font: 600 14px/1 var(--fm-sans);
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fm-pagination a.page-numbers:hover {
	background: var(--fm-white);
	color: var(--fm-indigo);
}

.fm-pagination .current {
	background: var(--fm-indigo);
	color: var(--fm-white);
}

.fm-pagination .dots {
	min-width: 24px;
	padding: 0;
	color: var(--fm-muted);
}

.fm-pagination .prev,
.fm-pagination .next {
	padding: 0 18px;
	border-color: var(--fm-rule);
	background: var(--fm-paper);
}

/* Empty state */

.fm-empty {
	max-width: 560px;
	padding: 0 0 24px;
}

.fm-empty__title {
	margin: 0 0 10px;
	color: var(--fm-ink);
	font-family: var(--fm-serif);
	font-size: 28px;
	font-weight: 500;
	line-height: 1.2;
}

.fm-empty__body {
	margin: 0 0 12px;
	color: var(--fm-muted);
	font: 400 16px/1.7 var(--fm-sans);
}

.fm-page__back {
	margin: 56px 0 0;
	padding-top: 24px;
	border-top: 1px solid var(--fm-rule-55);
}

/* ---------------------------------------------------------------- author */

.fm-head--author {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

@media (min-width: 640px) {
	.fm-head--author {
		flex-direction: row;
		align-items: flex-start;
		gap: 36px;
	}
}

/* Portraits are shown whole, at their own proportions. */
.fm-avatar {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
}

.fm-avatar__img {
	display: block;
	width: auto;
	height: 80px;
	max-width: 140px;
	border-radius: 8px;
	object-fit: contain;
}

.fm-avatar--page .fm-avatar__img {
	height: 160px;
	max-width: 240px;
}

.fm-avatar--monogram {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(36, 53, 102, 0.08);
	color: var(--fm-indigo);
	font-family: var(--fm-serif);
	font-size: 24px;
	font-weight: 500;
	line-height: 1;
}

.fm-avatar--page.fm-avatar--monogram {
	width: 112px;
	height: 112px;
	font-size: 40px;
}

/* --------------------------------------------------------------- article */

.fm-article {
	max-width: calc(var(--fm-measure) + 2 * var(--fm-gutter));
	margin: 0 auto;
	padding: 32px var(--fm-gutter) 96px;
}

.fm-article__back {
	margin: 0 0 20px -1px;
}

.fm-article__title {
	margin: 0 0 18px;
	color: var(--fm-ink);
	font-family: var(--fm-serif);
	font-size: clamp(34px, 5vw, 52px);
	font-weight: 500;
	line-height: 1.08;
	text-wrap: balance;
}

.fm-article--page .fm-article__head {
	padding-top: 24px;
}

.fm-article__cover {
	margin: 36px 0 0;
}

.fm-article__cover .fm-media {
	border: 1px solid var(--fm-rule-20);
	border-radius: 10px;
}

.fm-article__cover figcaption {
	margin-top: 10px;
	color: var(--fm-muted);
	font: 400 13.5px/1.5 var(--fm-sans);
}

.fm-lede {
	margin: 36px 0 0;
	color: var(--fm-ink-soft);
	font-family: var(--fm-serif);
	font-size: clamp(21px, 2.4vw, 23px);
	font-style: italic;
	font-weight: 400;
	line-height: 1.55;
	text-wrap: pretty;
}

/* After the body */

.fm-article__foot {
	display: grid;
	gap: 56px;
	margin-top: 72px;
}

.fm-section-title {
	margin: 0 0 12px;
	color: var(--fm-ink);
	font-family: var(--fm-serif);
	font-size: 26px;
	font-weight: 500;
	line-height: 1.2;
}

.fm-writer {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	padding-top: 36px;
	border-top: 1px solid var(--fm-rule);
}

.fm-writer .fm-eyebrow {
	margin-bottom: 6px;
}

.fm-writer__name {
	margin: 0 0 6px;
	font-family: var(--fm-serif);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.25;
}

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

.fm-writer__name a:hover {
	color: var(--fm-indigo);
}

.fm-writer__bio {
	margin: 0 0 4px;
	color: var(--fm-muted);
	font: 400 15.5px/1.7 var(--fm-sans);
}

.fm-related {
	padding-top: 36px;
	border-top: 1px solid var(--fm-rule);
}

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

.fm-related__item {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	align-items: center;
	gap: 16px;
	padding: 16px 0;
}

.fm-related__item + .fm-related__item {
	border-top: 1px solid var(--fm-rule-55);
}

.fm-related__media {
	display: block;
}

.fm-related__media .fm-media {
	border: 1px solid var(--fm-rule-20);
	border-radius: 6px;
}

.fm-related__title {
	margin: 0 0 6px;
	color: var(--fm-ink);
	font-family: var(--fm-serif);
	font-size: 19px;
	font-weight: 500;
	line-height: 1.3;
	text-wrap: balance;
}

.fm-related__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.fm-related__title a:hover {
	color: var(--fm-indigo);
}

@media (min-width: 640px) {
	.fm-related__item {
		grid-template-columns: 168px minmax(0, 1fr);
		gap: 24px;
	}

	.fm-related__title {
		font-size: 21px;
	}
}

.fm-closing {
	padding: 28px 24px;
	border: 1px solid var(--fm-rule);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.55);
}

.fm-closing__title {
	margin: 0 0 10px;
	color: var(--fm-ink);
	font-family: var(--fm-serif);
	font-size: 24px;
	font-weight: 500;
	line-height: 1.25;
}

.fm-closing__body {
	max-width: 520px;
	margin: 0 0 22px;
	color: var(--fm-muted);
	font: 400 16px/1.7 var(--fm-sans);
}

@media (min-width: 640px) {
	.fm-closing {
		padding: 36px 40px;
	}
}

.fm-article__end {
	margin: -16px 0 0;
}

/* -------------------------------------------------------------- 404 page */

.fm-notfound {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 600px;
	margin: 0 auto;
	padding: 96px var(--fm-gutter) 112px;
	text-align: center;
}

.fm-notfound__title {
	margin: 0;
	color: var(--fm-ink);
	font-family: var(--fm-serif);
	font-size: clamp(32px, 4.4vw, 44px);
	font-weight: 500;
	line-height: 1.1;
}

.fm-notfound__message {
	max-width: 400px;
	margin: 14px 0 28px;
	color: var(--fm-muted);
	font: 400 16px/1.7 var(--fm-sans);
}

.fm-notfound__links ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 20px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.fm-notfound__links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--fm-muted);
	font: 400 14px/1.4 var(--fm-sans);
	text-decoration: underline;
	text-decoration-color: var(--fm-rule);
	text-underline-offset: 4px;
}

.fm-notfound__links a:hover {
	color: var(--fm-ink);
}

.fm-notfound__search {
	width: 100%;
	max-width: 440px;
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid var(--fm-rule-55);
}

/* ----------------------------------------------------------------- prose
 * Article body. Selectors sit inside :where() so anything more specific
 * (block classes, editor presets) wins without a fight.
 */

.fm-prose {
	margin-top: 36px;
	color: var(--fm-ink-soft);
	font-family: var(--fm-serif);
	font-size: 19px;
	font-kerning: normal;
	line-height: 1.7;
	overflow-wrap: break-word;
	hanging-punctuation: first allow-end;
}

@media (max-width: 479px) {
	.fm-prose {
		font-size: 18px;
	}
}

.fm-prose::after {
	content: "";
	display: table;
	clear: both;
}

:where(.fm-prose) > * {
	margin-block: 0;
}

/* Nested paragraphs (quotes, list items, cells) take their spacing from
   the flow rules below, not the browser's 1em default. */
:where(.fm-prose) :where(p) {
	margin-block: 0;
	text-wrap: pretty;
}

:where(.fm-prose) > * + * {
	margin-block-start: 1.15em;
}

:where(.fm-prose) :where(h2, h3, h4) {
	color: var(--fm-ink);
	font-family: var(--fm-serif);
	font-weight: 500;
	text-wrap: balance;
	clear: both;
}

:where(.fm-prose) > :where(h2, h3, h4) {
	margin-block-start: 2em;
}

:where(.fm-prose) > :where(h2, h3, h4) + * {
	margin-block-start: 0.55em;
}

:where(.fm-prose) :where(h2) {
	font-size: 28px;
	line-height: 1.2;
}

:where(.fm-prose) :where(h3) {
	font-size: 22px;
	line-height: 1.3;
}

:where(.fm-prose) :where(h4) {
	font-family: var(--fm-sans);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.45;
}

:where(.fm-prose) :where(a) {
	color: var(--fm-indigo);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.15s ease;
}

:where(.fm-prose) :where(a):hover {
	color: var(--fm-indigo-deep);
	text-decoration-thickness: 2px;
}

:where(.fm-prose) :where(strong, b) {
	color: var(--fm-ink);
	font-weight: 600;
}

:where(.fm-prose) :where(ul, ol) {
	padding-inline-start: 1.35em;
}

:where(.fm-prose) :where(li + li),
:where(.fm-prose) :where(li > ul, li > ol) {
	margin-top: 0.45em;
}

:where(.fm-prose) :where(li)::marker {
	color: var(--fm-muted);
}

:where(.fm-prose) :where(ol > li)::marker {
	font-variant-numeric: tabular-nums;
}

:where(.fm-prose) :where(blockquote) {
	margin-inline: 0;
	padding: 2px 0 2px 22px;
	border-left: 3px solid var(--fm-rule);
	color: var(--fm-ink-soft);
	font-style: italic;
}

:where(.fm-prose) :where(blockquote) > * + * {
	margin-top: 0.75em;
}

:where(.fm-prose) :where(blockquote cite, blockquote footer) {
	display: block;
	color: var(--fm-muted);
	font: normal 400 14px/1.5 var(--fm-sans);
}

.fm-prose .wp-block-pullquote {
	margin-block: 2em;
	padding: 2px 0 2px 22px;
	font-size: inherit;
	line-height: inherit;
	border: 0;
	border-left: 3px solid var(--fm-rule);
	text-align: left;
}

.fm-prose .wp-block-pullquote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
}

.fm-prose .wp-block-pullquote p {
	margin: 0;
	color: var(--fm-ink);
	font-size: 24px;
	font-style: italic;
	line-height: 1.45;
}

.fm-prose .wp-block-pullquote cite {
	display: block;
	margin-top: 0.8em;
	color: var(--fm-muted);
	font: normal 400 14px/1.5 var(--fm-sans);
	text-transform: none;
}

:where(.fm-prose) :where(figure) {
	margin-inline: 0;
}

:where(.fm-prose) :where(img) {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

:where(.fm-prose) :where(figcaption),
.fm-prose .wp-element-caption {
	margin: 0.7em 0 0;
	color: var(--fm-muted);
	font: 400 14px/1.5 var(--fm-sans);
	text-align: left;
}

.fm-prose hr,
.fm-prose .wp-block-separator {
	width: 64px;
	max-width: 64px;
	height: 0;
	margin: 2.4em auto;
	border: 0;
	border-top: 1px solid var(--fm-edge);
	background: none;
	opacity: 1;
	clear: both;
}

:where(.fm-prose) :where(code, kbd, samp) {
	padding: 0.12em 0.35em;
	border-radius: 4px;
	background: rgba(201, 198, 188, 0.3);
	font-family: var(--fm-mono);
	font-size: 0.84em;
}

:where(.fm-prose) :where(pre) {
	overflow-x: auto;
	padding: 16px 18px;
	border: 1px solid var(--fm-rule-55);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.7);
	font-size: 15px;
	line-height: 1.6;
}

:where(.fm-prose) :where(pre code) {
	padding: 0;
	background: none;
	font-size: inherit;
}

:where(.fm-prose) :where(table) {
	width: 100%;
	border-collapse: collapse;
	color: var(--fm-ink-soft);
	font: 400 15px/1.5 var(--fm-sans);
}

.fm-prose th,
.fm-prose td,
.fm-prose .wp-block-table th,
.fm-prose .wp-block-table td {
	padding: 0.65em 0.8em;
	border: 0;
	border-bottom: 1px solid var(--fm-rule);
	text-align: left;
	vertical-align: top;
}

.fm-prose th,
.fm-prose .wp-block-table th {
	color: var(--fm-ink);
	font-weight: 600;
}

.fm-prose .wp-block-table thead,
.fm-prose .wp-block-table tfoot {
	border: 0;
}

.fm-prose .wp-block-table thead th {
	border-bottom: 1px solid var(--fm-edge);
}

:where(.fm-prose) :where(details) {
	padding: 0.6em 0;
	border-top: 1px solid var(--fm-rule);
	border-bottom: 1px solid var(--fm-rule);
}

:where(.fm-prose) :where(details + details) {
	margin-top: -1px;
}

:where(.fm-prose) :where(summary) {
	color: var(--fm-ink);
	font-weight: 500;
	cursor: pointer;
}

.fm-prose .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 11px 22px;
	border-radius: 6px;
	background: var(--fm-indigo);
	color: var(--fm-white);
	font: 700 15px/1.2 var(--fm-sans);
	text-decoration: none;
}

.fm-prose .wp-block-button__link:hover {
	background: var(--fm-indigo-deep);
	color: var(--fm-white);
}

.fm-prose .is-style-outline > .wp-block-button__link {
	border: 1px solid currentColor;
	background: transparent;
	color: var(--fm-indigo);
}

/* Alignments */

.fm-prose .aligncenter {
	margin-inline: auto;
	text-align: center;
}

.fm-prose .aligncenter img {
	margin-inline: auto;
}

@media (min-width: 640px) {
	.fm-prose .alignleft {
		float: left;
		max-width: 50%;
		margin: 0.3em 1.5em 1em 0;
	}

	.fm-prose .alignright {
		float: right;
		max-width: 50%;
		margin: 0.3em 0 1em 1.5em;
	}
}

.fm-prose .alignwide {
	--fm-wide: min(calc(var(--fm-page) - 2 * var(--fm-gutter)), calc(100vw - 2 * var(--fm-gutter)));
	width: var(--fm-wide);
	max-width: none;
	margin-inline: calc((100% - var(--fm-wide)) / 2);
}

.fm-prose .alignfull {
	width: 100vw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
}

.fm-prose .alignfull img,
.fm-prose .alignwide img {
	width: 100%;
}

.fm-page-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 2em;
	font: 600 14px/1 var(--fm-sans);
}

/* ---------------------------------------------------------------- motion
 * One gentle entrance per page: the header settles, then the content.
 */

@keyframes fm-fade-up {
	from {
		opacity: 0;
		transform: translateY(18px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.fm-head,
.fm-chips,
.fm-listing__body,
.fm-empty,
.fm-article__head,
.fm-article__cover,
.fm-lede,
.fm-prose,
.fm-notfound {
	animation: fm-fade-up 1s ease both;
}

.fm-chips,
.fm-article__cover {
	animation-delay: 0.08s;
}

.fm-listing__body,
.fm-empty,
.fm-lede,
.fm-prose {
	animation-delay: 0.16s;
}

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

/* ----------------------------------------------------------------- print
 * Families print eulogy and obituary guides: just the words, in a serif,
 * black on white, with link addresses spelled out.
 */

@media print {
	@page {
		margin: 2cm 2.2cm;
	}

	html,
	body {
		background: #fff !important;
		color: #000 !important;
	}

	body {
		display: block;
	}

	*,
	*::before,
	*::after {
		animation: none !important;
		box-shadow: none !important;
	}

	.fm-skip,
	.fm-header,
	.fm-footer,
	.fm-back,
	.fm-chips,
	.fm-head__search,
	.fm-search,
	.fm-pagination,
	.fm-article__cover,
	.fm-article__foot,
	.fm-notfound__links,
	#wpadminbar {
		display: none !important;
	}

	.fm-page,
	.fm-article {
		max-width: none;
		padding: 0;
	}

	.fm-eyebrow,
	.fm-meta {
		color: #333 !important;
		font-size: 10pt;
	}

	.fm-eyebrow a,
	.fm-meta a {
		color: #333 !important;
		text-decoration: none !important;
	}

	.fm-article__title,
	.fm-title {
		color: #000;
		font-size: 24pt;
	}

	.fm-lede {
		margin-top: 14pt;
		color: #000;
		font-size: 14pt;
	}

	.fm-prose {
		margin-top: 14pt;
		color: #000;
		font-size: 12pt;
		line-height: 1.55;
	}

	.fm-prose h2 {
		font-size: 16pt;
	}

	.fm-prose h3 {
		font-size: 13.5pt;
	}

	.fm-prose a {
		color: #000;
	}

	.fm-prose a[href^="http"]::after {
		content: " (" attr(href) ")";
		color: #444;
		font-family: var(--fm-sans);
		font-size: 8.5pt;
		word-break: break-all;
	}

	.fm-prose .alignwide,
	.fm-prose .alignfull {
		width: auto;
		margin-inline: 0;
	}

	h1,
	h2,
	h3,
	h4 {
		break-after: avoid;
		page-break-after: avoid;
	}

	p,
	li,
	blockquote {
		orphans: 3;
		widows: 3;
	}

	figure,
	img,
	blockquote,
	table,
	pre {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	.fm-card,
	.fm-feature {
		break-inside: avoid;
		border-color: #999;
	}
}
