/* ==========================================================================
 * Redesign R3 -- public templates (docs/REDESIGN-PLAN.md section 3).
 *
 * The owner approved the mockups on 2026-11-06: home, /giving/, the event page.
 * This file holds every R3 rule, so style.css (shared with the R4 dashboard
 * lane) is not touched. functions.php loads it after style.css and
 * legacy-port.css, so it wins ties without !important.
 *
 * Colour and type come from theme.json presets only (R1). Rules that bind:
 *   - brand-red (#FF0000) only for display text 24px and up, frames and rules;
 *     primary (#C82623) for buttons, links and small red text.
 *   - gold is never text on white (1.5:1); gold text only on black.
 *   - square corners, 2px borders, no shadows.
 *   - no mascot or logo art here (R2 brings the school's files).
 *
 * Sections:
 *   1. local aliases and shared pieces (buttons, overline, section head, stats, tiles)
 *   2. home (front-page.php)
 *   3. interior heroes (page-giving.php, page-with-hero.php)
 *   4. giving (page-giving.php)
 *   5. event page (templates/single-event_listing.html and its blocks)
 * ========================================================================== */

/* 1. local aliases and shared pieces ------------------------------------- */
:root {
	--r3-black: var(--wp--preset--color--black);
	--r3-white: var(--wp--preset--color--background);
	--r3-red: var(--wp--preset--color--brand-red);
	--r3-action: var(--wp--preset--color--primary);
	--r3-action-hover: var(--wp--preset--color--primary-hover);
	--r3-gold: var(--wp--preset--color--gold);
	--r3-dgray: var(--wp--preset--color--dark-gray);
	--r3-lgray: var(--wp--preset--color--light-gray);
	--r3-mist: var(--wp--preset--color--surface);
	--r3-line: var(--wp--preset--color--border);
	--r3-muted: var(--wp--preset--color--text-muted);
	--r3-display: var(--wp--preset--font-family--display);
	--r3-body: var(--wp--preset--font-family--body);
	--r3-h1: var(--wp--preset--font-size--h-1);
	--r3-h2: var(--wp--preset--font-size--h-2);
	--r3-wide: 1120px;
	--r3-gutter: clamp(16px, 4vw, 32px);
	--r3-scrim: color-mix(in srgb, var(--r3-black) 72%, transparent);
}

.r3-in {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--r3-wide) + 2 * var(--r3-gutter));
	margin-inline: auto;
	padding-inline: var(--r3-gutter);
}

/* Headings inside R3 sections: Oswald caps, set sizes here (R1 left them at inherit). */
.r3-home h1, .r3-home h2, .r3-home h3,
.r3-giving h1, .r3-giving h2, .r3-giving h3,
.r3-ev .r3-ev__title {
	font-family: var(--r3-display);
	font-weight: 700;
	text-transform: uppercase;
	line-height: 1.08;
	letter-spacing: 0.01em;
	text-wrap: balance;
	margin: 0;
}

.r3-over {
	display: inline-block;
	margin: 0;
	font: 700 0.6875rem/1.4 var(--r3-body);
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: var(--r3-action);
}
.r3-over--on-dark {
	color: var(--r3-gold);
}

.r3-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.r3-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	min-height: 44px;
	padding: 12px 22px;
	border: 2px solid transparent;
	border-radius: 0;
	font: 700 0.8125rem/1.2 var(--r3-body);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.r3-btn:focus-visible,
.r3-chip:focus-visible,
.r3-qk__link:focus-visible,
.r3-tile:focus-visible,
.r3-ev-card:focus-visible {
	outline: 3px solid var(--r3-action);
	outline-offset: 2px;
}
.r3-btn--sm {
	min-height: 0;
	padding: 9px 14px;
	font-size: 0.75rem;
}
.r3-btn--red {
	background: var(--r3-action);
	border-color: var(--r3-action);
	color: var(--r3-white);
}
.r3-btn--red:hover {
	background: var(--r3-action-hover);
	border-color: var(--r3-action-hover);
	color: var(--r3-white);
}
.r3-btn--black {
	background: var(--r3-black);
	border-color: var(--r3-black);
	color: var(--r3-white);
}
.r3-btn--black:hover {
	background: var(--r3-dgray);
	border-color: var(--r3-dgray);
	color: var(--r3-white);
}
.r3-btn--ghost {
	background: transparent;
	border-color: var(--r3-white);
	color: var(--r3-white);
}
.r3-btn--ghost:hover {
	background: var(--r3-white);
	color: var(--r3-black);
}
.r3-btn--line {
	background: transparent;
	border-color: var(--r3-black);
	color: var(--r3-black);
}
.r3-btn--line:hover {
	background: var(--r3-black);
	color: var(--r3-white);
}

