/* ==========================================================================
   VARSHA-RA: Regime-Aware AI Post-Processing of Monsoon Rainfall Forecasts
   Core Design System & Scientific Weather Platform Stylesheet
   ========================================================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* SIH26080 VARSHA-RA Enterprise Light Palette */
  --bg-deepest: #ffffff;
  --bg-primary: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: #ffffff;

  /* Borders & Dividers */
  --border-subtle: #eaf3ff;
  --border-medium: #d9e6f5;
  --border-focus: #1769d2;
  --border-dark: #60738a;

  /* Accents & Brand Colors */
  --navy-primary: #0f2747;
  --cyan-primary: #1769d2;
  --cyan-bright: #1769d2;
  --cyan-glow: rgba(23, 105, 210, 0.05);
  --teal-accent: #168a62;
  --blue-accent: #1769d2;
  --blue-hover: #0d5dbd;
  --blue-secondary: #2f80ed;
  --blue-light: #eaf3ff;
  --blue-pale: #ffffff;

  /* Scientific Status & Regime Colors */
  --regime-active: #168a62;
  --regime-active-bg: #eaf8f2;
  --regime-break: #d99000;
  --regime-break-bg: #fffbf0;
  --regime-depression: #1769d2;
  --regime-depression-bg: #eaf3ff;
  --regime-transition: #7c3aed;
  --regime-transition-bg: #f5f3ff;
  --regime-global: #4f46e5;

  /* Alert & Probability Tones */
  --risk-critical: #d64545;
  --risk-high: #d64545;
  --risk-moderate: #d99000;
  --risk-low: #168a62;

  /* Typography Colors */
  --text-primary: #172b4d;
  --text-secondary: #60738a;
  --text-muted: #7a8a99;
  --text-dim: #7a8a99;
  --text-cyan: #1769d2;

  /* Typography Scales */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(15, 39, 71, 0.05);
  --shadow-md: 0 4px 10px -1px rgba(15, 39, 71, 0.07), 0 2px 4px -2px rgba(15, 39, 71, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(15, 39, 71, 0.09), 0 4px 6px -4px rgba(15, 39, 71, 0.03);
  --shadow-cyan: 0 4px 14px rgba(23, 105, 210, 0.1);
  --shadow-inner: inset 0 1px 2px rgba(0, 0, 0, 0.03);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 9999px;

  /* Layout Constants */
  --nav-height: 72px;
  --container-max: 1440px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-deepest: #030712;
  --bg-primary: #060d1a;
  --bg-surface: #0a1527;
  --bg-surface-elevated: #0f1f38;
  --bg-card: var(--bg-card);
  --bg-card-hover: rgba(18, 36, 65, 0.85);
  --bg-glass: var(--bg-surface-elevated);

  --border-subtle: rgba(56, 189, 248, 0.12);
  --border-medium: rgba(56, 189, 248, 0.25);
  --border-focus: rgba(56, 189, 248, 0.6);
  --border-dark: rgba(255, 255, 255, 0.08);

  --cyan-primary: #06b6d4;
  --cyan-bright: #38bdf8;
  --cyan-glow: rgba(56, 189, 248, 0.25);
  --teal-accent: #0d9488;
  --blue-accent: #2563eb;
  --blue-vivid: #3b82f6;

  --regime-active: #10b981;
  --regime-active-bg: rgba(16, 185, 129, 0.15);
  --regime-break: #f59e0b;
  --regime-break-bg: rgba(245, 158, 11, 0.15);
  --regime-depression: #06b6d4;
  --regime-depression-bg: rgba(6, 182, 212, 0.15);
  --regime-transition: #a855f7;
  --regime-transition-bg: rgba(168, 85, 247, 0.15);
  --regime-global: #6366f1;

  --risk-critical: #ec4899;
  --risk-high: #ef4444;
  --risk-moderate: #f59e0b;
  --risk-low: #10b981;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-cyan: #38bdf8;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-cyan: 0 0 20px rgba(56, 189, 248, 0.15);
}

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

