/* Recurso: Cómo elegir un método de investigación (v1).
   Todo va con prefijo rm- para no chocar con header.html, footer.html ni base.css. */

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

.rm-body {
  --rm-navy: #16213e;
  --rm-navy-2: #1a1a2e;
  --rm-vino: #8E1600;
  --rm-vino-osc: #600f00;
  --rm-oro: #FFC107;
  --rm-oro-osc: #D39E00;
  --rm-oro-suave: #fff8e1;
  --rm-texto: #30343b;
  --rm-suave: #596170;
  --rm-linea: #e1e5ec;
  --rm-fondo: #f6f7f9;
  --rm-radio: 16px;
  --rm-sombra: 0 10px 30px rgba(18, 24, 38, 0.07);

  margin: 0;
  padding-top: 86px; /* alto de .site-header.scrolled en header.html */
  background: var(--rm-fondo);
  color: var(--rm-texto);
}

.rm-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.rm-saltar {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 30000;
  background: var(--rm-oro);
  color: #000;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
}

.rm-saltar:focus {
  top: 12px;
}

/* ---------- Portada ---------- */

.rm-hero {
  background: linear-gradient(135deg, var(--rm-navy-2) 0%, var(--rm-navy) 100%);
  color: #fff;
  padding: 56px 20px 112px;
}

.rm-hero-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.rm-migas {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 22px;
}

.rm-migas a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rm-migas span[aria-hidden] {
  margin: 0 8px;
}

.rm-kicker {
  display: inline-block;
  margin: 0 0 14px;
  color: var(--rm-oro);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rm-hero h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.12;
}

.rm-hero h1 span {
  color: var(--rm-oro);
}

.rm-hero-sub {
  max-width: 680px;
  margin: 0 auto 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.15rem;
  line-height: 1.6;
}

.rm-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}

.rm-chips li {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.rm-hero-acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ---------- Botones ---------- */

.rm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border: 2px solid transparent;
  border-radius: 50px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.rm-btn:hover,
.rm-btn:focus-visible {
  text-decoration: none;
  transform: translateY(-2px);
}

.rm-btn:focus-visible,
.rm-descarga:focus-visible,
.rm-lecturas a:focus-visible,
.rm-ruta a:focus-visible,
.rm-indice a:focus-visible {
  outline: 3px solid var(--rm-oro);
  outline-offset: 3px;
}

.rm-btn-oro {
  background: linear-gradient(135deg, var(--rm-oro) 0%, var(--rm-oro-osc) 100%);
  color: #000;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.rm-btn-oro:hover {
  color: #000;
  box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

.rm-btn-claro {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  background: transparent;
}

.rm-btn-claro:hover {
  background: #fff;
  color: var(--rm-navy);
}

.rm-btn-vino {
  background: var(--rm-vino);
  color: #fff;
}

.rm-btn-vino:hover {
  background: var(--rm-vino-osc);
  color: #fff;
}

.rm-btn-borde {
  border-color: var(--rm-vino);
  color: var(--rm-vino);
  background: #fff;
}

.rm-btn-borde:hover {
  background: #fdf1ef;
  color: var(--rm-vino-osc);
}

.rm-btn-texto {
  color: var(--rm-suave);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-left: 12px;
  padding-right: 12px;
}

.rm-btn-texto:hover {
  color: var(--rm-vino);
  text-decoration: underline;
}

/* ---------- Estructura ---------- */

.rm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 880px;
  margin: -72px auto 0;
  padding: 0 16px 56px;
}

.rm-main {
  min-width: 0;
}

.rm-indice {
  display: none;
}

@media (min-width: 1180px) {
  .rm-layout {
    grid-template-columns: 230px minmax(0, 820px);
    gap: 32px;
    max-width: 1130px;
    justify-content: center;
  }

  .rm-hero-inner {
    max-width: 1130px;
    padding-left: 262px; /* centra la portada sobre la columna de contenido */
  }

  .rm-indice {
    display: block;
    align-self: start;
    position: sticky;
    top: 110px;
    margin-top: 96px;
    padding: 18px 8px 18px 0;
  }
}

.rm-indice-titulo {
  margin: 0 0 10px 14px;
  color: var(--rm-suave);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rm-indice ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rm-indice a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--rm-suave);
  font-size: 0.93rem;
  line-height: 1.3;
  text-decoration: none;
}

.rm-indice a b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e9ebef;
  color: var(--rm-texto);
  font-size: 0.75rem;
}

.rm-indice a:hover {
  color: var(--rm-vino);
  background: #fff;
}

.rm-indice a.rm-activo {
  border-left-color: var(--rm-vino);
  background: #fff;
  color: var(--rm-vino);
  font-weight: 700;
}

