/* ============================================
   MÉTODOS NUMÉRICOS — SISTEMA DE DISEÑO COMPLETO
   Tema: Institucional / Académico Formal (Light Slate & Navy)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

/* ─── VARIABLES ─── */
:root {
  --bg-base:     #f8fafc; /* Gris azulado muy claro */
  --bg-card:     #ffffff; /* Blanco puro */
  --bg-elevated: #f1f5f9; /* Gris slate claro */
  --border:      #e2e8f0; /* Borde sutil slate-200 */
  --border-glow: #94a3b8; /* Borde enfocado slate-400 */

  --accent-blue:   #1e3a8a; /* Azul institucional / Navy */
  --accent-green:  #166534; /* Verde bosque oscuro */
  --accent-orange: #c2410c; /* Óxido / Terracota */
  --accent-purple: #6b21a8; /* Púrpura imperial oscuro */
  --accent-yellow: #b45309; /* Ámbar / Dorado oscuro */
  --accent-red:    #991b1b; /* Carmesí / Rojo oscuro */

  --text-primary:   #0f172a; /* Slate 900 (Gris oscuro casi negro) */
  --text-secondary: #334155; /* Slate 700 (Gris medio) */
  --text-muted:     #64748b; /* Slate 500 (Gris atenuado) */

  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono:    'Fira Code', monospace;
  --font-body:    'Inter', sans-serif;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-glow-blue:   0 10px 15px -3px rgba(30, 58, 138, 0.04);
  --shadow-glow-green:  0 10px 15px -3px rgba(22, 101, 52, 0.04);
  --shadow-glow-orange: 0 10px 15px -3px rgba(194, 65, 12, 0.04);
}

/* ─── ICONS ─── */
.icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  vertical-align: middle;
}

