/* ==========================================================================
   CALCULARCUOTA.COM — DISEÑO INSTITUCIONAL DE ALTA CONFIANZA & ELEGANCIA HUMANA
   Inspiración: Stripe, Mercury Bank, Apple Finance & The Financial Times
   Filosofía: Rigor Contable, Serenidad Cognitiva, Luz Natural y Cero Sesgo de IA
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* ==========================================================================
     PALETA PREDETERMINADA: MODO CLARO (PAPEL FINANCIERO MARFIL / ALTA CONFIANZA)
     ========================================================================== */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --bg-hover: #f8fafc;

  --text-main: #0f172a;        /* Azul pizarra casi negro, máxima legibilidad */
  --text-muted: #475569;       /* Pizarra medio para descripciones */
  --text-dim: #94a3b8;         /* Pizarra suave para marcas secundarias */

  --border-subtle: #e2e8f0;    /* Línea sutil de 1px tipo hoja contable */
  --border-focus: #1d4ed8;     /* Zafiro noble al enfocar */

  /* Colores Semánticos Contables */
  --color-brand: #1d4ed8;      /* Zafiro Institucional */
  --color-brand-hover: #1e40af;
  --color-brand-subtle: rgba(29, 78, 216, 0.06);

  --color-equity: #059669;     /* Esmeralda Patrimonio / Amortización */
  --color-cost: #be123c;       /* Rubí / Teja Suave para Intereses */
  --color-neutral: #64748b;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 16px -2px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 4px 12px rgba(15, 23, 42, 0.06), 0 12px 28px -4px rgba(15, 23, 42, 0.05);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Newsreader', Charter, Georgia, "Times New Roman", serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Monaco, Consolas, monospace;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

[data-theme="dark"] {
  /* ==========================================================================
     PALETA MODO OSCURO (AZUL NOCHE BANCARIO SOBRIO)
     ========================================================================== */
  --bg-page: #0b0f19;
  --bg-surface: #111726;
  --bg-subtle: #172033;
  --bg-input: #0f1523;
  --bg-hover: #1b263b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-focus: #3b82f6;

  --color-brand: #3b82f6;
  --color-brand-hover: #60a5fa;
  --color-brand-subtle: rgba(59, 130, 246, 0.12);

  --color-equity: #10b981;
  --color-cost: #f43f5e;

  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .tool-select,
[data-theme="dark"] .country-select,
[data-theme="dark"] select.tool-select,
[data-theme="dark"] .theme-button {
  background-color: #111726 !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

[data-theme="dark"] .tool-select option,
[data-theme="dark"] select option {
  background-color: #111726 !important;
  color: #f8fafc !important;
}

/* ==========================================================================
   RESET & BASES TIPOGRÁFICAS
   ========================================================================== */

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Estabilidad Numérica Absoluta (Cero Jitter o Baile) */
.figure-main, .ledger-val, .amount-field-wrap, .rate-field-wrap, .term-field-wrap, .ledger-table, .slider-ticks, .savings-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums lining-nums;
  -moz-font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-feature-settings: "tnum" 1, "lnum" 1;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   CABECERA PRINCIPAL
   ========================================================================== */

.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-mark {
  width: 32px;
  height: 32px;
  background: var(--color-brand-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--color-brand);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-tld {
  color: var(--color-brand);
  font-weight: 800;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tool-select {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
}

.tool-select:hover {
  border-color: var(--color-brand);
}

.country-select {
  font-weight: 700;
  background-color: var(--bg-surface);
  border-color: var(--border-medium);
  padding: 0.4rem 0.65rem;
}

.country-select:focus,
.country-select:hover {
  border-color: var(--color-brand);
}

.theme-button {
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.theme-button:hover {
  border-color: var(--color-brand);
  color: var(--text-main);
}

/* ==========================================================================
   BARRA DE AUDITORÍA Y TELEMETRÍA DIARIA DE MERCADO
   ========================================================================== */

.market-audit-strip {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem 1.5rem;
  font-size: 0.8rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.audit-strip-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.audit-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-dot 2s infinite cubic-bezier(0.66, 0, 0, 1);
  display: inline-block;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.audit-title {
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.audit-date {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.audit-metrics-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.audit-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  font-size: 0.76rem;
}

.pill-label {
  color: var(--text-muted);
  font-weight: 500;
}

.pill-value {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-weight: 700;
}

.pill-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  border-left: 1px solid var(--border-subtle);
  padding-left: 0.35rem;
  margin-left: 0.15rem;
}

.pill-bce {
  background: rgba(29, 78, 216, 0.05);
  border-color: rgba(29, 78, 216, 0.2);
}

.pill-bce .pill-value {
  color: var(--color-brand);
}

/* ==========================================================================
   CONTENIDO CENTRAL
   ========================================================================== */

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  width: 100%;
  flex: 1;
}

/* Encabezado Editorial */
.editorial-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2.75rem;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.hero-subhead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 auto;
}

/* ==========================================================================
   BARRA DE ACCESO RÁPIDO A HERRAMIENTAS
   ========================================================================== */

.tools-quick-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 auto 2.25rem;
  max-width: 960px;
}

.nav-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.nav-chip svg {
  color: var(--color-brand);
  opacity: 0.85;
}

.nav-chip:hover {
  border-color: var(--color-brand);
  color: var(--text-main);
  background: var(--bg-subtle);
  transform: translateY(-1px);
}

.nav-chip.active {
  background: var(--color-brand-subtle);
  border-color: rgba(29, 78, 216, 0.35);
  color: var(--color-brand);
  font-weight: 600;
}

/* ==========================================================================
   MESA FINANCIERA (DESK: 2 COLUMNAS)
   ========================================================================== */

.financial-desk {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

@media (min-width: 920px) {
  .financial-desk {
    grid-template-columns: 1fr 1fr;
  }
}

.desk-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.65rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.panel-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Selector Segmentado de Presets */
.preset-segmented {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

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

.btn-preset.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-preset:hover:not(.active) {
  color: var(--text-main);
}

/* Formulario de Entrada */
.desk-form {
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.label-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.block-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.amount-field-wrap, .rate-field-wrap, .term-field-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.amount-field-wrap:focus-within, .rate-field-wrap:focus-within, .term-field-wrap:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--color-brand-subtle);
}

.amount-field-wrap input, .rate-field-wrap input, .term-field-wrap input {
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-align: right;
  width: 100px;
}

.currency-symbol, .rate-unit-text, .term-unit-text {
  color: var(--color-brand);
  font-size: 0.95rem;
  font-weight: 600;
}

.term-input-composite {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.segmented-control {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.segment-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.segment-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Sliders Refinados (Dieter Rams / Instrumento de Precisión) */
.fine-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin-top: 0.4rem;
}

.fine-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-brand);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.fine-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.fine-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-brand);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  cursor: pointer;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: -0.2rem;
}

/* Selector Desplegable Contable */
.select-box select {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
}

.select-box select:focus {
  border-color: var(--border-focus);
}

.panel-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.35rem;
}

/* ==========================================================================
   COLUMNA 2: RESUMEN DE LIQUIDACIÓN CONTABLE
   ========================================================================== */

.ledger-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-brand);
  background: var(--color-brand-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
}

