/* ── Shared Navigation (Zillow Typography) ── */
.top-nav {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  padding: 0 var(--space-8);
  height: 60px;
  gap: var(--space-8);
  flex-shrink: 0;
  position: relative;
  z-index: 1001;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #2A2A33;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 0; height: 100%; }
.nav-link {
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0.1px;
  color: #767676;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  height: 100%;
}
.nav-link:hover { color: #2A2A33; }
.nav-link.active { color: var(--md-primary); border-bottom-color: var(--md-primary); }
.nav-spacer { flex: 1; }
.nav-meta {
  font-family: var(--font-number);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: #767676;
  white-space: nowrap;
}

/* ── Memberstack auth nav ── */
.ms-auth-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  white-space: nowrap;
}
.ms-email {
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 13px;
  color: #767676;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ms-btn {
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #2A2A33;
  cursor: pointer;
  transition: all 0.15s;
}
.ms-btn:hover { background: #f4f6f8; border-color: #d1d5db; }
.ms-btn-trial {
  background: #00d4aa;
  border-color: #00d4aa;
  color: #fff;
}
.ms-btn-trial:hover { background: #00bfa0; border-color: #00bfa0; }
.ms-btn-signout { color: #767676; }

/* ── Paywall overlay ── */
.ms-paywall {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  background: rgba(244,246,248,0.6);
}
.ms-paywall-inner {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 40px 48px;
  text-align: center;
  max-width: 440px;
}
.ms-paywall-inner h3 {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 24px;
  font-weight: 700;
  color: #2A2A33;
  margin-bottom: 12px;
}
.ms-paywall-inner p {
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  line-height: 1.6;
  color: #767676;
  margin-bottom: 24px;
}
.ms-paywall-actions { display: flex; gap: 12px; justify-content: center; }

/* ── Metro selector modal ── */
#metro-selector-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(42,42,51,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#metro-selector-overlay.active { display: flex; }
.metro-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.25);
  width: 520px;
  max-width: 94vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.metro-modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
}
.metro-modal-header h3 {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 20px;
  font-weight: 700;
  color: #2A2A33;
  margin: 0 0 4px;
}
.metro-modal-sub {
  font-size: 13px;
  color: #767676;
  margin: 0 0 12px;
}
.metro-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  outline: none;
}
.metro-search:focus { border-color: #00d4aa; }
.metro-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
}
.metro-modal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  border-bottom: 1px solid #f4f6f8;
  font-size: 14px;
}
.metro-modal-item:hover { background: #f4f6f8; }
.metro-modal-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #00d4aa;
  flex-shrink: 0;
}
.metro-modal-name {
  font-weight: 600;
  color: #2A2A33;
}
.metro-modal-msa {
  font-size: 12px;
  color: #9ca3af;
  margin-left: auto;
}
.metro-modal-selected {
  background: #e6faf5;
  border-radius: 4px;
}
.metro-modal-selected .metro-modal-name {
  font-weight: 800;
  color: #00b894;
}
.metro-modal-selected .metro-modal-name::before {
  content: "\2713 ";
}
.metro-modal-disabled { opacity: 0.4; cursor: not-allowed; }
.metro-modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
}
.metro-modal-count {
  font-size: 13px;
  color: #767676;
  margin-right: auto;
}
.metro-modal-save {
  padding: 8px 24px;
  border-radius: 6px;
  border: none;
  background: #00d4aa;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.metro-modal-save:hover { background: #00bfa0; }
.metro-modal-cancel {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #767676;
  font-size: 14px;
  cursor: pointer;
}
.metro-modal-cancel:hover { background: #f4f6f8; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .top-nav { padding: 0 var(--space-4); gap: var(--space-3); }
  .nav-link { padding: 0 var(--space-3); font-size: 12px; }
}
@media (max-width: 480px) {
  .nav-links { display: none; }
}
