@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Josefin+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --color-primary: #0F766E;
  --color-on-primary: #FFFFFF;
  --color-secondary: #14B8A6;
  --color-on-secondary: #0F172A;
  --color-accent: #0369A1;
  --color-on-accent: #FFFFFF;
  --color-background: #F0FDFA;
  --color-foreground: #134E4A;
  --color-card: #FFFFFF;
  --color-card-foreground: #134E4A;
  --color-muted: #E8F0F3;
  --color-muted-foreground: #475569;
  --color-border: #99F6E4;
  --color-destructive: #DC2626;
  --color-success: #059669;
  --color-warning: #D97706;
  --color-ring: #0F766E;
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Josefin Sans', sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 118, 110, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 118, 110, 0.08);
  --shadow-lg: 0 18px 40px rgba(3, 105, 161, 0.12);
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-foreground);
  background: var(--color-background);
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; border: none; background: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

/* ——— Nav ——— */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(240, 253, 250, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(153, 246, 228, 0.55);
  transition: background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.brand__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--color-foreground);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}
.nav__links a:not(.btn) {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-muted-foreground);
  transition: color 0.2s;
}
.nav__links a:not(.btn):hover { color: var(--color-primary); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary,
.nav__links a.btn--primary {
  background: linear-gradient(135deg, #0F766E, #0369A1);
  color: #FFFFFF !important;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.28);
  border: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav__links a.btn--primary {
  font-size: 0.88rem;
  padding: 0.55rem 1.1rem;
}
.btn--primary:hover,
.nav__links a.btn--primary:hover {
  color: #FFFFFF !important;
  box-shadow: 0 12px 28px rgba(3, 105, 161, 0.35);
  filter: brightness(1.06);
}
.btn--ghost {
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}
.btn--ghost:hover { background: rgba(15, 118, 110, 0.06); }
.btn--hero-primary {
  background: #FFFFFF;
  color: #0F4E4A !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.btn--hero-primary:hover {
  background: #F0FDFA;
  color: #0F4E4A !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}
.btn--hero-ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}
.btn--hero-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF !important;
}
.btn--soft {
  background: var(--color-muted);
  color: var(--color-accent);
  border-radius: 8px;
  min-height: 36px;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.btn--soft:hover { background: #dbe8ee; }
.btn--outline-sm {
  border: 1.5px solid var(--color-accent);
  color: var(--color-accent);
  border-radius: 8px;
  min-height: 36px;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--color-border);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-foreground);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--color-foreground);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: min(100vh, 860px);
  min-height: min(100dvh, 860px);
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(125deg, #0a3d3a 0%, #0F766E 38%, #0369A1 72%, #0c4a6e 100%);
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
}
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  will-change: transform;
}
.hero__orb--1 {
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  top: -8%;
  right: 8%;
  background: rgba(20, 184, 166, 0.45);
  animation: orbFloat 14s ease-in-out infinite alternate;
}
.hero__orb--2 {
  width: min(360px, 50vw);
  height: min(360px, 50vw);
  bottom: -10%;
  left: -5%;
  background: rgba(56, 189, 248, 0.35);
  animation: orbFloat 18s ease-in-out infinite alternate-reverse;
}
.hero__orb--3 {
  width: min(280px, 40vw);
  height: min(280px, 40vw);
  top: 40%;
  left: 40%;
  background: rgba(15, 118, 110, 0.4);
  animation: orbFloat 12s ease-in-out infinite alternate;
}
@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4%, -5%, 0) scale(1.08); }
}
.hero__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1.1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  width: min(1180px, calc(100% - 2rem));
  padding: clamp(2.5rem, 8vh, 4.5rem) 0 clamp(3.5rem, 10vh, 5rem);
}
.hero__copy { max-width: 34rem; z-index: 2; }
.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.05;
  margin-bottom: 0.85rem;
  color: #FFFFFF;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.2);
  animation: rise 0.8s var(--ease) both;
}
.hero__headline {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 500;
  line-height: 1.35;
  color: #FFFFFF;
  max-width: 22ch;
  margin-bottom: 0.7rem;
  animation: rise 0.8s var(--ease) 0.12s both;
}
.hero__sub {
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.55;
  color: #FFFFFF;
  max-width: 36ch;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
  animation: rise 0.8s var(--ease) 0.22s both;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.8s var(--ease) 0.32s both;
}
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
  animation: rise 0.9s var(--ease) 0.18s both;
}
.hero__map {
  width: min(100%, 500px);
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.28));
}
.hero__pin {
  transform-origin: center;
  animation: pinPulse 2.8s ease-in-out infinite;
}
.hero__pin--b { animation-delay: 0.4s; }
.hero__pin--c { animation-delay: 0.8s; }
.hero__pin--d { animation-delay: 1.2s; }
.hero__pin--e { animation-delay: 1.6s; }
@keyframes pinPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.18); }
}
.hero__stat-float {
  animation: floatSoft 5.5s ease-in-out infinite;
}
.hero__stat-float--2 { animation-delay: 1.2s; }
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero__scroll {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  animation: bob 2.2s ease-in-out infinite;
}
.hero__scroll span {
  width: 1px;
  height: 24px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.85), transparent);
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ——— Sections ——— */
.section {
  padding: var(--space-3xl) 0;
}
.section--alt {
  background: linear-gradient(180deg, #ffffff 0%, var(--color-background) 100%);
}
.section__head {
  margin-bottom: var(--space-xl);
  max-width: 40rem;
}
.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}
.section__desc {
  color: var(--color-muted-foreground);
  font-weight: 400;
}