/* Section head: red caps, then a 3px gold rule to the right edge. */
.r3-sec-h {
	display: flex;
	align-items: center;
	gap: 18px;
}
.r3-sec-h h2 {
	color: var(--r3-red);
	font-size: var(--r3-h2);
	min-width: 0;
}
.r3-sec-h::after {
	content: "";
	flex: 1 1 24px;
	min-width: 24px;
	height: 3px;
	background: var(--r3-gold);
}
.r3-sec-h--center {
	justify-content: center;
}
.r3-sec-h--center::after {
	display: none;
}
/* On a gold band the rule would vanish and red on gold is too weak: black heading, black rule. */
.r3-sec-h--black h2 {
	color: var(--r3-black);
}
.r3-sec-h--black::after {
	background: var(--r3-black);
}

.r3-lead {
	max-width: 70ch;
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.6;
}
.r3-note {
	margin: 0;
	font-size: 0.875rem;
	color: var(--r3-muted);
}
.r3-center {
	display: flex;
	justify-content: center;
}

/* Stats strip: black, gold numbers, white labels. */
.r3-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	background: var(--r3-black);
	color: var(--r3-white);
}
.r3-stats__item {
	padding: 22px 12px;
	text-align: center;
	border-right: 1px solid var(--r3-dgray);
}
.r3-stats__item:last-child {
	border-right: 0;
}
.r3-stats__item b {
	display: block;
	font: 700 clamp(1.875rem, 3vw, 2.375rem)/1 var(--r3-display);
	color: var(--r3-gold);
	font-variant-numeric: tabular-nums;
}
.r3-stats__item span {
	display: block;
	margin-top: 6px;
	font: 600 0.6875rem/1.3 var(--r3-body);
	text-transform: uppercase;
	letter-spacing: 0.14em;
}

/* Photo tiles: square, dark overlay, white condensed caps. */
.r3-tiles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.r3-tile {
	position: relative;
	display: grid;
	place-content: center;
	gap: 8px;
	min-width: 0;
	aspect-ratio: 1 / 1;
	padding: 16px;
	box-sizing: border-box;
	overflow-wrap: anywhere;
	text-align: center;
	color: var(--r3-white);
	text-decoration: none;
	background-color: var(--r3-dgray);
	background-image: linear-gradient(var(--r3-scrim), var(--r3-scrim)), var(--r3-tile-bg, none);
	background-size: cover;
	background-position: center;
}
.r3-tile b {
	font: 700 clamp(1.1875rem, 2.4vw, 2rem)/1.05 var(--r3-display);
	text-transform: uppercase;
}
.r3-tile span {
	font-size: 0.875rem;
	line-height: 1.45;
}
a.r3-tile:hover {
	background-image: linear-gradient(color-mix(in srgb, var(--r3-black) 82%, transparent), color-mix(in srgb, var(--r3-black) 82%, transparent)), var(--r3-tile-bg, none);
	color: var(--r3-white);
}
a.r3-tile:hover b {
	text-decoration: underline;
	text-decoration-color: var(--r3-gold);
	text-decoration-thickness: 3px;
	text-underline-offset: 6px;
}

/* Gold band. */
.r3-band-gold {
	background: var(--r3-gold);
	color: var(--r3-black);
	padding: 52px 0 56px;
}
.r3-band-gold > .r3-in {
	display: grid;
	gap: 28px;
}
.r3-band-gold__empty {
	margin: 0;
	text-align: center;
	font-weight: 600;
}

/* Number / icon ring. */
.r3-ring {
	display: grid;
	place-items: center;
	flex: none;
	box-sizing: border-box;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 3px solid var(--r3-gold);
	background: var(--r3-black);
	color: var(--r3-white);
}
.r3-ring svg {
	width: 20px;
	height: 20px;
}