.statement-hero {
  background: linear-gradient(135deg, rgba(0, 68, 129, 0.05) 0%, rgba(2, 132, 132, 0.03) 100%);
  border: 1px solid rgba(0, 68, 129, 0.16);
  border-radius: var(--radius-lg, 16px);
  padding: 1.85rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 68, 129, 0.04);
}

[data-theme="dark"] .statement-hero {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.18) 0%, rgba(15, 23, 42, 0.6) 100%);
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.bbva-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #004481;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .bbva-hero-badge {
  background: #2563eb;
  color: #ffffff;
}

.statement-disclaimer-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.65rem;
  display: block;
  font-style: italic;
}

.statement-legend {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.4rem;
}

.statement-figure {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem;
}

.currency-mark {
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--color-brand);
}

.figure-main {
  font-size: clamp(2.4rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1;
}

.statement-schedule {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.65rem;
}

.statement-schedule strong {
  color: var(--text-main);
}

/* Desglose Contable */
.statement-ledger {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.15rem 0;
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ledger-concept {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.ledger-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.ledger-val.text-cost {
  color: var(--color-cost);
}

.ledger-val.text-total {
  color: var(--color-brand);
}

/* Acciones Documentales */
.statement-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: auto;
}

.btn-documental {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
}

.btn-documental:hover {
  background: var(--bg-subtle);
  border-color: var(--text-dim);
}

.btn-documental.primary-action {
  background: var(--color-brand);
  color: #ffffff;
  border-color: var(--color-brand);
}

.btn-documental.primary-action:hover {
  background: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
}

.btn-documental.btn-pdf-primary {
  background: var(--color-brand);
  color: #ffffff;
  border-color: var(--color-brand);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.22);
}

.btn-documental.btn-pdf-primary:hover {
  background: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
  transform: translateY(-1px);
}

.secondary-actions-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

/* ==========================================================================
   SECCIONES SECUNDARIAS: TRAYECTORIA, ACELERADOR & TABLA
   ========================================================================== */

.section-trajectory, .section-accelerator, .section-schedule {
  margin-bottom: 2rem;
}

/* Gráfico */
.chart-indicators {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.indicator-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dot-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot-balance { background: #3b82f6; }
.dot-capital { background: #059669; }
.dot-interest { background: #be123c; }

.chart-viewport {
  position: relative;
  width: 100%;
  margin-top: 1rem;
}

.chart-viewport canvas {
  width: 100% !important;
  height: auto !important;
  max-height: 340px;
  display: block;
}

.chart-popover {
  position: absolute;
  pointer-events: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-card);
  z-index: 10;
}

/* Acelerador de Pagos */
.accelerator-inputs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .accelerator-inputs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Comparativa Simultánea de Amortización Anticipada */
.anticipada-comparison-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
}

@media (min-width: 768px) {
  .anticipada-comparison-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.option-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: border-color var(--transition-fast);
}

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

.option-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.option-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
}

.badge-primary {
  background: rgba(5, 150, 105, 0.1);
  color: var(--color-equity);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-subtle {
  background: rgba(29, 78, 216, 0.08);
  color: var(--color-brand);
  border: 1px solid rgba(29, 78, 216, 0.2);
}

.option-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.option-stat-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.option-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  margin-bottom: 0.25rem;
}

.option-stat-val {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  font-family: var(--font-mono);
}

.option-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.85rem;
}

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

.opt-metric-val {
  color: var(--text-main);
  font-family: var(--font-mono);
}

.option-verdict {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
  background: var(--bg-surface);
  padding: 0.75rem;
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--color-brand);
}

.option-plazo .option-verdict {
  border-left-color: var(--color-equity);
}

/* ==========================================================================
   MÓDULO DE CAPACIDAD DE ENDEUDAMIENTO (DTI - BANCO DE ESPAÑA)
   ========================================================================== */

.section-dti {
  margin-bottom: 2rem;
}

.badge-bde {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.dti-inputs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .dti-inputs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: block;
  margin-top: 0.35rem;
}

.dti-eval-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dti-metrics-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.dti-ratio-box, .dti-limit-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dti-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dti-ratio-val {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dti-percent-num {
  font-size: 2.2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
  line-height: 1;
}

.dti-status-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-healthy {
  background: rgba(5, 150, 105, 0.12);
  color: var(--color-equity);
  border: 1px solid rgba(5, 150, 105, 0.3);
}

.status-caution {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.status-danger {
  background: rgba(190, 18, 60, 0.12);
  color: var(--color-cost);
  border: 1px solid rgba(190, 18, 60, 0.3);
}

.dti-limit-num {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-brand);
}

/* Barra Termométrica DTI */
.dti-gauge-track {
  position: relative;
  height: 14px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: visible;
  margin: 0.5rem 0 1rem;
}

.dti-gauge-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #059669 0%, #10b981 30%, #d97706 40%, #be123c 60%);
  transition: width 0.35s ease;
  max-width: 100%;
}

