/* ─────────────────────────────────────────────────────────────
   Bangkok Weather Network — main hub
   ───────────────────────────────────────────────────────────── */

:root {
  --bg0: #030b14;
  --bg1: #061827;
  --bg2: #0a2233;
  --ink: #eaf7ff;
  --muted: #8db2c7;
  --dim: #5f8298;
  --cyan: #3ee8ff;
  --teal: #1ad1b0;
  --amber: #ffb454;
  --red: #ff6b7a;
  --violet: #a08dff;
  --glass: rgba(5, 20, 33, 0.66);
  --glass-2: rgba(9, 31, 48, 0.46);
  --stroke: rgba(120, 220, 255, 0.16);
  --stroke-strong: rgba(120, 220, 255, 0.36);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  --sans: "IBM Plex Sans Thai", "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body.hub-body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(1100px 700px at 50% -10%, #0b2c42 0%, transparent 60%),
    radial-gradient(900px 600px at 10% 100%, #071c2b 0%, transparent 58%),
    linear-gradient(160deg, var(--bg0) 0%, var(--bg1) 48%, #020810 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }

/* ── Background ────────────────────────────────────────────── */
.hub-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hub-bg-pane {
  position: absolute;
  top: -8%;
  bottom: -8%;
  width: 54%;
  background-size: cover;
  background-position: center;
  filter: blur(52px) saturate(1.25) brightness(0.9);
  opacity: 0.24;
  transform: scale(1.16);
  animation: hub-drift 26s ease-in-out infinite alternate;
}

.hub-bg-pane.is-dindaeng {
  left: -6%;
  transform-origin: left center;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 180, 84, 0.32), transparent 58%),
    #071018;
}

.hub-bg-pane.is-bangna {
  right: -6%;
  transform-origin: right center;
  animation-delay: -9s;
  background:
    radial-gradient(circle at 65% 45%, rgba(62, 232, 255, 0.3), transparent 58%),
    #071018;
}

.hub-bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(120, 220, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 220, 255, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 32%, #000 20%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 32%, #000 20%, transparent 74%);
}

.hub-bg-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(3, 11, 20, 0.4) 0%, rgba(3, 11, 20, 0.2) 32%, rgba(3, 11, 20, 0.78) 100%),
    radial-gradient(ellipse at 50% 38%, transparent 20%, rgba(2, 8, 14, 0.42) 100%);
}

.hub-bg-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.22;
}

.hub-bg-glow.is-dindaeng {
  left: 4%;
  top: 18%;
  background: radial-gradient(circle, rgba(255, 180, 84, 0.5), transparent 65%);
}

.hub-bg-glow.is-bangna {
  right: 4%;
  top: 24%;
  background: radial-gradient(circle, rgba(62, 232, 255, 0.45), transparent 65%);
}

.hub-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

/* ── Header ────────────────────────────────────────────────── */
.hub-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 30px;
  background: linear-gradient(to bottom, rgba(3, 11, 20, 0.82), rgba(3, 11, 20, 0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hub-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: 0;
}

.hub-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(62, 232, 255, 0.45);
  box-shadow: 0 0 22px rgba(62, 232, 255, 0.18), inset 0 0 18px rgba(62, 232, 255, 0.12);
}

.hub-mark::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  transform: translateX(-50%);
}

.hub-mark span {
  color: var(--cyan);
  font-size: 13px;
  text-shadow: 0 0 16px rgba(62, 232, 255, 0.85);
}

.hub-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.hub-kicker {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--cyan);
  text-transform: uppercase;
}

.hub-brand-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.hub-header-center {
  display: flex;
  align-items: center;
  gap: 14px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.hub-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(4, 18, 29, 0.55);
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  white-space: nowrap;
}

.hub-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(26, 209, 176, 0.45);
  animation: hub-pulse 2.2s ease-out infinite;
}

.hub-live.is-warn { color: var(--amber); }
.hub-live.is-off { color: var(--red); }
.hub-live.is-off i { animation: none; opacity: 0.7; }

