/* Text pages: page hero, section bands, prose, FAQ, status card, contact, newsletter row. */

/* ---------- Page hero (Figma "Page Hero (text)") ---------- */
.ceh-page-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: var(--ceh-space-3xl) var(--ceh-layout-gutter) var(--ceh-space-2xl);
	background: var(--ceh-hero-no-image);
	color: var(--ceh-text-inverse);
}

.ceh-page-hero__image {
	position: absolute;
	z-index: -1;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ceh-page-hero:has(.ceh-page-hero__image)::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background: var(--ceh-gradient-hero-overlay);
}

.ceh-page-hero__inner {
	display: flex;
	flex-direction: column;
	gap: var(--ceh-space-md);
	max-width: var(--ceh-layout-content-max);
	margin-inline: auto;
}

.ceh-page-hero__title {
	margin: 0;
	font: 700 var(--ceh-display-page-title-size) / var(--ceh-display-page-title-line-height) var(--ceh-font-heading);
}

.ceh-page-hero__intro {
	max-width: 720px;
	margin: 0;
	color: var(--ceh-text-muted-on-inverse);
}

/* ---------- Page content: each top-level group is a full-bleed band ---------- */
.ceh-page-content > * {
	max-width: var(--ceh-layout-content-max);
	margin-inline: auto;
}

.ceh-page-content > .wp-block-group {
	display: flex;
	flex-direction: column;
	gap: var(--ceh-space-lg);
	max-width: none;
	margin: 0;
	padding: var(--ceh-space-2xl) max(var(--ceh-layout-gutter), (100% - var(--ceh-layout-content-max)) / 2);
}

.ceh-page-content > .wp-block-group > * {
	margin-block: 0;
}

.ceh-page-content > .wp-block-group.is-style-surface {
	background: var(--ceh-bg-surface);
}

/* Section blocks (e.g. Sponsors) bring their own padding. */
.ceh-page-content > .ceh-section {
	max-width: none;
	padding-inline: max(var(--ceh-layout-gutter), (100% - var(--ceh-layout-content-max)) / 2);
}

/* Bands sharing a background close up the gap, like the FAQ sections. */
.ceh-page-content > .wp-block-group:not(.is-style-surface) + .wp-block-group:not(.is-style-surface) {
	padding-top: 0;
}

:where(.ceh-page-content) p {
	color: var(--ceh-text-secondary);
}

.ceh-page-content .is-style-lead {
	color: var(--ceh-text-primary);
	font: 700 22px / 32px var(--ceh-font-heading);
}

.ceh-page-content .wp-block-columns {
	gap: var(--ceh-space-3xl);
	margin: 0;
}

.ceh-measure,
.ceh-page-content .is-style-measure {
	max-width: 720px;
}

/* ---------- Prose (long-form body) ---------- */
.ceh-prose {
	color: var(--ceh-text-secondary);
}

.ceh-prose > * {
	margin-block: 0 14px;
}

.ceh-prose h3 {
	margin-top: 56px;
	color: var(--ceh-text-secondary);
	font: 700 var(--ceh-heading-h3-size) / var(--ceh-heading-h3-line-height) var(--ceh-font-heading);
	scroll-margin-top: calc(var(--ceh-layout-header-height) + var(--ceh-space-md));
}

.ceh-prose h3:first-child {
	margin-top: 0;
}

.ceh-prose ul,
.ceh-prose ol {
	padding-left: var(--ceh-space-md);
}

.ceh-prose li + li {
	margin-top: 10px;
}

.ceh-prose h4 {
	margin-top: var(--ceh-space-lg);
	color: var(--ceh-text-secondary);
	font: 700 var(--ceh-heading-h4-size) / var(--ceh-heading-h4-line-height) var(--ceh-font-heading);
}

.ceh-prose h3 + h4 {
	margin-top: var(--ceh-space-sm);
}

.ceh-prose .wp-block-table {
	margin-block: var(--ceh-space-sm) var(--ceh-space-md);
	overflow-x: auto;
}

.ceh-prose table {
	width: 100%;
	border-collapse: collapse;
}

.ceh-prose th,
.ceh-prose td {
	padding: 12px 16px 12px 0;
	border: 0;
	border-bottom: var(--ceh-stroke-hairline) solid var(--ceh-border-subtle);
	text-align: left;
	vertical-align: top;
}

.ceh-prose th {
	color: var(--ceh-text-primary);
	font-size: var(--ceh-label-strong-size);
	font-weight: 500;
	line-height: var(--ceh-label-strong-line-height);
	text-transform: uppercase;
}

