/* WYA Chapter Map — front end */

.wcm-wrap {
	--wcm-land: #e7efff;
	--wcm-land-hover: #dbe8ff;
	--wcm-border: #0b3d91;
	--wcm-pin: #0a58ca;
	--wcm-pin-active: #00a3e0;
	--wcm-label: #0b2f6b;
	--wcm-accent: #0a58ca;
	--wcm-ink: #10203f;
	--wcm-radius: 22px;
	position: relative;
	box-sizing: border-box;
	font-family: inherit;
	/* Room under the map for the popup to grow into. The popup is positioned
	   against this box, so the footing is part of the space it may use.
	   Settings > Footing under the map. */
	padding-bottom: var(--wcm-footing, 80px);
}
.wcm-wrap *,
.wcm-wrap *::before,
.wcm-wrap *::after { box-sizing: border-box; }
/* The popup is moved out to <body> on a phone, so it cannot rely on anything
   scoped to the wrapper. */
.wcm-modal,
.wcm-modal *,
.wcm-modal *::before,
.wcm-modal *::after { box-sizing: border-box; }

/* Themes (block themes especially) add a top margin to every child of a flow
   container. Left alone that pushes our header down the card and leaves a white
   band across the top of it, and opens gaps between the sections below.
   Only our own structure is reset — the words inside a chapter description keep
   the margins their author gave them. */
.wcm-wrap .wcm-stage,
.wcm-modal,
.wcm-modal .wcm-modal-box,
.wcm-modal .wcm-modal-box > *,
.wcm-modal .wcm-modal-scroll > *,
.wcm-modal .wcm-head,
.wcm-modal .wcm-head > *,
.wcm-modal .wcm-video > *,
.wcm-modal .wcm-actions > * {
	margin-top: 0;
	margin-bottom: 0;
	margin-block-start: 0;
	margin-block-end: 0;
}

/* The header's own rhythm, stated strongly enough to survive a theme. */
.wcm-modal .wcm-chapter-name { margin: 0 0 6px; }
.wcm-modal .wcm-president { margin: 0; }
.wcm-modal .wcm-role { margin: 6px 0 0; }

.wcm-align-center { margin-left: auto; margin-right: auto; }
.wcm-align-left { margin-right: auto; }
.wcm-align-right { margin-left: auto; }

.wcm-stage { position: relative; width: 100%; }
.wcm-map { display: block; width: 100%; height: 100%; overflow: visible; touch-action: manipulation; }

/* The state */
.wcm-state {
	fill: var(--wcm-land);
	stroke: var(--wcm-border);
	stroke-width: 2.4;
	stroke-linejoin: round;
	stroke-linecap: round;
	vector-effect: non-scaling-stroke;
	transition: fill .25s ease;
}
.wcm-wrap:hover .wcm-state { fill: var(--wcm-land-hover); }

/* Pins */
.wcm-pin { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.wcm-pin-hit { fill: transparent; stroke: none; }
.wcm-pin-halo {
	fill: var(--wcm-pin);
	opacity: .16;
	transform-box: fill-box;
	transform-origin: center;
	transition: opacity .2s ease, transform .2s ease;
}
.wcm-pin-dot {
	fill: var(--wcm-pin);
	stroke: #fff;
	stroke-width: 3;
	vector-effect: non-scaling-stroke;
	transition: fill .2s ease, transform .18s cubic-bezier(.2,.9,.3,1.4);
	transform-box: fill-box;
	transform-origin: center;
}
.wcm-pin:hover .wcm-pin-dot,
.wcm-pin:focus-visible .wcm-pin-dot,
.wcm-pin.is-open .wcm-pin-dot {
	fill: var(--wcm-pin-active);
	transform: scale(1.3);
}
.wcm-pin:hover .wcm-pin-halo,
.wcm-pin:focus-visible .wcm-pin-halo,
.wcm-pin.is-open .wcm-pin-halo { opacity: .32; transform: scale(1.18); }
.wcm-pin:focus-visible .wcm-pin-dot { stroke: var(--wcm-pin-active); stroke-width: 5; }

.wcm-pin-label {
	fill: var(--wcm-label);
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -.2px;
	paint-order: stroke;
	stroke: #fff;
	stroke-width: 5px;
	stroke-linejoin: round;
	pointer-events: none;
}

/* ── Find a chapter (top-right of the map) ───────────────────────────── */
.wcm-find { position: absolute; top: 10px; right: 10px; z-index: 30; }
.wcm-find-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(16, 32, 63, .08);
	border-radius: 16px;
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	backdrop-filter: saturate(180%) blur(12px);
	box-shadow: 0 6px 18px rgba(10, 30, 70, .14);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.wcm-find-toggle svg { width: 20px; height: 20px; fill: none; stroke: var(--wcm-ink); stroke-width: 2.1; stroke-linecap: round; }
.wcm-find-toggle:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(10, 30, 70, .2); }
.wcm-find-toggle:focus-visible { outline: 3px solid var(--wcm-accent); outline-offset: 2px; }
.wcm-find.is-open .wcm-find-toggle { display: none; }

