:root {
  color-scheme: light;
  --bg: #071725;
  --bg-soft: #0b2236;
  --bg-deep: #04101b;
  --surface: #ffffff;
  --surface-soft: #f4f8fb;
  --surface-blue: #eaf7fb;
  --line: #dce6ed;
  --line-strong: #c4d3dc;
  --text: #102334;
  --muted: #617486;
  --primary: #0b6f93;
  --primary-dark: #075472;
  --accent: #36b8d6;
  --accent-soft: #97e3f1;
  --good: #198754;
  --warn: #a66b00;
  --danger: #b42318;
  --yellow: #f4d63e;
  --orange: #ff932e;
  --red: #ee4242;
  --shadow-lg: 0 24px 70px rgba(3, 24, 39, 0.16);
  --shadow-md: 0 12px 32px rgba(3, 24, 39, 0.11);
  --shadow-sm: 0 7px 22px rgba(3, 24, 39, 0.07);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 30%, rgba(54, 184, 214, 0.08), transparent 28rem),
    linear-gradient(180deg, #eef8fb 0%, #f8fbfd 38%, #ffffff 100%);
  color: var(--text);
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(var(--max-width), calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: -90px;
  left: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  top: 16px;
}

/* Header */
.site-header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 16, 27, 0.97);
  color: white;
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.brand > span:last-child > strong {
  font-size: 1.04rem;
  letter-spacing: -0.02em;
}

