/* ============================================================
   RAINPLAN EXPLORER — Light Theme
   Clean, modern SaaS aesthetic matching Rainplan.com.
   White base with Rainplan-blue accents.
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --bg-deep: #FFFFFF;
  --bg-panel: #F5F6F8;
  --bg-card: #FFFFFF;
  --accent-water: #1570EF;
  --accent-rain: #067647;
  --accent-warm: #E87B2F;
  --text-primary: #181D27;
  --text-muted: #535862;
  --border: #E9EAEB;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Sans', system-ui, sans-serif;

  --panel-width: 420px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 100px;
  --transition-panel: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --shadow-glow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lift: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* ── Motion tokens (mobile-friendly pass 2026-04-21) ── */
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 200ms;
  --dur-base: 240ms;
  --dur-drag: 320ms;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0.01ms;
    --dur-base: 0.01ms;
    --dur-drag: 0.01ms;
  }
}


/* --- Accessibility --- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: 8px 16px;
  background: var(--accent-water);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-deep);
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-water); text-decoration: none; }
a:hover { text-decoration: underline; }


/* View switching */
.view { display: none; }
.view--active { display: block; }

/* ============================================================
   MAP — Full-viewport background canvas
   ============================================================ */
#map {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  background: var(--bg-deep);
  transition: left 400ms cubic-bezier(0.34, 1.56, 0.64, 1), width 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ============================================================
   EXPLORER BAR — Compact header for map view
   ============================================================ */
/* Site header active nav link */
.site-header__nav-active {
  color: var(--accent-water) !important;
  font-weight: 600 !important;
}

/* Explorer toolbar — sits below the shared site-header */
.explorer-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0.6rem 2.5rem;
  background: #FAFBFC;
  border-bottom: 1px solid var(--border);
}

.explorer-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Both site-header + explorer-bar height combined */
.page-explorer .site-header {
  z-index: 201;
}
.page-explorer #panel {
  top: 142px;
  height: calc(100vh - 142px);
}
.page-explorer.panel-open #map {
  top: 0;
}

.explorer-bar__search {
  flex: 1;
  max-width: 480px;
}

.explorer-bar__search input {
  padding: 0.55rem 5rem 0.55rem 2.5rem;
  font-size: 0.88rem;
}

.explorer-bar__search .cta-button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
}

.explorer-bar__stats {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.explorer-bar__stat {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.explorer-bar__stat--link {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 150ms, background 150ms;
}
@media (hover: hover) {
  .explorer-bar__stat--link:hover {
    border-color: var(--border);
    background: #F0F4FF;
  }
}

.explorer-bar__stat strong {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.explorer-bar__cta {
  margin-left: auto;
  background: var(--accent-water);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms;
}
@media (hover: hover) {
  .explorer-bar__cta:hover {
    background: #1260D4;
  }
}

.explorer-bar__link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-water);
  white-space: nowrap;
}


/* --- Search Bar --- */
.search-bar {
  position: relative;
  max-width: 520px;
}

.search-bar::before {
  display: none;
}

@keyframes search-glow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.search-bar input {
  width: 100%;
  padding: 0.85rem 6rem 0.85rem 2.8rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 200ms, box-shadow 200ms;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar input:focus {
  border-color: var(--accent-water);
  box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.12);
}

.search-bar .search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

/* Clear (x) button inside the search input */
.search-clear {
  position: absolute;
  right: 5.25rem; /* sits to the left of the Search button */
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  flex: 0 0 auto;
  z-index: 2;
}
@media (hover: hover) {
  .search-clear:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
  }
}
.search-clear:focus-visible {
  outline: 2px solid var(--accent-water);
  outline-offset: 2px;
  border-radius: 4px;
}
.search-clear[hidden] { display: none; }


/* --- Search Dropdown --- */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}

.search-dropdown.active {
  display: block;
  position: fixed;
  left: var(--dd-left, 0);
  top: var(--dd-top, 0);
  right: auto;
  width: var(--dd-width, 520px);
  z-index: 9999;
}

/* Marketing page dropdown — normal flow inside search card */
.mkt-search-dropdown.active {
  position: absolute;
  left: 0;
  right: 0;
  top: auto;
  width: auto;
  z-index: 9999;
}


.search-dropdown__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background 120ms;
}

.search-dropdown__item:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.search-dropdown__item:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.search-dropdown__item--active {
  background: rgba(21, 112, 239, 0.06);
}
@media (hover: hover) {
  .search-dropdown__item:hover {
    background: rgba(21, 112, 239, 0.06);
  }
}

.search-dropdown__name {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.search-dropdown__type {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.search-dropdown__type--state {
  background: rgba(21, 112, 239, 0.1);
  color: #1570EF;
}

.search-dropdown__type--program {
  background: rgba(6, 118, 71, 0.08);
  color: #067647;
}

.search-dropdown__type--county {
  background: rgba(232, 123, 47, 0.1);
  color: #C4640A;
}

.search-dropdown__type--funder {
  background: rgba(107, 78, 173, 0.1);
  color: #6B4EAD;
}

/* --- Address Search Row --- */
.search-dropdown__address-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(21,112,239,0.06) 0%, rgba(19,125,94,0.04) 100%);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 150ms;
}
.search-dropdown__address-row.search-dropdown__item--active {
  background: linear-gradient(135deg, rgba(21,112,239,0.12) 0%, rgba(19,125,94,0.08) 100%);
}
@media (hover: hover) {
  .search-dropdown__address-row:hover {
    background: linear-gradient(135deg, rgba(21,112,239,0.12) 0%, rgba(19,125,94,0.08) 100%);
  }
}
.search-dropdown__address-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1570EF, #137D5E);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-dropdown__address-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.search-dropdown__address-text strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-dropdown__address-text span {
  font-size: 0.72rem;
  color: var(--accent-water);
  font-weight: 500;
}
.search-dropdown__address-arrow {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--accent-water);
  font-weight: 600;
}

/* Divider between address and entity results */
.search-dropdown__divider {
  padding: 6px 14px;
  background: #F9FAFB;
  border-bottom: 1px solid var(--border);
}
.search-dropdown__divider span {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Address mode — icon swap + subtle input glow */
.mkt-search-input--address .search-icon {
  color: var(--accent-water);
}
.mkt-search-input--address input {
  border-color: var(--accent-water);
  box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.08);
}

/* ============================================================
   PANEL — Left-side slide-in, 50% width, pushes map right
   ============================================================ */
#panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 50vw;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;

  /* Clean white panel */
  background: #FFFFFF;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);

  /* Slide-in from left */
  transform: translateX(-100%);
  transition: var(--transition-panel);
  will-change: transform;
  border-right: 1px solid var(--border);
  border-left: none;
}

#panel .panel-inner {
  padding: 2rem 2.5rem 6rem;
}

/* Drag handle is a mobile-only affordance (bottom sheet); hide on desktop. */
.panel-drag-handle { display: none; }

/* Body class triggers panel open */
.panel-open #panel {
  transform: translateX(0);
}

/* Push map to the right when panel is open */
.panel-open #map {
  left: 50vw;
  width: 50vw;
}


/* ============================================================
   BREADCRUMBS — Floating pill bar at panel top
   ============================================================ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  width: fit-content;
}

.breadcrumbs a {
  color: var(--text-muted);
  transition: color 150ms;
}

.breadcrumbs a:hover {
  color: var(--accent-water);
  text-decoration: none;
}

.breadcrumbs .separator {
  opacity: 0.4;
  margin: 0 0.15rem;
}

.breadcrumbs .current {
  color: var(--text-primary);
  font-weight: 500;
}


/* ============================================================
   CARDS — Entity cards
   ============================================================ */
.card {
  background: #FFFFFF;
  border: 1px solid #ECEEF1;
  border-top: 3px solid var(--accent-water);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: box-shadow 200ms, transform 150ms, border-color 150ms;
}

@media (hover: hover) {
  .card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
  }
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Entity-typed card accents */
.card--program { border-left-color: var(--accent-water); }
.card--county { border-left-color: var(--accent-rain); }
.card--funder { border-left-color: var(--accent-warm); }
@media (hover: hover) {
  .card--program:hover { background: #F7FAFF; border-left-color: var(--accent-water); }
  .card--county:hover { background: #F5FBF8; border-left-color: var(--accent-rain); }
  .card--funder:hover { background: #FEF9F5; border-left-color: var(--accent-warm); }
}

/* Legacy compat */
.card--rain { border-left-color: var(--accent-rain); }
.card--warm { border-left-color: var(--accent-warm); }


/* ============================================================
   BADGES — Pill-shaped status/type indicators
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.65rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  background: #F1F1F1;
  color: var(--text-muted);
  white-space: nowrap;
}

.badge--active {
  background: rgba(6, 118, 71, 0.08);
  color: var(--accent-rain);
}

.badge--active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-rain);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.badge--rebate {
  background: rgba(232, 123, 47, 0.1);
  color: #C4640A;
}

.badge--grant {
  background: rgba(6, 118, 71, 0.08);
  color: var(--accent-rain);
}

.badge--location {
  background: #F1F1F1;
  color: var(--text-muted);
}


/* ============================================================
   COST INDICATOR — Dollar signs for cost range
   ============================================================ */
.cost-indicator {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.cost-indicator .filled {
  color: var(--accent-warm);
}

.cost-indicator .empty {
  color: rgba(0, 0, 0, 0.15);
}


/* ============================================================
   METRIC STRIP — Horizontal stats inside cards/panels
   ============================================================ */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
  padding: 0.75rem 0 0;
  margin-top: 0.5rem;
}

.metric {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.metric .metric-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.metric .metric-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}


/* ============================================================
   CIRCULAR PROGRESS — CSS-only circular indicator
   ============================================================ */
.circular-progress {
  --size: 56px;
  --stroke: 5px;
  --progress: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(
    var(--accent-water) calc(var(--progress) * 1%),
    rgba(21, 112, 239, 0.1) 0
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.circular-progress::after {
  content: '';
  width: calc(var(--size) - var(--stroke) * 2);
  height: calc(var(--size) - var(--stroke) * 2);
  border-radius: 50%;
  background: var(--bg-card);
}

.circular-progress .progress-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
}


/* ============================================================
   BMP GALLERY — Horizontal scroll strip for BMP photos
   ============================================================ */
.bmp-gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-water) transparent;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.bmp-gallery::-webkit-scrollbar {
  height: 4px;
}

.bmp-gallery::-webkit-scrollbar-track {
  background: transparent;
}

.bmp-gallery::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.bmp-card {
  flex: 0 0 200px;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color 200ms;
}

.bmp-card:hover {
  border-color: var(--accent-water);
}

.bmp-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bmp-card .bmp-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 0.7rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-size: 0.75rem;
  font-weight: 500;
  color: #FFFFFF;
}

.bmp-card .bmp-overlay .bmp-type {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-rain);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ============================================================
   INCENTIVE CARD — Rich incentive detail with left accent
   ============================================================ */
.incentive-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-warm);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 0.75rem;
  transition: box-shadow 250ms ease;
}

@media (hover: hover) {
  .incentive-card:hover {
    box-shadow: 0 2px 16px rgba(255, 143, 63, 0.08);
  }
}

.incentive-card h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.incentive-card .incentive-amount {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-warm);
}

.incentive-card .incentive-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.35rem;
}

.incentive-card--grant {
  border-left-color: var(--accent-rain);
}

.incentive-card--grant .incentive-amount {
  color: var(--accent-rain);
}


/* ============================================================
   CTA BANNER — Persistent bottom-of-viewport bar
   ============================================================ */
.cta-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

.cta-banner p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.cta-banner p strong {
  color: var(--text-primary);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: #FFFFFF;
  background: #195ABD;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 150ms, box-shadow 200ms;
}

@media (hover: hover) {
  .cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 90, 189, 0.3);
    text-decoration: none;
    color: #FFFFFF;
  }
}

.cta-button--warm {
  background: var(--accent-warm);
}

@media (hover: hover) {
  .cta-button--warm:hover {
    box-shadow: 0 4px 12px rgba(232, 123, 47, 0.3);
  }
}


/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    #F1F1F1 25%,
    #E9EAEB 50%,
    #F1F1F1 75%
  );
  background-size: 400% 100%;
  animation: pulse 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
  min-height: 1em;
}

.skeleton--text { height: 0.85rem; margin-bottom: 0.5rem; }
.skeleton--text:last-child { width: 60%; }
.skeleton--heading { height: 1.4rem; width: 70%; margin-bottom: 0.75rem; }
.skeleton--card { height: 100px; margin-bottom: 0.85rem; border-radius: var(--radius-md); }
.skeleton--circle { width: 56px; height: 56px; border-radius: 50%; }

@keyframes pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ============================================================
   ANIMATIONS — Entrance, stagger, interaction
   ============================================================ */

/* Staggered card entrance */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeSlideUp 450ms ease-out forwards;
  animation-delay: calc(var(--delay, 0) * 100ms);
}


/* ============================================================
   UTILITY — Scrollbar, selection, focus ring
   ============================================================ */
#panel::-webkit-scrollbar { width: 5px; }
#panel::-webkit-scrollbar-track { background: transparent; }
#panel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}
#panel { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0.15) transparent; }

::selection {
  background: rgba(21, 112, 239, 0.2);
}

:focus-visible {
  outline: 2px solid var(--accent-water);
  outline-offset: 2px;
}

/* Section headings inside panel */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* Close button for panel */
.panel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  /* Stay pinned when the panel content scrolls (mobile) or panel body
     scrolls (desktop) so the breadcrumb, "Show map" button, and × close
     don't disappear once the user scrolls past them. */
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-card, #FFFFFF);
  padding-top: 0.5rem;
}

/* "Show map" button lives next to × in the panel topbar.
   Hidden by default; only shows on mobile when the sheet is at full stop
   (map is hidden behind the panel). Tapping it snaps back to default. */
.panel-view-map {
  display: none;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  height: 32px;
  padding: 0 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
}
.panel-view-map svg { flex: 0 0 auto; }
@media (hover: hover) {
  .panel-view-map:hover { background: #F5F6F8; border-color: #aaa; }
}
.panel-view-map:focus-visible {
  outline: 2px solid var(--accent-water);
  outline-offset: 2px;
}
/* Only show on mobile, and only when the sheet is at 'full' (map hidden) */
@media (max-width: 768px) {
  body.panel-stop-full .panel-view-map { display: inline-flex; }
}

.panel-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #F5F6F8;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 150ms, border-color 150ms;
}
@media (hover: hover) {
  .panel-close:hover {
    color: var(--text-primary);
    border-color: #aaa;
  }
}


/* Card grid responsive */
@media (max-width: 1200px) {
  .card-list { grid-template-columns: repeat(2, 1fr); }
}

