/* =========================================================
   KampungKey v2.0.0 — tool-page components.
   Page-specific styling for the individual tools (HDB town pages,
   COE, Traffic Incidents, Check Car Plate, Travel Times, the HDB
   Resale Price Checker tabs, HDB Carpark Info, Map Search, the
   search-limit popup). Carried over from v1.34 and re-pointed at the
   v2.0.0 design tokens in style.css, so every tool picks up the new
   palette, type and dark mode without its own markup changing.
   ========================================================= */

/* v2.0.0 — the glass pages' colour blobs now start below the new page
   hero instead of behind it. */
.am-tt-bg, .am-hci-bg, .am-ms-bg { top: 280px !important; }

/* =========================================================
   HDB Resale Prices by Town — hub grid (v1.33.51, restyled v3.0.0)
   An ink panel with paper "index card" tiles, 6 per row, each lifting
   onto a tangerine print shadow on hover.
   ========================================================= */
.hdb-town-hub-wrap {
	position: relative;
	overflow: hidden;
	margin-top: 1.75rem;
	padding: 2rem;
	border-radius: var(--am-radius);
	background:
		repeating-linear-gradient(90deg, rgba(245,240,230,.05) 0 1px, transparent 1px 48px),
		var(--am-ink);
	border: 2px solid var(--am-ink);
}
.hdb-town-hub-grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 1rem;
}
.hdb-town-tile {
	aspect-ratio: 1 / 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .35rem;
	padding: .75rem .5rem;
	text-align: center;
	color: var(--am-ink);
	text-decoration: none;
	background: var(--am-paper);
	border: 1.5px solid var(--am-paper);
	border-radius: var(--am-radius-sm);
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.hdb-town-tile:hover,
.hdb-town-tile:focus-visible {
	background: #fffdf8;
	transform: translate(-3px, -3px) rotate(-1deg);
	box-shadow: 5px 5px 0 var(--am-primary);
	color: var(--am-ink);
	text-decoration: none;
}
.hdb-town-tile-icon { font-size: 1.6rem; line-height: 1; }
.hdb-town-tile-name {
	font-family: var(--am-font-display);
	font-weight: 800;
	font-size: 1.02rem;
	line-height: 1.2;
	letter-spacing: -.01em;
}
@media (max-width: 1080px) { .hdb-town-hub-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 680px) {
	.hdb-town-hub-wrap { padding: 1.25rem; }
	.hdb-town-hub-grid { grid-template-columns: repeat(3, 1fr); gap: .6rem; }
	.hdb-town-tile-name { font-size: .85rem; }
}
@media (max-width: 420px) { .hdb-town-hub-grid { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   HDB Resale Prices by Town — single-town detail view (v1.33.52,
   restyled v3.0.0): a mono back link, an ink headline band, real stat
   cards for the headline numbers and a ruled table.
   ========================================================= */
.hdb-town-back {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .45rem .8rem;
	border-radius: var(--am-radius-sm);
	background: transparent;
	border: 1.5px solid var(--am-border-strong);
	color: var(--am-text);
	font-family: var(--am-font-mono);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background .15s ease, color .15s ease, transform .15s ease;
}
.hdb-town-back:hover { background: var(--am-text); color: var(--am-bg); text-decoration: none; transform: translateX(-2px); }

.hdb-town-hero {
	display: flex;
	align-items: center;
	gap: .9rem;
	margin: 1.25rem 0 1.5rem;
	padding: 1.5rem 1.75rem;
	border-radius: var(--am-radius);
	background: var(--am-ink);
	border-left: 8px solid var(--am-primary);
	color: #f5f0e6;
}
.hdb-town-hero-icon {
	flex: 0 0 auto;
	width: 52px; height: 52px;
	display: flex; align-items: center; justify-content: center;
	font-size: 1.6rem;
	border-radius: var(--am-radius-sm);
	background: #f5f0e6;
	border: 1.5px solid #f5f0e6;
}
.hdb-town-hero h1 { margin: 0; color: #f5f0e6; font-size: clamp(1.6rem, 2.8vw, 2.3rem); }

.hdb-town-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	margin-bottom: 1.5rem;
}
.hdb-town-stat-card {
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius);
	padding: 1.1rem 1rem;
	text-align: center;
	box-shadow: var(--am-shadow-sm);
}
.hdb-town-stat-number {
	font-family: var(--am-font-display);
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--am-primary);
	letter-spacing: -.01em;
}
.hdb-town-stat-number.is-up { color: var(--am-success-text); }
.hdb-town-stat-number.is-down { color: var(--am-error-text); }
.hdb-town-stat-label { color: var(--am-text-muted); font-size: .82rem; margin-top: .35rem; }

.hdb-town-summary-wrap {
	display: flex;
	justify-content: center;
	text-align: center;
	margin: 0 0 1.5rem;
	padding: 1.4rem 1.75rem;
	border-radius: var(--am-radius);
	background: var(--am-bg-soft);
	border: 1px solid var(--am-border);
}
.hdb-town-summary {
	margin: 0 auto;
	max-width: 62ch;
	font-family: var(--am-font-display);
	font-size: 1.12rem;
	line-height: 1.55;
	color: var(--am-text);
}

.hdb-town-trend-wrap {
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius);
	overflow: hidden;
	margin: 1rem 0 1.5rem;
	box-shadow: var(--am-shadow-sm);
}
.hdb-town-trend-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.hdb-town-trend-table th, .hdb-town-trend-table td { padding: .7rem 1rem; text-align: left; }
.hdb-town-trend-table th {
	background: var(--am-bg-soft);
	color: var(--am-text-muted);
	font-weight: 700;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.hdb-town-trend-table td:nth-child(2), .hdb-town-trend-table td:nth-child(3),
.hdb-town-trend-table th:nth-child(2), .hdb-town-trend-table th:nth-child(3) { text-align: right; }
.hdb-town-trend-table tbody tr { border-top: 1px solid var(--am-border); }
.hdb-town-trend-table tbody tr:nth-child(even) { background: var(--am-bg-soft); }

.hdb-town-related { margin-top: 2rem; }
.hdb-town-related h2 { font-size: 1.1rem; margin-bottom: .75rem; }
.hdb-town-related-chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.hdb-town-chip {
	padding: .5rem 1rem;
	border-radius: 999px;
	background: var(--am-bg-soft);
	border: 1px solid var(--am-border);
	color: var(--am-text);
	font-size: .9rem;
	font-weight: 600;
	transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.hdb-town-chip:hover {
	background: var(--am-primary);
	border-color: var(--am-primary);
	color: #fff;
	text-decoration: none;
	transform: translateY(-2px);
}

@media (max-width: 780px) {
	.hdb-town-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	.hdb-town-hero { flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1.25rem; }
	.hdb-town-trend-wrap { overflow-x: auto; }
}

/* v1.31.0 — EV Charging Points result-list buttons (template-ev-charging.php
   inlines its own layout/colors so the rest of its styling isn't here, but
   the hover affordance for a clickable result card is a plain reusable rule). */
.am-ev-result:hover { border-color: var(--am-primary, var(--am-primary)); }

/* =========================================================
   COE "Latest bidding results" cards (v1.31.36, template-coe.php)
   "Can you make the latest bidding results look better? It is very
   dull and not appealing." Replaces the plain .am-service-card usage
   with a dedicated card that carries a per-category accent colour
   (the same PALETTE used by the trend chart just above it, so the two
   sections read as one colour-coded system), a category icon, a
   larger price, and a light quota-fill bar. Colour is applied via the
   --am-coe-accent custom property set inline per card, the same
   "PHP picks the value, CSS does the drawing" pattern as the rest of
   this theme's per-item accents.
   ========================================================= */
.am-coe-results-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.am-coe-result-card {
	position: relative;
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-top: 4px solid var(--am-coe-accent, var(--am-primary));
	border-radius: var(--am-radius);
	padding: 1.5rem 1.25rem 1.25rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: .3rem;
	transition: box-shadow .15s ease, transform .15s ease;
}
.am-coe-result-card:hover { box-shadow: var(--am-shadow-md); transform: translateY(-3px); }
.am-coe-result-card__icon {
	width: 44px; height: 44px;
	border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	font-size: 1.4rem;
	background: color-mix(in srgb, var(--am-coe-accent, var(--am-primary)) 14%, var(--am-bg-soft));
	margin-bottom: .2rem;
}
.am-coe-result-card__label {
	font-weight: 700;
	font-size: .85rem;
	letter-spacing: .02em;
	color: var(--am-coe-accent, var(--am-primary));
	text-transform: uppercase;
}
.am-coe-result-card__desc {
	font-size: .72rem;
	color: var(--am-text-muted);
	line-height: 1.35;
	min-height: calc(1.35em * 2);
	display: flex;
	align-items: center;
}
.am-coe-result-card__premium {
	font-size: 2rem;
	font-weight: 800;
	margin: .2rem 0 0;
	color: var(--am-text);
}
.am-coe-result-card__stats {
	width: 100%;
	margin-top: .5rem;
	padding-top: .6rem;
	border-top: 1px solid var(--am-border);
	font-size: .78em;
	color: var(--am-text-muted);
}
.am-coe-result-card__bar {
	width: 100%;
	height: 6px;
	border-radius: 999px;
	background: var(--am-bg-soft);
	margin-top: .65rem;
	overflow: hidden;
}
.am-coe-result-card__bar-fill {
	height: 100%;
	border-radius: 999px;
	background: var(--am-coe-accent, var(--am-primary));
}
/* color-mix() has broad modern support but no IE/older-Safari fallback;
   a plain tinted background keeps the icon chip visible either way. */
@supports not (background: color-mix(in srgb, red 10%, blue)) {
	.am-coe-result-card__icon { background: var(--am-bg-soft); }
}

/**
 * v1.33.27 — Traffic Incidents page. Same "coloured left accent + icon
 * chip" language as .am-coe-result-card above, adapted to a left-to-right
 * list row (one incident per row) rather than a centered stat card, since
 * an incident is a message to read, not a headline number.
 */
.am-incident-card {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: .9rem;
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-left: 4px solid var(--am-incident-accent, var(--am-primary));
	border-radius: var(--am-radius);
	padding: 1rem 1.1rem;
	margin-bottom: .75rem;
}
.am-incident-card__icon {
	flex: 0 0 auto;
	width: 38px; height: 38px;
	border-radius: 10px;
	display: flex; align-items: center; justify-content: center;
	font-size: 1.2rem;
	background: color-mix(in srgb, var(--am-incident-accent, var(--am-primary)) 14%, var(--am-bg-soft));
}
@supports not (background: color-mix(in srgb, red 10%, blue)) {
	.am-incident-card__icon { background: var(--am-bg-soft); }
}
.am-incident-card__body { flex: 1 1 auto; min-width: 0; }
.am-incident-card__type {
	display: inline-block;
	font-weight: 700;
	font-size: .72rem;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--am-incident-accent, var(--am-primary));
	margin-bottom: .2rem;
}
.am-incident-card__message { font-size: .95rem; line-height: 1.45; color: var(--am-text); word-break: break-word; }
.am-incident-card__meta { font-size: .78em; color: var(--am-text-muted); margin-top: .3rem; }

.am-incident-summary {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .5rem .9rem;
	margin: 0 0 1.5rem;
}
.am-incident-summary__pill {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	background: var(--am-bg-soft);
	border: 1px solid var(--am-border);
	border-radius: 999px;
	padding: .35rem .8rem;
	font-size: .82rem;
	font-weight: 600;
	color: var(--am-text);
}
.am-incident-summary__pill span.am-incident-summary__dot {
	width: 9px; height: 9px; border-radius: 50%;
	background: var(--am-incident-accent, var(--am-primary));
	display: inline-block;
}

/* =========================================================
   COE "Look up a month" results table (v1.32.2, template-coe.php)
   "The search results look very ugly. Can you display it in a more
   professional way?" Was a bare, unstyled <table> with no card, no
   striping, and the round number repeated on every single row. Now a
   proper card: rows group under a "Bidding Exercise N" divider instead of
   repeating the round number, each category gets a coloured dot reusing
   the SAME per-category palette as the trend chart / result cards above
   (one consistent colour system for the whole page), and the Premium
   column — the number people came here for — is the visually loudest
   thing in the row.
   ========================================================= */
.am-coe-month-results {
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius);
	box-shadow: var(--am-shadow-sm);
	overflow: hidden;
}
.am-coe-month-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.am-coe-month-table th,
.am-coe-month-table td { padding: .7rem 1rem; }
.am-coe-month-table thead th {
	background: var(--am-bg-soft);
	text-align: left;
	text-transform: uppercase;
	letter-spacing: .03em;
	font-size: .72rem;
	font-weight: 700;
	color: var(--am-text-muted);
	border-bottom: 1px solid var(--am-border);
	white-space: nowrap;
}
.am-coe-month-table th.am-text-right,
.am-coe-month-table td.am-text-right { text-align: right; }
.am-coe-month-table tbody tr:not(.am-coe-round-row) { border-bottom: 1px solid var(--am-border); transition: background .12s ease; }
.am-coe-month-table tbody tr:last-child { border-bottom: none; }
.am-coe-month-table tbody tr:not(.am-coe-round-row):nth-of-type(even) { background: var(--am-bg-soft); }
.am-coe-month-table tbody tr:not(.am-coe-round-row):hover { background: color-mix(in srgb, var(--am-primary) 8%, var(--am-surface)); }
.am-coe-round-row td {
	background: var(--am-bg-soft);
	border-bottom: 1px solid var(--am-border);
	border-top: 1px solid var(--am-border);
	font-weight: 700;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--am-text-muted);
}
.am-coe-round-row:first-child td { border-top: none; }
.am-coe-category-badge { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }
.am-coe-category-dot {
	width: .65rem; height: .65rem;
	border-radius: 50%;
	background: var(--am-coe-dot, var(--am-primary));
	flex-shrink: 0;
}
.am-coe-month-premium { font-weight: 800; font-size: 1.02rem; }
@supports not (background: color-mix(in srgb, red 10%, blue)) {
	.am-coe-month-table tbody tr:not(.am-coe-round-row):hover { background: var(--am-bg-soft); }
}

