/*
 * Page hero, article pages, long-form content and the 404 page.
 */

/* Plain hero used by article lists and pages not yet built with the builder */

.page-hero {
	padding-block: 48px;
	background: linear-gradient(180deg, var(--c-white) 0%, var(--c-soft) 100%);
}

.page-hero .container {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.page-hero__title {
	max-width: 22em;
}

.page-hero__intro {
	max-width: 44em;
}

.section-head__title {
	max-width: 24em;
}

@media (min-width: 768px) {
	.page-hero {
		padding-block: 72px 64px;
	}
}

/* Article */

.article__header {
	padding-block: 40px 32px;
	background: linear-gradient(180deg, var(--c-white) 0%, var(--c-soft) 100%);
}

.article__header .container {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	color: var(--c-mute);
	font-size: 14px;
	line-height: 20px;
}

.article__meta span::before {
	content: "·";
	margin-right: 12px;
}

.article__title {
	font-size: 28px;
	line-height: 36px;
}

.article__lead {
	color: var(--c-body);
	font-size: 18px;
	line-height: 28px;
}

.article__cover {
	aspect-ratio: 2 / 1;
	margin: 0 0 40px;
	overflow: hidden;
	border-radius: var(--radius-lg);
	/* Placeholder when an article has no image. */
	background:
		repeating-radial-gradient(circle at 88% 70%, transparent 0 44px, rgba(255, 255, 255, 0.14) 44px 45px),
		linear-gradient(135deg, #0067b7 0%, #43a0f9 100%);
}

/* Without an image the cover is only a decorative band, so keep it shallow. */
.article__cover--placeholder {
	aspect-ratio: 4 / 1;
}

.article__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.article .entry-content {
	padding-bottom: var(--section-y);
}

@media (min-width: 768px) {
	.article__header {
		padding-block: 64px 48px;
	}

	.article__title {
		font-size: 40px;
		line-height: 50px;
	}

	.article__lead {
		font-size: 20px;
		line-height: 30px;
	}

	.article__cover {
		margin-bottom: 56px;
	}
}

/* Long-form content written in the WordPress editor */

.entry-content {
	color: var(--c-body);
	font-size: 17px;
	line-height: 28px;
}

.entry-content > * {
	margin-block: 0;
}

.entry-content > * + * {
	margin-top: 20px;
}

.entry-content h2 {
	margin-top: 44px;
	font-size: 26px;
	line-height: 34px;
}

.entry-content h3 {
	margin-top: 32px;
	font-size: 21px;
	line-height: 29px;
}

.entry-content h4 {
	margin-top: 28px;
	font-size: 18px;
	line-height: 26px;
}

.entry-content a {
	color: var(--c-blue);
	text-decoration: underline;
}

.entry-content strong {
	color: var(--c-ink);
	font-weight: 600;
}

.entry-content ul,
.entry-content ol {
	padding-left: 24px;
}

.entry-content li + li {
	margin-top: 8px;
}

.entry-content li::marker {
	color: var(--c-blue);
}

.entry-content blockquote {
	margin-inline: 0;
	padding: 20px 24px;
	border-left: 3px solid var(--c-primary);
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	background: var(--c-soft);
	color: var(--c-ink);
	font-size: 19px;
	line-height: 30px;
}

.entry-content blockquote p + p {
	margin-top: 12px;
}

.entry-content blockquote cite {
	color: var(--c-mute);
	font-size: 14px;
	font-style: normal;
}

.entry-content img,
.entry-content figure {
	border-radius: var(--radius-md);
}

.entry-content figure {
	margin-inline: 0;
}

.entry-content figcaption {
	margin-top: 8px;
	color: var(--c-mute);
	font-size: 14px;
	line-height: 20px;
	text-align: center;
}

.entry-content hr {
	height: 1px;
	margin-block: 40px;
	border: 0;
	background: var(--c-border);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 22px;
}

.entry-content th,
.entry-content td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--c-border);
	text-align: left;
}

.entry-content th {
	color: var(--c-ink);
	font-weight: 600;
}

.entry-content code {
	padding: 2px 6px;
	border-radius: 4px;
	background: var(--c-tile);
	font-size: 0.9em;
}

@media (min-width: 768px) {
	.entry-content {
		font-size: 18px;
		line-height: 30px;
	}

	.entry-content h2 {
		font-size: 28px;
		line-height: 38px;
	}
}

/* 404 */

.not-found {
	position: relative;
	overflow: hidden;
	background:
		repeating-radial-gradient(circle at 50% 120%, transparent 0 60px, rgba(36, 124, 239, 0.08) 60px 61px),
		linear-gradient(180deg, var(--c-white) 0%, var(--c-soft) 100%);
}

.not-found__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding-block: 96px 120px;
	text-align: center;
}

.not-found__code {
	color: var(--c-primary);
	font-size: 96px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
}

.not-found__text {
	max-width: 30em;
}

.not-found__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 20px;
}

@media (min-width: 768px) {
	.not-found__code {
		font-size: 140px;
	}
}

/* Article lists: hero with search and category filter, featured article, list head with sort menu.
   Desktop: "Insights" frame (hero copy 769px, featured card 1240x388, three 400px cards). */

.page-hero--center .container {
	align-items: center;
	gap: 16px;
	text-align: center;
}

.page-hero__eyebrow {
	color: var(--c-blue);
	font-size: 18px;
	font-weight: 600;
	line-height: 26px;
}

