:root {
	--fw-archive-accent: #00735f;
	--fw-archive-accent-hover: #005c4c;
	--fw-archive-ink: #17313a;
	--fw-archive-muted: #5d7077;
	--fw-archive-border: #d7e1df;
	--fw-archive-surface: #ffffff;
	--fw-archive-soft: #f4f7f6;
	--fw-archive-radius: 1.25rem;
	--fw-archive-shadow: 0 0.75rem 2.25rem rgba(11, 38, 51, 0.08);
	--fw-archive-focus: #ffbf47;
}

.foerderwert-funding-archive {
	position: static;
	width: min(1440px, calc(100% - 4rem));
	max-width: 1440px;
	box-sizing: border-box;
	margin-inline: auto;
	color: var(--fw-archive-ink);
}

.foerderwert-funding-filters {
	margin-block: 1.5rem 2rem;
	padding: clamp(1rem, 3vw, 1.75rem);
	border: 1px solid var(--fw-archive-border);
	border-radius: var(--fw-archive-radius);
	background: var(--fw-archive-surface);
	box-shadow: var(--fw-archive-shadow);
}

.foerderwert-funding-filters__heading,
.foerderwert-funding-filters__actions,
.foerderwert-funding-results__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
}

.foerderwert-funding-filters__heading h2 {
	margin: 0;
	font-size: clamp(1.4rem, 2.5vw, 1.85rem);
}

.foerderwert-funding-filters__reset {
	color: var(--fw-archive-accent);
	font-weight: 700;
	text-underline-offset: 0.18em;
}

.foerderwert-funding-filters__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1rem;
	align-items: end;
	margin-block: 1.5rem;
}

.foerderwert-funding-filters__field {
	min-width: 0;
}

.foerderwert-funding-filters__field label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.9rem;
	font-weight: 700;
	white-space: nowrap;
}

.foerderwert-funding-filters input[type="search"],
.foerderwert-funding-filters select {
	width: 100%;
	height: 2.75rem;
	box-sizing: border-box;
	margin: 0;
	padding: 0 0.75rem;
	border: 1px solid var(--fw-archive-border);
	border-radius: 0.65rem;
	background: var(--fw-archive-surface);
	color: var(--fw-archive-ink);
	font: inherit;
}

.foerderwert-switch {
	position: relative;
	display: inline-flex;
	gap: 0.75rem;
	align-items: center;
	font-weight: 700;
	cursor: pointer;
}

.foerderwert-switch input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

.foerderwert-funding-archive .foerderwert-switch__control {
	position: relative;
	display: inline-block;
	flex: 0 0 auto;
	width: 3rem;
	height: 1.65rem;
	border: 2px solid var(--fw-archive-muted);
	border-radius: 999px;
	background: #e5e7e8;
	transition: background-color 160ms ease, border-color 160ms ease;
}

.foerderwert-funding-archive .foerderwert-switch__control::after {
	position: absolute;
	top: 50%;
	left: 0.2rem;
	width: 1.05rem;
	height: 1.05rem;
	border-radius: 50%;
	background: var(--fw-archive-muted);
	content: "";
	transform: translateY(-50%);
	transition: transform 160ms ease, background-color 160ms ease;
}

.foerderwert-funding-archive .foerderwert-switch input:checked + .foerderwert-switch__control,
.foerderwert-funding-archive .foerderwert-switch.is-active .foerderwert-switch__control {
	border-color: var(--fw-archive-accent);
	background: var(--fw-archive-accent);
}

.foerderwert-funding-archive .foerderwert-switch input:checked + .foerderwert-switch__control::after,
.foerderwert-funding-archive .foerderwert-switch.is-active .foerderwert-switch__control::after {
	background: #ffffff;
	transform: translate(1.3rem, -50%);
}

.foerderwert-funding-archive .foerderwert-switch input:focus-visible + .foerderwert-switch__control,
.foerderwert-funding-archive a:focus-visible,
.foerderwert-funding-archive button:focus-visible,
.foerderwert-funding-archive input:focus-visible,
.foerderwert-funding-archive select:focus-visible {
	outline: 3px solid var(--fw-archive-focus);
	outline-offset: 3px;
	box-shadow: 0 0 0 6px #0b2633;
}

.foerderwert-funding-filters__submit,
.foerderwert-button {
	display: inline-flex;
	min-height: 2.75rem;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.1rem;
	border: 2px solid var(--fw-archive-accent);
	border-radius: 999px;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.foerderwert-funding-filters__submit,
.foerderwert-button--primary {
	background: var(--fw-archive-accent);
	color: #ffffff;
}

.foerderwert-funding-filters__submit:hover,
.foerderwert-button--primary:hover {
	border-color: var(--fw-archive-accent-hover);
	background: var(--fw-archive-accent-hover);
	color: #ffffff;
}

.foerderwert-button--secondary {
	background: var(--fw-archive-surface);
	color: var(--fw-archive-accent);
}

.foerderwert-button--secondary:hover {
	background: var(--fw-archive-soft);
	color: var(--fw-archive-accent-hover);
}

.foerderwert-funding-results__count {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 800;
}

.foerderwert-funding-results__loading {
	margin: 0;
	color: var(--fw-archive-muted);
	font-weight: 700;
}

.foerderwert-funding-results[aria-busy="true"] [data-foerderwert-cards] {
	opacity: 0.55;
}

.foerderwert-funding-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
	gap: clamp(1rem, 2.5vw, 1.5rem);
	margin-block: 1.25rem 2rem;
}

