/* Automatic opening: one dominant story and three secondary stories. */
.xv-latest-stories {
	--xv-latest-width: min(calc(100vw - 2rem), 82rem);
	box-sizing: border-box;
	width: var(--xv-latest-width);
	margin-inline: calc((100% - var(--xv-latest-width)) / 2);
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
	padding: clamp(1rem, 2.2vw, 2rem);
	background: var(--xv-night);
	color: var(--xv-on-dark);
	/* Flat full-width paint, without adding viewport-width boxes or overflow. */
	box-shadow: 0 0 0 100vmax var(--xv-night);
	clip-path: inset(0 -100vmax);
}

.xv-latest-stories > .xv-feed-heading {
	border-bottom-color: var(--xv-on-dark-muted);
}

.xv-latest-stories > .xv-feed-heading h1 {
	color: var(--xv-on-dark);
}

.xv-latest-stories__grid {
	display: grid;
	gap: 1.5rem;
}

.xv-latest-stories__secondary {
	display: grid;
	grid-auto-rows: 1fr;
	gap: 1rem;
	min-width: 0;
}

.xv-latest-card {
	min-width: 0;
	overflow-wrap: anywhere;
}

.xv-latest-card__body {
	min-width: 0;
}

.xv-latest-card--lead {
	align-self: start;
	background: var(--xv-color-structure);
	color: var(--xv-on-dark);
}

.xv-latest-card--lead .xv-latest-card__body {
	padding: clamp(1rem, 2vw, 1.5rem);
}

.xv-latest-card__category {
	display: inline-block;
	margin-bottom: 0.5rem;
	color: var(--xv-color-brand);
	font-size: 0.8125rem;
	font-weight: var(--xv-font-weight-semibold);
	line-height: 1.4;
	text-decoration: none;
}

.xv-latest-card__category:hover,
.xv-latest-card__category:focus-visible {
	color: var(--xv-color-brand-strong);
	text-decoration: underline;
}

.xv-latest-card__title {
	margin: 0;
	font-size: clamp(1rem, 1.5vw, 1.125rem);
	font-weight: var(--xv-font-weight-semibold);
	line-height: 1.35;
	text-wrap: pretty;
}

.xv-latest-card__title a {
	color: var(--xv-color-heading);
	text-decoration: none;
}

.xv-latest-card__title a:hover,
.xv-latest-card__title a:focus-visible {
	color: var(--xv-color-brand);
	text-decoration: underline;
}

.xv-latest-card--lead .xv-latest-card__title {
	font-size: clamp(1.375rem, 2.8vw, 2rem);
	font-weight: var(--xv-font-weight-bold);
	line-height: 1.2;
	letter-spacing: -0.025em;
}

.xv-latest-card--lead .xv-latest-card__title a {
	color: var(--xv-on-dark);
}

.xv-latest-card--lead .xv-latest-card__title a:hover,
.xv-latest-card--lead .xv-latest-card__title a:focus-visible,
.xv-latest-card--lead .xv-latest-card__category {
	color: var(--xv-color-icon-on-dark);
}

.xv-latest-card--lead .xv-latest-card__category:hover,
.xv-latest-card--lead .xv-latest-card__category:focus-visible {
	color: var(--xv-on-dark);
}

.xv-latest-card__excerpt {
	margin: 0.875rem 0 0;
	color: var(--xv-on-dark-muted);
	font-size: 1rem;
	line-height: 1.6;
}

.xv-latest-card__date {
	display: block;
	margin-top: 0.875rem;
	color: var(--xv-color-muted);
	font-size: 0.8125rem;
	line-height: 1.4;
}

.xv-latest-card--lead .xv-latest-card__date {
	color: var(--xv-on-dark-muted);
}

.xv-latest-card--compact .xv-latest-card__date {
	color: var(--xv-color-text);
}

.xv-latest-card--compact {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	gap: 1rem;
	padding: clamp(1rem, 1.5vw, 1.25rem);
	background: var(--xv-blue-050);
	color: var(--xv-color-text);
}

.xv-latest-card--compact .xv-card-image__placeholder {
	padding: 0.25rem;
	font-size: 0.6875rem;
	line-height: 1.3;
}

/* Horizontal secondary stories: fill the row without stretching the source. */
@media (min-width: 75rem) {
	.xv-latest-card--compact .xv-card-image {
		position: relative;
		align-self: stretch;
		min-height: 8rem;
		aspect-ratio: auto;
		overflow: hidden;
	}

	.xv-latest-card--compact .xv-card-image img,
	.xv-latest-card--compact .xv-card-image__placeholder {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		aspect-ratio: auto;
	}
}

@media (min-width: 48rem) {
	.xv-latest-stories {
		--xv-latest-width: min(calc(100vw - 4rem), 82rem);
	}

	.xv-latest-stories__secondary {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.xv-latest-card--compact {
		display: block;
		padding: 1rem;
	}

	.xv-latest-card--compact .xv-latest-card__body {
		margin-top: 0.875rem;
	}

}

@media (min-width: 75rem) {
	.xv-latest-stories__grid {
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	}

	.xv-latest-stories__grid--single {
		grid-template-columns: minmax(0, 1fr);
	}

	.xv-latest-card--lead {
		display: flex;
		flex-direction: column;
		align-self: stretch;
	}

	.xv-latest-card--lead .xv-card-image {
		position: relative;
		flex: 1 1 auto;
		min-height: clamp(14rem, 24vw, 22rem);
		aspect-ratio: auto;
	}

	.xv-latest-card--lead .xv-card-image img,
	.xv-latest-card--lead .xv-card-image__placeholder {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		aspect-ratio: auto;
		object-fit: cover;
	}

	.xv-latest-stories__secondary {
		grid-template-columns: minmax(0, 1fr);
	}

	.xv-latest-card--compact {
		display: grid;
		grid-template-columns: minmax(0, clamp(9.5rem, 15vw, 12rem)) minmax(0, 1fr);
		padding: 1.25rem;
	}

	.xv-latest-card--compact .xv-latest-card__body {
		margin-top: 0;
	}

}