/* =========================================================
   Check Car Plate (v1.32.0, template-check-car-plate.php)
   ========================================================= */
.am-carplate-teaser {
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius);
	padding: 1.5rem;
	text-align: center;
}
.am-carplate-plate {
	display: inline-block;
	font-family: var(--am-font-display, inherit);
	font-size: 1.6rem;
	font-weight: 800;
	letter-spacing: .04em;
	background: #fff;
	color: #111;
	border: 3px solid #111;
	border-radius: 6px;
	padding: .4rem 1rem;
	margin-bottom: 1.25rem;
}
.am-carplate-teaser-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
}
.am-carplate-stat { display: flex; flex-direction: column; gap: .35rem; align-items: center; }
.am-carplate-stat__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--am-text-muted); }
.am-carplate-stat__value { font-size: 1.1rem; font-weight: 700; }
.am-carplate-kabbalah-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem; height: 2.4rem;
	border-radius: 50%;
	background: var(--am-bg-soft);
	color: var(--am-primary);
	font-size: 1.3rem;
}
.am-carplate-badge {
	display: inline-block;
	padding: .25rem .75rem;
	border-radius: 999px;
	font-size: .95rem;
}
.am-carplate-badge--good { background: var(--am-success-bg); color: var(--am-success-text); }
.am-carplate-badge--bad { background: var(--am-error-bg); color: var(--am-error-text); }
.am-carplate-badge--neutral { background: var(--am-bg-soft); color: var(--am-text-muted); }
.am-carplate-section { margin-bottom: 1.5rem; }
.am-carplate-section h3 { font-size: 1rem; margin-bottom: .5rem; }

/* Reusable "cover the results, prompt sign-up" paywall pattern — real
   content is rendered (via am_carplate_render_full_result(), the same
   helper the unlocked view uses, so the two can never drift apart) but
   visually blurred and non-interactive until an approved member views it,
   with a CTA overlaid on top. First use is Check Car Plate's fuller
   breakdown; written generically enough (.am-gated-preview) to reuse for
   any future "free teaser, sign up for the rest" content. */
.am-gated-preview { position: relative; }
.am-gated-preview__content {
	filter: blur(5px);
	user-select: none;
	pointer-events: none;
}
.am-gated-preview__cta {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1.5rem;
	background: rgba(255,255,255,.72);
	border-radius: var(--am-radius);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-gated-preview__cta { background: rgba(10,14,26,.8); }
}
:root[data-theme="dark"] .am-gated-preview__cta { background: rgba(10,14,26,.8); }

/* =========================================================
   Estimated Travel Times — glassmorphism accordion
   ("The website looks too lengthy. Redesign it to a more
   glassy look and allow the user to expand to show the full
   list.") Collapsed-by-default per-expressway accordions (same
   grid-template-rows trick as the FAQ accordion above) instead
   of one long always-visible page of tables, each panel a frosted
   "glass" surface, with segments laid out as a dense card grid
   (4 columns desktop / 2 columns mobile as of v1.33.17 — see that
   version's note further down; originally 8/3 in v1.33.16, cut
   down after the wider cards were confirmed cropping long route
   names on the live site) rather than a tall single-column table
   — both changes aimed at the same "too lengthy" complaint from
   two different angles.
   ========================================================= */
.am-tt-page { position: relative; }
/* Soft blurred colour blobs behind the page, using the theme's own
   palette — needed for the frosted-glass panels below to actually read
   as "glass" rather than plain translucent grey on a flat background. */
.am-tt-bg {
	position: absolute;
	inset: -1rem -1rem auto -1rem;
	height: 480px;
	overflow: hidden;
	z-index: 0;
	pointer-events: none;
}
.am-tt-bg::before,
.am-tt-bg::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	opacity: .3;
}
.am-tt-bg::before { width: 420px; height: 420px; background: var(--am-primary-light); top: -140px; left: -100px; }
.am-tt-bg::after { width: 380px; height: 380px; background: var(--am-gold); top: -100px; right: -120px; }
.am-tt-content { position: relative; z-index: 1; }

.am-tt-glass {
	background: rgba(255,255,255,.55);
	-webkit-backdrop-filter: blur(16px) saturate(160%);
	backdrop-filter: blur(16px) saturate(160%);
	border: 1px solid rgba(255,255,255,.45);
	box-shadow: var(--am-shadow-sm);
	border-radius: var(--am-radius);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-tt-glass { background: var(--am-surface); border-color: var(--am-border-strong); }
}
:root[data-theme="dark"] .am-tt-glass { background: var(--am-surface); border-color: var(--am-border-strong); }

.am-tt-toolbar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .6rem;
	flex-wrap: wrap;
	margin: 0 auto 1.25rem;
	max-width: 900px;
}
.am-tt-toolbar-btn {
	padding: .5rem 1.1rem;
	font-family: var(--am-font-display);
	font-weight: 700;
	font-size: .85rem;
	color: var(--am-text);
	cursor: pointer;
	border-radius: 999px;
}
.am-tt-toolbar-btn:hover { background: rgba(255,255,255,.75); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-tt-toolbar-btn:hover { background: rgba(255,255,255,.08); }
}
:root[data-theme="dark"] .am-tt-toolbar-btn:hover { background: rgba(255,255,255,.08); }

.am-tt-expressway { max-width: 900px; margin: 0 auto 1rem; }
.am-tt-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	border: 1px solid rgba(255,255,255,.45);
	text-align: left;
	cursor: pointer;
}
.am-tt-toggle-title {
	display: flex;
	align-items: baseline;
	gap: .6rem;
	font-family: var(--am-font-display);
	font-weight: 800;
	font-size: 1.05rem;
	color: var(--am-text);
}
.am-tt-toggle-meta { font-weight: 500; font-size: .78rem; color: var(--am-text-muted); }
.am-tt-toggle-icon {
	flex-shrink: 0;
	width: 26px; height: 26px;
	border-radius: 50%;
	background: rgba(255,255,255,.6);
	display: flex; align-items: center; justify-content: center;
	font-size: 1rem;
	transition: transform .25s ease, background .2s ease, color .2s ease;
}
.am-tt-toggle[aria-expanded="true"] .am-tt-toggle-icon { transform: rotate(45deg); background: var(--am-accent); color: #fff; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-tt-toggle-icon { background: rgba(255,255,255,.1); }
}
:root[data-theme="dark"] .am-tt-toggle-icon { background: rgba(255,255,255,.1); }

.am-tt-panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .3s ease;
}
.am-tt-toggle[aria-expanded="true"] + .am-tt-panel { grid-template-rows: 1fr; }
.am-tt-panel-inner { overflow: hidden; }
.am-tt-panel-body { padding: 1rem 1.25rem 1.25rem; }

.am-tt-direction { margin-bottom: 1rem; }
.am-tt-direction:last-child { margin-bottom: 0; }
.am-tt-direction-label {
	margin: 0 0 .5rem;
	font-size: .82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--am-text-muted);
}

/* v1.33.17 — "the words are cropped... if 8 columns are too small, make
   it 4 for desktop and 2 for mobile." 8/3 columns (v1.33.16) left barely
   80px per card, and this dataset's real route names run long
   ("KJE/PIE INTERCHANGE(JALAN BAHAR FLYOVER)") — a single-line
   white-space:nowrap + ellipsis truncated most of them down to a few
   characters ("LOWER DEL…"), confirmed directly against the live page.
   Fewer, wider columns (4/2) plus a 2-line clamp (below) instead of a
   1-line ellipsis gives route names real room to actually read. */
