@import url('/assets/css/bomforge-brand.css?v=20261011t');

/* Core Map Styles */

/* Patriotic USA Blue Theme */
:root {
  --usa-navy: #2f2d28;
  --usa-blue: #34322d;
  --usa-royal: #282621;
  --usa-sky: #42403b;
  --usa-bright: #f8f5ee;
  --usa-light: #fffff8;
  --usa-red: #bf0a30;
  --usa-white: #fffff8;

  /* Layout dimensions */
  --header-height: 48px;
  --sidebar-width: 400px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);

  /* z-index layers for fixed mobile UI */
  --z-bottom-sheet: 1000;
  --z-search-bar: 1100;
  --z-fab: 1500;
  --z-modal-backdrop: 1999;
  --z-modal: 2000;

  /* Bottom sheet snap positions (vh from bottom) */
  --snap-collapsed: 90;
  --snap-half: 35;
  --snap-full: 8;

  /* Gradient presets */
  --gradient-usa: linear-gradient(
    135deg,
    var(--usa-navy) 0%,
    var(--usa-royal) 50%,
    var(--usa-sky) 100%
  );
  --gradient-usa-bright: linear-gradient(
    135deg,
    var(--usa-blue) 0%,
    var(--usa-sky) 50%,
    var(--usa-bright) 100%
  );
  --gradient-usa-columns: linear-gradient(
    180deg,
    var(--usa-bright) 0%,
    var(--usa-royal) 50%,
    var(--usa-navy) 100%
  );
}

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

/* ============================================
   Global Focus States - WCAG 2.1 AA Compliance
   ============================================ */
:focus {
  outline: 2px solid var(--usa-bright);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--usa-bright);
  outline-offset: 2px;
}

/* High contrast focus for buttons */
button:focus-visible,
a:focus-visible,
[role='button']:focus-visible {
  outline: 2px solid #fffff8;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--usa-bright);
  color: #000;
  padding: 12px 24px;
  font-weight: 700;
  z-index: 10000;
  border-radius: 2px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

html {
  height: 100%;
  overflow: hidden;
}

@keyframes pulse {
  0% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.8;
  }
}

/* Cluster animations - pulsing glow for large clusters */
@keyframes cluster-pulse-glow {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.02);
    filter: brightness(1.1);
  }
}

@keyframes cluster-pulse-glow-md {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.03);
    filter: brightness(1.15);
  }
}

@keyframes cluster-pulse-glow-lg {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.04);
    filter: brightness(1.2);
  }
}

/* Cluster circle styling: clean, modern dot markers */
.cluster-circle,
.cluster-mosaic {
  cursor: pointer;
  overflow: visible !important;
  will-change: transform, opacity;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

.cluster-circle > div,
.cluster-mosaic > div {
  overflow: visible !important;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.cluster-circle:hover > div {
  transform: scale(1.12);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.45),
    0 0 0 3px rgba(255, 255, 255, 0.15) !important;
}

.cluster-mosaic:hover {
  filter: brightness(1.15) drop-shadow(0 4px 12px rgba(164, 162, 156, 0.4));
  z-index: 1000 !important;
}

/* Emoji cluster styling - no transform to prevent flicker */
.emoji-cluster {
  cursor: pointer;
  will-change: filter;
  transition: filter 0.15s ease;
}

.emoji-cluster > div {
  transition: box-shadow 0.15s ease;
}

.emoji-cluster:hover {
  filter: brightness(1.1);
  z-index: 1000 !important;
}

.emoji-cluster:hover > div {
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.5),
    0 0 0 2px rgba(188, 185, 179, 0.5) !important;
}

.emoji-cluster:active {
  filter: brightness(0.95);
}

.cluster-pulse-sm {
  animation: cluster-pulse-glow 3s ease-in-out infinite;
}

.cluster-pulse-md {
  animation: cluster-pulse-glow-md 2.5s ease-in-out infinite;
}

.cluster-pulse-lg {
  animation: cluster-pulse-glow-lg 2s ease-in-out infinite;
}

/* Hex grid tooltip - polished dark theme */
.hex-tooltip {
  background: rgba(26, 23, 19, 0.95) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(157, 154, 148, 0.3) !important;
  border-radius: 2px !important;
  padding: 10px 14px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
  color: #f7f4ee !important;
  font-family: 'Geist', 'Inter', sans-serif !important;
}

.hex-tooltip strong {
  font-size: 18px;
  color: #fffff8;
}

.hex-tooltip .hex-cities {
  margin: 6px 0;
  padding: 6px 0;
  border-top: 1px solid rgba(157, 154, 148, 0.2);
  font-size: 12px;
  line-height: 1.5;
}

.hex-tooltip .hex-cities div {
  color: #d7d3cd;
}

.hex-tooltip .hex-more {
  color: #a4a19b;
  font-style: italic;
}

/* County boundary tooltip */
.county-tooltip {
  background: rgba(26, 23, 19, 0.9) !important;
  border: 1px solid rgba(157, 154, 148, 0.25) !important;
  border-radius: 2px !important;
  padding: 4px 10px !important;
  color: #eae7e1 !important;
  font-family: 'Geist', 'Inter', sans-serif !important;
  font-size: 12px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Counties toggle button icon */
#countiesToggle::before {
  content: '\1F5FA';
}

/* Leaflet popup styles consolidated in Popup styles section below (line ~828) */

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  background: #110f0a;
  color: #eae6e0;
  height: 100vh;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  padding-top: var(--header-height);
  margin: 0;
}

#map {
  flex: 1;
  height: 100vh;
  background: #14120e;
  position: relative;
}

.leaflet-container {
  width: 100% !important;
  height: 100% !important;
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
}

/* Leaflet zoom controls: clean glass style */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  border-radius: 2px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: rgba(22, 20, 15, 0.88) !important;
  color: #eae7e1 !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  font-size: 16px !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.15s ease;
}

.leaflet-control-zoom a:hover {
  background: rgba(42, 39, 35, 0.95) !important;
  color: #fffff8 !important;
}

.leaflet-control-zoom a:last-child {
  border-bottom: none !important;
}

/* Leaflet attribution: minimal, subtle */
.leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.4) !important;
  color: rgba(255, 255, 255, 0.4) !important;
  font-size: 10px !important;
  padding: 2px 6px !important;
  border-radius: 2px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.leaflet-control-attribution a {
  color: rgba(255, 255, 255, 0.5) !important;
}

#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  flex-shrink: 0;
  background: rgba(14, 12, 8, 0.97);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  box-shadow:
    -1px 0 0 rgba(255, 255, 255, 0.03),
    -4px 0 24px rgba(0, 0, 0, 0.45);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1000;
  padding-bottom: 60px;
}

#sidebar.collapsed {
  transform: translateX(var(--sidebar-width));
  width: 0;
  min-width: 0;
}

.header {
  padding: 8px 12px 6px;
  background: rgba(22, 19, 15, 0.6);
  border-bottom: 1px solid rgba(188, 185, 179, 0.15);
  box-shadow: 0 1px 0 rgba(188, 185, 179, 0.05);
}

.header-nav {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.nav-link {
  color: #999690;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 2px;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: rgba(151, 148, 142, 0.1);
  color: #97948e;
}

.nav-link.active {
  background: rgba(151, 148, 142, 0.2);
  color: #97948e;
}

.header h1 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
  color: #f7f4ee;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 11px;
  color: #999690;
  font-weight: 500;
}

.header-subtitle span {
  color: #d7d3cd;
  font-weight: 600;
}

/* ============================================
   Compact Header (Space-optimized)
   ============================================ */
.header-compact {
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}

.header-compact::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.header-compact h1 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: #f7f4ee;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.header-stats {
  font-size: 11px;
  color: #75726d;
  font-weight: 500;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.header-stats span {
  color: #a4a19b;
  font-weight: 600;
}

/* ============================================
   Inline View Buttons (Header Row)
   ============================================ */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.header-row h1 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  color: #f7f4ee;
  line-height: 1.2;
}

.view-btns {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Scoped to .view-btns container to avoid conflicts with .view-controls .view-btn */
.view-btns .view-btn {
  height: 28px;
  min-width: 28px;
  flex: none;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #a4a19b;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.view-btns .view-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #eae7e1;
}

.view-btns .view-btn:active {
  transform: scale(0.95);
}

.view-btns .view-btn.active {
  background: #f8f5ee;
  border-color: #f8f5ee;
  color: #0c0a06;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.35);
}

/* Scope toggle (US / Global) */
.scope-toggle {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  padding: 2px;
  margin-right: 8px;
  flex-shrink: 0;
}

.scope-btn {
  height: 28px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #75726d;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.scope-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #a4a19b;
}

.scope-btn.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fffff8;
}

/* Hide old view section (deprecated) */
.view-mode-section-compact {
  display: none;
}

/* ============================================
   Compact View Mode Buttons (Icon-only) - Legacy
   ============================================ */
.view-mode-section-compact-legacy {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(68, 66, 61, 0.5);
}

.view-mode-buttons-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(25, 22, 18, 0.9);
  border-radius: 2px;
  padding: 6px;
  border: 1px solid rgba(117, 114, 109, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.view-mode-btn-icon {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(42, 39, 35, 0.7);
  border: 1px solid rgba(117, 114, 109, 0.2);
  border-radius: 2px;
  color: #a4a19b;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.view-mode-btn-icon .view-icon {
  font-size: 20px;
  line-height: 1;
}

.view-mode-btn-icon:hover {
  color: #eae7e1;
  background: rgba(117, 114, 109, 0.3);
  border-color: rgba(117, 114, 109, 0.4);
}

.view-mode-btn-icon:active {
  transform: scale(0.95);
}

.view-mode-btn-icon:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
  border-color: #f8f5ee;
}

