/*
 * Istoric: the theme timeline (.betania-timeline) restyled like the live page: peach labels,
 * one sentence per paragraph, a light box for the 1945 houses, and "Te așteptăm" inside "Astăzi".
 */

body.is-page-istoric .betania-content > .history-timeline {
	margin-block: 0;
	padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

/* NEXT-04: as on Donează, the gap under the hero comes from the content's own top margin, not twice. */
body.is-page-istoric .betania-content > .history-timeline:first-child {
	padding-block-start: 0;
}

/*
 * Column like live: the list starts at the left edge of the 1200px container's text box
 * (live: 1096px inside its 52px gutters, so x=172 at 1440) and is 760px wide, with stages
 * using the full width. !important because the constrained layouts center children with
 * `margin: auto !important` and cap them at the global content size.
 */
body.is-page-istoric .history-timeline > .history-timeline__list {
	max-width: 760px;
	margin-inline: calc(max(0px, (100% - 1200px) / 2) + clamp(0px, (min(100%, 1200px) - 1096px) / 2, 52px)) auto !important;
	color: var(--wp--preset--color--navy);
}

body.is-page-istoric .history-timeline__list > .betania-timeline__stage {
	max-width: none;
	margin-inline: 0 !important;
}

/* Years inside the stage text (span added by inc/timeline.php), same weight and color as live's .chrono__year. */
body.is-page-istoric .history-year {
	font-weight: 500;
	color: var(--wp--preset--color--navy);
}

/* The vertical line and the stage dots. */
body.is-page-istoric .history-timeline__list::before {
	left: 7px;
	top: 10px;
	bottom: 10px;
	width: 2px;
	/* UI-29: the palette peach of the dots and the figure bars, not a paler shade of its own. */
	background: var(--wp--preset--color--gold);
}

body.is-page-istoric .history-timeline__list > .betania-timeline__stage {
	padding: 0 0 2rem 2.25rem;
}

body.is-page-istoric .history-timeline__list > .betania-timeline__stage:last-child {
	padding-bottom: 0;
}

body.is-page-istoric .history-timeline__list > .betania-timeline__stage::before {
	top: 3px;
	width: 16px;
	height: 16px;
	border: 3px solid var(--wp--preset--color--gold);
	background: var(--wp--preset--color--white);
}

/* First stage and "Astăzi" are filled, as on the live page. */
body.is-page-istoric .history-timeline__list > .betania-timeline__stage:is(:first-child, .betania-timeline__stage--today)::before {
	border-color: var(--wp--preset--color--navy);
	background: var(--wp--preset--color--navy);
}

/* Stage label: peach tag. */
body.is-page-istoric .betania-timeline__stage > p.is-style-betania-label {
	display: inline-block;
	margin: 0 0 0.75rem;
	padding: 0.375rem 0.75rem;
	border-radius: 3px;
	background: var(--wp--preset--color--peach-light);
	color: var(--wp--preset--color--navy);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
}

body.is-page-istoric .history-timeline__list p {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.7;
}

/* One sentence per paragraph: small gap between sentences of the same stage or step. */
body.is-page-istoric .betania-timeline__stage > * + * {
	margin-block-start: 0;
}

body.is-page-istoric .betania-timeline__stage > p:not(.is-style-betania-label) {
	margin-block: 0;
}

body.is-page-istoric .betania-timeline__stage > p:not(.is-style-betania-label) + p,
body.is-page-istoric .betania-timeline__step > p:not(.betania-timeline__step-label) + p {
	margin-block-start: 0.45em;
}

/* 1945 houses: light box with a house icon. */
body.is-page-istoric .betania-timeline__houses {
	margin-block-start: 0.875rem;
	padding: 0.75rem 0.875rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	background: var(--wp--preset--color--grey-light);
}

body.is-page-istoric .betania-timeline__houses > li {
	padding-inline-start: 1.75rem;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.7;
}

body.is-page-istoric .betania-timeline__houses > li::before {
	background: var(--wp--preset--color--navy);
}

/*
 * Large figure per stage (UI-05): a phrase from the stage text, copied into data-figure by
 * inc/timeline.php, so every screen of the long timeline has a focal point. Generated content
 * with empty alt text: the phrase is already in the paragraph, readers and copy get it once.
 * Phone and tablet: a peach band right under the stage label. From 1200px: the empty right
 * column, level with the stage.
 */
body.is-page-istoric .history-timeline__list > .betania-timeline__stage[data-figure] {
	display: flex;
	flex-direction: column;
}

body.is-page-istoric .betania-timeline__stage[data-figure] > * {
	order: 2;
}

body.is-page-istoric .betania-timeline__stage[data-figure] > p.is-style-betania-label {
	order: 0;
	align-self: flex-start;
}

body.is-page-istoric .betania-timeline__stage[data-figure]::after {
	content: attr(data-figure);
	content: attr(data-figure) / "";
	order: 1;
	display: block;
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-inline-start: 4px solid var(--wp--preset--color--gold);
	border-radius: 0 6px 6px 0;
	background: var(--wp--preset--color--peach-light);
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--dosis);
	font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.25rem);
	font-weight: 700;
	line-height: 1.1;
	text-wrap: balance;
}