.ceh-prose .ceh-tag-updated {
	display: block;
	margin-top: 56px;
	color: var(--ceh-text-accent);
	font-size: var(--ceh-label-strong-size);
	font-weight: 500;
	line-height: var(--ceh-label-strong-line-height);
	text-transform: uppercase;
}

.ceh-prose .ceh-tag-updated + h3 {
	margin-top: 0;
}

/* ---------- Long-form layout ---------- */
.ceh-article {
	display: flex;
	flex-direction: column;
	gap: var(--ceh-space-lg);
	max-width: calc(var(--ceh-layout-content-max) + 2 * var(--ceh-layout-gutter));
	margin-inline: auto;
	padding: var(--ceh-space-2xl) var(--ceh-layout-gutter);
}

.ceh-article__columns {
	display: grid;
	grid-template-columns: 240px minmax(0, 720px);
	gap: var(--ceh-space-3xl);
	align-items: start;
}

.ceh-toc {
	position: sticky;
	top: calc(var(--ceh-layout-header-height) + var(--ceh-space-lg));
}

.ceh-toc summary {
	margin-bottom: 14px;
	list-style: none;
	pointer-events: none;
}

.ceh-toc summary::-webkit-details-marker {
	display: none;
}

.ceh-toc__label-mobile {
	display: none;
}

@media (max-width: 1024px) {
	.ceh-toc__label-mobile {
		display: inline;
	}
}

.ceh-toc ol {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ceh-toc a {
	color: var(--ceh-text-secondary);
	font-weight: 500;
	text-decoration: none;
}

.ceh-toc a:hover,
.ceh-toc a[aria-current] {
	color: var(--ceh-text-accent);
}

.ceh-toc a[aria-current]::before {
	content: "→ ";
}

/* Year grid (History): every heading starts with a year, so show years as compact chips. */
.ceh-toc--years ol {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
}

.ceh-toc--years a {
	display: block;
	padding: 6px 0;
	border: var(--ceh-stroke-hairline) solid var(--ceh-border-subtle);
	border-radius: var(--ceh-radius-md);
	font-size: var(--ceh-label-strong-size);
	font-variant-numeric: tabular-nums;
	line-height: var(--ceh-label-strong-line-height);
	text-align: center;
}

.ceh-toc--years a:hover {
	border-color: var(--ceh-text-accent);
}

.ceh-toc--years a[aria-current] {
	border-color: var(--ceh-bg-accent);
	background: var(--ceh-bg-accent);
	color: var(--ceh-text-inverse);
}

.ceh-toc--years a[aria-current]::before {
	content: none;
}

.ceh-toc__current {
	margin: 14px 0 0;
	color: var(--ceh-text-muted);
	font-size: var(--ceh-label-regular-size);
	line-height: var(--ceh-label-regular-line-height);
}

/* ---------- FAQ ---------- */
.ceh-faq {
	display: flex;
	flex-direction: column;
}

.ceh-faq .ceh-section-heading {
	margin-bottom: var(--ceh-space-lg);
}

.ceh-faq__item {
	border-bottom: var(--ceh-stroke-hairline) solid var(--ceh-border-divider);
}

.ceh-faq__question {
	display: flex;
	align-items: center;
	gap: var(--ceh-space-md);
	padding: var(--ceh-space-md) 0;
	font: 700 var(--ceh-heading-h4-size) / var(--ceh-heading-h4-line-height) var(--ceh-font-heading);
	list-style: none;
	cursor: pointer;
}

.ceh-faq__question::-webkit-details-marker {
	display: none;
}

.ceh-faq__question::after {
	content: "+";
	margin-left: auto;
	color: var(--ceh-text-accent);
	font-size: var(--ceh-heading-h3-size);
	line-height: var(--ceh-heading-h3-line-height);
}

.ceh-faq__item[open] .ceh-faq__question::after {
	content: "−";
}

.ceh-faq__answer {
	max-width: 720px;
	margin-top: -12px;
	padding-bottom: var(--ceh-space-md);
	color: var(--ceh-text-secondary);
}

.ceh-faq__answer > * {
	margin: 0 0 var(--ceh-space-sm);
}

/* ---------- Status card ---------- */
.ceh-status-card {
	display: flex;
	gap: var(--ceh-space-2xl);
	padding: 56px;
	border: var(--ceh-stroke-hairline) solid var(--ceh-border-subtle);
	border-radius: var(--ceh-radius-lg);
	background: var(--ceh-bg-surface);
}

.ceh-status-card__message {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--ceh-space-sm);
}