.dti-marker {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  background: #0f172a;
  z-index: 2;
}

.dti-marker.marker-30 { left: 30%; }
.dti-marker.marker-40 { left: 40%; }

.dti-marker span {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 600;
}

.dti-diagnostic-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 0;
}

.text-success { color: var(--color-equity) !important; }
.text-primary { color: var(--color-brand) !important; }

/* Tabla Contable */
.schedule-header-flex {
  align-items: center;
}

.table-container {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.ledger-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.ledger-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.ledger-table tbody tr:hover {
  background: var(--bg-hover);
}

.ledger-table .num-col {
  text-align: right;
}

.ledger-table td:not(:first-child) {
  text-align: right;
}

/* ==========================================================================
   ARTÍCULO EDITORIAL (FINANCIAL TIMES STYLE)
   ========================================================================== */

.educational-ledger {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
}

.article-masthead {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.article-masthead h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.article-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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

@media (min-width: 768px) {
  .article-columns {
    grid-template-columns: 1fr 1fr;
  }
}

.article-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.65rem;
}

.article-block p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.65rem;
}

.formula-box {
  background: var(--bg-subtle);
  border-left: 3px solid var(--color-brand);
  padding: 0.65rem 1rem;
  margin: 0.85rem 0;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}

.formula-box code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-brand);
}

/* FAQ */
.faq-editorial {
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
}

.faq-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.faq-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-entry {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  padding: 1rem 1.25rem;
  transition: border-color var(--transition-fast);
}

.faq-entry[open] {
  background: var(--bg-surface);
  border-color: var(--text-dim);
}

.faq-q {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-muted);
}

.faq-entry[open] .faq-q::after {
  content: "−";
}