/* Steps inside a stage: thin line, small peach dot, brown label. */
body.is-page-istoric .betania-timeline__step {
	padding: 0 0 1.125rem 1.5rem;
	border-inline-start: 1px solid var(--wp--preset--color--line);
}

body.is-page-istoric .betania-timeline__step:last-child {
	padding-bottom: 0;
}

body.is-page-istoric .betania-timeline__step::before {
	left: -5px;
	top: 7px;
	width: 9px;
	height: 9px;
	background: var(--wp--preset--color--gold);
}

body.is-page-istoric .betania-timeline__step-label {
	margin-block-end: 0.25rem;
	color: var(--wp--preset--color--brown);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.3;
}

/* "Te așteptăm" inside "Astăzi": light peach box, left aligned, small tracked title. */
body.is-page-istoric .betania-timeline__stage--today .betania-next-step {
	margin-block-start: 1.125rem;
	padding: 1.25rem !important;
	border: 1px solid var(--wp--preset--color--gold);
	border-radius: 6px;
	background: var(--wp--preset--color--peach-light);
	text-align: left;
}

body.is-page-istoric .betania-next-step > * {
	margin-block: 0 0.625rem;
	margin-inline: 0;
	max-width: none;
}

body.is-page-istoric .betania-next-step h2 {
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--dosis);
	/* UI-49: the one section-title style (theme.json h2). */
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.3;
	text-align: left;
	text-transform: uppercase;
}

body.is-page-istoric .betania-next-step .wp-block-buttons {
	justify-content: flex-start;
	gap: 0.625rem;
	margin-block: 1rem 0 !important;
}

/* Line length (UI-47): the stage text ran 85-100 characters on 714px. 55ch of Roboto 17px (about 520px)
 * measures 65-75 characters, the same measure as Despre noi. The stage keeps its width, so the large
 * figures (UI-05) stay where they were from 1200px. */
body.is-page-istoric {
	--history-measure: 55ch;
}

body.is-page-istoric .betania-timeline__stage p:not(.is-style-betania-label, .betania-timeline__step-label) {
	max-width: var(--history-measure);
}

/* "Te așteptăm" is a constrained group, which centres its children with `margin: auto !important`. */
body.is-page-istoric .betania-timeline__stage--today .betania-next-step > p {
	max-width: var(--history-measure);
	margin-inline: 0 auto !important;
}

/* Phones (UI-48): two levels of indent (stage 36px + step 25px) left the step text 297px wide,
 * about 40 characters a line. Tighter indents give it 320-335px; the line and the dots stay. */
@media (max-width: 599px) {
	body.is-page-istoric .history-timeline__list > .betania-timeline__stage {
		padding-inline-start: 1.625rem;
	}

	body.is-page-istoric .betania-timeline__step {
		padding-inline-start: 0.875rem;
	}
}

@media (min-width: 768px) {
	body.is-page-istoric .history-timeline__list::before {
		left: 9px;
	}

	body.is-page-istoric .history-timeline__list > .betania-timeline__stage {
		padding: 0 0 2.5rem 2.875rem;
	}

	body.is-page-istoric .history-timeline__list > .betania-timeline__stage::before {
		width: 20px;
		height: 20px;
		border-width: 4px;
	}

	body.is-page-istoric .betania-timeline__houses {
		padding: 0.875rem 1.125rem;
	}

	body.is-page-istoric .betania-timeline__stage--today .betania-next-step {
		padding: 1.375rem 1.5rem !important;
	}
}

