/* Case study listing and detail.
   Desktop first. Breakpoints: 1024px, 768px, 480px.
   Overrides use max-width in pixels. */

body.csl-page {
	--csl-space: 90px;
	background: #ffffff;
}

.csl-space {
	padding-block: var(--csl-space);
}

body.csl-page .site {
	padding-top: var(--hero-inset);
}

body.csl-page .site-main--csl {
	padding-block: 0;
}

body.csl-page .site-header {
	background-color: transparent;
}

body.csl-page .site-header.is-scrolled {
	background-color: rgb(1 19 37 / 0.92);
	backdrop-filter: blur(12px);
}

body.csl-page.has-mobile-nav-open .site-header {
	background-color: var(--color-navy);
}

/* Hero */

.csl-hero {
	position: relative;
	width: calc(100% - (var(--hero-inset) * 2));
	min-height: 36rem;
	margin-top: calc(var(--header-height) * -1);
	margin-inline: auto;
	overflow: hidden;
	border-radius: 1.5rem;
	color: #ffffff;
	background: #011325;
}

.csl-hero__media {
	position: absolute;
	inset: 0;
}

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

.csl-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(90deg, rgb(0 8 16 / 0.72) 0%, rgb(0 8 16 / 0.42) 34%, rgb(0 8 16 / 0.08) 62%, rgb(0 8 16 / 0) 78%);
}

.csl-hero__inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: inherit;
	padding-top: calc(var(--header-height) + 2.5rem);
	padding-bottom: 3.5rem;
}

.csl-hero__inner .container {
	min-width: 0;
}

.csl-hero__kicker {
	color: #0fdf84;
}

.csl-hero__kicker .section-kicker__rule {
	background: #0fdf84;
}

.csl-hero__title {
	max-width: 14em;
	margin: 0 0 1rem;
	font-family: var(--font-display);
	font-size: clamp(2.4rem, 4.6vw, 4.0625rem);
	font-weight: var(--font-weight-semibold);
	line-height: 1.06;
}

.csl-hero__title span {
	display: block;
	white-space: nowrap;
}

.csl-hero__accent {
	color: #0fdf84;
}

.csl-hero__lede {
	max-width: 38rem;
	margin: 0;
	color: rgb(255 255 255 / 0.93);
	font-size: 1rem;
	line-height: 1.55;
}

/* Listing board */

.csl-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 2rem;
}

.csl-filters {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	gap: 0.75rem;
	min-width: 0;
	max-width: 100%;
}

.csl-filters__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 4.25rem;
	padding: 0 1.55rem;
	border: 2px solid #eeeeee;
	border-radius: 1rem;
	background: #ffffff;
	color: #1c1b1b;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1;
	cursor: pointer;
}

.csl-filters__item.is-active {
	border-color: transparent;
	background: rgb(13 134 81 / 0.12);
	color: #0d8651;
}

.csl-search {
	display: flex;
	flex: 0 1 30rem;
	align-items: center;
	gap: 1.25rem;
	width: min(100%, 30rem);
	min-width: 0;
	height: 4.25rem;
	padding: 0 1.7rem;
	border: 2px solid #eeeeee;
	border-radius: 1rem;
	background: #ffffff;
}

.csl-search img {
	width: 1.6rem;
	height: 1.6rem;
	object-fit: contain;
}

.csl-search input {
	width: 100%;
	min-width: 0;
	border: 0;
	background: transparent;
	color: rgb(1 1 1 / 0.6);
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.03em;
}

.csl-search input::placeholder {
	color: rgb(1 1 1 / 0.6);
}

.csl-search input:focus {
	outline: none;
}

.csl-search:focus-within {
	border-color: #0d8651;
}

.csl-board {
	display: grid;
	grid-template-columns: minmax(0, 1.72fr) minmax(16rem, 0.78fr);
	gap: 1.5rem;
	align-items: start;
}

.csl-board__main,
.csl-pair,
.csl-side {
	min-width: 0;
}

.csl-board__main {
	display: grid;
	gap: 1.5rem;
}

.csl-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
}

.csl-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border-radius: 0.75rem;
	background: #ffffff;
	box-shadow: 0 4px 2px rgb(0 0 0 / 0.12);
}

.csl-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 8.4;
	overflow: hidden;
	background: #0f1f2f;
}

.csl-card--feature .csl-card__media {
	aspect-ratio: 16 / 7.2;
}

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

.csl-card__badge {
	position: absolute;
	top: 0.85rem;
	left: 0.85rem;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: #ffffff;
	font-family: var(--font-display);
	font-size: 0.95rem;
	font-weight: var(--font-weight-semibold);
	line-height: 1;
}

.csl-card__badge img {
	width: 1.6rem;
	height: 1.15rem;
	object-fit: contain;
}

.csl-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.65rem;
	padding: 1.15rem 1.2rem 1.25rem;
}

.csl-card__meta {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	color: #6b7280;
	font-size: 0.875rem;
}

.csl-card__meta img,
.csl-mini__meta img {
	width: 1rem;
	height: 1rem;
	object-fit: contain;
}

