/*
Theme Name: TTP Main
Theme URI: https://texastransmissionproject.org
Description: Custom theme for the Texas Transmission Project main website.
Author: Texas Transmission Project
Version: 0.3.0
Text Domain: ttp-main
*/

/* ===========================================================================
 * Daybreak design language. Reference: /design-language.md (what each token
 * and component is for, and the one-job-per-brand-element rules).
 * Colours and type live here only; the client never picks either.
 * ======================================================================== */
:root {
	/* Palette: the brand guide's five colours, plus white. Never a new hue. */
	--ink: #1f1326;       /* Big Bend Nightfall: the brand's black */
	--royalty: #322543;   /* Rodeo Royalty */
	--wheat: #fcbb5f;     /* Texas Wheat Field */
	--bandana: #b8424e;   /* Cowboy Bandana */
	--ember: #f0552f;     /* Lone Star Ember */
	--white: #fff;

	/* Tints, by mixing the palette with white (oklch, as in the approved mock). */
	--cream: #fffaf5;     /* page ground: 7% Wheat */
	--cream-2: #fff5e7;   /* 16% Wheat: quiet fills on cream */
	--ink-70: #564c5c;    /* muted text on cream (7.8:1) */
	--ink-55: #746c7a;    /* meta text on cream (4.9:1) */
	--white-78: rgb(255 255 255 / 0.78);  /* body text on Nightfall (11:1) */
	--white-58: rgb(255 255 255 / 0.58);  /* meta on Nightfall (6.6:1) */
	--rule-on-cream: rgb(31 19 38 / 0.16);
	--rule-on-colour: rgb(31 19 38 / 0.28);
	--rule-on-ink: rgb(255 255 255 / 0.18);

	/* Texas Frontier Enhancement, exactly as the guide specifies it. The only
	   gradient allowed, and only in the homepage hero panel. */
	--gradient-frontier: linear-gradient(-125.5154deg, #fcbb5f 25.224%, #f0552f 52.1036%, #322543 100%);

	/* Type: Halyard Display from Adobe Fonts project qqx4gfb. Book is 300. */
	--font: 'halyard-display', 'Arial Narrow', system-ui, sans-serif;
	--font-display: var(--font); /* kept for older rules and inline styles */
	--font-body: var(--font);

	/* Perfect-fourth scale on 18px: 92 / 56 / 36 / 24 / 18, fluid down to phones.
	   The hero owns --text-display; nothing outranks the page's H1. */
	--text-display: clamp(3rem, 1.9rem + 4.6vw, 5.75rem);   /* 92: hero H1 */
	--text-h2: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);       /* 56: section headings, page H1 elsewhere */
	--text-h3: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);      /* 36: statements, list rows, captions */
	--text-h4: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);       /* 24: card titles, ledes */
	--text-body: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);  /* 18: body */
	--text-small: 0.9375rem;                                 /* 15: meta, nav */
	--text-label: 0.8125rem;                                 /* 13: tracked caps labels */
	--stat-size: clamp(2.5rem, 1.9rem + 2.4vw, 3.75rem);     /* 60: stat figures */
	--measure: 62ch;

	/* Spacing: 8pt steps, and exactly two section paddings. */
	--s-1: 0.5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2rem;
	--s-5: 3rem; --s-6: 4rem; --s-7: 6rem; --s-8: 8rem;
	--pad-story: clamp(4.5rem, 3rem + 5vw, 8rem);    /* 128: story sections */
	--pad-action: clamp(3.5rem, 2.5rem + 3.5vw, 6rem); /* 96: action bands (forms, Ember, stats) */
	--content-max: 76rem;  /* 1216px */
	--gutter: clamp(1rem, 4vw, 3rem);

	/* Shape */
	--r-sm: 6px;     /* fields, small tiles */
	--r-md: 12px;    /* photos, panels, video, cards */
	--r-pill: 999px; /* buttons, chips */
	--radius-pill: var(--r-pill);
	--radius-card: var(--r-sm);

	/* Depth: one panel shadow, one card shadow. Tinted with Nightfall, never black. */
	--shadow-panel: 0 2px 4px rgb(31 19 38 / 0.14), 0 32px 64px -24px rgb(50 37 67 / 0.4);
	--shadow-card: 0 1px 2px rgb(31 19 38 / 0.08), 0 12px 32px -12px rgb(31 19 38 / 0.22);
	--shadow-bubble: 0 8px 24px rgb(31 19 38 / 0.2);

	/* Motion: quick and quiet. Everything collapses under reduced motion. */
	--ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
	--dur-fast: 120ms;  /* colour changes: buttons, links */
	--dur-base: 200ms;  /* menus, small moves */
	--dur-slow: 300ms;  /* image zoom on hover */

	/* Header: the compact bar (task 3.5). --header-h is what layouts read. */
	--header-h: var(--header-h-compact);
	--header-h-compact: 5.5rem;  /* ~88px: half of today's */
	--logo-w-compact: 8.25rem;   /* ~132px */

	/* Ground roles (cream by default; each .bg-* below redefines them). */
	--ground: var(--cream);
	--fg: var(--ink);
	--fg-muted: var(--ink-70);
	--heading: var(--ink);
	--label: var(--bandana);
	--link: var(--bandana);
	--rule: var(--rule-on-cream);
	--focus: var(--ink);
	--btn: var(--ink);
	--btn-on: var(--white);
	--field-border: var(--ink);
	--marker: url('assets/img/brand/line-gradient.svg');
}

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

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

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

body {
	margin: 0;
	color: var(--ink);
	background: var(--cream);
	font-family: var(--font);
	font-weight: 300; /* Halyard Book (the kit serves Book as 300) */
	font-size: var(--text-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-underline-offset: 0.18em;
}

/* Brand rule: every heading in Black Italic. Sizes come from the scale only. */
h1, h2, h3, h4,
.display {
	font-family: var(--font);
	font-style: italic;
	font-weight: 900;
	line-height: 1;
	letter-spacing: normal;
	margin: 0 0 0.45em;
	text-wrap: balance;
	color: var(--heading);
}

h1 { font-size: var(--text-h2); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h4); line-height: 1.1; }
h4 { font-size: var(--text-body); line-height: 1.2; }

p {
	margin: 0 0 1em;
	text-wrap: pretty;
}

strong, b {
	font-weight: 700;
}

.num {
	font-variant-numeric: tabular-nums; /* pure-number cells only: Halyard's tnum widens spaces */
}

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

.ttpm-form--coalition .field__label,
.ttpm-form--name-email .field__label {
	position: static !important;
	width: auto;
	height: auto;
	margin: 0 0 0.35rem;
	overflow: visible;
	clip: auto;
	white-space: normal;
	display: block;
	font-size: var(--text-small);
	font-weight: 500;
}

.field__label em {
	font-style: normal;
	opacity: 0.7;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 100;
	padding: 0.75rem 1rem;
	background: var(--wheat);
	color: var(--ink);
	font-weight: 700;
}

.skip-link:focus {
	top: 1rem;
}

/* Focus: a 3px ring in the ground's focus colour (Nightfall on light grounds,
   Wheat on Nightfall), always offset so it never hides the control. */
:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}

.container {
	width: 100%;
	max-width: var(--content-max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: 48rem; /* ~680px measure for posts */
}

.container--medium {
	max-width: 60rem;
}

/* ---------------------------------------------------------------------------
 * Grounds. A section names its ground; text, rules, labels, links, focus and
 * buttons follow it. Four grounds only: cream, Wheat, Ember, Nightfall.
 * The theme assigns them (functions.php → ttpm_section_class()).
 * ------------------------------------------------------------------------ */
.bg-cream,
.bg-light,
.bg-white {
	--ground: var(--cream);
	background: var(--cream);
	color: var(--ink);
}

.bg-wheat,
.bg-gold,
.bg-ember,
.bg-red {
	--fg-muted: var(--ink);
	--label: var(--ink);
	--link: var(--ink);
	--rule: var(--rule-on-colour);
	/* White fields need an edge on colour (WCAG 1.4.11): white on Wheat is only 1.69:1. */
	--field-border: var(--ink);
	--marker: url('assets/img/brand/line-nightfall.svg');
	color: var(--ink);
}

.bg-wheat,
.bg-gold {
	--ground: var(--wheat);
	background: var(--wheat);
}

.bg-ember,
.bg-red {
	--ground: var(--ember);
	background: var(--ember);
}

.bg-nightfall,
.bg-purple,
.bg-dark {
	--ground: var(--ink);
	--fg: var(--white);
	--fg-muted: var(--white-78);
	--heading: var(--white);
	--label: var(--wheat);
	--link: var(--wheat);
	--rule: var(--rule-on-ink);
	--focus: var(--wheat);
	--btn: var(--wheat);
	--btn-on: var(--ink);
	--field-border: transparent;
	background: var(--ink);
	color: var(--white);
}

/* (.bg-light/-white/-gold/-red/-purple/-dark: names from before Daybreak, kept
   so a cached page still renders in the new system during a deploy.) */

/* ---------------------------------------------------------------------------
 * Sections: two paddings. Story sections 128px, action bands 96px. Two
 * neighbours on the same ground share one gap instead of doubling it.
 * ------------------------------------------------------------------------ */
.section {
	position: relative;
	padding-block: var(--pad-story);
}

.section--action {
	padding-block: var(--pad-action);
}

.bg-cream + .bg-cream,
.bg-nightfall + .bg-nightfall {
	padding-top: 0;
}

/* ---------------------------------------------------------------------------
 * Headings, labels, ledes, prose
 * ------------------------------------------------------------------------ */
.section__heading {
	font-size: var(--text-h2);
	max-width: 20ch;
}

.section__heading--small {
	font-size: var(--text-h3);
}

.lede {
	font-weight: 500; /* Halyard Medium: the guide's subheading weight */
	font-size: var(--text-h4);
	line-height: 1.4;
	max-width: 46ch;
}

/* Section label: Bold tracked caps, led by the brand's tapered line (gradient
   on cream and Nightfall, Nightfall on Wheat and Ember). */
.eyebrow {
	display: block;
	margin: 0 0 var(--s-2);
	font-weight: 700;
	font-style: normal;
	font-size: var(--text-label);
	line-height: 1.3;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--label);
}

.eyebrow::before {
	content: '';
	display: inline-block;
	width: 44px;
	height: 6px;
	margin-right: 0.7em;
	vertical-align: 0.15em;
	background: var(--marker) center / 100% 100% no-repeat;
}

.eyebrow a {
	text-decoration: none;
}

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

.empty-state {
	color: var(--fg-muted);
}

.prose > * + * {
	margin-top: 1em;
}

.prose p {
	margin-bottom: 0;
}

.prose a {
	color: var(--link);
	font-weight: 700;
	text-decoration-thickness: 2px;
}

.prose a:hover {
	color: inherit;
}

.prose iframe,
.prose .wp-block-embed iframe,
.prose > p > iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	border-radius: var(--r-md);
}

.prose img {
	border-radius: var(--r-md);
}

.prose h2 { font-size: var(--text-h3); margin-top: 1.5em; }
.prose h3 { font-size: var(--text-h4); margin-top: 1.5em; }

/* ---------------------------------------------------------------------------
 * Buttons, per the brand guide: outlined pills, a heavy border in the text
 * colour, transparent inside, solid fill on hover/press. Header type at 19px
 * (large text for contrast), two or three words, no caps, no icons, never a
 * gradient. Nightfall on light grounds, Wheat on Nightfall.
 * ------------------------------------------------------------------------ */
