/**
 * Media releases (the Media page, docs/media.md). The years' jump links
 * under the header, then per year its heading over a grid of release
 * cards: one column, two from 640px. From 1024px a year is a row: its
 * heading in a column of three twelfths at the left, sticky under the
 * header, the cards in two columns beside it; most years hold one to four
 * releases, which three columns under the heading left half empty.
 *
 * A card is the style guide's quiet card (Cards: one item in a list), as
 * People's: white, a hairline at 60%, 20px of padding, full height in its
 * cell, the border turning red at 40% under a shadow on hover. The date in
 * the dark red at 14px medium with the kind after it in the muted
 * foreground; the title as the card heading, 18px bold; the lead in body
 * copy, cut after four lines with an ellipsis (Trello card 191: no lead is
 * typed into the page, the card shows the post's); at the foot, under a
 * hairline, the actions of People's cards: Read more, the PDF, the
 * presentation and the other languages, which line up across a row.
 */

.sba-c-media-releases .sba-c-jump-links {
	margin-bottom: 48px;
}

.sba-c .sba-c-releases-year + .sba-c-releases-year {
	margin-top: 56px;
}

/* The earlier years wait for "Show earlier years" (media-releases.js). */
.sba-c-media-releases .is-limited > .sba-c-releases-more {
	display: none;
}

.sba-c-media-releases .sba-c-releases-actions {
	margin-top: 48px;
}

.sba-c .sba-c-releases-year-title:focus {
	outline: none;
}

.sba-c .sba-c-releases-year-title:focus-visible {
	outline: 2px solid var(--sba-ring);
	outline-offset: 4px;
}

.sba-c .sba-c-releases-year {
	scroll-margin-top: 112px;
}

.sba-c .sba-c-releases-year-title {
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--sba-border);
	color: var(--sba-charcoal);
	font-family: var(--sba-font-sans);
	font-size: 24px;
	font-weight: var(--sba-heading-weight);
	letter-spacing: var(--sba-heading-tracking);
	line-height: 32px;
}

.sba-c .sba-c-releases-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

.sba-c .sba-c-release {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 20px;
	border: 1px solid hsl(220 13% 90% / 0.6);
	border-radius: var(--sba-radius);
	background-color: var(--sba-surface);
	transition:
		border-color var(--sba-duration-hover) ease,
		box-shadow var(--sba-duration-hover) ease;
}

.sba-c .sba-c-release:hover {
	border-color: hsl(var(--sba-red-hsl) / 0.4);
	box-shadow: 0 10px 15px -3px hsl(var(--sba-charcoal-hsl) / 0.1);
}

.sba-c .sba-c-release-body > * {
	margin-top: 0;
	margin-bottom: 0;
}

/* The text grows, so the foot lines up across a row, 20px under it. */
.sba-c .sba-c-release-body {
	flex: 1 0 auto;
	padding-bottom: 20px;
}

.sba-c .sba-c-release-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 12px;
	color: var(--sba-red-dark);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
}

.sba-c .sba-c-release-kind {
	color: var(--sba-slate);
	font-weight: 400;
}

.sba-c .sba-c-release-title {
	margin-top: 8px;
	color: var(--sba-charcoal);
	font-family: var(--sba-font-sans);
	font-size: 18px;
	font-weight: var(--sba-heading-weight);
	letter-spacing: var(--sba-heading-tracking);
	line-height: 24px;
	text-wrap: pretty;
}

.sba-c .sba-c-release-title a {
	color: inherit;
	text-decoration: none;
	transition: color var(--sba-duration-hover) ease;
}

.sba-c .sba-c-release-title a:hover {
	color: var(--sba-red-dark);
}

.sba-c .sba-c-release-title a:focus-visible {
	outline: 2px solid var(--sba-ring);
	outline-offset: 2px;
}

.sba-c .sba-c-release-lead {
	display: -webkit-box;
	margin-top: 12px;
	overflow: hidden;
	color: var(--sba-slate);
	font-size: 16px;
	line-height: 1.625;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
}

.sba-c .sba-c-release-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px 20px;
	padding-top: 12px;
	border-top: 1px solid var(--sba-border);
}

.sba-c .sba-c-release-languages {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px 16px;
}

.sba-c .sba-c-release-action {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--sba-charcoal);
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	text-decoration: none;
	transition: color var(--sba-duration-hover) ease;
}

.sba-c .sba-c-release-action:hover {
	color: var(--sba-red-dark);
}

.sba-c .sba-c-release-action:focus-visible {
	outline: 2px solid var(--sba-ring);
	outline-offset: 2px;
}

.sba-c .sba-c-release-action .sba-i {
	color: var(--sba-red-dark);
	font-size: 16px;
	line-height: 1;
}

@media (min-width: 640px) {
	.sba-c .sba-c-releases-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.sba-c .sba-c-releases-year {
		display: grid;
		grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
		gap: 0 24px;
		align-items: start;
		padding-top: 24px;
		border-top: 1px solid var(--sba-border);
	}

	.sba-c .sba-c-releases-year + .sba-c-releases-year {
		margin-top: 48px;
	}

	.sba-c .sba-c-releases-year-title {
		position: sticky;
		top: 112px;
		margin: 0;
		padding: 0;
		border: 0;
		font-size: 30px;
		line-height: 36px;
	}

	.sba-c .sba-c-releases-grid {
		gap: 24px;
	}

	/* The button under the cards, not under the years' headings. */
	.sba-c-media-releases .sba-c-releases-actions {
		display: grid;
		grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
		gap: 0 24px;
	}

	.sba-c-media-releases .sba-c-releases-actions > .sba-c-button {
		grid-column: 2;
		justify-self: start;
	}
}
