/* StoryShift — Weather section (red/beach variation, centered hero) */
:root, html body {
  --ssw-red: #e23b2e;
  --ssw-red-dark: #c22d22;
  --ssw-teal: #1c7a4f;
  --ssw-sand: #f3f1ed;
  --ssw-sand-2: #e7e3dc;
  --ssw-ink: #101418;
  --ssw-grey: #6b7480;
  --ssw-line: #e7e3dc;
  --ssw-amber: #d97706;
  --ssw-radius: 8px;
  --ssw-shadow: 0 2px 8px rgba(16,20,24,.08);
  --ssw-navy: var(--ssw-red);
  --ssw-navy-deep: var(--ssw-red-dark);
  --ssw-crimson: var(--ssw-teal);
  --ssw-sky: var(--ssw-teal);
  --ssw-sky-soft: var(--ssw-sand);
  --ssw-paper: var(--ssw-sand);
  --ssw-paper-2: var(--ssw-sand-2);
}
/* ---------- shared widget shell ---------- */
.ssw {
  margin: 18px 0 26px;
  font-family: inherit;
}
.ssw-loading {
  padding: 28px 20px;
  text-align: center;
  color: var(--ssw-grey);
  background: var(--ssw-sky-soft);
  border: 1px solid var(--ssw-line);
  border-radius: var(--ssw-radius);
  font-size: 15px;
}
.ssw-credit {
  margin: 10px 2px 0;
  font-size: 12.5px;
  color: var(--ssw-grey);
}
.ssw-credit a { color: var(--ssw-sky); text-decoration: none; }
.ssw-credit a:hover { text-decoration: underline; }

/* ---------- "now" hero ---------- */
.ssw-now {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 24px 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--ssw-navy) 0%, var(--ssw-sky) 100%);
  border-radius: var(--ssw-radius) var(--ssw-radius) 0 0; border-top: 4px solid var(--ssw-red);
  box-shadow: var(--ssw-shadow);
}
.ssw-now-main { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ssw-now-icon { font-size: 58px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.ssw-now-temp { font-size: 56px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; }
.ssw-now-temp .ssw-unit { font-size: 24px; font-weight: 600; vertical-align: super; opacity: .8; }
.ssw-now-meta { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ssw-now-desc { font-size: 20px; font-weight: 700; }
.ssw-now-place { font-size: 15px; opacity: .92; }
.ssw-now-sub { font-size: 13.5px; opacity: .85; margin-top: 4px; }

/* ---------- daily strip ---------- */
.ssw-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--ssw-line);
  border: 1px solid var(--ssw-line);
  border-top: 0;
  border-radius: 0 0 var(--ssw-radius) var(--ssw-radius);
  overflow: hidden;
}
.ssw-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 6px;
  background: #fff;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s ease;
}
.ssw-day:hover, .ssw-day:focus-visible { background: var(--ssw-sky-soft); outline: none; }
.ssw-day.is-sel { background: var(--ssw-sky-soft); box-shadow: inset 0 -3px 0 var(--ssw-crimson); }
.ssw-day.is-today .ssw-day-name { color: var(--ssw-crimson); font-weight: 800; }
.ssw-day-name { font-size: 12.5px; font-weight: 700; color: var(--ssw-navy); text-transform: uppercase; letter-spacing: .3px; }
.ssw-day-icon { font-size: 28px; line-height: 1; }
.ssw-day-hi { font-size: 16px; font-weight: 800; color: var(--ssw-ink); }
.ssw-day-lo { font-size: 13px; color: var(--ssw-grey); }
.ssw-day-pp { font-size: 11.5px; color: var(--ssw-sky); font-weight: 600; }