.foerderwert-funding-card {
	display: flex;
	min-width: 0;
	height: 100%;
	box-sizing: border-box;
	flex-direction: column;
	gap: 1rem;
	padding: clamp(1.1rem, 2.5vw, 1.5rem);
	overflow: hidden;
	border: 1px solid var(--fw-archive-border);
	border-radius: var(--fw-archive-radius);
	background: var(--fw-archive-surface);
	box-shadow: var(--fw-archive-shadow);
}

.foerderwert-funding-card__status {
	display: inline-flex;
	width: fit-content;
	gap: 0.4rem;
	align-items: center;
	margin: 0;
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	font-size: 0.82rem;
	line-height: 1.2;
}

.foerderwert-funding-card__status--aktiv {
	background: #dff4e9;
	color: #125f3f;
}

.foerderwert-funding-card__status--aktiv > span[aria-hidden="true"] {
	width: 0.45rem;
	height: 0.45rem;
	flex: 0 0 0.45rem;
	border-radius: 50%;
	background: currentColor;
	font-size: 0;
}

.foerderwert-funding-card__status--geplant {
	background: #fff2cc;
	color: #594000;
}

.foerderwert-funding-card__status--beendet {
	background: #e5e7e8;
	color: #29343a;
}

.foerderwert-funding-card__title {
	margin: 0;
	font-size: clamp(1.3rem, 2vw, 1.65rem);
	line-height: 1.2;
	overflow-wrap: anywhere;
	hyphens: auto;
}

.foerderwert-funding-card__title a {
	color: var(--fw-archive-ink);
	text-decoration: none;
}

.foerderwert-funding-card__title a:hover {
	color: var(--fw-archive-accent);
	text-decoration: underline;
	text-decoration-thickness: 0.1em;
	text-underline-offset: 0.16em;
}

.foerderwert-funding-card__excerpt,
.foerderwert-funding-card__location,
.foerderwert-funding-card__facts p {
	margin: 0;
	overflow-wrap: anywhere;
}

.foerderwert-funding-card__excerpt {
	color: var(--fw-archive-muted);
	line-height: 1.55;
}

.foerderwert-funding-card__location {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.foerderwert-funding-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.foerderwert-funding-card__tags span {
	padding: 0.25rem 0.55rem;
	border-radius: 999px;
	background: var(--fw-archive-soft);
	font-size: 0.8rem;
	font-weight: 700;
}

.foerderwert-funding-card__facts {
	display: grid;
	gap: 0.75rem;
}

.foerderwert-funding-card__facts > div {
	padding: 0.85rem;
	border-radius: 0.75rem;
	background: var(--fw-archive-soft);
}

.foerderwert-funding-card__facts strong {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.82rem;
	letter-spacing: 0.025em;
	text-transform: uppercase;
}

.foerderwert-funding-card__facts p {
	font-weight: 650;
	line-height: 1.4;
}

.foerderwert-funding-card__actions {
	display: grid;
	gap: 0.65rem;
	margin-top: auto;
	padding-top: 0.25rem;
}

.foerderwert-funding-card__application-note {
	margin: 0;
	padding: 0.65rem;
	border-radius: 0.65rem;
	background: var(--fw-archive-soft);
	color: var(--fw-archive-muted);
	font-weight: 700;
	text-align: center;
}

.foerderwert-funding-empty {
	margin-block: 1.25rem 2rem;
	padding: clamp(1.5rem, 4vw, 3rem);
	border: 1px dashed var(--fw-archive-border);
	border-radius: var(--fw-archive-radius);
	background: var(--fw-archive-soft);
	text-align: center;
}

.foerderwert-funding-empty h3 {
	margin-top: 0;
}

.foerderwert-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	justify-content: center;
	margin-block: 2rem;
}

.foerderwert-pagination a,
.foerderwert-pagination__current {
	display: inline-grid;
	min-width: 2.75rem;
	min-height: 2.75rem;
	box-sizing: border-box;
	place-items: center;
	padding: 0.45rem;
	border: 1px solid var(--fw-archive-border);
	border-radius: 0.6rem;
	background: var(--fw-archive-surface);
	color: var(--fw-archive-ink);
	font-weight: 700;
	text-decoration: none;
}

.foerderwert-pagination a:hover {
	border-color: var(--fw-archive-accent);
	color: var(--fw-archive-accent);
}

.foerderwert-pagination__current {
	border-color: var(--fw-archive-accent);
	background: var(--fw-archive-accent);
	color: #ffffff;
}

@media (max-width: 960px) {
	.foerderwert-funding-filters__field label {
		white-space: normal;
	}

	.foerderwert-funding-filters__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.foerderwert-funding-filters__field--search {
		grid-column: 1 / -1;
	}

	.foerderwert-funding-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.foerderwert-funding-archive {
		width: calc(100% - 2rem);
	}

	.foerderwert-funding-filters__grid,
	.foerderwert-funding-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.foerderwert-funding-filters__actions {
		align-items: stretch;
		flex-direction: column;
	}

	.foerderwert-funding-filters__submit {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.foerderwert-switch__control,
	.foerderwert-switch__control::after,
	.foerderwert-funding-results[aria-busy="true"] [data-foerderwert-cards] {
		transition: none;
	}
}
