/*
 * Phase 3 (03-01-PLAN.md Task 3): interactive Berlin map stylesheet, for the
 * [pcg_berlin_map] shortcode's markup (functions.php) and the tooltip berlin-map.js builds
 * at runtime.
 *
 * Revised in quick task 260807-37b against two rounds of direct client feedback. The
 * shortcode's SVG backdrop is now fully transparent behind its own line work (the opaque
 * background <rect> was removed from the generator) - THIS FILE now owns the map card's
 * background and theme, via the --pcg-map-bg custom property and the --pcg-map-* ink token
 * block below. Every one of those tokens is mirrored as an inline var(--pcg-map-*, LITERAL)
 * fallback directly in functions.php's $backdrop string, so the map still renders correctly
 * even if the client's manual, one-file-at-a-time Ionos upload lands functions.php without
 * this CSS file. Keep the token values here in lockstep with those SVG fallbacks.
 *
 * Revised again in quick task 260807-9nu, a third client-feedback round: the dashed outer
 * ring's --pcg-map-ring-line token is gone (deleted, points at nothing), the aspect-ratio is
 * now the geographically exact Berlin bounding-box ratio (121.41 / 100) instead of a cropping
 * 16/10, a new --pcg-map-street-minor-line token draws the added residential street tier as
 * the faintest layer on the map, and the outline/border/street tokens were all dialled back
 * toward a thinner, more restrained weight now that residential density has arrived.
 *
 * DELIBERATE, CLIENT-APPROVED EXCEPTION to the navy/red palette lock (CLAUDE.md), scoped to
 * this map element only: the --pcg-map-water-fill / --pcg-map-river-line / --pcg-map-forest-
 * fill tokens below carry a low-saturation muted blue and muted green, so water and forest
 * read as distinguishable at a glance instead of both being an undifferentiated white tint.
 * This followed two rounds of client feedback - they first asked for strict monochrome
 * water/forest, then immediately corrected themselves and asked for exactly this barely-
 * there tint. Every one of those values is held inside a saturation <= 0.45, alpha <= 0.70
 * envelope machine-checked by tests/berlin-map.test.cjs's classifyMapColour() helper. This
 * is NOT a licence to introduce colour anywhere else in the project - every other colour on
 * this page, including the marker dot and tooltip below, still resolves through the locked
 * navy/red var(--color-navy)/var(--color-accent) Bricks Global Variables, and the
 * CLAUDE.md-prohibited warm hue the client's own AI mockup mistakenly guessed for the logo
 * still has no place in this file.
 */