/* ---------- hourly track ---------- */
.ssw-hourly { margin-top: 14px; }
.ssw-hourly-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 4px 14px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.ssw-hr {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 62px;
  padding: 10px 8px;
  background: #fff;
  border: 1px solid var(--ssw-line);
  border-radius: 11px;
  scroll-snap-align: start;
}
.ssw-hr-t { font-size: 12px; color: var(--ssw-grey); font-weight: 600; }
.ssw-hr-i { font-size: 22px; line-height: 1; }
.ssw-hr-deg { font-size: 15px; font-weight: 800; color: var(--ssw-ink); }
.ssw-hr-pp { font-size: 11px; color: var(--ssw-sky); }

/* ---------- extra row: UV + sunrise/sunset ---------- */
.ssw-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 11px 26px;
  background: var(--ssw-sky-soft);
  border-left: 1px solid var(--ssw-line);
  border-right: 1px solid var(--ssw-line);
  font-size: 13.5px;
  color: var(--ssw-ink);
}
.ssw-extra .ssw-x b { color: var(--ssw-navy); font-weight: 700; }

/* ---------- pollen / sea / snow band cards ---------- */
.ssw-band {
  display: inline-block;
  margin: 2px 0;
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.ssw-band.ssw-lo { background: #2e9e5b; }
.ssw-band.ssw-mo { background: #e8932a; }
.ssw-band.ssw-hi { background: #e0571f; }
.ssw-band.ssw-vh { background: var(--ssw-crimson); }
.ssw-pollen.lo { border-top: 3px solid #2e9e5b; }
.ssw-pollen.mo { border-top: 3px solid #e8932a; }
.ssw-pollen.hi { border-top: 3px solid #e0571f; }
.ssw-pollen.vh { border-top: 3px solid var(--ssw-crimson); }
.ssw-sea .ssw-card-temp { color: var(--ssw-sky); }
.ssw-snow { border-top: 3px solid var(--ssw-sky); }

/* ---------- multi / compare grid ---------- */
.ssw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.ssw-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 16px 12px 14px;
  background: #fff;
  border: 1px solid var(--ssw-line);
  border-radius: var(--ssw-radius);
  box-shadow: var(--ssw-shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ssw-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(21,41,63,.12); }
.ssw-card.is-top { border-color: var(--ssw-crimson); box-shadow: 0 0 0 2px rgba(196,30,58,.12), var(--ssw-shadow); }
.ssw-card.is-cold { border-color: var(--ssw-sky); }
.ssw-rank {
  position: absolute; top: 8px; left: 10px;
  font-size: 13px; font-weight: 800; color: var(--ssw-grey);
}
.ssw-card.is-top .ssw-rank { color: var(--ssw-crimson); }
.ssw-card-icon { font-size: 34px; line-height: 1; }
.ssw-card-name { font-size: 14.5px; font-weight: 700; color: var(--ssw-navy); text-align: center; }
.ssw-card-temp { font-size: 26px; font-weight: 800; color: var(--ssw-ink); letter-spacing: -.5px; }
.ssw-card-hl { font-size: 12px; color: var(--ssw-grey); }
.ssw-card-desc { font-size: 12px; color: var(--ssw-sky); font-weight: 600; }

/* ---------- compare lead (warmest/coldest) ---------- */
.ssw-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.ssw-lead-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 22px;
  border-radius: var(--ssw-radius);
  color: #fff;
}
.ssw-lead-item.is-warm { background: linear-gradient(135deg, var(--ssw-crimson) 0%, var(--ssw-amber) 100%); }
.ssw-lead-item.is-coldest { background: linear-gradient(135deg, var(--ssw-navy) 0%, var(--ssw-sky) 100%); }
.ssw-lead-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .6px; opacity: .9; font-weight: 700; }
.ssw-lead-place { font-size: 22px; font-weight: 800; }
.ssw-lead-temp { font-size: 30px; font-weight: 800; letter-spacing: -1px; }

/* ---------- radar ---------- */
.ssw-radar-embed {
  position: relative;
  border-radius: var(--ssw-radius);
  overflow: hidden;
  border: 1px solid var(--ssw-line);
  box-shadow: var(--ssw-shadow);
  aspect-ratio: 16 / 10;
}
.ssw-radar-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =========================================================================
   Weather PAGE layout (body.page-template / .sswx-page)
   ========================================================================= */
.sswx-bc {
  font-size: 13px;
  color: var(--ssw-grey);
  margin: 0 0 14px;
}
.sswx-bc a { color: var(--ssw-navy); text-decoration: none; }
.sswx-bc a:hover { text-decoration: underline; }
.sswx-bc span { color: var(--ssw-crimson); }

.sswx-lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ssw-ink);
  font-weight: 500;
  border-left: 4px solid var(--ssw-crimson);
  padding: 2px 0 2px 18px;
  margin: 0 0 8px;
}

.sswx-page h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  color: var(--ssw-navy);
  margin: 34px 0 12px;
  position: relative;
  padding-left: 16px;
}
.sswx-page h2::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 5px; border-radius: 3px; background: var(--ssw-crimson);
}
.sswx-page h3 { font-size: 20px; color: var(--ssw-navy); margin: 24px 0 8px; }
.sswx-page p { font-size: 16.5px; line-height: 1.72; color: #2a3441; margin: 0 0 16px; }
.sswx-page ul, .sswx-page ol { font-size: 16.5px; line-height: 1.7; color: #2a3441; padding-left: 22px; }
.sswx-page li { margin-bottom: 7px; }
.sswx-page a { color: var(--ssw-sky); }

/* key facts callout */
.sswx-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 20px 0 26px;
}
.sswx-fact {
  padding: 16px 18px;
  background: var(--ssw-paper);
  border: 1px solid var(--ssw-line);
  border-top: 3px solid var(--ssw-navy);
  border-radius: 11px;
}
.sswx-fact b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--ssw-grey); margin-bottom: 4px; }
.sswx-fact span { font-size: 18px; font-weight: 700; color: var(--ssw-ink); }