.button,
.ttpm-form button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.85em 1.6em;
	border: 3px solid currentColor;
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--btn);
	font: italic 900 1.1875rem/1 var(--font);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.button:hover,
.ttpm-form button:hover,
.button:active,
.ttpm-form button:active {
	background: var(--btn);
	border-color: var(--btn);
	color: var(--btn-on);
}

.button:active,
.ttpm-form button:active {
	transform: scale(0.97);
}

/* Wheat outline, for buttons on a photo scrim. */
.button--light {
	--btn: var(--wheat);
	--btn-on: var(--ink);
}

.button--small {
	padding: 0.65em 1.25em;
	border-width: 2.5px;
	font-size: 1rem;
}

/* Inline text link: bold, underlined with a 2px rule. */
.text-link {
	font-weight: 700;
	text-decoration: none;
	border-bottom: 2px solid currentColor;
	padding-bottom: 0.1em;
	transition: color var(--dur-fast) var(--ease-out);
}

.text-link:hover {
	color: var(--link);
}

.section__actions {
	margin-top: var(--s-5);
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-4);
	align-items: center;
	justify-content: center;
}

/* Under left-aligned text (the 404 page): buttons start on the text's edge. */
.section__actions--start {
	justify-content: flex-start;
	gap: var(--s-2);
}

/* ---------------------------------------------------------------------------
 * Header: compact and cream (~88px), dark logo, Primary menu with dropdowns,
 * one small button. Over a photo hero it floats, transparent, in white.
 * Not sticky (the approved mock scrolls away with the page).
 * Dropdown behaviour: assets/js/site.js; markup: inc/nav.php.
 * ------------------------------------------------------------------------ */
.announcement-bar {
	background: var(--ember);
	color: var(--ink);
	text-align: center;
	font-weight: 700;
	padding: 0.5rem var(--gutter);
}

.site-header {
	--nav-fg: var(--ink-70);
	--nav-fg-on: var(--ink);
	position: relative;
	z-index: 20;
	background: var(--cream);
	color: var(--ink);
	border-bottom: 1px solid var(--rule-on-cream);
}

.has-hero .site-header {
	--nav-fg: var(--white);
	--nav-fg-on: var(--white);
	--focus: var(--wheat);
	position: absolute;
	inset: 0 0 auto;
	background: transparent;
	color: var(--white);
	border-bottom: 0;
}

.has-hero .announcement-bar + .site-header {
	top: 2.5rem;
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: var(--s-4);
	max-width: 90rem;
	margin-inline: auto;
	padding-inline: var(--gutter);
	height: var(--header-h);
}

.site-header__logo {
	position: relative;
	z-index: 2;
	flex: 0 0 auto;
	display: block;
	text-decoration: none;
	color: inherit;
}

.site-header__logo img {
	height: 4.75rem; /* 76px tall ≈ 106px wide: the most the 88px bar holds */
	width: auto;
	max-width: var(--logo-w-compact);
}

/* Dark logo on cream; the white site logo over a photo hero and the phone menu. */
.site-header__logo .logo--light,
.has-hero .site-header__logo:has(.logo--light) .logo--dark {
	display: none;
}

.has-hero .site-header__logo .logo--light {
	display: block;
}

.site-header__name {
	font: italic 900 1.5rem/1 var(--font);
}

.site-nav {
	display: flex;
	align-items: center;
	gap: var(--s-4);
	margin-left: auto;
}

.site-header .button {
	--btn: var(--ink);
	--btn-on: var(--white);
}

.has-hero .site-header .button {
	--btn: var(--wheat);
	--btn-on: var(--ink);
}

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

.menu--primary {
	display: flex;
	align-items: center;
	gap: var(--s-4);
}

.menu--primary > li {
	position: relative;
	display: flex;
	align-items: center;
}

/* Nav link and dropdown button: Medium, Ember underline for the current page. */
.menu--primary > li > a,
.submenu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.3em 0;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	color: var(--nav-fg);
	font: 500 var(--text-small)/1.4 var(--font);
	text-decoration: none;
	cursor: pointer;
	transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.menu--primary > li > a:hover,
.submenu-toggle:hover,
.submenu-toggle[aria-expanded='true'] {
	color: var(--nav-fg-on);
	border-bottom-color: currentColor;
}

.menu--primary > .current-menu-item > a,
.menu--primary > .current_page_item > a,
.menu--primary > .current-menu-ancestor > a,
.menu--primary > .current-menu-ancestor > .submenu-toggle {
	color: var(--nav-fg-on);
	border-bottom-color: var(--ember);
}

.submenu-toggle--icon {
	padding-inline: 0.35em;
	margin-left: 0.1em;
}

.submenu-toggle__icon {
	width: 0.45em;
	height: 0.45em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-0.15em) rotate(45deg);
	transition: transform var(--dur-base) var(--ease-out);
}

[aria-expanded='true'] > .submenu-toggle__icon {
	transform: translateY(0.1em) rotate(-135deg);
}

/* The dropdown panel: white card on any header. */
.menu--primary .sub-menu {
	position: absolute;
	top: calc(100% + 0.75rem);
	left: -1rem;
	z-index: 3;
	min-width: 19rem;
	margin: 0;
	padding: var(--s-1);
	list-style: none;
	background: var(--white);
	border-radius: var(--r-md);
	box-shadow: var(--shadow-card);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-0.25rem);
	transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
}

/* Bridges the gap so the pointer can travel from the button to the panel. */
.menu--primary .sub-menu::before {
	content: '';
	position: absolute;
	inset: -0.75rem 0 100%;
}

.menu--primary .is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

.menu--primary .sub-menu a {
	--focus: var(--ink);
	display: block;
	padding: 0.75rem 1rem;
	border-radius: var(--r-sm);
	color: var(--ink);
	font-weight: 500;
	font-size: var(--text-small);
	line-height: 1.35;
	text-decoration: none;
	transition: background-color var(--dur-fast) var(--ease-out);
}

.menu--primary .sub-menu a:hover,
.menu--primary .sub-menu .current-menu-item > a {
	background: var(--cream-2);
}

/* Link to another website: small arrow-out icon after the text. */
.menu__external {
	display: inline-block;
	width: 0.7em;
	height: 0.7em;
	margin-left: 0.4em;
	vertical-align: 0.05em;
}

/* A menu item whose link is "#" or empty (a page not built yet): plain text, not a dead link. */
.menu--primary > li > .menu__text {
	padding: 0.3em 0;
	border-bottom: 2px solid transparent;
	color: var(--nav-fg);
	font: 500 var(--text-small)/1.4 var(--font);
}

.menu--primary .sub-menu .menu__text {
	display: block;
	padding: 0.75rem 1rem;
	color: var(--ink-55);
	font-weight: 500;
	font-size: var(--text-small);
	line-height: 1.35;
}

.menu--primary .sub-menu .current-menu-item > a {
	font-weight: 700;
}

.social-links {
	display: flex;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.social-links a {
	display: inline-flex;
	padding: 0.25rem;
	color: inherit;
	opacity: 0.9;
	transition: color var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}

.social-links a:hover {
	opacity: 1;
	color: var(--wheat);
}

/* Social links live in the phone menu only; on desktop they're in the footer. */
.social-links--header {
	display: none;
}

.nav-toggle {
	display: none;
	position: relative;
	width: 2.75rem;
	height: 2.75rem;
	margin-left: auto;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
	position: absolute;
	left: 50%;
	width: 1.6rem;
	height: 2px;
	margin-left: -0.8rem;
	background: currentColor;
	transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}

.nav-toggle__bars {
	top: 50%;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: '';
	margin-left: -0.8rem;
	left: 50%;
}

.nav-toggle__bars::before {
	top: -0.5rem;
}

.nav-toggle__bars::after {
	top: 0.5rem;
}

.nav-open .nav-toggle__bars {
	background: transparent;
}

.nav-open .nav-toggle__bars::before {
	transform: translateY(0.5rem) rotate(45deg);
}

.nav-open .nav-toggle__bars::after {
	transform: translateY(-0.5rem) rotate(-45deg);
}

/* The dark mobile menu (kept): big italic links on Nightfall. The logo and the
   close button stay on top of it, the logo switching to the white artwork. */
@media (max-width: 899px) {
	.nav-toggle {
		display: block;
		z-index: 2;
	}

	.site-nav {
		--focus: var(--wheat);
		position: fixed;
		inset: 0;
		z-index: 1;
		flex-direction: column;
		justify-content: flex-start;
		gap: var(--s-5);
		margin: 0;
		padding: calc(var(--header-h) + var(--s-4)) var(--gutter) var(--s-6);
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--ink);
		color: var(--white);
		opacity: 0;
		visibility: hidden;
		transition: opacity var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
	}

	.nav-open .site-nav {
		opacity: 1;
		visibility: visible;
		transition: opacity var(--dur-base) var(--ease-out);
	}

	.nav-open {
		overflow: hidden;
	}

	/* Keep the logo and close button on screen if the page was scrolled before opening. */
	.nav-open .site-header {
		position: sticky;
		top: 0;
	}

	.has-hero.nav-open .site-header {
		position: fixed;
		top: 0;
	}

	.nav-open .site-header {
		--focus: var(--wheat);
		color: var(--white);
	}

	.nav-open .site-header__logo:has(.logo--light) .logo--dark {
		display: none;
	}

	.nav-open .site-header__logo .logo--light {
		display: block;
	}

	.site-nav .site-nav__menu {
		margin-block: auto 0;
	}

	.menu--primary {
		--nav-fg: var(--white);
		--nav-fg-on: var(--white);
		flex-direction: column;
		gap: 1.25rem;
	}

	.menu--primary > li {
		flex-wrap: wrap;
		justify-content: center;
	}

	.menu--primary > li > a,
	.submenu-toggle {
		font: italic 900 2rem/1.1 var(--font);
	}

	.submenu-toggle--icon {
		font-size: 1.25rem;
		padding: 0.5rem;
	}

	.menu--primary .sub-menu {
		position: static;
		flex-basis: 100%;
		min-width: 0;
		display: none;
		margin-top: var(--s-2);
		padding: 0;
		background: none;
		box-shadow: none;
		text-align: center;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
	}

	.menu--primary .sub-menu::before {
		content: none;
	}

	.menu--primary .is-open > .sub-menu {
		display: grid;
		gap: 0.25rem;
	}

	.menu--primary .sub-menu a {
		--focus: var(--wheat);
		padding: 0.5rem 1rem;
		color: var(--white-78);
		font-size: 1.125rem;
	}

	.menu--primary .sub-menu a:hover,
	.menu--primary .sub-menu .current-menu-item > a {
		background: none;
		color: var(--wheat);
	}

	.menu--primary > li > .menu__text {
		font: italic 900 2rem/1.1 var(--font);
	}

	.menu--primary .sub-menu .menu__text {
		padding: 0.5rem 1rem;
		color: var(--white-78);
		font-size: 1.125rem;
	}

	.site-header .button {
		--btn: var(--wheat);
		--btn-on: var(--ink);
	}

	.social-links--header {
		display: flex;
		margin-bottom: auto;
	}
}

/* ---------------------------------------------------------------------------
 * Photo treatment: every stock photo in one tone. Royalty lifts the shadows,
 * Wheat warms the highlights. Optional Nightfall caption bar in Wheat type.
 * Never a headline over a busy photo.
 * ------------------------------------------------------------------------ */
