/* ═══════════════════════════════════════════════════════════════════════════
   YGN — Civic Government Portal — Stylesheet
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Custom Properties ─────────────────────────────────────────────────────── */
:root {
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  --color-header-bg: #1a1f2e;
  --color-header-text: #e8eaf0;
  --color-nav-bg: #242938;
  --color-nav-text: #b0b8cc;
  --color-nav-active: #ffffff;
  --color-nav-active-border: #4f8ef7;
  --color-accent: #4f8ef7;
  --color-accent-hover: #3a7de8;
  --color-text: #1a1f2e;
  --color-text-muted: #5a6272;
  --color-border: #dde2ec;
  --color-card-shadow: rgba(26, 31, 46, 0.08);
  --color-tint-blue: rgba(59, 130, 246, 0.18);
  --color-tint-red: rgba(239, 68, 68, 0.18);
  --color-tint-gray: rgba(148, 163, 184, 0.15);
  --color-connected: #22c55e;
  --color-disconnected: #ef4444;
  --color-skeleton: #e2e8f0;
  --color-skeleton-shine: #f1f5f9;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --radius-card: 12px;
  --radius-sm: 6px;
  --shadow-card: 0 2px 8px var(--color-card-shadow);
  --transition-fast: 0.15s ease;
  --transition-med: 0.25s ease;
}

/* ── Global Reset & Base ───────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
}

/* ── Accessibility ─────────────────────────────────────────────────────────── */
.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;
}

/* ── Site Header ───────────────────────────────────────────────────────────── */
.site-header {
  background: var(--color-header-bg);
  color: var(--color-header-text);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  min-height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #ffffff;
  text-decoration: none;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  white-space: nowrap;
}

.brand-tagline {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-nav-text);
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 8px;
}

#health-indicator {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background var(--transition-med), color var(--transition-med);
  flex: 0 0 auto;
}

#health-indicator.connected {
  background: rgba(34, 197, 94, 0.2);
  color: var(--color-connected);
  border: 1px solid var(--color-connected);
}

#health-indicator.disconnected {
  background: rgba(239, 68, 68, 0.2);
  color: var(--color-disconnected);
  border: 1px solid var(--color-disconnected);
}

#health-indicator.checking {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border: 1px solid transparent;
}

/* ── Main Navigation ───────────────────────────────────────────────────────── */
.main-nav {
  background: var(--color-nav-bg);
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--color-nav-text);
  padding: 0 1.25rem;
  height: 44px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  flex-shrink: 0;
}

.main-nav a:hover {
  color: white;
}

.main-nav a.active {
  color: var(--color-nav-active);
  border-bottom: 3px solid var(--color-nav-active-border);
}

.main-nav a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ── Main Content ──────────────────────────────────────────────────────────── */
#main-content {
  padding: 2rem max(1rem, 5vw);
}

/* Sections: hidden by default, shown when active */
#main-content section {
  display: none;
}

#main-content section.active {
  display: block;
}

/* Ensure .hidden doesn't override .active */
#main-content section.hidden {
  display: none;
}

/* ── Home Section ──────────────────────────────────────────────────────────── */
.home-dashboard {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  min-height: 520px;
  margin-bottom: 2.5rem;
}

.home-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 6rem);
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.04rem;
  color: var(--color-text-muted);
  max-width: 48ch;
  line-height: 1.7;
}

.daily-quote {
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--color-accent);
  max-width: 52ch;
}

.daily-quote blockquote {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.24rem;
  line-height: 1.45;
}

.daily-quote figcaption {
  margin-top: 0.65rem;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.daily-quote figcaption::before {
  content: "- ";
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.stat-card {
  background: var(--color-surface);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card .stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--color-accent);
  font-family: var(--font-display);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.stat-source {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 0.65rem;
}

.home-map-section {
  scroll-margin-top: 120px;
}

/* ── Members Section ───────────────────────────────────────────────────────── */
.members-controls {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#members-search {
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition-fast), outline var(--transition-fast);
}

#members-search::placeholder {
  color: var(--color-text-muted);
}
#members-search:focus {
  outline: 2px solid var(--color-accent);
  border-color: var(--color-accent);
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