.faq-a {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   PIE DE PÁGINA INSTITUCIONAL
   ========================================================================== */

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 1.5rem 2.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.footer-purpose {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  max-width: 520px;
}

.footer-legal {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.disclaimer-text {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.copyright-text {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ==========================================================================
   RADAR COMPARATIVO DE TASAS DE MERCADO
   ========================================================================== */

.section-market-radar {
  margin-bottom: 2rem;
}

.radar-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.radar-tag-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.badge-tag-live {
  background: rgba(5, 150, 105, 0.1);
  color: var(--color-equity);
  border: 1px solid rgba(5, 150, 105, 0.25);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-xs);
}

.radar-subtext {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.radar-filters {
  flex-shrink: 0;
}

.radar-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .radar-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .radar-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.radar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  position: relative;
}

.radar-card:hover {
  border-color: var(--color-brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.radar-card.highlighted-card {
  border-color: rgba(5, 150, 105, 0.4);
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.03) 0%, var(--bg-surface) 35%);
}

.radar-card.card-alert {
  border-color: rgba(190, 18, 60, 0.3);
  background: linear-gradient(180deg, rgba(190, 18, 60, 0.02) 0%, var(--bg-surface) 35%);
}

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

.cat-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.recommendation-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.badge-star {
  color: #d97706;
}

.badge-green {
  color: var(--color-equity);
}

.badge-warning {
  color: var(--color-cost);
}

.radar-product-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  line-height: 1.25;
}

.radar-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.radar-rates-display {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.rate-primary-box, .rate-secondary-box {
  display: flex;
  flex-direction: column;
}

.rate-legend {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

.rate-large {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.1;
}

.rate-small {
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.radar-conditions {
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.btn-simulate-rate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-simulate-rate svg {
  color: var(--color-brand);
}

.btn-simulate-rate:hover {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #ffffff;
}

.btn-simulate-rate:hover svg {
  color: #ffffff;
}

/* Badges del Recomendador Dual (Tasas Bajas vs Menor Barrera) */
.badge-low-rate {
  background: rgba(29, 78, 216, 0.1);
  color: var(--color-brand);
  border: 1px solid rgba(29, 78, 216, 0.25);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-low-barrier {
  background: rgba(5, 150, 105, 0.1);
  color: var(--color-equity);
  border: 1px solid rgba(5, 150, 105, 0.25);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.radar-entity-name {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-brand);
  margin-top: 0.15rem;
}

/* Desglose Detallado de Requisitos por Entidad */
.radar-requirements-list {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.76rem;
}

.req-item {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  line-height: 1.45;
}

.req-label {
  font-weight: 700;
  color: var(--text-main);
  flex-shrink: 0;
}

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

/* ==========================================================================
   CONSEJOS FINANCIEROS Y ESTRATEGIAS DE AHORRO
   ========================================================================== */

.section-financial-advice {
  margin-bottom: 2rem;
}

.advice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .advice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .advice-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.advice-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.advice-card:hover {
  border-color: var(--color-brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.advice-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.advice-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-brand);
  background: var(--color-brand-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
}

.advice-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.advice-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin: 0;
}

.advice-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.advice-takeaway {
  background: var(--bg-subtle);
  border-left: 3px solid var(--color-brand);
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: 0.78rem;
  color: var(--text-main);
  line-height: 1.5;
  font-weight: 500;
}

.advice-takeaway strong {
  color: var(--color-brand);
}

/* ==========================================================================
   HUB DE CONSULTAS DE ALTA INTENCIÓN (LEYENDAS MAGNÉTICAS)
   ========================================================================== */

.section-discovery-hub {
  margin-bottom: 2rem;
}

.badge-tag-editorial {
  background: rgba(29, 78, 216, 0.08);
  color: var(--color-brand);
  border: 1px solid rgba(29, 78, 216, 0.2);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-xs);
  display: inline-block;
  margin-bottom: 0.35rem;
}

.discovery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .discovery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.discovery-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1.15rem;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.discovery-card:hover {
  border-color: var(--color-brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.discovery-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(29, 78, 216, 0.08);
  border: 1px solid rgba(29, 78, 216, 0.2);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.discovery-icon-wrap.icon-warning {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.25);
  color: #d97706;
}

.discovery-icon-wrap.icon-alert {
  background: rgba(190, 18, 60, 0.1);
  border-color: rgba(190, 18, 60, 0.25);
  color: var(--color-cost);
}

.discovery-icon-wrap.icon-info {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.25);
  color: var(--color-equity);
}

.discovery-icon-wrap.icon-rate {
  background: rgba(15, 23, 42, 0.06);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.discovery-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.discovery-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin: 0;
}

.discovery-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.discovery-footer {
  margin-top: 0.35rem;
}

.btn-discovery-action {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-brand);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.btn-discovery-action:hover {
  color: var(--color-brand-hover);
  text-decoration: underline;
}

/* ==========================================================================
   TOAST FLOTANTE DE NOTIFICACIÓN
   ========================================================================== */

.toast-bubble {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: slide-up-toast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

@keyframes slide-up-toast {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   ADAPTACIÓN RESPONSIVE MÓVIL
   ========================================================================== */

@media (max-width: 768px) {
  .content-wrapper {
    padding: 1.5rem 1rem 3rem;
  }

  .desk-panel {
    padding: 1.35rem;
  }

  .statement-hero {
    padding: 1.25rem 1rem;
  }

  .figure-main {
    font-size: 2.25rem;
  }

  .educational-ledger {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 640px) {
  .header-container {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
  }
  .header-tools {
    gap: 0.4rem;
  }
  .tool-select {
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   ACCIONES EN TARJETAS DE RADAR Y BOTONES COMPACTOS
   ========================================================================== */

.radar-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.radar-card-subactions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.btn-bank-official,
.btn-open-lead-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-bank-official {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn-bank-official:hover {
  background: var(--bg-surface);
  color: var(--color-brand);
  border-color: var(--color-brand);
}

.btn-open-lead-modal {
  background: rgba(5, 150, 105, 0.08);
  color: var(--color-equity);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.btn-open-lead-modal:hover {
  background: var(--color-equity);
  color: #ffffff;
  border-color: var(--color-equity);
}

.btn-pdf-table {
  background: rgba(29, 78, 216, 0.08);
  color: var(--color-brand);
  font-weight: 600;
}

.btn-pdf-table:hover {
  background: rgba(29, 78, 216, 0.16);
  color: var(--color-brand-hover);
}

/* ==========================================================================
   MODAL DE ASESORÍA FINANCIERA & LEAD GEN
   ========================================================================== */

.lead-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.lead-modal-overlay.hidden {
  display: none !important;
  opacity: 0;
}

.lead-modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  animation: modal-scale-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.lead-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.lead-modal-close:hover {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--text-dim);
}

.lead-modal-header {
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}

.lead-modal-badge {
  display: inline-block;
  background: rgba(29, 78, 216, 0.1);
  color: var(--color-brand);
  border: 1px solid rgba(29, 78, 216, 0.25);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.lead-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.lead-modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.5;
}

.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 580px) {
  .lead-form-grid {
    grid-template-columns: 1fr;
  }
}

.lead-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.lead-input,
.lead-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.lead-input:focus,
.lead-select:focus {
  outline: none;
  border-color: var(--color-brand);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.lead-consent-group {
  margin: 1.25rem 0;
}

.lead-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  cursor: pointer;
}

.lead-checkbox-label input {
  margin-top: 0.15rem;
}

.lead-checkbox-label a {
  color: var(--color-brand);
  text-decoration: underline;
}

.btn-submit-lead {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: var(--color-brand);
  color: #ffffff;
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25);
}

.btn-submit-lead:hover {
  background: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
  transform: translateY(-1px);
}

.lead-modal-disclaimer {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 0.85rem;
  line-height: 1.4;
}

.lead-success-state {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.lead-success-icon {
  width: 64px;
  height: 64px;
  background: rgba(5, 150, 105, 0.12);
  color: var(--color-equity);
  border: 2px solid var(--color-equity);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.lead-success-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.lead-success-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 440px;
  margin: 0 auto 1.5rem;
}

.lead-success-code-box {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  display: inline-block;
  margin-bottom: 1.75rem;
}

.lead-code-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.lead-code-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--color-brand);
  letter-spacing: 0.08em;
}

.btn-close-lead-success {
  padding: 0.75rem 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-close-lead-success:hover {
  background: var(--bg-subtle);
  border-color: var(--text-dim);
}

/* ==========================================================================
   CERTIFICADO OFICIAL Y REGLAS DE IMPRESIÓN / PDF (A4)
   ========================================================================== */

#officialAuditCertificate {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm 10mm 12mm;
  }

  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 9.5pt !important;
    line-height: 1.35 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Ocultar elementos web no imprimibles */
  .site-header,
  .site-nav-chips,
  .hero-calculator,
  .desk-panel,
  .site-footer,
  .toast-bubble,
  .lead-modal-overlay,
  #themeToggle,
  .educational-ledger,
  .geo-prompt-banner,
  .country-modal-backdrop,
  .bento-ad-slot-wrapper,
  .bento-ad-slot,
  .bento-ad-placeholder-inner,
  .export-actions,
  .preset-segmented,
  .fine-slider,
  .slider-ticks,
  .btn-action,
  .info-tooltip-btn {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* Mostrar certificado institucional A4 */
  #officialAuditCertificate {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  .cert-section {
    page-break-inside: avoid;
  }

  .cert-table {
    page-break-inside: auto;
  }

  .cert-table tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  .cert-footer {
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   ESTRUCTURA VISUAL DEL CERTIFICADO OFICIAL DE AUDITORÍA
   ========================================================================== */

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 8px;
  border-bottom: 2px solid #0f172a;
  margin-bottom: 12px;
}

  .cert-logo-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16pt;
    font-weight: 800;
    color: #1e3a8a;
  }

  .cert-brand-tld {
    color: #2563eb;
  }

  .cert-doc-type {
    display: block;
    font-size: 8.5pt;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
    margin-top: 2px;
  }

  .cert-meta-block {
    text-align: right;
    font-size: 8pt;
    line-height: 1.4;
    color: #334155;
  }

  .cert-section {
    margin-bottom: 12px;
    page-break-inside: avoid;
  }

  .cert-section-title {
    font-size: 9pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1e3a8a;
    margin-bottom: 6px;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 2px;
  }

  .cert-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.5pt;
  }

  .cert-spec-table th {
    text-align: left;
    width: 25%;
    padding: 3px 6px;
    color: #64748b;
    font-weight: 600;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
  }

  .cert-spec-table td {
    width: 25%;
    padding: 3px 6px;
    font-weight: 700;
    color: #0f172a;
    border: 1px solid #e2e8f0;
  }

  .cert-kpis-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
  }

  .cert-kpi-box {
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    padding: 6px 4px;
    text-align: center;
    background: #f8fafc;
  }

  .cert-kpi-box.cert-kpi-main {
    border-color: #2563eb;
    background: #eff6ff;
  }

  .cert-kpi-label {
    display: block;
    font-size: 6.5pt;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 2px;
  }

  .cert-kpi-val {
    display: block;
    font-size: 10pt;
    font-weight: 800;
    color: #0f172a;
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  }

  .cert-kpi-main .cert-kpi-val {
    color: #1d4ed8;
    font-size: 11pt;
  }

  .cert-text-interest {
    color: #b91c1c;
  }

  .cert-dti-box {
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    padding: 6px 10px;
    background: #f8fafc;
    font-size: 8pt;
  }

  .cert-dti-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-weight: 600;
  }

  .cert-dti-badge {
    background: #dcfce7;
    color: #15803d;
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 7.5pt;
    font-weight: 700;
    margin-left: 6px;
  }

  .cert-dti-desc {
    font-size: 7.5pt;
    color: #475569;
    margin: 0;
  }

  .cert-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 7.8pt;
    page-break-inside: auto;
  }

  .cert-table th {
    background: #0f172a;
    color: #ffffff;
    font-weight: 600;
    padding: 3px 6px;
    text-align: left;
    border: 1px solid #0f172a;
  }

  .cert-table td {
    padding: 2.5px 6px;
    border: 1px solid #e2e8f0;
    color: #1e293b;
  }

  .cert-table tr:nth-child(even) {
    background: #f8fafc;
  }

  .cert-table .num-col {
    text-align: right;
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  }

  .cert-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 7pt;
    page-break-inside: avoid;
  }

  .cert-legal-text {
    width: 70%;
    color: #64748b;
    line-height: 1.35;
  }

  .cert-signatures {
    width: 28%;
    text-align: right;
  }

  .cert-stamp {
    border: 1px solid #1e3a8a;
    padding: 3px 6px;
    border-radius: 2px;
    display: inline-block;
    background: #eff6ff;
  }

  .cert-stamp-badge {
    display: block;
    font-size: 5.5pt;
    font-weight: 700;
    color: #1e3a8a;
  }

  .cert-stamp-domain {
    display: block;
    font-size: 7.5pt;
    font-weight: 800;
    color: #1d4ed8;
  }

  .cert-qr-note {
    font-size: 6.5pt;
    color: #475569;
    margin-top: 3px;
  }


/* ==========================================================================
   GUÍA RÁPIDA PEDAGÓGICA (NIVEL ACCESIBLE / 15 AÑOS)
   ========================================================================== */
.section-easy-guide {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.section-easy-guide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-brand);
}

.easy-guide-header {
  margin-bottom: 1.5rem;
}

.guide-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(29, 78, 216, 0.08);
  color: var(--color-brand);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.easy-guide-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.easy-guide-lead {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 860px;
  margin: 0;
}

.easy-guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .easy-guide-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.easy-step-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  transition: all var(--transition-fast);
}

.easy-step-card:hover {
  border-color: var(--color-brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

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

.step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-brand);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
}

.step-icon {
  font-size: 1.35rem;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.3;
}

.step-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.step-tip {
  background: var(--bg-surface);
  border-left: 3px solid #10b981;
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text-main);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  line-height: 1.45;
  margin-top: 0.4rem;
}