.photo,
.photo-tone {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.photo {
	margin: 0;
	border-radius: var(--r-md);
	background: var(--royalty);
}

.photo img,
.photo-tone img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(0.85) contrast(1.02);
}

.photo::before,
.photo::after,
.photo-tone::before,
.photo-tone::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.photo::before,
.photo-tone::before {
	background: var(--royalty);
	mix-blend-mode: screen;
	opacity: 0.22;
}

.photo::after,
.photo-tone::after {
	background: var(--wheat);
	mix-blend-mode: multiply;
	opacity: 0.18;
}

.photo__caption {
	position: absolute;
	inset: auto 0 0;
	z-index: 2;
	padding: var(--s-3) var(--s-4);
	background: var(--ink);
	color: var(--wheat);
	font: italic 900 var(--text-h3)/1.05 var(--font);
	text-wrap: balance;
}

/* ---------------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------------ */

/* Sunrise panel (homepage): headline on cream beside the gradient panel. The
   gradient and the white highway map appear here and nowhere else. */
.section--hero.is-panel {
	padding-block: var(--s-7);
}

.section--hero__inner {
	display: grid;
	grid-template-columns: 7fr 5fr;
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
}

.section--hero.is-panel h1,
.section--hero.is-panel h2 {
	font-size: var(--text-display);
	line-height: 0.98;
	max-width: 11ch;
	margin-bottom: var(--s-4);
}

.section--hero.is-panel .lede {
	margin-bottom: var(--s-5);
}

.gradient-panel {
	position: relative;
	aspect-ratio: 4 / 5;
	border-radius: var(--r-md);
	overflow: hidden;
	background: var(--gradient-frontier);
	box-shadow: var(--shadow-panel);
}

.gradient-panel__map {
	position: absolute;
	right: -24%;
	top: -12%;
	width: 112%;
	max-width: none;
	opacity: 0.38;
}

.gradient-panel__eddie {
	position: absolute;
	left: 8%;
	bottom: 8%;
	width: 30%;
}

.gradient-panel__say {
	position: absolute;
	left: 36%;
	right: 8%;
	bottom: 14%;
	margin: 0;
	padding: 0.75em 1em;
	background: var(--white);
	color: var(--ink);
	border-radius: var(--r-md) var(--r-md) var(--r-md) 2px;
	font-weight: 500;
	font-size: var(--text-small);
	line-height: 1.3;
	box-shadow: var(--shadow-bubble);
}

@media (max-width: 859px) {
	.section--hero.is-panel {
		padding-block: var(--s-5);
	}

	.section--hero__inner {
		grid-template-columns: 1fr;
	}

	.gradient-panel {
		aspect-ratio: 5 / 4;
	}

	.gradient-panel__eddie {
		width: 24%;
	}

	.gradient-panel__say {
		left: 34%;
	}
}

/* Photo hero (inner pages until 3.6–3.9 restyle them): headline over a toned
   photo under a flat Nightfall scrim, beneath the floating header. */
.section--hero:not(.is-panel) {
	--heading: var(--wheat);
	--label: var(--wheat);
	--focus: var(--wheat);
	display: flex;
	align-items: flex-end;
	min-height: clamp(34rem, 70vh, 46rem);
	padding-top: calc(var(--header-h) + 6rem);
	padding-bottom: clamp(5rem, 14vh, 9rem);
	background: var(--ink);
	color: var(--white);
	overflow: hidden;
}

.section--hero__bg {
	position: absolute;
	inset: 0;
}

.section--hero.has-image::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgb(31 19 38 / 0.62); /* white body text stays 4.5:1 even over a white sky */
}

.section--hero:not(.is-panel) .section--hero__copy {
	position: relative;
	z-index: 1;
	max-width: 90rem;
}

.section--hero:not(.is-panel) h1,
.section--hero:not(.is-panel) h2 {
	font-size: var(--text-display);
	line-height: 0.98;
	max-width: 16ch;
}

.section--hero:not(.is-panel) .lede {
	max-width: 42rem;
}

/* ---------------------------------------------------------------------------
 * Stat strip (Stat Row): figures on one baseline between two hairlines. Right after a sunrise
 * hero it reads as part of the hero.
 * ------------------------------------------------------------------------ */
:where(.section--stat-row) .stat-row {
	display: grid;
	gap: var(--s-3) var(--s-4);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
	align-items: start;
	padding-block: var(--s-4);
	border-block: 1px solid var(--rule);
}

:where(.section--stat-row) .stat__value {
	font: italic 900 var(--stat-size)/1 var(--font);
	white-space: nowrap;
	color: var(--heading);
}

:where(.section--stat-row) .stat__label {
	margin-top: 0.5em;
	max-width: 24ch;
	font-weight: 500;
	color: var(--fg-muted);
}

.section--hero.is-panel + .section--stat-row {
	padding-top: 0;
}

/* ---------------------------------------------------------------------------
 * Form section
 * ------------------------------------------------------------------------ */
.section--signup__inner {
	display: grid;
	gap: var(--s-4);
	align-items: center;
}

.section--signup .section__heading {
	margin-bottom: 0.3em;
}

.section--signup__copy p {
	max-width: 36rem;
	margin: 0;
	color: var(--fg-muted);
}

.section--signup.form-email .section--signup__inner {
	grid-template-columns: 1fr;
}

@media (min-width: 900px) {
	.section--signup.form-email .section--signup__inner {
		grid-template-columns: 1.1fr 1fr;
		gap: var(--s-6);
	}
}

.section--signup.image-background {
	--heading: var(--wheat);
	--fg-muted: var(--white-78);
	--label: var(--wheat);
	--btn: var(--wheat);
	--btn-on: var(--ink);
	--focus: var(--wheat);
	--field-border: transparent;
	min-height: 36rem;
	display: flex;
	align-items: center;
	color: var(--white);
	background: var(--ink);
	overflow: hidden;
}

.section__bg-image {
	position: absolute;
	inset: 0;
}

.section--signup.image-background::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgb(31 19 38 / 0.62);
}

.section--signup.image-background .section--signup__inner {
	position: relative;
	z-index: 1;
	max-width: 42rem;
	text-align: center;
	justify-items: center;
}

.section--signup.image-background .section__heading {
	margin-inline: auto;
}

.section--signup.image-side .section--signup__inner {
	grid-template-areas: 'media' 'copy' 'form';
	max-width: 52rem;
}

.section--signup.image-side .section--signup__media {
	grid-area: media;
}

.section--signup.image-side .section--signup__copy {
	grid-area: copy;
}

.section--signup.image-side .section--signup__form {
	grid-area: form;
}

/* ---------------------------------------------------------------------------
 * Forms: white fields; outlined in Nightfall on cream and on the colour bands
 * (Nightfall on Wheat 10.5:1, on Ember 5.1:1), borderless on Nightfall.
 * ------------------------------------------------------------------------ */
.ttpm-form {
	display: grid;
	/* minmax(0, …): a wide control (the file picker) can't push the column past the form. */
	grid-template-columns: minmax(0, 1fr);
	gap: var(--s-2);
	width: 100%;
}

.ttpm-form__row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2);
}

.ttpm-form__row > .field {
	flex: 1 1 14rem;
}

.ttpm-form__row--submit {
	align-items: center;
}

.field {
	display: block;
}

.ttpm-form input[type='text'],
.ttpm-form input[type='email'],
.ttpm-form input[type='url'],
.ttpm-form textarea {
	width: 100%;
	min-height: 3.25rem;
	padding: 0.85em 1em;
	border: 1.5px solid var(--field-border);
	border-radius: var(--r-sm);
	background: var(--white);
	color: var(--ink);
	font: 500 1rem/1.4 var(--font);
}

.ttpm-form input:focus-visible,
.ttpm-form textarea:focus-visible {
	outline-offset: 1px;
}

.ttpm-form input[type='file'] {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 0.5rem;
	border: 1.5px solid var(--field-border);
	border-radius: var(--r-sm);
	background: var(--white);
	color: var(--ink-70);
	font: 500 0.95rem/1.4 var(--font);
}

/* "Choose File" as a small outlined pill, like the site's buttons. */
.ttpm-form input[type='file']::file-selector-button {
	margin-right: 0.75rem;
	padding: 0.45em 1.1em;
	border: 2px solid var(--ink);
	border-radius: var(--r-pill);
	background: transparent;
	color: var(--ink);
	font: italic 900 0.95rem/1.2 var(--font);
	cursor: pointer;
	transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.ttpm-form input[type='file']::file-selector-button:hover {
	background: var(--ink);
	color: var(--white);
}

.ttpm-form input::placeholder,
.ttpm-form textarea::placeholder {
	color: var(--ink-55);
}

.ttpm-form--coalition button {
	justify-self: start;
}

.form-msg {
	margin: 0;
	padding: 1rem 1.25rem;
	border-radius: var(--r-sm);
	font-weight: 700;
	background: var(--white);
	color: var(--ink);
}

.form-msg--error {
	margin-bottom: 1rem;
	background: #fff1ef;
	color: #8a2331;
}

.ttpm-form__privacy {
	margin: 0;
	font-size: var(--text-small);
	color: var(--fg-muted);
}

.ttpm-form__privacy a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* ---------------------------------------------------------------------------
 * Card grid
 * ------------------------------------------------------------------------ */
:where(.section--card-grid) .card-grid {
	display: grid;
	gap: var(--s-5) var(--s-5);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	margin-top: var(--s-4);
}

@media (min-width: 900px) {
	:where(.section--card-grid) .card-grid.cols-2 {
		grid-template-columns: repeat(2, 1fr);
	}

	:where(.section--card-grid) .card-grid.cols-3 {
		grid-template-columns: repeat(3, 1fr);
	}

	:where(.section--card-grid) .card-grid.cols-4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

:where(.section--card-grid) .card__title {
	font-size: var(--text-h4);
	margin-bottom: 0.5rem;
}

:where(.section--card-grid) .card p {
	font-size: 1rem;
	line-height: 1.65;
	color: var(--fg-muted);
}

:where(.section--card-grid) .card__media {
	margin-bottom: 1.25rem;
}

:where(.section--card-grid) .card__media img {
	max-height: 7rem;
	width: auto;
}

/* Boxed: Nightfall cards for white icons, with a Wheat top bar. */
:where(.section--card-grid) .card-grid.style-boxed .card {
	--heading: var(--wheat);
	--fg-muted: var(--white-78);
	--focus: var(--wheat);
	padding: 2.75rem 1.75rem 2.5rem;
	border-top: 1.25rem solid var(--wheat);
	border-radius: var(--r-md);
	background: var(--ink);
	color: var(--white);
	text-align: center;
}

:where(.section--card-grid) .card-grid.style-boxed .card__media img {
	margin-inline: auto;
	max-height: 5rem;
}

/* ---------------------------------------------------------------------------
 * Rich text
 * ------------------------------------------------------------------------ */
.section--rich-text .prose {
	font-size: var(--text-body);
	line-height: 1.75;
	color: var(--fg-muted);
}

.section--rich-text .prose strong,
.section--rich-text .prose a {
	color: var(--fg);
}

.section--rich-text .prose a {
	color: var(--link);
}

/* ---------------------------------------------------------------------------
 * List with image: big italic rows between rules, beside a toned photo.
 * ------------------------------------------------------------------------ */
.section--feature-list__inner {
	display: grid;
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
}

@media (min-width: 860px) {
	.section--feature-list.has-image .section--feature-list__inner {
		grid-template-columns: 1fr 1fr;
	}
}

.section--feature-list__media {
	aspect-ratio: 4 / 5;
}

.rule-list {
	list-style: none;
	margin: var(--s-4) 0;
	padding: 0;
	border-top: 1px solid var(--rule);
}

.rule-list li {
	padding: 0.5em 0;
	border-bottom: 1px solid var(--rule);
	font: italic 900 var(--text-h3)/1.1 var(--font);
	color: var(--heading);
}

.section--feature-list__copy > p {
	max-width: 32rem;
	color: var(--fg-muted);
}

/* ---------------------------------------------------------------------------
 * Video feature: the Nightfall theatre for Eddie's videos.
 * ------------------------------------------------------------------------ */
:where(.section--video-feature) .section--video-feature__inner {
	display: grid;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

:where(.section--video-feature) .section--video-feature__copy > p:not(.eyebrow) {
	max-width: 34rem;
	color: var(--fg-muted);
}

:where(.section--video-feature) .section--video-feature__copy .button {
	margin-top: 0.5rem;
}

@media (min-width: 900px) {
	.has-video:where(.section--video-feature) .section--video-feature__inner {
		grid-template-columns: 5fr 7fr;
	}

	.video-left:where(.section--video-feature) .video-frame {
		order: -1;
	}

	.video-left:where(.section--video-feature) .section--video-feature__inner {
		grid-template-columns: 7fr 5fr;
	}
}

.video-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--r-md);
	background: var(--royalty);
}

/* The theatre's screen: a Wheat rim, drawn over the poster and the player. */
.bg-nightfall .video-frame::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: inherit;
	box-shadow: inset 0 0 0 3px var(--wheat);
	pointer-events: none;
}

