/* The map page. It builds on valleys-map.css (the toolbar, map, labels and
   panel are the same), and adds the Valleys arrow, the crime layer with its
   police forces and FOI figures, and the story pins and entries. */

.vmx .vm-mapwrap {
	height: clamp(480px, 74vh, 660px);
}

@media (max-width: 640px) {
	.vmx .vm-mapwrap {
		height: 440px;
	}
}

.vmx .vmx-main,
.vmx .vm-panel {
	scroll-margin-top: calc(var(--header) + var(--adminbar) + 12px);
}

/* The switches for the story pins and the towns' names sit in a row above the map
   card, so they never cover the map. The row and the card stick together, and the
   panel starts level with the card. At phone width the row goes and the switches
   move up beside Crime. */
.vmx {
	--vmx-places-h: 32px;
	--vmx-places-gap: 10px;
}

.vmx-main {
	display: grid;
	gap: var(--vmx-places-gap);
	min-width: 0;
}

.vmx-places {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	min-height: var(--vmx-places-h);
}

.vmx-switch {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: var(--vmx-places-h);
	padding: 0 13px 0 9px;
	border: 1px solid var(--line-2);
	border-radius: 999px;
	background: transparent;
	color: var(--ink-2);
	font: 600 0.6875rem/1 var(--sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color var(--ease), color var(--ease);
}

/* The pill is 32px tall; this makes the tap area 44px. */
.vmx-switch::before {
	content: '';
	position: absolute;
	top: -6px;
	right: -4px;
	bottom: -6px;
	left: -4px;
}

.vmx-switch:hover {
	border-color: var(--ink-3);
}

.vmx-switch[aria-checked='true'] {
	color: var(--ink);
	border-color: var(--ink-3);
}

.vmx-swtrack {
	position: relative;
	flex: none;
	width: 28px;
	height: 16px;
	border-radius: 8px;
	background: var(--line-2);
	transition: background-color var(--ease);
}

.vmx-swtrack::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--ink-2);
	transition: transform var(--ease), background-color var(--ease);
}

.vmx-switch[aria-checked='true'] .vmx-swtrack {
	background: var(--ink);
}

.vmx-switch[aria-checked='true'] .vmx-swtrack::after {
	background: var(--bg);
	transform: translateX(12px);
}

.vmx-places-tb {
	display: none;
}

@media (min-width: 901px) {
	.vmx .vmx-main {
		position: sticky;
		top: calc(var(--header) + var(--adminbar) + 16px);
	}

	.vmx .vm-panel {
		margin-top: calc(var(--vmx-places-h) + var(--vmx-places-gap));
	}
}

@media (max-width: 640px) {
	.vmx .vm-toolbar {
		gap: 10px;
	}

	.vmx .vm-seg button {
		padding: 0 14px;
	}

	.vmx-places {
		display: none;
	}

	.vmx-main {
		gap: 0;
	}

	.vmx-places-tb {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-end;
		gap: 8px;
		margin-left: auto;
	}
}

.vmx .vm-pl b {
	display: flex;
	align-items: center;
	gap: 8px;
}

.vmx-sw {
	display: inline-block;
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 2px;
}

