/*
 * Interactive country map (t33-country-maps): masthead, stage, sidebar, article, footer. One stylesheet for every country.
 *
 * Atlas look (t33-atlas theme): Erode + Atkinson Next, terra #C2502E, sea #5E9C94,
 * ink #1C2A3A, paper #F4EEE3, masthead paper-2 with the double neatline. The map sits on a
 * warm off-white "sea"; region colours come inline from config (--tcm-fill on each region, unit and dot),
 * with white strokes and faint unit borders inside.
 *
 * Layout contract: main.tcm-stage is exactly one viewport minus the masthead
 * (100svh - --tcm-mast-h). Desktop (>=1101px): map left, 400px sidebar right.
 * Below that the sidebar is a bottom sheet (a fixed-height row for now; the UI
 * track adds snap points). Every box that moves is sized from a CSS variable so
 * nothing reflows when the font, JS or an ad arrives.
 *
 * UI track: add rules to the end of this file (or add css/tcm-ui.css and link it
 * in templates/standalone.php). Everything is scoped under .tcm-* classes.
 */

@font-face { font-family: Erode; src: url(/wp-content/themes/t33-atlas/assets/fonts/erode.woff2) format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: Erode; src: url(/wp-content/themes/t33-atlas/assets/fonts/erode-italic.woff2) format('woff2'); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Atkinson Next'; src: url(/wp-content/themes/t33-atlas/assets/fonts/atkinson.woff2) format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Atkinson Next'; src: url(/wp-content/themes/t33-atlas/assets/fonts/atkinson-italic.woff2) format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Atkinson Mono'; src: url(/wp-content/themes/t33-atlas/assets/fonts/atkinson-mono.woff2) format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
	--tcm-accent: #C2502E;
	--tcm-accent2: #5E9C94;
	--tcm-ink: #1C2A3A;
	--tcm-dim: #5C6876;
	--tcm-accent-ink: #A23D1C;
	--tcm-accent2-ink: #33665F;
	--tcm-serif: Erode, ui-serif, Georgia, 'Times New Roman', serif;
	--tcm-mono: 'Atkinson Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--tcm-paper2: #FBF8F2;
	--tcm-night: #15212D;
	--tcm-ochre: #D9A441;
	--tcm-faint: #9a9ca3;
	--tcm-page: #F4EEE3;
	--tcm-white: #fff;
	--tcm-line: #D9CFBF;
	--tcm-sea: #f6f1e7;
	--tcm-mast-h: 56px;
	--tcm-topbar-h: 112px;
	--tcm-sidebar-w: 400px;
		--tcm-sans: 'Atkinson Next', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--tcm-page);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body.tcm-body {
	margin: 0;
	background: var(--tcm-page);
	color: var(--tcm-ink);
	font-family: var(--tcm-sans);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.tcm-body a {
	color: inherit;
}

/* ---------------------------------------------------------------- masthead */

.tcm-mast {
	position: relative;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 28px;
	height: var(--tcm-mast-h);
	padding: 0 20px;
	background: color-mix(in srgb, var(--tcm-paper2) 90%, transparent);
	-webkit-backdrop-filter: saturate(1.2) blur(10px);
	backdrop-filter: saturate(1.2) blur(10px);
}

/* The theme's double neatline under the header. */
.tcm-mast::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -5px;
	height: 5px;
	pointer-events: none;
	border-top: 1px solid rgba(28, 42, 58, 0.22);
	border-bottom: 1px solid rgba(28, 42, 58, 0.09);
}

.tcm-logo,
.tcm-foot-logo {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	flex: none;
	line-height: 1;
	color: var(--tcm-ink);
	text-decoration: none;
}

.tcm-logo svg,
.tcm-foot-logo svg {
	display: block;
	width: 34px;
	height: 34px;
}

.tcm-brand-word {
	font: 600 23px/1 var(--tcm-serif);
	letter-spacing: -0.02em;
}

@media (max-width: 860px) {
	.tcm-logo svg { width: 32px; height: 32px; }
}

.tcm-nav {
	margin-left: auto;
}

.tcm-nav ul,
.tcm-burger-panel ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tcm-nav > ul {
	display: flex;
	align-items: center;
	gap: 4px;
}

.tcm-nav a,
.tcm-nav summary {
	display: block;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	list-style: none;
	border-radius: 6px;
}

.tcm-nav summary::-webkit-details-marker,
.tcm-burger summary::-webkit-details-marker {
	display: none;
}

.tcm-nav a:hover,
.tcm-nav summary:hover,
.tcm-nav details[open] > summary {
	color: var(--tcm-accent-ink);
}

