/* TexasGlance: dark dashboard.
   Layout: header / current conditions + live sky scene / hourly, 7-day, radar / flooding, power, tropics / local impact.
   One status scale everywhere: clear (green), watch (yellow), significant (orange), warning (red), unknown (gray). */

:root {
  color-scheme: dark;
  --bg: #08131D;
  --card: rgba(13, 27, 40, .9);   /* slightly see-through so the live sky behind the page shows a little */
  --tile: #132636;
  --line: rgba(148, 178, 204, .14);
  --line-2: rgba(148, 178, 204, .22);
  --ink: #E8F0F7;
  --ink-soft: #93A7B9;
  --ink-faint: #6D8296;
  --accent: #2F8FE6;
  --accent-ink: #5DB1FF;
  /* Names below are used by the app's code; keep them. */
  --surface: var(--card);
  --surface-2: var(--tile);
  --panel-solid: #12243A;
  --bayou: #5DB1FF;
  --bayou-2: #2F8FE6;
  --bayou-tint: rgba(93, 177, 255, .14);
  --clear: #3DD68C;        --clear-bg: rgba(61, 214, 140, .12);
  --watch: #F5C84B;        --watch-bg: rgba(245, 200, 75, .13);   --watch-dot: #F5C84B;
  --significant: #FF9F5A;  --significant-bg: rgba(255, 159, 90, .14);
  --warning: #FF6B5B;      --warning-bg: rgba(255, 107, 91, .15);
  --unknown: #8FA3B5;      --unknown-bg: rgba(143, 163, 181, .12);
  --sun: #FFB938; --moon: #DCE4F2; --cloud: #C3D2DD; --rain: #4DA8FF;
  --radius-sm: 10px;
  --radius-lg: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: radial-gradient(1200px 600px at 75% -10%, #10263A 0%, transparent 60%), var(--bg); background-attachment: fixed; color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { max-width: 1480px; margin: 0 auto; padding: 0 20px; }
.visually-hidden, .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip: auto; left: 16px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 1000; }
.muted { color: var(--ink-soft); }
svg.ic { display: block; }
h1, h2, h3 { letter-spacing: -0.01em; }

/* ---------- Status helpers ---------- */
.led { position: relative; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--unknown); flex: none; }
[data-level="clear"] .led, .led[data-level="clear"] { background: var(--clear); }
[data-level="watch"] .led, .led[data-level="watch"] { background: var(--watch-dot); }
[data-level="significant"] .led, .led[data-level="significant"] { background: var(--significant); }
[data-level="warning"] .led, .led[data-level="warning"] { background: var(--warning); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--unknown-bg); color: var(--unknown); vertical-align: 1px; }
.tag[data-level="clear"] { background: var(--clear-bg); color: var(--clear); }
.tag[data-level="watch"] { background: var(--watch-bg); color: var(--watch); }
.tag[data-level="significant"] { background: var(--significant-bg); color: var(--significant); }
.tag[data-level="warning"] { background: var(--warning-bg); color: var(--warning); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--unknown); flex: none; }
.sw[data-level="clear"] { background: var(--clear); }
.sw[data-level="watch"] { background: var(--watch-dot); }
.sw[data-level="significant"] { background: var(--significant); }
.sw[data-level="warning"] { background: var(--warning); }

.skel, .skel-row, .skel-tile { display: block; background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.05) 75%); background-size: 200% 100%; border-radius: 8px; animation: shimmer 1.4s infinite linear; }
.skel { height: 14px; margin: 8px 0; } .skel.tall { height: 64px; }
.skel.w40 { width: 40%; } .skel.w60 { width: 60%; } .skel.w80 { width: 80%; }
.skel-tile { height: 84px; list-style: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Header ---------- */
.masthead { position: sticky; top: 0; z-index: 500; background: rgba(8, 19, 29, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.masthead-row { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 22px; flex: none; }
.brand svg { color: var(--accent-ink); }
.topnav { display: flex; gap: 4px; }
.topnav a { position: relative; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 550; padding: 8px 14px; border-radius: 10px; opacity: .85; }
.topnav a:hover { opacity: 1; background: rgba(255, 255, 255, .05); }
.topnav a.on { opacity: 1; background: rgba(47, 143, 230, .16); box-shadow: inset 0 0 0 1px rgba(93, 177, 255, .35); }
.topnav a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -11px; height: 2px; border-radius: 2px; background: var(--accent-ink); }
.masthead-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.find { display: flex; align-items: center; gap: 8px; width: 290px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; color: var(--ink-soft); }
.find:focus-within { border-color: var(--accent-ink); background: rgba(255, 255, 255, .06); }
.find input { flex: 1; min-width: 0; font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; padding: 9px 0; outline: none; }
.find input::placeholder { color: var(--ink-faint); }
.icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; color: var(--ink); background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); }
.place-chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 12px; border: 1px solid rgba(93, 177, 255, .5); background: rgba(47, 143, 230, .14); border-radius: 10px; color: var(--accent-ink); cursor: pointer; }
.place-chip select { font: inherit; font-size: 14px; font-weight: 650; color: var(--ink); background: transparent; border: 0; padding: 6px 4px; cursor: pointer; max-width: 170px; }
.place-chip select option, .place-chip select optgroup { background: #12243A; color: var(--ink); }
.fresh .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #9FB3BB; box-shadow: 0 0 0 2px var(--bg); }
.fresh[data-state="live"] .dot { background: var(--clear); }
.fresh[data-state="delayed"] .dot { background: var(--watch); }
.fresh[data-state="down"] .dot { background: var(--warning); }
.where { margin: 10px auto 0; font-size: 14px; color: var(--ink-soft); }
.where:empty { display: none; }
@media (max-width: 1240px) { .topnav a { padding: 8px 10px; } .find { width: 220px; } }
@media (max-width: 1100px) { .topnav { display: none; } }
@media (max-width: 640px) {
  /* Phone: brand + place + status on the first line, search + locate on the second */
  .masthead-row { flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 10px; min-height: 0; }
  .masthead-tools { display: contents; }
  .brand { font-size: 19px; order: 1; margin-right: auto; }
  .place-chip { order: 2; height: 36px; }
  .place-chip select { max-width: 130px; font-size: 13.5px; }
  #fresh { order: 3; width: 36px; height: 36px; }
  #install { order: 3; width: 36px; height: 36px; }
  #share { display: none; }
  .find { order: 4; flex: 1 1 auto; width: auto; min-width: 0; }
  #locate { order: 5; }
}

.fresh-panel { position: absolute; left: 0; right: 0; top: 100%; }
.fresh-card { margin-left: auto; max-width: 440px; background: var(--panel-solid); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 16px 18px; margin-top: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.fresh-head { display: flex; justify-content: space-between; align-items: center; }
.fresh-head h2 { margin: 0; font-size: 17px; }
.x { font: inherit; font-size: 24px; line-height: 1; background: none; border: 0; color: var(--ink-soft); cursor: pointer; padding: 2px 6px; }
.fresh-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.fresh-table th { text-align: left; font-weight: 600; color: var(--ink-soft); padding: 6px 0; border-bottom: 1px solid var(--line); }
.fresh-table td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.fresh-table td:nth-child(2) { color: var(--ink-soft); }
.fresh-note { font-size: 13px; color: var(--ink-soft); margin: 10px 0 0; }

/* ---------- Layout ---------- */
.row { margin-top: 16px; display: grid; gap: 16px; }
.row.top { grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); margin-top: 16px; }
.row.three { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1.05fr); }
.row.three > .card { min-width: 0; }
@media (max-width: 1240px) {
  .row.top { grid-template-columns: minmax(0, 1fr); }
  .scene { min-height: 230px; }
  .row.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row.three > .card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) { .row.three { grid-template-columns: minmax(0, 1fr); } .row.three > .card:first-child { grid-column: auto; } }