.rm-indice a.rm-activo b {
  background: var(--rm-vino);
  color: #fff;
}

/* ---------- Tarjetas ---------- */

.rm-card {
  position: relative;
  margin: 0 0 22px;
  padding: 40px 44px;
  border-radius: var(--rm-radio);
  background: #fff;
  box-shadow: var(--rm-sombra);
  scroll-margin-top: 108px;
}

.rm-card h2 {
  display: inline-block;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--rm-oro);
  color: var(--rm-navy-2);
  font-size: 1.6rem;
  font-weight: 750;
  line-height: 1.25;
}

.rm-card p,
.rm-card li,
.rm-card dd {
  font-size: 1.05rem;
  line-height: 1.75;
}

.rm-card p {
  margin: 0 0 14px;
}

.rm-h3 {
  margin: 30px 0 12px;
  color: var(--rm-navy-2);
  font-size: 1.15rem;
  font-weight: 750;
}

.rm-nota-uso {
  color: var(--rm-suave);
  font-size: 0.98rem !important;
}

/* Qué es / qué no es */
.rm-esno {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.rm-esno-col {
  padding: 18px 20px;
  border-radius: 12px;
}

.rm-es {
  background: #eef7f1;
  border: 1px solid #cfe7d8;
}

.rm-no {
  background: #fdf1ef;
  border: 1px solid #f1d3cd;
}

.rm-esno-titulo {
  margin: 0 0 6px !important;
  font-weight: 800;
  font-size: 0.85rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rm-es .rm-esno-titulo {
  color: #1f6b43;
}

.rm-no .rm-esno-titulo {
  color: var(--rm-vino);
}

.rm-esno ul {
  margin: 0;
  padding-left: 20px;
}

.rm-esno li {
  font-size: 0.98rem !important;
  line-height: 1.6 !important;
  margin-bottom: 6px;
}

/* Ruta de seis pasos */
.rm-ruta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.rm-ruta a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rm-linea);
  border-radius: 10px;
  color: var(--rm-texto);
  line-height: 1.35;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.rm-ruta a:hover {
  border-color: var(--rm-oro-osc);
  background: var(--rm-oro-suave);
}

.rm-ruta b,
.rm-n {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--rm-vino);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}

.rm-ruta span {
  font-size: 0.98rem;
  font-weight: 600;
}

/* Pasos */
.rm-paso-num {
  margin: 0 0 6px !important;
  color: var(--rm-vino);
  font-size: 2.2rem !important;
  font-weight: 800;
  line-height: 1 !important;
}

.rm-paso-num span {
  display: block;
  margin-bottom: 4px;
  color: var(--rm-suave);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rm-preguntate {
  margin: 20px 0;
  padding: 18px 22px;
  border-radius: 12px;
  background: var(--rm-fondo);
}

.rm-preguntate-titulo,
.rm-ejemplo-etiqueta {
  margin: 0 0 8px !important;
  font-size: 0.8rem !important;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rm-preguntate-titulo {
  color: var(--rm-navy);
}

.rm-preguntate ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rm-preguntate li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 28px;
}

.rm-preguntate li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 16px;
  height: 16px;
  border: 2px solid var(--rm-oro-osc);
  border-radius: 4px;
}

.rm-alerta {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--rm-oro-osc);
  border-radius: 0 10px 10px 0;
  background: var(--rm-oro-suave);
}

.rm-alerta p {
  margin: 0;
}

.rm-ejemplo-paso {
  margin-top: 22px;
  padding: 20px 24px;
  border-left: 4px solid var(--rm-vino);
  border-radius: 0 12px 12px 0;
  background: #fbf7f6;
}

.rm-ejemplo-etiqueta {
  color: var(--rm-vino);
}

.rm-ejemplo-paso p:last-child {
  margin-bottom: 0;
}

.rm-cita {
  color: var(--rm-navy-2);
  font-size: 1.12rem !important;
  font-weight: 600;
}

.rm-aviso-suave {
  color: var(--rm-suave);
  font-size: 0.95rem !important;
  font-style: italic;
}

.rm-plantilla {
  padding: 16px 20px;
  border: 1px dashed #c9ced8;
  border-radius: 10px;
  font-size: 1.1rem !important;
}

.rm-hueco {
  color: var(--rm-vino);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.rm-lista-pasos {
  margin: 0 0 14px;
  padding-left: 22px;
}

.rm-lista-pasos li {
  margin-bottom: 6px;
}

/* Tablas */
.rm-tabla-envoltura {
  margin: 4px 0 16px;
  overflow-x: auto;
}

.rm-tabla {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.98rem;
}

.rm-tabla th,
.rm-tabla td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rm-linea);
  font-size: 0.98rem;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.rm-tabla thead th {
  background: var(--rm-navy);
  color: #fff;
  font-weight: 700;
}