/* ==========================================================================
   MATRIZ DE CATEGORÍAS DE PRÉSTAMO COMPARADAS
   ========================================================================== */
.section-loan-categories {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.categories-tag-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.categories-subtext {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.categories-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .categories-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.category-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition-fast);
}

.category-card:hover {
  border-color: var(--color-brand);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.category-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.cat-icon-badge {
  font-size: 1.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-title-block {
  flex: 1;
}

.category-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.2rem;
  line-height: 1.25;
}

.category-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: block;
}

.category-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cat-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-xs);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.cat-chip strong {
  color: var(--text-main);
}

.category-pros-cons {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cat-box {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.5;
}

.cat-box-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cat-box-desc {
  margin: 0;
}

.cat-box-pro {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #065f46;
}

[data-theme="dark"] .cat-box-pro {
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
}

.cat-box-pro .cat-box-label {
  color: #047857;
}

[data-theme="dark"] .cat-box-pro .cat-box-label {
  color: #34d399;
}

.cat-box-con {
  background: rgba(225, 29, 72, 0.05);
  border: 1px solid rgba(225, 29, 72, 0.25);
  color: #881337;
}

[data-theme="dark"] .cat-box-con {
  background: rgba(225, 29, 72, 0.12);
  color: #fecdd3;
}

.cat-box-con .cat-box-label {
  color: #be123c;
}

[data-theme="dark"] .cat-box-con .cat-box-label {
  color: #fb7185;
}

.category-official-sources {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.75rem;
}

.sources-label {
  display: block;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.sources-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cat-ref-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
}

.cat-ref-link:hover {
  border-color: var(--color-brand);
  background: rgba(29, 78, 216, 0.08);
}

.btn-simulate-category {
  margin-top: auto;
}

/* ==========================================================================
   CONVENIENCIA EN TARJETAS DEL RADAR (POR QUÉ CONVIENE VS CUÁNDO EVITARLO)
   ========================================================================== */
.radar-convenience-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.76rem;
}

