/* ==========================================================================
   Meridian Weather — design system
   ========================================================================== */

:root {
	--brand: #2f6bff;
	--accent: var(--brand);
	--accent-ink: #1d4fd1;
	--bg: #eef3f9;
	--bg-2: #e3ebf5;
	--surface: rgba(255, 255, 255, .78);
	--surface-solid: #fff;
	--surface-2: rgba(255, 255, 255, .55);
	--border: rgba(15, 27, 45, .08);
	--border-strong: rgba(15, 27, 45, .16);
	--text: #0f1b2d;
	--muted: #4f5f77;
	--faint: #637287;
	--btn-bg: var(--accent-ink);
	--btn-fg: #fff;
	--shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 8px 24px -8px rgba(15, 27, 45, .12);
	--shadow-lg: 0 2px 6px rgba(15, 27, 45, .06), 0 24px 60px -20px rgba(15, 27, 45, .28);
	--radius: 20px;
	--radius-sm: 12px;
	--gap: clamp(14px, 2vw, 22px);
	--hero-bg: linear-gradient(160deg, #dfeaff 0%, #c9dcff 45%, #eef3f9 100%);
	--hero-fg: #0f1b2d;
	--hero-muted: #3e4f69;
	--card-hero: rgba(255, 255, 255, .62);
	--wi-cloud: #eef3f9;
	--wi-cloud2: #9fb0c6;
	--header-h: 68px;
	--font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--ease: cubic-bezier(.2, .7, .2, 1);
	color-scheme: light;
}

[data-theme="dark"] {
	--accent-ink: #8fb0ff;
	--bg: #070d1a;
	--bg-2: #0b1426;
	--surface: rgba(18, 29, 50, .74);
	--surface-solid: #111c31;
	--surface-2: rgba(255, 255, 255, .04);
	--border: rgba(255, 255, 255, .08);
	--border-strong: rgba(255, 255, 255, .16);
	--text: #e9eff9;
	--muted: #a6b4c9;
	--faint: #8a98ad;
	--btn-bg: var(--accent);
	--btn-fg: #07101f;
	--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -10px rgba(0, 0, 0, .5);
	--shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 70px -25px rgba(0, 0, 0, .7);
	--hero-bg: linear-gradient(160deg, #0d1c3d 0%, #0a1530 55%, #070d1a 100%);
	--hero-fg: #eef3fb;
	--hero-muted: #b5c3d9;
	--card-hero: rgba(16, 28, 52, .55);
	--wi-cloud: #c9d5e6;
	--wi-cloud2: #7d8ea8;
	color-scheme: dark;
}

/* Weather-adaptive palettes ------------------------------------------------ */
.wx-g-sunny { --accent: #f59e0b; --accent-ink: #a75f00; --hero-bg: linear-gradient(155deg, #fff3d1 0%, #ffe2a8 30%, #cfe4ff 78%, #eef3f9 100%); }
.wx-g-cloudy { --accent: #6b7f99; --accent-ink: #44566f; --hero-bg: linear-gradient(160deg, #e9eef5 0%, #d3dce8 50%, #eef3f9 100%); }
.wx-g-rain { --accent: #2f6bff; --accent-ink: #1d4fd1; --hero-bg: linear-gradient(160deg, #d9e5f5 0%, #b9c9e0 45%, #e3ebf5 100%); }
.wx-g-storm { --accent: #7c5cff; --accent-ink: #5b3fe0; --hero-bg: linear-gradient(160deg, #d7d4ea 0%, #a9afc6 50%, #e3e8f2 100%); }
.wx-g-snow { --accent: #0ea5e9; --accent-ink: #0369a1; --hero-bg: linear-gradient(160deg, #f6fbff 0%, #dff0ff 50%, #eef6ff 100%); }
.wx-g-fog { --accent: #8a8178; --accent-ink: #5f5850; --hero-bg: linear-gradient(160deg, #f1f0ec 0%, #dedad3 55%, #eef1f4 100%); }
.wx-g-night { --accent: #8b9cff; --accent-ink: #4954c9; --hero-bg: linear-gradient(160deg, #0b1838 0%, #17275a 50%, #0b1430 100%); --hero-fg: #eef3fb; --hero-muted: #b9c6e4; --card-hero: rgba(20, 34, 72, .55); }

[data-theme="dark"] .wx-g-sunny { --accent: #fbbf24; --accent-ink: #fcd34d; --hero-bg: linear-gradient(160deg, #2a1e08 0%, #1b2440 55%, #070d1a 100%); }
[data-theme="dark"] .wx-g-cloudy { --accent: #94a6c0; --accent-ink: #c3d0e2; --hero-bg: linear-gradient(160deg, #1a2333 0%, #111a2b 55%, #070d1a 100%); }
[data-theme="dark"] .wx-g-rain { --accent: #5b8cff; --accent-ink: #9db8ff; --hero-bg: linear-gradient(160deg, #0f2042 0%, #0d1a33 55%, #070d1a 100%); }
[data-theme="dark"] .wx-g-storm { --accent: #a08bff; --accent-ink: #c4b5ff; --hero-bg: linear-gradient(160deg, #1d1840 0%, #121633 55%, #070d1a 100%); }
[data-theme="dark"] .wx-g-snow { --accent: #38bdf8; --accent-ink: #7dd3fc; --hero-bg: linear-gradient(160deg, #10263a 0%, #0d1a2e 55%, #070d1a 100%); }
[data-theme="dark"] .wx-g-fog { --accent: #b3aa9f; --accent-ink: #d6cfc6; --hero-bg: linear-gradient(160deg, #24221f 0%, #171a22 55%, #070d1a 100%); }
[data-theme="dark"] .wx-g-night { --hero-bg: linear-gradient(160deg, #0a1636 0%, #101d45 50%, #070d1a 100%); }
.wx-static { --accent: var(--brand) !important; }

/* Base ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
p { margin: 0 0 .85em; }
p:last-child { margin-bottom: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
abbr[title] { text-decoration: none; border-bottom: 1px dotted var(--faint); cursor: help; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: 10px; left: 10px; width: auto; height: auto; clip: auto; padding: 10px 16px; z-index: 1000; background: var(--surface-solid); color: var(--text); border-radius: 10px; box-shadow: var(--shadow-lg); }
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }
.wx-muted { color: var(--muted); }
.wi { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.wx-wrap { width: min(1200px, 100% - clamp(28px, 5vw, 64px)); margin-inline: auto; }
.wx-wrap--narrow { width: min(820px, 100% - 32px); }

/* Header -------------------------------------------------------------------- */
.wx-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--border); }
.wx-header__inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.wx-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 750; letter-spacing: -.02em; font-size: 1.12rem; flex: none; }
.wx-logo__mark { width: 36px; height: 36px; filter: drop-shadow(0 4px 10px rgba(47, 107, 255, .3)); }
.wx-logo__img { max-height: 40px; width: auto; }
.wx-nav { margin-right: auto; }
.wx-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.wx-nav a { display: block; padding: 8px 11px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 560; font-size: .93rem; white-space: nowrap; transition: background .2s, color .2s; }
.wx-nav a:hover, .wx-nav a[aria-current="true"] { color: var(--text); background: var(--surface-2); }
.wx-header__tools { display: flex; align-items: center; gap: 8px; }
.wx-header__search { width: 240px; }
.wx-header__search .wx-search__input { height: 40px; }
.wx-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); transition: transform .15s var(--ease), background .2s; }
.wx-iconbtn:hover { background: var(--surface-solid); }
.wx-iconbtn:active { transform: scale(.95); }
.wx-iconbtn .wi { width: 20px; height: 20px; }
.wx-when-dark { display: none; }
[data-theme="dark"] .wx-when-dark { display: block; }
[data-theme="dark"] .wx-when-light { display: none; }
.wx-menu-btn { display: none; }

@media (max-width: 1180px) { .wx-header__search { display: none; } }
@media (max-width: 960px) {
	.wx-menu-btn { display: inline-grid; }
	.wx-nav { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--surface-solid); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 10px 16px 18px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s var(--ease); margin: 0; }
	.wx-nav.is-open { transform: none; opacity: 1; visibility: visible; }
	.wx-nav ul { flex-direction: column; }
	.wx-nav a { padding: 12px 12px; font-size: 1rem; }
	.wx-header__tools { margin-left: auto; }
}

/* Buttons & controls -------------------------------------------------------- */
.wx-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--btn-bg); color: var(--btn-fg); font-weight: 650; cursor: pointer; text-decoration: none; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); transition: transform .15s var(--ease), filter .2s; }
.wx-btn:hover { filter: brightness(1.06); }
.wx-btn:active { transform: translateY(1px); }
.wx-btn--ghost { background: var(--card-hero); color: var(--hero-fg); border: 1px solid var(--border-strong); box-shadow: none; backdrop-filter: blur(10px); }
.wx-btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.wx-linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; }
.wx-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--card-hero); border: 1px solid var(--border-strong); backdrop-filter: blur(10px); }
.wx-seg button { min-height: 38px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--hero-muted); }
.wx-seg button[aria-pressed="true"] { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.wx-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 650; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); vertical-align: middle; }
.wx-badge--warn { background: rgba(245, 158, 11, .18); color: #92560a; }
[data-theme="dark"] .wx-badge--warn { color: #fcd34d; }
.wx-badge--good { background: rgba(34, 197, 94, .16); color: #157a3c; }
.wx-badge--fair { background: rgba(245, 158, 11, .18); color: #8a5408; }
.wx-badge--poor { background: rgba(239, 68, 68, .14); color: #b42323; }
[data-theme="dark"] .wx-badge--good { color: #86efac; }
[data-theme="dark"] .wx-badge--fair { color: #fcd34d; }
[data-theme="dark"] .wx-badge--poor { color: #fca5a5; }

/* Search combobox ----------------------------------------------------------- */
.wx-search { position: relative; }
.wx-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 18px; height: 18px; pointer-events: none; }
.wx-search__input { width: 100%; height: 52px; padding: 0 16px 0 42px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface-solid); color: var(--text); font: inherit; font-size: 1rem; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.wx-search__input::placeholder { color: var(--faint); }
.wx-search__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.wx-search__list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 340px; overflow: auto; }
.wx-search__list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--text); }
.wx-search__list li[aria-selected="true"], .wx-search__list li:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.wx-search__list .wi { color: var(--faint); }
.wx-search__list small { display: block; color: var(--muted); font-size: .82rem; }
.wx-search__list .wx-flag { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--faint); }
.wx-search__list .wx-search__head { cursor: default; font-size: .8rem; color: var(--muted); padding: 6px 12px; }
.wx-search__msg { margin: 6px 2px 0; font-size: .85rem; color: var(--hero-muted); min-height: 0; }
.wx-search__msg:empty { display: none; }

/* Hero ---------------------------------------------------------------------- */
.wx-sec.wx-sec--hero { position: relative; background: var(--hero-bg); color: var(--hero-fg); padding: clamp(28px, 5vw, 56px) 0 clamp(30px, 5vw, 56px); margin-top: calc(var(--header-h) * -1); padding-top: calc(var(--header-h) + clamp(24px, 4vw, 48px)); overflow: hidden; transition: background .6s; }
.wx-sec--hero::before { content: ""; position: absolute; inset: auto -10% -40% -10%; height: 70%; background: radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); pointer-events: none; }
.wx-sec--hero::after { content: ""; position: absolute; right: -120px; top: 40px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 65%); filter: blur(10px); opacity: .7; pointer-events: none; }
.wx-hero__intro { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: end; margin-bottom: clamp(18px, 3vw, 30px); }
.wx-h1 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); font-weight: 780; letter-spacing: -.03em; margin: 0 0 .35em; max-width: 18ch; }
.wx-lede { font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--hero-muted); max-width: 52ch; margin: 0; }
.wx-hero__extra { color: var(--hero-muted); margin-top: 10px; }
.wx-hero__controls { display: grid; gap: 12px; }
.wx-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wx-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; color: var(--hero-muted); }
.wx-recent button { border: 1px solid var(--border-strong); background: var(--card-hero); color: var(--hero-fg); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: .85rem; min-height: 32px; }
.wx-recent .wx-linkbtn { border: 0; background: none; text-decoration: underline; padding: 0 4px; color: var(--hero-muted); }
.wx-geo-msg { font-size: .88rem; color: var(--hero-muted); margin: 0; }
.wx-geo-msg:empty { display: none; }