/* Scroll lock when auth modal is open */
body.auth-modal-open { overflow: hidden; }

/* ============================================================
   RESPONSIVE — Panel becomes bottom sheet on mobile
   ============================================================ */
@media (max-width: 768px) {
  .card-list { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .panel-hero-block { padding: 1rem; border-radius: var(--radius-md); }
  .panel-hero-block .panel__title { font-size: 1.25rem; }
  #panel .panel-inner { padding: 1rem 1.25rem 5rem; }
  .explorer-bar { padding: 0.5rem 1rem; }
  .explorer-bar__inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-wrap: nowrap;
    align-items: stretch;
  }
  .explorer-bar__search {
    flex: 1 1 auto;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }
  .explorer-bar__search input {
    font-size: 16px; /* prevents iOS zoom on focus */
    padding-right: 8.5rem; /* room for both clear (44px) and Search button */
  }
  /* Hide the stats chip row entirely on mobile — noise vs. map real estate */
  .explorer-bar__stats { display: none; }
  .explorer-bar__stat--link {
    flex: 0 0 auto;
    padding: 0.55rem 0.9rem;
    font-size: 0.78rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #F3F4F6;
    border-radius: var(--radius-pill);
    scroll-snap-align: start;
  }
  .explorer-bar__cta { display: none; } /* Book a Demo hidden on mobile */
  /* Mobile bottom-sheet overrides — must match the selector specificity of
     the non-media-query `.page-explorer #panel { top: 142px; height: ... }`
     rule (0,1,1) so the bottom-sheet positioning wins. */
  .page-explorer #panel {
    top: 0;
    height: 100vh;
  }

  /* Panel becomes 3-stop bottom sheet on mobile */
  #panel {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    max-height: none;
    border-right: none;
    border-top: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%); /* closed */
    transition: transform var(--dur-drag) var(--ease-ios);
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .panel-open #panel {
    /* Fallback default stop if JS hasn't run: ~70vh visible */
    transform: translateY(30%);
  }

  .panel-open #map {
    left: 0;
    width: 100%;
  }

  .panel-drag-handle {
    display: block;
    width: 100%;
    height: 24px;
    position: relative;
    cursor: grab;
    touch-action: none;
    flex: 0 0 auto;
  }
  .panel-drag-handle::before {
    content: '';
    position: absolute;
    top: 10px; left: 50%;
    transform: translateX(-50%);
    width: 36px; height: 4px;
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
  }

  /* Remove the old ::before pseudo from #panel since we have .panel-drag-handle now */
  #panel::before { content: none; }

  #panel .panel-inner {
    padding: 0 1.25rem;
    padding-bottom: max(5rem, calc(5rem + env(safe-area-inset-bottom)));
  }
  .panel-topbar {
    touch-action: none;
  }

  .cta-banner { display: none; }

  .bmp-card {
    flex: 0 0 180px;
    height: 120px;
    scroll-snap-align: start;
  }

  .bmp-gallery,
  .bmp-scroller,
  .bmp-cards {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .breadcrumbs {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    max-width: calc(100% - 48px); /* leave room for close button */
  }
  .breadcrumbs > * {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Hide all but the last 2 breadcrumb slots when overflowing */
  .breadcrumbs > *:not(:nth-last-child(-n+3)) {
    display: none;
  }

  .search-bar {
    max-width: 100%;
  }

  .map-browse {
    top: 100px;
    left: 8px;
    gap: 0.3rem;
  }
  .map-browse__pill {
    padding: 0.3rem 0.65rem;
    font-size: 0.7rem;
  }

  .map-featured {
    left: 8px;
    right: 8px;
    bottom: 50px;
  }
  .map-featured__card {
    min-width: 170px;
    padding: 0.5rem 0.7rem;
  }

  .panel-open .map-browse { display: none; }

  /* Mobile search clear button — larger tap target */
  .search-clear {
    width: 44px;
    height: 44px;
    right: 5rem;
  }

  /* Mobile dropdown anchors flush full-width under explorer-bar */
  .search-dropdown.active {
    max-height: min(50vh, 320px);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border-top: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  }
  .search-dropdown__item,
  .search-dropdown__address-row {
    min-height: 48px;
    padding: 0.8rem 1rem;
  }

  /* Dim map when the mobile dropdown is open */
  body.search-dropdown-open-mobile #map::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(2px);
            backdrop-filter: blur(2px);
    pointer-events: none;
    z-index: 1200; /* above Leaflet controls (1000), below auth-modal (10010) */
    transition: opacity var(--dur-fast) var(--ease-out);
  }

  /* Touch target baseline for interactive elements */
  .panel-close { width: 44px; height: 44px; font-size: 1.1rem; }
  #searchBtn,
  .explorer-bar__search .cta-button { min-height: 44px; }
}

/* ============================================================
   MAP LEGEND
   ============================================================ */
.map-jump {
  position: fixed;
  bottom: 136px;
  right: 16px;
  z-index: 80;
  display: flex;
  gap: 4px;
}
.map-jump__btn {
  background: #FFFFFF;
  border: 1px solid var(--border, #E9EAEB);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted, #535862);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.15s ease;
}
@media (hover: hover) {
  .map-jump__btn:hover {
    background: var(--accent-water, #1570EF);
    color: #fff;
    border-color: var(--accent-water, #1570EF);
  }
}
.map-legend {
  position: fixed;
  bottom: 70px;
  right: 16px;
  z-index: 80;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 0.65rem 0.9rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.map-legend__title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

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

.map-legend__gradient {
  width: 120px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(21, 112, 239, 0.08), rgba(21, 112, 239, 0.85));
}
.map-legend__context {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.3;
}
.map-legend__updated {
  font-size: 0.6rem;
  color: var(--text-muted);
  opacity: 0.6;
  margin-top: 0.2rem;
}

/* Mobile: compact legend pill + larger jump chips + fade when sheet covers map */
@media (max-width: 768px) {
  .map-legend {
    bottom: 12px;
    left: 12px;
    right: auto;
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
    border-radius: var(--radius-pill);
    gap: 0.35rem;
  }
  .map-legend__title { display: none; }
  .map-legend__scale { width: 120px; }
  .map-legend__gradient { height: 6px; }

  .map-jump { bottom: 12px; right: 12px; }
  .map-jump__btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.5rem;
  }

  /* Fade floating UI when sheet is at default or full (user focused on panel content) */
  body.panel-stop-default .map-legend,
  body.panel-stop-default .map-jump,
  body.panel-stop-full .map-legend,
  body.panel-stop-full .map-jump {
    opacity: 0;
    pointer-events: none;
  }
  .map-legend,
  .map-jump {
    transition: opacity var(--dur-fast) var(--ease-out);
  }
}

/* --- Map Vignette --- */
.page-explorer #map::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.05);
}

/* --- Browse Pills (top-left of map) --- */
.map-browse {
  position: fixed;
  top: 152px;
  left: 56px;
  z-index: 1001;
  display: flex;
  gap: 0.4rem;
}
.map-browse__pill {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: background 150ms, color 150ms, box-shadow 150ms;
}
.map-browse__pill:hover {
  background: #F0F4FF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.map-browse__pill--active {
  background: var(--accent-water);
  color: #FFFFFF;
  border-color: var(--accent-water);
}
.map-browse--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 300ms, transform 300ms;
}

/* --- Featured Cards (bottom of map) --- */
.map-featured {
  position: fixed;
  bottom: 56px;
  left: 16px;
  right: 200px;
  z-index: 1001;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;
  pointer-events: none;
}
.page-explorer .map-featured--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.map-featured--hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.map-featured__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  padding-left: 0.25rem;
}
.map-featured__row {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.map-featured__row::-webkit-scrollbar { display: none; }
.map-featured__card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  min-width: 200px;
  max-width: 240px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: box-shadow 200ms, transform 200ms;
  flex-shrink: 0;
  font-family: var(--font-body);
  text-align: left;
}
.map-featured__card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
.map-featured__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.map-featured__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.map-featured__name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-featured__stat {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --- Ranked List (in panel) --- */
.ranked-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ranked-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 150ms, box-shadow 150ms;
  font-family: var(--font-body);
  text-align: left;
  width: 100%;
}
@media (hover: hover) {
  .ranked-list__item:hover {
    background: #F8FAFC;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  }
}
.ranked-list__rank {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-water);
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.ranked-list__img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.ranked-list__info {
  flex: 1;
  min-width: 0;
}
.ranked-list__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ranked-list__meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}
.ranked-list__stat {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.ranked-list__bar-bg {
  height: 4px;
  background: #E9EAEB;
  border-radius: 2px;
  margin-top: 0.3rem;
  width: 100%;
}
.ranked-list__bar {
  height: 100%;
  background: var(--accent-water);
  border-radius: 2px;
  transition: width 300ms ease;
}

/* ============================================================
   MAP OVERLAY — Loading, Legend, Markers, Clusters
   ============================================================ */

/* --- Loading Pill --- */
.map-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 90;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms;
}
.map-loading--visible { opacity: 1; }

.map-loading__spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-water);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Program Load Progress --- */
.program-progress {
  position: fixed;
  bottom: 130px;
  right: 16px;
  z-index: 85;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 0.55rem 0.9rem 0.55rem 0.7rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  animation: legendFadeIn 250ms ease-out;
  transition: opacity 300ms ease;
}
.program-progress--done {
  color: var(--text-primary);
}
.program-progress--fading {
  opacity: 0;
}
.program-progress__spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-water);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
  flex-shrink: 0;
}
.program-progress__check {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-rain);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  flex-shrink: 0;
}

/* --- Journey Legend --- */
.journey-legend {
  position: fixed;
  bottom: 130px;
  right: 16px;
  z-index: 80;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 0.65rem 0.9rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 160px;
  animation: legendFadeIn 300ms ease-out;
}

.journey-legend__title {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 0.68rem;
}

.journey-legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0;
}

.journey-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

.journey-legend__item { transition: opacity 150ms; }
.journey-legend__item--dimmed { opacity: 0.35; }
.journey-legend__item--active { font-weight: 600; }

.journey-legend__label { flex: 1; }
.journey-legend__count { font-weight: 600; color: var(--text-primary); }

.journey-legend__total {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
  font-weight: 500;
}

@keyframes legendFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Parcel Tooltip --- */
.leaflet-tooltip.parcel-tooltip {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  padding: 0.35rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leaflet-tooltip.parcel-tooltip::before {
  border-top-color: #FFFFFF;
}

/* --- MarkerCluster Overrides --- */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(21, 112, 239, 0.18);
  border-radius: 50%;
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: rgba(21, 112, 239, 0.65);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.marker-cluster-small { width: 32px; height: 32px; }
.marker-cluster-small div { width: 24px; height: 24px; }
.marker-cluster-medium { width: 40px; height: 40px; }
.marker-cluster-medium div { width: 30px; height: 30px; }
.marker-cluster-large { width: 48px; height: 48px; }
.marker-cluster-large div { width: 36px; height: 36px; }

/* --- Responsive overlay adjustments --- */
@media (max-width: 768px) {
  .map-loading {
    top: 40%;
  }
}


/* ============================================================
   PANEL CONTENT COMPONENTS (used by panels.js)
   ============================================================ */
.panel-section {
  margin-bottom: 0.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border, #E9EAEB);
}
.panel-section:last-of-type {
  border-bottom: none;
}

.panel-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.panel-section h3.section-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  padding-bottom: 0;
  border-bottom: none;
}

.section-count {
  background: rgba(21, 112, 239, 0.1);
  color: var(--accent-water);
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-display);
  margin-left: 0.35rem;
}
/* Per-type section count tinting */
#countySection .section-count { background: rgba(6, 118, 71, 0.1); color: var(--accent-rain); }
#funderSection .section-count { background: rgba(232, 123, 47, 0.1); color: var(--accent-warm); }

.panel-section p.panel__subtitle,
.panel-section .panel__subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.panel__hero-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.panel__logo {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
  margin-bottom: 0.6rem;
  border-radius: var(--radius-sm);
}

.panel__empty {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

.error {
  color: #ff6b6b;
  font-size: 0.9rem;
}

/* Card name span */
.card__name {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
}

.card--compact {
  padding: 0.85rem 1.15rem;
  margin-bottom: 0.5rem;
}

/* Card list grid */
.card-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.card-list .card {
  margin-bottom: 0; /* grid gap handles spacing */
}
/* Filter input spans full width */
.card-list .card-list__filter {
  grid-column: 1 / -1;
}

/* Preview mode — show only first row (3 cards) */
.card-list--preview > .entity-card:nth-child(n+4) {
  display: none;
}

/* "View all" expand link */
.show-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  margin-top: 6px;
  background: none;
  border: none;
  color: var(--accent-water);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 150ms;
}
.show-all-btn:hover {
  color: #0D47A1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Unified hero block */
.panel-hero-block {
  background: #F8FAFC;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.panel-hero-block .panel__hero-img {
  margin-bottom: 1rem;
}
.panel-hero-block .panel__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}
.panel-hero-block .panel__subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Compact hero — title overlaid on image */
.panel-hero-block--compact {
  padding: 0;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.panel-hero-block__banner {
  position: relative;
  height: 90px;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
}
.panel-hero-block--compact .panel__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin-bottom: 0;
  border-radius: 0;
}
.panel-hero-block__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 16px;
}
.panel-hero-block--compact .panel__title {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 1px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.panel-hero-block--compact .panel__subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 0.75rem;
}
.metric-strip--tight {
  padding: 8px 12px;
  gap: 0;
}
.metric-strip--tight .metric {
  padding: 4px 0;
}
.metric-strip--tight .metric__value {
  font-size: 0.95rem;
}
.metric-strip--tight .metric__label {
  font-size: 0.58rem;
}

/* --- Summary Bar (tab-like navigation) --- */
.panel-summary-bar {
  display: flex;
  gap: 0;
  padding: 0;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}
.summary-pill {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 150ms, border-color 150ms;
}
.summary-pill:hover {
  color: var(--text-primary);
}
.summary-pill--active {
  color: var(--accent-water);
  border-bottom-color: var(--accent-water);
  font-weight: 600;
}

/* --- Collapsible Sections --- */
.section-title--collapsible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.section-title__chevron {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 200ms;
  margin-left: auto;
  padding-left: 0.5rem;
}
.section-title--expanded .section-title__chevron {
  transform: rotate(90deg);
}
.card-list--collapsible {
  overflow: hidden;
  transition: max-height 350ms ease, opacity 250ms ease;
}
.card-list--collapsed {
  max-height: 0 !important;
  opacity: 0;
  margin: 0;
}

