/* =========================================================================
   Homepage: "Our community" map
   Markup: template-parts/front-page/community-map.php
   Behaviour: assets/js/community-map.js
   ========================================================================= */

.cm-section {
	padding-bottom: 6rem;
	overflow: hidden;
}

.cm-title-highlight {
	color: var(--sea-green);
}

.cm-subtitle {
	max-width: 760px;
	margin-top: 0.25rem;
	color: #4d5d63;
	font-size: 1.05rem;
	line-height: 1.65;
}

.cm-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Numbers ---------- */

.cm-stats {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	max-width: 1120px;
	margin: 0 auto 2.5rem;
	padding: 0;
}

.cm-stats:has(> li:nth-child(3):last-child) {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	max-width: 860px;
}

.cm-stat {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	grid-template-rows: auto auto;
	column-gap: 0.9rem;
	align-items: center;
	padding: 1.1rem 1.25rem;
	background: var(--soft-cream);
	border-radius: 18px;
}

.cm-stat-icon {
	grid-row: span 2;
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--white);
	color: var(--sea-green);
	font-size: 24px;
	box-shadow: 0 3px 10px rgba(7, 80, 86, 0.08);
}

.cm-stat-value {
	align-self: end;
	font-family: 'Funnel Sans', sans-serif;
	font-weight: 700;
	font-size: clamp(1.75rem, 2.6vw, 2.4rem);
	line-height: 1.05;
	color: var(--dark-teal);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.cm-stat-suffix {
	margin-left: 0.04em;
}

.cm-stat-label {
	align-self: start;
	margin-top: 0.15rem;
	font-size: 0.85rem;
	line-height: 1.3;
	color: #56676d;
}

/* ---------- Map and panel ---------- */

.cm-explorer {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 1.25rem;
	align-items: stretch;
}

.cm-map-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 1rem 1rem 0.75rem;
	background: radial-gradient(120% 90% at 50% 42%, #f8fbfa 0%, #edf3f2 100%);
	border: 1px solid #e2ebe9;
	border-radius: 24px;
}

.cm-map {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
}

.cm-svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
}

.cm-context {
	fill: #e6ecea;
}

.cm-region {
	fill: #dbe5e3;
	stroke: #fff;
	stroke-width: 0.8;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
	cursor: pointer;
	transition: fill 0.55s ease, opacity 0.3s ease;
}

.cm-region[data-region^="CA-"] {
	fill: #e3eae8;
}

