/* EPQA · Figma B · capa nocturna final, 2026-10-19.
 * Diseño aprobado: azul grisáceo, acentos de marca y contraste.
 * Cargar tras hojas específicas de cada vista. No modifica estructura ni funciones.
 */
html[data-theme="dark"] {
  --epqa-night-bg:#2c354b;
  --epqa-night-panel:#344057;
  --epqa-night-card:#3a4861;
  --epqa-night-raised:#455775;
  --epqa-night-border:#7185a6;
  --epqa-night-ink:#f3f7ff;
  --epqa-night-secondary:#d3e1f3;
  --epqa-night-subtle:#bfd1eb;
  --epqa-night-link:#a5e4ff;
  --epqa-night-cta:#00a8fe;
  --epqa-night-cta-ink:#042066;
  --epqa-night-purple:#9168ff;
}
html[data-theme="dark"] body.stem-playground {
  background:#2c354b!important;
  color:var(--epqa-night-ink);
}
html[data-theme="dark"] body.stem-playground .site-main {
  background:linear-gradient(160deg,#2c354b,#283247 68%,#30384f)!important;
  color:var(--epqa-night-ink);
}
html[data-theme="dark"] body.stem-playground .site-header .navbar {
  background:#2c354b!important;
  border-color:#64758f!important;
}
/* Landing pública: el fondo del hero y su título deben cambiar juntos. */
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-hero {
  background:linear-gradient(125deg,#38445f 0%,#34415d 62%,#414b6d 100%)!important;
  border-color:#7285a4!important;
  box-shadow:0 15px 38px rgba(12,19,38,.20)!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-hero::before {
  background:linear-gradient(130deg,rgba(78,116,174,.20),rgba(82,160,196,.09))!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-hero h1 {
  color:#f3f7ff!important;
  opacity:1!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-hero h1 :is(span,em) {
  color:#90e3ff!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-hero__copy > p {
  color:#dce8f9!important;
  opacity:1!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-kicker {
  background:#465a7b!important;
  border-color:#8299b8!important;
  color:#eef8ff!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-proof span {
  color:#e4effc!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-proof i {
  color:#86d8ff!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-search {
  background:#29354c!important;
  border-color:#8298b9!important;
  min-width:0;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-search input {
  background:transparent!important;
  border:0!important;
  color:#f4f8ff!important;
  -webkit-text-fill-color:#f4f8ff!important;
  min-width:0;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-search input::placeholder {
  color:#d3e0f3!important;
  -webkit-text-fill-color:#d3e0f3!important;
  opacity:1!important;
}
html[data-theme="dark"] body.page-home.stem-playground :is(.epqa-landing-search button,.epqa-l-btn--primary) {
  background:#00a8fe!important;
  border-color:#00a8fe!important;
  color:#042066!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-l-btn--light {
  background:#4f4472!important;
  border-color:#a49ada!important;
  color:#f5f0ff!important;
}
html[data-theme="dark"] body.page-home.stem-playground :is(
  .epqa-landing-section-head h2,.epqa-landing-story__content h2,
  .epqa-landing-steps strong,.epqa-landing-path h3
) {
  color:#f3f7ff!important;
  opacity:1!important;
}
html[data-theme="dark"] body.page-home.stem-playground :is(
  .epqa-landing-section-head p,.epqa-landing-steps p,
  .epqa-landing-path p,.epqa-landing-story__content > p,
  .epqa-landing-final p
) {
  color:#d1dff3!important;
  opacity:1!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-section-kicker {
  color:#a5e4ff!important;
}
html[data-theme="dark"] body.page-home.stem-playground :is(
  .epqa-featured-card,.epqa-edtech__card,
  .epqa-landing-path,.epqa-landing-story,
  .epqa-landing-featured__empty
) {
  background:#38455e!important;
  color:#f3f7ff!important;
  border-color:#7285a4!important;
  box-shadow:0 8px 24px rgba(13,20,39,.16)!important;
}
html[data-theme="dark"] body.page-home.stem-playground :is(
  .epqa-featured-card h3,.epqa-featured-card h3 a,
  .epqa-edtech__card h3,.epqa-edtech__card h3 a,
  .epqa-landing-path h3
) {color:#f3f7ff!important;opacity:1!important;}
html[data-theme="dark"] body.page-home.stem-playground :is(
  .epqa-featured-card p,.epqa-edtech__card p,.epqa-edtech__meta,
  .epqa-edtech__tip-footer
) {color:#d1dff3!important;opacity:1!important;}
html[data-theme="dark"] body.page-home.stem-playground :is(
  .epqa-landing-paths,.epqa-landing-final
) {
  background:linear-gradient(130deg,#35425b,#414c68)!important;
  border-color:#7185a6!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-edtech__card--tip {
  background:#403f60!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-edtech__tip-category {
  background:#55457b!important;
  color:#eddbff!important;
}
html[data-theme="dark"] body.page-home.stem-playground .epqa-edtech__details :is(summary,ol,.epqa-edtech__prompt,.epqa-edtech__note) {
  background:#303d58!important;
  color:#e3ecff!important;
  border-color:#788bac!important;
}
html[data-theme="dark"] body.page-home.stem-playground :is(
  .epqa-landing-more,.epqa-featured-card__link,.epqa-edtech__link
) {
  background:#455775!important;
  color:#e6f3ff!important;
  border-color:#84a0c8!important;
}
/* Dashboard: eliminar el papel blanco con textos blancos. Mantener tarjetas de ruta con colores propios. */
html[data-theme="dark"] body.page-dashboard.stem-playground .home-stem--dashboard {
  background:#2c354b!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground .home-stem--dashboard .home-stem-shell {
  background-color:#303c54!important;
  background-image:
    linear-gradient(rgba(129,161,207,.06) 1px,transparent 1px),
    linear-gradient(90deg,rgba(129,161,207,.06) 1px,transparent 1px)!important;
  background-size:34px 34px!important;
  border:1px solid #607592!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground .home-stem--dashboard .epqa-home-question {
  color:#f3f7ff!important;
  opacity:1!important;
  text-shadow:none!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground .home-stem--dashboard .epqa-home-question span {
  color:#87e2ff!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground :is(
  .epqa-workspace__heading h2,.epqa-workspace__panel h3,
  .epqa-workspace__resource strong
) {
  color:#f3f7ff!important;
  opacity:1!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground .epqa-workspace__eyebrow {
  color:#9ddfff!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground .epqa-workspace__heading > a {
  color:#b4e6ff!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground .epqa-workspace__panel {
  background:#38455f!important;
  border:1px solid #7285a4!important;
  box-shadow:0 9px 25px rgba(13,22,42,.15)!important;
  color:#f3f7ff!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground :is(
  .epqa-workspace__count,.epqa-workspace__resource small,.epqa-workspace__empty
) {color:#d0dff2!important;}
html[data-theme="dark"] body.page-dashboard.stem-playground :is(
  .epqa-workspace__resource,.epqa-workspace__shortcut
) {
  background:#42516e!important;
  color:#edf5ff!important;
  border:1px solid #647e9f!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground :is(
  .epqa-workspace__resource:hover,.epqa-workspace__shortcut:hover,
  .epqa-workspace__resource:focus-visible,.epqa-workspace__shortcut:focus-visible
) {
  background:#516485!important;
  border-color:#9ebce5!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground .epqa-workspace__shortcut i {
  color:#a6dcff!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground .home-stem--dashboard .stem-route-card {
  background:#38455f!important;
  border-color:#7388a8!important;
}
html[data-theme="dark"] body.page-dashboard.stem-playground .home-stem--dashboard .route-copy :is(h2,p) {
  color:#ecf4ff!important;
}
/* Biblioteca: superficie principal del catálogo del mismo nivel que la portada y panel. */
html[data-theme="dark"] body.page-recursos.stem-playground .resources-page {
  background:transparent!important;
  color:#f3f7ff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog.epqa-resources-hero {
  background:#344057!important;
  background-image:none!important;
  border:1px solid #7185a6!important;
  box-shadow:0 12px 28px rgba(12,18,34,.18)!important;
  color:#f3f7ff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog :is(
  .catalog-header,.epqa-resources-header
) {
  background:transparent!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog :is(
  .epqa-resource-dynamic-title,.epqa-resources-copy h2
) {color:#f3f7ff!important;}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-dynamic-title span {
  color:#a2e8ff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground :is(
  .epqa-library-subtitle,.epqa-library-intro__desc,
  .epqa-resources-copy p,.epqa-page-subtitle,
  .epqa-catalog-entry-note
) {
  color:#d3e1f3!important;
  opacity:1!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .epqa-library-intro {
  background:linear-gradient(110deg,#3a4861,#344157 67%,#424a68)!important;
  border:1px solid #7185a6!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .epqa-library-intro__title {
  color:#f3f7ff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .epqa-library-intro__eyebrow {
  color:#9ddfff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .preview-switcher {
  background:#42516e!important;border-color:#7992b3!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .preview-switcher__label {
  color:#f3f7ff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .preview-switcher__track {
  background:#2d394f!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .preview-switcher__option {
  color:#dce9fb!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .preview-switcher__option.is-active {
  background:#526dae!important;color:#fff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card {
  background:#3a4861!important;
  color:#f3f7ff!important;
  border:1px solid #7489a9!important;
  box-shadow:0 7px 22px rgba(12,19,37,.13)!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:#d8e5f6!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .resource-meta span:not(.epqa-catalog-grade-label):not(.epqa-catalog-multigrade-label) {
  color:#d4e1f2!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:#4d6586!important;
  border-color:#91afd4!important;
  color:#f3f7ff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card :is(
  .epqa-resource-engagement,.epqa-card-offline-hint
) {
  color:#d3e1f3!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .epqa-resource-engagement__goal {
  background:#455e82!important;
  border-color:#87a8d0!important;
  color:#f3f7ff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .epqa-resource-card .epqa-catalog-actions__detail {
  color:#b5e6ff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog :is(
  .epqa-facet-row label,.epqa-ranking-toolbar label,.resource-meta
) {color:#e9f3ff!important;}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog :is(
  .resource-filters button:not(.is-active),#resource-clear-filters,
  .epqa-ranking-toolbar__mine,.epqa-help-button
) {
  background:#455977!important;
  color:#f3f7ff!important;
  border-color:#8aa0c3!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .resource-filters button.is-active {
  background:#506fe7!important;
  border-color:#91abff!important;
  color:#fff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog :is(
  #resource-grade,#resource-subject,#resource-sort
) {
  background:#29354d!important;
  color:#f4f8ff!important;
  -webkit-text-fill-color:#f4f8ff!important;
  border-color:#8095b5!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog :is(
  #resource-grade,#resource-subject,#resource-sort
) option {background:#29354d;color:#f4f8ff;}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog :is(
  .catalog-search,.epqa-resources-search
) {
  background:#28354d!important;
  border-color:#8399b9!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog #resource-search {
  background:transparent!important;
  color:#f4f8ff!important;
  -webkit-text-fill-color:#f4f8ff!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog #resource-search::placeholder {
  color:#d1e0f3!important;
  -webkit-text-fill-color:#d1e0f3!important;
  opacity:1!important;
}
html[data-theme="dark"] body.page-recursos.stem-playground .resources-catalog .resource-empty {
  background:#3b4962!important;color:#e9f3ff!important;
  border-color:#7890b1!important;
}
/* Otras rutas: sólo paneles reales; evitar pintar indiscriminadamente elementos internos. */
html[data-theme="dark"] body.page-mis-creaciones.stem-playground :is(
  .epqa-creations__stat,.epqa-creations__item,.epqa-creations__empty
),
html[data-theme="dark"] body.page-cursos.stem-playground :is(
  .courses-hero,.masterclass-card,.masterclass-content,.masterclass-aside,
  .masterclass-promise,.masterclass-benefit
),
html[data-theme="dark"] body.page-mi-cuenta.stem-playground :is(
  .account-summary-card,.account-section
) {
  background:#38455f!important;
  border-color:#7185a6!important;
  color:#f3f7ff!important;
}
html[data-theme="dark"] body.page-mis-creaciones.stem-playground :is(
  .epqa-creations__eyebrow,.epqa-creations__meta,.epqa-creations__intro
),
html[data-theme="dark"] body.page-cursos.stem-playground :is(
  .courses-hero p,.masterclass-card p,.masterclass-lead
),
html[data-theme="dark"] body.page-mi-cuenta.stem-playground .account-section p {
  color:#d3e1f3!important;
}
html[data-theme="dark"] body.page-mis-creaciones.stem-playground :is(
  h1,h2,h3,.epqa-creations__item h3
),
html[data-theme="dark"] body.page-cursos.stem-playground :is(
  h1,h2,h3,.masterclass-content h2
),
html[data-theme="dark"] body.page-mi-cuenta.stem-playground :is(
  h1,h2,h3
) {color:#f3f7ff!important;}
/* Dispositivos modestos, accesibilidad y enfoque visible. */
html[data-theme="dark"] body.stem-playground :is(a,button,input,select,textarea,summary):focus-visible {
  outline:3px solid #b1c9ff!important;outline-offset:2px;
}
@media(max-width:719.98px){
  html[data-theme="dark"] body.page-recursos.stem-playground .resources-page,
  html[data-theme="dark"] body.page-dashboard.stem-playground .home-stem--dashboard .home-stem-shell {
    min-width:0;max-width:calc(100% - 16px);
    margin-inline:auto;
  }
  html[data-theme="dark"] body.page-home.stem-playground .epqa-landing-hero__copy {
    min-width:0;
  }
}
@media(prefers-reduced-motion:reduce){
  html[data-theme="dark"] body.stem-playground :is(
    .epqa-resource-card,.epqa-featured-card,.epqa-workspace__panel,.stem-route-card
  ) {transition:none!important;animation:none!important;transform:none!important;}
}