.hub-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 92px;
  line-height: 1.05;
}

.hub-clock b {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hub-clock small {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.hub-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  border: 1px solid var(--stroke);
  background: rgba(4, 18, 29, 0.52);
  backdrop-filter: blur(12px);
}

.hub-lang a {
  display: grid;
  place-items: center;
  min-width: 31px;
  height: 25px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.hub-lang a:hover { color: var(--ink); }
.hub-lang a.is-on {
  color: #03121a;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 0 16px rgba(62, 232, 255, 0.25);
}

.hub-legacy-btn {
  display: inline-flex;
  align-items: center;
  height: 31px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(4, 18, 29, 0.52);
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hub-legacy-btn:hover { color: var(--cyan); border-color: var(--stroke-strong); }

/* ── Main layout ───────────────────────────────────────────── */
.hub-main {
  position: relative;
  z-index: 2;
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 132px 30px 56px;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hub-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(120, 220, 255, 0.1);
  animation: hub-up 0.7s ease both;
}

.hub-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hub-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.hub-title {
  margin: 0;
  font-size: clamp(2.3rem, 5.2vw, 4.6rem);
  line-height: 0.97;
  font-weight: 600;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hub-title span {
  display: block;
  margin-top: 0.14em;
  font-size: 0.5em;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #eaf7ff 0%, #7fe9ff 42%, #ffcf8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hub-subtitle {
  max-width: 520px;
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.hub-network {
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  gap: 8px;
  flex: 0 0 auto;
  min-width: 480px;
}

.hub-network-item {
  padding: 11px 13px 10px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(5, 20, 33, 0.45));
  backdrop-filter: blur(14px);
}

.hub-network-item > span {
  display: block;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.hub-network-item > div {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 5px;
}

.hub-network-item b {
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.hub-network-item small {
  font-size: 8px;
  color: var(--dim);
  white-space: nowrap;
}

/* ── Station cards ─────────────────────────────────────────── */
.hub-stations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.station-card {
  --accent: var(--cyan);
  --accent-rgb: 62, 232, 255;
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 30%),
    linear-gradient(180deg, var(--glass), var(--glass-2));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease, box-shadow 0.35s ease;
  animation: hub-up 0.8s ease both;
}

.station-card:nth-child(2) { animation-delay: 0.1s; }

.station-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.8), transparent);
  z-index: 2;
}

.station-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.58), 0 0 60px rgba(var(--accent-rgb), 0.06);
}

.station-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--accent-rgb), 0.12), transparent 62%),
    #020a12;
}

.station-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.station-card:hover .station-img { transform: scale(1.035); }

.station-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(2, 8, 14, 0.5) 0%, transparent 32%, transparent 56%, rgba(2, 8, 14, 0.88) 100%),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.1), transparent 40%);
  pointer-events: none;
}

.station-media-top,
.station-media-bottom {
  position: absolute;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.station-media-top { top: 14px; }
.station-media-bottom { bottom: 14px; align-items: flex-end; }

.station-role {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background: rgba(3, 14, 24, 0.62);
  backdrop-filter: blur(10px);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.station-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(26, 209, 176, 0.26);
  background: rgba(3, 14, 24, 0.62);
  backdrop-filter: blur(10px);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  white-space: nowrap;
}

.station-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(26, 209, 176, 0.4);
  animation: hub-pulse 2.2s ease-out infinite;
}

.station-state.is-stale { color: var(--amber); border-color: rgba(255, 180, 84, 0.3); }
.station-state.is-offline { color: var(--red); border-color: rgba(255, 107, 122, 0.3); }
.station-state.is-offline i { animation: none; opacity: 0.7; }

.station-name {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
}

.station-cam-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.station-cam-time > span {
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.station-cam-time b {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 400;
  color: rgba(234, 247, 255, 0.75);
  white-space: nowrap;
}

.station-noimg {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 10px),
    radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb), 0.08), transparent 64%);
}