.rm-tabla tbody th {
  color: var(--rm-navy-2);
  font-weight: 700;
  width: 28%;
}

.rm-tabla tbody tr:last-child th,
.rm-tabla tbody tr:last-child td {
  border-bottom: 0;
}

/* Coherencia */
.rm-coherencia {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 8px 0 16px;
  padding: 0;
}

.rm-coherencia li {
  padding: 16px 18px;
  border: 1px solid var(--rm-linea);
  border-radius: 12px;
}

.rm-coherencia p {
  margin: 0;
  font-size: 0.98rem !important;
  line-height: 1.6 !important;
}

.rm-par {
  margin-bottom: 6px !important;
  color: var(--rm-vino);
  font-weight: 800;
}

.rm-par span {
  color: var(--rm-oro-osc);
  margin: 0 4px;
}

/* Ejemplo completo */
.rm-sello {
  display: inline-block;
  margin: 0 0 12px !important;
  padding: 4px 12px;
  border: 1px solid rgba(255, 193, 7, 0.6);
  border-radius: 999px;
  background: rgba(255, 193, 7, 0.16);
  color: var(--rm-vino);
  font-size: 0.78rem !important;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.6 !important;
}

.rm-ficha-ejemplo {
  margin: 18px 0 0;
  border: 1px solid var(--rm-linea);
  border-radius: 12px;
  overflow: hidden;
}

.rm-ficha-fila {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  border-bottom: 1px solid var(--rm-linea);
}

.rm-ficha-fila:last-child {
  border-bottom: 0;
}

.rm-ficha-fila dt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 16px;
  background: var(--rm-fondo);
  color: var(--rm-navy-2);
  font-weight: 700;
  line-height: 1.35;
}

.rm-ficha-fila dt .rm-n {
  width: 26px;
  height: 26px;
  font-size: 0.8rem;
}

.rm-ficha-fila dd {
  margin: 0;
  padding: 16px 20px;
  font-size: 1rem !important;
  line-height: 1.65 !important;
}

/* Ficha interactiva */
.rm-privacidad {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 10px;
  background: #eef3fb;
  color: #27405f;
  font-size: 0.96rem !important;
  line-height: 1.55 !important;
}

.rm-privacidad svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

.rm-form {
  margin-top: 22px;
}

.rm-campo {
  margin-bottom: 22px;
}

.rm-campo label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  color: var(--rm-navy-2);
  font-size: 1.05rem;
  font-weight: 700;
}

.rm-campo label .rm-n {
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
}

.rm-ayuda {
  margin: 0 0 8px 38px !important;
  color: var(--rm-suave);
  font-size: 0.93rem !important;
  line-height: 1.5 !important;
}

.rm-campo textarea {
  display: block;
  width: 100%;
  min-height: 92px;
  padding: 12px 14px;
  border: 1px solid #c9ced8;
  border-radius: 10px;
  background: #fff;
  color: var(--rm-texto);
  font: inherit;
  font-size: 1rem;
  line-height: 1.55;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rm-campo textarea:focus {
  outline: none;
  border-color: var(--rm-vino);
  box-shadow: 0 0 0 3px rgba(142, 22, 0, 0.14);
}

.rm-barra {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px -44px -40px;
  padding: 16px 44px;
  border-top: 1px solid var(--rm-linea);
  border-radius: 0 0 var(--rm-radio) var(--rm-radio);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 20px rgba(18, 24, 38, 0.05);
}

/* El atributo hidden debe ganar a display:flex (sin JS la barra no sirve) */
.rm-barra[hidden] {
  display: none;
}

.rm-estado {
  margin: 0 !important;
  color: var(--rm-suave);
  font-size: 0.95rem !important;
}

.rm-estado.rm-guardado::before {
  content: "✓ ";
  color: #1f6b43;
  font-weight: 800;
}

.rm-barra-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Descargas */
.rm-descargas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.rm-descarga {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border: 2px solid var(--rm-oro);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rm-oro-suave) 0%, #fff 100%);
  color: var(--rm-texto);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.rm-descarga:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 193, 7, 0.25);
  color: var(--rm-texto);
  text-decoration: none;
}