.video-frame > iframe,
.video-frame > video,
.video-frame__poster,
.video-frame__play {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.video-frame__poster {
	object-fit: cover;
}

.video-frame__play {
	display: grid;
	place-items: center;
	padding: 0;
	background: transparent;
	cursor: pointer;
}

.video-frame__play svg {
	width: clamp(3.5rem, 9vw, 4.75rem);
	height: auto;
	filter: drop-shadow(0 6px 16px rgb(31 19 38 / 0.35));
	transition: transform var(--dur-fast) var(--ease-out);
}

.video-frame__play rect {
	fill: var(--ember);
}

.video-frame__play path {
	fill: var(--white);
}

.video-frame__play:hover svg,
.video-frame__play:focus-visible svg {
	transform: scale(1.08);
}

.video-frame__play:active svg {
	transform: scale(0.96);
}

.video-frame__play:focus-visible {
	outline: 3px solid var(--wheat);
	outline-offset: -3px;
}

/* ---------------------------------------------------------------------------
 * Action buttons
 * ------------------------------------------------------------------------ */
:where(.section--action-grid) .action-grid {
	display: grid;
	gap: var(--s-5) var(--s-4);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	margin-top: var(--s-5);
}

:where(.section--action-grid) .action {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--s-3);
}

:where(.section--action-grid) .action__icon {
	width: 5.5rem;
	height: 5.5rem;
	object-fit: contain;
}

:where(.section--action-grid) .action .button {
	width: 100%;
	max-width: 17rem;
	font-size: 1rem;
	white-space: normal;
}

/* ---------------------------------------------------------------------------
 * Photo collage: a heading, then the photos in a tidy grid. No overlaps, no
 * type over the photos.
 * ------------------------------------------------------------------------ */
:where(.section--photo-collage) .photo-collage {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: var(--s-2);
	margin-top: var(--s-4);
}

:where(.section--photo-collage) .photo-collage__item {
	grid-column: span 2;
	aspect-ratio: 4 / 3;
}

:where(.section--photo-collage) .count-1 .photo-collage__item {
	grid-column: 1 / -1;
	aspect-ratio: 16 / 9;
}

:where(.section--photo-collage) .count-2 .photo-collage__item,
:where(.section--photo-collage) .count-4 .photo-collage__item,
:where(.section--photo-collage) .count-5 .photo-collage__item:nth-child(-n + 2) {
	grid-column: span 3;
}

@media (max-width: 699px) {
	:where(.section--photo-collage) .photo-collage {
		grid-template-columns: 1fr 1fr;
	}

	:where(.section--photo-collage) .photo-collage .photo-collage__item {
		grid-column: auto;
	}

	:where(.section--photo-collage) .count-1 .photo-collage__item,
	:where(.section--photo-collage) .count-3 .photo-collage__item:first-child,
	:where(.section--photo-collage) .count-5 .photo-collage__item:first-child {
		grid-column: 1 / -1;
	}
}

/* ---------------------------------------------------------------------------
 * News: photo-first cards (kept).
 * ------------------------------------------------------------------------ */
.section--news-feed__inner {
	display: grid;
	gap: var(--s-5);
}

.section--news-feed__intro p {
	max-width: 22rem;
	color: var(--fg-muted);
}

.section--news-feed .section__actions {
	justify-content: flex-start;
}

@media (min-width: 900px) {
	.section--news-feed.is-teaser .section--news-feed__inner {
		grid-template-columns: 1fr 1.5fr;
		gap: var(--s-6);
	}

	.section--news-feed.is-teaser .section--news-feed__intro {
		position: sticky;
		top: 2rem;
		align-self: start;
	}
}

/* ===== News (task 3.8) ================================================== */
.news-grid {
	display: grid;
	gap: var(--s-5) var(--s-4);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.is-teaser .news-grid {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
}

/* The card: the title link stretches over the whole card (one link, named by the title). */
.news-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.news-card__media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--r-md);
	background: var(--cream-2);
	outline: 1px solid rgb(31 19 38 / 0.08);
	outline-offset: -1px;
}

.is-teaser .news-card__media {
	aspect-ratio: 1 / 1;
}

.news-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--dur-slow) var(--ease-out);
}

.news-card:hover .news-card__media img {
	transform: scale(1.03);
}

.news-card__meta {
	margin: 0 0 0.5rem;
	font-size: var(--text-small);
	color: var(--fg-muted);
}

.news-card__title {
	font: italic 900 var(--text-h4)/1.2 var(--font);
	margin: 0;
	color: var(--heading);
}

.is-teaser .news-card__title {
	font-size: 1.125rem;
	line-height: 1.3;
}

.news-card__link {
	color: inherit;
	text-decoration: none;
}

.news-card__link::after {
	content: '';
	position: absolute;
	inset: 0;
}

.news-card:hover .news-card__link {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

.news-card:focus-within {
	outline: 3px solid var(--focus);
	outline-offset: 6px;
	border-radius: var(--r-md);
}

.news-card__link:focus-visible {
	outline: none;
}

.news-card__summary {
	margin: 0.6rem 0 0;
	color: var(--fg-muted);
	font-size: var(--text-small);
	line-height: 1.55;
}

/* No photo: a quiet Wheat-tint text card with a Nightfall rule on top, same rhythm as the photo cards. */
.news-card--no-image {
	padding: 1.5rem;
	border-top: 4px solid var(--ink);
	border-radius: 0 0 var(--r-md) var(--r-md);
	background: var(--cream-2);
}

.news-card--no-image:focus-within {
	border-radius: var(--r-md);
}

/* Lead story: photo and text side by side on wide screens. */
.news-lead {
	padding-bottom: var(--s-5);
	border-bottom: 1px solid var(--rule);
}

.news-card--lead {
	gap: var(--s-3);
}

.news-card--lead .news-card__title {
	font-size: var(--text-h3);
	line-height: 1.12;
}

.news-card--lead .news-card__summary {
	font-size: var(--text-body);
	max-width: 36rem;
}

@media (min-width: 900px) {
	.news-card--lead {
		flex-direction: row;
		align-items: center;
		gap: var(--s-5);
	}

	.news-card--lead .news-card__media {
		flex: 1.4 1 0;
		aspect-ratio: 3 / 2;
	}

	.news-card--lead .news-card__body {
		flex: 1 1 0;
	}
}

.news-card--lead.news-card--no-image {
	display: block;
}

.featured-post {
	margin-top: var(--s-5);
}

.featured-post__label {
	font-size: var(--text-h4);
	margin-bottom: 0.75rem;
}

.featured-post__link {
	display: flex;
	gap: 1rem;
	align-items: center;
	text-decoration: none;
}

.featured-post__link img {
	width: 4.5rem;
	height: 4.5rem;
	object-fit: cover;
	flex: 0 0 auto;
	border-radius: var(--r-sm);
}

.featured-post__title {
	display: block;
	font-weight: 700;
	line-height: 1.3;
}

.featured-post time {
	font-size: var(--text-small);
	color: var(--fg-muted);
}

.pagination {
	grid-column: 1 / -1;
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	font-weight: 700;
}

.pagination .page-numbers {
	padding: 0.4rem 0.8rem;
	text-decoration: none;
	border-radius: var(--r-pill);
}

.pagination .page-numbers:hover {
	background: var(--cream-2);
}

.pagination .current {
	background: var(--fg);
	color: var(--ground);
}

.pagination {
	flex-wrap: wrap;
	margin-top: var(--s-4);
}

/* ---------------------------------------------------------------------------
 * Statement
 * ------------------------------------------------------------------------ */
.section--statement__inner {
	display: grid;
	gap: var(--s-4);
}

@media (min-width: 900px) {
	.section--statement__inner {
		grid-template-columns: 1fr 1fr;
		gap: var(--s-6);
	}
}

.statement__heading {
	font-size: var(--text-h3);
	line-height: 1.05;
	margin: 0;
}

.section--statement p {
	margin: 0;
	color: var(--fg-muted);
}

/* ---------------------------------------------------------------------------
 * Partners. Logos come from the Partners list (inc/partners.php). Each is
 * sized by equal area: width = --partner-unit × --k, where k is the square
 * root of the logo's aspect ratio (clamped 0.85–2.10 in PHP), so a square
 * crest and a wide wordmark carry the same weight. --partner-unit is the one
 * knob that scales them all. The tile height derives from --logo-cap so every
 * tile is identical. No grayscale: partner logos are someone else's trademark.
 * ------------------------------------------------------------------------ */
.section--partners {
	--partner-unit: clamp(54px, 5.6vw, 78px);
	--logo-cap: clamp(56px, 6vw, 80px);
	--logo-pad: clamp(0.75rem, 1.6vw, 1.25rem);
	--tile: clamp(140px, 14vw, 172px);
}

.section--partners__header {
	max-width: 40rem;
	margin: 0 auto clamp(1.75rem, 3vw, 2.5rem);
	text-align: center;
}

.section--partners__header .section__heading {
	margin-inline: auto;
	margin-bottom: 0.35em;
}

.section--partners__intro {
	margin: 0;
	color: var(--fg-muted);
}

.section--partners__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(0.75rem, 1.6vw, 1.25rem);
}

.section--partners__item {
	flex: 0 0 var(--tile);
	display: grid;
	place-items: center;
	min-height: calc(var(--logo-cap) + var(--logo-pad) * 2);
	padding: var(--logo-pad);
	background: var(--white);
	border-radius: var(--r-sm);
	box-shadow: inset 0 0 0 1px rgb(31 19 38 / 0.1);
	transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}

.section--partners__item > a {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
}

.section--partners__item:has(> a):hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-card);
}

.section--partners__item img {
	width: calc(var(--partner-unit) * var(--k, 1));
	max-width: 100%;
	max-height: var(--logo-cap);
	height: auto;
	object-fit: contain;
}

@media (max-width: 599px) {
	/* Two tiles per row, filling the width. */
	.section--partners__item {
		flex-basis: calc(50% - clamp(0.75rem, 1.6vw, 1.25rem) / 2);
	}
}