.am-tt-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: .55rem;
}
@media (max-width: 780px) {
	.am-tt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.am-tt-segment {
	padding: .6rem .7rem;
	display: flex;
	flex-direction: column;
	gap: .3rem;
	font-size: .8rem;
	line-height: 1.3;
	border-radius: 10px;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.am-tt-segment:hover { transform: translateY(-2px); box-shadow: var(--am-shadow-md); background: rgba(255,255,255,.85); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-tt-segment:hover { background: rgba(255,255,255,.12); }
}
:root[data-theme="dark"] .am-tt-segment:hover { background: rgba(255,255,255,.12); }
.am-tt-segment-route {
	color: var(--am-text);
	/* v1.33.17 — a 2-line clamp (not a 1-line nowrap+ellipsis) so a long
	   route name gets a real second line before it's ever cut off, and
	   only the rare name that's STILL too long past two lines loses
	   anything at all. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-word;
}
.am-tt-segment-time { font-weight: 800; color: var(--am-primary); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-tt-segment-time { color: var(--am-primary-light); }
}
:root[data-theme="dark"] .am-tt-segment-time { color: var(--am-primary-light); }

@media (max-width: 480px) {
	.am-tt-toggle-title { flex-wrap: wrap; }
	.am-tt-panel-body { padding: .85rem .9rem 1rem; }
}

/* v1.33.22 — Traffic Images lightbox. "do not allow the user to open the
   image and open in a new tab. Only create a popup with the image
   expanded according to the screen size so it works for both desktop
   and mobile." Replaces the old <a target="_blank"> (straight to the
   raw, time-limited presigned S3 link — see v1.33.21) with an in-page
   enlarged view. Sized with vw/vh so one set of rules fits both a phone
   and a desktop monitor, no separate mobile/desktop variants needed. */
.am-ti-photo-btn {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	appearance: none;
	font: inherit;
	text-align: left;
}
.am-ti-photo-btn:focus-visible {
	outline: 2px solid var(--am-primary);
	outline-offset: 2px;
	border-radius: 8px;
}
.am-ti-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(10, 15, 25, .88);
	padding: 1.25rem;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	cursor: zoom-out;
}
.am-ti-lightbox.is-open { display: flex; }
.am-ti-lightbox-img {
	max-width: 95vw;
	max-height: 82vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
	cursor: default;
	margin-bottom: 0; /* overrides the shared .am-ti-photo inline margin used in the grid */
}
.am-ti-lightbox-caption {
	color: #fff;
	margin: .85rem 0 0;
	text-align: center;
	font-size: .95em;
	max-width: 90vw;
	cursor: default;
}
.am-ti-lightbox-close {
	position: absolute;
	top: 1rem;
	right: 1.25rem;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 0;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.am-ti-lightbox-close:hover,
.am-ti-lightbox-close:focus-visible {
	background: rgba(255, 255, 255, .24);
	outline: none;
}
body.am-ti-lightbox-open { overflow: hidden; } /* keep the page from scrolling behind the overlay, especially on mobile */
@media (max-width: 480px) {
	.am-ti-lightbox { padding: .75rem; }
	.am-ti-lightbox-close { top: .5rem; right: .5rem; width: 38px; height: 38px; font-size: 1.4rem; }
}

/* Search-limit sign-up popup (v1.33.54) — same fixed full-screen overlay
   pattern as the Traffic Images lightbox above, used for the "you're out of
   free searches" message so it interrupts the page as a real popup instead
   of an inline banner. See inc/class-am-search-limit.php's render_banner()
   (server-rendered pages) and assets/js/theme.js's showLimitModal() (Bus/
   EV Charging's AJAX-driven results). */
.am-limit-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(10, 15, 25, .72);
	padding: 1.25rem;
	align-items: center;
	justify-content: center;
}
.am-limit-modal-overlay.is-open { display: flex; }
.am-limit-modal {
	position: relative;
	max-width: 480px;
	width: 100%;
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius);
	box-shadow: var(--am-shadow-md);
	padding: 2rem 1.75rem 1.75rem;
}
.am-limit-modal .am-notice { margin: 0; }
.am-limit-modal-close {
	position: absolute;
	top: .6rem;
	right: .75rem;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 0;
	background: var(--am-bg-soft);
	color: var(--am-text-muted);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.am-limit-modal-close:hover,
.am-limit-modal-close:focus-visible {
	background: var(--am-border);
	color: var(--am-text);
	outline: none;
}
body.am-limit-modal-open { overflow: hidden; }
@media (max-width: 480px) {
	.am-limit-modal { padding: 1.75rem 1.25rem 1.5rem; }
}

/* ==========================================================
   HDB Resale Price Checker page — tabbed layout (v1.33.23)
   Wei Yun: "looks messy and i wont want to stay at the page any
   longer." The 3 tools (search / overview / compare) used to render
   one after another on a single very long page. These rules turn
   them into CSS-only radio-button tabs — one tool visible at a time,
   inside its own card — with no JS dependency at all: the inputs are
   visually hidden but still keyboard/click operable via their <label>,
   and :checked + the general sibling combinator does the showing and
   hiding. See page-templates/template-hdb-resale-checker.php.
   ========================================================== */
.hdb-tabs-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hdb-tabs-bar {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
	margin-bottom: 1.75rem;
	border-bottom: 1px solid var(--am-border);
}
.hdb-tabs-btn {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .8rem 1.15rem;
	border-radius: 10px 10px 0 0;
	font-weight: 700;
	font-size: .95rem;
	color: var(--am-text-muted);
	cursor: pointer;
	border: 1px solid transparent;
	border-bottom: none;
	transform: translateY(1px);
	transition: color .15s ease, background .15s ease;
}
.hdb-tabs-icon { font-size: 1.05rem; line-height: 1; }
.hdb-tabs-btn:hover { color: var(--am-text); background: var(--am-bg-soft); }
.hdb-tabs-input:focus-visible + .hdb-tabs-bar label,
.hdb-tabs-input:focus-visible ~ .hdb-tabs-bar label {
	outline: 2px solid var(--am-primary);
	outline-offset: 2px;
}

.hdb-tabs-panel {
	display: none;
	background: var(--am-surface);
	border: 1px solid var(--am-border);
	border-radius: var(--am-radius);
	box-shadow: var(--am-shadow-sm);
	padding: 1.75rem clamp(1.25rem, 4vw, 2.25rem) 2.25rem;
}
.hdb-tabs-panel-title { margin: 0 0 .35rem; }
.hdb-tabs-panel-desc { color: var(--am-text-muted); margin: 0 0 1.5rem; max-width: 640px; }

#hdb-tab-search:checked ~ .hdb-tabs-bar label[for="hdb-tab-search"],
#hdb-tab-overview:checked ~ .hdb-tabs-bar label[for="hdb-tab-overview"],
#hdb-tab-compare:checked ~ .hdb-tabs-bar label[for="hdb-tab-compare"] {
	color: var(--am-primary);
	background: var(--am-surface);
	border-color: var(--am-border);
	box-shadow: 0 -2px 0 var(--am-primary) inset;
}

#hdb-tab-search:checked ~ .hdb-tabs-panels #hdb-panel-search,
#hdb-tab-overview:checked ~ .hdb-tabs-panels #hdb-panel-overview,
#hdb-tab-compare:checked ~ .hdb-tabs-panels #hdb-panel-compare {
	display: block;
}

/* No-JS fallback: if a browser doesn't support :checked + sibling
   combinators at all (essentially none in practice), .hdb-tabs-panel's
   base "display: none" above would hide every tool with nothing to
   reveal them — so a plain <noscript> isn't the right guard here.
   Rather than risk that, everything CSS-needs is plain CSS3 supported
   by every current and legacy browser this site needs to support. */

@media (max-width: 640px) {
	.hdb-tabs-bar { border-bottom: none; gap: .4rem; }
	.hdb-tabs-btn {
		flex: 1 1 auto;
		justify-content: center;
		text-align: center;
		border-radius: 10px;
		border: 1px solid var(--am-border);
		transform: none;
	}
	#hdb-tab-search:checked ~ .hdb-tabs-bar label[for="hdb-tab-search"],
	#hdb-tab-overview:checked ~ .hdb-tabs-bar label[for="hdb-tab-overview"],
	#hdb-tab-compare:checked ~ .hdb-tabs-bar label[for="hdb-tab-compare"] {
		box-shadow: none;
		background: var(--am-primary);
		color: #fff;
		border-color: var(--am-primary);
	}
}

/* =========================================================
   HDB Carpark Information — glassmorphism cards (v1.33.33)
   ("Set the page to display the information using icons and
   words. Make it look modern with glassy look.") Same frosted-
   glass technique as Estimated Travel Times' "am-tt-*" block
   above (blurred colour-blob background + translucent/blurred
   panels) but under its own "am-hci-*" names so this page's
   layout can't accidentally pick up an am-tt-* rule tuned for a
   different page's specific structure (accordions, grid columns,
   etc. — this page has neither).
   ========================================================= */
.am-hci-page { position: relative; }
.am-hci-bg {
	position: absolute;
	inset: -1rem -1rem auto -1rem;
	height: 480px;
	overflow: hidden;
	z-index: 0;
	pointer-events: none;
}
.am-hci-bg::before,
.am-hci-bg::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	opacity: .3;
}
.am-hci-bg::before { width: 420px; height: 420px; background: var(--am-primary-light); top: -140px; left: -100px; }
.am-hci-bg::after { width: 380px; height: 380px; background: var(--am-gold); top: -100px; right: -120px; }
.am-hci-content { position: relative; z-index: 1; }

.am-hci-glass {
	background: rgba(255,255,255,.55);
	-webkit-backdrop-filter: blur(16px) saturate(160%);
	backdrop-filter: blur(16px) saturate(160%);
	border: 1px solid rgba(255,255,255,.45);
	box-shadow: var(--am-shadow-sm);
	border-radius: var(--am-radius);
	transition: transform .2s ease, box-shadow .2s ease;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-hci-glass { background: var(--am-surface); border-color: var(--am-border-strong); }
}
:root[data-theme="dark"] .am-hci-glass { background: var(--am-surface); border-color: var(--am-border-strong); }

.am-hci-search-wrap { max-width: 640px; margin: 0 auto 1.5rem; padding: 1.25rem 1.5rem; }
.am-hci-search-wrap form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.am-hci-search-wrap .am-field { flex: 1 1 260px; margin: 0; }

.am-hci-meta { text-align: center; color: var(--am-text-muted); font-size: .88em; margin: 0 auto .75rem; }
.am-hci-footer-note { text-align: center; color: var(--am-text-muted); font-size: .8em; margin-top: 2.5rem; line-height: 1.6; }
.am-hci-footer-note a { color: var(--am-primary); font-weight: 600; }

.am-hci-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}

.am-hci-card { padding: 1.35rem 1.5rem; }
.am-hci-card:hover { transform: translateY(-3px); box-shadow: var(--am-shadow-md); }

.am-hci-card-title {
	margin: 0 0 .15rem;
	font-family: var(--am-font-display);
	font-weight: 800;
	font-size: 1.05rem;
	color: var(--am-text);
	line-height: 1.3;
}
.am-hci-card-code {
	margin: 0 0 .9rem;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .04em;
	color: var(--am-text-muted);
	text-transform: uppercase;
}

.am-hci-facts { display: flex; flex-direction: column; gap: .55rem; }
.am-hci-fact { display: flex; align-items: center; gap: .55rem; }
.am-hci-fact-icon {
	flex-shrink: 0;
	width: 30px; height: 30px;
	border-radius: 50%;
	background: rgba(255,255,255,.6);
	display: flex; align-items: center; justify-content: center;
	font-size: 1rem;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-hci-fact-icon { background: rgba(255,255,255,.1); }
}
:root[data-theme="dark"] .am-hci-fact-icon { background: rgba(255,255,255,.1); }
.am-hci-fact-text { font-size: .88rem; color: var(--am-text); line-height: 1.35; }
.am-hci-fact-muted .am-hci-fact-text { color: var(--am-text-muted); }

@media (max-width: 640px) {
	.am-hci-grid { grid-template-columns: 1fr; }
	.am-hci-search-wrap form { flex-direction: column; align-items: stretch; }
}

/* =========================================================
   Address & Map Search — glassmorphism (v1.33.34)
   ("Design something that is user-friendly, modern glassy
   look and easy to navigate.") Same frosted-glass technique
   as the "am-tt-*"/"am-hci-*" blocks above, under its own
   "am-ms-*" names.
   ========================================================= */
.am-ms-page { position: relative; }
.am-ms-bg {
	position: absolute;
	inset: -1rem -1rem auto -1rem;
	height: 480px;
	overflow: hidden;
	z-index: 0;
	pointer-events: none;
}
.am-ms-bg::before,
.am-ms-bg::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	opacity: .3;
}
.am-ms-bg::before { width: 420px; height: 420px; background: var(--am-primary-light); top: -140px; left: -100px; }
.am-ms-bg::after { width: 380px; height: 380px; background: var(--am-gold); top: -100px; right: -120px; }
.am-ms-content { position: relative; z-index: 1; }