.rm-descarga-tipo {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 60px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.rm-pdf {
  background: #b3261e;
}

.rm-csv {
  background: #1f6b43;
}

.rm-descarga-texto {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.5;
}

.rm-descarga-texto strong {
  color: var(--rm-navy-2);
  font-size: 1.08rem;
}

.rm-descarga-texto span {
  color: var(--rm-suave);
  font-size: 0.95rem;
}

.rm-descarga-doble:hover {
  transform: none;
  box-shadow: none;
}

.rm-formatos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.rm-formatos a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #1f6b43;
  border-radius: 50px;
  background: #fff;
  color: #1f6b43;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.rm-formatos a:hover,
.rm-formatos a:focus-visible {
  background: #1f6b43;
  color: #fff;
  text-decoration: none;
}

/* Lecturas del blog */
.rm-lecturas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.rm-lecturas a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--rm-linea);
  border-radius: 12px;
  color: var(--rm-texto);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.rm-lecturas a:hover {
  border-color: rgba(142, 22, 0, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--rm-sombra);
  text-decoration: none;
}

.rm-lectura-paso {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef0f4;
  color: var(--rm-suave);
  font-size: 0.78rem;
  font-weight: 700;
}

.rm-lecturas strong {
  color: var(--rm-navy-2);
  font-size: 1.08rem;
  line-height: 1.35;
}

.rm-lectura-para {
  color: var(--rm-suave);
  font-size: 0.96rem;
  line-height: 1.55;
}

.rm-lectura-ir {
  margin-top: auto;
  padding-top: 6px;
  color: var(--rm-vino);
  font-weight: 800;
  font-size: 0.92rem;
}

/* Seminario de Investigación */
.rm-seminario {
  border-top: 4px solid var(--rm-oro);
}