/* FAQ */
.sswx-faq { margin: 22px 0; }
.sswx-faq details {
  border: 1px solid var(--ssw-line);
  border-radius: 11px;
  margin-bottom: 10px;
  background: #fff;
  overflow: hidden;
}
.sswx-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 50px 15px 18px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ssw-navy);
  position: relative;
}
.sswx-faq summary::-webkit-details-marker { display: none; }
.sswx-faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; line-height: 24px; text-align: center;
  border-radius: 50%; background: var(--ssw-sky-soft); color: var(--ssw-navy); font-size: 20px; font-weight: 600;
}
.sswx-faq details[open] summary::after { content: "−"; background: var(--ssw-crimson); color: #fff; }
.sswx-faq details > div { padding: 0 18px 16px; }
.sswx-faq details p { margin: 0; font-size: 15.5px; }

/* related links */
.sswx-related {
  margin: 30px 0 10px;
  padding: 22px 24px;
  background: var(--ssw-paper-2);
  border-radius: var(--ssw-radius);
}
.sswx-related h2 { margin-top: 0; }
.sswx-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.sswx-related-grid a {
  display: block;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--ssw-line);
  border-radius: 9px;
  text-decoration: none;
  color: var(--ssw-navy);
  font-weight: 600;
  font-size: 14.5px;
  transition: border-color .15s ease, color .15s ease;
}
.sswx-related-grid a:hover { border-color: var(--ssw-crimson); color: var(--ssw-crimson); }

.sswx-updated {
  font-size: 13px;
  color: #475569;
  background: var(--ssw-paper);
  border-left: 3px solid var(--ssw-sky);
  padding: 9px 14px;
  border-radius: 0 8px 8px 0;
  margin: 0 0 18px;
}

