/* EPQA · Catálogo de recursos · corrección tras auditoría visual 2026-10-19
 * Aprobación Figma A (claro) / B (azul grisáceo).
 * Sólo apariencia; no cambia búsquedas, API, métricas, valoraciones ni acceso.
 * Evita transparencias heredadas y asegura lectura sobre cada superficie.
 */

/* Regiones contenidas: nunca obligar al documento a desplazarse lateralmente. */
body.page-recursos.stem-playground .resources-page {
  box-sizing:border-box;
  width:min(1220px,calc(100% - 32px));
  max-width:calc(100% - 24px);
  min-width:0;
  margin-inline:auto;
}
body.page-recursos.stem-playground .resources-catalog,
body.page-recursos.stem-playground .epqa-resources-header,
body.page-recursos.stem-playground .epqa-resources-copy,
body.page-recursos.stem-playground .resource-grid,
body.page-recursos.stem-playground .epqa-resource-card,
body.page-recursos.stem-playground .resource-meta,
body.page-recursos.stem-playground .epqa-catalog-actions {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
}
body.page-recursos.stem-playground .resource-grid > .epqa-resource-card {
  width:100%;
}
body.page-recursos.stem-playground .epqa-resource-card :is(h3,p,.resource-meta span) {
  overflow-wrap:break-word;
}
body.page-recursos.stem-playground .epqa-resource-card .resource-meta {
  align-items:center;
  row-gap:6px;
}
body.page-recursos.stem-playground .epqa-resource-card .resource-meta .epqa-catalog-grade-label {
  display:inline-flex;
  align-items:center;
  background:#eaf5fe !important;
  color:#042066 !important;
  border:1px solid #bdddf5 !important;
  border-radius:7px !important;
  padding:3px 7px !important;
  font-size:.75rem !important;
  line-height:1.35 !important;
  font-weight:900;
}
body.page-recursos.stem-playground .epqa-resource-card .resource-meta :is(.epqa-catalog-subject-label,span:not(.epqa-catalog-grade-label):not(.epqa-catalog-multigrade-label)) {
  color:#435778 !important;
  font-size:.75rem;
  line-height:1.4;
}
body.page-recursos.stem-playground .epqa-resource-card .epqa-resource-engagement {
  color:#425879 !important;
}
body.page-recursos.stem-playground .epqa-resource-card .epqa-card-offline-hint {
  color:#465e7b !important;
}
body.page-recursos.stem-playground .epqa-resource-card .epqa-catalog-actions__detail {
  min-height:36px;
  text-underline-offset:3px;
}
/* Light A: header and caption should remain clearly readable. */
html:not([data-theme="dark"]) body.page-recursos.stem-playground .epqa-library-subtitle,
html:not([data-theme="dark"]) body.page-recursos.stem-playground .epqa-library-intro__desc {
  color:#425778 !important;
}
html:not([data-theme="dark"]) body.page-recursos.stem-playground .epqa-library-intro__eyebrow {
  color:#085c98 !important;
}
/* Night B: contrast needs to win over legacy inline CSS emitted by recursos.php. */
html[data-theme="dark"] body.page-recursos.stem-playground .epqa-resources-page-title {
  color:#f3f7ff !important;
  opacity:1 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .epqa-library-subtitle,
html[data-theme="dark"] body.page-recursos.stem-playground .epqa-library-intro__desc,
html[data-theme="dark"] body.page-recursos.stem-playground .epqa-catalog-entry-note {
  color:#d9e5f7 !important;
  opacity:1 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .epqa-library-intro__eyebrow {
  color:#a3e5ff !important;
  opacity:1 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .epqa-library-intro__title {
  color:#f3f7ff !important;
  opacity:1 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .epqa-library-intro {
  background:linear-gradient(112deg,#394861,#334057 67%,#414968) !important;
  border-color:#71829e !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog.epqa-resources-hero {
  background:linear-gradient(145deg,#343e56,#303b52) !important;
  background-color:#343e56 !important;
  color:#f3f7ff !important;
  border:1px solid #657995 !important;
  box-shadow:0 10px 30px rgba(12,20,39,.17) !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resources-header,
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .catalog-header {
  background:transparent !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-dynamic-title,
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resources-copy h2 {
  color:#f3f7ff !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-dynamic-title span {
  color:#a5e7ff !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resources-copy :is(p,.epqa-page-subtitle),
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .resource-meta:not(.epqa-resource-card .resource-meta) {
  color:#d9e5f7 !important;
  opacity:1 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card {
  background:#39455e !important;
  background-image:none !important;
  border:1px solid #7285a3 !important;
  color:#f3f7ff !important;
  opacity:1 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card h3 {
  color:#f3f7ff !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card > p {
  color:#d5e1f3 !important;
  opacity:1 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .resource-meta .epqa-catalog-grade-label {
  background:#49678e !important;
  color:#f3f7ff !important;
  border:1px solid #89b0d8 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .resource-meta :is(
  .epqa-catalog-subject-label,span:not(.epqa-catalog-grade-label):not(.epqa-catalog-multigrade-label)
) {
  color:#cedef5 !important;
  opacity:1 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .resource-meta .epqa-catalog-multigrade-label {
  background:#28564e !important;
  color:#c6f7e2 !important;
  border-color:#6abb9c !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .epqa-resource-engagement {
  color:#e0eaff !important;
  opacity:1 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .epqa-resource-engagement__goal {
  background:#455f82 !important;
  color:#f1f8ff !important;
  border-color:#87a9d4 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .epqa-resource-engagement a,
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .epqa-resource-engagement__stars {
  color:#ffcd76 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .resource-actions.epqa-catalog-actions a.epqa-catalog-actions__detail {
  color:#bde2ff !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .epqa-card-offline-hint {
  color:#cddbf2 !important;
  opacity:1 !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog :is(
  .epqa-facet-row label,.epqa-ranking-toolbar label
) {
  color:#ecf3ff !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog :is(
  .resource-filters button,#resource-clear-filters,.epqa-ranking-toolbar__mine
):not(.is-active) {
  background:#455977 !important;
  color:#edf6ff !important;
  border-color:#8199ba !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog :is(
  #resource-sort,#resource-grade,#resource-subject,#resource-search
) {
  color:#f4f8ff !important;
  -webkit-text-fill-color:#f4f8ff !important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog #resource-search::placeholder {
  color:#c9daf2 !important;
  -webkit-text-fill-color:#c9daf2 !important;
  opacity:1;
}
@media (max-width:719.98px) {
  body.page-recursos.stem-playground .resources-page {
    width:calc(100% - 20px);
    max-width:calc(100% - 20px);
    padding-inline:0;
  }
  body.page-recursos.stem-playground .resources-catalog {
    padding-inline:12px !important;
  }
}
@media (prefers-reduced-motion:reduce) {
  body.page-recursos.stem-playground .epqa-resource-card {
    transition:none !important;
    transform:none !important;
  }
}