.cm-region[data-level="1"] { fill: #b6dbcb; }
.cm-region[data-level="2"] { fill: #7cbea1; }
.cm-region[data-level="3"] { fill: #3d9b77; }

/* A member is highlighted: its service area stands out, the rest steps back. */
.cm-svg.has-focus .cm-region[data-level]:not(.is-served) {
	fill: #d3e6de;
}

.cm-region.is-served,
.cm-svg.has-focus .cm-region.is-served {
	fill: var(--dark-teal);
}

.cm-svg.has-region .cm-region[data-level]:not(.is-selected) {
	fill: #cfe3da;
}

.cm-region.is-selected {
	fill: var(--dark-teal);
}

.cm-region.is-hover {
	stroke: var(--navy-black);
	stroke-width: 1.6;
}

.cm-inset-frame {
	fill: rgba(255, 255, 255, 0.8);
	stroke: #d4e1df;
	stroke-width: 1;
	vector-effect: non-scaling-stroke;
}

.cm-inset-label {
	font-family: 'Montserrat', sans-serif;
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	fill: #71858b;
}

.cm-markers,
.cm-arcs,
.cm-leaders,
.cm-inset-label {
	pointer-events: none;
}

.cm-marker-dot {
	fill: var(--blaze-orange);
	stroke: #fff;
	stroke-width: 1.5;
	vector-effect: non-scaling-stroke;
	transform-box: fill-box;
	transform-origin: center;
	filter: drop-shadow(0 1px 1.5px rgba(22, 35, 43, 0.3));
	transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.cm-marker-halo {
	fill: none;
	stroke: var(--blaze-orange);
	stroke-width: 2;
	vector-effect: non-scaling-stroke;
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
}

.cm-marker.is-active .cm-marker-dot {
	transform: scale(1.3);
	stroke-width: 2;
}

.cm-marker.is-active .cm-marker-halo {
	animation: cm-pulse 1.9s ease-out infinite;
}

.cm-marker.is-dim .cm-marker-dot {
	opacity: 0.22;
	filter: none;
}

@keyframes cm-pulse {
	0%   { opacity: 0.75; transform: scale(1); }
	100% { opacity: 0;    transform: scale(2.8); }
}

.cm-leader {
	stroke: #8ea5a9;
	stroke-width: 1;
	stroke-dasharray: 2 2;
	vector-effect: non-scaling-stroke;
}

.cm-leader-dot {
	fill: #6d868b;
}

.cm-leaders {
	transition: opacity 0.6s ease 1.3s;
}

.cm-arc {
	fill: none;
	stroke: var(--blaze-orange);
	stroke-width: 1.75;
	stroke-linecap: round;
	vector-effect: non-scaling-stroke;
	transition: stroke-dashoffset 0.75s cubic-bezier(0.3, 0.6, 0.3, 1);
}

.cm-arc-end {
	fill: var(--blaze-orange);
	stroke: #fff;
	stroke-width: 1.25;
	vector-effect: non-scaling-stroke;
	animation: cm-pop 0.35s ease-out both;
	transform-box: fill-box;
	transform-origin: center;
}

@keyframes cm-pop {
	from { transform: scale(0); }
	to   { transform: scale(1); }
}

/* Intro: before the map scrolls into view (only when the script runs). */
.cm-ready .cm-explorer:not(.cm-in) .cm-region[data-level] {
	fill: #dbe5e3;
}

.cm-ready .cm-explorer:not(.cm-in) .cm-marker-dot {
	transform: scale(0);
}

.cm-ready .cm-explorer:not(.cm-in) .cm-leaders {
	opacity: 0;
}

.cm-ready .cm-explorer:not(.cm-in) .cm-service-bar > span {
	transform: scaleX(0);
}

/* ---------- Tooltip and tour callout ---------- */

.cm-tip {
	--arrow: 0px;
	position: absolute;
	z-index: 3;
	left: 0;
	top: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 240px;
	padding: 0.5rem 0.8rem;
	border-radius: 10px;
	background: var(--navy-black);
	color: var(--white);
	font-size: 0.78rem;
	line-height: 1.35;
	text-align: center;
	white-space: nowrap;
	pointer-events: none;
	transform: translate(-50%, -100%);
	box-shadow: 0 10px 28px -8px rgba(22, 35, 43, 0.4);
}

.cm-tip::after {
	content: '';
	position: absolute;
	left: calc(50% + var(--arrow));
	bottom: -5px;
	width: 10px;
	height: 10px;
	background: inherit;
	border: inherit;
	border-top: 0;
	border-left: 0;
	transform: translateX(-50%) rotate(45deg);
}

.cm-tip.is-below {
	transform: translate(-50%, 0);
}

.cm-tip.is-below::after {
	top: -5px;
	bottom: auto;
	transform: translateX(-50%) rotate(-135deg);
}

.cm-tip[hidden] {
	display: none;
}

.cm-tip strong {
	font-family: 'Funnel Sans', sans-serif;
	font-size: 0.9rem;
	font-weight: 700;
}

.cm-tip span {
	opacity: 0.78;
}

.cm-tip--tour {
	padding: 0.65rem 0.95rem 0.6rem;
	background: var(--white);
	color: var(--navy-black);
	border: 1px solid #e1eae8;
	animation: cm-tip-in 0.35s ease;
}

.cm-tip--tour img {
	display: block;
	width: auto;
	height: auto;
	max-width: 130px;
	max-height: 34px;
	margin-bottom: 0.4rem;
}

.cm-tip--tour span {
	color: #5b6b71;
	opacity: 1;
}

@keyframes cm-tip-in {
	from { opacity: 0; margin-top: 6px; }
	to   { opacity: 1; margin-top: 0; }
}

/* ---------- Legend and pause ---------- */

.cm-map-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.5rem;
	padding: 0 0.25rem;
}

.cm-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.4rem;
	font-size: 0.75rem;
	color: #5b6b71;
}

.cm-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.cm-legend-sizes {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

.cm-legend-sizes i {
	display: block;
	border-radius: 50%;
	background: var(--blaze-orange);
	border: 1.5px solid #fff;
	box-shadow: 0 1px 2px rgba(22, 35, 43, 0.25);
}

.cm-legend-sizes i:nth-child(1) { width: 8px;  height: 8px; }
.cm-legend-sizes i:nth-child(2) { width: 12px; height: 12px; }
.cm-legend-sizes i:nth-child(3) { width: 17px; height: 17px; }

.cm-legend-levels {
	display: inline-flex;
	overflow: hidden;
	border-radius: 3px;
}

.cm-legend-levels i {
	display: block;
	width: 15px;
	height: 10px;
}

.cm-legend-levels i[data-level="1"] { background: #b6dbcb; }
.cm-legend-levels i[data-level="2"] { background: #7cbea1; }
.cm-legend-levels i[data-level="3"] { background: #3d9b77; }

.cm-motion {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	flex: none;
	padding: 0.3rem 0.75rem 0.3rem 0.5rem;
	background: var(--white);
	border: 1px solid #d9e4e2;
	border-radius: 999px;
	color: var(--dark-teal);
	font: 500 0.75rem 'Montserrat', sans-serif;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.cm-motion:hover {
	border-color: var(--dark-teal);
}

.cm-motion .material-icons-outlined {
	font-size: 18px;
}

.cm-motion[hidden] {
	display: none;
}

.cm-map-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: none;
	margin-left: auto;
}

/* "Browse members": the first member's card, then the next (shown by the script). */
.cm-browse {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	flex: none;
	padding: 0.3rem 0.55rem 0.3rem 0.85rem;
	background: var(--dark-teal);
	border: 1px solid var(--dark-teal);
	border-radius: 999px;
	color: var(--white);
	font: 600 0.75rem 'Montserrat', sans-serif;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.cm-browse:hover {
	background: var(--light-teal);
	border-color: var(--light-teal);
}

.cm-browse:focus-visible {
	outline: 2px solid var(--dark-teal);
	outline-offset: 2px;
}

.cm-browse .material-icons-outlined {
	font-size: 18px;
	transition: transform 0.2s ease;
}

.cm-browse:hover .material-icons-outlined {
	transform: translateX(2px);
}

.cm-browse[hidden] {
	display: none;
}

/* ---------- Panel ---------- */

.cm-panel {
	position: relative;
	min-width: 0;
	padding: 1.6rem 1.5rem;
	background: var(--white);
	border: 1px solid #e2ebe9;
	border-radius: 24px;
	box-shadow: 0 24px 48px -32px rgba(7, 80, 86, 0.35);
}

.cm-view {
	outline: none;
}

.cm-view[hidden] {
	display: none;
}

.cm-view--detail {
	animation: cm-view-in 0.3s ease;
}

@keyframes cm-view-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

.cm-eyebrow {
	margin: 0 0 0.7rem;
	font-family: 'Funnel Sans', sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #73858a;
}

.cm-overview-col + .cm-overview-col {
	margin-top: 1.2rem;
}

/* Service bars (also the map filter) */
.cm-services {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.cm-service {
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr) auto;
	grid-template-rows: auto 6px;
	column-gap: 0.65rem;
	row-gap: 0.3rem;
	align-items: center;
	width: 100%;
	padding: 0.35rem 0.55rem;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 12px;
	color: var(--navy-black);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.cm-service:hover {
	background: var(--soft-cream);
}

.cm-service:focus-visible {
	outline: 2px solid var(--dark-teal);
	outline-offset: 1px;
}

.cm-service[aria-pressed="true"] {
	background: #fff4ec;
	border-color: #ffd2b6;
}

.cm-service-icon {
	grid-row: span 2;
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	border-radius: 9px;
	background: var(--muted-teal);
	color: var(--dark-teal);
	font-size: 18px;
	transition: background 0.2s ease, color 0.2s ease;
}

.cm-service[aria-pressed="true"] .cm-service-icon {
	background: var(--blaze-orange);
	color: var(--white);
}

.cm-service-name {
	font-size: 0.9rem;
	font-weight: 500;
}

.cm-service-count {
	font-family: 'Funnel Sans', sans-serif;
	font-weight: 700;
	color: var(--dark-teal);
}

.cm-service-bar {
	grid-column: 2 / 4;
	height: 6px;
	overflow: hidden;
	border-radius: 3px;
	background: #edf2f1;
}

.cm-service-bar > span {
	display: block;
	height: 100%;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--sea-green), #44b98d);
	transform-origin: left;
	transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s, background 0.2s ease;
}

.cm-service[aria-pressed="true"] .cm-service-bar > span {
	background: var(--blaze-orange);
}

/* Heading row of the service bars, with "Show all" while a service is picked */
.cm-eyebrow-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	min-height: 24px;
	margin-bottom: 0.7rem;
}

.cm-eyebrow-row .cm-eyebrow {
	margin: 0;
}

.cm-filter-clear {
	flex: none;
	padding: 0.15rem 0.6rem;
	background: #fff4ec;
	border: 1px solid #ffd2b6;
	border-radius: 999px;
	color: #b33f05;
	font: 600 0.72rem/1.4 'Montserrat', sans-serif;
	white-space: nowrap;
	cursor: pointer;
	animation: cm-view-in 0.25s ease;
	transition: background 0.2s ease;
}

.cm-filter-clear[hidden] {
	display: none;
}

.cm-filter-clear:hover {
	background: #ffe6d4;
}

.cm-filter-clear:focus-visible {
	outline: 2px solid var(--dark-teal);
	outline-offset: 2px;
}

/* Ownership */
.cm-ownership-bar {
	display: flex;
	gap: 2px;
	height: 10px;
	overflow: hidden;
	border-radius: 5px;
}

.cm-own--investor { background: var(--dark-teal); }
.cm-own--public   { background: #3d9b77; }
.cm-own--coop     { background: #8fcbb1; }
.cm-own--tribal   { background: #f2a35e; }
.cm-own--other    { background: #c2d0ce; }

.cm-ownership-legend {
	list-style: none;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.3rem 1rem;
	margin: 0.75rem 0 0;
	padding: 0;
	font-size: 0.78rem;
	color: #4d5d63;
}

.cm-ownership-legend li {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.cm-ownership-legend i {
	flex: none;
	width: 9px;
	height: 9px;
	border-radius: 3px;
}

.cm-ownership-legend strong {
	margin-left: auto;
	color: var(--navy-black);
}

.cm-range {
	margin: 1rem 0 0;
	font-size: 0.88rem;
	line-height: 1.5;
	color: #4d5d63;
}

.cm-range strong {
	font-family: 'Funnel Sans', sans-serif;
	font-size: 1.05rem;
	color: var(--dark-teal);
}

.cm-hint {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0.9rem 0 0;
	padding-top: 0.9rem;
	border-top: 1px dashed #dbe5e3;
	font-size: 0.8rem;
	line-height: 1.45;
	color: #677a80;
}

.cm-hint .material-icons-outlined {
	font-size: 18px;
	color: var(--blaze-orange);
}

/* Member / state card */
.cm-detail-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 1.1rem;
}

.cm-back {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.25rem 0;
	background: none;
	border: 0;
	color: var(--dark-teal);
	font: 600 0.8rem 'Montserrat', sans-serif;
	cursor: pointer;
}

.cm-back:hover {
	color: var(--blaze-orange);
}

.cm-back .material-icons-outlined {
	font-size: 18px;
}

.cm-detail-nav {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.75rem;
	color: #6b7c81;
	white-space: nowrap;
}

.cm-detail-nav button {
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	padding: 0;
	background: var(--white);
	border: 1px solid #dbe5e3;
	border-radius: 50%;
	color: var(--dark-teal);
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.cm-detail-nav button:hover {
	border-color: var(--dark-teal);
}

.cm-detail-nav .material-icons-outlined {
	font-size: 20px;
}

.cm-detail-logo {
	display: flex;
	align-items: center;
	height: 88px;
	margin-bottom: 1rem;
	padding: 0.75rem 1.1rem;
	background: var(--soft-cream);
	border-radius: 16px;
}

.cm-detail-logo img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 56px;
}

.cm-detail-name {
	margin: 0 0 0.35rem;
	font-size: 1.45rem;
	color: var(--navy-black);
}

.cm-detail-place {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	margin: 0 0 1rem;
	font-size: 0.88rem;
	color: #4d5d63;
}

.cm-detail-place .material-icons-outlined {
	font-size: 18px;
	color: var(--blaze-orange);
}

.cm-detail-figure {
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
	margin: 0;
	font-size: 0.9rem;
	color: #4d5d63;
}

.cm-detail-figure strong {
	font-family: 'Funnel Sans', sans-serif;
	font-size: 2.1rem;
	line-height: 1;
	color: var(--dark-teal);
}

.cm-detail-note {
	margin: 0.25rem 0 0;
	font-size: 0.78rem;
	color: #6b7c81;
}

.cm-badges {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 1rem 0 0;
	padding: 0;
}

.cm-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	background: var(--muted-teal);
	color: var(--dark-teal);
	font-size: 0.75rem;
	font-weight: 500;
}

.cm-badge .material-icons-outlined {
	font-size: 15px;
}

.cm-badge--owner {
	background: #fff1e7;
	color: #a63d00;
}

.cm-detail-area {
	margin-top: 1.2rem;
	font-size: 0.85rem;
	line-height: 1.55;
	color: #4d5d63;
}

.cm-detail-area .cm-eyebrow {
	margin-bottom: 0.35rem;
}

.cm-detail-area p {
	margin: 0;
}

.cm-detail-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin-top: 1.2rem;
	color: var(--blaze-orange);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
}

.cm-detail-link:hover {
	text-decoration: underline;
}

.cm-detail-link .material-icons-outlined {
	font-size: 16px;
}

.cm-detail-lead {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	color: #4d5d63;
}

.cm-region-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
}

.cm-region-item {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	width: 100%;
	padding: 0.55rem 0.7rem;
	background: var(--white);
	border: 1px solid #e3ebe9;
	border-radius: 12px;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.cm-region-item:hover,
.cm-region-item:focus-visible {
	border-color: var(--dark-teal);
	background: var(--soft-cream);
}

.cm-region-logo {
	flex: none;
	width: 70px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cm-region-logo img {
	width: auto;
	height: auto;
	max-width: 70px;
	max-height: 30px;
}

.cm-region-logo .cm-logo-text {
	font-size: 0.65rem;
}

.cm-region-text {
	min-width: 0;
}

.cm-region-text strong {
	display: block;
	font-size: 0.88rem;
	line-height: 1.3;
}

.cm-region-text small {
	font-size: 0.75rem;
	color: #6b7c81;
}

.cm-region-cta p {
	margin: 0 0 1rem;
	font-family: 'Solitreo', cursive;
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--blaze-orange);
}

/* ---------- Partner logos under the map ---------- */

.cm-partners {
	margin-top: 2.75rem;
}

.cm-directory-head {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1rem;
}

.cm-directory-title {
	margin: 0;
	font-size: 1.15rem;
	color: var(--navy-black);
}

.cm-directory-count {
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: var(--muted-teal);
	color: var(--dark-teal);
	font: 700 0.75rem 'Funnel Sans', sans-serif;
}

/* A company's name where it has no logo (cards, state lists, partners). */
.cm-logo-text {
	font-family: 'Funnel Sans', sans-serif;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	color: var(--dark-teal);
}

/* Partners: a slow scrolling row (pauses on hover and with the Pause button). */
.cm-partners-viewport {
	display: flex;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.cm-partners-track {
	list-style: none;
	display: flex;
	flex: none;
	margin: 0;
	padding: 0;
	animation: cm-marquee 60s linear infinite;
}

.cm-partner {
	flex: none;
	width: 180px;
	height: 76px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1.4rem;
}

.cm-partner img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 40px;
	filter: grayscale(1);
	opacity: 0.6;
	transition: filter 0.25s ease, opacity 0.25s ease;
}

.cm-partner:hover img {
	filter: none;
	opacity: 1;
}

.cm-partners-viewport:hover .cm-partners-track,
.cm-section.is-paused .cm-partners-track {
	animation-play-state: paused;
}

@keyframes cm-marquee {
	to { transform: translateX(-100%); }
}

/* ---------- Large screens: the panel matches the map's height ---------- */

@media (min-width: 1181px) {
	.cm-view {
		position: absolute;
		inset: 1.5rem 1.4rem 1.25rem 1.5rem;
		overflow-y: auto;
		scrollbar-width: thin;
		scrollbar-color: #cfdcda transparent;
	}
}

/* ---------- Tablets ---------- */

@media (max-width: 1180px) {
	.cm-explorer {
		grid-template-columns: minmax(0, 1fr);
	}

	.cm-view--overview:not([hidden]) {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 2.5rem;
	}

	.cm-overview-col + .cm-overview-col {
		margin-top: 0;
	}

	.cm-view--detail {
		max-width: 560px;
	}
}

/* ---------- Phones ---------- */

@media (max-width: 768px) {
	.cm-section {
		padding-bottom: 4.5rem;
	}

	.cm-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.6rem;
		margin-bottom: 1.75rem;
	}

	.cm-stats:has(> li:nth-child(3):last-child) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cm-stat {
		column-gap: 0.65rem;
		padding: 0.85rem 0.9rem;
		border-radius: 14px;
	}

	.cm-stat-icon {
		width: 36px;
		height: 36px;
		font-size: 20px;
	}

	.cm-stat-label {
		font-size: 0.78rem;
	}

	.cm-map-card {
		padding: 0.5rem 0.4rem 0.6rem;
		border-radius: 18px;
	}

	.cm-map-foot {
		flex-wrap: wrap;
		gap: 0.5rem;
	}

	.cm-legend {
		gap: 0.3rem 1rem;
		font-size: 0.7rem;
	}

	.cm-panel {
		padding: 1.25rem 1.1rem;
		border-radius: 18px;
	}

	.cm-view--overview:not([hidden]) {
		display: block;
	}

	.cm-overview-col + .cm-overview-col {
		margin-top: 1.4rem;
	}

	.cm-partner {
		width: 132px;
		height: 64px;
		padding: 0.5rem 0.9rem;
	}

	.cm-partner img {
		max-height: 32px;
	}

	/* Smaller callouts so they hide less of the map on a phone. */
	.cm-tip {
		padding: 0.4rem 0.65rem;
		font-size: 0.7rem;
	}

	.cm-tip strong {
		font-size: 0.8rem;
	}

	.cm-tip--tour {
		padding: 0.45rem 0.7rem 0.4rem;
	}

	.cm-tip--tour img {
		max-width: 84px;
		max-height: 20px;
		margin-bottom: 0.25rem;
	}
}

/* ---------- Reduced motion: everything still, partners as a grid ---------- */

@media (prefers-reduced-motion: reduce) {
	.cm-region,
	.cm-marker-dot,
	.cm-service-bar > span,
	.cm-arc,
	.cm-leaders,
	.cm-browse .material-icons-outlined {
		transition: none;
	}

	.cm-marker.is-active .cm-marker-halo,
	.cm-arc-end,
	.cm-tip--tour,
	.cm-view--detail {
		animation: none;
	}

	.cm-partners-viewport {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.cm-partners-track {
		flex: 1 1 auto;
		flex-wrap: wrap;
		justify-content: center;
		animation: none;
	}

	.cm-partners-track[aria-hidden="true"] {
		display: none;
	}
}
