/**
 * MOF component styles. Every colour reads a theme.json preset variable
 * (--wp--preset--color--*) so light/dark is handled entirely by tokens.css.
 */

/* ---------- Base ---------- */
body {
	background: var(--wp--preset--color--bone);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--inter);
	-webkit-font-smoothing: antialiased;
}

:where(.mof-eyebrow) {
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brass);
	margin: 0;
}

.mof-lead {
	font-family: var(--wp--preset--font-family--fraunces);
	font-style: italic;
	font-weight: 300;
	font-size: clamp(1.15rem, 2.2vw, 1.5rem);
	line-height: 1.48;
	color: var(--wp--preset--color--ink-muted);
}

/* ---------- Skip link (a11y) ---------- */
.mof-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--wp--preset--color--plum-bg);
	color: var(--wp--preset--color--on-plum);
	padding: 0.75rem 1.25rem;
	border-radius: var(--mof-radius-md);
}
.mof-skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Header / nav ---------- */
.mof-header {
	border-bottom: var(--mof-hairline);
	background: var(--wp--preset--color--bone);
}
.mof-header__inner {
	max-width: var(--mof-maxw);
	margin-inline: auto;
	padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
	display: flex;
	align-items: center;
	gap: 1.5rem;
}
.mof-wordmark {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 1.2rem;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.mof-wordmark svg { flex: 0 0 auto; }
.mof-nav {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 1.875rem;
}
.mof-nav a {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--wp--preset--color--ink-muted);
	text-decoration: none;
}
.mof-nav a:hover,
.mof-nav a[aria-current] { color: var(--wp--preset--color--ink); }
.mof-nav a:focus-visible {
	outline: 2px solid var(--wp--preset--color--brass);
	outline-offset: 4px;
	border-radius: var(--mof-radius-sm);
}

/* ---------- Theme toggle ---------- */
.mof-theme-toggle {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--mof-radius-md);
	background: transparent;
	color: var(--wp--preset--color--brass);
	cursor: pointer;
}
.mof-theme-toggle:hover { border-color: var(--wp--preset--color--brass); }
.mof-theme-toggle .mof-icon-sun { display: block; }
.mof-theme-toggle .mof-icon-moon { display: none; }
:root[data-theme="light"] .mof-theme-toggle .mof-icon-sun { display: none; }
:root[data-theme="light"] .mof-theme-toggle .mof-icon-moon { display: block; }

/* ---------- Hamburger + mobile menu ---------- */
.mof-burger,
.mof-menu-close {
	display: none;
	background: transparent;
	border: 0;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	padding: 8px;
	line-height: 0;
}
.mof-burger {
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--mof-radius-md);
	margin-left: auto;
}
.mof-burger:focus-visible,
.mof-menu-close:focus-visible {
	outline: 2px solid var(--wp--preset--color--brass);
	outline-offset: 2px;
}
.mof-menu-lock { overflow: hidden; }

/* ---------- Buttons ---------- */
.mof-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1.625rem;
	border-radius: var(--mof-radius-md);
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	border: 0;
}
.mof-btn--primary {
	background: var(--wp--preset--color--plum-bg);
	color: var(--wp--preset--color--on-plum);
}
.mof-btn--outline {
	background: transparent;
	color: var(--wp--preset--color--accent-plum);
	border: 1.4px solid var(--wp--preset--color--accent-plum);
}
/* Dark mode's accent-plum fails AA on the dark page background (the 404's
   "Back to the memorial" button); lift it, same hue. */
html:not([data-theme="light"]) .mof-btn--outline {
	color: var(--mof-outline-on-dark);
	border-color: var(--mof-outline-on-dark);
}
.mof-btn:focus-visible {
	outline: 2px solid var(--wp--preset--color--brass);
	outline-offset: 2px;
}
/* The header's Donate is a quiet outline button in sentence case, as in Figma.
   (.mof-nav a would otherwise turn it inline-block and crush its padding.) */
.mof-nav a.mof-nav__cta {
	display: inline-flex;
	justify-content: center;
	text-align: center;
	padding: 0.625rem 1.375rem;
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: none;
	color: var(--wp--preset--color--accent-plum);
}
html:not([data-theme="light"]) .mof-nav a.mof-nav__cta { color: var(--mof-outline-on-dark); }