.am-ms-glass {
	background: rgba(255,255,255,.55);
	-webkit-backdrop-filter: blur(16px) saturate(160%);
	backdrop-filter: blur(16px) saturate(160%);
	border: 1px solid rgba(255,255,255,.45);
	box-shadow: var(--am-shadow-sm);
	border-radius: var(--am-radius);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-ms-glass { background: var(--am-surface); border-color: var(--am-border-strong); }
}
:root[data-theme="dark"] .am-ms-glass { background: var(--am-surface); border-color: var(--am-border-strong); }

.am-ms-search-wrap { max-width: 640px; margin: 0 auto 1.5rem; padding: 1.25rem 1.5rem; }
.am-ms-search-wrap form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.am-ms-search-wrap .am-field { flex: 1 1 260px; margin: 0; }

.am-ms-meta { text-align: center; color: var(--am-text-muted); font-size: .88em; margin: 0 auto .75rem; }
.am-ms-footer-note { text-align: center; color: var(--am-text-muted); font-size: .8em; margin-top: 2.5rem; line-height: 1.6; }

.am-ms-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 1rem;
	max-width: 1100px;
	margin: 0 auto 1rem;
	align-items: start;
}
@media (max-width: 820px) {
	.am-ms-layout { grid-template-columns: 1fr; }
}

.am-ms-filters { padding: 1.25rem 1.4rem; }
.am-ms-filters-title {
	margin: 0 0 .75rem;
	font-family: var(--am-font-display);
	font-weight: 800;
	font-size: 1rem;
	color: var(--am-text);
}
.am-ms-filters form { display: flex; flex-direction: column; gap: .6rem; }
.am-ms-check {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: .9rem;
	color: var(--am-text);
	cursor: pointer;
}
.am-ms-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--am-primary); flex-shrink: 0; }
.am-ms-check-icon { font-size: 1rem; }
.am-ms-filter-submit { width: 100%; text-align: center; margin-top: .4rem; }

.am-ms-map-wrap { padding: .6rem; overflow: hidden; }
#am-ms-map { height: 480px; width: 100%; border-radius: calc(var(--am-radius) - 6px); }
@media (max-width: 820px) {
	#am-ms-map { height: 360px; }
}

.am-ms-pin {
	width: 28px; height: 28px;
	border-radius: 50% 50% 50% 0;
	background: var(--am-ms-pin-color, var(--am-primary));
	transform: rotate(-45deg);
	display: flex; align-items: center; justify-content: center;
	box-shadow: var(--am-shadow-sm);
	border: 2px solid #fff;
	font-size: .95rem;
}
.am-ms-pin-center {
	width: 34px; height: 34px;
	background: var(--am-accent);
	font-size: 1.2rem;
}
/* The icon glyph itself must sit upright — only the pin's teardrop shape rotates. */
.am-ms-pin > * { transform: rotate(45deg); }

.am-ms-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: .85rem;
	max-width: 1100px;
	margin: 1.5rem auto 0;
}
.am-ms-loc-card {
	padding: 1rem 1.15rem;
	display: flex;
	align-items: flex-start;
	gap: .75rem;
	border-left: 3px solid var(--am-ms-accent, var(--am-primary));
}
.am-ms-loc-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1; margin-top: .1rem; }
.am-ms-loc-name { margin: 0 0 .2rem; font-family: var(--am-font-display); font-weight: 700; font-size: .95rem; color: var(--am-text); line-height: 1.3; }
.am-ms-loc-meta { margin: 0; font-size: .8rem; color: var(--am-text-muted); }
.am-ms-loc-address { margin: .2rem 0 0; font-size: .78rem; color: var(--am-text-muted); }

@media (max-width: 640px) {
	.am-ms-search-wrap form { flex-direction: column; align-items: stretch; }
	.am-ms-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   v3.0.0 — editorial layer for tool-page components.
   Everything above is token-driven and already picks up the paper /
   ink / tangerine palette; this layer only swaps the soft "card"
   treatment for the outlined, print-shadow one used site-wide.
   ========================================================= */
.hdb-town-stat-card,
.hdb-town-summary-wrap,
.hdb-town-trend-wrap,
.am-coe-result-card,
.am-incident-card,
.am-coe-month-results,
.am-carplate-teaser,
.am-tt-glass,
.am-hci-glass,
.am-ms-glass,
.hdb-tabs-panel {
	border: 1.5px solid var(--am-border-strong);
	border-radius: var(--am-radius);
	box-shadow: none;
}
.am-coe-result-card:hover,
.am-incident-card:hover,
.hdb-town-stat-card:hover { box-shadow: var(--am-shadow-md); }
.am-limit-modal {
	border: 2px solid var(--am-border-strong);
	border-radius: var(--am-radius);
	box-shadow: var(--am-shadow-lg);
}
.am-carplate-plate { border-radius: var(--am-radius-sm); box-shadow: 4px 4px 0 var(--am-ink); }
/* The v2 "frosted glass on colour blobs" backdrops (travel times, HDB
   carpark info, map search) become plain paper panels: blobs off, glass
   made opaque. */
.am-tt-bg::before, .am-tt-bg::after,
.am-hci-bg::before, .am-hci-bg::after,
.am-ms-bg::before, .am-ms-bg::after { display: none; }
.am-tt-glass, .am-hci-glass, .am-ms-glass {
	background: var(--am-surface);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

/* ==================================================================
 * v3.1.0 — Wind Speed (template-wind-speed.php).
 * ================================================================== */
.am-wind {
	--w-calm: #a39a8a; --w-light: #2f8f5b; --w-moderate: #d9a300;
	--w-fresh: #ff8a3d; --w-strong: #e4572e; --w-gale: #9b2c12;
	max-width: 1120px; margin: 0 auto;
}
:root[data-theme="dark"] .am-wind { --w-calm: #8c8476; --w-light: #5cc28a; --w-moderate: #f2c94c; --w-fresh: #ffa564; --w-strong: #ff7a52; --w-gale: #ff8f7a; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-wind { --w-calm: #8c8476; --w-light: #5cc28a; --w-moderate: #f2c94c; --w-fresh: #ffa564; --w-strong: #ff7a52; --w-gale: #ff8f7a; }
}
.am-wind-band-calm { --w: var(--w-calm); }
.am-wind-band-light { --w: var(--w-light); }
.am-wind-band-moderate { --w: var(--w-moderate); }
.am-wind-band-fresh { --w: var(--w-fresh); }
.am-wind-band-strong { --w: var(--w-strong); }
.am-wind-band-gale { --w: var(--w-gale); }

.am-wind-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding-bottom: .9rem; margin-bottom: 1.25rem; border-bottom: 3px double var(--am-rule); }
.am-wind-status { margin: 0; font-family: var(--am-font-mono); font-size: .8rem; letter-spacing: .02em; color: var(--am-text-muted); display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.am-wind-status strong { color: var(--am-text); }
.am-wind-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--am-accent); box-shadow: 0 0 0 0 var(--am-accent); animation: am-wind-pulse 2s infinite; }
.am-wind-dot.is-stale { background: var(--am-gold); animation: none; }
@keyframes am-wind-pulse { 0% { box-shadow: 0 0 0 0 rgba(31,138,76,.5); } 70% { box-shadow: 0 0 0 .5rem rgba(31,138,76,0); } 100% { box-shadow: 0 0 0 0 rgba(31,138,76,0); } }
@media (prefers-reduced-motion: reduce) { .am-wind-dot { animation: none; } }

.am-wind-units { display: inline-flex; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius-sm); overflow: hidden; }
.am-wind-units button { font: 600 .8rem var(--am-font-mono); padding: .4rem .8rem; border: 0; background: transparent; color: var(--am-text); cursor: pointer; }
.am-wind-units button + button { border-left: 2px solid var(--am-border-strong); }
.am-wind-units button.is-active { background: var(--am-text); color: var(--am-bg); }
.am-wind-units button:focus-visible { outline: 3px solid var(--am-primary); outline-offset: -3px; }

.am-wind-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); box-shadow: var(--am-shadow-md); margin-bottom: 2rem; }
.am-wind-stat { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.15rem; min-width: 0; }
.am-wind-stat + .am-wind-stat { border-left: 1px solid var(--am-border); }
.am-wind-stat-label { font: 600 .7rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--am-text-muted); }
.am-wind-stat-num { font-family: var(--am-font-display); font-weight: 800; font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.am-wind-stat-num .am-wind-unit { font: 600 .85rem var(--am-font-mono); color: var(--am-text-muted); }
.am-wind-stat-sub { font-size: .85rem; color: var(--am-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.am-wind-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.am-wind-map { margin: 0; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-bg-soft); overflow: hidden; }
.am-wind-map svg { display: block; width: 100%; height: auto; }
.am-wind-map figcaption { font-size: .78rem; color: var(--am-text-muted); padding: .6rem .9rem; border-top: 1px solid var(--am-border); background: var(--am-surface); }
.am-wind-land { fill: var(--am-surface-raised); stroke: var(--am-border-strong); stroke-width: 2; stroke-linejoin: round; }
.am-wind-pin { cursor: default; outline: none; }
.am-wind-halo { fill: var(--w); fill-opacity: .22; stroke: var(--w); stroke-width: 2; transition: fill-opacity .15s; }
.am-wind-core { fill: var(--w); stroke: var(--am-ink); stroke-width: 1.5; }
.am-wind-pin text { font: 700 22px var(--am-font-mono); fill: var(--am-text); paint-order: stroke; stroke: var(--am-bg-soft); stroke-width: 5px; }
.am-wind-pin.is-hl .am-wind-halo, .am-wind-pin:focus .am-wind-halo { fill-opacity: .55; stroke-width: 3; }

.am-wind-list { border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); overflow: hidden; }
.am-wind-table { width: 100%; font-size: .9rem; }
.am-wind-table th { text-align: left; font: 600 .7rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--am-text-muted); padding: .7rem .8rem; border-bottom: 2px solid var(--am-border-strong); background: var(--am-surface); }
.am-wind-table td { padding: .5rem .8rem; border-bottom: 1px solid var(--am-border); }
.am-wind-table tr:last-child td { border-bottom: 0; }
.am-wind-table .num { text-align: right; font-family: var(--am-font-mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.am-wind-table tr.is-hl td { background: var(--am-bg-soft); }
.am-wind-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; white-space: nowrap; }
.am-wind-chip::before { content: ""; width: .65rem; height: .65rem; border-radius: 50%; background: var(--w); border: 1px solid var(--am-ink); flex: none; }

.am-wind-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; padding: 0; margin: 1.5rem 0 0; font-size: .8rem; color: var(--am-text-muted); }
.am-wind-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.am-wind-legend li::before { content: ""; width: .8rem; height: .8rem; border-radius: 50%; background: var(--w); border: 1px solid var(--am-ink); }

@media (max-width: 900px) {
	.am-wind-layout { grid-template-columns: 1fr; }
	.am-wind-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.am-wind-stat:nth-child(3) { border-left: 0; }
	.am-wind-stat:nth-child(n+3) { border-top: 1px solid var(--am-border); }
}
@media (max-width: 480px) {
	.am-wind-bar { flex-direction: column; align-items: flex-start; }
	.am-wind-chip { font-size: .72rem; }
	.am-wind-table td, .am-wind-table th { padding-left: .55rem; padding-right: .55rem; }
}

