:root {
	--ec-ink: #2b4257;
	--ec-ink-strong: #172a3a;
	--ec-ink-muted: #4c5f70;
	--ec-sage: #bfcba8;
	--ec-sage-soft: #edf1e8;
	--ec-surface: #ffffff;
	--ec-surface-alt: #f5f7f4;
	--ec-line: #c9d1d7;
	--ec-focus: #b37d00;
	--ec-danger: #8f1d1d;
	--ec-radius: 12px;
	--ec-content: 1180px;
}

.ec-directory-page,
.ec-resource-page {
	color: var(--ec-ink-strong);
	font-family: Figtree, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ec-directory,
.ec-resource {
	width: min(calc(100% - 32px), var(--ec-content));
	margin-inline: auto;
	padding-block: clamp(40px, 7vw, 88px);
}

.ec-directory h1,
.ec-directory h2,
.ec-resource h1,
.ec-resource h2,
.ec-resource h3 {
	color: var(--ec-ink-strong);
	line-height: 1.15;
	text-wrap: balance;
}

.ec-directory .screen-reader-text,
.ec-resource .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ec-directory__intro {
	max-width: 760px;
	margin-bottom: 32px;
}

.ec-directory__intro h1,
.ec-resource__header h1 {
	margin: 0 0 16px;
	font-size: 2.75rem;
	letter-spacing: -0.025em;
}

.ec-directory__intro p,
.ec-resource__lead {
	max-width: 68ch;
	margin: 0;
	color: var(--ec-ink-muted);
	font-size: 1.125rem;
	line-height: 1.65;
	text-wrap: pretty;
}

.ec-directory__filters {
	padding: 24px;
	background: var(--ec-surface-alt);
	border-radius: var(--ec-radius);
}

.ec-directory__search label,
.ec-directory__field label {
	display: block;
	margin-bottom: 7px;
	color: var(--ec-ink-strong);
	font-size: .9375rem;
	font-weight: 700;
}

.ec-directory__search input,
.ec-directory__field select {
	width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	color: var(--ec-ink-strong);
	background: var(--ec-surface);
	border: 1px solid #85929d;
	border-radius: 8px;
	font: inherit;
}

.ec-directory__search input::placeholder {
	color: #526676;
	opacity: 1;
}

.ec-directory__search input:focus-visible,
.ec-directory__field select:focus-visible,
.ec-button:focus-visible,
.ec-resource-card a:focus-visible,
.ec-resource a:focus-visible,
.ec-directory__pagination a:focus-visible,
.ec-directory__pagination span:focus-visible {
	outline: 3px solid var(--ec-focus);
	outline-offset: 3px;
}

.ec-directory__facets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 16px;
	margin: 20px 0 0;
	padding: 20px 0 0;
	border: 0;
	border-top: 1px solid var(--ec-line);
}

.ec-directory__facets legend {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ec-directory__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 22px;
}

.ec-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 18px;
	border-radius: 999px;
	font: inherit;
	font-weight: 750;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 180ms ease-out, color 180ms ease-out, border-color 180ms ease-out;
}

.ec-button--primary {
	color: #ffffff;
	background: var(--ec-ink);
	border: 1px solid var(--ec-ink);
}

.ec-button--primary:hover,
.ec-button--primary:active {
	color: #ffffff;
	background: var(--ec-ink-strong);
	border-color: var(--ec-ink-strong);
}

.ec-button--secondary {
	color: var(--ec-ink-strong);
	background: transparent;
	border: 1px solid var(--ec-ink);
}

.ec-button--secondary:hover,
.ec-button--secondary:active {
	color: var(--ec-ink-strong);
	background: var(--ec-sage-soft);
}

.ec-directory__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 62px;
	margin-top: 8px;
}

.ec-directory__summary p {
	margin: 0;
	font-weight: 700;
}

.ec-directory__results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
	gap: 20px;
}

.ec-resource-card {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: 22px;
	background: var(--ec-surface);
	border: 1px solid var(--ec-line);
	border-radius: var(--ec-radius);
}

.ec-resource-card__body {
	flex: 1;
}

.ec-resource-card__type,
.ec-resource__type {
	margin: 0 0 8px;
	color: var(--ec-ink);
	font-size: .875rem;
	font-weight: 800;
}

.ec-resource-card h2 {
	margin: 0 0 12px;
	font-size: 1.375rem;
	letter-spacing: -0.015em;
}