.view-mode-btn-icon.active {
  background: linear-gradient(135deg, #aca9a3 0%, #928f8a 100%);
  border-color: rgba(205, 202, 196, 0.6);
  box-shadow: 0 2px 12px rgba(188, 185, 179, 0.4);
  color: #1e1c18;
}

.view-mode-btn-icon.active .view-icon {
  filter: brightness(0);
}

/* Dropdown for additional view modes */
.view-mode-dropdown-compact {
  position: relative;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid rgba(117, 114, 109, 0.3);
}

.view-mode-more-btn {
  background: rgba(42, 39, 35, 0.7);
  border-color: rgba(117, 114, 109, 0.3);
}

.view-mode-more-btn .view-icon {
  font-size: 18px;
  letter-spacing: 2px;
}

.view-mode-dropdown-menu-compact {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: rgba(25, 22, 18, 0.98);
  border: 1px solid rgba(117, 114, 109, 0.35);
  border-radius: 2px;
  padding: 6px;
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

.view-mode-dropdown-menu-compact.show {
  display: block;
}

.view-mode-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: 2px;
  color: #a4a19b;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.view-mode-dropdown-item:hover {
  background: rgba(117, 114, 109, 0.25);
  color: #eae7e1;
}

.view-mode-dropdown-item:active {
  background: rgba(117, 114, 109, 0.35);
}

.view-mode-dropdown-item.active {
  background: linear-gradient(135deg, #aca9a3 0%, #928f8a 100%);
  color: #100e09;
  font-weight: 600;
}

.stats {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.stat {
  flex: 1;
}

.stat-value {
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(135deg, #bf0a30 0%, #d4213f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 10px;
  color: #d7d3cd;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
  line-height: 1.2;
}

.filters {
  padding: 6px;
  border-bottom: 1px solid #44423d;
  flex-shrink: 0;
}

.filter-group {
  margin-bottom: 6px;
}

/* Collapsible filter sections */
.filter-section {
  border: 1px solid rgba(188, 185, 179, 0.15);
  border-radius: 2px;
  margin-bottom: 4px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.filter-section:hover {
  border-color: rgba(188, 185, 179, 0.25);
}

.filter-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  min-height: 44px;
  background: rgba(22, 19, 15, 0.6);
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  font-weight: 600;
  color: #d7d3cd;
  transition: all 0.2s ease;
}

.filter-section-header:hover {
  background: rgba(188, 185, 179, 0.08);
  color: #aca9a3;
}

.filter-section-header:active {
  background: rgba(188, 185, 179, 0.12);
}

/* Drag grip handle for reorderable sections */
.section-drag-grip {
  color: #484540;
  font-size: 12px;
  cursor: grab;
  margin-right: 6px;
  transition: color 0.15s;
  line-height: 1;
}

.filter-section-header:hover .section-drag-grip {
  color: #999690;
}

.filter-section.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.filter-section.drag-over {
  border-color: #f8f5ee !important;
  border-style: dashed;
}

.filter-section-toggle {
  transition: transform 0.3s ease;
  font-size: 10px;
  color: #75726d;
}

.filter-section.collapsed .filter-section-toggle {
  transform: rotate(-90deg);
}

.filter-section-content {
  padding: 6px 8px;
  max-height: 500px;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease,
    opacity 0.2s ease;
}

.filter-section.collapsed .filter-section-content {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.filter-section-content .view-mode-buttons {
  margin: 0;
}

/* View Grid - 4-column inline row for compact view switching */
.view-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.view-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  background: rgba(22, 19, 15, 0.7);
  border: 1px solid rgba(68, 66, 61, 0.5);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #999690;
}

.view-card:hover {
  background: rgba(172, 169, 163, 0.08);
  border-color: rgba(172, 169, 163, 0.4);
  color: #ebe8e2;
}

.view-card.active {
  background: rgba(172, 169, 163, 0.15);
  border-color: #aca9a3;
  color: #aca9a3;
}

.view-icon {
  font-size: 12px;
}

.view-label {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Sector Stats Grid - Compact 2-column grid */
.sector-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.sector-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 3px 6px;
  background: rgba(22, 19, 15, 0.7);
  border: 1px solid rgba(68, 66, 61, 0.4);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.12s ease;
  font-size: 9px;
  overflow: hidden;
}

.sector-stat-item:hover {
  background: rgba(172, 169, 163, 0.08);
  border-color: rgba(172, 169, 163, 0.4);
}

.sector-stat-item.active {
  background: rgba(172, 169, 163, 0.15);
  border-color: #aca9a3;
}

.sector-stat-item.active .sector-stat-name {
  color: #aca9a3;
}

.sector-stat-item.active .sector-stat-count {
  background: #aca9a3;
  color: #100e09;
}

.sector-stat-name {
  color: #ebe8e2;
  font-weight: 500;
  line-height: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sector-stat-count {
  flex-shrink: 0;
  min-width: 16px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(172, 169, 163, 0.2);
  color: #aca9a3;
  font-weight: 700;
  font-size: 9px;
  border-radius: 2px;
  padding: 0 4px;
}

.sector-stat-emoji {
  margin-right: 2px;
  font-size: 10px;
  line-height: 1;
}

.filter-label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: #d7d3cd;
  font-weight: 500;
}

.filter-select {
  width: 100%;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  color: #eae7e1;
  font-size: 13px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.filter-select:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.filter-select:focus {
  border-color: #f8f5ee;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.filter-select:focus-visible {
  border-color: #f8f5ee;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* State Page Link Button */
.state-page-link-container {
  animation: fadeIn 0.3s ease;
}

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

.search-input:focus {
  border-color: #f8f5ee;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.search-input:focus-visible {
  border-color: #f8f5ee;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.view-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.view-btn {
  flex: 1;
  padding: 10px 8px;
  background: rgba(43, 41, 36, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  color: #eae6e0;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.view-btn:hover {
  border-color: #f8f5ee;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-1px);
}

.view-btn.active {
  background: linear-gradient(135deg, #d7d4ce 0%, #f8f5ee 100%);
  border-color: #f8f5ee;
  color: #0c0a06;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
}

.mode-indicator {
  font-size: 11px;
  color: #999690;
  text-align: center;
  margin-bottom: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(22, 19, 15, 0.6);
  border: 1px solid rgba(68, 66, 61, 0.5);
  border-radius: 2px;
  border-left: 3px solid #97948e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.refresh-btn {
  background: #97948e;
  border: none;
  border-radius: 2px;
  color: white;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.refresh-btn:hover {
  background: #87847f;
  transform: translateY(-1px);
}

.refresh-btn:active {
  transform: translateY(0);
}

.refresh-btn.spinning .refresh-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.mode-text {
  flex: 1;
  text-align: left;
}

.chart-container {
  margin-top: 20px;
  padding: 15px;
  background: #211f1a;
  border: 1px solid #44423d;
  border-radius: 2px;
}

.chart-title {
  color: #eae6e0;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
}

.chart-canvas {
  max-height: 300px;
}

.submission-form {
  margin-top: 20px;
  padding: 15px;
  background: #211f1a;
  border: 1px solid #44423d;
  border-radius: 2px;
}

.form-title {
  color: #eae6e0;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center;
}

.form-group {
  margin-bottom: 15px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: #999690;
}

.form-input {
  width: 100%;
  padding: 8px;
  background: #34312c;
  border: 1px solid #44423d;
  border-radius: 2px;
  color: #eae6e0;
  font-size: 12px;
}

.form-input select {
  width: 100%;
  padding: 8px;
  background: #34312c;
  border: 1px solid #44423d;
  border-radius: 2px;
  color: #eae6e0;
  font-size: 12px;
  cursor: pointer;
}

.form-input:focus {
  border-color: #97948e;
}

.form-input:focus-visible {
  border-color: #97948e;
  box-shadow: 0 0 0 3px rgba(151, 148, 142, 0.3);
}

.form-textarea {
  width: 100%;
  padding: 8px;
  background: #34312c;
  border: 1px solid #44423d;
  border-radius: 2px;
  color: #eae6e0;
  font-size: 12px;
  resize: vertical;
  min-height: 60px;
}

.form-textarea:focus {
  border-color: #97948e;
}

.form-textarea:focus-visible {
  border-color: #97948e;
  box-shadow: 0 0 0 3px rgba(151, 148, 142, 0.3);
}

.submit-btn {
  width: 100%;
  padding: 10px;
  background: #97948e;
  border: none;
  border-radius: 2px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover {
  background: #87847f;
}

.submit-btn:disabled {
  background: #44423d;
  cursor: not-allowed;
}

/* Enhanced form styles */
.form-row {
  display: flex;
  gap: 10px;
}

.form-col-2 {
  flex: 1;
}

.field-error {
  color: #ff6a70;
  font-size: 11px;
  margin-top: 4px;
  min-height: 15px;
  display: block;
}

.field-hint {
  color: #999690;
  font-size: 11px;
  margin-top: 4px;
}

.form-input.error,
.form-textarea.error {
  border-color: #ff6a70;
}

.form-input.success,
.form-textarea.success {
  border-color: #b8b5af;
}

.form-message {
  padding: 12px;
  border-radius: 2px;
  margin-bottom: 15px;
  font-size: 13px;
}

.form-success {
  background: rgba(184, 181, 175, 0.15);
  border: 1px solid #b8b5af;
  color: #b8b5af;
}

.form-error {
  background: rgba(255, 106, 112, 0.15);
  border: 1px solid #ff6a70;
  color: #ff6a70;
}

.programs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.program-checkbox {
  display: flex;
  align-items: center;
  padding: 8px;
  background: #34312c;
  border: 1px solid #44423d;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 11px;
}

.program-checkbox:hover {
  border-color: #97948e;
  background: rgba(151, 148, 142, 0.1);
}

.program-checkbox input[type='checkbox'] {
  margin-right: 8px;
  cursor: pointer;
}

.program-checkbox input[type='checkbox']:checked + span {
  color: #97948e;
  font-weight: 600;
}

.recaptcha-notice {
  font-size: 10px;
  color: #999690;
  text-align: center;
  margin-bottom: 15px;
  line-height: 1.4;
}

.recaptcha-notice a {
  color: #97948e;
  text-decoration: none;
}

.recaptcha-notice a:hover {
  text-decoration: underline;
}

.school-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

/* ============================================
   Entity Card — grid layout: icon | text
   ============================================ */
.school-card {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  cursor: pointer;
  transition:
    background 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border-left: 2px solid transparent;
}

.school-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: #f8f5ee;
}

.school-card:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: -2px;
}

.school-card:last-child {
  border-bottom: none;
}

/* Card body: two-column grid — icon | text */
.card-body {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0 10px;
  align-items: start;
}

/* When no favicon, collapse to single column */
.school-card:not(.has-icon) .card-body {
  display: block;
}

.card-icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.card-icon.no-icon {
  display: none;
}

/* When icon fails to load, text spans full width */
.card-icon.no-icon + .card-text {
  grid-column: 1 / -1;
}

.school-card-favicon {
  width: 20px;
  height: 20px;
  border-radius: 2px;
  object-fit: contain;
  display: block;
}

.card-text {
  min-width: 0;
}

.school-name {
  font-size: 13px;
  font-weight: 600;
  color: #eae7e1;
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: anywhere;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.school-card:hover .school-name {
  color: #fdf9f3;
}

.school-location {
  font-size: 11.5px;
  color: #75726d;
  line-height: 1.3;
  margin-top: 2px;
}

.card-meta {
  font-size: 11px;
  color: #84817c;
  margin-top: 3px;
  line-height: 1.3;
}

.card-enrich {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.card-program-count {
  font-size: 11px;
  color: #a4a19b;
}

.card-va-badge {
  font-size: 10px;
  font-weight: 600;
  color: #a8a59f;
  background: rgba(168, 165, 159, 0.1);
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

/* Compare button: positioned top-right, visible on hover */
.school-card .compare-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 2px;
  border: 1px solid rgba(117, 114, 109, 0.3);
  background: rgba(43, 40, 36, 0.8);
  color: #a4a19b;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
    opacity 0.15s,
    background 0.15s;
}

.school-card:hover .compare-btn {
  opacity: 1;
}

.school-card .compare-btn.active {
  opacity: 1;
  background: rgba(164, 162, 156, 0.2);
  border-color: rgba(164, 162, 156, 0.4);
  color: #a4a29c;
}

.detail-panel-favicon {
  width: 22px;
  height: 22px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 8px;
  flex-shrink: 0;
}

/* Legacy compat */
.school-meta {
  font-size: 11px;
  color: #84817c;
  margin-top: 2px;
  line-height: 1.3;
}

.school-programs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.program-tag {
  background: rgba(255, 255, 255, 0.1);
  color: #fffff8;
  padding: 2px 7px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.program-tag:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.school-contact {
  font-size: 12px;
  color: #75726d;
  display: flex;
  align-items: center;
  gap: 6px;
}

.school-contact a,
.contact-item a {
  color: #75726d;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* UEI/CAGE code links - allow breaking on mobile */
.school-card a[href*='sam.gov'] {
  word-break: break-all;
  white-space: normal;
  max-width: 100%;
  display: inline-block;
}

.school-contact a:hover,
.contact-item a:hover {
  color: #97948e;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #999690;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: #999690;
  font-size: 16px;
  font-weight: 500;
}

.loading::after {
  content: '...';
  animation: loadingDots 1.5s infinite;
}

.loading:has(.spinner)::after {
  content: none;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #34312c;
  border-top-color: #a2a09a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes loadingDots {
  0%,
  20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%,
  100% {
    content: '...';
  }
}

.user-location-marker {
  background: none;
  border: none;
  font-size: 30px;
  text-align: center;
  line-height: 30px;
  animation: bounce 1s infinite;
}

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

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #999690;
  background: rgba(151, 148, 142, 0.05);
  border-radius: 2px;
  margin: 20px;
  border: 1px solid rgba(151, 148, 142, 0.2);
}

.viewport-cap-hint {
  text-align: center;
  padding: 10px 16px;
  font-size: 12px;
  color: #75726d;
  background: rgba(117, 114, 109, 0.08);
  border-top: 1px solid rgba(117, 114, 109, 0.15);
}

/* Teaser mode for logged-out users */
.teaser-card {
  position: relative;
}

.teaser-blur-overlay {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(68, 66, 61, 0.3);
}

.teaser-blur-content {
  margin-bottom: 4px;
}

.blurred-text {
  color: #75726d;
  font-size: 13px;
}

.teaser-unlock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #97948e;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  margin-top: 6px;
  padding: 6px 0;
  transition: color 0.2s;
}

.teaser-unlock-btn:hover {
  color: #fffff8;
  text-decoration: underline;
}

/* Map markers */
.school-marker {
  background: #97948e;
  border: 2px solid white;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.school-marker.selected {
  background: #ff6a70;
  width: 16px;
  height: 16px;
  box-shadow: 0 0 0 4px rgba(255, 106, 112, 0.2);
}

/* Popup styles */
.leaflet-popup-content-wrapper {
  background: rgba(22, 20, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.5);
}

.leaflet-popup-content {
  margin: 14px;
  color: #eae6e0;
  min-width: 200px;
  max-width: 300px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.leaflet-popup-tip {
  background: rgba(22, 20, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.popup-favicon {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  object-fit: contain;
  background: white;
  padding: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.popup-title {
  font-size: 15px;
  font-weight: 600;
  color: #97948e;
  flex: 1;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Emoji marker styles: clean, modern pin design */
.emoji-marker {
  background: none !important;
  border: none !important;
  font-size: 24px;
  text-align: center;
  line-height: 24px;
  cursor: pointer;
  transition:
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.2s ease;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 24px !important;
  height: 24px !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.emoji-marker:hover {
  transform: scale(1.25) translateY(-2px);
  filter: drop-shadow(0 3px 8px rgba(255, 255, 255, 0.5)) brightness(1.05);
  z-index: 10000 !important;
}

.emoji-marker img {
  object-fit: contain;
  width: 24px !important;
  height: 24px !important;
  display: block !important;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Showcase mode - larger markers for curated collections (< 100 entities) */
.showcase-mode .emoji-marker {
  width: 36px !important;
  height: 36px !important;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5));
}

.showcase-mode .emoji-marker img {
  width: 36px !important;
  height: 36px !important;
  border-radius: 2px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(255, 255, 255, 0.1);
  background: #1e1c18;
}

.showcase-mode .emoji-marker:hover {
  transform: scale(1.3) translateY(-4px);
  filter: drop-shadow(0 6px 20px var(--usa-bright, #f8f5ee)) brightness(1.15);
}

.showcase-mode .emoji-marker:hover img {
  box-shadow:
    0 8px 24px rgba(164, 162, 156, 0.5),
    0 0 0 3px rgba(164, 162, 156, 0.3);
}

/* CRITICAL: Ensure emoji-marker divs are visible - show ALL favicons */
.leaflet-div-icon.emoji-marker {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: transparent !important;
}

/* Show our custom cluster-mosaic markers (Leaflet adds leaflet-marker-cluster class) */
.leaflet-marker-cluster.cluster-mosaic,
.leaflet-marker-cluster .cluster-mosaic {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Hide default blue cluster dots (but not our custom ones) */
.leaflet-marker-cluster:not(.cluster-mosaic) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Spiderfy legs - styled for dark theme */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
  transition:
    transform 0.25s ease-out,
    opacity 0.25s ease-out;
}

/* Spider leg lines connecting cluster center to spread markers */
svg.leaflet-zoom-animated g path.leaflet-interactive {
  stroke: rgba(164, 162, 156, 0.6) !important;
  stroke-width: 2px !important;
  stroke-dasharray: 4, 4;
}

/* Spiderfied marker hover state */
.leaflet-marker-icon.leaflet-interactive:hover {
  z-index: 10000 !important;
}

/* DON'T hide our custom markers - Leaflet divIcon markers need to be visible */
/* Only hide cluster markers specifically */

/* Hide cluster divs that might be showing blue circles */
.marker-cluster,
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  display: none !important;
  visibility: hidden !important;
}

/* CRITICAL: Ensure our favicon markers are ALWAYS visible */
.leaflet-div-icon.emoji-marker,
.leaflet-marker-icon.emoji-marker {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: transparent !important;
}

/* Ensure the div inside the marker icon is visible */
.emoji-marker,
.emoji-marker img,
.emoji-marker div {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* CRITICAL: Ensure our favicon markers are ALWAYS visible */
.leaflet-div-icon.emoji-marker {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: transparent !important;
}

/* Make sure Leaflet doesn't hide our divIcon markers */
.leaflet-marker-icon.leaflet-div-icon {
  display: block !important;
  visibility: visible !important;
}

/* Ensure all divIcon markers are visible (not just emoji-marker) */
.leaflet-div-icon {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Force marker pane to be visible */
.leaflet-marker-pane {
  z-index: 600 !important;
}

/* Ensure marker icons are visible in the marker pane */
.leaflet-marker-pane .leaflet-marker-icon {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure the div inside the marker icon is visible */
.emoji-marker,
.emoji-marker img,
.emoji-marker div {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Expanded marker state */
.emoji-marker.expanded {
  transform: scale(1.8);
  filter: drop-shadow(0 0 12px var(--usa-bright, #f8f5ee));
  z-index: 10000 !important;
}

.emoji-marker.expanded::after {
  content: '';
  position: absolute;
  width: 48px;
  height: 48px;
  border: 3px solid var(--usa-bright, #f8f5ee);
  border-radius: 50%;
  animation: expandPulse 1.5s ease-out infinite;
  pointer-events: none;
}

@keyframes expandPulse {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Nearby markers expansion ring */
.nearby-ring {
  position: absolute;
  border: 2px dashed var(--usa-bright, #f8f5ee);
  border-radius: 50%;
  pointer-events: none;
  animation: ringPulse 2s ease-in-out infinite;
}

@keyframes ringPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

/* Hex label styles */
.hex-label {
  z-index: 1000 !important;
  pointer-events: none;
}

/* 3D Column marker styles - Manhattan Population Explorer style */
.column-marker {
  background: none !important;
  border: none !important;
  overflow: visible !important;
}

.column-3d {
  transition:
    transform 0.2s ease-out,
    filter 0.2s ease-out;
}

.column-marker:hover .column-3d {
  transform: rotateX(-25deg) rotateY(-35deg) scale(1.2) translateY(-10px) !important;
  filter: brightness(1.2) drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5)) !important;
  z-index: 9999 !important;
}

/* Ensure hover works on the icon wrapper too */
.leaflet-marker-icon.column-marker {
  overflow: visible !important;
  z-index: auto !important;
}

.leaflet-marker-icon.column-marker:hover {
  z-index: 10000 !important;
}

/* Column popup styling */
.column-popup .leaflet-popup-content-wrapper {
  background: rgba(22, 20, 16, 0.98) !important;
  border: 2px solid rgba(184, 181, 175, 0.6) !important;
  border-radius: 2px !important;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(184, 181, 175, 0.2) !important;
}

.column-popup .leaflet-popup-tip {
  background: rgba(22, 20, 16, 0.98) !important;
  border-color: rgba(184, 181, 175, 0.6) !important;
}

.column-popup .leaflet-popup-content {
  margin: 16px !important;
}

.custom-popup .leaflet-popup-content-wrapper {
  background: #211f1a;
  border: 2px solid #97948e;
  box-shadow: 0 4px 20px rgba(151, 148, 142, 0.3);
}

.custom-popup .leaflet-popup-tip {
  background: #211f1a;
  border: 2px solid #97948e;
}

/* Sidebar toggle - integrated into header navigation */
.sidebar-toggle {
  display: none; /* Hidden by default - shown on mobile only */
}

/* Mobile floating toggle (shown on mobile only) */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: flex;
    position: fixed;
    top: 70px;
    right: 16px;
    background: rgba(22, 19, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    padding: 10px 14px;
    min-width: 44px;
    min-height: 44px;
    z-index: 2005;
    cursor: pointer;
    font-size: 20px;
    color: #fffff8;
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
  }

  .sidebar-toggle:hover,
  .sidebar-toggle:active {
    background: rgba(151, 148, 142, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fffff8;
  }

  /* Mobile view buttons - larger touch targets (WCAG AA 44px) */
  .view-btns .view-btn {
    height: 44px;
    min-width: 44px;
    padding: 0 12px;
    font-size: 14px;
  }

  /* Adjust header row for mobile */
  .header-row h1 {
    font-size: 14px;
  }
}

.sidebar-overlay {
  display: none;
}

.floating-submit {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #97948e;
  border: none;
  border-radius: 2px;
  padding: 16px 28px;
  z-index: 1001;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: white;
  box-shadow: 0 6px 20px rgba(151, 148, 142, 0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(151, 148, 142, 0.6);
}

.stats-badge {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(16, 14, 9, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  padding: 10px 14px;
  z-index: 1000;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.4);
  display: none;
  cursor: grab;
  transition:
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.stats-badge.dragging {
  cursor: grabbing;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  transition: none;
}

.stats-badge:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

/* Show stats badge when sidebar is collapsed */
#sidebar.collapsed ~ .stats-badge,
body:has(#sidebar.collapsed) .stats-badge {
  display: block;
}

.stats-badge-content {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
}

.stats-badge-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stats-badge-value {
  font-size: 17px;
  font-weight: 700;
  color: #f7f4ee;
  font-variant-numeric: tabular-nums;
}

.stats-badge-label {
  font-size: 11px;
  color: #75726d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* Stats Badge Header with Total Count */
.stats-badge-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #44423d;
}

.stats-badge-total {
  font-size: 24px;
  font-weight: 800;
  color: #f7f4ee;
  line-height: 1;
}

.stats-badge-title {
  font-size: 11px;
  color: #999690;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Subscribe CTA Button */
.stats-badge-cta {
  display: block;
  margin-top: 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #aca9a3 0%, #928f8a 100%);
  color: #000;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(188, 185, 179, 0.3);
}

.stats-badge-cta:hover {
  background: linear-gradient(135deg, #c1beb8 0%, #aca9a3 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(188, 185, 179, 0.4);
}

/* ============================================
   NEW Opportunities Banner - Prominent CTA
   ============================================ */
.opportunities-banner {
  background: linear-gradient(135deg, rgba(172, 169, 163, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
  border: 1px solid rgba(172, 169, 163, 0.4);
  border-radius: 2px;
  padding: 16px;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}

.opportunities-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #aca9a3, #f8f5ee, #aca9a3);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

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

.opportunities-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #aca9a3 0%, #b6b3ad 100%);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 10px;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(172, 169, 163, 0.4);
  }
  50% {
    box-shadow: 0 0 16px rgba(172, 169, 163, 0.7);
  }
}

.opportunities-badge::before {
  content: '★';
  font-size: 12px;
}

.opportunities-title {
  font-size: 16px;
  font-weight: 700;
  color: #fdf9f3;
  margin-bottom: 6px;
  line-height: 1.3;
}

.opportunities-subtitle {
  font-size: 13px;
  color: #a4a19b;
  margin-bottom: 14px;
  line-height: 1.4;
}

.opportunities-cta-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.opportunities-cta {
  flex: 1;
  min-width: 100px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.opportunities-cta.buyer {
  background: linear-gradient(135deg, #f8f5ee 0%, #d7d4ce 100%);
  color: #0c0a06;
  border: none;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.opportunities-cta.buyer:hover {
  background: linear-gradient(135deg, #fffff8 0%, #f8f5ee 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.4);
}

.opportunities-cta.supplier {
  background: linear-gradient(135deg, #aca9a3 0%, #928f8a 100%);
  color: #000;
  border: none;
  box-shadow: 0 2px 8px rgba(172, 169, 163, 0.3);
}

.opportunities-cta.supplier:hover {
  background: linear-gradient(135deg, #cdcac4 0%, #aca9a3 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(172, 169, 163, 0.4);
}

.opportunities-cta::after {
  content: '→';
  font-size: 14px;
  transition: transform 0.2s ease;
}

.opportunities-cta:hover::after {
  transform: translateX(3px);
}

/* Matching stats highlight */
.opportunities-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.opportunities-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.opportunities-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #aca9a3;
}

.opportunities-stat-label {
  font-size: 10px;
  color: #75726d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   Trust/Credibility Badges
   For DoD, Government, Enterprise visibility
   ============================================ */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a4a19b;
}

.trust-badge.gov {
  background: rgba(47, 45, 40, 0.3);
  border-color: rgba(47, 45, 40, 0.5);
  color: #fffff8;
}

.trust-badge.gov::before {
  content: 'GOV';
  font-size: 10px;
}

.trust-badge.verified {
  background: rgba(168, 165, 159, 0.15);
  border-color: rgba(168, 165, 159, 0.3);
  color: #c0bdb7;
}

.trust-badge.verified::before {
  content: '✓';
  font-weight: 800;
}

.trust-badge.secure {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fffff8;
}

.trust-badge.secure::before {
  content: 'SEC';
  font-size: 10px;
}

/* Government-grade data disclaimer */
.gov-data-notice {
  font-size: 10px;
  color: #75726d;
  line-height: 1.4;
  padding: 8px;
  background: rgba(47, 45, 40, 0.1);
  border-radius: 2px;
  border-left: 3px solid rgba(47, 45, 40, 0.5);
  margin-top: 12px;
}

.gov-data-notice strong {
  color: #fffff8;
}

/* ============================================
   Selected Entity Detail Panel
   COMPACT: Fixed max-height, no flex expansion
   ============================================ */
.selected-school-panel {
  padding: 12px;
  background: rgba(43, 40, 36, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 2px solid #f8f5ee;
  border-radius: 2px;
  margin: 0 12px 12px;
  display: none;
  max-height: 180px;
  overflow-y: auto;
  animation: slideInPanel 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.selected-school-panel.visible {
  display: block;
}

.selected-school-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.selected-school-title {
  font-size: 15px;
  font-weight: 600;
  color: #fdf9f3;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-school-close {
  background: transparent;
  border: none;
  color: #75726d;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.selected-school-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fdf9f3;
}

.selected-school-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: opacity 0.2s ease;
}

/* Clean metadata lines */
.selected-school-meta {
  font-size: 12px;
  color: #a4a19b;
  line-height: 1.4;
}

.selected-school-meta a {
  color: #fffff8;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

.selected-school-meta a:hover {
  text-decoration-color: #fffff8;
}

/* Detail badges row (CAGE, NAICS, entity type, status) */
.detail-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.detail-badge-cage {
  background: rgba(255, 255, 255, 0.15);
  color: #fffff8;
}

.detail-badge-naics {
  background: rgba(132, 129, 124, 0.15);
  color: #a4a19b;
}

.detail-badge-type {
  background: rgba(164, 161, 155, 0.1);
  color: #a4a19b;
}

.detail-badge-active {
  background: rgba(160, 157, 151, 0.15);
  color: #a09d97;
}

.detail-badge-inactive {
  background: rgba(236, 70, 84, 0.1);
  color: #ec4654;
}

/* Category tags row */
.detail-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0;
}

.detail-category-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 10px;
  color: #999690;
  background: rgba(68, 66, 61, 0.3);
  border: 1px solid rgba(68, 66, 61, 0.5);
}

/* CAGE enrichment section */
.cage-enrichment {
  margin-top: 6px;
}

.cage-enrichment-loading {
  font-size: 10px;
  color: #75726d;
  font-style: italic;
}

.cage-enrichment-data {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.cage-enrichment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
}

.cage-label {
  color: #75726d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'JetBrains Mono', monospace;
}

.cage-value {
  color: #a4a19b;
}

.cage-value.cage-active {
  color: #a09d97;
  font-weight: 600;
}

.cage-value.cage-inactive {
  color: #ec4654;
}

/* Description as readable paragraph */
.selected-school-description {
  font-size: 12px;
  color: #a4a19b;
  line-height: 1.4;
  margin: 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Key people - subtle */
.selected-school-people {
  font-size: 13px;
  color: #75726d;
  font-style: italic;
  margin-top: 4px;
}

/* Legacy support */
.selected-school-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: #d7d3cd;
  line-height: 1.5;
  padding: 4px 0;
}

.selected-school-info-item > span:first-child {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  opacity: 0.7;
}

.selected-school-info-item a {
  color: #fffff8;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.selected-school-info-item a:hover {
  border-bottom-color: #fffff8;
}

/* Program tags - subtle, scannable */
.selected-school-programs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.selected-school-programs-list .program-tag {
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  font-size: 11px;
  color: #fffff8;
  cursor: pointer;
  transition: all 0.15s;
}

.selected-school-programs-list .program-tag:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Action links - inline, minimal */
.selected-school-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

/* Action links as prominent buttons */
.selected-school-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fdf9f3;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.15) 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.selected-school-link:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.25) 100%);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
  color: #fffff8;
}

.selected-school-link:active {
  transform: translateY(0);
}

/* Primary action (Website) gets gold accent */
.selected-school-link:first-child {
  background: linear-gradient(135deg, rgba(172, 169, 163, 0.25) 0%, rgba(146, 143, 138, 0.2) 100%);
  border-color: rgba(172, 169, 163, 0.5);
}

.selected-school-link:first-child:hover {
  background: linear-gradient(135deg, rgba(172, 169, 163, 0.4) 0%, rgba(146, 143, 138, 0.35) 100%);
  border-color: rgba(205, 202, 196, 0.7);
  box-shadow: 0 4px 12px rgba(172, 169, 163, 0.3);
}

/* Close button - minimal */
.selected-school-close-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #56544e;
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.15s;
}

.selected-school-close-btn:hover {
  color: #a4a19b;
}

/* Legacy button support */
.selected-school-btn {
  flex: 1;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  color: #eae7e1;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.selected-school-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.selected-school-btn.secondary {
  flex: 0 0 auto;
  padding: 10px;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  color: #a4a19b;
}

.selected-school-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #d7d3cd;
}

/* Collapsible sections - ultra compact */
.selected-school-section {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.selected-school-section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  color: #75726d;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  transition: color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.selected-school-section-header:hover {
  color: #a4a19b;
}

/* Teaser lock panel - COMPACT */
.teaser-panel-overlay {
  margin-top: 8px;
  padding: 10px;
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(159, 156, 150, 0.08) 0%, rgba(159, 156, 150, 0.04) 100%);
  border: 1px solid rgba(159, 156, 150, 0.2);
}

.teaser-panel-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.teaser-panel-icon {
  width: 32px;
  height: 32px;
  border-radius: 2px;
  background: rgba(159, 156, 150, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-secondary, #9f9c96);
  flex-shrink: 0;
}

.teaser-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #ebe8e2);
  margin: 0;
}

.teaser-panel-text {
  font-size: 11px;
  color: var(--text-secondary, #999690);
  line-height: 1.3;
  display: none; /* Hide on mobile - too verbose */
}

.teaser-panel-btn,
a.teaser-panel-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 2px;
  background: var(--color-secondary, #9f9c96);
  color: #fffff8;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.teaser-panel-btn:hover,
a.teaser-panel-btn:hover {
  background: var(--color-secondary-hover, #827f79);
  color: #fffff8;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(151, 148, 142, 0.3);
}

.section-toggle-icon {
  font-size: 12px;
  color: #999690;
  transition: transform 0.2s;
}

.selected-school-section-content {
  max-height: 150px;
  overflow: hidden;
  transition: max-height 0.2s ease;
  padding-top: 4px;
}

.selected-school-section-content.collapsed {
  max-height: 0;
  padding-top: 0;
  overflow: hidden;
}

/* Nearby list - clean table-like layout */
.nearby-schools-header {
  font-size: 13px;
  font-weight: 500;
  color: #a4a19b;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nearby-schools-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nearby-school-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.15s;
}

.nearby-school-item:last-child {
  border-bottom: none;
}

.nearby-school-item:hover {
  background: rgba(255, 255, 255, 0.02);
  margin: 0 -8px;
  padding: 10px 8px;
  border-radius: 2px;
}

.nearby-school-item:hover .nearby-school-name {
  color: #fdf9f3;
}

.nearby-school-name {
  flex: 1;
  font-size: 13px;
  color: #d7d3cd;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearby-school-distance {
  font-size: 12px;
  font-weight: 500;
  color: #fffff8;
  white-space: nowrap;
  flex-shrink: 0;
}

.nearby-schools-divider {
  margin: 16px 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Nearby preview - inline sparkline style */
.nearby-schools-preview {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nearby-school-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: #a4a19b;
  cursor: pointer;
  transition: color 0.15s;
}

.nearby-school-preview-item:hover {
  color: #d7d3cd;
}

.preview-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-distance {
  font-size: 12px;
  color: #fffff8;
  font-weight: 500;
  white-space: nowrap;
}

/* Expand prompt */
.preview-more {
  cursor: pointer;
  padding: 8px 0;
  margin-top: 4px;
  text-align: left;
  font-size: 12px;
  color: #75726d;
  transition: color 0.15s;
}

.preview-more:hover {
  color: #a4a19b;
}

/* Hide nearby section by default - saves space */
.nearby-schools-section {
  display: none;
}

/* Show/hide preview based on data-state */
.selected-school-section[data-state='collapsed'] .nearby-schools-preview {
  display: flex;
}

.selected-school-section[data-state='expanded'] .nearby-schools-preview {
  display: none;
}

/* Show/hide full list based on data-state */
.selected-school-section[data-state='collapsed'] .selected-school-section-content {
  max-height: 0;
  overflow: hidden;
}

.selected-school-section[data-state='expanded'] .selected-school-section-content {
  max-height: 150px;
  overflow: visible;
}

/* Tooltip styles */
.tooltip-trigger {
  position: relative;
  cursor: help;
}

.tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: rgba(33, 31, 26, 0.98);
  color: #f7f4ee;
  font-size: 12px;
  border-radius: 2px;
  border: 1px solid #44423d;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tooltip-trigger:hover .tooltip {
  opacity: 1;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(33, 31, 26, 0.98);
}

/* CTA Button Group */
.cta-button-group {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1001;
}

.cta-button {
  background: #97948e;
  border: none;
  border-radius: 2px;
  padding: 14px 20px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(151, 148, 142, 0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(151, 148, 142, 0.6);
}

.cta-button.secondary {
  background: #b8b5af;
  box-shadow: 0 6px 20px rgba(184, 181, 175, 0.4);
}

.cta-button.secondary:hover {
  box-shadow: 0 8px 24px rgba(184, 181, 175, 0.6);
}

.legend-toggle:hover {
  background: #97948e;
  border-color: #97948e;
}

/* Mobile close button - hidden on desktop */
.mobile-close-btn {
  display: none;
}

/* Data Summary Widget */
.data-summary {
  padding: 15px;
  background: var(--gradient-usa);
  border-radius: 2px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(47, 45, 40, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.data-summary-title {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 600;
}

.data-summary-main {
  font-size: 24px;
  color: white;
  font-weight: bold;
  margin-bottom: 8px;
  line-height: 1.2;
}

.data-summary-programs {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.data-summary-programs strong {
  font-weight: 600;
}

.data-summary-programs .clickable-program {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  transition: all 0.2s;
  padding: 2px 4px;
  border-radius: 2px;
}

.data-summary-programs .clickable-program:hover {
  background: rgba(255, 255, 255, 0.2);
  text-decoration-style: solid;
}

/* Accordion Form Sections */
.form-section {
  margin-bottom: 12px;
  border: 1px solid #44423d;
  border-radius: 2px;
  overflow: hidden;
  background: #282521;
}

.form-section-header {
  padding: 12px 15px;
  background: #34312c;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  user-select: none;
}

.form-section-header:hover {
  background: #3f3d38;
}

.form-section-header.active {
  background: #97948e;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #eae6e0;
}

.form-section-header.active .form-section-title {
  color: white;
}

.form-section-badge {
  background: rgba(151, 148, 142, 0.2);
  color: #97948e;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 600;
}

.form-section-header.active .form-section-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.form-section-toggle {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.form-section-header.active .form-section-toggle {
  transform: rotate(180deg);
}

.form-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.form-section-content.active {
  max-height: 1000px;
}

.form-section-body {
  padding: 15px;
}

/* Multi-select Dropdown */
.multiselect-container {
  position: relative;
}

.multiselect-selected {
  width: 100%;
  padding: 10px;
  background: #34312c;
  border: 1px solid #44423d;
  border-radius: 2px;
  color: #eae6e0;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
}

.multiselect-selected:hover {
  border-color: #97948e;
}

.multiselect-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
}

.multiselect-tag {
  background: #97948e;
  color: white;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.multiselect-tag-remove {
  cursor: pointer;
  font-weight: bold;
  opacity: 0.8;
}

.multiselect-tag-remove:hover {
  opacity: 1;
}

.multiselect-placeholder {
  color: #999690;
}

.multiselect-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #211f1a;
  border: 1px solid #97948e;
  border-radius: 2px;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: none;
}

.multiselect-dropdown.active {
  display: block;
}

.multiselect-search {
  padding: 10px;
  border-bottom: 1px solid #44423d;
  position: sticky;
  top: 0;
  background: #211f1a;
}

.multiselect-search input {
  width: 100%;
  padding: 8px;
  background: #34312c;
  border: 1px solid #44423d;
  border-radius: 2px;
  color: #eae6e0;
  font-size: 12px;
}

.multiselect-search input:focus {
  outline: none;
  border-color: #97948e;
}

.multiselect-options {
  padding: 8px;
}

.multiselect-option {
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 2px;
  font-size: 12px;
  color: #eae6e0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.multiselect-option:hover {
  background: #34312c;
}

.multiselect-option.selected {
  background: rgba(151, 148, 142, 0.2);
  color: #97948e;
  font-weight: 600;
}

.multiselect-option input[type='checkbox'] {
  margin: 0;
  cursor: pointer;
}

/* Required Field Indicator */
.required-indicator {
  color: #ff6a70;
  font-weight: bold;
  margin-left: 2px;
}

.form-label.required::after {
  content: ' *';
  color: #ff6a70;
}

/* Sticky Submit Button (Mobile) */
.submit-btn-container {
  position: relative;
}

@media (max-width: 768px) {
  #statePageLink {
    padding: 14px !important;
    font-size: 16px !important;
  }
  .submit-btn-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: auto;
    z-index: var(--z-fab);
    padding: 0;
  }

  .submit-btn {
    width: auto;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(151, 148, 142, 0.4);
    font-size: 14px;
    padding: 14px 28px;
  }

  .form-section-content.active {
    max-height: 2000px;
  }

  /* Mobile sidebar improvements */
  #sidebar {
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #sidebar .header {
    padding: 12px 14px;
    position: sticky;
    top: 0;
    background: rgba(20, 18, 13, 0.98);
    z-index: 10;
    border-bottom: 1px solid rgba(188, 185, 179, 0.15);
  }

  #sidebar .header h1 {
    font-size: 15px;
    line-height: 1.2;
  }

  #sidebar .header-subtitle {
    font-size: 11px;
  }

  /* Compact filter sections on mobile */
  .filter-section {
    margin-bottom: 6px;
  }

  .filter-section-header {
    padding: 10px 12px;
    font-size: 12px;
  }

  .filter-section-content {
    padding: 10px;
  }

  /* Smaller filter chips on mobile */
  .filter-chip {
    padding: 6px 10px;
    font-size: 11px;
  }

  /* Compact school cards on mobile */
  .school-card {
    padding: 10px 12px;
  }

  .school-name {
    font-size: 13px;
  }

  .school-location {
    font-size: 11px;
  }

  /* View mode buttons compact on mobile */
  .view-mode-buttons {
    gap: 4px;
  }

  .view-mode-btn {
    padding: 8px 10px;
    font-size: 11px;
  }
}

/* School Card Actions */
.school-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(68, 66, 61, 0.5);
  margin-top: auto;
}

.action-btn {
  flex: 1;
  background: rgba(151, 148, 142, 0.15);
  color: #97948e;
  border: 1px solid rgba(151, 148, 142, 0.3);
  border-radius: 2px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
}

.action-btn:hover {
  background: #97948e;
  color: white;
  border-color: #97948e;
}

.action-btn.primary {
  background: #97948e;
  color: white;
  border-color: #97948e;
}

.action-btn.primary:hover {
  background: #87847f;
  border-color: #87847f;
}

/* Filter Icons */
.filter-label-with-icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-icon {
  font-size: 14px;
}

/* Clean Sidebar Styles */
.filter-group.search-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
}

.search-container {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-container .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #75726d;
  pointer-events: none;
  z-index: 1;
  width: 14px;
  height: 14px;
}

.search-container .search-icon:empty::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
}

.search-input {
  width: 100%;
  padding: 9px 10px 9px 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  color: #eae7e1;
  font-size: 13px;
  box-sizing: border-box;
  transition:
    border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.search-input::placeholder {
  color: #56544e;
  font-weight: 400;
}

.geolocation-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  background: rgba(188, 185, 179, 0.08);
  border: 1px solid rgba(188, 185, 179, 0.25);
  color: #aca9a3;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.geolocation-btn:hover {
  background: rgba(188, 185, 179, 0.15);
  border-color: rgba(188, 185, 179, 0.4);
  color: #cdcac4;
  transform: translateY(-1px);
  box-shadow: 0 0 8px rgba(188, 185, 179, 0.2);
}

/* Crosshair icon fallback for empty geolocation buttons */
.geolocation-btn svg {
  flex-shrink: 0;
}

.geolocation-icon:empty::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cline x1='12' y1='2' x2='12' y2='6'/%3E%3Cline x1='12' y1='18' x2='12' y2='22'/%3E%3Cline x1='2' y1='12' x2='6' y2='12'/%3E%3Cline x1='18' y1='12' x2='22' y2='12'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cline x1='12' y1='2' x2='12' y2='6'/%3E%3Cline x1='12' y1='18' x2='12' y2='22'/%3E%3Cline x1='2' y1='12' x2='6' y2='12'/%3E%3Cline x1='18' y1='12' x2='22' y2='12'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
}

.geolocation-btn.loading {
  background: rgba(188, 185, 179, 0.12);
  border-color: rgba(188, 185, 179, 0.3);
  cursor: wait;
}

.geolocation-icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
}

.geolocation-text {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.geolocation-btn-icon {
  width: 44px;
  height: 44px;
  background: rgba(151, 148, 142, 0.1);
  border: 1px solid rgba(151, 148, 142, 0.2);
  color: #97948e;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.geolocation-btn-icon:hover {
  background: rgba(151, 148, 142, 0.2);
  transform: translateY(-1px);
}

.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
}

.filter-col {
  flex: 1;
}

/* Filter Chips */
.filter-chips {
  background: #211f1a;
  border: 1px solid #44423d;
  border-radius: 2px;
  padding: 10px;
  margin-bottom: 12px;
}

.filter-chips-label {
  font-size: 11px;
  color: #999690;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.filter-chips-row:last-child {
  margin-bottom: 0;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: #999690;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-chip:hover {
  border-color: #aca9a3;
  color: #aca9a3;
  background: rgba(188, 185, 179, 0.08);
  transform: translateY(-1px);
}

.filter-chip.active {
  background: linear-gradient(135deg, #aca9a3 0%, #a09d97 100%);
  border-color: #aca9a3;
  color: #15130f;
  box-shadow: 0 2px 12px rgba(172, 169, 163, 0.25);
}

.filter-chip:active {
  transform: scale(0.97);
}

.filter-chip.sba {
  border-color: rgba(132, 129, 124, 0.25);
  color: #a4a19b;
}

.filter-chip.sba:hover {
  border-color: #84817c;
  background: rgba(132, 129, 124, 0.1);
}

.filter-chip.sba.active {
  background: #84817c;
  border-color: #84817c;
  color: white;
  box-shadow: 0 2px 12px rgba(132, 129, 124, 0.25);
}

.filter-chip.structure {
  border-color: rgba(160, 157, 151, 0.25);
  color: #b8b5af;
}

.filter-chip.structure:hover {
  border-color: #a09d97;
  background: rgba(160, 157, 151, 0.1);
}

.filter-chip.structure.active {
  background: #a09d97;
  border-color: #a09d97;
  color: white;
  box-shadow: 0 2px 12px rgba(160, 157, 151, 0.25);
}

.filter-chip.aid {
  border-color: rgba(255, 255, 255, 0.25);
  color: #fffff8;
}

.filter-chip.aid:hover {
  border-color: #f8f5ee;
  background: rgba(255, 255, 255, 0.1);
}

.filter-chip.aid.active {
  background: #f8f5ee;
  border-color: #f8f5ee;
  color: #0c0a06;
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.25);
}

/* Program Category Chips */
.program-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding: 4px 0;
  align-items: stretch;
}

.program-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 2px;
  border: 1px solid rgba(117, 114, 109, 0.4);
  background: rgba(42, 39, 35, 0.8);
  color: #d7d3cd;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  min-height: 32px;
}

.program-chip:hover {
  border-color: #aca9a3;
  background: rgba(188, 185, 179, 0.1);
  color: #eae7e1;
  transform: translateY(-1px);
}

.program-chip.active {
  background: linear-gradient(135deg, #aca9a3 0%, #928f8a 100%);
  border-color: #aca9a3;
  color: #100e09;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(188, 185, 179, 0.3);
}

.program-chip.active:hover {
  background: linear-gradient(135deg, #cdcac4 0%, #aca9a3 100%);
  transform: translateY(-1px);
}

.chip-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.chip-label {
  white-space: nowrap;
  font-size: 12px;
}

.chip-count {
  font-size: 10px;
  font-weight: 600;
  background: rgba(164, 162, 156, 0.25);
  color: #b2afa9;
  padding: 2px 6px;
  border-radius: 2px;
  min-width: 20px;
  text-align: center;
}

.program-chip.active .chip-count {
  background: rgba(0, 0, 0, 0.3);
}

.program-filter-actions {
  margin-top: 8px;
}

.clear-filters-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  color: #a4a19b;
  background: transparent;
  border: 1px solid rgba(117, 114, 109, 0.4);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.clear-filters-btn:hover {
  color: #eae7e1;
  border-color: #75726d;
  background: rgba(117, 114, 109, 0.2);
}

.filter-chips-count {
  font-size: 10px;
  color: #77746f;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #44423d;
}

/* Filter count badges - real-time viewport aggregations */
.filter-count {
  font-size: 10px;
  font-weight: 600;
  background: rgba(164, 162, 156, 0.2);
  color: #a4a29c;
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 4px;
  min-width: 16px;
  text-align: center;
}

.filter-chip.active .filter-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.filter-chip.sba .filter-count {
  background: rgba(182, 179, 173, 0.2);
  color: #b6b3ad;
}

.filter-chip.sba.active .filter-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.filter-chip.structure .filter-count {
  background: rgba(160, 157, 151, 0.2);
  color: #a09d97;
}

.filter-chip.structure.active .filter-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Theme Selector */
.theme-selector {
  margin-bottom: 12px;
}

.theme-label {
  font-size: 11px;
  color: #999690;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.theme-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(42, 39, 35, 0.6);
  border: 1px solid rgba(117, 114, 109, 0.3);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
}

.theme-btn:hover {
  border-color: #aca9a3;
  background: rgba(188, 185, 179, 0.1);
}

.theme-btn.active {
  border-color: #aca9a3;
  background: rgba(188, 185, 179, 0.15);
  box-shadow: 0 0 8px rgba(188, 185, 179, 0.3);
}

.theme-preview {
  width: 40px;
  height: 8px;
  border-radius: 2px;
  display: block;
}

.theme-name {
  font-size: 10px;
  color: #a4a19b;
  font-weight: 500;
}

.theme-btn.active .theme-name {
  color: #aca9a3;
}

/* Active filter indicator */
.active-filter-indicator {
  font-size: 11px;
  color: #aca9a3;
  font-weight: 500;
  padding: 8px 0 4px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
}

/* Map transition for filter changes */
#map {
  transition: opacity 0.15s ease;
}

.map-controls-compact {
  background: #211f1a;
  border: 1px solid #44423d;
  border-radius: 2px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 15px;
}

.control-label {
  font-size: 11px;
  color: #999690;
  font-weight: 500;
  white-space: nowrap;
}

.toggle-group {
  display: flex;
  background: #34312c;
  border-radius: 2px;
  padding: 2px;
  gap: 2px;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: #999690;
  width: 32px;
  height: 28px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #eae6e0;
}

.toggle-btn.active {
  background: #97948e;
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Redesigned View Mode Section - Premium Toggle Grid */
.view-mode-section {
  margin-bottom: 20px;
}

.view-mode-label {
  color: #999690;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 10px;
}

.view-mode-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 6px;
  background: rgba(25, 22, 18, 0.8);
  border-radius: 2px;
  padding: 6px;
  border: 1px solid rgba(117, 114, 109, 0.25);
}

.view-mode-btn {
  /* Reset browser defaults */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  text-decoration: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(42, 39, 35, 0.6);
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 10px 8px;
  color: #75726d;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 48px;
}

.view-mode-btn::before {
  font-size: 16px;
  line-height: 1;
  margin-bottom: 2px;
}

/* Icons by button ID */
.view-mode-btn#logosBtn::before,
.view-mode-btn#markersBtn::before {
  content: 'Logos';
  font-size: 11px;
}
.view-mode-btn#heatBtn::before {
  content: 'Heat';
  font-size: 11px;
}
.view-mode-btn#hexgridBtn::before {
  content: '⬡';
}
.view-mode-btn#barsBtn::before,
.view-mode-btn#heatmapBtn::before {
  content: 'Bars';
  font-size: 11px;
}
.view-mode-btn#galleryBtn::before {
  content: 'Grid';
  font-size: 11px;
}

.view-mode-btn:hover {
  color: #eae7e1;
  background: rgba(117, 114, 109, 0.25);
  border-color: rgba(117, 114, 109, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.view-mode-btn:active {
  transform: translateY(0);
}

.view-mode-btn.active {
  background: linear-gradient(135deg, #aca9a3 0%, #928f8a 100%);
  color: #100e09;
  font-weight: 700;
  border-color: rgba(205, 202, 196, 0.5);
  box-shadow:
    0 2px 8px rgba(188, 185, 179, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  letter-spacing: 0.01em;
}

.view-mode-btn.active:hover {
  background: linear-gradient(135deg, #cdcac4 0%, #aca9a3 100%);
  box-shadow:
    0 4px 16px rgba(188, 185, 179, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 480px) {
  .view-mode-buttons {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
  }

  .view-mode-btn {
    padding: 8px 6px;
    font-size: 10px;
    min-height: 52px;
  }

  .view-mode-btn::before {
    font-size: 18px;
  }
}

/* ============================================
   View Mode Dropdown (More button)
   ============================================ */
.view-mode-dropdown {
  position: relative;
}

.view-mode-more {
  min-width: 70px;
}

.view-mode-more::before {
  content: '⋯' !important;
}

.view-mode-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  background: rgba(25, 22, 18, 0.95);
  border: 1px solid rgba(117, 114, 109, 0.3);
  border-radius: 2px;
  padding: 6px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.view-mode-dropdown-menu.open {
  display: block;
  animation: dropdownFadeIn 0.15s ease-out;
}

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

.view-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 2px;
  color: #a4a19b;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.view-dropdown-item:hover {
  background: rgba(117, 114, 109, 0.2);
  color: #eae7e1;
}

.view-dropdown-item.active {
  background: linear-gradient(135deg, rgba(172, 169, 163, 0.2) 0%, rgba(146, 143, 138, 0.2) 100%);
  color: #cdcac4;
}

.divider-vertical {
  width: 1px;
  height: 20px;
  background: #44423d;
}

/* Loading Skeleton */
.loading-skeleton {
  background: linear-gradient(90deg, #34312c 25%, #3f3d38 50%, #34312c 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 2px;
}

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

@media (max-width: 768px) {
  /* CRITICAL: Hide Leaflet popups on mobile - bottom sheet handles selection */
  .leaflet-popup-pane {
    display: none !important;
  }

  /* Base mobile layout - overridden by bottom-sheet when active */
  body {
    flex-direction: column;
    padding-top: var(--header-height);
  }

  /* Legacy slide-in sidebar (only applies when NOT bottom-sheet) */
  #sidebar:not(.bottom-sheet) {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 100%;
    max-width: 100%;
    height: calc(100vh - var(--header-height));
    transform: translateX(100%);
    z-index: 2000;
    border-left: none;
    border-top: 1px solid #44423d;
    overflow-y: auto;
    overflow-x: hidden;
  }

  #sidebar:not(.bottom-sheet).active {
    transform: translateX(0);
  }

  #sidebar:not(.bottom-sheet).collapsed {
    transform: translateX(100%);
    width: 100%;
  }

  #sidebar:not(.bottom-sheet).collapsed.active {
    transform: translateX(0);
  }

  /* Mobile close button (only for legacy sidebar) */
  #sidebar:not(.bottom-sheet) .mobile-close-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 100;
    width: auto;
    padding: 8px 14px;
    margin: 0;
    background: rgba(43, 40, 36, 0.9);
    border: 1px solid rgba(164, 161, 155, 0.2);
    border-radius: 2px;
    color: #d7d3cd;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .mobile-close-btn:hover,
  .mobile-close-btn:active {
    background: rgba(66, 64, 59, 0.95);
    color: #eae7e1;
  }

  /* Fix wide elements inside sidebar on mobile */
  #sidebar .tooltip,
  #sidebar a,
  #sidebar .school-card {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #map {
    width: 100%;
    height: calc(100vh - var(--header-height));
    flex: none;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop);
    backdrop-filter: blur(4px);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .geolocation-btn {
    min-height: 44px;
    font-size: 16px;
  }

  .filter-select,
  .search-input {
    min-height: 44px;
    font-size: 16px;
  }

  /* Mobile view controls - larger touch targets */
  .view-controls {
    gap: 10px;
    margin-bottom: 20px;
  }

  .view-btn {
    min-height: 48px;
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .view-btn:active {
    transform: scale(0.98);
  }

  /* Mobile nav bar adjustments */
  .top-nav-container {
    padding: 8px 12px;
    gap: 8px;
  }

  .top-nav-logo {
    font-size: 14px;
  }

  .top-nav-links {
    gap: 4px;
  }

  .top-nav-link {
    padding: 6px 8px;
    font-size: 12px;
  }

  /* Hide "Contact" text on mobile, show only X icon */
  .top-nav-link[aria-label='DM Tom on X'] {
    gap: 0 !important;
  }

  .top-nav-link[aria-label='DM Tom on X'] svg {
    width: 16px;
    height: 16px;
  }

  /* Hide the Contact text span on very small screens */
  @media (max-width: 380px) {
    .top-nav-link[aria-label='DM Tom on X'] {
      padding: 6px;
    }
  }

  .stats-badge {
    bottom: 10px;
    left: 10px;
    padding: 8px 10px;
    display: block; /* Show on mobile */
    border-radius: 2px;
  }

  .stats-badge-content {
    gap: 10px;
  }

  .stats-badge-value {
    font-size: 14px;
  }

  .stats-badge-label {
    font-size: 9px;
  }

  /* Show floating toggle on mobile to open sidebar */
  .sidebar-toggle {
    top: 48px;
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 20px;
    z-index: 2500 !important;
  }

  /* Hide floating toggle when sidebar is open (use in-sidebar close button) */
  body.sidebar-open .sidebar-toggle {
    display: none !important;
  }

  .cta-button-group {
    bottom: 10px;
    right: 10px;
  }

  .cta-button {
    min-width: auto;
    padding: 12px 16px;
    font-size: 14px;
  }

  .floating-submit {
    display: none;
  }

  /* Mobile card improvements */
  .school-card {
    padding: 14px;
  }

  .school-name {
    font-size: 14px;
  }

  .school-location {
    font-size: 12px;
  }

  /* Action buttons wrap on mobile */
  .school-card-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .action-btn {
    min-width: 45%;
    flex: 1 1 45%;
    padding: 10px 8px;
    font-size: 12px;
  }

  /* Filter row stacks on mobile */
  .filter-row {
    flex-direction: column;
    gap: 10px;
  }

  .filter-col {
    width: 100%;
  }

  /* Search + geolocation stay inline on mobile */
  .filter-group.search-group {
    flex-direction: row;
    gap: 8px;
  }

  .geolocation-btn {
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
  }

  .geolocation-btn .geolocation-text {
    display: none;
  }

  /* Popup mobile adjustments */
  .leaflet-popup-content {
    min-width: 180px;
    max-width: calc(100vw - 80px);
    font-size: 14px;
  }

  /* Program chips mobile */
  .program-category-chips {
    gap: 8px;
  }

  .program-chip {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 44px;
  }

  .chip-icon {
    font-size: 14px;
  }

  .chip-count {
    font-size: 10px;
    padding: 2px 6px;
    min-width: 20px;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .school-card-actions {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
    min-width: 100%;
  }

  .stats-badge {
    max-width: calc(100vw - 20px);
  }

  .stats-badge-content {
    flex-wrap: wrap;
  }

  .stats-badge-title {
    word-break: break-word;
  }
}

/* ============================================
   Search Autocomplete Styles
   ============================================ */
.search-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: rgba(26, 23, 19, 0.98);
  border: 1px solid rgba(164, 162, 156, 0.3);
  border-radius: 2px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid rgba(117, 114, 109, 0.15);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: rgba(164, 162, 156, 0.15);
}

.autocomplete-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.autocomplete-favicon {
  width: 32px;
  height: 32px;
  border-radius: 2px;
  object-fit: contain;
}

.autocomplete-fallback {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(117, 114, 109, 0.2);
  border-radius: 2px;
}

.autocomplete-info {
  flex: 1;
  min-width: 0;
}

.autocomplete-name {
  font-size: 14px;
  font-weight: 500;
  color: #eae7e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-location {
  font-size: 12px;
  color: #a4a29c;
  margin-top: 2px;
}

/* Search result highlight */
.autocomplete-item mark {
  background: rgba(188, 185, 179, 0.3);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

/* Marker hover tooltip */
.marker-tooltip {
  background: rgba(16, 14, 9, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  padding: 8px 12px;
  font-size: 12px;
  color: #eae7e1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  line-height: 1.5;
}

.marker-tooltip strong {
  color: #fffff8;
  font-weight: 600;
  font-size: 13px;
}

.marker-tooltip em {
  color: #fffff8;
  font-style: normal;
  font-size: 11px;
}

.leaflet-tooltip.marker-tooltip::before {
  border-top-color: rgba(16, 14, 9, 0.94);
}

/* Tooltip badge elements */
.tt-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.tt-badge {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.tt-cage {
  background: rgba(255, 255, 255, 0.2);
  color: #fffff8;
}

.tt-type {
  background: rgba(164, 161, 155, 0.15);
  color: #a4a19b;
}

.tt-active {
  background: rgba(160, 157, 151, 0.2);
  color: #a09d97;
}

.tt-inactive {
  background: rgba(236, 70, 84, 0.15);
  color: #ec4654;
}

.tt-sector {
  color: #999690;
  font-size: 10px;
}

/* Keyboard shortcuts help modal */
.keyboard-help-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.keyboard-help-content {
  background: #2b2824;
  border: 1px solid rgba(117, 114, 109, 0.3);
  border-radius: 2px;
  width: 360px;
  max-width: 90%;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.keyboard-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(117, 114, 109, 0.2);
}

.keyboard-help-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #eae7e1;
}

.keyboard-help-close {
  background: none;
  border: none;
  color: #a4a19b;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: all 0.2s;
}

.keyboard-help-close:hover {
  background: rgba(117, 114, 109, 0.2);
  color: #eae7e1;
}

.keyboard-help-body {
  padding: 20px 24px;
}

.shortcut-section {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #75726d;
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(117, 114, 109, 0.1);
}

.shortcut-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.shortcut-row kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: #42403b;
  border: 1px solid #56544e;
  border-radius: 2px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #eae7e1;
}

.shortcut-row span {
  color: #a4a19b;
  font-size: 14px;
}

/* Filter presets */
.filter-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(117, 114, 109, 0.2);
  margin-bottom: 16px;
}

.filter-presets-label {
  font-size: 12px;
  color: #75726d;
  margin-right: 4px;
}

.filter-preset-btn {
  padding: 6px 12px;
  background: rgba(43, 40, 36, 0.6);
  border: 1px solid rgba(117, 114, 109, 0.3);
  border-radius: 2px;
  color: #a4a19b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-preset-btn:hover {
  border-color: rgba(164, 162, 156, 0.5);
  color: #eae7e1;
}

.filter-preset-btn.active {
  background: rgba(164, 162, 156, 0.2);
  border-color: #a4a29c;
  color: #a4a29c;
}

/* Make search input wrapper relative for autocomplete positioning */
.search-group {
  position: relative;
}

/* Gallery button - same style as other view buttons */

/* ============================================
   Hex Click Hint Overlay
   ============================================ */
.hex-click-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 16px 24px;
  border-radius: 2px;
  z-index: 1000;
  pointer-events: none;
  font-size: 15px;
  text-align: center;
  max-width: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: hintFadeInOut 5s ease-in-out forwards;
}

.hex-click-hint-icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}

.hex-click-hint-text {
  line-height: 1.4;
}

.hex-click-hint-text strong {
  color: #fffff8;
}

@keyframes hintFadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  10% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
    display: none;
  }
}

/* ============================================
   Hex Filter Indicator
   ============================================ */
.hex-filter-indicator {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(164, 162, 156, 0.2) 0%, rgba(139, 136, 130, 0.2) 100%);
  border: 1px solid rgba(164, 162, 156, 0.4);
  border-radius: 2px;
  margin: 12px 16px;
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hex-filter-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hex-filter-icon {
  font-size: 18px;
}

.hex-filter-text {
  font-size: 14px;
  color: #eae7e1;
}

.hex-filter-text strong {
  color: #a4a29c;
}

.hex-filter-clear {
  background: rgba(236, 70, 84, 0.2);
  border: 1px solid rgba(236, 70, 84, 0.4);
  color: #f87174;
  padding: 6px 12px;
  border-radius: 2px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.hex-filter-clear:hover {
  background: rgba(236, 70, 84, 0.3);
  border-color: #ec4654;
}

/* ============================================
   Sidebar Pagination Styles
   ============================================ */
.sidebar-pagination-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(43, 40, 36, 0.6);
  border-bottom: 1px solid rgba(117, 114, 109, 0.2);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.pagination-count {
  font-size: 13px;
  color: #a4a19b;
}

.pagination-count strong {
  color: #a4a29c;
}

/* Sort dropdown */
.sidebar-sort-select {
  padding: 6px 10px;
  background: rgba(43, 40, 36, 0.8);
  border: 1px solid rgba(117, 114, 109, 0.3);
  border-radius: 2px;
  color: #eae7e1;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-sort-select:hover {
  border-color: rgba(164, 162, 156, 0.5);
}

.sidebar-sort-select:focus {
  outline: none;
  border-color: #a4a29c;
}

/* School card header with program badge */
.school-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.school-card-header .school-name {
  flex: 1;
  margin-bottom: 0;
}

/* Program count badge */
.program-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: rgba(164, 162, 156, 0.15);
  color: #a4a29c;
  font-size: 11px;
  font-weight: 500;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================
   Entity List Component (MapList module)
   ============================================ */
.entity-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(43, 40, 36, 0.6);
  border-bottom: 1px solid rgba(117, 114, 109, 0.15);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.entity-list-count {
  font-size: 12px;
  color: #a4a19b;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-list-count strong {
  color: #a4a29c;
  font-weight: 600;
}

.entity-list-sort {
  padding: 4px 8px;
  background: rgba(43, 40, 36, 0.8);
  border: 1px solid rgba(117, 114, 109, 0.3);
  border-radius: 2px;
  color: #eae7e1;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.15s;
  flex-shrink: 0;
}

.entity-list-sort:hover {
  border-color: rgba(164, 162, 156, 0.5);
}

.entity-list-sort:focus {
  outline: none;
  border-color: #a4a29c;
}

.entity-list-cards {
  padding: 0;
}

.entity-list-load-more {
  padding: 16px;
  text-align: center;
}

.entity-list-load-more .load-more-btn {
  width: 100%;
}

.sidebar-load-more {
  padding: 16px;
  text-align: center;
}

.load-more-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(164, 162, 156, 0.15) 0%, rgba(139, 136, 130, 0.15) 100%);
  border: 1px solid rgba(164, 162, 156, 0.3);
  border-radius: 2px;
  color: #eae7e1;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.load-more-btn:hover {
  background: linear-gradient(135deg, rgba(164, 162, 156, 0.25) 0%, rgba(139, 136, 130, 0.25) 100%);
  border-color: #a4a29c;
  transform: translateY(-1px);
}

.load-more-btn:active {
  transform: translateY(0);
}

.load-more-count {
  font-size: 12px;
  color: #75726d;
}

/* ============================================
   Mobile UX Enhancements
   ============================================ */

/* Floating Action Button (FAB) */
.mobile-fab {
  display: none;
}

@media (max-width: 768px) {
  .mobile-fab {
    display: block;
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: var(--z-fab);
  }

  .fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #aca9a3 0%, #928f8a 100%);
    border: none;
    box-shadow: 0 4px 16px rgba(188, 185, 179, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }

  .fab-main:active {
    transform: scale(0.95);
  }

  .fab-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
  }

  .mobile-fab.expanded .fab-icon {
    transform: rotate(45deg);
  }

  .fab-options {
    position: absolute;
    bottom: 64px;
    right: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
  }

  .mobile-fab.expanded .fab-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .fab-option {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(26, 23, 19, 0.95);
    border: 1px solid rgba(188, 185, 179, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s ease;
  }

  .fab-option:active {
    background: rgba(188, 185, 179, 0.2);
    transform: scale(0.95);
  }
}

/* Map Interaction Hint */
.map-hint {
  position: fixed;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 23, 19, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(188, 185, 179, 0.3);
  border-radius: 2px;
  padding: 16px 20px;
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: hintSlideUp 0.3s ease-out;
}

@keyframes hintSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.map-hint.dismissed {
  animation: hintSlideDown 0.3s ease-out forwards;
}

@keyframes hintSlideDown {
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
}

.map-hint-content {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.map-hint-icon {
  font-size: 32px;
  animation: fingerPinch 1.5s ease-in-out infinite;
}

@keyframes fingerPinch {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.8);
  }
}

.map-hint-text {
  color: #eae7e1;
  font-size: 14px;
  line-height: 1.4;
}

.map-hint-text strong {
  color: #aca9a3;
}

.map-hint-dismiss {
  width: 100%;
  padding: 10px 16px;
  background: rgba(188, 185, 179, 0.15);
  border: 1px solid rgba(188, 185, 179, 0.3);
  border-radius: 2px;
  color: #aca9a3;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-hint-dismiss:active {
  background: rgba(188, 185, 179, 0.3);
}

/* ============================================
   iOS Maps-style Bottom Sheet for Mobile
   ============================================ */

/* Overlay behind sheet */
.sheet-overlay {
  display: none;
  position: fixed;
  top: var(--header-height, 48px);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ============================================
   DESKTOP TWO-COLUMN SIDEBAR LAYOUT
   Left: Filters + Entity List | Right: Detail Panel or Summary Stats
   Tufte principle: maximize data-ink ratio
   ============================================ */

@media (min-width: 769px) {
  #sidebar {
    width: 560px;
    min-width: 560px;
    max-width: 560px;
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      'header header'
      'filters detail'
      'list detail';
  }

  #sidebar.collapsed {
    transform: translateX(560px);
  }

  /* Header spans both columns - compact */
  #sidebar .header {
    grid-area: header;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  /* Left column: filters (compact) */
  #sidebar .filters {
    grid-area: filters;
    overflow-y: auto;
    max-height: 200px;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 12px;
  }

  /* Left column: entity list (scrolls) */
  #sidebar .school-list {
    grid-area: list;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    min-height: 200px;
    padding: 8px;
  }

  /* Right column: detail panel - full height, clean */
  #sidebar .selected-school-panel {
    grid-area: detail;
    overflow-y: auto;
    max-height: none;
    border-bottom: none;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
  }

  /* Selected panel in right column - full height usage */
  #sidebar .selected-school-panel.visible {
    display: flex;
    flex-direction: column;
  }

  /* Compact cards in narrow left column */
  #sidebar .school-card {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  #sidebar .school-card:hover {
    background: rgba(255, 255, 255, 0.03);
  }

  #sidebar .school-card:last-child {
    border-bottom: none;
  }

  #sidebar .school-card .school-name {
    font-size: 12px;
    line-height: 1.3;
  }

  #sidebar .school-card .school-location {
    font-size: 11px;
  }

  /* Smaller favicon in narrow column */
  #sidebar .card-body {
    grid-template-columns: 16px 1fr;
    gap: 0 8px;
  }

  #sidebar .card-icon {
    width: 16px;
    height: 16px;
  }

  #sidebar .school-card-favicon {
    width: 16px;
    height: 16px;
  }

  #sidebar .school-list {
    padding: 0;
  }

  #sidebar .entity-list-cards {
    padding: 0;
  }
}