/* --- Card List Filter --- */
.card-list__filter {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-primary);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  outline: none;
  transition: border-color 200ms;
}
.card-list__filter:focus {
  border-color: var(--accent-water);
  box-shadow: 0 0 0 2px rgba(21, 112, 239, 0.1);
}
.card-list__filter::placeholder {
  color: var(--text-muted);
}

.card--with-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px;
}

/* ============================================================
   ENTITY CARDS — AirDNA-style hero cards for explorer panel
   ============================================================ */

/* --- Entity Card: clean flat card with left accent --- */
.entity-card {
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid #E9EAEB;
  border-top: 3px solid #1570EF;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  cursor: pointer;
  transition: box-shadow 200ms, transform 150ms, background 150ms;
}
@media (hover: hover) {
  .entity-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-1px);
  }
}
/* Per-type card tints */
.entity-card--program { border-top-color: #1570EF; background: #FBFCFF; }
.entity-card--county { border-top-color: #067647; background: #FBFDFB; }
.entity-card--funder { border-top-color: #E87B2F; background: #FEFCFA; }
@media (hover: hover) {
  .entity-card--program:hover { background: #F5F8FF; }
  .entity-card--county:hover { background: #F3FAF5; }
  .entity-card--funder:hover { background: #FEF7F0; }
}

/* Header row: logo + title + score */
.entity-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px;
}

/* Logo — generous size, no border box */
.entity-card__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.entity-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.entity-card__logo--icon {
  border-radius: 10px;
}

/* Title + subtitle */
.entity-card__header-text {
  flex: 1;
  min-width: 0;
}
.entity-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entity-card__subtitle {
  font-family: var(--font-body);
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Score badge — filled with entity tint */
.entity-card__score {
  width: 34px;
  height: 34px;
  background: #EFF4FF;
  border: 2px solid;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
}
.entity-card--program .entity-card__score { background: #EFF4FF; }
.entity-card--county .entity-card__score { background: #EDFCF2; }
.entity-card--funder .entity-card__score { background: #FEF6EE; }

/* Metric strip */
.entity-card__metrics {
  display: flex;
  border-top: 1px solid var(--border-light, #E9EAEB);
  position: relative;
}
.entity-card__metric {
  flex: 1;
  text-align: center;
  padding: 6px 4px 8px;
}
.entity-card__metric + .entity-card__metric {
  border-left: 1px solid var(--border-light, #E9EAEB);
}
.entity-card__metric-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.2;
}
.entity-card__metric-label {
  font-size: 0.58rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-top: 1px;
}

/* Locked metric strip — clean gray bars */
.entity-card__metrics--locked .entity-card__metric-value {
  color: transparent;
  position: relative;
}
.entity-card__metrics--locked .entity-card__metric-value::after {
  content: '';
  position: absolute;
  inset: 3px 25% 3px 25%;
  background: #E5E7EB;
  border-radius: 3px;
}
.entity-card__metrics--locked .entity-card__metric-label {
  color: #D1D5DB;
}
.entity-card__locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent-water);
  background: rgba(255,255,255,0.5);
  border-radius: 0 0 9px 9px;
  cursor: pointer;
}
.entity-card__locked-overlay:hover {
  background: rgba(21, 112, 239, 0.04);
}
.entity-card__locked-overlay svg {
  flex-shrink: 0;
  width: 11px;
  height: 11px;
}

/* Metric strip using BEM from panels.js */
.metric__value, .metric-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.metric__label, .metric-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}

.metric--small .metric__value,
.metric--small .metric-value {
  font-size: 0.95rem;
}

.metric-strip--compact {
  gap: 0.5rem;
  margin-top: 0;
  padding-top: 0;
}

.metric-strip--compact {
  gap: 1rem;
  margin-top: 0;
}

/* Tag list (states, counties links) */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 150ms, color 150ms;
}

.tag:hover {
  border-color: var(--accent-water);
  color: var(--accent-water);
}

/* Incentive card BEM variants from panels.js */
.incentive-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.incentive-card__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.incentive-card__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.incentive-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.incentive-card__value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-warm);
}

.incentive-card__rebate {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.incentive-card__summary {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0.3rem 0;
}

.incentive-card__props {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

.incentive-card__link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-water);
  display: inline-block;
  margin-top: 0.3rem;
}

.incentive-card--rich {
  border-top-color: var(--accent-warm);
}
.incentive-card--clickable {
  cursor: pointer;
  transition: box-shadow 200ms, transform 150ms;
}
@media (hover: hover) {
  .incentive-card--clickable:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-1px);
  }
}
.incentive-card__cta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-water);
  display: inline-block;
  margin-top: 0.4rem;
}

/* BMP card BEM variants from panels.js */
.bmp-card__img {
  width: 100%;
  height: 100px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.bmp-card__img--empty {
  background: var(--bg-card);
}

.bmp-card__body {
  padding: 0.6rem 0.7rem;
}

.bmp-card__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.2rem;
}

.bmp-card__meta {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.bmp-card__desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.bmp-card__funded {
  font-size: 0.68rem;
  color: var(--accent-rain);
  font-weight: 500;
  display: block;
  margin-top: 0.2rem;
}

/* BMP card in panels (vertical stack instead of horizontal) */
.bmp-gallery .bmp-card {
  flex: 0 0 220px;
  height: auto;
}

/* CTA inline block */
.cta-inline {
  padding: 1.25rem;
  background: rgba(21, 112, 239, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  margin-top: 1rem;
}

.cta-inline p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.cta-inline--highlight {
  background: rgba(232, 123, 47, 0.04);
  border-color: rgba(232, 123, 47, 0.12);
}

/* Search results panel */
.search-results__highlight {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.search-results__count {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--accent-water);
  line-height: 1;
}

.search-results__label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.search-results__value {
  font-size: 1rem;
  color: var(--text-primary);
}

.search-results__value strong {
  font-family: var(--font-mono);
  color: var(--accent-warm);
  font-size: 1.2rem;
}

.search-results__extra {
  font-size: 0.82rem;
  color: var(--accent-rain);
}

/* Leaflet tooltip override */
.state-tooltip {
  background: #FFFFFF !important;
  border: 1px solid #E9EAEB !important;
  color: #181D27 !important;
  font-family: var(--font-body) !important;
  font-size: 0.82rem !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.5rem 0.75rem !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.state-tooltip .leaflet-tooltip-arrow { display: none; }

/* Search marker */
.search-marker__dot {
  width: 14px;
  height: 14px;
  background: var(--accent-warm);
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(232, 123, 47, 0.5);
}

/* Badge default variant */
.badge--default {
  background: #F1F1F1;
  color: var(--text-muted);
}

.badge--inactive {
  background: #F1F1F1;
  color: #717680;
}

/* Incentive list container */
.incentive-list {
  margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
  .stats-strip {
    gap: 1rem;
  }

  .stat-item .stat-number {
    font-size: 1.15rem;
  }

  .metric-strip {
    gap: 1rem;
  }

  .metric .metric-value {
    font-size: 1rem;
  }

  .explorer-bar__search .cta-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* ============================================
   CONTACT MODAL
   Glass-morphism overlay with topographic grain
   ============================================ */

.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001; /* above detail-slider (10000) */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-overlay.active {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.contact-modal {
  position: relative;
  width: 90vw;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-overlay.active .contact-modal {
  transform: translateY(0) scale(1);
}

.contact-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 1px solid #E9EAEB;
  border-radius: 8px;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  .contact-modal__close:hover {
    color: var(--text-primary);
    border-color: rgba(21, 112, 239, 0.3);
    background: rgba(21, 112, 239, 0.06);
  }
}

.contact-modal__header {
  margin-bottom: 1.75rem;
}

.contact-modal__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.4rem;
  line-height: 1.2;
}

.contact-modal__subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.contact-modal__context {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-water);
  background: rgba(21, 112, 239, 0.06);
  border: 1px solid rgba(21, 112, 239, 0.12);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-modal__context::before {
  content: '◉';
  font-size: 0.5rem;
  opacity: 0.7;
}

/* Form fields */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.contact-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-form__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.contact-form__label--required::after {
  content: ' *';
  color: var(--accent-warm);
}

.contact-form__input,
.contact-form__select,
.contact-form__textarea {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: #FAFAFA;
  border: 1px solid #E9EAEB;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  outline: none;
  transition: all 0.25s ease;
  -webkit-appearance: none;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: rgba(83, 88, 98, 0.5);
}

.contact-form__input:focus,
.contact-form__select:focus,
.contact-form__textarea:focus {
  border-color: var(--accent-water);
  box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.1);
  background: #FFFFFF;
}

.contact-form__input.error,
.contact-form__textarea.error {
  border-color: rgba(255, 100, 100, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 100, 100, 0.08);
}

.contact-form__select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8ba8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}

.contact-form__textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.contact-form__error {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: #ff6464;
  margin-top: 0.15rem;
  display: none;
}

.contact-form__error.visible {
  display: block;
}

/* Submit button */
.contact-form__submit {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: #FFFFFF;
  background: #195ABD;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.contact-form__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(25, 90, 189, 0.3);
}

.contact-form__submit:active:not(:disabled) {
  transform: translateY(0);
}

.contact-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-form__submit .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: contact-spin 0.6s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

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

/* Success state */
.contact-modal__success {
  display: none;
  text-align: center;
  padding: 2rem 0;
}

.contact-modal__success.visible {
  display: block;
}

.contact-modal__success-icon {
  width: 56px;
  height: 56px;
  background: rgba(6, 118, 71, 0.08);
  border: 2px solid var(--accent-rain);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--accent-rain);
}

.contact-modal__success h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.contact-modal__success p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Form-level error */
.contact-form__global-error {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #ff6464;
  background: rgba(255, 100, 100, 0.06);
  border: 1px solid rgba(255, 100, 100, 0.15);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  display: none;
}

.contact-form__global-error.visible {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .contact-modal {
    width: 95vw;
    max-width: none;
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 14px 14px 0 0;
    max-height: 85vh;
    align-self: flex-end;
  }

  .contact-form__row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Touch target baseline for modal close button */
  .contact-modal__close {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ============================================================
   MARKETING PAGE SECTIONS
   ============================================================ */

/* --- Shared --- */
.mkt-section { padding: 5rem 2.5rem; }
.mkt-container { max-width: 1100px; margin: 0 auto; }
.mkt-center { text-align: center; margin-top: 2.5rem; }

.mkt-section__eyebrow {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.mkt-section__heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
}

.mkt-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 200ms, box-shadow 200ms;
  cursor: pointer;
  border: none;
}
.mkt-btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.mkt-btn--primary { background: var(--accent-water); color: #FFFFFF; }
.mkt-btn--outline { background: #FFFFFF; color: var(--accent-water); border: 1px solid var(--accent-water); }

.mkt-placeholder-img, .mkt-placeholder-logo {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: var(--text-muted); background: var(--bg-panel);
}

/* --- S1: Hero --- */
.mkt-hero-bg {
  background: linear-gradient(135deg, #EBF2FE 0%, #F5F8FF 50%, #E8F4F0 100%);
  overflow: visible;
}
.mkt-hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 4rem clamp(1.5rem, 5vw, 4rem);
  overflow: visible;
  max-width: 1400px;
  margin: 0 auto;
}
.mkt-hero__content { flex: 1 1 480px; max-width: 560px; position: relative; z-index: 2; }
.mkt-logo { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.5rem; }
.mkt-logo span { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--text-primary); }
.mkt-hero__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-water);
  margin-bottom: 0.75rem;
}
.mkt-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700; line-height: 1.15;
  color: var(--text-primary); margin-bottom: 1rem;
}
.mkt-hero__desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
  max-width: 480px;
}
.mkt-search-card {
  background: #FFFFFF; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.25rem;
  box-shadow: var(--shadow-glow);
  max-width: 420px;
  position: relative;
  z-index: 100;
}
.mkt-search-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.mkt-tab {
  flex: 1; background: none; border: none;
  padding: 0.6rem 1rem; font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: color 200ms, border-color 200ms;
}
.mkt-tab--active { color: var(--accent-water); border-bottom-color: var(--accent-water); }
.mkt-search-input { position: relative; margin-bottom: 0.75rem; }
.mkt-search-input input {
  width: 100%; padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.95rem;
  color: var(--text-primary); background: var(--bg-panel);
}
.mkt-search-input input:focus {
  outline: none; border-color: var(--accent-water);
  box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.12);
}
.mkt-search-input .search-icon {
  position: absolute; left: 0.75rem; top: 50%;
  transform: translateY(-50%); font-size: 1rem; opacity: 0.5;
}
.mkt-browse-link {
  display: block;
  text-align: center;
  font-size: 0.92rem;
  color: var(--accent-water);
  font-weight: 600;
  padding: 0.6rem 0 0.2rem;
  transition: color 150ms;
}
.mkt-browse-link:hover {
  color: #1260D4;
  text-decoration: none;
}

/* --- S2: Value Props --- */
.mkt-cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.mkt-vp-card { text-align: center; }
.mkt-vp-card__img {
  aspect-ratio: 16/10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mkt-vp-card__img--blue {
  background: #F5F7FA;
  background-image: radial-gradient(ellipse at 10% 80%, rgba(21,112,239,0.12) 0%, transparent 60%),
                     radial-gradient(ellipse at 85% 20%, rgba(46,144,250,0.10) 0%, transparent 50%);
}

.mkt-vp-card__img--teal {
  background: #F5F7FA;
  background-image: radial-gradient(ellipse at 50% 90%, rgba(232,123,47,0.10) 0%, transparent 55%),
                     radial-gradient(ellipse at 70% 10%, rgba(19,125,94,0.10) 0%, transparent 50%);
}

.mkt-vp-card__img--gradient {
  background: #F5F7FA;
  background-image: radial-gradient(ellipse at 80% 80%, rgba(232,168,87,0.12) 0%, transparent 55%),
                     radial-gradient(ellipse at 20% 20%, rgba(21,112,239,0.08) 0%, transparent 50%);
}
.mkt-vp-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700; margin-bottom: 0.4rem;
}
.mkt-vp-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

/* Widget base */
.mkt-vp-widget {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-family: var(--font-body);
  max-width: 240px;
  width: 80%;
}