.card { position: relative; background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0) 40%), var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0, 0, 0, .22); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; font-weight: 700; }
.card-meta { font-size: 13px; color: var(--ink-soft); }
.card-meta a { color: inherit; }
.more { font: inherit; font-size: 13.5px; font-weight: 550; color: var(--accent-ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.more:hover { text-decoration: underline; }
.card-note { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.card-note a { color: var(--ink-soft); }
.card-note:empty { display: none; }

/* Tabs */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tabs.left { margin: -2px 0 12px; }
.tabs button { font: inherit; font-size: 13px; font-weight: 550; color: var(--ink); background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); padding: 6px 13px; border-radius: 8px; cursor: pointer; }
.tabs button:hover { background: rgba(255, 255, 255, .07); }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Buttons and banners */
.btn { font: inherit; font-weight: 600; font-size: 14px; padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid rgba(93, 177, 255, .55); background: transparent; color: var(--accent-ink); cursor: pointer; }
.btn:hover { background: rgba(47, 143, 230, .12); }
.btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.btn.expand { margin-top: 14px; width: 100%; }
.banner { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--unknown-bg); border: 1px solid rgba(143, 163, 181, .25); font-size: 14px; }
.banner[data-level="clear"] { background: var(--clear-bg); border-color: rgba(61, 214, 140, .3); }
.banner[data-level="watch"] { background: var(--watch-bg); border-color: rgba(245, 200, 75, .32); }
.banner[data-level="significant"] { background: var(--significant-bg); border-color: rgba(255, 159, 90, .35); }
.banner[data-level="warning"] { background: var(--warning-bg); border-color: rgba(255, 107, 91, .4); }
.banner:empty { display: none; }
.banner .b-ic { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.banner[data-level="clear"] .b-ic { color: var(--clear); }
.banner[data-level="watch"] .b-ic { color: var(--watch); }
.banner[data-level="significant"] .b-ic { color: var(--significant); }
.banner[data-level="warning"] .b-ic { color: var(--warning); }
.banner[data-level="unknown"] .b-ic { color: var(--unknown); }
.banner strong { font-weight: 700; }
.banner .sub { display: block; color: var(--ink-soft); font-size: 13px; }
.stale-note, .stale { background: var(--watch-bg); color: var(--watch); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13.5px; margin: 8px 0 0; }
.unavailable { background: var(--unknown-bg); color: var(--ink-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin: 8px 0 0; font-size: 14px; }
.unavailable a { color: var(--ink); }

/* ---------- Current conditions ---------- */
.cur { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .78fr) minmax(0, 1.42fr); gap: 20px 28px; padding: 22px 24px; }
@media (max-width: 1000px) { .cur { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .cur-c { grid-column: 1 / -1; } }
@media (max-width: 560px) { .cur { grid-template-columns: minmax(0, 1fr); padding: 18px; } }
.cur-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cur-head .pin { color: var(--accent-ink); flex: none; }
.cur-head h1 { margin: 0; font-size: 24px; font-weight: 750; line-height: 1.2; }
.chip-btn { font: inherit; font-size: 13px; font-weight: 550; color: var(--ink); background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 11px; cursor: pointer; }
.chip-btn:hover { background: rgba(255, 255, 255, .09); }
.cur-when { margin: 8px 0 0; font-size: 14px; color: var(--ink-soft); }
.cur-main { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.cur-main .big-ic { width: 96px; height: 96px; flex: none; }
.cur-temp { font-size: 76px; font-weight: 750; line-height: .95; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cur-temp sup { font-size: 30px; font-weight: 600; vertical-align: top; position: relative; top: 6px; margin-left: 2px; letter-spacing: 0; }
.cur-desc { margin: 8px 0 0; font-size: 19px; font-weight: 600; }
.cur-feels { margin: 4px 0 0; color: var(--ink-soft); }
.cur-feels .tag { margin-left: 4px; }
.cur-foot { margin: 14px 0 0; font-size: 12px; color: var(--ink-faint); }

.cur-stats { margin: 0; align-self: center; display: grid; gap: 0; }
.cur-stats > div { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cur-stats > div:last-child { border-bottom: 0; }
.cur-stats svg { width: 18px; height: 18px; color: var(--rain); }
.cur-stats dt { color: var(--ink-soft); font-size: 14px; }
.cur-stats dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

.cur-c { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.alerts-pill { align-self: flex-end; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 14px 7px 10px; border-radius: 10px; font-size: 13.5px; font-weight: 600; background: var(--unknown-bg); border: 1px solid rgba(143, 163, 181, .3); color: var(--ink); text-decoration: none; }
.alerts-pill .pill-ic { position: relative; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--unknown); color: #08131D; flex: none; }
.alerts-pill .pill-ic svg { width: 13px; height: 13px; }
.alerts-pill[data-level="clear"] { background: var(--clear-bg); border-color: rgba(61, 214, 140, .4); }
.alerts-pill[data-level="clear"] .pill-ic { background: var(--clear); }
.alerts-pill[data-level="watch"] { background: var(--watch-bg); border-color: rgba(245, 200, 75, .45); }
.alerts-pill[data-level="watch"] .pill-ic { background: var(--watch); }
.alerts-pill[data-level="significant"] { background: var(--significant-bg); border-color: rgba(255, 159, 90, .5); }
.alerts-pill[data-level="significant"] .pill-ic { background: var(--significant); }
.alerts-pill[data-level="warning"] { background: var(--warning-bg); border-color: rgba(255, 107, 91, .55); }
.alerts-pill[data-level="warning"] .pill-ic { background: var(--warning); }

.outlook { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; text-decoration: none; color: var(--ink); background: linear-gradient(135deg, rgba(47, 143, 230, .22), rgba(47, 143, 230, .08)); border: 1px solid rgba(93, 177, 255, .4); }
.outlook:hover { border-color: var(--accent-ink); }
.outlook-ic svg { width: 44px; height: 44px; display: block; }
.outlook-txt { flex: 1; min-width: 0; }
.outlook .t { display: block; font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.outlook #headline { display: block; font-size: 14px; color: #D3E2EE; line-height: 1.45; }
.outlook .chev { font-size: 24px; color: var(--ink-soft); }
.cur[data-status="watch"] .outlook { background: linear-gradient(135deg, rgba(245, 200, 75, .18), rgba(245, 200, 75, .05)); border-color: rgba(245, 200, 75, .45); }
.cur[data-status="significant"] .outlook { background: linear-gradient(135deg, rgba(255, 159, 90, .2), rgba(255, 159, 90, .06)); border-color: rgba(255, 159, 90, .5); }
.cur[data-status="warning"] .outlook { background: linear-gradient(135deg, rgba(255, 107, 91, .24), rgba(255, 107, 91, .08)); border-color: rgba(255, 107, 91, .6); }

.minis { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 420px) { .minis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.minis li:not(.skel-tile) { background: var(--tile); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.minis .t { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; }
.minis .m-ic { width: 18px; height: 18px; flex: none; }
.minis .v { margin: 4px 0 0; font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minis .s { margin: 2px 0 0; font-size: 12px; color: var(--ink-soft); line-height: 1.35; }
.minis [data-level="clear"] .m-ic { color: var(--clear); }
.minis [data-level="watch"] .m-ic { color: var(--watch); }
.minis [data-level="significant"] .m-ic { color: var(--significant); }
.minis [data-level="warning"] .m-ic { color: var(--warning); }
.minis [data-level="unknown"] .m-ic, .minis [data-level="none"] .m-ic { color: var(--accent-ink); }

/* ---------- Scene: live sky over a skyline ---------- */
.scene { padding: 0; overflow: hidden; isolation: isolate; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%; z-index: 1; pointer-events: none; }
.skyline .far { fill: #13263A; opacity: .85; }
.skyline .near { fill: #0B1826; }
.skyline .trees { fill: #07111B; }
.skyline .win { fill: #FFD27A; opacity: 0; transition: opacity 1.2s ease; }
:root[data-sky="night"] .skyline .win, :root[data-sky="dusk"] .skyline .win { opacity: .75; }
:root[data-sky="night"] .skyline .near { fill: #060F18; }
:root[data-sky="night"] .skyline .far { fill: #0C1A28; }
.scene::after { content: ""; position: absolute; inset: 40% 0 0; z-index: 1; background: linear-gradient(180deg, transparent, rgba(5, 12, 19, .85)); pointer-events: none; }
.scene-text { position: relative; z-index: 2; padding: 0 22px 14px; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.scene-text h2 { margin: 0; font-size: 26px; font-weight: 750; }
.scene-text p { margin: 2px 0 0; font-size: 14px; color: #DCE7F0; }
.scene-sun { position: absolute; z-index: 2; right: 14px; top: 14px; margin: 0; display: flex; gap: 6px; font-size: 12px; }
.scene-sun span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 8px; background: rgba(5, 12, 19, .55); border: 1px solid rgba(255, 255, 255, .14); }
.scene-sun svg { width: 14px; height: 14px; }

/* ---------- Alerts ---------- */
#alerts-wrap:empty { display: none; }
#alerts-wrap { margin-top: 16px; }
.alert { background: var(--card); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 12px; border: 1px solid var(--line); border-left: 6px solid var(--watch-dot); }
.alert[data-level="significant"] { border-left-color: var(--significant); }
.alert[data-level="warning"] { border-left-color: var(--warning); background: linear-gradient(90deg, var(--warning-bg), transparent 70%), var(--card); }
.alert h3 { margin: 0 0 2px; font-size: 20px; line-height: 1.25; }
.alert .when { margin: 0 0 8px; font-size: 13.5px; color: var(--ink-soft); }
.alert .do { margin: 8px 0 0; font-weight: 650; }
.alert details { margin-top: 8px; }
.alert summary { cursor: pointer; color: var(--accent-ink); font-size: 14px; font-weight: 600; }
.alert pre { white-space: pre-wrap; font: inherit; font-size: 14px; margin: 8px 0 0; max-width: 80ch; color: var(--ink-soft); }

/* ---------- Hourly ---------- */
.h-ic svg { display: block; }
.hourly { position: relative; }
.hourly .cols { display: grid; padding-left: 40px; }
.hourly .h { text-align: center; font-variant-numeric: tabular-nums; min-width: 0; }
.hourly .h-time { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.hourly .h-time.day { color: var(--ink); font-weight: 700; }
.hourly .h svg { width: 26px; height: 26px; margin: 6px auto; }
.hourly .h-val { font-weight: 700; font-size: 14.5px; }
.hchart { display: block; width: 100%; margin-top: 6px; overflow: visible; }
.hchart .hgrid { stroke: rgba(148, 178, 204, .1); }
.hchart .ylab, .hchart .xlab { fill: var(--ink-soft); font-size: 11.5px; font-family: var(--font); }
.hsum { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }
.hsum b { color: var(--ink); font-weight: 650; }

/* ---------- 7-day ---------- */
.daily { list-style: none; margin: 0; padding: 0; }
.daily li { border-top: 1px solid var(--line); }
.daily li:first-child { border-top: 0; }
.daily summary { list-style: none; display: grid; grid-template-columns: 44px 56px 32px minmax(0, 1fr) 62px; align-items: center; gap: 8px; padding: 8px 6px; cursor: pointer; font-variant-numeric: tabular-nums; border-radius: 8px; transition: background .15s ease; }
.daily summary::-webkit-details-marker { display: none; }
.daily summary:hover { background: rgba(255, 255, 255, .04); }
.daily .d-name { font-weight: 700; }
.daily .d-date { color: var(--ink-soft); font-size: 13px; }
.daily svg.ic { width: 28px; height: 28px; }
.daily .d-temps { font-weight: 650; text-align: center; white-space: nowrap; }
.daily .d-temps .lo { color: var(--ink-soft); font-weight: 500; }
.daily .d-rain { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; color: var(--ink); line-height: 1.2; }
.daily .d-rain span { display: inline-flex; align-items: center; gap: 4px; }
.daily .d-rain svg { width: 12px; height: 12px; color: var(--rain); }
.daily .d-rain small { font-size: 10.5px; color: var(--ink-soft); }
.daily .d-detail { margin: 0 6px 10px; font-size: 13.5px; color: var(--ink-soft); }
@media (max-width: 420px) { .daily summary { grid-template-columns: 40px 50px 28px minmax(0, 1fr) 54px; gap: 6px; } }

/* ---------- Radar ---------- */
.map { height: 320px; border-radius: 12px; border: 1px solid var(--line); background: #0D1A26; z-index: 1; }
.map-wrap { position: relative; }
.radar-map { height: 250px; }
.radar-ctrl { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 500; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: rgba(8, 19, 29, .82); border: 1px solid var(--line-2); border-radius: 12px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.radar-ctrl .play { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; }
.radar-ctrl .play .i-pause, .radar-ctrl .play.on .i-play { display: none; }
.radar-ctrl .play.on .i-pause { display: block; }
.radar-ctrl input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }
.radar-time { min-width: 76px; font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.radar-now { font-size: 12.5px; color: var(--ink-soft); }
.radar-legend { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--ink-soft); }
.radar-legend i { flex: 1; height: 7px; border-radius: 4px; background: linear-gradient(90deg, #2E8BFF, #2FD3C3, #3DD68C, #F5E14B, #FF9F3A, #FF4D4D, #D946EF); }
.radar-frame { transition: opacity .22s linear; }
.sat-layer { mix-blend-mode: screen; }
.sat-layer.ir { filter: contrast(1.6) brightness(.9); }
.sat-layer.vis { filter: contrast(1.25) brightness(1.05); }

.leaflet-container { font-family: var(--font); font-size: 13px; background: #0D1A26; }
.basemap { filter: invert(1) hue-rotate(180deg) saturate(.35) brightness(.85) contrast(.95); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel-solid); color: var(--ink); }
.leaflet-container a.leaflet-popup-close-button { color: var(--ink-soft); }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--panel-solid); color: var(--ink); border-bottom-color: var(--line); }
.leaflet-container .leaflet-control-attribution { background: rgba(8, 19, 29, .75); color: var(--ink-soft); }
.leaflet-container .leaflet-control-attribution a { color: var(--accent-ink); }
#radar .leaflet-bottom { bottom: 58px; }

/* ---------- Flooding ---------- */
.gtable { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.gtable th { text-align: left; font-size: 12.5px; font-weight: 550; color: var(--ink-soft); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.gtable td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.gtable tr:last-child td { border-bottom: 0; }
.gtable tr[data-id] { cursor: pointer; }
.gtable tr[data-id]:hover td { background: rgba(255, 255, 255, .03); }
.gtable .g-name { font-weight: 650; line-height: 1.3; }
.gtable .g-name .sw { margin-right: 7px; vertical-align: 0; }
.gtable .tag { margin-left: 4px; }
.num-c { text-align: right; white-space: nowrap; }
@media (max-width: 480px) { .gtable { font-size: 12.5px; } .gtable th, .gtable td { padding: 8px 4px; } .gtable th { font-size: 11.5px; } .t-c { width: 38px; } }
.t-c { text-align: center; width: 54px; }
.trend { display: inline-flex; color: var(--ink-soft); }
.trend svg { width: 18px; height: 18px; }
.trend[data-level="significant"] { color: var(--significant); }
.trend[data-level="watch"] { color: var(--watch-dot); }
.trend[data-level="clear"] { color: var(--clear); }
#flooding.wide { grid-column: 1 / -1; }
#flooding .map { margin-top: 14px; }
@media (min-width: 1000px) {
  #flooding.wide .collapse-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
  #flooding.wide .collapse-inner > .map { grid-row: 1 / span 4; height: 460px; }
  #flooding.wide .gauges { max-height: 330px; }
}
.gauge-tools { display: flex; gap: 8px; margin: 12px 0 0; flex-wrap: wrap; }
.gauge-tools input { flex: 1 1 200px; font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: rgba(255, 255, 255, .04); color: var(--ink); }
.tool-msg { font-size: 13px; color: var(--ink-soft); margin: 6px 0 0; }
.tool-msg:empty { display: none; }
.gauges { list-style: none; margin: 10px 0 0; padding: 0; max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.gauges li { display: grid; grid-template-columns: 12px 1fr auto; gap: 2px 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
.gauges li[data-id] { cursor: pointer; transition: background .15s ease; }
.gauges li:first-child { border-top: 0; }
.gauges li[data-id]:hover, .gauges li.active { background: rgba(255, 255, 255, .04); }
.gauges .sw { margin-top: 6px; }
.gauges .name { font-weight: 600; line-height: 1.3; }
.gauges .meta { grid-column: 2 / -1; font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.gauges .stage { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.gauges .empty { display: block; color: var(--ink-soft); }
.gauges .tag { margin-left: 6px; }
.legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-soft); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Power ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 2px 0 0; }
.stats > div { padding: 0 12px; border-left: 1px solid var(--line); min-width: 0; }
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-size: 13px; color: var(--ink-soft); }
.stats dd { margin: 2px 0 0; font-weight: 750; font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats dd small { font-size: 13px; font-weight: 650; }
.stats dd .pct { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.chart { position: relative; margin-top: 14px; }
.chart:empty { display: none; }
.chart svg { width: 100%; height: 160px; display: block; overflow: visible; }
.chart .axis text { font-size: 11px; fill: var(--ink-soft); font-family: var(--font); }
.chart .gridline { stroke: rgba(148, 178, 204, .1); stroke-width: 1; }
.chart .cap-area { fill: rgba(61, 214, 140, .07); }
.chart .cap-line { fill: none; stroke: var(--clear); stroke-width: 2; }
.chart .dem { fill: none; stroke: var(--accent-ink); stroke-width: 2.5; stroke-linejoin: round; }
.chart .dem.fc { stroke-dasharray: 5 4; opacity: .8; }
.chart .now-line { stroke: var(--ink-faint); stroke-dasharray: 2 3; }
.chart .hover-dot { visibility: hidden; fill: var(--accent-ink); stroke: var(--card); stroke-width: 2; }
.chart .hover-dot.on { visibility: visible; }
.chart .tip { position: absolute; top: 0; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 12.5px; padding: 6px 9px; border-radius: 6px; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 12.5px; color: var(--ink-soft); margin: 8px 0 0; }
.chart-legend i { display: inline-block; width: 16px; height: 0; border-top: 3px solid var(--accent-ink); border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.chart-legend i.cap { border-top-color: var(--clear); }
.chart-legend i.fc { border-top-style: dashed; }

/* ---------- Tropics ---------- */
.impact-line { display: flex; align-items: center; gap: 8px; margin: 0; }
.impact-line strong { font-size: 15px; }
.tropics-why { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.storm { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--tile); border: 1px solid var(--line); }
.storm:has(.cone-wrap) { column-gap: 14px; }
.storm > :not(.cone-wrap) { grid-column: 2; }
.cone-wrap { grid-column: 1; grid-row: 1 / span 4; }
.cone { display: block; width: 116px; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.storm h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.storm .meta { color: var(--ink-soft); font-size: 13px; margin: 2px 0 6px; }
.storm .facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 2px 22px; margin: 4px 0 0; }
.storm .facts dt { font-size: 12px; color: var(--ink-soft); }
.storm .facts dd { margin: 0; font-weight: 700; font-size: 14px; }
.storm .links { margin: 8px 0 0; font-size: 13.5px; display: flex; gap: 14px; flex-wrap: wrap; }
.storm[data-level="significant"] { border-color: rgba(255, 159, 90, .45); }
.storm[data-level="warning"] { border-color: rgba(255, 107, 91, .55); background: linear-gradient(90deg, var(--warning-bg), transparent), var(--tile); }
@media (max-width: 420px) { .storm { grid-template-columns: minmax(0, 1fr); } .storm > :not(.cone-wrap), .cone-wrap { grid-column: 1; grid-row: auto; } .cone { width: 100%; max-width: 280px; margin-bottom: 8px; } }
.season { margin-top: 14px; }
.season-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); position: relative; overflow: hidden; }
.season-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; }
.season-peak { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--ink-soft); }
.season p { font-size: 12.5px; color: var(--ink-soft); margin: 6px 0 0; }

/* ---------- Local impact & planning ---------- */
.impact { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 12px; }
.impact li:not(.skel-tile) { padding: 0; border-radius: 12px; background: var(--tile); border: 1px solid var(--line); transition: transform .2s ease, border-color .2s ease; }
.impact li:not(.skel-tile):hover { transform: translateY(-2px); border-color: var(--line-2); }
.impact a { display: grid; grid-template-columns: 46px minmax(0, 1fr) 14px; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; text-decoration: none; height: 100%; }
.impact .t-ic { width: 46px; height: 46px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); color: var(--unknown); }
.impact [data-level="clear"] .t-ic, .impact li[data-level="clear"] .t-ic { color: var(--clear); background: var(--clear-bg); }
.impact li[data-level="watch"] .t-ic { color: var(--watch); background: var(--watch-bg); }
.impact li[data-level="significant"] .t-ic { color: var(--significant); background: var(--significant-bg); }
.impact li[data-level="warning"] .t-ic { color: var(--warning); background: var(--warning-bg); }
.impact .t { font-size: 12.5px; color: var(--ink-soft); margin: 0; }
.impact .v { font-weight: 700; font-size: 15.5px; margin: 1px 0; line-height: 1.25; }
.impact .why { font-size: 12.5px; color: var(--ink-soft); margin: 0; line-height: 1.4; }
.impact .chev { font-size: 22px; color: var(--ink-soft); transition: transform .2s ease; }
.impact li:hover .chev { transform: translateX(3px); color: var(--ink); }

/* ---------- Money ---------- */
.sponsor { margin-top: 16px; }
.sponsor:empty { display: none; }
.sponsor-card { display: flex; gap: 6px 12px; align-items: baseline; flex-wrap: wrap; text-decoration: none; color: var(--ink); background: var(--card); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; }
.sponsor-card .who { color: var(--ink-soft); font-size: 12.5px; }
.ad-slot { margin-top: 16px; }
.ad-slot:empty { display: none; }
.ad-slot .ad-label { font-size: 12px; color: var(--ink-soft); margin: 0 0 4px; }

/* ---------- Footer ---------- */
.footer { margin-top: 32px; border-top: 1px solid var(--line); background: rgba(5, 12, 19, .6); padding: 28px 0 40px; font-size: 14px; color: var(--ink-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer p { margin: 0 0 10px; max-width: 60ch; line-height: 1.7; }
.footer a { color: var(--ink); }
.footer-brand { font-weight: 800; font-size: 17px; color: var(--ink); }
.footer-h { font-weight: 700; color: var(--ink); margin-bottom: 4px !important; }
.footer .emergency { color: var(--ink); font-weight: 650; }

/* ---------- Mobile ---------- */
.bottomnav { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .wrap { padding: 0 14px; }
  .card { padding: 16px; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 600; background: rgba(8, 19, 29, .96); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); text-decoration: none; padding: 4px 0; transition: color .2s ease; }
  .bottomnav svg { width: 22px; height: 22px; }
  .bottomnav a.on { color: var(--accent-ink); }
  .bottomnav a::before { content: ""; position: absolute; top: -6px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent-ink); transform: scaleX(0); transition: transform .25s ease; }
  .bottomnav a.on::before { transform: scaleX(1); }
  .cur-temp { font-size: 64px; }
  .cur-main .big-ic { width: 76px; height: 76px; }
}
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 900; animation: toast-in .25s ease-out; }

/* =====================================================================================
   Live sky (inside the scene card)
   ===================================================================================== */
.sky { position: absolute; inset: 0; z-index: 0; overflow: hidden; container-type: inline-size; --fall: 360px; --sky-a: #1C6FA8; --sky-b: #58A7D6;
  background: linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 100%); }
.sky[data-phase="dawn"] { --sky-a: #2C4E7A; --sky-b: #D08A6A; }
.sky[data-phase="dusk"] { --sky-a: #2D2B5E; --sky-b: #C26A5E; }
.sky[data-phase="night"] { --sky-a: #050D1A; --sky-b: #16305A; }
.sky[data-wx="cloud"] { --sky-a: #3A6584; --sky-b: #7FA3BC; }
.sky[data-wx="rain"] { --sky-a: #1E3E52; --sky-b: #4A6D82; }
.sky[data-wx="storm"] { --sky-a: #18232E; --sky-b: #3A4F5E; }
.sky[data-wx="fog"] { --sky-a: #50636E; --sky-b: #8A9CA6; }
.sky[data-wx="snow"] { --sky-a: #50687C; --sky-b: #95AABA; }
.sky[data-phase="night"]:not([data-wx="clear"]):not([data-wx="partly"]) { --sky-a: #0A141E; --sky-b: #22323F; }
.sky > * { position: absolute; pointer-events: none; }
.sky-glow { width: 360px; height: 360px; right: -60px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 140, .75) 0%, rgba(255, 210, 130, .2) 35%, rgba(255, 210, 130, 0) 68%);
  animation: glow 8s ease-in-out infinite alternate; }
.sky-glow.moon { background: radial-gradient(circle, rgba(230, 236, 255, .55) 0%, rgba(220, 230, 255, .12) 30%, rgba(220, 230, 255, 0) 66%); }
@keyframes glow { from { transform: scale(.94); opacity: .85; } to { transform: scale(1.06); opacity: 1; } }
.sky-star { width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: twinkle var(--d) ease-in-out var(--del) infinite alternate; }
@keyframes twinkle { from { opacity: .15; } to { opacity: .95; } }
.sky-cloud { left: var(--x); animation: sky-drift var(--dur) linear var(--del) infinite; }
@keyframes sky-drift { from { transform: translateX(calc(-105% - var(--x))); } to { transform: translateX(calc(100cqw - var(--x) + 5%)); } }
.sky-drop { top: -40px; width: 1.5px; height: 18px; border-radius: 1px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .75)); animation: rainfall var(--d) linear var(--del) infinite; }
@keyframes rainfall { from { transform: translate(0, 0) rotate(9deg); } to { transform: translate(calc(var(--fall) * -0.16), var(--fall)) rotate(9deg); } }
.sky-flash { inset: 0; background: #fff; opacity: 0; animation: flash 9s linear infinite; }
@keyframes flash { 0%, 86%, 100% { opacity: 0; } 87% { opacity: .22; } 88% { opacity: 0; } 90% { opacity: .14; } 91% { opacity: 0; } }
.sky-fog { left: -30%; width: 160%; height: 34px; border-radius: 20px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .16) 30%, rgba(255, 255, 255, .16) 70%, rgba(255, 255, 255, 0)); animation: fogdrift var(--d) ease-in-out var(--del) infinite alternate; }
@keyframes fogdrift { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
.sky-flake { top: -10px; width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .85); animation: snowfall var(--d) linear var(--del) infinite; }
@keyframes snowfall { 0% { transform: translate(0, 0); } 50% { transform: translate(14px, calc(var(--fall) / 2)); } 100% { transform: translate(-4px, var(--fall)); } }

/* =====================================================================================
   Motion: icons, numbers, intros, pulses. Only transform and opacity animate.
   ===================================================================================== */
.brand .beat { stroke-dasharray: .3 2; stroke-dashoffset: .3; animation: beat 3.4s cubic-bezier(.45, 0, .25, 1) infinite; }
@keyframes beat { 0% { stroke-dashoffset: .3; } 55%, 100% { stroke-dashoffset: -1; } }
.fresh.ping .dot { animation: ping .9s ease-out 1; }
@keyframes ping { from { box-shadow: 0 0 0 0 rgba(61, 214, 140, .7); } to { box-shadow: 0 0 0 10px rgba(61, 214, 140, 0); } }

.ic .rays, .ic .moon { transform-box: fill-box; transform-origin: center; }
.ic .rays { animation: ic-spin 28s linear infinite paused; }
.ic .moon { animation: ic-rock 6s ease-in-out infinite alternate paused; }
.ic .cloud { animation: ic-drift 5s ease-in-out infinite alternate paused; }
.ic .drops path { animation: ic-drop 1.1s linear infinite paused; }
.ic .drops .d2 { animation-delay: -.37s; } .ic .drops .d3 { animation-delay: -.74s; }
.ic .bolt { animation: ic-bolt 3.2s steps(1, end) infinite paused; }
.ic .fogl path { animation: ic-fog 3.5s ease-in-out infinite alternate paused; }
.ic .fogl path + path { animation-delay: -1.7s; }
.ic .flake { animation: ic-snow 2.4s linear infinite paused; }
.ic .f2 { animation-delay: -.8s; } .ic .f3 { animation-delay: -1.6s; }
.ic.live *, .h:hover .ic *, .daily summary:hover .ic *, .daily details[open] .ic * { animation-play-state: running; }
@keyframes ic-spin { to { transform: rotate(360deg); } }
@keyframes ic-rock { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes ic-drift { from { transform: translateX(-1.5px); } to { transform: translateX(1.5px); } }
@keyframes ic-drop { 0% { transform: translateY(-3px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(5px); opacity: 0; } }
@keyframes ic-bolt { 0%, 64%, 72%, 100% { opacity: 1; } 66%, 74% { opacity: .25; } }
@keyframes ic-fog { from { transform: translateX(-2px); } to { transform: translateX(2px); } }
@keyframes ic-snow { 0% { transform: translateY(-3px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(5px); opacity: 0; } }

.num { font-variant-numeric: tabular-nums; border-radius: 4px; }
.num.changed { animation: changed 1.8s ease-out; }
@keyframes changed { from { background: rgba(255, 185, 56, .35); box-shadow: 0 0 0 3px rgba(255, 185, 56, .35); } to { background: rgba(255, 185, 56, 0); box-shadow: 0 0 0 3px rgba(255, 185, 56, 0); } }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
.cur.revealing .cur-a, .cur.revealing .cur-stats > div, .cur.revealing .cur-c > * { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.cur.revealing .cur-stats > div { animation-delay: calc(.08s + var(--i, 0) * 50ms); }
.cur.revealing .cur-c > :nth-child(2) { animation-delay: .12s; }
.cur.revealing .cur-c > :nth-child(3) { animation-delay: .2s; }
.card.revealing .impact li { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.card.revealing .curve { stroke-dasharray: 1; animation: draw 1.4s cubic-bezier(.3, .6, .2, 1) both; }
.card.revealing .hchart .area { animation: fade .9s ease both; }
.card.revealing .hchart .bar { transform-box: fill-box; transform-origin: bottom; animation: grow-y .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 25ms); }
.card.revealing .daily li { animation: rise .45s ease both; animation-delay: calc(var(--i, 0) * 50ms); }
.card.revealing .gtable tbody tr { animation: rise .45s ease both; animation-delay: calc(var(--i, 0) * 60ms); }
.card.revealing .season-bar span { transform-origin: left; animation: grow-x .9s cubic-bezier(.2, .7, .2, 1) both; }
.card.revealing .storm { animation: rise .5s ease both; }

.chart.drawing .dem:not(.fc), .chart.drawing .cap-line { stroke-dasharray: 1; animation: draw 1.1s cubic-bezier(.3, .6, .2, 1) both; }
.chart.drawing .cap-area { animation: fade .8s .25s both; }
.chart.drawing .dem.fc, .chart.drawing .now-line, .chart.drawing .chart-now { animation: fade .5s 1s both; }
.chart-now { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent-ink); pointer-events: none; }
.chart-now::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: led-ring 2s ease-out infinite; }

.banner[data-level="warning"] .led::after, .banner[data-level="significant"] .led::after,
.impact-line .led[data-level="warning"]::after, .impact-line .led[data-level="significant"]::after,
.alerts-pill[data-level="warning"] .pill-ic::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: led-ring 2s ease-out infinite; }
@keyframes led-ring { from { transform: scale(1); opacity: .6; } to { transform: scale(2.8); opacity: 0; } }
.alert[data-level="warning"] { animation: alert-glow 2.6s ease-in-out infinite; }
@keyframes alert-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 91, 0); } 50% { box-shadow: 0 0 0 5px rgba(255, 107, 91, .18); } }

.gpulse-wrap { background: none; border: 0; }
.gpulse { display: block; position: relative; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); background: var(--significant); }
.gpulse[data-level="warning"] { background: var(--warning); }
.gpulse::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; background: inherit; animation: led-ring 1.8s ease-out infinite; z-index: -1; }

.storm-spin { width: 18px; height: 18px; flex: none; color: var(--ink-soft); animation: spin-ccw var(--spin, 6s) linear infinite; }
.storm[data-level="significant"] .storm-spin { color: var(--significant); }
.storm[data-level="warning"] .storm-spin { color: var(--warning); }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }

.collapse { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .4s cubic-bezier(.2, .7, .2, 1), opacity .3s ease; }
.collapse.open { grid-template-rows: 1fr; opacity: 1; }
.collapse-inner { overflow: hidden; min-height: 0; }
.fresh-card { animation: pop .18s ease-out; transform-origin: top right; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
.daily details[open] .d-detail { animation: rise .3s ease both; }
.btn, .icon-btn, .chip-btn, .tabs button, .radar-ctrl .play { transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease; }
.btn:active, .icon-btn:active, .chip-btn:active, .radar-ctrl .play:active { transform: scale(.96); }

main { transition: opacity .25s ease; }
body.switching main { opacity: .55; }

/* ---- Reduced motion: a still, fully readable page ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .sky-drop, .sky-flake, .sky-flash, .sky-star, .sky-cloud, .sky-fog, .sky-glow, .brand .beat { animation: none !important; }
  .sky-flash, .sky-drop, .sky-flake { display: none; }
}

/* Simple pages (methodology, privacy, 404) */
.panel, .hero { padding-top: 28px; padding-bottom: 48px; }
.hero-sub { font-size: 17px; color: var(--ink-soft); }

/* Phone: the answer (alerts + outlook) before the detail rows */
@media (max-width: 560px) {
  .cur-c { order: 2; }
  .cur-stats { order: 3; }
  .alerts-pill { align-self: flex-start; }
}

/* ---- Live sky behind the whole page ---- */
.sky.page-sky { position: fixed; inset: 0 0 auto 0; height: 100vh; height: 100lvh; z-index: 0; }
.masthead { z-index: 500; }
main, .footer, .where { position: relative; z-index: 1; }
.footer { background: rgba(5, 12, 19, .82); }

/* ---- Real photo of the place in the scene card (Wikimedia Commons) ---- */
.scene-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0; transition: opacity .6s ease, filter 1.2s ease; }
.scene-photo:not([src]) { display: none; }
.scene.has-photo .scene-photo.loaded { opacity: 1; }
.scene.has-photo .sky { background: none; }
.scene.has-photo .sky-glow, .scene.has-photo .sky-star, .scene.has-photo .sky-cloud, .scene.has-photo .skyline { display: none; }
.scene.has-photo::after { inset: 35% 0 0; background: linear-gradient(180deg, transparent, rgba(5, 12, 19, .88)); }
/* The photo takes on the weather: darker at night, warmer at dawn and dusk, greyer in rain and storms */
:root[data-sky="night"] .scene-photo { filter: brightness(.45) saturate(.75) hue-rotate(10deg); }
:root[data-sky="dawn"] .scene-photo, :root[data-sky="dusk"] .scene-photo { filter: brightness(.85) saturate(1.1) sepia(.18); }
:root[data-skywx="cloud"] .scene-photo { filter: saturate(.8) brightness(.92); }
:root[data-skywx="rain"] .scene-photo, :root[data-skywx="fog"] .scene-photo { filter: saturate(.6) brightness(.75); }
:root[data-skywx="storm"] .scene-photo { filter: saturate(.5) brightness(.6) contrast(1.05); }
:root[data-sky="night"][data-skywx="rain"] .scene-photo, :root[data-sky="night"][data-skywx="storm"] .scene-photo { filter: saturate(.5) brightness(.4); }
.scene-credit { position: relative; z-index: 2; margin: 0; padding: 0 22px 10px; font-size: 10.5px; color: rgba(255, 255, 255, .62); }
.scene-credit a { color: inherit; }
.scene-credit:empty { display: none; }