/* ============================================
   MOBILE BOTTOM SHEET - iOS Maps Style
   Pixel-perfect design for touch devices
   ============================================ */

.sheet-handle {
  display: none;
}

.sheet-overlay {
  display: none;
  position: fixed;
  top: var(--header-height, 48px);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  opacity: 0;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
  /* ---- Bottom Sheet Container (Transform-based) ---- */
  #sidebar.bottom-sheet {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    border-radius: 2px;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(26, 23, 19, 0.98);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
      0 -8px 32px rgba(0, 0, 0, 0.5),
      0 -2px 8px rgba(0, 0, 0, 0.3);
    will-change: transform;
    transition: transform 0.3s ease-out;
    z-index: var(--z-bottom-sheet);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    /* Safe area support for notched devices */
    padding-bottom: var(--safe-area-bottom);
  }

  /* ---- Drag Handle ---- */
  .sheet-handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 16px 12px;
    min-height: 52px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .sheet-handle:active {
    cursor: grabbing;
  }

  .sheet-handle-bar {
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-bottom: 8px;
    transition: all 0.25s ease;
  }

  /* Pulse animation for handle when collapsed */
  @keyframes handle-pulse {
    0%,
    100% {
      opacity: 0.3;
      transform: scaleX(1);
    }
    50% {
      opacity: 0.5;
      transform: scaleX(1.1);
    }
  }

  #sidebar.bottom-sheet[data-snap='collapsed'] .sheet-handle-bar {
    animation: handle-pulse 2s ease-in-out infinite;
  }

  #sidebar.bottom-sheet:not([data-snap='collapsed']) .sheet-handle-bar {
    background: rgba(255, 255, 255, 0.4);
  }

  .sheet-handle-stats {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  .sheet-stat-count {
    font-weight: 700;
    color: #fffff8;
    font-size: 17px;
  }

  .sheet-filter-badge {
    background: #f8f5ee;
    color: #0c0a06;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
  }

  /* ---- Map Full Viewport ---- */
  #map {
    height: calc(100vh - var(--header-height)) !important;
    width: 100% !important;
    position: fixed !important;
    top: var(--header-height) !important;
    left: 0 !important;
  }

  body {
    flex-direction: column !important;
    overflow: hidden;
    padding-top: var(--header-height) !important;
  }

  body.sheet-open {
    overflow: hidden;
  }

  /* ---- Hide Conflicting Elements ---- */
  .sidebar-toggle,
  .bomatlas-sidebar-toggle,
  #statsBadge,
  .sidebar-overlay,
  #sidebar.bottom-sheet .mobile-close-btn {
    display: none !important;
  }

  /* ---- Header ---- */
  #sidebar.bottom-sheet .header,
  #sidebar.bottom-sheet .header-compact {
    padding: 8px 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
  }

  #sidebar.bottom-sheet .header h1,
  #sidebar.bottom-sheet .header-compact h1 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fffff8;
    letter-spacing: -0.01em;
  }

  #sidebar.bottom-sheet .header-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
  }

  /* ---- Snap State Visibility ---- */
  /* Collapsed: hide all content except handle */
  #sidebar.bottom-sheet[data-snap='collapsed'] .header,
  #sidebar.bottom-sheet[data-snap='collapsed'] .header-compact,
  #sidebar.bottom-sheet[data-snap='collapsed'] .filters,
  #sidebar.bottom-sheet[data-snap='collapsed'] .school-list,
  #sidebar.bottom-sheet[data-snap='collapsed'] .selected-school-panel {
    display: none !important;
    opacity: 0;
    pointer-events: none;
  }

  /* Half and Full: show content with flex layout */
  #sidebar.bottom-sheet[data-snap='half'] .filters,
  #sidebar.bottom-sheet[data-snap='full'] .filters {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
  }

  #sidebar.bottom-sheet[data-snap='half'] .school-list,
  #sidebar.bottom-sheet[data-snap='full'] .school-list {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
  }

  #sidebar.bottom-sheet[data-snap='half'] .selected-school-panel.visible,
  #sidebar.bottom-sheet[data-snap='full'] .selected-school-panel.visible {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
  }

  /* ---- Mobile Selected Panel - Tight & Clean ---- */

  /* Hide nearby section on mobile - wastes space */
  #sidebar.bottom-sheet .nearby-schools-section {
    display: none !important;
  }

  /* Hide programs section in half-state - show only in full */
  #sidebar.bottom-sheet[data-snap='half'] .selected-school-section {
    display: none !important;
  }

  /* Tighter info section - 8dp spacing grid */
  #sidebar.bottom-sheet .selected-school-info {
    gap: 8px;
  }

  #sidebar.bottom-sheet .selected-school-info-item {
    gap: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
  }

  /* Compact teaser panel on mobile */
  #sidebar.bottom-sheet .teaser-panel-overlay {
    margin-top: 16px;
    padding: 16px;
    border-radius: 2px;
    background: rgba(43, 40, 36, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  #sidebar.bottom-sheet .teaser-panel-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  #sidebar.bottom-sheet .teaser-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #fffff8;
  }

  #sidebar.bottom-sheet .teaser-panel-text {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
  }

  #sidebar.bottom-sheet .teaser-panel-btn {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    background: #f8f5ee;
    color: #0c0a06;
    border-radius: 2px;
  }

  /* Compact action buttons - single row, 44dp height */
  #sidebar.bottom-sheet .selected-school-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
  }

  #sidebar.bottom-sheet .selected-school-actions .selected-school-btn {
    flex: 1 1 auto;
    min-height: 44px;
    max-height: 44px;
    padding: 0 12px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Close button - compact X */
  #sidebar.bottom-sheet .selected-school-actions .selected-school-btn.secondary {
    flex: 0 0 36px;
    width: 36px;
    min-width: 36px;
    padding: 0;
    font-size: 16px;
  }

  /* Hide BOMForge analyze button on mobile - too niche */
  #sidebar.bottom-sheet .selected-school-btn.bomforge {
    display: none !important;
  }

  /* Full state shows all content */
  #sidebar.bottom-sheet[data-snap='full'] .filters,
  #sidebar.bottom-sheet[data-snap='full'] .school-list,
  #sidebar.bottom-sheet[data-snap='full'] .selected-school-panel.visible {
    display: block;
  }

  /* ---- Filters ---- */
  #sidebar.bottom-sheet .filters {
    padding: 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  #sidebar.bottom-sheet .search-group {
    margin-bottom: 16px;
  }

  #sidebar.bottom-sheet .search-container {
    flex: 1;
  }

  #sidebar.bottom-sheet .search-input {
    min-height: 48px;
    font-size: 16px;
    padding: 12px 16px 12px 48px;
    border-radius: 2px;
    background: rgba(43, 40, 36, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fffff8;
    transition: all 0.2s ease;
    -webkit-appearance: none;
  }

  #sidebar.bottom-sheet .search-input:focus {
    background: rgba(43, 40, 36, 1);
    border-color: #f8f5ee;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    outline: none;
  }

  #sidebar.bottom-sheet .search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
  }

  #sidebar.bottom-sheet .search-icon {
    left: 16px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
  }

  #sidebar.bottom-sheet .geolocation-btn {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  #sidebar.bottom-sheet .geolocation-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
  }

  #sidebar.bottom-sheet .geolocation-btn .geolocation-text {
    display: none;
  }

  #sidebar.bottom-sheet .filter-row {
    margin-bottom: 0;
  }

  #sidebar.bottom-sheet .filter-select {
    min-height: 48px;
    font-size: 15px;
    border-radius: 2px;
    background: rgba(43, 40, 36, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fffff8;
  }

  #sidebar.bottom-sheet .filter-chip,
  #sidebar.bottom-sheet .view-btn {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 2px;
    background: rgba(43, 40, 36, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.15s ease;
  }

  #sidebar.bottom-sheet .filter-chip.active,
  #sidebar.bottom-sheet .filter-chip:active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #f8f5ee;
    font-weight: 600;
  }

  /* ---- Sector filter chips (LA Hard Tech 50, etc.) ---- */
  #sidebar.bottom-sheet .program-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    padding: 0;
  }

  #sidebar.bottom-sheet .program-chip {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 44px;
    border-radius: 2px;
    flex-shrink: 0;
  }

  #sidebar.bottom-sheet .program-chip .chip-icon {
    font-size: 14px;
  }

  #sidebar.bottom-sheet .program-chip .chip-label {
    font-size: 13px;
  }

  #sidebar.bottom-sheet .clear-filters-btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 13px;
  }

  /* ---- School List ---- */
  #sidebar.bottom-sheet .school-list {
    flex: 1;
    min-height: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    padding-bottom: max(24px, calc(var(--safe-area-bottom) + 24px));
  }

  #sidebar.bottom-sheet .sidebar-pagination-header,
  #sidebar.bottom-sheet .entity-list-header {
    display: none !important;
  }

  /* ---- School Cards - Minimal, Scannable ---- */
  #sidebar.bottom-sheet .school-card {
    padding: 14px 16px;
    margin-bottom: 0;
    border-radius: 2px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: none;
    cursor: pointer;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  #sidebar.bottom-sheet .school-card:active {
    background: rgba(255, 255, 255, 0.06);
  }

  #sidebar.bottom-sheet .school-card:last-child {
    border-bottom: none;
  }

  #sidebar.bottom-sheet .school-name {
    font-size: 15px;
    font-weight: 500;
    color: #eae7e1;
    margin-bottom: 2px;
    line-height: 1.4;
  }

  #sidebar.bottom-sheet .school-location {
    font-size: 13px;
    color: #75726d;
    margin-bottom: 0;
    line-height: 1.4;
  }

  /* Hide legacy elements - cards are minimal now */
  #sidebar.bottom-sheet .school-card-header,
  #sidebar.bottom-sheet .program-count-badge,
  #sidebar.bottom-sheet .school-contact,
  #sidebar.bottom-sheet .school-card-actions {
    display: none !important;
    margin-top: auto;
  }

  #sidebar.bottom-sheet .action-btn {
    flex: 1;
    min-height: 40px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.15s ease;
  }

  #sidebar.bottom-sheet .action-btn:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.2);
  }

  /* Primary button: solid blue */
  #sidebar.bottom-sheet .action-btn.primary {
    background: #f8f5ee;
    border: none;
    color: #0c0a06;
  }

  #sidebar.bottom-sheet .action-btn.primary:active {
    background: #d7d4ce;
  }

  /* Card header: flex layout for name + badge */
  #sidebar.bottom-sheet .school-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
  }

  #sidebar.bottom-sheet .school-card-header .school-name {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
  }

  /* Program count badge: compact pill - use blue accent */
  #sidebar.bottom-sheet .program-count-badge {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #f8f5ee;
    border-radius: 2px;
    flex-shrink: 0;
    font-weight: 600;
  }

  #sidebar.bottom-sheet .sidebar-load-more {
    padding: 16px 0;
  }

  #sidebar.bottom-sheet .load-more-btn {
    width: 100%;
    min-height: 48px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #f8f5ee;
    transition: all 0.15s ease;
  }

  #sidebar.bottom-sheet .load-more-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.25);
  }

  /* ---- Teaser Mode ---- */
  #sidebar.bottom-sheet .blurred-text {
    filter: blur(4px);
    color: rgba(255, 255, 255, 0.4);
  }

  #sidebar.bottom-sheet .teaser-blur-overlay {
    margin-top: 16px;
  }

  #sidebar.bottom-sheet .teaser-unlock-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #0c0a06;
    background: #f8f5ee;
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.15s ease;
  }

  #sidebar.bottom-sheet .teaser-unlock-btn:active {
    background: #d7d4ce;
    transform: scale(0.98);
  }

  /* ---- Hide FAB when sheet open ---- */
  body.sheet-open .mobile-fab,
  body.sheet-open .floating-submit {
    display: none !important;
  }

  /* ---- View Tabs ---- */
  #sidebar.bottom-sheet .view-controls {
    display: flex;
    gap: 8px;
    padding: 0 0 16px;
  }

  #sidebar.bottom-sheet .view-btn {
    flex: 1;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 2px;
    background: rgba(43, 40, 36, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.15s ease;
  }

  #sidebar.bottom-sheet .view-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #f8f5ee;
    font-weight: 600;
  }

  /* ---- Stats in sheet ---- */
  #sidebar.bottom-sheet .stats {
    display: flex;
    gap: 12px;
    margin-top: 16px;
  }

  #sidebar.bottom-sheet .stat {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: rgba(43, 40, 36, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
  }

  #sidebar.bottom-sheet .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #fffff8;
  }

  #sidebar.bottom-sheet .stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
  }

  /* ---- Selected School Panel - Mobile COMPACT ---- */
  #sidebar.bottom-sheet .selected-school-panel {
    display: none !important;
    order: 3;
    padding: 16px;
    margin: 0 16px 16px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(43, 40, 36, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    max-height: 260px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
  }

  #sidebar.bottom-sheet .selected-school-panel.visible {
    display: block !important;
  }

  #sidebar.bottom-sheet .selected-school-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }

  #sidebar.bottom-sheet .selected-school-title {
    font-size: 17px;
    font-weight: 700;
    color: #fffff8;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
    margin-right: 8px;
    line-height: 1.4;
    letter-spacing: -0.01em;
  }

  #sidebar.bottom-sheet .selected-school-close {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
  }

  #sidebar.bottom-sheet .selected-school-close:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
  }

  /* Show detailed info on mobile - readable content */
  #sidebar.bottom-sheet .selected-school-info {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
  }

  #sidebar.bottom-sheet .selected-school-meta {
    font-size: 13px;
    color: #a4a19b;
  }

  #sidebar.bottom-sheet .selected-school-description {
    font-size: 14px;
    color: #d7d3cd;
    line-height: 1.5;
    margin: 8px 0;
    max-width: none;
  }

  #sidebar.bottom-sheet .selected-school-people {
    font-size: 12px;
    color: #75726d;
  }

  /* Hide sections on mobile to save space */
  #sidebar.bottom-sheet .selected-school-section {
    display: none;
  }

  /* Action links row */
  #sidebar.bottom-sheet .selected-school-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  #sidebar.bottom-sheet .selected-school-link {
    font-size: 14px;
    color: #fffff8;
    text-decoration: underline;
    text-underline-offset: 2px;
    -webkit-tap-highlight-color: transparent;
  }

  #sidebar.bottom-sheet .selected-school-close-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #75726d;
    font-size: 24px;
    font-weight: 300;
    padding: 8px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
  }

  /* Legacy button support */
  #sidebar.bottom-sheet .selected-school-btn {
    flex: 1;
    min-height: 44px;
    max-height: 44px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  #sidebar.bottom-sheet .selected-school-btn:not(.secondary) {
    background: #f8f5ee;
    color: #0c0a06;
  }

  #sidebar.bottom-sheet .selected-school-btn:not(.secondary):active {
    background: #d7d4ce;
    transform: scale(0.98);
  }

  #sidebar.bottom-sheet .selected-school-btn.secondary {
    flex: 0 0 44px;
    width: 44px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 0;
  }

  #sidebar.bottom-sheet .selected-school-btn.secondary:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
  }

  /* Hide extra buttons on mobile */
  #sidebar.bottom-sheet .selected-school-btn.bomforge,
  #sidebar.bottom-sheet .selected-school-btn:nth-child(n + 4) {
    display: none !important;
  }

  /* Reorder sidebar children for mobile */
  #sidebar.bottom-sheet {
    display: flex !important;
    flex-direction: column !important;
  }

  #sidebar.bottom-sheet .sheet-handle {
    order: 1;
    flex-shrink: 0;
  }
  /* Header hidden on mobile to save space - handle shows stats */
  #sidebar.bottom-sheet .header,
  #sidebar.bottom-sheet .header-compact {
    order: 2;
    display: none !important;
  }
  /* Selected company panel comes BEFORE filters on mobile */
  #sidebar.bottom-sheet .selected-school-panel {
    order: 3;
    flex-shrink: 0;
  }

  #sidebar.bottom-sheet .filters {
    order: 4;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 40vh;
    -webkit-overflow-scrolling: touch;
  }
  #sidebar.bottom-sheet .school-list {
    order: 5;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Hide view mode section and mode indicator on mobile */
  #sidebar.bottom-sheet .view-mode-section {
    display: none !important;
  }
  #sidebar.bottom-sheet .mode-indicator {
    display: none !important;
  }
  /* Hide Map View filter section on mobile - takes too much space */
  #sidebar.bottom-sheet .filter-section[data-section='viewMode'] {
    display: none !important;
  }
  /* Compact filter sections on mobile */
  #sidebar.bottom-sheet .filter-section {
    margin-bottom: 8px;
    border-radius: 2px;
    background: rgba(43, 40, 36, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
  }
  #sidebar.bottom-sheet .filter-section-header {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: transparent;
  }
  /* When company is selected, HIDE filters to make room for list */
  #sidebar.bottom-sheet:has(.selected-school-panel.visible) .filters {
    display: none !important;
  }
  body.company-selected #sidebar.bottom-sheet .filters {
    display: none !important;
  }

  /* ---- Geolocation Button - Mobile Fix ---- */
  #sidebar.bottom-sheet .geolocation-btn {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  #sidebar.bottom-sheet .geolocation-btn .geolocation-icon {
    font-size: 20px;
    color: #f8f5ee;
  }

  /* ---- Search Group Layout Fix ---- */
  #sidebar.bottom-sheet .filter-group.search-group {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 12px;
  }

  #sidebar.bottom-sheet .search-container {
    flex: 1;
    min-width: 0;
  }

  /* ---- Filter Row - ensure visible ---- */
  #sidebar.bottom-sheet .filter-row {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  /* ---- Footer overlap fix ---- */
  #siteFooter {
    display: none !important;
  }

  /* ---- Bottom sheet snap states - scrolling behavior ---- */
  /* Transform is controlled by JS, content visibility by data-snap attribute */
  #sidebar.bottom-sheet[data-snap='half'],
  #sidebar.bottom-sheet[data-snap='full'] {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #sidebar.bottom-sheet[data-snap='half'] .filters,
  #sidebar.bottom-sheet[data-snap='full'] .filters {
    overflow-y: auto;
    max-height: 40vh;
    -webkit-overflow-scrolling: touch;
  }

  #sidebar.bottom-sheet[data-snap='half'] .school-list,
  #sidebar.bottom-sheet[data-snap='full'] .school-list {
    flex: 1;
    min-height: 80px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* =========================================
   Mobile Touch Target Optimization
   Minimum 48px touch targets for accessibility
   ========================================= */
