/* =========================================================
   RR Matriz de Impacto — CSS v1.9.0
   Auditoría de diseño premium — Inter only
   Cambios: brand header, firma editorial, botones premium,
   separador tabla, jerarquía insights, CTA oculto por defecto,
   fix bug mobile CSS anidado, score items categorizados.
   ========================================================= */

/* ---- Reset y base ---- */
.rr-matriz-impacto {
  font-family: Inter, system-ui, -apple-system, Arial, sans-serif;
  color: #3F3F3F;
  max-width: 100%;
  min-width: 0;
}

.rr-matriz-impacto *,
.rr-matriz-impacto *::before,
.rr-matriz-impacto *::after {
  box-sizing: border-box;
  min-width: 0;
}

/* ---- Shell ---- */
.rrmi-shell {
  background: #F7F9F8;
  border: 1px solid #DCE6E1;
  border-radius: 16px;
  padding: 32px;
  margin: 0;
  max-width: 100%;
  box-shadow: 0 4px 24px rgba(23,106,79,.06);
}

/* ---- Brand header ---- */
.rrmi-brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #E4EBE7;
}

.rrmi-brand-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rrmi-brand-logo {
  display: block;
  height: auto;
  width: auto;
  max-height: 20px;  /* ← AJUSTA AQUÍ el tamaño del logo */
  max-width: 120px;
  object-fit: contain;
}

.rrmi-brand-divider {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: #D5DFD9;
  vertical-align: middle;
  margin: 0 4px;
}

.rrmi-brand-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9CA3AF;
  line-height: 1;
}

.rrmi-brand-version {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #C4CEC9;
  text-transform: uppercase;
  align-self: center;
}

/* ---- Hero ---- */
.rrmi-hero {
  margin-bottom: 28px;
}

.rrmi-title {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0F2D1E;
}

.rrmi-intro {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #5C5C5C;
  max-width: 800px;
  font-weight: 400;
}

/* ---- Cards ---- */
.rrmi-card {
  background: #FFFFFF;
  border: 1px solid #E4EBE7;
  border-radius: 12px;
  padding: 24px;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.rrmi-card-head {
  margin-bottom: 16px;
}

.rrmi-card-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  color: #0F2D1E;
  letter-spacing: -0.01em;
}

.rrmi-card-head--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rrmi-section-intro {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #6B6B6B;
  max-width: 720px;
}

/* ---- Firma metodologica ---- */
.rrmi-card-firma {
  background: #FAFDF9;
  border: 1px solid #E0EDE6;
  border-top: 3px solid #176A4F;
  padding: 0;
  overflow: hidden;
}

.rrmi-firma-intro {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #176A4F;
  padding: 20px 24px 0;
  margin: 0 0 16px;
}

.rrmi-firma-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rrmi-firma-card {
  position: relative;
  padding: 16px 24px 16px 68px;
  border-bottom: 1px solid #EDF2EF;
}

.rrmi-firma-card:last-child {
  border-bottom: none;
}

.rrmi-firma-card::before {
  content: attr(data-num);
  position: absolute;
  left: 24px;
  top: 16px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: #C8DDD6;
  letter-spacing: -0.04em;
}

.rrmi-firma-card-body {
  flex: 1;
}

.rrmi-firma-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F3D2A;
  margin: 0 0 4px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.rrmi-firma-card-desc {
  font-size: 13px;
  line-height: 1.65;
  color: #5C6B63;
  margin: 0;
}

.rrmi-firma-highlight {
  color: #176A4F;
  font-weight: 700;
}

.rrmi-firma-footer {
  background: #0F3D2A;
  border-top: none;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.rrmi-firma-footer-text {
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  color: rgba(255,255,255,0.88);
  margin: 0;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.rrmi-firma-author {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  margin: 0;
}

/* ---- Guia de uso ---- */
.rrmi-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.rrmi-infobox {
  background: #F8FAF9;
  border: 1px solid #E0EAE4;
  border-left: 3px solid #176A4F;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rrmi-infobox > strong {
  display: block;
  color: #176A4F;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 0;
}

.rrmi-infobox p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #4A4A4A;
}

.rrmi-infobox p strong {
  display: inline;
  margin: 0;
  font-size: inherit;
  font-weight: 700;
  color: #176A4F;
}

.rrmi-bullets {
  margin: 8px 0 0;
  padding-left: 18px;
}

.rrmi-bullets li {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.6;
}

.rrmi-bullets li strong {
  display: inline;
  font-weight: 700;
  color: #176A4F;
}

.rrmi-manifesto {
  margin: 16px 0 0;
  background: transparent;
  border-left: 3px solid #176A4F;
  border-radius: 0;
  padding: 10px 18px;
  font-size: 15px;
  line-height: 1.65;
  font-style: italic;
  font-weight: 500;
  color: #2F2F2F;
  letter-spacing: -0.01em;
}

.rrmi-guide-detail {
  margin-top: 20px;
}

.rrmi-scale-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.rrmi-scale-card {
  background: #FFFFFF;
  border: 1px solid #E0EAE4;
  border-radius: 10px;
  padding: 16px;
}

.rrmi-scale-card > strong {
  display: block;
  margin-bottom: 6px;
  color: #0F2D1E;
  font-size: 13px;
  font-weight: 700;
}

.rrmi-scale-card p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.6;
}