.icon-menu { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='3' y='6' width='18' height='2'/><rect x='3' y='11' width='18' height='2'/><rect x='3' y='16' width='18' height='2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='3' y='6' width='18' height='2'/><rect x='3' y='11' width='18' height='2'/><rect x='3' y='16' width='18' height='2'/></svg>"); }
.icon-home { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 10.5 12 4l9 6.5v8.5a1 1 0 0 1-1 1h-5v-6h-6v6H4a1 1 0 0 1-1-1z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 10.5 12 4l9 6.5v8.5a1 1 0 0 1-1 1h-5v-6h-6v6H4a1 1 0 0 1-1-1z'/></svg>"); }
.icon-info { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10'/><rect x='11' y='10' width='2' height='7'/><rect x='11' y='6' width='2' height='2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10'/><rect x='11' y='10' width='2' height='7'/><rect x='11' y='6' width='2' height='2'/></svg>"); }
.icon-play { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='8,5 19,12 8,19'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='8,5 19,12 8,19'/></svg>"); }
.icon-doc { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 2h8l4 4v16H6z'/><rect x='8' y='9' width='8' height='2'/><rect x='8' y='13' width='8' height='2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 2h8l4 4v16H6z'/><rect x='8' y='9' width='8' height='2'/><rect x='8' y='13' width='8' height='2'/></svg>"); }
.icon-plus { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='11' y='5' width='2' height='14'/><rect x='5' y='11' width='14' height='2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='11' y='5' width='2' height='14'/><rect x='5' y='11' width='14' height='2'/></svg>"); }
.icon-download { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3v11'/><polygon points='7,11 12,16 17,11'/><rect x='4' y='19' width='16' height='2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3v11'/><polygon points='7,11 12,16 17,11'/><rect x='4' y='19' width='16' height='2'/></svg>"); }
.icon-print { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='6' y='3' width='12' height='6'/><rect x='6' y='14' width='12' height='7'/><rect x='4' y='9' width='16' height='6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='6' y='3' width='12' height='6'/><rect x='6' y='14' width='12' height='7'/><rect x='4' y='9' width='16' height='6'/></svg>"); }
.icon-calc { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='5' y='3' width='14' height='18'/><rect x='8' y='6' width='8' height='2'/><rect x='8' y='11' width='2' height='2'/><rect x='12' y='11' width='2' height='2'/><rect x='16' y='11' width='2' height='2'/><rect x='8' y='15' width='2' height='2'/><rect x='12' y='15' width='2' height='2'/><rect x='16' y='15' width='2' height='2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='5' y='3' width='14' height='18'/><rect x='8' y='6' width='8' height='2'/><rect x='8' y='11' width='2' height='2'/><rect x='12' y='11' width='2' height='2'/><rect x='16' y='11' width='2' height='2'/><rect x='8' y='15' width='2' height='2'/><rect x='12' y='15' width='2' height='2'/><rect x='16' y='15' width='2' height='2'/></svg>"); }
.icon-chart { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='4' y='12' width='3' height='8'/><rect x='10' y='8' width='3' height='12'/><rect x='16' y='4' width='3' height='16'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='4' y='12' width='3' height='8'/><rect x='10' y='8' width='3' height='12'/><rect x='16' y='4' width='3' height='16'/></svg>"); }
.icon-box { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='4' y='4' width='16' height='16'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='4' y='4' width='16' height='16'/></svg>"); }
.icon-fuel { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='6' y='4' width='8' height='16'/><rect x='14' y='6' width='3' height='6'/><rect x='16' y='10' width='2' height='8'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='6' y='4' width='8' height='16'/><rect x='14' y='6' width='3' height='6'/><rect x='16' y='10' width='2' height='8'/></svg>"); }
.icon-target { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9'/><circle cx='12' cy='12' r='4'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9'/><circle cx='12' cy='12' r='4'/></svg>"); }
.icon-alert { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='12,3 22,21 2,21'/><rect x='11' y='9' width='2' height='6'/><rect x='11' y='17' width='2' height='2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='12,3 22,21 2,21'/><rect x='11' y='9' width='2' height='6'/><rect x='11' y='17' width='2' height='2'/></svg>"); }
.icon-users { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='9' cy='9' r='3'/><circle cx='17' cy='9' r='3'/><rect x='4' y='14' width='16' height='6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='9' cy='9' r='3'/><circle cx='17' cy='9' r='3'/><rect x='4' y='14' width='16' height='6'/></svg>"); }
.icon-cap { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='2,9 12,4 22,9 12,14'/><rect x='9' y='14' width='6' height='4'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='2,9 12,4 22,9 12,14'/><rect x='9' y='14' width='6' height='4'/></svg>"); }
.icon-check { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polyline points='4,13 9,18 20,6' fill='none' stroke='black' stroke-width='3'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polyline points='4,13 9,18 20,6' fill='none' stroke='black' stroke-width='3'/></svg>"); }
.icon-gear { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='4'/><rect x='11' y='2' width='2' height='4'/><rect x='11' y='18' width='2' height='4'/><rect x='2' y='11' width='4' height='2'/><rect x='18' y='11' width='4' height='2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='4'/><rect x='11' y='2' width='2' height='4'/><rect x='11' y='18' width='2' height='4'/><rect x='2' y='11' width='4' height='2'/><rect x='18' y='11' width='4' height='2'/></svg>"); }

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ─── GRID BACKGROUND ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ─── SIDEBAR NAVIGATION (Premium Dark Navy Sidebar) ─── */
#sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 280px;
  background: #0f172a; /* Slate 900 */
  border-right: 1px solid #1e293b;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 0;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 28px 24px 24px;
  border-bottom: 1px solid #1e293b;
}

.sidebar-logo .logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #f59e0b; /* Oro / Ámbar brillante */
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 600;
}

.sidebar-logo h1 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
}

.sidebar-logo p {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
  font-family: var(--font-mono);
}

.nav-section-label {
  padding: 20px 24px 8px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: #475569;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
  color: #94a3b8; /* Slate 400 */
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  border-left-color: rgba(255, 255, 255, 0.2);
}

.nav-item.active {
  background: rgba(37, 99, 235, 0.08); /* Soft blue */
  color: #ffffff;
  border-left-color: #3b82f6; /* Blue active */
}

/* Override inline icon backgrounds in navigation */
.nav-item .nav-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #94a3b8;
}

.nav-item.active .nav-icon {
  background: #2563eb !important; /* Royal Blue */
  color: #ffffff !important;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 9px;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
}

.nav-item.active .nav-badge {
  color: #ffffff;
  border-color: rgba(255,255,255,0.2);
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px 24px;
  border-top: 1px solid #1e293b;
  font-size: 10px;
  color: #475569;
  font-family: var(--font-mono);
  line-height: 1.5;
}

/* ─── MAIN CONTENT ─── */
#main {
  margin-left: 280px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─── HERO SECTION ─── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 80px;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

/* Elegant extremely subtle backgrounds for hero instead of neon */
.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
}
.hero-glow-1 {
  background: radial-gradient(circle, rgba(30, 58, 138, 0.03) 0%, transparent 70%);
  top: -100px;
  right: -50px;
}
.hero-glow-2 {
  background: radial-gradient(circle, rgba(180, 83, 9, 0.02) 0%, transparent 70%);
  bottom: -200px;
  left: 10%;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff; /* Soft blue */
  border: 1px solid #bfdbfe;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-blue);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 28px;
  width: fit-content;
  font-weight: 500;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-blue);
  border-radius: 50%;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}

.hero-title .line-1 { color: var(--text-primary); display: block; }
.hero-title .line-2 {
  display: block;
  color: var(--accent-blue);
}
.hero-title .line-3 {
  color: var(--text-secondary);
  display: block;
  font-size: 0.38em;
  font-weight: 500;
  margin-top: 14px;
  letter-spacing: -0.5px;
  font-family: var(--font-body);
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-desc {
  max-width: 680px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-blue);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--accent-blue);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  padding: 12px 24px;
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.12);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: var(--bg-elevated);
  border-color: var(--border-glow);
  color: var(--text-primary);
}

.btn-run {
  background: var(--accent-green);
  color: #ffffff; /* White text for contrast */
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-run:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.12);
}

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

.btn-secondary {
  background: #ffffff;
  color: var(--accent-blue);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-blue);
}

.btn-inline {
  margin: 12px 0 0;
  display: inline-flex;
  align-items: center;
}

/* ─── SCENARIO MINI CARDS (Hero) ─── */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 60px;
}

.scenario-mini-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.scenario-mini-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.scenario-mini-card .sc-letter {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.scenario-mini-card .sc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.scenario-mini-card .sc-method {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ─── SECTION WRAPPER ─── */
.section {
  padding: 80px 80px;
  border-top: 1px solid var(--border);
  position: relative;
  background: #ffffff;
}

/* Alternating background colors for sections */
.section:nth-of-type(even) {
  background: #f8fafc; /* Slate 50 background */
}

.section-header {
  margin-bottom: 40px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-blue);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 600;
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 2px;
  background: var(--accent-blue);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.section-title span {
  color: var(--accent-blue);
}

.section-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.7;
}

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.card:hover {
  border-color: var(--border-glow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

/* Override inline card-icon backgrounds */
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--bg-elevated) !important;
  color: var(--accent-blue) !important;
}

.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ─── FORM ELEMENTS ─── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08);
}

.form-select option { background: #ffffff; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

/* ─── RESULTS PANEL ─── */
.results-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
  min-height: 120px;
}

.results-panel.hidden { display: none; }

.result-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-green);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.result-title::before {
  content: '▶';
  font-size: 8px;
}

.result-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 4px;
}

.result-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── TABLES ─── */
.data-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 12px;
}

.data-table thead tr {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: 12px 14px;
  text-align: left;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}

.data-table tbody tr:hover td {
  background: #f8fafc;
  color: var(--text-primary);
}

.data-table tbody tr:last-child td { border-bottom: none; }

.td-highlight { color: var(--accent-blue) !important; font-weight: 600; }
.td-warn { color: var(--accent-orange) !important; font-weight: 600; }
.td-danger { color: var(--accent-red) !important; font-weight: 600; }

/* ─── CHART CONTAINERS ─── */
.chart-container {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
  box-shadow: var(--shadow-card);
}

.chart-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}

canvas { max-width: 100%; }

/* ─── METHOD EXPLANATION BOX (Academic Styling) ─── */
.method-explain {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.method-explain h4 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.method-explain p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.method-explain .formula {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin: 12px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-blue);
  overflow-x: auto;
}

.method-explain code {
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-blue);
}

/* ─── TABS ─── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  flex: 1;
  min-width: 80px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.tab-btn.active {
  background: #ffffff;
  color: var(--accent-blue);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tab-btn:hover:not(.active) {
  background: rgba(30, 58, 138, 0.04);
  color: var(--text-primary);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── INFO CHIPS ─── */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  font-weight: 500;
}

