/* Weather page (/{lang}/weather). Uses the site tokens (--ink, --line, --soft, --card-bg…), which switch for dark mode. */
.wx-page { padding: 8px 0 32px; }
.wx-page .page-shell { max-width: 1180px; }

.wx-cities { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.wx-cities::-webkit-scrollbar { display: none; }
.wx-cities a { flex: none; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card-bg); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.wx-cities a:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
/* --brand-blue-ink, not --brand-blue: this chip carries white text, which needs 4.5:1 (see style.css). */
.wx-cities a.is-active { background: var(--brand-blue-ink, #167DB4); border-color: var(--brand-blue-ink, #167DB4); color: #fff; }

.wx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .wx-grid { grid-template-columns: minmax(0, 1fr); } }
.wx-main { display: grid; gap: 14px; min-width: 0; }
.wx-main > *, .wx-grid > * { min-width: 0; }

.wx-hero { border-radius: 20px; padding: 18px 20px; color: #0b2239; background: linear-gradient(135deg, #bfe3ff 0%, #e6f4ff 45%, #ffe8b8 100%); }
.wx-hero.is-night { color: #eef4ff; background: linear-gradient(135deg, #0f2547 0%, #1e3a6e 60%, #3b2f6b 100%); }
.wx-hero h1 { font-size: clamp(1.25rem, 3.6vw, 1.7rem); font-weight: 800; margin: 0 0 6px; }
.wx-hero h1 i { color: var(--red); }
.wx-hero.is-night h1 i { color: #ffb4b8; }
.wx-now { display: flex; align-items: center; gap: 8px; }
.wx-now img { width: 120px; height: 120px; margin: -14px -6px -14px -14px; flex: none; }
.wx-temp { display: block; font-size: clamp(3rem, 11vw, 4.4rem); line-height: 1; font-weight: 800; letter-spacing: -1px; }
.wx-desc { margin: 6px 0 0; font-size: 1.15rem; font-weight: 700; }
.wx-feels { margin: 2px 0 0; opacity: .8; }
.wx-updated { margin: 10px 0 0; font-size: 13px; opacity: .8; }
.wx-old { font-weight: 700; }
.wx-empty { color: var(--muted); margin: 8px 0; }
.wx-hero .wx-empty { color: inherit; opacity: .8; }

.wx-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
@media (max-width: 640px) { .wx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wx-facts > div { background: var(--card-bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.wx-facts dt { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.wx-facts dt i { color: var(--brand-blue); }
.wx-facts dd { margin: 4px 0 0; font-size: 1.05rem; font-weight: 800; color: var(--ink); }

.wx-card { background: var(--card-bg); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.wx-card h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 10px; color: var(--ink); }

.wx-hours { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(72px, 1fr); gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.wx-hours li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: var(--soft); }
/* The strip is focusable (tabindex="0") so a keyboard user can scroll it; it therefore needs a visible focus ring. */
.wx-hours:focus-visible { outline: 2px solid var(--brand-blue-ink, #167DB4); outline-offset: 2px; border-radius: 12px; }
.wx-h-time { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.wx-hours b { font-size: 1.05rem; color: var(--ink); }
.wx-rain { color: var(--brand-blue); font-weight: 700; font-size: 12px; white-space: nowrap; }

.wx-days { list-style: none; margin: 0; padding: 0; }
.wx-days li { display: grid; grid-template-columns: 76px 40px minmax(0, 1fr) minmax(120px, 34%); align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.wx-days li:first-child { border-top: 0; }
.wx-d-name { font-weight: 800; color: var(--ink); white-space: nowrap; }
.wx-d-desc { color: var(--muted); font-size: 14px; min-width: 0; }
.wx-d-range { display: flex; align-items: center; gap: 8px; }
.wx-d-range small { color: var(--muted); font-weight: 700; min-width: 30px; text-align: right; }
.wx-d-range b { color: var(--ink); min-width: 30px; }
.wx-bar { position: relative; flex: 1; height: 6px; border-radius: 6px; background: var(--soft); }
.wx-bar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, #38bdf8, #f59e0b, #ef4444); }
@media (max-width: 520px) {
  .wx-days li { grid-template-columns: 64px 36px minmax(0, 1fr) auto; }
  .wx-bar { display: none; }
}

.wx-aqi-value { margin: 0 0 8px; font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.wx-aqi-value b { font-size: 2rem; margin-right: 6px; }
.wx-aqi-value small { font-size: 1rem; color: var(--muted); }
.wx-aqi-scale { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0 0 10px; padding: 0; }
.wx-aqi-scale li { height: 8px; border-radius: 4px; opacity: .35; }
.wx-aqi-scale li:nth-child(1) { background: #22c55e; } .wx-aqi-scale li:nth-child(2) { background: #84cc16; }
.wx-aqi-scale li:nth-child(3) { background: #eab308; } .wx-aqi-scale li:nth-child(4) { background: #f97316; } .wx-aqi-scale li:nth-child(5) { background: #ef4444; }
.wx-aqi-scale li.is-on { opacity: 1; outline: 2px solid var(--ink); outline-offset: 1px; }
.wx-aqi p { margin: 0 0 6px; color: var(--ink); }
.wx-note { color: var(--muted); font-size: 12px; }
.wx-aqi.is-4, .wx-aqi.is-5 { border-color: #f97316; }

.wx-source { margin: 0; font-size: 12.5px; color: var(--muted); }
.wx-source a { color: inherit; }

.wx-news { background: var(--card-bg); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; position: sticky; top: 84px; }
@media (max-width: 960px) { .wx-news { position: static; } }
.wx-news h2 { display: flex; gap: 8px; align-items: center; font-size: 1.1rem; font-weight: 800; margin: 0 0 6px; padding-bottom: 8px; border-bottom: 3px solid var(--red); color: var(--ink); }
.wx-news .md-story { padding: 10px 0; border-bottom: 1px solid var(--line); }
.wx-news .md-story:last-child { border-bottom: 0; }

html[data-theme="dark"] .wx-hero:not(.is-night) { color: #eef4ff; background: linear-gradient(135deg, #0c4a6e 0%, #155e75 55%, #713f12 100%); }
html[data-theme="dark"] .wx-hero h1 i { color: #ffb4b8; }