@media (max-width: 700px) {
	.r3-stats {
		grid-template-columns: 1fr 1fr;
	}
	.r3-stats__item {
		border-bottom: 1px solid var(--r3-dgray);
	}
	.r3-stats__item:nth-child(2) {
		border-right: 0;
	}
	.r3-tiles {
		grid-template-columns: 1fr 1fr;
	}
	.r3-sec-h h2 {
		font-size: 1.75rem;
	}
	.r3-band-gold {
		padding: 40px 0 44px;
	}
}

/* 2. home ------------------------------------------------------------------ */
.r3-hhero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	min-height: 470px;
	background: var(--r3-black);
}
.r3-hhero__media {
	display: grid;
	align-content: end;
	justify-items: start;
	gap: 18px;
	padding: 48px 48px 48px max(var(--r3-gutter), calc((100vw - var(--r3-wide)) / 2));
	color: var(--r3-white);
	background-color: var(--r3-black);
	background-image:
		linear-gradient(90deg, color-mix(in srgb, var(--r3-black) 88%, transparent) 0%, color-mix(in srgb, var(--r3-black) 45%, transparent) 75%, transparent 100%),
		var(--r3-hero-bg-desktop, var(--r3-hero-bg, none));
	background-size: cover;
	background-position: center;
}
.r3-hhero__title {
	max-width: 13ch;
	color: var(--r3-white);
	font-size: var(--r3-h1);
	line-height: 0.98;
}
.r3-home .r3-hhero__title {
	line-height: 0.98;
}
.r3-hhero__title em {
	font-style: normal;
	color: var(--r3-gold);
}
.r3-hhero__lede {
	max-width: 46ch;
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--r3-white);
}

.r3-qk {
	display: grid;
	align-content: center;
	gap: 10px;
	padding: 20px 18px;
	background: var(--r3-black);
}
.r3-qk__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 12px 6px 6px;
	background: var(--r3-dgray);
	color: var(--r3-white);
	text-decoration: none;
	font: 500 1.1875rem/1.1 var(--r3-display);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.r3-qk__link--red {
	background: var(--r3-action);
}
.r3-qk__link:hover {
	background: var(--r3-white);
	color: var(--r3-black);
}

.r3-mission {
	padding: 64px 0 56px;
}
/* The offset red frame: a solid red plate behind a white card with a red border. */
.r3-frame {
	position: relative;
	padding-left: 14px;
}
.r3-frame::before {
	content: "";
	position: absolute;
	left: 0;
	top: -12px;
	right: 14px;
	bottom: 12px;
	background: var(--r3-red);
}
.r3-frame__card {
	position: relative;
	display: grid;
	justify-items: center;
	gap: 14px;
	padding: 32px 40px;
	background: var(--r3-white);
	border: 2px solid var(--r3-red);
	text-align: center;
}
.r3-frame__card h2 {
	color: var(--r3-red);
	font-size: clamp(2rem, 4vw, 2.75rem);
}
.r3-frame__card p {
	max-width: 70ch;
	margin: 0;
	line-height: 1.6;
}

.r3-tiles--home {
	padding: 8px;
}

.r3-ev-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
/* One or two upcoming events: keep cards card-sized and centred, not stretched. */
.r3-ev-cards:has(> :only-child) {
	grid-template-columns: minmax(0, 360px);
	justify-content: center;
}
.r3-ev-cards:has(> :nth-child(2):last-child) {
	grid-template-columns: repeat(2, minmax(0, 360px));
	justify-content: center;
}
.r3-ev-card {
	display: grid;
	grid-template-rows: auto 1fr;
	background: var(--r3-white);
	color: var(--r3-black);
	text-decoration: none;
}
.r3-ev-card__img {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--r3-dgray);
	overflow: hidden;
}
.r3-ev-card__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.r3-ev-card__date {
	position: absolute;
	left: 0;
	top: 0;
	padding: 6px 10px;
	background: var(--r3-action);
	color: var(--r3-white);
	text-align: center;
	font: 700 0.75rem/1.1 var(--r3-body);
	text-transform: uppercase;
}
.r3-ev-card__date b {
	display: block;
	font: 700 1.625rem/1 var(--r3-display);
}
.r3-ev-card__body {
	display: grid;
	align-content: start;
	gap: 8px;
	padding: 16px 18px 18px;
	border-top: 4px solid var(--r3-black);
}
.r3-ev-card__body h3 {
	font-size: 1.3125rem;
}
.r3-ev-card__meta {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--r3-muted);
}
.r3-ev-card__body .r3-btn {
	justify-self: start;
	margin-top: 4px;
}
.r3-ev-card:hover h3 {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
.r3-ev-card:hover .r3-btn--red {
	background: var(--r3-action-hover);
	border-color: var(--r3-action-hover);
}

.r3-blog {
	display: grid;
	gap: 24px;
	padding-block: 56px;
}
.r3-blog__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	align-items: start;
}
.r3-blog__img {
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--r3-black);
	overflow: hidden;
}
.r3-blog__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.r3-blog__fallback {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--r3-white);
	font: 700 clamp(1.5rem, 3vw, 2.25rem)/1 var(--r3-display);
	text-transform: uppercase;
	border-bottom: 6px solid var(--r3-red);
	box-sizing: border-box;
}
.r3-blog__copy {
	display: grid;
	gap: 12px;
	justify-items: start;
}
.r3-blog__copy h3 {
	font-size: clamp(1.375rem, 2.4vw, 1.625rem);
}
.r3-blog__copy h3 a {
	color: var(--r3-black);
	text-decoration: none;
}
.r3-blog__copy h3 a:hover {
	text-decoration: underline;
}
.r3-blog__copy p {
	margin: 0;
	line-height: 1.6;
}

