/*
 * EquiSci — Main Stylesheet v2.1 (Polished)
 * Nexus Institute for Translational Research (NITR)
 * License: Apache 2.0
 * Copyright 2026 NITR
 */

/* =============================================
   CSS CUSTOM PROPERTIES — DESIGN SYSTEM
   ============================================= */
:root {
  --navy: #1B3A6B;
  --navy-light: #2A5298;
  --navy-dark: #12264A;
  --teal: #00897B;
  --teal-light: #26A69A;
  --teal-dark: #00695C;
  --coral: #E57373;
  --coral-dark: #C62828;
  --bg: #F8FAFC;
  --bg-alt: #EEF2F7;
  --white: #FFFFFF;
  --card-bg: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --text-primary: #1A202C;
  --text-secondary: #4A5568;
  --text-muted: #718096;
  --text-light: #A0AEC0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition: 0.2s ease;
  --transition-md: 0.35s ease;

  --gradient-hero: linear-gradient(135deg, #0a1f3d 0%, #1B3A6B 35%, #1a5276 65%, #0d3b5e 100%);
  --gradient-teal: linear-gradient(135deg, #00897B 0%, #26A69A 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --gradient-glow: radial-gradient(ellipse at top, rgba(0,137,123,0.15) 0%, transparent 70%);
  --shadow-glow: 0 0 40px rgba(0,137,123,0.15);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06);
  
  /* Loading states */
  --loading-bg: rgba(255,255,255,0.9);
  --loading-spinner: #00897B;
  --loading-text: #4A5568;
  
  /* Additional shadows */
  --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  --shadow-navbar: 0 1px 0 rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.06);

  /* Severity colors */
  --sev-1: #48BB78;
  --sev-2: #ECC94B;
  --sev-3: #ED8936;
  --sev-4: #E53E3E;
  --sev-5: #742A2A;

  /* Disease colors */
  --dis-long-covid: #7C3AED;
  --dis-hiv: #D53F8C;
  --dis-sepsis: #C05621;
  --dis-covid19: #2B6CB0;
  --dis-tb: #276749;
  --dis-influenza: #B7791F;
  --dis-pneumonia: #2C7A7B;
  --dis-malaria: #553C9A;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; padding-top: 68px; }
a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal-dark); }
ul { list-style: none; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: var(--font); }
h1,h2,h3,h4,h5,h6 { line-height: 1.3; font-weight: 700; color: var(--text-primary); }
.hero-title { font-family: var(--font-display) !important; }

/* =============================================
   LOADING STATES & SPINNER
   ============================================= */
.loading-stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  background: var(--loading-bg);
  border-radius: var(--radius-lg);
  margin: 20px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-light);
  border-top: 4px solid var(--loading-spinner);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-stub h3 {
  color: var(--loading-text);
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.loading-stub p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.9rem;
}

/* Spinner animations/icons fully disabled per UX request */
.spinner,
.fa-spinner,
.fa-circle-notch {
  display: none !important;
}

.fa-spin,
.fa-pulse {
  animation: none !important;
  transform: none !important;
}

/* Loading overlay for full page */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--loading-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.section-header h2 { font-family: var(--font-display); }

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,0.8);
  box-shadow: var(--shadow-navbar);
  height: 68px;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.99);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-size: 1.25rem; font-weight: 800; background: linear-gradient(135deg, var(--navy) 0%, #2A5298 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.5px; }
.logo-sub { font-size: 0.65rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--navy);
  background: linear-gradient(135deg, #EEF2F7 0%, #E8EDF5 100%);
}
.nav-link.active { color: var(--navy); font-weight: 600; }
.nav-link-enterprise {
  color: var(--teal) !important;
  border: 1px solid var(--teal);
  padding: 7px 14px;
}
.nav-link-enterprise:hover { background: var(--teal) !important; color: white !important; }
.nav-link-api {
  background: var(--navy);
  color: white !important;
  padding: 8px 16px;
}
.nav-link-api:hover { background: var(--navy-light) !important; color: white !important; }
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--navy);
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* =============================================
   NAV "MORE" DROPDOWN
   ============================================= */
.nav-more-wrapper {
  position: relative;
}
.nav-more-btn {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}
.nav-more-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 1100;
  padding: 6px 0;
  list-style: none;
  animation: dropdownFadeIn 0.15s ease;
}
.nav-more-dropdown.open {
  display: block;
}
.nav-more-dropdown li a,
.nav-more-dropdown li button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--transition);
  border-radius: 0;
  white-space: nowrap;
}
.nav-more-dropdown li a:hover,
.nav-more-dropdown li button:hover {
  background: var(--bg-alt);
  color: var(--navy);
}
.nav-more-divider {
  border-top: 1px solid var(--border);
  margin: 4px 0;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1500px; margin: 0 auto; padding: 0 24px; }
.section-header { margin-bottom: 48px; }
.section-header h2 { font-size: 2rem; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.section-header p { font-size: 1.05rem; color: var(--text-secondary); max-width: 600px; }
.text-teal { color: var(--teal); }
.text-coral { color: var(--coral); }
.text-navy { color: var(--navy); }
.hidden { display: none !important; pointer-events: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Defensive click-safety: hidden/fullscreen overlays must not block navigation */
.loading-overlay,
#helpModalOverlay[style*="display:none"],
#waitlistOverlay[style*="display:none"] {
  display: none !important;
  pointer-events: none !important;
}

#gapDetailOverlay.hidden {
  pointer-events: none !important;
}

#helpModalOverlay[style*="display:flex"],
#waitlistOverlay[style*="display:flex"],
#gapDetailOverlay:not(.hidden) {
  pointer-events: auto !important;
}