@media (max-width: 768px) {
  /* Filter preset buttons - increase touch target */
  .filter-preset-btn {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Close buttons - make larger on mobile */
  .mobile-close-btn,
  .close-btn,
  .modal-close,
  .selected-school-close {
    min-width: 48px;
    min-height: 48px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    padding: 0;
  }

  /* View mode buttons */
  .view-modes button {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
  }

  /* Search input - increase height */
  #searchInput,
  .search-input,
  input[type='search'] {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 16px; /* Prevents iOS zoom */
  }

  /* School list items - bigger tap targets */
  .school-item {
    min-height: 60px;
    padding: 12px;
  }

  .school-item-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 8px;
  }

  /* Dropdown items */
  .bomatlas-nav-dropdown-item {
    min-height: 48px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
  }

  /* Sort dropdown */
  .sort-dropdown {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
  }

  /* Action buttons */
  .btn,
  button,
  a.button,
  .button-like {
    min-height: 48px;
    padding: 12px 24px;
    font-size: 14px;
  }

  /* Icon buttons */
  .icon-btn,
  .toggle-btn,
  .expand-btn {
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Checkbox and radio buttons - increase tap area */
  input[type='checkbox'],
  input[type='radio'] {
    min-width: 24px;
    min-height: 24px;
    margin: 12px;
  }

  /* Labels for checkboxes/radios */
  label:has(input[type='checkbox']),
  label:has(input[type='radio']) {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 8px;
  }

  /* Navigation links */
  .nav-link,
  .bomatlas-nav-link {
    min-height: 48px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
  }

  /* Keyboard shortcuts help button */
  .keyboard-help-btn {
    min-width: 48px;
    min-height: 48px;
  }

  /* Ensure proper spacing between touch targets */
  .filter-presets {
    gap: 8px;
  }

  .view-modes {
    gap: 8px;
  }

  /* Bottom sheet handle - bigger grab area */
  .sheet-handle {
    min-height: 48px;
    padding: 16px;
  }

  .sheet-handle-bar {
    width: 48px;
    height: 6px;
  }
}

/* ============================================================================
   ACCESS CONTROL GATES
   Shows login/upgrade prompts when map requires authentication
============================================================================ */

.has-access-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1713 0%, #2b2824 100%);
}

