/* Weather pages: /weather/, each state, each city (built by backend/otr_backend/build/weather.py,
   kept current by weather.js). Uses the tokens in styles.css. */

.sp-crumb { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--quiet); }
.sp-crumb a { color: inherit; }
.wx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.wx-chips a { padding: 4px 9px; border: 1px solid var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink); background: var(--paper); }
.wx-chips a:hover { background: var(--wash); }
.wx-chips a[aria-current] { background: var(--ink); color: var(--paper); }

.wx-main { padding-bottom: 96px; }
.wx-main section { border-top: 5px solid var(--ink); padding: 18px 0 40px; }
.wx-main h2 { margin: 0 0 16px; font-size: 28px; line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.wx-main h2 a { color: inherit; text-decoration: none; }
.wx-main h2 a:hover { text-decoration: underline; }
.wx-asof, .wx-note { margin: 0 0 24px; font-size: 14px; color: var(--quiet); }
.wx-note { margin: 8px 0 0; }

/* City cards */
.wx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 0 0 8px; }
.wx-card { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n t" "x x" "hl hl" "al al"; gap: 2px 8px;
  padding: 12px 14px; border: 1px solid var(--faint); color: var(--ink); text-decoration: none; background: var(--paper); min-width: 0; }
.wx-card:hover { border-color: var(--ink); }
.wx-card .wx-n { grid-area: n; font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-card .wx-t { grid-area: t; font-size: 24px; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wx-card .wx-x { grid-area: x; font-size: 14px; }
.wx-card .wx-hl { grid-area: hl; font-size: 13px; color: var(--quiet); font-variant-numeric: tabular-nums; }
.wx-card .wx-al { grid-area: al; margin-top: 6px; font-size: 12px; font-weight: 800; }
.wx-card.wx-warn { border-left: 5px solid var(--ink); }
.wx-card.wx-warn .wx-al { background: var(--ink); color: var(--paper); padding: 2px 6px; justify-self: start; }
.wx-card.wx-adv .wx-al { background: var(--hl); padding: 2px 6px; justify-self: start; }
.wx-card[data-wx-fresh] .wx-t::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 4px; vertical-align: super; border-radius: 50%; background: var(--cite); }

.wx-warnlist { margin: 0; padding-left: 1.2em; }
.wx-warnlist li { margin: 0 0 6px; font-size: 16px; }
.wx-statefc { list-style: none; margin: 0; padding: 0; }
.wx-statefc li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rail); font-size: 16px; max-width: none; }

/* A city page */
.wx-now { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.p-body .wx-big { margin: 0; font-size: clamp(64px, 10vw, 112px); line-height: .9; font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.p-body .wx-sky { margin: 0; font-size: 26px; font-weight: 600; }
.wx-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px 24px; margin: 24px 0 0; }
.wx-facts div { border-top: 1px solid var(--ink); padding-top: 6px; }
.wx-facts dt { font-size: 13px; color: var(--quiet); }
.wx-facts dd { margin: 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

.wx-alert { margin: 0 0 10px; border: 1px solid var(--ink); padding: 0; }
.wx-alert summary { cursor: pointer; padding: 10px 14px; display: grid; gap: 2px; list-style: none; }
.wx-alert summary::-webkit-details-marker { display: none; }
.wx-alert summary span { font-size: 14px; color: var(--quiet); }
.wx-alert.wx-warn summary { background: var(--ink); color: var(--paper); }
.wx-alert.wx-warn summary span { color: var(--faint); }
.wx-alert.wx-adv summary { background: var(--hl); }
.wx-alert > p { margin: 12px 14px; font-size: 16px; }

.p-body .wx-hours { list-style: none; display: flex; gap: 0; overflow-x: auto; margin: 0; padding: 0 0 8px; scroll-snap-type: x proximity; }
.p-body .wx-hours li { flex: 0 0 84px; display: grid; gap: 2px; padding: 8px 10px; border-left: 1px solid var(--rail); scroll-snap-align: start; margin: 0; font-size: 14px; }
.wx-hours .wx-h { font-size: 13px; color: var(--quiet); }
.wx-hours b { font-size: 22px; font-variant-numeric: tabular-nums; }
.wx-hours .wx-x { font-size: 12px; line-height: 1.3; }
.wx-hours .wx-p { font-size: 12px; color: var(--cite); font-weight: 600; min-height: 1em; }

.p-body .wx-days { list-style: none; margin: 0; padding: 0; }
.p-body .wx-days li { display: grid; grid-template-columns: 150px 56px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rail); margin: 0; font-size: 16px; max-width: none; }
.wx-days .wx-t { font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.wx-days .wx-night { color: var(--quiet); }
.wx-days .wx-night b { font-weight: 600; }

/* widget() on other pages */
.wx-widget { margin: 0 0 24px; }
.wx-widget .wx-k { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

@media (max-width: 720px) {
  .wx-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .wx-statefc li { grid-template-columns: 1fr; gap: 4px; }
  .p-body .wx-days li { grid-template-columns: 1fr auto; }
  .p-body .wx-days li > span:last-child { grid-column: 1 / -1; }
}

/* Radar map (weather-map.js, Nov 26 2026). The box keeps its height before the map loads (no layout shift). */
.wx-radar { margin: 0; }
.wx-map { position: relative; height: 560px; max-height: 70vh; border: 1px solid var(--ink); background: var(--wash); overflow: hidden; }
.wx-city .wx-map { height: 440px; }
.wx-map:not(.wxm-on) { display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; }
.wxm-fail { margin: 0; font-size: 15px; color: var(--quiet); }
.wx-radar figcaption { max-width: 90ch; }
.wxm-bar { position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  max-width: calc(100% - 20px); padding: 6px 8px; background: rgba(255,255,255,.94); border: 1px solid var(--ink); font-size: 13px; color: #000; }
.wxm-play { font: inherit; font-weight: 800; min-width: 58px; padding: 4px 10px; border: 1px solid #000; background: #000; color: #fff; cursor: pointer; }
.wxm-play[aria-pressed="true"] { background: #fff; color: #000; }
.wxm-range { width: 120px; accent-color: #000; }
.wxm-time { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wxm-al { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.wxm-key { position: absolute; left: 10px; bottom: 32px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 4px 8px;
  background: rgba(255,255,255,.94); border: 1px solid var(--ink); font-size: 12px; color: #000; }
.wxm-key i { display: block; width: 90px; height: 8px; background: linear-gradient(90deg, #04e9e7, #0300f4, #02fd02, #008e00, #fdf802, #fd9500, #fd0000, #bc0000, #f800fd); }
.wxm-pin { width: 14px; height: 14px; border-radius: 50%; background: var(--cite); border: 2px solid #fff; box-shadow: 0 0 0 1px #000; }
.wx-map .maplibregl-popup-content { font-size: 14px; line-height: 1.4; border: 1px solid #000; border-radius: 0; box-shadow: none; }
.wx-map .maplibregl-popup-content a { color: var(--cite); }
@media (max-width: 720px) {
  .wx-map { height: 420px; }
  .wx-city .wx-map { height: 360px; }
  .wxm-bar { max-width: calc(100% - 64px); }
  .wxm-range { width: 80px; }
}