.wx-sec--hero .wx-dyn { position: relative; z-index: 1; }
.wx-glass { background: var(--card-hero); border: 1px solid color-mix(in srgb, var(--hero-fg) 12%, transparent); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); box-shadow: var(--shadow-lg); }
.wx-hero-card { border-radius: 28px; padding: clamp(18px, 3vw, 32px); color: var(--hero-fg); }
.wx-hero-card__top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.wx-hero-card__place { display: flex; align-items: center; gap: 8px; font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 700; margin: 0 0 4px; }
.wx-hero-card__place .wi { color: var(--accent); }
.wx-hero-card__time { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--hero-muted); font-size: .92rem; margin: 0; }
.wx-hero-card .wx-muted { color: var(--hero-muted); }
.wx-updated { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--hero-muted); margin: 0; flex-wrap: wrap; }
.wx-hero-card__main { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 4vw, 48px); align-items: center; margin: clamp(10px, 2vw, 18px) 0; }
.wx-now { display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); }
.wx-now__icon { width: clamp(96px, 13vw, 150px); height: clamp(96px, 13vw, 150px); filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .15)); }
.wx-now__temp { display: flex; align-items: flex-start; margin: 0; line-height: .9; font-variant-numeric: tabular-nums; }
.wx-now__num { font-size: clamp(4.4rem, 11vw, 7.6rem); font-weight: 250; letter-spacing: -.06em; }
.wx-now__unit { font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 500; margin-top: .5em; color: var(--hero-muted); }
.wx-now__cond { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 650; margin: 6px 0 2px; }
.wx-now__sub { color: var(--hero-muted); margin: 0; display: flex; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.wx-summary { font-size: clamp(1rem, 1.5vw, 1.12rem); line-height: 1.55; max-width: 46ch; margin: 0; padding-left: clamp(0px, 2vw, 24px); border-left: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.wx-hero-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 0; padding-top: clamp(12px, 2vw, 18px); border-top: 1px solid color-mix(in srgb, var(--hero-fg) 12%, transparent); }
.wx-hero-stats div { padding: 4px 0; }
.wx-hero-stats dt { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--hero-muted); }
.wx-hero-stats dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.wx-alert-strip { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin: -4px 0 14px; border-radius: 14px; text-decoration: none; color: #fff; background: #d97706; font-size: .92rem; }
.wx-alert-strip.sev-severe, .wx-alert-strip.sev-extreme { background: #c81e1e; }
.wx-alert-strip.sev-minor { background: #b7791f; }

@media (max-width: 900px) {
	.wx-hero__intro { grid-template-columns: 1fr; align-items: start; }
	.wx-hero-card__main { grid-template-columns: 1fr; }
	.wx-summary { padding-left: 14px; }
	.wx-hero-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
	.wx-hero-stats { grid-template-columns: repeat(2, 1fr); }
	.wx-controls .wx-btn { flex: 1 1 100%; justify-content: center; }
	.wx-controls .wx-seg { flex: 1; }
	.wx-controls .wx-seg button { flex: 1; }
	/* Mobile: show current weather before the long intro text. */
	.wx-sec--hero { display: flex; flex-direction: column; }
	.wx-sec--hero .wx-lede { display: none; }
}

/* Sections ------------------------------------------------------------------ */
.wx-sec { padding: clamp(30px, 5vw, 64px) 0 0; }
.wx-sec:last-of-type { padding-bottom: clamp(40px, 6vw, 80px); }
.wx-sec__head { width: min(1200px, 100% - clamp(28px, 5vw, 64px)); margin: 0 auto clamp(14px, 2vw, 22px); display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.wx-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 750; color: var(--accent-ink); margin: 0 0 6px; }
.wx-sec__title { font-size: clamp(1.35rem, 2.4vw, 1.85rem); font-weight: 760; margin: 0; letter-spacing: -.025em; }
.wx-sec__meta { margin: 0; font-size: .84rem; color: var(--muted); }
.wx-fineprint { font-size: .82rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }

.wx-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(16px, 2.2vw, 24px); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.wx-card__title { font-size: 1.08rem; margin-bottom: 4px; }
.wx-card--chart { margin-top: var(--gap); }
.wx-note { display: flex; gap: 14px; align-items: flex-start; }
.wx-note > .wi { width: 24px; height: 24px; color: var(--accent); margin-top: 2px; }

.wx-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
.wx-grid--metrics { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.wx-grid--mini { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); align-content: start; }
.wx-grid--acts { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.wx-grid--about { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.wx-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
@media (max-width: 900px) { .wx-split { grid-template-columns: 1fr; } }

/* Metric cards */
.wx-metric { display: flex; flex-direction: column; gap: 6px; transition: transform .25s var(--ease), box-shadow .25s; }
.wx-metric:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.wx-metric__label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .86rem; font-weight: 650; color: var(--muted); }
.wx-metric__icon { color: var(--accent); width: 18px; height: 18px; }
.wx-metric__value { margin: 0; font-size: 1.75rem; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.wx-metric__note { margin: 0; font-size: .84rem; color: var(--muted); line-height: 1.45; }
.wx-dir { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.wx-dir .wi { width: 16px; height: 16px; transform: rotate(calc(var(--deg) + 180deg)); }
.wx-dir--sm { width: 18px; height: 18px; background: none; }
.wx-dir--sm .wi { width: 13px; height: 13px; }

.wx-stat__label { font-size: .84rem; color: var(--muted); font-weight: 600; margin: 0 0 4px; }
.wx-stat__value { font-size: 1.6rem; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.wx-stat__note { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }
.wx-stat__note.is-warm { color: #c2410c; font-weight: 600; }
.wx-stat__note.is-cool { color: #1d4ed8; font-weight: 600; }
[data-theme="dark"] .wx-stat__note.is-warm { color: #fdba74; }
[data-theme="dark"] .wx-stat__note.is-cool { color: #93c5fd; }
.wx-tag { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 750; padding: 2px 6px; border-radius: 6px; margin-right: 4px; }
.wx-tag--fc { background: rgba(47, 107, 255, .14); color: #1d4fd1; }
.wx-tag--cn { background: rgba(124, 92, 255, .14); color: #5b3fe0; }
.wx-tag--ob { background: rgba(34, 197, 94, .14); color: #157a3c; }
[data-theme="dark"] .wx-tag--fc { color: #9db8ff; }
[data-theme="dark"] .wx-tag--cn { color: #c4b5ff; }
[data-theme="dark"] .wx-tag--ob { color: #86efac; }

.wx-kv { margin: 14px 0; display: grid; gap: 0; }
.wx-kv div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.wx-kv div:last-child { border-bottom: 0; }
.wx-kv dt { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.wx-kv dd { margin: 0; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.wx-kv--2 { grid-template-columns: 1fr 1fr; column-gap: 24px; }
@media (max-width: 520px) { .wx-kv--2 { grid-template-columns: 1fr; } }

.wx-prose h3 { font-size: 1.1rem; margin-top: 1.2em; }
.wx-prose h3:first-child { margin-top: 0; }
.wx-prose ul, .wx-prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.wx-prose li { margin-bottom: .35em; }

/* Hourly -------------------------------------------------------------------- */
.wx-hourly { position: relative; padding: 10px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; }
.wx-hourly__track { list-style: none; margin: 0; padding: 6px 2px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; overscroll-behavior-x: contain; }
.wx-hour { position: relative; flex: 0 0 92px; scroll-snap-align: start; text-align: center; padding: 12px 6px; border-radius: 16px; background: var(--surface-2); border: 1px solid transparent; display: grid; gap: 4px; justify-items: center; }
.wx-hour.is-now { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.wx-hour.is-newday { margin-left: 14px; }
.wx-hour.is-newday::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 1px; background: var(--border-strong); }
.wx-hour__day { position: absolute; top: -2px; left: 50%; transform: translate(-50%, -50%); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; background: var(--text); color: var(--bg); padding: 1px 7px; border-radius: 999px; }
.wx-hour__time { font-size: .82rem; color: var(--muted); font-weight: 600; margin: 0; }
.wx-hour__icon { width: 40px; height: 40px; }
.wx-hour__temp { font-size: 1.25rem; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.wx-hour__row { margin: 0; font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.wx-hour__row .wi { width: 12px; height: 12px; }
.wx-hourly__nav { z-index: 2; }
@media (max-width: 640px) { .wx-hourly { grid-template-columns: 1fr; padding: 6px; } .wx-hourly__nav { display: none; } .wx-hour { flex-basis: 78px; } }

/* Charts -------------------------------------------------------------------- */
.wx-chart { position: relative; }
.wx-chart__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wx-chart svg { display: block; width: 100%; min-width: 620px; height: auto; touch-action: pan-x pan-y; }
.wx-chart-summary { color: var(--muted); }
.wx-grid line, line.wx-grid { stroke: var(--border-strong); stroke-dasharray: 2 4; }
.wx-axis { font-size: 11px; fill: var(--faint); font-family: var(--font); }
.wx-axis--alt { fill: #0e7490; }
.wx-val { font-size: 11.5px; font-weight: 700; fill: var(--text); font-family: var(--font); }
.wx-val--muted { fill: var(--muted); font-weight: 600; }
.wx-line { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wx-line--alt { stroke: var(--faint); stroke-width: 2; stroke-dasharray: 5 5; }
.wx-line--rain { stroke: #0e7490; stroke-width: 2.4; }
[data-theme="dark"] .wx-line--rain, [data-theme="dark"] .wx-axis--alt { stroke: #67e8f9; fill: #67e8f9; }
[data-theme="dark"] .wx-line--rain { fill: none; }
.wx-dot { fill: var(--surface-solid); stroke: var(--accent); stroke-width: 2.5; }
.wx-bar { fill: color-mix(in srgb, #3b82f6 45%, transparent); }
.wx-bar.is-high { fill: #2563eb; }
.wx-bar--precip { fill: color-mix(in srgb, #0ea5e9 55%, transparent); }
.wx-range { fill: color-mix(in srgb, var(--accent) 35%, transparent); }
.wx-range.is-current { fill: var(--accent); }
.wx-hit { fill: transparent; cursor: crosshair; }
.wx-hit:hover { fill: color-mix(in srgb, var(--accent) 8%, transparent); }
.wx-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
.wx-legend li { display: flex; align-items: center; gap: 6px; }
.wx-key { width: 18px; height: 3px; border-radius: 2px; background: var(--accent); }
.wx-key--alt { background: repeating-linear-gradient(90deg, var(--faint) 0 5px, transparent 5px 9px); }
.wx-key--bar { height: 10px; width: 10px; background: #2563eb; }
.wx-key--rain { background: #0e7490; }
.wx-key--range { height: 10px; width: 10px; border-radius: 3px; background: var(--accent); }
.wx-key--precip { height: 10px; width: 10px; background: #0ea5e9; }
.wx-table-toggle { margin-top: 10px; font-size: .88rem; }
.wx-table-toggle summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; }
.wx-table-wrap { overflow-x: auto; margin-top: 10px; }
.wx-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.wx-table th, .wx-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.wx-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.wx-table tr.is-active td { background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 600; }
.wx-tooltip { position: fixed; z-index: 90; pointer-events: none; padding: 7px 11px; border-radius: 10px; background: #0f1b2d; color: #fff; font-size: .82rem; font-weight: 600; box-shadow: var(--shadow-lg); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
[data-theme="dark"] .wx-tooltip { background: #f1f5fb; color: #0f1b2d; }

/* Daily --------------------------------------------------------------------- */
.wx-days { list-style: none; margin: 0; padding: 6px clamp(8px, 1.5vw, 16px); }
.wx-day { display: grid; grid-template-columns: 130px 44px minmax(120px, 1fr) 64px 92px minmax(180px, 1.4fr); grid-template-areas: "name icon cond rain wind range" "name icon sum sum sum sum"; align-items: center; column-gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--border); }
.wx-day:last-child { border-bottom: 0; }
.wx-day__name { grid-area: name; margin: 0; display: flex; flex-direction: column; }
.wx-day__name span { font-size: .8rem; color: var(--muted); }
.wx-day__icon { grid-area: icon; width: 40px; height: 40px; }
.wx-day__cond { grid-area: cond; margin: 0; font-weight: 600; }
.wx-day__rain, .wx-day__wind { margin: 0; font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.wx-day__rain { grid-area: rain; }
.wx-day__wind { grid-area: wind; }
.wx-day__range { grid-area: range; display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.wx-day__min { color: var(--muted); width: 34px; text-align: right; }
.wx-day__max { font-weight: 700; width: 34px; }
.wx-rangebar { position: relative; flex: 1; height: 6px; border-radius: 99px; background: var(--border); }
.wx-rangebar span { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #60a5fa, #fbbf24 70%, #f97316); }
.wx-day__summary { grid-area: sum; margin: 2px 0 0; font-size: .84rem; color: var(--muted); }
.wx-day.is-extended { opacity: .92; }
@media (max-width: 860px) {
	.wx-day { grid-template-columns: 92px 36px 1fr auto; grid-template-areas: "name icon cond range" "name icon rain wind" "sum sum sum sum"; row-gap: 4px; }
	.wx-day__range { min-width: 150px; }
	.wx-day__icon { width: 34px; height: 34px; }
}
@media (max-width: 520px) {
	.wx-day { grid-template-columns: 74px 32px 1fr; grid-template-areas: "name icon range" "name icon cond" "rain wind wind" "sum sum sum"; }
	.wx-day__range { min-width: 0; }
	.wx-day__cond { font-size: .88rem; }
}

/* Wind ---------------------------------------------------------------------- */
.wx-compass-card { text-align: left; }
.wx-compass { position: relative; width: 200px; height: 200px; margin: 6px auto 8px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--surface-solid) 0 55%, transparent 56%), conic-gradient(from 0deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 6%, transparent), color-mix(in srgb, var(--accent) 22%, transparent)); border: 1px solid var(--border-strong); box-shadow: inset 0 0 0 10px var(--surface-2); }
.wx-compass span[class^="wx-compass__"]:not(.wx-compass__needle):not(.wx-compass__center) { position: absolute; font-size: .8rem; font-weight: 750; color: var(--muted); }
.wx-compass__n { top: 8px; left: 50%; transform: translateX(-50%); color: var(--accent-ink) !important; }
.wx-compass__s { bottom: 8px; left: 50%; transform: translateX(-50%); }
.wx-compass__e { right: 10px; top: 50%; transform: translateY(-50%); }
.wx-compass__w { left: 10px; top: 50%; transform: translateY(-50%); }
.wx-compass__needle { position: absolute; left: 50%; top: 50%; width: 6px; height: 150px; margin: -75px 0 0 -3px; transform: rotate(calc(var(--deg) + 180deg)); transition: transform 1s var(--ease); }
.wx-compass__needle::before { content: ""; position: absolute; left: -6px; top: 0; border: 9px solid transparent; border-bottom: 26px solid var(--accent); border-top: 0; }
.wx-compass__needle::after { content: ""; position: absolute; left: 1px; top: 26px; width: 4px; bottom: 0; background: linear-gradient(var(--accent), transparent); border-radius: 2px; }
.wx-compass__center { position: absolute; inset: 58px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--surface-solid); box-shadow: var(--shadow); }
.wx-compass__center strong { font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; }
.wx-compass__center small { color: var(--muted); }
.wx-scale { list-style: none; padding: 0 !important; }
.wx-scale li { padding: 10px 12px; border-radius: 12px; margin-bottom: 6px; border: 1px solid var(--border); }
.wx-scale li.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* AQI ----------------------------------------------------------------------- */
.aqi-good { --aqi: #2fb45a; } .aqi-fair { --aqi: #3cbfa8; } .aqi-moderate { --aqi: #e2b714; } .aqi-usg { --aqi: #f07b16; }
.aqi-poor, .aqi-unhealthy { --aqi: #e2382f; } .aqi-very-poor, .aqi-very-unhealthy { --aqi: #8f3f97; } .aqi-extremely-poor, .aqi-hazardous { --aqi: #7e0023; }
.wx-aqi { border-top: 4px solid var(--aqi); }
.wx-aqi__main { display: flex; gap: 18px; align-items: center; margin: 6px 0 14px; }
.wx-aqi__num { font-size: 3.6rem; font-weight: 300; line-height: 1; margin: 0; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.wx-aqi__cat { font-size: 1.25rem; font-weight: 700; margin: 0 0 4px; }
.wx-aqi__bar { position: relative; height: 10px; border-radius: 99px; margin: 0 0 18px; }
.wx-aqi__bar.is-us { background: linear-gradient(90deg, #2fb45a 0 16.6%, #e2b714 16.6% 33.3%, #f07b16 33.3% 50%, #e2382f 50% 66.6%, #8f3f97 66.6% 100%); }
.wx-aqi__bar.is-eu { background: linear-gradient(90deg, #3cc6c0 0 16.6%, #3cbfa8 16.6% 33.3%, #e2b714 33.3% 50%, #e2382f 50% 66.6%, #960032 66.6% 83.3%, #7d2181 83.3% 100%); }
.wx-aqi__bar span { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--surface-solid); border: 4px solid var(--text); box-shadow: var(--shadow); }
.wx-pollutants { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wx-pollutants li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: grid; }
.wx-pollutants abbr { font-size: .8rem; color: var(--muted); font-weight: 650; }
.wx-pollutants strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.wx-pollutants small { color: var(--muted); font-size: .72rem; }
.wx-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--aqi); margin-right: 6px; }
.wx-table--aqi td:first-child { white-space: nowrap; }
@media (max-width: 520px) { .wx-pollutants { grid-template-columns: repeat(2, 1fr); } .wx-table--aqi td:last-child { font-size: .82rem; } }

/* UV ------------------------------------------------------------------------ */
.uv-low { --uv: #2fb45a; } .uv-moderate { --uv: #e2b714; } .uv-high { --uv: #f07b16; } .uv-very-high { --uv: #e2382f; } .uv-extreme { --uv: #8f3f97; }
.wx-uv__dial { --size: 170px; position: relative; width: var(--size); height: var(--size); margin: 0 auto 6px; }
.wx-uv__dial::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 225deg, #2fb45a 0 18%, #e2b714 18% 34%, #f07b16 34% 45%, #e2382f 45% 64%, #8f3f97 64% 75%, transparent 75%); -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); mask: radial-gradient(circle, transparent 60%, #000 61%); }
.wx-uv__needle { position: absolute; inset: 0; transform: rotate(calc(-135deg + var(--v) * 270deg)); }
.wx-uv__needle::before { content: ""; position: absolute; left: 50%; top: 1px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--surface-solid); border: 4px solid var(--text); box-shadow: var(--shadow); }
.wx-uv__num { position: absolute; inset: 0 0 auto 0; top: 50%; transform: translateY(-62%); text-align: center; font-size: 2.8rem; font-weight: 300; line-height: 1; color: var(--text); }
.wx-uv__lbl { position: absolute; left: 0; right: 0; top: 64%; text-align: center; font-size: .78rem; color: var(--muted); }
.wx-uvscale { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; font-size: .82rem; }
.wx-uvscale li { padding: 8px 6px; border-radius: 10px; background: color-mix(in srgb, var(--uv) 18%, transparent); border-top: 3px solid var(--uv); text-align: center; margin: 0 !important; }
.wx-uvscale strong { display: block; }
@media (max-width: 520px) { .wx-uvscale { grid-template-columns: repeat(3, 1fr); } }

/* Sun & moon ---------------------------------------------------------------- */
.wx-sunarc svg { display: block; width: 100%; max-width: 360px; margin: 0 auto; }
.wx-sunarc__track { fill: none; stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 3 5; }
.wx-sunarc__done { fill: none; stroke: #f59e0b; stroke-width: 3; stroke-dasharray: var(--p) 1; stroke-linecap: round; }
.wx-sunarc__sun { fill: #fbbf24; filter: drop-shadow(0 0 8px rgba(251, 191, 36, .8)); }
.wx-moon__disc { width: 150px; height: 150px; margin: 4px auto 10px; }
.wx-moon__disc svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 24px rgba(255, 224, 138, .25)); }
.wx-moon__dark { fill: #1e293b; stroke: rgba(148, 163, 184, .4); stroke-width: 1; }
.wx-moon__lit { fill: #f4ecd2; }

/* Alerts -------------------------------------------------------------------- */
.wx-alerts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.wx-alert { border-left: 5px solid var(--sev, #d97706); }
.wx-alert.sev-extreme { --sev: #991b1b; } .wx-alert.sev-severe { --sev: #dc2626; } .wx-alert.sev-moderate { --sev: #ea580c; } .wx-alert.sev-minor { --sev: #ca8a04; } .wx-alert.sev-unknown { --sev: #64748b; }
.wx-alert summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.wx-alert summary::-webkit-details-marker { display: none; }
.wx-alert__icon { color: var(--sev); }
.wx-alert__icon .wi { width: 26px; height: 26px; }
.wx-alert__title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 1.05rem; }
.wx-badge--sev { background: color-mix(in srgb, var(--sev) 16%, transparent); color: var(--sev); }
[data-theme="dark"] .wx-badge--sev { color: #fecaca; }
.wx-alert__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 14px 0; }
.wx-alert__meta dt { font-size: .78rem; color: var(--muted); }
.wx-alert__meta dd { margin: 0; font-weight: 600; }
.wx-alert__headline { font-weight: 600; }
.wx-alert__text { white-space: normal; font-size: .94rem; }
.wx-alert__text h3 { font-size: .98rem; margin-top: 12px; }

/* Map ----------------------------------------------------------------------- */
.wx-mapcard { padding: 12px; }
.wx-seg--layers { margin-bottom: 10px; background: var(--surface-2); flex-wrap: wrap; }
.wx-seg--layers button { color: var(--muted); }
.wx-map { position: relative; height: clamp(300px, 52vh, 480px); border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--bg-2)), var(--bg-2)); display: grid; place-items: center; isolation: isolate; }
.wx-map.is-ready { display: block; }
.wx-map__legend { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.wx-map__legend .wx-grad { flex: 1; max-width: 320px; height: 8px; border-radius: 99px; }
.leaflet-container { font: inherit; background: var(--bg-2); }
[data-theme="dark"] .wx-map .leaflet-tile-pane .leaflet-layer:first-child { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
.wx-map-pin { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 4px solid #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 30%, transparent), 0 4px 10px rgba(0, 0, 0, .3); }

/* Compare ------------------------------------------------------------------- */
.wx-compare__form { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; margin: 12px 0 16px; }
.wx-compare__slot { position: relative; display: flex; gap: 8px; align-items: flex-start; }
.wx-compare__slot .wx-search { flex: 1; }
.wx-compare__tag { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--btn-bg); color: var(--btn-fg); font-weight: 800; font-size: .82rem; flex: none; margin-top: 13px; }
.wx-compare__form > .wx-iconbtn { margin-top: 6px; }
.wx-compare .wx-search__msg { color: var(--muted); }
.wx-table--compare thead th { text-transform: none; font-size: .95rem; letter-spacing: 0; color: var(--text); }
.wx-table--compare .wx-compare__tag { margin: 0; width: 22px; height: 22px; }
.wx-cmp-icon { width: 28px; height: 28px; }
.wx-compare__verdict { margin-top: 12px; font-weight: 600; }
@media (max-width: 720px) { .wx-compare__form { grid-template-columns: 1fr; } .wx-compare__form > .wx-iconbtn { justify-self: center; transform: rotate(90deg); margin: 0; } }

/* Cities -------------------------------------------------------------------- */
.wx-cities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--gap); }
.wx-city { width: 100%; text-align: left; cursor: pointer; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name time" "temp icon" "cond cond" "meta meta"; gap: 2px 8px; align-items: center; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; position: relative; overflow: hidden; }
.wx-city::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c, var(--accent)); }
.wx-city.g-sunny { --c: #f59e0b; } .wx-city.g-rain { --c: #3b82f6; } .wx-city.g-cloudy { --c: #94a3b8; } .wx-city.g-night { --c: #6366f1; } .wx-city.g-snow { --c: #38bdf8; } .wx-city.g-storm { --c: #7c3aed; } .wx-city.g-fog { --c: #a8a29e; }
.wx-city:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.wx-city__name { grid-area: name; font-weight: 700; }
.wx-city__name small { color: var(--faint); font-weight: 600; }
.wx-city__time { grid-area: time; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.wx-city__icon { grid-area: icon; width: 44px; height: 44px; justify-self: end; }
.wx-city__temp { grid-area: temp; font-size: 2.1rem; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wx-city__cond { grid-area: cond; font-size: .9rem; font-weight: 600; }
.wx-city__meta { grid-area: meta; font-size: .78rem; color: var(--muted); }

/* Activities ---------------------------------------------------------------- */
.wx-act { border-top: 4px solid var(--state, var(--border)); display: flex; flex-direction: column; gap: 8px; }
.wx-act.is-good { --state: #22c55e; } .wx-act.is-fair { --state: #f59e0b; } .wx-act.is-poor { --state: #ef4444; }
.wx-act__head { display: flex; align-items: center; gap: 10px; margin: 0; flex-wrap: wrap; }
.wx-act__head .wx-badge { margin-left: auto; }
.wx-act__icon { width: 26px; height: 26px; color: var(--state); }
.wx-act__window { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 650; }
.wx-act__now { margin: 0; font-size: .86rem; color: var(--muted); }
.wx-act__rules { font-size: .84rem; color: var(--muted); }
.wx-act__rules summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; }
.wx-act__rules ul { padding-left: 1.1em; margin: 8px 0 0; }

/* Explain ------------------------------------------------------------------- */
.wx-explain { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--gap); align-items: start; }
.wx-explain__story { font-size: 1.04rem; line-height: 1.75; }
.wx-explain__story h3 { font-size: 1.3rem; }
.wx-explain__points dl { margin: 0; }
.wx-explain__points div { padding: 12px 0; border-bottom: 1px solid var(--border); }
.wx-explain__points div:last-child { border: 0; }
.wx-explain__points dt { font-weight: 700; margin-bottom: 2px; }
.wx-explain__points dd { margin: 0; color: var(--muted); font-size: .94rem; }
@media (min-width: 901px) { .wx-explain__points { position: sticky; top: calc(var(--header-h) + 16px); } }
@media (max-width: 900px) { .wx-explain { grid-template-columns: 1fr; } }

/* Guides & FAQ -------------------------------------------------------------- */
.wx-toc { margin-bottom: var(--gap); }
.wx-toc ol { margin: 0; padding-left: 1.3em; columns: 3 240px; column-gap: 32px; }
.wx-toc li { margin-bottom: 6px; break-inside: avoid; }
.wx-guides, .wx-faq { display: grid; gap: 12px; }
.wx-guide summary, .wx-faq__item summary { cursor: pointer; list-style: none; display: flex; gap: 14px; align-items: flex-start; }
.wx-guide summary::-webkit-details-marker, .wx-faq__item summary::-webkit-details-marker { display: none; }
.wx-guide summary::after, .wx-faq__item summary::after { content: ""; margin-left: auto; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-top: 8px; transition: transform .2s; }
.wx-guide[open] summary::after, .wx-faq__item[open] summary::after { transform: rotate(-135deg); }
.wx-guide__icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); flex: none; }
.wx-guide__title { font-size: 1.12rem; margin: 2px 0 2px; }
.wx-guide__excerpt { color: var(--muted); font-size: .92rem; }
.wx-guide__body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); max-width: 76ch; }
.wx-faq__item h3 { font-size: 1.02rem; margin: 0; font-weight: 650; }
.wx-faq__item .wx-prose { margin-top: 10px; color: var(--muted); max-width: 80ch; }
.wx-about-extra { margin-top: var(--gap); }

/* Ads ----------------------------------------------------------------------- */
.wx-ad { width: min(1200px, 100% - clamp(28px, 5vw, 64px)); margin: clamp(30px, 5vw, 56px) auto 0; min-height: 120px; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
.wx-guides .wx-ad { width: 100%; margin: 8px 0; }
.wx-ad__label { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.wx-ad ins { min-height: 90px; }

/* Consent banner ------------------------------------------------------------ */
.wx-consent { position: fixed; z-index: 80; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; padding: 16px 18px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: .92rem; }
.wx-consent p { margin: 0 0 12px; }
.wx-consent__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wx-consent__actions .wx-btn { min-height: 40px; }
.wx-consent__actions .wx-btn--plain { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); box-shadow: none; }

/* Footer -------------------------------------------------------------------- */
.wx-footer { margin-top: clamp(40px, 6vw, 80px); background: #08101f; color: #c9d3e3; padding: clamp(36px, 5vw, 60px) 0 24px; }
.wx-footer a { color: #e6edf8; text-decoration: none; }
.wx-footer a:hover { text-decoration: underline; }
.wx-footer .wx-logo { color: #fff; margin-bottom: 12px; }
.wx-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.wx-footer__brand p { max-width: 42ch; color: #9fb0c8; font-size: .92rem; }
.wx-footer__title { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: #8296b3; margin-bottom: 12px; }
.wx-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .93rem; }
.wx-footer .wx-linkbtn { color: #e6edf8; text-decoration: none; font-size: .93rem; }
.wx-footer__bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .8rem; color: #8296b3; display: grid; gap: 6px; }
.wx-footer__bottom a { color: #c9d3e3; text-decoration: underline; }
@media (max-width: 860px) { .wx-footer__grid { grid-template-columns: 1fr 1fr; } .wx-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .wx-footer__grid { grid-template-columns: 1fr; } }

/* Pages --------------------------------------------------------------------- */
.wx-page { padding: clamp(28px, 5vw, 56px) 0; }
.wx-article { padding: clamp(22px, 4vw, 44px); }
.wx-page__title { font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.03em; }
.wx-crumbs { font-size: .86rem; color: var(--muted); }
.wx-entry { margin-bottom: 16px; }
.entry-content { font-size: 1.04rem; line-height: 1.75; }
.entry-content h2 { margin-top: 1.6em; font-size: 1.35rem; }
.wx-404 { text-align: center; }
.wx-404__icon { width: 120px; height: 120px; }
.mwx-contact p { display: grid; gap: 6px; }
.mwx-contact input, .mwx-contact textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-solid); color: var(--text); font: inherit; }
.mwx-contact input:focus, .mwx-contact textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.mwx-contact label { font-weight: 600; }
.mwx-contact .mwx-btn { justify-self: start; min-height: 46px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--btn-bg); color: var(--btn-fg); font-weight: 650; cursor: pointer; }
.mwx-hp { position: absolute !important; left: -9999px !important; }
.mwx-form-note { font-size: .85rem; color: var(--muted); }
.mwx-form-msg { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.mwx-form-msg.is-ok { background: rgba(34, 197, 94, .14); }
.mwx-form-msg.is-error { background: rgba(239, 68, 68, .14); }

/* Loading state ------------------------------------------------------------- */
.wx-main.is-loading .wx-dyn { opacity: .55; transition: opacity .2s; pointer-events: none; }
.wx-dyn { transition: opacity .3s; }

/* Animations (subtle; disabled for reduced motion) -------------------------- */
@keyframes wx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes wx-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wi--anim { animation: wx-float 6s ease-in-out infinite; }
.wx-dyn.is-fresh > * { animation: wx-in .45s var(--ease) both; }
.wx-no-anim *, .wx-no-anim *::before, .wx-no-anim *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* High contrast & print ----------------------------------------------------- */
@media (forced-colors: active) { .wx-card, .wx-glass { border: 1px solid CanvasText; } }
@media print {
	.wx-header, .wx-footer, .wx-ad, .wx-hero__controls, .wx-sec--map, .wx-sec--compare, .wx-hourly__nav { display: none !important; }
	body { background: #fff; color: #000; }
	.wx-card, .wx-glass { box-shadow: none; backdrop-filter: none; border: 1px solid #ccc; }
}