/* byline / EEAT */
.sswx-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ssw-grey);
  margin: 4px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ssw-line);
}
.sswx-byline a { color: var(--ssw-navy); text-decoration: none; font-weight: 600; }
.sswx-byline a:hover { text-decoration: underline; }
.sswx-rev { color: #1a7f4b; font-weight: 600; }
.sswx-rev::before { content: "✓ "; }

/* =========================================================================
   Weather HUB (/weather/)
   ========================================================================= */
.sswx-hub-hero {
  padding: 30px 30px 26px;
  background: linear-gradient(135deg, var(--ssw-navy-deep) 0%, var(--ssw-sky) 130%);
  color: #fff;
  border-radius: 18px;
  margin-bottom: 24px;
}
.sswx-hub-hero h1 { color: #fff; font-size: 34px; margin: 0 0 8px; }
.sswx-hub-hero p { color: rgba(255,255,255,.92); font-size: 17px; max-width: 760px; margin: 0; }
.sswx-hub-sec { margin: 30px 0; }
.sswx-hub-sec > h2 {
  font-size: 14px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--ssw-navy); margin: 0 0 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--ssw-line);
}
.sswx-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.sswx-hub-grid a {
  display: block; padding: 12px 14px; background: #fff;
  border: 1px solid var(--ssw-line); border-left: 3px solid var(--ssw-crimson);
  border-radius: 9px; text-decoration: none; color: var(--ssw-navy);
  font-weight: 600; font-size: 14.5px; transition: transform .15s ease, box-shadow .15s ease;
}
.sswx-hub-grid a:hover { transform: translateY(-2px); box-shadow: var(--ssw-shadow); }

/* =========================================================================
   Towns A-Z index
   ========================================================================= */
.sswx-az-nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 12px 0; margin: 8px 0 18px;
  background: #fff; border-bottom: 1px solid var(--ssw-line);
}
.sswx-az-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--ssw-paper); color: var(--ssw-navy);
  font-weight: 800; font-size: 13.5px; text-decoration: none;
}
.sswx-az-nav a:hover { background: var(--ssw-crimson); color: #fff; }
.sswx-az-sec { margin: 22px 0; }
.sswx-az-sec > h2 {
  font-size: 22px; color: var(--ssw-crimson); margin: 0 0 10px;
  padding-bottom: 6px; border-bottom: 2px solid var(--ssw-line);
}
.sswx-az-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px;
}
.sswx-az-grid a {
  display: block; padding: 8px 12px; background: #fff;
  border: 1px solid var(--ssw-line); border-radius: 8px;
  text-decoration: none; color: var(--ssw-navy); font-size: 14px; font-weight: 600;
}
.sswx-az-grid a:hover { border-color: var(--ssw-crimson); color: var(--ssw-crimson); }

/* =========================================================================
   MEGA-MENU (desktop) — injected into the primary nav "Weather" item
   ========================================================================= */
