/* PMG Projects — public styles. Colours follow the theme; override the variables in your theme if needed. */
.pmg-projects,
.pmg-factsheet {
	--pmg-accent: #0b5cad;
	--pmg-border: rgba(0, 0, 0, 0.12);
	--pmg-muted: rgba(0, 0, 0, 0.6);
	--pmg-surface: rgba(0, 0, 0, 0.03);
	--pmg-ongoing: #1e7d32;
	--pmg-upcoming: #8a5a00;
	--pmg-closed: #5c6670;
	--pmg-radius: 10px;
}

.pmg-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin: 0 0 1rem;
}
.pmg-filters > label:first-child {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}
.pmg-filters input[type="search"],
.pmg-filters select {
	font: inherit;
	padding: 0.45rem 0.6rem;
	border: 1px solid var(--pmg-border);
	border-radius: 6px;
	background: #fff;
	min-height: 2.4rem;
}
.pmg-filters input[type="search"] {
	flex: 1 1 16rem;
}
.pmg-count {
	color: var(--pmg-muted);
	font-size: 0.9em;
	margin: 0 0 1rem;
}

.pmg-projects .pmg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
}
.pmg-card[hidden] {
	display: none;
}
.pmg-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--pmg-border);
	border-radius: var(--pmg-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	background: #fff;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.pmg-card__link:hover,
.pmg-card__link:focus-visible {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}
.pmg-card__link:focus-visible {
	outline: 3px solid var(--pmg-accent);
	outline-offset: 2px;
}
.pmg-card__logo {
	height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--pmg-surface);
	padding: 1rem;
}
.pmg-card__logo img {
	max-height: 88px;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}
.pmg-card__mark {
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--pmg-accent);
	text-align: center;
}
.pmg-card__body {
	padding: 1rem 1.1rem 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1;
}
.pmg-card__title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.25;
}
.pmg-card__subtitle {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.4;
}
.pmg-card__meta {
	margin: 0;
	font-size: 0.85rem;
	color: var(--pmg-muted);
}
.pmg-card__badges {
	margin: auto 0 0;
	padding-top: 0.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}