.wcm-find-panel {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	width: min(320px, calc(100vw - 32px));
	padding: 8px;
	border: 1px solid rgba(16, 32, 63, .08);
	border-radius: 20px;
	background: rgba(255, 255, 255, .97);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
	box-shadow: 0 18px 44px rgba(10, 30, 70, .22);
	animation: wcm-pop .16s cubic-bezier(.2, .85, .3, 1.1);
}
.wcm-find-panel[hidden] { display: none; }
@keyframes wcm-pop { from { opacity: 0; transform: translateY(-6px) scale(.97) } to { opacity: 1; transform: none } }

.wcm-find-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 10px; }
.wcm-find-icon { flex: 0 0 auto; width: 17px; height: 17px; fill: none; stroke: #8a90a6; stroke-width: 2.1; stroke-linecap: round; }
.wcm-find-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 38px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wcm-ink);
	font-family: inherit;
	/* 16px minimum: anything smaller makes iOS zoom the page on focus. */
	font-size: 16px;
	font-weight: 600;
	-webkit-appearance: none;
	appearance: none;
}
.wcm-find-input:focus { outline: none; }
.wcm-find-input::-webkit-search-cancel-button { display: none; }
.wcm-find-close {
	flex: 0 0 auto;
	position: relative;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(16, 32, 63, .06);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.wcm-find-close span { position: absolute; inset: 0; }
.wcm-find-close span::before,
.wcm-find-close span::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 13px;
	height: 2px;
	margin: -1px 0 0 -6.5px;
	border-radius: 2px;
	background: var(--wcm-ink);
}
.wcm-find-close span::before { transform: rotate(45deg); }
.wcm-find-close span::after { transform: rotate(-45deg); }
.wcm-find-close:hover { background: rgba(16, 32, 63, .12); }