.access-gate {
  text-align: center;
  padding: 48px 32px;
  max-width: 400px;
  background: rgba(43, 40, 36, 0.8);
  border: 1px solid #42403b;
  border-radius: 2px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.access-gate-icon {
  font-size: 64px;
  margin-bottom: 24px;
}

.access-gate h2 {
  color: #f7f4ee;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.access-gate p {
  color: #a4a19b;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px 0;
}

.access-gate-current {
  color: #75726d !important;
  font-size: 13px !important;
  margin-top: 16px !important;
}

.access-gate-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.access-gate .btn {
  padding: 12px 24px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.access-gate .btn-primary {
  background: linear-gradient(135deg, #f8f5ee 0%, #d7d4ce 100%);
  color: #0c0a06;
  border: none;
}

.access-gate .btn-primary:hover {
  background: linear-gradient(135deg, #fffff8 0%, #f8f5ee 100%);
  transform: translateY(-1px);
}

.access-gate .btn-secondary {
  background: transparent;
  color: #d7d3cd;
  border: 1px solid #75726d;
}

.access-gate .btn-secondary:hover {
  background: rgba(117, 114, 109, 0.2);
  color: #f7f4ee;
  border-color: #a4a19b;
}

/* Focus states for keyboard accessibility */
.access-gate .btn:focus {
  outline: none;
}

.access-gate .btn:focus-visible {
  outline: 2px solid #fffff8;
  outline-offset: 2px;
}

/* Locked feature inline prompt */
.locked-feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(204, 201, 195, 0.1);
  border: 1px solid rgba(204, 201, 195, 0.2);
  border-radius: 2px;
  font-size: 12px;
  color: #ccc9c3;
}

.locked-feature-icon {
  font-size: 14px;
}

.locked-feature a {
  color: #ccc9c3;
  text-decoration: underline;
  font-weight: 600;
}

.locked-feature a:hover {
  color: #e9e6df;
}

/* Mobile responsiveness for access gate */
@media (max-width: 480px) {
  .access-gate {
    padding: 32px 24px;
    margin: 16px;
    max-width: calc(100vw - 32px);
  }

  .access-gate-icon {
    font-size: 48px;
    margin-bottom: 16px;
  }

  .access-gate h2 {
    font-size: 20px;
  }

  .access-gate-actions {
    flex-direction: column;
    gap: 8px;
  }

  .access-gate .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
}
/* ============================================
   Mobile Sidebar & Filter Improvements
   Enhanced UX for touch devices
   ============================================ */

@media (max-width: 768px) {
  /* Improved filter chips - larger touch targets, better spacing */
  .filter-chips {
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 2px;
  }

  .filter-chips-row {
    gap: 8px;
    margin-bottom: 8px;
  }

  .filter-chip {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 2px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Better filter section headers */
  .filter-section-header {
    min-height: 52px;
    padding: 14px 16px;
    font-size: 15px;
  }

  .filter-section-content {
    padding: 12px 14px;
  }

  /* Smoother collapsible animation */
  .filter-section-content {
    transition:
      max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.25s ease;
  }

  /* Better search experience */
  .search-container .search-input {
    min-height: 52px;
    padding: 14px 16px 14px 44px;
    font-size: 16px;
    border-radius: 2px;
    background: rgba(43, 40, 36, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .search-container .search-input:focus {
    border-color: #f8f5ee;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    background: rgba(43, 40, 36, 1);
  }

  .search-container .search-icon {
    left: 14px;
    font-size: 18px;
  }

  /* Improved geolocation button */
  .geolocation-btn {
    min-width: 52px;
    min-height: 52px;
    border-radius: 2px;
  }

  /* Better filter dropdowns */
  .filter-select {
    min-height: 52px;
    padding: 14px 36px 14px 16px;
    font-size: 16px;
    border-radius: 2px;
    background: rgba(43, 40, 36, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    -webkit-appearance: none;
    appearance: none;
  }

  /* View mode buttons - larger, clearer */
  .view-mode-btn {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 2px;
    touch-action: manipulation;
  }

  /* Bottom sheet improvements */
  #sidebar.bottom-sheet {
    border-radius: 2px;
  }

  #sidebar.bottom-sheet .sheet-handle {
    padding: 12px 16px 10px;
  }

  #sidebar.bottom-sheet .sheet-handle-bar {
    width: 44px;
    height: 5px;
    border-radius: 2px;
  }

  /* Better scrolling in school list */
  #sidebar.bottom-sheet .school-list {
    scroll-behavior: smooth;
    overscroll-behavior: contain;
  }

  /* School card touch feedback */
  #sidebar.bottom-sheet .school-card {
    transition: background 0.1s ease;
    touch-action: manipulation;
  }

  #sidebar.bottom-sheet .school-card:active {
    background: rgba(255, 255, 255, 0.1);
  }

  /* Prevent text selection during drag */
  #sidebar.bottom-sheet {
    -webkit-user-select: none;
    user-select: none;
  }

  #sidebar.bottom-sheet .school-name,
  #sidebar.bottom-sheet .school-location {
    -webkit-user-select: text;
    user-select: text;
  }
}