/* ── Member Tile ───────────────────────────────────────────────────────────── */
.member-tile {
  background: var(--color-surface);
  border-radius: 8px;
  padding: 0.2rem 0.2rem 0.65rem;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-width: 0;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border: 1px solid var(--color-border);
}

.member-tile:hover,
.member-tile:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(26, 31, 46, 0.15);
}

.member-tile:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* NOMINATE tinting — directly applied via JS now */

/* Tile photo */
.tile-photo-wrapper {
  position: relative;
  display: block;
  margin: 0 0 0.55rem;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 5px;
  background: var(--color-nav-bg);
}

.tile-photo {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Tile initials fallback */
.tile-initials {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  background: var(--color-nav-bg);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  user-select: none;
  flex-shrink: 0;
}

.tile-name {
  font-family: var(--font-display);
  font-weight: 600;
  text-align: center;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.tile-meta {
  font-family: var(--font-display);
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.party-badge {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  bottom: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
  color: white;
}

.ethics-badge {
  position: absolute;
  min-width: 34px;
  height: 30px;
  padding: 0 6px;
  border-radius: 999px;
  bottom: 8px;
  right: 8px;
  border: 2px solid white;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.party-D {
  background: #5A82C2;
}

.party-R {
  background: #C45C5C;
}

.party-I {
  background: #94A3B8;
}

/* ── Popover ───────────────────────────────────────────────────────────────── */
.popover {
  position: fixed;
  z-index: 1000;
  max-width: 320px;
  background: white;
  border-radius: var(--radius-card);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  display: none;
  border: 1px solid var(--color-border);
}

.popover.visible {
  display: block;
}

.popover-name {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  padding-right: 1.5rem; /* space for close button */
}

.popover-summary {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.popover-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.popover-close:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.popover-close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ── Skeleton Loading ──────────────────────────────────────────────────────── */
@keyframes skeleton-shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}

.skeleton-tile {
  background: var(--color-surface);
  border-radius: 8px;
  padding: 0.35rem 0.35rem 0.7rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.skeleton-circle {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--color-skeleton) 25%,
    var(--color-skeleton-shine) 50%,
    var(--color-skeleton) 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.5s infinite linear;
  margin-bottom: 0.25rem;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--color-skeleton) 25%,
    var(--color-skeleton-shine) 50%,
    var(--color-skeleton) 75%
  );
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.5s infinite linear;
}

.skeleton-line.wide {
  width: 80%;
}

.skeleton-line.medium {
  width: 60%;
}

.skeleton-line.narrow {
  width: 40%;
}

/* ── State Indicators ──────────────────────────────────────────────────────── */
.error-state,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  width: 100%;
  grid-column: 1 / -1;
}

.error-state .state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-disconnected);
}

.empty-state .state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.error-state p,
.empty-state p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  max-width: 30ch;
}

/* Map / Districts */
.map-page,
.methodology-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.map-heading,
.methodology-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.map-heading h2,
.methodology-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--color-text);
}

.eyebrow {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.map-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.primary-button,
.secondary-button {
  min-height: 38px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  padding: 0 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.primary-button {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}

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

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary-button {
  background: var(--color-surface);
  color: var(--color-text);
}

.secondary-button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.icon-button,
.inline-info {
  width: 34px;
  padding: 0;
  border-radius: 50%;
  text-align: center;
}

.inline-info {
  width: 18px;
  height: 18px;
  min-height: 18px;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  margin-left: 0.25rem;
}

.map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 1rem;
  align-items: stretch;
}

.map-stage {
  position: relative;
  min-height: 560px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,246,249,0.92));
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

#us-map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  touch-action: none;
}

.state-shape {
  stroke: #ffffff;
  stroke-width: 0.75;
  cursor: pointer;
  transition: fill var(--transition-fast), filter var(--transition-fast), stroke-width var(--transition-fast);
}

.state-shape:hover,
.state-shape:focus {
  filter: brightness(1.07);
  stroke: #1a1f2e;
  stroke-width: 1.15;
  outline: none;
}

.district-shape {
  fill: rgba(255, 255, 255, 0.16);
  stroke: #1a1f2e;
  stroke-width: 0.45;
  cursor: pointer;
  pointer-events: auto;
}