.ec-resource-card h2 a {
	color: var(--ec-ink-strong);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.ec-resource-card__summary {
	margin: 0 0 16px;
	color: var(--ec-ink-muted);
	line-height: 1.55;
}

.ec-resource-card__location {
	margin: 0 0 14px;
	color: var(--ec-ink-strong);
	font-size: .9375rem;
	font-weight: 650;
}

.ec-resource-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ec-resource-card__tags li {
	padding: 5px 9px;
	color: var(--ec-ink-strong);
	background: var(--ec-sage-soft);
	border-radius: 999px;
	font-size: .8125rem;
	font-weight: 650;
}

.ec-resource-card__link {
	display: inline-block;
	margin-top: 22px;
	color: var(--ec-ink-strong);
	font-weight: 800;
	text-underline-offset: 3px;
}

.ec-directory__empty {
	max-width: 660px;
	padding: 28px;
	background: var(--ec-sage-soft);
	border-radius: var(--ec-radius);
}

.ec-directory__empty h2 {
	margin: 0 0 10px;
	font-size: 1.5rem;
}

.ec-directory__empty p {
	margin: 0 0 20px;
	line-height: 1.6;
}

.ec-directory__pagination {
	margin-top: 34px;
}

.ec-directory__pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ec-directory__pagination a,
.ec-directory__pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 8px 12px;
	color: var(--ec-ink-strong);
	border-radius: 8px;
	font-weight: 700;
	text-decoration: none;
}

.ec-directory__pagination a:hover {
	background: var(--ec-sage-soft);
}

.ec-directory__pagination .current {
	color: #ffffff;
	background: var(--ec-ink);
}

.ec-resource {
	max-width: var(--ec-content);
}

.ec-resource__back {
	margin-bottom: 30px;
}

.ec-resource__back a,
.ec-resource__source a,
.ec-resource__fact a {
	color: var(--ec-ink-strong);
	font-weight: 700;
	text-underline-offset: 3px;
}

.ec-resource__header {
	max-width: 850px;
	margin-bottom: 44px;
}

.ec-resource__header .ec-button {
	margin-top: 24px;
}

.ec-resource__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
	gap: clamp(32px, 6vw, 76px);
	align-items: start;
}

.ec-resource__content {
	min-width: 0;
}

.ec-resource__image {
	margin: 0 0 30px;
}

.ec-resource__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--ec-radius);
}

.ec-resource__prose,
.ec-resource__section {
	max-width: 72ch;
	font-size: 1.0625rem;
	line-height: 1.72;
}

.ec-resource__prose > :first-child {
	margin-top: 0;
}

.ec-resource__prose h2,
.ec-resource__section h2 {
	margin: 36px 0 12px;
	font-size: 1.55rem;
}

.ec-resource__section ul {
	padding-left: 1.25em;
}

.ec-resource__section li + li {
	margin-top: 7px;
}

.ec-resource__facts {
	position: sticky;
	top: 24px;
	padding: 24px;
	background: var(--ec-surface-alt);
	border-radius: var(--ec-radius);
}

.ec-resource__facts > h2 {
	margin: 0 0 20px;
	font-size: 1.35rem;
}

.ec-resource__fact {
	padding-block: 14px;
	border-top: 1px solid var(--ec-line);
}

.ec-resource__fact h3 {
	margin: 0 0 4px;
	font-size: .875rem;
}

.ec-resource__fact p,
.ec-resource__fact ul {
	margin: 0;
	padding-left: 0;
	color: var(--ec-ink-muted);
	line-height: 1.5;
	list-style: none;
}

.ec-resource__fact li + li {
	margin-top: 6px;
}

.ec-resource__source {
	margin: 20px 0 0;
}

@media (max-width: 760px) {
	.ec-directory,
	.ec-resource {
		width: min(calc(100% - 24px), var(--ec-content));
		padding-block: 36px 56px;
	}

	.ec-directory__intro h1,
	.ec-resource__header h1 {
		font-size: 2.05rem;
	}

	.ec-directory__filters {
		padding: 18px;
	}

	.ec-directory__facets {
		grid-template-columns: 1fr;
	}

	.ec-directory__actions .ec-button {
		width: 100%;
	}

	.ec-resource__layout {
		grid-template-columns: 1fr;
	}

	.ec-resource__facts {
		position: static;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ec-button {
		transition: none;
	}
}