/* Score widget */
.mkt-vp-widget--score .mkt-vp-widget__label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.mkt-vp-widget__ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.mkt-vp-widget__ring-value {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mkt-vp-widget__number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.mkt-vp-widget__grade {
  font-size: 0.75rem;
  color: #1570EF;
  font-weight: 600;
}
.mkt-vp-widget__caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Funding widget */
.mkt-vp-widget--funding {
  border-top: 3px solid #137D5E;
}
.mkt-vp-widget__funding-header {
  font-size: 0.7rem;
  color: #137D5E;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.mkt-vp-widget__funding-amount {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #137D5E;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.mkt-vp-widget__funding-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
}
.mkt-vp-widget__funding-stat {
  display: flex;
  flex-direction: column;
}
.mkt-vp-widget__funding-stat-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.mkt-vp-widget__funding-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* Activity widget */
.mkt-vp-widget--activity {
  padding-top: 0.75rem;
}
.mkt-vp-widget__activity-badge {
  display: inline-block;
  background: #ECFDF3;
  color: #067647;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
}
.mkt-vp-widget__activity-label {
  font-size: 0.7rem;
  color: #1570EF;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.mkt-vp-widget__activity-stats {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}
.mkt-vp-widget__activity-stat {
  display: flex;
  flex-direction: column;
}
.mkt-vp-widget__activity-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}
.mkt-vp-widget__activity-name {
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* --- S3: Social Proof --- */
.mkt-social-proof {
  background: #F9FAFB; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 3rem 2.5rem;
}
.mkt-logo-row { display: flex; justify-content: center; align-items: center; flex-wrap: nowrap; gap: 2rem; }
.mkt-partner-logo {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 200ms;
}
.mkt-partner-logo:hover { opacity: 1; }
.mkt-partner-logo img {
  max-height: 54px;
  max-width: 156px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 200ms;
}
.mkt-partner-logo:hover img { filter: grayscale(0%); }

/* --- S4-S5: Feature Sections --- */
.mkt-feature__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.mkt-feature--reverse .mkt-feature__grid { direction: rtl; }
.mkt-feature--reverse .mkt-feature__grid > * { direction: ltr; }
.mkt-feature__text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700; margin-bottom: 1rem;
}
.mkt-feature__text p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 1.5rem; }
.mkt-feature:nth-of-type(even) {
  background: #F9FAFB;
}

.mkt-feature__img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
  background: linear-gradient(135deg, #F0F4FF 0%, #F5F8FF 100%);
  min-height: 280px;
}

/* --- S5: Property Matching --- */
.mkt-pm {
  background: linear-gradient(180deg, #F0FAF5 0%, #F5FBFA 40%, #FFFFFF 100%);
  overflow: hidden;
}
.mkt-pm__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.mkt-pm__eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #1570EF;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.mkt-pm__text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.mkt-pm__subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
.mkt-pm__cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mkt-pm__card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.9rem 1.25rem;
  transition: box-shadow 200ms;
}
.mkt-pm__card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.mkt-pm__card-eyebrow {
  font-size: 0.6rem;
  font-weight: 700;
  color: #1570EF;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.mkt-pm__card h4 {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.2rem;
}
.mkt-pm__card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}
.mkt-pm__card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.mkt-pm__tag {
  display: inline-block;
  background: #F5F6F8;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Property Matching screenshot (right column) */
.mkt-pm__screenshot-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.mkt-pm__screenshot {
  width: 100%;
  max-width: 560px;
  border-radius: 12px;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.10),
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* --- S6: Premium --- */
.mkt-premium {
  background: linear-gradient(180deg, #F4F6FC 0%, #F8F9FE 50%, #FFFFFF 100%);
}
.mkt-premium__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}
.mkt-premium__header h2 {
  margin-bottom: 0.5rem;
}
.mkt-premium__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.mkt-premium__screenshot-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}
.mkt-premium__screenshot {
  width: 100%;
  max-width: 920px;
  border-radius: 12px;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.10),
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.04);
}
.mkt-premium__tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.mkt-premium__tile {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-water);
  border-radius: 6px;
  padding: 1.1rem 1.1rem 1.25rem;
  transition: box-shadow 200ms, transform 150ms;
}
.mkt-premium__tile:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.mkt-premium__tile h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}
.mkt-premium__tile p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.mkt-premium__tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}
.mkt-premium__tile--blue { border-top-color: #1570EF; }
.mkt-premium__tile--blue .mkt-premium__tile-icon { background: #EFF4FF; color: #1570EF; }
.mkt-premium__tile--teal { border-top-color: #137D5E; }
.mkt-premium__tile--teal .mkt-premium__tile-icon { background: #ECFDF3; color: #137D5E; }
.mkt-premium__tile--warm { border-top-color: #E87B2F; }
.mkt-premium__tile--warm .mkt-premium__tile-icon { background: #FEF6EE; color: #E87B2F; }
.mkt-premium__tile--rain { border-top-color: #067647; }
.mkt-premium__tile--rain .mkt-premium__tile-icon { background: #ECFDF3; color: #067647; }

/* --- App Mockup Components --- */
.mkt-mockup {
  width: 100%;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.mkt-mockup__toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #F5F5F5;
  border-bottom: 1px solid var(--border);
}
.mkt-mockup__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.mkt-mockup__title {
  margin-left: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-body);
}
.mkt-mockup__body {
  padding: 1.25rem;
  background: #FAFBFC;
}
.mkt-mockup__us {
  width: 100%;
  max-height: 220px;
}
.mkt-mockup__legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.mkt-mockup__legend-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(21,112,239,0.08), rgba(21,112,239,0.7));
}

/* Detail mockup cards */
.mkt-mockup__body--detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 1rem;
}
.mkt-mockup__card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent-water);
}
.mkt-mockup__card:nth-child(2) { border-left-color: var(--accent-rain); }
.mkt-mockup__card:nth-child(3) { border-left-color: var(--accent-warm); }
.mkt-mockup__card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.mkt-mockup__card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mkt-mockup__card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}
.mkt-mockup__card-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
}
.mkt-mockup__badges {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.mkt-mockup__badge {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mkt-mockup__badge--active {
  background: rgba(6, 118, 71, 0.1);
  color: #067647;
}
.mkt-mockup__badge--rebate {
  background: rgba(232, 123, 47, 0.1);
  color: #E87B2F;
}
.mkt-mockup__badge--grant {
  background: rgba(21, 112, 239, 0.1);
  color: #1570EF;
}

/* --- Styled Partner Logos --- */
.mkt-partner-logo--styled {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 1rem;
  transition: box-shadow 200ms;
}
.mkt-partner-logo--styled:hover {
  box-shadow: var(--shadow-glow);
}
.mkt-partner-logo--styled span {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  opacity: 0.7;
}

/* --- Award Badge --- */
.mkt-award__badge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.mkt-award__year {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-water);
  letter-spacing: 0.05em;
}

/* --- Marketing Responsive --- */
@media (max-width: 768px) {
  .mkt-cards-3 { grid-template-columns: 1fr; gap: 1.5rem; }
  .mkt-section { padding: 3rem 1.5rem; }
  .mkt-feature__grid { grid-template-columns: 1fr; }
  .mkt-feature--reverse .mkt-feature__grid { direction: ltr; }
  .mkt-pm__grid { grid-template-columns: 1fr; }
  .mkt-pm__screenshot-wrap { margin-top: 1.5rem; }
  .mkt-premium__tiles { grid-template-columns: repeat(2, 1fr); }
  .mkt-premium__screenshot-wrap { margin-bottom: 2rem; }
}

/* --- S6: Concierge --- */
.mkt-cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.mkt-service-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-water);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 200ms, box-shadow 200ms;
}

.mkt-service-card:nth-child(2) { border-top-color: var(--accent-rain); }
.mkt-service-card:nth-child(3) { border-top-color: var(--accent-warm); }
.mkt-service-card:nth-child(4) { border-top-color: var(--accent-water); }

.mkt-service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.mkt-service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  background: rgba(21, 112, 239, 0.06);
}

.mkt-service-card:nth-child(2) .mkt-service-card__icon { background: rgba(19, 125, 94, 0.06); }
.mkt-service-card:nth-child(3) .mkt-service-card__icon { background: rgba(232, 123, 47, 0.06); }
.mkt-service-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.mkt-service-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* --- S7: Stats Strip --- */
.mkt-stats-strip {
  background: linear-gradient(135deg, #0D47A1 0%, #1570EF 40%, #137D5E 100%);
  padding: 4.5rem 2.5rem;
}
.mkt-stats-row { display: flex; justify-content: center; gap: 4rem; flex-wrap: wrap; }
.mkt-stat { text-align: center; }
.mkt-stat__number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
  letter-spacing: -0.02em;
}
.mkt-stat__label {
  font-size: 0.85rem; color: rgba(255,255,255,0.75);
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
}

/* --- S8: User Journey --- */
.mkt-section__sub {
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: -0.5rem auto 3rem;
  line-height: 1.6;
}
.mkt-journey__timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.mkt-journey__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 28px;
  height: 2px;
  width: auto;
  background: linear-gradient(90deg, #1570EF 0%, #137D5E 50%, #E87B2F 75%, #1570EF 100%);
  border-radius: 1px;
}
.mkt-journey-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 0;
}
.mkt-journey-step:last-of-type { padding-bottom: 0; }
.mkt-journey-step__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1570EF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(21, 112, 239, 0.3);
}
.mkt-journey-step__icon--teal {
  background: #137D5E;
  box-shadow: 0 4px 16px rgba(19, 125, 94, 0.3);
}
.mkt-journey-step__icon--warm {
  background: #E87B2F;
  box-shadow: 0 4px 16px rgba(232, 123, 47, 0.3);
}
.mkt-journey-step__icon--gradient {
  background: linear-gradient(135deg, #1570EF, #137D5E);
  box-shadow: 0 4px 16px rgba(21, 112, 239, 0.3);
}
.mkt-journey-step__content {
  padding-top: 0;
}
.mkt-journey-step__label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-water);
  margin-bottom: 0.25rem;
}
.mkt-journey-step:nth-child(3) .mkt-journey-step__label { color: #137D5E; }
.mkt-journey-step:nth-child(4) .mkt-journey-step__label { color: #E87B2F; }
.mkt-journey-step:nth-child(5) .mkt-journey-step__label { color: #1570EF; }
.mkt-journey-step h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}
.mkt-journey-step p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: none;
}

/* --- S9: States to Watch --- */
.mkt-states__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
.mkt-state-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  aspect-ratio: 3/4; cursor: pointer; text-decoration: none;
  transition: transform 200ms, box-shadow 200ms; display: block;
}
.mkt-state-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); text-decoration: none; }
.mkt-state-card__img { width: 100%; height: 100%; object-fit: cover; }
.mkt-state-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1rem; color: #FFFFFF;
}
.mkt-state-card__name { font-weight: 700; font-size: 1.1rem; }
.mkt-state-card__count { font-size: 0.8rem; opacity: 0.85; }