.section--proof {
  padding: var(--space-xl) 0;
  background: #fff;
  border-bottom: 1px solid rgba(153, 246, 228, 0.45);
}
.proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.proof--compact {
  gap: var(--space-md);
}
.proof__item {
  padding: var(--space-md) 0;
  border-top: 2px solid var(--color-border);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.proof__item.in {
  opacity: 1;
  transform: none;
}
.proof__item h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--color-foreground);
}
.proof__item p {
  color: var(--color-muted-foreground);
  font-size: 0.9rem;
}

/* ——— Demo shell ——— */
.demo-shell {
  background: linear-gradient(165deg, #0b3d3a 0%, #0f4e4a 40%, #0c4a6e 100%);
  border-radius: 20px;
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: var(--shadow-lg);
  color: #e8f0f3;
}
.demo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.demo-toolbar__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.demo-toolbar h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--color-secondary);
  color: var(--color-on-secondary);
  font-weight: 700;
  font-size: 0.8rem;
}
.demo-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.toggle {
  display: inline-flex;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.12);
}
.toggle button {
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.toggle button.active {
  background: #fff;
  color: var(--color-primary);
}
.demo-toolbar .btn--ghost {
  border-color: rgba(20, 184, 166, 0.65);
  color: var(--color-secondary);
  min-height: 40px;
  font-size: 0.82rem;
}
.demo-toolbar .btn--primary {
  min-height: 40px;
  font-size: 0.82rem;
  border-radius: 10px;
}

/* Area cards */
.area-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.area-card {
  background: var(--color-card);
  color: var(--color-card-foreground);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(240px, 1.1fr) minmax(200px, 0.9fr);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.area-card.in {
  opacity: 1;
  transform: none;
}
.area-card__table,
.area-card__chart,
.area-card__summary {
  padding: 1rem;
}
.area-card__table {
  border-right: 1px solid #e8eef1;
}
.area-card__chart {
  border-right: 1px solid #e8eef1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.area-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}
.area-head strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.area-head span {
  font-size: 0.78rem;
  color: var(--color-muted-foreground);
}
.mini-table {
  font-size: 0.78rem;
}
.mini-table th,
.mini-table td {
  padding: 0.38rem 0.3rem;
  text-align: right;
  border-bottom: 1px solid #f0f4f6;
}
.mini-table th:first-child,
.mini-table td:first-child {
  text-align: left;
  font-weight: 600;
}
.mini-table th {
  color: var(--color-muted-foreground);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pos { color: var(--color-success); font-weight: 600; }
.neg { color: var(--color-destructive); font-weight: 600; }
.hi-demand {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
  font-weight: 700;
  border-radius: 4px;
}
.area-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.chart-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.chart-tabs button {
  min-height: 32px;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-muted-foreground);
  border: 1px solid transparent;
}
.chart-tabs button.active {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: rgba(3, 105, 161, 0.06);
}
.chart-wrap {
  position: relative;
  height: 120px;
}
.chart-wrap canvas { width: 100% !important; height: 100% !important; }
.chart-filters {
  display: flex;
  gap: 0.4rem;
}
.chart-filters select {
  flex: 1;
  min-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 0.45rem;
  font-size: 0.75rem;
  color: var(--color-foreground);
  background: #fff;
}
.kpi {
  margin-bottom: 0.85rem;
}
.kpi__label {
  font-size: 0.72rem;
  color: var(--color-muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi__value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1.2;
}
.kpi__meta {
  font-size: 0.78rem;
  color: var(--color-muted-foreground);
  margin-top: 0.15rem;
}
.meters {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.meter__label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  margin-bottom: 0.25rem;
  color: var(--color-muted-foreground);
}
.meter__track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fca5a5 0%, #fde68a 45%, #86efac 100%);
}
.meter__marker {
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--color-foreground);
  transform: translate(-50%, -50%);
}

/* Heat map */
.heatmap-panel {
  background: var(--color-card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.heatmap-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #1c1917;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.heatmap-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e8eef1;
  background: #fff;
}
.map-toggles {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: var(--color-muted);
  border: 1px solid #e2e8f0;
}
.map-toggle {
  min-height: 34px;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted-foreground);
  cursor: pointer;
}
.map-toggle.active {
  background: #fff;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.map-stage {
  position: relative;
}
.map-legend {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 500;
  max-width: min(280px, calc(100% - 1.5rem));
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 118, 110, 0.18);
  box-shadow: var(--shadow-md);
  pointer-events: none;
}
.map-legend p {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-foreground);
  margin-bottom: 0.35rem;
}
.map-legend__bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.2rem;
  text-align: center;
}
.map-legend__bar span {
  display: block;
  height: 10px;
  border-radius: 3px;
}
.map-legend__bar small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.58rem;
  color: var(--color-muted-foreground);
}
.zip-heat-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #0f3d3e !important;
  font-weight: 700 !important;
  font-size: 10px !important;
  font-family: var(--font-display), serif !important;
}
.map-popup__metric {
  margin-top: 0.35rem;
  color: var(--color-foreground) !important;
}
.map-popup em {
  font-style: normal;
  opacity: 0.75;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(3, 105, 161, 0.08);
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(3, 105, 161, 0.2);
}
#map {
  height: min(520px, 70vh);
  width: 100%;
  background: #e8f0f3;
}
.map-popup {
  font-family: var(--font-body);
  min-width: 160px;
}
.map-popup strong {
  display: block;
  font-size: 1.05rem;
  color: var(--color-accent);
  margin-bottom: 0.2rem;
}
.map-popup span {
  display: block;
  font-size: 0.8rem;
  color: var(--color-muted-foreground);
}
.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
  box-shadow: var(--shadow-md) !important;
}