/* Scrolling strip (task 3.13): one row, two identical lists sliding half the
 * track left so the loop is seamless. Logos sit at one height, tiles hug them.
 * Pauses on hover/focus; reduced motion gets a still row that swipes. */
.section--partners-marquee {
	--gap: clamp(0.75rem, 1.6vw, 1.25rem);
	padding-block: clamp(2rem, 4vw, 3rem);
}

.section--partners__marquee {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.section--partners__track {
	display: flex;
	width: max-content;
	/* ~3.5s per logo keeps the speed steady whatever the count. */
	animation: ttpm-marquee calc(var(--n, 10) * 3.5s) linear infinite;
}

.section--partners__marquee:hover .section--partners__track,
.section--partners__marquee:focus-within .section--partners__track {
	animation-play-state: paused;
}

.section--partners-marquee .section--partners__grid {
	flex-wrap: nowrap;
	gap: var(--gap);
	padding-right: var(--gap);
}

.section--partners-marquee .section--partners__item {
	flex: 0 0 auto;
	min-height: 0;
	height: calc(var(--logo-cap) * 0.75 + var(--logo-pad) * 2);
}

.section--partners-marquee .section--partners__item img {
	width: auto;
	height: calc(var(--logo-cap) * 0.75);
	max-width: none;
	max-height: none;
}

.section--partners-marquee .section--partners__item:has(> a):hover {
	transform: none;
}

@keyframes ttpm-marquee {
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.section--partners__marquee {
		overflow-x: auto;
		-webkit-mask-image: none;
		mask-image: none;
		scrollbar-width: thin;
	}

	.section--partners__track {
		animation: none;
	}

	.section--partners__track > [aria-hidden] {
		display: none;
	}
}

/* ---------------------------------------------------------------------------
 * Embed: the outside tool sits in a white frame, introduced in brand type.
 * ------------------------------------------------------------------------ */
.section--embed .eyebrow,
.section--embed .section__heading {
	text-align: center;
	margin-inline: auto;
}

.section--embed .lede {
	text-align: center;
	max-width: 40rem;
	margin-inline: auto;
	color: var(--fg-muted);
}

.embed-frame {
	margin-top: var(--s-4);
	background: var(--white);
	border-radius: var(--r-md);
	overflow: hidden;
	box-shadow: var(--shadow-card);
}

.embed-frame iframe {
	display: block;
	width: 100%;
	border: 0;
}

/* ---------------------------------------------------------------------------
 * RESOURCES (task 3.7): index, cards, filters, single page. Keep this block
 * together; other redesign tasks edit other blocks.
 * ------------------------------------------------------------------------ */
/* The intro above the list (a Rich Text section) starts on the same left edge as the
   filters and cards, keeping its own ~70-character line. */
.section--rich-text:has(+ .section--resource-list) > .container--narrow {
	max-width: var(--content-max);
}

.section--rich-text:has(+ .section--resource-list) .prose {
	max-width: 44rem;
}

.resource-filters {
	display: grid;
	gap: var(--s-2) var(--s-5);
	margin-bottom: var(--s-3);
}

/* Type and Topic side by side only when both rows of chips fit (1200px+); stacked below. */
@media (min-width: 1200px) {
	.resource-filters {
		grid-template-columns: auto 1fr;
	}
}

.resource-filters__group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem var(--s-2);
}

.resource-filters__label {
	margin: 0;
	min-width: 4rem;
	font-size: var(--text-label);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fg-muted);
}

.resource-filters__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Filter chip: an outlined pill that fills Nightfall when chosen. */
.chip {
	display: inline-block;
	padding: 0.4em 1em;
	border: 2px solid var(--fg);
	border-radius: var(--r-pill);
	color: var(--fg);
	font-size: var(--text-small);
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.chip:not(.is-static) {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem; /* 44px tap target */
}

.chip:hover,
.chip.is-on {
	background: var(--fg);
	color: var(--ground);
}

.chip.is-static {
	border-width: 1.5px;
	font-size: var(--text-label);
}

.resource-count {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem var(--s-3);
	align-items: baseline;
	margin: var(--s-4) 0 var(--s-3);
	padding-top: var(--s-2);
	border-top: 1px solid var(--rule);
	font-size: var(--text-small);
	color: var(--fg-muted);
}

.resource-grid {
	display: grid;
	gap: var(--s-5) var(--s-4);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}

.resource-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--white);
	border-radius: var(--r-md);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	transition: transform var(--dur-base) var(--ease-out);
}

.resource-card[hidden],
.resource-index [hidden] {
	display: none;
}

.resource-card:hover {
	transform: translateY(-3px);
}

.resource-card:focus-within {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}

.resource-card__media {
	aspect-ratio: 16 / 9;
	background: var(--cream-2);
	overflow: hidden;
}

.resource-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.resource-card__media.is-placeholder {
	display: grid;
	place-items: center;
	background: var(--royalty);
	color: var(--wheat);
}

@media (max-width: 899px) {
	.resource-card__media.is-placeholder {
		aspect-ratio: 3 / 1;
	}

	.resource-card__icon {
		width: 40px;
		height: 40px;
	}
}

.resource-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: var(--s-3);
	color: var(--ink);
}

.resource-card__meta {
	display: flex;
	flex-flow: column;
	align-items: flex-start;
	gap: 0.25rem;
	margin: 0 0 0.6rem;
	font-size: var(--text-label);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bandana);
}

.resource-card__topic,
.resource-card__flag {
	color: var(--ink-70);
}

.resource-card__flag {
	margin-bottom: 0.25rem;
	padding: 0 0.6em;
	border-radius: var(--r-pill);
	background: var(--wheat);
	color: var(--ink);
}

.resource-card__title {
	margin: 0 0 0.6rem;
	font: normal 700 1.25rem/1.25 var(--font);
	color: var(--ink);
}

.resource-card__title a {
	color: inherit;
	text-decoration: none;
}

/* The title link covers the whole card, so it's one tap target. */
.resource-card__title a::after {
	content: '';
	position: absolute;
	inset: 0;
}

.resource-card:hover .resource-card__title a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.resource-card__summary {
	margin: 0 0 var(--s-3);
	font-size: var(--text-small);
	color: var(--ink-70);
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.resource-card__foot {
	display: flex;
	justify-content: space-between;
	gap: var(--s-2);
	margin: auto 0 0;
	padding-top: var(--s-2);
	border-top: 1px solid var(--rule-on-cream);
	font-size: var(--text-small);
	color: var(--ink-70);
}

.resource-card__do {
	font-weight: 700;
	color: var(--ink);
}

@media (min-width: 900px) {
	.resource-card--featured {
		grid-column: 1 / -1;
		flex-direction: row;
		background: var(--ink);
		box-shadow: var(--shadow-panel);
	}

	.resource-card--featured .resource-card__media {
		flex: 0 0 42%;
		aspect-ratio: auto;
		min-height: 16rem;
	}

	.resource-card--featured .resource-card__body {
		justify-content: center;
		padding: var(--s-5);
		color: var(--white-78);
	}

	.resource-card--featured .resource-card__title {
		font: italic 900 var(--text-h3)/1.1 var(--font);
		color: var(--white);
	}

	.resource-card--featured .resource-card__title a {
		color: var(--white);
	}

	.resource-card--featured .resource-card__meta {
		flex-flow: row wrap;
		gap: 0.25rem 0.75rem;
		color: var(--wheat);
	}

	.resource-card--featured .resource-card__topic {
		color: var(--white-78);
	}

	.resource-card--featured .resource-card__summary {
		font-size: var(--text-body);
		color: var(--white-78);
		-webkit-line-clamp: 6;
	}

	.resource-card--featured .resource-card__foot {
		justify-content: flex-start;
		gap: var(--s-4);
		margin-top: var(--s-3);
		border-color: var(--rule-on-ink);
		color: var(--white-58);
	}

	.resource-card--featured .resource-card__do {
		color: var(--wheat);
	}
}

@media (max-width: 899px) {
	.resource-card--featured {
		border-top: 6px solid var(--wheat);
	}
}

.resource-none {
	margin-top: var(--s-4);
}

/* Single resource */
.single-resource__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.single-resource__meta time {
	margin-left: 0.5rem;
}

.single-resource__summary {
	margin: 0 0 var(--s-4);
	color: var(--ink-70);
}

.single-resource__action {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--s-2) var(--s-3);
	margin: 0 0 var(--s-5);
}

.single-resource__note {
	font-size: var(--text-small);
	color: var(--ink-70);
}

.single-resource .video-frame {
	margin-bottom: var(--s-5);
}

.external-icon {
	flex: 0 0 auto;
}

.related-resources .section__heading {
	margin-bottom: var(--s-4);
}

.section--related-resources .section__actions {
	justify-content: flex-start;
}

/* ---------------------------------------------------------------------------
 * FAQ
 * ------------------------------------------------------------------------ */
:where(.section--faq) .faq-list {
	border-top: 1px solid var(--rule);
}

:where(.section--faq) .faq-item {
	border-bottom: 1px solid var(--rule);
	padding: 1.25rem 0;
}

:where(.section--faq) .faq-item summary {
	cursor: pointer;
	font: italic 900 var(--text-h4)/1.25 var(--font);
	color: var(--heading);
}

:where(.section--faq) .faq-item .prose {
	margin-top: var(--s-2);
	color: var(--fg-muted);
}

/* ---------------------------------------------------------------------------
 * Single post / resource
 * ------------------------------------------------------------------------ */
/* One centered axis. The text and story links sit in the reading column (47ch ≈ 70
   characters of Halyard at 18px); on large screens the header, photo and video widen
   evenly on both sides of it (below), so the title doesn't stack five lines deep. */
.container--article {
	max-width: calc(47ch + 2 * var(--gutter));
}

.single-post__title {
	font-size: var(--text-h2);
	line-height: 1.05;
	text-wrap: balance;
}

.single-post__meta {
	font-size: var(--text-small);
	color: var(--fg-muted);
	margin-bottom: var(--s-4);
}

.single-post__image {
	margin: 0 0 var(--s-5);
}

.single-post__image img {
	width: 100%;
	height: auto;
	border-radius: var(--r-md);
}

/* Reading column: about 65-70 characters a line (Halyard runs narrow, so 47ch of the
   "0" width, not 65ch). Video, photos and tables use the full article width. */
.single-post .prose {
	font-size: var(--text-body);
	line-height: 1.75;
}

.single-post .prose > :where(p, ul, ol, blockquote, h2, h3, h4, hr, pre) {
	max-width: 47ch;
}

@media (min-width: 1100px) {
	.single-post__header,
	.single-post__image,
	.single-post .prose > :where(figure, .video-frame, .wp-block-embed, .wp-block-image, .wp-block-video, table, iframe) {
		margin-inline: calc(-1 * var(--s-8));
		max-width: none;
		width: calc(100% + 2 * var(--s-8));
	}
}

.single-post .section__actions {
	justify-content: flex-start;
}

.single-post .section__actions .button {
	white-space: normal;
	text-align: left;
}

/* Post content: quotes, lists, figures, embeds. */
.prose blockquote {
	margin: var(--s-4) 0;
	padding: 0.25em 0 0.25em 1.5rem;
	border-left: 4px solid var(--ember);
	font: italic 900 var(--text-h4)/1.3 var(--font);
	color: var(--heading);
}

.prose blockquote p {
	margin: 0;
}