.vdot {
	display: inline-block;
	flex: none;
	width: 12px;
	height: 12px;
	border-radius: 2px;
	background: repeating-linear-gradient(135deg, #ff6077 0 2px, var(--red) 2px 5px);
}

/* Crime layer: the areas take their force's colour and the Valleys are hatched on top. */
.vmx-vhatch {
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s;
}

.vmx.is-crime .vmx-vhatch {
	opacity: 1;
}

.vmx.is-crime .vm-area {
	stroke-width: 1px;
}

.vmx.is-crime .vm-area:hover {
	filter: brightness(1.18);
}

.vmx.is-crime .vm-vedge {
	stroke-width: 2.5px;
}

.vmx.is-crime .vm-town.vm-inv > .vm-t {
	text-shadow: 0 0 3px var(--bg), 0 0 3px var(--bg), 0 0 2px var(--bg);
}

/* The Valleys arrow, the tag inside the Valleys and the arrow at the edge. */
.vmx-arrows {
	pointer-events: none;
}

.vmx-varrow {
	fill: none;
	stroke: var(--ink);
	stroke-width: 1.5px;
	transition: opacity 0.25s;
}

.vmx-vtag,
.vmx-edge {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px 6px 9px;
	border: 1px solid var(--red);
	border-radius: 999px;
	background: var(--bg);
	color: var(--ink);
	font: 800 0.875rem/1 var(--display);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.vmx-vtag {
	top: 12px;
	right: 12px;
	pointer-events: none;
}

.vmx-vtag[hidden],
.vmx-edge[hidden] {
	display: none;
}

.vmx-vtag small {
	font: 500 0.6875rem/1 var(--sans);
	letter-spacing: 0.14em;
	color: var(--ink-3);
}

.vmx-edge {
	min-height: 36px;
	transform: translate(-50%, -50%);
	cursor: pointer;
}

.vmx-edge:hover {
	background: var(--bg-3);
}

.vmx-edge svg {
	width: 16px;
	height: 16px;
	flex: none;
}

/* A town with a story pin shows the pin, not its dot. */
.vm-town.vmx-pinned > i {
	display: none;
}

.vm-town.vmx-pinned.vm-s-r > .vm-t {
	left: 14px;
}

.vm-town.vmx-pinned.vm-s-l > .vm-t {
	right: 14px;
}

/* Interactive things on the map: force pills and story pins. */
.vmx-controls {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.vmx-ctl {
	position: absolute;
	left: 0;
	top: 0;
	will-change: transform;
	transition: opacity 0.25s;
}

.vmx-ctl.vm-off {
	opacity: 0;
	visibility: hidden;
}

.vmx-fpill > button {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	transform: translate(-50%, -50%);
	padding: 5px 11px 5px 8px;
	border: 1px solid var(--line-2);
	border-radius: 999px;
	background: var(--bg);
	color: var(--ink);
	font: 700 0.8125rem/1.1 var(--display);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
	pointer-events: auto;
	cursor: pointer;
}

.vmx-fpill > button:hover,
.vmx-fpill.vm-is-sel > button {
	border-color: var(--ink);
}

.vmx-pin > button {
	position: relative;
	display: block;
	width: 26px;
	height: 34px;
	padding: 0;
	border: 0;
	background: transparent;
	transform: translate(-50%, -100%);
	filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
	pointer-events: auto;
	cursor: pointer;
	transition: filter 0.15s;
}

.vmx-pin > button::after {
	content: '';
	position: absolute;
	inset: -8px;
}

/* Hover is light only: the pin brightens and glows, it does not grow. */
.vmx-pin > button:hover {
	filter: drop-shadow(0 0 6px rgba(255, 96, 119, 0.85)) brightness(1.2);
}

.vmx-pin svg {
	display: block;
	width: 100%;
	height: 100%;
}

.vmx-pin .vmx-body {
	fill: var(--ink);
	stroke: var(--bg);
	stroke-width: 1.5;
}

.vmx-pin .vmx-core {
	fill: var(--bg);
}

.vmx-pin.vm-is-open .vmx-body {
	fill: #fff;
	stroke: var(--red);
	stroke-width: 2.5;
}

.vmx-pin.vm-is-open .vmx-core {
	fill: var(--red);
}

.vmx-pin.vm-dim {
	opacity: 0.35;
}

.vmx-pin.vm-small > button {
	width: 20px;
	height: 26px;
}

.vm-sw-pin {
	width: 11px;
	height: 14px;
	border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
	background: var(--ink);
}

/* Side panel: forces, releases and stories. */
.vm-panel.vmx-force {
	background:
		radial-gradient(ellipse at 0% 0%, var(--ftint, rgba(200, 16, 46, 0.16)), transparent 60%),
		var(--bg-2);
}

.vmx-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.vmx-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 9px;
	border: 1px solid var(--line-2);
	border-radius: 3px;
	font: 500 0.8125rem/1.2 var(--sans);
	color: var(--ink-2);
}

.vmx-chip.vm-is-v {
	border-color: #ff6077;
	color: var(--ink);
}

.vmx-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: 600 0.6875rem/1.2 var(--sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-2);
}

.vmx-status::before {
	content: '';
	width: 9px;
	height: 9px;
	border: 1.5px solid var(--ink-2);
	border-radius: 2px;
}

.vmx-status.vm-ok::before {
	background: var(--ink);
	border-color: var(--ink);
}

.vmx-rel {
	display: grid;
	gap: 12px;
	padding: 16px;
	border: 1px solid var(--line-2);
	border-radius: var(--radius);
	background: var(--bg);
}

.vmx-rel + .vmx-rel {
	margin-top: -2px;
}

.vmx-k {
	font: 600 0.6875rem/1.3 var(--sans);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.vmx-rel h3 {
	margin: 0;
	font-size: 1.375rem;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

.vmx-lead {
	margin: 0;
	font: 700 1.375rem/1.12 var(--display);
	letter-spacing: 0.01em;
	text-transform: uppercase;
	text-wrap: balance;
}

.vmx-seg {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--line-2);
	border-radius: 20px;
	background: var(--bg-2);
}

.vmx-seg button {
	flex: 1 1 auto;
	min-height: 32px;
	padding: 0 8px;
	white-space: nowrap;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	color: var(--ink-2);
	font: 600 0.6875rem/1 var(--sans);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}

.vmx-seg button:hover {
	color: var(--ink);
	border-color: var(--line-2);
}

.vmx-seg button[aria-pressed='true'] {
	background: var(--red);
	border-color: var(--red);
	color: #fff;
}

.vmx-seg button:disabled {
	opacity: 0.4;
	cursor: default;
}

.vmx-ratio {
	display: grid;
	gap: 6px;
	padding-top: 14px;
	border-top: 1px solid var(--line);
}

.vmx-big {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
	font: 800 3rem/0.95 var(--display);
	font-variant-numeric: tabular-nums;
	text-transform: uppercase;
}

.vmx-big small {
	font-size: 1.125rem;
	color: var(--ink-2);
}

.vmx-big svg {
	align-self: center;
	width: 22px;
	height: 22px;
	color: #ff6077;
}

.vmx-ratio p {
	margin: 0;
	font-size: 0.875rem;
	color: var(--ink-2);
}

.vmx-was {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: 600 0.6875rem/1.3 var(--sans);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-2);
}

.vmx-was::before {
	content: '';
	width: 14px;
	border-top: 2px solid #ff6077;
}

.vmx-unitrow {
	display: grid;
	gap: 4px;
}

.vmx-unitrow > span {
	font: 600 0.625rem/1.2 var(--sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.vmx-units {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
}

.vmx-units i {
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background: var(--line-2);
}

.vmx-units i.vm-on {
	background: var(--fc, #754ac2);
}

.vmx-unitrow.vm-dim .vmx-units i.vm-on {
	background: var(--ink-3);
}

.vmx-tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	border: 1px solid var(--line);
	border-radius: 3px;
	background: var(--line);
	overflow: hidden;
}

.vmx-tiles div {
	display: grid;
	align-content: start;
	gap: 2px;
	padding: 10px;
	background: var(--bg-2);
}

.vmx-tiles b {
	font: 800 1.75rem/1 var(--display);
	font-variant-numeric: tabular-nums;
}

.vmx-tiles span {
	font-size: 0.75rem;
	line-height: 1.3;
	color: var(--ink-3);
}

.vmx-tiles em {
	font-style: normal;
	color: var(--ink-2);
}

.vmx-counts {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin: 0;
	padding-top: 10px;
	border-top: 1px solid var(--line);
	font-size: 0.8125rem;
	color: var(--ink-3);
}

.vmx-counts b {
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.vmx-caveat {
	margin: 0;
	font-size: 0.75rem;
	line-height: 1.4;
	color: var(--ink-3);
}

.vmx-split {
	display: grid;
	gap: 8px;
}

.vmx-splitbar {
	display: flex;
	gap: 2px;
	height: 22px;
}

.vmx-splitbar i {
	min-width: 3px;
	border-radius: 2px;
}

.vmx-uk { background: var(--ink-2); }
.vmx-non { background: #6e6a63; }
.vmx-ns { background: repeating-linear-gradient(135deg, #6e6a63 0 2px, var(--bg) 2px 5px); }

.vmx-splitkey {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin: 0;
	font-size: 0.8125rem;
	color: var(--ink-2);
}

.vmx-splitkey b {
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.vmx-bars {
	display: grid;
	gap: 8px;
}

.vmx-bar {
	display: grid;
	grid-template-columns: minmax(80px, 110px) 1fr auto;
	gap: 10px;
	align-items: center;
	font-size: 0.8125rem;
	color: var(--ink-2);
}

.vmx-bar > i {
	display: block;
	height: 10px;
	border-radius: 2px;
	background: var(--bg-3);
}

.vmx-bar > i > i {
	display: block;
	height: 100%;
	border-radius: 2px;
	background: var(--fc, #754ac2);
}

.vmx-bar b {
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}

.vmx-empty {
	display: grid;
	gap: 8px;
	padding: 18px 16px;
	border: 1px dashed var(--line-2);
	border-radius: var(--radius);
}

.vmx-empty b {
	font: 800 1.25rem/1 var(--display);
	text-transform: uppercase;
}

.vmx-empty span {
	font-size: 0.875rem;
	color: var(--ink-3);
}

.vmx-link {
	align-self: flex-start;
	border: 0;
	border-bottom: 1px solid var(--red);
	padding: 0 0 2px;
	background: none;
	color: var(--ink);
	font: 600 0.75rem/1.2 var(--sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
}

.vmx-notes {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0 0 0 16px;
	font-size: 0.8125rem;
	color: var(--ink-3);
}

.vmx-notes li::marker {
	color: #ff6077;
}

details.vmx-more {
	border-top: 1px solid var(--line);
	padding-top: 10px;
}

details.vmx-more > summary {
	font: 600 0.6875rem/1.4 var(--sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-2);
	cursor: pointer;
}

details.vmx-more table {
	width: 100%;
	margin-top: 8px;
	border-collapse: collapse;
	font-size: 0.8125rem;
}

details.vmx-more th,
details.vmx-more td {
	padding: 4px 0;
	border-bottom: 1px solid var(--line);
	text-align: left;
	font-weight: 400;
	color: var(--ink-2);
}

details.vmx-more td {
	padding-left: 10px;
	text-align: right;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}

details.vmx-more thead th {
	font-weight: 600;
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
}

details.vmx-more thead th + th {
	text-align: right;
}

.vmx-tablebox {
	max-height: 280px;
	overflow: auto;
}

/* A release: a card that opens, an offence picker, what stands out, what was not given. */
.vmx-relbox {
	border: 1px solid var(--line-2);
	border-radius: var(--radius);
	background: var(--bg);
}

.vmx-relbox + .vmx-relbox {
	margin-top: 10px;
}

.vmx-relbox > summary {
	display: grid;
	gap: 6px;
	padding: 14px 16px;
	list-style: none;
	cursor: pointer;
}

.vmx-relbox > summary::-webkit-details-marker {
	display: none;
}

.vmx-relbox > summary:hover {
	background: var(--tint);
}

.vmx-relbox > summary h3 {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	font-size: 1.375rem;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

.vmx-relbox > summary h3::after {
	content: '+';
	color: #ff6077;
}

.vmx-relbox[open] > summary h3::after {
	content: '\2212';
}

.vmx-relbox > summary .vmx-lead {
	font-size: 1.125rem;
}

.vmx-relbox > .vmx-rel {
	border: 0;
	border-top: 1px solid var(--line);
	border-radius: 0;
	background: none;
}

.vmx-pick {
	display: grid;
	gap: 6px;
}

.vmx-pick select {
	min-height: 40px;
	padding: 0 12px;
	border: 1px solid var(--line-2);
	border-radius: var(--radius);
	background: var(--bg-2);
	color: var(--ink);
	font: 600 0.875rem/1 var(--sans);
}

.vmx-points,
.vmx-gaps {
	display: grid;
	gap: 8px;
}

.vmx-points ul,
.vmx-gaps ul {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0 0 0 18px;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--ink-2);
}

.vmx-points li {
	color: var(--ink);
}

.vmx-points li::marker {
	color: #ff6077;
}

.vmx-gaps li::marker {
	color: var(--ink-3);
}

/* A health board's figures: each measure with its years beside it, wrapping to the panel's width. */
.vmx-figs {
	display: grid;
	gap: 10px;
}

.vmx-fm {
	display: grid;
	gap: 8px;
	padding-top: 10px;
	border-top: 1px solid var(--line);
}

.vmx-fl {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.3;
	color: var(--ink-2);
}

.vmx-fv {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(5.75em, 1fr));
	gap: 8px 10px;
	margin: 0;
}

.vmx-fv div {
	display: grid;
	gap: 2px;
}

.vmx-fv dt {
	font-size: 0.6875rem;
	line-height: 1.2;
	color: var(--ink-3);
}

.vmx-fv dt em {
	font-style: normal;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.vmx-fv dd {
	margin: 0;
	font: 600 0.9375rem/1.2 var(--sans);
	color: var(--ink);
}

.vmx-stack,
.vmx-split {
	display: grid;
	gap: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
}

.vmx-srow {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	font-size: 0.8125rem;
	color: var(--ink-2);
}

.vmx-srow b {
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}

.vmx-strack {
	display: block;
	height: 14px;
}

.vmx-strack > span {
	display: flex;
	gap: 2px;
	height: 100%;
	min-width: 4px;
}

.vmx-strack i {
	display: block;
	min-width: 2px;
	border-radius: 2px;
}

.vmx-srow.vm-partial,
.vmx-bar.vm-partial {
	opacity: 0.55;
}

.vmx-key {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	color: var(--ink-2);
}

.vmx-key li {
	display: grid;
	grid-template-columns: 12px minmax(0, 1fr) auto;
	gap: 2px 8px;
	align-items: center;
}

.vmx-key li em {
	grid-column: 2 / 4;
	font-size: 0.75rem;
}

.vmx-key i {
	width: 10px;
	height: 10px;
	border-radius: 2px;
}

.vmx-key b {
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}

.vmx-key em {
	font-style: normal;
	font-variant-numeric: tabular-nums;
	color: var(--ink-3);
}

.vmx-dual { background: #8f8a81; }

.vmx-splitkey i {
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 6px;
	border-radius: 2px;
	vertical-align: -1px;
}

.vmx-files {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	margin: 0;
}

/* A story entry: narration, text, video, sources. */
.vmx-narr {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px 8px 8px;
	border: 1px solid var(--line-2);
	border-radius: 999px;
	background: var(--bg);
}

.vmx-narr button {
	display: grid;
	place-items: center;
	flex: none;
	border: 0;
	background: transparent;
	color: var(--ink-2);
	cursor: pointer;
}

.vmx-narr .vmx-play {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--red);
	color: #fff;
}

.vmx-narr .vmx-play svg {
	width: 14px;
	height: 14px;
}

.vmx-narr .vmx-mute {
	width: 32px;
	height: 32px;
	border: 1px solid transparent;
	border-radius: 50%;
}

.vmx-narr .vmx-mute:hover {
	border-color: var(--line-2);
}

.vmx-narr .vmx-mute[aria-pressed='true'] {
	color: #ff6077;
}

.vmx-narr .vmx-mute svg {
	width: 17px;
	height: 17px;
}

.vmx-track {
	position: relative;
	flex: 1;
	height: 4px;
	border-radius: 2px;
	background: var(--line-2);
	overflow: hidden;
}

.vmx-track i {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: var(--ink);
}

.vmx-time {
	flex: none;
	font: 500 0.75rem/1 var(--sans);
	font-variant-numeric: tabular-nums;
	color: var(--ink-3);
}

.vmx-text {
	font: 400 1.0625rem/1.55 var(--serif);
	color: var(--ink);
}

.vmx-text p {
	margin: 0 0 0.9em;
}

.vmx-text p:last-child {
	margin-bottom: 0;
}

.vmx-video {
	position: relative;
	aspect-ratio: 16 / 9;
	max-width: 100%;
	border-radius: 3px;
	overflow: hidden;
	background: #000;
}

.vmx-video > button {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	width: 100%;
	border: 0;
	background: repeating-linear-gradient(135deg, #1b1b1e 0 10px, #161618 10px 20px);
	color: var(--ink);
	cursor: pointer;
}

.vmx-video > button span {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border: 2px solid var(--ink);
	border-radius: 50%;
}

.vmx-video > button svg {
	width: 16px;
	height: 16px;
	margin-left: 3px;
}

.vmx-video iframe,
.vmx-video video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.vmx-srcs {
	display: grid;
	gap: 6px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
}

.vmx-srcs b {
	font: 600 0.6875rem/1.3 var(--sans);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.vmx-srcs ul {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
	color: var(--ink-2);
}

.vmx-srcs a {
	color: var(--ink);
}

/* The story list and the text that search engines and no-script readers get. */
.vmx-list {
	display: grid;
	gap: 18px;
	padding: 4px 20px 20px;
	border-top: 1px solid var(--line);
}

.vmx-list h3 {
	margin: 14px 0 0;
	font: 700 1.125rem/1.1 var(--display);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.vmx-list ul {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vmx-list li {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	align-items: baseline;
}

.vmx-list li a {
	color: var(--ink);
	text-decoration: none;
}

.vmx-list li a:hover {
	text-decoration: underline;
}

.vmx-list li b {
	font: 700 1.25rem/1.1 var(--display);
	text-transform: uppercase;
}

.vmx-list li span {
	font-size: 0.875rem;
	color: var(--ink-3);
}

/* Headlines: each force's panel leads with a few bold lines, each with its
   big number. One opens at a time, to its chart, facts, caveat and source. */
.vmx-where {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.45;
	color: var(--ink-2);
}

.vmx-where b {
	font-weight: 600;
	color: var(--ink);
}

.vmx-hls {
	display: grid;
	border-top: 1px solid var(--line-2);
}

.vmx-hls > .vmx-k {
	padding: 14px 0 4px;
}

.vmx-hl {
	border-bottom: 1px solid var(--line-2);
}

.vmx-hlrow {
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr) 20px;
	gap: 14px;
	align-items: center;
	width: 100%;
	padding: 16px 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.vmx-hlrow:hover .vmx-hlhead {
	text-decoration: underline;
	text-decoration-color: var(--red);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.vmx-hlnum b {
	display: block;
	font: 800 2.5rem/0.9 var(--display);
	color: #ff6077;
	white-space: nowrap;
}

.vmx-hlnum.vm-long b {
	font-size: 2rem;
}

.vmx-hlnum span {
	display: block;
	margin-top: 6px;
	font: 600 0.625rem/1.25 var(--sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.vmx-hltext {
	display: grid;
	gap: 5px;
}

.vmx-hlhead {
	font: 700 1.25rem/1.12 var(--display);
	color: var(--ink);
	text-wrap: pretty;
}

.vmx-chev {
	width: 20px;
	height: 20px;
	color: var(--ink-3);
	transition: transform 0.2s ease;
}

.vmx-hl.vm-open .vmx-chev {
	color: var(--ink);
	transform: rotate(180deg);
}

.vmx-hldet {
	display: grid;
	gap: 12px;
	padding: 0 0 18px;
}

.vmx-hlsub {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.45;
	color: var(--ink-2);
}

.vmx-hc {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 14px;
	border: 1px solid var(--line-2);
	border-radius: var(--radius);
	background: var(--bg);
}

.vmx-hcbars {
	display: grid;
	grid-template-columns: repeat(var(--n), minmax(0, 1fr));
	gap: 10px;
}

.vmx-hccol {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.vmx-hcplot {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 4px;
	height: 120px;
	padding-top: 22px;
	border-bottom: 1px solid var(--line-2);
}

.vmx-hcplot i {
	position: relative;
	flex: 0 1 48px;
	min-height: 2px;
	border-radius: 3px 3px 0 0;
	background: #6e6a63;
}

.vmx-hcplot i.vm-hot {
	background: #ff6077;
}

.vmx-hcplot b {
	position: absolute;
	bottom: 100%;
	left: 50%;
	padding-bottom: 4px;
	transform: translateX(-50%);
	font: 600 0.75rem/1 var(--sans);
	font-variant-numeric: tabular-nums;
	color: var(--ink);
	white-space: nowrap;
}

.vmx-hcl {
	text-align: center;
	font-size: 0.75rem;
	color: var(--ink-3);
}

.vmx-hckey {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 0;
	font-size: 0.75rem;
	color: var(--ink-2);
}

.vmx-hckey span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.vmx-hckey i {
	width: 11px;
	height: 11px;
	border-radius: 2px;
	background: #6e6a63;
}

.vmx-hckey i.vm-hot {
	background: #ff6077;
}

.vmx-hcrank {
	display: grid;
	gap: 7px;
}

.vmx-hcr {
	display: grid;
	grid-template-columns: minmax(90px, 38%) minmax(0, 1fr) 40px;
	gap: 10px;
	align-items: center;
	font-size: 0.8125rem;
	color: var(--ink-2);
}

.vmx-hcr i {
	position: relative;
	height: 12px;
}

.vmx-hcr s {
	position: absolute;
	top: -4px;
	bottom: -4px;
	width: 1px;
	background: var(--line-2);
}

.vmx-hcr u {
	position: absolute;
	top: 0;
	bottom: 0;
	background: #6e6a63;
}

.vmx-hcr u.vm-hot {
	background: #ff6077;
}

.vmx-hcr u.vm-pos {
	border-radius: 0 3px 3px 0;
}

.vmx-hcr u.vm-neg {
	border-radius: 3px 0 0 3px;
}

.vmx-hcr b {
	text-align: right;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}

.vmx-hcone {
	display: grid;
	gap: 10px;
}

.vmx-hcone > b {
	font: 800 2.5rem/1 var(--display);
}

.vmx-hcsq {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.vmx-hcsq i {
	width: 30px;
	height: 30px;
	border-radius: 3px;
	background: var(--line-2);
}

.vmx-hcsq i:first-child {
	background: #ff6077;
}

.vmx-hcshare {
	display: grid;
	gap: 12px;
}

.vmx-hcs {
	display: grid;
	gap: 6px;
}

.vmx-hcs > span {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	font-size: 0.8125rem;
	color: var(--ink-2);
}

.vmx-hcs > span b {
	font: 700 1.25rem/1 var(--display);
	color: var(--ink);
}

.vmx-hcs i {
	display: block;
	height: 16px;
	overflow: hidden;
	border-radius: 3px;
	background: var(--bg-3);
}

.vmx-hcs u {
	display: block;
	height: 100%;
	border-radius: 3px;
	background: #6e6a63;
}

.vmx-hcs u.vm-hot {
	background: #ff6077;
}

.vmx-hlfacts {
	display: grid;
	gap: 7px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vmx-hlfacts li {
	position: relative;
	padding-left: 17px;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: var(--ink);
}

.vmx-hlfacts li::before {
	content: '';
	position: absolute;
	top: 0.5em;
	left: 0;
	width: 7px;
	height: 7px;
	border-radius: 2px;
	background: #ff6077;
}

.vmx-hlgood {
	margin: 0;
	padding: 11px 13px;
	border: 1px solid rgba(230, 178, 74, 0.3);
	border-radius: var(--radius);
	background: rgba(230, 178, 74, 0.06);
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--ink-2);
}

.vmx-hlgood b {
	display: block;
	margin-bottom: 3px;
	font: 600 0.6875rem/1.2 var(--sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #e6b24a;
}

.vmx-hlsrc {
	display: grid;
	gap: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--line);
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--ink-3);
}

.vmx-hlacts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
}

.vmx-reph {
	margin: 6px 0 -4px;
}

.vmx-js .vmx-static {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.vmx * {
		transition: none !important;
	}
}

/* NHS layer: a glowing dot at the board's office, and a card joined to it by a red line. */
.vmx {
	--nhs: #ff4a63;
}

.vmx-nhs {
	z-index: 4;
	pointer-events: none;
}

.vmx-nhs > button {
	position: relative;
	display: block;
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	pointer-events: auto;
}

.vmx-nhs > button:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: -6px;
	border-radius: 50%;
}

.vmx-nhs-svg {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 68px;
	height: 68px;
	margin: -34px 0 0 -34px;
	overflow: visible;
	pointer-events: none;
	transition: transform 0.15s;
}

.vmx-nhs.vm-small .vmx-nhs-svg {
	transform: scale(0.72);
}

.vmx-nhs > button:hover .vmx-nhs-svg {
	transform: scale(1.1);
}

.vmx-nhs.vm-small > button:hover .vmx-nhs-svg {
	transform: scale(0.8);
}

.vmx-nhs .n-glow {
	fill: url(#mx-nhs-glow);
}

.vmx-nhs .n-r2 {
	fill: none;
	stroke: var(--nhs);
	stroke-opacity: 0.55;
	stroke-width: 1.5;
}

.vmx-nhs .n-r1 {
	fill: none;
	stroke: var(--ink);
	stroke-opacity: 0.9;
	stroke-width: 1.5;
}

.vmx-nhs .n-core {
	fill: var(--ink);
	stroke: var(--bg);
	stroke-width: 2;
}

.vmx-nhs.vm-is-open .n-glow {
	fill: url(#mx-nhs-glow-sel);
}

.vmx-nhs.vm-is-open .n-r2 {
	stroke-opacity: 0.9;
}

.vmx-nhs.vm-is-open .n-r1 {
	stroke: #fff;
	stroke-opacity: 1;
}

.vmx-nhs.vm-is-open .n-core {
	fill: #fff;
	stroke: var(--nhs);
	stroke-width: 2.5;
}

.vmx-nhs-line {
	position: absolute;
	left: 0;
	top: 0;
	width: 1px;
	height: 1px;
	overflow: visible;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s;
}

.vmx-nhs-line .c {
	fill: none;
	stroke: var(--bg);
	stroke-opacity: 0.75;
	stroke-width: 5;
	stroke-linecap: round;
}

.vmx-nhs-line .r {
	fill: none;
	stroke: var(--nhs);
	stroke-width: 2;
	stroke-linecap: round;
}

.vmx-nhs-line circle {
	fill: var(--nhs);
	stroke: var(--bg);
	stroke-width: 1.5;
}

.vmx-nhs-card {
	position: absolute;
	width: 176px;
	height: 96px;
	box-sizing: border-box;
	padding: 12px 14px 0;
	border: 1px solid var(--line-2);
	border-radius: 6px;
	background: var(--bg);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
	text-align: left;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	pointer-events: auto;
	transition: opacity 0.2s;
}

.vmx-nhs-card:hover {
	border-color: var(--ink);
}

.vmx-nhs-card::after {
	content: '';
	position: absolute;
	right: 16px;
	bottom: 16px;
	width: 7px;
	height: 7px;
	border-top: 2px solid var(--nhs);
	border-right: 2px solid var(--nhs);
	transform: rotate(45deg);
}

.vmx-nhs-card b {
	display: block;
	font: 800 1rem/1.1 var(--display);
	white-space: nowrap;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--ink);
}

.vmx-nhs-card i {
	display: block;
	margin-top: 3px;
	font: 600 0.75rem/1.2 var(--display);
	font-style: normal;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--ink-2);
}

.vmx-nhs-card small {
	display: block;
	margin-top: 6px;
	font: 500 0.75rem/1.25 var(--sans);
	letter-spacing: 0.02em;
	color: var(--ink-3);
}

.vmx-nhs-card small + small {
	margin-top: 0;
}

.vmx-nhs.vmx-card-on .vmx-nhs-card {
	opacity: 1;
	visibility: visible;
}

.vmx-nhs.vmx-card-on .vmx-nhs-line {
	opacity: 1;
}

.vmx-nhs-sw {
	display: inline-block;
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--nhs);
	box-shadow: 0 0 0 2px rgba(255, 74, 99, 0.3), 0 0 8px var(--nhs);
}

.vm-pl .vmx-nhs-sw {
	margin-right: 8px;
}

@media (prefers-reduced-motion: reduce) {
	.vmx-nhs-svg,
	.vmx-nhs-card,
	.vmx-nhs-line {
		transition: none;
	}
}

/* The health boards are one group: a glowing line joins their dots, and their panel lists them one under another. */
.vmx-nhs-link {
	fill: none;
	stroke: var(--nhs);
	stroke-width: 1.5;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
	filter: drop-shadow(0 0 3px var(--nhs)) drop-shadow(0 0 9px rgba(255, 74, 99, 0.55));
	pointer-events: none;
}

.vmx-nhs-link.vm-off {
	display: none;
}

.vmx-brd {
	display: grid;
	gap: 12px;
	margin-top: 22px;
	padding-top: 16px;
	border-top: 1px solid var(--line-2);
	scroll-margin-top: 12px;
}

.vmx-brd.vm-on {
	padding-left: 14px;
	box-shadow: inset 2px 0 0 var(--nhs);
}

.vmx-brdh {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) 20px;
	gap: 12px;
	align-items: start;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.vmx-brdt b {
	display: block;
	font: 800 1.375rem/1.1 var(--display);
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--ink);
}

.vmx-brdt small {
	display: block;
	margin-top: 4px;
	font-size: 0.8125rem;
	line-height: 1.35;
	color: var(--ink-3);
}

.vmx-brdh .vmx-loc {
	width: 20px;
	height: 20px;
	color: var(--ink-3);
	transition: color var(--ease);
}

.vmx-brdh:hover .vmx-loc,
.vmx-brdh[aria-pressed='true'] .vmx-loc {
	color: var(--nhs);
}

.vmx-brdh:hover .vmx-brdt b {
	text-decoration: underline;
	text-decoration-color: var(--nhs);
	text-underline-offset: 4px;
}

.vmx-brd > .vmx-hls {
	border-top: 0;
}

.vmx-brdh .vmx-nhs-sw {
	margin-top: 7px;
}

.vmx-brdt b {
	font-size: 1.25rem;
}

/* Headlines in the NHS panel: the number and its label on one line, then the headline across the full width. */
.vmx-nhl .vmx-hlrow {
	grid-template-columns: minmax(0, 1fr) 20px;
	grid-template-areas: 'num chev' 'text chev';
	gap: 6px 12px;
	align-items: start;
	padding: 14px 0;
}

.vmx-nhl .vmx-hlnum {
	grid-area: num;
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.vmx-nhl .vmx-hlnum b {
	flex: none;
	font-size: 2.125rem;
}

.vmx-nhl .vmx-hlnum.vm-long b {
	font-size: 1.75rem;
}

.vmx-nhl .vmx-hlnum span {
	margin-top: 0;
}

.vmx-nhl .vmx-hltext {
	grid-area: text;
}

.vmx-nhl .vmx-chev {
	grid-area: chev;
	align-self: center;
}

.vmx-nhl .vmx-hlhead {
	font-size: 1.125rem;
	line-height: 1.2;
}

/* The reply: a quiet row that opens to the figures. */
.vmx-nreply > summary {
	gap: 4px;
	padding: 12px 14px;
}

.vmx-nreply > summary h3 {
	align-items: baseline;
	font: 600 0.9375rem/1.3 var(--sans);
	text-transform: none;
	color: var(--ink);
}

.vmx-nreply > summary h3::after {
	flex: none;
	font-size: 1.125rem;
	line-height: 1;
}

/* ==================================================================
 * The map block (28 October 2026): layer picker, map buttons, births,
 * the phone's card and sheet, and the No Footer, No Title page.
 * Hover changes light only. Nothing moves.
 * ================================================================== */

.vmx-head {
	margin-bottom: 24px;
}

/* ---------- Map buttons: zoom, and Wales or the Valleys on phones ---------- */
/* Bottom right on wider screens, clear of the Valleys tag at the top. Phones have them top left (below). */
.vmx-mapctl {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 4;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.vmx-mapctl button {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--line-2);
	border-radius: var(--radius);
	background: rgba(12, 12, 13, 0.85);
	color: var(--ink);
	cursor: pointer;
	transition: border-color var(--ease), background-color var(--ease);
}

.vmx-mapctl button:hover {
	border-color: var(--ink-3);
	background-color: var(--bg-3);
}

.vmx-mapctl svg {
	width: 16px;
	height: 16px;
}

.vmx-mapctl .vmx-ctltext {
	display: none;
	width: auto;
	padding: 0 10px;
	font: 600 0.6875rem/1 var(--sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.vmx-mapctl .vmx-ctltext[aria-pressed="true"] {
	border-color: var(--red);
	background: var(--red);
	color: #fff;
}

/* One finger scrolls the page past the map on an ordinary page. On the No Footer, No Title page the map takes every gesture. */
.vmx .vm-mapwrap {
	touch-action: pan-y;
	cursor: grab;
}

.vmx .vm-mapwrap:active {
	cursor: grabbing;
}

body.votv-locked .vmx .vm-mapwrap {
	touch-action: none;
}

/* ---------- Births ---------- */
.vmx.is-births .vm-area {
	stroke-width: 1px;
}

.vmx.is-births .vm-area:hover {
	filter: brightness(1.2);
}

.vmx.is-births .vm-vedge {
	stroke-width: 2.5px;
}

.vmx-sw-vedge {
	background: transparent;
	outline: 2px solid #ff6077;
	outline-offset: -2px;
}

.vm-legend .vmx-lgh {
	flex-basis: 100%;
	font-weight: 600;
	color: var(--ink);
}

/* The count as a plaque, after RN's Memoriam layer: a kicker between two rules, the number large, what it counts beneath. */
.vmx-plaque {
	display: grid;
	justify-items: center;
	gap: 4px;
	margin: 2px 0 4px;
	padding: 14px 12px 12px;
	border: 1px solid var(--line-2);
	border-radius: var(--radius);
	background: rgba(12, 12, 13, 0.45);
	text-align: center;
}

.vmx-plk {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	font: 600 0.6875rem/1.2 var(--sans);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--red-hover);
	text-wrap: balance;
}

.vmx-plk::before,
.vmx-plk::after {
	content: "";
	flex: 1;
	min-width: 16px;
	height: 1px;
	background: var(--line-2);
}

.vmx-pln {
	font: 800 clamp(2.25rem, 4vw, 3rem)/1 var(--display);
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.vmx-pll {
	font-size: 0.8125rem;
	line-height: 1.35;
	color: var(--ink-2);
	text-wrap: balance;
}

.vmx-vline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	margin: 0;
	font-size: 0.875rem;
	color: var(--ink-2);
}

.vmx-vline b {
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.vmx-vline span:last-child {
	color: var(--ink-3);
	font-size: 0.8125rem;
}

.vmx-bpick {
	display: grid;
	grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
	gap: 10px;
}

.vmx-bpick select {
	width: 100%;
	min-width: 0;
}

.vmx-brank b {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.vmx-brank em {
	margin-left: auto;
	font-style: normal;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}

.vmx-bbar {
	display: block;
	width: 100%;
	height: 4px;
	margin-top: 6px;
	border-radius: 2px;
	background: var(--bg-3);
}

.vmx-bbar > i {
	display: block;
	height: 100%;
	border-radius: 2px;
}

.vmx-bar.vm-now span,
.vmx-bar.vm-now b {
	color: var(--ink);
	font-weight: 700;
}

.vmx .vm-panel:not(.vmx-force) .vmx-bar > i > i {
	background: #4e8397;
}

.vmx .vm-panel:not(.vmx-force) .vmx-bar.vm-now > i > i {
	background: #a8d6de;
}

/* ---------- The panel's handle: only on phones ---------- */
.vmx-handle {
	display: none;
}

/* ==================================================================
 * Phones: the lists in a card on the map, the rest in a sheet
 * ================================================================== */
@media (max-width: 800px) {
	.vmx .vm-toolbar {
		flex-wrap: nowrap;
		gap: 8px;
	}

	.vmx .vmx-layerseg,
	.vmx .vmx-viewseg {
		display: none;
	}

	.vmx .vm-stage {
		position: relative;
		display: block;
	}

	.vmx .vmx-places {
		display: none;
	}

	.vmx .vmx-places-tb {
		display: flex;
		align-items: center;
		gap: 6px;
		margin-left: 0;
	}

	.vmx .vmx-places-tb .vmx-switch {
		padding: 0 9px;
		font-size: 0.625rem;
	}

	.vmx .vm-mapwrap {
		height: min(78svh, 640px);
	}

	.vmx-mapctl {
		top: 10px;
		right: auto;
		bottom: auto;
		left: 10px;
	}

	.vmx-mapctl .vmx-ctltext {
		display: grid;
	}

	.vmx .vm-inset {
		display: none;
	}

	/* The legend sits on the map, bottom left, with no footer line under it. */
	.vmx .vm-card {
		position: relative;
	}

	.vmx .vm-foot {
		position: absolute;
		left: 10px;
		right: 10px;
		bottom: 10px;
		z-index: 3;
		padding: 0;
		border: 0;
		pointer-events: none;
	}

	.vmx .vm-coords,
	.vmx .vm-scale {
		display: none;
	}

	.vmx .vm-legend {
		display: inline-flex;
		flex-wrap: wrap;
		gap: 4px 10px;
		max-width: 62%;
		padding: 6px 8px;
		border: 1px solid var(--line);
		border-radius: var(--radius);
		background: rgba(12, 12, 13, 0.82);
		font-size: 0.6875rem;
	}

	.vmx .vm-panel {
		position: absolute;
		z-index: 6;
		margin: 0;
		gap: 10px;
		padding: 14px 14px 16px;
		overflow: auto;
		overscroll-behavior: contain;
		box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
	}

	/* The card: top right, like RN's Memoriam card. */
	.vmx .vm-panel[data-mode="card"] {
		top: 10px;
		right: 10px;
		width: min(264px, calc(100% - 76px));
		max-height: calc(100% - 92px);
		padding-top: 12px;
	}

	.vmx .vm-panel[data-mode="card"] h2 {
		padding-right: 34px;
		font-size: 1.5rem;
	}

	.vmx .vm-panel[data-mode="card"] .vm-hint,
	.vmx .vm-panel[data-mode="card"] .vm-meta {
		display: none;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-pln {
		font-size: 2rem;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-bpick {
		grid-template-columns: 1fr;
	}

	.vmx .vm-panel.is-folded {
		max-height: 58px;
		overflow: hidden;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-handle {
		position: absolute;
		top: 8px;
		right: 8px;
		display: grid;
		place-items: center;
		width: 36px;
		height: 36px;
		padding: 0;
		border: 1px solid var(--line-2);
		border-radius: var(--radius);
		background: transparent;
		color: var(--ink-2);
		cursor: pointer;
		transition: border-color var(--ease), color var(--ease);
	}

	.vmx .vm-panel[data-mode="card"] .vmx-handle:hover {
		border-color: var(--ink-3);
		color: var(--ink);
	}

	.vmx .vm-panel[data-mode="card"] .vmx-handle > span {
		display: none;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-handle .vmx-chev {
		width: 18px;
		height: 18px;
		transform: rotate(180deg);
	}

	.vmx .vm-panel.is-folded .vmx-handle .vmx-chev {
		transform: none;
	}

	/* The sheet: from the bottom of the map, half its height or nearly all of it. */
	.vmx .vm-panel[data-mode="sheet"] {
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		max-height: 52%;
		padding-top: 0;
		border-right: 0;
		border-bottom: 0;
		border-left: 0;
		border-radius: 14px 14px 0 0;
	}

	.vmx .vm-panel[data-mode="sheet"][data-sheet="full"] {
		max-height: calc(100% - 10px);
	}

	.vmx .vm-panel[data-mode="sheet"] .vmx-handle {
		position: sticky;
		top: 0;
		z-index: 2;
		display: grid;
		place-items: center;
		flex: none;
		width: calc(100% + 28px);
		height: 30px;
		margin: 0 -14px;
		padding: 0;
		border: 0;
		background: var(--bg-2);
		cursor: grab;
		touch-action: none;
	}

	.vmx .vm-panel[data-mode="sheet"] .vmx-handle > span {
		display: block;
		width: 40px;
		height: 4px;
		border-radius: 2px;
		background: var(--line-2);
		transition: background-color var(--ease);
	}

	.vmx .vm-panel[data-mode="sheet"] .vmx-handle:hover > span {
		background: var(--ink-3);
	}

	.vmx .vm-panel[data-mode="sheet"] .vmx-handle .vmx-chev {
		display: none;
	}
}

/* ==================================================================
 * The No Footer, No Title template on phones: the page is the map.
 * It fills the screen under the header, nothing scrolls, the footer is
 * hidden and the page does not zoom (inc/map-block.php). svh, so the
 * height holds while the address bar comes and goes.
 * ================================================================== */
@media (max-width: 800px) {
	html:has(body.votv-locked),
	body.votv-locked {
		height: 100%;
		overflow: hidden;
		overscroll-behavior: none;
	}

	body.votv-locked {
		touch-action: pan-x pan-y;
	}

	/* The page does not scroll, so the body is the scroll box and it already starts below the admin bar. The header's own offset for the bar would count it twice and drop the header over the toolbar. */
	body.votv-locked .site-header {
		top: 0;
	}

	body.votv-locked .support,
	body.votv-locked .site-footer,
	body.votv-locked .vmx .vm-table,
	body.votv-locked .vmx .vm-notes,
	body.votv-locked .vmx .vmx-head {
		display: none;
	}

	body.votv-locked .vmx {
		display: flex;
		flex-direction: column;
		height: calc(100svh - var(--header) - var(--adminbar));
		padding: 0;
		border: 0;
	}

	body.votv-locked .vmx > .wrap {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		min-height: 0;
		max-width: none;
		padding: 0;
	}

	body.votv-locked .vmx .vm-toolbar {
		margin: 0;
		padding: 8px 10px;
		border-bottom: 1px solid var(--line);
		background: var(--bg);
	}

	body.votv-locked .vmx .vm-stage {
		flex: 1 1 auto;
		min-height: 0;
	}

	body.votv-locked .vmx .vmx-main,
	body.votv-locked .vmx .vm-card {
		height: 100%;
	}

	body.votv-locked .vmx .vm-card {
		border: 0;
		border-radius: 0;
	}

	body.votv-locked .vmx .vm-mapwrap {
		height: 100%;
	}
}

@supports not (height: 100svh) {
	@media (max-width: 800px) {
		body.votv-locked .vmx {
			height: calc(100vh - var(--header) - var(--adminbar));
		}
	}
}

/* ---------- Second pass (28 October 2026) ---------- */

/* The switches in the card are for phones; wider screens have them above the map. */
.vmx-cardsw {
	display: none;
}

/* A source is a sentence, so its link reads as one: no capitals or tracking. */
.vmx-caveat a {
	color: var(--ink-2);
	font: inherit;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: underline;
	text-decoration-color: var(--line-2);
	text-underline-offset: 3px;
}

.vmx-caveat a:hover {
	color: var(--ink);
	text-decoration-color: var(--red);
}

.vmx .vm-panel dd.vm-num {
	white-space: nowrap;
}

.vmx-bpick {
	grid-template-columns: 96px minmax(0, 1fr);
}

@media (max-width: 800px) {
	/* The toolbar keeps the layer tabs and reset. The switches move into the card. */
	.vmx .vmx-places-tb {
		display: none;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-cardsw {
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
		padding-top: 10px;
		border-top: 1px solid var(--line);
	}

	.vmx .vm-panel[data-mode="card"] .vmx-cardsw .vmx-switch {
		--vmx-places-h: 30px;
		padding: 0 10px 0 7px;
		font-size: 0.625rem;
	}

	/* The card is small type throughout, so it covers as little map as it can. */
	.vmx .vm-panel[data-mode="card"] {
		gap: 8px;
		padding: 12px 12px 12px;
		font-size: 0.8125rem;
	}

	.vmx .vm-panel[data-mode="card"] .vm-pk {
		padding-right: 40px;
		font-size: 0.625rem;
	}

	.vmx .vm-panel[data-mode="card"] h2 {
		margin-top: -4px;
		font-size: 1.25rem;
	}

	.vmx .vm-panel[data-mode="card"] .vm-alt {
		margin-top: -6px;
		font-size: 0.6875rem;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-plaque {
		padding: 9px 8px 8px;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-plk {
		gap: 6px;
		font-size: 0.5625rem;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-pln {
		font-size: 1.625rem;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-pll {
		font-size: 0.6875rem;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-vline {
		font-size: 0.75rem;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-vline span:last-child {
		display: none;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-pick .vmx-k {
		font-size: 0.5625rem;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-pick select {
		min-height: 34px;
		padding: 0 8px;
		font-size: 0.75rem;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-bpick {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.vmx .vm-panel[data-mode="card"] .vm-pl button {
		min-height: 40px;
		padding: 7px 4px;
	}

	.vmx .vm-panel[data-mode="card"] .vm-pl b {
		font-size: 0.875rem;
	}

	.vmx .vm-panel[data-mode="card"] .vm-pl span {
		font-size: 0.6875rem;
	}

	.vmx .vm-panel[data-mode="card"] .vmx-bbar {
		height: 3px;
		margin-top: 4px;
	}

	.vmx .vm-panel.is-folded {
		max-height: 52px;
	}

	.vmx .vm-legend {
		gap: 3px 8px;
		padding: 5px 7px;
		font-size: 0.625rem;
	}

	.vmx .vm-legend .vm-sw {
		width: 10px;
		height: 10px;
	}
}

/* ---------- The No Footer, No Title page on wider screens (28 October 2026) ----------
   The map sits close under the header, the switches join the toolbar row and
   the map card fits the window, so the whole map shows without scrolling. */
@media (min-width: 801px) {
	body.votv-locked .vmx {
		padding-top: 20px;
	}

	body.votv-locked .vmx .vm-toolbar {
		margin-bottom: 16px;
	}

	body.votv-locked .vmx .vmx-places {
		display: none;
	}

	body.votv-locked .vmx .vmx-main {
		gap: 0;
	}

	body.votv-locked .vmx .vmx-places-tb {
		display: flex;
		align-items: center;
		gap: 8px;
		margin-left: auto;
	}

	body.votv-locked .vmx .vm-panel {
		margin-top: 0;
	}

	body.votv-locked .vmx .vm-mapwrap {
		height: clamp(480px, calc(100vh - var(--header) - var(--adminbar) - 200px), 760px);
	}
}

/* Beside the map, the panel takes the card's height and scrolls inside it,
   so the page ends with the map. contain: size keeps the panel's own length
   out of the row's height. */
@media (min-width: 901px) {
	body.votv-locked .vmx .vm-stage {
		align-items: stretch;
	}

	body.votv-locked .vmx .vm-panel {
		contain: size;
		overflow: auto;
		overscroll-behavior: contain;
	}
}

/* ==================================================================
 * The toolbar: layer tabs, a quiet row beneath, Reset and one language link
 * ================================================================== */
.vmx .vm-toolbar.vmx-tb {
	display: grid;
	gap: 14px;
	margin-bottom: 20px;
}

.vmx-tbmain {
	display: flex;
	align-items: flex-end;
	border-bottom: 1px solid var(--line-2);
}

.vmx-tabs {
	display: flex;
	gap: 28px;
}

.vmx-tabs button {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	margin-bottom: -1px;
	padding: 0 2px;
	border: 0;
	border-bottom: 3px solid transparent;
	background: transparent;
	color: var(--ink-2);
	font: 700 1.375rem/1 var(--display);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: color var(--ease), border-color var(--ease);
}

.vmx-tabs button:hover {
	color: var(--ink);
	border-bottom-color: var(--line-2);
}

.vmx-tabs button[aria-pressed='true'] {
	color: #fff;
	border-bottom-color: var(--red);
}

.vmx-tabs svg {
	width: 18px;
	height: 18px;
	flex: none;
}

.vmx-tabs button[data-mx-layer='nhs'][aria-pressed='true'] svg {
	color: var(--nhs);
}

.vmx-tbend {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-left: auto;
	padding-bottom: 12px;
}

.vmx-reset {
	position: relative;
	display: flex;
	align-items: center;
	gap: 7px;
	min-height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ink);
	font: 600 0.8125rem/1 var(--sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
}

/* The control is 32px tall; this makes the tap area 44px. */
.vmx-reset::before {
	content: '';
	position: absolute;
	inset: -6px -4px;
}

.vmx-reset:hover {
	color: var(--ink-2);
}

.vmx-reset svg {
	width: 15px;
	height: 15px;
	flex: none;
}

.vmx-tbsub {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 24px;
}

.vmx-tblab {
	font: 600 0.6875rem/1 var(--sans);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.vmx-zoomto {
	display: flex;
	align-items: center;
	gap: 10px;
}

.vmx-zoomto button {
	position: relative;
	min-height: 32px;
	padding: 0 12px;
	border: 1px solid var(--line-2);
	border-radius: 4px;
	background: transparent;
	color: var(--ink-2);
	font: 600 0.75rem/1 var(--sans);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color var(--ease), color var(--ease);
}

.vmx-zoomto button::before {
	content: '';
	position: absolute;
	inset: -6px -2px;
}

.vmx-zoomto button:hover {
	color: var(--ink);
	border-color: var(--ink-3);
}

.vmx-zoomto button[aria-pressed='true'] {
	color: var(--ink);
	border-color: var(--ink);
}

.vmx .vmx-tbsub .vmx-places-tb {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-left: auto;
}

.vmx-tbsub .vmx-switch {
	padding: 0;
	border: 0;
	border-radius: 0;
}

.vmx-tbsub .vmx-switch:hover {
	color: var(--ink);
}

/* The switches sit in the toolbar now, so the panel starts level with the map card. */
.vmx .vm-panel {
	margin-top: 0;
}

@media (max-width: 800px) {
	.vmx .vm-toolbar.vmx-tb {
		display: block;
	}

	.vmx .vmx-tbmain {
		align-items: center;
		gap: 8px;
		border-bottom: 0;
	}

	.vmx .vmx-tbsub {
		display: none;
	}

	.vmx .vmx-tbend {
		margin-left: 0;
		padding-bottom: 0;
		gap: 8px;
	}

	.vmx .vmx-reset {
		justify-content: center;
		width: 44px;
		height: 44px;
		border: 1px solid var(--line-2);
		border-radius: var(--radius);
	}

	.vmx .vmx-reset .vmx-tbtxt {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

}

/* ---------- Phone fixes (29 October 2026) ---------- */
@media (max-width: 800px) {
	/* The folded card is 52px tall, so its two lines sit centred with equal space above and below. */
	.vmx .vm-panel[data-mode="card"].is-folded {
		padding-top: 7px;
	}

	.vmx .vm-panel.is-folded .vm-alt {
		display: none;
	}
}

/* ---------- Pinned layer bar on phones (29 October 2026) ----------
   The layers are one segmented bar under the header: icon over name, the one
   on in red, and reset beside it. It stays in view while the map is. */
@media (max-width: 800px) {
	.vmx .vmx-tabs {
		display: flex;
		flex: 1 1 auto;
		min-width: 0;
		gap: 0;
		padding: 3px;
		border: 1px solid var(--line-2);
		border-radius: 999px;
		background: var(--bg-2);
	}

	.vmx .vmx-tabs button {
		flex: 1 1 0;
		flex-direction: column;
		justify-content: center;
		gap: 3px;
		min-height: 44px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 999px;
		font: 600 0.6875rem/1 var(--sans);
		letter-spacing: 0.06em;
	}

	.vmx .vmx-tabs button[aria-pressed='true'] {
		background: var(--red);
		color: #fff;
	}

	.vmx .vmx-tabs button[data-mx-layer='nhs'][aria-pressed='true'] svg {
		color: currentColor;
	}

	.vmx .vmx-tabs svg {
		width: 16px;
		height: 16px;
	}

	body:not(.votv-locked) .vmx .vm-toolbar.vmx-tb {
		position: sticky;
		top: calc(var(--header) + var(--adminbar));
		z-index: 20;
		padding: 8px 0;
		background: var(--bg);
	}
}

/* The arrow to the Valleys lands on the red area, so its head is white too. */
#mx-ah path {
	fill: var(--ink);
}