.chip.green  { background: #f0fdf4; border-color: #bbf7d0; color: var(--accent-green); }
.chip.orange { background: #fff7ed; border-color: #fed7aa; color: var(--accent-orange); }
.chip.purple { background: #faf5ff; border-color: #e9d5ff; color: var(--accent-purple); }

/* ─── METRIC CARDS ─── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.metric-card .m-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-blue);
  display: block;
}

.metric-card .m-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
  display: block;
  font-weight: 600;
}

/* ─── COMPARISON TABLE COLORS ─── */
.cmp-best { color: var(--accent-green) !important; font-weight: 600; }
.cmp-mid  { color: var(--accent-yellow) !important; font-weight: 600; }
.cmp-bad  { color: var(--accent-red) !important; font-weight: 600; }

/* ─── ALERT BOXES ─── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin: 12px 0;
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--accent-blue);
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--accent-green);
}

.alert-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: var(--accent-orange);
}

.alert-danger {
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  color: var(--accent-red);
}

/* ─── PROGRESS BAR ─── */
.progress-bar-wrap {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  height: 6px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  background: var(--accent-blue);
  transition: width 0.8s ease;
}

/* ─── SCENARIO HEADER BANNERS ─── */
.scenario-banner {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent-blue); /* Default blue accent */
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* Left borders based on scenario for a highly polished institutional look */
#escenario-a .scenario-banner { border-left-color: var(--accent-blue); }
#escenario-b .scenario-banner { border-left-color: var(--accent-green); }
#escenario-c .scenario-banner { border-left-color: var(--accent-purple); }
#escenario-d .scenario-banner { border-left-color: var(--accent-orange); }
#escenario-e .scenario-banner { border-left-color: var(--accent-yellow); }
#escenario-f .scenario-banner { border-left-color: var(--accent-red); }
#escenario-g .scenario-banner { border-left-color: #0f766e; /* Teal */ }

.scenario-banner::before {
  content: attr(data-letter);
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 110px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.02); /* Extremely subtle watermark */
  line-height: 1;
  pointer-events: none;
}

.scenario-banner .sc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 600;
}

.scenario-banner h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.scenario-banner p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.6;
}