.prose blockquote > * + * {
	margin-top: 0.75em;
}

.prose blockquote cite,
.prose blockquote footer {
	display: block;
	font: normal 700 var(--text-small)/1.4 var(--font);
	color: var(--fg-muted);
}

.prose ul,
.prose ol {
	padding-left: 1.4em;
}

.prose li + li {
	margin-top: 0.5em;
}

.prose li::marker {
	color: var(--bandana);
	font-weight: 700;
}

.prose figure {
	margin-inline: 0;
}

.prose figcaption {
	margin-top: 0.6rem;
	font-size: var(--text-small);
	color: var(--fg-muted);
}

.prose img {
	max-width: 100%;
	height: auto;
}

.prose .video-frame,
.prose .wp-block-embed,
.prose .wp-block-image {
	margin-block: var(--s-4);
}

.prose hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin-block: var(--s-5);
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--text-small);
}

.prose th,
.prose td {
	padding: 0.6em 0.8em;
	border-bottom: 1px solid var(--rule);
	text-align: left;
}

/* Earlier / later story. */
.post-nav {
	display: grid;
	gap: var(--s-3);
	margin-top: var(--s-6);
	padding-top: var(--s-4);
	border-top: 1px solid var(--rule);
}

@media (min-width: 700px) {
	.post-nav {
		grid-template-columns: 1fr 1fr;
		gap: var(--s-5);
	}

	.post-nav__link--next {
		grid-column: 2;
		text-align: right;
	}
}

.post-nav__link {
	display: block;
	text-decoration: none;
	color: var(--fg);
}

.post-nav__label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: var(--text-label);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--label);
}

.post-nav__title {
	display: block;
	font: italic 900 var(--text-h4)/1.25 var(--font);
}

.post-nav__link:hover .post-nav__title {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.single-more {
	padding-top: 0;
}

.single-more__heading {
	font-size: var(--text-h3);
	margin-bottom: var(--s-4);
}

/* The end-of-post band is the Take Action Band (inc/action.php, task 3.9 block). */
/* ===== end News (task 3.8) ============================================== */

/* ---------------------------------------------------------------------------
 * Footer: Nightfall. Logo, about line, contact and social; the "Footer" menu as
 * columns; the email signup; Eddie's slot (task 4.11 animates him into the
 * bolt); then the copyright and legal links.
 * ------------------------------------------------------------------------ */
.site-footer {
	--heading: var(--wheat);
	--fg-muted: var(--white-78);
	--link: var(--wheat);
	--focus: var(--wheat);
	--btn: var(--wheat);
	--btn-on: var(--ink);
	--field-border: transparent;
	background: var(--ink);
	color: var(--white);
	padding-top: var(--pad-action);
}

.site-footer__main {
	display: grid;
	gap: var(--s-5);
	grid-template-areas: 'brand' 'nav' 'signup' 'eddie';
	padding-bottom: var(--s-6);
}

.site-footer__brand { grid-area: brand; }
.site-footer__nav { grid-area: nav; }
.site-footer__signup { grid-area: signup; }
.site-footer__eddie { grid-area: eddie; }

@media (min-width: 768px) {
	.site-footer__main {
		grid-template-columns: 1fr 1fr;
		grid-template-areas: 'brand signup' 'nav eddie';
		column-gap: var(--s-6);
	}
}

@media (min-width: 1200px) {
	.site-footer__main {
		grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1.3fr) 6rem;
		grid-template-areas: 'brand nav signup eddie';
		column-gap: var(--s-5);
	}
}

.site-footer__logo {
	display: inline-block;
	margin-bottom: var(--s-3);
	color: var(--white);
	text-decoration: none;
}

.site-footer__logo img {
	width: 9.25rem; /* 148px */
}

.site-footer__about {
	max-width: 38ch;
	margin: 0 0 var(--s-3);
	color: var(--white-78);
	font-size: var(--text-small);
	line-height: 1.6;
}

.site-footer__contact {
	list-style: none;
	margin: 0 0 var(--s-3);
	padding: 0;
	font-size: var(--text-small);
}

.site-footer__contact a {
	color: var(--link);
	font-weight: 500;
}

.social-links--footer {
	color: var(--white);
	margin-left: -0.25rem;
}

/* Footer menu: top-level items are column headings, their children the links. */
.menu--footer {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-4) var(--s-5);
}

.menu--footer > li {
	min-width: 9rem;
}

.menu--footer .menu__heading,
.menu--footer > .menu-item-has-children > a {
	display: block;
	margin-bottom: var(--s-2);
	color: var(--wheat);
	font: 700 var(--text-label)/1.2 var(--font);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
}

.menu--footer .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}

.menu--footer a {
	color: var(--white-78);
	font-weight: 500;
	font-size: var(--text-small);
	text-decoration: none;
	transition: color var(--dur-fast) var(--ease-out);
}

.menu--footer .sub-menu .menu__text {
	color: var(--white-78);
	font-weight: 500;
	font-size: var(--text-small);
}

.menu--footer a:hover,
.menu--footer .current-menu-item > a {
	color: var(--wheat);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.site-footer__heading {
	font-size: var(--text-h3);
	margin-bottom: 0.5rem;
}

.site-footer__signup p {
	font-size: var(--text-small);
	max-width: 32rem;
	color: var(--fg-muted);
}

.site-footer .ttpm-form {
	max-width: 30rem;
	margin-top: var(--s-3);
}

/* Eddie's slot: a static Eddie until task 4.11 animates him into the bolt. */
.site-footer__eddie {
	display: flex;
	align-items: flex-start;
}

/* Footer Eddie (4.11): a button that spins Eddie into a lightning bolt and back.
   Both frames are stacked in one 6rem box (no layout shift); only transform and
   opacity animate. aria-pressed="true" = bolt. */
.eddie-button {
	display: block;
	width: 6rem;
	height: 6rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: inherit;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
}

.eddie-button__art {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	/* A little wind-up and overshoot so the spin feels thrown, not tweened. */
	transition: transform 800ms cubic-bezier(0.5, -0.2, 0.2, 1.2);
}

.eddie-button__art img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	/* Cross-fade at the fastest point of the spin, where the swap reads as motion. */
	transition: opacity 180ms ease 260ms;
}

.eddie-button__bolt { opacity: 0; }

.eddie-button[aria-pressed="true"] .eddie-button__art { transform: rotate(360deg); }
.eddie-button[aria-pressed="true"] .eddie-button__eddie { opacity: 0; }
.eddie-button[aria-pressed="true"] .eddie-button__bolt { opacity: 1; }

@media (hover: hover) {
	.eddie-button:hover { transform: rotate(-8deg) scale(1.04); }
}

.eddie-button:active { transform: scale(0.96); }

@media (prefers-reduced-motion: reduce) {
	.eddie-button,
	.eddie-button__art,
	.eddie-button__art img { transition: none; }
	.eddie-button[aria-pressed="true"] .eddie-button__art,
	.eddie-button:hover,
	.eddie-button:active { transform: none; }
}

@media (min-width: 768px) {
	.site-footer__eddie {
		justify-content: flex-end;
	}
}

.site-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.75rem var(--s-4);
	padding-block: var(--s-3);
	border-top: 1px solid var(--rule-on-ink);
	font-size: 0.85rem;
	color: var(--white-78);
}

.site-footer__legal-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem var(--s-3);
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer__legal a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.site-footer__legal a:hover {
	color: var(--wheat);
}

/* ===========================================================================
 * TASK 3.9: TAKE ACTION, SIGN UP, JOIN THE COALITION, LEGISLATIVE PRIORITIES
 * Take Action Band, How It Works (steps), Action List, Priorities, the
 * single-purpose form pages and form status messages. Labeled block: keep
 * other tasks' CSS out of it.
 * ======================================================================== */

/* Take Action Band: the ask on the left, one button on the right. */
.action-band {
	display: grid;
	gap: var(--s-4);
	align-items: center;
}

.action-band__copy .section__heading {
	margin-bottom: 0.3em;
}

.action-band__copy .lede {
	margin: 0;
	max-width: 36rem;
}

/* One button usually; the end-of-post band can have two. */
.action-band__action {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2);
}

@media (min-width: 900px) {
	.action-band {
		grid-template-columns: 1fr auto;
		gap: var(--s-7);
	}
}

/* How It Works: numbered steps under a hairline. */
.section--steps__head {
	margin-bottom: var(--s-5);
}

.section--steps__head .lede {
	margin: 0;
	color: var(--fg-muted);
}

.steps {
	display: grid;
	gap: var(--s-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 800px) {
	.steps--2 { grid-template-columns: repeat(2, 1fr); }
	.steps--3 { grid-template-columns: repeat(3, 1fr); }
	.steps--4 { grid-template-columns: repeat(4, 1fr); }
	.steps { gap: var(--s-5); }
}

.steps__item {
	padding-top: var(--s-3);
	border-top: 2px solid var(--fg);
}

.steps__num {
	display: block;
	font: italic 900 var(--text-h2) / 1 var(--font);
	color: var(--heading);
}

.steps__title {
	margin: var(--s-2) 0 var(--s-1);
	font: italic 900 var(--text-h4) / 1.2 var(--font);
	color: var(--heading);
}

.steps__item p {
	margin: 0;
	color: var(--fg-muted);
}

/* Action List: one hairline row per action page, the whole row is the link. */
.action-list {
	margin: var(--s-4) 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--rule);
}

.action-list__item {
	border-bottom: 1px solid var(--rule);
}

.action-list__link {
	display: grid;
	gap: 0.25rem var(--s-4);
	padding: var(--s-3) 0;
	color: var(--fg);
	text-decoration: none;
}

.action-list__title {
	font: italic 900 var(--text-h4) / 1.25 var(--font);
	color: var(--heading);
}

.action-list__text {
	color: var(--fg-muted);
}

.action-list__go {
	font-weight: 700;
	color: var(--link);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.25em;
}

.action-list__link:hover .action-list__go,
.action-list__link:focus-visible .action-list__go {
	text-decoration-thickness: 4px;
}

@media (min-width: 800px) {
	.action-list__link {
		grid-template-columns: 1fr auto;
		align-items: center;
	}

	.action-list__title,
	.action-list__text {
		grid-column: 1;
	}

	.action-list__go {
		grid-column: 2;
		grid-row: 1 / span 2;
	}
}

/* Priorities: big numerals beside the title and detail. */
.section--priorities .lede {
	margin: 0;
	color: var(--fg-muted);
}

.priorities {
	margin: var(--s-5) 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--rule);
}

.priorities__item {
	display: grid;
	grid-template-columns: 3.5rem 1fr;
	gap: var(--s-2);
	padding: var(--s-4) 0;
	border-bottom: 1px solid var(--rule);
}

.priorities__num {
	font: italic 900 var(--text-h3) / 1 var(--font);
	color: var(--heading);
}

.priorities__title {
	margin: 0 0 var(--s-1);
	font: italic 900 var(--text-h4) / 1.25 var(--font);
	color: var(--heading);
}

.priorities__body p {
	max-width: 46rem;
	margin: 0 0 var(--s-2);
	color: var(--fg-muted);
}

@media (min-width: 800px) {
	.priorities__item {
		grid-template-columns: 6rem 1fr;
		gap: var(--s-3);
	}

	.priorities__num {
		font-size: var(--text-h2);
	}
}

.priorities__empty {
	margin: var(--s-4) 0 0;
	padding: var(--s-4);
	border: 2px dashed var(--rule);
	border-radius: var(--r-md);
	color: var(--fg-muted);
	font-size: var(--text-h4);
	font-weight: 500;
	line-height: 1.4;
}