@media (min-width: 1200px) {
	/* The list ends 336px before the container's text edge (x 932 vs 1268 at 1440): 3.5rem gap + 17.5rem. */
	body.is-page-istoric .betania-timeline__stage[data-figure]::after {
		position: absolute;
		top: 0;
		left: calc(100% + 3.5rem);
		width: 17.5rem;
		margin: 0;
		padding: 0.875rem 0 0;
		border-inline-start: 0;
		border-block-start: 4px solid var(--wp--preset--color--gold);
		border-radius: 0;
		background: none;
		font-size: 3rem;
		line-height: 1.05;
	}
}

/* The large figures (UI-05) are off at Adelin's request (29.10), at every width; data-figure stays in
   the markup, so deleting this rule brings them back. */
body.is-page-istoric .betania-timeline__stage[data-figure]::after {
	content: none;
}

/*
 * NEXT-32 (ADR-0026): each pastor from the 25.10.2026 leaflet sits in the stage of his years, as a
 * small card ("Păstor · years", name). Tomuța Simion's card spans the stage and carries his message;
 * Beniamin Crișan's, in "Astăzi", has the navy edge of the filled "Astăzi" dot. The leaflet's closing
 * and Psalm 100:5 close "Astăzi", before "Te așteptăm".
 */
body.is-page-istoric .history-pastor {
	box-sizing: border-box;
	width: fit-content;
	min-width: min(100%, 15rem);
	margin: 0 0 0.875rem !important;
	padding: 0.625rem 0.875rem;
	border: 1px solid var(--wp--preset--color--line);
	border-inline-start: 4px solid var(--wp--preset--color--gold);
	border-radius: 0 6px 6px 0;
	background: var(--wp--preset--color--white);
}

body.is-page-istoric .history-pastor > * {
	max-width: none !important;
	margin-block: 0;
}

body.is-page-istoric .history-pastor__kicker {
	color: var(--wp--preset--color--brown);
	font-family: var(--wp--preset--font-family--dosis);
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.3 !important;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
}

/* The years in the kicker are wrapped by inc/timeline.php; keep the kicker's own look. */
body.is-page-istoric .history-pastor__kicker .history-year {
	color: inherit;
	font-weight: inherit;
}

body.is-page-istoric .history-pastor__name {
	margin-block-start: 0.125rem !important;
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--dosis);
	font-size: var(--wp--preset--font-size--large) !important;
	font-weight: 700;
	line-height: 1.25 !important;
}

body.is-page-istoric .history-pastor__role {
	color: var(--wp--preset--color--grey-text);
	font-size: var(--wp--preset--font-size--small) !important;
	line-height: 1.4 !important;
}

/* Tomuța Simion's message in the "2016 – 2026" stage, as a quotation (Adelin, 29.10): a large
   opening mark, a hairline on the left, larger italic text; no box. */
body.is-page-istoric .history-stage-message {
	position: relative;
	margin: 0.25rem 0 0.25rem !important;
	padding: 0.25rem 0 0.25rem 1.75rem;
	border: 0;
	border-inline-start: 2px solid var(--wp--preset--color--gold);
	background: none;
	color: var(--wp--preset--color--navy);
}

body.is-page-istoric .history-stage-message::before {
	/* The high mark: the Romanian opening „ sits on the baseline and would collide with the text. */
	content: "\201C";
	position: absolute;
	top: 0;
	left: 1.5rem;
	color: var(--wp--preset--color--gold);
	font-family: var(--wp--preset--font-family--dosis);
	font-size: 5rem;
	font-weight: 700;
	line-height: 1;
	pointer-events: none;
}

body.is-page-istoric .history-stage-message p {
	margin-block: 0;
	font-size: var(--wp--preset--font-size--large);
	font-style: italic;
	line-height: 1.6;
}

body.is-page-istoric .history-stage-message > p:first-child {
	padding-block-start: 2.75rem;
}

body.is-page-istoric .history-stage-message > p + p,
body.is-page-istoric .history-stage-message > ul + p {
	margin-block-start: 0.875em;
}