.rm-seminario-kicker {
  margin: 0 0 6px !important;
  color: var(--rm-vino);
  font-size: 0.8rem !important;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rm-seminario-temario {
  margin: 4px 0 18px;
  padding-left: 22px;
  columns: 2;
  column-gap: 36px;
}

.rm-seminario-temario li {
  break-inside: avoid;
  margin-bottom: 6px;
  font-size: 1rem !important;
  line-height: 1.6 !important;
}

.rm-seminario-datos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.rm-seminario-datos li {
  padding: 6px 14px;
  border: 1px solid rgba(211, 158, 0, 0.35);
  border-radius: 999px;
  background: var(--rm-oro-suave);
  color: var(--rm-navy-2);
  font-size: 0.92rem !important;
  font-weight: 600;
  line-height: 1.4 !important;
}

.rm-seminario-accion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.rm-seminario-nota {
  flex: 1 1 280px;
  margin: 0 !important;
  color: var(--rm-suave);
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
}

@media (max-width: 760px) {
  .rm-seminario-temario {
    columns: 1;
  }

  .rm-seminario-accion .rm-btn {
    width: 100%;
  }
}

/* Revista: mismo diseño que el bloque del Seminario, con acento vino */
.rm-revista {
  border-top-color: var(--rm-vino);
}

/* Fuentes y lecturas para ampliar */
.rm-fuentes-lista {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.rm-fuentes-lista li {
  padding: 14px 0;
  border-top: 1px solid var(--rm-linea);
}

.rm-fuentes-lista li:first-child {
  border-top: 0;
  padding-top: 4px;
}

.rm-fuente-cita {
  margin: 0 0 4px !important;
  padding-left: 1.6em;
  text-indent: -1.6em; /* sangría francesa, como en una lista de referencias */
  color: var(--rm-texto);
  font-size: 1rem !important;
  line-height: 1.6 !important;
}

.rm-fuente-uso {
  margin: 0 0 2px !important;
  color: var(--rm-suave);
  font-size: 0.95rem !important;
  line-height: 1.55 !important;
}

.rm-fuente-uso strong {
  color: var(--rm-navy-2);
}

.rm-fuente-enlace {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--rm-vino);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rm-fuente-enlace:hover,
.rm-fuente-enlace:focus-visible {
  color: var(--rm-vino-osc);
}

.rm-fuente-enlace:focus-visible {
  outline: 3px solid var(--rm-oro);
  outline-offset: 3px;
}

.rm-cierre {
  padding: 8px 12px 0;
  color: var(--rm-suave);
  text-align: center;
}

.rm-cierre p {
  margin: 0 0 6px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.rm-meta {
  font-size: 0.88rem !important;
}

/* Sin Bootstrap el botón de menú móvil de header.html queda en 30 px de alto;
   se iguala a los 40 px que tiene en el resto del sitio. */
.rm-body .mobile-toggle {
  min-height: 40px;
}

/* La hoja de impresión solo existe al imprimir */
.rm-hoja-impresion {
  display: none;
}

/* ---------- Tablet y móvil ---------- */

@media (max-width: 991px) {
  .rm-card {
    scroll-margin-top: 100px;
  }
}

@media (max-width: 760px) {
  .rm-hero {
    padding: 36px 18px 92px;
  }

  .rm-hero-sub {
    font-size: 1.05rem;
  }

  .rm-hero-acciones .rm-btn {
    width: 100%;
  }

  .rm-chips {
    gap: 6px;
    margin-bottom: 24px;
  }

  .rm-chips li {
    padding: 4px 11px;
    font-size: 0.82rem;
  }

  .rm-layout {
    margin-top: -60px;
    padding: 0 12px 40px;
  }

  .rm-card {
    padding: 28px 20px;
    border-radius: 14px;
  }

  .rm-card h2 {
    font-size: 1.38rem;
  }

  .rm-card p,
  .rm-card li,
  .rm-card dd {
    font-size: 1rem;
    line-height: 1.7;
  }

  .rm-esno,
  .rm-ruta,
  .rm-coherencia,
  .rm-descargas,
  .rm-lecturas {
    grid-template-columns: minmax(0, 1fr);
  }

  .rm-preguntate,
  .rm-ejemplo-paso {
    padding: 16px 16px;
  }

  .rm-ficha-fila {
    grid-template-columns: minmax(0, 1fr);
  }

  .rm-ficha-fila dt {
    padding: 12px 14px;
  }

  .rm-ficha-fila dd {
    padding: 12px 14px 16px;
  }

  .rm-ayuda {
    margin-left: 0 !important;
  }

  /* En móvil la barra no se fija: ocuparía media pantalla */
  .rm-barra {
    position: static;
    margin: 8px 0 0;
    padding: 16px 0 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .rm-barra-botones,
  .rm-barra-botones .rm-btn {
    width: 100%;
  }

  .rm-barra-botones .rm-btn-texto {
    width: auto;
  }

  /* Tablas apiladas: cada fila se lee como una tarjeta */
  .rm-tabla thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .rm-tabla,
  .rm-tabla tbody,
  .rm-tabla tr,
  .rm-tabla th,
  .rm-tabla td {
    display: block;
    width: 100% !important;
  }

  .rm-tabla {
    background: transparent;
  }

  .rm-tabla tr {
    margin-bottom: 10px;
    border: 1px solid var(--rm-linea);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
  }

  .rm-tabla tbody th {
    background: var(--rm-navy);
    color: #fff;
    border-bottom: 0;
  }

  .rm-tabla td {
    padding: 10px 14px;
  }

  .rm-tabla td::before {
    content: attr(data-etiqueta);
    display: block;
    color: var(--rm-suave);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .rm-tabla tbody tr:last-child td {
    border-bottom: 0;
  }

  .rm-tabla tr td:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 420px) {
  /* A 320 px el icono de tipo de archivo dejaba el texto en 19 caracteres por línea */
  .rm-descarga {
    flex-direction: column;
    gap: 10px;
  }

  .rm-descarga-tipo {
    width: 48px;
    height: 34px;
  }
}

/* ---------- Impresión ---------- */

@media print {
  @page {
    margin: 16mm 14mm;
  }

  .rm-body {
    padding-top: 0 !important;
    background: #fff !important;
    color: #000;
  }

  .site-header,
  .mobile-menu-container,
  .site-footer,
  #whatsapp-widget,
  .rm-saltar,
  .rm-indice,
  .rm-hero-acciones,
  .rm-chips,
  .rm-migas,
  .rm-form,
  .rm-barra,
  .rm-privacidad,
  #descargas,
  .rm-lectura-ir {
    display: none !important;
  }

  .rm-hero {
    background: none !important;
    color: #000 !important;
    padding: 0 0 8mm !important;
  }

  .rm-hero h1,
  .rm-hero h1 span,
  .rm-hero-sub,
  .rm-kicker {
    color: #000 !important;
  }

  .rm-layout {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }

  .rm-card {
    box-shadow: none !important;
    padding: 0 0 6mm !important;
    margin: 0 0 6mm !important;
    border-radius: 0;
    border-bottom: 1px solid #ccc;
  }

  .rm-card p,
  .rm-card li,
  .rm-card dd {
    font-size: 10.5pt !important;
    line-height: 1.5 !important;
  }

  .rm-card h2 {
    font-size: 15pt !important;
  }

  .rm-paso,
  .rm-ejemplo-paso,
  .rm-ficha-fila,
  .rm-coherencia li,
  .rm-tabla tr {
    break-inside: avoid;
  }

  .rm-lecturas a {
    border: 0 !important;
    padding: 0 !important;
  }

  .rm-fuente-enlace {
    min-height: 0;
  }

  .rm-fuente-enlace span {
    display: none;
  }

  .rm-fuente-enlace::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    font-weight: 400;
    color: #555;
    word-break: break-all;
  }

  .rm-seminario {
    border-top: 0;
  }

  .rm-seminario .rm-btn {
    min-height: 0;
    padding: 0 !important;
    border: 0;
    background: none !important;
    color: #000 !important;
  }

  .rm-seminario .rm-btn::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    font-weight: 400;
    color: #555;
    word-break: break-all;
  }

  .rm-lecturas a::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
    word-break: break-all;
  }

  /* La ficha rellenada se imprime al final de la guía */
  #ficha h2,
  #ficha > p:not(.rm-privacidad) {
    display: none;
  }

  #ficha {
    border: 0;
    padding: 0 !important;
  }

  .rm-hoja-impresion {
    display: block;
    break-before: page;
    font-size: 10.5pt;
    color: #000;
  }

  .rm-hi-marca {
    margin: 0 0 2mm;
    color: #8E1600;
    font-weight: 800;
    font-size: 9pt;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .rm-hoja-impresion h2 {
    margin: 0 0 1mm;
    font-size: 15pt;
    color: #000;
  }

  .rm-hi-fecha {
    margin: 0 0 5mm;
    color: #555;
    font-size: 9pt;
  }

  .rm-hi-campo {
    break-inside: avoid;
    margin-bottom: 4mm;
    padding-bottom: 3mm;
    border-bottom: 1px solid #ddd;
  }

  .rm-hi-etiqueta {
    margin: 0 0 1mm;
    font-weight: 700;
  }

  .rm-hi-respuesta {
    margin: 0;
    min-height: 12mm;
    white-space: pre-wrap;
    line-height: 1.45;
  }

  .rm-hi-respuesta.rm-vacia {
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 7mm, #bbb 7mm, #bbb 7.3mm);
    min-height: 22mm;
  }

  .rm-hi-campo:has(.rm-vacia) {
    border-bottom: 0;
  }

  .rm-hi-pie {
    margin-top: 6mm;
    color: #555;
    font-size: 8.5pt;
  }

  /* Botón «Imprimir mi ficha»: solo la hoja */
  html.rm-solo-ficha .rm-hero,
  html.rm-solo-ficha .rm-layout {
    display: none !important;
  }

  html.rm-solo-ficha .rm-hoja-impresion {
    break-before: auto;
  }
}

/* ---------- Compartir la guía (mismas vías que la Editorial) ---------- */

[data-compartir][hidden] {
  display: none !important;
}

/* El atributo hidden debe ganar a display:inline-flex: sin Web Share, «Compartir…» no se muestra */
.rm-comp-via[hidden] {
  display: none !important;
}

.rm-compartir-cierre {
  margin: 0 0 14px !important;
}

.rm-compartir {
  width: calc(100% - 32px);
  max-width: 460px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 24, 38, 0.35);
  color: var(--rm-texto);
}