.tcm-nav summary::after {
	content: '';
	display: inline-block;
	margin-left: 6px;
	width: 5px;
	height: 5px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

.tcm-sub {
	position: relative;
}

.tcm-sub-list {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 220px;
	padding: 6px;
	background: var(--tcm-white);
	border: 1px solid var(--tcm-line);
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(40, 30, 20, 0.14);
}

.tcm-sub-list a {
	text-transform: none;
	letter-spacing: 0;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.tcm-sub-list a:hover {
	background: var(--tcm-page);
}

.tcm-burger {
	display: none;
	margin-left: auto;
}

.tcm-burger summary {
	display: block;
	width: 44px;
	height: 44px;
	margin-right: -10px;
	cursor: pointer;
	list-style: none;
	position: relative;
}

.tcm-burger-icon,
.tcm-burger-icon::before,
.tcm-burger-icon::after {
	position: absolute;
	left: 12px;
	width: 20px;
	height: 2px;
	background: var(--tcm-ink);
	border-radius: 2px;
	content: '';
}

.tcm-burger-icon {
	top: 21px;
}

.tcm-burger-icon::before {
	left: 0;
	top: -6px;
}

.tcm-burger-icon::after {
	left: 0;
	top: 6px;
}

.tcm-burger-panel {
	position: absolute;
	top: var(--tcm-mast-h);
	left: 0;
	right: 0;
	max-height: calc(100svh - var(--tcm-mast-h));
	overflow: auto;
	padding: 8px 20px 20px;
	background: var(--tcm-white);
	border-bottom: 1px solid var(--tcm-line);
	box-shadow: 0 16px 32px rgba(40, 30, 20, 0.14);
}

.tcm-burger-panel a {
	display: block;
	padding: 10px 0;
	font-weight: 600;
	text-decoration: none;
}

.tcm-m-head {
	display: block;
	margin-top: 10px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tcm-accent-ink);
}

.tcm-m-group ul {
	padding-left: 12px;
}

@media (max-width: 860px) {
	:root {
		--tcm-mast-h: 52px;
	}
	.tcm-mast {
		padding: 0 16px;
	}
	.tcm-nav {
		display: none;
	}
	.tcm-burger {
		display: block;
	}
}

/* ------------------------------------------------------------------- stage */

.tcm-stage {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--tcm-sidebar-w);
	grid-template-rows: var(--tcm-topbar-h) minmax(0, 1fr);
	height: calc(100vh - var(--tcm-mast-h));
	height: calc(100svh - var(--tcm-mast-h));
	min-height: 520px;
	overflow: hidden;
	background:
		radial-gradient(900px 700px at 22% 28%, #fcfaf5 0%, rgba(252, 250, 245, 0) 70%),
		radial-gradient(700px 600px at 70% 90%, #efe9db 0%, rgba(239, 233, 219, 0) 70%),
		var(--tcm-sea);
}

.tcm-topbar {
	grid-column: 1;
	grid-row: 1;
	position: relative;
	z-index: 20;
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	gap: 10px 16px;
	padding: 12px 24px 0;
	min-width: 0;
}

.tcm-heading {
	min-width: 0;
	flex: 1 1 100%;
	display: flex;
	align-items: baseline;
	gap: 16px;
}

.tcm-title {
	margin: 0;
	font-family: var(--tcm-serif);
	font-size: 32px;
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--tcm-ink);
}

.tcm-tagline {
	margin: 4px 0 0;
	font-size: 13px;
	line-height: 1.35;
	color: var(--tcm-dim);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.tcm-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: none;
	min-width: 0;
	min-height: 42px;
}

.tcm-chiprow {
	display: flex;
	align-items: center;
	gap: 8px;
}

.tcm-map-wrap {
	grid-column: 1;
	grid-row: 2;
	position: relative;
	min-height: 0;
	min-width: 0;
	padding: 0 12px calc(12px + var(--tcm-pad, 0px));
}

.tcm-map {
	display: block;
	width: 100%;
	height: 100%;
}

/* ----------------------------------------------------------------- regions */

.tcm-region {
	cursor: pointer;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	--tcm-fill: #ccc;
	transition: opacity 0.35s ease;
}

.tcm-region path {
	fill: var(--tcm-fill);
	stroke: #fff;
	stroke-width: 1.5;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
	transition: fill 0.6s ease;
}

.tcm-svg.hov-r .tcm-region:not(.is-h) { opacity: 0.5; }
.tcm-svg.hov-r.is-shaded .tcm-region { opacity: 1; }
.tcm-svg.hov-r.is-shaded .tcm-unit.dim { opacity: 0.4; }
.tcm-svg.has-sel .tcm-region:not(.is-sel) { opacity: 0.14; }
.tcm-svg.is-units .tcm-region { opacity: 1; pointer-events: none; }
.tcm-stage.has-macro .tcm-region:not(.in-macro) { opacity: 0.22; }
.tcm-stage.has-macro .tcm-region.in-macro path { stroke-width: 2.4; }
.tcm-stage.has-macro .tcm-unit:not(.in-macro) { opacity: 0.25; }

/* shaded ("View by"): the 36 units carry the colour, the regions stay as hit-targets and outlines */
.tcm-svg.is-shaded .tcm-region path { fill: transparent; }

.tcm-region:focus-visible path {
	stroke: var(--tcm-accent);
	stroke-width: 3.2;
}

.tcm-label {
	fill: var(--tcm-ink);
	font-family: var(--tcm-sans);
	font-weight: 700;
	letter-spacing: -0.02em;
	text-anchor: middle;
	dominant-baseline: central;
	paint-order: stroke;
	stroke: rgba(255, 255, 255, 0.72);
	stroke-width: calc(var(--tcm-k, 1) * 3px);
	stroke-linejoin: round;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.tcm-label.is-hide,
.tcm-labels.is-off,
.tcm-leaders.is-off,
.tcm-plabels.is-off {
	opacity: 0;
}

.tcm-labels,
.tcm-plabels,
.tcm-leaders {
	transition: opacity 0.3s ease;
}

.tcm-leaders { pointer-events: none; }

.tcm-leaders line {
	stroke: var(--tcm-ink);
	stroke-opacity: 0.55;
	stroke-linecap: round;
}

.tcm-leaders circle {
	fill: var(--tcm-ink);
	fill-opacity: 0.7;
}

.tcm-plabel {
	font-family: var(--tcm-sans);
	font-size: 10.5px;
	font-weight: 700;
	fill: var(--tcm-ink);
	text-anchor: middle;
	dominant-baseline: central;
	paint-order: stroke;
	stroke: rgba(255, 255, 255, 0.8);
	stroke-width: 3px;
	stroke-linejoin: round;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.tcm-plabel.is-hide {
	opacity: 0;
}

/* state layer: faint borders inside the regions; filled and clickable in the States view or inside a zoomed region */

.tcm-unit {
	fill: none;
	stroke: #fff;
	stroke-opacity: 0.6;
	stroke-width: calc(var(--tcm-k, 1) * 0.9px);
	stroke-linejoin: round;
	stroke-dasharray: 1;
	stroke-dashoffset: 0;
	pointer-events: none;
	cursor: pointer;
	transition: fill 0.5s ease, opacity 0.25s ease;
}

.tcm-svg.is-shaded .tcm-unit { fill: var(--pf); }

.tcm-svg.is-units .tcm-unit,
.tcm-svg.has-sel .tcm-unit.in-sel {
	fill: var(--pf, color-mix(in srgb, var(--tcm-fill) 72%, #fff));
	stroke-opacity: 1;
	stroke-width: calc(var(--tcm-k, 1) * 1.1px);
	pointer-events: all;
}

.tcm-svg.has-sel .tcm-unit:not(.in-sel) { opacity: 0.14; pointer-events: none; }
.tcm-svg.is-units.has-sel .tcm-unit:not(.in-sel) { opacity: 0.55; pointer-events: all; }
.tcm-unit.is-selp { stroke: var(--tcm-accent); stroke-opacity: 1; stroke-width: calc(var(--tcm-k, 1) * 2.2px); }

.tcm-unit.draw {
	animation: tcm-draw 0.9s ease-out both;
	animation-delay: var(--d, 0ms);
}

.tcm-svg.hov-p .tcm-unit.in-sel:not(.is-h):not(.is-rm),
.tcm-svg.hov-p.is-units .tcm-unit:not(.is-h):not(.is-rm) { opacity: 0.55; }
.tcm-svg.hov-p .tcm-unit.is-rm { opacity: 0.92; }

.tcm-outlines { display: none; pointer-events: none; }
.tcm-outlines.is-on { display: block; }

.tcm-outline {
	fill: none;
	stroke: #3b2a20;
	stroke-opacity: 0.45;
	stroke-width: calc(var(--tcm-k, 1) * 1.6px);
	stroke-linejoin: round;
}

.tcm-lift { pointer-events: none; }

.tcm-lift-p path {
	stroke: #fff;
	stroke-width: calc(var(--tcm-k, 1) * 1.6px);
	stroke-linejoin: round;
}

.tcm-lift-p {
	transform-box: fill-box;
	transform-origin: 50% 55%;
	transform: translateY(calc(var(--tcm-k, 1) * -6px)) scale(1.03);
	filter: drop-shadow(0 calc(var(--tcm-k, 1) * 9px) calc(var(--tcm-k, 1) * 8px) rgba(70, 45, 25, 0.32));
	animation: tcm-lift 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes tcm-lift {
	from { transform: none; filter: drop-shadow(0 0 0 rgba(70, 45, 25, 0)); }
}

@keyframes tcm-draw {
	from { stroke-dashoffset: 1; }
	to { stroke-dashoffset: 0; }
}

/* pins */

.tcm-pins { pointer-events: none; }

.tcm-pin-ring,
.tcm-pin-dot,
.tcm-pin-t {
	animation-duration: 0.5s;
	animation-timing-function: cubic-bezier(0.3, 1.6, 0.5, 1);
	animation-fill-mode: both;
	animation-delay: inherit;
	animation-name: tcm-pop;
	transform-box: fill-box;
	transform-origin: center;
}

.tcm-pin-t {
	animation-name: tcm-fade;
	animation-timing-function: ease;
	font-family: var(--tcm-sans);
	font-size: 12.5px;
	font-weight: 700;
	fill: var(--tcm-ink);
	dominant-baseline: central;
	paint-order: stroke;
	stroke: #fff;
	stroke-width: 4px;
	stroke-linejoin: round;
}

.tcm-pin-ring { fill: rgba(194, 80, 46, 0.18); }
.tcm-pin-dot { fill: #fff; stroke: var(--tcm-accent); stroke-width: 2.6; }
.tcm-pin.is-cap .tcm-pin-dot { fill: var(--tcm-accent); stroke: #fff; }
.tcm-pin.is-cap .tcm-pin-t { font-size: 14px; font-weight: 800; }
.tcm-pin.is-hit .tcm-pin-ring { animation: tcm-pulse 1.5s ease-out 4 both; fill: rgba(94, 156, 148, 0.28); }
.tcm-pin.is-hit .tcm-pin-dot { fill: var(--tcm-accent2); stroke: #fff; }

@keyframes tcm-pop {
	from { opacity: 0; transform: scale(0); }
	to { opacity: 1; transform: scale(1); }
}

@keyframes tcm-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes tcm-pulse {
	0% { transform: scale(0.5); opacity: 0.9; }
	100% { transform: scale(2.8); opacity: 0; }
}

/* shaded: region outlines over the unit colours */
.tcm-svg.is-shaded .tcm-region path { stroke: rgba(96, 62, 40, 0.5); stroke-width: 1.3; }
.tcm-region { transform-box: fill-box; transform-origin: center; }

/* tooltip */

.tcm-tip {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 8;
	display: flex;
	flex-direction: column;
	gap: 1px;
	max-width: 250px;
	padding: 9px 13px;
	background: #fff;
	border: 1px solid var(--tcm-line);
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(60, 40, 20, 0.16);
	font-size: 13px;
	line-height: 1.35;
	color: var(--tcm-dim);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.14s ease;
	will-change: transform;
}

.tcm-tip.is-on { opacity: 1; }
.tcm-tip strong { font-size: 15px; font-weight: 800; color: var(--tcm-ink); }
.tcm-tip-tag { margin-top: 3px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tcm-accent-ink); }
.tcm-tip-val { margin-top: 3px; }
.tcm-tip-val b { color: var(--tcm-ink); }

/* legend */

.tcm-legend {
	position: absolute;
	left: 16px;
	bottom: calc(14px + var(--tcm-pad, 0px));
	z-index: 4;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 10px 14px 11px;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 6px 20px rgba(60, 40, 20, 0.1);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border: 1px solid var(--tcm-line);
	border-radius: 14px;
	font-size: 12px;
	color: var(--tcm-dim);
	animation: tcm-rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tcm-legend b { font-size: 12px; font-weight: 800; color: var(--tcm-ink); }
.tcm-lg-cats { display: flex; flex-wrap: wrap; gap: 2px 4px; max-width: 330px; }
.tcm-lg-cats span { display: inline-flex; align-items: center; gap: 6px; color: var(--tcm-ink); }
.tcm-lg-b { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 6px; border: 1px solid transparent; border-radius: 12px; background: transparent; font: 600 12px/1.2 var(--tcm-sans); color: var(--tcm-ink); cursor: pointer; }
.tcm-lg-b:hover { background: #f6efe6; }
.tcm-lg-b[aria-pressed='true'] { background: var(--tcm-ink); color: #fff; }
.tcm-lg-b:focus-visible { outline: 3px solid var(--tcm-accent2); outline-offset: 1px; }
.tcm-lg-cats i { width: 12px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.tcm-lg-ramp { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 0; width: 200px; font-weight: 700; color: var(--tcm-ink); }
.tcm-lg-ramp i { grid-column: 1 / -1; height: 10px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); transform-origin: left; animation: tcm-grow 0.8s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.tcm-lg-ramp span:last-child { text-align: right; }

@keyframes tcm-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes tcm-grow { from { transform: scaleX(0); } }

.tcm-stage.is-zoomed .tcm-legend.is-macro { display: none; }

.tcm-reset {
	position: absolute;
	left: 16px;
	top: 4px;
	z-index: 4;
	display: none;
}

.tcm-btn.tcm-reset { display: none; }
.tcm-stage.is-zoomed .tcm-btn.tcm-reset { display: inline-flex; animation: tcm-rise 0.4s both; }

/* --------------------------------------------------------------- controls */

.tcm-search {
	position: relative;
	display: flex;
	align-items: center;
	width: 236px;
	height: 42px;
	background: #fff;
	border: 1px solid var(--tcm-line);
	border-radius: 21px;
	box-shadow: 0 2px 8px rgba(60, 40, 20, 0.05);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tcm-search:focus-within {
	border-color: var(--tcm-accent2);
	box-shadow: 0 0 0 3px rgba(94, 156, 148, 0.2);
}

.tcm-search-i {
	display: flex;
	padding-left: 14px;
	color: var(--tcm-dim);
}

.tcm-q {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0 12px 0 8px;
	border: 0;
	background: transparent;
	font: 600 15px/1 var(--tcm-sans);
	color: var(--tcm-ink);
	outline: none;
}

.tcm-q::placeholder { color: var(--tcm-dim); font-weight: 600; }

.tcm-qx {
	flex: none;
	width: 34px;
	height: 34px;
	margin-right: 4px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--tcm-dim);
	cursor: pointer;
}

.tcm-qx:hover { background: var(--tcm-page); }

.tcm-lb {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	z-index: 50;
	min-width: 300px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--tcm-line);
	border-radius: 14px;
	box-shadow: 0 16px 40px rgba(60, 40, 20, 0.18);
	max-height: 60vh;
	overflow: auto;
}

.tcm-opt {
	display: flex;
	flex-direction: column;
	padding: 8px 10px;
	border-radius: 9px;
	cursor: pointer;
}

.tcm-opt[aria-selected='true'],
.tcm-opt:hover { background: #f6efe6; }
.tcm-opt-t { font-size: 15px; font-weight: 700; color: var(--tcm-ink); }
.tcm-opt-s { font-size: 12px; color: var(--tcm-dim); }
.tcm-lb-msg { padding: 10px; font-size: 14px; color: var(--tcm-dim); }

.tcm-seg {
	position: relative;
	display: inline-flex;
	height: 42px;
	padding: 3px;
	background: #fff;
	border: 1px solid var(--tcm-line);
	border-radius: 21px;
	box-shadow: 0 2px 8px rgba(60, 40, 20, 0.05);
}

.tcm-seg button {
	position: relative;
	z-index: 1;
	min-width: 84px;
	padding: 0 14px;
	border: 0;
	border-radius: 18px;
	background: transparent;
	font: 700 14px/1 var(--tcm-sans);
	color: var(--tcm-dim);
	cursor: pointer;
	transition: color 0.25s ease;
}

.tcm-seg button[aria-pressed='true'] { color: #fff; }
.tcm-seg-thumb {
	position: absolute;
	z-index: 0;
	top: 3px;
	bottom: 3px;
	left: 3px;
	width: calc(50% - 3px);
	border-radius: 18px;
	background: var(--tcm-ink);
	transition: transform 0.35s cubic-bezier(0.3, 1.2, 0.4, 1);
}

.tcm-seg[data-mode='states'] .tcm-seg-thumb { transform: translateX(100%); }

.tcm-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 42px;
	padding: 0 15px;
	border: 1px solid var(--tcm-line);
	border-radius: 21px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(60, 40, 20, 0.05);
	font: 700 14px/1 var(--tcm-sans);
	color: var(--tcm-ink);
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.tcm-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(60, 40, 20, 0.12); }
.tcm-btn .tcm-btn-k { color: var(--tcm-dim); font-weight: 600; margin-right: -3px; }
.tcm-btn svg { flex: none; }

.tcm-q:focus-visible,
.tcm-seg button:focus-visible,
.tcm-btn:focus-visible,
.tcm-btn-s:focus-visible,
.tcm-btn-p:focus-visible,
.tcm-chip:focus-visible,
.tcm-link:focus-visible,
.tcm-x:focus-visible,
.tcm-pn:focus-visible,
.tcm-grip:focus-visible,
.tcm-pnrow button:focus-visible,
.tcm-back:focus-visible,
.tcm-region-list a:focus-visible,
.tcm-opt:focus-visible,
.tcm-pop button:focus-visible {
	outline: 3px solid var(--tcm-accent2);
	outline-offset: 2px;
}

.tcm-q:focus-visible { outline: none; }

/* popovers (fixed, placed by JS) */

.tcm-pop {
	position: fixed;
	z-index: 60;
	width: min(340px, calc(100vw - 16px));
	overflow: auto;
	padding: 14px;
	background: #fff;
	border: 1px solid var(--tcm-line);
	border-radius: 16px;
	box-shadow: 0 18px 48px rgba(60, 40, 20, 0.2);
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.tcm-pop.is-in { opacity: 1; transform: none; }
.tcm-pop[hidden] { display: none; }
.tcm-pop-menu { width: min(240px, calc(100vw - 16px)); padding: 8px; }
.tcm-pop-h { margin: 4px 8px 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tcm-dim); }

.tcm-pop-menu button {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 9px 10px 9px 30px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	font: 600 15px/1.2 var(--tcm-sans);
	color: var(--tcm-ink);
	text-align: left;
	cursor: pointer;
	position: relative;
}

.tcm-pop-menu button:hover { background: #f6efe6; }
.tcm-pop-menu button[aria-checked='true'] { font-weight: 800; }
.tcm-pop-menu button[aria-checked='true']::before {
	content: '';
	position: absolute;
	left: 12px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-radius: 50%;
	background: var(--tcm-accent);
}

.tcm-pop-tools section { padding: 2px 0 14px; margin-bottom: 12px; border-bottom: 1px solid var(--tcm-line); border-radius: 10px; }
.tcm-pop-tools section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.tcm-pop-tools h3 { margin: 0 0 6px; font-size: 15px; font-weight: 800; }
.tcm-pop-tools p { margin: 0 0 8px; font-size: 13px; color: var(--tcm-dim); line-height: 1.45; }
.tcm-pop-tools .is-flash { animation: tcm-flash 1.2s ease; }
.tcm-pop-s { min-height: 1.2em; margin: 8px 0 0 !important; font-size: 12px !important; }

@keyframes tcm-flash { 0% { background: #F8E8DF; } 100% { background: transparent; } }

.tcm-btn-p,
.tcm-btn-s {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 38px;
	padding: 0 16px;
	border-radius: 19px;
	font: 700 14px/1 var(--tcm-sans);
	cursor: pointer;
	transition: transform 0.15s ease, background 0.2s ease;
}

.tcm-btn-p { border: 1px solid var(--tcm-ink); background: var(--tcm-ink); color: #fff; }
.tcm-btn-s { border: 1px solid var(--tcm-line); background: #fff; color: var(--tcm-ink); }
.tcm-btn-p:hover,
.tcm-btn-s:hover { transform: translateY(-1px); }
.tcm-btn-s:hover { background: #f6efe6; }

.tcm-cite-row { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: start; margin-bottom: 8px; }
.tcm-cite-row b { font-size: 12px; padding-top: 2px; }
.tcm-cite { margin: 0 !important; font-size: 12px !important; word-break: break-word; user-select: all; }
.tcm-cite-row .tcm-btn-s { height: 30px; padding: 0 12px; font-size: 12px; }
.tcm-pr { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.tcm-pr .tcm-btn-s { height: 32px; padding: 0 14px; font-size: 13px; }
.tcm-print { margin-top: 4px; }

.tcm-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----------------------------------------------------------------- sidebar */

.tcm-sidebar {
	grid-column: 2;
	grid-row: 1 / -1;
	position: relative;
	z-index: 10;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 0 26px 28px;
	background: rgba(255, 255, 255, 0.84);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-left: 1px solid var(--tcm-line);
	box-shadow: -12px 0 40px rgba(60, 40, 20, 0.05);
	scrollbar-width: thin;
}

.tcm-grip { display: none; }
.tcm-card { padding-top: 24px; }

.tcm-kicker {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--tcm-accent-ink);
}

.tcm-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	font-size: 14px;
	color: var(--tcm-dim);
}

.tcm-stats li { white-space: nowrap; }
.tcm-stats b { display: inline-block; min-width: 2.2ch; font-size: 20px; font-weight: 700; color: var(--tcm-ink); font-variant-numeric: tabular-nums; }

.tcm-h2 { margin: 6px 0 8px; font-family: var(--tcm-serif); font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.tcm-h3 { margin: 22px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tcm-dim); }
.tcm-lede { margin: 0; font-size: 15px; line-height: 1.6; color: #3B4859; }

.tcm-region-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 14px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	font-weight: 600;
}

.tcm-region-list li { transition: opacity 0.25s ease; }
.tcm-region-list li.is-off { opacity: 0.3; }
.tcm-region-list a { display: flex; align-items: center; gap: 9px; padding: 6px 0; text-decoration: none; border-radius: 6px; }
.tcm-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--tcm-fill, #ccc); }
.tcm-region-list a:hover { color: var(--tcm-accent-ink); }

.tcm-ov-tools { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--tcm-line); font-size: 13px; color: var(--tcm-dim); }
.tcm-link { padding: 0; border: 0; background: none; font: 700 13px/1.4 var(--tcm-sans); color: var(--tcm-accent-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* region and unit card */

.tcm-card-head { display: flex; align-items: flex-start; gap: 12px; }
.tcm-coa,
.tcm-mono { flex: none; width: 56px; height: 56px; object-fit: contain; }
.tcm-mono { padding: 5px; border-radius: 14px; background: #fff; border: 1px solid var(--tcm-line); box-sizing: border-box; }
.tcm-card-title { flex: 1; min-width: 0; }
.tcm-name { margin: 0; font-family: var(--tcm-serif); font-size: 32px; line-height: 1.08; font-weight: 700; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.tcm-it { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin: 4px 0 0; font-size: 14px; color: var(--tcm-dim); }
.tcm-ipa { font-family: 'Segoe UI', 'Noto Sans', 'DejaVu Sans', 'Lucida Sans Unicode', sans-serif; }
.tcm-abbr { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--tcm-ink); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; }
.tcm-card-btns { display: flex; gap: 4px; flex: none; margin-top: -2px; }
.tcm-x,
.tcm-pn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--tcm-line); border-radius: 50%; background: #fff; color: var(--tcm-ink); cursor: pointer; transition: background 0.2s ease, transform 0.15s ease; }
.tcm-x:hover,
.tcm-pn:hover { background: var(--tcm-page); transform: scale(1.06); }
.tcm-back { margin: 0 0 8px; padding: 0; border: 0; background: none; font: 700 13px/1 var(--tcm-sans); color: var(--tcm-accent-ink); cursor: pointer; }

.tcm-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 14px; }
.tcm-badge { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 14px; background: #f1ece2; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; color: #3B4859; }
.tcm-badge i { width: 10px; height: 10px; border-radius: 50%; }
.tcm-badge.is-special { background: #DCE8E3; color: #33665F; }
.tcm-found { margin: 0 0 14px; padding: 10px 14px; border-left: 4px solid var(--tcm-accent2); border-radius: 0 10px 10px 0; background: #DCE8E3; font-size: 14px; font-weight: 700; animation: tcm-rise 0.5s both; }
.tcm-explain { margin: 14px 0; font-size: 14px; line-height: 1.55; color: #3B4859; }

.tcm-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.tcm-stat { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px 10px; border: 1px solid var(--tcm-line); border-radius: 14px; background: #fff; min-width: 0; }
.tcm-stat.is-wide { grid-column: 1 / -1; }
.tcm-stat-l { font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--tcm-dim); }
.tcm-stat-v { font-size: 22px; line-height: 1.2; font-weight: 800; color: var(--tcm-ink); font-variant-numeric: tabular-nums; }
.tcm-stat-t { font-size: 17px; font-weight: 800; color: var(--tcm-ink); }
.tcm-rank { margin-top: 4px; }
.tcm-rank-t { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: var(--tcm-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tcm-rank-bar { flex: 1; height: 5px; border-radius: 3px; background: #efe9de; overflow: hidden; }
.tcm-rank-bar i { display: block; width: 0; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--tcm-accent2), var(--tcm-accent)); transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }

.tcm-summary { margin: 0 0 6px; font-size: 15px; line-height: 1.6; color: #44454a; }
.tcm-sec { margin-top: 22px; }
.tcm-sec > h3,
.tcm-known h3 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tcm-dim); }
.tcm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tcm-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--tcm-line); border-radius: 17px; background: #fff; font: 700 13px/1 var(--tcm-sans); color: var(--tcm-ink); cursor: pointer; transition: background 0.18s ease, transform 0.15s ease, border-color 0.18s ease; }
.tcm-chip em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--tcm-dim); }
.tcm-chip:hover { background: #F8E8DF; border-color: #E3A68F; transform: translateY(-1px); }
.tcm-muted { font-size: 13px; color: var(--tcm-dim); }
.tcm-note { width: 100%; margin: 0 0 6px; font-size: 13px; color: #3B4859; }
.tcm-cities { margin: 0; padding: 0; list-style: none; counter-reset: c; }
.tcm-cities li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #eee8dd; font-size: 14px; font-weight: 600; counter-increment: c; }
.tcm-cities li::before { content: counter(c); flex: none; width: 22px; color: var(--tcm-dim); font-weight: 700; }
.tcm-cities li > span { flex: 1; }
.tcm-cities em { margin-left: 8px; padding: 1px 7px; border-radius: 8px; background: #F8E8DF; font-size: 11px; font-style: normal; font-weight: 800; color: var(--tcm-accent-ink); }
.tcm-cities b { font-variant-numeric: tabular-nums; color: var(--tcm-dim); font-weight: 700; }
.tcm-known { margin-bottom: 12px; }
.tcm-known h3 { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--tcm-ink); margin-bottom: 6px; }
.tcm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tcm-tags li { padding: 5px 11px; border-radius: 14px; background: #f1ece2; font-size: 13px; font-weight: 600; color: #3f4045; }
.tcm-det > summary { cursor: pointer; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; color: var(--tcm-ink); }
.tcm-ul { margin: 8px 0; padding-left: 18px; font-size: 14px; line-height: 1.55; }
.tcm-more { margin: 0; padding: 0; list-style: none; }
.tcm-more a { display: block; padding: 8px 0; border-bottom: 1px solid #eee8dd; font-size: 14px; font-weight: 700; color: var(--tcm-accent-ink); text-decoration: none; }
.tcm-more a::after { content: ' \203A'; }
.tcm-more a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tcm-pnrow { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.tcm-pnrow button { flex: 1; height: 42px; border: 1px solid var(--tcm-line); border-radius: 21px; background: #fff; font: 700 14px/1 var(--tcm-sans); color: var(--tcm-ink); cursor: pointer; transition: background 0.2s ease; }
.tcm-pnrow button:hover { background: #f6efe6; }

/* ---------------------------------------------------------- tablet / phone */

@media (max-width: 1100px) {
	:root { --tcm-topbar-h: 104px; }
	.tcm-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--tcm-topbar-h) minmax(0, 1fr); }
	.tcm-topbar { flex-wrap: wrap; align-content: flex-start; gap: 8px 12px; padding: 10px 18px 0; }
	.tcm-title { font-size: 26px; }
	.tcm-tagline { display: none; }
	.tcm-controls { width: 100%; flex-wrap: nowrap; gap: 8px; }
	.tcm-search { flex: 1 1 auto; width: auto; min-width: 140px; }
	.tcm-chiprow { flex: none; }
	.tcm-map-wrap { padding-bottom: calc(6px + var(--tcm-pad, 0px)); }
	.tcm-sidebar {
		grid-column: 1;
		grid-row: 1 / -1;
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		height: calc(100% - 8px);
		padding: 0 18px 24px;
		background: rgba(255, 255, 255, 0.97);
		border-left: 0;
		border-radius: 22px 22px 0 0;
		box-shadow: 0 -10px 40px rgba(60, 40, 20, 0.16);
		transform: translateY(calc(100% - var(--tcm-vis, 128px)));
		transition: transform 0.38s cubic-bezier(0.2, 0.85, 0.25, 1);
		overscroll-behavior: contain;
	}
	.tcm-sidebar.is-drag { transition: none; }
	.tcm-sidebar[data-snap='peek'] { touch-action: none; overflow-y: hidden; }
	.tcm-grip {
		display: block;
		position: sticky;
		top: 0;
		z-index: 2;
		height: 28px;
		margin: 0 -18px;
		cursor: grab;
		touch-action: none;
		background: transparent;
	}
	.tcm-grip::after { content: ''; position: absolute; left: 50%; top: 10px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: #d6d0c4; }
	.tcm-card { padding-top: 4px; }
	.tcm-name { font-size: 28px; }
	.tcm-stats b { font-size: 21px; }
}

@media (max-width: 560px) {
	:root { --tcm-topbar-h: 150px; }
	.tcm-topbar { padding: 6px 14px 0; gap: 8px; }
	.tcm-controls { min-height: 88px; }
	.tcm-title { font-size: 20px; flex: 0 1 auto; white-space: normal; line-height: 1.12; }
	.tcm-heading { flex: 1 1 100%; }
	.tcm-controls { flex-direction: column; align-items: stretch; gap: 8px; }
	.tcm-search { flex: none; width: 100%; height: 40px; }
	.tcm-chiprow { overflow-x: auto; scrollbar-width: none; gap: 6px; padding-bottom: 2px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
	.tcm-chiprow::-webkit-scrollbar { display: none; }
	.tcm-seg { height: 38px; flex: none; }
	.tcm-seg button { min-width: 72px; padding: 0 10px; font-size: 13px; }
	.tcm-btn { height: 38px; padding: 0 12px; font-size: 13px; flex: none; }
	.tcm-btn-k { display: none; }
	.tcm-more-t { display: none; }
	.tcm-btn-more { width: 38px; padding: 0; justify-content: center; }
	.tcm-map-wrap { padding-left: 4px; padding-right: 4px; }
	.tcm-legend { left: 10px; padding: 8px 10px; }
	.tcm-legend.is-macro { display: none; }
	.tcm-lg-ramp { width: 150px; }
	.tcm-stats-grid { gap: 8px; }
}

/* ------------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
	.tcm-region,
	.tcm-region path,
	.tcm-unit,
	.tcm-sidebar,
	.tcm-seg-thumb,
	.tcm-btn,
	.tcm-pop,
	.tcm-tip { transition: none !important; }
	.tcm-lift-p,
	.tcm-legend,
	.tcm-lg-ramp i,
	.tcm-found,
	.tcm-pin-ring,
	.tcm-pin-dot,
	.tcm-pin-t { animation: tcm-fade 0.2s both !important; }
	.tcm-unit.draw { animation: tcm-fade 0.25s backwards !important; }
	.tcm-rank-bar i { transition: none; }
	.tcm-lift-p { transform: none; }
}

/* -------------------------------------------------------------------- print */

@media print {
	html,
	body.tcm-body { background: #fff !important; }
	.tcm-mast,
	.tcm-controls,
	.tcm-tagline,
	.tcm-sidebar,
	.tcm-article,
	.tcm-foot,
	.tcm-legend,
	.tcm-tip,
	.tcm-reset,
	.tcm-pop,
	.tcm-lift,
	.tcm-sr { display: none !important; }
	.tcm-stage { display: block; height: auto; min-height: 0; overflow: visible; background: #fff; }
	.tcm-topbar { padding: 0 0 6mm; }
	.tcm-map-wrap { height: 160mm; padding: 0; }
	.tcm-map { width: 100%; height: 100%; }
	.tcm-region path { filter: none; }
	.tcm-region,
	.tcm-labels,
	.tcm-label { opacity: 1 !important; }
	* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	@page { size: A4 landscape; margin: 12mm; }
}

/* ------------------------------------------------------------------ article */

.tcm-article {
	max-width: 820px;
	margin: 0 auto;
	padding: 56px 24px 40px;
	font-size: 17px;
	line-height: 1.7;
}

.tcm-article h2 {
	font-family: var(--tcm-serif);
	margin: 2.2em 0 0.6em;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.tcm-article > h2:first-child,
.tcm-article > h2:first-of-type {
	margin-top: 0;
}

.tcm-article h3 {
	margin: 1.6em 0 0.4em;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
}

.tcm-article p,
.tcm-article ul,
.tcm-article ol {
	margin: 0 0 1.1em;
}

.tcm-article a {
	color: var(--tcm-accent-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tcm-table-wrap {
	overflow-x: auto;
	margin: 1.4em 0;
	background: var(--tcm-white);
	border: 1px solid var(--tcm-line);
	border-radius: 12px;
}

.tcm-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.4;
}

.tcm-table caption {
	padding: 12px 14px 4px;
	text-align: left;
	font-weight: 800;
}

.tcm-table th,
.tcm-table td {
	padding: 9px 14px;
	text-align: left;
	border-bottom: 1px solid var(--tcm-line);
	white-space: nowrap;
}

.tcm-table thead th {
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tcm-dim);
}

.tcm-table td[data-v],
.tcm-table th[data-sort] {
	text-align: right;
}

.tcm-table tbody tr:last-child > * {
	border-bottom: 0;
}

.tcm-states > summary {
	cursor: pointer;
	font-weight: 700;
}

/* Reserved so a late ad fill cannot shift the text below it. */
.tcm-ad {
	min-height: 280px;
	margin: 2em 0;
	text-align: center;
}

/* ------------------------------------------------------------------ footer */

.tcm-foot {
	background: var(--tcm-night);
	color: #D8D1C3;
}

.tcm-foot-in {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 32px;
	max-width: 1100px;
	margin: 0 auto;
	padding: 26px 24px 22px;
	font-size: 14px;
}

.tcm-foot-logo,
.tcm-foot-logo:hover {
	color: #F4EEE3;
}

.tcm-foot-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	font-weight: 600;
}

.tcm-foot-nav a,
.tcm-foot-tools a {
	color: #E4DDCF;
	text-decoration: none;
}

.tcm-foot-nav a:hover,
.tcm-foot-tools a:hover {
	color: #F4EEE3;
	text-decoration: underline;
	text-decoration-color: var(--tcm-ochre);
	text-underline-offset: 3px;
}

.tcm-foot-tools {
	display: flex;
	flex-basis: 100%;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 18px;
	padding-top: 16px;
	border-top: 1px solid rgba(233, 226, 212, 0.18);
	font-size: 13px;
}

.tcm-foot-label {
	font: 700 11px/1 var(--tcm-mono);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--tcm-ochre);
}

.tcm-foot-c {
	flex-basis: 100%;
	margin: 0;
	font-size: 13px;
	color: #A9A296;
}

/* --------------------------------------------------------------- embed mode */

.tcm-embed .tcm-stage {
	height: 100vh;
	height: 100svh;
}

/* ---------------------------------------------------------- units, leaders, overlays, legend extras */

.tcm-region-list em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--tcm-dim); }
.tcm-stat-sub { font-size: 11.5px; line-height: 1.35; color: var(--tcm-dim); }
.tcm-uf { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #efe8da; font-weight: 800; font-size: 12px; letter-spacing: 0.06em; color: var(--tcm-ink); }
.tcm-hit { fill: transparent; stroke: transparent; stroke-linejoin: round; pointer-events: none; }
.tcm-svg.is-units .tcm-unit-hit,
.tcm-svg.has-sel .tcm-unit-hit.in-sel { pointer-events: all; cursor: pointer; }
.tcm-svg.has-sel .tcm-unit-hit:not(.in-sel) { pointer-events: none; }
.tcm-svg.is-units.has-sel .tcm-unit-hit:not(.in-sel) { pointer-events: all; }
.tcm-svg:not(.is-units) .tcm-region-hit { pointer-events: all; cursor: pointer; }
.tcm-svg.has-sel .tcm-region:not(.is-sel) .tcm-region-hit { pointer-events: none; }

/* leader-line labels of the small units */
.tcm-dflead { pointer-events: none; }
.tcm-lead-l { stroke: var(--tcm-ink); stroke-opacity: 0.6; stroke-width: 1; }
.tcm-lead-d { fill: var(--tcm-ink); fill-opacity: 0.75; }
.tcm-lead-t { font-family: var(--tcm-sans); font-size: 10.5px; font-weight: 700; fill: var(--tcm-ink); dominant-baseline: central; paint-order: stroke; stroke: rgba(255, 255, 255, 0.85); stroke-width: 3px; stroke-linejoin: round; }
@media (max-width: 560px) {
	.tcm-lead-t { font-size: 9.5px; }
}

/* no-data hatch in the legend and the invitee chips */
.tcm-lg-nd { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--tcm-dim); white-space: nowrap; }
.tcm-nodata-sw { display: inline-block; width: 18px; height: 11px; border-radius: 3px; border: 1px solid #b3ab9b; background: repeating-linear-gradient(45deg, #ece7dc 0 3px, #b3ab9b 3px 4.5px); }
.tcm-local { font-weight: 700; }
.tcm-foot-note { margin: -4px 0 14px; font-size: 12px; line-height: 1.5; color: var(--tcm-dim); }
.tcm-subs { margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.5; color: #3B4859; }
.tcm-subs li { padding: 5px 0; border-bottom: 1px solid #eee8dd; }
.tcm-badge em { font-style: normal; font-weight: 700; color: var(--tcm-dim); }
.tcm-badge.is-special em { color: #7a52c4; }
.tcm-badge-b { border: 0; font-family: var(--tcm-sans); cursor: pointer; }
.tcm-badge-b:hover { background: #e9e1d2; }
.tcm-srcs { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12.5px; line-height: 1.4; }
.tcm-srcs li { padding: 5px 0; border-bottom: 1px solid #eee8dd; }
.tcm-srcs a { color: var(--tcm-accent2-ink); }
.tcm-srcs span { display: block; color: var(--tcm-dim); }
.tcm-svg.has-unit .tcm-unit.in-sel:not(.is-selp) { opacity: 0.6; }
.tcm-svg.has-unit.hov-p .tcm-unit.in-sel:not(.is-h):not(.is-rm) { opacity: 0.45; }

/* laptop widths: keep the top bar on one row beside the 400px sidebar */
.tcm-title { white-space: nowrap; }
@media (max-width: 1100px) { .tcm-title { white-space: normal; } }
@media (min-width: 1101px) and (max-width: 1400px) {
	.tcm-search { width: 210px; }
	.tcm-btn-k,
	.tcm-more-t { display: none; }
}

/* selected state: lifted, full colour, accent outline */
.tcm-sel { pointer-events: none; }
.tcm-sel-p {
	transform-box: fill-box;
	transform-origin: 50% 55%;
	transform: translateY(calc(var(--tcm-k, 1) * -5px)) scale(1.02);
	filter: drop-shadow(0 calc(var(--tcm-k, 1) * 7px) calc(var(--tcm-k, 1) * 6px) rgba(70, 45, 25, 0.34));
	animation: tcm-lift 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tcm-sel-p path { stroke: var(--tcm-accent); stroke-width: calc(var(--tcm-k, 1) * 1.5px); stroke-linejoin: round; }
.tcm-svg.has-unit .tcm-unit.in-sel:not(.is-selp) { opacity: 0.5; }
.tcm-unit.is-selp { stroke-width: calc(var(--tcm-k, 1) * 1.1px); stroke: #fff; }
.tcm-svg.has-unit .tcm-region:not(.is-sel) { opacity: 0.1; }

/* pins that would pile up or collide */
.tcm-pin.is-drop { display: none; }
.tcm-pin.is-nolabel .tcm-pin-t { display: none; }

/* the region legend repeats the sidebar list; it is hidden so it never covers land */
.tcm-legend.is-macro { display: none; }


/* hit targets are invisible: beat the generic region path styling */
.tcm-region path.tcm-hit,
.tcm-svg path.tcm-hit { fill: transparent !important; stroke: transparent !important; vector-effect: none !important; transition: none; }

/* overlay layer (config layer kind "overlay"): one tinted area per legend group, striped where the group says hatch, unit borders on top */
.tcm-overlay { display: none; pointer-events: none; }
.tcm-overlay.is-on { display: block; }
.tcm-ov-p { stroke: #fff; stroke-width: calc(var(--tcm-k, 1) * 0.6px); fill-opacity: 0.92; }
.tcm-ov-h { stroke: none; }
.tcm-ov-b { fill: none; stroke: #fff; stroke-opacity: 0.5; stroke-width: calc(var(--tcm-k, 1) * 0.9px); stroke-linejoin: round; }
.tcm-ov-t { font-family: var(--tcm-sans); font-size: 13px; font-weight: 800; text-anchor: middle; dominant-baseline: central; fill: #2e2f33; paint-order: stroke; stroke: rgba(255, 255, 255, 0.8); stroke-width: 3.5px; stroke-linejoin: round; }
.tcm-ov-l { pointer-events: none; }
.tcm-lg-cats span[data-g] { white-space: nowrap; }
.tcm-lg-cats span[data-g] em { font-style: normal; color: var(--tcm-dim); font-size: 11px; }
.tcm-lg-cats span[data-g] i.tcm-hatch-sw { background-image: repeating-linear-gradient(45deg, rgba(40, 40, 50, 0.55) 0 1px, transparent 1px 3.5px); }
.tcm-lg-nd .tcm-hatch-sw { display: inline-block; width: 18px; height: 11px; border-radius: 3px; border: 1px solid #8d8678; background: repeating-linear-gradient(45deg, rgba(40, 40, 50, 0.55) 0 1px, #f3eee3 1px 3.5px); }
.tcm-lg-note-wrap { display: flex; flex-direction: column; gap: 3px; }
.tcm-lg-note { font-size: 11.5px; line-height: 1.4; color: var(--tcm-dim); max-width: 330px; white-space: normal; }
.tcm-lines { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; line-height: 1.4; }
.tcm-lines li { padding: 3px 0; }
.tcm-lines b { display: block; font-weight: 700; }
.tcm-lines span { display: block; color: var(--tcm-dim); font-size: 12px; }
.tcm-rank-m { font-weight: 600; }
@media (max-width: 560px) {
	.tcm-ov-t { font-size: 11px; }
}

.tcm-name.is-long { font-size: 26px; line-height: 1.12; }
.tcm-rank-t { overflow: hidden; text-overflow: ellipsis; }

/* tables the article author wrote by hand: same look as .tcm-table, and they scroll sideways instead of widening the page */
.tcm-article table:not(.tcm-table) { display: block; max-width: 100%; overflow-x: auto; margin: 1.4em 0; border-collapse: collapse; font-size: 15px; line-height: 1.4; background: var(--tcm-white); border: 1px solid var(--tcm-line); border-radius: 12px; }
.tcm-article table:not(.tcm-table) th,
.tcm-article table:not(.tcm-table) td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--tcm-line); }
.tcm-article table:not(.tcm-table) thead th { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tcm-dim); white-space: nowrap; }
.tcm-article table:not(.tcm-table) tbody tr:last-child > * { border-bottom: 0; }

.tcm-lg-det > summary { cursor: pointer; font-weight: 800; margin-bottom: 4px; }
.tcm-lg-det:not([open]) > summary { margin-bottom: 0; }
@media (max-width: 560px) {
	.tcm-legend.is-overlay { max-width: calc(100% - 16px); }
	.tcm-lg-det .tcm-lg-cats span { font-size: 11px; }
}
.tcm-lg-more { display: block; font-size: 11.5px; color: var(--tcm-dim); }
.tcm-lg-more > summary { cursor: pointer; font-weight: 700; display: inline; }
.tcm-lg-more[open] > summary { display: block; margin-bottom: 2px; }
