/* Mobile presentation for legacy studies. Desktop tables remain unchanged. */
@media (max-width: 600px) {
  .study-article .study-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .study-article .study-table {
    display: block;
    width: 100%;
    min-width: 0;
    background: transparent;
  }
  .study-article .study-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .study-article .study-table tbody,
  .study-article .study-table tr,
  .study-article .study-table td { display: block; width: 100%; }
  .study-article .study-table tr {
    margin: 0 0 14px;
    overflow: hidden;
    border: 1px solid #d9e4ef;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(17, 53, 83, .07);
  }
  .study-article .study-table td,
  .study-article .study-table td.num {
    display: grid;
    grid-template-columns: minmax(108px, 38%) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid #e7eef5;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .study-article .study-table td:last-child { border-bottom: 0; }
  .study-article .study-table td::before {
    content: attr(data-label);
    color: #48657d;
    font-size: .73rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: .025em;
    text-transform: uppercase;
  }

  /* Fallback labels keep server-generated rows self-explanatory. */
  #decision td:nth-child(1)::before { content: "Exposición"; }
  #decision td:nth-child(2)::before { content: "Ejemplos"; }
  #decision td:nth-child(3)::before { content: "Proceso"; }
  #decision td:nth-child(4)::before { content: "Decisión"; }
  #entrevista td:nth-child(1)::before { content: "Dimensión"; }
  #entrevista td:nth-child(2)::before { content: "Pregunta"; }
  #entrevista td:nth-child(3)::before { content: "Evidencia"; }
  #entrevista td:nth-child(4)::before { content: "Profundizar si"; }
  #resultados td:nth-child(1)::before { content: "Dimensión"; }
  #resultados td:nth-child(2)::before { content: "Dirección"; }
  #resultados td:nth-child(3)::before { content: "Nivel medio"; }
  #resultados td:nth-child(4)::before { content: "Índice favorable"; }
  #aplicacion td:nth-child(1)::before { content: "Necesidad"; }
  #aplicacion td:nth-child(2)::before { content: "Evidencia principal"; }
  #aplicacion td:nth-child(3)::before { content: "Complemento"; }
  #aplicacion td:nth-child(4)::before { content: "Control de calidad"; }
  #ranking td:nth-child(1)::before { content: "Posición"; }
  #ranking td:nth-child(2)::before { content: "Prueba"; }
  #ranking td:nth-child(3)::before { content: "Aplicaciones"; }
  #ranking td:nth-child(4)::before { content: "Participación"; }
  #tendencia td:nth-child(1)::before { content: "Mes"; }
  #tendencia td:nth-child(2)::before { content: "Aplicaciones"; }
  #tendencia td:nth-child(3)::before { content: "Organizaciones activas"; }
  #grafico td:nth-child(1)::before { content: "Pruebas"; }
  #grafico td:nth-child(2)::before { content: "Episodios"; }
  #grafico td:nth-child(3)::before { content: "7 días"; }
  #grafico td:nth-child(4)::before { content: "30 días"; }
  #evidencia-composicion td:nth-child(1)::before { content: "Composición"; }
  #evidencia-composicion td:nth-child(2)::before { content: "Pruebas"; }
  #evidencia-composicion td:nth-child(3)::before { content: "Episodios"; }
  #evidencia-composicion td:nth-child(4)::before { content: "Finalización"; }
  #evidencia-organizacion td:nth-child(1)::before { content: "Comparación"; }
  #evidencia-organizacion td:nth-child(2)::before { content: "Organizaciones"; }
  #evidencia-organizacion td:nth-child(3)::before { content: "Diferencia"; }
  #diseno td:nth-child(1)::before { content: "Paso"; }
  #diseno td:nth-child(2)::before { content: "Pregunta"; }
  #diseno td:nth-child(3)::before { content: "Evidencia"; }
  #diseno td:nth-child(4)::before { content: "Criterio para retirar"; }
}