.conv-item {
  line-height: 1.45;
}

.conv-badge {
  display: block;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.15rem;
}

.conv-pro .conv-badge {
  color: #059669;
}

.conv-con .conv-badge {
  color: #e11d48;
}

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

/* ==========================================================================
   ENLACES OFICIALES EN AUDIT STRIP / PILLS CLICABLES
   ========================================================================== */
a.audit-metric-pill {
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

a.audit-metric-pill:hover {
  border-color: var(--color-brand);
  background: var(--bg-surface);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

a.audit-metric-pill .pill-sub::after {
  content: " ↗";
  font-size: 0.65rem;
  opacity: 0.7;
}


/* ==========================================================================
   PRUEBAS DE ESTRÉS FINANCIERO (STRESS TESTING)
   ========================================================================== */
.section-stress-test {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.stress-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.stress-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .stress-dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stress-metric-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.stress-metric-card:hover {
  border-color: var(--color-brand);
}

.stress-card-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stress-val-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.stress-main-num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stress-sub-unit {
  font-size: 0.84rem;
  color: var(--text-dim);
}

.stress-card-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.stress-verdict-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stress-verdict-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.verdict-icon {
  font-size: 1.2rem;
}

.verdict-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.stress-verdict-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   CALCULADORA DE GASTOS DE ESCRITURACIÓN E IMPUESTOS
   ========================================================================== */
.section-closing-costs {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.closing-inputs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .closing-inputs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.closing-costs-summary-card {
  margin-top: 1.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.closing-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border-subtle);
}

@media (min-width: 768px) {
  .closing-breakdown-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.closing-item-box {
  background: var(--bg-surface);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.closing-item-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.closing-item-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
}

.closing-item-sub {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.closing-total-banner {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
  border-top: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

[data-theme="dark"] .closing-total-banner {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.18) 0%, rgba(37, 99, 235, 0.08) 100%);
}

.banner-legend {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-brand);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.banner-figure-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.banner-total-num {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-brand);
  line-height: 1.1;
}

.banner-explanation {
  max-width: 480px;
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   VERSIÓN 12.0: DETECCIÓN ASISTIDA DE PAÍS, PEDAGOGÍA DE GRÁFICO,
   APORTE INICIAL EXIGIDO Y PLAN DE DESENDEUDAMIENTO ACELERADO
   ========================================================================== */

/* --- 1. BARRA ASISTIDA DE DETECCIÓN Y CONFIRMACIÓN DE PAÍS --- */
.geo-prompt-banner {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.95) 0%, rgba(30, 64, 175, 0.98) 100%);
  color: #ffffff;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 999;
  animation: slide-down-banner 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-down-banner {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.geo-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.geo-banner-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.geo-banner-message strong {
  color: #93c5fd;
}

.geo-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-geo-confirm {
  background: #10b981;
  color: #ffffff;
  border: none;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-geo-confirm:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-geo-change {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-geo-change:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- MODAL DE SELECCIÓN DE PAÍS --- */
.country-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fade-in-modal 0.2s ease-out;
}

.country-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow-y: auto;
}

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

.country-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 0.25rem 0;
}

.country-modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.country-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

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

.country-card-choice:hover {
  background: var(--bg-surface);
  border-color: var(--color-brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.choice-flag {
  font-size: 1.85rem;
  line-height: 1;
}

.choice-info {
  display: flex;
  flex-direction: column;
}

.choice-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.choice-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* --- 2. PEDAGOGÍA DEL GRÁFICO DE AMORTIZACIÓN Y PUNTO BISAGRA --- */
.chart-pedagogy-block {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.inflection-point-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

[data-theme="dark"] .inflection-point-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.08) 100%);
  border-color: rgba(16, 185, 129, 0.45);
}

.inflection-badge-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  min-width: 140px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.inflection-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #10b981;
  letter-spacing: 0.06em;
}

.inflection-date {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.2rem;
}

.inflection-desc-col {
  flex: 1;
}

.inflection-headline {
  font-size: 0.98rem;
  font-weight: 700;
  color: #10b981;
  margin: 0 0 0.35rem 0;
}

.inflection-p {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
}

.chart-concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.chart-concept-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast);
}

.chart-concept-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.concept-blue {
  border-top: 3px solid #3b82f6;
}

.concept-green {
  border-top: 3px solid #10b981;
}

.concept-red {
  border-top: 3px solid #f43f5e;
}

