.le-timeline {
	/* Where the active slide comes to rest, measured from the left edge of the page. */
	--le-timeline-start: 14.9375rem;
	--le-timeline-gap: 3.3125rem;
	/* How far the year's title hangs out to the left of its marker. */
	--le-timeline-hang: 3.5625rem;
	/* How far the solid part of the line reaches in from the left edge. */
	--le-timeline-solid: 27.0625rem;

	position: relative;
	display: grid;
	align-items: center;
	min-height: 50rem;
	/* Slightly uneven, to put the line where the mockup has it. */
	padding-block: 10.1875rem 9.8125rem;
	overflow: hidden;
	color: var(--le-black);
	background: var(--le-100);
}

/* Out of the flow, so the row of slides alone is centred in the section. */
.le-timeline__header {
	position: absolute;
	inset: 0 0 auto;
}

.le-timeline__heading {
	position: absolute;
	top: 1.5rem;
	left: var(--le-gutter);
}

.le-timeline__arrows {
	position: absolute;
	z-index: 2;
	top: 6.875rem;
	right: 1.75rem;
}

/* White buttons, since the section itself is the buttons' usual grey. */
.le-timeline .le-arrow,
.le-timeline .le-arrow:disabled {
	background: var(--le-white);
}

.le-timeline .le-arrow:not(:disabled):is(:hover, :focus) {
	background: var(--le-200);
}

.le-timeline__stage {
	position: relative;
	/* A grid item would otherwise grow to fit the whole row of slides. */
	min-width: 0;
}

/* The timeline itself: dotted across the page, solid up to where we are. Both stay put while the slides move. */
.le-timeline__line,
.le-timeline__solid {
	position: absolute;
	top: 50%;
	left: 0;
	height: 0;
}

.le-timeline__line {
	right: 0;
	border-top: 1px dotted var(--le-400);
}

.le-timeline__solid {
	width: var(--le-timeline-solid);
	border-top: 1px solid var(--le-black);
}

.le-timeline__swiper {
	overflow: visible;
}

.le-timeline__swiper .swiper-wrapper {
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.le-timeline__swiper .swiper-slide {
	width: auto;
	height: auto;
}

/* Before Swiper starts (and if it can't), the row is still spaced and scrollable. */
.le-timeline__swiper:not(.swiper-initialized) {
	padding-left: var(--le-timeline-start);
	overflow-x: auto;
}

.le-timeline__swiper:not(.swiper-initialized) .swiper-slide {
	margin-right: var(--le-timeline-gap);
}

/*
 * A year: title above the line, marker on it, description below. The outer rows are equal,
 * so the marker always sits at the slide's middle, which is where the line is.
 */
.le-timeline__swiper .le-timeline__year {
	display: grid;
	grid-template-rows: 1fr auto 1fr;
	justify-items: start;
	box-sizing: content-box;
	width: 20.625rem;
	padding-right: 1.6875rem;
	padding-left: var(--le-timeline-hang);
}

.le-timeline__title {
	align-self: end;
	margin: 0 0 2.1875rem calc(var(--le-timeline-hang) * -1);
	font-family: var(--le-font-mono);
	font-size: 3.125rem;
	font-weight: 300;
	line-height: 1;
	letter-spacing: 0.02em;
	color: inherit;
	text-box: trim-both cap alphabetic;
}

.le-timeline__marker {
	width: 0.6875rem;
	height: 0.6875rem;
	background: var(--le-blue);
}

.le-timeline__text {
	align-self: start;
	margin: 2.1875rem 0 0;
	color: var(--le-600);
}

/* An image: its height comes from the slide, its width from the picture's own shape. */
.le-timeline__image {
	height: var(--h) !important;
	aspect-ratio: var(--ratio);
	background: var(--le-200);
}

.le-timeline__image img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	/* Dragging the row shouldn't pick the picture up. */
	pointer-events: none;
	user-select: none;
}

@media (max-width: 880px) {
	.le-timeline {
		--le-timeline-start: var(--le-gutter);
		--le-timeline-hang: 0rem;
		--le-timeline-solid: 4.25rem;

		min-height: 41.3125rem;
		padding-block: 4rem 5.8125rem;
	}

	.le-timeline__arrows {
		top: 4.5625rem;
		right: var(--le-gutter);
	}

	.le-timeline__swiper .le-timeline__year {
		width: 15.0625rem;
		padding-right: 0.5rem;
	}

	.le-timeline__marker {
		margin-left: 3.25rem;
	}
}