/* Badges / Pills */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; white-space: nowrap; }
.badge-pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600; }
.badge-apache { background: #FFF3E0; color: #E65100; }
.badge-cc { background: #E8F5E9; color: #1B5E20; }
.badge-open { background: #E3F2FD; color: #0D47A1; }

/* Severity Badges */
.sev-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; }
.sev-1 { background: #F0FFF4; color: var(--sev-1); border: 1px solid #C6F6D5; }
.sev-2 { background: #FFFFF0; color: #B7791F; border: 1px solid #FAF089; }
.sev-3 { background: #FFFAF0; color: #C05621; border: 1px solid #FEEBC8; }
.sev-4 { background: #FFF5F5; color: var(--sev-4); border: 1px solid #FED7D7; }
.sev-5 { background: #FFF5F5; color: var(--sev-5); border: 1px solid #FC8181; }

/* Disease Pills */
.dis-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600; text-transform: capitalize; }
.dis-long_covid { background: #EDE9FE; color: var(--dis-long-covid); }
.dis-hiv { background: #FDF2F8; color: var(--dis-hiv); }
.dis-sepsis { background: #FFF8F1; color: var(--dis-sepsis); }
.dis-covid19, .dis-covid_19 { background: #EBF8FF; color: var(--dis-covid19); }
.dis-tuberculosis { background: #F0FFF4; color: var(--dis-tb); }
.dis-influenza { background: #FFFFF0; color: var(--dis-influenza); }
.dis-pneumonia { background: #E6FFFA; color: var(--dis-pneumonia); }
.dis-malaria { background: #FAF5FF; color: var(--dis-malaria); }
/* Expansion diseases — auto-colored from data.js color values */
.dis-cholera { background: #E0F7FA; color: #006064; }
.dis-typhoid { background: #F1F8E9; color: #33691E; }
.dis-dengue { background: #FBE9E7; color: #BF360C; }
.dis-zika { background: #F3E5F5; color: #6A1B9A; }
.dis-ebola { background: #FFEBEE; color: #B71C1C; }
.dis-hepatitis_c { background: #FFF3E0; color: #E65100; }
.dis-hepatitis_b { background: #E8EAF6; color: #283593; }
.dis-syphilis { background: #FCE4EC; color: #880E4F; }
.dis-leishmaniasis { background: #EFEBE9; color: #4E342E; }
.dis-chagas { background: #EFEBE9; color: #3E2723; }
.dis-schistosomiasis { background: #ECEFF1; color: #263238; }
.dis-meningitis { background: #FFEBEE; color: #C62828; }
.dis-gonorrhea { background: #FFF8E1; color: #E65100; }
.dis-chlamydia { background: #F8BBD9; color: #880E4F; }
.dis-mpox { background: #F1F8E9; color: #33691E; }
.dis-rsv { background: #E3F2FD; color: #0D47A1; }
.dis-strep_a { background: #FBE9E7; color: #BF360C; }
.dis-lupus { background: #F3E5F5; color: #6A1B9A; }
.dis-pcos { background: #FCE4EC; color: #880E4F; }
.dis-lipedema { background: #F3E5F5; color: #4A148C; }
.dis-lymphedema { background: #E0F7FA; color: #006064; }
.dis-type2_diabetes { background: #FFFDE7; color: #F57F17; }
.dis-fibromyalgia { background: #FBE9E7; color: #BF360C; }
.dis-endometriosis { background: #FFEBEE; color: #B71C1C; }
.dis-obesity { background: #FFF3E0; color: #E65100; }
.dis-hashimotos_thyroid { background: #FFF3E0; color: #BF360C; }
.dis-nonalcoholic_fatty_liver { background: #FFF8E1; color: #F57F17; }
.dis-pcos_metabolic { background: #FFF8E1; color: #F57F17; }
.dis-ms { background: #EDE7F6; color: #4527A0; }
.dis-rheumatoid_arthritis { background: #EDE7F6; color: #311B92; }
.dis-sjogrens { background: #EDE7F6; color: #4527A0; }
.dis-uterine_fibroids { background: #EDE7F6; color: #4527A0; }
.dis-cervical_cancer { background: #F3E5F5; color: #6A1B9A; }
.dis-preeclampsia { background: #FCE4EC; color: #880E4F; }
.dis-sickle_cell { background: #FFF8E1; color: #BF360C; }
.dis-maternal_mortality { background: #FFF3E0; color: #E65100; }
.dis-intimate_partner_violence { background: #FFEBEE; color: #C62828; }
/* NEW 2026 — Cosmetics / Scalp / Consumer-Product & Oncology */
.dis-alopecia { background: #FEF3C7; color: #92400E; }
.dis-estrogen_disruptors { background: #FCE7F3; color: #9D174D; }
.dis-health_supplements { background: #CCFBF1; color: #0F766E; }
.dis-hair_extensions_scalp { background: #FEF3C7; color: #78350F; }
.dis-breast_cancer { background: #FCE7F3; color: #BE185D; }

/* Gap Type Badge */
.gap-type-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.68rem; font-weight: 600; background: var(--bg-alt); color: var(--text-secondary); border: 1px solid var(--border); text-transform: replace; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-md); font-size: 0.9rem; font-weight: 600; border: none; transition: all var(--transition); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--gradient-teal); color: white; box-shadow: 0 4px 15px rgba(0,137,123,0.3); }
.btn-primary:hover { background: linear-gradient(135deg, #00796B 0%, #00897B 100%); color: white; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,137,123,0.45); }
.btn-secondary { background: white; color: var(--navy); border: 2px solid var(--navy); }
.btn-secondary:hover { background: var(--navy); color: white; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-outline:hover { background: var(--teal); color: white; }
.btn-sm { padding: 7px 16px; font-size: 0.8rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; border-radius: var(--radius-lg); }

/* Cards */
.card { background: var(--gradient-card); border-radius: var(--radius-lg); border: 1px solid rgba(226,232,240,0.8); box-shadow: var(--shadow-card); transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease; }
.card:hover { box-shadow: var(--shadow-card-hover); border-color: rgba(0,137,123,0.2); }
.card-elevated { box-shadow: var(--shadow-card-hover); }
.card-elevated:hover { box-shadow: 0 16px 48px rgba(0,0,0,0.14); transform: translateY(-3px); border-color: rgba(0,137,123,0.25); }

/* =============================================
   HOME PAGE
   ============================================= */
.hero-section {
  background: var(--gradient-hero);
  padding: 110px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(0,137,123,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-section .hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.4;
}
.hero-section .hero-orb-1 {
  width: 500px; height: 500px;
  background: rgba(0,137,123,0.25);
  top: -100px; right: -100px;
}
.hero-section .hero-orb-2 {
  width: 300px; height: 300px;
  background: rgba(77,182,172,0.2);
  bottom: -50px; left: 20%;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300897B' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-container { max-width: 1300px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,137,123,0.2); border: 1px solid rgba(0,137,123,0.4); color: #4DB6AC; padding: 6px 16px; border-radius: var(--radius-full); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 24px; }
.hero-title { font-size: 3.4rem; font-weight: 900; font-family: var(--font-display); color: white; line-height: 1.12; margin-bottom: 24px; letter-spacing: -0.5px; text-shadow: 0 2px 20px rgba(0,0,0,0.2); }
.hero-title .highlight { color: #4DB6AC; }
.hero-subtitle { font-size: 1.1rem; color: rgba(255,255,255,0.8); line-height: 1.7; margin-bottom: 36px; max-width: 520px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-stat-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 18px 16px 16px;
  text-align: center;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: all 0.28s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}
.hero-stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.06) 0%, transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}
.hero-stat-card:hover {
  background: rgba(255,255,255,0.13);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  border-color: rgba(77,182,172,0.45);
}
.hero-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  backdrop-filter: blur(8px);
}
.hero-stat-value { font-size: 2.1rem; font-weight: 900; color: #4DB6AC; line-height: 1; margin-bottom: 5px; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.hero-stat-label { font-size: 0.7rem; color: rgba(255,255,255,0.6); font-weight: 500; text-transform: uppercase; letter-spacing: 0.6px; }

/* Ticker */
.ticker-wrapper {
  background: var(--coral-dark);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
}
.ticker-wrapper::before, .ticker-wrapper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.ticker-wrapper::before { left: 0; background: linear-gradient(to right, var(--coral-dark), transparent); }
.ticker-wrapper::after { right: 0; background: linear-gradient(to left, var(--coral-dark), transparent); }
.ticker-track { display: flex; gap: 0; animation: tickerScroll 30s linear infinite; white-space: nowrap; width: max-content; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 32px; font-size: 0.82rem; font-weight: 600; color: white; }
.ticker-icon { color: #FFCDD2; font-size: 0.8rem; }
.ticker-sep { color: rgba(255,255,255,0.4); margin: 0 8px; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* KPI Section */
.kpi-section { padding: 80px 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 60px; }
.kpi-card {
  background: var(--card-bg);
  border: 1px solid rgba(226,232,240,0.7);
  border-radius: 20px;
  padding: 32px 24px 28px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.05);
  transition: all 0.28s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
}
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--teal); }
.kpi-card:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.12); transform: translateY(-4px); border-color: rgba(0,137,123,0.2); }
.kpi-card:nth-child(2)::before { background: var(--navy); }
.kpi-card:nth-child(3)::before { background: var(--coral); }
.kpi-card:nth-child(4)::before { background: #7C3AED; }
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--teal); border-radius: 3px 3px 0 0; }
.kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.25rem;
  transition: transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.kpi-card:hover .kpi-icon { transform: scale(1.1) rotate(-3deg); }
.kpi-icon-teal { background: linear-gradient(145deg,#d0f0ed,#e6f9f7); color: var(--teal); }
.kpi-icon-navy { background: linear-gradient(145deg,#dce8f8,#ebf2fc); color: var(--navy); }
.kpi-icon-coral { background: linear-gradient(145deg,#fde8e8,#fff0f0); color: var(--coral); }
.kpi-icon-purple { background: linear-gradient(145deg,#ede8ff,#f5f0ff); color: #7C3AED; }
.kpi-value { font-size: 2.6rem; font-weight: 900; color: var(--navy); line-height: 1; margin-bottom: 8px; font-variant-numeric: tabular-nums; letter-spacing: -1.5px; }
.kpi-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.6px; line-height: 1.4; }

/* Featured Gaps */
.featured-gaps { padding: 80px 0; background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%); }
.gap-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gap-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gap-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--teal); }
.gap-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gap-card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.gap-card-title { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); line-height: 1.4; }
.gap-card-desc { font-size: 0.83rem; color: var(--text-secondary); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gap-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border-light); }
.gap-card-pmids { font-size: 0.75rem; color: var(--text-muted); }
.gap-card-link { font-size: 0.8rem; font-weight: 600; color: var(--teal); display: inline-flex; align-items: center; gap: 4px; }
.gap-card-link:hover { color: var(--teal-dark); }

/* Mission Strip */
.mission-strip { padding: 80px 0; background: var(--navy); }
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.mission-item { padding: 48px 40px; text-align: center; position: relative; }
.mission-item::after { content: ''; position: absolute; right: 0; top: 20%; bottom: 20%; width: 1px; background: rgba(255,255,255,0.15); }
.mission-item:last-child::after { display: none; }
.mission-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 1.5rem; background: rgba(0,137,123,0.2); color: #4DB6AC; border: 1px solid rgba(0,137,123,0.3); }
.mission-title { font-size: 1.2rem; font-weight: 700; color: white; margin-bottom: 12px; }
.mission-desc { font-size: 0.88rem; color: rgba(255,255,255,0.7); line-height: 1.7; }

/* =============================================
   GAP EXPLORER PAGE
   ============================================= */
.explorer-page { display: flex; min-height: calc(100vh - 68px); }
.explorer-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow-y: auto;
}
.explorer-sidebar::-webkit-scrollbar { width: 4px; }
.explorer-sidebar::-webkit-scrollbar-track { background: transparent; }
.explorer-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.explorer-main { flex: 1; padding: 32px; overflow-y: auto; }
.filter-section { margin-bottom: 24px; }
.filter-section-title { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.filter-search { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-family: var(--font); font-size: 0.875rem; color: var(--text-primary); background: var(--bg); outline: none; transition: border-color var(--transition); }
.filter-search:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,137,123,0.1); }
.filter-checkbox-list { display: flex; flex-direction: column; gap: 8px; }
.filter-checkbox-item { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.filter-checkbox-item input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--teal); cursor: pointer; }
.filter-checkbox-item label { font-size: 0.83rem; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; gap: 6px; flex: 1; }
.filter-checkbox-item label .count { margin-left: auto; font-size: 0.72rem; background: var(--bg-alt); color: var(--text-muted); padding: 1px 6px; border-radius: var(--radius-full); }
.filter-select { width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-family: var(--font); font-size: 0.83rem; color: var(--text-secondary); background: var(--bg); outline: none; cursor: pointer; transition: border-color var(--transition); }
.filter-select:focus { border-color: var(--teal); }
.filter-range { width: 100%; accent-color: var(--teal); }
.filter-range-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.active-filters-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.active-filter-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--teal); color: white; padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 600; }
.active-filter-chip button { background: none; border: none; color: white; padding: 0; font-size: 0.7rem; cursor: pointer; opacity: 0.8; line-height: 1; }
.active-filter-chip button:hover { opacity: 1; }
.clear-filters-btn { background: none; border: none; color: var(--coral); font-size: 0.78rem; font-weight: 600; cursor: pointer; padding: 6px 0; display: flex; align-items: center; gap: 4px; }
.clear-filters-btn:hover { color: var(--coral-dark); }
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.results-count { font-size: 0.9rem; color: var(--text-secondary); }
.results-count strong { color: var(--navy); font-weight: 700; }
.sort-controls { display: flex; align-items: center; gap: 8px; }
.sort-controls label { font-size: 0.82rem; color: var(--text-muted); }
.sort-select { padding: 7px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-size: 0.82rem; font-family: var(--font); background: white; color: var(--text-primary); outline: none; cursor: pointer; }
.gap-cards-grid-2col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* Gap Detail Panel */
.gap-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: flex; justify-content: flex-end; backdrop-filter: blur(3px); }
.gap-panel { width: 480px; max-width: 100%; background: var(--card-bg); height: 100vh; overflow-y: auto; padding: 32px; box-shadow: var(--shadow-xl); position: relative; animation: slideInRight 0.3s ease; }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.gap-panel-close { position: absolute; top: 20px; right: 20px; background: var(--bg-alt); border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 0.9rem; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.gap-panel-close:hover { background: var(--coral); color: white; }
.gap-panel-severity { font-size: 3rem; font-weight: 900; color: var(--navy); line-height: 1; margin-bottom: 6px; }
.gap-panel-title { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); line-height: 1.4; margin-bottom: 16px; }
.gap-panel-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.gap-panel-section { margin-bottom: 20px; }
.gap-panel-section-title { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.gap-panel-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.clinical-impact-box { background: #FFF8F0; border: 1px solid #FEEBC8; border-left: 3px solid var(--coral); border-radius: var(--radius-md); padding: 14px 16px; }
.clinical-impact-label { font-size: 0.72rem; font-weight: 700; color: var(--coral-dark); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.clinical-impact-text { font-size: 0.88rem; color: #7B341E; line-height: 1.6; }
.pmids-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pmid-link { display: inline-flex; align-items: center; gap: 4px; background: #EBF8FF; color: #2B6CB0; padding: 4px 10px; border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 600; font-family: var(--font-mono); transition: all var(--transition); border: 1px solid #BEE3F8; }
.pmid-link:hover { background: #2B6CB0; color: white; }
.report-issue-btn { width: 100%; margin-top: 12px; }

/* =============================================
   VISUALIZATIONS PAGE
   ============================================= */
.viz-page { padding: 60px 0; }
.viz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.viz-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.viz-card.full-width { grid-column: 1 / -1; }
.viz-card-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.viz-card-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 24px; }
.viz-chart-area { width: 100%; }
.chart-tooltip {
  position: absolute;
  background: rgba(26,32,44,0.92);
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 100;
  max-width: 220px;
  line-height: 1.5;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(4px);
}

/* =============================================
   DATA SOURCES PAGE
   ============================================= */
.data-page { padding: 60px 0; }
.pipeline-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 60px; }
.pipeline-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-sm); transition: all 0.28s cubic-bezier(0.34,1.56,0.64,1); }
.pipeline-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(0,137,123,0.25); }
.pipeline-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0; }
.pipeline-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.pipeline-status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--radius-full); font-size: 0.68rem; font-weight: 700; }
.status-active { background: #F0FFF4; color: #276749; border: 1px solid #C6F6D5; }
.status-validation { background: #EBF8FF; color: #2B6CB0; border: 1px solid #BEE3F8; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.pipeline-name { font-size: 0.92rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; line-height: 1.3; }
.pipeline-count { font-size: 1.8rem; font-weight: 900; color: var(--teal); line-height: 1; margin-bottom: 3px; letter-spacing: -1px; }
.pipeline-unit { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.pipeline-meta { font-size: 0.75rem; color: var(--text-muted); }
.progress-bar-wrap { background: var(--bg-alt); border-radius: var(--radius-full); height: 6px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: var(--radius-full); transition: width 1.5s ease; background: linear-gradient(90deg, var(--teal) 0%, var(--teal-light) 100%); }

/* Sex-dis metrics */
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 60px; }
.metric-ring-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; text-align: center; box-shadow: var(--shadow-sm); }
.ring-container { position: relative; width: 120px; height: 120px; margin: 0 auto 16px; }
.ring-svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--bg-alt); stroke-width: 10; }
.ring-fill { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray 1.5s ease; }
.ring-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.ring-pct { font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1; }
.ring-pct-label { font-size: 0.65rem; color: var(--text-muted); }
.metric-title { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.metric-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* Log table */
.log-table-wrap { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.log-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.log-table th { background: var(--bg-alt); padding: 12px 16px; text-align: left; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.log-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); vertical-align: middle; }
.log-table tr:last-child td { border-bottom: none; }
.log-table tr:hover td { background: var(--bg); }
.log-status-ok { color: var(--teal); font-weight: 600; }
.log-status-warn { color: #C05621; font-weight: 600; }

/* =============================================
   API DOCS PAGE
   ============================================= */
.api-page { padding: 60px 0; }
.api-header-card { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); border-radius: var(--radius-xl); padding: 40px; margin-bottom: 40px; color: white; }
.api-title { font-size: 2rem; font-weight: 800; color: white; margin-bottom: 8px; }
.api-base-url { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); padding: 8px 18px; border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 0.88rem; color: #81E6D9; border: 1px solid rgba(255,255,255,0.15); margin: 12px 0; }
.api-desc { color: rgba(255,255,255,0.8); font-size: 0.9rem; margin-bottom: 16px; }
.api-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.api-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 14px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; }
.api-badge-apache { background: rgba(255,152,0,0.2); color: #FFCC80; border: 1px solid rgba(255,152,0,0.3); }
.api-badge-free { background: rgba(0,137,123,0.2); color: #80CBC4; border: 1px solid rgba(0,137,123,0.3); }
.endpoint-list { display: flex; flex-direction: column; gap: 12px; }
.endpoint-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.endpoint-header { display: flex; align-items: center; gap: 12px; padding: 18px 24px; cursor: pointer; transition: background var(--transition); }
.endpoint-header:hover { background: var(--bg); }
.method-badge { padding: 4px 12px; border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 700; font-family: var(--font-mono); letter-spacing: 0.5px; white-space: nowrap; }
.method-get { background: #E8F5E9; color: #2E7D32; }
.method-post { background: #E3F2FD; color: #1565C0; }
.endpoint-path { font-family: var(--font-mono); font-size: 0.88rem; color: var(--navy); font-weight: 600; flex: 1; }
.endpoint-description { font-size: 0.83rem; color: var(--text-muted); }
.endpoint-chevron { color: var(--text-light); transition: transform var(--transition); margin-left: auto; flex-shrink: 0; }
.endpoint-card.open .endpoint-chevron { transform: rotate(180deg); }
.endpoint-body { display: none; padding: 0 24px 24px; border-top: 1px solid var(--border-light); }
.endpoint-card.open .endpoint-body { display: block; }
.params-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.82rem; }
.params-table th { background: var(--bg-alt); padding: 8px 12px; text-align: left; font-weight: 700; color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; }
.params-table td { padding: 8px 12px; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); vertical-align: top; }
.param-name { font-family: var(--font-mono); color: var(--navy); font-weight: 600; font-size: 0.82rem; }
.param-type { font-family: var(--font-mono); color: #7C3AED; font-size: 0.78rem; }
.param-optional { color: var(--text-light); font-size: 0.72rem; }
.param-required { color: var(--coral-dark); font-size: 0.72rem; font-weight: 600; }
.code-block { background: #1A202C; border-radius: var(--radius-md); padding: 16px 20px; margin: 12px 0; overflow-x: auto; position: relative; }
.code-block pre { font-family: var(--font-mono); font-size: 0.8rem; color: #E2E8F0; line-height: 1.6; margin: 0; white-space: pre-wrap; word-break: break-all; }
.code-block .code-label { position: absolute; top: 8px; right: 12px; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; color: #718096; letter-spacing: 0.5px; }
.curl-keyword { color: #68D391; }
.curl-url { color: #63B3ED; }
.curl-flag { color: #FC8181; }
.json-key { color: #68D391; }
.json-str { color: #FBD38D; }
.json-num { color: #90CDF4; }
.json-bool { color: #FC8181; }

/* =============================================
   ABOUT PAGE
   ============================================= */
.about-page { padding: 60px 0; }
.about-hero { background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%); padding: 80px 0; text-align: center; color: white; margin-bottom: 60px; }
.about-hero h1 { font-size: 2.5rem; font-weight: 900; color: white; margin-bottom: 16px; }
.about-hero p { font-size: 1.05rem; color: rgba(255,255,255,0.8); max-width: 700px; margin: 0 auto; line-height: 1.7; }
.problem-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 60px; }
.problem-stat { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; text-align: center; box-shadow: var(--shadow-sm); border-top: 4px solid var(--coral); }
.problem-stat-value { font-size: 2.8rem; font-weight: 900; color: var(--coral); line-height: 1; margin-bottom: 12px; }
.problem-stat-text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.tech-flow { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; margin: 40px 0; }
.tech-step { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; text-align: center; min-width: 150px; box-shadow: var(--shadow-sm); }
.tech-step-icon { font-size: 1.5rem; margin-bottom: 8px; }
.tech-step-name { font-size: 0.82rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.tech-step-tool { font-size: 0.72rem; color: var(--text-muted); }
.tech-arrow { font-size: 1.2rem; color: var(--teal); margin: 0 8px; flex-shrink: 0; }
.cite-card { background: var(--bg-alt); border: 1px solid var(--border); border-left: 3px solid var(--navy); border-radius: var(--radius-md); padding: 16px 20px; margin-bottom: 12px; }
.cite-title { font-size: 0.88rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.cite-journal { font-size: 0.8rem; color: var(--teal); font-weight: 600; margin-bottom: 4px; }
.cite-text { font-size: 0.8rem; color: var(--text-secondary); }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; text-align: center; box-shadow: var(--shadow-sm); }
.team-avatar { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 1.5rem; color: white; font-weight: 700; }
.team-name { font-size: 0.9rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.team-role { font-size: 0.78rem; color: var(--teal); font-weight: 600; margin-bottom: 6px; }
.team-dept { font-size: 0.75rem; color: var(--text-muted); }
.grant-ack { background: linear-gradient(135deg, #E8F5E9, #E3F2FD); border: 1px solid #C8E6C9; border-radius: var(--radius-xl); padding: 40px; text-align: center; margin-top: 60px; }
.grant-ack h3 { font-size: 1.2rem; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.grant-ack p { font-size: 0.88rem; color: var(--text-secondary); max-width: 700px; margin: 0 auto; line-height: 1.7; }

/* =============================================
   ENTERPRISE PAGE
   ============================================= */
.enterprise-page { }
.enterprise-hero { background: linear-gradient(135deg, var(--navy-dark), #1a5276); padding: 100px 0 80px; color: white; text-align: center; }
.enterprise-hero h1 { font-size: 2.8rem; font-weight: 900; color: white; margin-bottom: 16px; }
.enterprise-hero p { font-size: 1.1rem; color: rgba(255,255,255,0.8); max-width: 650px; margin: 0 auto; line-height: 1.7; }
.pricing-section { padding: 80px 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pricing-card { background: var(--card-bg); border: 1.5px solid var(--border); border-radius: var(--radius-xl); padding: 40px 32px; box-shadow: var(--shadow-sm); transition: all var(--transition-md); position: relative; }
.pricing-card.featured { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(0,137,123,0.2), var(--shadow-lg); transform: scale(1.02); }
.pricing-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--teal); color: white; padding: 5px 20px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.pricing-tier { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; }
.pricing-name { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.pricing-price { font-size: 2.5rem; font-weight: 900; color: var(--navy); line-height: 1; margin-bottom: 4px; }
.pricing-price span { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.pricing-desc { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 28px; line-height: 1.5; }
.pricing-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.pricing-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.pricing-feature { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; }
.pricing-feature i { color: var(--teal); flex-shrink: 0; margin-top: 3px; }
.pricing-feature.no i { color: var(--text-light); }
.pricing-feature.no { color: var(--text-light); }
.pricing-cta { width: 100%; padding: 14px; border-radius: var(--radius-md); font-size: 0.9rem; font-weight: 700; border: none; cursor: pointer; transition: all var(--transition); }
.pricing-cta-primary { background: var(--teal); color: white; }
.pricing-cta-primary:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,137,123,0.35); }
.pricing-cta-outline { background: white; color: var(--navy); border: 2px solid var(--navy); }
.pricing-cta-outline:hover { background: var(--navy); color: white; }
.contact-section { padding: 80px 0; background: var(--bg-alt); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-form { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px; box-shadow: var(--shadow-md); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.form-control { width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-family: var(--font); font-size: 0.88rem; color: var(--text-primary); background: var(--bg); outline: none; transition: border-color var(--transition); }
.form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,137,123,0.1); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-submit { width: 100%; padding: 14px; background: var(--teal); color: white; border: none; border-radius: var(--radius-md); font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all var(--transition); }
.form-submit:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,137,123,0.35); }
.form-success { display: none; background: #E8F5E9; border: 1px solid #C8E6C9; border-radius: var(--radius-md); padding: 16px; text-align: center; color: #276749; font-weight: 600; }
.partner-logos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.partner-logo-placeholder { background: var(--bg-alt); border: 2px dashed var(--border); border-radius: var(--radius-lg); height: 80px; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }

/* =============================================
   FOOTER
   ============================================= */
.footer { background: #0F2342; color: rgba(255,255,255,0.8); padding: 60px 0 0; margin-top: auto; }
.footer-container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 800; color: white; margin-bottom: 12px; }
.footer-brand p { font-size: 0.83rem; color: rgba(255,255,255,0.6); line-height: 1.7; margin-bottom: 16px; }
.footer-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-links-col h4 { font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 16px; }
.footer-links-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links-col ul li a { font-size: 0.85rem; color: rgba(255,255,255,0.65); transition: color var(--transition); }
.footer-links-col ul li a:hover { color: #4DB6AC; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 24px 0; text-align: center; }
.footer-grant { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.footer-grant strong { color: rgba(255,255,255,0.75); }
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.4); }

/* =============================================
   PAGE HERO SHARED
   ============================================= */
.page-hero { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); padding: 60px 0; color: white; }
.page-hero h1 { font-size: 2.2rem; font-weight: 900; color: white; margin-bottom: 12px; }
.page-hero p { font-size: 1rem; color: rgba(255,255,255,0.8); max-width: 600px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.breadcrumb a { color: rgba(255,255,255,0.5); }
.breadcrumb a:hover { color: white; }
.breadcrumb-sep { font-size: 0.65rem; }

/* =============================================
   SECTION DIVIDERS & HELPERS
   ============================================= */
.section-divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.section-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-muted); padding: 5px 14px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }

/* =============================================
   LOADING / EMPTY STATES
   ============================================= */
.empty-state { text-align: center; padding: 80px 24px; }
.empty-state-icon { font-size: 3rem; color: var(--text-light); margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.88rem; color: var(--text-muted); }

/* =============================================
   NOTIFICATION TOAST
   ============================================= */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--navy); color: white; padding: 14px 20px; border-radius: var(--radius-md); font-size: 0.88rem; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 3000; transform: translateY(100px); opacity: 0; transition: all 0.3s ease; max-width: 320px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--teal); }
.toast.error { background: var(--coral-dark); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-title { font-size: 2.5rem; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .gap-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .viz-grid { grid-template-columns: 1fr; }
  .viz-card.full-width { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .explorer-page { flex-direction: column; }
  .explorer-sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .gap-cards-grid-2col { grid-template-columns: 1fr; }
  .mission-grid { grid-template-columns: 1fr; }
  .mission-item::after { display: none; }
  .metrics-grid { grid-template-columns: 1fr; }
  .problem-stats { grid-template-columns: 1fr; }
  .pipeline-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: scale(1); }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: fixed; top: 68px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--border); padding: 20px; gap: 4px; box-shadow: var(--shadow-md); z-index: 999; }
  .nav-links.open { display: flex; }
  .nav-mobile-toggle { display: flex; }
  .hero-title { font-size: 2rem; }
  .gap-cards-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .gap-panel { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* =============================================
   PREMIUM POLISH — v2.1
   ============================================= */

/* Smooth page transitions */
#app { animation: pageFadeIn 0.3s ease; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section spacing upgrade */
.section-header h2 {
  font-size: 2.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--navy) 0%, #2A5298 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

/* KPI / stat number glow */
.hero-stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #4DB6AC 0%, #80CBC4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

/* Gap cards — premium hover */
.gap-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid rgba(226,232,240,0.8) !important;
}
.gap-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 40px rgba(27,58,107,0.12) !important;
  border-color: rgba(0,137,123,0.25) !important;
}

/* Pricing cards upgrade */
.pricing-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}
.pricing-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-teal);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.pricing-card:hover::before { opacity: 1; }
.pricing-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 60px rgba(27,58,107,0.15) !important;
}
.pricing-card.featured::before { opacity: 1; }

/* Feature cards upgrade */
.feature-card, .sol-feature, .biz-tier {
  transition: all 0.3s ease !important;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover) !important;
}

/* Badges — sharper */
.badge, .sev-badge, .dis-pill, .gap-type-badge {
  font-weight: 700 !important;
  letter-spacing: 0.2px;
}

/* Input fields — premium */
input, select, textarea {
  transition: all 0.2s ease !important;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(0,137,123,0.12) !important;
  outline: none !important;
}

/* Toast notifications upgrade */
.toast {
  backdrop-filter: blur(12px) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  font-weight: 500 !important;
}

/* Table rows — premium hover */
table tr:hover td {
  background: rgba(0,137,123,0.04) !important;
}

/* Footer upgrade */
.footer {
  background: linear-gradient(180deg, #0a1f3d 0%, #0F2342 100%) !important;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Scrollbar — premium */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(27,58,107,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,137,123,0.4); }

/* Selection color */
::selection { background: rgba(0,137,123,0.2); color: var(--navy); }

/* Animated underline for links */
.footer-links-col ul li a {
  position: relative;
  display: inline-block;
}
.footer-links-col ul li a::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 0; height: 1px;
  background: var(--teal-light);
  transition: width 0.3s ease;
}
.footer-links-col ul li a:hover::after { width: 100%; }

/* Hero eyebrow pill — shimmer */
.hero-eyebrow {
  background: rgba(0,137,123,0.18) !important;
  border: 1px solid rgba(77,182,172,0.5) !important;
  color: #80CBC4 !important;
  box-shadow: 0 0 20px rgba(0,137,123,0.15);
}

/* Page hero sections */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #1a5276 100%) !important;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(0,137,123,0.1) 0%, transparent 60%);
  pointer-events: none;
}

/* Nav link active indicator */
.nav-link.active {
  color: var(--navy) !important;
  font-weight: 700 !important;
  position: relative;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 14px; right: 14px;
  height: 2px;
  background: var(--gradient-teal);
  border-radius: 1px;
}

/* Enterprise hero upgrade */
.enterprise-hero {
  background: linear-gradient(135deg, #0a1f3d 0%, var(--navy-dark) 40%, #1a5276 100%) !important;
}

/* Smooth number animations */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-stat-value { animation: countUp 0.6s ease both; }

/* Mobile responsiveness upgrade */
@media (max-width: 1200px) {
  .pipeline-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero-title { font-size: 2.2rem !important; letter-spacing: -0.5px; }
  .hero-stat-value { font-size: 2rem !important; }
  .section-header h2 { font-size: 1.7rem !important; }
  .pipeline-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   PRINT STYLESHEET
   ============================================= */
@media print {
  /* Hide navigation, footer, modals, buttons */
  .navbar, .footer, .ticker-wrapper, #gapDetailOverlay,
  #waitlistOverlay, #helpModalOverlay,
  .btn, button, .pricing-cta, .form-submit,
  .hero-ctas, .explorer-sidebar, .gap-close-btn,
  .nav-mobile-toggle, #floatingExportBtn { display: none !important; }

  body { background: white !important; color: #1A202C !important; font-size: 11pt; }
  #app { padding: 0; }

  .card, .hero-stat-card, .pricing-card, .gap-card { 
    background: white !important; 
    border: 1px solid #ddd !important; 
    box-shadow: none !important; 
    break-inside: avoid; 
  }

  h1, h2, h3, h4 { color: #1B3A6B !important; }
  p, li, td, th { color: #2D3748 !important; }

  .hero-section { background: white !important; border-bottom: 2px solid #1B3A6B !important; }
  .hero-title { color: #1B3A6B !important; font-size: 20pt !important; }
  .hero-subtitle { color: #2D3748 !important; }
  .hero-eyebrow { color: #00897B !important; border-color: #00897B !important; background: #f0faf9 !important; }

  a { color: #1B3A6B !important; text-decoration: underline; }
  a::after { content: " (" attr(href) ")"; font-size: 8pt; color: #718096; }
  a[href^="#"]::after, a[href^="javascript"]::after { content: ""; }

  /* Print watermark */
  @page { margin: 1in; }
  body::after {
    content: 'EquiSci™ by NITR — equisci.org — Apache 2.0 — Printed ' attr(data-print-date);
    display: block;
    text-align: center;
    font-size: 8pt;
    color: #A0AEC0;
    border-top: 1px solid #E2E8F0;
    margin-top: 24pt;
    padding-top: 8pt;
    position: fixed;
    bottom: 0.5in;
    left: 1in;
    right: 1in;
  }
}

/* =============================================
   FLOATING EXPORT BUTTON
   ============================================= */
#floatingExportBtn {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

#floatingExportBtn .fab-main {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, #00897B, #00695C);
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 1.15rem;
  color: white;
  box-shadow: 0 4px 16px rgba(0,137,123,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
#floatingExportBtn .fab-main:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(0,137,123,0.5); }

#floatingExportBtn .fab-options {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
#floatingExportBtn.open .fab-options { display: flex; }

#floatingExportBtn .fab-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0d1b2e;
  border: 1px solid rgba(77,182,172,0.3);
  border-radius: 24px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: border-color 0.15s, background 0.15s;
}
#floatingExportBtn .fab-option:hover { background: rgba(77,182,172,0.1); border-color: rgba(77,182,172,0.6); }
#floatingExportBtn .fab-option i { color: #4DB6AC; width: 14px; }

/* =============================================
   LANGUAGE SELECTOR — i18n Module
   ============================================= */
#langSelectorWrapper { position: relative; }
#langDropdown {
  position: absolute;
  right: 100%;
  top: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 180px;
  padding: 6px;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: none;
}
#langDropdown.open { display: block; }

.lang-option {
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  text-align: left;
  transition: background 0.1s;
  color: var(--text-secondary);
}
.lang-option:hover { background: var(--bg-alt); }
.lang-option[aria-selected="true"] { font-weight: 700; color: var(--teal); }

/* =============================================
   RTL SUPPORT — Arabic (dir="rtl")
   ============================================= */
body.rtl,
[dir="rtl"] {
  direction: rtl;
  font-family: 'Inter', 'Noto Sans Arabic', 'Segoe UI', system-ui, sans-serif;
}

/* Flip navbar layout for RTL */
[dir="rtl"] .nav-container { flex-direction: row-reverse; }
[dir="rtl"] .nav-links     { flex-direction: row-reverse; }
[dir="rtl"] .logo-text     { text-align: right; }

/* Flip hero layout */
[dir="rtl"] .hero-grid    { direction: rtl; }
[dir="rtl"] .hero-content { text-align: right; }
[dir="rtl"] .hero-ctas    { justify-content: flex-start; flex-direction: row-reverse; }
[dir="rtl"] .hero-eyebrow { flex-direction: row-reverse; }

/* Flip sidebar and layout grids */
[dir="rtl"] .explorer-page   { flex-direction: row-reverse; }
[dir="rtl"] .filter-section  { text-align: right; }
[dir="rtl"] .kpi-card        { text-align: center; }
[dir="rtl"] .footer-grid     { direction: rtl; }
[dir="rtl"] .footer-links-col ul { padding-right: 0; text-align: right; }

/* Flip breadcrumb */
[dir="rtl"] .breadcrumb     { flex-direction: row-reverse; }

/* Flip icon margins */
[dir="rtl"] .fas,
[dir="rtl"] .fab,
[dir="rtl"] .far { margin-left: 0.3em; margin-right: 0; }

/* Flip the lang dropdown to appear on the left in RTL */
[dir="rtl"] #langDropdown { right: auto; left: 100%; }

/* Flip nav more dropdown */
[dir="rtl"] .nav-more-dropdown { right: auto; left: 0; }

/* Override for Arabic numerals display */
[dir="rtl"] .hero-stat-value,
[dir="rtl"] .kpi-value { font-feature-settings: 'lnum' 1; }

/* Toast alignment */
[dir="rtl"] #toast-container { left: 20px; right: auto; }