.rm-compartir::backdrop {
  background: rgba(22, 33, 62, 0.62);
}

.rm-compartir > * {
  margin-left: 26px;
  margin-right: 26px;
}

.rm-comp-cerrar-forma {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0 !important;
}

.rm-comp-cerrar {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--rm-suave);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.rm-comp-cerrar:hover,
.rm-comp-cerrar:focus-visible {
  color: var(--rm-vino);
}

.rm-compartir h2 {
  margin-top: 26px;
  margin-bottom: 0;
  padding-right: 40px;
  color: var(--rm-navy-2);
  font-size: 1.35rem;
  font-weight: 750;
  line-height: 1.25;
}

.rm-comp-guia {
  margin-top: 6px;
  margin-bottom: 0;
  color: var(--rm-suave);
  font-size: 0.95rem;
  line-height: 1.45;
}

.rm-comp-etq {
  display: block;
  margin-top: 18px;
  color: var(--rm-vino);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rm-comp-etq span {
  color: var(--rm-suave);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.rm-compartir textarea {
  display: block;
  width: calc(100% - 52px);
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #c9ced8;
  border-radius: 10px;
  color: var(--rm-texto);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}

.rm-compartir textarea:focus {
  outline: none;
  border-color: var(--rm-vino);
  box-shadow: 0 0 0 3px rgba(142, 22, 0, 0.14);
}

.rm-comp-cuenta {
  margin-top: 4px;
  color: var(--rm-suave);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rm-comp-aviso {
  margin-top: 4px;
  color: #b3261e;
  font-size: 0.88rem;
  line-height: 1.45;
}

.rm-comp-vias {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 26px;
}

.rm-comp-via {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--rm-linea);
  border-radius: 10px;
  background: var(--rm-fondo);
  color: var(--rm-navy-2);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}

.rm-comp-via:hover,
.rm-comp-via:focus-visible {
  border-color: var(--rm-vino);
  background: #fff;
  color: var(--rm-vino);
  text-decoration: none;
}

.rm-comp-via:focus-visible {
  outline: 3px solid var(--rm-oro);
  outline-offset: 2px;
}

.rm-comp-via[data-via="whatsapp"] svg {
  color: #1f9d55;
}

.rm-comp-via[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.rm-comp-via.rm-comp-hecho {
  border-color: #1f6b43;
  color: #1f6b43;
}

@media (max-width: 420px) {
  .rm-comp-vias {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .rm-compartir,
  .rm-compartir-cierre,
  [data-compartir] {
    display: none !important;
  }
}

/* =====================================================================
   Test de estilos de aprendizaje (v2). Base común copiada de la guía de
   métodos (recurso.css v1.3); a partir de aquí, estilos propios (ta-).
   ===================================================================== */

.ta-origen {
  color: var(--rm-suave);
  font-size: 0.92rem !important;
  font-style: italic;
}

/* Qué dice la investigación */
.ta-evidencia {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 18px;
  padding: 0;
  list-style: none;
}

.ta-evidencia li {
  padding: 18px 20px;
  border: 1px solid var(--rm-linea);
  border-top: 3px solid var(--rm-navy);
  border-radius: 12px;
}

.ta-evidencia p {
  margin: 0 !important;
  font-size: 0.98rem !important;
  line-height: 1.6 !important;
}

.ta-evidencia-titulo,
.ta-estrategia-titulo {
  margin-bottom: 6px !important;
  color: var(--rm-navy-2);
  font-weight: 800;
}

/* Cuestionario */
.ta-form {
  margin-top: 18px;
}

.ta-pregunta {
  margin: 0 0 18px;
  padding: 18px 20px 12px;
  border: 1px solid var(--rm-linea);
  border-radius: 12px;
  background: #fff;
  scroll-margin-top: 120px;
}

.ta-pregunta.ta-pendiente {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12);
}

.ta-pregunta legend {
  display: flex;
  align-items: center;
  gap: 10px;
  float: left;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: var(--rm-navy-2);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

.ta-pregunta legend + * {
  clear: both;
}

.ta-pregunta legend .rm-n {
  width: 30px;
  height: 30px;
  font-size: 0.85rem;
}

.ta-opciones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ta-opcion {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid #d5d9e1;
  border-radius: 10px;
  background: var(--rm-fondo);
  color: var(--rm-texto);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ta-opcion:hover {
  border-color: var(--rm-oro-osc);
  background: var(--rm-oro-suave);
}

.ta-opcion input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--rm-vino);
}

.ta-opcion:has(input:checked) {
  border-color: var(--rm-vino);
  background: #fdf1ef;
  color: var(--rm-navy-2);
}

.ta-opcion:has(input:focus-visible) {
  outline: 3px solid var(--rm-oro);
  outline-offset: 2px;
}

.ta-enviar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--rm-linea);
}

.ta-progreso {
  margin: 0 !important;
  color: var(--rm-suave);
  font-size: 0.95rem !important;
}

.ta-faltan {
  flex-basis: 100%;
  order: 3;
  margin: 0 !important;
  color: #b3261e;
  font-size: 0.95rem !important;
  font-weight: 700;
}

/* Resultado */
.ta-resultado {
  border-top: 4px solid var(--rm-oro);
  scroll-margin-top: 108px;
}

.ta-resultado:focus {
  outline: none;
}

.ta-resumen {
  color: var(--rm-navy-2);
  font-size: 1.15rem !important;
  font-weight: 600;
}

.ta-barras {
  display: grid;
  gap: 10px;
  margin: 14px 0 20px;
  padding: 0;
  list-style: none;
}

.ta-barras li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 2.5em;
  align-items: center;
  gap: 12px;
}

