.hefse-grants {
	--hefse-grant-ink: #202d25;
	--hefse-grant-muted: #4c5f53;
	--hefse-grant-accent: #285b3a;
	--hefse-grant-border: #d5dfd7;
	--hefse-grant-tint: #f2f6f2;
	--hefse-grant-inset: clamp(1rem, 3vw, 1.5rem);
	container-type: inline-size;
	max-width: 68rem;
	margin-inline: auto;
	color: var(--hefse-grant-ink);
}

.hefse-grants .hefse-grants__filters {
	display: grid;
	align-items: end;
	gap: .85rem 1rem;
	margin: 0 0 1.5rem;
	padding: var(--hefse-grant-inset);
	border: 1px solid var(--hefse-grant-border);
	border-radius: .75rem;
	background: var(--hefse-grant-tint);
}

.hefse-grants__filters label {
	display: grid;
	gap: .3rem;
	min-width: 0;
	margin: 0;
	color: var(--hefse-grant-muted);
	font-size: .875rem;
	font-weight: 650;
	line-height: 1.35;
}

.hefse-grants__filters input,
.hefse-grants__filters select,
.hefse-grants__filters button {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	min-height: 2.75rem;
	margin: 0;
	padding: .55rem .75rem;
	border: 1px solid #8f9f92;
	border-radius: .375rem;
	background-color: #fff;
	color: var(--hefse-grant-ink);
	font: inherit;
	font-size: 1rem;
	font-weight: 450;
	line-height: 1.4;
}

.hefse-grants__filters select {
	padding-inline-end: 1.65rem;
	text-overflow: ellipsis;
}

.hefse-grants__filters input::placeholder {
	color: var(--hefse-grant-muted);
	opacity: 1;
}

.hefse-grants__filters button {
	border-color: var(--hefse-grant-accent);
	background: var(--hefse-grant-accent);
	color: #fff;
	cursor: pointer;
	font-size: .9375rem;
	font-weight: 700;
}

.hefse-grants__filters button:hover {
	border-color: #1e472d;
	background: #1e472d;
	color: #fff;
}

.hefse-grants :is(input, select, button, summary, a):focus-visible {
	outline: 2px solid var(--hefse-grant-accent);
	outline-offset: 3px;
}

.hefse-grants__list {
	display: grid;
	gap: .6rem;
}

.hefse-grants .hefse-grants__year {
	margin: 1.35rem 0 .2rem;
	padding-bottom: .5rem;
	border-bottom: 1px solid var(--hefse-grant-border);
	color: var(--hefse-grant-accent);
	font-size: clamp(1.2rem, 1rem + .5vw, 1.5rem);
	font-weight: 750;
	line-height: 1.35;
}

.hefse-grants .hefse-grants__year:first-child {
	margin-top: 0;
}

.hefse-grants .hefse-grant-card {
	margin: 0;
	border: 1px solid var(--hefse-grant-border);
	border-radius: .625rem;
	background: #fff;
}

.hefse-grants .hefse-grant-card[open] {
	border-color: #92ab99;
}

.hefse-grant-card__summary {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
	gap: .4rem 1rem;
	padding: .9rem var(--hefse-grant-inset);
	border-radius: .625rem;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

summary.hefse-grant-card__summary {
	grid-template-columns: minmax(0, 1fr) auto;
	list-style: none;
	cursor: pointer;
}

summary.hefse-grant-card__summary::-webkit-details-marker {
	display: none;
}

summary.hefse-grant-card__summary:hover,
.hefse-grant-card[open] > summary {
	background: var(--hefse-grant-tint);
}

.hefse-grant-card[open] > summary {
	border-end-start-radius: 0;
	border-end-end-radius: 0;
}

summary.hefse-grant-card__summary::after {
	content: "";
	grid-column: 2;
	grid-row: 1;
	justify-self: end;
	width: .6rem;
	height: .6rem;
	margin: 0 .25rem .2rem;
	border: solid var(--hefse-grant-accent);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.hefse-grant-card[open] > summary::after {
	margin-block: .25rem 0;
	transform: rotate(225deg);
}

.hefse-grant-card__title {
	min-width: 0;
	color: var(--hefse-grant-ink);
	font-size: clamp(1.125rem, 1rem + .4vw, 1.35rem);
	font-weight: 750;
}

.hefse-grant-card__heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .3rem .6rem;
}

.hefse-grant-card__school {
	padding: .17rem .5rem;
	border-radius: .25rem;
	background: #eaf2ea;
	color: var(--hefse-grant-accent);
	font-size: .8125rem;
	font-weight: 600;
}

.hefse-grant-card__body {
	display: grid;
	gap: .85rem;
	padding: 1rem var(--hefse-grant-inset) 1.2rem;
	border-top: 1px solid var(--hefse-grant-border);
	overflow-wrap: anywhere;
}

.hefse-grants .hefse-grant-card__details {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: .8rem 1rem;
	margin: 0;
}

.hefse-grants .hefse-grant-card__details :is(dt, dd) {
	margin: 0;
	padding: 0;
}

.hefse-grants .hefse-grant-card__details dt {
	color: var(--hefse-grant-muted);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .07em;
	line-height: 1.35;
	text-transform: uppercase;
}

.hefse-grants .hefse-grant-card__details dd {
	margin-top: .25rem;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.35;
}

@container (min-width: 44rem) {
	.hefse-grants .hefse-grant-card__details {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(0, 1fr);
	}

	.hefse-grant-card__details > div + div {
		padding-inline-start: 1rem;
		border-inline-start: 1px solid var(--hefse-grant-border);
	}
}

.hefse-grants .hefse-grant-card__description {
	width: 100%;
	max-width: none;
	margin: 0;
	color: var(--hefse-grant-ink);
	font-size: 1rem;
	line-height: 1.65;
	white-space: pre-line;
}

.hefse-grants .hefse-grants__empty {
	margin: 0;
	padding: 1rem var(--hefse-grant-inset);
	border: 1px solid var(--hefse-grant-border);
	border-radius: .625rem;
}

.hefse-grants__pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .4rem;
	margin-top: 1.5rem;
	font-size: .9rem;
}

.hefse-grants__pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 2.5rem;
	min-height: 2.5rem;
	padding-inline: .55rem;
	border: 1px solid var(--hefse-grant-border);
	border-radius: .375rem;
	color: var(--hefse-grant-accent);
	text-decoration: none;
}

.hefse-grants__pagination a:hover,
.hefse-grants__pagination .current {
	background: var(--hefse-grant-accent);
	color: #fff;
}

@container (min-width: 30rem) {
	.hefse-grants__filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hefse-grants__filters > button {
		grid-column: 1 / -1;
	}
}

@container (min-width: 56rem) {
	.hefse-grants__filters {
		grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.25fr) minmax(0, 1.55fr) minmax(0, 1fr) auto;
	}

	.hefse-grants__filters > button {
		grid-column: auto;
	}
}