/* The page's second Priorities section sits close under the first when they share a ground. */
.section--priorities.bg-cream + .section--priorities.bg-cream {
	padding-top: 0;
}

/* Take Action page: the Quorum frame. Quorum's own form can't be restyled from outside
   its iframe; the frame, its heading, and the phone fit are ours. */
.section--embed .embed-frame {
	max-width: 44rem;
	margin-inline: auto;
}

@media (max-width: 599px) {
	.section--embed .container {
		padding-inline: 0.5rem;
	}

	.section--embed .eyebrow,
	.section--embed .section__heading,
	.section--embed .lede {
		padding-inline: calc(var(--gutter, 1rem) - 0.5rem);
	}

	.embed-frame {
		border-radius: var(--r-sm);
	}
}

/* Single-purpose form pages (Sign Up, Join the Coalition): copy on the left,
   one form panel on the right. The footer and the homepage email band are unchanged. */
.section--signup.form-name-email .section--signup__inner,
.section--signup.form-coalition .section--signup__inner {
	max-width: none;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: 'copy' 'form' 'media';
	align-items: start;
	gap: var(--s-4);
}

.section--signup.form-name-email .section--signup__copy,
.section--signup.form-coalition .section--signup__copy {
	grid-area: copy;
}

.section--signup.form-name-email .section--signup__form,
.section--signup.form-coalition .section--signup__form {
	grid-area: form;
	padding: var(--s-4);
	border-radius: var(--r-md);
	background: var(--cream-2);
}

.section--signup.form-name-email .section--signup__media,
.section--signup.form-coalition .section--signup__media {
	grid-area: media;
	margin: 0;
}

.section--signup.form-name-email .section--signup__copy p:not(.eyebrow),
.section--signup.form-coalition .section--signup__copy p:not(.eyebrow) {
	font-size: var(--text-h4);
	font-weight: 500;
	line-height: 1.4;
}

@media (min-width: 900px) {
	.section--signup.form-name-email .section--signup__inner,
	.section--signup.form-coalition .section--signup__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
		grid-template-areas: 'copy form' 'media form';
		gap: var(--s-4) var(--s-7);
		align-items: start;
	}

	.section--signup.form-name-email .section--signup__form,
	.section--signup.form-coalition .section--signup__form {
		padding: var(--s-5);
	}
}

/* Visible labels on the stand-alone forms (the compact email form keeps its hint-only look). */
.section--signup.form-name-email .field__label {
	position: static !important;
	width: auto;
	height: auto;
	margin: 0 0 0.35rem;
	overflow: visible;
	clip: auto;
	white-space: normal;
}

.section--signup.form-name-email .field__label,
.section--signup.form-coalition .field__label {
	display: block;
	font-weight: 700;
	font-size: var(--text-small);
	color: var(--fg);
}

.section--signup.form-name-email .field__label em,
.section--signup.form-coalition .field__label em {
	font-weight: 500;
	font-style: normal;
	color: var(--fg-muted);
}

.section--signup.form-name-email .ttpm-form,
.section--signup.form-coalition .ttpm-form {
	gap: var(--s-3);
}

.section--signup.form-name-email .ttpm-form__row--submit {
	align-items: end;
}

.ttpm-form input[type='file'] {
	max-width: 100%;
}

/* Field errors: a heavier Bandana-red border once the visitor has touched the field. */
.ttpm-form input:user-invalid,
.ttpm-form textarea:user-invalid {
	border: 2px solid #8a2331;
}

/* Form status (thank-you and error): a clear block that takes focus after submit. */
.form-msg {
	font-size: var(--text-h4);
	font-weight: 500;
	line-height: 1.35;
	border-left: 6px solid var(--ink);
}

.form-msg--error {
	border-left-color: #8a2331;
}

.form-msg:focus {
	outline: none;
}

.form-msg:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}

/* ===========================================================================
 * HOMEPAGE (task 3.6): hero actions, Solution Moves. Other tasks: keep out.
 * ======================================================================== */

/* Hero: button plus the quieter "Watch Eddie explain" play link. */
.hero-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--s-2) var(--s-4);
}

.play-link {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
}

.play-link:hover,
.play-link:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.play-link small {
	font-weight: 300;
	color: var(--fg-muted);
}

.play-link__icon {
	width: 2.2em;
	height: 2.2em;
	flex: none;
}

/* Solution Moves: big italic names on hairlines, one line beside each. */
.moves {
	list-style: none;
	margin: var(--s-5) 0 0;
	padding: 0;
	border-top: 1px solid var(--rule);
}

.moves li {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--s-4);
	align-items: center;
	padding: var(--s-3) 0;
	border-bottom: 1px solid var(--rule);
}

.moves__name {
	font: italic 900 var(--text-h3)/1 var(--font);
	color: var(--heading);
	text-decoration: none;
}

.moves__name::after {
	content: " \2192";
	font-style: normal;
	font-size: 0.6em;
	vertical-align: 0.15em;
}

.moves__name:hover,
.moves__name:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

/* A move whose page isn't built yet: the name without the arrow. Another website: the arrow-out icon instead. */
.moves__name.is-text::after,
.moves__name.is-external::after {
	content: none;
}

.moves__name.is-text:hover {
	text-decoration: none;
}

.moves__name .menu__external {
	width: 0.45em;
	height: 0.45em;
	margin-left: 0.25em;
	vertical-align: 0.2em;
}

.moves__text {
	max-width: 34ch;
	font-weight: 500;
}

@media (max-width: 719px) {
	.moves li {
		grid-template-columns: 1fr;
		gap: var(--s-1);
	}
}

/* Stat strip under the sunrise hero: three figures don't fit one row on tablets. */
@media (max-width: 899px) {
	.section--hero.is-panel + .section--stat-row .stat-row {
		grid-template-columns: 1fr;
	}
}

/* ---------------------------------------------------------------------------
 * Solutions (4.3): Solutions Hero, Problem and Solution, Legislation.
 * A Solutions page also reuses Video Feature, Take Action Band and Related Resources.
 * ------------------------------------------------------------------------ */
.section--solutions-hero__inner {
	display: grid;
	gap: var(--s-5);
	align-items: center;
}

.section--solutions-hero.has-image .section--solutions-hero__inner {
	grid-template-columns: 1fr;
}

.section--solutions-hero .crumb {
	margin: 0 0 var(--s-3);
	font-weight: 700;
	font-size: var(--text-label);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fg-muted);
}

.section--solutions-hero h1,
.section--solutions-hero h2 {
	max-width: 18ch;
	margin: 0 0 var(--s-3);
}

.section--solutions-hero .lede {
	max-width: 46ch;
	margin: 0 0 var(--s-4);
}

.section--solutions-hero__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--r-md);
}

@media (min-width: 900px) {
	.section--solutions-hero.has-image .section--solutions-hero__inner {
		grid-template-columns: 7fr 5fr;
		gap: var(--s-6);
	}
}

/* Solutions hero video: a 16:9 click-to-load YouTube player beside the copy,
   on the sunrise panel's card (radius + panel shadow); below the intro on phones. */
.section--solutions-hero.has-video .section--solutions-hero__inner {
	grid-template-columns: minmax(0, 1fr);
}

.section--solutions-hero__video .video-frame {
	box-shadow: var(--shadow-panel);
}

@media (min-width: 900px) {
	.section--solutions-hero.has-video .section--solutions-hero__inner {
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		gap: var(--s-6);
	}
}

.problem-solution__sides {
	display: grid;
	gap: var(--s-5);
}

.problem-solution__side p {
	max-width: 46ch;
	margin: 0;
}

.problem-solution__side .section__heading {
	margin-bottom: var(--s-2);
}

/* The solution side is the answer: a rule above it on phones, between the two on desktop. */
.problem-solution__side.is-solution:not(:first-child) {
	padding-top: var(--s-4);
	border-top: 1px solid var(--rule);
}

@media (min-width: 800px) {
	.has-two .problem-solution__sides {
		grid-template-columns: 1fr 1fr;
		gap: var(--s-6);
	}

	.problem-solution__side.is-solution:not(:first-child) {
		padding: 0 0 0 var(--s-6);
		border-top: 0;
		border-left: 1px solid var(--rule);
	}
}

.problem-solution__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	gap: var(--s-4);
	margin: var(--s-5) 0 0;
	padding-top: var(--s-4);
	border-top: 1px solid var(--rule);
}

.problem-solution__stats > div {
	display: flex;
	flex-direction: column-reverse;
	gap: var(--s-1);
}

.problem-solution__stats dd {
	margin: 0;
	font: italic 900 var(--text-h2) / 1 var(--font);
	color: var(--heading);
}

.problem-solution__stats dt {
	font-weight: 500;
}

.section--legislation .lede {
	max-width: 46ch;
	margin: 0;
	color: var(--fg-muted);
}

.bills {
	margin: var(--s-5) 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--rule);
}

.bill {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--s-1) var(--s-4);
	align-items: start;
	padding: var(--s-3) 0;
	border-bottom: 1px solid var(--rule);
}

.bill__number {
	font: italic 900 var(--text-h4) / 1.25 var(--font);
	color: var(--heading);
}