.rrmi-scale-card small {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: #6B6B6B;
}

.rrmi-example-box {
  margin-top: 16px;
  background: #F4F8F6;
  border: 1px solid #DFE9E3;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.65;
}

/* ---- Parametros de calculo ---- */
.rrmi-note {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #6B6B6B;
}

.rrmi-advanced-panel[hidden] {
  display: none !important;
}

.rrmi-params {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rrmi-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rrmi-field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #4A4A4A;
}

/* ---- Inputs y selects ---- */
.rrmi-field input,
.rrmi-input,
.rrmi-select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #D5DFD9;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.4;
  background: #FFFFFF;
  color: #3F3F3F;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: inherit;
}

.rrmi-field input:focus,
.rrmi-input:focus,
.rrmi-select:focus {
  outline: none;
  border-color: #176A4F;
  box-shadow: 0 0 0 3px rgba(23,106,79,.1);
}

/* ---- Toolbar ---- */
.rrmi-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.rrmi-toolbar--right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.rrmi-toolbar-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rrmi-toolbar-primary {
  display: flex;
  align-items: center;
}

/* ---- Botones ---- */
.rrmi-btn {
  appearance: none;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.rrmi-btn-primary {
  background: #176A4F;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 1px 3px rgba(23,106,79,.2);
}

.rrmi-btn-primary:hover {
  background: #125740;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 4px 12px rgba(23,106,79,.30);
  transform: translateY(-1px);
}

.rrmi-btn-primary:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.rrmi-btn--pdf {
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
}

.rrmi-btn-secondary {
  background: #F1F4F2;
  color: #4A4A4A;
  border: 1px solid #E0E7E3;
  font-weight: 500;
}

.rrmi-btn-secondary:hover {
  background: #E6ECE8;
  border-color: #C8D5CE;
}

.rrmi-btn-ghost {
  background: transparent;
  border: 1px solid #D5DFD9;
  color: #5C6B63;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}

.rrmi-btn-ghost:hover {
  background: #F4F7F5;
  border-color: #B8C9C1;
  color: #176A4F;
}

.rrmi-btn-icon {
  background: transparent;
  border: 1px solid #E0E7E3;
  color: #B0B8B4;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: inherit;
}

.rrmi-btn-icon:hover {
  border-color: #EF4444;
  color: #EF4444;
  background: #FEF2F2;
}

/* ---- Tabla de iniciativas ---- */
.rrmi-table-wrap {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #E4EBE7;
  border-radius: 10px;
  background: #fff;
}

.rrmi-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.rrmi-table th,
.rrmi-table td {
  border-bottom: 1px solid #EDF0EE;
  padding: 10px 10px;
  text-align: left;
  vertical-align: middle;
  background: #fff;
  font-size: 13px;
}

.rrmi-table thead th {
  font-size: 10px;
  font-weight: 700;
  background: #F4F7F5;
  color: #8A9E96;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Tabla principal */
.rrmi-table-main {
  min-width: 0;
}

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

.rrmi-row--main td {
  background: #FFFFFF;
  padding: 14px 12px;
  border-bottom: 0;
  border-top: none;
}

.rrmi-row--main td:first-child {
  border-left: 3px solid #176A4F;
}

.rrmi-row--scores td {
  padding: 0;
  padding-bottom: 4px;
  background: #FAFCFB;
  border-bottom: none;
}

/* Separacion visual entre iniciativas */
.rrmi-initiative-group {
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #E4EBE7;
}

.rrmi-initiative-group .rrmi-row--main td {
  border-top: none !important;
}

.rrmi-initiative-group .rrmi-row--scores td {
  border-top: none !important;
}

/* Separador entre iniciativas — bloques con aire real */
#rrmi-initiatives-body tr.rrmi-row--main:not(:first-child) td {
  border-top: 20px solid #F0F4F2 !important;
  box-shadow: inset 0 1px 0 #E0E8E4;
  padding-top: 16px;
}

#rrmi-initiatives-body tr.rrmi-row--scores td {
  border-top: 0 !important;
}

#rrmi-initiatives-body tr.rrmi-row--scores:nth-of-type(4n+2) td,
#rrmi-initiatives-body tr.rrmi-row--main:nth-of-type(4n+1) td {
  background: #FAFCFB;
}