/* --- S10: Award --- */
.mkt-award { background: #F9FAFB; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mkt-award__inner { display: flex; align-items: center; justify-content: center; gap: 2.5rem; }
.mkt-award__logo-img { max-height: 144px; width: auto; object-fit: contain; }
.mkt-award__text h3 { font-size: 1.3rem; font-weight: 700; color: var(--accent-rain); margin-bottom: 0.3rem; }
.mkt-award__text p { font-size: 0.9rem; color: var(--text-muted); max-width: 400px; }

/* --- S11: Footer CTA --- */
.mkt-footer-cta {
  padding: 5rem 2.5rem;
  background: linear-gradient(135deg, #0D47A1 0%, #1570EF 50%, #137D5E 100%);
  color: #FFFFFF;
}

.mkt-footer-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #FFFFFF;
}

.mkt-footer-cta p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.mkt-footer-cta .mkt-btn--primary {
  background: #FFFFFF;
  color: #1570EF;
}

/* --- Marketing Responsive (S6-S11) --- */
@media (max-width: 768px) {
  .mkt-cards-4 { grid-template-columns: repeat(2, 1fr); }
  .mkt-stats-row { gap: 2rem; }
  .mkt-journey__timeline { grid-template-columns: 1fr 1fr; }
  .mkt-journey__line { display: none; }
  .mkt-journey-step__icon { width: 48px; height: 48px; }
  .mkt-journey-step { gap: 0.75rem; }
  .mkt-states__grid { grid-template-columns: repeat(2, 1fr); }
  .mkt-states__grid > :last-child { display: none; }
  .mkt-award__inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .mkt-cards-4 { grid-template-columns: 1fr; }
  .mkt-premium__tiles { grid-template-columns: 1fr; }
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: calc(0.75rem + env(safe-area-inset-top)) 2.5rem 0.75rem;
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.site-header__logo span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

@media (hover: hover) {
  .site-header__logo:hover { text-decoration: none; }
}
.site-header__logo-img { height: 48px; width: auto; }
.site-footer__logo-img { height: 30px; width: auto; }

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-header__nav > a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 200ms;
  white-space: nowrap;
}

@media (hover: hover) {
  .site-header__nav > a:hover {
    color: var(--text-primary);
    text-decoration: none;
  }
}

/* ============================================================
   HERO DATA VISUALIZATION GRAPHIC
   ============================================================ */
.mkt-hero__graphic {
  flex: 1 1 500px;
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-map-outline {
  width: 100%;
  max-width: 800px;
  opacity: 0.8;
}

/* Hero demand signal pop-in */
@keyframes signalPopIn {
  0% { opacity: 0; transform: scale(0.6) translateY(10px); }
  60% { transform: scale(1.05) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Hero demand signal notifications */
.hero-signal {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #FFFFFF;
  opacity: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  font-family: var(--font-body);
  white-space: nowrap;
  animation: signalPopIn 0.6s ease-out forwards;
}

/* 10 positions — interleaved so sequential order bounces around */
.hero-signal--1  { top: 4%;  right: 8%;  }
.hero-signal--2  { top: 68%; left: 5%;   }
.hero-signal--3  { top: 28%; left: 0%;   }
.hero-signal--4  { top: 58%; right: 3%;  }
.hero-signal--5  { top: 8%;  left: 32%;  }
.hero-signal--6  { top: 72%; left: 30%;  }
.hero-signal--7  { top: 45%; right: 0%;  }
.hero-signal--8  { top: 15%; left: 2%;   }
.hero-signal--9  { top: 62%; right: 12%; }
.hero-signal--10 { top: 38%; left: 8%;   }

/* All signals start hidden — JS controls visibility */
.hero-signal { opacity: 0; pointer-events: none; animation: none; }

.hero-signal__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.hero-signal__body {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.hero-signal__name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.hero-signal__action {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.hero-signal__action strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Signal icon (non-avatar) */
.hero-signal__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #FFFFFF;
}
.hero-signal__icon--blue { background: #1570EF; }
.hero-signal__icon--teal { background: #137D5E; }
.hero-signal__icon--amber { background: #E87B2F; }
.hero-signal__icon--green { background: #067647; }
.hero-signal__icon--gradient { background: linear-gradient(135deg, #1570EF, #137D5E); }

/* Signal badge (inline tag) */
.hero-signal__badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  line-height: 1;
}
.hero-signal__badge--teal { background: rgba(19, 125, 94, 0.1); color: #137D5E; }
.hero-signal__badge--blue { background: rgba(21, 112, 239, 0.1); color: #1570EF; }
.hero-signal__badge--green { background: rgba(6, 118, 71, 0.1); color: #067647; }
.hero-signal__badge--amber { background: rgba(232, 123, 47, 0.1); color: #E87B2F; }

/* Smooth transitions for signal rotation */
.hero-signal {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: #181D27;
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 2.5rem 1.5rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.site-footer__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-bottom: 0.75rem;
}

.site-footer__logo span {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: #FFFFFF;
}

.site-footer__logo:hover { text-decoration: none; }

.site-footer__brand p {
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 280px;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__links h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.3rem;
}

.site-footer__links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 200ms;
}

.site-footer__links a:hover {
  color: #FFFFFF;
  text-decoration: none;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

/* Tab panels */
.mkt-tab-panel { display: none; }
.mkt-tab-panel--active { display: block; }

/* Tools promo (AirDNA-style) */
.mkt-tools-promo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mkt-tools-promo__icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.mkt-tools-promo__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(21, 112, 239, 0.08);
}

.mkt-tools-promo__icon--property {
  background: rgba(21, 112, 239, 0.12);
}

.mkt-tools-promo__arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.mkt-tools-promo__text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.mkt-tools-promo__text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Footer + Hero responsive */
@media (max-width: 768px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .mkt-hero { flex-direction: column; text-align: center; }
  .mkt-hero__content { flex: none; width: 100%; max-width: 100%; }
  .mkt-hero__graphic { min-height: 250px; width: 100%; }
  .mkt-search-card { margin: 0 auto; }
}

/* --- Gradient text accent --- */
.gradient-text {
  background: linear-gradient(135deg, #1570EF 0%, #137D5E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Scroll entrance animations --- */
.mkt-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.mkt-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children within sections */
.mkt-visible .mkt-vp-card,
.mkt-visible .mkt-service-card,
.mkt-visible .mkt-journey-step,
.mkt-visible .mkt-state-card {
  animation: fadeSlideUp 0.5s ease-out forwards;
  opacity: 0;
}

.mkt-visible .mkt-vp-card:nth-child(1),
.mkt-visible .mkt-service-card:nth-child(1),
.mkt-visible .mkt-journey-step:nth-child(1),
.mkt-visible .mkt-state-card:nth-child(1) { animation-delay: 0.1s; }

.mkt-visible .mkt-vp-card:nth-child(2),
.mkt-visible .mkt-service-card:nth-child(2),
.mkt-visible .mkt-journey-step:nth-child(2),
.mkt-visible .mkt-state-card:nth-child(2) { animation-delay: 0.2s; }

.mkt-visible .mkt-vp-card:nth-child(3),
.mkt-visible .mkt-service-card:nth-child(3),
.mkt-visible .mkt-journey-step:nth-child(3),
.mkt-visible .mkt-state-card:nth-child(3) { animation-delay: 0.3s; }

.mkt-visible .mkt-service-card:nth-child(4),
.mkt-visible .mkt-state-card:nth-child(4) { animation-delay: 0.4s; }

.mkt-visible .mkt-state-card:nth-child(5) { animation-delay: 0.5s; }


/* ============================================================
   PROGRAM DETAIL PAGE
   ============================================================ */

/* --- Program Breadcrumb --- */
.program-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 20px 32px 0;
}
.program-breadcrumb__link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: #717680;
  text-decoration: none;
  padding: 4px;
  border-radius: 6px;
  transition: background 150ms, color 150ms;
}
.program-breadcrumb__link:hover {
  background: #fafafa;
  color: #414651;
}
.program-breadcrumb__chevron {
  color: #717680;
  flex-shrink: 0;
}
.program-breadcrumb__current {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: #414651;
  background: #fafafa;
  padding: 4px 8px;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 400px;
}

/* --- Program Header --- */
.program-header {
  padding: 16px 32px 0;
}
.program-header__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.program-header__skeleton {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.program-header__row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.program-header__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.program-header__avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid rgba(0,0,0,0.08);
  background: white;
}
.program-header__avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-water);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.program-header__online-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: #17b26a;
  border: 1.5px solid white;
  border-radius: 50%;
}
.program-header__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.program-header__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.33;
  margin: 0;
}
.program-header__funded {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: #414651;
}
.program-header__funded a {
  color: #00328c;
  font-weight: 600;
  text-decoration: none;
}
.program-header__funded a:hover {
  text-decoration: underline;
}

/* Description Card */
.program-desc-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(10,13,18,0.05);
  padding: 14px 16px;
  margin-bottom: 4px;
}
.program-desc-card__text {
  font-family: var(--font-body);
  font-size: 13px;
  color: #414651;
  line-height: 1.7;
  max-height: 44px;
  overflow: hidden;
  transition: max-height 300ms ease;
}
.program-desc-card--expanded .program-desc-card__text {
  max-height: 500px;
}
.program-desc-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-water);
  background: none;
  border: none;
  padding: 0;
  margin-top: 6px;
  cursor: pointer;
}
.program-desc-card__toggle:hover { text-decoration: underline; }
.program-desc-card__toggle svg { width: 14px; height: 14px; }
.program-desc-card + .program-header__meta-row { margin-top: 12px; }

/* Score — rendered as a matching pill */
.program-header__score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid #e9eaeb;
  border-radius: 8px;
  padding: 6px 10px;
}
.program-header__score-circle {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--accent-water);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.program-header__score-number {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-water);
  line-height: 1;
}
.program-header__score-text {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.program-header__score-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: #414651;
  white-space: nowrap;
}
.program-header__score-helper {
  display: none;
}

/* Meta row: score + expandable pills inline */
.program-header__meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.program-header__meta-pill {
  position: relative;
}

/* Pill toggle button */
.meta-pill__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid #e9eaeb;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 150ms, box-shadow 150ms;
}
.meta-pill__toggle:hover {
  border-color: #d5d7da;
  box-shadow: 0 1px 3px rgba(10,13,18,0.08);
}
.meta-pill--open .meta-pill__toggle {
  border-color: var(--accent-water);
  box-shadow: 0 0 0 1px rgba(21,112,239,0.15);
}
.meta-pill__icon {
  width: 14px;
  height: 14px;
  color: #717680;
  flex-shrink: 0;
}
.meta-pill__icon--green { color: #067647; }
.meta-pill__label {
  font-size: 12px;
  font-weight: 600;
  color: #414651;
  white-space: nowrap;
}
.meta-pill__count {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-water);
  background: rgba(21,112,239,0.08);
  padding: 0 5px;
  border-radius: 9999px;
  min-width: 18px;
  text-align: center;
  line-height: 1.5;
}
.meta-pill__chevron {
  width: 10px;
  height: 10px;
  color: #a4a7ae;
  transition: transform 200ms;
  flex-shrink: 0;
}
.meta-pill--open .meta-pill__chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.meta-pill__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 200;
  background: white;
  border: 1px solid #e9eaeb;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 4px 12px rgba(10,13,18,0.1), 0 1px 3px rgba(10,13,18,0.06);
  min-width: 200px;
}
.meta-pill--open .meta-pill__dropdown {
  display: block;
}

/* Icon list items (property types + BMP types) */
.ph__icon-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ph__icon-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 12px;
  color: #414651;
  line-height: 1.3;
}
.ph__icon-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #717680;
}
.ph__icon-item--green svg {
  color: #067647;
}
@media (max-width: 768px) {
  .program-header__meta-row { gap: 6px; }
}

/* --- Pill Tabs --- */
.program-pill-tabs-wrap {
  padding: 0 32px;
}
.program-pill-tabs {
  display: flex;
  gap: 8px;
  background: #fafafa;
  border: 1px solid #e9eaeb;
  border-radius: 8px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.program-pill-tabs::-webkit-scrollbar { display: none; }
.program-pill-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: #717680;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background 200ms, color 200ms, box-shadow 200ms;
}
@media (hover: hover) {
  .program-pill-tab:hover {
    color: #414651;
  }
}
.program-pill-tab--active {
  background: white;
  color: #414651;
  box-shadow: 0 1px 3px rgba(10,13,18,0.1), 0 1px 2px -1px rgba(10,13,18,0.1);
}
.program-pill-tab--disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Tab count badges */
.pill-tab-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-water);
  background: rgba(21, 112, 239, 0.08);
  padding: 1px 6px;
  border-radius: 9999px;
  margin-left: 2px;
  font-variant-numeric: tabular-nums;
}
.pill-tab-count:empty { display: none; }
.program-pill-tab--active .pill-tab-count {
  background: rgba(21, 112, 239, 0.12);
}

/* --- Metric Cards (Performance Tab) --- */
.metric-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.metric-card {
  background: white;
  box-shadow: 0 12px 16px -4px rgba(10,13,18,0.08),
              0 4px 6px -2px rgba(10,13,18,0.03),
              0 2px 2px -1px rgba(10,13,18,0.04);
  overflow: hidden;
}
.metric-card__body {
  padding: 24px;
}
.metric-card__label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 20px;
  color: #00328c;
  margin: 0 0 4px;
}
.metric-card__value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: #101828;
  letter-spacing: -0.72px;
  line-height: 44px;
  margin: 0;
}
.metric-card__headline {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: #101828;
  line-height: 28px;
  margin: 0;
}
.metric-card__desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: #414651;
  line-height: 20px;
  margin: 13px 0 0;
}
.metric-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #00328c;
  text-decoration: none;
  margin-top: 13px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}
.metric-card__link:hover {
  text-decoration: underline;
}
.metric-card__link svg {
  width: 16px;
  height: 16px;
}
/* Alert banners */
.metric-card__alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 24px 8px;
  border-top: 1px solid;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
}
.metric-card__alert--warning {
  background: #fffbeb;
  border-color: #fee685;
  color: #bb4d00;
}
.metric-card__alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.metric-card__alert--warning .metric-card__alert-icon {
  background: #fef3c6;
}
.metric-card__alert-text {
  flex: 1;
  min-width: 0;
}
.metric-card__alert-btn {
  border: none;
  border-radius: 10px;
  padding: 6px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 150ms;
}
.metric-card__alert-btn:hover { opacity: 0.9; }
.metric-card__alert-btn--warning { background: #e17100; }

/* --- Data Visualization Cards --- */
.viz-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.viz-card {
  background: white;
  border: 1px solid #e9eaeb;
  border-radius: 12px;
  padding: 20px;
}
.viz-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.viz-card__title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #414651;
}
.viz-card__total {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: #717680;
}

/* Stacked horizontal bar */
.viz-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: #f3f4f6;
  margin-bottom: 14px;
}
.viz-bar__segment {
  height: 100%;
  transition: width 600ms ease;
}
.viz-bar__segment--res { background: var(--accent-water); }
.viz-bar__segment--com { background: #067647; }
.viz-bar__segment--other { background: #E87B2F; }

/* Legend */
.viz-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.viz-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
}
.viz-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.viz-legend__dot--res { background: var(--accent-water); }
.viz-legend__dot--com { background: #067647; }
.viz-legend__dot--other { background: #E87B2F; }
.viz-legend__label {
  color: #414651;
  flex: 1;
}
.viz-legend__value {
  font-weight: 600;
  color: #181d27;
  font-variant-numeric: tabular-nums;
}
.viz-legend__pct {
  color: #717680;
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Horizontal comparison bars */
.viz-bars-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.viz-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.viz-bar-row__label {
  font-family: var(--font-body);
  font-size: 13px;
  color: #414651;
  min-width: 80px;
  flex-shrink: 0;
}
.viz-bar-row__track {
  flex: 1;
  height: 8px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
}
.viz-bar-row__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 600ms ease;
}
.viz-bar-row__fill--res { background: var(--accent-water); }
.viz-bar-row__fill--com { background: #067647; }
.viz-bar-row__fill--other { background: #E87B2F; }
.viz-bar-row__value {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: #717680;
  min-width: 90px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .viz-cards { grid-template-columns: 1fr; }
}

/* --- Split Layout: Content + Map --- */
.program-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: calc(100vh - 74px); /* fill below site header */
}

/* --- Tab Content (left column: header + tabs + panels) --- */
.program-content {
  overflow-y: auto;
  padding-bottom: 3rem;
}

/* --- Program Map (right column, fills grid cell) --- */
.program-map {
  position: sticky;
  top: 74px;
  height: calc(100vh - 74px);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
#programMap {
  flex: 1;
  min-height: 0;
}
.program-map__loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: opacity 300ms;
}
.program-map__loading--hidden {
  opacity: 0;
  pointer-events: none;
}

.program-map__info {
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: #FAFAFA;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* Corner expand/collapse toggle for the program map (mobile + tablet) */
.program-map__toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 600;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out);
}
@media (hover: hover) {
  .program-map__toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  }
}
.program-map__toggle:active { transform: scale(0.96); }
.program-map__toggle:focus-visible {
  outline: 2px solid var(--accent-water);
  outline-offset: 2px;
}

/* Icon swap based on expanded state */
.program-map__toggle-icon--collapse { display: none; }
.program-map--expanded .program-map__toggle-icon--expand { display: none; }
.program-map--expanded .program-map__toggle-icon--collapse { display: inline-block; }

/* Hide the toggle on desktop (≥1025px) — the map is already in a side column, doesn't need expansion */
@media (min-width: 1025px) {
  .program-map__toggle { display: none; }
}
.program-tab-panel {
  display: none;
}
.program-tab-panel--active {
  display: block;
}
.program-container {
  max-width: 100%;
  padding: 1.5rem 2rem 3rem;
}

/* --- Overview Grid --- */
.program-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.program-overview-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.program-overview-card__title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.program-overview-card__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.program-overview-card__item {
  font-size: 0.88rem;
  color: var(--text-primary);
}

/* --- Data Table --- */
.program-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.program-table thead th {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.program-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: top;
}
@media (hover: hover) {
  .program-table tbody tr:hover {
    background: rgba(21, 112, 239, 0.02);
  }
}
.program-table .td-address {
  max-width: 320px;
}
.program-table .td-type {
  white-space: nowrap;
}
.program-table .td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.program-table .td-narrow {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}
.program-table .td-status {
  white-space: nowrap;
}
.program-table .td-pricing {
  white-space: nowrap;
  min-width: 160px;
}

/* --- Section header above each tab table --- */
.program-section-head {
  margin: 0 0 1rem;
}
.program-section-head__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.program-section-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.program-section-head__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(21, 112, 239, 0.08);
  color: var(--accent-water);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.program-section-head__range {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
/* --- Filter pills (Opportunities tab: All / Open for bid) --- */
.program-filter-pills {
  display: inline-flex;
  margin-top: 0.85rem;
  padding: 0.2rem;
  gap: 0.2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.program-filter-pill {
  background: transparent;
  border: none;
  padding: 0.4rem 0.95rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms, color 150ms;
}
.program-filter-pill:hover:not(.program-filter-pill--active) {
  color: var(--text-primary);
}
.program-filter-pill--active {
  background: var(--accent-water);
  color: #fff;
}

/* --- Stacked cell: primary value + small sub-text --- */
.program-stack {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.35;
}
.program-stack__primary {
  color: var(--text-primary);
}
.program-stack__sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* --- Lock icon for fields pending V3 backend updates --- */
.program-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #98A2B3;
  opacity: 0.7;
  cursor: help;
}
.program-lock-icon {
  display: block;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}
.pagination__btn {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-water);
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
}
@media (hover: hover) {
  .pagination__btn:hover:not(:disabled) {
    background: rgba(21, 112, 239, 0.06);
    border-color: var(--accent-water);
  }
}
.pagination__btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.pagination__info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Empty State --- */
.program-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* --- Back link in explorer bar --- */
.explorer-bar__back {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-water);
  text-decoration: none;
  white-space: nowrap;
}
.explorer-bar__back:hover { text-decoration: underline; }