.r3-give {
	padding: 52px 0;
	background: var(--r3-black);
	color: var(--r3-white);
	text-align: center;
}
.r3-give .r3-in {
	display: grid;
	justify-items: center;
	gap: 16px;
}
.r3-give h2 {
	color: var(--r3-white);
	font-size: clamp(2rem, 4vw, 2.75rem);
}
.r3-give h2 em {
	font-style: normal;
	color: var(--r3-gold);
}
.r3-give p {
	max-width: 62ch;
	margin: 0;
}
.r3-give .r3-btns {
	justify-content: center;
}

@media (max-width: 1023px) {
	.r3-hhero {
		grid-template-columns: minmax(0, 1fr) 260px;
	}
	.r3-hhero__media {
		padding: 40px var(--r3-gutter);
	}
	.r3-qk__link {
		font-size: 1rem;
	}
	.r3-ev-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 700px) {
	.r3-hhero {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}
	.r3-hhero__media {
		padding: 64px var(--r3-gutter) 28px;
		background-image:
			linear-gradient(180deg, color-mix(in srgb, var(--r3-black) 55%, transparent) 0%, color-mix(in srgb, var(--r3-black) 88%, transparent) 100%),
			var(--r3-hero-bg, none);
	}
	.r3-qk {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		padding: 12px;
	}
	.r3-qk__link {
		gap: 8px;
		font-size: 0.9375rem;
	}
	.r3-qk .r3-ring {
		width: 34px;
		height: 34px;
		border-width: 2px;
	}
	.r3-qk .r3-ring svg {
		width: 16px;
		height: 16px;
	}
	.r3-mission {
		padding: 44px 0 40px;
	}
	.r3-frame__card {
		padding: 24px 18px;
	}
	.r3-ev-cards,
	.r3-ev-cards:has(> :nth-child(2):last-child),
	.r3-blog__row {
		grid-template-columns: minmax(0, 1fr);
	}
	.r3-blog {
		padding-block: 44px;
	}
}

/* 3. interior heroes --------------------------------------------------------
 * Black band, left-aligned caps, a 6px brand-red rule under it. Used by
 * /giving/ (r3-ihero) and page-with-hero.php (es-page-hero, es-page-photo-hero).
 * The classic pages' `fhero--interior` gets the same look in legacy-port.css. */