.district-shape:hover {
  fill: rgba(79, 142, 247, 0.28);
  stroke-width: 0.9;
}

.map-tooltip {
  position: absolute;
  z-index: 5;
  display: none;
  min-width: 180px;
  max-width: 220px;
  border-radius: 6px;
  border: 1px solid rgba(26, 31, 46, 0.15);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(26, 31, 46, 0.18);
  padding: 0.65rem 0.75rem;
  pointer-events: none;
}

.map-tooltip.visible {
  display: block;
}

.map-tooltip strong,
.map-tooltip span {
  display: block;
}

.map-tooltip strong {
  font-size: 0.88rem;
}

.map-tooltip span {
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.map-status {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 0.55rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(26, 31, 46, 0.08);
}

.map-status.error {
  color: var(--color-disconnected);
}

.map-status.warn {
  color: #9a6a10;
}

.state-panel {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  height: 560px;
  min-height: 560px;
  transform: translateX(0);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.state-panel.panel-animate {
  animation: panel-slide-in 260ms ease-out;
}

@keyframes panel-slide-in {
  from {
    opacity: 0.55;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.state-panel h3 {
  font-size: 1.45rem;
  margin-bottom: 0.55rem;
  min-height: 1.8rem;
}

.state-summary {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1rem;
  min-height: 5.95rem;
  max-height: 5.95rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.state-metrics {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.state-metrics > div {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem;
  background: #fbfcff;
}

.metric-label {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 0.25rem;
}

.state-metrics strong {
  font-size: 1.05rem;
}

.gerry-meter {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 0.55rem;
}

.gerry-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 280ms ease, background 280ms ease;
}

.metric-note,
.district-status {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  margin-top: 0.55rem;
}

.metric-note {
  min-height: 2.35rem;
}

.district-status {
  margin: 1rem 0 0.65rem;
  min-height: 2.35rem;
}

.district-list {
  display: grid;
  gap: 0.45rem;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 0.25rem;
}

.district-row {
  display: grid;
  gap: 0.12rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  background: #ffffff;
  min-height: 54px;
}

.district-row span {
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.district-row strong {
  color: var(--color-text);
  font-size: 0.84rem;
}

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

.methodology-grid > div {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  padding: 1rem;
  box-shadow: var(--shadow-card);
}

.methodology-grid h3 {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
}

.methodology-grid p,
.methodology-list {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.methodology-list {
  padding-left: 1.1rem;
}

.methodology-sources {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.methodology-sources a {
  color: var(--color-accent);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.methodology-sources a:hover {
  text-decoration: underline;
}

/* ── Coming Soon Sections ──────────────────────────────────────────────────── */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.coming-soon-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.coming-soon h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.coming-soon p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

@media (max-width: 1200px) {
  .members-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1024px) {
  .home-dashboard {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 2rem;
  }

  .members-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .map-shell,
  .methodology-grid {
    grid-template-columns: 1fr;
  }

  .state-panel {
    height: auto;
    min-height: 560px;
  }
}

@media (max-width: 860px) {
  .members-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .site-header {
    flex-direction: row;
    height: auto;
    padding: 0.75rem 1rem;
    gap: 1rem;
  }

  .brand {
    gap: 0.6rem;
  }

  .brand-tagline {
    display: none;
  }

  #main-content {
    padding: 1rem;
  }

  .home-stats {
    grid-template-columns: 1fr;
  }

  .home-copy h1 {
    font-size: 3rem;
  }

  .daily-quote blockquote {
    font-size: 1.08rem;
  }

  .members-controls {
    flex-direction: column;
  }

  #members-search {
    width: 100%;
  }

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

  .map-heading,
  .methodology-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-actions {
    width: 100%;
  }

  .map-actions .secondary-button {
    flex: 1;
  }

  .map-stage,
  #us-map {
    min-height: 390px;
  }

  .state-panel {
    min-height: auto;
  }

  .state-summary {
    min-height: 6.5rem;
    max-height: 6.5rem;
  }

  .coming-soon {
    padding: 2rem 1rem;
  }
}

@media (max-width: 450px) {
  .members-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .site-header {
    min-height: 56px;
  }

  #health-indicator {
    padding: 4px 10px;
  }
}