.pcg-map-wrap {
	position: relative;
	overflow: hidden;
	width: 100%;
	/* 121.41 / 100 - the geographically exact Berlin bounding-box ratio (quick task 260807-9nu).
	 * This number is bound to the SVG's viewBox width: the generator computes VB_W from the
	 * same GEO_W/GEO_H ratio and interpolates it into the viewBox, never a hardcoded literal.
	 * Changing this ratio without changing the SVG's viewBox width re-introduces exactly the
	 * crop the client complained about. If the map card ends up too tall relative to its width
	 * in Bricks, the fix is to constrain the WRAPPER's width, never to change this ratio. */
	aspect-ratio: 121.41 / 100;
	/* Standalone-width clamp (quick task 260818-eny, D-02): outside .pcg-map-layout, nothing
	 * else constrains this wrapper's width - a full-width Bricks container turns the fixed
	 * aspect-ratio above into ~988px of height for a ~1200px-wide container. min(..., 100%)
	 * is the same hardening before-after.css's --pcg-ba-max-width clamp already applies
	 * (before-after.css:68): an instance-supplied pixel value can never resolve wider than its
	 * container. The var() fallback is the literal 100%, so an instance that never sets
	 * --pcg-map-max-width (every existing placement, including the homepage's own
	 * .pcg-map-layout path) resolves to today's full-width behaviour - a no-op. margin-inline:
	 * auto centres the clamped card and is provably inert while max-width resolves to 100% -
	 * there is no free space for auto margins to absorb, which is why neither the grid-layout
	 * path nor the homepage can shift. Do NOT declare --pcg-map-max-width in this stylesheet:
	 * it is consumed with a fallback only, its value arrives inline per instance. */
	max-width: min(var(--pcg-map-max-width, 100%), 100%);
	margin-inline: auto;
	border-radius: 12px;
	background-color: var(--pcg-map-bg, var(--color-navy, #142440));
	box-shadow: var(--shadow-sm, 0 2px 8px rgba(20, 36, 64, 0.35));

	/* Navy theme (default - matches today's appearance exactly, and is also the literal
	 * fallback baked inline into every var() reference in the SVG backdrop itself). */
	--pcg-map-outline-fill: rgba(255, 255, 255, 0.045);
	/* Quick task 260807-9nu, Task 2 step 7: the previous round had to shout (border alpha
	 * 0.22 -> 0.38, width 0.30 -> 0.40) to stay legible over denser streets. Instead of shouting
	 * louder now that residential streets arrive, THIS round makes the streets quieter
	 * (street-line alpha 0.09 -> 0.07, and the new residential tier quieter still at 0.05) so
	 * the outline and border can come back down to a restrained weight and still win. */
	--pcg-map-outline-line: rgba(255, 255, 255, 0.40);
	--pcg-map-border-line: rgba(255, 255, 255, 0.30);
	--pcg-map-street-line: rgba(255, 255, 255, 0.07);
	--pcg-map-street-minor-line: rgba(255, 255, 255, 0.05);
	/* Quick task 260807-gjg, Task 1 step 8: alpha pulled down from 0.60 to 0.32 at the client's
	 * explicit request - the river/canal line should read "so blass wie die Seen" (as pale as
	 * the lakes), no longer the loudest blue on the card. Same rgb triplet, same hue family, only
	 * the alpha moved - kept within [lakeFillAlpha, lakeFillAlpha + 0.08] of --pcg-map-water-fill
	 * below (0.28), machine-checked by tests/berlin-map.test.cjs. */
	--pcg-map-river-line: rgba(168, 192, 214, 0.32);
	/* Alpha nudged post-visual-check (quick task 260807-37b, Task 3): at the original 0.18/0.14
	 * alphas, forest and water blended almost indistinguishably into the navy background - both
	 * composited to a similar dark blue-gray, because the navy background's own hue (~218deg)
	 * dominated the low-alpha blend regardless of the tint's own hue. Raised water-fill to 0.28
	 * and forest-fill to 0.60 (still <= the 0.70 envelope ceiling, hue/saturation unchanged) so
	 * forest reads with a genuine greenish cast against navy while staying a fill, never a loud
	 * line. Only the alpha channel changed - same rgb triplets, same hue families, same
	 * saturation envelope as the locked_design table. */
	--pcg-map-water-fill: rgba(146, 172, 196, 0.28);
	--pcg-map-forest-fill: rgba(150, 178, 150, 0.60);
	--pcg-map-attrib: rgba(255, 255, 255, 0.55);
}

/* Light theme - [pcg_berlin_map theme="light"] sets data-theme="light" on .pcg-map-wrap.
 * Specificity 0,2,0 beats the bare rule's 0,1,0, so this needs no !important and no
 * source-order trickery. */
.pcg-map-wrap[data-theme="light"] {
	background-color: var(--pcg-map-bg, #ffffff);

	--pcg-map-outline-fill: rgba(20, 36, 64, 0.035);
	--pcg-map-outline-line: rgba(20, 36, 64, 0.50);
	--pcg-map-border-line: rgba(20, 36, 64, 0.38);
	--pcg-map-street-line: rgba(20, 36, 64, 0.11);
	--pcg-map-street-minor-line: rgba(20, 36, 64, 0.075);
	--pcg-map-river-line: rgba(96, 132, 166, 0.24);
	--pcg-map-water-fill: rgba(120, 158, 190, 0.20);
	--pcg-map-forest-fill: rgba(132, 158, 132, 0.20);
	--pcg-map-attrib: rgba(20, 36, 64, 0.62);
}

/* True transparency (quick task 260807-gjg, Task 2) - [pcg_berlin_map bg="transparent"] now
 * emits a data-bg="transparent" marker attribute alongside the inline --pcg-map-bg custom
 * property. With the fill already at zero alpha, the card's drop-shadow and 12px rounded corner
 * were the last things still drawing a soft rectangle against the client's own #f5f5f5 page
 * background - this mode must show nothing but the map itself. Specificity (0,2,0) beats the
 * bare rule's (0,1,0), the same mechanism the light-theme rule above already relies on, so no
 * !important and no source-order trickery is needed. A hex background (bg="#F4F1EC") never
 * reaches this attribute - see functions.php's $bg_marker guard - so it keeps its shadow and
 * radius exactly as before. */
.pcg-map-wrap[data-bg="transparent"] {
	box-shadow: none;
	border-radius: 0;
}

/* Two-column layout (quick task 260807-heb, Task 2) - [pcg_berlin_map] without list="false"
 * wraps the existing .pcg-map-wrap in this NEW grid container and places the server-rendered
 * .pcg-map-list beside it. All new colour below comes from existing design tokens -
 * var(--color-navy, #142440), var(--color-accent, #EE0000), white/navy alpha tints, and the
 * already-approved completed green #1E9E57 - no new hue is introduced anywhere in this
 * section. */
.pcg-map-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	gap: 32px;
	/* The map has a fixed aspect-ratio; the list must not stretch to match its height. */
	align-items: start;

	/* List ink tokens (navy default). Deliberately declared HERE, on the NEW .pcg-map-layout
	 * selector, and NOT added to the .pcg-map-wrap token block above - that block is
	 * machine-checked against the low-saturation water/forest colour envelope these UI tints
	 * do not belong in. */
	--pcg-list-text: rgba(255, 255, 255, 0.92);
	--pcg-list-muted: rgba(255, 255, 255, 0.60);
	--pcg-list-rule: rgba(255, 255, 255, 0.14);
	--pcg-list-hover-bg: rgba(255, 255, 255, 0.06);
}

/* Light theme parity - specificity (0,2,0) beats the bare rule's (0,1,0), the same mechanism
 * .pcg-map-wrap[data-theme="light"] already relies on above, so no !important is needed. */
.pcg-map-layout[data-theme="light"] {
	--pcg-list-text: rgba(20, 36, 64, 0.92);
	--pcg-list-muted: rgba(20, 36, 64, 0.60);
	--pcg-list-rule: rgba(20, 36, 64, 0.14);
	--pcg-list-hover-bg: rgba(20, 36, 64, 0.05);
}

/* /referenzen/ two-column pairing (quick task 260818-htx) - the counterpart to .pcg-map-layout
 * above, for the "Weitere Referenzen" section further down this file. The client's complaint was
 * "viel leerer Platz": [pcg_berlin_map list="false"] and [pcg_further_references] are two
 * hand-placed, sibling Bricks Shortcode elements (FACT-8) that previously stacked - a centred
 * standalone map with the 88-entry address list stranded below it. This rule pairs them into one
 * grid instead, MAP FIRST/SMALLER, LIST SECOND/WIDER - the opposite ratio to .pcg-map-layout
 * above, which pairs the homepage map with ITS OWN bigger, primary list. The map's own fixed
 * 121.41/100 aspect-ratio means a ~41.5% track lands the map's rendered height near the list's
 * existing 440px scroll ceiling (.pcg-further__list, further down this file) - a deliberate visual
 * match, not a coincidence. Both tracks carry a minmax(0, ...) floor, not a bare fr unit: a bare
 * fr track's automatic minimum is its content's min-content size, which is the exact CSS Grid
 * "blowout" .pcg-2col already shipped to a client's iPhone once (quick task 260810-1ld) - omitting
 * the floor here would risk the same failure the moment either child grows wide content.
 * align-items: start for the same reason .pcg-map-layout already states: the map has a fixed
 * aspect-ratio and the list must not stretch to match its height.
 * --pcg-further-layout-map-col is consumed with a var(x, fallback) and deliberately never
 * declared in this file - the same idiom --pcg-map-max-width already uses two rules above. The
 * client's Bricks Custom Code field prints BEFORE this child-theme stylesheet, so a theme-side
 * default for this token would silently outrank the client's own value; the existing no-:root
 * test in tests/berlin-map.test.cjs guards this file-wide, and a dedicated declaration-count guard
 * pins it for this token specifically. */
.pcg-further-layout {
	display: grid;
	grid-template-columns: minmax(0, var(--pcg-further-layout-map-col, 1fr)) minmax(0, 1.4fr);
	gap: 32px;
	align-items: start;
}

/* Stack breakpoint - shared by BOTH of this file's two-column layouts (.pcg-map-layout above and
 * .pcg-further-layout above), deliberately kept as one block rather than two: this project's
 * convention is as few responsive special cases as possible, and 900px is already this file's
 * established stack point. The outer width is Bricks' job; over-tuning here would fight the
 * builder. */
@media (max-width: 900px) {
	.pcg-map-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.pcg-further-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}
}

.pcg-map-backdrop {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.pcg-map-marker {
	position: absolute;
	transform: translate(-50%, -50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	/* 44x44px real touch target via padding, not just the visible dot's own size -
	 * mirrors price-calculator.css's own 44px-target convention. */
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	background: none;
	border: none;
	cursor: pointer;
}

.pcg-map-marker__dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background-color: var(--color-accent, #EE0000);
	box-shadow: 0 0 0 4px rgba(238, 0, 0, 0.22);
	transition: transform 150ms ease, box-shadow 150ms ease;
}

/* quick task 260807-heb, Task 2 step 7: .pcg-map-marker--active .pcg-map-marker__dot appended
 * as a THIRD entry point into this SAME rule - not a new rule - so a marker highlighted by
 * mouse/keyboard and a marker highlighted by its paired list row (berlin-map.js, Task 3) share
 * one visual treatment by construction. This is a deliberate widening of the pre-existing
 * hover/focus-visible contract, not a looser one - the rule gained a third selector, its
 * declarations are unchanged. */
.pcg-map-marker:hover .pcg-map-marker__dot,
.pcg-map-marker:focus-visible .pcg-map-marker__dot,
.pcg-map-marker--active .pcg-map-marker__dot {
	transform: scale(1.2);
	box-shadow: 0 0 0 6px rgba(238, 0, 0, 0.3);
}

.pcg-map-marker:focus-visible {
	outline: 2px solid var(--color-accent, #EE0000);
	outline-offset: 2px;
	border-radius: 50%;
}

/* Completed-project marker (quick task 260807-9nu) - SECOND deliberate, client-approved
 * exception to the navy/red palette lock (CLAUDE.md), scoped to this one marker variant.
 * The client asked for completed vs. ongoing projects to be distinguishable at a glance;
 * #1E9E57 (HSL 147deg, S 68%, L 37%) is deliberately ~4x more saturated than the muted
 * forest fill above (S 16%) and much darker, so a marker can never be mistaken for a forest
 * area - an emerald, not a neon green. Non-text contrast (WCAG 1.4.11 needs 3:1): 4.46:1 on
 * the navy card, 3.45:1 on the light card - closely matched to the existing red dot's own
 * 3.40:1 / 4.53:1. The custom property is declared HERE, inside this completed-marker rule,
 * NOT in the .pcg-map-wrap token block above - that block is machine-checked against a
 * low-saturation envelope this green must not enter. This licenses no colour anywhere else.
 *
 * KNOWN LIMITATION (WCAG 1.4.1): red vs. green here is a colour-only distinction. The cheap
 * remedy, if the client ever wants it, is a hollow-vs-filled dot variant - one CSS rule, no
 * PHP change. */
.pcg-map-marker--completed .pcg-map-marker__dot {
	--pcg-map-marker-completed: #1E9E57;
	/* Muted-completed tint (quick task 260817-o9l) - THIRD documented, client-approved
	 * exception to the navy/red palette lock (CLAUDE.md), scoped to the map_only variant of
	 * this component only. #3FA070 (H 150deg, S 34%, L 44%) sits at roughly half the
	 * full-strength green's saturation and is lighter, chosen inside the tight WCAG 1.4.11 band
	 * that clears 3:1 against BOTH backgrounds this dot is drawn on simultaneously - the light
	 * card (#ffffff) and this file's navy card (#142440) - which pins relative luminance into
	 * roughly [0.153, 0.300] and is why this is not lighter still. Non-text contrast: 3.24:1 on
	 * the light card, 4.77:1 on the navy card. Declared HERE, beside
	 * --pcg-map-marker-completed, NOT in the .pcg-map-wrap token block above - that block is
	 * machine-checked against a low-saturation envelope this tint must not enter, the identical
	 * reason the full-strength green above is declared on its own variant rule. Read by the
	 * map_only marker AND list dots below via a three-level var() chain - only ever declared
	 * where "completed" is true, so a completed map_only dot renders muted green and an ongoing
	 * one falls through to muted red. */
	--pcg-map-completed-muted: #3FA070;
	background-color: var(--pcg-map-marker-completed, #1E9E57);
	box-shadow: 0 0 0 4px rgba(30, 158, 87, 0.22);
}

/* Same widening as the base marker rule above, scoped to the completed variant: a third entry
 * point (.pcg-map-marker--completed.pcg-map-marker--active), appended to this existing
 * combined hover/focus-visible rule rather than a new rule (quick task 260807-heb, Task 2
 * step 7). */
.pcg-map-marker--completed:hover .pcg-map-marker__dot,
.pcg-map-marker--completed:focus-visible .pcg-map-marker__dot,
.pcg-map-marker--completed.pcg-map-marker--active .pcg-map-marker__dot {
	transform: scale(1.2);
	box-shadow: 0 0 0 6px rgba(30, 158, 87, 0.3);
}

.pcg-map-marker--completed:focus-visible {
	outline: 2px solid var(--pcg-map-marker-completed, #1E9E57);
	outline-offset: 2px;
	border-radius: 50%;
}

/* map_only marker variant (quick task 260817-0sl, Task 4; HOLLOW RING again per quick task
 * 260817-q1i, D-01/D-02/D-03) - THIRD deliberate, client-approved exception to the navy/red
 * palette lock (CLAUDE.md). History, in order: the client first rejected the hollow-ring look
 * ("der Punkt welcher in der Mitte leer ist gefaellt mir nicht"), which quick task 260817-o9l
 * answered by filling the dot solid. The client then reviewed that filled version live and
 * explicitly asked for the ring back, on both the marker AND the list row - that instruction
 * superseded the earlier "no empty middle" one on 2026-08-17, and this rule now implements it.
 * The 260817-o9l muted tints and the 9px/7px sizes are DELIBERATELY kept from that round - this
 * is not a revert to the pre-o9l rule, which used the full-strength red/green chain and larger
 * sizes; only the fill-vs-ring shape changes back.
 *
 * The stroke resolves through the SAME kind of nested fallback the completed marker already
 * declares: var(--pcg-map-completed-muted, var(--pcg-map-accent-muted, #D96A6A)) - the muted-
 * completed token is only ever declared on a completed dot (see --pcg-map-completed-muted
 * above), so a completed map_only project rings muted green and an ongoing one falls through
 * to the muted red declared below, exactly mirroring every other marker on this map.
 * --pcg-map-accent-muted: #D96A6A (H 0deg, S 59%, L 63%) sits inside the same tight WCAG 1.4.11
 * simultaneous-3:1-against-white-and-navy band as the green above. Non-text contrast: 3.38:1 on
 * the light card, 4.59:1 on the navy card - load-bearing now rather than decorative, because the
 * card background shows through the 5px transparent centre and the stroke is the tint's only
 * remaining ink.
 *
 * The stroke is 2px, giving a 9px outer diameter with a 5px transparent hole - this is the same
 * geometry the pre-o9l ring already shipped and rendered acceptably; the client's complaint was
 * that a hole existed at all, never that the stroke weight was wrong, so it is not re-derived.
 * `box-sizing: border-box` is declared explicitly (D-03) so this 9px outer size is self-
 * contained rather than inherited from Bricks' base stylesheet.
 *
 * Every rule below is still appended AFTER the completed-marker rules on purpose (never before -
 * tests/berlin-map.test.cjs's extractRuleBlock()-style helpers take the FIRST match): same-
 * specificity source order is what lets this treatment win over the completed fill for a
 * project that is both completed AND map_only. The shared scale transform on hover/focus is
 * deliberately left untouched below - it is a "this dot is interactive" cue and the tooltip
 * still opens on hover, which is how a visitor learns the project's name; only the link
 * affordances (pointer cursor, red glow) are removed. */
.pcg-map-marker--map-only {
	/* The concrete meaning of the client's "should not look like a link" (D-10). */
	cursor: default;
	--pcg-map-accent-muted: #D96A6A;
}

.pcg-map-marker--map-only .pcg-map-marker__dot {
	width: 9px;
	height: 9px;
	box-sizing: border-box;
	background-color: transparent;
	border: 2px solid var(--pcg-map-completed-muted, var(--pcg-map-accent-muted, #D96A6A));
	box-shadow: none;
}

.pcg-map-marker--map-only:hover .pcg-map-marker__dot,
.pcg-map-marker--map-only:focus-visible .pcg-map-marker__dot,
.pcg-map-marker--map-only.pcg-map-marker--active .pcg-map-marker__dot {
	box-shadow: none;
}

.pcg-map-tooltip {
	position: absolute;
	z-index: 3;
	transform: translate(-50%, -100%);
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 120px;
	max-width: 220px;
	padding: 8px 12px;
	border-radius: 8px;
	background-color: var(--color-navy, #142440);
	box-shadow: var(--shadow-sm, 0 2px 8px rgba(20, 36, 64, 0.35));
	opacity: 0;
	pointer-events: none;
	transition: opacity 150ms ease;
}

.pcg-map-tooltip--visible {
	opacity: 1;
}

.pcg-map-tooltip--below {
	transform: translate(-50%, 0);
}

.pcg-map-tooltip__title {
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: #ffffff;
}

.pcg-map-tooltip__location {
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.72);
}

.pcg-map-tooltip__location[hidden] {
	display: none;
}

/* Tabbed project list (quick task 260807-heb, Task 2 steps 4-7) - the .pcg-map-list block
 * server-rendered by functions.php beside .pcg-map-wrap inside .pcg-map-layout above. Uses the
 * same understated language as the rest of this file: 'Inter', sans-serif, 150ms ease
 * transitions, 44px touch targets, 2px accent focus-visible outlines. */

.pcg-map-list__tabs {
	display: flex;
	gap: 20px;
	border-bottom: 1px solid var(--pcg-list-rule);
}

.pcg-map-list__tab {
	appearance: none;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	padding: 0 2px;
	min-height: 44px;
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pcg-list-muted);
	cursor: pointer;
	transition: color 150ms ease, border-color 150ms ease;
}

.pcg-map-list__tab--active {
	color: var(--pcg-list-text);
	border-bottom-color: var(--color-accent, #EE0000);
}

.pcg-map-list__tab:focus-visible {
	outline: 2px solid var(--color-accent, #EE0000);
	outline-offset: 2px;
}

.pcg-map-list__panel {
	list-style: none;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	/* Deliberately a plain fixed value, NOT a client-adjustable custom property (D-02): this
	 * file has no root-level default block and must not gain one - the client's own Bricks
	 * Custom Code field prints BEFORE this child-theme stylesheet, so a theme-side default
	 * would silently beat the client's own override. The value is intentionally the SAME one
	 * .pcg-further__list uses below - tests/berlin-map.test.cjs reads both rules and asserts
	 * they are equal, so changing one alone fails the suite (D-01). The ceiling lives on this
	 * panel, not on .pcg-map-list__tabs (a sibling element), so the tabs stay pinned while the
	 * list scrolls (D-05). Known consequence: berlin-map.js's marker/row sync can now put its
	 * active-row highlight outside the visible scroll window - the remedy is a
	 * `block: 'nearest'` scroll-into-view inside that sync function, deliberately not done in
	 * this round (D-04). */
	max-height: 440px;
	overflow-y: auto;
}

/* The flex-vs-hidden trap: display: flex above overrides the browser's own [hidden] rule -
 * without this explicit rule both panels would render at once with JavaScript off. */
.pcg-map-list__panel[hidden] {
	display: none;
}

.pcg-map-list__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-height: 44px;
	padding: 12px 6px;
	border-bottom: 1px solid var(--pcg-list-rule);
	/* 2px transparent LEFT border reserved for the active state below - so gaining the
	 * coloured border on hover/focus/sync never shifts the row's own layout. */
	border-left: 2px solid transparent;
	text-decoration: none;
	transition: background-color 150ms ease, border-color 150ms ease;
}

/* ONE shared appearance for hover, keyboard focus and JS sync (quick task 260807-heb, Task 3's
 * marker<->row sync layer) - all three live in the SAME selector list so a row highlighted by
 * the mouse and a row highlighted by the map look identical by construction, not by two rules
 * kept in sync by hand. */
.pcg-map-list__item:hover,
.pcg-map-list__item:focus-visible,
.pcg-map-list__item--active {
	background-color: var(--pcg-list-hover-bg);
	border-left-color: var(--color-accent, #EE0000);
}

.pcg-map-list__item:focus-visible {
	outline: 2px solid var(--color-accent, #EE0000);
	outline-offset: -2px;
}

.pcg-map-list__dot {
	width: 10px;
	height: 10px;
	margin-top: 4px;
	border-radius: 50%;
	background-color: var(--color-accent, #EE0000);
	flex-shrink: 0;
}

.pcg-map-list__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.pcg-map-list__title {
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: var(--pcg-list-text);
}

.pcg-map-list__location {
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	font-weight: 400;
	color: var(--pcg-list-muted);
}

.pcg-map-list__empty {
	list-style: none;
	padding: 12px 6px;
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	color: var(--pcg-list-muted);
}

/* "Weitere Referenzen" divider (quick task 260817-o9l, D-03) - a bare non-interactive <li>,
 * exactly the shape .pcg-map-list__empty above already uses. Structurally invisible to
 * berlin-map.js by construction: it carries neither .pcg-map-list__item (the class
 * .querySelectorAll('.pcg-map-list__item') selects list rows on) nor data-project (the
 * pairing attribute), so it can never be selected or paired - guarded further by
 * tests/berlin-map.test.cjs's D-03 invariant asserting the divider class name appears nowhere
 * in berlin-map.js. Introduces no colour of its own: every value below resolves through this
 * component's existing --pcg-list-* ink tokens, matching .pcg-map-list__tab's own
 * 12px/600/uppercase/letter-spaced treatment so the divider reads as a section label of the
 * same family, not another row. More top padding than bottom - it visually belongs to the
 * group beneath it. */
.pcg-map-list__divider {
	list-style: none;
	padding: 20px 6px 8px;
	border-top: 1px solid var(--pcg-list-rule);
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pcg-list-muted);
}

/* Completed-list-row variant (quick task 260807-heb, Task 2 step 6) - SECOND client-approved
 * exception to the navy/red palette lock carried into the list, scoped to this one row
 * variant. Declared on the ROW (.pcg-map-list__item--completed), NOT on the dot, so both the
 * dot's background AND the row's active-state left border resolve through this ONE
 * declaration via var(--pcg-map-marker-completed, #1E9E57) - the same fallback-carrying
 * pattern the marker's own completed rule above already uses. */
.pcg-map-list__item--completed {
	--pcg-map-marker-completed: #1E9E57;
	/* Muted-completed tint mirror of the marker rule above (D-04) - same token, same reasoning,
	 * kept in lockstep by tests/berlin-map.test.cjs's token-hygiene guard. */
	--pcg-map-completed-muted: #3FA070;
}

.pcg-map-list__item--completed .pcg-map-list__dot {
	background-color: var(--pcg-map-marker-completed, #1E9E57);
}

/* Same widening as .pcg-map-list__item above: :hover, :focus-visible and the --active
 * modifier live in ONE selector list, scoped to the completed variant. */
.pcg-map-list__item--completed:hover,
.pcg-map-list__item--completed:focus-visible,
.pcg-map-list__item--completed.pcg-map-list__item--active {
	border-left-color: var(--pcg-map-marker-completed, #1E9E57);
}

/* map_only LIST dot (quick task 260817-o9l, D-04/D-06; HOLLOW RING again per quick task
 * 260817-q1i, D-01/D-02/D-03) - this class was emitted by functions.php since quick task
 * 260817-0sl with ZERO CSS rule ever written for it, which is exactly why map_only rows looked
 * identical to clickable ones. Smaller than the base dot (7px vs 10px) and rings through the
 * SAME three-level var() chain the marker dot above uses, so marker and row can never drift to
 * two different tints - tests/berlin-map.test.cjs asserts the chain by name on both sides.
 *
 * The stroke is 2px - the SAME weight as the marker, not a proportionally-scaled 1.5px, because
 * a sub-pixel border on a circle renders soft and visibly uneven at 1x device-pixel-ratio, and
 * one stroke weight across marker and row reads as one visual language. On a 7px outer box that
 * leaves a 3px transparent centre. `box-sizing: border-box` is declared explicitly (D-03) so
 * the outer box stays 7px regardless of Bricks' base stylesheet - under content-box, 7px plus a
 * 2px border would compute to 11px, LARGER than the base 10px row dot, silently inverting the
 * whole map_only size distinction and knocking the margin-top centring below off with it.
 *
 * Margin-top stays at 5.5px (retuned from the base rule's 4px so the smaller dot still optically
 * centres on the row's first line of text: (10px - 7px) / 2 + 4px = 5.5px) - this arithmetic is
 * unchanged by the ring, because with border-box the outer box is still 7px.
 *
 * No cursor rule and no hover/active rule are added here (D-07) - only the dot changes on a
 * map_only row; the row's own hover/focus/active left border still resolves through the
 * existing full-strength tokens, because that border is an interaction cue (the row still
 * routes its click through revealFurtherReference()), not a status cue. Placed AFTER both the
 * base .pcg-map-list__dot rule and the completed-list-row rules above in source order - the
 * same same-specificity source-order mechanism the marker rules already rely on. */
.pcg-map-list__item--map-only {
	--pcg-map-accent-muted: #D96A6A;
}

.pcg-map-list__item--map-only .pcg-map-list__dot {
	width: 7px;
	height: 7px;
	margin-top: 5.5px;
	box-sizing: border-box;
	background-color: transparent;
	border: 2px solid var(--pcg-map-completed-muted, var(--pcg-map-accent-muted, #D96A6A));
}

/* "Weitere Referenzen" list (quick task 260817-0sl, Task 4) - the compact list of map_only
 * projects rendered by [pcg_further_references] (inc/further-references.php). This is a
 * SEPARATE, hand-placed Bricks element, NOT a descendant of .pcg-map-layout above - which is
 * exactly why it declares its own ink tokens below instead of inheriting the layout's
 * --pcg-list-* tokens. Every value here is the IDENTICAL navy-alpha rgba() the light-theme
 * .pcg-map-layout[data-theme="light"] rule already uses (lines 140-143) - no new colour enters
 * this file. Not added to the .pcg-map-wrap token block above: that block is machine-classified
 * against a low-saturation colour envelope these UI tints do not belong in - the identical
 * reason the layout's own list tokens are declared on .pcg-map-layout, not .pcg-map-wrap. */
/* This section's two-column pairing with the Berlin map (quick task 260818-htx) lives UP near
 * .pcg-map-layout, not here - it shares that rule's 900px stack breakpoint, so both live beside
 * each other and beside the media block they share. Search for .pcg-further-layout. */
.pcg-further {
	--pcg-further-text: rgba(20, 36, 64, 0.92);
	--pcg-further-muted: rgba(20, 36, 64, 0.60);
	--pcg-further-rule: rgba(20, 36, 64, 0.14);
	--pcg-further-hover-bg: rgba(20, 36, 64, 0.05);
}

/* Navy-context adaptation (debug session weitere-referenzen-balken-kontrast, 2026-08-18).
 *
 * The token block directly above is this component's LIGHT-context ink - every value is navy-on-paper,
 * copied verbatim from .pcg-map-layout[data-theme="light"]. On /referenzen/ the shortcode is
 * hand-placed inside a <section class="pcg-navy">, and .pcg-navy's background is #142440 - the SAME
 * rgb(20, 36, 64) those tokens are built from. Compositing rgba(20,36,64,a) over #142440 returns
 * #142440 for ANY alpha, so on navy this component's chrome does not merely lose contrast, it
 * resolves to exactly the background colour:
 *   - --pcg-further-rule drives .pcg-further__row's border-bottom, so all 88 row separators are
 *     mathematically invisible;
 *   - the max-height/overflow-y scroll box below always renders a scrollbar at this list length, and
 *     with no scrollbar-color declared the browser paints its DEFAULT light-scheme scrollbar - a dark
 *     thumb sitting directly on the navy panel. That dark bar is what the client reported.
 *
 * A Bricks-side Custom CSS rule already re-points --pcg-further-text/-muted/-hover-bg for .pcg-navy,
 * but it cannot solve this: it omits --pcg-further-rule entirely, and a custom property can never
 * reach UA scrollbar chrome. That rule is also currently trapped inside an unclosed `:root {` block in
 * the Bricks field (237 opening vs 236 closing braces), so it survives only via CSS nesting - this
 * section's legibility must not depend on it. The token set below is therefore declared in FULL rather
 * than only for the missing --pcg-further-rule: the three it duplicates carry values visually identical
 * to the Bricks ones (#f5f5f5 vs #fff at the same alpha), so whichever rule wins the cascade the
 * section renders the same, and if the Bricks rule ever stops parsing this one still holds the section
 * together. No !important and no ID selector: the Bricks rule's (0,3,0) legitimately outranks this
 * (0,2,0) for the three shared tokens, and that is fine precisely because the values agree.
 *
 * Scope: .pcg-further is emitted only by [pcg_further_references], which appears in exactly one place
 * site-wide, so the compound .pcg-navy .pcg-further* selector can match nothing else. The light-context
 * defaults above are untouched, and the Berlin map's own side list (.pcg-map-list__panel, a different
 * component on a different page) is not addressed by any selector here.
 *
 * Colour: #f5f5f5 is the client-specified brand off-white. No alpha here is a new design decision -
 * each is inherited from a rule that already exists, which is why they are not all taken from the same
 * place:
 *   - 0.92 / 0.60 (text, muted) agree in BOTH the light block above and the Bricks override.
 *   - 0.14 (rule) comes from the light block above - the component's own separator strength. The Bricks
 *     override has no opinion here because it omits this token entirely; that omission is the bug.
 *   - 0.06 (hover-bg) is taken from the BRICKS override, NOT from the light block above, which uses
 *     0.05. Deliberate: matching Bricks is what makes the two rules render identically whichever wins
 *     the cascade, per the paragraph above, and 0.05 vs 0.06 of white over navy is imperceptible.
 * The navy-to-paper inversion itself is the same one .pcg-map-layout already ships between its navy
 * default and its [data-theme="light"] block, so no new colour enters the file either. */
.pcg-navy .pcg-further {
	--pcg-further-text: rgba(245, 245, 245, 0.92);
	--pcg-further-muted: rgba(245, 245, 245, 0.60);
	--pcg-further-rule: rgba(245, 245, 245, 0.14);
	--pcg-further-hover-bg: rgba(245, 245, 245, 0.06);
}

/* Scroll-box chrome. Only the STANDARD scrollbar-color property is used, deliberately: it recolours
 * the scrollbar without converting a macOS overlay scrollbar into an always-visible classic one and
 * without reserving layout width, which is what a ::-webkit-scrollbar block would do (that is why
 * pcg-gallery.css's webkit rules are not copied here - that component HIDES its scrollbar, the opposite
 * intent). scrollbar-color is the thumb followed by the track: the thumb is the client-specified
 * #f5f5f5, the track the same off-white at the component's own rule alpha so it reads as a recess in
 * the navy rather than a second bright bar. scrollbar-width is deliberately NOT set - the client asked
 * for a colour change, not a size change. */
.pcg-navy .pcg-further__list {
	scrollbar-color: #f5f5f5 rgba(245, 245, 245, 0.14);
}

.pcg-further__list {
	list-style: none;
	margin: 0;
	padding: 0;
	/* Container-driven grid (quick task 260817-qga): the client asked for the section to fill
	 * its own width and flow addresses to the right into columns. auto-fill + minmax reads the
	 * column count off THIS ELEMENT's own container, not the viewport - this section is a
	 * hand-placed Bricks element whose width the client can change without touching this file,
	 * so a viewport media query could confidently hand 3 columns to a narrow Bricks column. The
	 * track minimum is wrapped in min(…, 100%), never a bare px value: a bare minimum is the
	 * exact CSS Grid "blowout" quick task 260810-1ld already shipped to a client's iPhone once
	 * (.pcg-2col rendering ~1100px wide inside a 375px viewport) - min(…, 100%) collapses the
	 * floor to the container's own width instead of pushing the page sideways. auto-fill, not
	 * auto-fit, so a short 1-2 entry list still renders at one column's width instead of
	 * stretching a single entry across the whole section.
	 * grid-auto-flow stays the (unset) row-major default deliberately: it fills left-to-right
	 * across a row before wrapping, matching "die Adressen füllen sich nach rechts" - the CSS
	 * multi-column layout mode was rejected for this because it flows top-to-bottom down one
	 * column before starting the next, the opposite of what was asked. */
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	column-gap: 32px;
	/* row-gap is deliberately ZERO, and written as its own longhand rather than folded into a
	 * gap shorthand: .pcg-further__row's own padding (12px 6px) plus its border-bottom already
	 * supply the vertical rhythm, so a positive row-gap would float each bottom rule in empty
	 * space instead of sitting it directly on top of the next entry. Writing column-gap and
	 * row-gap as two longhands keeps each axis independently greppable and independently
	 * editable - a gap: shorthand would hide that they were two different decisions. */
	row-gap: 0;
	/* Deliberately a plain fixed value, NOT a client-adjustable custom property (D-09): this
	 * file has no root-level default block and must not gain one - the client's own Bricks
	 * Custom Code field prints BEFORE this child-theme stylesheet, so a theme-side default
	 * would silently beat the client's own override. The section is not allowed to grow with
	 * every imported project - only this scrollbox does. */
	max-height: 440px;
	overflow-y: auto;
}

.pcg-further__row {
	padding: 12px 6px;
	border-bottom: 1px solid var(--pcg-further-rule);
	/* 2px transparent LEFT border reserved for the flash state below - so lighting a row up
	 * can never shift the row's own layout (FACT-8's precedent, applied to this new
	 * component). */
	border-left: 2px solid transparent;
	transition: background-color 150ms ease, border-color 150ms ease;
}

.pcg-further__title {
	display: block;
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: var(--pcg-further-text);
}

.pcg-further__location {
	display: block;
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	font-weight: 400;
	color: var(--pcg-further-muted);
}

/* Flash highlight (D-05, D-11) - triggered by berlin-map.js's revealFurtherReference() on a
 * map_only marker click. Starts from the component's own hover-background tint with the
 * accent colour on the left border, and ends at fully transparent, so the row fades back to
 * rest by itself with no JS cleanup needed beyond removing the class (which berlin-map.js's
 * setTimeout() already does). Every colour below resolves through var(--color-accent, #EE0000)
 * or this component's own --pcg-further-* tokens - no new hex anywhere. */
.pcg-further__row--flash {
	animation: pcg-further-flash 1.5s ease-out 1;
}

@keyframes pcg-further-flash {
	from {
		background-color: var(--pcg-further-hover-bg);
		border-left-color: var(--color-accent, #EE0000);
	}
	to {
		background-color: transparent;
		border-left-color: transparent;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pcg-map-marker__dot,
	.pcg-map-tooltip,
	.pcg-map-list__item,
	.pcg-map-list__tab,
	.pcg-further__row {
		transition: none;
	}

	.pcg-further__row--flash {
		animation: none;
	}

	.pcg-further__list {
		scroll-behavior: auto;
	}
}

/* ---------------------------------------------------------------------------
 * ORTSTEIL-VERZEICHNIS — „Projekte nach Ortsteil"
 *
 * Gebaut von inc/ortsteile.php, sitzt am Ende derselben <section class="pcg-further">.
 *
 * JEDE Farbe hier kommt aus den --pcg-further-*-Variablen, die dieser Block weiter oben
 * fuer den HELLEN und weiter unten fuer den NAVY-Kontext setzt. Kein einziger Hex-Wert,
 * keine eigene Variablen-Deklaration: sonst haette das Verzeichnis auf /referenzen/
 * (navy) genau das Kontrastproblem, das die Debug-Sitzung vom 2026-08-18 fuer die
 * Zeilen darueber bereits einmal geloest hat.
 * --------------------------------------------------------------------------- */
.pcg-further__orte {
	margin-top: 1.5rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--pcg-further-rule);
}

.pcg-further__orte-titel {
	display: block;
	margin-bottom: 0.6rem;
	color: var(--pcg-further-muted);
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.pcg-further__orte-liste {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.9rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Das Trennzeichen steht im CSS, nicht im HTML — sonst liest ein Screenreader bei jedem
 * Ortsteil „Mittelpunkt" mit vor. Gleiche Begruendung wie bei den Brotkrumen.
 *
 * WARUM ::after UND NICHT ::before: live nachgesehen am 2026-09-24. Als ::before auf dem
 * FOLGENDEN Eintrag rutschte der Punkt beim Zeilenumbruch an den Zeilenanfang — die
 * Liste begann dann mit „· Berlin-Prenzlauer Berg". Als ::after haengt er am
 * vorherigen Eintrag; `white-space: nowrap` auf dem Eintrag haelt Name und Punkt
 * zusammen, sodass der Punkt nie allein in eine Zeile faellt. */
.pcg-further__ortsteil {
	white-space: nowrap;
}

.pcg-further__ortsteil:not(:last-child)::after {
	content: "·";
	margin-left: 0.9rem;
	color: var(--pcg-further-muted);
}

.pcg-further__ortsteil a {
	color: var(--pcg-further-text);
	text-decoration: none;
	border-bottom: 1px solid var(--pcg-further-rule);
	transition: border-color 0.18s ease;
}

.pcg-further__ortsteil a:hover,
.pcg-further__ortsteil a:focus-visible {
	border-bottom-color: currentColor;
}