.r3-ihero,
.es-page-hero {
	background: var(--r3-black);
	color: var(--r3-white);
	border-bottom: 6px solid var(--r3-red);
	padding: 52px 0 46px;
}
.r3-ihero .r3-in {
	display: grid;
	justify-items: start;
	gap: 14px;
}
.r3-ihero h1,
.es-page-hero .es-page-hero__title {
	margin: 0;
	color: var(--r3-white);
	font: 700 var(--r3-h1)/1.02 var(--r3-display);
	text-transform: uppercase;
	letter-spacing: 0.01em;
	text-wrap: balance;
	overflow-wrap: anywhere;
}
.r3-ihero p {
	max-width: 58ch;
	margin: 0;
	color: var(--r3-white);
	font-size: 1rem;
	line-height: 1.6;
}
.es-page-hero::before {
	display: none;
}
.es-page-hero__inner {
	box-sizing: border-box;
	max-width: calc(var(--r3-wide) + 2 * var(--r3-gutter));
	padding-inline: var(--r3-gutter);
	text-align: left;
}
.es-page-hero {
	padding-inline: 0;
}
.es-page-photo-hero {
	border-bottom: 6px solid var(--r3-red);
}
.es-page-photo-hero__scrim {
	background: linear-gradient(90deg, color-mix(in srgb, var(--r3-black) 85%, transparent) 0%, color-mix(in srgb, var(--r3-black) 45%, transparent) 100%);
	align-items: flex-end;
}
.es-page-photo-hero__inner {
	box-sizing: border-box;
	max-width: calc(var(--r3-wide) + 2 * var(--r3-gutter));
	margin-inline: auto;
	padding: 32px var(--r3-gutter);
	text-align: left;
}
.es-page-photo-hero__inner h1 {
	font-size: var(--r3-h1);
	line-height: 1.02;
	text-shadow: none;
	overflow-wrap: anywhere;
}
@media (max-width: 700px) {
	.r3-ihero,
	.es-page-hero {
		padding: 34px 0 30px;
	}
}

/* 4. giving ---------------------------------------------------------------- */
.r3-giving .r3-h2 {
	color: var(--r3-red);
	font-size: var(--r3-h2);
}
.r3-amt {
	padding: 56px 0;
}
.r3-amt__grid {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 40px;
	align-items: center;
}
.r3-amt__pick {
	display: grid;
	gap: 14px;
	justify-items: start;
}
.r3-amt__pick > p {
	margin: 0;
	max-width: 60ch;
}
.r3-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 4px 0 0;
}
.r3-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 72px;
	min-height: 48px;
	box-sizing: border-box;
	padding: 8px 16px;
	border: 2px solid var(--r3-black);
	background: var(--r3-white);
	color: var(--r3-black);
	font: 700 1.125rem/1 var(--r3-display);
	font-variant-numeric: tabular-nums;
	text-decoration: none;
}
.r3-chip:hover {
	background: var(--r3-black);
	color: var(--r3-gold);
}
.r3-amt__panel {
	display: grid;
	gap: 12px;
	padding: 26px;
	background: var(--r3-mist);
	border-top: 6px solid var(--r3-gold);
}
.r3-amt__panel h3 {
	font-size: 1.375rem;
}
.r3-amt__panel p {
	margin: 0;
	line-height: 1.6;
}
.r3-amt__panel a {
	color: var(--r3-action);
	font-weight: 600;
}

.r3-eitc .r3-lead {
	color: var(--r3-black);
}
.r3-video {
	position: relative;
	width: 100%;
	max-width: 760px;
	aspect-ratio: 16 / 9;
	background: var(--r3-black);
}
.r3-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.r3-steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}
.r3-step {
	display: grid;
	gap: 8px;
	justify-items: start;
	align-content: start;
}
.r3-ring--num {
	width: 52px;
	height: 52px;
	border-color: var(--r3-black);
	background: var(--r3-white);
	color: var(--r3-black);
	font: 700 1.375rem/1 var(--r3-display);
}
.r3-step h3 {
	font-size: 1.375rem;
}
.r3-step p {
	margin: 0;
	line-height: 1.5;
}
.r3-split {
	display: grid;
	grid-template-columns: 1fr 1.15fr;
	gap: 28px;
	align-items: start;
}
.r3-box {
	display: grid;
	gap: 10px;
	align-content: start;
	padding: 24px;
	background: var(--r3-white);
	color: var(--r3-black);
}
.r3-box h3 {
	font-size: 1.25rem;
}
.r3-box h3:not(:first-child) {
	margin-top: 10px;
}
.r3-box p {
	margin: 0;
	line-height: 1.6;
}