.rrmi-cell-id {
  width: 90px;
}

.rrmi-cell-id input {
  font-weight: 600;
  text-align: center;
}

.rrmi-cell-initiative {
  width: 38%;
}

.rrmi-cell-owner {
  width: 16%;
}

.rrmi-cell-category {
  width: 16%;
}

.rrmi-cell-actions {
  width: 50px;
  text-align: center;
}

.rrmi-mobile-label {
  display: none;
}

/* Grid de scores */
.rrmi-field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: #176A4F;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rrmi-field-label-text {
  display: inline-block;
}

.rrmi-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 999px;
  border: 1px solid #CFE5DA;
  background: #EEF7F3;
  color: #176A4F;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  cursor: help;
  user-select: none;
}

.rrmi-info-tip {
  display: none !important;
}

.rrmi-floating-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100000;
  max-width: min(260px, calc(100vw - 24px));
  padding: 9px 10px;
  border: 1px solid #DCE7E1;
  border-radius: 8px;
  background: #FFFFFF;
  color: #3F3F3F;
  box-shadow: 0 10px 26px rgba(23,106,79,0.14);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.rrmi-floating-tip.is-visible {
  opacity: 1;
  visibility: visible;
}

.rrmi-floating-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-style: solid;
}

.rrmi-floating-tip[data-placement="top"]::after {
  top: 100%;
  border-width: 6px 6px 0 6px;
  border-color: #FFFFFF transparent transparent transparent;
}

.rrmi-floating-tip[data-placement="bottom"]::after {
  bottom: 100%;
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent #FFFFFF transparent;
}

.rrmi-row--main .rrmi-field-label {
  color: #5F6B64;
}

.rrmi-score-item .rrmi-field-label {
  color: #176A4F;
}

/* Score grid — diferenciacion por categoria */
.rrmi-score-grid-inline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  background: #FFFFFF;
  border-top: 1px solid #EDF0EE;
}

.rrmi-score-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px;
  border-right: 1px solid #EDF0EE;
  background: #FFFFFF;
}

.rrmi-score-item:last-child {
  border-right: none;
}

/* Impacto economico (col 1-2) */
.rrmi-score-item:nth-child(1),
.rrmi-score-item:nth-child(2) {
  background: #F7FAF8;
}

/* Contexto (col 3-4) */
.rrmi-score-item:nth-child(3),
.rrmi-score-item:nth-child(4) {
  background: #FFFFFF;
}

/* Penalizaciones (col 5-6) */
.rrmi-score-item:nth-child(5),
.rrmi-score-item:nth-child(6) {
  background: #FFFAF5;
}

.rrmi-score-item label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: #176A4F;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rrmi-score-item .rrmi-select {
  min-height: 36px;
  padding: 6px 8px;
  font-size: 13px;
}

/* ---- Tabla de resultados ---- */
.rrmi-results-table {
  min-width: 800px;
}

.rrmi-results-table th:nth-child(1),
.rrmi-results-table td:nth-child(1) { width: 80px; }

.rrmi-results-table th:nth-child(2),
.rrmi-results-table td:nth-child(2) { min-width: 220px; }

.rrmi-results-table th:nth-child(3),
.rrmi-results-table td:nth-child(3),
.rrmi-results-table th:nth-child(4),
.rrmi-results-table td:nth-child(4) { width: 100px; }

.rrmi-results-table th:nth-child(5),
.rrmi-results-table td:nth-child(5),
.rrmi-results-table th:nth-child(6),
.rrmi-results-table td:nth-child(6) { width: 140px; }