html {
  font-family: var(--font-sans);
  background-color: #ffffff;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  background: #ffffff;
  overflow-x: hidden;
}

/* Atmospheric Isobar Grid Texture */
body::before {
  display: none;
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Typography & Utility Classes
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.text-mono {
  font-family: var(--font-mono);
}

.text-cyan {
  color: var(--cyan-bright);
}

.text-muted {
  color: var(--text-muted);
}

.text-dim {
  color: var(--text-dim);
}

.font-bold {
  font-weight: 700;
}

/* Scientific Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--border-medium);
  background: var(--blue-pale);
  color: var(--cyan-primary);
}

.badge-pulse {
  position: relative;
}

.badge-pulse::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--cyan-primary);
  box-shadow: 0 0 6px var(--cyan-primary);
  animation: pulse-dot 2s infinite ease-in-out;
}

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

.badge-demo {
  background: #fffbf0;
  border-color: #fde68a;
  color: var(--risk-moderate);
}

.badge-demo::before {
  background-color: var(--risk-moderate);
  box-shadow: 0 0 6px var(--risk-moderate);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--cyan-primary);
  color: #ffffff;
  border-color: var(--cyan-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background: var(--blue-light);
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
  transform: translateY(-1px);
}

.btn-outline-cyan {
  background: transparent;
  color: var(--cyan-bright);
  border-color: rgba(56, 189, 248, 0.35);
}

.btn-outline-cyan:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--cyan-bright);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Header & Global Sticky Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--bg-primary);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-radar-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(37, 99, 235, 0.3));
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-bright);
  position: relative;
  overflow: hidden;
}

.brand-radar-icon::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg, transparent 70%, rgba(56, 189, 248, 0.5) 100%);
  animation: radar-sweep 4s linear infinite;
}

@keyframes radar-sweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-name span.sub-ra {
  color: var(--cyan-bright);
}

.brand-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--cyan-primary);
  background: var(--blue-light);
  border-bottom: 2px solid var(--cyan-primary);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Mode Switcher: Executive vs Technical */
.ux-layer-switch {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 2px;
}

.ux-switch-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ux-switch-btn.active {
  background: var(--cyan-primary);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--cyan-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* Mobile Hamburger */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ==========================================================================
   Scientific Status Alert Strip
   ========================================================================== */
.alert-strip {
  background: var(--blue-pale);
  border-bottom: 1px solid var(--border-medium);
  padding: 0.55rem 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.alert-strip-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.alert-strip-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.alert-icon {
  color: var(--cyan-bright);
  font-size: 1rem;
}

.alert-strip-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-status-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-title {
  color: var(--navy-primary);
  font-weight: 800;
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.hero-title .highlight {
  color: var(--cyan-primary);
  background: linear-gradient(135deg, #1769d2 0%, #0f2747 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-clarity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: #eaf8f2;
  border: 1px solid #a3e6cd;
  border-radius: var(--radius-sm);
  color: var(--teal-accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
}

.hero-description {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.hero-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-medium);
  margin-top: 0.5rem;
}

.hero-metric-item {
  display: flex;
  flex-direction: column;
}

.hero-metric-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy-primary);
}

.hero-metric-val span {
  color: var(--cyan-primary);
}

.hero-metric-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Hero Visual / Flow Canvas Container */
.hero-visual-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg), var(--shadow-cyan);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.hero-visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.hero-visual-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Conceptual Meteorological Flow Visualizer */
.pipeline-flow-diagram {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.flow-step-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  transition: all var(--transition-fast);
}

.flow-step-row:hover {
  border-color: var(--cyan-bright);
  background: var(--blue-light);
  transform: translateX(4px);
}

.flow-step-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.flow-step-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.flow-step-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.flow-step-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.flow-step-indicator {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan-bright);
}

.flow-connector-arrow {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1;
}

/* ==========================================================================
   Prominent Callout Boxes: One-Line Definition & Solution Description
   ========================================================================== */
.callout-section {
  padding: 2.5rem 0;
}

.definition-box {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-left: 5px solid var(--cyan-bright);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.definition-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan-bright);
  margin-bottom: 0.5rem;
}