.brand > span:last-child > small {
  color: #a9c0d0;
  font-size: 0.78rem;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  background:
    radial-gradient(circle at 35% 26%, #84e4f3, #1b94bc 42%, #075472 76%);
  box-shadow:
    0 0 0 5px rgba(54, 184, 214, 0.08),
    0 10px 25px rgba(0, 0, 0, 0.25);
}

.brand-mark strong {
  position: relative;
  z-index: 2;
  color: white;
  font-size: 0.86rem;
  letter-spacing: -0.05em;
}

.brand-orbit {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  animation: brand-orbit 8s linear infinite;
}

.brand-orbit::after {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffe98d;
  box-shadow: 0 0 10px rgba(255, 233, 141, 0.8);
  content: "";
  transform: translateX(-50%);
}

@keyframes brand-orbit {
  to { transform: rotate(360deg); }
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #c7d8e3;
  font-size: 0.84rem;
}

.header-count {
  white-space: nowrap;
}

.official-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.official-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #48dd9b;
  box-shadow: 0 0 0 4px rgba(72, 221, 155, 0.13);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 78px;
  background:
    radial-gradient(circle at 78% 16%, rgba(54, 184, 214, 0.3), transparent 25rem),
    radial-gradient(circle at 9% 90%, rgba(52, 110, 166, 0.23), transparent 28rem),
    linear-gradient(150deg, #04101b 0%, #071d30 48%, #0a3048 100%);
  color: white;
}

.hero::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.hero-decoration {
  position: absolute;
  border: 1px solid rgba(139, 213, 246, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.hero-decoration-one {
  top: -240px;
  right: -100px;
  width: 620px;
  height: 620px;
}

.hero-decoration-two {
  right: 280px;
  bottom: -380px;
  width: 620px;
  height: 620px;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: 54px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #74dbed;
}

.hero h1 {
  max-width: 720px;
  margin: 5px 0 16px;
  font-size: clamp(2.15rem, 4.5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.052em;
}

.hero h1 span {
  display: block;
  color: #89dff0;
}

.hero-copy {
  max-width: 610px;
  margin: 0;
  color: #c4d8e4;
  font-size: 1.08rem;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-highlights span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #d8e9f1;
  font-size: 0.76rem;
  font-weight: 700;
}

.search-card {
  position: relative;
  padding: 23px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 white;
  color: var(--text);
}

.search-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.search-card-heading > div {
  display: flex;
  flex-direction: column;
}

.search-kicker {
  color: var(--primary);
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-card-heading label {
  margin-top: 2px;
  font-size: 1.15rem;
  font-weight: 900;
}

.search-radar {
  position: relative;
  width: 45px;
  height: 45px;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 18%, rgba(54, 184, 214, 0.2) 19% 20%, transparent 21% 39%, rgba(54, 184, 214, 0.22) 40% 41%, transparent 42%),
    #edf9fc;
}

.search-radar::after {
  position: absolute;
  inset: 50% 50% 50% 50%;
  width: 22px;
  height: 1px;
  background: var(--primary);
  content: "";
  transform-origin: left center;
  animation: radar-sweep 3s linear infinite;
}

@keyframes radar-sweep {
  to { transform: rotate(360deg); }
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  color: var(--muted);
  font-size: 1.35rem;
  transform: translateY(-50%);
}

#search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 47px 0 44px;
  border: 1px solid #bed0dc;
  border-radius: 13px;
  outline: none;
  background: white;
  color: var(--text);
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(54, 184, 214, 0.14);
}

.clear-button {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
}

.clear-button:hover {
  background: var(--surface-soft);
}

.suggestions {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow-lg);
}

.suggestion-item {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #edf2f5;
  background: white;
  color: var(--text);
  text-align: left;
}

.suggestion-item:last-child {
  border-bottom: 0;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: #ecf8fb;
}

.suggestion-item strong,
.suggestion-item span {
  display: block;
}

.suggestion-item > span:first-child > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.suggestion-type {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.button {
  min-height: 47px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.button:hover {
  background: var(--primary-dark);
}

.location-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.location-symbol {
  font-size: 1.25rem;
}

.search-status {
  min-height: 20px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.recent-searches {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--text);
  font-size: 0.78rem;
}

/* Sources */
.source-strip {
  position: relative;
  z-index: 5;
  margin-top: -27px;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.source-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(220, 230, 237, 0.85);
  border-radius: 14px;
  background: white;
  box-shadow: 0 10px 28px rgba(3, 24, 39, 0.09);
}

.source-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #e8f6fa;
  color: var(--primary);
  font-weight: 900;
}

.source-card > div {
  min-width: 0;
}

.source-card span:not(.source-icon),
.source-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-card span:not(.source-icon) {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.source-card strong {
  margin-top: 2px;
  font-size: 0.79rem;
}

.source-card.delayed {
  border-color: #f3cf85;
}

.source-card.error {
  border-color: #efa9a3;
}

.source-refresh-note {
  margin: 9px 2px 0;
  color: #5b7181;
  font-size: 0.78rem;
  text-align: right;
}

/* Main content */
.content-wrap {
  padding: 38px 0 76px;
}

.empty-state,
.error-state {
  padding: 58px 24px;
  border: 1px solid rgba(220, 230, 237, 0.8);
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.empty-state h2,
.error-state h2 {
  margin: 16px 0 8px;
}

.empty-state p,
.error-state p {
  max-width: 650px;
  margin: 0 auto 20px;
  color: var(--muted);
}

.empty-loader {
  display: flex;
  width: 78px;
  height: 78px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 auto;
  border-radius: 50%;
  background: #e8f7fb;
}

.empty-loader span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: loader-dot 1.2s ease-in-out infinite;
}

.empty-loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.empty-loader span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes loader-dot {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-8px); opacity: 1; }
}

.empty-icon {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: #e7f5f8;
  color: var(--primary);
  font-size: 2rem;
}

.error-icon {
  background: #fde8e6;
  color: var(--danger);
}

.location-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.location-heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.65rem);
  letter-spacing: -0.04em;
}

.location-heading p:last-child {
  margin: 4px 0 0;
  color: var(--muted);
}

.share-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--primary-dark);
  font-weight: 900;
}

.share-button:hover {
  border-color: var(--accent);
  background: #edf9fc;
}

.tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding: 5px;
  border-radius: 14px;
  background: #dce8ee;
  scrollbar-width: thin;
}

.tab {
  flex: 1 0 auto;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #405568;
  font-weight: 900;
}

.tab.active {
  background: white;
  color: var(--primary-dark);
  box-shadow: 0 3px 12px rgba(3, 24, 39, 0.08);
}

.tab-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 0.7rem;
}

.tab-panel {
  animation: panel-fade 0.22s ease;
}

@keyframes panel-fade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 16px;
}

.current-card {
  position: relative;
  display: flex;
  min-height: 250px;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  overflow: hidden;
  padding: 26px;
  background:
    radial-gradient(circle at 12% 12%, rgba(54, 184, 214, 0.12), transparent 17rem),
    white;
}

.current-card::after {
  position: absolute;
  right: -80px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(54, 184, 214, 0.13);
  border-radius: 50%;
  content: "";
}

.current-main {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
}

.weather-glyph {
  display: grid;
  width: 108px;
  height: 108px;
  flex: 0 0 auto;
  place-items: center;
  font-size: 4rem;
  line-height: 1;
}

.weather-placeholder {
  color: var(--accent);
  animation: placeholder-pulse 1.7s ease-in-out infinite;
}

@keyframes placeholder-pulse {
  50% { transform: scale(1.12); opacity: 0.55; }
}

.temperature {
  display: flex;
  align-items: flex-start;
  font-size: clamp(3.2rem, 6vw, 4.6rem);
  font-weight: 950;
  line-height: 0.93;
  letter-spacing: -0.065em;
}

.temperature small {
  margin: 5px 0 0 6px;
  font-size: 1.3rem;
  letter-spacing: normal;
}

.weather-description {
  margin: 9px 0 0;
  font-size: 1.05rem;
  font-weight: 850;
}

.current-copy .muted {
  margin: 5px 0 0;
}

.current-meta {
  position: relative;
  z-index: 2;
  max-width: 300px;
  text-align: right;
}

.current-meta p {
  margin: 11px 0 0;
  font-size: 0.86rem;
}