/* ---- Pills ---- */
.rrmi-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.rrmi-pill--high    { background: #E8F5EE; color: #176A4F; }
.rrmi-pill--medium  { background: #FFF4E6; color: #8A4E10; }
.rrmi-pill--low     { background: #FDECEA; color: #9B2C2C; }
.rrmi-pill--quickwin{ background: #E8F5EE; color: #176A4F; }
.rrmi-pill--bet     { background: #FFF0E0; color: #8A4E10; }
.rrmi-pill--review  { background: #FDECEA; color: #9B2C2C; }
.rrmi-pill--neutral { background: #F2F4F3; color: #5C6B63; }

/* ---- Estado vacio ---- */
.rrmi-empty-state {
  text-align: center;
  padding: 36px 20px !important;
  color: #6B7280;
  border-bottom: none !important;
}

.rrmi-empty-state p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.6;
}

/* ---- Diagnostico de cartera ---- */
.rrmi-diagnosis {
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.65;
}

.rrmi-diagnosis strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.rrmi-diagnosis--warn {
  background: #FFFBEB;
  border: 1px solid #F5C542;
  color: #713F12;
}

.rrmi-diagnosis--warn strong { color: #92400E; }

.rrmi-diagnosis--ok {
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  color: #14532D;
}

.rrmi-diagnosis--ok strong { color: #166534; }

/* ---- Lectura ejecutiva ---- */
.rrmi-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.rrmi-insight-block {
  background: #FAFCFB;
  border: 1px solid #E4EBE7;
  border-radius: 10px;
  padding: 18px;
}

/* Primer bloque (Prioridades) — mayor jerarquia visual */
.rrmi-insight-block:first-child {
  background: #F5FAF7;
  border-top: 3px solid #176A4F;
}

.rrmi-insight-block:first-child h4 {
  font-size: 11px;
  color: #0F3D2A;
}

.rrmi-insight-block h4 {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 700;
  color: #176A4F;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rrmi-insight-item {
  background: #FFFFFF;
  border: 1px solid #E8EDEA;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 8px;
}

.rrmi-insight-item:last-child { margin-bottom: 0; }

.rrmi-insight-item strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  color: #1A1A1A;
}

.rrmi-insight-empty {
  font-size: 13px;
  color: #9CA3AF;
}

.rrmi-alert {
  border-left: 3px solid #D28C1D;
  background: #FFF8EE;
}

.rrmi-alert--danger {
  border-left-color: #DC2626;
  background: #FEF2F2;
}

.rrmi-alert--ok {
  border-left-color: #176A4F;
  background: #F0FDF4;
}

/* Recomendacion ejecutiva */
.rrmi-executive-summary {
  background: transparent;
  border: 1px solid #C8DDD6;
  border-left: 4px solid #176A4F;
  border-radius: 10px;
  padding: 20px 24px;
  font-size: 15px;
  line-height: 1.7;
  margin-top: 20px;
}

.rrmi-executive-summary h4 {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 700;
  color: #176A4F;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* ---- CTA post-descarga — oculta por defecto ---- */
.rrmi-card-cta {
  display: none;
  background: linear-gradient(135deg, #0A3320 0%, #176A4F 100%);
  border: none;
  position: relative;
  overflow: hidden;
}

.rrmi-card-cta--active {
  display: block;
}

.rrmi-card-cta::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}

.rrmi-card-cta::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 40%;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.025);
  pointer-events: none;
}

.rrmi-cta-text {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: #FFFFFF;
  letter-spacing: -0.03em;
}

.rrmi-cta-box {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.72);
  margin: 0 0 22px;
  max-width: 600px;
}

.rrmi-cta-actions { margin-top: 0; }

.rrmi-btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 13px 28px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  background: #FFFFFF;
  color: #0F3D2A;
  transition: all .2s ease;
  font-family: inherit;
  letter-spacing: -0.01em;
}

.rrmi-btn-cta:hover {
  background: #F0FAF5;
  color: #0F3D2A;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

/* ---- Toast undo ---- */
.rrmi-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1A1A1A;
  color: #FFFFFF;
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  z-index: 99999;
  white-space: nowrap;
  font-family: inherit;
}

.rrmi-toast-msg { color: #E5E7EB; }

.rrmi-toast-undo {
  background: transparent;
  border: 1px solid rgba(255,255,255,.3);
  color: #FFFFFF;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: .15s ease;
  font-family: inherit;
}

.rrmi-toast-undo:hover { background: rgba(255,255,255,.12); }

/* ---- Elementor compat ---- */
.elementor-widget-shortcode,
.elementor-widget-shortcode .elementor-widget-container,
.elementor-shortcode,
.elementor-widget-shortcode .rr-matriz-impacto,
.elementor-widget-shortcode .rrmi-shell,
.elementor-widget-shortcode .rrmi-card {
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  box-sizing: border-box;
}

.elementor-widget-shortcode .rrmi-table-wrap {
  overflow-x: auto !important;
  max-width: 100% !important;
}

/* ---- Responsive 1024px ---- */
@media (max-width: 1024px) {
  .rrmi-shell { padding: 24px; }

  .rrmi-guide-grid,
  .rrmi-scale-grid { grid-template-columns: 1fr; }

  .rrmi-insights-grid { grid-template-columns: 1fr; }

  .rrmi-params { grid-template-columns: 1fr 1fr; }

  .rrmi-score-grid-inline { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .rrmi-score-item { border-right: none; border-bottom: 1px solid #EDF0EE; }
  .rrmi-score-item:nth-child(3n) { border-bottom: none; }

  .rrmi-toolbar--right {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .rrmi-toolbar-secondary,
  .rrmi-toolbar-primary { width: 100%; }

  .rrmi-toolbar-primary .rrmi-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ---- Responsive 767px — FIX: sin CSS anidado ---- */
@media (max-width: 767px) {
  .rrmi-shell { padding: 16px; }

  .rrmi-brand-version { display: none; }

  .rrmi-title { font-size: 22px; }

  .rrmi-intro { font-size: 15px; }

  .rrmi-card { padding: 16px; }

  .rrmi-params { grid-template-columns: 1fr; }

  .rrmi-mobile-label {
    display: block;
    margin: 0 0 4px;
    font-size: 10px;
    font-weight: 700;
    color: #6A6A6A;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .rrmi-row--main {
    display: block;
    padding-top: 8px;
    background: #FAFCFB;
  }

  .rrmi-row--main .rrmi-field-label {
    margin-bottom: 5px;
  }

  .rrmi-row--main td {
    display: block;
    width: 100%;
    border-left: none !important;
    border-top: none;
    padding: 8px 12px;
  }

  .rrmi-row--scores { display: block; }

  .rrmi-row--scores td {
    display: block;
    width: 100%;
  }

  .rrmi-score-grid-inline {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
    gap: 10px;
  }

  .rrmi-score-item {
    border-right: none;
    border-bottom: none;
    border: 1px solid #EDF0EE;
    border-radius: 8px;
    padding: 10px;
    background: #FFFFFF !important;
  }

  .rrmi-cell-actions { text-align: left; }

  .rrmi-results-table { min-width: 700px; }

  .rrmi-toolbar--right {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .rrmi-toolbar-secondary {
    flex-direction: column;
    width: 100%;
  }

  .rrmi-toolbar-secondary .rrmi-btn-ghost {
    width: 100%;
    text-align: center;
  }

  .rrmi-toolbar-primary { width: 100%; }

  .rrmi-toolbar-primary .rrmi-btn {
    width: 100%;
    text-align: center;
  }

  .rrmi-firma-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .rrmi-brand-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 20px;
  }
}

/* ---- PDF export container ---- */
.rrmi-pdf-export {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 210mm;
  background: #fff;
  color: #2F2F2F;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* ---- Matriz visual 2x2 ---- */
.rrmi-card-matrix {
  overflow: visible;
}

.rrmi-matrix-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 4px;
}

.rrmi-matrix-svg {
  width: 100%;
  max-width: 680px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.08));
}

.rrmi-matrix-empty {
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
  color: #9CA3AF;
}

/* ---- Cross-sell ---- */
#rrmi-crossell {
  margin-top: 16px;
}

.rrmi-crossell-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #F0F7F3;
  border: 1px solid #C6DED3;
  border-left: 4px solid #176A4F;
  border-radius: 10px;
  padding: 16px 20px;
  flex-wrap: wrap;
}

.rrmi-crossell-text {
  flex: 1;
  min-width: 200px;
}

.rrmi-crossell-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0F3D2A;
  margin-bottom: 4px;
}

.rrmi-crossell-text p {
  font-size: 13px;
  color: #4A6358;
  margin: 0;
  line-height: 1.5;
}

.rrmi-crossell-text p strong {
  display: inline;
  font-size: inherit;
  color: #176A4F;
}

.rrmi-crossell-btn {
  display: inline-flex;
  align-items: center;
  background: #176A4F;
  color: #FFFFFF !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background .15s ease;
}

.rrmi-crossell-btn:hover {
  background: #125740;
}