/* ---------- Layout section helpers ---------- */
.mof-section { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.mof-section--paper { background: var(--wp--preset--color--paper); border-top: var(--mof-hairline); }
.mof-container { max-width: var(--mof-maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }
.mof-center { text-align: center; }

/* ---------- Hero ---------- */
.mof-hero {
	text-align: center;
	padding-block: clamp(4rem, 8vw, 6.5rem);
}
.mof-hero__head {
	max-width: 780px;
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 4vw, 3rem);
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	align-items: center;
}
.mof-hero__title {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 400;
	font-size: clamp(2.5rem, 6vw, 4.75rem);
	line-height: 1.04;
	letter-spacing: -0.02em;
	margin: 0;
	color: var(--wp--preset--color--ink);
	text-wrap: balance;
}
/* Nav links get a comfortable tap target on touch. */
.mof-nav a { display: inline-block; padding-block: 0.4rem; }
.mof-rule { width: 64px; height: 2px; background: var(--wp--preset--color--brass); border: 0; }

/* ---------- Stat strip ---------- */
.mof-stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(2rem, 5vw, 3.5rem);
	margin-top: 2rem;
}
.mof-stat { text-align: center; }
.mof-stat__num {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 300;
	font-size: clamp(2.5rem, 5vw, 3.75rem);
	line-height: 1;
	color: var(--wp--preset--color--ink);
}
.mof-stat__label {
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--ink-muted);
	margin-top: 0.4rem;
}

/* ---------- Memorial grid + card ---------- */
.mof-grid,
ul.mof-grid.wp-block-post-template {
	display: grid;
	/* minmax(0, …): a long name in Fraunces must not widen its column past the screen. */
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: stretch;
}
@media (min-width: 600px) { .mof-grid, ul.mof-grid.wp-block-post-template { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .mof-grid, ul.mof-grid.wp-block-post-template { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .mof-grid, ul.mof-grid.wp-block-post-template { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.5rem; } }
.mof-grid > li { margin: 0; }
.mof-grid > li > .mof-card,
.mof-grid > .mof-card { height: 100%; }
.mof-card {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--paper);
	border: var(--mof-hairline);
	border-radius: var(--mof-radius-sm);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
}
.mof-card:focus-visible { outline: 2px solid var(--wp--preset--color--brass); outline-offset: 2px; }
.mof-card__portrait {
	aspect-ratio: 5 / 6;
	display: grid;
	place-items: center;
	background: var(--wp--preset--color--bone);
	overflow: hidden;
}
.mof-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mof-card__body { padding: 1.125rem 1.25rem 1.375rem; }
.mof-card__name {
	display: block;
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 500;
	font-size: 1.25rem;
	line-height: 1.2;
	color: var(--wp--preset--color--ink);
	margin: 0;
	overflow-wrap: break-word;
	hyphens: auto;
}
.mof-card__meta {
	display: block;
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--ink-muted);
	margin: 0.375rem 0 0;
}
/* "Aged 44 · 2026": each part is unbreakable; on phones they stack instead of
   leaving "2026" alone under a trailing dot. */
.mof-card__part { white-space: nowrap; }
@media (max-width: 599px) {
	.mof-card__meta .mof-card__part { display: block; }
	.mof-card__meta .mof-card__sep { display: none; }
}
.mof-candle { opacity: 0.85; }
.mof-card__img--placeholder { object-position: center 22%; opacity: 0.92; }

/* ---------- Motion: hover, reveal, infinite-scroll ---------- */
.mof-card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.mof-card:hover {
	transform: translateY(-3px);
	border-color: var(--wp--preset--color--line-strong);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
.mof-card:hover .mof-card__img { transform: scale(1.03); }
.mof-card__img { transition: transform 0.4s ease; }

/* Screen-reader-only utility (used by the infinite-scroll live region). */
.mof-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

.mof-wall-sentinel { height: 1px; }

@keyframes mof-appear {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: none; }
}
.mof-appear { animation: mof-appear 0.5s ease both; }

/* Section reveal — class added by JS only, so no-JS shows everything. */
.mof-reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.mof-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.mof-card, .mof-card:hover, .mof-card__img, .mof-card:hover .mof-card__img { transform: none; transition: none; }
	.mof-appear { animation: none; }
}

/* ---------- Record strip (single person) ---------- */
.mof-record {
	box-sizing: border-box; /* width of the photo column, not 18px wider than it */
	display: flex;
	flex-wrap: wrap;
	background: var(--wp--preset--color--paper);
	border: var(--mof-hairline);
	border-radius: var(--mof-radius-md);
	padding: 0.5rem;
}
.mof-record__cell { flex: 1 1 140px; padding: 1.375rem 1.5rem; }
.mof-record__label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brass);
	margin: 0 0 0.5rem;
}
.mof-record__value {
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 1.375rem;
	color: var(--wp--preset--color--ink);
	margin: 0;
}
@media (max-width: 599px) {
	.mof-record:not(.mof-record--private) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mof-record__cell { padding: 1rem 1.125rem; }
	.mof-record__value { font-size: 1.1875rem; overflow-wrap: anywhere; }
}