.concept-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.curve-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-blue { background: #3b82f6; }
.dot-green { background: #10b981; }
.dot-red { background: #f43f5e; }

.concept-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.concept-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 0.85rem 0;
  flex: 1;
}

.concept-milestone {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  font-size: 0.76rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.concept-milestone strong {
  font-family: var(--font-mono);
  color: var(--text-main);
}

/* --- 3. APORTE INICIAL EXIGIDO (ENTRADA / PIE) --- */
.cat-down-payment-box {
  background: rgba(29, 78, 216, 0.06);
  border: 1px dashed rgba(29, 78, 216, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

[data-theme="dark"] .cat-down-payment-box {
  background: rgba(29, 78, 216, 0.15);
  border-color: rgba(29, 78, 216, 0.4);
}

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

.down-payment-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-brand);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.down-payment-val {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
}

.down-payment-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* --- 4. NUEVA SECCIÓN DE DESENDEUDAMIENTO ACELERADO --- */
.section-debt-relief {
  border-left: 4px solid #8b5cf6;
}

.debt-relief-setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.debt-input-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.card-revolving {
  border-top: 3px solid #f43f5e;
}

.card-personal {
  border-top: 3px solid #3b82f6;
}

.card-extra-power {
  border-top: 3px solid #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, rgba(5, 150, 105, 0.02) 100%);
}

.debt-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.debt-type-pill {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.debt-rate-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--bg-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
}

.debt-strategy-selector-row {
  margin: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.selector-legend {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.debt-relief-results-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.debt-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.debt-kpi-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.debt-kpi-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.debt-kpi-val-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.debt-kpi-num {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
}

.debt-kpi-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.debt-roadmap-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.roadmap-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.85rem 0;
}

.roadmap-steps-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.45;
}

.debt-golden-rules-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

.golden-rule-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.rule-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.rule-text strong {
  display: block;
  font-size: 0.84rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.rule-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 640px) {
  .geo-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .inflection-point-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .inflection-badge-col {
    width: 100%;
  }
}

/* ==========================================================================
   BENTO GRID ADSENSE ARCHITECTURE — CLS = 0.000 GUARANTEED
   ========================================================================== */
.bento-ad-slot-wrapper {
  margin: 1.75rem 0;
  width: 100%;
  clear: both;
}

.bento-ad-slot {
  min-height: 250px;
  width: 100%;
  border-radius: var(--radius-md, 12px);
  background: rgba(15, 23, 42, 0.03);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  contain: layout style paint;
  contain-intrinsic-size: 250px;
}

[data-theme="dark"] .bento-ad-slot {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(255, 255, 255, 0.08);
}

.bento-ad-slot.ad-tall {
  min-height: 280px;
  contain-intrinsic-size: 280px;
}

.bento-ad-slot.ad-banner {
  min-height: 100px;
}

.bento-ad-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.bento-ad-placeholder-inner {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted, #94a3b8);
}

.bento-ad-placeholder-inner p {
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

/* ==========================================================================
   COMPARADOR FORENSE: BANCO VS CONCESIONARIO / FINANCIERA DE MARCA
   ========================================================================== */

.section-dealer-vs-bank {
  margin-bottom: 2rem;
}

.dealer-vs-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}

.dvb-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dvb-card.card-dealer {
  border-top: 4px solid #f59e0b;
}

.dvb-card.card-bank {
  border-top: 4px solid #10b981;
}

.dvb-card-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.dvb-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  display: inline-block;
  margin-bottom: 0.35rem;
}

.badge-dealer {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .badge-dealer {
  color: #fbbf24;
}

.badge-bank {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .badge-bank {
  color: #34d399;
}

.dvb-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.25rem 0;
}

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

.form-row-dual {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.form-row-half {
  flex: 1;
}

.field-static-no-cost {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #10b981;
}

.dvb-summary-box {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dvb-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.dvb-metric-row strong {
  color: var(--text-main);
  font-weight: 600;
}

.dvb-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.dvb-total-num {
  font-size: 1.15rem;
  color: var(--color-brand);
}

.dvb-verdict-card {
  background: var(--bg-subtle);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: all 0.25s ease;
}

.dvb-verdict-card.winner-bank {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.dvb-verdict-card.winner-dealer {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.dvb-verdict-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.dvb-winner-badge {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-xs);
  background: #10b981;
  color: #ffffff;
}

.winner-dealer .dvb-winner-badge {
  background: #2563eb;
}

.dvb-savings-figure {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.dvb-verdict-explanation {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.dvb-verdict-explanation strong {
  color: var(--text-main);
}


/* ==========================================================================
   SECCIÓN DE BLINDAJE LEGAL Y DESCARGO FINANCIERO (v13.0)
   ========================================================================== */

.section-legal-disclaimer {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 16px);
  padding: 2.25rem 2rem;
  margin: 3.5rem 0 2rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.legal-disclaimer-header {
  max-width: 860px;
  margin-bottom: 2rem;
}

.legal-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 68, 129, 0.08);
  color: var(--color-brand, #004481);
  border: 1px solid rgba(0, 68, 129, 0.18);
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .legal-badge-pill {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.legal-disclaimer-title {
  font-size: clamp(1.4rem, 2.8vw, 1.85rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.75rem 0;
}

.legal-disclaimer-lead {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.legal-disclaimer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 820px) {
  .legal-disclaimer-grid {
    grid-template-columns: 1fr;
  }
}

.legal-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 12px);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.legal-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.legal-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.65rem;
}

.legal-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
  line-height: 1.35;
}

.legal-card-text {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.legal-card-text strong {
  color: var(--text-main);
}

/* Tarjeta de Alerta (No es consejo de inversión) */
.legal-card-alert {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.03);
}

[data-theme="dark"] .legal-card-alert {
  background: rgba(245, 158, 11, 0.06);
}

/* Tarjeta de Acción (Acudir a profesional matriculado) */
.legal-card-action {
  border-left: 4px solid #0284c7;
  background: rgba(2, 132, 199, 0.03);
}

[data-theme="dark"] .legal-card-action {
  background: rgba(2, 132, 199, 0.06);
}

/* Banner de Cumplimiento Regulatorio */
.legal-jurisdiction-banner {
  background: linear-gradient(135deg, rgba(7, 33, 70, 0.05) 0%, rgba(16, 185, 129, 0.04) 100%);
  border: 1px solid rgba(7, 33, 70, 0.12);
  border-radius: var(--radius-md, 12px);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

[data-theme="dark"] .legal-jurisdiction-banner {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.jurisdiction-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.jurisdiction-content {
  flex: 1;
}

.jurisdiction-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  margin-bottom: 0.35rem;
}

.jurisdiction-desc {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   ESTILOS: DISTRIBUCIÓN DE PRÉSTAMO Y MÓDULO DE CANCELACIÓN ÓPTIMA (v13.1)
   ========================================================================== */

/* Barra de Distribución en Statement Hero */
.loan-breakdown-bar-wrap {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(0, 68, 129, 0.15);
}

[data-theme="dark"] .loan-breakdown-bar-wrap {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.breakdown-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-main);
}

.bar-lbl-capital strong {
  color: #004481;
}

[data-theme="dark"] .bar-lbl-capital strong {
  color: #60a5fa;
}

.bar-lbl-interest strong {
  color: #d97706;
}

[data-theme="dark"] .bar-lbl-interest strong {
  color: #fbbf24;
}

.loan-progress-track {
  width: 100%;
  height: 9px;
  background: rgba(0, 0, 0, 0.07);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  margin-bottom: 0.85rem;
}

[data-theme="dark"] .loan-progress-track {
  background: rgba(255, 255, 255, 0.1);
}

.progress-fill {
  height: 100%;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.fill-capital {
  background: #004481;
}

[data-theme="dark"] .progress-fill.fill-capital {
  background: #3b82f6;
}

.progress-fill.fill-interest {
  background: #f59e0b;
}

.btn-scroll-cancellation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #004481;
  background: rgba(0, 68, 129, 0.08);
  border: 1px solid rgba(0, 68, 129, 0.22);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 440px;
}

.btn-scroll-cancellation:hover {
  background: #004481;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 68, 129, 0.15);
}

[data-theme="dark"] .btn-scroll-cancellation {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .btn-scroll-cancellation:hover {
  background: #2563eb;
  color: #ffffff;
}

/* Indicador de Ventana en Header de Gráfico */
.dot-gold-window {
  background: #10b981;
  border: 1px dashed #047857;
}

/* Módulo de Cancelación Óptima */
.section-optimal-cancellation {
  margin-top: 2rem;
  border: 1px solid rgba(16, 185, 129, 0.25);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.02) 0%, transparent 100%);
}

[data-theme="dark"] .section-optimal-cancellation {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, rgba(15, 23, 42, 0.6) 100%);
}

.badge-accent-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}

[data-theme="dark"] .badge-accent-gold {
  color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.35);
}

.cancel-interactive-box {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 12px);
  padding: 1.35rem 1.25rem;
  margin: 1.25rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .cancel-interactive-box {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.1);
}

.cancel-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.cancel-month-headline {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.cancel-target-month {
  font-size: 1.15rem;
  font-weight: 800;
  color: #004481;
  margin-left: 0.35rem;
}

[data-theme="dark"] .cancel-target-month {
  color: #60a5fa;
}

.cancel-shortcuts {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.shortcut-chip {
  background: var(--btn-secondary-bg, #f1f5f9);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.shortcut-chip:hover {
  background: #e2e8f0;
}

.shortcut-chip.active {
  background: #004481;
  color: #ffffff;
  border-color: #004481;
}

[data-theme="dark"] .shortcut-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .shortcut-chip.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.mark-gold {
  color: #059669;
  font-weight: 700;
}

[data-theme="dark"] .mark-gold {
  color: #34d399;
}

/* KPIs de Cancelación */
.cancel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.cancel-kpi-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 12px);
  padding: 1.15rem 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .cancel-kpi-card {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.cancel-kpi-card.highlight-green {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(16, 185, 129, 0.01) 100%);
}

[data-theme="dark"] .cancel-kpi-card.highlight-green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.6) 100%);
  border-color: rgba(16, 185, 129, 0.5);
}

.cancel-kpi-card .kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.cancel-kpi-card .kpi-val-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.cancel-kpi-card .kpi-val {
  font-size: 1.55rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  color: var(--text-main);
}

.cancel-kpi-card .kpi-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: auto;
}

.text-emerald {
  color: #059669;
}

[data-theme="dark"] .text-emerald {
  color: #10b981;
}

.text-amber {
  color: #d97706;
}

[data-theme="dark"] .text-amber {
  color: #fbbf24;
}

/* Semáforo y Veredicto */
.cancel-verdict-banner {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md, 12px);
  margin: 1.25rem 0;
  transition: all 0.25s ease;
}

.verdict-banner-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.verdict-banner-content {
  flex: 1;
}

.verdict-zone-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}