/* ==================================================================
 * v3.2.0 — UV Index (template-uv.php). Reuses .am-wind-bar/.am-wind-status
 * for the status line.
 * ================================================================== */
.am-uv {
	--uv-low: #3f9b5a; --uv-moderate: #e7b416; --uv-high: #f07c1a; --uv-very-high: #d7301f; --uv-extreme: #7b3fa0;
	max-width: 1120px; margin: 0 auto;
}
:root[data-theme="dark"] .am-uv { --uv-low: #5cc28a; --uv-moderate: #f2c94c; --uv-high: #ff9a4a; --uv-very-high: #ff6b5a; --uv-extreme: #b48ae0; }
:root[data-theme="dark"] .am-uv [class*="am-uv-band-"] { --uv-ink: #16130f; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-uv { --uv-low: #5cc28a; --uv-moderate: #f2c94c; --uv-high: #ff9a4a; --uv-very-high: #ff6b5a; --uv-extreme: #b48ae0; }
	:root:not([data-theme="light"]) .am-uv [class*="am-uv-band-"] { --uv-ink: #16130f; }
}
.am-uv-band-low { --uv: var(--uv-low); --uv-ink: #16130f; }
.am-uv-band-moderate { --uv: var(--uv-moderate); --uv-ink: #16130f; }
.am-uv-band-high { --uv: var(--uv-high); --uv-ink: #16130f; }
.am-uv-band-very-high { --uv: var(--uv-very-high); --uv-ink: #fff; }
.am-uv-band-extreme { --uv: var(--uv-extreme); --uv-ink: #fff; }

.am-uv-cadence { margin: 0; font: 600 .75rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--am-text-muted); }

.am-uv-now { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); box-shadow: var(--am-shadow-md); overflow: hidden; margin-bottom: 2.25rem; }
.am-uv-dial { background: var(--uv); color: var(--uv-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.75rem 1rem; text-align: center; border-right: 2px solid var(--am-border-strong); }
.am-uv-dial-label { font: 700 .75rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .12em; }
.am-uv-dial-num { font-family: var(--am-font); font-weight: 800; letter-spacing: -.04em; font-size: clamp(5rem, 11vw, 7.5rem); line-height: .95; font-variant-numeric: tabular-nums; }
.am-uv-dial-band { font-family: var(--am-font-display); font-weight: 700; font-size: 1.35rem; }
.am-uv-advice { padding: 1.5rem 1.75rem; }
.am-uv-advice h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin: 0 0 .5rem; }
.am-uv-advice > p { margin: 0 0 1.25rem; font-size: 1.05rem; max-width: 52ch; }
.am-uv-facts { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 0; padding-top: 1rem; border-top: 1px solid var(--am-border); }
.am-uv-facts dt { font: 600 .7rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--am-text-muted); margin-bottom: .25rem; }
.am-uv-facts dd { margin: 0; display: flex; align-items: center; gap: .45rem; font-weight: 600; }
.am-uv-chip { display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.9rem; padding: 0 .35rem; border-radius: var(--am-radius-sm); background: var(--uv); color: var(--uv-ink); border: 1.5px solid var(--am-ink); font: 700 .95rem var(--am-font-mono); }

.am-uv-day h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.am-uv-chart { margin: 0; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); overflow: hidden; }
.am-uv-chart svg { display: block; width: 100%; height: auto; }
.am-uv-chart figcaption { font-size: .78rem; color: var(--am-text-muted); padding: .6rem .9rem; border-top: 1px solid var(--am-border); background: var(--am-surface); }
.am-uv-zone { fill: var(--uv); fill-opacity: .1; }
.am-uv-axis { font: 600 18px var(--am-font-mono); fill: var(--am-text-muted); }
.am-uv-base { stroke: var(--am-border-strong); stroke-width: 2; }
.am-uv-col rect { fill: var(--uv); stroke: var(--am-ink); stroke-width: 1.5; }
.am-uv-col text { font: 700 20px var(--am-font-mono); fill: var(--am-text); }
.am-uv-col.is-current rect { stroke-width: 4; }
.am-uv-bar-empty { fill: none; stroke: var(--am-border); stroke-width: 1.5; stroke-dasharray: 4 3; }
.am-uv-hour { font: 600 17px var(--am-font-mono); fill: var(--am-text-muted); }
.am-uv-hour.is-current { fill: var(--am-text); font-weight: 800; }

.am-uv-scale { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 0; margin: 1.75rem 0 0; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); overflow: hidden; }
.am-uv-scale li { background: var(--uv); color: var(--uv-ink); padding: .65rem .8rem; display: flex; flex-direction: column; gap: .1rem; }
.am-uv-scale li + li { border-left: 2px solid var(--am-border-strong); }
.am-uv-scale li.is-current { box-shadow: inset 0 0 0 4px var(--am-ink); }
.am-uv-scale-range { font: 700 .8rem var(--am-font-mono); }
.am-uv-scale-name { font-weight: 700; font-size: .95rem; }

@media (max-width: 600px) {
	.am-uv-hour { font-size: 28px; }
	.am-uv-col text { font-size: 32px; }
	.am-uv-axis { font-size: 28px; }
}
@media (max-width: 760px) {
	.am-uv-now { grid-template-columns: 1fr; }
	.am-uv-dial { border-right: 0; border-bottom: 2px solid var(--am-border-strong); }
	.am-uv-advice { padding: 1.25rem; }
	.am-uv-scale { grid-template-columns: 1fr; }
	.am-uv-scale li { flex-direction: row; justify-content: space-between; }
	.am-uv-scale li + li { border-left: 0; border-top: 2px solid var(--am-border-strong); }
}

/* ==================================================================
 * v3.3.0 — Rainfall (template-rainfall.php). Reuses the Wind Speed
 * layout classes (.am-wind-bar/-stats/-layout/-map/-list/-table/-legend).
 * ================================================================== */
.am-rain {
	--r-light: #8cc4ec; --r-moderate: #3d8bd9; --r-heavy: #1d4fb8; --r-violent: #6a2c9e;
	max-width: 1120px; margin: 0 auto;
}
:root[data-theme="dark"] .am-rain { --r-light: #6aa9d8; --r-moderate: #5aa2ef; --r-heavy: #8aa4ff; --r-violent: #c39af0; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-rain { --r-light: #6aa9d8; --r-moderate: #5aa2ef; --r-heavy: #8aa4ff; --r-violent: #c39af0; }
}
.am-rain-i-dry { --r: var(--am-border); }
.am-rain-i-light { --r: var(--r-light); }
.am-rain-i-moderate { --r: var(--r-moderate); }
.am-rain-i-heavy { --r: var(--r-heavy); }
.am-rain-i-violent { --r: var(--r-violent); }

.am-rain-headline { display: flex; align-items: center; gap: .65rem; margin: 0 0 1.25rem; padding: .85rem 1.1rem; font-family: var(--am-font-display); font-weight: 700; font-size: clamp(1.1rem, 2.2vw, 1.45rem); line-height: 1.3; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); }
.am-rain-headline.is-wet { background: color-mix(in srgb, var(--r-moderate) 14%, var(--am-surface-raised)); }
.am-rain-headline-icon { font-size: 1.5em; line-height: 1; flex: none; }

.am-rain-dry { fill: var(--am-surface-raised); stroke: var(--am-text-muted); stroke-width: 1.5; }
.am-rain-halo { fill: var(--r); fill-opacity: .35; stroke: var(--r); stroke-width: 2.5; transition: fill-opacity .15s; }
.am-rain-core { fill: var(--r); stroke: var(--am-ink); stroke-width: 1.5; }
.am-rain-ring { fill: none; stroke: var(--r-moderate); stroke-width: 3; stroke-dasharray: 4 3; }
.am-rain-pin { outline: none; }
.am-rain-pin text { font: 700 22px var(--am-font-mono); fill: var(--am-text); paint-order: stroke; stroke: var(--am-bg-soft); stroke-width: 5px; }
.am-rain-pin.is-hl .am-rain-halo, .am-rain-pin:focus .am-rain-halo { fill-opacity: .7; stroke-width: 3.5; }
.am-rain-pin.is-hl .am-rain-ring, .am-rain-pin:focus .am-rain-ring { stroke-width: 5; }

.am-rain-st { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; }
.am-rain-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; color: var(--am-text-muted); white-space: nowrap; }
.am-rain-chip::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--r); border: 1px solid var(--am-ink); }
.am-rain-note { margin: 0; padding: .55rem .8rem; font-size: .75rem; color: var(--am-text-muted); border-top: 1px solid var(--am-border); }
.am-rain-empty { display: flex; gap: .8rem; align-items: flex-start; padding: 1.25rem 1.1rem; border-bottom: 1px solid var(--am-border); }
.am-rain-empty span { font-size: 1.8rem; line-height: 1; }
.am-rain-empty p { margin: 0; }
.am-rain-all summary { cursor: pointer; padding: .7rem .8rem; font: 600 .75rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .08em; background: var(--am-surface); }
.am-rain-all[open] summary { border-bottom: 2px solid var(--am-border-strong); }
.am-rain-all table { font-size: .85rem; }
.am-rain-all { max-height: none; }
.am-rain-all[open] tbody { display: block; max-height: 420px; overflow-y: auto; }
.am-rain-all[open] tr { display: table; width: 100%; table-layout: fixed; }
.am-rain-all td.num { width: 4.5rem; }
.am-rain-legend li::before { background: var(--r); }
@media (min-width: 901px) {
	.am-rain .am-wind-map, .am-rh .am-wind-map { position: sticky; top: calc(var(--am-header-h) + 1rem); }
}

/* ==================================================================
 * v3.4.0 — Relative Humidity (template-humidity.php). Reuses the Wind
 * Speed layout classes; adds a sequential "dry → saturated" ramp.
 * ================================================================== */
.am-rh {
	--h-dry: #e2b860; --h-comfortable: #a8d8bf; --h-slightly-humid: #6cbfbd; --h-humid: #3497b3; --h-very-humid: #1f6aa0; --h-saturated: #1c3c78;
	max-width: 1120px; margin: 0 auto;
}
:root[data-theme="dark"] .am-rh { --h-dry: #e8c27a; --h-comfortable: #9ad6b6; --h-slightly-humid: #6fd0cc; --h-humid: #4fb4d6; --h-very-humid: #5b9cf0; --h-saturated: #8aa4ff; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-rh { --h-dry: #e8c27a; --h-comfortable: #9ad6b6; --h-slightly-humid: #6fd0cc; --h-humid: #4fb4d6; --h-very-humid: #5b9cf0; --h-saturated: #8aa4ff; }
}
.am-rh-c-dry { --h: var(--h-dry); }
.am-rh-c-comfortable { --h: var(--h-comfortable); }
.am-rh-c-slightly-humid { --h: var(--h-slightly-humid); }
.am-rh-c-humid { --h: var(--h-humid); }
.am-rh-c-very-humid { --h: var(--h-very-humid); }
.am-rh-c-saturated { --h: var(--h-saturated); }

.am-rh-headline { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.25rem; padding: .9rem 1.1rem; border: 2px solid var(--am-border-strong); border-left: 10px solid var(--h); border-radius: var(--am-radius); background: var(--am-surface-raised); font-size: 1.05rem; }
.am-rh-headline strong { font-family: var(--am-font-display); font-size: 1.3rem; display: block; }
.am-rh-headline-num { font-family: var(--am-font); font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.2rem); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; flex: none; }
.am-rh-headline-num small { font-size: .45em; font-weight: 700; color: var(--am-text-muted); margin-left: .1em; }