/* Discover */
.discover-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-lg);
  align-items: start;
}
.filter-panel {
  background: var(--color-card);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.filter-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.filter-panel__head h3 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--color-primary);
}
.filter-group {
  margin-bottom: 0.9rem;
}
.filter-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted-foreground);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.filter-group select,
.filter-group input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 0.65rem;
  background: #fff;
  color: var(--color-foreground);
}
.range-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.discover-table-wrap {
  background: var(--color-card);
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.discover-table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid #e8eef1;
}
.discover-table-head h3 {
  color: var(--color-primary);
  font-size: 1.05rem;
}
.discover-table-head p {
  font-size: 0.8rem;
  color: var(--color-muted-foreground);
}
.search-input {
  min-height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 0.75rem;
  min-width: min(220px, 100%);
}
.table-scroll { overflow-x: auto; }
.data-table {
  font-size: 0.85rem;
  min-width: 720px;
}
.data-table th {
  text-align: left;
  padding: 0.7rem 0.85rem;
  background: #f8fafc;
  color: var(--color-muted-foreground);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e8eef1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.data-table th:hover { color: var(--color-primary); }
.data-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}
.data-table tbody tr:nth-child(even) { background: #fafcfd; }
.data-table tbody tr:hover { background: rgba(15, 118, 110, 0.05); }
.data-table .zip {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Research summary */
.research-panel {
  background: var(--color-card);
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.research-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e8eef1;
}
.research-panel__head h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* Sources */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.source-item {
  padding: var(--space-lg);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(153, 246, 228, 0.7);
  backdrop-filter: blur(8px);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.source-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.source-item h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.source-item p {
  font-size: 0.9rem;
  color: var(--color-muted-foreground);
}
.source-item a {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
  margin-top: 0.5rem;
}
.source-item a:hover { text-decoration: underline; }
.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: rgba(5, 150, 105, 0.12);
  color: var(--color-success);
}

/* CTA / Footer */
.cta-band {
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(20, 184, 166, 0.2), transparent 55%),
    linear-gradient(180deg, var(--color-background), #ffffff);
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}
.cta-band p {
  color: var(--color-muted-foreground);
  margin-bottom: 1.25rem;
}
.footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
  background: #fff;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.footer p {
  font-size: 0.85rem;
  color: var(--color-muted-foreground);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  background: var(--color-foreground);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s;
  max-width: min(320px, calc(100% - 2rem));
}
.toast.show {
  transform: none;
  opacity: 1;
}

@media (max-width: 900px) {
  .hero__layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 2rem 0 3.5rem;
  }
  .hero__copy {
    max-width: none;
    text-align: center;
  }
  .hero__headline,
  .hero__sub {
    max-width: none;
    margin-inline: auto;
  }
  .hero__cta {
    justify-content: center;
  }
  .hero__visual {
    max-width: 360px;
    width: 100%;
    margin-inline: auto;
    min-height: 200px;
  }
  .hero__map { width: 100%; max-width: 360px; }
  .hero__scroll { display: none; }
  .area-card {
    grid-template-columns: 1fr;
  }
  .area-card__table,
  .area-card__chart {
    border-right: none;
    border-bottom: 1px solid #e8eef1;
  }
  .discover-layout {
    grid-template-columns: 1fr;
  }
  .filter-panel { position: static; }
  .demo-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .demo-toolbar__actions {
    width: 100%;
  }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .nav-toggle { display: inline-flex; }
  .brand__name { font-size: 1.05rem; }
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.35rem;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
  }
  .nav__links.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav__links a,
  .nav__links .btn {
    width: 100%;
    justify-content: center;
  }
  .hero {
    min-height: auto;
    align-items: flex-start;
  }
  .hero__brand {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }
  .hero__headline {
    font-size: 1.15rem;
  }
  .hero__sub {
    font-size: 0.95rem;
  }
  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }
  .hero__cta .btn {
    width: 100%;
  }
  .hero__orb--1,
  .hero__orb--2,
  .hero__orb--3 {
    filter: blur(48px);
    opacity: 0.85;
  }
  .section {
    padding: var(--space-2xl) 0;
  }
  .section__title {
    font-size: 1.35rem;
  }
  .proof { grid-template-columns: 1fr; }
  .proof--compact .proof__item {
    padding: 0.75rem 0;
  }
  .sources-grid { grid-template-columns: 1fr; }
  .demo-shell {
    border-radius: 14px;
    padding: 0.85rem;
  }
  .demo-toolbar__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .demo-toolbar__actions .toggle,
  .demo-toolbar__actions .btn {
    width: 100%;
    justify-content: center;
  }
  .toggle {
    width: 100%;
  }
  .toggle button {
    flex: 1;
  }
  #map {
    height: min(380px, 55vh);
  }
  .heatmap-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .heatmap-controls .btn,
  .map-toggles {
    width: 100%;
  }
  .map-toggles {
    justify-content: stretch;
  }
  .map-toggle {
    flex: 1;
  }
  .map-legend {
    left: 0.5rem;
    right: 0.5rem;
    max-width: none;
    bottom: 0.5rem;
  }
  .discover-table-head {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input {
    min-width: 0;
    width: 100%;
  }
  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1.25rem, 1180px);
  }
  .hero__layout {
    padding: 1.5rem 0 2.5rem;
  }
  .hero__visual {
    max-width: 100%;
    min-height: 160px;
  }
  .hero__stat-float text {
    font-size: 10px;
  }
  .area-card__table,
  .area-card__chart,
  .area-card__summary {
    padding: 0.85rem;
  }
  .kpi__value {
    font-size: 1.2rem;
  }
  .chart-tabs {
    gap: 0.25rem;
  }
  .chart-tabs button {
    font-size: 0.68rem;
    padding: 0.2rem 0.4rem;
  }
  .mini-table {
    font-size: 0.72rem;
  }
  .btn--soft,
  .btn--outline-sm {
    width: 100%;
    justify-content: center;
  }
  .area-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero__brand, .hero__headline, .hero__sub, .hero__cta, .hero__visual {
    opacity: 1;
    transform: none;
  }
}