.csl-card h3 {
	margin: 0;
	color: #1c1b1b;
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.2;
}

.csl-card h3 a,
.csl-mini h3 a {
	color: inherit;
	white-space: normal;
	overflow-wrap: break-word;
	text-decoration: none;
}

.csl-card h3 a:hover,
.csl-mini h3 a:hover,
.csl-card__more:hover,
.csl-related a:hover {
	color: #0d8651;
}

.csl-card__body > p {
	margin: 0;
	color: rgb(1 1 1 / 0.6);
	font-size: 0.875rem;
	line-height: 1.45;
}

.csl-card__more {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	width: fit-content;
	margin-top: 0.35rem;
	padding-bottom: 0.15rem;
	border-bottom: 1px solid #0d8651;
	color: #0d8651;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.4;
	text-decoration: none;
	text-transform: uppercase;
}

.csl-card__more img {
	width: 0.85rem;
	height: 0.85rem;
	object-fit: contain;
}

.csl-side {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.csl-mini {
	display: grid;
	grid-template-columns: 7.5rem minmax(0, 1fr);
	gap: 0.85rem;
	align-items: center;
	min-width: 0;
	padding: 0.65rem;
	border: 1px solid #eeeeee;
	border-radius: 0.9rem;
}

.csl-mini__media {
	display: block;
	overflow: hidden;
	border-radius: 0.65rem;
	aspect-ratio: 4 / 3;
	background: #0f1f2f;
}

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

.csl-mini h3 {
	margin: 0 0 0.45rem;
	color: #1c1b1b;
	font-family: var(--font-display);
	font-size: 0.95rem;
	font-weight: var(--font-weight-semibold);
	line-height: 1.35;
}

.csl-mini__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.85rem;
	margin: 0;
	color: #6b7280;
	font-size: 0.8rem;
}

.csl-mini__meta span {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.csl-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	margin-top: 2.5rem;
}

.csl-pager ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.csl-pager a,
.csl-pager span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 0.5rem;
	color: #323232;
	font-size: 0.875rem;
	font-weight: 400;
	text-decoration: none;
}

.csl-pager span[aria-current="page"] {
	border: 1.2px solid #0d8651;
	color: #0d8651;
	font-weight: 700;
}

.csl-pager__arrow {
	border: 0;
}

.csl-pager__arrow img {
	width: 1.1rem;
	height: 1.1rem;
	object-fit: contain;
}

/* Detail story */

.csl-story__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.csl-story article {
	min-width: 0;
	padding-right: 2rem;
}

.csl-story article + article {
	padding-left: 2.25rem;
	border-left: 1px solid #e6e6e6;
}

.csl-story h3 {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	color: #010101;
	font-family: "Space Grotesk", var(--font-display);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.25;
}

.csl-story h3 img {
	width: 2.25rem;
	height: 2.25rem;
	object-fit: contain;
}

.csl-story ul {
	margin: 1.35rem 0 0;
	padding-left: 1.15rem;
	color: rgb(1 1 1 / 0.6);
	font-size: 0.875rem;
	font-weight: var(--font-weight-semibold);
	line-height: 1.45;
}

.csl-story li + li {
	margin-top: 0.55rem;
}

.csl-results {
	padding-left: 0;
	list-style: none;
}

.csl-results strong {
	display: block;
	color: #0d8651;
	font-family: "Space Grotesk", var(--font-display);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.25;
}

.csl-results span {
	display: block;
	margin-top: 0.2rem;
	font-size: 1rem;
	font-weight: var(--font-weight-medium);
}

/* Related */

.csl-related ul {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.csl-related li {
	position: relative;
	min-width: 0;
	overflow: hidden;
	border-radius: 0.85rem;
	color: #ffffff;
	background: #0f1f2f;
}

.csl-related li > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.csl-related li > div {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 0.4rem;
	min-height: 15.05rem;
	padding: 1rem 1.05rem 1.1rem;
	background: linear-gradient(180deg, rgb(0 0 0 / 0.12) 18%, rgb(0 0 0 / 0.62) 100%);
}

.csl-related__cat {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 auto;
	font-family: var(--font-display);
	font-size: 0.86rem;
	font-weight: var(--font-weight-semibold);
}

.csl-related__cat img {
	width: 1.4rem;
	height: 1rem;
	object-fit: contain;
}

.csl-related__pill {
	align-self: flex-start;
	padding: 0.35rem 0.7rem;
	border-radius: 0.5rem;
	background: #0d8651;
	font-size: 0.75rem;
	font-weight: var(--font-weight-medium);
	line-height: 1.2;
	text-transform: capitalize;
}

.csl-related h3 {
	margin: 0.15rem 0 0;
	font-family: var(--font-display);
	font-size: 1.15rem;
	font-weight: var(--font-weight-semibold);
	line-height: 1.25;
}

.csl-related li p:last-of-type {
	margin: 0;
	max-width: 20rem;
	font-size: 0.78rem;
	line-height: 1.5;
}

.csl-related a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	align-self: flex-start;
	margin-top: 0.2rem;
	padding-bottom: 0.15rem;
	border-bottom: 1px solid #0d8651;
	color: #0d8651;
	font-size: 0.7rem;
	font-weight: var(--font-weight-bold);
	letter-spacing: 0.12em;
	line-height: 1.4;
	text-decoration: none;
	text-transform: uppercase;
}