.definition-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.5;
}

.solution-box {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
}

.solution-title {
  font-size: 1rem;
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.solution-paragraph {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.section-title {
  color: #ffffff;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Section 6: Why VARSHA-RA? (Core Value Proposition)
   ========================================================================== */
.why-section {
  padding: 4.5rem 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.regimes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.regime-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.regime-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.regime-card.card-active::before { background: var(--regime-active); }
.regime-card.card-break::before { background: var(--regime-break); }
.regime-card.card-depression::before { background: var(--regime-depression); }
.regime-card.card-transition::before { background: var(--regime-transition); }

.regime-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-lg);
}

.regime-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.regime-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.regime-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.regime-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.regime-box-inner {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.regime-box-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.regime-box-val {
  font-size: 0.8rem;
  color: #ffffff;
}

/* Why Logic Flow Diagram */
.why-flow-banner {
  margin-top: 3rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
}

.why-flow-title {
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--cyan-bright);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  text-align: center;
}

.why-flow-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.why-flow-node {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  flex: 1;
  min-width: 120px;
}

.why-flow-node.highlight {
  border-color: var(--cyan-bright);
  color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.08);
}

.why-flow-arrow {
  color: var(--text-dim);
  font-weight: 700;
}

/* ==========================================================================
   Section 7: Complete System Pipeline (Interactive 16-Stage)
   ========================================================================== */
.pipeline-section {
  padding: 5rem 0;
}

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

.pipeline-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all var(--transition-fast);
  text-align: left;
}

.pipeline-chip:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.pipeline-chip.active {
  border-color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

.pipeline-chip-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan-bright);
  min-width: 24px;
}

.pipeline-chip-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Expanded Pipeline Stage Detail Card */
.pipeline-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

.pipeline-column {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pipeline-column-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan-bright);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.pipeline-column-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ==========================================================================
   Section 8 & 9: Forecast Dashboard & Interactive Map
   ========================================================================== */
.forecast-dashboard-section {
  padding: 5rem 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Toolbar & Filters */
.dashboard-toolbar {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toolbar-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.pill-group {
  display: flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 2px;
}

.pill-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill-btn:hover {
  color: #ffffff;
}

.pill-btn.active {
  background: var(--cyan-bright);
  color: #050b14;
}

/* Forecast Metric Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.metric-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

.metric-card-val {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.metric-card-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-card-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Dashboard Map Layout */
.dashboard-map-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  min-height: 620px;
}

.map-container-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.map-controls-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 400;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  backdrop-filter: blur(10px);
}

.layer-select-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.layer-select-btn:hover {
  background: rgba(56, 189, 248, 0.08);
  color: #ffffff;
}

.layer-select-btn.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--cyan-bright);
  color: var(--cyan-bright);
  font-weight: 600;
}

#forecast-map {
  width: 100%;
  height: 580px;
  background: #060e1d;
  z-index: 1;
}

/* Rainfall Scale Legend */
.map-legend-bar {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 400;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  backdrop-filter: blur(8px);
}