/* ——— Extreme minimal layout ——— */
.page-min {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(153, 246, 228, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(125, 211, 252, 0.28), transparent 50%),
    var(--color-background);
}

.page-min__inner {
  width: min(960px, calc(100% - 1.5rem));
  padding: 1.25rem 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.page-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.15rem 0 0.35rem;
}

.page-brand h1 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-foreground);
}

.live-pill {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(15, 118, 110, 0.1);
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.block {
  background: var(--color-card);
  border: 1px solid rgba(153, 246, 228, 0.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.1rem 1.15rem;
}

.block--quiet {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0.25rem 0.15rem;
}

.block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.block__head h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-foreground);
}

.block__hint {
  font-size: 0.82rem;
  color: var(--color-muted-foreground);
  margin-top: 0.15rem;
}

.search-bar {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.search-input--lg {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  font-size: 1rem;
  padding: 0 1rem;
  border-radius: 10px;
  border-color: rgba(153, 246, 228, 0.9);
  background: #fff;
}

#filter-toggle {
  min-height: 48px;
  padding-inline: 1rem;
  flex-shrink: 0;
}

#filter-toggle.is-active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(15, 118, 110, 0.08);
}

.filter-panel-min {
  margin-bottom: 0.85rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(153, 246, 228, 0.7);
  border-radius: 10px;
  background: rgba(240, 253, 250, 0.55);
}