.am-rh-pin { outline: none; }
.am-rh-pin circle { fill: var(--h); stroke: var(--am-ink); stroke-width: 2; transition: r .15s; }
.am-rh-pin text { font: 700 22px var(--am-font-mono); fill: var(--am-text); paint-order: stroke; stroke: var(--am-bg-soft); stroke-width: 5px; }
.am-rh-pin.is-hl circle, .am-rh-pin:focus circle { stroke-width: 4; r: 14; }

.am-rh-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; white-space: nowrap; }
.am-rh-chip::before { content: ""; width: .65rem; height: .65rem; border-radius: 50%; background: var(--h); border: 1px solid var(--am-ink); flex: none; }
.am-rh-legend li::before { background: var(--h); }

.am-rh-trend { margin-top: 2.25rem; }
.am-rh-trend h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.am-rh-trend-empty { padding: 1rem 1.1rem; border: 2px dashed var(--am-border); border-radius: var(--am-radius); color: var(--am-text-muted); margin: 0; }
.am-rh-chart { margin: 0; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); overflow: hidden; }
.am-rh-chart svg { display: block; width: 100%; height: auto; }
.am-rh-chart figcaption { font-size: .78rem; color: var(--am-text-muted); padding: .6rem .9rem; border-top: 1px solid var(--am-border); background: var(--am-surface); }
.am-rh-grid { stroke: var(--am-border); stroke-width: 1; }
.am-rh-axis { font: 600 17px var(--am-font-mono); fill: var(--am-text-muted); }
.am-rh-band { fill: var(--h-humid); fill-opacity: .16; stroke: none; }
.am-rh-line { fill: none; stroke: var(--h-very-humid); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.am-rh-now { fill: var(--h-very-humid); stroke: var(--am-surface-raised); stroke-width: 3; }
@media (max-width: 600px) {
	.am-rh-axis { font-size: 30px; }
	.am-rh-line { stroke-width: 6; }
	.am-rh-headline { flex-direction: column; align-items: flex-start; gap: .4rem; }
}

/* ==================================================================
 * v3.5.0 — Private Residential Transactions (template-private-property.php).
 * ================================================================== */
.am-rp { max-width: 1160px; margin: 0 auto; --rp-new: #2a4fd6; --rp-sub: #b7791f; --rp-resale: #2f8f5b; }
:root[data-theme="dark"] .am-rp { --rp-new: #8aa4ff; --rp-sub: #f2c94c; --rp-resale: #5cc28a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .am-rp { --rp-new: #8aa4ff; --rp-sub: #f2c94c; --rp-resale: #5cc28a; } }

.am-rp-form { display: grid; grid-template-columns: 2fr repeat(4, minmax(0, 1fr)) auto; gap: .75rem; align-items: end; padding: 1rem 1.1rem; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); box-shadow: var(--am-shadow-md); margin-bottom: 1.75rem; }
.am-rp-form .am-field { margin: 0; min-width: 0; }
.am-rp-form select, .am-rp-form input { width: 100%; }
.am-rp-actions { display: flex; gap: .5rem; }
.am-rp-h2, .am-rp-trend h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; }
.am-rp .am-wind-status { flex-wrap: nowrap; align-items: flex-start; }
.am-rp .am-wind-status .am-wind-dot { flex: none; margin-top: .3em; }
.am-rp-remaining { font-size: .85rem; color: var(--am-text-muted); margin: 0 0 .75rem; }
.am-rp-stats .am-wind-stat-num { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.am-rp-filters { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.am-rp-filters span { font: 600 .75rem var(--am-font-mono); padding: .15rem .45rem; border: 1.5px solid var(--am-border-strong); border-radius: var(--am-radius-sm); background: var(--am-bg-soft); }

.am-rp-table-wrap { overflow-x: auto; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); }
.am-rp-table { min-width: 860px; }
.am-rp-table td { vertical-align: top; }
.am-rp-sub { display: block; font-size: .76rem; color: var(--am-text-muted); font-weight: 400; }
.am-rp-nowrap { white-space: nowrap; }
.am-rp-sale { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; white-space: nowrap; }
.am-rp-sale::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; border: 1px solid var(--am-ink); background: var(--am-border); }
.am-rp-sale-1::before { background: var(--rp-new); }
.am-rp-sale-2::before { background: var(--rp-sub); }
.am-rp-sale-3::before { background: var(--rp-resale); }

.am-rp-bar rect { fill: var(--am-primary); stroke: var(--am-ink); stroke-width: 1; }
.am-rp-bar.is-thin rect { fill-opacity: .35; }
.am-rp-bar-empty { fill: none; stroke: var(--am-border); stroke-width: 1.5; stroke-dasharray: 4 3; }
.am-rp-bar:hover rect { fill: var(--am-primary-dark); }

.am-rp-pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 1.25rem 0; font: 600 .85rem var(--am-font-mono); }