.ta-barra-etq {
  font-size: 0.98rem;
  line-height: 1.35;
}

.ta-barra-etq strong {
  display: block;
  color: var(--rm-navy-2);
}

.ta-barra-etq span {
  color: var(--rm-suave);
  font-size: 0.88rem;
}

.ta-barra-pista {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9ebef;
}

.ta-barra-relleno {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rm-oro-osc), var(--rm-vino));
  transition: width 0.5s ease;
}

.ta-barra-n {
  color: var(--rm-navy-2);
  font-size: 1.1rem;
  font-weight: 800;
  text-align: right;
}

.ta-conversar {
  margin: 0 0 14px;
  padding-left: 22px;
}

.ta-conversar li {
  margin-bottom: 6px;
}

.ta-resultado-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

/* Actividad y estrategias */
.ta-pasos {
  margin: 0 0 18px;
  padding-left: 22px;
}

.ta-pasos li {
  margin-bottom: 10px;
}

.ta-estrategias {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.ta-estrategias li {
  padding: 16px 18px;
  border: 1px solid var(--rm-linea);
  border-left: 4px solid var(--rm-oro-osc);
  border-radius: 0 12px 12px 0;
}

.ta-estrategias p {
  margin: 0 !important;
  font-size: 0.98rem !important;
  line-height: 1.6 !important;
}

.ta-descargas {
  grid-template-columns: minmax(0, 1fr);
  max-width: 560px;
}

@media (max-width: 760px) {
  .ta-evidencia,
  .ta-opciones,
  .ta-estrategias {
    grid-template-columns: minmax(0, 1fr);
  }

  .ta-pregunta {
    padding: 16px 14px 10px;
  }

  .ta-barras li {
    grid-template-columns: minmax(0, 1fr) 2.5em;
  }

  .ta-barra-pista {
    grid-column: 1 / -1;
    order: 3;
  }

  .ta-enviar .rm-btn,
  .ta-resultado-acciones .rm-btn {
    width: 100%;
  }
}

@media print {
  .ta-form,
  .ta-resultado-acciones,
  #descargas {
    display: none !important;
  }

  .ta-opcion {
    min-height: 0;
  }

  .ta-barra-relleno {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html.ta-solo-resultado .rm-hero,
  html.ta-solo-resultado .rm-card:not(.ta-resultado),
  html.ta-solo-resultado .rm-cierre,
  html.ta-solo-resultado .rm-indice {
    display: none !important;
  }

  html.ta-solo-resultado .ta-resultado {
    display: block !important;
    border: 0;
  }
}

/* ---------- Fuentes y recursos: formación y publicación en Docentes 2.0 ---------- */
.rm-recursos-d20 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.rm-recursos-d20 > li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 10px;
  border: 1px solid var(--rm-linea);
  border-top: 4px solid var(--rm-oro);
  border-radius: 12px;
  background: #fff;
}

