/**
 * Variant CSS: events--vertical-timeline
 *
 * Upcoming events on a vertical connector line. A continuous hairline runs through
 * the left rail; each node centres a round accent date marker (day + month) on that
 * line, with the time/place, title and one line of copy to its right. Text stays
 * --ink (polarity-aware); dates, time meta, the em and the marker take --accent.
 * The connector is drawn as a pseudo-element on the rail so it survives content
 * edits. Rail collapses but the line stays on mobile.
 */

body.aibt-universal .universal-events--vertical-timeline {
	padding-block: calc(clamp(3rem, 7vw, 5rem) * var(--density, 1));
}

/* Intro. */
body.aibt-universal .universal-events--vertical-timeline .universal-events__intro {
	margin-bottom: clamp(2rem, 4.5vw, 3rem);
}

body.aibt-universal .universal-events--vertical-timeline .universal-events__kicker {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-widest) !important;
	text-transform: uppercase !important;
	color: var(--accent) !important;
	margin: 0 0 var(--space-sm) 0 !important;
}

body.aibt-universal .universal-events--vertical-timeline .universal-events__headline {
	font-family: var(--font-display) !important;
	color: var(--ink) !important;
	margin: 0 0 var(--space-sm) 0 !important;
}

body.aibt-universal .universal-events--vertical-timeline .universal-events__headline em {
	color: var(--accent) !important;
	font-style: italic;
}

body.aibt-universal .universal-events--vertical-timeline .universal-events__deck {
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	color: var(--ink) !important;
	opacity: 0.74;
	margin: 0 !important;
}

/* Timeline column. */
body.aibt-universal .universal-events--vertical-timeline .universal-events__line {
	display: flex !important;
	flex-direction: column;
	gap: clamp(1.6rem, 3.5vw, 2.4rem) !important;
}

/* Node = marker + body on one row. */
body.aibt-universal .universal-events--vertical-timeline .universal-events__node {
	position: relative;
	gap: clamp(1rem, 2.6vw, 1.6rem) !important;
	align-items: flex-start !important;
	flex-wrap: nowrap !important;
}

/* The continuous connector: a hairline behind the markers, centred on the dot. */
body.aibt-universal .universal-events--vertical-timeline .universal-events__node::before {
	content: "";
	position: absolute;
	left: 32px;
	top: 0;
	bottom: calc(-1 * clamp(1.6rem, 3.5vw, 2.4rem));
	width: 2px;
	transform: translateX(-1px);
	background: color-mix(in srgb, var(--accent) 26%, transparent);
	z-index: 0;
}

/* Last node: stop the line at its marker so it doesn't dangle. */
body.aibt-universal .universal-events--vertical-timeline .universal-events__node:last-child::before {
	bottom: auto;
	height: 32px;
}

/* Round date marker, sits on the line. */
body.aibt-universal .universal-events--vertical-timeline .universal-events__dot {
	position: relative;
	z-index: 1;
	flex: 0 0 auto !important;
	width: 64px;
	height: 64px;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	text-align: center;
	background: color-mix(in srgb, var(--accent) 12%, transparent);
	border: 2px solid color-mix(in srgb, var(--accent) 34%, transparent);
	box-shadow: 0 0 0 5px var(--background, #fff);
}

body.aibt-universal .universal-events--vertical-timeline .universal-events__day {
	font-family: var(--font-display) !important;
	font-size: 1.45rem !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	color: var(--ink) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-events--vertical-timeline .universal-events__month {
	font-family: var(--font-body) !important;
	font-size: 0.62rem !important;
	font-weight: 700 !important;
	letter-spacing: var(--tracking-wide) !important;
	text-transform: uppercase !important;
	color: var(--accent) !important;
	margin: 0.1rem 0 0 0 !important;
}

/* Body. */
body.aibt-universal .universal-events--vertical-timeline .universal-events__body {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 0.2rem;
}

body.aibt-universal .universal-events--vertical-timeline .universal-events__meta {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-wide) !important;
	text-transform: uppercase !important;
	color: var(--accent) !important;
	margin: 0 0 0.3rem 0 !important;
}

body.aibt-universal .universal-events--vertical-timeline .universal-events__title {
	font-family: var(--font-display) !important;
	font-size: clamp(1.15rem, 2.2vw, 1.45rem) !important;
	font-weight: 600 !important;
	line-height: 1.22 !important;
	color: var(--ink) !important;
	margin: 0 0 0.35rem 0 !important;
}

body.aibt-universal .universal-events--vertical-timeline .universal-events__desc {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	line-height: var(--leading-relaxed) !important;
	color: var(--ink) !important;
	opacity: 0.7;
	margin: 0 !important;
	max-width: 60ch;
}

/* Mobile: smaller marker, keep the line aligned to it. */
@media (max-width: 640px) {
	body.aibt-universal .universal-events--vertical-timeline .universal-events__node {
		gap: 0.9rem !important;
	}
	body.aibt-universal .universal-events--vertical-timeline .universal-events__dot {
		width: 54px;
		height: 54px;
	}
	body.aibt-universal .universal-events--vertical-timeline .universal-events__node::before {
		left: 27px;
	}
	body.aibt-universal .universal-events--vertical-timeline .universal-events__node:last-child::before {
		height: 27px;
	}
	body.aibt-universal .universal-events--vertical-timeline .universal-events__day {
		font-size: 1.2rem !important;
	}
	/* A5: cap letter-spacing on uppercase at narrow widths. */
	body.aibt-universal .universal-events--vertical-timeline .universal-events__kicker,
	body.aibt-universal .universal-events--vertical-timeline .universal-events__month,
	body.aibt-universal .universal-events--vertical-timeline .universal-events__meta {
		letter-spacing: 0 !important;
	}
}