/* ─── TWO COLUMN LAYOUT ─── */
.two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ─── MATRIX INPUT ─── */
.matrix-grid {
  display: inline-grid;
  gap: 6px;
  margin: 12px 0;
}

.matrix-grid input {
  width: 72px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 7px 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.matrix-grid input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.1);
  transform: scale(1.02);
}

/* ─── CONCLUSIONS ─── */
#conclusiones {
  background: #f8fafc;
}

.conclusion-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.conclusion-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-blue);
}

.conclusion-card:nth-child(2)::before {
  background: var(--accent-green);
}

/* ─── FOOTER ─── */
footer {
  background: #0f172a; /* Same as sidebar */
  border-top: 1px solid #1e293b;
  padding: 48px 80px;
  text-align: center;
  color: #ffffff;
}

footer .footer-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

footer p {
  font-size: 13px;
  color: #94a3b8;
  font-family: var(--font-mono);
}

/* ─── MOBILE MENU TOGGLE ─── */
#menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 2000;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  color: #ffffff;
  font-size: 18px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

/* ─── LOADING SPINNER ─── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(22, 101, 52, 0.2);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ─── STEP INDICATOR ─── */
.steps {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.step {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  background: #ffffff;
  transition: all 0.2s ease;
  font-weight: 500;
}

.step:last-child { border-right: none; }
.step.active { background: #eff6ff; color: var(--accent-blue); font-weight: 600; }
.step.done { background: #f0fdf4; color: var(--accent-green); font-weight: 600; }

/* ─── ANIMATIONS ─── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.4s ease forwards; }

@keyframes countUp {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ─── CONVERGENCE BADGES ─── */
.conv-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid;
  font-weight: 600;
}

.conv-badge.converged { color: var(--accent-green); border-color: #bbf7d0; background: #f0fdf4; }
.conv-badge.diverged  { color: var(--accent-red);   border-color: #fbcfe8; background: #fdf2f8; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .two-col  { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
  #main { margin-left: 0; }
  #menu-toggle { display: flex; }
  .section { padding: 60px 24px; }
  #hero { padding: 80px 24px 60px; }
  .hero-stats { gap: 24px; }
  .three-col { grid-template-columns: 1fr; }
  footer { padding: 32px 24px; }
  .scenario-banner { padding: 24px; }
  .scenario-banner::before { font-size: 70px; }
}

@media (max-width: 480px) {
  .scenario-grid { grid-template-columns: 1fr; }
  .tabs { gap: 2px; }
  .tab-btn { padding: 8px 8px; font-size: 10px; }
}

/* ─── ADDITIONAL ENHANCEMENTS ─── */

/* Matrix input highlight focus shadow */
.matrix-grid input:focus {
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.15);
  transform: scale(1.03);
}

/* Result value animation entry */
.result-value {
  animation: countUp 0.4s ease;
}

/* Better select dropdown arrow SVG */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* Card focus layout shadows */
.card:focus-within {
  border-color: var(--border-glow);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Sidebar active hover effect glow */
.nav-item.active {
  box-shadow: inset 3px 0 0 #3b82f6;
}

/* Tooltip styles pointer */
[title] { cursor: help; }

/* Result divs entry */
[id$="-results"]:not(.hidden) {
  animation: fadeIn 0.4s ease;
}

/* Metric card hovering effects */
.metric-card:hover {
  border-color: var(--border-glow);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* Data table row highlights */
@keyframes rowHighlight {
  0%   { background: rgba(30, 58, 138, 0.08); }
  100% { background: transparent; }
}
.row-new {
  animation: rowHighlight 1.5s ease;
}

/* Bottom mask styling for long lists */
.data-table-wrap.faded {
  -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

/* Floating animation on mini-cards in hero */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}
.scenario-mini-card:hover {
  animation: float 2s ease infinite;
}

/* Sidebar scrollbar customization */
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: #334155; }

/* Chart canvas sizing control */
.chart-container canvas {
  max-height: 280px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title  { letter-spacing: -0.5px; }
  .form-row { grid-template-columns: 1fr; }
}
