/* ════════════════════════════════════════════════════════════════════════════
   TheWaveRadar — Proyección a 10 años [SL-076]. Sistema visual de app.css/tablero.css:
   variables --tw-*, dark-first, targets 44px, prefijo .tw-proy-.
   ════════════════════════════════════════════════════════════════════════════ */

.tw-proy {
  margin: 18px 0;
  padding: 15px;
  background: var(--tw-bg-card, #151a21);
  border: 1px solid var(--tw-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--tw-r-lg);
}
.tw-proy-title {
  font-size: var(--tw-fs-base);
  font-weight: 800;
  color: var(--tw-text-head, #f2f4f7);
  margin: 0 0 4px;
}
.tw-proy-sub {
  font-size: var(--tw-fs-xs);
  color: var(--tw-text-mute, #9aa3af);
  line-height: 1.5;
  margin: 0 0 14px;
}

/* Gráfico */
.tw-proy-chart {
  width: 100%;
  height: 150px;
  border: 1px solid var(--tw-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--tw-r-md);
  background: var(--tw-bg, #0d1014);
  overflow: hidden;
}
.tw-proy-svg { width: 100%; height: 100%; display: block; }

/* Rango titular */
.tw-proy-range {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 13px 0 4px;
}
.tw-proy-range-k {
  font-size: var(--tw-fs-2xs);
  color: var(--tw-text-mute, #9aa3af);
}
.tw-proy-range-v {
  font-size: var(--tw-fs-md);
  font-weight: 700;
  color: var(--tw-text-head, #f2f4f7);
  font-variant-numeric: tabular-nums;
}
.tw-proy-range-v strong { color: var(--tw-accent, #22c55e); }

/* 3 escenarios */
.tw-proy-scen {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.tw-proy-card {
  padding: 9px 8px;
  background: var(--tw-bg, #0d1014);
  border: 1px solid var(--tw-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--tw-r-md);
  text-align: center;
}
.tw-proy-card-base { border-color: var(--tw-accent, #22c55e); }
.tw-proy-card-k {
  font-size: var(--tw-fs-4xs);
  color: var(--tw-text-mute, #9aa3af);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 3px;
  line-height: 1.2;
}
.tw-proy-card-v {
  font-size: var(--tw-fs-sm);
  font-weight: 800;
  color: var(--tw-text-head, #f2f4f7);
  font-variant-numeric: tabular-nums;
}
.tw-proy-contrib {
  font-size: var(--tw-fs-xs);
  color: var(--tw-text-main, #cbd2dc);
  line-height: 1.55;
  margin: 4px 0 0;
}
.tw-proy-contrib strong { color: var(--tw-text-head, #f2f4f7); }

/* Controles (sliders) */
.tw-proy-controls {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tw-proy-ctl { display: block; }
.tw-proy-ctl-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--tw-fs-xs);
  color: var(--tw-text, #e6e8ec);
  margin-bottom: 6px;
}
.tw-proy-ctl-val {
  font-weight: 700;
  color: var(--tw-accent, #22c55e);
  font-variant-numeric: tabular-nums;
}
.tw-proy-ctl input[type="range"] {
  width: 100%;
  height: 30px;             /* zona táctil cómoda para el pulgar */
  accent-color: var(--tw-accent, #22c55e);
  cursor: pointer;
}
.tw-proy-note {
  font-size: var(--tw-fs-3xs);
  color: var(--tw-text-mute, #9aa3af);
  margin: -8px 0 0;
}
.tw-proy-disc {
  font-size: var(--tw-fs-3xs);
  color: var(--tw-text-soft, #6b7280);
  line-height: 1.45;
  margin: 16px 0 0;
}

/* [SL-083] Percentil junto al nombre PRIIPs — dato de apoyo, no protagonista. */
.tw-proy-pctl {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--tw-fs-4xs);
  opacity: .55;
  font-weight: 400;
  margin-left: 3px;
}

/* [SL-083] Limitaciones del modelo (patrón Curvo). Plegado por defecto. */
.tw-proy-lim {
  margin: 14px 0 0;
  border: 1px solid var(--tw-border);
  border-radius: var(--tw-r-md);
  background: var(--tw-bg-card);
}
.tw-proy-lim > summary {
  cursor: pointer;
  padding: 11px 14px;
  font-size: var(--tw-fs-xs);
  font-weight: 600;
  color: var(--tw-text-mute);
  list-style: none;
  min-height: 44px;            /* mínimo táctil iOS */
  display: flex;
  align-items: center;
  gap: 7px;
}
.tw-proy-lim > summary::-webkit-details-marker { display: none; }
.tw-proy-lim > summary::marker { content: ''; }
.tw-proy-lim > summary::after { content: '▾'; opacity: .55; font-size: var(--tw-fs-3xs); }
.tw-proy-lim[open] > summary::after { content: '▴'; }
.tw-proy-lim ul {
  margin: 0;
  padding: 0 16px 14px 32px;
  font-size: var(--tw-fs-xs);
  line-height: 1.6;
  color: var(--tw-text-mute);
}
.tw-proy-lim li { margin-bottom: 9px; }
.tw-proy-lim li:last-child { margin-bottom: 0; }
.tw-proy-lim strong { color: var(--tw-text); font-weight: 600; }