.wcm-find-list {
	flex: 1 1 auto;
	min-height: 0;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	max-height: 240px;
	overflow-y: auto;
	scrollbar-width: none;
}
.wcm-find-list::-webkit-scrollbar { width: 0; display: none; }
.wcm-find-list:empty { display: none; }
.wcm-find-list li { margin: 0; }
.wcm-find-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	border-radius: 13px;
	background: none;
	color: var(--wcm-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.wcm-find-item:hover,
.wcm-find-item:focus { background: #f1f5ff; outline: none; }
.wcm-find-item,
.wcm-find-close,
.wcm-find-input,
.wcm-close,
.wcm-link-btn,
.wcm-pin { touch-action: manipulation; }
.wcm-find-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--wcm-pin); }
.wcm-find-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcm-find-sub { display: block; font-size: 12.5px; font-weight: 600; color: #7b8199; }
.wcm-find-none { margin: 8px 12px 10px; font-size: 13.5px; color: #7b8199; }
.wcm-find-none[hidden] { display: none; }

.wcm-empty {
	position: absolute;
	inset: auto 0 0 0;
	text-align: center;
	font-size: 14px;
	color: #5a6274;
}

/* ── Popup ──────────────────────────────────────────────────────────── */
/* By default the popup sits over the map itself, not over the whole page. */
.wcm-modal { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 14px; }
.wcm-modal[hidden] { display: none; }
/* On a narrow or short screen the script adds .wcm-sheet and the popup becomes
   a full-screen sheet instead; every rule that differs hangs off that class, so
   the look always follows the script's decision. */
.wcm-modal.wcm-sheet { position: fixed; z-index: 99999; padding: 0; }
.wcm-modal.wcm-sheet .wcm-modal-scroll { overscroll-behavior: contain; }
/* Transparent: it only exists to catch a click outside the card. */
.wcm-modal-backdrop { position: absolute; inset: 0; background: transparent; }
.wcm-modal.wcm-sheet .wcm-modal-backdrop { background: #fff; }
/* Nothing dims, fades or greys behind the popup: the card's own shadow is
   what separates it from the map. */
.wcm-modal-box {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(var(--wcm-popup-w, 560px), 100%);
	max-width: 100%;
	max-height: 100%;
	min-height: 0;
	background: #fff;
	border-radius: var(--wcm-radius);
	box-shadow:
		0 0 0 1px rgba(16, 32, 63, .06),
		0 18px 50px rgba(6, 20, 50, .22),
		0 40px 90px rgba(6, 20, 50, .16);
	overflow: hidden;
	animation: wcm-rise .24s cubic-bezier(.2, .85, .3, 1.1);
}
.wcm-modal:not(.wcm-sheet) { align-items: flex-start; }
.wcm-modal:not(.wcm-sheet) .wcm-modal-box {
	/* By default the card fills the map area — map plus footing — so it never
	   hangs over what comes after the map. Settings > Popup height overrides
	   that with a number; either way the screen is the final word, and the
	   floor respects it too, since min-height beats max-height. */
	min-height: min(var(--wcm-popup-min, 420px), 100%, 86vh);
	max-height: min(var(--wcm-popup-max, 100%), 86vh);
}

@keyframes wcm-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes wcm-rise { from { opacity: 0; transform: translateY(18px) scale(.97) } to { opacity: 1; transform: none } }

.wcm-modal-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	background: #fff;
	-webkit-overflow-scrolling: touch;
	padding: 0 0 24px;
	overscroll-behavior: contain;
	/* No scrollbar track: a reserved gutter left a white stripe down the card.
	   A fade at the foot shows there is more to read instead. */
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.wcm-modal-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* "there's more below" cue */
.wcm-modal-box::after {
	content: "";
	position: absolute;
	left: 1px;
	right: 1px;
	bottom: 1px;
	height: 52px;
	border-radius: 0 0 calc(var(--wcm-radius) - 1px) calc(var(--wcm-radius) - 1px);
	background: linear-gradient(to top, #fff 28%, rgba(255, 255, 255, 0));
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}
.wcm-modal-box.wcm-has-more::after { opacity: 1; }

/* ── Full-screen sheet ──────────────────────────────────────────────── */
.wcm-modal.wcm-sheet { align-items: stretch; }
.wcm-modal.wcm-sheet .wcm-modal-box {
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	border-radius: 0;
	box-shadow: none;
}
.wcm-modal.wcm-sheet .wcm-modal-box::after { border-radius: 0; }
.wcm-modal.wcm-sheet .wcm-modal-scroll {
	padding-top: env(safe-area-inset-top);
	padding-bottom: max(28px, env(safe-area-inset-bottom));
}
/* Nothing may show a scrollbar track inside the sheet. */
.wcm-modal.wcm-sheet,
.wcm-modal.wcm-sheet .wcm-modal-box { overflow: hidden; }
.wcm-modal.wcm-sheet .wcm-modal-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.wcm-modal.wcm-sheet .wcm-modal-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.wcm-modal.wcm-sheet .wcm-close {
	width: 44px;
	height: 44px;
	top: max(12px, env(safe-area-inset-top));
	right: max(12px, env(safe-area-inset-right));
}
.wcm-modal.wcm-sheet .wcm-link-btn { display: flex; justify-content: center; width: 100%; padding: 17px 24px; }
.wcm-modal.wcm-sheet .wcm-video-frame video { margin-left: auto; margin-right: auto; }

.wcm-close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-width: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .96);
	color: #16233d;
	cursor: pointer;
	box-shadow: 0 3px 14px rgba(10, 30, 70, .2);
	transition: background .15s ease, transform .15s ease;
	-webkit-appearance: none;
	appearance: none;
	overflow: hidden;
}
/* The glyph is drawn, not typed, so no font metric can push it off-centre. */
.wcm-close span {
	position: relative;
	display: block;
	width: 16px;
	height: 16px;
	font-size: 0;
	line-height: 0;
	color: transparent;
}
.wcm-close span::before,
.wcm-close span::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	color: #16233d;
}
.wcm-close span::before { transform: translateY(-50%) rotate(45deg); }
.wcm-close span::after { transform: translateY(-50%) rotate(-45deg); }
.wcm-close:hover { background: #fff; transform: scale(1.08); }
.wcm-close:focus-visible { outline: 3px solid var(--wcm-accent); outline-offset: 2px; }

/* Header — a bold, friendly banner */
.wcm-head {
	display: flex;
	gap: 18px;
	align-items: center;
	padding: 26px 24px 24px;
	padding-right: 72px; /* clear of the close button */
	background:
		radial-gradient(110% 160% at 0% 0%, rgba(0, 163, 224, .22), rgba(0, 163, 224, 0) 62%),
		linear-gradient(150deg, rgba(10, 88, 202, .16), rgba(10, 88, 202, .04));
}
.wcm-photo-wrap { flex: 0 0 auto; }
.wcm-head.wcm-no-photo .wcm-photo-wrap { display: none; }
.wcm-photo {
	display: block;
	width: 104px;
	height: 104px;
	object-fit: cover;
	border-radius: 24px;
	background: #eef2fa;
	border: 4px solid #fff;
	box-shadow: 0 10px 26px rgba(11, 47, 107, .24);
}
.wcm-photo[hidden] { display: none; }
.wcm-head-text { min-width: 0; flex: 1 1 auto; }
.wcm-head-text > * { overflow-wrap: break-word; word-break: break-word; }
.wcm-chapter-name {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	background: none;
	color: var(--wcm-ink);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	line-height: 1.4;
}
.wcm-president {
	margin: 0;
	font-size: 28px;
	line-height: 1.08;
	font-weight: 900;
	letter-spacing: -.8px;
	color: var(--wcm-ink);
}
.wcm-role { margin: 6px 0 0; font-size: 15px; font-weight: 600; color: #566288; }
.wcm-role[hidden] { display: none; }

.wcm-video { padding: 0 24px; }
.wcm-video[hidden] { display: none; }
/*
 * The frame.
 *
 * Nothing clips the picture here. A rounded box with `overflow: hidden` leaves
 * a hairline of whatever sits behind the media along its straight edges on
 * fractional-pixel layouts — that was the thin dark line above the video. The
 * rounded corners are now applied to the video (or iframe) itself, so there is
 * no box behind it and no seam to draw.
 */
.wcm-video-frame {
	position: relative;
	width: 100%;
	background: transparent;
	line-height: 0; /* no text-line gap above the video */
	font-size: 0;
}
/* Embeds need a box to fill: the platform decides what goes inside it. The
   script gives the box the shape of the clip, and caps it by height. */
.wcm-video-frame.wcm-frame-embed {
	aspect-ratio: 16 / 9;
	background: transparent;
	margin-left: auto;
	margin-right: auto;
}
.wcm-video-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	border-radius: 16px;
	background: #000;
}
/* An uploaded file sizes itself from the clip, so its box is exactly the shape
   of the picture — there is nothing behind it at all. */
.wcm-video-frame video {
	display: block;
	width: 100%;
	height: auto;
	max-height: min(70vh, 640px);
	border: 0;
	border-radius: 16px;
	background: #000;
	object-fit: contain;
	vertical-align: top;
}

/* Subtitles sit along the foot of the picture and stay there. */
.wcm-video-frame video::cue {
	background: rgba(0, 0, 0, .72);
	color: #fff;
	font-size: 92%;
	line-height: 1.35;
}
.wcm-video-frame video::-webkit-media-text-track-container {
	overflow: visible;
	font-size: 92% !important;
}
.wcm-video-frame video::-webkit-media-text-track-display {
	bottom: 6% !important;
	top: auto !important;
	white-space: normal;
}

.wcm-description {
	padding: 24px 24px 0;
	font-size: 16px;
	line-height: 1.7;
	color: #2b3452;
	overflow-wrap: break-word;
}
.wcm-description[hidden] { display: none; }
.wcm-description > *:first-child { margin-top: 0; }
.wcm-description p { margin: 0 0 1em; }
.wcm-description h2 { font-size: 22px; font-weight: 800; margin: 1.4em 0 .5em; color: var(--wcm-ink); }
.wcm-description h3 { font-size: 18px; font-weight: 800; margin: 1.3em 0 .45em; color: var(--wcm-ink); }
.wcm-description ul,
.wcm-description ol { margin: 0 0 1em 1.3em; }
.wcm-description li { margin-bottom: .4em; }
.wcm-description img { max-width: 100%; height: auto; border-radius: 14px; }
.wcm-description a { color: var(--wcm-accent); font-weight: 600; }
.wcm-description blockquote {
	margin: 1.2em 0;
	padding: .4em 0 .4em 1.2em;
	border-left: 5px solid var(--wcm-accent);
	border-radius: 0;
	color: #46507a;
	font-style: normal;
}

.wcm-actions {
	position: sticky;
	bottom: 0;
	z-index: 2;
	padding: 20px 24px 24px;
	margin: 0;
	background: #fff;
}
.wcm-actions[hidden] { display: none; }
.wcm-link-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 30px;
	border-radius: 999px;
	background: #10203f;
	color: #fff !important;
	font-weight: 800;
	font-size: 16px;
	letter-spacing: -.1px;
	text-decoration: none !important;
	border: 2px solid #10203f;
	box-shadow: 0 8px 22px rgba(16, 32, 63, .28);
	transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.wcm-link-btn::after { content: "→"; font-size: 17px; line-height: 1; }
.wcm-link-btn:hover,
.wcm-link-btn:focus {
	transform: translateY(-2px);
	background: #000;
	color: #fff !important;
	box-shadow: 0 12px 28px rgba(16, 32, 63, .34);
}

body.wcm-modal-open { overflow: hidden; }
body.wcm-modal-open:not(.wp-admin) { position: fixed; width: 100%; }

/* ── Phones ─────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
	/* A fixed height squeezes the map on a narrow screen: let it breathe. */
	.wcm-stage { height: auto !important; }
	/* The popup is a full-screen sheet here, so it needs no room under the map. */
	.wcm-wrap { padding-bottom: 0; }

	.wcm-head { gap: 14px; padding: 18px 18px 16px; padding-right: 66px; }
	.wcm-photo { width: 88px; height: 88px; border-radius: 20px; border-width: 3px; }
	.wcm-president { font-size: 25px; letter-spacing: -.5px; }
	.wcm-chapter-name { font-size: 11.5px; margin-bottom: 5px; }
	.wcm-role { font-size: 14px; margin-top: 6px; }
	.wcm-description, .wcm-actions { padding-left: 18px; padding-right: 18px; }
	.wcm-video { padding: 0 18px; }
	.wcm-video-frame iframe { border-radius: 14px; }
	.wcm-video-frame video { border-radius: 14px; }
	.wcm-find { top: 8px; right: 8px; }
	.wcm-find-toggle { width: 42px; height: 42px; border-radius: 14px; }
	.wcm-find-panel { width: min(300px, calc(100vw - 24px)); }
	.wcm-find-list { max-height: 210px; }
	/* A phone screen is short: cap the picture so the text below stays in reach. */
	.wcm-video-frame video { max-height: 52vh; }
	.wcm-description { padding-top: 22px; font-size: 16px; }
	/* Labels off — they overlap badly at phone width. The pins themselves are
	   sized in real pixels by the script, and the search button in the corner
	   is the comfortable way to open a chapter on a small screen. */
	.wcm-pin-label { display: none; }
	.wcm-state { stroke-width: 2; }
}

/* ── Short screens (a phone held sideways) ──────────────────────────── */
@media (max-height: 560px) {
	.wcm-modal.wcm-sheet .wcm-head {
		gap: 14px;
		padding: 14px 18px 12px;
		padding-right: 66px;
	}
	.wcm-modal.wcm-sheet .wcm-photo { width: 64px; height: 64px; border-radius: 16px; border-width: 3px; }
	.wcm-modal.wcm-sheet .wcm-president { font-size: 21px; letter-spacing: -.4px; }
	.wcm-modal.wcm-sheet .wcm-chapter-name { font-size: 11.5px; margin-bottom: 4px; }
	.wcm-modal.wcm-sheet .wcm-role { font-size: 13.5px; margin-top: 4px; }
	.wcm-modal.wcm-sheet .wcm-video-frame video { max-height: 52vh; }
	.wcm-modal.wcm-sheet .wcm-description { padding-top: 14px; }
	.wcm-modal.wcm-sheet .wcm-actions { padding-top: 14px; }
}

@media (max-width: 400px) {
	.wcm-head { flex-direction: column; align-items: flex-start; padding-right: 18px; }
	.wcm-photo { width: 78px; height: 78px; }
	.wcm-president { font-size: 23px; }
}

/* Touch devices of any width: no hover-only affordances. */
@media (hover: none) {
	.wcm-wrap:hover .wcm-state { fill: var(--wcm-land); }
	.wcm-pin:hover .wcm-pin-dot { transform: none; fill: var(--wcm-pin); }
	.wcm-pin.is-open .wcm-pin-dot { fill: var(--wcm-pin-active); transform: scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
	.wcm-modal-backdrop, .wcm-modal-box { animation: none; }
	.wcm-pin-dot, .wcm-pin-halo, .wcm-link-btn, .wcm-close { transition: none; }
}

/* ── The chapter nearest the visitor ────────────────────────────────── */
/* A slow ring going out from the dot. It is a hint, not an alarm: one pulse
   every couple of seconds, and none at all for anyone who asks their system
   for less motion. */
@keyframes wcm-pulse {
	0%   { transform: scale(.7); opacity: .45; }
	70%  { transform: scale(2.6); opacity: 0; }
	100% { transform: scale(2.6); opacity: 0; }
}
.wcm-pin.is-near .wcm-pin-halo {
	fill: var(--wcm-pin-active);
	opacity: .45;
	animation: wcm-pulse 2.4s cubic-bezier(.22, .61, .36, 1) infinite;
}
.wcm-pin.is-near .wcm-pin-dot { fill: var(--wcm-pin-active); }
.wcm-pin.is-near:hover .wcm-pin-halo,
.wcm-pin.is-near.is-open .wcm-pin-halo { animation-play-state: paused; opacity: .3; }

@media (prefers-reduced-motion: reduce) {
	.wcm-pin.is-near .wcm-pin-halo { animation: none; opacity: .35; }
}

/* ── Chapters near a place you type ─────────────────────────────────── */
.wcm-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.wcm-near {
	flex: 0 0 auto;
	margin: 10px 0 0;
	padding: 12px 4px 2px;
	border-top: 1px solid rgba(16, 32, 63, .1);
}
.wcm-near-head {
	margin: 0 0 8px;
	padding: 0 8px;
	font-size: 12.5px;
	font-weight: 700;
	color: #575757;
}
.wcm-near-form { display: flex; gap: 6px; padding: 0 4px; align-items: flex-start; }
.wcm-near-field { position: relative; flex: 1 1 auto; min-width: 0; }

/* Suggestions, over the results rather than pushing them down. */
.wcm-suggest {
	position: absolute;
	z-index: 8;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	margin: 0;
	padding: 4px;
	list-style: none;
	max-height: 200px;
	overflow-y: auto;
	border: 1px solid rgba(16, 32, 63, .12);
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 14px 30px rgba(10, 30, 70, .18);
	scrollbar-width: none;
}
.wcm-suggest::-webkit-scrollbar { width: 0; display: none; }
.wcm-suggest[hidden] { display: none; }
.wcm-suggest-item {
	padding: 9px 10px;
	border-radius: 6px;
	color: var(--wcm-ink);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wcm-suggest-item:hover,
.wcm-suggest-item.is-on { background: #f1f5ff; }
.wcm-near-input {
	width: 100%;
	height: 40px;
	padding: 0 12px;
	border: 1px solid rgba(16, 32, 63, .16);
	border-radius: 6px;
	background: #fff;
	color: var(--wcm-ink);
	font-family: inherit;
	/* 16px or iOS zooms the page when the field takes focus. */
	font-size: 16px;
	font-weight: 600;
	-webkit-appearance: none;
	appearance: none;
}
.wcm-near-input:focus { outline: none; border-color: var(--wcm-accent); box-shadow: 0 0 0 3px rgba(10, 88, 202, .16); }
.wcm-near-go {
	flex: 0 0 auto;
	height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: 6px;
	background: var(--wcm-ink);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-appearance: none;
	appearance: none;
}
.wcm-near-go:hover:not(:disabled) { background: var(--wcm-accent); }
.wcm-near-go:disabled { opacity: .6; cursor: default; }
.wcm-near-msg {
	margin: 8px 4px 0;
	padding: 0 8px;
	font-size: 13px;
	line-height: 1.45;
	color: #575757;
}
.wcm-near-msg[hidden] { display: none; }
.wcm-near-msg.is-bad { color: #8a1f1a; }
.wcm-near-msg.is-good { color: var(--wcm-ink); font-weight: 700; }
.wcm-near-list { margin: 6px 0 0; padding: 0; list-style: none; max-height: 190px; overflow-y: auto; scrollbar-width: none; }
.wcm-near-list::-webkit-scrollbar { width: 0; display: none; }
.wcm-near-list:empty { display: none; }
.wcm-near-list li { margin: 0; }
.wcm-near-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 9px 12px;
	border: 0;
	border-radius: 6px;
	background: none;
	color: var(--wcm-ink);
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-appearance: none;
	appearance: none;
}
.wcm-near-item:hover,
.wcm-near-item:focus { background: #f1f5ff; outline: none; }
.wcm-near-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--wcm-pin-active); }
.wcm-near-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wcm-near-sub { display: block; font-size: 12.5px; font-weight: 600; color: #575757; }
