/**
 * Front-page news threads.
 *
 * A thread groups articles that share a primary topic. The left bar and the
 * subtle tint follow the site's primary theme colour (--primary-color), so the
 * same markup works for every white-label publication.
 */

.aeon-thread {
	position: relative;
	/* Pull the section out to the same left edge as the full-bleed lead
	   images on the rest of the front page (`.post-thumbnail-col1` uses
	   margin-left: -20px). The right edge is unchanged. */
	margin: 0 0 22px -20px;
	padding-left: 14px;
	border-left: 4px solid var(--primary-color, #69043B);
}

/*
 * The lead image is full-bleed and therefore runs underneath the left bar.
 * Paint the bar again as an overlay so the coloured line stays visible on
 * top of the image instead of being hidden by it.
 */
.aeon-thread::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 5px;
	background: var(--primary-color, #69043B);
	pointer-events: none;
	z-index: 2;
}

.aeon-thread--tinted {
	padding: 14px 14px 10px 16px;
	border-radius: 0 8px 8px 0;
	background: rgba(0, 0, 0, .03);
	background: color-mix(in srgb, var(--primary-color, #69043B) 6%, transparent);
}

.aeon-thread__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 10px;
	padding: 0 0 8px;
	border-bottom: 1px solid rgba(0, 0, 0, .12);
	border-bottom-color: color-mix(in srgb, var(--primary-color, #69043B) 28%, transparent);
}

.aeon-thread__topic {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--primary-color, #69043B);
	font-family: "Libre Franklin", sans-serif;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.3px;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
}

.aeon-thread__topic:hover,
.aeon-thread__topic:focus {
	text-decoration: underline;
}

.aeon-thread__arrow {
	font-size: 13px;
}

.aeon-thread__count {
	color: #8a8a8a;
	font-family: "Roboto", Arial, sans-serif;
	font-size: 11px;
	letter-spacing: .02em;
	line-height: 1.2;
	white-space: nowrap;
}

.aeon-thread__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 0;
	border-top: 1px solid rgba(0, 0, 0, .12);
}

.aeon-thread__item-thumb {
	flex: 0 0 138px;
	display: block;
	max-width: 138px;
}

.aeon-thread__item-thumb img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
}

.aeon-thread__item-body {
	flex: 1 1 auto;
	min-width: 0;
}

/*
 * Full-bleed lead image: cancel the thread's right padding too, so the image
 * matches the full-bleed images elsewhere on the front page. The right-thumb
 * and columnist variants keep their own offsets.
 */
.aeon-thread .post-thumbnail-col1:not(.float-right-thumb):not(.columnistphoto) {
	margin-right: -14px;
}

.aeon-thread__item-title {
	margin: 0 0 3px;
	font-size: 20px;
	line-height: 1.2;
}

.aeon-thread__item-title a {
	color: inherit;
	text-decoration: none;
}

.aeon-thread__item-title a:hover,
.aeon-thread__item-title a:focus {
	text-decoration: underline;
}

.aeon-thread__item-meta {
	margin: 0;
	color: #8a8a8a;
	font-family: "Roboto", Arial, sans-serif;
	font-size: 11px;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.aeon-thread__item-category {
	color: var(--primary-color, #69043B);
}

/* Dark mode */
.dark-mode .aeon-thread__item {
	border-top-color: rgba(255, 255, 255, .16);
}

.dark-mode .aeon-thread__header {
	border-bottom-color: color-mix(in srgb, var(--primary-color, #69043B) 45%, transparent);
}

.dark-mode .aeon-thread--tinted {
	background: color-mix(in srgb, var(--primary-color, #69043B) 18%, transparent);
}

.dark-mode .aeon-thread__count,
.dark-mode .aeon-thread__item-meta {
	color: #b9b9b9;
}

/* Mobile */
@media (max-width: 767px) {
	/*
	 * Full-bleed thread: the section reaches both screen edges, the coloured
	 * background is no longer rounded, and the content keeps the same 15px
	 * inset as the regular front-page articles. The lead image bleeds to the
	 * screen edges like the other front-page images.
	 */
	.aeon-thread {
		margin-left: -15px;
		margin-right: -15px;
		/* Drop the border on mobile: the coloured bar is painted by the
		   ::before overlay, which now sits at the screen edge. Keeping the
		   border too painted a second line just inside it. */
		border-left-width: 0;
		padding-left: 15px;
		padding-right: 15px;
	}

	.aeon-thread--tinted {
		padding: 12px 15px 8px 15px;
		border-radius: 0;
	}

	.aeon-thread .post-thumbnail-col1:not(.float-right-thumb):not(.columnistphoto) {
		margin: 0 -15px;
	}

	.aeon-thread__item-thumb {
		flex-basis: 114px;
		max-width: 114px;
	}

	.aeon-thread__item-title {
		font-size: 18px;
	}
}