.station-card.is-empty .station-noimg { display: grid; }
.station-card.is-empty .station-img { opacity: 0; }
.station-card.is-empty .station-shade { opacity: 0.35; }

.station-media.is-hs9dmc {
  background:
    radial-gradient(circle at 72% 32%, rgba(160, 141, 255, 0.24), transparent 52%),
    radial-gradient(circle at 25% 75%, rgba(62, 232, 255, 0.1), transparent 55%),
    linear-gradient(135deg, #10162e, #08141f 62%, #060d16);
}

.station-media.is-hs9dmc .station-shade {
  background:
    linear-gradient(to bottom, rgba(2, 8, 14, 0.42) 0%, transparent 34%, transparent 54%, rgba(2, 8, 14, 0.9) 100%),
    linear-gradient(90deg, rgba(160, 141, 255, 0.1), transparent 46%);
}

.station-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 22px;
  pointer-events: none;
}

.station-art-copy { position: relative; z-index: 1; }

.station-art-mark {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  color: var(--ink);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
}

.station-art-place {
  display: block;
  margin-top: 4px;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(234, 247, 255, 0.5);
}

.station-art-icon {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 64px;
  height: 64px;
  color: rgba(160, 141, 255, 0.82);
  filter: drop-shadow(0 0 18px rgba(160, 141, 255, 0.32));
}

.station-body { padding: 18px 22px 21px; }

.station-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.station-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.station-head p {
  margin: 3px 0 0;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.station-coord {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  color: var(--dim);
  white-space: nowrap;
  padding-top: 3px;
}

.station-temp {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 12px 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(120, 220, 255, 0.1);
}

.station-temp > b {
  font-family: var(--mono);
  font-size: 58px;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--ink);
}

.station-temp > span {
  font-size: 15px;
  color: var(--muted);
}

.station-temp > small {
  margin-left: auto;
  align-self: flex-end;
  padding-bottom: 4px;
  font-size: 9px;
  color: var(--dim);
  white-space: nowrap;
}

.station-temp > small b {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--muted);
}

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