/* Small phone optimizations */
@media (max-width: 380px) {
  .filter-chip {
    padding: 8px 12px;
    font-size: 13px;
  }

  .filter-chips-row {
    gap: 6px;
  }

  #sidebar.bottom-sheet .search-input {
    font-size: 15px;
  }

  #sidebar.bottom-sheet .filter-section-header {
    padding: 12px 14px;
    font-size: 14px;
  }
}

/* ============================================
   Reduced Motion - WCAG 2.1 AAA Compliance
   ============================================
   Respects user's prefers-reduced-motion setting.
   Applies to all animations, transitions, and scroll behaviors.
*/
@media (prefers-reduced-motion: reduce) {
  /* Disable all animations */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Cluster markers - disable pulse glow */
  .marker-cluster,
  .marker-cluster-small,
  .marker-cluster-medium,
  .marker-cluster-large {
    animation: none !important;
  }

  /* View transitions - instant switch */
  #map {
    transition: none !important;
  }

  /* Sidebar and bottom sheet - instant open/close */
  #sidebar,
  #sidebar.bottom-sheet {
    transition: none !important;
    transform: none !important;
  }

  #sidebar.bottom-sheet.collapsed {
    transform: translateY(var(--snap-collapsed, 90) vh) !important;
  }

  /* Buttons and interactive elements - instant state changes */
  button,
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-icon,
  .filter-chip,
  .view-btn,
  .school-card {
    transition: none !important;
  }

  /* Filter section accordion - instant expand/collapse */
  .filter-section,
  .filter-section-content {
    transition: none !important;
  }

  /* Loading indicators - static instead of spinning */
  .loading-spinner,
  [class*='spinner'],
  .loading {
    animation: none !important;
  }

  /* Toast notifications - instant appear/disappear */
  .toast,
  .toast-container {
    transition: none !important;
    animation: none !important;
  }

  /* Modal - instant open/close */
  .modal,
  .modal-content,
  .modal-backdrop {
    transition: none !important;
    animation: none !important;
  }

  /* Tooltips - instant show/hide */
  .leaflet-tooltip,
  .hex-tooltip {
    transition: none !important;
  }

  /* Map fade effects - instant */
  .leaflet-fade-anim .leaflet-tile,
  .leaflet-fade-anim .leaflet-popup {
    transition: none !important;
  }

  /* Skip link - instant focus */
  .skip-link {
    transition: none !important;
  }
}