/* ---------- Single person hero ---------- */
.mof-person-hero {
	display: grid;
	grid-template-columns: minmax(0, 440px) 1fr;
	gap: clamp(2rem, 5vw, 3.5rem);
	align-items: start;
}
.mof-person-hero__portrait {
	aspect-ratio: 5 / 6;
	background: var(--wp--preset--color--paper);
	border: var(--mof-hairline);
	display: grid;
	place-items: center;
	overflow: hidden;
}
.mof-person-hero__portrait .mof-card__img { width: 100%; height: 100%; object-fit: cover; }
.mof-person-hero__meta { padding-top: 0.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.mof-person-hero__name {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 400;
	font-size: clamp(2.25rem, 5vw, 4rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0;
	color: var(--wp--preset--color--ink);
}
.mof-person-hero__meta .mof-rule { margin: 0; }

.mof-sources ul { list-style: none; margin: 0; padding: 0; }
.mof-sources li {
	display: flex;
	gap: 1rem;
	align-items: baseline;
	justify-content: space-between;
	padding: 1.125rem 0;
	border-bottom: var(--mof-hairline);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 1.1875rem;
}
.mof-sources li a { color: var(--wp--preset--color--ink); text-decoration: none; }
.mof-sources li a:hover { color: var(--wp--preset--color--brass); }
.mof-record--private p { font-style: italic; color: var(--wp--preset--color--ink-muted); }

@media (max-width: 780px) {
	.mof-person-hero { grid-template-columns: 1fr; }
}

/* ---------- Image band ---------- */
.mof-band {
	position: relative;
	min-height: clamp(280px, 34vw, 420px);
	display: grid;
	place-items: center;
	overflow: hidden;
	background: var(--wp--preset--color--ink-deep);
}
.mof-band__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mof-band__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.42); }
.mof-band__caption { position: relative; text-align: center; max-width: 800px; padding-inline: 1.5rem; }
.mof-band__caption .mof-lead { color: var(--wp--preset--color--on-dark); }
/* Donate band: the photo's subject (a flower held in cupped hands) is at the
   centre, so the caption sits at the foot over a gradient instead of on it. */
.mof-band--caption-low { place-items: end center; }
.mof-band--caption-low .mof-band__scrim {
	background: linear-gradient(to top, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.62) 34%, rgba(0, 0, 0, 0.18) 72%, rgba(0, 0, 0, 0.1) 100%);
}
.mof-band--caption-low .mof-band__caption { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }

/* ---------- Chips ---------- */
.mof-chips { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.mof-chip {
	padding: 0.625rem 1.125rem;
	border-radius: var(--mof-radius-md);
	border: 1px solid var(--wp--preset--color--line-strong);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wp--preset--color--ink-muted);
	text-decoration: none;
}
.mof-chip[aria-current] {
	background: var(--wp--preset--color--plum-bg);
	border-color: transparent;
	color: var(--wp--preset--color--on-plum);
}

/* ---------- Forms ---------- */
.mof-field { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.125rem; }
.mof-field label {
	font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em;
	text-transform: uppercase; color: var(--wp--preset--color--ink-muted);
}
.mof-field input,
.mof-field textarea {
	background: var(--wp--preset--color--bone);
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--mof-radius-md);
	padding: 0.875rem 1rem;
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-size: 0.9375rem;
}
.mof-field input:focus-visible,
.mof-field textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--brass);
	outline-offset: 1px;
}

/* ---------- Footer ---------- */
.mof-footer { background: var(--wp--preset--color--plum-bg); color: var(--wp--preset--color--on-plum); }
.mof-footer a { color: var(--wp--preset--color--on-plum); text-decoration: none; display: inline-block; padding-block: 0.4rem; }
.mof-footer a:hover { color: var(--wp--preset--color--white); }
.mof-footer__inner {
	max-width: var(--mof-maxw);
	margin-inline: auto;
	padding: clamp(2.75rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem) 2.25rem;
}
/* Footer link list: tap targets stay >=24px, rows sit ~30px apart. */
.mof-footer__nav a { padding-block: 0.2rem; font-size: 0.9375rem; line-height: 1.4; }
.mof-footer__nav .mof-eyebrow { margin-bottom: 0.5rem; }

/* ---------- Prose ---------- */
.mof-prose p:not(.mof-eyebrow) { color: var(--wp--preset--color--ink-muted); }
.mof-prose .mof-eyebrow + p { color: var(--wp--preset--color--ink); }
.mof-prose .mof-eyebrow { margin-bottom: 0.75rem; }
/* Prose that stacks its heading and paragraphs with one gap (About, Home):
   the gap is the spacing, so the paragraphs' own margins must not add to it. */