.am-rp-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.75rem; }
.am-rp-top { list-style: none; margin: 0; padding: 0; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); counter-reset: am-rp; }
.am-rp-top li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .9rem .6rem 2.6rem; border-bottom: 1px solid var(--am-border); position: relative; counter-increment: am-rp; }
.am-rp-top li:last-child { border-bottom: 0; }
.am-rp-top li::before { content: counter(am-rp, decimal-leading-zero); position: absolute; left: .8rem; top: .65rem; font: 700 .8rem var(--am-font-mono); color: var(--am-text-muted); }
.am-rp-top a { color: inherit; text-decoration: none; min-width: 0; }
.am-rp-top a:hover strong { text-decoration: underline; text-decoration-color: var(--am-primary); text-underline-offset: 3px; }
.am-rp-top-n { text-align: right; font: 700 .85rem var(--am-font-mono); white-space: nowrap; }
.am-rp-districts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .9rem; font-size: .85rem; }
.am-rp-districts a { color: inherit; text-decoration: none; display: block; padding: .3rem 0; border-bottom: 1px dotted var(--am-border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-rp-districts a strong { font-family: var(--am-font-mono); margin-right: .3rem; color: var(--am-primary-dark); }
.am-rp-districts a:hover { color: var(--am-primary-dark); }

@media (max-width: 980px) {
	.am-rp-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.am-rp-q, .am-rp-actions { grid-column: 1 / -1; }
	.am-rp-two { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.am-rp-form { grid-template-columns: 1fr; }
	.am-rp-districts { grid-template-columns: 1fr; }
}

/* ==================================================================
 * v3.6.0 — Planning Decisions & Approved Use (template-planning-decisions.php).
 * Reuses .am-rp-form / .am-rp-actions / .am-rp-pager / .am-wind-stats.
 * ================================================================== */
.am-pd { max-width: 1160px; margin: 0 auto; --pd-yes: #1f8a4c; --pd-no: #c0392b; --pd-other: #7a6f5f; }
:root[data-theme="dark"] .am-pd { --pd-yes: #5cc28a; --pd-no: #ff7a6a; --pd-other: #b5aa98; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .am-pd { --pd-yes: #5cc28a; --pd-no: #ff7a6a; --pd-other: #b5aa98; } }

.am-pd-jump { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.5rem; }
.am-pd-jump a { font: 600 .8rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .06em; padding: .45rem .8rem; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius-sm); color: var(--am-text); text-decoration: none; background: var(--am-surface-raised); }
.am-pd-jump a:hover { background: var(--am-text); color: var(--am-bg); }

.am-pd-section { margin-bottom: 3rem; scroll-margin-top: calc(var(--am-header-h) + 1rem); }
.am-pd-section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem 1.5rem; border-bottom: 3px double var(--am-rule); padding-bottom: .6rem; margin-bottom: 1rem; }
.am-pd-section-head h2 { margin: 0; font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.am-pd-intro { max-width: 70ch; color: var(--am-text-muted); margin: 0 0 1rem; }
.am-pd-small { font-size: .82rem; color: var(--am-text-muted); }

.am-aru-form { grid-template-columns: minmax(0, .8fr) minmax(0, 2fr) minmax(0, .8fr) minmax(0, .8fr) auto; }
.am-aru-result { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.25rem; border: 2px solid var(--am-border-strong); border-left-width: 10px; border-radius: var(--am-radius); background: var(--am-surface-raised); margin-bottom: .75rem; }
.am-aru-result.is-yes { border-left-color: var(--pd-yes); }
.am-aru-result.is-na { border-left-color: var(--am-gold); }
.am-aru-result strong { font-family: var(--am-font-display); font-size: 1.2rem; display: block; margin-bottom: .2rem; }
.am-aru-result p { margin: 0; color: var(--am-text-muted); max-width: 72ch; }
.am-aru-icon { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; border: 2px solid var(--am-ink); }
.is-yes .am-aru-icon { background: var(--pd-yes); color: #fff; }
.is-na .am-aru-icon { background: var(--am-gold); color: var(--am-ink); }
.am-pd-notes { margin-top: 1rem; font-size: .9rem; }
.am-pd-notes summary { cursor: pointer; font-weight: 600; }
.am-pd-notes ul { margin: .5rem 0 0 1.2rem; color: var(--am-text-muted); }

.am-pd-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0 0 1rem; }
.am-pd-list { list-style: none; margin: 0; padding: 0; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); }
.am-pd-item { padding: .9rem 1.1rem; border-bottom: 1px solid var(--am-border); }
.am-pd-item:last-child { border-bottom: 0; }
.am-pd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; margin-bottom: .35rem; }
.am-pd-date { font: 700 .8rem var(--am-font-mono); }
.am-pd-badge { display: inline-flex; align-items: center; gap: .35rem; font: 600 .74rem var(--am-font-mono); padding: .15rem .5rem; border-radius: var(--am-radius-sm); border: 1.5px solid currentColor; }
.am-pd-badge::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.am-pd-yes { color: var(--pd-yes); }
.am-pd-no { color: var(--pd-no); }
.am-pd-other { color: var(--pd-other); }
.am-pd-appl { font-size: .8rem; color: var(--am-text-muted); }
.am-pd-addr { font-family: var(--am-font); font-size: 1rem; font-weight: 700; margin: 0 0 .25rem; }
.am-pd-desc { margin: 0 0 .3rem; font-size: .92rem; }
.am-pd-ref { margin: 0; font: 500 .75rem var(--am-font-mono); color: var(--am-text-muted); word-break: break-word; }

@media (max-width: 980px) {
	.am-aru-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.am-aru-street, .am-aru-form .am-rp-actions { grid-column: 1 / -1; }
}
@media (max-width: 480px) { .am-aru-form { grid-template-columns: 1fr; } }

/* ==================================================================
 * v3.8.0 — 24-hour Weather Forecast (template-forecast.php). Reuses
 * .am-wind-bar / .am-wind-status / .am-wind-land / .am-wind-table.
 * ================================================================== */
.am-fc {
	--fc-sun: #f2b705; --fc-ray: #e89a00; --fc-moon: #8a7cc9; --fc-cloud: #ffffff; --fc-cloud-dark: #c9ccd3; --fc-cloud-line: #4a4f5c;
	--fc-rain: #2a6fdb; --fc-bolt: #f2b705; --fc-line: #8a8f99;
	--fc-sunny: #f7d774; --fc-clear-night: #b8aee8; --fc-cloudy: #c9ccd3; --fc-hazy: #e6c79a; --fc-wet: #8fb8f2; --fc-storm: #a98be0;
	max-width: 1160px; margin: 0 auto;
}
:root[data-theme="dark"] .am-fc { --fc-cloud: #e9ecf2; --fc-cloud-dark: #9aa1ae; --fc-cloud-line: #1d2027; --fc-rain: #6aa2ff; --fc-line: #9aa1ae; --fc-sunny: #8a6d16; --fc-clear-night: #4b4380; --fc-cloudy: #4a4f5c; --fc-hazy: #7a5d33; --fc-wet: #2b4f86; --fc-storm: #523a86; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-fc { --fc-cloud: #e9ecf2; --fc-cloud-dark: #9aa1ae; --fc-cloud-line: #1d2027; --fc-rain: #6aa2ff; --fc-line: #9aa1ae; --fc-sunny: #8a6d16; --fc-clear-night: #4b4380; --fc-cloudy: #4a4f5c; --fc-hazy: #7a5d33; --fc-wet: #2b4f86; --fc-storm: #523a86; }
}
.am-fc-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.am-fc-tone-sunny { --t: var(--fc-sunny); }
.am-fc-tone-clear-night { --t: var(--fc-clear-night); }
.am-fc-tone-cloudy { --t: var(--fc-cloudy); }
.am-fc-tone-hazy { --t: var(--fc-hazy); }
.am-fc-tone-wet { --t: var(--fc-wet); }
.am-fc-tone-storm { --t: var(--fc-storm); }

/* Icon parts (inside <symbol>s; colours inherit from .am-fc). */
.am-fc-icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.15em; overflow: visible; }
.am-fc-sun { fill: var(--fc-sun); stroke: var(--fc-ray); stroke-width: 1.5; }
.am-fc-sun-dim { fill-opacity: .55; }
.am-fc-ray path { stroke: var(--fc-ray); stroke-width: 3; stroke-linecap: round; fill: none; }
.am-fc-moon { fill: var(--fc-moon); stroke: var(--fc-cloud-line); stroke-width: 1.2; }
.am-fc-star { fill: var(--fc-moon); }
.am-fc-cloud { fill: var(--fc-cloud); stroke: var(--fc-cloud-line); stroke-width: 1.8; stroke-linejoin: round; }
.am-fc-cloud-dark { fill: var(--fc-cloud-dark); }
.am-fc-drop { stroke: var(--fc-rain); stroke-width: 3; stroke-linecap: round; fill: none; }
.am-fc-bolt { fill: var(--fc-bolt); stroke: var(--fc-cloud-line); stroke-width: 1.2; stroke-linejoin: round; }
.am-fc-line { stroke: var(--fc-line); stroke-width: 3; stroke-linecap: round; fill: none; }
.am-fc-line-strong { stroke: var(--am-text); }
.am-fc-arrow { fill: var(--am-text); }

/* Headline card */
.am-fc-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); box-shadow: var(--am-shadow-md); overflow: hidden; margin-bottom: 2rem; }
.am-fc-hero-main { display: flex; align-items: center; gap: 1.25rem; padding: 1.4rem 1.5rem; background: linear-gradient(135deg, color-mix(in srgb, var(--t) 45%, transparent), transparent 75%); border-right: 1px solid var(--am-border); }
.am-fc-hero-icon { font-size: clamp(4.5rem, 9vw, 6.5rem); flex: none; }
.am-fc-kicker { font: 600 .7rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--am-text-muted); }
.am-fc-hero h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: .15rem 0 .4rem; line-height: 1.05; }
.am-fc-takeaway { margin: 0; font-size: 1rem; }
.am-fc-facts { display: grid; grid-template-rows: repeat(3, auto); margin: 0; }
.am-fc-fact { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; gap: .15rem 1rem; padding: .85rem 1.25rem; }
.am-fc-fact + .am-fc-fact { border-top: 1px solid var(--am-border); }
.am-fc-fact dt { font: 600 .7rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--am-text-muted); grid-row: span 2; }
.am-fc-fact dd { margin: 0; display: flex; align-items: baseline; gap: .3rem; }
.am-fc-num { font-family: var(--am-font); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 1.95rem); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.am-fc-unit { font: 600 .85rem var(--am-font-mono); color: var(--am-text-muted); }
.am-fc-sub { font-size: .8rem; color: var(--am-text-muted); }
.am-fc-range { position: relative; display: block; height: .45rem; border-radius: 99px; background: var(--am-bg-soft); border: 1px solid var(--am-border); }
.am-fc-range span { position: absolute; top: -1px; bottom: -1px; border-radius: 99px; border: 1px solid var(--am-ink); }
.am-fc-range-temp span { background: linear-gradient(90deg, #f2c94c, #ff6b3d); }
.am-fc-range-rh span { background: linear-gradient(90deg, #6cbfbd, #1f6aa0); }
.am-fc-windarrow { display: inline-flex; font-size: 1.5rem; align-self: center; transition: transform .3s; }

/* Region by region */
.am-fc-h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.am-fc-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2.25rem; align-items: start; }
.am-fc-period { border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); overflow: hidden; display: flex; flex-direction: column; }
.am-fc-period.is-now { box-shadow: 0 0 0 3px var(--am-primary); }
.am-fc-period.is-past { opacity: .6; }
.am-fc-period header { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .6rem; padding: .75rem .95rem .6rem; border-bottom: 1px solid var(--am-border); }
.am-fc-period h3 { font-size: 1.1rem; margin: 0; }
.am-fc-period-hours { font: 600 .75rem var(--am-font-mono); color: var(--am-text-muted); }
.am-fc-badge { margin-left: auto; font: 700 .65rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .08em; padding: .15rem .45rem; border-radius: var(--am-radius-sm); background: var(--am-primary); color: #fff; }
.am-fc-map { display: block; width: 100%; height: auto; background: var(--am-bg-soft); }
.am-fc-land { stroke-width: 3; }
.am-fc-pin circle { fill: var(--t); fill-opacity: .55; stroke: var(--am-border-strong); stroke-width: 2.5; }
.am-fc-pin text { font: 700 27px var(--am-font-mono); fill: var(--am-text); paint-order: stroke; stroke: var(--am-bg-soft); stroke-width: 7px; text-transform: uppercase; letter-spacing: .04em; }
.am-fc-period-sum { margin: 0; padding: .7rem .95rem; font-size: .92rem; border-top: 1px solid var(--am-border); margin-top: auto; }
.am-fc-period-list { list-style: none; margin: 0; margin-top: auto; padding: .45rem .95rem .6rem; border-top: 1px solid var(--am-border); font-size: .88rem; }
.am-fc-period-list li { display: flex; align-items: center; gap: .45rem; padding: .18rem 0; }
.am-fc-region { font: 700 .72rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .06em; min-width: 4.4rem; color: var(--am-text-muted); }
.am-fc-mini { font-size: 1.35rem; flex: none; }
.am-fc-cell { display: inline-flex; align-items: center; gap: .4rem; }
.am-fc-table th[scope="row"] { font: 700 .75rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--am-text); background: transparent; border-bottom: 1px solid var(--am-border); }
.am-fc-table thead th { text-transform: none; letter-spacing: 0; font-size: .82rem; color: var(--am-text); }
.am-fc-table thead th .am-rp-sub { font-weight: 400; }
.am-fc-table { min-width: 620px; }

@media (max-width: 980px) {
	.am-fc-hero { grid-template-columns: 1fr; }
	.am-fc-hero-main { border-right: 0; border-bottom: 1px solid var(--am-border); }
	.am-fc-periods { grid-template-columns: 1fr; }
	.am-fc-period { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.am-fc-period header { grid-column: 1 / -1; }
	.am-fc-period-sum, .am-fc-period-list { border-top: 0; border-left: 1px solid var(--am-border); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
}
@media (max-width: 600px) {
	.am-fc-hero-main { flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1.1rem; }
	.am-fc-hero-icon { font-size: 4rem; }
	.am-fc-fact { grid-template-columns: 6.2rem 1fr; padding: .75rem 1rem; }
	.am-fc-period { display: flex; }
	.am-fc-period-sum, .am-fc-period-list { border-left: 0; border-top: 1px solid var(--am-border); }
	.am-fc-pin text { font-size: 38px; }
}

/* ==================================================================
 * v3.9.0 — Air Temperature (template-air-temperature.php). Reuses the
 * Relative Humidity layout (.am-rh-*), which reads its colour from --h;
 * the .am-at-c-* bands set --h to a cool → scorching ramp.
 * ================================================================== */
.am-at { --t-cool: #4f8fd6; --t-mild: #5fbfae; --t-warm: #f2c94c; --t-hot: #f28a3d; --t-very-hot: #e0482f; --t-scorching: #9b1f3a; }
:root[data-theme="dark"] .am-at { --t-cool: #7fb2f0; --t-mild: #7fd6c5; --t-warm: #f5d76e; --t-hot: #ffa060; --t-very-hot: #ff6b55; --t-scorching: #e05a7a; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .am-at { --t-cool: #7fb2f0; --t-mild: #7fd6c5; --t-warm: #f5d76e; --t-hot: #ffa060; --t-very-hot: #ff6b55; --t-scorching: #e05a7a; }
}
.am-at-c-cool { --h: var(--t-cool); }
.am-at-c-mild { --h: var(--t-mild); }
.am-at-c-warm { --h: var(--t-warm); }
.am-at-c-hot { --h: var(--t-hot); }
.am-at-c-very-hot { --h: var(--t-very-hot); }
.am-at-c-scorching { --h: var(--t-scorching); }
.am-at .am-rh-band { fill: var(--t-hot); fill-opacity: .16; }
.am-at .am-rh-line { stroke: var(--t-very-hot); }
.am-at .am-rh-now { fill: var(--t-very-hot); }
.am-at-feels { color: var(--am-text-muted); }
.am-at-extremes { margin: -.25rem 0 .75rem; font: 600 .8rem var(--am-font-mono); color: var(--am-text-muted); }
.am-at-extremes strong { color: var(--am-text); }
.am-at-risk { display: inline-flex; align-items: center; gap: .35rem; }
.am-at-risk::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; border: 1px solid var(--am-ink); background: var(--t-mild); flex: none; }
.am-at-risk-caution::before { background: var(--t-warm); }
.am-at-risk-extreme-caution::before { background: var(--t-hot); }
.am-at-risk-danger::before { background: var(--t-very-hot); }
.am-at-risk-extreme-danger::before { background: var(--t-scorching); }

/* ==================================================================
 * v3.10.0 — Wind Direction (template-wind-direction.php). Reuses the
 * Wind Speed layout (.am-wind-*).
 * ================================================================== */
.am-wd { --wd-arrow: #2a4fd6; --wd-petal: #6c8ef0; --wd-top: #ff5a1f; max-width: 1160px; margin: 0 auto; }
:root[data-theme="dark"] .am-wd { --wd-arrow: #8aa4ff; --wd-petal: #5b74c9; --wd-top: #ff8a5c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .am-wd { --wd-arrow: #8aa4ff; --wd-petal: #5b74c9; --wd-top: #ff8a5c; } }
.am-wd-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); box-shadow: var(--am-shadow-md); overflow: hidden; margin-bottom: 1.5rem; }
.am-wd-now { display: flex; align-items: center; gap: 1.4rem; padding: 1.3rem 1.5rem; border-right: 1px solid var(--am-border); }
.am-wd-now h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: .15rem 0 .4rem; line-height: 1.05; }
.am-wd-now p { margin: 0 0 .35rem; }
.am-wd-agree { font: 600 .8rem var(--am-font-mono); color: var(--am-text-muted); }
.am-wd-dial { width: clamp(8rem, 16vw, 11rem); height: auto; flex: none; }
.am-wd-ring { fill: var(--am-bg-soft); stroke: var(--am-border-strong); stroke-width: 3; }
.am-wd-tick { stroke: var(--am-border-strong); stroke-width: 2; }
.am-wd-tick.is-major { stroke-width: 4; }
.am-wd-cardinal { font: 700 20px var(--am-font-mono); fill: var(--am-text-muted); }
.am-wd-needle path { fill: var(--wd-arrow); stroke: var(--am-ink); stroke-width: 2; stroke-linejoin: round; }
.am-wd-needle circle { fill: var(--am-surface-raised); stroke: var(--wd-arrow); stroke-width: 4; }
.am-wd-variable circle { fill: none; stroke: var(--wd-arrow); stroke-width: 4; stroke-dasharray: 8 6; }
.am-wd-variable text { font: 700 20px var(--am-font-mono); fill: var(--wd-arrow); }
.am-wd-rose { margin: 0; padding: .8rem 1rem .4rem; display: flex; flex-direction: column; align-items: center; }
.am-wd-rose svg { width: 100%; max-width: 15rem; height: auto; }
.am-wd-rose figcaption { font-size: .75rem; color: var(--am-text-muted); text-align: center; }
.am-wd-rose-grid { fill: none; stroke: var(--am-border); stroke-width: 1.5; stroke-dasharray: 3 4; }
.am-wd-petal { fill: var(--wd-petal); fill-opacity: .8; stroke: var(--am-ink); stroke-width: 1.5; }
.am-wd-petal.is-top { fill: var(--wd-top); fill-opacity: 1; }
.am-wd-rose-label { font: 700 14px var(--am-font-mono); fill: var(--am-text-muted); }
.am-wd-season { font-size: clamp(1.15rem, 2vw, 1.5rem); }
.am-wd-pin { outline: none; cursor: default; }
.am-wd-pin circle { fill: var(--am-surface-raised); stroke: var(--am-ink); stroke-width: 2; }
.am-wd-pin line { stroke: var(--wd-arrow); stroke-width: 5; stroke-linecap: round; }
.am-wd-pin path { fill: var(--wd-arrow); stroke: var(--am-ink); stroke-width: 1.5; stroke-linejoin: round; }
.am-wd-pin.is-hl line, .am-wd-pin:focus line { stroke: var(--wd-top); stroke-width: 7; }
.am-wd-pin.is-hl path, .am-wd-pin:focus path { fill: var(--wd-top); }
.am-wd-from { white-space: nowrap; }
.am-wd-mini { display: inline-block; width: 1.1em; text-align: center; color: var(--wd-arrow); font-weight: 800; }
.am-wd-deg { font: 600 .78rem var(--am-font-mono); color: var(--am-text-muted); }
.am-wd-table tr.is-hl td { background: var(--am-bg-soft); }
.am-wd-season-note { margin: 1.5rem 0 0; padding: .8rem 1rem; border-left: 4px solid var(--wd-arrow); background: var(--am-surface-raised); border-radius: var(--am-radius-sm); font-size: .92rem; }
@media (max-width: 900px) {
	.am-wd-hero { grid-template-columns: 1fr; }
	.am-wd-now { border-right: 0; border-bottom: 1px solid var(--am-border); }
}
@media (max-width: 520px) {
	.am-wd-now { flex-direction: column; align-items: flex-start; }
}

/* ==================================================================
 * v3.10.0 — 2-hour Weather Forecast (template-two-hour-forecast.php).
 * Reuses the 24-hour forecast icons/tones (.am-fc) and the Wind Speed
 * map + list layout.
 * ================================================================== */
.am-nc-groups { list-style: none; margin: 0; padding: .9rem 1.2rem; display: flex; flex-direction: column; justify-content: center; gap: .45rem; }
.am-nc-groups li { display: flex; align-items: center; gap: .55rem; font-size: .92rem; }
.am-nc-group-name { flex: 1; min-width: 0; }
.am-nc-group-n { font: 700 .75rem var(--am-font-mono); color: var(--am-text-muted); white-space: nowrap; }
.am-nc-finder { margin: 0 0 1.5rem; }
.am-nc-finder-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.am-nc-q { flex: 1 1 16rem; min-width: 0; font-size: 1rem; padding: .6rem .8rem; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius-sm); background: var(--am-surface-raised); color: var(--am-text); }
.am-nc-result { margin: .75rem 0 0; padding: .7rem .95rem; border: 2px solid var(--am-border-strong); border-left: 8px solid var(--fc-cloudy); border-radius: var(--am-radius-sm); background: var(--am-surface-raised); font-size: 1rem; }
.am-nc-result.is-wet { border-left-color: var(--fc-rain); }
.am-nc-pin { outline: none; cursor: default; }
.am-nc-pin circle { fill: var(--t); fill-opacity: .55; stroke: var(--am-border-strong); stroke-width: 1.5; }
.am-nc-pin.is-wet circle { stroke: var(--fc-rain); stroke-width: 4; fill-opacity: .8; }
.am-nc-pin.is-hl circle, .am-nc-pin:focus circle, .am-nc-pin.is-picked circle { stroke: var(--am-primary); stroke-width: 5; fill-opacity: .95; }
.am-nc-list { max-height: 640px; overflow-y: auto; }
.am-nc-table td { padding-top: .4rem; padding-bottom: .4rem; }
.am-nc-table tr.is-hl td, .am-nc-table tr.is-picked td { background: var(--am-bg-soft); }
.am-nc-table tr.is-picked td:first-child { box-shadow: inset 4px 0 0 var(--am-primary); font-weight: 700; }
.am-nc-table thead th { position: sticky; top: 0; z-index: 1; }
@media (max-width: 900px) { .am-nc-list { max-height: none; } }

/* ==================================================================
 * v3.11.0 — 4-day Weather Forecast (template-four-day-forecast.php).
 * Reuses the forecast icons/tones (.am-fc).
 * ================================================================== */
.am-ol-takeaway { margin: 0 0 1.25rem; padding: .9rem 1.1rem; border: 2px solid var(--am-border-strong); border-left: 10px solid var(--fc-wet); border-radius: var(--am-radius); background: var(--am-surface-raised); font-size: 1.05rem; }
.am-ol-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.am-ol-day { display: flex; flex-direction: column; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); box-shadow: var(--am-shadow-md); overflow: hidden; }
.am-ol-day header { padding: .8rem 1rem .5rem; background: linear-gradient(180deg, color-mix(in srgb, var(--t) 40%, transparent), transparent); }
.am-ol-day h2 { font-size: 1.25rem; margin: 0; }
.am-ol-date { font: 600 .75rem var(--am-font-mono); color: var(--am-text-muted); }
.am-ol-icon { font-size: 4.5rem; margin: .3rem auto .2rem; display: block; }
.am-ol-text { margin: 0 1rem .8rem; text-align: center; min-height: 2.8em; }
.am-ol-text strong { display: block; font-size: 1rem; }
.am-ol-text span { display: block; font-size: .85rem; color: var(--am-text-muted); }
.am-ol-facts { margin: auto 0 0; border-top: 1px solid var(--am-border); }
.am-ol-facts div { display: grid; grid-template-columns: 4.6rem 1fr; align-items: center; gap: .5rem; padding: .5rem 1rem; }
.am-ol-facts div + div { border-top: 1px solid var(--am-border); }
.am-ol-facts dt { font: 600 .68rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--am-text-muted); }
.am-ol-facts dd { margin: 0; display: flex; align-items: center; gap: .4rem; font-size: .9rem; font-variant-numeric: tabular-nums; }
.am-ol-range { flex: 1; min-width: 2rem; }
.am-ol-lo, .am-ol-hi { font: 700 .9rem var(--am-font-mono); }
.am-ol-arrow { font-size: 1.05rem; }
@media (max-width: 980px) { .am-ol-days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .am-ol-days { grid-template-columns: 1fr; } .am-ol-icon { font-size: 3.6rem; } }