.explorer-bar__breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

/* --- Program Page Responsive --- */
@media (max-width: 1024px) {
  .program-layout { grid-template-columns: 1fr; }
  .program-map {
    position: relative;
    top: 0;
    height: 300px;
    border-left: none;
    border-top: 1px solid var(--border);
    order: -1; /* map above content on smaller screens */
  }
}

@media (max-width: 768px) {
  .program-breadcrumb { padding: 16px 20px 0; }
  .program-header { padding: 12px 20px 0; }
  .program-pill-tabs-wrap { padding: 0 20px; }
  .program-container { padding: 1rem 1.25rem 2rem; }
  .program-overview-grid { grid-template-columns: 1fr; }
  .program-table { font-size: 0.8rem; }
  .program-table thead th, .program-table tbody td { padding: 0.6rem 0.65rem; }

  .program-map {
    position: relative;
    height: 180px; /* was 250px */
    min-height: 180px;
    /* No transition on height — Leaflet's init cycle triggers a stuck
       CSSTransition that holds the height at its initial value, preventing
       expand. Snap change is also fine UX here since the button is explicit. */
  }
  .program-map.program-map--expanded {
    height: 60vh;
    min-height: 60vh;
  }

  .program-map__toggle {
    /* On mobile, bump tap target to 44px */
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .metric-card__value { font-size: 28px; }
  .metric-card__headline { font-size: 15px; }
  .metric-card__alert { flex-wrap: wrap; row-gap: 8px; }
  .metric-card__alert-text { flex-basis: calc(100% - 44px); }
  .metric-card__alert-btn { margin-left: 44px; }

  /* Pill tabs wrap to multiple rows on mobile — horizontal scroll was
     fundamentally broken on this flex container under Chromium (scrollLeft
     couldn't be set even with overflow: scroll + explicit width), so all 5
     tabs stay visible via wrapping. Trade vertical space for zero-interaction
     visibility. */
  .program-pill-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
    padding-bottom: 0.5rem;
    justify-content: flex-start;
  }
  .program-pill-tab {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
  }

  /* Journey legend as horizontal chip row on mobile */
  .journey-legend {
    left: 12px;
    right: 12px;
    bottom: auto;
    top: 12px;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.25rem;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    scrollbar-width: none;
    min-width: auto;
  }
  .journey-legend::-webkit-scrollbar { display: none; }
  .journey-legend__title { display: none; }
  .journey-legend > *:not(.journey-legend__title) {
    flex: 0 0 auto;
    font-size: 0.7rem;
    padding: 0.25rem 0.55rem;
  }

  /* Horizontal-scroll wrapper for data tables */
  .program-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1.25rem;
    padding: 0 1.25rem;
    box-shadow: inset -8px 0 8px -8px rgba(0,0,0,0.12);
  }

  /* Touch target baseline for pagination */
  .pagination__btn { min-height: 44px; padding: 0.65rem 1rem; }
}

@media (max-width: 480px) {
  .program-breadcrumb { padding: 12px 16px 0; gap: 2px; }
  .program-header { padding: 8px 16px 0; }
  .program-pill-tabs-wrap { padding: 0 16px; }
  .metric-card__body { padding: 16px; }
  .metric-card__value { font-size: 24px; }
  .program-header__score-card { flex-direction: column; text-align: center; }
}

/* ────────────────────────────────────────────────────────────
   DETAIL SLIDER — Program page entity detail overlay
   ──────────────────────────────────────────────────────────── */

.detail-slider {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.35);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.detail-slider-open .detail-slider {
  opacity: 1;
  pointer-events: auto;
}

.detail-slider__inner {
  max-width: 580px;
  margin: 0 auto;
  padding: 5rem 1rem 3rem;
  min-height: 100%;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 300ms ease;
}

.detail-slider-open .detail-slider__inner {
  transform: translateY(0);
  opacity: 1;
}

/* Close bar */
.detail-slider__close-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

.detail-slider__close-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 150ms;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.detail-slider__close-btn:hover {
  background: #fff;
  color: var(--text-primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.detail-slider__close-btn svg { width: 14px; height: 14px; }

/* Card header (gradient) */
.detail-card__header {
  background: linear-gradient(135deg, var(--card-primary), var(--card-gradient));
  padding: 1.75rem 2rem;
  color: white;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.detail-card__type-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.75;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-card__type-label svg { width: 14px; height: 14px; opacity: 0.8; }
.detail-card__address {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
.detail-card__city {
  font-size: 0.82rem;
  opacity: 0.8;
  margin-top: 2px;
}

/* Card body */
.detail-card__body {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Badges */
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 20px 0;
}
.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.detail-badge--blue   { background: rgba(21, 112, 239, 0.08); color: #1570EF; }
.detail-badge--green  { background: rgba(6, 118, 71, 0.08); color: #067647; }
.detail-badge--amber  { background: rgba(232, 123, 47, 0.08); color: #C4320A; }
.detail-badge--purple { background: rgba(105, 65, 198, 0.08); color: #6941C6; }
.detail-badge__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* Section */
.detail-section {
  padding: 16px 20px;
}
.detail-section + .detail-section {
  border-top: 1px solid #f1f5f9;
}
.detail-section__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
}

/* Metric grid */
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.detail-metric-box {
  background: var(--bg-panel);
  border-radius: 8px;
  padding: 10px 12px;
}
.detail-metric-box__label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.detail-metric-box__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}
.detail-metric-box__value--sm { font-size: 0.875rem; }
.detail-metric-box__unit {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Info row (contextual status message) */
.detail-info-row {
  background: var(--bg-panel);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.detail-info-row__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-info-row__icon svg { width: 16px; height: 16px; }
.detail-info-row__icon--blue   { background: rgba(21, 112, 239, 0.08); color: #1570EF; }
.detail-info-row__icon--green  { background: rgba(6, 118, 71, 0.08); color: #067647; }
.detail-info-row__icon--amber  { background: rgba(232, 123, 47, 0.08); color: #E87B2F; }
.detail-info-row__icon--purple { background: rgba(105, 65, 198, 0.08); color: #6941C6; }
.detail-info-row__text { flex: 1; min-width: 0; }
.detail-info-row__headline {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}
.detail-info-row__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

/* Incentive mini-cards */
.detail-incentive-mini {
  background: var(--bg-panel);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.detail-incentive-mini:last-child { margin-bottom: 0; }
.detail-incentive-mini__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(21, 112, 239, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.detail-incentive-mini__icon svg { width: 18px; height: 18px; color: #1570EF; }
.detail-incentive-mini__body { flex: 1; min-width: 0; }
.detail-incentive-mini__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}
.detail-incentive-mini__meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.detail-incentive-mini__value {
  font-size: 0.75rem;
  font-weight: 700;
  color: #067647;
  margin-top: 3px;
}

/* BMP thumbnail strip */
.detail-bmp-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.detail-bmp-strip::-webkit-scrollbar { height: 4px; }
.detail-bmp-strip::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 2px; }
.detail-bmp-thumb {
  width: 80px;
  flex-shrink: 0;
  text-align: center;
}
.detail-bmp-thumb__img {
  width: 80px;
  height: 56px;
  border-radius: 8px;
  background: #e2e8f0;
  object-fit: cover;
}
.detail-bmp-thumb__name {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.2;
}

/* Locked section */
.detail-locked {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}
.detail-locked__content {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}
.detail-locked__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(2px);
  border-radius: 10px;
}
.detail-locked__cta {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  background: var(--accent-water);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(21, 112, 239, 0.25);
  transition: all 150ms;
}
.detail-locked__cta:hover {
  background: #1260D0;
  box-shadow: 0 4px 12px rgba(21, 112, 239, 0.35);
}
.detail-locked__cta svg { width: 12px; height: 12px; }

/* Footer (copy link) */
.detail-footer {
  padding: 12px 20px 20px;
  display: flex;
  gap: 8px;
}
.detail-copy-btn {
  flex: 1;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  transition: all 150ms;
}
.detail-copy-btn:hover {
  background: #f1f5f9;
  border-color: #CBD5E1;
}
.detail-copy-btn svg { width: 14px; height: 14px; }
.detail-copy-btn--copied {
  background: rgba(6, 118, 71, 0.06);
  border-color: #067647;
  color: #067647;
}

/* Intake entry layout (opportunity slider) */
.detail-section--intake { padding-top: 14px; padding-bottom: 14px; }
.detail-section--intake + .detail-section--intake { border-top: 1px solid #f1f5f9; }

.detail-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-panel);
  border-radius: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.detail-entry-header__title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}
.detail-entry-header__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.detail-entry-header__badge {
  background: rgba(21, 112, 239, 0.08);
  color: #1570EF;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
}

/* Project specs as label/value rows — much denser than metric cards */
.detail-fact-list {
  display: flex;
  flex-direction: column;
}
.detail-fact-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
}
.detail-fact-row:last-child { border-bottom: none; }
.detail-fact-row__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.detail-fact-row__value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-display);
  text-align: right;
  word-break: break-word;
}

/* Sub-heading inside an intake entry (Financials, Notes) */
.detail-subhead {
  margin: 16px 0 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

/* Compact metric tiles (used inside intake entry) */
.detail-metrics--compact { gap: 6px; }
.detail-metrics--compact .detail-metric-box { padding: 8px 10px; }
.detail-metrics--compact .detail-metric-box__label { font-size: 0.62rem; }
.detail-metrics--compact .detail-metric-box__value { font-size: 0.92rem; }

/* Intake narrative blocks (opportunity slider) */
.detail-intake-notes {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-intake-notes__block {
  padding: 10px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.detail-intake-notes__label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.detail-intake-notes__body {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
  white-space: pre-line;
}

/* Bid Now CTA (opportunity slider) */
.detail-intake-cta {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.detail-bid-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  background: #E87B2F;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms, box-shadow 150ms;
  box-shadow: 0 2px 6px rgba(232, 123, 47, 0.25);
}
.detail-bid-btn:hover {
  background: #D06420;
  box-shadow: 0 4px 12px rgba(232, 123, 47, 0.35);
}
.detail-intake-cta__helper {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

/* Ensure "gray" badge variant exists for void status */
.detail-badge--gray {
  background: rgba(152, 162, 179, 0.12);
  color: #667085;
}
.detail-badge--gray .detail-badge__dot { background: #98A2B3; }

/* Clickable table rows */
.program-table__row--clickable { cursor: pointer; transition: background 200ms; }
@media (hover: hover) {
  .program-table__row--clickable:hover { background: rgba(21, 112, 239, 0.04); }
}
.program-table__row--highlighted {
  background: rgba(21, 112, 239, 0.10) !important;
  box-shadow: inset 3px 0 0 var(--accent-water);
}

/* Skeleton inside slider */
.detail-slider .skeleton { margin-bottom: 0.75rem; }

/* ── Detail slider mobile ── */
@media (max-width: 768px) {
  .detail-slider__inner {
    padding: 1rem 0.75rem 5rem;
    max-width: 100%;
  }
  .detail-card__header {
    padding: 1.25rem;
  }
  .detail-metrics {
    grid-template-columns: 1fr;
  }
  /* Compact financial tiles stay in 2 columns on mobile — values are short
     ($X,XXX, NN%) so they fit, and stacking would be a long vertical run. */
  .detail-metrics--compact {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-section--intake {
    padding-left: 14px;
    padding-right: 14px;
  }
  .detail-fact-row {
    padding: 8px 0;
    gap: 12px;
  }
  .detail-fact-row__label { font-size: 0.74rem; }
  .detail-fact-row__value { font-size: 0.82rem; }
  .detail-entry-header { padding: 7px 10px; }
  .detail-entry-header__title { font-size: 0.78rem; }
  .detail-entry-header__meta { font-size: 0.68rem; gap: 6px; }
  .detail-metrics--compact .detail-metric-box { padding: 7px 9px; }
  .detail-metrics--compact .detail-metric-box__value { font-size: 0.86rem; }
}


/* ================================================================
   AUTH SYSTEM — Login modal, standalone pages, signup wizard
   ================================================================ */

/* ── Auth overlay (modal) ─────────────────────────────────── */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-overlay.active {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-modal {
  position: relative;
  width: 90vw;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-radius: 20px;
  padding: 2.5rem 2rem 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-overlay.active .auth-modal {
  transform: translateY(0) scale(1);
}

.auth-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 1px solid #E9EAEB;
  border-radius: 8px;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  .auth-modal__close:hover {
    color: var(--text-primary);
    border-color: rgba(21, 112, 239, 0.3);
    background: rgba(21, 112, 239, 0.06);
  }
}

/* ── Auth step dots (modal signup) ──────────────────────── */

.auth-modal__step-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.auth-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #E9EAEB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.auth-step-dot.active {
  border-color: var(--accent-water);
  background: var(--accent-water);
  color: #fff;
}

.auth-step-dot.complete {
  border-color: var(--accent-rain);
  background: var(--accent-rain);
  color: #fff;
}

.auth-step-connector {
  width: 32px;
  height: 2px;
  background: #E9EAEB;
  border-radius: 1px;
  transition: background 0.3s ease;
}

.auth-step-connector.complete {
  background: var(--accent-rain);
}

/* ── Shared auth card / page ──────────────────────────────── */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.auth-logo {
  display: block;
  width: auto;
  height: 36px;
  margin: 0 auto 1.5rem;
  object-fit: contain;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-header__toggle {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.auth-header__toggle a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.auth-header__toggle a:hover {
  color: var(--accent-water);
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.4rem;
  line-height: 1.2;
}

.auth-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Google sign-in button ────────────────────────────────── */

.auth-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid #E9EAEB;
  border-radius: 100px;
  background: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-btn-google:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-btn-google svg {
  flex-shrink: 0;
}

/* ── OR divider ───────────────────────────────────────────── */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E9EAEB;
}

.auth-divider span {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Auth form ────────────────────────────────────────────── */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-form__label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-form__label--required::after {
  content: '*';
  color: var(--accent-water);
  margin-left: 2px;
}

.auth-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-input-wrap {
  position: relative;
}

.auth-form__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: #FAFAFA;
  border: 1px solid #E9EAEB;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.auth-form__input::placeholder {
  color: #A4A7AE;
}

.auth-form__input:focus {
  border-color: var(--accent-water);
  box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.1);
  background: #FFFFFF;
}

.auth-form__input.error {
  border-color: rgba(220, 60, 60, 0.5);
  box-shadow: 0 0 0 3px rgba(220, 60, 60, 0.08);
}

.auth-form__error {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: #DC3C3C;
  display: none;
}

.auth-form__error.visible {
  display: block;
}

/* Password toggle */
.auth-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.auth-toggle:hover {
  color: var(--text-primary);
}

.auth-form__input[type="password"] + .auth-toggle,
.auth-form__input[type="text"] + .auth-toggle {
  /* Ensure toggle is above input */
}

/* Remember me + forgot password row */
.auth-form__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 0.8rem;
}

.auth-form__remember {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-primary);
  cursor: pointer;
}

.auth-form__remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-water);
  cursor: pointer;
}

.auth-form__forgot {
  color: var(--accent-water);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-form__forgot:hover {
  color: #1260CC;
}

/* ── Auth buttons ─────────────────────────────────────────── */

.auth-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 100px;
  background: var(--accent-water);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  .auth-btn-primary:hover {
    background: #1260CC;
    box-shadow: 0 4px 12px rgba(21, 112, 239, 0.3);
  }
}

.auth-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #E9EAEB;
  border-radius: 100px;
  background: #FFFFFF;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  .auth-btn-secondary:hover {
    border-color: var(--accent-water);
    color: var(--accent-water);
  }
}

/* Global error */
.auth-global-error {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #DC3C3C;
  background: rgba(220, 60, 60, 0.06);
  border: 1px solid rgba(220, 60, 60, 0.15);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  text-align: center;
  display: none;
}

.auth-global-error.visible {
  display: block;
}

/* Toast notification */
.auth-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-primary);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.7rem 1.25rem;
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 10010;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Auth footer link */
.auth-footer {
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

.auth-footer a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-footer a:hover {
  color: var(--accent-water);
}

/* ── Signup wizard layout ─────────────────────────────────── */

.signup-layout {
  display: flex;
  min-height: 100vh;
}

.signup-sidebar {
  width: 380px;
  flex-shrink: 0;
  background: #181D27;
  color: #FFFFFF;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.signup-sidebar__logo {
  display: block;
  width: 140px;
  margin-bottom: 3rem;
}

.signup-sidebar__logo img {
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

.signup-sidebar__steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.signup-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
}

.signup-step__icon-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.signup-step__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.signup-step.active .signup-step__icon {
  border-color: var(--accent-water);
  background: rgba(21, 112, 239, 0.15);
  color: #FFFFFF;
}

.signup-step.complete .signup-step__icon {
  border-color: var(--accent-rain);
  background: var(--accent-rain);
  color: #FFFFFF;
}

.signup-step__connector {
  width: 1.5px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
  margin: 6px 0;
  transition: background 0.3s ease;
}

.signup-step.complete .signup-step__connector {
  background: var(--accent-rain);
}

.signup-step__text {
  padding-top: 8px;
}

.signup-step__title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 0.2rem;
  transition: color 0.3s ease;
}

.signup-step.active .signup-step__title,
.signup-step.complete .signup-step__title {
  color: #FFFFFF;
}

.signup-step__desc {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  margin: 0;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.signup-step.active .signup-step__desc {
  color: rgba(255, 255, 255, 0.6);
}

.signup-step.complete .signup-step__desc {
  color: rgba(255, 255, 255, 0.5);
}

.signup-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-panel);
  overflow-y: auto;
}

.signup-content__inner {
  width: 100%;
  max-width: 500px;
}

/* ── Org search ───────────────────────────────────────────── */

.org-search {
  position: relative;
}

.org-search__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: #FAFAFA;
  border: 1px solid #E9EAEB;
  border-radius: 10px;
  padding: 0.7rem 0.85rem 0.7rem 2.5rem;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.org-search__input:focus {
  border-color: var(--accent-water);
  box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.1);
  background: #FFFFFF;
}

.org-search__icon {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.org-search__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  max-height: 240px;
  overflow-y: auto;
  z-index: 10;
  display: none;
}

.org-search__dropdown.open {
  display: block;
}

.org-search__item {
  padding: 0.7rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease;
}

.org-search__item:hover {
  background: rgba(21, 112, 239, 0.06);
}

.org-search__item:first-child {
  border-radius: 10px 10px 0 0;
}

.org-search__item:last-child {
  border-radius: 0 0 10px 10px;
}

.org-search__create {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--accent-water);
  font-weight: 600;
  cursor: pointer;
  border-top: 1px solid #E9EAEB;
  transition: background 0.15s ease;
}

.org-search__create:hover {
  background: rgba(21, 112, 239, 0.06);
}

.org-search__empty {
  padding: 1rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.org-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(21, 112, 239, 0.08);
  border: 1px solid rgba(21, 112, 239, 0.2);
  border-radius: 100px;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-water);
  margin-top: 0.75rem;
}

.org-chip__remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent-water);
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.org-chip__remove:hover {
  opacity: 1;
}

/* ── Auth complete step ───────────────────────────────────── */

.auth-complete {
  text-align: center;
  padding: 2rem 0;
}

.auth-complete__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-rain), #1570EF);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #FFFFFF;
}