.muted {
  color: var(--muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: #e5f5ed;
  color: #126b43;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-badge.delayed {
  background: #fff2d7;
  color: #8a5a00;
}

.status-badge.error {
  background: #fde7e5;
  color: var(--danger);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric-card {
  position: relative;
  display: flex;
  min-height: 120px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.metric-symbol {
  position: absolute;
  top: 12px;
  right: 14px;
  color: rgba(11, 111, 147, 0.27);
  font-size: 1.8rem;
}

.metric-card > span:not(.metric-symbol) {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card strong {
  margin-top: 6px;
  font-size: 1.16rem;
}

.summary-forecast {
  margin-top: 16px;
  padding: 22px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-heading-top {
  margin-bottom: 18px;
}

.section-heading h3 {
  margin: 0;
  font-size: 1.5rem;
}

.section-heading p {
  margin-bottom: 0;
}

.text-button {
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 900;
}

.text-button:hover {
  color: var(--primary-dark);
}

.mini-forecast-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.mini-day {
  min-width: 0;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--surface-soft);
  transition: 0.2s ease;
}

.mini-day:hover {
  border-color: #cde6ef;
  background: #edf9fc;
  transform: translateY(-2px);
}

.mini-day strong,
.mini-day span {
  display: block;
}

.mini-date {
  color: var(--muted);
  font-size: 0.78rem;
}

.mini-icon {
  margin: 8px 0;
  font-size: 1.8rem;
}

.mini-temp {
  font-size: 1.05rem;
}

.loading-text {
  color: var(--muted);
}

.notice {
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid #f1d58b;
  border-radius: 13px;
  background: #fff5d8;
  color: #6e4b00;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.forecast-day {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.forecast-day-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 17px;
  background: linear-gradient(145deg, #f7fbfd, #ebf4f7);
}

.forecast-day-head h4 {
  margin: 0;
  text-transform: capitalize;
}

.forecast-day-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.forecast-icon {
  font-size: 2.2rem;
}

.temp-range {
  display: flex;
  gap: 18px;
  padding: 13px 17px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.temp-range div {
  display: flex;
  flex-direction: column;
}

.temp-range span {
  color: var(--muted);
  font-size: 0.74rem;
}

.temp-range strong {
  font-size: 1.2rem;
}

.period-list {
  padding: 10px 17px 15px;
}

.period {
  padding: 9px 0;
  border-bottom: 1px solid #edf2f5;
}

.period:last-child {
  border-bottom: 0;
}

.period-head {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  font-weight: 850;
}

.period p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Alerts */
.alert-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  margin-bottom: 15px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
}

.alert-banner.yellow {
  border-color: #e7d45b;
  background: #fff8ca;
  color: #493f00;
}

.alert-banner.orange {
  border-color: #f1a65f;
  background: #fff0de;
  color: #663300;
}

.alert-banner.red {
  border-color: #ef7770;
  background: #ffe4e2;
  color: #73140e;
}

.alert-banner button {
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.58);
  font-weight: 850;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-row label,
.product-selector {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.filter-row select,
.product-selector select {
  display: block;
  min-height: 40px;
  margin-top: 4px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--text);
}

.locality-alerts {
  margin-bottom: 14px;
}

.locality-alert-summary {
  padding: 17px;
  border-left: 6px solid #7992a6;
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.locality-alert-summary.yellow { border-left-color: var(--yellow); }
.locality-alert-summary.orange { border-left-color: var(--orange); }
.locality-alert-summary.red { border-left-color: var(--red); }

.locality-alert-summary h4 {
  margin: 0;
}

.locality-alert-summary p {
  margin: 6px 0 0;
  color: var(--muted);
}

.alert-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr;
  gap: 14px;
}

.map-card {
  overflow: hidden;
  background: #eef6f9;
}

.alert-map {
  height: 530px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.96) 0 28%, rgba(232, 243, 248, 0.95) 62%, #dcebf1 100%);
}

.map-status {
  margin: 0;
  padding: 12px 14px 14px;
  background: white;
}

.alert-map-legend {
  display: grid;
  min-width: 130px;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid rgba(112, 139, 154, 0.35);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(3, 24, 39, 0.12);
  font-size: 0.72rem;
  line-height: 1.2;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(16, 35, 52, 0.22);
  border-radius: 3px;
}

.legend-swatch.yellow { background: #d6b900; }
.legend-swatch.orange { background: #e97813; }
.legend-swatch.red { background: #d52d27; }
.legend-swatch.neutral { border-color: #a8bbc7; background: #f7fafc; }

.locality-map-marker {
  border: 0;
  background: transparent;
}

.locality-map-marker span {
  display: block;
  width: 20px;
  height: 20px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--primary);
  box-shadow:
    0 0 0 2px var(--primary-dark),
    0 5px 15px rgba(3, 24, 39, 0.35);
}

.locality-map-label {
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: #071725;
  color: white;
  box-shadow: 0 7px 18px rgba(3, 24, 39, 0.25);
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.alerts-list-card {
  max-height: 590px;
  overflow: auto;
  padding: 17px;
}

.alerts-list-card h4 {
  margin: 0 0 12px;
}

.alert-record {
  margin-bottom: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid #7890a0;
  border-radius: 11px;
}

.alert-record.yellow { border-left-color: var(--yellow); }
.alert-record.orange { border-left-color: var(--orange); }
.alert-record.red { border-left-color: var(--red); }

.alert-record strong,
.alert-record span {
  display: block;
}

.alert-record span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.79rem;
}

.alert-locality-preview {
  margin: 9px 0 0;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.5;
}

.affected-localities {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e6edf1;
}

.affected-localities summary {
  color: var(--primary);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 900;
}

.affected-localities-groups {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.affected-localities-groups section {
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--surface-soft);
}

/* Radar / satellite */
.viewer-card {
  overflow: hidden;
}

.viewer-stage {
  position: relative;
  display: grid;
  min-height: 540px;
  place-items: center;
  background:
    radial-gradient(circle at center, #0b2c43, #04101b 68%);
}

.viewer-stage img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 540px;
  max-height: 720px;
  object-fit: contain;
}

.viewer-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 20, 33, 0.7);
  color: #d6e8f2;
  font-weight: 850;
}

.viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.control-button {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--text);
  font-weight: 900;
}

.primary-control {
  min-width: 90px;
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.viewer-timeline {
  min-width: 0;
  flex: 1;
  margin-left: 7px;
}

.viewer-timeline strong,
.viewer-timeline span {
  display: block;
}

.viewer-timeline strong {
  font-size: 0.9rem;
}

.viewer-timeline span {
  color: var(--muted);
  font-size: 0.76rem;
}

/* Animated SVG weather icon */
.wx-icon {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 10px 15px rgba(5, 55, 82, 0.15));
}

.wx-icon .sun-group {
  transform-origin: 48px 48px;
  animation: sun-spin 20s linear infinite;
}

.wx-icon .sun-core {
  animation: sun-pulse 3.2s ease-in-out infinite;
}

.wx-icon .moon-group {
  animation: moon-float 4.4s ease-in-out infinite;
}

.wx-icon .cloud-group {
  animation: cloud-drift 4.8s ease-in-out infinite;
}

.wx-icon .rain-drop {
  animation: rain-fall 1.15s linear infinite;
}

.wx-icon .rain-drop:nth-of-type(2) {
  animation-delay: 0.25s;
}

.wx-icon .rain-drop:nth-of-type(3) {
  animation-delay: 0.5s;
}

.wx-icon .snow-flake {
  animation: snow-fall 2.4s ease-in-out infinite;
}

.wx-icon .lightning {
  animation: lightning-flash 3s step-end infinite;
}

.wx-icon .fog-line {
  animation: fog-slide 4s ease-in-out infinite;
}

@keyframes sun-spin {
  to { transform: rotate(360deg); }
}

@keyframes sun-pulse {
  50% { transform: scale(1.08); }
}

@keyframes moon-float {
  50% { transform: translateY(-4px) rotate(2deg); }
}

@keyframes cloud-drift {
  50% { transform: translateX(4px); }
}

@keyframes rain-fall {
  0% { transform: translateY(-4px); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

@keyframes snow-fall {
  50% { transform: translate(3px, 8px) rotate(90deg); }
  100% { transform: translate(-2px, 16px) rotate(180deg); opacity: 0; }
}

@keyframes lightning-flash {
  0%, 84%, 100% { opacity: 0.28; }
  85%, 90% { opacity: 1; }
}

@keyframes fog-slide {
  50% { transform: translateX(7px); opacity: 0.65; }
}

.weather-icon-animated {
  display: inline-block;
  transform-origin: center;
  animation: forecast-float 3.4s ease-in-out infinite;
}

.weather-icon-animated.weather-storm {
  animation: storm-shake 2.8s ease-in-out infinite;
}

.weather-icon-animated.weather-rain {
  animation: rain-bob 2.3s ease-in-out infinite;
}

@keyframes forecast-float {
  50% { transform: translateY(-4px) scale(1.04); }
}

@keyframes storm-shake {
  86%, 94% { transform: translateX(0); }
  88% { transform: translateX(-2px) rotate(-2deg); }
  91% { transform: translateX(2px) rotate(2deg); }
}

@keyframes rain-bob {
  50% { transform: translateY(3px); }
}

/* Map links */
.explore-section {
  margin-top: 46px;
  padding-top: 36px;
  border-top: 1px solid rgba(180, 203, 216, 0.7);
}

.explore-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
}

.explore-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
}

.explore-heading > p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.map-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.map-link-card {
  display: grid;
  min-height: 300px;
  grid-template-columns: 0.92fr 1.08fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.map-link-card:hover {
  border-color: #9dcddc;
  box-shadow: 0 24px 55px rgba(3, 24, 39, 0.16);
  transform: translateY(-5px);
}

.map-preview {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
  overflow: hidden;
}

.world-preview {
  background:
    radial-gradient(circle at 44% 42%, rgba(48, 164, 225, 0.2), transparent 20%),
    linear-gradient(150deg, #020a11, #092438);
}

.globe-shape {
  position: relative;
  width: 185px;
  height: 185px;
  overflow: hidden;
  border: 1px solid rgba(183, 226, 247, 0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, #18364a, #07131d 68%),
    #07131d;
  box-shadow:
    0 0 50px rgba(42, 172, 229, 0.2),
    inset -18px -12px 30px rgba(0, 0, 0, 0.45);
  animation: globe-float 5s ease-in-out infinite;
}

@keyframes globe-float {
  50% { transform: translateY(-7px) rotate(1deg); }
}

.globe-shape::before,
.globe-shape::after {
  position: absolute;
  inset: 8px 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.globe-shape::after {
  inset: 48px 8px;
}

.globe-continent {
  position: absolute;
  border-radius: 50% 40% 55% 35%;
  background: #1b2730;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.continent-one {
  top: 37px;
  left: 76px;
  width: 41px;
  height: 74px;
  transform: rotate(-15deg);
}

.continent-two {
  top: 72px;
  left: 51px;
  width: 27px;
  height: 56px;
  transform: rotate(20deg);
}

.continent-three {
  top: 105px;
  left: 101px;
  width: 43px;
  height: 28px;
  transform: rotate(-10deg);
}

.wind-line {
  position: absolute;
  height: 1px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  animation: wind-sweep 3.1s linear infinite;
}

.wind-line-one {
  top: 52px;
  left: 17px;
  width: 63px;
}

.wind-line-two {
  top: 116px;
  left: 95px;
  width: 73px;
  animation-delay: 0.6s;
}

.wind-line-three {
  top: 144px;
  left: 25px;
  width: 52px;
  animation-delay: 1.1s;
}

@keyframes wind-sweep {
  0% { transform: translateX(-10px); opacity: 0; }
  25% { opacity: 0.9; }
  100% { transform: translateX(14px); opacity: 0; }
}

.rain-blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(37, 157, 234, 0.72);
  filter: blur(5px);
  animation: rain-blob 4s ease-in-out infinite;
}

.rain-blob-one {
  top: 32px;
  left: 90px;
  width: 50px;
  height: 20px;
}

.rain-blob-two {
  right: 11px;
  bottom: 39px;
  width: 60px;
  height: 22px;
  animation-delay: 1s;
}

@keyframes rain-blob {
  50% { transform: scale(1.16); opacity: 0.45; }
}

.localities-preview {
  background:
    radial-gradient(circle at center, rgba(54, 184, 214, 0.13), transparent 60%),
    linear-gradient(150deg, #edf9fc, #d8eff6);
}

.argentina-shape {
  width: 158px;
  height: 238px;
  overflow: visible;
  filter: drop-shadow(0 13px 16px rgba(7, 84, 114, 0.15));
}

.argentina-shape path {
  fill: #ffffff;
  stroke: #0b6f93;
  stroke-width: 3;
  stroke-linejoin: round;
}

.argentina-shape circle {
  fill: #0b6f93;
  stroke: white;
  stroke-width: 2;
  animation: locality-dot 2.3s ease-in-out infinite;
}

.argentina-shape circle:nth-of-type(2) { animation-delay: 0.25s; }
.argentina-shape circle:nth-of-type(3) { animation-delay: 0.5s; }
.argentina-shape circle:nth-of-type(4) { animation-delay: 0.75s; }
.argentina-shape circle:nth-of-type(5) { animation-delay: 1s; }

@keyframes locality-dot {
  50% { r: 7px; opacity: 0.7; }
}

.locality-pulse {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(11, 111, 147, 0.4);
  border-radius: 50%;
  animation: locality-pulse 2.2s ease-out infinite;
}

.pulse-one {
  top: 48px;
  right: 63px;
}

.pulse-two {
  top: 122px;
  right: 83px;
  animation-delay: 0.7s;
}

.pulse-three {
  right: 92px;
  bottom: 51px;
  animation-delay: 1.3s;
}

@keyframes locality-pulse {
  from { transform: scale(0.45); opacity: 1; }
  to { transform: scale(1.8); opacity: 0; }
}

.map-link-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 27px;
}

.map-link-kicker {
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-link-copy h3 {
  margin: 6px 0 9px;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

.map-link-copy p {
  margin: 0;
  color: var(--muted);
}

.map-link-action {
  margin-top: 19px;
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 900;
}

/* Footer */
.site-footer {
  padding: 31px 0;
  background: var(--bg);
  color: #b8ccd8;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  font-size: 0.82rem;
}

.footer-inner strong {
  color: white;
}

.footer-inner p {
  max-width: 720px;
  margin: 4px 0 0;
}

/* Leaflet */
.alert-map .leaflet-pane {
  z-index: 400;
}

.alert-map .leaflet-overlay-pane svg {
  filter: drop-shadow(0 10px 16px rgba(20, 58, 79, 0.12));
}

.alert-map .leaflet-interactive {
  cursor: pointer;
}

.alert-map .leaflet-popup-content-wrapper {
  border-radius: 13px;
  box-shadow: 0 14px 38px rgba(3, 24, 39, 0.2);
}

/* Responsive */
@media (max-width: 1000px) {
  .hero-grid,
  .summary-grid,
  .alert-layout {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 32px;
  }

  .source-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .forecast-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .current-card {
    min-height: 220px;
  }

  .viewer-stage,
  .viewer-stage img {
    min-height: 430px;
  }

  .map-link-card {
    grid-template-columns: 1fr;
  }

  .map-preview {
    min-height: 240px;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 20px, var(--max-width));
  }

  .header-inner {
    min-height: 68px;
  }

  .header-meta {
    display: none;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .hero {
    padding: 38px 0 56px;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .hero-highlights {
    gap: 6px;
  }

  .search-card {
    padding: 16px;
    border-radius: 21px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .source-strip {
    margin-top: -18px;
  }

  .source-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .source-card:last-child {
    grid-column: span 2;
  }

  .source-refresh-note {
    text-align: left;
  }

  .content-wrap {
    padding-top: 27px;
  }

  .location-heading {
    align-items: flex-start;
  }

  .share-button {
    padding: 0 12px;
  }

  .current-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .current-main {
    width: 100%;
  }

  .current-meta {
    max-width: none;
    text-align: left;
  }

  .weather-glyph {
    width: 90px;
    height: 90px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card {
    min-height: 108px;
    padding: 14px;
  }

  .mini-forecast-grid,
  .forecast-grid,
  .map-links-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .explore-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .alert-map {
    height: 500px;
  }

  .viewer-stage,
  .viewer-stage img {
    min-height: 330px;
  }

  .viewer-toolbar {
    flex-wrap: wrap;
  }

  .viewer-timeline {
    flex-basis: 45%;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .hero h1 {
    font-size: 2.05rem;
  }

  .hero-copy {
    font-size: 0.96rem;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }

  .source-card:last-child {
    grid-column: auto;
  }

  .location-heading {
    flex-direction: column;
  }

  .current-main {
    align-items: flex-start;
  }

  .weather-glyph {
    width: 76px;
    height: 76px;
  }

  .temperature {
    font-size: 3.2rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .map-link-copy {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