/* "Scopul…" and "Ne propunem…" introduce the lists: upright, small tracked caps. */
body.is-page-istoric .history-stage-message > p:not(:first-child) {
	color: var(--wp--preset--color--brown);
	font-family: var(--wp--preset--font-family--dosis);
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

body.is-page-istoric .history-stage-message > ul {
	margin-block: 0.375rem 0;
	font-style: italic;
}

body.is-page-istoric .history-stage-message > ul > li {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.6;
}

body.is-page-istoric .history-pastor--current {
	border-inline-start-color: var(--wp--preset--color--navy);
	background: var(--wp--preset--color--grey-light);
}

/* The leaflet's closing between two thin peach rules, the second line in Dosis capitals. */
body.is-page-istoric .history-pastors__closing {
	margin-block: 1.125rem 1rem !important;
	padding-block: 0.875rem;
	border-block: 1px solid var(--wp--preset--color--gold);
	text-align: center;
}

body.is-page-istoric .history-pastors__closing > p {
	max-width: none !important;
	margin-block: 0;
}

body.is-page-istoric .history-pastors__closing-line {
	margin-block-start: 0.25rem !important;
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--dosis);
	font-weight: 700;
	letter-spacing: 0.08em;
}

body.is-page-istoric .history-pastors__psalm {
	margin: 0;
	padding: 0.25rem 0 0.25rem 1.25rem;
	border-inline-start: 4px solid var(--wp--preset--color--gold);
	font-style: italic;
}

body.is-page-istoric .history-pastors__psalm cite {
	display: block;
	margin-block-start: 0.75rem;
	color: var(--wp--preset--color--brown);
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	font-weight: 700;
	letter-spacing: 0.06em;
}

/*
 * NEXT-32: "Vizualizează lista păstorilor" opens the pastors alone, in order, as one horizontal line
 * (years above, a dot each, names below) on white. A native <details>, so it works without JS and from
 * the keyboard. It sits in the timeline's content column, over the stage labels, as an outline button
 * that does not outweigh the history. Opening unfolds the panel (where the browser can animate
 * <details>) and lets the pastors appear one after another; reduced motion shows it at once.
 */
body.is-page-istoric .history-pastors-list {
	max-width: none;
	margin: 0 0 clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem) !important;
	/* Unfolds smoothly where ::details-content can be animated (Chromium 131+); elsewhere it opens at once. */
	interpolate-size: allow-keywords;
}

body.is-page-istoric .history-pastors-list::details-content {
	height: 0;
	overflow: clip;
	transition: height 0.45s ease, content-visibility 0.45s allow-discrete;
}

body.is-page-istoric .history-pastors-list[open]::details-content {
	height: auto;
}

body.is-page-istoric .history-pastors-list > summary {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.625rem 1.125rem;
	border: 1px solid var(--wp--preset--color--navy);
	border-radius: 3px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--dosis);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
	list-style: none;
	transition: background-color 0.2s ease;
}

body.is-page-istoric .history-pastors-list > summary::-webkit-details-marker {
	display: none;
}

/* Chevron that turns when the list is open. */
body.is-page-istoric .history-pastors-list > summary::after {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.3s ease;
}

body.is-page-istoric .history-pastors-list[open] > summary::after {
	transform: translateY(2px) rotate(-135deg);
}

body.is-page-istoric .history-pastors-list > summary:hover,
body.is-page-istoric .history-pastors-list[open] > summary {
	background: var(--wp--preset--color--peach-light);
}

body.is-page-istoric .history-pastors-list__items {
	position: relative;
	display: flex;
	flex-wrap: nowrap;
	margin: 1rem 0 0;
	padding: clamp(1.25rem, 1rem + 1vw, 1.75rem) clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
	overflow-x: auto;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	background: var(--wp--preset--color--white);
	list-style: none;
	scroll-snap-type: x proximity;
	scrollbar-color: var(--wp--preset--color--gold) transparent;
}

body.is-page-istoric .history-pastors-list__items:focus-visible {
	outline: 3px solid var(--wp--preset--color--navy);
	outline-offset: 3px;
}