.auth-complete__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.auth-complete__subtitle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  line-height: 1.5;
}

/* Skip link */
.auth-skip {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  margin-top: 0.75rem;
  background: none;
  border: none;
  transition: color 0.2s ease;
}

.auth-skip:hover {
  color: var(--text-primary);
}

/* ── Header auth elements ─────────────────────────────────── */

/* ── Header auth elements ─────────────────────────────────── */

.site-header__auth {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
  animation: authFadeIn 0.25s ease;
}

@keyframes authFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

a.site-header__auth:hover {
  color: var(--text-primary);
}

/* "Get Started" CTA — logged out */
.site-header__cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.2rem;
  background: var(--accent-water);
  color: #FFFFFF !important;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.site-header__cta-btn:hover {
  background: #1260CC;
  box-shadow: 0 4px 12px rgba(21, 112, 239, 0.25);
  color: #FFFFFF !important;
}

/* "Dashboard" nav link — logged in */
.site-header__dash-link {
  text-decoration: none;
  font-weight: 500;
  color: var(--text-muted) !important;
}

.site-header__dash-link:hover {
  color: var(--text-primary) !important;
}

/* Dropdown danger item */
.site-header__user-dropdown-item--danger {
  color: #DC3C3C;
  border-top: 1px solid #E9EAEB;
}

.site-header__user-dropdown-item--danger:hover {
  background: rgba(220, 60, 60, 0.06);
}

.site-header__user-menu {
  position: relative;
}

.site-header__user-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-radius: 8px;
  padding: 0.3rem 0.6rem 0.3rem 0.3rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.site-header__user-btn:hover {
  border-color: #D0D0D0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.site-header__user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-water), #137D5E);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
}

.site-header__user-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header__user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  min-width: 140px;
  display: none;
  z-index: 100;
}

.site-header__user-dropdown.open {
  display: block;
}

.site-header__user-dropdown-item {
  display: block;
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s ease;
}

.site-header__user-dropdown-item:hover {
  background: rgba(21, 112, 239, 0.06);
}

/* Spinner */
.auth-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: authSpin 0.6s linear infinite;
  margin-right: 0.5rem;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

/* ── Auth responsive ──────────────────────────────────────── */

@media (max-width: 768px) {
  .auth-card {
    padding: 2rem 1.25rem;
    border-radius: 16px;
  }

  .auth-modal {
    max-width: 95vw;
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 16px;
  }

  .auth-form__row {
    grid-template-columns: 1fr;
  }

  .signup-layout {
    flex-direction: column;
  }

  .signup-sidebar {
    display: none;
  }

  .signup-step-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #FFFFFF;
    border-bottom: 1px solid #E9EAEB;
  }

  .signup-content {
    min-height: calc(100vh - 56px);
    padding: 1.5rem 1rem;
  }

  /* Touch target baseline for modal close button */
  .auth-modal__close {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (min-width: 769px) {
  .signup-step-bar {
    display: none;
  }
}


/* ================================================================
   PROFILE PAGE
   ================================================================ */

.profile-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.profile-header {
  margin-bottom: 2rem;
}

.profile-header__name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
}

.profile-header__org {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Profile tabs ─────────────────────────────────────────── */

.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #E9EAEB;
  margin-bottom: 2rem;
}

.profile-tab {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  .profile-tab:hover {
    color: var(--text-primary);
  }
}

.profile-tab--active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

.profile-panel {
  display: none;
}

.profile-panel--active {
  display: block;
}

/* ── Profile section ──────────────────────────────────────── */

.profile-section {
  margin-bottom: 2rem;
}

.profile-section__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}

.profile-section__subtitle {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.profile-section__divider {
  border: none;
  border-top: 1px solid #E9EAEB;
  margin: 0 0 1.5rem;
}

/* ── Profile form rows ────────────────────────────────────── */

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-form__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.profile-form__label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  padding-top: 0.65rem;
}

.profile-form__label--required::after {
  content: '*';
  color: var(--accent-water);
  margin-left: 2px;
}

.profile-form__fields {
  display: flex;
  gap: 0.75rem;
}

.profile-form__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.profile-form__input::placeholder {
  color: #A4A7AE;
}

.profile-form__input:focus {
  border-color: var(--accent-water);
  box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.1);
}

.profile-form__input:disabled,
.profile-form__input[readonly] {
  background: #F5F6F8;
  color: var(--text-muted);
  cursor: not-allowed;
}

.profile-form__textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
  resize: vertical;
  min-height: 100px;
}

.profile-form__textarea:focus {
  border-color: var(--accent-water);
  box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.1);
}

/* Input with prefix icon */
.profile-form__input-wrap {
  position: relative;
  width: 100%;
}

.profile-form__input-wrap .profile-form__input {
  padding-left: 2.5rem;
}

.profile-form__input-icon {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* Social profile rows */
.profile-form__social {
  display: flex;
  align-items: center;
  border: 1px solid #E9EAEB;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.profile-form__social:focus-within {
  border-color: var(--accent-water);
  box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.1);
}

.profile-form__social-prefix {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #F5F6F8;
  padding: 0.65rem 0.75rem;
  border-right: 1px solid #E9EAEB;
  white-space: nowrap;
  flex-shrink: 0;
}

.profile-form__social .profile-form__input {
  border: none;
  border-radius: 0;
  padding: 0.65rem 0.85rem;
}

.profile-form__social .profile-form__input:focus {
  box-shadow: none;
}

/* ── Profile actions ──────────────────────────────────────── */

.profile-form__divider {
  border: none;
  border-top: 1px solid #E9EAEB;
  margin: 0.5rem 0;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.profile-btn-cancel {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-radius: 10px;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-btn-cancel:hover {
  border-color: var(--text-muted);
}

.profile-btn-save {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--accent-water);
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-btn-save:hover {
  background: #1260CC;
  box-shadow: 0 4px 12px rgba(21, 112, 239, 0.3);
}

.profile-btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success/error toast for profile save */
.profile-save-status {
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: none;
  align-self: center;
}

.profile-save-status.success {
  display: block;
  color: var(--accent-rain);
  background: rgba(6, 118, 71, 0.08);
}

.profile-save-status.error {
  display: block;
  color: #DC3C3C;
  background: rgba(220, 60, 60, 0.06);
}

/* ── Loading skeleton ─────────────────────────────────────── */

.profile-skeleton {
  height: 40px;
  background: linear-gradient(90deg, #F0F0F0 25%, #E0E0E0 50%, #F0F0F0 75%);
  background-size: 200% 100%;
  border-radius: 10px;
  animation: profileShimmer 1.5s infinite;
}

@keyframes profileShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Profile responsive ───────────────────────────────────── */

@media (max-width: 768px) {
  .profile-page {
    padding: 1.5rem 1rem 3rem;
  }

  .profile-form__row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .profile-form__label {
    padding-top: 0;
  }

  .profile-form__fields {
    flex-direction: column;
  }

  .profile-actions {
    flex-direction: column;
  }

  .profile-btn-cancel,
  .profile-btn-save {
    width: 100%;
    text-align: center;
  }
}


/* ================================================================
   DASHBOARD PAGE
   ================================================================ */

.dashboard-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.dashboard-header__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}

.dashboard-header__subtitle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.dashboard-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--accent-water);
  color: #FFFFFF;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dashboard-header__cta:hover {
  background: #1260CC;
  box-shadow: 0 4px 12px rgba(21, 112, 239, 0.3);
}

/* ── Dashboard stats ──────────────────────────────────────── */

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.dashboard-stat {
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dashboard-stat__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dashboard-stat__label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Dashboard grid ───────────────────────────────────────── */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.dashboard-card {
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-radius: 16px;
  overflow: hidden;
}

.dashboard-card__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #E9EAEB;
}

.dashboard-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.dashboard-card__body {
  padding: 1.25rem 1.5rem;
}

/* ── Empty state ──────────────────────────────────────────── */

.dashboard-empty {
  text-align: center;
  padding: 2rem 1rem;
}

.dashboard-empty svg {
  margin-bottom: 0.75rem;
}

.dashboard-empty p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
}