.verdict-zone-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
  color: var(--text-main);
}

.verdict-zone-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Variantes de Color del Veredicto */
.cancel-verdict-banner.zone-gold {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.cancel-verdict-banner.zone-gold .verdict-zone-badge {
  background: #10b981;
  color: #ffffff;
}

.cancel-verdict-banner.zone-amber {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.cancel-verdict-banner.zone-amber .verdict-zone-badge {
  background: #f59e0b;
  color: #ffffff;
}

.cancel-verdict-banner.zone-gray {
  background: rgba(100, 116, 139, 0.08);
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.cancel-verdict-banner.zone-gray .verdict-zone-badge {
  background: #64748b;
  color: #ffffff;
}

/* Barra de Comparación de Coste Total */
.cancel-comparison-bar-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 12px);
  padding: 1.25rem;
}

[data-theme="dark"] .cancel-comparison-bar-card {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.comparison-bar-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.comp-bars-track {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.comp-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.comp-meter-full {
  width: 100%;
  height: 11px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

[data-theme="dark"] .comp-meter-full {
  background: rgba(255, 255, 255, 0.1);
}

.comp-fill-base {
  height: 100%;
  background: #64748b;
}

.comp-fill-saved {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  transition: width 0.35s ease;
}

.comp-savings-tag {
  font-size: 0.86rem;
  color: var(--text-main);
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.22);
  padding: 0.6rem 0.95rem;
  border-radius: 8px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .cancel-slider-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .cancel-shortcuts {
    width: 100%;
  }
  .shortcut-chip {
    flex: 1;
    text-align: center;
  }
  .cancel-verdict-banner {
    flex-direction: column;
    gap: 0.65rem;
  }
}

/* ==================================================================== */
/* AAA+ PERFORMANCE ENGINE & ZERO UX FRICTION SYSTEM (CLARITY P75)     */
/* ==================================================================== */
.amortization-row {
  content-visibility: auto;
  contain-intrinsic-size: 0 42px;
}

.is-tactile-pressed {
  transform: scale(0.975) !important;
  opacity: 0.92 !important;
  transition: transform 0.05s ease, opacity 0.05s ease !important;
}

[aria-busy="true"] {
  pointer-events: none !important;
  opacity: 0.72 !important;
  cursor: wait !important;
}