.csl-related a img {
	width: 0.75rem;
	height: 0.75rem;
	object-fit: contain;
}

/* Subscribe */

.csl-subscribe {
	position: relative;
	overflow: hidden;
	color: #ffffff;
	background: #011325;
}

.csl-subscribe__media {
	position: absolute;
	inset: 0;
}

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

.csl-subscribe__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgb(1 19 37 / 0.72) 0%, rgb(1 19 37 / 0.45) 48%, rgb(1 19 37 / 0.28) 100%);
}

.csl-subscribe__inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: 16rem;
}

.csl-subscribe__copy {
	max-width: 40rem;
	min-width: 0;
}

.csl-subscribe h2 {
	margin: 0 0 0.85rem;
	font-family: var(--font-display);
	font-size: clamp(2rem, 3.4vw, 3rem);
	font-weight: var(--font-weight-medium);
	line-height: 1.2;
}

.csl-subscribe h2 span {
	display: block;
	white-space: nowrap;
}

.csl-subscribe p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
}

.csl-subscribe__form {
	display: flex;
	flex: 0 1 auto;
	align-items: center;
	gap: 0.75rem;
}

.csl-subscribe__form input {
	width: 15.4rem;
	height: 3.4rem;
	padding: 0 1.25rem;
	border: 1px solid #ffffff;
	border-radius: 999px;
	background: rgb(0 0 0 / 0.1);
	color: #ffffff;
	font: inherit;
	font-size: 0.875rem;
}

.csl-subscribe__form input::placeholder {
	color: #ffffff;
}

.csl-subscribe__form button {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	height: 3.2rem;
	padding: 0.25rem 0.25rem 0.25rem 1.6rem;
	border: 0;
	border-radius: 999px;
	background: #0d8651;
	box-shadow: 0 11px 16px rgb(0 0 0 / 0.25);
	color: #ffffff;
	font: inherit;
	font-size: 0.875rem;
	font-weight: var(--font-weight-medium);
	text-transform: capitalize;
	cursor: pointer;
}

.csl-subscribe__form button span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 999px;
	background: #ffffff;
}

.csl-subscribe__form button img {
	width: 0.95rem;
	height: 0.95rem;
	object-fit: contain;
}

/* Tablet — under 1024px */

@media (max-width: 1023.98px) {
	body.csl-page {
		--csl-space: 64px;
	}

	.csl-hero {
		min-height: 32rem;
	}

	.csl-toolbar {
		flex-wrap: wrap;
	}

	.csl-search {
		flex: 1 1 18rem;
		width: auto;
	}

	.csl-board,
	.csl-story__grid,
	.csl-related ul {
		grid-template-columns: 1fr;
	}

	.csl-story article,
	.csl-story article + article {
		padding: 1.5rem 0 0;
		border-left: 0;
		border-top: 1px solid #e6e6e6;
	}

	.csl-story article:first-child {
		padding-top: 0;
		border-top: 0;
	}

	.csl-related li > div {
		min-height: 16rem;
	}

	.csl-subscribe__inner {
		align-items: flex-start;
		flex-direction: column;
	}
}

/* Mobile — under 768px */

@media (max-width: 767.98px) {
	body.csl-page {
		--csl-space: 48px;
	}

	.csl-hero {
		width: calc(100% - 1rem);
		min-height: 30rem;
		border-radius: 1rem;
	}

	.csl-hero__title {
		max-width: 12em;
		font-size: 2.05rem;
	}

	.csl-hero__title span {
		white-space: normal;
	}

	.csl-hero__lede,
	.csl-subscribe h2 span {
		max-width: 20rem;
		white-space: normal;
	}

	.csl-toolbar,
	.csl-subscribe__form {
		flex-direction: column;
		align-items: stretch;
	}

	.csl-filters__item,
	.csl-search {
		height: 3.25rem;
		font-size: 1rem;
	}

	.csl-search input {
		font-size: 1rem;
	}

	.csl-search {
		flex: 1 1 auto;
		width: 100%;
		max-width: 100%;
	}

	.csl-card h3 {
		font-size: 1.25rem;
	}

	.csl-pair {
		grid-template-columns: 1fr;
	}

	.csl-subscribe__form input {
		width: 100%;
	}
}

/* Small phones — under 480px */

@media (max-width: 479.98px) {
	body.csl-page {
		--csl-space: 40px;
	}

	.csl-hero {
		min-height: 28rem;
	}

	.csl-hero__title {
		font-size: 1.85rem;
	}

	.csl-mini {
		grid-template-columns: 5.5rem minmax(0, 1fr);
	}

	.csl-filters__item {
		min-width: 0;
		padding-inline: 1rem;
	}
}