/* ==================================================================
 * v3.11.0 — Weather Radar (template-weather-radar.php).
 * ================================================================== */
.am-rd { max-width: 860px; margin: 0 auto; --rd-sea: #dfe9ef; --rd-land: #f4efe2; --rd-line: #6b6458; }
:root[data-theme="dark"] .am-rd { --rd-sea: #121a22; --rd-land: #2a2620; --rd-line: #8a826f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .am-rd { --rd-sea: #121a22; --rd-land: #2a2620; --rd-line: #8a826f; } }
.am-rd-verdict { margin: 0 0 1.1rem; padding: .85rem 1.1rem; border: 2px solid var(--am-border-strong); border-left: 10px solid #5fbfae; border-radius: var(--am-radius); background: var(--am-surface-raised); font-size: 1.02rem; }
.am-rd-verdict.is-wet { border-left-color: #2a6fdb; }
.am-rd-verdict strong { display: block; font-family: var(--am-font-display); font-size: 1.3rem; }
.am-rd-ranges { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .9rem; }
.am-rd-ranges a { font: 600 .78rem var(--am-font-mono); text-transform: uppercase; letter-spacing: .05em; padding: .45rem .8rem; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius-sm); color: var(--am-text); text-decoration: none; background: var(--am-surface-raised); }
.am-rd-ranges a.is-active, .am-rd-ranges a:hover { background: var(--am-text); color: var(--am-bg); }
.am-rd-viewer { margin: 0; border: 2px solid var(--am-border-strong); border-radius: var(--am-radius); background: var(--am-surface-raised); overflow: hidden; box-shadow: var(--am-shadow-md); }
.am-rd-stage { position: relative; aspect-ratio: 1 / 1; background: var(--rd-sea); }
.am-rd-stage > svg, .am-rd-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.am-rd-img { image-rendering: auto; }
.am-rd-sea { fill: var(--rd-sea); }
.am-rd-land { fill: var(--rd-land); stroke: var(--rd-line); stroke-width: .8; stroke-linejoin: round; }
.am-rd-sg { stroke-width: 1.2; }
.am-rd-ring { fill: none; stroke: var(--rd-line); stroke-width: .7; stroke-dasharray: 3 3; opacity: .7; }
.am-rd-ring-label { font: 600 8px var(--am-font-mono); fill: var(--rd-line); }
.am-rd-site { fill: var(--am-primary); stroke: #fff; stroke-width: 1; }
.am-rd-place { fill: var(--am-text); }
.am-rd-place-label { font: 600 9px var(--am-font); fill: var(--am-text); paint-order: stroke; stroke: var(--rd-sea); stroke-width: 2.5px; }
.am-rd-place-label.is-sg { font-weight: 800; font-size: 10px; }
.am-rd-time { position: absolute; left: .6rem; top: .6rem; font: 700 .85rem var(--am-font-mono); padding: .25rem .55rem; border-radius: var(--am-radius-sm); background: var(--am-text); color: var(--am-bg); }
.am-rd-controls { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-top: 1px solid var(--am-border); }
.am-rd-slider { flex: 1; accent-color: var(--am-primary); }
.am-rd-count { font: 600 .75rem var(--am-font-mono); color: var(--am-text-muted); white-space: nowrap; }
.am-rd-viewer figcaption { font-size: .78rem; color: var(--am-text-muted); padding: .6rem .9rem; border-top: 1px solid var(--am-border); background: var(--am-surface); }
.am-rd-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; padding: 0; margin: 1rem 0 0; font-size: .82rem; color: var(--am-text-muted); }
.am-rd-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.am-rd-legend span { width: 1.4rem; height: .7rem; border-radius: 2px; border: 1px solid var(--am-ink); }
