/* Safe Mode styles (no SW/PWA) */
:root{
  --pw-blue:#1b3a6b;
  --pw-blue2:#0b5cab;
  --pw-accent:#2dd4bf;
  --pw-warn:#ffcc00;
  --pw-danger:#ff3b30;
  --pw-low:#6b7280;
  --bg:#0b1220;
  --bg2:#0f1b33;
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.08);
  --text:#fff;
  --muted:#a6b0c3;
  --line:rgba(255,255,255,.10);
  --btn:#1e2c52;
  --badge-alert:var(--pw-danger);
  --badge-live:var(--pw-accent);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(11,92,171,.35), transparent 60%),
              radial-gradient(900px 500px at 90% 0%, rgba(45,212,191,.18), transparent 55%),
              linear-gradient(180deg, var(--bg2), var(--bg));
  color:var(--text);
}
.topbar{
  position:sticky; top:0; z-index:50;
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 12px calc(10px + env(safe-area-inset-top));
  background:linear-gradient(180deg, rgba(27,58,107,.85), rgba(11,18,32,.98));
  border-bottom:1px solid var(--line);
}
.brand{font-weight:900;font-size:1.15rem}
.brandWrap{display:flex;flex-direction:column;gap:4px}
.timeRow{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.time{color:var(--muted);font-size:.9rem}
.chip{
  font-size:.75rem; font-weight:900;
  padding:4px 8px; border-radius:999px;
  background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.10);
  color:#e9eefc;
}
.btn{
  border:0; background:var(--btn); color:var(--text);
  padding:10px 12px; border-radius:12px; font-weight:900;
}
.app{padding:12px 12px calc(90px + env(safe-area-inset-bottom))}
.view{display:none}
.view.active{display:block}
.card{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  margin-bottom:12px;
}
.card__head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:10px}
.card h2{margin:0;font-size:1.0rem}
.muted{color:var(#255,255,255,0.96); font-size:.85rem}
.divider{height:1px;background:var(--line);margin:12px 0}
.hero__row{display:grid;grid-template-columns:1.2fr 1fr;gap:12px}
.temp__value{font-size:3.2rem;font-weight:900;line-height:1}
.temp__meta{margin-top:6px;color:var(--255,255,255,0.96);font-weight:800}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.stat{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:10px}
.stat__k{font-size:.75rem;color:var(--255,255,255,0.96);font-weight:900}
.stat__v{font-size:.95rem;font-weight:900}
.hero__bottom{display:flex;gap:10px;flex-wrap:wrap}
.pill{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.10);padding:8px 10px;border-radius:999px;font-weight:900}
.hidden{display:none !important}
.today{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.today__block{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:12px}
.today__label{font-weight:900}
.today__temp{font-size:1.8rem;font-weight:900;margin-top:4px}
.today__desc{color:var(255,255,255,0.96);font-weight:800;margin-top:4px}
.today__mini{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}
.mini{font-size:.85rem;color:#d6def2;font-weight:800}
.details summary{cursor:pointer;font-weight:900;margin-top:10px}
.details__body{margin-top:10px; color:#d9e2f7; line-height:1.35}
.strip{display:flex;gap:10px;overflow-x:auto;padding-bottom:6px;scroll-snap-type:x mandatory}
.dayCard{min-width:130px;scroll-snap-align:start;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:10px}
.dayCard__name{font-weight:900}
.dayCard__temp{font-size:1.2rem;font-weight:900;margin-top:6px}
.dayCard__desc{color:rgba(255,255,255,0.96);font-weight:800;font-size:.85rem;margin-top:4px}
.dayCard__meta{color:#d6def2;font-weight:800;font-size:.82rem;margin-top:8px}
.dnTag{font-size:.7rem;color:var(--muted);font-weight:900;margin-left:6px}
.ticker{
  margin:10px 12px 0;
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  overflow:hidden;
  background:rgba(160,160,160,.16);
  --ticker-label-bg: rgba(160,160,160,.30);
  --ticker-label-text: var(--text);
}
.ticker__label{
  padding:8px 10px;
  font-size:.75rem;
  font-weight:900;
  letter-spacing:.8px;
  background:var(--ticker-label-bg);
  color:var(--ticker-label-text);
}
.ticker__marquee{padding:10px;white-space:nowrap;overflow:hidden}
.ticker__text{display:inline-block;padding-left:100%;animation:marquee 20s linear infinite}
@keyframes marquee{0%{transform:translateX(0)}100%{transform:translateX(-100%)}}

/* ALERT LEVEL COLORS */
.ticker--low{
  background:rgba(160,160,160,.16);
  --ticker-label-bg: rgba(160,160,160,.30);
  --ticker-label-text: var(--text);
}
.ticker--watch{
  background:rgba(255, 204, 0, .20);
  --ticker-label-bg: rgba(255, 204, 0, .40);
  --ticker-label-text: #0b1220;
}
.ticker--warning{
  background:rgba(177,27,43,.20);
  --ticker-label-bg: rgba(177,27,43,.38);
  --ticker-label-text: var(--text);
}
100%{transform:translateX(-100%)}}
.radarWrap{border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.10)}
.radarFrame{width:100%;height:420px;border:0;display:block}
.hint{margin-top:10px;color:var(--muted);font-size:.85rem;font-weight:700}
.mapWrap{border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.10)}
.map{width:100%;height:420px;background:#0f1730}
.alertList{display:grid;gap:10px;margin-top:12px}
.alertCard{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:12px}
.alertTitle{font-weight:1000}
.alertMeta{color:var(--muted);font-weight:800;margin-top:4px;font-size:.85rem}
.alertBody{color:#e9eefc;margin-top:8px;line-height:1.35}
.more .row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.row__k{color:var(255,255,255,0.96);font-weight:900}
.row__v{font-weight:900;text-align:right}
.bottomNav{
  position:fixed; left:0; right:0; bottom:0; z-index:60;
  background:rgba(12,18,32,.92); backdrop-filter:blur(10px);
  border-top:1px solid var(--line);
  padding:10px 10px calc(10px + env(safe-area-inset-bottom));
  display:flex;
  gap:8px;
  flex-wrap:nowrap;
}
.bottomNav .tab{
  flex:1 1 0;
  min-width:0;
}
.bottomNav{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.bottomNav::-webkit-scrollbar{ height:0; }

.tab{
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  color:#e9eefc;
  padding:10px 8px;
  border-radius:14px;
  display:flex;flex-direction:column;align-items:center;gap:4px;
  font-weight:900;
}
.tab.active{background:rgba(30,44,82,.60);border-color:rgba(120,150,255,.35)}
.tab__icon{font-size:1.05rem}
.tab__label{font-size:.70rem; line-height:1}

@media (max-width:360px){
  .tab__label{display:none}
  .tab{padding:10px 6px}
}

@media (max-width:420px){
  .hero__row{grid-template-columns:1fr}
  .today{grid-template-columns:1fr}
  .radarFrame,.map{height:360px}
}

.obsDetails{
  display:grid;
  gap:8px;
  padding-top:2px;
}
.detailRow{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}
.detailRow__k{color:var(255,255,255,0.96); font-weight:900}
.detailRow__v{font-weight:1000}
.next24Grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:10px;
}
@media (max-width:520px){
  .next24Grid{grid-template-columns:1fr}
}

#obsFeelsInline{color:rgba(255,255,255,0.96); font-weight:900;}

/* Dynamic backgrounds (no images, just gradients) */
body.bg-clear-day{
  background: linear-gradient(180deg, rgba(38,125,212,.55), rgba(11,18,32,1) 65%);
}
body.bg-clear-night{
  /* starry-ish: layered radial gradients */
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.16) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 28%, rgba(255,255,255,.12) 0 1px, transparent 2px),
    radial-gradient(circle at 35% 62%, rgba(255,255,255,.10) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 72%, rgba(255,255,255,.10) 0 1px, transparent 2px),
    radial-gradient(circle at 55% 12%, rgba(255,255,255,.10) 0 1px, transparent 2px),
    radial-gradient(circle at 22% 78%, rgba(255,255,255,.10) 0 1px, transparent 2px),
    linear-gradient(180deg, rgba(20,26,56,.85), rgba(11,18,32,1) 70%);
}
body.bg-cloudy{
  background: linear-gradient(180deg, rgba(90,105,132,.70), rgba(11,18,32,1) 70%);
}
body.bg-rain{
  background: linear-gradient(180deg, rgba(28,57,97,.80), rgba(11,18,32,1) 72%);
}
body.bg-snow{
  background: linear-gradient(180deg, rgba(178,208,236,.55), rgba(11,18,32,1) 72%);
}
body.bg-thunder{
  background: linear-gradient(180deg, rgba(38,27,74,.85), rgba(11,18,32,1) 70%);
}
body.bg-fog{
  background: linear-gradient(180deg, rgba(150,165,186,.55), rgba(11,18,32,1) 72%);
}


/* Spacing polish */
:root{
  --badge-alert:#ff3b30;
  --badge-live:#2dd4bf;
  --pad: 14px;
  --cardPad: 14px;
  --cardRadius: 18px;
}

.container{
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.card{
  border-radius: var(--cardRadius);
}

.card + .card{
  margin-top: 12px;
}

.card__head{
  margin-bottom: 10px;
}

.strip{
  gap: 10px;
  padding-bottom: 4px;
}

.row{
  padding: 10px 0;
}

.divider{
  margin: 10px 0;
}

.bottomNav{
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
}

.tab{
  padding: 10px 6px;
  border-radius: 14px;
}

.tab__label{
  margin-top: 2px;
}

/* SPC Outlooks */
.outlookBtns{
  display:flex;
  gap:8px;
  margin-bottom:10px;
  flex-wrap:wrap;
}
.outlookBtns .btn.sm{
  padding:6px 10px;
  font-size:.82rem;
}


/* Mobile-friendly SPC image fit */
#view-outlooks .imgWrap{
  overflow:hidden;
  border-radius:16px;
}
#view-outlooks #spcImg{
  width:100%;
  height:auto;
  display:block;
  max-height:70vh;
  object-fit:contain;
  background:rgba(0,0,0,.18);
}
@media (max-width: 420px){
  #view-outlooks #spcImg{ max-height:64vh; }
}

/* Blog tab (in-app) */
.blogActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}
.btn.ghost{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}