/* EITC inquiry form: dark text on white, square fields. */
.eitc-inquiry-form {
	display: grid;
	gap: 14px;
	margin-top: 6px;
}
.eitc-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.eitc-inquiry-form .eitc-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--r3-black);
}
.eitc-inquiry-form .eitc-field abbr {
	color: var(--r3-action);
	text-decoration: none;
}
.eitc-inquiry-form input,
.eitc-inquiry-form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 10px 12px;
	border: 2px solid var(--r3-black);
	border-radius: 0;
	background: var(--r3-white);
	color: var(--r3-black);
	font: 400 1rem/1.4 var(--r3-body);
}
.eitc-inquiry-form input::placeholder,
.eitc-inquiry-form textarea::placeholder {
	color: var(--r3-muted);
}
.eitc-inquiry-form input:focus-visible,
.eitc-inquiry-form textarea:focus-visible {
	outline: 3px solid var(--r3-action);
	outline-offset: 1px;
}
.eitc-inquiry-form .r3-btn {
	justify-self: start;
}
.eitc-alert {
	padding: 12px 14px;
	font-size: 0.875rem;
	border-left: 5px solid currentColor;
	background: var(--r3-mist);
}
.eitc-alert--success {
	color: var(--wp--preset--color--success);
}
.eitc-alert--error {
	color: var(--wp--preset--color--error);
}

.r3-impact {
	display: grid;
	gap: 20px;
	padding-block: 56px;
}
.r3-tiles--impact {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}
.r3-tiles--impact .r3-tile b {
	font-size: clamp(1.0625rem, 1.8vw, 1.5rem);
}
.r3-tiles--impact .r3-tile span {
	font-size: 0.8125rem;
}

.r3-blocs {
	padding-bottom: 64px;
}
.r3-blocs__card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 20px 32px;
	align-items: center;
	padding: 26px 30px;
	border: 2px solid var(--r3-black);
}
.r3-blocs__card > div {
	display: grid;
	gap: 8px;
}
.r3-blocs__card h3 {
	font-size: clamp(1.25rem, 2.2vw, 1.625rem);
}
.r3-blocs__card p {
	margin: 0;
	line-height: 1.6;
	max-width: 70ch;
}

