/*
 * Project timeline. Above the widget's mobile breakpoint the years sit in a row
 * on a rail and each milestone's text opens as a popover anchored to its node;
 * below it the widget's inline media query turns the same markup into a
 * one-per-view carousel whose slides show their text inline.
 */
.wpc-timeline {
	--wpc-timeline-color: #33456b;
	--wpc-timeline-node-size: 26px;
	--wpc-timeline-accent: #ff595a;
	--wpc-timeline-halo: rgba(255, 89, 90, .22);
	--wpc-timeline-year-color: #0f2149;
	--wpc-timeline-text-color: #ffffff;
	--wpc-timeline-box-bg: #0f2149;
	--wpc-timeline-box-border: #2b3f6b;
	--wpc-timeline-popover-width: 320px;
	--wpc-timeline-gap: 0;
	--wpc-timeline-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.5 5 15.5 12 8.5 19' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	font-family: Silka, "Helvetica Neue", Arial, sans-serif;
	position: relative;
	/* The popover is out of flow and overlaps whatever follows the widget, so
	   the timeline has to establish a stacking position above its siblings. */
	z-index: 1;
}

/* Rails bottom-align, so the line crosses every node centre even if one
   year label were ever to wrap. */
.wpc-timeline__list {
	align-items: flex-end;
	display: flex;
	gap: var(--wpc-timeline-gap);
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.wpc-timeline__list::before {
	background-color: var(--wpc-timeline-color);
	bottom: calc(var(--wpc-timeline-node-size) / 2 - 1px);
	content: "";
	height: 2px;
	left: 0;
	position: absolute;
	right: 0;
}

.wpc-timeline__item {
	box-sizing: border-box;
	flex: 1 1 0;
	min-width: 0;
	padding: 0 .6rem;
	position: relative;
}

/* Year over node, as one target. Shared by the interactive hotspot and the
   inert marker so both sit identically on the line. */
.wpc-timeline__anchor {
	align-items: center;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: .75rem;
	margin: 0;
	padding: 0 !important;
	width: 100%;
}
.wpc-timeline__anchor:focus {
	outline: none;
	box-shadow: none;
}

.wpc-timeline__hotspot {
	cursor: pointer;
}

.wpc-timeline__hotspot:focus-visible {
	border-radius: .4rem;
	outline: 2px solid var(--wpc-timeline-accent);
	outline-offset: 4px;
}

.wpc-timeline__date {
	color: var(--wpc-timeline-year-color);
	font-size: 2rem;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

/* Fixed box the size of the largest node, so a smaller inert node still
   centres on the line. */
.wpc-timeline__rail {
	align-items: center;
	display: flex;
	height: var(--wpc-timeline-node-size);
	justify-content: center;
	position: relative;
	width: var(--wpc-timeline-node-size);
	z-index: 2;
}

.wpc-timeline__node {
	background: radial-gradient(circle, var(--wpc-timeline-accent) 0 28%, #fff 28% 46%, var(--wpc-timeline-accent) 46% 100%);
	border-radius: 50%;
	display: block;
	height: var(--wpc-timeline-node-size);
	position: relative;
	transition: transform .18s ease, box-shadow .18s ease;
	width: var(--wpc-timeline-node-size);
}

/* A milestone with a year but no text: a plain, obviously inert dot. */
.wpc-timeline__marker .wpc-timeline__node {
	background: var(--wpc-timeline-color);
	height: calc(var(--wpc-timeline-node-size) * .5);
	opacity: .55;
	width: calc(var(--wpc-timeline-node-size) * .5);
}

/* Pulse: two rings expanding out of the node, on hotspots only, to say there
   is something behind this one. */
.wpc-timeline__hotspot .wpc-timeline__node::before,
.wpc-timeline__hotspot .wpc-timeline__node::after {
	animation: wpc-timeline-pulse 2.4s ease-out infinite;
	border: 2px solid var(--wpc-timeline-accent);
	border-radius: 50%;
	content: "";
	inset: 0;
	position: absolute;
}

.wpc-timeline__hotspot .wpc-timeline__node::after {
	animation-delay: 1.2s;
}

/* Once its text is on screen the pulse has done its job, and a ring under an
   open milestone just competes with reading it. */
.wpc-timeline__item.is-open .wpc-timeline__node::before,
.wpc-timeline__item.is-open .wpc-timeline__node::after {
	animation: none;
	opacity: 0;
}

.wpc-timeline__hotspot:hover .wpc-timeline__node,
.wpc-timeline__hotspot:focus-visible .wpc-timeline__node {
	transform: scale(1.15);
}

.wpc-timeline__item.is-open .wpc-timeline__node {
	box-shadow: 0 0 0 6px var(--wpc-timeline-halo);
	transform: scale(1.15);
}

@keyframes wpc-timeline-pulse {
	0% {
		opacity: .65;
		transform: scale(1);
	}

	100% {
		opacity: 0;
		transform: scale(2.4);
	}
}

/*
 * The popover. Width is independent of the column, so it stays readable
 * however many milestones share the row. JS sets --wpc-timeline-shift to keep
 * it inside the timeline at either end, and --wpc-timeline-beak so the beak
 * still points at its own node.
 */
.wpc-timeline__body {
	background: var(--wpc-timeline-box-bg);
	border: 1px solid var(--wpc-timeline-box-border);
	border-radius: .7rem;
	box-shadow: 0 10px 30px rgba(15, 33, 73, .25);
	box-sizing: border-box;
	color: var(--wpc-timeline-text-color);
	display: none;
	left: 50%;
	line-height: 1.45;
	padding: .9rem 1.1rem;
	position: absolute;
	top: calc(100% + .85rem);
	transform: translateX(calc(-50% + var(--wpc-timeline-shift, 0px)));
	width: var(--wpc-timeline-popover-width);
	z-index: 6;
}

.wpc-timeline__item.is-open .wpc-timeline__body {
	/* Opacity only: the transform above carries the centring and the edge
	   shift, so animating transform here would throw the popover off-node. */
	animation: wpc-timeline-pop .18s ease-out;
	display: block;
}

.wpc-timeline__body::before {
	border: 9px solid transparent;
	border-bottom-color: var(--wpc-timeline-box-bg);
	content: "";
	height: 0;
	left: var(--wpc-timeline-beak, 50%);
	position: absolute;
	top: -17px;
	transform: translateX(-50%);
	width: 0;
}

/* Milestone text comes from a rich-text editor that wraps it in <p>. */
.wpc-timeline__body p {
	margin: 0 0 .6em;
}

/* Lists are spelled out in full because the theme resets them. */
.wpc-timeline__body ul,
.wpc-timeline__body ol {
	margin: 0 0 .6em;
	padding-left: 1.25em;
	text-align: left;
}

.wpc-timeline__body ul {
	list-style: disc outside;
}

.wpc-timeline__body ol {
	list-style: decimal outside;
}

.wpc-timeline__body li {
	display: list-item;
	margin: 0 0 .25em;
	padding: 0;
}

.wpc-timeline__body li > ul,
.wpc-timeline__body li > ol {
	margin: .25em 0 0;
}

.wpc-timeline__body > :first-child {
	margin-top: 0;
}

.wpc-timeline__body > :last-child {
	margin-bottom: 0;
}

@keyframes wpc-timeline-pop {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

/* Carousel navigation (shown only on the mobile breakpoint by the widget).
   Dots sit centred below; the arrows overlay the sides like a slider. */
.wpc-timeline__nav {
	display: none;
	justify-content: center;
	margin-top: 1.25rem;
}

.wpc-timeline__dots {
	align-items: center;
	display: flex;
	gap: 0;
}

/* The button is a 24px touch target; the visible dot is the pseudo-element
   inside it. Colours and padding are forced because this theme's generic
   button styling otherwise turns them into black pills. */
.wpc-timeline__dot {
	align-items: center;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
	display: inline-flex;
	height: 1.5rem;
	justify-content: center;
	min-width: 0;
	padding: 0 !important;
	width: 1.5rem;
}

.wpc-timeline__dot::before {
	background: var(--wpc-timeline-color);
	border-radius: 50%;
	content: "";
	height: .4rem;
	opacity: .25;
	transition: opacity .2s ease, transform .2s ease, background .2s ease;
	width: .4rem;
}

.wpc-timeline__dot--active::before {
	background: var(--wpc-timeline-accent);
	opacity: 1;
	transform: scale(1.3);
}

/* Discreet slider-style side arrows. Colours forced with !important so a
   theme's generic button styling can't turn them into black pills. */
.wpc-timeline__arrow {
	align-items: center;
	background: rgba(255, 255, 255, .92) !important;
	border: 1px solid rgba(15, 33, 73, .12) !important;
	border-radius: 50% !important;
	box-shadow: 0 2px 10px rgba(15, 33, 73, .15) !important;
	color: var(--wpc-timeline-box-bg) !important;
	cursor: pointer;
	display: inline-flex;
	height: 2.4rem;
	justify-content: center;
	line-height: 1;
	padding: 0 !important;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	transition: background .2s ease, box-shadow .2s ease, opacity .2s ease;
	width: 2.4rem;
	z-index: 5;
}

.wpc-timeline__arrow:focus {
	outline: none;
	box-shadow: none;
}

/* Pinned to the button's own box and centred there, so no padding or
   line-height the theme puts on the button can shift it. */
.wpc-timeline__arrow > span {
	align-items: center;
	display: flex;
	font-size: 0;
	inset: 0;
	justify-content: center;
	line-height: 0;
	position: absolute;
}

/*
 * The mark is a masked shape, not the ‹ / › glyph the span carries. A text
 * glyph is placed on its baseline rather than by its outline, so centring the
 * box does not centre the ink: measured on this button, the span box was
 * centred to 0px while the chevron's 7px of ink still sat 5.5px high. The
 * button's font is a system stack, so those metrics differ per OS and no
 * fixed nudge (this rule used to carry margin-top: -2px) is right everywhere.
 * The SVG's ink is centred in its own viewBox, so `center` genuinely centres.
 */
.wpc-timeline__arrow > span::before {
	background-color: currentColor;
	content: "";
	flex: none;
	height: 1rem;
	-webkit-mask: var(--wpc-timeline-chevron) center / contain no-repeat;
	mask: var(--wpc-timeline-chevron) center / contain no-repeat;
	width: 1rem;
}

/* Mirrored about its own centre, so the back arrow stays centred too. */
.wpc-timeline__arrow--prev > span::before {
	transform: scaleX(-1);
}

.wpc-timeline__arrow--prev {
	left: .1rem;
}

.wpc-timeline__arrow--next {
	right: .1rem;
}

.wpc-timeline__arrow:hover {
	background: #fff !important;
	box-shadow: 0 4px 14px rgba(15, 33, 73, .22) !important;
}

.wpc-timeline__arrow[disabled] {
	cursor: default;
	opacity: 0;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.wpc-timeline__list {
		scroll-behavior: auto;
	}

	.wpc-timeline__dot::before,
	.wpc-timeline__node {
		transition: none;
	}

	.wpc-timeline__item.is-open .wpc-timeline__body {
		animation: none;
	}

	/* The pulse stops, but a static ring keeps the "there is something here"
	   signal that the animation was carrying. */
	.wpc-timeline__hotspot .wpc-timeline__node::before {
		animation: none;
		opacity: .5;
		transform: scale(1.55);
	}

	.wpc-timeline__hotspot .wpc-timeline__node::after {
		display: none;
	}
}

/*
 * Project badges: the project's countries and topics as chips, for the single
 * project template. Colours come in as CSS variables from the widget so they
 * stay editable in Elementor.
 */
.wpc-badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wpc-badge-gap, .6rem);
	justify-content: var(--wpc-badge-align, flex-start);
	list-style: none;
	margin: 0;
	padding: 0;
}

.wpc-badges .wpc-badge {
	border-radius: 999px;
	color: var(--wpc-badge-text, #fff);
	display: inline-block;
	font-family: Silka, "Helvetica Neue", Arial, sans-serif;
	font-size: var(--wpc-badge-size, .85rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
	max-width: 100%;
	padding: var(--wpc-badge-padding, .6rem 1.1rem);
	/*
	 * `break-word`, deliberately not `anywhere`: `anywhere` also shrinks a flex
	 * item's min-content size, which collapsed every chip to one character per
	 * line inside a narrow column. This still breaks an over-long single word
	 * without letting the chip shrink below its longest word.
	 */
	overflow-wrap: break-word;
}

.wpc-badges .wpc-badge--location {
	background: var(--wpc-badge-location, #3a8dde);
}

.wpc-badges .wpc-badge--topic {
	background: var(--wpc-badge-topic, #ff595a);
}

.wpc-map,
.wpc-filter,
.wpc-project-grid {
	--wpc-navy: #001435;
	--wpc-coral: #ff595a;
	--wpc-ink: #001435;
	--wpc-paper: #fff;
	--wpc-soft: #f3f5f7;
	--wpc-muted: #536174;
	--wpc-radius-lg: 1.5rem;
	--wpc-radius-card: 1.25rem;
	--wpc-radius-pill: 999px;
	--wpc-shadow-card: 0 1rem 2.5rem rgb(0 20 53 / 12%);
	--wpc-shadow-float: 0 1.25rem 3rem rgb(0 20 53 / 22%);
	font-family: Silka, "Helvetica Neue", Arial, sans-serif;
}

.wpc-map {
	background: var(--wpc-navy);
	border-radius: var(--wpc-radius-lg);
	height: 37.5rem;
	min-height: 0;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.wpc-map[aria-busy="true"]::after {
	background: rgb(0 20 53 / 12%);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 700;
}

.wpc-map__status {
	background: var(--wpc-paper);
	border-radius: var(--wpc-radius-pill);
	bottom: 1rem;
	box-shadow: 0 .5rem 1.5rem rgb(0 20 53 / 18%);
	color: var(--wpc-ink);
	font-size: .875rem;
	font-weight: 700;
	left: 50%;
	margin: 0;
	max-width: calc(100% - 2rem);
	padding: .65rem 1rem;
	position: absolute;
	transform: translateX(-50%);
	z-index: 800;
}

.wpc-map__status:empty {
	display: none;
}

.wpc-map__status--error {
	border: 2px solid var(--wpc-coral);
}

.wpc-map .leaflet-control-zoom {
	border: 0;
	box-shadow: 0 .5rem 1.5rem rgb(0 20 53 / 18%);
	overflow: hidden;
}

.wpc-map .leaflet-control-zoom a {
	align-items: center;
	background: var(--wpc-paper);
	border: 0;
	color: var(--wpc-ink);
	display: flex;
	font: 700 1.25rem/1 Silka, "Helvetica Neue", Arial, sans-serif;
	height: 2.75rem;
	justify-content: center;
	width: 2.75rem;
}

.wpc-map .leaflet-control-zoom a:hover,
.wpc-map .leaflet-control-zoom a:focus-visible {
	background: var(--wpc-coral);
	color: var(--wpc-navy);
}

.wpc-map .leaflet-control-attribution {
	background: rgb(255 255 255 / 88%);
	color: var(--wpc-ink);
}

/*
 * Transient overlay explaining why a plain scroll did not zoom. Fades rather
 * than appearing instantly so it reads as a response to the gesture.
 */
.wpc-map__zoom-hint {
	background: rgb(0 20 53 / 82%);
	border-radius: var(--wpc-radius-pill);
	color: var(--wpc-paper);
	font-size: .9rem;
	font-weight: 600;
	left: 50%;
	margin: 0;
	opacity: 0;
	padding: .7rem 1.15rem;
	pointer-events: none;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	transition: opacity 180ms ease;
	z-index: 850;
}

.wpc-map__zoom-hint.is-visible {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.wpc-map__zoom-hint {
		transition: none;
	}
}

.wpc-map-marker {
	background: transparent;
	border: 0;
}

.wpc-map-marker__pin {
	background: var(--wpc-map-pin-color, var(--wpc-coral));
	border: 3px solid var(--wpc-paper);
	border-radius: 50% 50% 50% 0;
	box-shadow: 0 .3rem .75rem rgb(0 20 53 / 35%);
	display: block;
	height: 26px;
	transform: rotate(-45deg);
	width: 26px;
}

.wpc-map .leaflet-marker-icon:focus-visible {
	filter: drop-shadow(0 0 0.35rem var(--wpc-navy));
	outline: 3px solid var(--wpc-coral);
	outline-offset: 4px;
}

.wpc-map-cluster {
	align-items: center;
	background: transparent;
	display: flex;
	justify-content: center;
}

.wpc-map-cluster__inner {
	align-items: center;
	background: var(--wpc-navy);
	border: 4px solid var(--wpc-coral);
	border-radius: 50%;
	box-shadow: 0 .45rem 1rem rgb(0 20 53 / 30%);
	color: var(--wpc-paper);
	display: flex;
	font-size: .875rem;
	font-weight: 700;
	height: 44px;
	justify-content: center;
	width: 44px;
}

.wpc-map .leaflet-popup-content-wrapper {
	border-radius: 1rem;
	box-shadow: 0 1rem 2.5rem rgb(0 20 53 / 24%);
	overflow: hidden;
	padding: 0;
}

.wpc-map .leaflet-popup-content {
	margin: 0;
	width: 20rem !important;
}

.wpc-map .leaflet-popup-tip {
	box-shadow: .2rem .2rem .4rem rgb(0 20 53 / 12%);
}

/* Scoped under .wpc-map so it outranks Elementor's `.elementor img { height: auto }`:
   an auto height is 0 until the image loads, so Leaflet measured a short popup,
   auto-panned too little, and the loaded image then pushed it off the map. */
.wpc-map .wpc-map-popup__img {
	display: block;
	height: 10.5rem;
	object-fit: cover;
	width: 100%;
}

.wpc-map-popup__body {
	background: var(--wpc-paper);
	padding: 1.25rem;
}

.wpc-map-popup__country {
	color: var(--wpc-coral);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .08em;
	margin: 0 0 .55rem !important;
	text-transform: uppercase;
}

.wpc-map-popup__title {
	color: var(--wpc-ink);
	font: 700 1.2rem/1.2 Silka, "Helvetica Neue", Arial, sans-serif;
	margin: 0 0 .65rem;
}

.wpc-map-popup__desc {
	color: var(--wpc-muted);
	font-size: .9rem;
	line-height: 1.55;
	margin: 0 0 1rem;
}

.wpc-map-popup__link {
	color: var(--wpc-coral) !important;
	font-weight: 700;
	text-decoration: none;
}

.wpc-map-popup__link:hover {
	text-decoration: underline;
	text-underline-offset: .2em;
}

.wpc-map-popup__link:focus-visible,
.wpc-map .leaflet-popup-close-button:focus-visible {
	border-radius: .2rem;
	outline: 3px solid var(--wpc-coral);
	outline-offset: 3px;
}

.wpc-map .leaflet-popup-close-button {
	align-items: center;
	background: var(--wpc-paper);
	border-radius: 50%;
	color: var(--wpc-ink);
	display: flex;
	font-size: 1.3rem;
	height: 2rem;
	justify-content: center;
	right: .5rem;
	top: .5rem;
	width: 2rem;
}

.wpc-filter {
	--wpc-filter-accent: var(--wpc-coral);
	--wpc-filter-divider: #d6dbe5;
	--wpc-filter-panel-bg: var(--wpc-paper);
	--wpc-filter-bar-gap: .75rem;
	--wpc-filter-panel-padding: 1rem;
	align-items: center;
	background: var(--wpc-navy);
	border-radius: var(--wpc-radius-lg);
	color: var(--wpc-paper);
	display: grid;
	gap: 1rem 1.25rem;
	grid-template-columns: 1fr;
	/* padding: 1.25rem; */
	position: relative;
}

.wpc-filter__bar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: var(--wpc-filter-bar-gap);
}

.wpc-filter__control {
	position: relative;
}

.wpc-filter button.wpc-filter__toggle,
.wpc-filter button.wpc-filter__apply,
.wpc-filter button.wpc-filter__clear {
	appearance: none;
	box-shadow: none;
	cursor: pointer;
	font-family: inherit;
	font-size: .875rem;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1;
	margin: 0;
	min-height: 3rem;
	text-decoration: none;
	text-transform: none;
}

.wpc-filter button.wpc-filter__toggle {
	align-items: center;
	background: var(--wpc-paper) !important;
	border: 1px solid transparent !important;
	border-radius: var(--wpc-radius-pill);
	color: var(--wpc-ink) !important;
	display: inline-flex;
	gap: .6rem;
	justify-content: center;
	padding: .75rem 1rem;
}

.wpc-filter button.wpc-filter__toggle:hover,
.wpc-filter button.wpc-filter__toggle[aria-expanded="true"] {
	background: var(--wpc-soft) !important;
	border-color: var(--wpc-filter-accent) !important;
	color: var(--wpc-ink) !important;
}

.wpc-filter__selected-count {
	align-items: center;
	background: var(--wpc-filter-accent);
	border-radius: var(--wpc-radius-pill);
	color: var(--wpc-navy);
	display: inline-flex;
	font-size: .75rem;
	height: 1.4rem;
	justify-content: center;
	min-width: 1.4rem;
	padding: 0 .3rem;
}

.wpc-filter__selected-count[hidden],
.wpc-filter__panel[hidden] {
	display: none !important;
}

/*
 * A plus that becomes a minus when the panel is open: two bars, the vertical
 * one collapsing on expand. Reads as "add a filter", which is what the control
 * actually does.
 */
.wpc-filter__toggle-icon {
	display: block;
	height: .68rem;
	margin-left: .15rem;
	position: relative;
	width: .68rem;
}

.wpc-filter__toggle-icon::before,
.wpc-filter__toggle-icon::after {
	background: currentcolor;
	content: "";
	inset: 0;
	margin: auto;
	position: absolute;
}

.wpc-filter__toggle-icon::before {
	height: 2px;
	width: 100%;
}

.wpc-filter__toggle-icon::after {
	height: 100%;
	transform: scaleY(1);
	transition: transform 160ms ease;
	width: 2px;
}

.wpc-filter__toggle[aria-expanded="true"] .wpc-filter__toggle-icon::after {
	transform: scaleY(0);
}

@media (prefers-reduced-motion: reduce) {
	.wpc-filter__toggle-icon::after {
		transition: none;
	}
}

.wpc-filter__panel {
	background: var(--wpc-filter-panel-bg);
	border: 1px solid var(--wpc-filter-divider);
	border-radius: 1rem;
	box-shadow: var(--wpc-shadow-float);
	color: var(--wpc-ink);
	left: 0;
	max-height: 22rem;
	min-width: 18rem;
	overflow: auto;
	padding: var(--wpc-filter-panel-padding);
	position: absolute;
	top: calc(100% + .7rem);
	width: max-content;
	z-index: 1000;
}

.wpc-filter__search {
	/* Sticky so the box stays reachable while a long country list scrolls; it
	   needs its own background or the options scroll underneath it. */
	background: var(--wpc-filter-panel-bg, #fff);
	margin: 0 0 .6rem;
	padding-bottom: .4rem;
	position: sticky;
	top: 0;
	z-index: 1;
}

.wpc-filter input.wpc-filter__search-input {
	appearance: none;
	background: #fff;
	border: 1px solid var(--wpc-filter-divider);
	border-radius: .6rem;
	color: var(--wpc-ink);
	font: inherit;
	font-size: .9rem;
	padding: .5rem .7rem;
	width: 100%;
}

.wpc-filter input.wpc-filter__search-input:focus-visible {
	border-color: var(--wpc-filter-accent);
	outline: 2px solid var(--wpc-filter-accent);
	outline-offset: 1px;
}

.wpc-filter__no-matches {
	color: var(--wpc-muted);
	font-size: .875rem;
	margin: 0 0 .5rem;
}

.wpc-filter__no-matches[hidden],
.wpc-filter__option[hidden] {
	display: none;
}

.wpc-filter__facet {
	border: 0;
	display: grid;
	gap: .25rem;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.wpc-filter__option {
	align-items: center;
	border-radius: .65rem;
	cursor: pointer;
	display: grid;
	gap: .65rem;
	grid-template-columns: auto minmax(0, 1fr) auto;
	margin: 0;
	min-height: 2.75rem;
	padding: .45rem .55rem;
}

.wpc-filter__option:hover {
	background: var(--wpc-soft);
}

/*
 * The checkbox is drawn here rather than left to the browser. The theme resets
 * `[type="checkbox"]` to `appearance: none` with a black border and supplies no
 * checked indicator, so a native control renders as an empty square whether it
 * is ticked or not — `accent-color` does nothing once appearance is none.
 *
 * The type attribute is part of the selector on purpose: the theme's
 * `fieldset input[type="checkbox"]` scores (0,1,2) and outranked the previous
 * `.wpc-filter__option input` at (0,1,1).
 */
.wpc-filter__option input[type="checkbox"] {
	appearance: none;
	background: #fff;
	background-position: center;
	background-repeat: no-repeat;
	background-size: .7rem;
	border: 2px solid var(--wpc-filter-divider);
	border-radius: .3rem;
	box-shadow: none;
	cursor: pointer;
	flex: none;
	height: 1.15rem;
	margin: 0;
	min-width: 0;
	padding: 0;
	transition: background-color 120ms ease, border-color 120ms ease;
	width: 1.15rem;
}

@supports (-webkit-appearance: none) or (-moz-appearance: none) {
    .wpc-filter__option input[type=checkbox]:checked:after {
        opacity: 0;
    }
}

.wpc-filter__option:hover input[type="checkbox"]:not(:checked) {
	border-color: var(--wpc-muted);
}

.wpc-filter__option input[type="checkbox"]:checked {
	background-color: var(--wpc-filter-accent);
	/* Tick as a data URI so it needs no pseudo-element on a replaced element. */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E");
	border-color: var(--wpc-filter-accent);
}

@media (prefers-reduced-motion: reduce) {
	.wpc-filter__option input[type="checkbox"] {
		transition: none;
	}
}

/* Icon column, added only for facets whose terms carry one (topics today). */
.wpc-filter__facet--has-icons .wpc-filter__option {
	grid-template-columns: auto auto minmax(0, 1fr) auto;
}

.wpc-filter__icon {
	align-items: center;
	display: flex;
	height: 1.5rem;
	justify-content: center;
	width: 1.5rem;
}

.wpc-filter__icon img {
	display: block;
	height: 100%;
	object-fit: contain;
	width: 100%;
}

.wpc-filter__label {
	font-size: .9rem;
	font-weight: 600;
}

.wpc-filter__count {
	color: var(--wpc-muted);
	font-size: .8rem;
}

/* Active-filter row: "clear all" pill plus one chip per applied option. */
.wpc-filter__active {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	grid-column: 1 / -1;
}

.wpc-filter__active[hidden] {
	display: none;
}

.wpc-filter__chips {
	display: contents;
}

.wpc-filter button.wpc-filter__chip,
.wpc-filter button.wpc-filter__clear {
	align-items: center;
	appearance: none;
	border-radius: var(--wpc-radius-pill);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: .82rem;
	gap: .5rem;
	line-height: 1;
	padding: .5rem .85rem;
}

/* Clear-all reads as the neutral, solid action. */
.wpc-filter button.wpc-filter__clear {
	background: var(--wpc-paper) !important;
	border: 1px solid var(--wpc-paper) !important;
	color: var(--wpc-navy) !important;
}

.wpc-filter button.wpc-filter__clear:hover,
.wpc-filter button.wpc-filter__clear:focus-visible {
	background: rgb(255 255 255 / 86%) !important;
	border-color: var(--wpc-paper) !important;
	color: var(--wpc-navy) !important;
}

/* Applied filters are tinted so they read as "on" against the navy. */
.wpc-filter button.wpc-filter__chip {
	background: var(--wpc-chip-bg, #b9d4d0) !important;
	border: 1px solid var(--wpc-chip-bg, #b9d4d0) !important;
	color: var(--wpc-navy) !important;
}

.wpc-filter button.wpc-filter__chip:hover,
.wpc-filter button.wpc-filter__chip:focus-visible {
	background: #cfe3e0 !important;
	border-color: #cfe3e0 !important;
}

.wpc-filter__chip-remove {
	font-size: 1.15em;
	line-height: 1;
	opacity: .75;
}

/*
 * Facets, then the active-filter row, then the result count — stacked, all
 * left-aligned, so the count reads as a caption under what produced it rather
 * than floating opposite the buttons.
 */
.wpc-filter__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: .75rem 1rem;
	grid-column: 1 / -1;
	justify-content: flex-start;
}

/* White label on the accent fill, matching the "Load more" button. */
.wpc-filter button.wpc-filter__apply {
	background: var(--wpc-filter-accent) !important;
	border: 2px solid var(--wpc-filter-accent) !important;
	border-radius: var(--wpc-radius-pill);
	color: #fff !important;
	padding: .75rem 1.35rem;
}

.wpc-filter button.wpc-filter__apply:hover,
.wpc-filter button.wpc-filter__apply:focus-visible {
	background: var(--wpc-filter-accent) !important;
	border-color: var(--wpc-filter-accent) !important;
	color: #fff !important;
	opacity: .9;
}

.wpc-filter__total {
	color: var(--wpc-paper);
	font-size: .85rem;
	font-weight: 400;
	margin: 0;
	opacity: .85;
	white-space: nowrap;
}

.wpc-filter__error {
	color: var(--wpc-paper);
	font-size: .875rem;
	font-weight: 700;
	grid-column: 1 / -1;
	margin: 0;
}

.wpc-filter__error:not(:empty) {
	border-left: 3px solid var(--wpc-filter-accent);
	padding: .25rem 0 .25rem .75rem;
}

.wpc-filter[aria-busy="true"] .wpc-filter__apply {
	cursor: progress;
	opacity: .72;
}

.wpc-filter button:focus-visible,
.wpc-filter__option input:focus-visible {
	outline: 3px solid var(--wpc-filter-accent);
	outline-offset: 3px;
}

.wpc-project-grid {
	display: grid;
	gap: 2rem 1.5rem;
	grid-template-columns: repeat(var(--wpc-grid-columns, 3), minmax(0, 1fr));
}

.wpc-project-grid[aria-busy="true"] {
	opacity: .68;
	pointer-events: none;
}

.wpc-project-grid__empty {
	background: var(--wpc-soft);
	border-radius: var(--wpc-radius-card);
	color: var(--wpc-muted);
	font-size: 1.125rem;
	grid-column: 1 / -1;
	margin: 0;
	padding: 3rem 1rem;
	text-align: center;
}

.wpc-project-grid__more {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: .85rem;
	justify-content: center;
	margin-top: 2rem;
}

.wpc-project-grid__more[hidden],
.wpc-load-more[hidden],
.wpc-project-grid__showing[hidden] {
	display: none;
}

.wpc-project-grid__showing {
	color: var(--wpc-muted);
	font-size: .875rem;
	margin: 0;
}

.wpc-load-more {
	align-items: center;
	background: var(--wpc-coral, #ff595a);
	border: 0;
	border-radius: var(--wpc-radius-pill, 999px);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 600;
	gap: .6rem;
	justify-content: center;
	letter-spacing: .02em;
	padding: .85rem 2.25rem;
	transition: opacity .2s ease, transform .2s ease;
}

/* Spinner sits beside the label rather than replacing it. */
.wpc-load-more.is-loading {
	cursor: progress;
	opacity: .85;
}

.wpc-load-more.is-loading::after {
	animation: wpc-spin .7s linear infinite;
	border: 2px solid rgb(255 255 255 / 45%);
	border-radius: 50%;
	border-top-color: #fff;
	box-sizing: border-box;
	content: "";
	height: 1em;
	width: 1em;
}

@keyframes wpc-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Newly appended cards fade in so a loaded page is visible. */
.wpc-project-card.is-appended {
	animation: wpc-card-in .35s ease both;
}

@keyframes wpc-card-in {
	from {
		opacity: 0;
		transform: translateY(.5rem);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.wpc-load-more:hover,
.wpc-load-more:focus-visible {
	opacity: .9;
	transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
	.wpc-load-more {
		transition: none;
	}

	/* The spinner still turns — it is the only signal the request is running —
	   but slowly enough not to be a motion trigger. The card entrance, which is
	   decorative, is dropped entirely. */
	.wpc-load-more.is-loading::after {
		animation-duration: 2.4s;
	}

	.wpc-project-card.is-appended {
		animation: none;
	}
}

.wpc-project-card {
	background: var(--wpc-paper);
	border-radius: var(--wpc-radius-card);
	box-shadow: 0 .25rem 1.25rem rgb(0 20 53 / 8%);
	color: var(--wpc-ink);
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	position: relative;
	transition: box-shadow 180ms ease, transform 180ms ease;
}

.wpc-project-card__media {
	aspect-ratio: 16 / 10;
	background: var(--wpc-navy);
	overflow: hidden;
	position: relative;
}

.wpc-project-card__media img {
	display: block;
	height: 100% !important;
	object-fit: cover;
	transition: transform 240ms ease;
	width: 100%;
}

.wpc-project-card__placeholder {
	align-items: center;
	background: linear-gradient(145deg, var(--wpc-navy), #06376e);
	display: flex;
	height: 100%;
	justify-content: center;
	width: 100%;
}

.wpc-project-card__placeholder-mark {
	border: .75rem solid var(--wpc-coral);
	border-radius: 50%;
	height: 4.5rem;
	opacity: .9;
	position: relative;
	width: 4.5rem;
}

.wpc-project-card__placeholder-mark::after {
	background: var(--wpc-paper);
	border-radius: 50%;
	content: "";
	height: 1.1rem;
	position: absolute;
	right: -.35rem;
	top: -.35rem;
	width: 1.1rem;
}

.wpc-project-card__badge {
	align-items: flex-start;
	background: rgb(255 255 255 / 94%);
	border-radius: var(--wpc-radius-pill);
	box-shadow: 0 .3rem .8rem rgb(0 20 53 / 12%);
	color: var(--wpc-ink);
	display: inline-flex;
	font-size: .72rem;
	font-weight: 700;
	gap: .35rem;
	left: .85rem;
	letter-spacing: .04em;
	line-height: 1.2;
	max-width: calc(100% - 1.7rem);
	padding: .45rem .7rem;
	position: absolute;
	text-transform: uppercase;
	top: .85rem;
	z-index: 1;
}

.wpc-project-card__badge::before {
	background: var(--wpc-coral);
	content: "";
	display: block;
	flex-shrink: 0;
	height: .8rem;
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5z'/%3E%3C/svg%3E");
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	width: .8rem;
}

/*
 * Above the card's stretched link: `.wpc-project-card__title a::after` covers
 * the whole card at `z-index: 2`, so at 1 the discs sit under it and the
 * pointer never reaches them — no `:hover`, no tooltip. The trade is that the
 * discs are not part of the link's click area any more, which is what a
 * tooltip trigger wants anyway.
 */
.wpc-project-card__topics {
	bottom: .85rem;
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	left: .85rem;
	list-style: none;
	margin: 0;
	max-width: calc(100% - 1.7rem);
	padding: 0;
	position: absolute;
	z-index: 3;
}

.wpc-project-card__topic {
	margin: 0;
	position: relative;
	cursor: pointer;
}

/*
 * The icon is a CSS image on the mark itself, never an <img>: the card's
 * `.wpc-project-card__media img` rules force `height: 100% !important` and
 * scale the image on card hover, and an icon must inherit neither.
 */
.wpc-project-card__topic-mark {
	align-items: center;
	background: var(--wpc-coral);
	border-radius: 50%;
	box-shadow: 0 .25rem .7rem rgb(0 20 53 / 22%);
	display: flex;
	flex-shrink: 0;
	height: 2.3rem;
	justify-content: center;
	width: 2.3rem;
}

.wpc-project-card__topic-mark::before {
	background: var(--wpc-topic-icon) center / contain no-repeat;
	content: "";
	display: block;
	height: 1.4rem;
	width: 1.4rem;
}

/*
 * An <img>/background of an SVG cannot be recoloured from outside, so the file
 * becomes a mask over a white fill: whatever colours it ships with, it renders
 * white on the coral disc. Raster icons keep their own colours above.
 */
.wpc-project-card__topic-mark--mask::before {
	mask-image: var(--wpc-topic-icon);
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
	background: #fff;
}

/*
 * For icons drawn as a dark disc with white shapes on top. An alpha mask would
 * keep the whole disc and paint a solid white circle, so the mask reads
 * lightness instead: the dark disc drops out and only the white shapes show.
 * Opt-in per topic term — a plain black glyph would vanish under this.
 */
.wpc-project-card__topic-mark--mask-light::before {
	mask-mode: luminance;
}

/*
 * The tooltip grows rightwards from the mark's left edge rather than centring
 * on it: the row starts at the card's left inset, so a centred bubble would
 * hang outside the media box and be clipped by its `overflow: hidden`.
 */
.wpc-project-card__topic-tip {
	background: var(--wpc-coral);
	border-radius: .4rem;
	bottom: calc(100% + .45rem);
	box-shadow: 0 .3rem .8rem rgb(0 20 53 / 28%);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	left: 0;
	line-height: 1.25;
	max-width: 11rem;
	opacity: 0;
	padding: .35rem .55rem;
	pointer-events: none;
	position: absolute;
	transition: opacity 160ms ease;
	width: max-content;
	z-index: 2;
}

.wpc-project-card__topic:hover .wpc-project-card__topic-tip,
.wpc-project-card__topic:focus-within .wpc-project-card__topic-tip {
	opacity: 1;
}

.wpc-project-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.35rem;
}

.wpc-project-card__title {
	font: 700 clamp(1.2rem, 1.8vw, 1.55rem)/1.2 Silka, "Helvetica Neue", Arial, sans-serif;
	margin: 0;
}

.wpc-project-card__title a {
	color: var(--wpc-ink);
	text-decoration: none;
}

.wpc-project-card__title a::after {
	content: "";
	inset: 0;
	position: absolute;
	z-index: 2;
}

.wpc-project-card__description {
	color: var(--wpc-muted);
	font-size: .95rem;
	line-height: 1.6;
	margin: .85rem 0 1.25rem;
}

.wpc-project-card__lead {
	color: var(--wpc-muted);
	font-size: .875rem;
	line-height: 1.45;
	margin: .5rem 0 1.1rem;
}

.wpc-project-grid--no-lead .wpc-project-card__lead {
	display: none;
}

.wpc-project-card__cue {
	color: var(--wpc-coral);
	font-size: .9rem;
	font-weight: 700;
	margin-top: auto;
}

/* Keep a gap above the cue when nothing sits between it and the title. */
.wpc-project-card__title + .wpc-project-card__cue,
.wpc-project-grid--no-lead .wpc-project-card__title + .wpc-project-card__lead + .wpc-project-card__cue {
	padding-top: 1.1rem;
}

.wpc-project-card:hover,
.wpc-project-card:focus-within {
	box-shadow: var(--wpc-shadow-card);
	transform: translateY(-.3rem);
}

.wpc-project-card:hover .wpc-project-card__media img,
.wpc-project-card:focus-within .wpc-project-card__media img {
	transform: scale(1.035);
}

.wpc-project-card:focus-within {
	outline: 3px solid var(--wpc-coral);
	outline-offset: 4px;
}

.wpc-project-card__title a:focus-visible {
	outline: 0;
}

@media (max-width: 1024px) {
	.wpc-map {
		height: 31rem;
	}

	/*
	 * Once the actions drop below the bar they sit exactly where an absolutely
	 * positioned dropdown lands, which buried the Apply button under an open
	 * panel. Below this breakpoint the panel is in flow instead, so opening a
	 * facet pushes the actions down and Apply stays reachable — a dropdown on
	 * wide screens, an accordion on narrow ones.
	 */
	.wpc-filter__panel {
		margin-top: .7rem;
		max-height: none;
		min-width: 0;
		position: static;
		width: 100%;
	}

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

@media (max-width: 767px) {
	.wpc-map {
		border-radius: 1rem;
		height: 25rem;
	}

	.wpc-map .leaflet-popup-content {
		width: min(17rem, calc(100vw - 5rem)) !important;
	}

	.wpc-filter {
		border-radius: 1rem;
		/* padding: 1rem; */
	}

	.wpc-filter__bar,
	.wpc-filter__actions,
	.wpc-filter__buttons {
		align-items: stretch;
		flex-direction: column;
		width: 100%;
	}

	.wpc-filter__control,
	.wpc-filter button.wpc-filter__toggle,
	.wpc-filter button.wpc-filter__apply,
	.wpc-filter button.wpc-filter__clear {
		width: 100%;
	}

	.wpc-filter button.wpc-filter__toggle {
		justify-content: flex-start;
		min-height: 2.75rem;
	}

	.wpc-filter__toggle-icon {
		margin-left: auto;
	}

	.wpc-filter__panel {
		box-shadow: none;
		margin-top: .5rem;
		max-height: none;
		min-width: 0;
		position: static;
		width: 100%;
	}

	.wpc-filter__total {
		text-align: center;
	}

	.wpc-project-grid {
		gap: 1.5rem;
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpc-filter__toggle-icon,
	.wpc-project-card,
	.wpc-project-card__media img {
		transition: none;
	}

	.wpc-project-card:hover,
	.wpc-project-card:focus-within,
	.wpc-project-card:hover .wpc-project-card__media img,
	.wpc-project-card:focus-within .wpc-project-card__media img {
		transform: none;
	}
}