.pmg-badge {
	display: inline-block;
	font-size: 0.75rem;
	line-height: 1;
	padding: 0.35em 0.6em;
	border-radius: 999px;
	border: 1px solid var(--pmg-border);
	white-space: nowrap;
}
.pmg-badge--ongoing { color: #fff; background: var(--pmg-ongoing); border-color: var(--pmg-ongoing); }
.pmg-badge--upcoming { color: #fff; background: var(--pmg-upcoming); border-color: var(--pmg-upcoming); }
.pmg-badge--closed { color: #fff; background: var(--pmg-closed); border-color: var(--pmg-closed); }

.pmg-empty {
	color: var(--pmg-muted);
	font-style: italic;
}

/* Single project page */
.pmg-full-title {
	font-size: 1.2em;
	line-height: 1.4;
	color: var(--pmg-muted, rgba(0, 0, 0, 0.6));
}
.pmg-factsheet {
	margin: 2rem 0;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--pmg-border);
	border-radius: var(--pmg-radius);
	background: var(--pmg-surface);
}
.pmg-factsheet h2 {
	margin-top: 0;
	font-size: 1.25rem;
}
.pmg-factsheet dl {
	margin: 0;
	display: grid;
	grid-template-columns: 1fr;
}
.pmg-factsheet__row {
	display: grid;
	grid-template-columns: minmax(9rem, 30%) 1fr;
	gap: 1rem;
	padding: 0.45rem 0;
	border-bottom: 1px solid var(--pmg-border);
}
.pmg-factsheet dt {
	font-weight: 600;
}
.pmg-factsheet dd {
	margin: 0;
}
@media (max-width: 600px) {
	.pmg-factsheet__row {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}
}
.pmg-consortium {
	margin-top: 1rem;
}
.pmg-consortium summary {
	cursor: pointer;
	font-weight: 600;
}
.pmg-consortium ul {
	margin: 0.75rem 0 0;
	padding-left: 1.2rem;
	columns: 2 22rem;
	column-gap: 2rem;
}
.pmg-consortium li {
	break-inside: avoid;
	margin-bottom: 0.3rem;
}
.pmg-muted {
	color: var(--pmg-muted);
}
.pmg-links {
	margin: 1rem 0 0;
}
.pmg-funding-note {
	margin: 1rem 0 0;
	font-size: 0.8rem;
	color: var(--pmg-muted);
}

/* Post layout: same look as the PMG project posts */
.pmg-post-facts {
	--pmg-line: #1254a2;
	margin: 0 0 1.75rem;
}
.pmg-fact {
	border-left: 3px solid var(--pmg-line, #1254a2);
	padding: 0.15em 0 0.15em 0.9em;
	margin: 0 0 1.4rem;
}
.pmg-fact p {
	margin: 0;
}
.pmg-fact__label {
	font-size: 0.62em;
	font-weight: 600;
	line-height: 1.3;
	color: var(--pmg-line, #1254a2);
	margin-bottom: 0.45em !important;
}
.pmg-fact__value {
	line-height: 1.45;
}
.pmg-fbk-role-heading {
	color: #2e4083;
	font-size: 1.1em;
	font-weight: 700;
	margin: 1.5rem 0 0.75rem;
}
.pmg-fbk-role,
.pmg-fbk-unit,
.pmg-contact {
	margin: 0 0 0.5rem;
}
.pmg-source-note {
	font-size: 0.75em;
	opacity: 0.7;
}
.pmg-post-extras {
	margin-top: 1.75rem;
}
.pmg-post-extras .pmg-consortium summary {
	cursor: pointer;
	font-weight: 600;
}

/* Section headings in the post layout ("FBK role", "Consortium") */
.pmg-section-heading {
	color: #2e4083;
	font-size: 1.1em;
	font-weight: 700;
	margin: 1.75rem 0 0.75rem;
}

/* Consortium map — colours of the PMG site */
.pmg-consortium-section {
	margin-top: 1.75rem;
}
.pmg-map {
	--pmg-sea: #f4f6fa;
	--pmg-land: #e2e9f2;
	--pmg-land-partner: #c8d7ec;
	--pmg-border: #dde3ea;
	--pmg-blue: #1254a2;
	--pmg-navy: #2e4083;
	--pmg-grey: #5f6670;
	position: relative;
	margin: 0.75rem 0 1rem;
	border: 1px solid var(--pmg-border);
	border-radius: 4px;
	background: var(--pmg-sea);
	overflow: hidden;
}
.pmg-map.is-failed {
	display: none;
}
.pmg-map__canvas {
	aspect-ratio: 16 / 10;
	cursor: grab;
	touch-action: pan-y pinch-zoom;
	user-select: none;
	-webkit-user-select: none;
}
.pmg-map__canvas.is-dragging {
	cursor: grabbing;
}
@media (max-width: 600px) {
	.pmg-map__canvas {
		aspect-ratio: 4 / 3;
	}
}
.pmg-map__svg {
	display: block;
	width: 100%;
	height: 100%;
}
.pmg-map__land path {
	fill: var(--pmg-land);
	stroke: #ffffff;
	stroke-width: 0.8px;
	vector-effect: non-scaling-stroke;
	stroke-linejoin: round;
}
.pmg-map__land path.is-partner {
	fill: var(--pmg-land-partner);
}
.pmg-marker {
	cursor: pointer;
	outline: none;
}
.pmg-marker__dot {
	fill: var(--pmg-blue);
	stroke: #ffffff;
	stroke-width: 2px;
	transition: transform 0.12s ease;
}
.pmg-marker.is-coord .pmg-marker__dot,
.pmg-marker.is-own .pmg-marker__dot {
	fill: var(--pmg-navy);
}
.pmg-marker__ring {
	fill: none;
	stroke: var(--pmg-navy);
	stroke-width: 2px;
	opacity: 0.35;
}
.pmg-marker__count {
	fill: #ffffff;
	font-size: 10px;
	font-weight: 700;
	pointer-events: none;
}
.pmg-marker__label {
	fill: var(--pmg-navy);
	font-size: 12px;
	font-weight: 700;
	paint-order: stroke;
	stroke: #ffffff;
	stroke-width: 3px;
	stroke-linejoin: round;
	pointer-events: none;
}
.pmg-marker:hover .pmg-marker__dot,
.pmg-marker:focus-visible .pmg-marker__dot {
	transform: scale(1.25);
}
.pmg-marker:focus-visible .pmg-marker__dot {
	stroke: var(--pmg-navy);
	stroke-width: 2.5px;
}
.pmg-map__controls {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.pmg-map__controls button {
	width: 32px;
	height: 32px;
	padding: 0;
	font: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	border: 1px solid var(--pmg-blue);
	border-radius: 2px;
	background: #ffffff;
	color: var(--pmg-blue);
}
.pmg-map__controls button:hover {
	background: #e7eef7;
}
.pmg-map__controls button:focus-visible {
	outline: 2px solid var(--pmg-navy);
	outline-offset: 2px;
}
.pmg-map__legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 18px;
	padding: 10px 14px;
	border-top: 1px solid var(--pmg-border);
	background: #ffffff;
	font-size: 0.8rem;
	color: var(--pmg-grey);
}
.pmg-key::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 6px;
	border-radius: 50%;
	vertical-align: -1px;
	background: var(--pmg-blue);
	box-shadow: 0 0 0 2px #ffffff;
}
.pmg-key--coord::before {
	width: 12px;
	height: 12px;
	background: var(--pmg-navy);
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(46, 64, 131, 0.35);
}
.pmg-key--fbk {
	font-weight: 700;
	color: var(--pmg-navy);
}
.pmg-key--fbk::before {
	background: var(--pmg-navy);
}
.pmg-map__note:empty {
	display: none;
}
.pmg-map__note {
	flex-basis: 100%;
	font-style: italic;
}
.pmg-map__tip {
	position: absolute;
	z-index: 2;
	max-width: min(320px, calc(100% - 16px));
	max-height: 60%;
	overflow: auto;
	padding: 10px 30px 10px 12px;
	background: #ffffff;
	border: 1px solid var(--pmg-border);
	border-radius: 4px;
	box-shadow: 0 6px 18px rgba(31, 41, 51, 0.12);
	font-size: 0.85rem;
	line-height: 1.35;
	color: #1f2933;
}
.pmg-map__tip ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.pmg-map__tip li + li {
	margin-top: 8px;
}
.pmg-map__tip strong {
	display: block;
	color: var(--pmg-navy);
}
.pmg-map__tip span {
	color: var(--pmg-grey);
	font-size: 0.95em;
}
.pmg-map__tip-count {
	margin: 0 0 6px;
	font-weight: 600;
	color: var(--pmg-blue);
}
.pmg-map__tip-close {
	position: absolute;
	top: 4px;
	right: 6px;
	border: 0;
	background: none;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: var(--pmg-grey);
}
.pmg-consortium-section .pmg-consortium summary {
	cursor: pointer;
	font-weight: 600;
	color: #2e4083;
}
.pmg-consortium-section .pmg-consortium ul {
	margin: 0.75rem 0 0;
	padding-left: 1.2rem;
	font-size: 0.92em;
}
.pmg-consortium-section .pmg-consortium li {
	margin-bottom: 0.35rem;
}