.main-navigation .ssx-wx-mega {
  position: absolute;
  left: 0; right: 0; top: 100%;
  z-index: 200;
  background: #fff;
  border-top: 3px solid var(--ssw-crimson);
  box-shadow: 0 18px 40px rgba(21,41,63,.16);
  padding: 18px 24px 20px;
  display: none;
}
.main-navigation li.ssx-wx-parent { position: static; }
.main-navigation li.ssx-wx-parent.ssx-wx-open .ssx-wx-mega,
.main-navigation li.ssx-wx-parent:focus-within .ssx-wx-mega { display: block; }
.ssx-wx-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  border-bottom: 1px solid var(--ssw-line);
  padding-bottom: 12px; margin-bottom: 14px;
}
.ssx-wx-tab {
  border: 1px solid var(--ssw-line); background: var(--ssw-paper);
  color: var(--ssw-navy); font-weight: 700; font-size: 13px;
  padding: 7px 13px; border-radius: 20px; cursor: pointer;
  font-family: inherit; transition: background .12s ease, color .12s ease;
}
.ssx-wx-tab:hover { background: var(--ssw-sky-soft); }
.ssx-wx-tab.is-active { background: var(--ssw-navy); color: #fff; border-color: var(--ssw-navy); }
.ssx-wx-panel { display: none; }
.ssx-wx-panel.is-active { display: block; }
.ssx-wx-cols {
  columns: 4 180px;
  column-gap: 22px;
}
.ssx-wx-cols a {
  display: block; padding: 5px 0; font-size: 14px; color: var(--ssw-ink);
  text-decoration: none; break-inside: avoid;
}
.ssx-wx-cols a:hover { color: var(--ssw-crimson); }
.ssx-wx-all {
  display: inline-block; margin-top: 14px; font-weight: 700; font-size: 14px;
  color: var(--ssw-crimson); text-decoration: none;
}
.ssx-wx-all:hover { text-decoration: underline; }

/* =========================================================================
   MEGA-MENU (mobile accordion) ≤ 768px
   ========================================================================= */
.ssx-wx-mobile { display: none; }

@media (max-width: 768px) {
  .main-navigation .ssx-wx-mega { display: none !important; }
  .ssx-wx-mobile {
    display: none;
    padding: 6px 0 12px;
  }
  .ssx-wx-parent.ssx-wx-open-m .ssx-wx-mobile { display: block; }
  .ssx-wx-mchips {
    display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px;
    -webkit-overflow-scrolling: touch;
  }
  .ssx-wx-mchip {
    flex: 0 0 auto; border: 1px solid rgba(255,255,255,.3); background: transparent;
    color: #fff; font-weight: 700; font-size: 13px; padding: 6px 12px;
    border-radius: 18px; font-family: inherit;
  }
  .ssx-wx-mchip.is-active { background: var(--ssw-crimson); border-color: var(--ssw-crimson); }
  .ssx-wx-mpanel { display: none; padding: 4px 12px 8px; }
  .ssx-wx-mpanel.is-active { display: block; }
  .ssx-wx-mpanel a { display: block; padding: 9px 6px; color: #fff; text-decoration: none; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .ssx-wx-mall { display: block; padding: 11px 12px; font-weight: 700; color: #fff; }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 600px) {
  .ssw-now { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
  .ssw-now-temp { font-size: 46px; }
  .ssw-now-icon { font-size: 46px; }
  .ssw-days { grid-template-columns: repeat(4, 1fr); }
  .ssw-days .ssw-day:nth-child(n+8) { display: none; }
  .ssw-lead { grid-template-columns: 1fr; }
  .sswx-hub-hero h1 { font-size: 26px; }
  .sswx-page h2 { font-size: 22px; }
  .sswx-lede { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .ssw-card, .sswx-hub-grid a, .ssx-wx-tab { transition: none; }
}

/* =========================================================================
   GLOBAL READABILITY FIX — high-contrast forecast text (applies to every page)
   Low temps, rain % and secondary labels were too faint; darken + embolden.
   ========================================================================= */
.ssw-day-lo   { color: #2a3441 !important; font-weight: 600 !important; font-size: 14px !important; }
.ssw-day-hi   { color: #0f1722 !important; }
.ssw-day-pp   { color: #0a5aa0 !important; font-weight: 700 !important; font-size: 12.5px !important; }
.ssw-day-name { color: #15293f !important; }
.ssw-hr-t     { color: #2a3441 !important; font-weight: 700 !important; }
.ssw-hr-deg   { color: #0f1722 !important; }
.ssw-hr-pp    { color: #0a5aa0 !important; font-weight: 700 !important; }
.ssw-card-hl, .ssw-card-desc { color: #2a3441 !important; }
.ssw-extra    { color: #15293f !important; }
.ssw-extra .ssw-x b { color: #0a2d4f !important; }
/* slightly larger touch/read targets on the day strip */
.ssw-day { padding: 15px 6px !important; }
.ssw-day-icon { font-size: 30px !important; }
