.cv-geography-app {
	display: grid;
	gap: 16px;
}

.cv-geography-controls,
.cv-geography-map-card,
.cv-geography-aside .cv-modern-card,
.cv-geography-layout,
.cv-geography-aside {
	margin: 0;
	min-width: 0;
}

.cv-geography-controls {
	padding: 14px 16px;
}

.cv-geography-controls__top {
	display: flex;
	min-width: 0;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
}

.cv-geography-scope {
	display: flex;
	min-width: 0;
	gap: 0;
	padding: 0;
	border: 0;
	border-bottom: 1px solid var(--cv-border, #e2e8f0);
	border-radius: 0;
	background: transparent;
	overflow-x: auto;
}

.cv-geography-scope__tab {
	min-height: 44px;
	padding: 9px 13px 8px;
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	background: transparent;
	color: var(--cv-muted, #64748b);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
}

.cv-geography-scope__tab:hover,
.cv-geography-scope__tab.is-active {
	border-bottom-color: var(--cv-green, #00b09b);
	background: transparent;
	color: #000;
	box-shadow: none;
}

.cv-geography-search {
	display: block;
	min-width: 0;
	flex: 0 1 290px;
	position: relative;
}

.cv-geography-search input {
	min-height: 44px;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 13px;
	border: 1px solid var(--cv-border, #dbe2ea);
	border-radius: 10px;
	background: #ffffff;
	color: var(--cv-ink, #172033);
	font: inherit;
	font-size: 14px;
}

.cv-geography-search input:focus {
	outline: 2px solid rgba(0, 176, 155, .2);
	border-color: var(--cv-green, #00b09b);
}

.cv-geography-suggestions {
	position: absolute;
	top: calc(100% + 5px);
	right: 0;
	left: 0;
	z-index: 1000;
	max-height: 300px;
	overflow-y: auto;
	padding: 5px;
	border: 1px solid var(--cv-border, #dbe2ea);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
}

.cv-geography-suggestion {
	display: grid;
	width: 100%;
	gap: 2px;
	padding: 8px 9px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.cv-geography-suggestion:hover,
.cv-geography-suggestion[aria-selected="true"] {
	background: #f1faf6;
}

.cv-geography-suggestion strong {
	color: var(--cv-ink, #172033);
	font-size: 13px;
}

.cv-geography-suggestion small {
	color: var(--cv-muted, #64748b);
	font-size: 10px;
}

.cv-geography-categories {
	display: flex;
	gap: 7px;
	margin-top: 13px;
	overflow-x: auto;
}

.cv-geography-category {
	min-height: 44px;
	display: inline-flex;
	gap: 6px;
	align-items: center;
	padding: 6px 10px 5px;
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	background: transparent;
	color: #475569;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
}

.cv-geography-category span {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--cv-category-color, #94a3b8);
}

.cv-geography-category[data-geography-category="all"] span {
	background: linear-gradient(135deg, #00b09b 50%, #dbe2ea 50%);
}

.cv-geography-category.is-active {
	border-bottom-color: var(--cv-category-color, #00b09b);
	background: transparent;
	color: #000;
}

.cv-geography-active-filter {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	margin-top: 12px;
	padding: 4px 0 4px 10px;
	border-left: 3px solid #00b09b;
	border-radius: 0;
	background: transparent;
	color: #000;
	font-size: 12px;
	font-weight: 700;
}

.cv-geography-active-filter button {
	padding: 0;
	border: 0;
	background: transparent;
	color: #000;
	font: inherit;
	font-size: 11px;
	cursor: pointer;
}

.cv-geography-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr);
	gap: 16px;
	align-items: start;
}

.cv-geography-view-switch {
	display: none;
	gap: 3px;
	width: max-content;
	max-width: 100%;
	margin-top: 0;
	padding: 4px;
	border: 1px solid var(--cv-border, #e2e8f0);
	border-radius: 999px;
	background: var(--cv-soft, #f4faf8);
}

.cv-geography-view-switch button {
	min-height: 40px;
	padding: 7px 14px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--cv-muted, #64748b);
	font: inherit;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
}

.cv-geography-view-switch button:hover,
.cv-geography-view-switch button:focus-visible {
	background: rgba(255, 255, 255, .72);
	color: var(--cv-green-dark, #000);
}

.cv-geography-view-switch button[aria-pressed="true"] {
	background: #fff;
	color: #000;
	box-shadow: 0 2px 8px rgba(0, 80, 66, .09);
}

.cv-geography-load-error {
	margin: 14px 20px 18px;
	padding: 12px 0 0;
	border-top: 1px solid var(--cv-border, #e2e8f0);
	color: #8d4436;
	font-size: 12px;
}

.cv-geography-load-error p {
	margin: 0 0 8px;
}

.cv-geography-load-error button {
	padding: 5px 0;
	border: 0;
	border-bottom: 1px solid currentColor;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.cv-geography-map-card {
	overflow: hidden;
}

.cv-geography-map-heading {
	padding: 20px 20px 0;
}

.cv-geography-map-heading__top {
	display: flex;
	gap: 14px;
	align-items: start;
	justify-content: space-between;
}

.cv-geography-map-heading h2,
.cv-geography-ranking-heading h2 {
	margin: 4px 0 0;
	color: var(--cv-ink, #172033);
	font-size: 20px;
}

.cv-geography-map-heading p {
	margin: 4px 0 14px;
	color: var(--cv-muted, #64748b);
	font-size: 13px;
}

.cv-geography-map {
	width: 100%;
	max-width: 100%;
	min-height: 560px;
	background: #f1f5f9;
}

.cv-geography-map-legend {
	min-width: 138px;
	padding: 8px 10px;
	border: 1px solid rgba(15, 23, 42, .12);
	border-radius: 8px;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 2px 10px rgba(15, 23, 42, .12);
	color: #334155;
	font-size: 10px;
	line-height: 1.2;
}

.cv-geography-map-legend strong {
	display: block;
	margin-bottom: 6px;
	color: #172033;
	font-size: 10px;
}

.cv-geography-map-legend__scale {
	display: flex;
	gap: 7px;
	align-items: end;
	justify-content: space-between;
}

.cv-geography-map-legend__scale span {
	display: grid;
	gap: 3px;
	justify-items: center;
}

.cv-geography-map-legend__scale i {
	display: block;
	width: 24px;
	height: 9px;
	border-radius: 2px;
}

.cv-geography-map-legend__scale small {
	color: #64748b;
	font-size: 9px;
	font-variant-numeric: tabular-nums;
}

.cv-geography-map .leaflet-control-attribution {
	font-size: 10px;
}

.cv-geography-map .leaflet-control-zoom a {
	width: 40px;
	height: 40px;
	font-size: 22px;
	line-height: 40px;
}

.cv-geography-map .leaflet-tooltip {
	border: 0;
	box-shadow: 0 3px 12px rgba(15, 23, 42, .14);
}

.cv-geography-map .leaflet-tooltip strong {
	color: #172033;
}

.cv-geography-reset {
	flex: 0 0 auto;
	padding: 6px 8px;
	border: 1px solid var(--cv-border, #dbe2ea);
	border-radius: 7px;
	background: #fff;
	color: var(--cv-muted, #64748b);
	font: inherit;
	font-size: 10px;
	font-weight: 800;
	white-space: nowrap;
	cursor: pointer;
}

.cv-geography-reset:hover,
.cv-geography-reset:focus-visible {
	border-color: var(--cv-green, #00b09b);
	background: #f1faf6;
	color: #000;
}

.cv-geography-comarca-label {
	padding: 2px 5px;
	border: 0;
	border-radius: 5px;
	background: rgba(255, 255, 255, .76);
	box-shadow: 0 1px 3px rgba(15, 23, 42, .16);
	color: #334155;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	text-shadow: 0 1px 0 #fff;
}

.cv-geography-comarca-label::before {
	display: none;
}

.cv-geography-attribution {
	margin: 9px 20px 15px;
	color: var(--cv-muted, #64748b);
	font-size: 11px;
}

.cv-geography-aside {
	display: grid;
	gap: 16px;
}

.cv-geography-metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 7px;
	margin-top: 14px;
}

.cv-geography-metrics .cv-metric-chip {
	min-width: 0;
	padding: 6px 0 6px 9px;
	border: 0;
	border-left: 3px solid var(--metric-color, var(--cv-green, #00b09b));
	border-radius: 0;
	background: transparent;
	text-align: left;
}

.cv-geography-metrics .cv-metric-chip strong {
	display: block;
	color: #000;
	font-size: 18px;
	font-variant-numeric: tabular-nums;
}

.cv-geography-metrics .cv-metric-chip small {
	display: block;
	margin-top: 2px;
	color: var(--cv-muted, #64748b);
	font-size: 10px;
}

.cv-geography-ranking-heading {
	display: flex;
	gap: 12px;
	align-items: end;
	justify-content: space-between;
	margin-bottom: 11px;
}

.cv-geography-sort {
	flex: 0 0 auto;
}

.cv-geography-sort select {
	max-width: 146px;
	padding: 6px 26px 6px 8px;
	border: 1px solid var(--cv-border, #dbe2ea);
	border-radius: 8px;
	background: #fff;
	color: #475569;
	font: inherit;
	font-size: 11px;
	cursor: pointer;
}

.cv-geography-sort select:focus-visible {
	outline: 2px solid rgba(0, 176, 155, .2);
	outline-offset: 1px;
	border-color: var(--cv-green, #00b09b);
}

.cv-geography-ranking {
	display: grid;
	max-height: 520px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-right: 5px;
	scrollbar-gutter: stable;
}

.cv-geography-ranking-row {
	display: grid;
	width: 100%;
	padding: 0;
	border-bottom: 1px solid var(--cv-border, #e2e8f0);
	background: transparent;
	color: inherit;
	text-align: left;
	cursor: pointer;
}

.cv-geography-ranking-row:last-child {
	border-bottom: 0;
}

.cv-geography-ranking-row:hover,
.cv-geography-ranking-row.is-selected {
	background: #f8fafc;
}

.cv-geography-ranking-row__select {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	width: 100%;
	padding: 11px 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.cv-geography-ranking-row__select:hover,
.cv-geography-ranking-row__select:focus-visible {
	background: transparent;
}

.cv-geography-row-detail {
	display: inline-flex;
	align-items: center;
	margin: -2px 0 9px;
	padding: 4px 0;
	border-radius: 0;
	color: #000;
	font-size: 11px;
	font-weight: 800;
	text-decoration: none;
}

.cv-geography-row-detail:hover,
.cv-geography-row-detail:focus-visible {
	background: transparent;
	text-decoration: underline;
}

.cv-geography-details-card {
	grid-column: 1 / -1;
	padding: 18px 20px;
	border-left: 3px solid var(--cv-green, #00b09b);
}

.cv-geography-details-card h2 {
	margin: 4px 0 0;
	color: var(--cv-ink, #172033);
	font-size: 20px;
}

.cv-geography-details-card > p {
	margin: 5px 0 12px;
	color: var(--cv-muted, #64748b);
	font-size: 12px;
}

.cv-geography-details-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.cv-geography-details-item {
	min-width: 0;
	padding: 9px 10px;
	border: 1px solid var(--cv-border, #e2e8f0);
	border-radius: 8px;
	background: #fff;
}

.cv-geography-details-item--featured {
	grid-column: 1 / -1;
	padding: 13px 14px;
	border-color: rgba(0, 176, 155, .4);
	background: linear-gradient(135deg, #f0fbf8, #fff);
}

.cv-geography-details-item__label,
.cv-geography-details-item__points {
	display: block;
	color: var(--cv-green-dark, #007264);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.cv-geography-details-item__label {
	margin-bottom: 4px;
}

.cv-geography-details-item__points {
	margin-top: 7px;
}

.cv-geography-details-item strong a {
	color: inherit;
	text-decoration: none;
}

.cv-geography-details-item strong a:hover,
.cv-geography-details-item strong a:focus-visible {
	text-decoration: underline;
}

.cv-geography-details-item strong,
.cv-geography-details-item small {
	display: block;
}

.cv-geography-details-item strong {
	overflow: hidden;
	color: var(--cv-ink, #172033);
	font-size: 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cv-geography-details-item small {
	margin-top: 3px;
	color: var(--cv-muted, #64748b);
	font-size: 10px;
}

.cv-geography-details-item p {
	display: -webkit-box;
	margin: 5px 0 0;
	overflow: hidden;
	color: #475569;
	font-size: 10px;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.cv-geography-details-empty {
	margin: 0;
	color: var(--cv-muted, #64748b);
	font-size: 12px;
}

.cv-geography-details-link {
	display: inline-flex;
	margin-top: 12px;
	color: #000;
	font-size: 11px;
	font-weight: 800;
	text-decoration: none;
}

.cv-geography-details-link:hover,
.cv-geography-details-link:focus-visible {
	text-decoration: underline;
}

.cv-geography-unresolved {
	padding: 18px 20px;
}

.cv-geography-unresolved .cv-geography-ranking-heading p {
	margin: 5px 0 0;
	color: var(--cv-muted, #64748b);
	font-size: 12px;
}

.cv-geography-unresolved-row {
	display: flex;
	width: 100%;
	padding: 10px 0;
	border: 0;
	border-top: 1px solid var(--cv-border, #e2e8f0);
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.cv-geography-unresolved-row strong,
.cv-geography-unresolved-row small {
	display: block;
}

.cv-geography-unresolved-row strong {
	color: var(--cv-ink, #172033);
	font-size: 13px;
}

.cv-geography-unresolved-row small {
	margin-top: 3px;
	color: var(--cv-muted, #64748b);
	font-size: 11px;
}

.cv-geography-ranking-row__main {
	display: block;
	min-width: 0;
}

.cv-geography-ranking-row__main > strong,
.cv-geography-ranking-row__main > small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cv-geography-ranking-row__main > strong {
	color: var(--cv-ink, #172033);
	font-size: 13px;
}

.cv-geography-ranking-row__main > small {
	margin-top: 2px;
	color: var(--cv-muted, #64748b);
	font-size: 11px;
}

.cv-geography-row-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 6px;
}

.cv-geography-row-category {
	display: inline-flex;
	gap: 3px;
	align-items: center;
	padding: 2px 0;
	border-radius: 0;
	background: transparent;
	color: #475569;
	font-size: 9px;
	font-weight: 700;
}

.cv-geography-row-category::before {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--cv-category-color);
	content: '';
}

.cv-geography-row-category strong {
	color: #172033;
}

.cv-geography-ranking-row__counts {
	display: flex;
	min-width: 55px;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	white-space: nowrap;
}

.cv-geography-ranking-row__counts strong {
	color: #000;
	font-size: 16px;
	font-variant-numeric: tabular-nums;
}

.cv-geography-ranking-row__counts small {
	color: var(--cv-muted, #64748b);
	font-size: 10px;
}

.cv-geography-ranking-row__counts em {
	margin-top: 3px;
	color: #64748b;
	font-size: 10px;
	font-style: normal;
}

@supports not (background: color-mix(in srgb, white, black)) {
	.cv-geography-row-category {
		background: #f1f5f9;
	}
}

@media (max-width: 900px) {
	.cv-geography-layout {
		grid-template-columns: 1fr;
	}

	.cv-geography-aside {
		grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
	}
}

@media (max-width: 820px) {
	.cv-geography-view-switch {
		display: inline-flex;
		margin-top: 0;
	}

	.cv-geography-app.is-list-view .cv-geography-map-card {
		display: none;
	}

	.cv-geography-app.is-map-view .cv-geography-aside {
		display: none;
	}

	.cv-geography-controls__top {
		align-items: stretch;
		flex-direction: column;
	}

	.cv-geography-search {
		flex-basis: auto;
		max-width: none;
	}

	.cv-geography-scope {
		width: 100%;
		box-sizing: border-box;
	}

	.cv-geography-map {
		min-height: 390px;
	}

	.cv-geography-details-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.cv-geography-scope {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 4px;
		border-bottom: 0;
		overflow-x: visible;
	}

	.cv-geography-scope__tab {
		min-height: 44px;
		padding: 7px 6px;
		border: 1px solid var(--cv-border, #e2e8f0);
		border-radius: 9px;
		font-size: 11px;
		line-height: 1.2;
		white-space: normal;
	}

	.cv-geography-scope__tab:hover,
	.cv-geography-scope__tab.is-active {
		border-color: var(--cv-green, #00b09b);
		background: #f1faf6;
	}

	.cv-geography-categories {
		flex-wrap: wrap;
		overflow-x: visible;
		gap: 3px 7px;
	}

	.cv-geography-category {
		padding: 5px 2px;
		font-size: 11px;
	}

	.cv-geography-aside {
		grid-template-columns: 1fr;
	}

	.cv-geography-map-heading__top,
	.cv-geography-ranking-heading {
		align-items: start;
		flex-direction: column;
		gap: 6px;
	}

	.cv-geography-details-list {
		grid-template-columns: 1fr;
	}

	.cv-geography-map-heading {
		padding-inline: 14px;
	}

	.cv-geography-attribution {
		margin-inline: 14px;
	}
}