.mof-prose--stack { display: flex; flex-direction: column; gap: 1.25rem; }
.mof-prose--stack > * { margin-block: 0; }

/* ---------- Page building blocks (patterns) ---------- */
.mof-heading {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 400;
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	line-height: 1.14;
	color: var(--wp--preset--color--ink);
	margin: 0.5rem 0 0;
}
.mof-two-col { display: grid; grid-template-columns: 260px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.mof-quoteband {
	background: var(--wp--preset--color--plum-bg);
	text-align: center;
	padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.mof-quoteband .mof-lead { color: var(--wp--preset--color--on-dark); max-width: 880px; margin-inline: auto; font-size: clamp(1.5rem, 3vw, 2.125rem); }
.mof-cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.mof-cards-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.mof-panel {
	background: var(--wp--preset--color--paper);
	border: var(--mof-hairline);
	border-radius: var(--mof-radius-md);
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}
.mof-panel h3, .mof-panel__title {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 400;
	font-size: 1.5rem;
	line-height: 1.18;
	color: var(--wp--preset--color--ink);
	margin: 0;
}
.mof-panel p { color: var(--wp--preset--color--ink-muted); margin: 0; }

/* Contact */
.mof-contact-grid { display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.mof-detail { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.75rem; }
.mof-detail__value { font-family: var(--wp--preset--font-family--fraunces); font-size: 1.25rem; color: var(--wp--preset--color--ink); }
.mof-form { background: var(--wp--preset--color--paper); border: var(--mof-hairline); border-radius: var(--mof-radius-md); padding: 2rem; }

/* Donate */
.mof-donate-card {
	background: var(--wp--preset--color--paper);
	border: var(--mof-hairline);
	border-radius: var(--mof-radius-md);
	padding: 2.25rem;
	max-width: 560px;
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}
.mof-seg { display: flex; border: 1px solid var(--wp--preset--color--line-strong); border-radius: var(--mof-radius-md); overflow: hidden; }
.mof-seg button {
	flex: 1;
	padding: 0.75rem;
	border: 0;
	background: transparent;
	font: 600 0.875rem var(--wp--preset--font-family--inter);
	color: var(--wp--preset--color--ink-muted);
	cursor: pointer;
}
.mof-seg button[aria-pressed="true"] { background: var(--wp--preset--color--plum-bg); color: var(--wp--preset--color--on-plum); }
.mof-amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 0.625rem; }
.mof-amounts button {
	padding: 0.875rem;
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--mof-radius-md);
	background: var(--wp--preset--color--bone);
	font: 400 1.25rem var(--wp--preset--font-family--fraunces);
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}
.mof-amounts button[aria-pressed="true"] { background: var(--wp--preset--color--plum-bg); border-color: transparent; color: var(--wp--preset--color--on-plum); }
.mof-give { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.mof-give__item { display: flex; flex-direction: column; gap: 0.75rem; }
.mof-give__item h3 { font-family: var(--wp--preset--font-family--fraunces); font-weight: 400; font-size: 1.375rem; color: var(--wp--preset--color--ink); margin: 0; }
.mof-give__item p { color: var(--wp--preset--color--ink-muted); margin: 0; }

@media (max-width: 780px) {
	.mof-two-col, .mof-contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Breadcrumbs ---------- */
.mof-breadcrumbs {
	max-width: var(--mof-maxw);
	margin-inline: auto;
	padding: 1.25rem clamp(1.25rem, 4vw, 3rem) 0;
}
.mof-breadcrumbs ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--ink-muted);
}
.mof-breadcrumbs li { display: flex; align-items: center; gap: 0.5rem; }
.mof-breadcrumbs li:not(:first-child)::before { content: "\203A"; color: var(--wp--preset--color--ink-soft); }
.mof-breadcrumbs a { color: var(--wp--preset--color--ink-muted); text-decoration: none; }
.mof-breadcrumbs a:hover { color: var(--wp--preset--color--brass); }
.mof-breadcrumbs [aria-current] { color: var(--wp--preset--color--ink); }
@media (max-width: 600px) {
	.mof-breadcrumbs ol { flex-wrap: nowrap; }
	.mof-breadcrumbs li { flex: none; white-space: nowrap; }
	.mof-breadcrumbs li:last-child { flex: 0 1 auto; min-width: 0; }
	.mof-breadcrumbs li:last-child [aria-current] { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Breadcrumb straight above a page's main block: close the gap (was ~130px). */
.mof-breadcrumbs + .mof-section { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

/* ---------- Helpline / safety banner ---------- */
.mof-helpline {
	background: var(--wp--preset--color--plum-bg);
	color: var(--wp--preset--color--on-dark);
	text-align: center;
	font-size: 0.875rem;
	font-weight: 500;
	padding: 0.875rem 1.25rem;
}

/* Running-text links must be distinguishable without colour (WCAG 1.4.1).
   Only bare links: anything with a class is a component (button, chip, card)
   that carries its own look and must not pick up an underline. */
:where(.mof-prose, .entry-content, .wp-block-post-content) a:not([class]):not(.wp-block-button__link) {
	text-decoration: underline;
	text-underline-offset: 2px;
}

@media (max-width: 880px) {
	.mof-burger { display: inline-grid; place-items: center; }
	.mof-menu-close { display: inline-grid; place-items: center; position: absolute; top: 1.25rem; right: 1.25rem; }
	.mof-nav {
		position: fixed;
		inset: 0;
		z-index: 60;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 0;
		padding: 5rem 1.5rem 2rem;
		margin: 0;
		background: var(--wp--preset--color--bone);
		transform: translateX(100%);
		visibility: hidden; /* keep closed menu out of the tab order + off SR */
		transition: transform 220ms ease, visibility 0s linear 220ms;
		overflow-y: auto;
	}
	.mof-nav.is-open { transform: translateX(0); visibility: visible; transition: transform 220ms ease; }
	.mof-nav a:not(.mof-nav__cta) {
		font-family: var(--wp--preset--font-family--fraunces);
		font-size: 1.625rem;
		padding: 1rem 0;
		border-bottom: var(--mof-hairline);
		color: var(--wp--preset--color--ink);
	}
	.mof-nav .mof-theme-toggle { margin-top: 1.5rem; width: 44px; }
	.mof-nav a.mof-nav__cta { margin-top: 1.25rem; padding-block: 0.875rem; }
}

@media (prefers-reduced-motion: reduce) {
	.mof-nav { transition: none; }
}

/* ---------- Memorial wall: filter / search / sort bar ---------- */
.mof-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1.75rem;
}
.mof-filters__field {
	position: relative;
	display: flex;
	align-items: center;
}
.mof-filters__field--search { flex: 1 1 240px; }
.mof-filters__field--search svg {
	position: absolute;
	left: 0.85rem;
	color: var(--wp--preset--color--ink-muted);
	pointer-events: none;
}
.mof-filters input[type="search"],
.mof-filters select {
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.9rem;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--paper);
	border: var(--mof-hairline);
	border-radius: var(--mof-radius-sm);
	padding: 0.6rem 0.9rem;
	line-height: 1.2;
	appearance: none;
	-webkit-appearance: none;
}
.mof-filters input[type="search"] {
	width: 100%;
	padding-left: 2.35rem;
}
.mof-filters select {
	padding-right: 2.1rem;
	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='%23887f79' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.8rem center;
	cursor: pointer;
}
.mof-filters input[type="search"]:focus-visible,
.mof-filters select:focus-visible {
	outline: 2px solid var(--wp--preset--color--brass);
	outline-offset: 1px;
}
.mof-filters__count {
	margin: 0 0 0 auto;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--ink-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.mof-filters.is-loading { opacity: 0.7; }
.mof-grid > li.is-filtered-out,
.mof-grid > .mof-card.is-filtered-out { display: none; }
.mof-filters__empty {
	margin: 2rem 0;
	text-align: center;
	color: var(--wp--preset--color--ink-muted);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 1.125rem;
}
@media (max-width: 560px) {
	.mof-filters__field--search { flex-basis: 100%; }
	.mof-filters__count { margin-left: 0; }
	.mof-filters select { flex: 1 1 auto; }
}

/* ---------- Single record: keep the hero within a 16:9 viewport ---------- */
/* Desktop only: unscoped, this came after the 780px rule and kept the portrait
   and name side by side on phones (Figma stacks them). */
@media (min-width: 781px) {
	.mof-person-hero { grid-template-columns: minmax(0, 360px) 1fr; }
	.mof-person-hero__portrait { max-height: min(60vh, 480px); }
}
.mof-person-hero__name { font-size: clamp(2rem, 4vw, 3.25rem); }
@media (min-width: 781px) and (max-height: 820px) {
	.mof-person-hero__portrait { max-height: 56vh; }
	.mof-person-hero__name { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
	.mof-person-hero__meta { gap: 0.9rem; }
}

/* ---------- Kill the dark strip between the CTA band and the footer ---------- */
.wp-block-template-part { margin-block: 0; }

/* ---------- Feedback-note fixes (2026-09-01) ---------- */
/* #2 Hero: less towering. */
.mof-hero { padding-block: clamp(2.5rem, 5vw, 4rem); }
/* #6 Full-bleed dark bands must sit flush — no page-bg strip between them. */
:where(.entry-content) > .mof-band,
:where(.entry-content) > .mof-quoteband { margin-block-start: 0; }
.mof-band + .mof-quoteband, .mof-quoteband + .mof-band { margin-block-start: 0; }
/* #16 Full-width buttons were overflowing their card (padding added on top of 100%). */
.mof-btn { box-sizing: border-box; }
/* #15 CTA band = a functional version of the old decorative bottom band. */
.mof-band .mof-btn { margin-top: 1.25rem; }
.mof-band .mof-btn--primary { background: var(--wp--preset--color--on-dark); color: var(--wp--preset--color--plum-bg); }
/* #12/#13 Support-panel icon. */
.mof-panel__icon { display: block; width: 34px; height: 34px; margin-bottom: 0.9rem; color: var(--wp--preset--color--brass); }
.mof-panel__icon svg { width: 100%; height: 100%; }
/* #3 Single-record prev/next — prettier, keyboard + swipe friendly. */
.mof-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; }
.mof-pager__link {
	display: flex; flex-direction: column; gap: 0.25rem;
	text-decoration: none; color: var(--wp--preset--color--ink);
	border: var(--mof-hairline); border-radius: var(--mof-radius-md);
	padding: 0.9rem 1.15rem; min-width: 0; flex: 0 1 46%;
	transition: border-color 0.2s ease, transform 0.2s ease;
}
.mof-pager__link:hover { border-color: var(--wp--preset--color--brass); transform: translateY(-2px); }
.mof-pager__link--next { text-align: right; align-items: flex-end; }
.mof-pager__dir { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--ink-muted); }
.mof-pager__name { font-family: var(--wp--preset--font-family--fraunces); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* #10 Report card featured image. */
.mof-panel--report { overflow: hidden; }
.mof-panel__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}
.mof-panel__thumb { display: block; margin: -1.75rem -1.75rem 1.1rem; aspect-ratio: 16 / 9; overflow: hidden; }
.mof-panel__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* #7 Quote citation. */
.mof-quoteband__cite { margin-top: 1.25rem; font-size: 0.85rem; letter-spacing: 0.02em; color: var(--wp--preset--color--on-plum); }
.mof-quoteband__cite a { color: var(--mof-brass-aa); }
/* The footer and CTA-band patterns pin their eyebrows to the palette brass
   with an INLINE style:var(--brass), which beats any sheet rule — and the
   light theme's brass is 2:1 on the plum. The AA pair must win over the
   pattern's inline colour, hence !important. */
.mof-footer .mof-eyebrow { color: var(--mof-brass-aa) !important; }
/* The about band's caption is an on-dark surface in both themes (its lead is
   already forced on-dark); its eyebrow keeps light's brass, 2.7:1 on the
   scrim's fallback. Hold it to the same AA brass. */
.mof-band .mof-eyebrow { color: var(--mof-brass-aa) !important; }
/* #4 Header WRF logo — white in dark (default), original in light. */
.mof-wordmark__logo { height: 40px; width: auto; display: block; flex: 0 0 auto; }
:root:not([data-theme="light"]) .mof-wordmark__logo { filter: brightness(0) invert(1); }
:root[data-theme="light"] .mof-wordmark__logo { filter: none; }
/* #9 Footer WRF logo — constrain (flex column was stretching it). */
.mof-footer__logo { height: 46px !important; width: auto !important; max-width: 210px; align-self: flex-start; }
/* Donate: card routes to POWR's secure form (one-time or monthly + amounts + PayPal). */
.mof-donate-card--cta { text-align: center; }
.mof-donate-card__lead {
	color: var(--wp--preset--color--ink-muted);
	margin: 0 0 1.5rem;
	font-size: 1rem;
	line-height: 1.55;
}
.mof-donate-actions { display: flex; gap: 0.875rem; justify-content: center; flex-wrap: wrap; }
.mof-donate-btn { flex: 1 1 200px; max-width: 260px; }
/* Record page: numbered source footnotes. */
.mof-footnotes { margin: 0.5rem 0 0; padding-left: 1.4rem; list-style: decimal; }
.mof-footnotes li { display: list-item; padding: 0.45rem 0; border: 0; font-family: var(--wp--preset--font-family--inter); font-size: 0.9rem; }
.mof-footnotes li a { color: var(--wp--preset--color--ink); text-decoration: underline; text-underline-offset: 2px; }
.mof-footnotes li a:hover { color: var(--wp--preset--color--brass); }
.mof-footnotes .mof-card__meta { display: block; margin-top: 0.15rem; }
.mof-prose + .mof-sources { margin-top: 1.75rem; }

/* Contact form: mailto composer notes */
.mof-form__note { margin: 1rem 0 0; font-size: 0.875rem; color: var(--wp--preset--color--ink-muted); }
.mof-form__status { margin: 0.75rem 0 0; font-size: 0.9375rem; }
.mof-field__opt { font-weight: 400; color: var(--wp--preset--color--ink-muted); }

/* ---------- Figma fidelity pass (2026-11-11) ---------- */
/* Phone header: Figma keeps the site name on one line. */
@media (max-width: 560px) {
	.mof-header__inner { gap: 0.75rem; }
	.mof-wordmark { font-size: 0.94rem; gap: 0.5rem; min-width: 0; }
	.mof-wordmark span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.mof-wordmark__logo { height: 20px; }
	/* Record pager: Figma stacks previous and next on phones. */
	.mof-pager { flex-direction: column; }
	.mof-pager__link { flex-basis: auto; }
	/* Report byline: publisher above date, the dot between them is dropped. */
	.mof-post-byline { flex-direction: column; gap: 0.25rem; }
	.mof-post-byline > [aria-hidden="true"] { display: none; }
}
/* Phone stats: the three figures on one row. */
@media (max-width: 600px) {
	/* Flex, not a fixed three-column grid: two figures sit side by side, a third
	   (if one is ever added) wraps below instead of squeezing every label. */
	.mof-stats { gap: 1.5rem 2.25rem; }
	.mof-stat__num { font-size: clamp(1.75rem, 8vw, 2.25rem); white-space: nowrap; }
	.mof-stat__label { font-size: 0.75rem; }
}
/* Home on phones: the first 8 women and a link to the full memorial, as in
   Figma; filters and infinite scroll stay on larger screens and on /person/.
   mof-wall.js skips infinite scroll on the same breakpoint. */
.mof-wall-more { display: none; }
@media (max-width: 599px) {
	.home .mof-filters,
	.home .wp-block-query-pagination { display: none !important; }
	.home .wp-block-query .mof-grid > :nth-child(n+9) { display: none; }
	.home .mof-wall-more { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; margin-top: 2.25rem; text-align: center; }
}

/* Report pages (templates/single.html), after the Figma "Report - Single" frame. */
.mof-post-back { margin: 0 0 1.75rem; }
.mof-post-back a { font-size: 0.875rem; font-weight: 500; color: var(--wp--preset--color--ink-muted); text-decoration: none; }
.mof-post-back a:hover { color: var(--wp--preset--color--brass); }
.mof-post-byline { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 2.25rem; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--ink-muted); }
.mof-post-body { font-size: 1rem; line-height: 1.7; color: var(--wp--preset--color--ink-muted); }
.mof-post-body p, .mof-post-body li { max-width: 68ch; }
.mof-post-body h2, .mof-post-body h3 { font-family: var(--wp--preset--font-family--fraunces); font-weight: 400; color: var(--wp--preset--color--ink); }
.mof-post-body h2 { font-size: 1.5rem; margin-top: 2.25rem; }
.mof-post-body a { color: var(--wp--preset--color--ink); text-underline-offset: 2px; }
/* A report that opens with a heading (its "Abstract") gets the abstract box. */
.mof-post-body > h2:first-child {
	margin: 0; padding: 1.25rem 1.5rem 0.4rem; background: var(--wp--preset--color--paper);
	border-left: 2px solid var(--wp--preset--color--brass); border-radius: 0 var(--mof-radius-md) 0 0;
	font-family: var(--wp--preset--font-family--inter); font-size: 0.72rem; font-weight: 600;
	letter-spacing: 0.12em; text-transform: uppercase; color: var(--wp--preset--color--brass);
}
.mof-post-body > h2:first-child + p {
	margin-top: 0; padding: 0.4rem 1.5rem 1.35rem; background: var(--wp--preset--color--paper);
	border-left: 2px solid var(--wp--preset--color--brass); border-radius: 0 0 var(--mof-radius-md) 0;
	color: var(--wp--preset--color--ink); max-width: none;
}
/* In-text "Downloads:" lines the download card replaces (tagged by deploy/content). */
.mof-post-body .mof-dl-src { display: none; }
.mof-downloads { display: grid; gap: 0.75rem; margin-top: 2.5rem; }
.mof-download {
	display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem;
	background: var(--wp--preset--color--paper); border: var(--mof-hairline); border-radius: var(--mof-radius-md);
}
.mof-download__icon { color: var(--wp--preset--color--brass); display: flex; }
.mof-download__text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1; }
.mof-download__name { font-family: var(--wp--preset--font-family--fraunces); font-size: 1.05rem; color: var(--wp--preset--color--ink); overflow-wrap: anywhere; }
.mof-download__meta { font-size: 0.75rem; letter-spacing: 0.04em; color: var(--wp--preset--color--ink-muted); }
.mof-download__btn { flex: none; padding: 0.55rem 1.1rem; font-size: 0.8rem; }
.mof-related { margin-top: 3rem; }
.mof-related ul { list-style: none; margin: 0.9rem 0 0; padding: 0; border-top: var(--mof-hairline); }
.mof-related li { border-bottom: var(--mof-hairline); }
.mof-related a { display: grid; grid-template-columns: 9rem 1fr auto; gap: 1rem; align-items: baseline; padding: 0.95rem 0; text-decoration: none; color: var(--wp--preset--color--ink); }
.mof-related a:hover .mof-related__title, .mof-related a:focus-visible .mof-related__title { color: var(--wp--preset--color--brass); }
.mof-related__cat { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wp--preset--color--brass); }
.mof-related__title { font-family: var(--wp--preset--font-family--fraunces); font-size: 1.05rem; }
.mof-related__arrow { color: var(--wp--preset--color--brass); }
@media (max-width: 560px) {
	.mof-related a { grid-template-columns: 1fr auto; }
	.mof-related__cat { grid-column: 1 / -1; }
	.mof-download { flex-wrap: wrap; }
	.mof-download__btn { width: 100%; text-align: center; }
}

