/**
 * LPM Timeline — frontend styles
 */

.lpm-timeline {
	--lpm-font: "Segoe UI", system-ui, -apple-system, sans-serif;
	--lpm-title-color: #1e5a8a;
	--lpm-track-min-width: 1100px;
	--lpm-px-per-year: 108;
	--lpm-axis-height: 6px;
	--lpm-period-bracket-height: 56px;
	--lpm-document-card-width: 200px;
	--lpm-milestone-icon-size: 44px;
	--lpm-content-inset: 1.75rem;
	--lpm-chevron-size: 14px;
	--lpm-phase-gap: 2px;
	--lpm-phase-gap-color: #fff;
	--lpm-breakdown-text-indent: calc(30px + 0.45rem);
	/* How far milestones/brackets are pulled toward the axis line (bigger = closer). */
	--lpm-axis-pull: 14px;
	--lpm-axis-wrap-height: 36px;
	--lpm-axis-bar-height: 28px;
	/* Anchor offset for milestones over the thick axis bar — same gap as default pull to axis. */
	--lpm-axis-bar-milestone-offset: calc(
		(var(--lpm-axis-wrap-height) - var(--lpm-axis-bar-height)) / 2
		- (var(--lpm-axis-wrap-height) / 2 - var(--lpm-axis-pull))
	);
	--lpm-years-grid-top: calc(0.85rem * 1.15 + 0.5rem + 1px);
	font-family: var(--lpm-font);
	color: #333;
	margin: 2rem 0;
}

.lpm-timeline__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
	flex-wrap: nowrap;
}

.lpm-timeline__header-text {
	min-width: 0;
	flex: 1 1 auto;
}

.lpm-timeline__title {
	margin: 0;
	font-size: clamp(1.25rem, 3vw, 1.75rem);
	font-weight: 700;
	text-transform: uppercase;
	color: var(--lpm-title-color);
	letter-spacing: 0.02em;
	line-height: 1.2;
}

.lpm-timeline__subtitle {
	margin: 0.35rem 0 0;
	font-size: 0.95rem;
	font-weight: 600;
	text-transform: uppercase;
	color: #5a6a7a;
	letter-spacing: 0.08em;
}

.lpm-timeline__subtitle-decoration {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.45rem;
}

.lpm-timeline__subtitle-decoration-bar {
	display: block;
	width: 2.75rem;
	height: 0.22rem;
	border-radius: 1px;
}

.lpm-timeline__logo {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex: 0 1 auto;
	max-width: min(42%, 20rem);
	min-width: 0;
}

.lpm-timeline__logo img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 4.5rem;
	object-fit: contain;
}

@media (max-width: 640px) {
	.lpm-timeline__header {
		flex-wrap: wrap;
	}

	.lpm-timeline__logo {
		max-width: 100%;
	}
}

.lpm-timeline__scroll-wrap {
	position: relative;
}

.lpm-timeline__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: auto;
	padding-bottom: 0.5rem;
	scrollbar-width: thin;
	scrollbar-color: #b8c2cc transparent;
}