.legend-title {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.legend-ramp {
  display: flex;
  height: 10px;
  width: 240px;
  border-radius: 2px;
  overflow: hidden;
}

.legend-stop {
  flex: 1;
  height: 100%;
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* Map Sidebar: Grid Inspector */
.map-inspector-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.inspector-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.inspector-title {
  font-size: 1rem;
  color: #ffffff;
}

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

.grid-point-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-label {
  color: var(--text-muted);
}

.stat-value {
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ==========================================================================
   Section 10 & 11: Regime Intelligence & Uncertainty Explorer
   ========================================================================== */
.regime-intelligence-section {
  padding: 5rem 0;
}

.regime-int-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.regime-prob-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.prob-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.prob-bar-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.prob-name {
  font-weight: 600;
  color: #ffffff;
}

.prob-val {
  font-family: var(--font-mono);
  color: var(--cyan-bright);
}

.prob-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.prob-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Uncertainty Entropy Visualizer */
.entropy-visualizer-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.entropy-formula-box {
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid var(--cyan-bright);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan-bright);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.scenario-switch-tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.scenario-tab {
  flex: 1;
  background: var(--blue-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.scenario-tab:hover {
  background: rgba(22, 45, 80, 0.9);
  color: #ffffff;
}

.scenario-tab.active {
  border-color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan-bright);
}

/* ==========================================================================
   Section 12: Uncertainty-Aware Expert Gating
   ========================================================================== */
.expert-gating-section {
  padding: 5rem 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.gating-interactive-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.gating-flow-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.expert-weights-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.expert-weight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.expert-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
}

.expert-pct {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--cyan-bright);
}

/* ==========================================================================
   Section 13: AI Bias Correction & Distribution Handling
   ========================================================================== */
.bias-correction-section {
  padding: 5rem 0;
}

.model-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.model-card.featured {
  border-color: var(--cyan-bright);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.12);
}

.model-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.model-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.model-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan-bright);
}

/* Hurdle Model Visual */
.hurdle-model-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.hurdle-branch-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hurdle-branch-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan-bright);
  text-transform: uppercase;
}

/* ==========================================================================
   Section 15 & 16: Local Refinement & Heavy Rain Probabilities
   ========================================================================== */
.heavy-rain-section {
  padding: 5rem 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.threshold-selector-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.threshold-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.threshold-btn:hover {
  border-color: var(--cyan-bright);
  color: #ffffff;
}

.threshold-btn.active {
  background: var(--cyan-bright);
  color: #050b14;
  border-color: var(--cyan-bright);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   Section 20: District Intelligence & Table
   ========================================================================== */
.district-intelligence-section {
  padding: 5rem 0;
}

.district-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.district-table-header-controls {
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-input-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.85rem;
  width: 280px;
}

.search-input-box input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.85rem;
  outline: none;
  width: 100%;
}

.search-input-box input::placeholder {
  color: var(--text-dim);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.district-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.district-data-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-medium);
  cursor: pointer;
  white-space: nowrap;
}

.district-data-table th:hover {
  color: var(--cyan-bright);
}

.district-data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  white-space: nowrap;
}

.district-data-table tr:hover td {
  background: rgba(56, 189, 248, 0.04);
  color: #ffffff;
}

.district-data-table td.dist-name {
  font-weight: 600;
  color: #ffffff;
}

.district-action-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--cyan-bright);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.district-action-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--cyan-bright);
}

/* ==========================================================================
   Section 21: AI Explainability (SHAP & Waterfall)
   ========================================================================== */
.explainability-section {
  padding: 5rem 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.shap-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

.shap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.feature-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.feature-name {
  color: var(--text-primary);
  font-weight: 500;
}

.feature-importance-val {
  font-family: var(--font-mono);
  color: var(--cyan-bright);
}

/* ==========================================================================
   Section 22 & 23: Scientific Verification Suite
   ========================================================================== */
.verification-section {
  padding: 5rem 0;
}

.verification-filters-bar {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: #ffffff;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  outline: none;
}

.verification-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.verification-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
}

.verif-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 1rem;
}

.verif-table th {
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: right;
}

.verif-table th:first-child {
  text-align: left;
}

.verif-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-align: right;
  font-family: var(--font-mono);
}

.verif-table td:first-child {
  text-align: left;
  font-family: var(--font-sans);
  color: var(--text-primary);
  font-weight: 500;
}

.verif-table td.highlight-cell {
  color: var(--cyan-bright);
  font-weight: 700;
}

/* ==========================================================================
   Section 24: Data Leakage Prevention (Scientific Safeguard)
   ========================================================================== */
.leakage-section {
  padding: 5rem 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.leakage-diagram-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.leakage-block {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leakage-block.restricted {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.3);
}

.leakage-block.operational {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.3);
}