/* ============================================
   Mobile Search Bar, Chips & Half-Sheet Filter
   ============================================ */
@media (max-width: 768px) {
  /* Search Bar — Fixed below header */
  .m-search-bar {
    position: fixed;
    top: var(--header-height, 48px);
    left: 0;
    right: 0;
    z-index: var(--z-search-bar);
    background: rgba(22, 20, 15, 0.97);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    transition: transform 0.3s ease;
  }

  .m-search-bar.hidden {
    transform: translateY(-100%);
    pointer-events: none;
  }

  .m-search-row {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .m-search-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
  }

  .m-search-wrap .search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    padding: 0 12px;
    transition: all 0.2s ease;
  }

  .m-search-wrap .search-container:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(164, 162, 156, 0.5);
    box-shadow: 0 0 0 3px rgba(164, 162, 156, 0.15);
  }

  .m-search-wrap .search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 8px;
    font-size: 16px;
    color: #fffff8;
    outline: none;
    -webkit-appearance: none;
    min-width: 0;
  }

  .m-search-wrap .search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
  }

  .m-search-wrap .search-icon {
    flex-shrink: 0;
    opacity: 0.6;
  }

  /* Icon buttons (location + filters) */
  .m-search-bar .m-btn-icon,
  .m-filters-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    color: #fffff8;
  }

  .m-search-bar .m-btn-icon {
    font-size: 18px;
  }

  .m-filters-btn {
    position: relative;
  }

  .m-filters-btn svg {
    width: 18px;
    height: 18px;
  }

  .m-search-bar .m-btn-icon:active,
  .m-filters-btn:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.96);
  }

  .m-filters-btn.has-active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fffff8;
  }

  .m-filters-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 2px;
    background: #f8f5ee;
    color: #0c0a06;
    font-size: 10px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
  }

  .m-filters-badge.visible {
    display: flex;
  }

  /* Category Chips — no fade mask, padding instead */
  .m-chips {
    display: flex;
    gap: 6px;
    padding: 6px 12px 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .m-chips::-webkit-scrollbar {
    display: none;
  }

  .m-chip {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    min-height: 38px;
    background: rgba(43, 40, 36, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .m-chip:active {
    transform: scale(0.96);
  }

  .m-chip[aria-pressed='true'] {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #f8f5ee;
    font-weight: 600;
  }

  .m-chip-icon {
    font-size: 13px;
  }

  /* Active filter pills row (below chips) */
  .m-active-filters {
    display: none;
    gap: 6px;
    padding: 4px 12px 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .m-active-filters::-webkit-scrollbar {
    display: none;
  }

  .m-active-filters.visible {
    display: flex;
  }

  .m-active-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    color: #bcb9b3;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .m-active-pill:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.96);
  }

  .m-active-pill-x {
    font-size: 14px;
    line-height: 1;
    opacity: 0.6;
    margin-left: 2px;
  }

  /* Hide FAB when sheet is expanded */
  body.sheet-open .mobile-fab,
  body.sheet-open .floating-submit {
    display: none !important;
  }

  /* ---- Filter Half-Sheet ---- */

  /* Backdrop */
  .m-filter-backdrop {
    position: fixed;
    top: var(--header-height, 48px);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--z-modal) - 1);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.2s ease,
      visibility 0.2s ease;
  }

  .m-filter-backdrop.visible {
    opacity: 1;
    visibility: visible;
  }

  /* Half-sheet modal */
  .m-filter-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    max-height: 70vh;
    z-index: var(--z-modal);
    background: rgba(26, 23, 19, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    visibility: hidden;
    transition:
      transform 0.4s cubic-bezier(0.32, 0.72, 0, 1),
      visibility 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  }

  .m-filter-modal.visible {
    visibility: visible;
    transform: translateY(0);
  }

  /* Drag handle */
  .m-filter-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 4px;
    cursor: grab;
    touch-action: none;
  }

  .m-filter-handle-bar {
    width: 40px;
    height: 5px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
  }

  .m-filter-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 12px;
  }

  .m-filter-modal-title {
    font-size: 17px;
    font-weight: 600;
    color: #fffff8;
    margin: 0;
  }

  .m-filter-modal-clear {
    background: none;
    border: none;
    color: #fffff8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    border-radius: 2px;
    transition: background 0.15s ease;
    min-width: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .m-filter-modal-clear:active {
    background: rgba(255, 255, 255, 0.1);
  }

  /* Active pills inside modal */
  .m-filter-active-pills {
    display: none;
    gap: 6px;
    padding: 0 20px 10px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: wrap;
  }

  .m-filter-active-pills::-webkit-scrollbar {
    display: none;
  }

  .m-filter-active-pills.visible {
    display: flex;
  }

  .m-filter-active-pills .m-active-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    color: #bcb9b3;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .m-filter-active-pills .m-active-pill:active {
    background: rgba(255, 255, 255, 0.25);
  }

  .m-filter-modal-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px 20px;
    padding-bottom: 20px;
  }

  /* Filter sections inside modal */
  .m-filter-section {
    margin-bottom: 20px;
  }

  .m-filter-section + .m-filter-section {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .m-filter-section-label {
    font-family: var(--font-mono, monospace);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted, #66635e);
    margin-bottom: 8px;
  }

  /* Side-by-side filter row */
  .m-filter-row {
    display: flex;
    gap: 10px;
  }

  .m-filter-col {
    flex: 1;
    min-width: 0;
  }

  .m-filter-section select,
  .m-filter-section input[type='text'] {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    padding: 12px 14px;
    font-size: 15px;
    color: #fffff8;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
  }

  .m-filter-section select {
    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='%235a6475' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
  }

  .m-filter-section select:focus,
  .m-filter-section input:focus {
    border-color: rgba(164, 162, 156, 0.5);
  }

  .m-filter-section input::placeholder {
    color: rgba(255, 255, 255, 0.4);
  }

  /* State accordion */
  .m-filter-accordion {
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    padding: 12px 14px;
    cursor: pointer;
    color: #fffff8;
    font-size: 14px;
    transition: all 0.15s ease;
    touch-action: manipulation;
  }

  .m-filter-accordion:active {
    background: rgba(255, 255, 255, 0.1);
  }

  .m-filter-accordion .m-filter-section-label {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .m-filter-accordion-value {
    flex: 1;
    text-align: right;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .m-filter-accordion-value.has-value {
    color: var(--gold-primary, #aca9a3);
    font-weight: 500;
  }

  .m-filter-accordion-chevron {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease;
    flex-shrink: 0;
  }

  .m-filter-accordion.expanded .m-filter-accordion-chevron {
    transform: rotate(180deg);
  }

  .m-filter-accordion-body {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 2px;
    overscroll-behavior: contain;
    transition:
      max-height 0.25s ease,
      opacity 0.2s ease;
  }

  .m-filter-accordion-body.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    border: none;
  }

  /* State option items */
  .m-state-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #eae7e1;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    touch-action: manipulation;
    min-height: 44px;
  }

  .m-state-option:active {
    background: rgba(255, 255, 255, 0.05);
  }

  .m-state-option.active {
    color: var(--gold-primary, #aca9a3);
  }

  .m-state-option-check {
    width: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--gold-primary, #aca9a3);
  }

  /* View mode buttons inside modal */
  .m-filter-views {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .m-filter-view-btn {
    padding: 12px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 44px;
    touch-action: manipulation;
  }

  .m-filter-view-btn:active {
    transform: scale(0.98);
  }

  .m-filter-view-btn.active {
    background: rgba(172, 169, 163, 0.15);
    border-color: rgba(172, 169, 163, 0.4);
    color: var(--gold-primary, #aca9a3);
  }

  /* Apply button at bottom of modal */
  .m-filter-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .m-filter-modal-footer {
      padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
  }

  .m-filter-apply-btn {
    width: 100%;
    padding: 14px;
    background: var(--gold-primary, #aca9a3);
    color: var(--text-inverse, #0e0c08);
    border: none;
    border-radius: 2px;
    font-family: var(--font-mono, monospace);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 48px;
    touch-action: manipulation;
  }

  .m-filter-apply-btn:active {
    background: var(--gold-light, #c1beb8);
    transform: scale(0.98);
  }

  /* SR-only filter count */
  .m-filter-count-live {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
} /* end mobile search bar / filter half-sheet */

/* Reduced Motion — mobile filter components */
@media (prefers-reduced-motion: reduce) {
  .m-search-bar,
  .m-filter-modal,
  .m-filter-backdrop,
  .m-chip,
  .m-active-pill {
    transition: none !important;
  }
}

/* iOS Safe Areas — search bar */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    .m-search-bar {
      padding-top: max(8px, env(safe-area-inset-top));
    }
  }
}

/* Body lock when filter modal open */
body.m-filter-modal-open {
  overflow: hidden;
}

/* ============================================
   Keyword Alerts System
   ============================================ */

/* Alert badge on sidebar cards */
.ka-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Modal overlay */
.ka-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ka-modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.ka-modal {
  background: #1a1813;
  border: 1px solid rgba(68, 66, 61, 0.6);
  border-radius: 2px;
  width: 360px;
  max-width: 90vw;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.ka-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(68, 66, 61, 0.4);
}

.ka-modal-title {
  font-weight: 600;
  font-size: 14px;
  color: #f5f2eb;
}

.ka-modal-close {
  background: none;
  border: none;
  color: #999690;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.ka-modal-close:hover {
  color: #f5f2eb;
}

.ka-modal-body {
  padding: 16px;
}

.ka-input-row {
  display: flex;
  gap: 8px;
}

.ka-input {
  flex: 1;
  background: rgba(22, 19, 15, 0.8);
  border: 1px solid rgba(68, 66, 61, 0.5);
  border-radius: 2px;
  padding: 8px 10px;
  color: #f5f2eb;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.ka-input:focus {
  border-color: #f8f5ee;
}

.ka-input::placeholder {
  color: #66635e;
}

.ka-add-btn {
  background: #f8f5ee;
  border: none;
  border-radius: 2px;
  color: #0c0a06;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.ka-add-btn:hover {
  background: #fffff8;
}

.ka-hint {
  font-size: 11px;
  color: #66635e;
  margin-top: 6px;
}

.ka-alert-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ka-alert-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(22, 19, 15, 0.5);
  border-radius: 2px;
}

.ka-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ka-alert-term {
  flex: 1;
  font-size: 13px;
  color: #f5f2eb;
  font-family: 'JetBrains Mono', monospace;
}

.ka-alert-remove {
  background: none;
  border: none;
  color: #66635e;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.ka-alert-remove:hover {
  color: #ec4654;
}

.ka-empty {
  margin-top: 12px;
  text-align: center;
  color: #66635e;
  font-size: 12px;
  padding: 12px;
}

/* ============================================
   Stat Panels Overlay
   ============================================ */
.sp-container {
  position: absolute;
  bottom: 24px;
  left: 12px;
  z-index: 1000;
  pointer-events: auto;
}

.sp-header {
  margin-bottom: 4px;
}

.sp-toggle {
  background: rgba(22, 19, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(68, 66, 61, 0.5);
  border-radius: 2px;
  color: #999690;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.sp-toggle:hover {
  border-color: rgba(68, 66, 61, 0.8);
  color: #f5f2eb;
}

.sp-grid {
  display: flex;
  gap: 4px;
}

.sp-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 10px;
  background: rgba(22, 19, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(68, 66, 61, 0.5);
  border-radius: 2px;
  min-width: 56px;
}

.sp-icon {
  font-size: 10px;
  color: #66635e;
  line-height: 1;
}

.sp-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #f5f2eb;
  line-height: 1.2;
}

.sp-label {
  font-size: 9px;
  color: #66635e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sp-collapsed .sp-grid {
  display: none;
}

@media (max-width: 640px) {
  .sp-container {
    bottom: 16px;
    left: 8px;
  }

  .sp-panel {
    min-width: 48px;
    padding: 4px 8px;
  }

  .sp-value {
    font-size: 12px;
  }
}

/* ============================================
   TRADE SCHOOL ENRICHMENT STYLES
   ============================================ */

/* School type tag in detail panel */
.selected-school-type-tag {
  display: inline-block;
  background: rgba(126, 124, 118, 0.15);
  color: #9b9892;
  padding: 2px 10px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* Accreditation items */
.accred-item {
  padding: 6px 0;
  font-size: 13px;
  color: #d7d3cd;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.accred-item:last-child {
  border-bottom: none;
}
.accred-type {
  display: inline-block;
  background: rgba(168, 165, 159, 0.15);
  color: #c0bdb7;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 6px;
}

/* Financial aid badges row */
.fa-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fa-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #fffff8;
  padding: 4px 10px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
}

/* Credentials badges */
.creds-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cred-badge {
  display: inline-block;
  background: rgba(139, 136, 130, 0.12);
  color: #a8a59f;
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
}

/* Employer partner items */
.partner-item {
  padding: 4px 0;
  font-size: 13px;
  color: #d7d3cd;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.partner-item:last-child {
  border-bottom: none;
}

/* Outcomes grid */
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  padding: 4px 0;
}
.outcome-stat {
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  padding: 10px 6px;
}
.outcome-value {
  font-size: 20px;
  font-weight: 700;
  color: #fcf9f2;
  line-height: 1.2;
}
.outcome-label {
  font-size: 11px;
  color: #a4a19b;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Legacy sidebar card enrichment (kept for compat) */
.school-card-enrich {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.card-type-tag {
  display: inline-block;
  background: rgba(126, 124, 118, 0.12);
  color: #bcb9b3;
  padding: 1px 7px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.card-fa-icon {
  font-size: 12px;
  cursor: default;
}

/* Cross-link from a registrant card into the BOMForge state directory.
   Only rendered for rows that carry a UEI (companies, not schools). */
.school-card .card-bomforge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #bf0a30;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.school-card .card-bomforge:hover {
  color: #d41a40;
}

/* List download (the company pages' lead magnet) in the list header bar,
   next to the sort control, so it is visible without opening the drawer. */
.entity-list-header .entity-list-download {
  margin-left: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #bf0a30;
  background: #bf0a30;
  color: #fff;
  font: 600 12px/1.2 inherit;
  cursor: pointer;
  white-space: nowrap;
}
.entity-list-header .entity-list-download:hover {
  background: #d41a40;
  border-color: #d41a40;
}