/* One horizontal timeline: years above the line, a dot on it, the name under it. */
body.is-page-istoric .history-pastors-list__items > li {
	position: relative;
	display: grid;
	grid-template-rows: 1.25rem 1.5rem auto;
	/* Rows stay put; the items share the width and scroll only below 6rem (names are on two lines). */
	align-content: start;
	flex: 1 1 0;
	box-sizing: border-box;
	min-width: 6rem;
	margin: 0;
	padding: 0 0.375rem;
	text-align: center;
	scroll-snap-align: start;
}

/* The line: each item draws its own segment, so it runs from the first dot to the last. */
body.is-page-istoric .history-pastors-list__items > li::before {
	content: "";
	position: absolute;
	top: calc(1.25rem + 0.75rem - 1px);
	left: 0;
	right: 0;
	/* Undo the theme's numbered-list circle (style.css, ol > li::before), which this pseudo-element replaces. */
	width: auto;
	height: 2px;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--gold);
}

body.is-page-istoric .history-pastors-list__items > li:first-child::before {
	left: 50%;
}

body.is-page-istoric .history-pastors-list__items > li:last-child::before {
	right: 50%;
}

body.is-page-istoric .history-pastors-list__items > li::after {
	content: "";
	position: absolute;
	top: calc(1.25rem + 0.75rem - 6px);
	left: calc(50% - 6px);
	width: 12px;
	height: 12px;
	border: 2px solid var(--wp--preset--color--gold);
	border-radius: 50%;
	background: var(--wp--preset--color--white);
	box-sizing: border-box;
}

/* Today's pastor: the filled navy dot, as on "Astăzi". */
body.is-page-istoric .history-pastors-list__items > li:last-child::after {
	border-color: var(--wp--preset--color--navy);
	background: var(--wp--preset--color--navy);
}

body.is-page-istoric .history-pastors-list__years {
	grid-row: 1;
	color: var(--wp--preset--color--brown);
	font-family: var(--wp--preset--font-family--dosis);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.25rem;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

body.is-page-istoric .history-pastors-list__name {
	grid-row: 3;
	color: var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--dosis);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	line-height: 1.25;
}

/* Two lines: surname, then given name (Adelin, 29.10). */
body.is-page-istoric .history-pastors-list__surname,
body.is-page-istoric .history-pastors-list__given {
	display: block;
}

body.is-page-istoric .history-pastors-list__given {
	font-weight: 500;
}

/* The pastors appear one after another, left to right. */
@keyframes history-pastor-in {
	from {
		opacity: 0;
		transform: translateY(0.375rem);
	}
}

body.is-page-istoric .history-pastors-list[open] .history-pastors-list__items > li {
	animation: history-pastor-in 0.4s ease both;
}

body.is-page-istoric .history-pastors-list[open] .history-pastors-list__items > li:nth-child(2) {
	animation-delay: 0.05s;
}

body.is-page-istoric .history-pastors-list[open] .history-pastors-list__items > li:nth-child(3) {
	animation-delay: 0.10s;
}

body.is-page-istoric .history-pastors-list[open] .history-pastors-list__items > li:nth-child(4) {
	animation-delay: 0.15s;
}

body.is-page-istoric .history-pastors-list[open] .history-pastors-list__items > li:nth-child(5) {
	animation-delay: 0.20s;
}

body.is-page-istoric .history-pastors-list[open] .history-pastors-list__items > li:nth-child(6) {
	animation-delay: 0.25s;
}

body.is-page-istoric .history-pastors-list[open] .history-pastors-list__items > li:nth-child(7) {
	animation-delay: 0.30s;
}

body.is-page-istoric .history-pastors-list[open] .history-pastors-list__items > li:nth-child(8) {
	animation-delay: 0.35s;
}

body.is-page-istoric .history-pastors-list[open] .history-pastors-list__items > li:nth-child(9) {
	animation-delay: 0.40s;
}

@media (prefers-reduced-motion: reduce) {
	body.is-page-istoric .history-pastors-list::details-content,
	body.is-page-istoric .history-pastors-list > summary,
	body.is-page-istoric .history-pastors-list > summary::after {
		transition: none;
	}

	body.is-page-istoric .history-pastors-list[open] .history-pastors-list__items > li {
		animation: none;
	}
}