.leakage-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   Section 25-28: Technical Architecture & Stack
   ========================================================================== */
.architecture-section {
  padding: 5rem 0;
}

.arch-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.arch-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.arch-tab-btn:hover {
  border-color: var(--cyan-bright);
  color: #ffffff;
}

.arch-tab-btn.active {
  background: var(--cyan-bright);
  color: #050b14;
  border-color: var(--cyan-bright);
}

.arch-display-container {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}

.stack-layers-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stack-layer-row {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: center;
}

.stack-layer-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan-bright);
  text-transform: uppercase;
}

.stack-tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tech-chip {
  background: var(--blue-light);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Section 29: Development Roadmap
   ========================================================================== */
.roadmap-section {
  padding: 5rem 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.roadmap-card.status-Completed {
  border-left: 4px solid var(--regime-active);
}

.roadmap-card.status-InProgress {
  border-left: 4px solid var(--cyan-bright);
}

.roadmap-card.status-ActiveDemo {
  border-left: 4px solid var(--regime-break);
}

.roadmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.roadmap-step {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--cyan-bright);
}

.roadmap-status {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.roadmap-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.roadmap-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   Section 30: 6 Core Innovations
   ========================================================================== */
.innovations-section {
  padding: 5rem 0;
}

.innovations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.innovation-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition-normal);
}

.innovation-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan-bright);
  box-shadow: var(--shadow-lg), var(--shadow-cyan);
}

.innovation-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: rgba(56, 189, 248, 0.25);
  line-height: 1;
}

.innovation-title {
  font-size: 1.15rem;
  color: #ffffff;
}

.innovation-tagline {
  font-size: 0.8rem;
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.innovation-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Section 33: Scientific Safeguards
   ========================================================================== */
.safeguards-section {
  padding: 5rem 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.safeguards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.safeguard-item {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
}

.safeguard-icon {
  color: var(--cyan-bright);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.safeguard-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.safeguard-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.safeguard-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-deepest);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  color: var(--text-muted);
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-disclaimer-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--cyan-bright);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Modal Drawer: District Deep Dive
   ========================================================================== */
.modal-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: flex-end;
}

.modal-drawer-backdrop.active {
  display: flex;
}