/* ===== Ad slots ===== */
.adCard{ padding: 12px; }
.ad{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
  overflow:hidden;
}
.ad__left{
  display:flex;
  gap:10px;
  align-items:center;
  min-width:0;
}
.ad__badge{
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 800;
  opacity: .78;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  white-space: nowrap;
}
.ad__text{ min-width:0; }
.ad__title{
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.ad__desc{
  opacity:.85;
  font-size:.9rem;
  line-height:1.2;
  margin-top:2px;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.ad__cta{ flex:0 0 auto; margin-right: 8px; }
.ad__link{ text-decoration:none; color:inherit; }

/* ===== Blog tab polish ===== */
.blogHero{
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.blogHero__title{
  font-weight: 950;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.blogHero__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.btn.ghost{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
.blogList{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.blogItem{
  display:block;
  padding:12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
  color: inherit;
  text-decoration:none;
}
.blogItem__title{
  font-weight: 900;
  line-height: 1.2;
}
.blogItem__meta{
  margin-top: 2px;
  font-size: .85rem;
  color: rgba(255,255,255,.72);
}
.blogItem__excerpt{
  margin-top: 8px;
  line-height: 1.35;
  color: rgba(255,255,255,.86);
}
@media (max-width: 520px){
  .blogHero{ flex-direction:column; }
  .blogHero__actions{ justify-content:flex-start; }
}

/* ===== Promos (ad-blocker friendly) ===== */
.promoCard{ padding: 12px; }
.promo{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration:none;
  color: inherit;
}
.promo__tag{
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 4px;
}
.promo__title{
  font-weight: 800;
  font-size: 15px;
  line-height: 1.1;
  margin-bottom: 2px;
}
.promo__body{
  font-size: 13px;
  opacity: 0.78;
  line-height: 1.2;
}
.promo__cta{ flex: 0 0 auto; }

/* ===== 7-day strip polish ===== */
.dnTag{ display:none !important; }

.strip .dayCard{
  width: 165px;
  /* Let cards grow vertically so text is never truncated */
  min-height: 0;
  padding: 14px 14px 12px 14px;
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.strip .dayCard .dayCard__name{
  font-size: 18px;
  line-height: 1.15;
  font-weight: 800;
  display:block;
  overflow:visible;
  white-space: normal;
  min-height: 0;
}
.strip .dayCard .dayCard__temp{
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
}
.strip .dayCard .dayCard__desc{
  font-size: 16px;
  line-height: 1.15;
  opacity: 0.80;
  display:block;
  overflow:visible;
  white-space: normal;
  min-height: 0;
}
.strip .dayCard .dayCard__meta{
  margin-top: auto;
  font-size: 14px;
  line-height: 1.2;
  opacity: 0.92;
  display:block;
  overflow:visible;
  white-space: normal;
  min-height: 0;
}

/* ===== Blog tab polish ===== */
.blogHeader{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.blogHeader h2{
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.2px;
}
.blogHeader .blogSub{
  margin: 4px 0 0 0;
  opacity: 0.78;
  font-size: 14px;
  line-height: 1.35;
  max-width: 46ch;
}

.blogList{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.blogPostCard{
  padding: 14px 14px 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.blogPostCard a{
  color: rgba(255,255,255,0.95);
  text-decoration: none;
}
.blogPostTitle{
  font-size: 18px;
  font-weight: 850;
  line-height: 1.18;
  margin: 0 0 6px 0;
}
.blogPostMeta{
  font-size: 13px;
  opacity: 0.75;
  margin-bottom: 8px;
}
.blogPostExcerpt{
  font-size: 14px;
  line-height: 1.35;
  opacity: 0.88;
  margin: 0;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.blogHint{
  margin-top: 14px;
  font-size: 12.5px;
  opacity: 0.65;
}
.blogHint code{
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
}


/* ===== Bottom nav: force single-line fit ===== */
.bottomNav {
  padding: 6px 4px;
}

.bottomNav .navBtn {
  flex: 1 1 auto;
  padding: 6px 2px;
  min-width: 0;
}

.bottomNav .navI {
  font-size: 18px;
  line-height: 1;
}

.bottomNav .navT {
  font-size: 10px;
  margin-top: 2px;
  white-space: nowrap;
}

/* Extra small screens */
@media (max-width: 360px) {
  .bottomNav .navI {
    font-size: 16px;
  }
  .bottomNav .navT {
    font-size: 9px;
  }
}


/* ===== Text contrast improvements ===== */
/* Improves readability on bright (sunny) backgrounds without breaking dark themes */

/* Primary text */
body {
  color: rgba(255,255,255,0.96);
}

/* Secondary / muted text */
.small,
.muted,
.subtle,
.label {
  color: rgba(255,255,255,0.80);
}

/* Card & panel text */
.card,
.panel,
.sheet {
  color: rgba(255,255,255,0.96);
}

/* Headings */
h1, h2, h3, h4 {
  color: rgba(255,255,255,0.98);
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

/* Improve numeric readability (temps, wind, etc.) */
.temp,
.value,
.number,
.stat {
  color: rgba(255,255,255,0.98);
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}

/* Buttons & tabs */
button,
.navBtn {
  color: rgba(255,255,255,0.95);
}

/* Icons */
svg,
.icon,
.navI {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45));
}


/* === TEMP LAUNCH MODE: neutral background until background UI is finalized === */
body,
body[class^="bg-"],
body[class*=" bg-"]{
  background: linear-gradient(180deg, rgba(130,140,155,.85) 0%, rgba(70,78,92,.92) 55%, rgba(11,18,32,1) 100%) fixed !important;
}


/* Lists inside details (SPC meanings, etc.) */
.bulletList{margin:0; padding-left:18px;}
.bulletList li{margin:6px 0;}


/* ---- LIVE TAB ---- */
.liveEmbed iframe{
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 16px;
}
.liveFallback .btn{
  display:inline-block;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  text-decoration:none;
  color:inherit;
  background:rgba(255,255,255,.04);
  font-weight:700;
}


/* ---- Tab badges (Live / Alerts) ---- */
.bottomNav .tab{ position:relative; }
.tabBadge{
  position:absolute;
  top:6px;
  right:10px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.3px;
  padding:2px 6px;
  border-radius:999px;
  color:#0b1220;
  background:var(--badge-alert);
  display:none;
  line-height:1.2;
}
#badgeLive{ background:var(--badge-live); }


/* ---- Manual Event Messaging (status/status.json) ---- */
.impactSummary{
  margin: 10px 0 12px;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  font-weight: 700;
  line-height: 1.25;
}
.impactSummary.impact--advisory{
  border-color: rgba(156,163,175,.35);
  background: rgba(156,163,175,.10);
}
.impactSummary.impact--watch{
  border-color: rgba(255,214,10,.35);
  background: rgba(255,214,10,.10);
}
.impactSummary.impact--warning{
  border-color: rgba(255,59,48,.35);
  background: rgba(255,59,48,.10);
}
.confidencePill{
  display:inline-block;
  margin: 0 0 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .2px;
  background: rgba(255,255,255,.04);
}
.winterOverride{
  margin: 0 0 12px;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.04);
}
.winterOverride .woRow{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.winterOverride .woKey{ color: var(--muted); font-weight: 700; }
.winterOverride .woVal{ font-weight: 900; }


/* Alert cards + modal */
.alertCard{cursor:pointer; position:relative}
.alertCard:focus{outline:2px solid rgba(255,255,255,.35); outline-offset:2px}
.alertCard--low{border-left:6px solid rgba(160,160,160,.75)}
.alertCard--watch{border-left:6px solid rgba(255,204,0,.90)}
.alertCard--warning{border-left:6px solid rgba(177,27,43,.95)}
.alertCard__hint{margin-top:8px;color:var(--muted);font-weight:800;font-size:.8rem}

.modal{position:fixed; inset:0; display:flex; align-items:flex-end; justify-content:center; z-index:999}
.modal.hidden{display:none}
.modal__backdrop{position:absolute; inset:0; background:rgba(0,0,0,.55)}
.modal__panel{
  position:relative;
  width:min(920px, 100%);
  max-height:88vh;
  margin:0 10px 10px;
  background:#0f1730;
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.45);
  overflow:hidden;
}
.modal__close{
  position:absolute; top:10px; right:10px;
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:22px; font-weight:900;
  cursor:pointer;
}
.modal__content{padding:18px 16px 16px; overflow:auto; max-height:88vh}
.modalOpen{overflow:hidden}
.modal h3{margin:0 0 6px; font-size:1.1rem}
.modal .metaLine{color:var(--muted); font-weight:800; margin:0 0 10px}
.modal .sectionTitle{margin:14px 0 6px; font-weight:1000}
.modal .mono{white-space:pre-wrap; line-height:1.35; color:#e9eefc}
.modal a{color:#a7c6ff; font-weight:900}

/* City selector */
.srOnly{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.topControls{display:flex; align-items:center; gap:10px;}
.citySelect{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  padding: 8px 30px 8px 12px;
  font: inherit;
  line-height: 1;
}
.citySelect:focus{outline:2px solid rgba(255,255,255,.25); outline-offset:2px;}
.citySelect option, .citySelect optgroup{background:#0b1220; color:#fff;}
/* small chevron */
.topControls{position:relative;}
.topControls::after{
  content:"▾";
  position:absolute;
  right:12px;
  pointer-events:none;
  opacity:.8;
  font-size:12px;
}
@media (max-width: 420px){
  .citySelect{max-width: 150px;}
}


/* ===== Network / NWS hiccup banner ===== */
.netBanner{
  position: sticky;
  top: 56px;
  z-index: 49;
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background: rgba(15, 23, 42, .92);
  backdrop-filter: blur(10px);
}
.netBanner.hidden{ display:none; }
.netBanner__dot{
  width:10px;height:10px;border-radius:999px;
  background: var(--pw-warn);
  box-shadow: 0 0 0 0 rgba(255,204,0,.35);
  animation: dotpulse 1.6s infinite;
}
.netBanner__text{ font-size: 14px; color: rgba(255,255,255,.92); }
@keyframes dotpulse{
  0%{ box-shadow:0 0 0 0 rgba(255,204,0,.35); }
  70%{ box-shadow:0 0 0 10px rgba(255,204,0,0); }
  100%{ box-shadow:0 0 0 0 rgba(255,204,0,0); }
}


/* ===== Warning pulse (subtle) ===== */
.ticker--warning{
  position: relative;
}
.ticker--warning::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255,59,48,.35);
  animation: warnpulse 1.8s infinite;
  pointer-events:none;
}
@keyframes warnpulse{
  0%{ box-shadow:0 0 0 0 rgba(255,59,48,.32); }
  70%{ box-shadow:0 0 0 14px rgba(255,59,48,0); }
  100%{ box-shadow:0 0 0 0 rgba(255,59,48,0); }
}

/* -----------------------------
   Roads (IDOT Winter Conditions)
------------------------------*/
.roadsWrap{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}
.roadsMap{
  width:100%;
  height:62vh;
  min-height:360px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  overflow:hidden;
}
.roadsLegend{
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  padding:12px;
  background:rgba(255,255,255,.04);
}
.legendTitle{ font-weight:700; margin-bottom:8px; }
.legendRow{ display:flex; align-items:center; gap:10px; margin:6px 0; }
.swatch{ width:14px; height:14px; border-radius:4px; border:1px solid rgba(0,0,0,.25); }
.swatch-clear{ background:#9aa3b2; }
.swatch-partly{ background:#bed2ff; }
.swatch-mostly{ background:#ffbee8; }
.swatch-covered{ background:#c500ff; }
.legendNote{ margin-top:10px; line-height:1.25; }

@media (min-width: 900px){
  .roadsWrap{
    grid-template-columns: 2fr 1fr;
    align-items:start;
  }
  .roadsMap{ height:70vh; }
}


/* ===== Ads (image banners) ===== */
.adLink{ display:block; text-decoration:none; color:inherit; }
.adCard{
  position:relative;
  border-radius: 16px;
  overflow:hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
}
.adBadge{
  position:absolute;
  top:10px; right:10px;
  font-size: 10px;
  letter-spacing: .10em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  z-index:2;
}
.adImg{
  width: 100%;
  height: auto;
  display:block;

  /* keep banners from getting "super crazy" on big screens */
  max-height: clamp(120px, 22vw, 220px);
  object-fit: contain;

  /* prevent huge width on desktop, but still responsive */
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 420px){
  .adImg{ max-height: 140px; }
}
