/* 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;
}

/* 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-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;
  }
}
