:root {
	--gray-200: #212121;
	--gray-400: #444;
	--gray-600: #9c9c9c;
	--gray-800: #e0e0e0;
	--violet-200: #48407f;
	--violet-400: #786cc7;
	--peach-400: #c65d48;
	--peach-800: #fef1ed;
	--red-400: #ee5e5e;
}

.hero-wrapper .outer {
	width: 100%;
	background: linear-gradient(135deg, var(--violet-200), var(--violet-400));
	color: white;
}

.hero-wrapper .hero {
	text-align: center;
}

.hero-wrapper .hero-badge {
	display: inline-block;
	background: rgba(255, 255, 255, 0.15);
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	margin-bottom: 1rem;
}

.hero-wrapper .hero h1 {
	font-family: 'Playfair Display', serif;
	font-size: 2.2rem;
	font-weight: 900;
	margin-bottom: 0.75rem;
	color: white;
	letter-spacing: 1px;
}

.hero-wrapper .hero h1 span {
	color: #ffd7c9;
}

.hero-wrapper .hero p {
	max-width: 700px;
	margin: 0 auto 0.75rem;
	font-size: 0.95rem;
	line-height: 1.6;
}

.hero-wrapper .hero-note {
	font-size: 0.8rem;
	opacity: 0.85;
}

.hero-wrapper .hero-cta {
	margin-top: 1.25rem;
}

.hero-wrapper .hero-cta a {
	display: inline-block;
	background: white;
	color: var(--violet-400);
	font-weight: 800;
	font-size: 0.9rem;
	padding: 0.6rem 1rem;
	border-radius: 10px;
	text-decoration: none;
	border: 2px solid rgba(255, 255, 255, 0.7);
	transition:
		transform 0.15s ease,
		box-shadow 0.15s ease,
		background 0.15s ease;
}

.hero-wrapper .hero-cta a:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
	background: #fff7f3;
}

.esa-states {
	font-family: 'Nunito', sans-serif;
	background: #fafafa;
	color: var(--gray-200);
}

.esa-states .state-card {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.esa-states .state-card.is-hiding {
  opacity: 0;
  transform: scale(0.96);
}

.esa-states .state-card.is-showing {
  opacity: 0;
  transform: translateY(6px);
}

/* Legend Bar (scoped + prototype match) */
.legend-bar .outer {
	width: 100%;
	background: #fff;
	border-bottom: 1px solid var(--gray-800);
}

.legend-bar .inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 2rem 1.5rem;
}

.legend-bar .legend-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 1.25rem;
}

.legend-bar span {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--gray-400);
	letter-spacing: 0.04em;
}

.legend-bar .legend-item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--gray-400);
}

.legend-bar .badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	white-space: nowrap;
}

.legend-bar .badge-low {
	background: #e7f7ee;
	color: #1c7c54;
}

.legend-bar .badge-medium {
	background: #fff4d6;
	color: #9c6b00;
}

.legend-bar .badge-high {
	background: #fde6d9;
	color: #c65d48;
}

.legend-bar .badge-very-high {
	background: #fde0e0;
	color: var(--red-400);
}

/* .states-grid {
  max-width: 1100px;
  margin: 30px auto 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
} */

.esa-states .state-card {
	background: #fff;
	border-radius: 18px;
	border: 1px solid var(--gray-800);
	padding: 1.25rem;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease,
		border-color 0.2s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.esa-states .auto-fill {
	align-items: stretch;
}

.esa-states .state-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
	border-color: #d6d6d6;
}

.esa-states .state-name {
	font-family: 'Playfair Display', serif;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.15;
	margin-bottom: 0.2rem;
}

.esa-states .badge {
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.esa-states .badge-low {
	background: #e7f7ee;
	color: #1c7c54;
}

.esa-states .badge-medium {
	background: #fff4d6;
	color: #9c6b00;
}

.esa-states .badge-high {
	background: #fde6d9;
	color: #c65d48;
}

.esa-states .badge-very-high {
	background: #fde0e0;
	color: var(--red-400);
}

.esa-states .card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--gray-800);
}

.esa-states .state-region {
	font-size: 0.72rem;
	color: var(--gray-600);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.esa-states .card-description {
	margin-top: 0.9rem;
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--gray-400);
}

.esa-states .section-label {
	margin-top: 0.95rem;
	font-size: 0.72rem;
	color: var(--gray-600);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.esa-states .funding-section {
	margin-top: 0.95rem;
	margin-bottom: 0.8rem;
}

.esa-states .funding-amount {
	margin-top: 0.5rem;
	font-size: 0.9rem;
	color: #3e7c59;
	font-weight: 600;
}

.esa-states .esa-note {
	margin-top: 0.7rem;
	border: 2px solid var(--peach-400);
	color: var(--peach-400);
	font-weight: 700;
	font-size: 0.85rem;
	padding: 0.5rem 0.75rem;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

/* TEMP HIDDEN */
.esa-states .learn-link-wrap {
	display: none;
	margin-top: auto;
	padding-top: 0.9rem;
	margin-top: auto;
	border-top: 1px solid var(--gray-800);
}

.esa-states .learn-link {
	color: var(--peach-400);
	font-weight: 700;
	font-size: 0.85rem;
	text-decoration: none;
}

.esa-states .learn-link:hover {
	text-decoration: underline;
}

.esa-states .req-list {
	padding-left: 16px;
	margin-top: 6px;
}

.esa-states .req-list li {
	margin-bottom: 6px;
	font-size: 0.85rem;
	color: var(--gray-400);
}

.esa-states .funding-badge {
	display: inline-block;
	background: #e6eef6;
	color: #2c5a7c;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	margin: 0.25rem 0.4rem 0 0;
}

.esa-states #searchInput {
	border: 2px solid var(--gray-800);
	border-radius: 10px;
	padding: 10px 14px;
}

.esa-states button {
	border: 2px solid var(--gray-800);
	background: white;
	color: var(--gray-200);
	padding: 8px 14px;
	border-radius: 10px;
	font-size: 0.8rem;
	font-weight: normal;
	cursor: pointer;
	transition: all 0.15s ease;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	flex: 0 0 auto;
}

.esa-states button:hover {
	border-color: var(--violet-400);
	color: var(--violet-400);
}

.esa-states button.active {
	background: var(--violet-400);
	color: white;
	border-color: var(--violet-400);
}

.esa-states .filters-bar {
	display: grid;
	gap: var(--size-0-5);
	grid-template-columns: 1fr;
}

.esa-states #searchInput {
	max-width: 100%;
}

.esa-states .filters-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--size-0-5);
}

.results-count {
	opacity: 0.5;
	font-size: 0.8rem;
}

/* Larger screens */
@media (min-width: 900px) {
	.esa-states .filters-bar {
		grid-template-columns: auto 1fr;
		align-items: center;
	}

	.esa-states #searchInput {
		width: 24rem;
	}

	.esa-states .filters-buttons {
		display: grid;
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: var(--size-0-5);
		width: 100%;
	}
}