.lpm-timeline__scroll-btn {
	position: absolute;
	top: var(--lpm-scroll-arrow-top, 50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	color: var(--lpm-title-color);
	box-shadow: 0 2px 10px rgba(30, 60, 90, 0.18);
	cursor: pointer;
	transform: translateY(-50%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.lpm-timeline__scroll-btn--prev {
	left: 0.35rem;
}

.lpm-timeline__scroll-btn--next {
	right: 0.35rem;
}

.lpm-timeline__scroll-wrap--can-scroll-left .lpm-timeline__scroll-btn--prev,
.lpm-timeline__scroll-wrap--can-scroll-right .lpm-timeline__scroll-btn--next {
	opacity: 1;
	pointer-events: auto;
}

.lpm-timeline__scroll-btn:hover {
	background: #fff;
	box-shadow: 0 3px 14px rgba(30, 60, 90, 0.24);
}

.lpm-timeline__scroll-btn:focus {
	outline: none;
}

.lpm-timeline__scroll-btn:focus-visible {
	background: #fff;
	box-shadow: 0 3px 14px rgba(30, 60, 90, 0.24);
}

.lpm-timeline__scroll-btn-icon {
	display: block;
	width: 0.55rem;
	height: 0.55rem;
	border: solid currentColor;
	border-width: 0 2px 2px 0;
}

.lpm-timeline__scroll-btn--prev .lpm-timeline__scroll-btn-icon {
	transform: rotate(135deg);
	margin-left: 0.2rem;
}

.lpm-timeline__scroll-btn--next .lpm-timeline__scroll-btn-icon {
	transform: rotate(-45deg);
	margin-right: 0.2rem;
}

@media (prefers-reduced-motion: reduce) {
	.lpm-timeline__scroll {
		scroll-behavior: auto;
	}

	.lpm-timeline__scroll-btn {
		transition: none;
	}
}

.lpm-timeline__track {
	position: relative;
	min-width: max(var(--lpm-track-min-width), calc(var(--lpm-year-count, 12) * var(--lpm-px-per-year) * 1px));
	padding-bottom: 1.25rem;
}

.lpm-timeline__track--months {
	--lpm-years-grid-top: calc(0.85rem * 1.15 + 0.25rem);
}

.lpm-timeline__track--quarters,
.lpm-timeline__track--quarter_months {
	--lpm-years-grid-top: calc(0.85rem * 1.15 + 0.25rem);
}

.lpm-timeline__plot-area {
	position: relative;
	padding: 0 var(--lpm-content-inset);
}

.lpm-timeline__plot {
	position: relative;
	z-index: 1;
	overflow: visible;
}

.lpm-timeline__track--compressed {
	min-width: var(--lpm-track-min-width, 1100px);
}

.lpm-timeline__track--compressed .lpm-timeline__years,
.lpm-timeline__track--compressed .lpm-timeline__year-borders {
	grid-template-columns: var(--lpm-year-grid-columns);
}

.lpm-timeline__year--compressed {
	container-type: inline-size;
}

.lpm-timeline__year--compressed .lpm-timeline__year-label {
	opacity: 0.7;
	font-size: clamp(0.55rem, 9cqw, 0.85rem);
}

.lpm-timeline__year--compressed .lpm-timeline__sub-axis {
	letter-spacing: 0;
}

.lpm-timeline__year--compressed .lpm-timeline__sub-axis span {
	overflow: hidden;
	white-space: nowrap;
	font-size: 0.48rem;
	line-height: 1.2;
}

/* Year grid */
.lpm-timeline__years {
	display: grid;
	grid-template-columns: repeat(var(--lpm-year-count, 12), 1fr);
	border-bottom: 1px solid #e0e4e8;
	padding-bottom: 0.5rem;
	margin-bottom: 0.75rem;
}

.lpm-timeline__year {
	text-align: center;
	font-size: 0.7rem;
	color: #6b7c8f;
}

.lpm-timeline__year-label {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	position: relative;
	z-index: 1;
	font-weight: 700;
	font-size: 0.85rem;
	color: #4a5a6a;
	margin-bottom: 0.25rem;
	min-height: calc(0.85rem * 1.15);
	line-height: 1.15;
}

.lpm-timeline__sub-axis {
	display: grid;
	grid-template-columns: repeat(var(--lpm-sub-axis-columns, 4), 1fr);
	gap: 0.35rem;
	padding: 0 0.15rem;
	position: relative;
	z-index: 1;
	font-size: 0.6rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.lpm-timeline__sub-axis--months {
	gap: 0;
	padding: 0;
	font-size: 0.48rem;
	letter-spacing: 0;
	align-items: end;
	min-height: calc(0.48rem * 1.2);
	line-height: 1.2;
}

.lpm-timeline__sub-axis--quarters,
.lpm-timeline__sub-axis--quarter_months {
	gap: 0.35rem;
}

.lpm-timeline__years--simple .lpm-timeline__year-label {
	margin-bottom: 0;
}

.lpm-timeline__year-borders {
	display: grid;
	grid-template-columns: repeat(var(--lpm-year-count, 12), 1fr);
	position: absolute;
	top: var(--lpm-years-grid-top);
	bottom: 0;
	left: var(--lpm-content-inset);
	right: var(--lpm-content-inset);
	pointer-events: none;
	z-index: 0;
}

.lpm-timeline__year-border-slot:not(:first-child) {
	border-left: 1px solid #b8c2cc;
}

.lpm-timeline__grid-lines {
	position: absolute;
	top: var(--lpm-years-grid-top);
	bottom: 0;
	left: var(--lpm-content-inset);
	right: var(--lpm-content-inset);
	pointer-events: none;
	z-index: 0;
}

.lpm-timeline__grid-line {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	transform: translateX(-50%);
}

.lpm-timeline__grid-line--sub {
	background: #e8ecef;
}

/* Milestone rows */
.lpm-timeline__milestones-above,
.lpm-timeline__milestones-below {
	position: relative;
	height: 140px;
	overflow: visible;
}

.lpm-timeline__milestones-below {
	height: 120px;
	margin-top: 0.25rem;
}

.lpm-timeline__milestone {
	position: absolute;
	transform: translateX(calc(-50% + var(--lpm-collision-offset, 0px)));
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	max-width: 140px;
	z-index: 1;
	overflow: visible;
}

.lpm-timeline__milestone--above {
	bottom: calc(var(--lpm-axis-pull) * -1);
	flex-direction: column-reverse;
}

.lpm-timeline__milestone--below {
	top: calc(var(--lpm-axis-pull) * -1);
}

/* Don't pull milestones into the thick axis bar — keep them above/below it instead. */
.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--above {
	bottom: 4px;
}

.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--below {
	top: 4px;
}

.lpm-timeline__milestone--disconnected.lpm-timeline__milestone--above {
	bottom: var(--lpm-axis-pull);
}

.lpm-timeline__milestone--disconnected.lpm-timeline__milestone--below {
	top: var(--lpm-axis-pull);
}

.lpm-timeline__milestone--disconnected.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--above {
	bottom: var(--lpm-axis-pull);
}

.lpm-timeline__milestone--disconnected.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--below {
	top: var(--lpm-axis-pull);
}

.lpm-timeline__milestone-date {
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--lpm-milestone-color, #1e5a8a);
	letter-spacing: 0.04em;
	margin: 0.25rem 0;
	white-space: nowrap;
}

.lpm-timeline__milestone-connector {
	display: block;
	position: relative;
	width: 0;
	height: 28px;
	overflow: visible;
	flex-shrink: 0;
	z-index: 0;
}

.lpm-timeline__milestone-connector svg {
	position: absolute;
	top: 0;
	left: 50%;
	height: 28px;
	display: block;
	overflow: visible;
	pointer-events: none;
}

/* Elbow paths extend into the icon so they can meet the circle on the side. */
.lpm-timeline__milestone-connector--elbow svg {
	overflow: visible;
}

.lpm-timeline__milestone-connector-elbow {
	position: absolute;
	overflow: visible;
	pointer-events: none;
	z-index: 0;
}

.lpm-timeline__milestone-connector-spacer {
	display: block;
	width: 0;
	height: 28px;
	flex-shrink: 0;
}

.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--connector-elbow-js .lpm-timeline__milestone-date {
	margin-bottom: 0;
}

/* Match icon height with normal milestones while keeping the date on the axis bar. */
.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--connector-elbow-js.lpm-timeline__milestone--above .lpm-timeline__milestone-link {
	transform: translateY(calc(var(--lpm-axis-pull) + 4px));
}

.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--connector-elbow-js.lpm-timeline__milestone--below .lpm-timeline__milestone-link {
	transform: translateY(calc((var(--lpm-axis-pull) + 4px) * -1));
}

.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--connector-elbow-js.lpm-timeline__milestone--above:not(:has(.lpm-timeline__milestone-link)) .lpm-timeline__milestone-icon,
.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--connector-elbow-js.lpm-timeline__milestone--above:not(:has(.lpm-timeline__milestone-link)) .lpm-timeline__milestone-label {
	transform: translateY(calc(var(--lpm-axis-pull) + 4px));
}

.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--connector-elbow-js.lpm-timeline__milestone--below:not(:has(.lpm-timeline__milestone-link)) .lpm-timeline__milestone-icon,
.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--connector-elbow-js.lpm-timeline__milestone--below:not(:has(.lpm-timeline__milestone-link)) .lpm-timeline__milestone-label {
	transform: translateY(calc((var(--lpm-axis-pull) + 4px) * -1));
}

.lpm-timeline__milestone--connector-elbow {
	z-index: 3;
}

.lpm-timeline__milestone--over-axis-bar {
	z-index: 4;
}

.lpm-timeline__milestone--over-axis-bar.lpm-timeline__milestone--connector-elbow-js {
	z-index: 6;
}

.lpm-timeline__milestone-link,
.lpm-timeline__milestone-icon,
.lpm-timeline__milestone-label,
.lpm-timeline__milestone-date {
	position: relative;
	z-index: 2;
}

.lpm-timeline__milestone-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--lpm-milestone-icon-size);
	height: var(--lpm-milestone-icon-size);
	border: 2px solid;
	border-radius: 50%;
	background: #fff;
	box-sizing: border-box;
	position: relative;
	z-index: 2;
}

.lpm-timeline__milestone--tentative .lpm-timeline__milestone-icon {
	border-style: dotted;
}

.lpm-timeline__milestone-icon svg {
	width: 22px;
	height: 22px;
}

.lpm-timeline__milestone-icon .lpm-icon-img {
	width: 22px;
	height: 22px;
	object-fit: contain;
}

.lpm-timeline__milestone-label {
	font-size: 0.7rem;
	font-weight: 600;
	line-height: 1.25;
	color: #2a3a4a;
	margin-top: 0.35rem;
	max-width: 130px;
}

.lpm-timeline__milestone--above .lpm-timeline__milestone-label {
	margin-top: 0;
	margin-bottom: 0.35rem;
}

.lpm-timeline__milestone-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	max-width: 130px;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	border-radius: 6px;
}

.lpm-timeline__milestone--above .lpm-timeline__milestone-link {
	flex-direction: column-reverse;
}

.lpm-timeline__milestone-link .lpm-timeline__milestone-label {
	text-decoration: underline;
	text-decoration-color: rgba(42, 58, 74, 0.35);
	text-underline-offset: 2px;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.lpm-timeline__milestone-link .lpm-timeline__milestone-label::after {
	content: "↗";
	display: inline-block;
	margin-left: 0.12em;
	font-size: 0.85em;
	line-height: 1;
	opacity: 0.7;
	vertical-align: baseline;
}

.lpm-timeline__milestone-link .lpm-timeline__milestone-icon {
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.lpm-timeline__milestone-link:hover .lpm-timeline__milestone-label,
.lpm-timeline__milestone-link:focus-visible .lpm-timeline__milestone-label {
	color: var(--lpm-milestone-color, #1e5a8a);
	text-decoration-color: currentColor;
}

.lpm-timeline__milestone-link:hover .lpm-timeline__milestone-icon,
.lpm-timeline__milestone-link:focus-visible .lpm-timeline__milestone-icon {
	transform: scale(1.06);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	background-color: color-mix(in srgb, var(--lpm-milestone-color, #1e5a8a) 10%, #fff);
}

.lpm-timeline__milestone-link:focus-visible {
	outline: 2px solid var(--lpm-milestone-color, #1e5a8a);
	outline-offset: 3px;
}

/* Period rows */
/*
 * These bands are collapsed to zero height so a period bracket that only spans
 * one part of the timeline doesn't push every milestone up/down. The brackets
 * are absolutely positioned and overlay the gap next to the axis instead.
 */
.lpm-timeline__periods-above,
.lpm-timeline__periods-below {
	position: relative;
	height: 0;
	z-index: 2;
}

.lpm-timeline__period {
	position: absolute;
	height: 100%;
	box-sizing: border-box;
}

.lpm-timeline__period--axis {
	top: 50%;
	height: auto;
	transform: translateY(-50%);
	z-index: 1;
}

.lpm-timeline__period--above.lpm-timeline__period--bracket {
	bottom: calc(var(--lpm-axis-pull) * -1);
	height: auto;
}

.lpm-timeline__period--below.lpm-timeline__period--bracket {
	top: calc(var(--lpm-axis-pull) * -1);
	height: auto;
}

.lpm-timeline__period-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--lpm-axis-bar-height);
	border-radius: 4px;
	color: #fff;
	text-decoration: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.lpm-timeline__period-bar-label {
	font-size: 0.62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 0 0.75rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lpm-timeline__period--bracket {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.lpm-timeline__period--above.lpm-timeline__period--bracket {
	flex-direction: column-reverse;
}

.lpm-timeline__period-bracket {
	display: flex;
	align-items: center;
	width: 100%;
	height: 10px;
}

/* Above the axis: horizontal bar on top, caps drop down toward the axis. */
.lpm-timeline__period--above .lpm-timeline__period-bracket {
	align-items: flex-start;
}

/* Below the axis: horizontal bar on the bottom, caps rise up toward the axis. */
.lpm-timeline__period--below .lpm-timeline__period-bracket {
	align-items: flex-end;
}

.lpm-timeline__period-bracket-line {
	flex: 1;
	height: 2px;
}

.lpm-timeline__period-bracket-cap {
	width: 0;
	height: 10px;
	border-left: 2px solid;
}

.lpm-timeline__period--above .lpm-timeline__period-bracket-cap--start,
.lpm-timeline__period--above .lpm-timeline__period-bracket-cap--end {
	align-self: flex-start;
}

.lpm-timeline__period--below .lpm-timeline__period-bracket-cap--start,
.lpm-timeline__period--below .lpm-timeline__period-bracket-cap--end {
	align-self: flex-end;
}

.lpm-timeline__period-label {
	font-size: 0.62rem;
	font-weight: 600;
	line-height: 1.2;
	color: #2a3a4a;
	text-align: center;
	max-width: 100%;
	padding: 0.2rem 0.25rem 0;
	text-decoration: none;
}

.lpm-timeline__period--above .lpm-timeline__period-label {
	padding: 0 0.25rem 0.2rem;
}

.lpm-timeline__period--linked .lpm-timeline__period-label {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.lpm-timeline__period--linked .lpm-timeline__period-label::after {
	content: "↗";
	margin-left: 0.1em;
	font-size: 0.85em;
}

/* Axis */
.lpm-timeline__axis-wrap {
	position: relative;
	height: var(--lpm-axis-wrap-height);
}

.lpm-timeline__axis {
	position: relative;
	height: var(--lpm-axis-height);
	top: 50%;
	transform: translateY(-50%);
	border-radius: 3px;
	overflow: visible;
}

.lpm-timeline__axis-segment {
	position: absolute;
	top: 0;
	height: 100%;
}

.lpm-timeline__axis-segment--last {
	border-radius: 0 3px 3px 0;
}

.lpm-timeline__axis-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border: 8px solid transparent;
	border-left: 14px solid #c43d3d;
	margin-left: 2px;
	pointer-events: none;
}

.lpm-timeline__axis-dot {
	position: absolute;
	top: 50%;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	/* Ring is a slightly darker shade of the dot colour (blended when a date carries
	   more than one milestone type). Falls back to white where no colour is set. */
	box-shadow: 0 0 0 2px var(--lpm-dot-ring, #fff);
}

/* Phase chevrons — width matches phase date span */
.lpm-timeline__phases {
	position: relative;
	min-height: 92px;
	margin-top: 2rem;
}

/* Milestone type legend (between phases and breakdown panel) */
.lpm-timeline__milestone-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.5rem 1.5rem;
	margin: 0.45rem 0 0.7rem;
	padding: 0.15rem 0.5rem;
	/* JS keeps this centered in the visible viewport during horizontal scroll. */
	will-change: transform;
}

.lpm-timeline__milestone-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.58rem;
	font-weight: 600;
	line-height: 1.2;
	color: #2a3a4a;
}

.lpm-timeline__milestone-legend-swatch {
	flex-shrink: 0;
	width: 11px;
	height: 11px;
	border: 2px solid var(--lpm-legend-color, #0066cc);
	border-radius: 50%;
	background: #fff;
	box-sizing: border-box;
}

.lpm-timeline__milestone-legend-label {
	white-space: nowrap;
}

.lpm-timeline__phase {
	position: absolute;
	top: 0;
	height: 100%;
	min-height: 92px;
	box-sizing: border-box;
	z-index: calc(var(--lpm-phase-index, 0) + 1);
	left: calc(var(--lpm-left-pct) * 1%);
	width: calc(var(--lpm-width-pct) * 1%);
}

/* Chevron notches need ~14px overlap between consecutive phases. */
.lpm-timeline__phase:not(:first-child) {
	left: calc(var(--lpm-left-pct) * 1% - var(--lpm-chevron-size));
	width: calc(var(--lpm-width-pct) * 1% + var(--lpm-chevron-size));
}

.lpm-timeline__phase-inner {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	height: 100%;
	min-height: 92px;
	padding: 0.55rem 1.35rem 0.55rem 0.75rem;
	color: #fff;
	clip-path: polygon(0 0, calc(100% - var(--lpm-chevron-size)) 0, 100% 50%, calc(100% - var(--lpm-chevron-size)) 100%, 0 100%, var(--lpm-chevron-size) 50%);
	font-size: 0.58rem;
	line-height: 1.2;
	box-sizing: border-box;
	overflow: hidden;
}

.lpm-timeline__phase:first-child .lpm-timeline__phase-inner {
	clip-path: polygon(0 0, calc(100% - var(--lpm-chevron-size)) 0, 100% 50%, calc(100% - var(--lpm-chevron-size)) 100%, 0 100%);
	padding-left: 0.75rem;
}

/* Left notch sits chevron-size inward at mid-height; add that to padding so content aligns with phase 1. */
.lpm-timeline__phase:not(:first-child) .lpm-timeline__phase-inner {
	padding-left: calc(0.75rem + var(--lpm-chevron-size));
}

/*
 * Draw the phase gap explicitly over the overlap. This makes the chevron edge
 * visible even when adjacent phases use the same colour.
 */
.lpm-timeline__phase:not(:first-child)::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	width: calc(var(--lpm-chevron-size) + var(--lpm-phase-gap));
	background: var(--lpm-phase-gap-color);
	clip-path: polygon(
		0 0,
		var(--lpm-phase-gap) 0,
		100% 50%,
		var(--lpm-phase-gap) 100%,
		0 100%,
		var(--lpm-chevron-size) 50%
	);
	pointer-events: none;
}

/* Transparent bar: no fill / gap overlay; icon + text use phase color. */
.lpm-timeline__phase--transparent .lpm-timeline__phase-inner {
	background-color: transparent;
	color: var(--lpm-phase-color);
	clip-path: none;
}

.lpm-timeline__phase--transparent .lpm-timeline__phase-icon {
	color: var(--lpm-phase-color);
}

.lpm-timeline__phase--transparent:not(:first-child)::before {
	content: none;
}

.lpm-timeline__phase-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	color: #fff;
}

.lpm-timeline__phase-icon svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.lpm-timeline__phase-icon .lpm-icon-img {
	width: 24px;
	height: 24px;
}

.lpm-timeline__phase-text {
	display: flex;
	flex-direction: column;
	gap: 0.08rem;
	min-width: 0;
	flex: 1;
}

.lpm-timeline__phase-number {
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.lpm-timeline__phase-title {
	font-weight: 600;
	text-transform: uppercase;
	line-height: 1.15;
	overflow-wrap: break-word;
}

.lpm-timeline__phase-dates {
	opacity: 0.92;
	font-size: 0.55rem;
	white-space: nowrap;
}

/* Phase breakdown panel */
.lpm-timeline__breakdown-panel {
	margin-top: 0.65rem;
	border: 1px solid #d0d8e0;
	border-radius: 6px;
	background: #fff;
	overflow: visible;
}

.lpm-timeline__breakdown-grid {
	position: relative;
	min-height: 160px;
}

.lpm-timeline__breakdown-col {
	position: absolute;
	top: 0;
	box-sizing: border-box;
	z-index: calc(var(--lpm-phase-index, 0) + 1);
	left: calc(var(--lpm-left-pct) * 1%);
	width: calc(var(--lpm-width-pct) * 1%);
	max-width: calc(var(--lpm-width-pct) * 1%);
	padding: 0.75rem 0.65rem 0.85rem;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	height: auto;
	min-width: 0;
	background: #fff;
	isolation: isolate;
}

.lpm-timeline__breakdown-col:not(:last-child) {
	padding-right: calc(0.65rem + var(--lpm-chevron-size));
}

/*
 * Full-height vertical separator between breakdown columns, aligned with the
 * column content edge. A pseudo-element is used because the previous column's
 * own right border is hidden under the next (overlapping) column's background.
 */
.lpm-timeline__breakdown-col:not(:first-child)::before {
	content: "";
	position: absolute;
	top: 0.75rem;
	bottom: 0.85rem;
	/* Align with the phase boundary (chevron notch) above, not the content edge. */
	left: var(--lpm-chevron-size);
	width: 1px;
	background: #c2ccd6;
	pointer-events: none;
}

.lpm-timeline__breakdown-entries-wrap,
.lpm-timeline__breakdown-header,
.lpm-timeline__breakdown-pillar,
.lpm-timeline__breakdown-rcm {
	width: 100%;
	max-width: var(--lpm-breakdown-content-max, 100%);
	box-sizing: border-box;
	min-width: 0;
}

.lpm-timeline__breakdown-col:not(:first-child) {
	left: calc(var(--lpm-left-pct) * 1% - var(--lpm-chevron-size));
	width: calc(var(--lpm-width-pct) * 1% + var(--lpm-chevron-size));
	max-width: calc(var(--lpm-width-pct) * 1% + var(--lpm-chevron-size));
	padding-left: calc(0.65rem + var(--lpm-chevron-size));
}

.lpm-timeline__breakdown-header {
	display: flex;
	align-items: flex-start;
	gap: 0.45rem;
	padding-bottom: 0.6rem;
	margin-bottom: 0.6rem;
	border-bottom: 1px solid #e0e4e8;
	min-width: 0;
	box-sizing: border-box;
}

.lpm-timeline__breakdown-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	margin-top: 0.05rem;
	color: var(--lpm-phase-color);
}

.lpm-timeline__breakdown-icon svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

.lpm-timeline__breakdown-icon .lpm-icon-img {
	width: 28px;
	height: 28px;
}

.lpm-timeline__breakdown-heading {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
}

.lpm-timeline__breakdown-phase-number {
	font-size: 0.64rem;
	font-weight: 800;
	text-transform: uppercase;
	color: #1a2430;
	letter-spacing: 0.03em;
	line-height: 1.15;
}

.lpm-timeline__breakdown-phase-title {
	font-size: 0.64rem;
	font-weight: 800;
	text-transform: uppercase;
	line-height: 1.2;
	color: #1a2430;
	min-width: 0;
	overflow-wrap: anywhere;
}

.lpm-timeline__breakdown-phase-dates {
	font-size: 0.6rem;
	font-weight: 700;
	color: var(--lpm-phase-color);
}

.lpm-timeline__breakdown-entries-wrap {
	box-sizing: border-box;
	min-width: 0;
	/* Indent dates so they line up with the heading text (past the header icon). */
	padding-left: var(--lpm-breakdown-text-indent, calc(24px + 0.45rem));
	/* Breathing room so the last entry doesn't touch the pillar divider. */
	margin-bottom: 0.7rem;
}

.lpm-timeline__breakdown-entries {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	width: 100%;
	min-width: 0;
}

.lpm-timeline__breakdown-entry {
	display: flex;
	flex-direction: row;
	align-items: baseline;
	gap: 0.4rem;
	font-size: 0.6rem;
	line-height: 1.35;
	width: 100%;
	min-width: 0;
}

.lpm-timeline__breakdown-entry-date {
	flex-shrink: 0;
	font-weight: 800;
	text-transform: uppercase;
	color: #1a2430;
	white-space: nowrap;
	overflow: visible;
	text-overflow: clip;
}

.lpm-timeline__breakdown-entry-link {
	flex: 1 1 auto;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}

.lpm-timeline__breakdown-entry-link:hover .lpm-timeline__breakdown-entry-label,
.lpm-timeline__breakdown-entry-link:focus-visible .lpm-timeline__breakdown-entry-label {
	color: var(--lpm-title-color);
	text-decoration: underline;
}

.lpm-timeline__breakdown-entry-link:focus-visible {
	outline: 2px solid var(--lpm-title-color);
	outline-offset: 2px;
	border-radius: 2px;
}

.lpm-timeline__breakdown-entry-link .lpm-timeline__breakdown-entry-label::after {
	content: "\00a0";
	display: inline-block;
	width: 0.72rem;
	height: 0.72rem;
	vertical-align: -0.1em;
	opacity: 0.85;
	background-color: var(--lpm-title-color);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zm-2 4H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7h-2v7H5V9h7V7z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42 9.3-9.29H14V3zm-2 4H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7h-2v7H5V9h7V7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.lpm-timeline__breakdown-entry-link .lpm-timeline__breakdown-entry-label {
	overflow-wrap: break-word;
	word-break: normal;
}

.lpm-timeline__breakdown-entry-label {
	display: inline;
	color: #2a3a4a;
	font-weight: 400;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.lpm-timeline__breakdown-entry > .lpm-timeline__breakdown-entry-label {
	flex: 1 1 auto;
	min-width: 0;
}

/* Strategic pillar (inside phase column) */
.lpm-timeline__breakdown-pillar {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 0.45rem;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding-top: 0.65rem;
	border-top: 1px solid #e0e4e8;
	box-sizing: border-box;
	flex-shrink: 0;
}


.lpm-timeline__breakdown-pillar-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	margin-top: 0.05rem;
	color: var(--lpm-title-color);
}

.lpm-timeline__breakdown-pillar-icon svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

.lpm-timeline__breakdown-pillar-icon .lpm-icon-img {
	width: 28px;
	height: 28px;
}

.lpm-timeline__breakdown-pillar-text {
	display: flex;
	flex-direction: column;
	gap: 0.12rem;
	min-width: 0;
	max-width: 100%;
	flex: 1;
	text-align: left;
}

.lpm-timeline__breakdown-pillar-headline {
	display: block;
	font-size: 0.6rem;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--lpm-title-color);
	line-height: 1.25;
	min-width: 0;
	max-width: 100%;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.lpm-timeline__breakdown-pillar-subtitle {
	display: block;
	font-size: 0.54rem;
	line-height: 1.35;
	color: #4a7aa8;
	min-width: 0;
	max-width: 100%;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* RCM panel (white box below phase breakdown; title sticks while columns scroll) */
.lpm-timeline__rcm-panel {
	position: relative;
	margin-top: 0.85rem;
	border: 1px solid #d0d8e0;
	border-radius: 6px;
	background: #fff;
	overflow: visible;
}

/*
 * Sticky chrome must be narrower than the panel (scrollport width via JS).
 * width: 100% of the panel cancels horizontal sticky.
 */
.lpm-timeline__rcm-panel-chrome {
	position: sticky;
	left: var(--lpm-content-inset);
	z-index: 4;
	box-sizing: border-box;
	width: var(--lpm-rcm-sticky-width, max-content);
	max-width: 100%;
	margin: 0;
	padding: 0.75rem 0.85rem 0.6rem;
	background: #fff;
	border-bottom: 1px solid #e0e4e8;
}

.lpm-timeline__rcm-panel-title {
	margin: 0;
	/* Match .lpm-timeline__breakdown-phase-title (reset theme h3 styles). */
	font-family: var(--lpm-font);
	font-size: 0.64rem;
	font-weight: 800;
	font-style: normal;
	line-height: 1.2;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #1a2430;
}

.lpm-timeline__rcm-grid {
	position: relative;
	min-height: 0;
	padding: 0 0 0.75rem;
}

.lpm-timeline__rcm-col {
	position: absolute;
	top: 0;
	box-sizing: border-box;
	z-index: calc(var(--lpm-phase-index, 0) + 1);
	left: calc(var(--lpm-left-pct) * 1%);
	width: calc(var(--lpm-width-pct) * 1%);
	max-width: calc(var(--lpm-width-pct) * 1%);
	/* Absolute cols ignore parent padding — pad here so cards clear the title divider. */
	padding: 0.85rem 0.65rem 0;
	min-width: 0;
	background: #fff;
	isolation: isolate;
}

.lpm-timeline__rcm-col:not(:last-child) {
	padding-right: calc(0.65rem + var(--lpm-chevron-size));
}

/*
 * Vertical separators between RCM phase columns — same approach as the
 * breakdown panel (drawn on the next column so overlap doesn't hide them).
 */
.lpm-timeline__rcm-col:not(:first-child)::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--lpm-chevron-size);
	width: 1px;
	background: #c2ccd6;
	pointer-events: none;
}

.lpm-timeline__rcm-col:not(:first-child) {
	left: calc(var(--lpm-left-pct) * 1% - var(--lpm-chevron-size));
	width: calc(var(--lpm-width-pct) * 1% + var(--lpm-chevron-size));
	max-width: calc(var(--lpm-width-pct) * 1% + var(--lpm-chevron-size));
	padding-left: calc(0.65rem + var(--lpm-chevron-size));
}

.lpm-timeline__breakdown-rcm {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.45rem;
	width: 100%;
	max-width: var(--lpm-breakdown-content-max, 100%);
	min-width: 0;
	flex-shrink: 0;
}

.lpm-timeline__rcm-card {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	background: #f7f9fb;
	border: 1px solid #dce3ea;
	border-left: 3px solid var(--lpm-title-color);
	border-radius: 4px;
	padding: 0.4rem 0.45rem;
	text-align: left;
	min-width: 0;
	overflow: visible;
	contain: inline-size;
}

.lpm-timeline__rcm-summary {
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
	width: 100%;
	min-width: 0;
	cursor: pointer;
	list-style: none;
}

.lpm-timeline__rcm-summary::-webkit-details-marker {
	display: none;
}

.lpm-timeline__rcm-summary:focus {
	outline: none;
}

.lpm-timeline__rcm-summary:focus-visible {
	outline: 2px solid var(--lpm-title-color);
	outline-offset: 2px;
	border-radius: 2px;
}

.lpm-timeline__rcm-card--no-body .lpm-timeline__rcm-summary {
	cursor: default;
}

.lpm-timeline__rcm-heading {
	display: flex;
	flex: 1 1 auto;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.15rem 0.4rem;
	min-width: 0;
}

.lpm-timeline__rcm-date {
	flex: 0 0 auto;
	font-size: 0.54rem;
	font-weight: 700;
	text-transform: uppercase;
	color: #6b7c8f;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.lpm-timeline__rcm-title {
	display: block;
	font-size: 0.56rem;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--lpm-title-color);
	line-height: 1.25;
	min-width: 0;
	max-width: 100%;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.lpm-timeline__rcm-link {
	display: inline;
	min-width: 0;
	max-width: 100%;
	text-decoration: none;
	color: inherit;
}

.lpm-timeline__rcm-link:hover .lpm-timeline__rcm-title,
.lpm-timeline__rcm-link:focus-visible .lpm-timeline__rcm-title {
	text-decoration: underline;
}

.lpm-timeline__rcm-card--linked .lpm-timeline__rcm-title::after {
	content: " ↗";
	font-size: 0.9em;
}

.lpm-timeline__rcm-toggle {
	flex: 0 0 auto;
	align-self: center;
	width: 0.5rem;
	height: 0.5rem;
	margin-left: auto;
	border-right: 1.5px solid #6b7c8f;
	border-bottom: 1.5px solid #6b7c8f;
	transform: rotate(45deg);
	transform-origin: center;
	transition: transform 0.15s ease;
}

.lpm-timeline__rcm-card[open] .lpm-timeline__rcm-toggle {
	transform: rotate(-135deg);
}

.lpm-timeline__rcm-body {
	display: block;
	margin: 0.35rem 0 0;
	padding: 0.35rem 0 0;
	border-top: 1px solid #e0e4e8;
	font-size: 0.52rem;
	line-height: 1.4;
	color: #4a5a6a;
	min-width: 0;
	width: 100%;
	max-width: 100%;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	overflow-wrap: anywhere;
	word-break: break-word;
	-webkit-line-clamp: unset;
	line-clamp: unset;
}

/* Prevent theme single-line truncation inside breakdown columns */
.lpm-timeline__breakdown-col .lpm-timeline__breakdown-entry > .lpm-timeline__breakdown-entry-label,
.lpm-timeline__breakdown-col .lpm-timeline__breakdown-pillar-headline,
.lpm-timeline__breakdown-col .lpm-timeline__breakdown-pillar-subtitle,
.lpm-timeline__breakdown-col .lpm-timeline__rcm-title,
.lpm-timeline__breakdown-col .lpm-timeline__rcm-body,
.lpm-timeline__breakdown-col .lpm-timeline__rcm-link {
	white-space: normal !important;
	text-overflow: clip !important;
	overflow: visible !important;
	-webkit-line-clamp: unset !important;
	line-clamp: unset !important;
	display: block;
}

.lpm-timeline__breakdown-col .lpm-timeline__breakdown-entry-link {
	white-space: normal !important;
	text-overflow: clip !important;
	overflow: visible !important;
	-webkit-line-clamp: unset !important;
	line-clamp: unset !important;
}

.lpm-timeline__breakdown-col .lpm-timeline__breakdown-entry-link .lpm-timeline__breakdown-entry-label {
	display: inline !important;
	white-space: normal !important;
	text-overflow: clip !important;
	overflow: visible !important;
	-webkit-line-clamp: unset !important;
	line-clamp: unset !important;
}

.lpm-timeline__breakdown-col .lpm-timeline__breakdown-entry-link .lpm-timeline__breakdown-entry-label::after {
	display: inline-block !important;
	white-space: nowrap !important;
}

.lpm-timeline-error {
	color: #b32d2e;
	padding: 1rem;
	background: #fcf0f1;
	border-left: 4px solid #b32d2e;
}

@media (max-width: 768px) {
	.lpm-timeline__track {
		min-width: max(900px, calc(var(--lpm-year-count, 12) * var(--lpm-px-per-year) * 1px));
	}

	.lpm-timeline__track--compressed {
		min-width: max(900px, var(--lpm-track-min-width, 1100px));
	}

	.lpm-timeline__milestone-label {
		font-size: 0.65rem;
		max-width: 110px;
	}
}