.page-hero--center .page-hero__title,
.page-hero--center .page-hero__intro {
	max-width: 769px;
}

.article-filter {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	margin-top: 12px;
}

.article-filter__search {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--c-border);
	border-radius: 24px;
	background: var(--c-white);
	color: var(--c-mute);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.article-filter__search:focus-within {
	border-color: var(--c-primary);
	box-shadow: 0 0 0 3px rgba(36, 124, 239, 0.16);
}

.article-filter__search input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	outline: 0;
	background: none;
	color: var(--c-ink);
	font: inherit;
	font-size: 14px;
	line-height: 20px;
	-webkit-appearance: none;
	appearance: none;
}

.article-filter__search input::placeholder {
	color: #9a9cab;
	opacity: 1;
}

.article-filter .filter-chips {
	flex-wrap: nowrap;
	gap: 8px;
	margin: 0 calc(var(--gutter) * -1);
	padding: 0 var(--gutter);
	overflow-x: auto;
	scrollbar-width: none;
}

.article-filter .filter-chips::-webkit-scrollbar {
	display: none;
}

.article-filter .chip {
	flex: none;
	min-height: 44px;
	padding: 11px 18px;
	border-radius: 24px;
	white-space: nowrap;
}

.featured-article {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-lg);
	background: var(--c-white);
	box-shadow: var(--shadow-lg);
}

.featured-article__thumb {
	position: relative;
	display: block;
	aspect-ratio: 350 / 200;
	overflow: hidden;
	/* Placeholder when the article has no image: navy with ring supergraphic. */
	background:
		url("../img/pattern-looper.svg") center / auto 118% no-repeat,
		linear-gradient(135deg, #1b1965 0%, #2a2596 100%);
}

.featured-article__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.featured-article__label {
	position: absolute;
	top: 16px;
	left: 16px;
	padding: 6px 14px;
	border-radius: 20px;
	background: var(--c-white);
	color: var(--c-navy);
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
}

.featured-article__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	padding: 24px 20px;
}

.featured-article__title {
	font-size: 22px;
	line-height: 30px;
}

.featured-article__title a {
	color: inherit;
	text-decoration: none;
}

.featured-article__title a:hover {
	color: var(--c-blue);
}

.featured-article__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	overflow: hidden;
}

.featured-article .btn {
	margin-top: 6px;
}

.featured-article + .article-list {
	margin-top: 48px;
}

.article-list__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	margin-bottom: 24px;
}

.article-list__head:empty {
	display: none;
}

.article-list__title {
	font-size: 22px;
	line-height: 30px;
}

.article-sort {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.article-sort select {
	height: 42px;
	padding: 0 42px 0 16px;
	border: 1px solid var(--c-border);
	border-radius: var(--radius);
	background: var(--c-white);
	color: var(--c-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.article-sort select:focus-visible {
	border-color: var(--c-primary);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(36, 124, 239, 0.16);
}

.article-sort .icon {
	position: absolute;
	top: 12px;
	right: 16px;
	color: var(--c-ink);
	pointer-events: none;
}

.article-sort noscript + .icon,
.article-sort noscript {
	position: static;
}

.article-list .card-grid {
	row-gap: 24px;
}

@media (min-width: 768px) {
	.page-hero--center {
		padding-block: 85px 64px;
	}

	.page-hero--center .container {
		gap: 20px;
	}

	.page-hero__eyebrow {
		font-size: 24px;
		line-height: 38px;
	}

	.page-hero--center .page-hero__title {
		line-height: 40px;
	}

	.article-filter {
		flex-direction: row;
		align-items: center;
		justify-content: center;
		width: auto;
		max-width: 100%;
		margin-top: 16px;
	}

	.article-filter__search {
		flex: none;
		width: 300px;
	}

	/* Hairline between the search field and the chips. */
	.article-filter .filter-chips {
		position: relative;
		margin: 0;
		padding: 0 0 0 25px;
		overflow: visible;
	}

	.article-filter .filter-chips::before {
		content: "";
		position: absolute;
		top: calc(50% - 12px);
		left: 0;
		width: 1px;
		height: 24px;
		background: var(--c-border);
	}

	.article-filter .chip {
		min-height: 46px;
		padding: 12px 18px;
	}

	.articles-section {
		padding-block: 72px 96px;
	}

	.featured-article + .article-list {
		margin-top: 72px;
	}

	.article-list__head {
		margin-bottom: 32px;
	}

	.article-list__title {
		font-size: 24px;
		line-height: 32px;
	}

	.article-list .pagination {
		margin-top: 48px;
	}
}

@media (min-width: 1000px) {
	.article-filter .filter-chips {
		flex-wrap: nowrap;
	}

	.featured-article {
		display: grid;
		grid-template-columns: minmax(0, 600fr) minmax(0, 638fr);
	}

	.featured-article__thumb {
		aspect-ratio: auto;
		min-height: 386px;
	}

	.featured-article__label {
		top: 24px;
		left: 24px;
	}

	.featured-article__body {
		justify-content: center;
		gap: 18px;
		padding: 48px 44px;
	}

	.featured-article__title {
		font-size: 28px;
		line-height: 38px;
	}

	.featured-article__excerpt {
		-webkit-line-clamp: 3;
		line-clamp: 3;
	}

	.featured-article .btn {
		margin-top: 10px;
	}

	.article-list .card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