.station-metrics > div {
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid rgba(120, 220, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.station-metrics span {
  display: block;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.station-metrics b {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.station-metrics small {
  margin-left: 3px;
  font-size: 8px;
  color: var(--dim);
}

.station-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.station-hardware {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  margin-right: 6px;
}

.station-hardware-label {
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.72;
}

.station-hardware-item {
  font-size: 8px;
  line-height: 1.4;
  color: rgba(141, 178, 199, 0.78);
  white-space: normal;
}

.station-hardware-item + .station-hardware-item {
  color: rgba(141, 178, 199, 0.6);
}

.station-cta { flex: 0 0 auto; }

.station-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.station-cta span { transition: transform 0.25s ease; }
.station-cta:hover {
  background: var(--accent);
  color: #03121a;
  transform: translateY(-1px);
}
.station-cta:hover span { transform: translateX(3px); }

/* ── AI insight ────────────────────────────────────────────── */
.hub-ai {
  margin-top: 34px;
  animation: hub-up 0.95s ease both;
}

.hub-ai-head { align-items: flex-end; }

.hub-ai-hint {
  margin: 4px 0 0;
  font-size: 8.5px;
  letter-spacing: 0.02em;
  color: var(--dim);
}

.hub-ai-global {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ai-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(4, 18, 29, 0.55);
  backdrop-filter: blur(12px);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.ai-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.ai-status b {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
}

.ai-status span {
  font-size: 8px;
  color: inherit;
  opacity: 0.75;
}

.ai-status.is-on {
  color: var(--teal);
  border-color: rgba(26, 209, 176, 0.32);
  background: rgba(26, 209, 176, 0.06);
}
.ai-status.is-on i {
  box-shadow: 0 0 0 0 rgba(26, 209, 176, 0.45);
  animation: hub-pulse 2.2s ease-out infinite;
}
.ai-status.is-off {
  color: var(--red);
  border-color: rgba(255, 107, 122, 0.32);
  background: rgba(255, 107, 122, 0.06);
}
.ai-status.is-wait {
  color: var(--amber);
  border-color: rgba(255, 180, 84, 0.32);
  background: rgba(255, 180, 84, 0.06);
}
.ai-status.is-wait i { animation: hub-blink 1.5s ease-in-out infinite; }

.ai-refresh {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(4, 18, 29, 0.55);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ai-refresh:hover {
  color: var(--cyan);
  border-color: var(--stroke-strong);
  background: rgba(10, 38, 56, 0.62);
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ai-card {
  --accent: var(--cyan);
  --accent-rgb: 62, 232, 255;
  position: relative;
  overflow: hidden;
  padding: 15px 18px 14px 20px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.06), transparent 34%),
    linear-gradient(180deg, var(--glass), var(--glass-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 50px rgba(0, 0, 0, 0.22);
}

.ai-card.is-dindaeng { --accent: var(--amber); --accent-rgb: 255, 180, 84; }
.ai-card.is-bangna { --accent: var(--cyan); --accent-rgb: 62, 232, 255; }

.ai-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(to bottom, transparent, rgba(var(--accent-rgb), 0.8), transparent);
}

.ai-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.ai-card-title h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 7px;
  border: 1px solid var(--stroke);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  white-space: nowrap;
}

.ai-badge.is-on {
  color: var(--teal);
  border-color: rgba(26, 209, 176, 0.32);
  background: rgba(26, 209, 176, 0.06);
}
.ai-badge.is-off {
  color: var(--red);
  border-color: rgba(255, 107, 122, 0.32);
  background: rgba(255, 107, 122, 0.06);
}
.ai-badge.is-wait {
  color: var(--amber);
  border-color: rgba(255, 180, 84, 0.32);
  background: rgba(255, 180, 84, 0.06);
}

.ai-source {
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  padding-top: 4px;
}

.ai-text {
  margin: 10px 0 11px;
  min-height: 3.3em;
  font-size: 11.5px;
  line-height: 1.72;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-wrap: pretty;
}

.ai-card.is-wait .ai-text { animation: hub-blink 1.8s ease-in-out infinite; }

.ai-lifestyle {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 10px;
  padding: 12px 15px;
  border-radius: 14px;
  border: 1px solid rgba(120, 220, 255, 0.15);
  background:
    linear-gradient(90deg, rgba(62, 232, 255, 0.07), rgba(255, 180, 84, 0.045) 55%, transparent),
    rgba(5, 20, 33, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ai-lifestyle-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(62, 232, 255, 0.26);
  background: rgba(62, 232, 255, 0.08);
  color: var(--cyan);
  font-size: 12px;
  box-shadow: 0 0 18px rgba(62, 232, 255, 0.12);
}

.ai-lifestyle-body { min-width: 0; }

.ai-lifestyle-label {
  display: block;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
}

.ai-lifestyle p {
  margin: 3px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: pretty;
}

.ai-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(120, 220, 255, 0.08);
  font-size: 8px;
  letter-spacing: 0.02em;
  color: var(--dim);
}

.ai-foot-mark {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--accent);
  opacity: 0.8;
}

.hub-ai-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 9px;
  padding: 0 2px;
  font-size: 8px;
  letter-spacing: 0.02em;
  color: var(--dim);
}

/* ── Lower panels ──────────────────────────────────────────── */
.hub-lower {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: 22px;
  margin-top: 22px;
}

.hub-panel {
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 30%),
    linear-gradient(180deg, var(--glass), var(--glass-2));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  padding: 20px 22px 21px;
  animation: hub-up 0.9s ease both;
}

.hub-compare { animation-delay: 0.05s; }
.hub-network-panel { animation-delay: 0.12s; }

.hub-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.hub-section-head .hub-eyebrow { margin-bottom: 5px; }

.hub-section-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hub-section-note {
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: var(--dim);
  text-align: right;
}

/* Comparison */
.compare-rows { margin-top: 14px; }

.compare-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 168px;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid rgba(120, 220, 255, 0.08);
}

.compare-row:first-child { border-top: 0; }

.compare-label span {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.compare-label small {
  display: block;
  margin-top: 2px;
  font-size: 7.5px;
  letter-spacing: 0.05em;
  color: var(--dim);
}

.compare-bars { display: grid; gap: 6px; }

.compare-bar {
  position: relative;
  height: 21px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(120, 220, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.compare-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: inherit;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.compare-bar.is-dindaeng .compare-fill {
  background: linear-gradient(90deg, rgba(255, 180, 84, 0.18), rgba(255, 180, 84, 0.62));
}

.compare-bar.is-bangna .compare-fill {
  background: linear-gradient(90deg, rgba(62, 232, 255, 0.16), rgba(62, 232, 255, 0.6));
}

.compare-bar.is-hs9dmc .compare-fill {
  background: linear-gradient(90deg, rgba(160, 141, 255, 0.14), rgba(160, 141, 255, 0.58));
}

.compare-bar b {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--ink);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.compare-winner {
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--dim);
  text-align: right;
}

.compare-winner.is-dindaeng { color: var(--amber); }
.compare-winner.is-bangna { color: var(--cyan); }
.compare-winner.is-hs9dmc { color: var(--violet); }
.compare-winner.is-tie { color: var(--muted); }

/* Radar */
.hub-radar {
  margin: 8px auto 0;
  width: 100%;
  max-width: 360px;
}

.hub-radar svg { display: block; width: 100%; height: auto; }

.radar-node text {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.radar-node.is-dindaeng text { fill: rgba(255, 180, 84, 0.85); }
.radar-node.is-bangna text { fill: rgba(62, 232, 255, 0.85); }
.radar-node.is-hs9dmc text { fill: rgba(160, 141, 255, 0.9); }
.radar-center {
  fill: rgba(141, 178, 199, 0.5);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.28em;
}
.radar-distance {
  fill: rgba(95, 130, 152, 0.9);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.radar-node circle:nth-child(2) {
  animation: hub-ring 2.6s ease-out infinite;
  transform-origin: center;
}

.hub-radar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(120, 220, 255, 0.08);
  font-size: 9px;
  color: var(--dim);
}

.hub-radar-foot .is-dindaeng { color: var(--amber); }
.hub-radar-foot .is-bangna { color: var(--cyan); }
.hub-radar-foot .is-hs9dmc { color: var(--violet); }

.hub-radar-note {
  margin: 8px 0 0;
  font-size: 8.5px;
  line-height: 1.5;
  color: var(--dim);
}

/* ── Legacy ────────────────────────────────────────────────── */
.hub-legacy {
  margin-top: 34px;
  animation: hub-up 1s ease both;
}

.legacy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.legacy-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(5, 20, 33, 0.5);
  backdrop-filter: blur(12px);
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.legacy-card b {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.legacy-card span {
  grid-column: 1;
  font-size: 8px;
  letter-spacing: 0.03em;
  color: var(--dim);
}

.legacy-card i {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-style: normal;
  font-size: 13px;
  color: var(--dim);
  transition: transform 0.25s ease, color 0.25s ease;
}

.legacy-card:hover {
  border-color: var(--stroke-strong);
  background: rgba(10, 38, 56, 0.62);
  transform: translateY(-2px);
}

.legacy-card:hover i { color: var(--cyan); transform: translateX(3px); }

/* ── Footer ────────────────────────────────────────────────── */
.hub-footer {
  position: relative;
  z-index: 2;
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 22px 30px 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  border-top: 1px solid rgba(120, 220, 255, 0.08);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: var(--dim);
}

.hub-aprs-cta {
  position: relative;
  z-index: 2;
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 0 30px 4px;
}
.hub-aprs-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: fit-content;
  margin: 0 auto;
  padding: 8px 14px;
  border: 1px solid rgba(120, 220, 255, 0.18);
  border-radius: 999px;
  background: rgba(6, 20, 33, 0.6);
  color: var(--muted);
  font-size: 10.5px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.hub-aprs-cta a:hover {
  color: var(--ink);
  border-color: rgba(120, 220, 255, 0.38);
  background: rgba(62, 232, 255, 0.08);
}
.hub-aprs-cta-kicker {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

@media (max-width: 700px) {
  .hub-aprs-cta { padding: 0 18px 4px; }
  .hub-aprs-cta a { font-size: 10px; padding: 7px 12px; }
}

.hub-noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg0);
  color: var(--ink);
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes hub-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hub-drift {
  0% { transform: scale(1.16) translate3d(0, 0, 0); }
  100% { transform: scale(1.22) translate3d(2%, -2%, 0); }
}

@keyframes hub-pulse {
  0% { box-shadow: 0 0 0 0 rgba(26, 209, 176, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(26, 209, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 209, 176, 0); }
}

@keyframes hub-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes hub-ring {
  0% { r: 10; opacity: 0.8; }
  100% { r: 22; opacity: 0; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .hub-stations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  .hub-hero { flex-direction: column; align-items: stretch; gap: 24px; }
  .hub-network { min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hub-lower { grid-template-columns: 1fr; }
  .hub-radar { max-width: 320px; }
  .station-temp > b { font-size: 50px; }
}

@media (max-width: 960px) {
  .hub-stations { grid-template-columns: 1fr; }
  .station-temp > b { font-size: 52px; }
  .legacy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ai-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .hub-header-center { display: none; }
  .hub-header { padding: 13px 18px; }
  .hub-main { padding: 104px 18px 44px; }
  .hub-footer { padding: 20px 18px 30px; }
}

@media (max-width: 700px) {
  .hub-brand-name { display: none; }
  .hub-actions { gap: 5px; }
  .hub-legacy-btn { height: 27px; padding: 0 9px; font-size: 8px; }
  .hub-lang a { min-width: 27px; height: 23px; font-size: 8px; }
  .hub-title { font-size: clamp(2rem, 9vw, 3.1rem); }
  .hub-network { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-network-item b { font-size: 19px; }
  .hub-main { padding-top: 96px; }
  .station-body { padding: 16px 16px 18px; }
  .station-head h2 { font-size: 16px; }
  .station-coord { display: none; }
  .station-temp > b { font-size: 46px; }
  .station-temp > small { font-size: 8px; }
  .station-metrics b { font-size: 16px; }
  .station-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
  }
  .station-hardware { margin-right: 0; }
  .station-hardware-label { font-size: 7px; }
  .station-hardware-item { font-size: 8.5px; line-height: 1.4; }
  .station-cta { align-self: flex-end; }
  .compare-row {
    grid-template-columns: 1fr auto;
    row-gap: 7px;
    padding: 12px 0;
    gap: 6px 10px;
  }
  .compare-label { grid-column: 1; }
  .compare-winner { grid-column: 2; grid-row: 1; text-align: right; }
  .compare-bars { grid-column: 1 / -1; }
  .hub-section-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .hub-section-note { text-align: left; }
  .hub-ai-global { flex-wrap: wrap; }
  .hub-ai-foot { flex-direction: column; gap: 4px; }
  .ai-lifestyle { padding: 10px 12px; gap: 9px; }
  .ai-lifestyle-icon { width: 24px; height: 24px; }
  .ai-lifestyle p { font-size: 11px; }
  .radar-node text { font-size: 7px; }
  .legacy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .station-media { aspect-ratio: 4 / 3; }
  .station-art { padding: 16px; }
  .station-art-icon { width: 50px; height: 50px; right: 12px; bottom: 12px; }
  .station-art-mark { font-size: 1.4rem; }
  .station-name { font-size: 18px; }
  .station-cam-time > span { display: none; }
  .station-state, .station-role { font-size: 6.5px; padding: 0 7px; }
  .station-temp { flex-wrap: wrap; }
  .station-temp > small { width: 100%; margin-left: 0; margin-top: 6px; }
  .station-cta { height: 30px; padding: 0 11px; font-size: 8px; }
  .station-hardware-item { font-size: 8.5px; line-height: 1.4; }
  .hub-lower { gap: 16px; }
  .hub-panel { padding: 16px 15px 17px; border-radius: 18px; }
  .legacy-card { padding: 11px 12px; }
}

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

/* ─────────────────────────────────────────────────────────────
   Sun & solar summary (hub)
   ───────────────────────────────────────────────────────────── */
.hub-sun-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  border: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-decoration: none;
  color: #1a1205;
  background: linear-gradient(135deg, #ffd97a, #ffb454);
  box-shadow: 0 8px 24px rgba(255, 180, 84, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}
.hub-sun-link:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(255, 180, 84, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.hub-sun-link svg { flex: 0 0 auto; }

/* Flood map entry (teal, next to the sun link) */
.hub-flood-link {
  color: #04211f;
  background: linear-gradient(135deg, #7ff0e0, #23b5a4);
  box-shadow: 0 8px 24px rgba(35, 181, 164, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.hub-flood-link:hover {
  box-shadow: 0 12px 30px rgba(35, 181, 164, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hub-sun {
  margin-top: 34px;
  animation: hub-up 0.95s ease both;
}
.hub-sun-head { align-items: flex-end; }
.hub-sun-hint {
  margin: 6px 0 0;
  max-width: 640px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.hub-sun-loc {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 7px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
}
.hub-sun-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}
.hub-sun-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.hub-sun-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(8, 28, 44, 0.6);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  cursor: pointer;
  transition: 0.16s ease;
  white-space: nowrap;
}
.hub-sun-ghost:hover { color: var(--ink); border-color: var(--stroke-strong); background: rgba(16, 48, 70, 0.75); }
.hub-sun-ghost.is-busy { opacity: 0.6; pointer-events: none; }

.hub-sun-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  color: #1a1205;
  background: linear-gradient(135deg, #ffd97a, #ffb454);
  box-shadow: 0 8px 24px rgba(255, 180, 84, 0.28);
  transition: 0.16s ease;
  white-space: nowrap;
}
.hub-sun-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(255, 180, 84, 0.38); }
.hub-sun-btn-icon { font-size: 14px; line-height: 1; }
.hub-sun-btn-arrow { font-size: 13px; opacity: 0.75; }

.hub-sun-body {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-top: 16px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background:
    radial-gradient(700px 320px at 18% 20%, rgba(255, 180, 84, 0.08), transparent 62%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 34%),
    linear-gradient(180deg, var(--glass), var(--glass-2));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.hub-sun-chart-link {
  position: relative;
  display: block;
  width: 100%;
  max-width: 330px;
  justify-self: center;
  border-radius: 16px;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.hub-sun-chart-link:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(62, 232, 255, 0.22), 0 14px 40px rgba(0, 0, 0, 0.35); }
.hub-sun-chart-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.hub-sun-chart { width: 100%; }
.hub-sun-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.hub-sun-chart-hint {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  padding: 3px 8px;
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
  background: rgba(3, 13, 22, 0.8);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  pointer-events: none;
}

.hub-sun-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.hub-sun-stat {
  position: relative;
  padding: 12px 13px 11px;
  border-radius: 14px;
  border: 1px solid rgba(120, 220, 255, 0.12);
  background: rgba(3, 14, 24, 0.55);
  overflow: hidden;
}
.hub-sun-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.45;
}
.hub-sun-stat.is-rise::before { background: linear-gradient(90deg, transparent, #ffcf5c, transparent); }
.hub-sun-stat.is-set::before { background: linear-gradient(90deg, transparent, #ff7a59, transparent); }
.hub-sun-stat.is-noon::before { background: linear-gradient(90deg, transparent, #ffffff, transparent); }
.hub-sun-stat.is-panel::before { background: linear-gradient(90deg, transparent, #b39dff, transparent); }
.hub-sun-stat.is-now::before { background: linear-gradient(90deg, transparent, #ffd166, transparent); }
.hub-sun-stat > span {
  display: block;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 7px;
}
.hub-sun-stat > b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 500;
  line-height: 1.05;
  color: var(--ink);
}
.hub-sun-stat > small {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--amber);
  white-space: nowrap;
}
.hub-sun-stat.is-rise > small { color: #ffcf5c; }
.hub-sun-stat.is-set > small { color: #ff7a59; }
.hub-sun-stat.is-noon > small { color: var(--muted); }
.hub-sun-stat.is-panel > small { color: #b39dff; }

.hub-sun-foot {
  margin: 10px 2px 0;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--dim);
}
.hub-sun-foot a { color: var(--cyan); text-decoration: none; }
.hub-sun-foot a:hover { text-decoration: underline; }

@media (max-width: 1120px) {
  .hub-sun-body { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hub-sun-head { flex-direction: column; align-items: flex-start; }
  .hub-sun-body { grid-template-columns: 1fr; }
  .hub-sun-chart-link { max-width: 300px; }
}
@media (max-width: 700px) {
  .hub-sun-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-sun-link { height: 27px; padding: 0 9px; font-size: 8.5px; gap: 5px; }
  .hub-sun-link svg { width: 12px; height: 12px; }
  .hub-sun-actions { width: 100%; }
  .hub-sun-actions > * { flex: 1 1 auto; justify-content: center; }
}

/* ── flood map banner (home) ─────────────────────────────────────────── */
.hub-flood-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 28px 0 6px;
  padding: 20px 24px;
  border-radius: 20px;
  text-decoration: none;
  color: #eafcff;
  background:
    radial-gradient(120% 160% at 12% 0%, rgba(62, 232, 255, .22), transparent 55%),
    linear-gradient(120deg, rgba(8, 145, 178, .35), rgba(11, 37, 69, .92));
  border: 1px solid rgba(62, 232, 255, .28);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.hub-flood-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(62, 232, 255, .6);
  box-shadow: 0 26px 64px rgba(8, 145, 178, .3), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.hub-flood-banner:focus-visible { outline: 3px solid #ffd166; outline-offset: 3px; }
.hub-flood-glow {
  position: absolute;
  inset: -60% -10% auto -10%;
  height: 180%;
  background: radial-gradient(ellipse at 18% 10%, rgba(127, 240, 224, .18), transparent 60%);
  pointer-events: none;
}
.hub-flood-icon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  color: #04211f;
  background: linear-gradient(135deg, #7ff0e0, #23b5a4);
  box-shadow: 0 12px 30px rgba(35, 181, 164, .45), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.hub-flood-icon svg { width: 31px; height: 31px; fill: currentColor; }
.hub-flood-copy { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hub-flood-kicker { font-size: 10px; font-weight: 700; letter-spacing: .18em; color: #7ff0e0; }
.hub-flood-copy strong { font-size: 20px; line-height: 1.3; }
.hub-flood-copy small { font-size: 12.5px; color: #a9c0d2; }
.hub-flood-cta {
  position: relative;
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 12px;
  background: #7ff0e0;
  color: #04211f;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(127, 240, 224, .25);
}

@media (max-width: 720px) {
  .hub-flood-banner { flex-wrap: wrap; gap: 12px; padding: 16px; margin-top: 20px; }
  .hub-flood-icon { width: 48px; height: 48px; border-radius: 14px; }
  .hub-flood-icon svg { width: 26px; height: 26px; }
  .hub-flood-copy strong { font-size: 17px; }
  .hub-flood-copy small { font-size: 11.5px; }
  .hub-flood-cta { width: 100%; justify-content: center; margin-left: 0; }
}