.bill__body {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.bill__title {
	font-weight: 700;
	color: var(--heading);
}

a.bill__title {
	text-underline-offset: 0.15em;
}

.bill__summary {
	max-width: 52ch;
	color: var(--fg-muted);
}

.bill-status {
	justify-self: start;
	padding: 0.3em 0.9em;
	border: 2px solid var(--ink);
	border-radius: 999px;
	font-weight: 700;
	font-size: var(--text-label);
	line-height: 1.3;
	white-space: nowrap;
	color: var(--ink);
}

/* Settled bills fill Nightfall; open ones stay outlined. */
.bill-status--passed,
.bill-status--signed {
	background: var(--ink);
	color: var(--white);
}

.bg-dark .bill-status {
	border-color: var(--wheat);
	color: var(--wheat);
}

@media (min-width: 800px) {
	.bill {
		grid-template-columns: 8rem 1fr auto;
	}

	.bill-status {
		justify-self: end;
	}
}

.bills__empty {
	margin: var(--s-4) 0 0;
	padding: var(--s-4);
	border: 2px dashed var(--rule);
	border-radius: var(--r-md);
	color: var(--fg-muted);
	font-size: var(--text-h4);
	font-weight: 500;
	line-height: 1.4;
}

/* ---------------------------------------------------------------------------
 * Eddie welcome (4.9): template-parts/welcome.php, shown by site.js.
 * Eddie rolls in from the right along the bottom of the window (the bottom edge is
 * his ground), hops, then his speech bubble pops up. Closing rolls him back out.
 * The roll's turn matches its distance: the ball is ≈ 81% of the art box, so a 7rem
 * Eddie covers ~285px a turn (26rem ≈ 1.5 turns); a 5rem one ~204px (20rem ≈ 1.6).
 * ------------------------------------------------------------------------ */
.welcome {
	--eddie: 7rem;
	--roll-from: 26rem;
	--roll-turn: 525deg;
	position: fixed;
	z-index: 90;
	right: var(--s-4);
	bottom: 0;
	width: min(21rem, calc(100vw - 2 * var(--s-2)));
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	pointer-events: none; /* only the bubble and Eddie take clicks */
}
.welcome[hidden] { display: none; }

.welcome__eddie {
	width: var(--eddie);
	/* The art has a little air under his feet: sit him on the ground. */
	margin-bottom: calc(var(--eddie) * -0.09);
	transform: translateX(var(--roll-from)) rotate(var(--roll-turn));
	pointer-events: auto;
}
.welcome__hop { transform-origin: 50% 91%; }
.welcome__eddie img {
	display: block;
	width: 100%;
	height: auto;
	/* A thin outline in his pupil colour, so he reads on any section, even Wheat. */
	filter: drop-shadow(1.5px 0 0 var(--royalty)) drop-shadow(-1.5px 0 0 var(--royalty)) drop-shadow(0 1.5px 0 var(--royalty)) drop-shadow(0 -1.5px 0 var(--royalty));
}

.welcome__bubble {
	position: relative;
	margin: 0 calc(var(--eddie) * 0.55) var(--s-1) 0;
	padding: var(--s-2) 3rem var(--s-2) var(--s-3);
	background: var(--white);
	color: var(--ink);
	border-radius: var(--r-md) var(--r-md) 2px var(--r-md);
	box-shadow: var(--shadow-bubble);
	opacity: 0;
	transform: scale(0.6);
	transform-origin: 100% 100%;
	pointer-events: auto;
}
/* Tail, pointing down at Eddie. */
.welcome__bubble::after {
	content: '';
	position: absolute;
	right: -1px;
	bottom: -0.6rem;
	border-style: solid;
	border-width: 0.65rem 0.9rem 0 0;
	border-color: var(--white) transparent transparent transparent;
}
.welcome__say { margin: 0; font-size: var(--text-body); font-weight: 600; line-height: 1.3; }
.welcome__message { margin: 0.35rem 0 0; font-size: var(--text-small); color: var(--ink-70); }
.welcome__actions { margin-top: var(--s-2); display: flex; flex-wrap: wrap; gap: var(--s-1); }
.welcome__close {
	position: absolute;
	top: 0.25rem;
	right: 0.25rem;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: var(--r-pill);
	background: none;
	color: var(--ink-70);
	cursor: pointer;
}
.welcome__close:hover { color: var(--ink); background: var(--cream-2); }

/* In: roll, land with a hop and a squash, then the bubble. */
.welcome.is-open .welcome__eddie { animation: welcome-roll-in 0.95s cubic-bezier(0.22, 0.75, 0.3, 1) both; }
.welcome.is-open .welcome__hop { animation: welcome-hop 0.6s ease-out 0.9s both; }
.welcome.is-open .welcome__bubble {
	opacity: 1;
	transform: none;
	transition: opacity 0.2s ease 1.4s, transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1) 1.4s;
}
/* Out: bubble first, then he rolls away. */
.welcome.is-leaving .welcome__bubble { opacity: 0; transform: scale(0.8); transition: opacity 0.15s ease, transform 0.15s ease; }
.welcome.is-leaving .welcome__eddie { animation: welcome-roll-out 0.6s cubic-bezier(0.5, 0, 0.75, 0.4) 0.1s both; }
.welcome.is-leaving .welcome__hop { animation: none; }

@keyframes welcome-roll-in {
	from { transform: translateX(var(--roll-from)) rotate(var(--roll-turn)); }
	to { transform: none; }
}
@keyframes welcome-roll-out {
	from { transform: none; }
	to { transform: translateX(var(--roll-from)) rotate(var(--roll-turn)); }
}
@keyframes welcome-hop {
	0% { transform: scale(1.1, 0.88); }
	35% { transform: translateY(-34%) scale(0.95, 1.06); }
	65% { transform: scale(1.08, 0.92); }
	82% { transform: translateY(-7%); }
	100% { transform: none; }
}

@media (max-width: 599px) {
	.welcome {
		--eddie: 5rem;
		--roll-from: 20rem;
		--roll-turn: 565deg;
		right: var(--s-2);
	}
	.welcome__bubble { padding: var(--s-2) 2.75rem var(--s-2) var(--s-2); }
}

/* Reduced motion: no rolling or hopping; Eddie and his bubble simply appear. */
@media (prefers-reduced-motion: reduce) {
	.welcome__eddie,
	.welcome.is-open .welcome__eddie,
	.welcome.is-leaving .welcome__eddie { animation: none; transform: none; opacity: 0; transition: opacity 0.2s; }
	.welcome.is-open .welcome__eddie { opacity: 1; }
	.welcome.is-leaving .welcome__eddie { opacity: 0; }
	.welcome.is-open .welcome__hop { animation: none; }
	.welcome__bubble,
	.welcome.is-open .welcome__bubble,
	.welcome.is-leaving .welcome__bubble { transform: none; transition: opacity 0.2s; }
}

/* ---------------------------------------------------------------------------
 * Eddie's Ride: Eddie's videos as one trip across Texas
 * (template-parts/sections/eddie-ride.php, assets/js/site.js "Eddie's Ride").
 * The map stays pinned while the stops scroll past it; the script sets
 * data-stop (1…n) and data-road (dirt | hwy) on the section. Without the script,
 * or with reduced motion, the markup's finished map shows (last stop, highway).
 * ------------------------------------------------------------------------ */
.section--eddie-ride .ride__intro .section__heading {
	max-width: 22ch;
}

.ride__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: var(--s-6);
	align-items: start;
}

.ride__stage {
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100svh;
	display: grid;
	place-items: center;
}

.ride__map {
	width: 100%;
	max-width: 600px;
	overflow: visible;
}

.ride__stops {
	margin: 0;
	padding: 18vh 0 14vh;
	list-style: none;
}

.ride__stop {
	min-height: 92vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	opacity: 0.35;
	transition: opacity 400ms var(--ease-out);
}

.ride__stop.is-on,
.ride:not([data-ride-live]) .ride__stop {
	opacity: 1;
}

.ride__stop-label {
	margin: 0 0 var(--s-1);
	font-weight: 700;
	font-size: var(--text-label);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wheat);
}

.ride__stop-heading {
	margin: 0 0 var(--s-2);
	font-size: var(--text-h3);
	line-height: 1.05;
}

.ride__stop-text {
	margin: 0;
	max-width: 40ch;
	color: var(--white-78);
}

/* The video card: a title card with Eddie as the play button. */
.ride__screen {
	margin-top: var(--s-4);
}

.ride__screen-poster {
	opacity: 0.38;
	filter: saturate(0.6);
}

.ride__screen::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(to top, rgb(31 19 38 / 0.85), rgb(31 19 38 / 0.1) 60%);
	pointer-events: none;
}

.ride__screen-title {
	position: absolute;
	z-index: 1;
	left: var(--s-3);
	right: 38%;
	bottom: var(--s-3);
	margin: 0;
	font-style: italic;
	font-weight: 900;
	font-size: var(--text-h4);
	line-height: 1.05;
	color: var(--white);
}

.ride__screen-title span {
	display: block;
	margin-bottom: 0.35rem;
	font-style: normal;
	font-weight: 700;
	font-size: var(--text-label);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wheat);
}

.video-frame__play.ride__play {
	z-index: 1;
	place-items: end;
	padding: var(--s-2) var(--s-3);
}

.ride__play img {
	width: clamp(4.5rem, 8vw, 6rem);
	height: auto;
	transition: transform 160ms var(--ease-out);
}

.ride__play:hover img,
.ride__play:focus-visible img {
	transform: scale(1.08) rotate(-6deg);
}

/* The map */
.ride__outline {
	fill: none;
	stroke: var(--wheat);
	stroke-opacity: 0.5;
	stroke-width: 2.4;
	stroke-linejoin: round;
}

.ride__place {
	font-family: var(--font);
	font-weight: 700;
	font-size: 7.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	fill: var(--white-58);
}

.ride__pin {
	fill: var(--ink);
	stroke: var(--wheat);
	stroke-width: 1.6;
	transition: fill 300ms;
}

.ride__pin-num {
	font-family: var(--font);
	font-weight: 900;
	font-style: italic;
	font-size: 7px;
	fill: var(--wheat);
	text-anchor: middle;
	transition: fill 300ms;
}

.ride__pin.is-on {
	fill: var(--wheat);
}

.ride__pin-num.is-on {
	fill: var(--ink);
}

/* Second stop: the bumpy dirt road becomes a multi-lane highway. */
.ride__dirt {
	fill: none;
	stroke: var(--bandana);
	stroke-width: 4;
	stroke-linecap: round;
	stroke-dasharray: 1 4 7 3 2 5;
	transition: opacity 500ms;
}

.ride__hwy {
	opacity: 0;
	transition: opacity 500ms;
}

.ride__hwy-bed {
	fill: none;
	stroke: url(#ride-gradient);
	stroke-width: 11;
	stroke-linecap: round;
}

.ride__hwy-lane {
	fill: none;
	stroke: var(--ink);
	stroke-width: 1.2;
	stroke-dasharray: 4 4;
}

.ride[data-road='hwy'] .ride__hwy {
	opacity: 1;
}

.ride[data-road='hwy'] .ride__dirt {
	opacity: 0.25;
}

/* Last stop: the cities light up. */
.ride__city {
	fill: var(--royalty);
	stroke: var(--wheat);
	stroke-opacity: 0.5;
	stroke-width: 1.4;
	transition: fill 500ms, stroke-opacity 500ms;
}

.ride__city-ring {
	fill: none;
	stroke: var(--wheat);
	stroke-width: 1.4;
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
}

.ride.is-arrived .ride__city {
	fill: var(--wheat);
	stroke-opacity: 1;
}

.ride.is-arrived .ride__city-ring {
	animation: ride-city 1.8s ease-out infinite;
}

.ride.is-arrived .ride__city-ring:nth-of-type(2) { animation-delay: 0.3s; }
.ride.is-arrived .ride__city-ring:nth-of-type(3) { animation-delay: 0.6s; }
.ride.is-arrived .ride__city-ring:nth-of-type(4) { animation-delay: 0.9s; }

@keyframes ride-city {
	from { transform: scale(1); opacity: 0.9; }
	to { transform: scale(3.2); opacity: 0; }
}

.ride__eddie-body {
	transform-box: fill-box;
	transform-origin: 50% 90%;
}

.ride[data-stop='1'] .ride__eddie-body {
	animation: ride-wave 1.6s ease-in-out infinite;
}

.ride[data-road='dirt'][data-moving] .ride__eddie-body {
	animation: ride-bump 0.28s ease-in-out infinite alternate;
}

@keyframes ride-wave {
	0%, 100% { transform: rotate(0); }
	25% { transform: rotate(-10deg); }
	75% { transform: rotate(10deg); }
}

@keyframes ride-bump {
	from { transform: translateY(0) rotate(-5deg); }
	to { transform: translateY(-3px) rotate(5deg); }
}

/* Phones: the map pins at the top and the stops scroll up under it. */
@media (max-width: 899px) {
	.ride__body {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.ride__stage {
		z-index: 3;
		height: 40svh;
		background: var(--ink);
	}

	.ride__map {
		max-width: 330px;
	}

	.ride__stops {
		padding: 2vh 0 0;
	}

	.ride__stop {
		min-height: 0;
		padding-block: var(--s-5);
		justify-content: flex-start;
	}

	.ride__screen-title {
		right: 30%;
		font-size: var(--text-body);
	}
}

/* Reduced motion: nothing pins or moves; the finished map sits above the stops. */
@media (prefers-reduced-motion: reduce) {
	.ride__stage {
		position: static;
		height: auto;
		padding-block: var(--s-4);
	}

	.ride__stop {
		min-height: 0;
		padding-block: var(--s-5);
		opacity: 1;
	}
}