.filter-panel-min[hidden] {
  display: none !important;
}

.filter-grid-min {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.75rem;
}

.filter-grid-min .filter-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted-foreground);
  margin-bottom: 0.3rem;
}

.filter-grid-min .filter-group select,
.filter-grid-min .filter-group input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 0.65rem;
  background: #fff;
  color: var(--color-foreground);
}

.filter-actions-min {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.pager {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pager__dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.2rem;
  max-width: 200px;
}

.pager__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease);
}

.pager__dot.active {
  background: var(--color-primary);
  transform: scale(1.25);
}

.pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.toggle--inline {
  margin-bottom: 0.75rem;
  width: fit-content;
}

.page-min .area-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.page-min .area-card {
  box-shadow: none;
  border-color: rgba(153, 246, 228, 0.55);
}

.discover-mini {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.page-min .data-table--compact {
  min-width: 0;
  width: 100%;
}

.discover-mini .muted {
  font-size: 0.75rem;
  color: var(--color-muted-foreground);
  margin-top: 0.1rem;
}

.discover-mini .empty {
  text-align: center;
  color: var(--color-muted-foreground);
  padding: 1.25rem;
}

.sources-min__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.sources-min {
  font-size: 0.85rem;
  color: var(--color-muted-foreground);
  line-height: 1.5;
}

.sources-min a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sources-min code {
  font-size: 0.8em;
  background: rgba(15, 118, 110, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .page-min__inner {
    gap: 1rem;
    padding-top: 1rem;
  }
  .block__head {
    flex-direction: column;
  }
  .pager {
    width: 100%;
    justify-content: space-between;
  }
  .pager__dots {
    max-width: none;
    flex: 1;
  }
  .search-bar {
    flex-direction: column;
  }
  .filter-grid-min {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .filter-grid-min {
    grid-template-columns: 1fr;
  }
}