.dashboard-empty span {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Quick actions ────────────────────────────────────────── */

.dashboard-action {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.2s ease;
}

.dashboard-action:hover {
  background: rgba(21, 112, 239, 0.04);
}

.dashboard-action + .dashboard-action {
  border-top: 1px solid #F0F0F0;
}

.dashboard-action__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-action__icon--blue {
  background: rgba(21, 112, 239, 0.1);
  color: var(--accent-water);
}

.dashboard-action__icon--green {
  background: rgba(6, 118, 71, 0.1);
  color: var(--accent-rain);
}

.dashboard-action__icon--purple {
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
}

.dashboard-action strong {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.dashboard-action span {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Activity feed ────────────────────────────────────────── */

.dashboard-activity-list {
  display: flex;
  flex-direction: column;
}

.dashboard-activity-item {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s ease;
  border-radius: 8px;
  margin: 0 -0.5rem;
}

a.dashboard-activity-item:hover {
  background: rgba(21, 112, 239, 0.04);
}

.dashboard-activity-item + .dashboard-activity-item {
  border-top: 1px solid #F0F0F0;
}

.dashboard-activity-text {
  min-width: 0;
  flex: 1;
}

.dashboard-activity-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-activity-row strong {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.dashboard-activity-time {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  display: block;
}

/* Add search type tag for activity (reuses search dropdown pill styling) */
.search-dropdown__type--search {
  background: rgba(83, 88, 98, 0.1);
  color: #535862;
}

/* ── Dashboard responsive ─────────────────────────────────── */

@media (max-width: 768px) {
  .dashboard-page {
    padding: 1.5rem 1rem 3rem;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

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

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


/* ============================================================
   TOP PROGRAMS 2026 — Editorial data report page
   ============================================================ */

/* --- Hero --- */
.tp-hero {
  background: linear-gradient(135deg, #0a1628 0%, #0f2847 30%, #1570EF 70%, #137D5E 100%);
  color: #fff;
  padding: 6rem 2.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(21,112,239,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 70%, rgba(19,125,94,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.tp-hero__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  padding: 0.35rem 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
}
.tp-hero__heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  position: relative;
}
.tp-hero__subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  position: relative;
}
.tp-hero__stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  position: relative;
}
.tp-hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tp-hero__stat-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}
.tp-hero__stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  margin-top: 0.2rem;
}

/* --- Controls: Filter + Sort --- */
.tp-controls {
  padding-top: 2rem !important;
  padding-bottom: 0 !important;
}
.tp-controls__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tp-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.tp-select {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23535862' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.7rem center;
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 150ms;
}
.tp-select:hover { border-color: var(--accent-water); }
.tp-select:focus { outline: none; border-color: var(--accent-water); box-shadow: 0 0 0 3px rgba(21,112,239,0.1); }
.tp-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.tp-sort__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- Programs Section --- */
.tp-programs {
  padding-top: 1rem !important;
  background: #f8f9fb;
}
.tp-programs__count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* --- Card Grid --- */
.tp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* --- Program Card --- */
.tp-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 200ms, box-shadow 200ms;
}
.tp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}
.tp-card:nth-child(3n+1) { border-top: 3px solid var(--accent-water); }
.tp-card:nth-child(3n+2) { border-top: 3px solid var(--accent-rain); }
.tp-card:nth-child(3n+3) { border-top: 3px solid var(--accent-warm); }

/* Card Header — entity-card style: logo + text + score */
.tp-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
}
.tp-card__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fb;
}
.tp-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tp-card__logo--icon {
  background: #EFF4FF;
  color: #1570EF;
}
.tp-card__header-text {
  flex: 1;
  min-width: 0;
}
.tp-card__state-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}
.tp-card__score {
  width: 34px;
  height: 34px;
  background: #EFF4FF;
  border: 2px solid #1570EF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  color: #1570EF;
  flex-shrink: 0;
}

/* Card Body */
.tp-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 14px 14px;
  gap: 0.6rem;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
/* Number Pair — the two headline financial figures */
.tp-card__numbers {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-left: 3px solid var(--accent-rain);
  padding-left: 10px;
}
.tp-card__num {
  flex: 1;
  min-width: 0;
}
.tp-card__num-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.tp-card__num-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 1px;
}
.tp-card__num-divider {
  width: 1px;
  background: var(--border);
  margin: 0 12px;
  align-self: stretch;
}

/* Info Line — type + rate + counts in one compact row */
.tp-card__info {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.tp-card__sep {
  margin: 0 5px;
  opacity: 0.4;
}
.tp-card__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

/* Type Badges */
.tp-card__types {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.tp-card__type {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid;
  white-space: nowrap;
}

/* Eligible Practices Section */
.tp-card__practices {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.tp-card__practices-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.tp-card__practices-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.tp-card__practices-count {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--accent-water);
  background: rgba(21,112,239,0.08);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}
.tp-card__practices-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* BMP pills with category icon */
.tp-bmp-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  border: 1px solid;
}
.tp-bmp-pill__icon { font-size: 0.68rem; line-height: 1; }
.tp-bmp-pill--yard { background: rgba(6,118,71,0.06); color: #067647; border-color: rgba(6,118,71,0.15); }
.tp-bmp-pill--roof { background: rgba(105,65,198,0.06); color: #6941C6; border-color: rgba(105,65,198,0.15); }
.tp-bmp-pill--drive { background: rgba(232,123,47,0.06); color: #C4640A; border-color: rgba(232,123,47,0.15); }
.tp-bmp-pill--other { background: rgba(21,112,239,0.06); color: #1570EF; border-color: rgba(21,112,239,0.15); }

/* (metrics grid removed — replaced by number pair + info line) */

/* Card Footer */
.tp-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}
.tp-card__stats {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.tp-card__dot {
  width: 3px;
  height: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  display: inline-block;
}
.tp-card__metric {
  font-weight: 600;
  color: var(--accent-water);
}
.tp-card__criteria {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  background: #FFFAEB;
  color: #B54708;
  border: 1px solid #FEDF89;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* CTA Link */
.tp-card__cta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-water);
  padding-top: 0.3rem;
}
.tp-card:hover .tp-card__cta {
  text-decoration: underline;
}

/* Loading state */
.tp-loading {
  text-align: center;
  padding: 3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.tp-loading--error { color: #dc3545; }

/* Card wrapper — holds card + review toggle + review panel */
.tp-card-wrapper {
  display: flex;
  flex-direction: column;
}

/* Review toggle button */
.tp-card__review-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-water);
  background: rgba(21,112,239,0.04);
  border: 1px solid rgba(21,112,239,0.15);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 6px 12px;
  cursor: pointer;
  transition: background 150ms;
}
.tp-card__review-toggle:hover { background: rgba(21,112,239,0.08); }
.tp-card__review-toggle svg { transition: transform 200ms; }
.tp-card__review-toggle--open svg { transform: rotate(180deg); }

/* Incentive Review Panel */
.tp-card__review {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms ease;
}
.tp-card__review--open {
  max-height: 5000px;
}

.tp-review {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: #fafbfc;
  padding: 12px;
}
.tp-review__header {
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.tp-review__live-badge {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--accent-rain);
  background: rgba(6,118,71,0.08);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
}

/* Individual incentive detail item */
.tp-review__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.tp-review__item:last-child { margin-bottom: 0; }
.tp-review__item-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.tp-review__id {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 6px;
}

/* Field grid */
.tp-review__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 12px;
}
.tp-review__field {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 3px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.tp-review__field-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.tp-review__field-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}
.tp-review__empty {
  color: #cbd5e1;
  font-weight: 400;
}
.tp-review__summary {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 6px;
  padding: 6px 0;
  border-top: 1px solid rgba(0,0,0,0.04);
}
.tp-review__link {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-water);
  display: inline-block;
  margin-top: 4px;
}

/* Active nav link */
.site-header__nav--active {
  color: var(--accent-water) !important;
  font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .tp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .tp-hero { padding: 4rem 1.5rem 3rem; }
  .tp-hero__stats { gap: 1.5rem; }
  .tp-controls__row { flex-direction: column; align-items: stretch; }
  .tp-sort { justify-content: flex-end; }
}
@media (max-width: 540px) {
  .tp-grid { grid-template-columns: 1fr; }
  .tp-hero__heading { font-size: 1.6rem; }
  .tp-hero__stats { gap: 1rem; }
  .tp-hero__stat-num { font-size: 1.3rem; }
}

/* ── Rainplan Team Card (dashboard, internal only) ─────────── */
.rp-team-card {
  background: #FFFFFF;
  border: 1px solid #E9EAEB;
  border-left: 3px solid var(--accent-water, #1570EF);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 1.5rem;
}
.rp-team-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #E9EAEB;
}
.rp-team-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1570EF, #137D5E);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.rp-team-card__title {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #181D27);
  margin: 0;
  flex: 1;
}
.rp-team-card__badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #535862;
  background: #F5F5F5;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rp-team-card__section {
  padding: 1.25rem 1.5rem;
}
.rp-team-card__section-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: #717680;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 1rem;
}
.rp-team-update {
  margin-bottom: 0;
}
.rp-team-update__date-bar {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  color: #717680;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #E9EAEB;
}
.rp-team-update__divider {
  border: none;
  border-top: 2px solid #E9EAEB;
  margin: 1.5rem 0;
}
.rp-team-block {
  margin-bottom: 1rem;
}
.rp-team-block:last-child { margin-bottom: 0; }
.rp-team-block__heading {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #181D27);
  margin: 0 0 0.4rem;
}
.rp-team-block__emoji {
  margin-right: 2px;
}
.rp-team-block__body {
  font-size: 0.9rem;
  color: var(--text-muted, #535862);
  line-height: 1.5;
  margin: 0 0 0.75rem;
}
.rp-team-block__divider {
  border: none;
  border-top: 1px dashed #E9EAEB;
  margin: 1.25rem 0;
}
.rp-team-block__section {
  margin-bottom: 0.75rem;
}
.rp-team-block__section:last-child { margin-bottom: 0; }
.rp-team-block__label {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary, #181D27);
  margin: 0 0 0.3rem;
}
.rp-team-block__text {
  font-size: 0.85rem;
  color: var(--text-muted, #535862);
  line-height: 1.5;
  margin: 0;
}
.rp-team-block__text code,
.rp-team-block__body code {
  background: rgba(21,112,239,0.08);
  color: #1570EF;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}
.rp-team-block__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rp-team-block__item {
  font-size: 0.85rem;
  color: var(--text-muted, #535862);
  line-height: 1.5;
  padding-left: 0.25rem;
}
.rp-team-block__item code {
  background: rgba(21,112,239,0.08);
  color: #1570EF;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}
.rp-team-card__section--tools {
  border-bottom: 1px solid #E9EAEB;
}
.rp-team-tool {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.rp-team-tool__info { flex: 1; }
.rp-team-tool__name {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #181D27);
  display: block;
  margin-bottom: 2px;
}
.rp-team-tool__desc {
  font-size: 0.8rem;
  color: #717680;
  line-height: 1.4;
}
.rp-team-tool__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.rp-team-tool__status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rp-team-tool__status--on { color: #067647; }
.rp-team-tool__status--off { color: #717680; }
.rp-team-tool__btn {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.rp-team-tool__btn--on {
  background: var(--accent-water, #1570EF);
  color: #fff;
}
.rp-team-tool__btn--on:hover { background: #1260d4; }
.rp-team-tool__btn--off {
  background: #F5F5F5;
  color: #535862;
}
.rp-team-tool__btn--off:hover { background: #E9EAEB; }
.rp-team-card__show-all {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: none;
  border: none;
  border-top: 1px solid #E9EAEB;
  color: #717680;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}
.rp-team-card__show-all:hover {
  color: var(--accent-water, #1570EF);
  background: rgba(21,112,239,0.04);
}

/* ────────────────────────────────────────────────────────────
   TOUCH ACTIVE STATES (tap feedback on mobile)
   ──────────────────────────────────────────────────────────── */
.cta-button:active,
.explorer-bar__cta:active,
.explorer-bar__stat--link:active,
.card:active,
.card--compact:active,
.entity-card:active,
.incentive-card:active,
.search-dropdown__item:active,
.search-dropdown__address-row:active,
.program-pill-tab:active,
.pagination__btn:not(:disabled):active,
.map-jump__btn:active,
.panel-close:active {
  transform: scale(0.98);
  transition: transform 80ms ease-out;
}

.card:active,
.entity-card:active,
.incentive-card:active,
.search-dropdown__item:active,
.search-dropdown__address-row:active {
  background: rgba(21, 112, 239, 0.06);
}

@media (max-width: 768px) {
  .rp-team-update__header {
    flex-direction: column;
    gap: 2px;
  }
}

/* ============================================================
   HEADER MENU (mobile hamburger, shared across all pages)
   ============================================================ */

.header-menu__btn {
  display: none; /* shown only at <=768px */
  background: transparent;
  border: 0;
  padding: 10px;
  margin: 0 -8px 0 0;
  cursor: pointer;
  color: var(--text-primary);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.header-menu__panel {
  position: fixed;
  top: 56px; /* fallback; JS sets inline top based on real header/bar height */
  left: 0;
  right: 0;
  z-index: 9001; /* below search dropdown (9999) + auth modal (10010) */
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
  padding-bottom: env(safe-area-inset-bottom);
}
.header-menu__panel:not([hidden]) {
  transform: translateY(0);
  opacity: 1;
}

.header-menu__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.28);
  z-index: 9000; /* below panel (9001) and search dropdown (9999) */
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.header-menu__backdrop:not([hidden]) { opacity: 1; }

.header-menu__panel-inner {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.header-menu__avatar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #F7F9FC;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  min-height: 64px;
}
.header-menu__avatar-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-water), var(--accent-rain));
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-family: var(--font-display);
}
.header-menu__avatar-text { flex: 1; min-width: 0; }
.header-menu__avatar-name { font-weight: 600; font-size: 0.95rem; }
.header-menu__avatar-email { font-size: 0.78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-menu__chevron { color: var(--text-muted); flex: 0 0 auto; }

.header-menu__divider {
  height: 1px; background: var(--border); margin: 0.5rem -1.25rem;
}

.header-menu__links { display: flex; flex-direction: column; }
.header-menu__link {
  display: block;
  padding: 0.9rem 0.25rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 44px;
  border-left: 3px solid transparent;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
}
.header-menu__link--active {
  color: var(--accent-water);
  border-left-color: var(--accent-water);
  background: rgba(21,112,239,0.04);
}

.header-menu__auth {
  display: flex; flex-direction: column; gap: 0.6rem;
  padding-top: 0.25rem;
}
.header-menu__login,
.header-menu__logout {
  height: 44px; border-radius: var(--radius-md);
  background: #FFFFFF; border: 1px solid var(--border);
  color: var(--text-primary); font-weight: 600; font-size: 0.9rem;
  cursor: pointer;
}
.header-menu__signup {
  height: 44px; border-radius: var(--radius-md);
  background: var(--accent-water); border: 0;
  color: #FFFFFF; font-weight: 600; font-size: 0.9rem;
  cursor: pointer;
}

.header-menu__link:focus-visible,
.header-menu__login:focus-visible,
.header-menu__logout:focus-visible,
.header-menu__signup:focus-visible,
.header-menu__avatar-row:focus-visible {
  outline: 2px solid var(--accent-water);
  outline-offset: 2px;
}

body.menu-open { overflow: hidden; }

/* -- Show hamburger + hide inline nav at <=768px ---------------- */
@media (max-width: 768px) {
  .header-menu__btn { display: inline-flex; }
  .site-header__nav { display: none; }
}