.rm-recursos-d20 > li.rm-rec-revista {
  border-top-color: var(--rm-vino);
}

.rm-recursos-d20 p {
  margin: 0 !important;
  font-size: 0.97rem !important;
  line-height: 1.6 !important;
}

.rm-recursos-d20 .rm-rec-kicker {
  color: var(--rm-vino);
  font-size: 0.78rem !important;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rm-recursos-d20 .rm-rec-titulo {
  color: var(--rm-navy-2);
  font-size: 1.12rem !important;
  font-weight: 800;
  line-height: 1.3 !important;
}

.rm-recursos-d20 .rm-seminario-datos {
  margin: 2px 0;
}

.rm-recursos-d20 .rm-seminario-datos li {
  padding: 4px 10px;
  font-size: 0.85rem !important;
}

.rm-recursos-d20 .rm-rec-nota {
  color: var(--rm-suave);
  font-size: 0.88rem !important;
}

.rm-recursos-d20 .rm-fuente-enlace {
  margin-top: auto;
}

.rm-siguiente {
  margin-top: 18px;
  padding: 14px 18px;
  border-left: 4px solid var(--rm-vino);
  border-radius: 0 10px 10px 0;
  background: #fbf7f6;
}

.rm-siguiente p {
  margin: 0 !important;
}

.rm-siguiente a {
  color: var(--rm-vino);
  font-weight: 700;
}

@media (max-width: 760px) {
  .rm-recursos-d20 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .rm-recursos-d20 > li {
    break-inside: avoid;
  }

  .rm-recursos-d20 .rm-fuente-enlace::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    font-weight: 400;
    color: #555;
    word-break: break-all;
  }

  .rm-siguiente {
    border-left-color: #999;
  }
}

/* Subsecciones enlazadas desde el recorrido: que el título no quede bajo la cabecera fija */
.rm-h3[id] {
  scroll-margin-top: 108px;
}

@media (max-width: 991px) {
  .rm-h3[id] {
    scroll-margin-top: 100px;
  }
}

/* Anuncios (js/d20-ads.js): fuera del cuestionario y del resultado; no se imprimen */
.ta-anuncio {
  margin: 0 0 22px;
}

.ta-anuncio .d20-ad-container {
  margin: 0 auto;
}

.ta-anuncio-pie {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 0 16px;
  box-sizing: border-box;
}

@media print {
  .ta-anuncio,
  .ta-anuncio-pie {
    display: none !important;
  }
}

/* «Antes de empezar»: una sola caja («Para qué sirve») a todo el ancho */
.rm-esno.ta-esno-uno {
  grid-template-columns: minmax(0, 1fr);
}
