/**
 * Editorial article template (spec §17).
 * 760px prose measure, 1040px for wide data assets.
 */

.geh-article {
	padding-block-end: clamp(48px, 6vw, 80px);
}

.geh-article__head {
	max-width: var(--geh-prose);
	margin-inline: auto;
	padding-block: clamp(32px, 5vw, 56px) 28px;
}

.geh-article__cluster {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-block-end: 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--geh-forest-700);
	text-decoration: none;
}

.geh-article__head h1 {
	margin: 0 0 16px;
	font-size: clamp(32px, 4vw, 52px);
	text-wrap: balance;
}

.geh-article__dek {
	margin: 0 0 24px;
	font-size: 20px;
	line-height: 1.55;
	color: var(--geh-muted);
	text-wrap: pretty;
}

/* Byline carries author identity + both dates (spec §17, §43). */
.geh-byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	padding-block: 16px;
	border-block: 1px solid var(--geh-line);
	font-size: 14px;
}

.geh-byline__avatar {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	object-fit: cover;
	background-color: var(--geh-sand);
}

.geh-byline__name {
	font-weight: 600;
	color: var(--geh-ink);
	text-decoration: none;
}

.geh-byline__name:hover {
	text-decoration: underline;
}

.geh-byline__dates {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	font-size: 13px;
	color: var(--geh-muted);
}

.geh-byline__dates time {
	font-variant-numeric: tabular-nums;
}

.geh-article__hero {
	max-width: var(--geh-prose-wide);
	margin: 0 auto clamp(32px, 4vw, 48px);
}

.geh-article__hero img {
	width: 100%;
	border-radius: var(--geh-r-image);
}

.geh-article__hero figcaption {
	margin-block-start: 10px;
	font-size: 13px;
	color: var(--geh-muted);
}

/* Prose measure. Wide/full alignments break out to 1040px, not full-bleed. */
.geh-article__body {
	max-width: var(--geh-prose);
	margin-inline: auto;
	font-size: 18px;
	line-height: 1.72;
}

.geh-article__body > * {
	margin-block: 0 24px;
}

.geh-article__body > h2 {
	margin-block: 48px 16px;
	font-size: clamp(26px, 2.6vw, 34px);
	scroll-margin-top: calc(var(--geh-header-current) + 24px);
}

.geh-article__body > h3 {
	margin-block: 32px 12px;
	font-size: clamp(21px, 2vw, 25px);
	scroll-margin-top: calc(var(--geh-header-current) + 24px);
}

.geh-article__body > :is(.alignwide, .wp-block-table, .geh-table-scroll, figure.alignwide) {
	max-width: var(--geh-prose-wide);
	margin-inline: calc((var(--geh-prose) - var(--geh-prose-wide)) / 2);
}

@media (max-width: 1100px) {
	.geh-article__body > :is(.alignwide, .wp-block-table, .geh-table-scroll, figure.alignwide) {
		max-width: 100%;
		margin-inline: 0;
	}
}

.geh-article__body a {
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.geh-article__body ul,
.geh-article__body ol {
	padding-inline-start: 24px;
}

.geh-article__body li {
	margin-block-end: 8px;
}

/* Pull-out note, used for methodology and caveats. */
.geh-note {
	padding: 20px 24px;
	background-color: var(--geh-ivory);
	border-inline-start: 3px solid var(--geh-brass);
	border-radius: 0 var(--geh-r-card) var(--geh-r-card) 0;
	font-size: 16px;
}

/* Sticky TOC — desktop only, and only when the article earns it (spec §17). */
.geh-toc {
	display: none;
}

@media (min-width: 1280px) {
	.geh-article--has-toc .geh-toc {
		display: block;
		position: sticky;
		top: calc(var(--geh-header-current) + 32px);
		align-self: start;
		max-height: calc(100svh - var(--geh-header-current) - 64px);
		overflow-y: auto;
		padding-inline-start: 20px;
		border-inline-start: 1px solid var(--geh-line);
		font-size: 14px;
	}

	.geh-article--has-toc .geh-article__layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 240px;
		gap: 48px;
		max-width: calc(var(--geh-prose) + 288px);
		margin-inline: auto;
	}

	.geh-article--has-toc .geh-article__body {
		margin-inline: 0;
	}
}

.geh-toc h2 {
	margin: 0 0 12px;
	font-family: var(--wp--preset--font-family--ui);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--geh-muted);
}

.geh-toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: geh-toc;
}

.geh-toc a {
	display: block;
	padding-block: 7px;
	color: var(--geh-muted);
	text-decoration: none;
	line-height: 1.4;
}

.geh-toc a:hover {
	color: var(--geh-ink);
}

.geh-toc a[aria-current="true"] {
	color: var(--geh-forest-900);
	font-weight: 600;
}

/* Sources block (spec §36) — visible provenance, not a footnote dump. */
.geh-sources {
	max-width: var(--geh-prose);
	margin: clamp(40px, 5vw, 64px) auto 0;
	padding: 24px;
	background-color: var(--geh-ivory);
	border-radius: var(--geh-r-panel);
}

.geh-sources h2 {
	margin: 0 0 14px;
	font-family: var(--wp--preset--font-family--ui);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--geh-muted);
}

.geh-sources ol {
	margin: 0;
	padding-inline-start: 20px;
	font-size: 14px;
	line-height: 1.6;
}

.geh-sources li {
	margin-block-end: 10px;
}

.geh-sources__meta {
	display: block;
	font-size: 12px;
	color: var(--geh-muted);
	font-variant-numeric: tabular-nums;
}

/* Author trust block (spec §37). */
.geh-author-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	max-width: var(--geh-prose);
	margin: 32px auto 0;
	padding: 24px;
	border: 1px solid var(--geh-line);
	border-radius: var(--geh-r-panel);
}

.geh-author-trust__avatar {
	width: 72px;
	height: 72px;
	flex: none;
	border-radius: 999px;
	object-fit: cover;
	background-color: var(--geh-sand);
}

.geh-author-trust__text {
	flex: 1 1 280px;
	min-width: 0;
}

.geh-author-trust__name {
	margin: 0 0 2px;
	font-family: var(--wp--preset--font-family--ui);
	font-size: 17px;
	font-weight: 700;
}

.geh-author-trust__role {
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--geh-muted);
}

.geh-author-trust__bio {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
}

.geh-author-trust__credentials {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-block-start: 12px;
	padding-inline-start: 0;
	list-style: none;
}
