/* AtmosDays Weather pages (on top of /styles.css). */
.wx { --wx-water: #d6e4f0; --wx-land: #f4f5f0; --wx-line: rgba(71, 85, 105, .55); --wx-coast: rgba(71, 85, 105, .75);
  --wx-hero: linear-gradient(140deg, #1e3a8a 0%, #2563eb 55%, #38bdf8 100%); --wx-hero-ink: #fff; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .wx { --wx-water: #0b1424; --wx-land: #1a2436; --wx-line: rgba(148, 163, 184, .45); --wx-coast: rgba(148, 163, 184, .6);
    --wx-hero: linear-gradient(140deg, #13245a 0%, #1d3f99 60%, #0e5a7e 100%); }
}
:where(:root[data-theme="dark"]) .wx { --wx-water: #0b1424; --wx-land: #1a2436; --wx-line: rgba(148, 163, 184, .45); --wx-coast: rgba(148, 163, 184, .6);
    --wx-hero: linear-gradient(140deg, #13245a 0%, #1d3f99 60%, #0e5a7e 100%); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wx-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.wx-tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
.wx-tabs a { padding: 7px 13px; border-radius: 9px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.wx-tabs a:hover { background: var(--brand-soft); color: var(--brand-2); }
.wx-tabs a[aria-current="page"] { background: var(--brand-2); color: #fff; }
.wx-search { display: flex; gap: 6px; flex: 1; max-width: 420px; }
.wx-search input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--input); color: var(--ink); font: inherit; }
.wx-search.big { max-width: 620px; margin: 14px 0 4px; }
.wx-search.big input { padding: 13px 16px; font-size: 17px; border-radius: 12px; }
.wx-intro { padding: 26px 22px; border-radius: 16px; background: var(--wx-hero); color: var(--wx-hero-ink); margin-bottom: 16px; box-shadow: var(--shadow); }
.wx-intro h1 { margin: 0 0 6px; font-size: 32px; }
.wx-intro .lead { margin: 0; opacity: .92; color: inherit; }
.wx-intro .btn { background: #fff; color: #1e3a8a; }
.wx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wx-grid > .card, .wx-grid > div > .card:last-child { margin-bottom: 16px; }
.wx-grid.wide-left { grid-template-columns: 2fr 1fr; }
.wx-grid.three { grid-template-columns: repeat(3, 1fr); }
.wx-hero { background: var(--wx-hero); color: var(--wx-hero-ink); border: 0; }
.wx-hero .eyebrow, .wx-hero .muted { color: rgba(255, 255, 255, .78); }
.wx-hero h1 { margin-bottom: 8px; }
.wx-now-main { display: flex; align-items: center; gap: 14px; }
.wx-temp { font-size: 64px; font-weight: 750; line-height: 1; letter-spacing: -.03em; }
.wx-sky { font-size: 18px; font-weight: 600; }
.wx-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 14px; margin: 16px 0 8px; }
.wx-facts div { background: rgba(255, 255, 255, .12); border-radius: 10px; padding: 7px 10px; }
.wx-facts dt { font-size: 12px; opacity: .8; }
.wx-facts dd { margin: 0; font-weight: 650; }
.wx-facts dd span { font-weight: 500; font-size: 13px; }
.wx-alerts { margin-bottom: 16px; display: grid; gap: 8px; }
.wx-alert { border-radius: 12px; padding: 10px 14px; background: var(--warn-bg); border: 1px solid var(--warn-line); }
.wx-alert.tier-warning { background: var(--err-bg); border-color: var(--err-line); }
.wx-alert summary { cursor: pointer; }
.wx-alert p { margin: 6px 0 0; }
.wx-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.wx-day { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; }
.wx-day summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; text-align: center; }
.wx-day summary::-webkit-details-marker { display: none; }
.wx-day[open] { grid-column: 1 / -1; }
.wx-day[open] summary { flex-direction: row; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.wx-dname { font-weight: 700; font-size: 14px; }
.wx-hl b { font-size: 18px; }
.wx-hl span { color: var(--muted); }
.wx-pop { font-size: 12px; color: #2563eb; font-weight: 650; min-height: 16px; }
.wx-short { font-size: 12px; color: var(--muted); line-height: 1.3; }
.wx-detail { padding: 0 14px 10px; font-size: 14px; }
.wx-detail p { margin: 6px 0; }
.wx-hourly { width: 100%; height: auto; display: block; }
.wx-hourly .grid { stroke: var(--line); }
.wx-hourly .mid { stroke: var(--line-2); stroke-dasharray: 3 3; }
.wx-hourly .tline { fill: none; stroke: #f97316; stroke-width: 2.5; }
.wx-hourly .ta { fill: rgba(249, 115, 22, .1); }
.wx-hourly .pop { fill: rgba(37, 99, 235, .55); }
.wx-hourly .tl { font-size: 12px; fill: var(--ink); text-anchor: middle; font-weight: 650; }
.wx-hourly .xl, .wx-hourly .wl { font-size: 11px; fill: var(--muted); }
.wx-hourly .wl { text-anchor: middle; }
.wx-hourly .wl.end { text-anchor: end; }
.wx-risks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wx-risk { display: flex; gap: 8px; align-items: flex-start; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .15); flex: none; margin-top: 3px; }
.sw.inline { vertical-align: -2px; margin: 0 2px 0 0; }
.wx-counts { margin: 0; padding-left: 18px; }
/* nationwide alert map */
.wx-alert-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.wx-alert-head h1, .wx-alert-head h2 { margin: 0; }
.wx-alert-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.wx-alert-grid .wx-controls { margin: 8px 0 0; }
.wx-alert-side { max-height: 520px; overflow: auto; }
.wx-alert-types { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.wx-alert-types li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid var(--line); }
.wx-alert-types .sw { margin: 0; align-self: center; }
#wx-alert-here { margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; background: var(--wx-panel, rgba(127,127,127,.08)); }
#wx-alert-here h3 { margin: 0 0 6px; font-size: 15px; }
.wx-alert-one summary { cursor: pointer; padding: 4px 0; }
.wx-alert-one p { margin: 4px 0 6px 22px; }
.wx-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.wx-cards > .card { margin: 0; }
.wx-rf { display: inline-flex; align-items: center; gap: 4px; }
.wx-rf b { display: inline-block; width: 12px; height: 10px; border-radius: 3px; }
.wx-counts li { margin: 3px 0; }
.wx-cities { columns: 3 260px; column-gap: 24px; }
.wx-cities > div { break-inside: avoid; margin-bottom: 8px; }
.wx-cities h3 { font-size: 14px; margin: 0; }
.wx-cities p { margin: 2px 0 0; font-size: 14px; }
.wx-quiet { background: var(--card-2); }
.wx-credit { font-size: 12px; color: var(--muted); margin: 4px 2px 0; }
.wx-link { text-decoration: none; color: inherit; display: block; }
.wx-link:hover { border-color: var(--brand-2); }
.wx-link h2 { margin-top: 0; color: var(--brand-2); }

/* maps */
.wx-map { position: relative; height: 340px; border-radius: 12px; overflow: hidden; background: var(--wx-water); touch-action: none; }
.wx-map.small { height: 300px; }
.wx-map.tall { height: 470px; }
.wx-map.full { height: min(72vh, 720px); }
.wx-canvas { display: block; cursor: grab; outline: none; }
.wx-canvas:active { cursor: grabbing; }
.wx-canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--brand-2); }
.wx-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.wx-zoom button { width: 34px; height: 34px; border: 0; background: var(--card); color: var(--ink); font-size: 20px; cursor: pointer; }
.wx-zoom button + button { border-top: 1px solid var(--line); }
.wx-attr { position: absolute; left: 8px; bottom: 6px; font-size: 11px; color: var(--ink-2); background: color-mix(in srgb, var(--card) 80%, transparent); padding: 2px 6px; border-radius: 6px; }
.wx-tip { position: absolute; z-index: 2; max-width: 280px; pointer-events: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; box-shadow: var(--shadow); }
.wx-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.wx-controls select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--input); color: var(--ink); max-width: 260px; }
.wx-controls .chk { display: inline-flex; gap: 6px; align-items: center; }
.wx-time { margin-left: auto; font-weight: 650; }
.wx-loop { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.wx-loop input[type="range"] { flex: 1; min-width: 160px; }
.wx-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.wx-legend i { display: inline-block; width: 180px; height: 10px; border-radius: 5px; }
.wx-legend-img { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wx-legend-img i { display: inline-block; height: 12px; width: 280px; max-width: 60vw; border-radius: 6px; }
.seg { display: inline-flex; gap: 4px; }
.btn.ghost { background: var(--card); color: var(--brand-2); border: 1px solid var(--line-2); }
.wx-key[hidden] { display: none; }
.wx-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.wx-key span { display: inline-flex; align-items: center; gap: 5px; }
.wx-key .sw { margin: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.hail { background: #16a34a; } .dot.wind { background: #2563eb; } .dot.torn { background: #dc2626; }
.line.dash { display: inline-block; width: 22px; border-top: 2px dashed var(--ink-2); }
.wx-storm { border-left: 4px solid #64748b; padding: 4px 0 4px 12px; margin-bottom: 14px; }
.wx-storm h3 { margin: 0; }
.wx-storm p { margin: 4px 0; }
.wx-storm.cat-1 { border-color: #facc15; } .wx-storm.cat-2 { border-color: #fb923c; } .wx-storm.cat-3 { border-color: #ef4444; }
.wx-storm.cat-4 { border-color: #db2777; } .wx-storm.cat-5 { border-color: #7c3aed; }
.wx-outlooks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wx-outlooks img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.wx-outlooks figure { margin: 0; }

@media (max-width: 860px) {
  .wx-grid, .wx-grid.wide-left, .wx-grid.three, .wx-outlooks, .wx-alert-grid { grid-template-columns: 1fr; }
  .wx-cards { grid-template-columns: 1fr 1fr; }
  .wx-alert-side { max-height: none; }
  .wx-week { grid-template-columns: repeat(4, 1fr); }
  .wx-search { max-width: none; }
  .wx-map.full { height: 64vh; }
}
@media (max-width: 520px) {
  .wx-week { grid-template-columns: repeat(2, 1fr); }
  .wx-cards { grid-template-columns: 1fr; }
  .wx-facts { grid-template-columns: repeat(2, 1fr); }
  .wx-risks { grid-template-columns: 1fr; }
  .wx-temp { font-size: 52px; }
  .wx-intro h1 { font-size: 26px; }
  .wx-time { margin-left: 0; }
}
.wx-now-main .ad-icon { flex: none; margin: 0; }
.wx-chart-key { margin: 6px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wx-chart-key .k { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-left: 8px; }
.wx-chart-key .k.t { background: #f97316; margin-left: 0; }
.wx-chart-key .k.p { background: rgba(37, 99, 235, .55); height: 10px; }
.wx-hscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) { .wx-hscroll .wx-hourly { min-width: 760px; } }