/*
 * From 1200px (Adelin, 29.10): every pastor sits on the main timeline. His name goes in a column left
 * of the line, level with the stage or step of the year he began, and a dot of his own marks that
 * point on the same line. The entries are taken out of the flow, so the stage text keeps its place.
 *
 * Same year, same row (Adelin, 29.10): the pastor's dot is level with the dot of his stage or step,
 * and his "Păstor · ani" line with its label. On a stage the two dots share the point, so his dot
 * sits inside the stage's ring. A pastor whose first year has no entry of its own is placed between
 * the entries around it in proportion to the years (--history-pastor-at, a share of the stage).
 *
 * The line's centre is 10px from the stage's left edge (::before at 9px, 2px wide); a step starts
 * 2.875rem + its 1px border further right. Dot centres: a stage's ring 13px below its top (3px +
 * 20px / 2), a step's dot 11.5px (7px + 9px / 2); the kicker line's centre is 9px into the entry.
 */
@media (min-width: 1200px) {
	body.is-page-istoric {
		--history-pastors-col: 11.5rem;
		--history-pastor-gap: 1.25rem;
		--history-pastor-kicker-mid: 9px;
	}

	body.is-page-istoric .history-timeline > .history-timeline__list {
		margin-inline-start: calc(max(0px, (100% - 1200px) / 2) + clamp(0px, (min(100%, 1200px) - 1096px) / 2, 52px) + var(--history-pastors-col)) !important;
	}

	/* Button and list start at the names column (Adelin, 29.10: over the content column the button
	   looked left behind); the list spans that column and the content, so all nine fit on one line. */
	/* Full content width (Adelin, 29.10): from the names column to the content's right edge. */
	body.is-page-istoric .history-pastors-list {
		max-width: none;
		margin-inline: calc(max(0px, (100% - 1200px) / 2) + clamp(0px, (min(100%, 1200px) - 1096px) / 2, 52px)) !important;
	}

	body.is-page-istoric .history-timeline__list .history-pastor {
		position: absolute;
		top: calc(var(--history-pastor-at, 0) * 100% + 13px - var(--history-pastor-kicker-mid));
		width: calc(var(--history-pastors-col) - var(--history-pastor-gap) - 0.75rem);
		min-width: 0;
		margin: 0 !important;
		padding: 0;
		border: 0;
		background: none;
		text-align: end;
	}

	body.is-page-istoric .betania-timeline__stage > .history-pastor {
		right: calc(100% - 10px + var(--history-pastor-gap));
	}

	body.is-page-istoric .betania-timeline__step > .history-pastor {
		top: calc(11.5px - var(--history-pastor-kicker-mid));
		right: calc(100% + 2.875rem + 1px - 10px + var(--history-pastor-gap));
	}

	/* Ardeu Petru, 1957, in the 1954 – 1962 stage: no entry for 1957, so 3/8 of the way from the
	   stage's ring to the next one (the stages touch, so that distance is the stage's height). */
	body.is-page-istoric .history-pastor + .history-pastor {
		--history-pastor-at: 0.375;
	}

	/* Tall enough that 3/8 of it clears the first pastor's two lines (43px) with room between. */
	body.is-page-istoric .history-timeline__list > .betania-timeline__stage:has(> .history-pastor + .history-pastor) {
		min-height: 9.5rem;
	}

	/* The pastor's dot on the main line, level with his name. */
	body.is-page-istoric .history-pastor::after {
		content: "";
		position: absolute;
		top: calc(var(--history-pastor-kicker-mid) - 6px);
		left: calc(100% + var(--history-pastor-gap) - 6px);
		width: 12px;
		height: 12px;
		box-sizing: border-box;
		border: 2px solid var(--wp--preset--color--white);
		border-radius: 50%;
		background: var(--wp--preset--color--brown);
	}

	body.is-page-istoric .history-pastor--current::after {
		background: var(--wp--preset--color--navy);
	}

	body.is-page-istoric .history-pastor .history-pastor__kicker {
		letter-spacing: 0.06em;
	}

	body.is-page-istoric .history-pastor .history-pastor__name {
		font-size: var(--wp--preset--font-size--medium) !important;
	}
}

/* NEXT-34: the renovated hall (2026) under "Astăzi", so the timeline ends on the room as it is now. */
body.is-page-istoric .history-today__photo {
	margin-block: 1.5rem 0;
}

body.is-page-istoric .history-today__photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}