/* Contact: the email address is a link (underlined, same ink as the plain value). */
.mof-detail__value a { color: inherit; }

/* Search results and archive pagination */
.mof-results { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.mof-results__item { padding: 1.5rem 0; border-top: var(--mof-hairline); }
.mof-results__item:last-child { border-bottom: var(--mof-hairline); }
.mof-results__item .mof-eyebrow { margin-bottom: 0.4rem; }
.mof-results__title { font-family: var(--wp--preset--font-family--fraunces); font-size: 1.5rem; line-height: 1.2; color: var(--wp--preset--color--ink); text-decoration: none; }
.mof-results__title:hover { color: var(--wp--preset--color--brass); }
.mof-results__excerpt { margin: 0.6rem 0 0; color: var(--wp--preset--color--ink-muted); max-width: 68ch; }
.mof-results__none a { color: var(--wp--preset--color--ink); text-decoration: underline; text-underline-offset: 2px; }
.mof-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.mof-pagination .page-numbers { padding: 0.5rem 0.9rem; border: 1px solid var(--wp--preset--color--line-strong); border-radius: var(--mof-radius-md); color: var(--wp--preset--color--ink-muted); text-decoration: none; }
.mof-pagination .page-numbers.current { background: var(--wp--preset--color--plum-bg); border-color: transparent; color: var(--wp--preset--color--on-plum); }

/* Long-form pages (the privacy policy): headings that read as a hierarchy. */
.mof-section > .wp-block-post-content > h2 { font-size: clamp(1.5rem, 3vw, 1.75rem); line-height: 1.2; margin-top: 2.75rem; margin-bottom: 0.5rem; }
.mof-section > .wp-block-post-content > h3 { font-size: 1.25rem; line-height: 1.25; margin-top: 1.75rem; margin-bottom: 0.25rem; }
.mof-section > .wp-block-post-content > ul { padding-left: 1.25rem; }
.mof-section > .wp-block-post-content > ul li + li { margin-top: 0.35rem; }

/* ---------- Preloader (fail-safe pure-CSS fallback + DOMContentLoaded dismiss; MOF dark plum + brass candle) ---------- */
#mof-preloader {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #3e1b2f;
	pointer-events: none;
	transition: opacity 0.45s ease, visibility 0.45s ease;
	animation: mof-pre-failsafe 0.5s ease 2.5s forwards;
}
#mof-preloader.is-done {
	animation: none;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
/* No JS enabled: never show the overlay, so content is never trapped. */
html:not(.js) #mof-preloader { display: none; }
.mof-preloader__mark {
	width: 88px;
	height: 88px;
	max-width: 28vw;
	animation: mof-pre-pulse 1.6s ease-in-out infinite;
}
@keyframes mof-pre-pulse {
	0%, 100% { opacity: 0.72; }
	50% { opacity: 1; }
}
@keyframes mof-pre-failsafe {
	from { opacity: 1; visibility: visible; }
	to { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
	#mof-preloader {
		display: none;
		animation: none;
		transition: none;
	}
	.mof-preloader__mark { animation: none; opacity: 1; }
}