@media (max-width: 1023px) {
	.r3-tiles--impact {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.r3-split {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (max-width: 700px) {
	.r3-amt {
		padding: 40px 0;
	}
	.r3-amt__grid,
	.r3-blocs__card {
		grid-template-columns: minmax(0, 1fr);
	}
	.r3-steps,
	.r3-tiles--impact {
		grid-template-columns: 1fr 1fr;
	}
	.eitc-form-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.r3-box {
		padding: 18px;
	}
	.r3-blocs__card {
		padding: 20px;
	}
	.r3-blocs__card .r3-btn {
		justify-self: start;
	}
}

/* 5. event page -------------------------------------------------------------
 * <main class="r3-ev"> keeps every group as a DIRECT child (the S207 empty-
 * wrapper collapse in style.css depends on that), so the two-column layout is
 * a grid on <main> itself, switched on only when the ticket group holds
 * something. No rule here sets `display` on a group, so the S207
 * `display: none` still wins for an empty one. */
.r3-ev {
	margin-top: 0;
	margin-block-start: 0;
}
.r3-ev > * {
	box-sizing: border-box;
}
/* The groups are constrained layouts, so core centres each inner block at the
 * 720px content size; inside the event columns that indents the details and
 * the sponsor list away from the title. Let them fill their column instead. */
.r3-ev > .r3-ev__meta > *,
.r3-ev > .r3-ev__body > *,
.r3-ev > .r3-ev__body .wp-block-post-content > :not(.alignleft):not(.alignright),
.r3-ev > .r3-ev__tix > *,
.r3-ev > .r3-ev__section > * {
	max-width: none;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
@media (max-width: 1023px) {
	.r3-ev > .wp-block-group:not(.r3-ev__band) {
		padding-inline: var(--r3-gutter);
	}
}
.r3-ev > .wp-block-group.r3-ev__meta {
	padding-top: 32px;
}
.r3-ev > .wp-block-group.r3-ev__body {
	padding-top: 24px;
	padding-bottom: 32px;
}
.r3-ev > .wp-block-group.r3-ev__tix {
	padding-bottom: 40px;
}
.r3-ev > .wp-block-group.r3-ev__section {
	padding-bottom: 40px;
}

/* Title band. */
.r3-ev__band {
	margin-top: 0;
	padding: 40px var(--r3-gutter) 34px;
	background: var(--r3-black);
	color: var(--r3-white);
	border-bottom: 6px solid var(--r3-red);
}
.r3-ev > .r3-ev__band {
	max-width: none;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
.r3-ev__crumbs {
	margin: 0 0 10px;
	font-size: 0.8125rem;
}
.r3-ev__crumbs a {
	color: var(--r3-lgray);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.r3-ev__crumbs a::before {
	content: "\2039\00A0";
	text-decoration: none;
	display: inline-block;
}
.r3-ev__crumbs a:hover {
	color: var(--r3-white);
}
.r3-ev .r3-ev__title {
	color: var(--r3-white);
	font-size: clamp(2rem, 4.4vw, 3.5rem);
	line-height: 1.04;
	overflow-wrap: anywhere;
}
.r3-ev__flyer {
	margin-top: 32px;
}

/* Event details (eventsync/event-meta). */
.r3-ev .es-event-meta__past-banner {
	padding: 12px 16px;
	background: var(--r3-mist);
	border: 0;
	border-left: 6px solid var(--r3-gold);
	border-radius: 0;
	color: var(--r3-black);
}
.r3-ev .es-event-meta__chip {
	padding: 3px 9px;
	border: 1.5px solid var(--r3-black);
	border-radius: 0;
	background: var(--r3-white);
	color: var(--r3-black);
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}
.r3-ev a.es-event-meta__chip:hover,
.r3-ev a.es-event-meta__chip:focus-visible {
	background: var(--r3-black);
	color: var(--r3-white);
}
.r3-ev .es-event-meta__cell {
	padding: 2px 0 2px 14px;
	border-left: 5px solid var(--r3-gold);
}
.r3-ev .es-event-meta__heading {
	font: 700 0.875rem/1.2 var(--r3-display);
	letter-spacing: 0.1em;
	color: var(--r3-muted);
}
.r3-ev .es-event-meta__when,
.r3-ev .es-event-meta__where {
	color: var(--r3-black);
	font-size: 1rem;
}
.r3-ev .es-event-meta__cta {
	min-height: 44px;
	padding: 10px 18px;
	border: 2px solid var(--r3-black);
	border-radius: 0;
	background: transparent;
	color: var(--r3-black);
	font: 700 0.8125rem/1.2 var(--r3-body);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.r3-ev .es-event-meta__cta:hover {
	background: var(--r3-black);
	color: var(--r3-white);
}
.r3-ev .es-event-meta__cta--primary {
	background: var(--r3-action);
	border-color: var(--r3-action);
	color: var(--r3-white);
}
.r3-ev .es-event-meta__cta--primary:hover {
	background: var(--r3-action-hover);
	border-color: var(--r3-action-hover);
	color: var(--r3-white);
}

/* Ticket panel (eventsync/event-tickets): a black head with the gold title,
 * then the form on white inside a black frame. The real block is a full order
 * form (rows, packages, fields, alerts), so its body stays light for contrast. */
.r3-ev .es-tickets-block {
	margin: 0;
	padding: 0 20px 20px;
	border: 3px solid var(--r3-black);
	border-radius: 0;
	background: var(--r3-white);
}
.r3-ev .es-tickets-block__heading {
	margin: 0 -20px 18px;
	padding: 16px 20px;
	background: var(--r3-black);
	color: var(--r3-gold);
	font: 700 1.5rem/1.1 var(--r3-display);
	text-transform: uppercase;
}
.r3-ev .es-tickets__btn--primary {
	width: 100%;
	justify-content: center;
	border-radius: 0;
	border-color: var(--r3-action);
	background: var(--r3-action);
	color: var(--r3-white);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.r3-ev .es-tickets__btn--primary:hover {
	border-color: var(--r3-action-hover);
	background: var(--r3-action-hover);
}
.r3-ev .es-tickets__total-row {
	border-radius: 0;
	background: var(--r3-mist);
}
.r3-ev .es-tickets__total-row strong {
	color: var(--r3-black);
}
.r3-ev .es-tickets-block--error,
.r3-ev .es-tickets-block--empty {
	padding: 16px;
	border: 2px solid var(--r3-black);
	border-radius: 0;
	background: var(--r3-mist);
	color: var(--r3-black);
}

/* Section heads for the blocks below the fold: red caps + gold rule. */
.r3-ev .es-tier-sponsors__heading,
.r3-ev .es-event-hosts__heading,
.r3-ev .es-event-organizers__heading,
.r3-ev .es-event-gallery-link__heading {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 0 0 24px;
	color: var(--r3-red);
	font: 700 var(--r3-h2)/1.08 var(--r3-display);
	text-transform: uppercase;
	text-align: left;
}
.r3-ev .es-tier-sponsors__heading::after,
.r3-ev .es-event-hosts__heading::after,
.r3-ev .es-event-organizers__heading::after,
.r3-ev .es-event-gallery-link__heading::after {
	content: "";
	flex: 1 1 24px;
	min-width: 24px;
	height: 3px;
	background: var(--r3-gold);
}
.r3-ev .es-tier-sponsors {
	margin: 0;
}
.r3-ev .es-tier-sponsors__tier {
	margin: 0 0 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--r3-line);
}
.r3-ev .es-tier-sponsors__tier-name {
	margin: 0 0 12px;
	color: var(--r3-black);
	font: 700 1.25rem/1.1 var(--r3-display);
	text-align: left;
	letter-spacing: 0.04em;
}
.r3-ev .es-tier-sponsors__tier:first-of-type .es-tier-sponsors__tier-name {
	color: var(--r3-action);
}

/* "Want to get involved?" becomes the gold band. */
.r3-ev .es-cta-banner {
	background: var(--r3-gold);
	color: var(--r3-black);
}
.r3-ev .es-cta-banner__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	box-sizing: border-box;
	max-width: calc(var(--r3-wide) + 2 * var(--r3-gutter));
	padding: 40px var(--r3-gutter);
	text-align: left;
}
.r3-ev .es-cta-banner__headline {
	flex: 1 1 100%;
	margin: 0;
	color: var(--r3-black);
	font: 700 clamp(1.875rem, 3.4vw, 2.375rem)/1.05 var(--r3-display);
	text-transform: uppercase;
}
.r3-ev .es-cta-banner__body {
	margin: 0;
	color: var(--r3-black);
}
.r3-ev .es-cta-banner__cta {
	margin: 0;
}
.r3-ev .es-cta-banner .es-cta-banner__button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 12px 22px;
	border: 2px solid var(--r3-black);
	border-radius: 0;
	background: var(--r3-black);
	color: var(--r3-white);
	font: 700 0.8125rem/1.2 var(--r3-body);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
}
.r3-ev .es-cta-banner .es-cta-banner__button:hover {
	background: var(--r3-dgray);
	border-color: var(--r3-dgray);
	color: var(--r3-white);
}
.r3-ev .es-cta-banner .es-cta-banner__button:focus-visible {
	outline: 3px solid var(--r3-action);
	outline-offset: 2px;
}

/* From 1024px <main> is a grid: gutter | main | gap | side | gutter, with the
 * bands running edge to edge. The ticket panel takes the side column only when
 * it has content; otherwise poster, details and description use the full width
 * up to a readable measure, left-aligned under the title. */
@media (min-width: 1024px) {
	.r3-ev {
		display: grid;
		grid-template-columns:
			[full-start] minmax(var(--r3-gutter), 1fr)
			[main-start] minmax(0, 660px)
			[main-end] 40px
			[side-start] minmax(0, 420px)
			[side-end] minmax(var(--r3-gutter), 1fr)
			[full-end];
		align-items: start;
	}
	.r3-ev > * {
		grid-column: main-start / side-end;
		max-width: none;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	.r3-ev > .r3-ev__band,
	.r3-ev > .es-cta-banner {
		grid-column: full-start / full-end;
		width: auto;
	}
	.r3-ev .r3-ev__band > * {
		max-width: var(--r3-wide);
	}
	.r3-ev > .r3-ev__flyer,
	.r3-ev > .r3-ev__meta,
	.r3-ev > .r3-ev__body {
		max-width: 820px;
	}
	.r3-ev:has(> .r3-ev__tix > *) {
		grid-template-rows: auto auto auto auto minmax(0, 1fr);
	}
	.r3-ev:has(> .r3-ev__tix > *) > .r3-ev__band {
		grid-row: 1;
	}
	.r3-ev:has(> .r3-ev__tix > *) > .r3-ev__flyer {
		grid-column: main;
		grid-row: 2;
	}
	.r3-ev:has(> .r3-ev__tix > *) > .r3-ev__meta {
		grid-column: main;
		grid-row: 3;
	}
	.r3-ev:has(> .r3-ev__tix > *) > .r3-ev__body {
		grid-column: main;
		grid-row: 4;
	}
	.r3-ev:has(> .r3-ev__tix > *) > .r3-ev__tix {
		grid-column: side;
		grid-row: 2 / 6;
		margin-top: 32px;
	}
}