.modal-drawer {
  width: 100%;
  max-width: 540px;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: slide-in-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slide-in-right {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.drawer-close-btn {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.drawer-close-btn:hover {
  color: #ffffff;
  border-color: var(--cyan-bright);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
  .regimes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pipeline-stage-selector {
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .innovations-grid, .roadmap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-map-layout {
    grid-template-columns: 1fr;
  }
  .regime-int-grid, .gating-interactive-wrapper, .shap-grid, .leakage-diagram-wrapper {
    grid-template-columns: 1fr;
  }
  .pipeline-detail-card {
    grid-template-columns: 1fr;
  }
  .verification-tables-grid {
    grid-template-columns: 1fr;
  }
  .safeguards-grid {
    grid-template-columns: 1fr;
  }
  .nav-menu {
    display: none;
  }
  .nav-mobile-toggle {
    display: block;
  }
}

@media (max-width: 640px) {
  .regimes-grid, .innovations-grid, .roadmap-grid, .metrics-grid, .model-comparison-grid {
    grid-template-columns: 1fr;
  }
  .pipeline-stage-selector {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .why-flow-steps {
    flex-direction: column;
  }
  .why-flow-arrow {
    transform: rotate(90deg);
  }
}

/* ==========================================================================
   Leaflet Map Weather Spot Popup Custom Styling
   ========================================================================== */
.leaflet-popup-content-wrapper {
  background: #ffffff !important;
  border: 1px solid #cce3fd !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 28px rgba(15, 39, 71, 0.2) !important;
  padding: 2px !important;
}

.leaflet-popup-tip {
  background: #ffffff !important;
  border: 1px solid #cce3fd !important;
}

.leaflet-container a.leaflet-popup-close-button {
  color: #60738a !important;
  padding: 8px 10px 0 0 !important;
  font-size: 16px !important;
  font-weight: bold !important;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: #1769d2 !important;
}

.spot-popup-container {
  font-family: var(--font-sans);
}

/* ==========================================================================
   ATMOS Platform Layout & Fixed Left Sidebar Navigation System
   ========================================================================== */
:root {
  --sidebar-width: 260px;
  --app-bar-height: 56px;
}

body {
  display: flex;
  min-height: 100vh;
  background-color: #ffffff;
  color: var(--text-primary);
}

/* Sidebar Container */
.sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid #d7e3ee;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 2px 0 12px rgba(15, 39, 71, 0.04);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.15rem 1.15rem 0.95rem 1.15rem;
  border-bottom: 1px solid #eaf3ff;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1769d2 0%, #0f2747 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(23, 105, 210, 0.25);
  flex-shrink: 0;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0f2747;
  line-height: 1.1;
}

.sidebar-brand-sub {
  font-size: 0.65rem;
  color: #60738a;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2px;
}

/* Sidebar Navigation Body */
.sidebar-body {
  padding: 1.15rem 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sidebar-section-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #7a8a99;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0.5rem;
  margin-bottom: 0.5rem;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  color: #52667a;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.sidebar-nav-item:hover {
  background: #f0f7ff;
  color: #1769d2;
}

.sidebar-nav-item.active {
  background: #eaf3ff;
  color: #1769d2;
  font-weight: 700;
}

.sidebar-nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background: #1769d2;
  border-radius: 0 4px 4px 0;
}

.sidebar-nav-item .nav-icon {
  color: inherit;
  flex-shrink: 0;
}

/* System Status List in Sidebar */
.sidebar-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 0.2rem;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #52667a;
  background: #f8fbff;
  border: 1px solid #eaf3ff;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.35rem;
}

.status-dot.green { background: #168a62; box-shadow: 0 0 6px rgba(22, 138, 98, 0.4); }
.status-dot.blue { background: #1769d2; box-shadow: 0 0 6px rgba(23, 105, 210, 0.4); }
.status-dot.teal { background: #06b6d4; box-shadow: 0 0 6px rgba(6, 182, 212, 0.4); }

.status-label {
  font-weight: 500;
  flex: 1;
}

.status-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.7rem;
  color: #12304a;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 1.15rem;
  border-top: 1px solid #eaf3ff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-actions-stacked {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-meta-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #7a8a99;
}

/* Main Content Wrapper Offset */
.main-content-wrapper {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

/* Top App Bar */
.top-app-bar {
  height: var(--app-bar-height);
  background: #ffffff;
  border-bottom: 1px solid #d7e3ee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 3px rgba(15, 39, 71, 0.03);
}

.app-bar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid #d7e3ee;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  color: #12304a;
}

.app-bar-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
}

.app-bar-brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f2747;
  letter-spacing: 0.04em;
}

.app-bar-separator {
  color: #bcd7f5;
  font-size: 1.1rem;
}

.app-bar-page-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1769d2;
}

.app-bar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 992px) {
  .sidebar-nav {
    transform: translateX(-100%);
  }

  .sidebar-nav.mobile-open {
    transform: translateX(0);
  }

  .main-content-wrapper {
    margin-left: 0;
    width: 100%;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 39, 71, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
  }

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

/* Dark Mode Overrides */
[data-theme="dark"] .sidebar-nav {
  background: #060d1a;
  border-right-color: rgba(56, 189, 248, 0.15);
}
[data-theme="dark"] .top-app-bar {
  background: #060d1a;
  border-bottom-color: rgba(56, 189, 248, 0.15);
}
[data-theme="dark"] .sidebar-brand-title,
[data-theme="dark"] .app-bar-brand {
  color: #f8fafc;
}
[data-theme="dark"] .sidebar-nav-item {
  color: #cbd5e1;
}
[data-theme="dark"] .sidebar-nav-item:hover {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
}
[data-theme="dark"] .sidebar-nav-item.active {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}