.ceh-status-card__title {
	margin: 0;
	font: 700 var(--ceh-heading-h3-size) / var(--ceh-heading-h3-line-height) var(--ceh-font-heading);
}

.ceh-status-card__text {
	max-width: 640px;
	margin: 0;
}

.ceh-status-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ceh-space-sm);
	padding-top: var(--ceh-space-sm);
}

.ceh-status-card__timeline {
	display: flex;
	flex: 0 0 320px;
	flex-direction: column;
	gap: var(--ceh-space-sm);
	margin: 0;
	padding: 0;
	color: var(--ceh-text-secondary);
	list-style: none;
}

.ceh-status-card__timeline li {
	display: flex;
	gap: var(--ceh-space-sm);
}

.ceh-status-card__date {
	flex: 0 0 64px;
	color: var(--ceh-text-muted);
	font-size: var(--ceh-label-strong-size);
	font-weight: 500;
	line-height: var(--ceh-body-default-line-height);
	text-transform: uppercase;
}

.ceh-status-card__timeline .is-current {
	color: var(--ceh-text-primary);
}

.ceh-status-card__timeline .is-current .ceh-status-card__date {
	color: var(--ceh-text-accent);
}

/* ---------- Contact ---------- */
.ceh-contact-details {
	display: flex;
	flex-direction: column;
	gap: var(--ceh-space-lg);
	margin: 0;
}

.ceh-contact-details__row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-bottom: var(--ceh-space-md);
	border-bottom: var(--ceh-stroke-hairline) solid var(--ceh-border-divider);
}

.ceh-contact-details__row--address {
	border: 0;
}

.ceh-contact-details dd {
	margin: 0;
	color: var(--ceh-text-secondary);
}

.ceh-contact-details a {
	color: var(--ceh-text-accent);
	font-weight: 500;
	text-decoration: none;
}

.ceh-contact-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--ceh-space-md);
	align-items: start;
}

.ceh-contact-form .ceh-field--wide,
.ceh-contact-form .ceh-button,
.ceh-contact-form [role="status"] {
	grid-column: 1 / -1;
}

.ceh-contact-form .ceh-button {
	justify-self: start;
}

.ceh-contact-form textarea {
	min-height: 120px;
	resize: vertical;
}

/* ---------- Newsletter row ---------- */
.ceh-newsletter-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--ceh-space-xl);
}

.ceh-newsletter-row__text {
	flex: 0 1 480px;
	margin: 0;
	color: var(--ceh-text-secondary);
	font-weight: 500;
}

.ceh-newsletter-row .ceh-field {
	flex: 1 1 240px;
}

/* ---------- Tablet / mobile ---------- */
@media (max-width: 1024px) {
	.ceh-article__columns {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--ceh-space-lg);
	}

	.ceh-toc {
		position: static;
		padding: var(--ceh-space-sm);
		border: var(--ceh-stroke-hairline) solid var(--ceh-border-subtle);
		border-radius: var(--ceh-radius-md);
		background: var(--ceh-bg-surface);
	}

	/* Mobile frames collapse "On this page" into a "Jump to…" control. */
	.ceh-toc summary {
		margin: 0;
		pointer-events: auto;
		cursor: pointer;
	}

	.ceh-toc__label-desktop {
		display: none;
	}

	.ceh-toc summary::after {
		content: " ▾";
	}

	.ceh-toc details[open] summary {
		margin-bottom: 14px;
	}

	.ceh-toc--years ol {
		grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
	}

	.ceh-toc--years .ceh-toc__current {
		display: none;
	}

	.ceh-status-card {
		flex-direction: column;
		padding: var(--ceh-space-lg);
	}

	.ceh-status-card__timeline {
		flex-basis: auto;
	}

	.ceh-page-content .wp-block-columns {
		gap: var(--ceh-space-lg);
	}
}

@media (max-width: 767px) {
	.ceh-page-hero {
		padding-top: var(--ceh-space-2xl);
		padding-bottom: var(--ceh-space-xl);
	}

	.ceh-page-hero__title {
		font-size: var(--ceh-heading-h1-size);
		line-height: var(--ceh-heading-h1-line-height);
	}

	.ceh-contact-form {
		grid-template-columns: 1fr;
	}

	.ceh-newsletter-row {
		flex-direction: column;
		align-items: stretch;
		gap: var(--ceh-space-md);
	}
}
