/* EPQA — tema noche Aurora (Dracula adaptado al azul de la marca).
   Solo afecta la interfaz del sitio. Los HTML educativos descargados no se alteran. */
:root{
  --epqa-night:#282e41;--epqa-night-raised:#343d55;--epqa-night-deep:#22293a;
  --epqa-night-panel:#3b4560;--epqa-night-border:#576480;
  --epqa-night-text:#edf2ff;--epqa-night-muted:#b8c6df;
  --epqa-night-cyan:#62d3f6;--epqa-night-blue:#89b7ff;
  --epqa-night-violet:#c3a5ff;--epqa-night-mint:#69debe;
}
.epqa-theme-switch{
  appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;
  border:1px solid #c4d9f8;border-radius:12px;background:#edf5ff;color:#1e4b85;
  min-width:44px;min-height:44px;padding:8px 11px;cursor:pointer;
  font-size:.84rem;font-weight:850;line-height:1.2;flex:0 0 auto;
}
.epqa-theme-switch:hover{border-color:#639dff;background:#e4efff}
.epqa-theme-switch:focus-visible{outline:3px solid #4784ec;outline-offset:2px}
.epqa-theme-switch i{font-size:1.14rem}
.epqa-theme-label{display:none}
@media (min-width:1500px){.epqa-theme-label{display:inline;max-width:160px;white-space:normal}}
@media (max-width:719.98px){
 .epqa-theme-switch{width:44px;padding:8px}
 body.stem-playground .site-header .navbar-expand-xl>.container{column-gap:5px;row-gap:6px}
 body.stem-playground .site-header .epqa-brand-link{max-width:calc(100% - 166px);min-width:0}
 body.stem-playground .site-header .epqa-brand-link .epqa-logo{max-width:145px}
}
html[data-theme="dark"]{color-scheme:dark;--stem-bg:#282e41;--stem-text:#edf2ff;--stem-muted:#b8c6df;--stem-blue:#89b7ff;--stem-cyan:#62d3f6;--epqa-text:#edf2ff;--epqa-muted:#b8c6df;}
html[data-theme="dark"] body.stem-playground{
 color:var(--epqa-night-text)!important;
 background:radial-gradient(ellipse at 12% 4%,rgba(91,109,164,.26),transparent 32%),
 radial-gradient(ellipse at 92% 12%,rgba(109,81,157,.24),transparent 37%),
 linear-gradient(135deg,#2c344b,#262d40 58%,#30384d)!important;
}
html[data-theme="dark"] body.stem-playground .site-main{color:var(--epqa-night-text)}
html[data-theme="dark"] body.stem-playground .site-header .navbar{
 background:rgba(44,51,72,.97)!important;border-color:#55617b!important;
 box-shadow:0 8px 26px rgba(17,20,39,.2)!important;
}
html[data-theme="dark"] body.stem-playground .site-header .epqa-brand-link{
 border-radius:14px;background:#f6faff!important;padding:4px 8px;
}
html[data-theme="dark"] body.stem-playground .site-header .epqa-theme-switch,
html[data-theme="dark"] body.stem-playground .site-header .epqa-nav-mobile-search,
html[data-theme="dark"] body.stem-playground .site-header .navbar-toggler{
 background:#404a66!important;border-color:#64718e!important;color:#f0f3ff!important;
}
html[data-theme="dark"] body.stem-playground .site-header .navbar-toggler-icon{
 filter:invert(1) brightness(2);
}
html[data-theme="dark"] body.stem-playground .site-header .epqa-header-shortcut{
 color:#e7efff!important;background:transparent;border-color:transparent;
}
html[data-theme="dark"] body.stem-playground .site-header .epqa-header-shortcut:hover,
html[data-theme="dark"] body.stem-playground .site-header .epqa-header-shortcut.active{
 background:#475577!important;border-color:#7491c7!important;color:#f5f7ff!important;
}
html[data-theme="dark"] body.stem-playground .site-header #mainNav.show,
html[data-theme="dark"] body.stem-playground .site-header #mainNav.collapsing,
html[data-theme="dark"] body.stem-playground .navbar-collapse{
 background:#31394f!important;border-color:#626e87!important;color:#edf2ff;
}
html[data-theme="dark"] body.stem-playground .site-header #mainNav .nav-link,
html[data-theme="dark"] body.stem-playground .site-header #mainNav .nav-link-label,
html[data-theme="dark"] body.stem-playground .site-header #mainNav .nav-user-greeting,
html[data-theme="dark"] body.stem-playground .site-header #mainNav .nav-user-role,
html[data-theme="dark"] body.stem-playground .site-header #mainNav .epqa-nav-filter label{
 color:#e4edff!important;
}
html[data-theme="dark"] body.stem-playground .site-header #mainNav .nav-link.active,
html[data-theme="dark"] body.stem-playground .site-header #mainNav .nav-link:hover{
 background:#485879!important;border-color:#718ec0!important;color:#fff!important;
}
html[data-theme="dark"] body.stem-playground .site-header #mainNav .epqa-mobile-admin-group details,
html[data-theme="dark"] body.stem-playground .site-header #mainNav .epqa-mobile-admin-group summary,
html[data-theme="dark"] body.stem-playground .site-header #mainNav .epqa-mobile-admin-links a,
html[data-theme="dark"] body.stem-playground .site-header #mainNav .epqa-language-toggle{
 background:#3d4864!important;border-color:#5c719a!important;color:#edf2ff!important;
}
html[data-theme="dark"] body.stem-playground .site-header #mainNav .epqa-mobile-admin-links a:hover{background:#536488!important}
html[data-theme="dark"] body.stem-playground .site-header #mainNav .dropdown-menu{
 background:#354058!important;border:1px solid #64718e!important;color:#e4edff!important;
}
html[data-theme="dark"] body.stem-playground .site-header #mainNav .dropdown-item{color:#edf2ff!important}
html[data-theme="dark"] body.stem-playground .site-header #mainNav .dropdown-item:hover{background:#485879!important}
html[data-theme="dark"] body.stem-playground .site-footer{
 background:linear-gradient(145deg,#232a3d,#30374b)!important;border-color:#5b6e92!important;
}
html[data-theme="dark"] body.stem-playground .site-footer :is(p,small,a){color:#c3d4ed!important}
html[data-theme="dark"] body.stem-playground .site-footer :is(h2,h3,strong){color:#f0f5ff!important}
/* Mantener el avatar y la identidad original legibles sobre paneles ligeramente más claros. */
html[data-theme="dark"] body.page-home .home-stem,
html[data-theme="dark"] body.page-dashboard .home-stem,
html[data-theme="dark"] body.page-home .site-main,
html[data-theme="dark"] body.page-dashboard .site-main{
 background:transparent!important;
}
html[data-theme="dark"] body.page-home .epqa-hero-media{
 background:#f5f9ff;border-radius:23px;padding:clamp(6px,1vw,12px);
 box-shadow:0 12px 36px rgba(15,22,42,.17);
}
html[data-theme="dark"] body.page-home .stem-hero h1,
html[data-theme="dark"] body.page-dashboard .stem-hero h1,
html[data-theme="dark"] body.page-home .epqa-home-question,
html[data-theme="dark"] body.page-dashboard .epqa-home-question{
 color:#f3f5ff!important;text-shadow:none!important;
}
/* Superficies genéricas, tarjetas y paneles de las vistas principales. */
html[data-theme="dark"] body.stem-playground :is(
 .surface-card,.surface-panel,.home-route-card,.home-module-card,.stem-route-card,
 .stem-module-card,.stem-help-bar,.epqa-resource-card,.epqa-creations__item,
 .epqa-creations__stat,.epqa-creations__empty,.epqa-detail__body,
 .epqa-detail__side,.epqa-detail__rating,.courses-page .masterclass-card,
 .courses-page .masterclass-aside,.courses-page .tutor-card,
 .courses-page .masterclass-promise,.courses-page .masterclass-benefit,
 .courses-page .video-preview,.epqa-impact-card,.contact-panel,
 .course-card,.course-panel,.account-card,.account-panel,.auth-card,
 .epqa-library-intro,.epqa-resource-hero,.epqa-filter-bar,.epqa-help-panel,
 .epqa-training-card,.epqa-dashboard-card,.epqa-hub-card
){
 background:#343d54!important;border-color:#566683!important;
 box-shadow:0 10px 27px rgba(16,22,42,.13)!important;
 color:#edf2ff!important;
}
html[data-theme="dark"] body.stem-playground :is(
 .masterclass-cover,.masterclass-content,.masterclass-grid,.epqa-resources-header,
 .epqa-detail,.epqa-creations,.courses-page,.epqa-detail__layout
){color:#edf2ff}
html[data-theme="dark"] body.stem-playground :is(
 h1,h2,h3,h4,h5,h6,.epqa-page-title,.epqa-resources-page-title,
 .epqa-creations__heading h2,.epqa-creations__item h3,
 .courses-section-title,.epqa-detail__body h2,.epqa-library-intro__title,
 .home-route-card h2,.stem-route-card h2,.masterclass-content h2
){color:#f0f4ff!important}
html[data-theme="dark"] body.stem-playground :is(
 .epqa-page-subtitle,.epqa-creations__intro,.epqa-creations__meta,
 .epqa-detail__desc,.epqa-detail__note,.epqa-detail__download-help,
 .masterclass-lead,.course-meta,.resource-card-description,
 .epqa-resource-card p,.masterclass-card p,.courses-hero p,
 .stem-route-card p,.epqa-creations__stat span,.epqa-detail__rating p
){color:#bdcbe2!important}
html[data-theme="dark"] body.stem-playground :is(
 .epqa-creations__stat strong,.epqa-creations__eyebrow,.epqa-detail__eyebrow,
 .epqa-resources-page-title span,.epqa-detail__stars,.courses-kicker
){color:#77d9ff!important}
html[data-theme="dark"] body.stem-playground :is(
 .epqa-resource-engagement__goal,.epqa-detail__launch-goal,
 .epqa-creations__status,.course-tag,.proof-icon,.epqa-detail__tags span,
 .epqa-detail__engagement span,.epqa-creations__button--soft
){background:#435473!important;color:#bfe9ff!important;border-color:#6885b3!important}
html[data-theme="dark"] body.stem-playground :is(
 .epqa-detail__action,.epqa-creations__button,.course-actions .primary,
 .epqa-resource-card .btn-primary,.btn-primary,.epqa-route-btn
){background:linear-gradient(135deg,#3e83e7,#8263dc)!important;color:white!important;border-color:#628be7!important}
html[data-theme="dark"] body.stem-playground :is(
 .course-actions .secondary,.course-actions .recording,.epqa-creations__actions a,
 .epqa-detail__action--outline,.epqa-help-button,.resource-filters button,
 .epqa-resource-filter,.epqa-resource-chip,.epqa-filter-chip,.btn-outline-primary
){background:#435574!important;color:#d9edff!important;border-color:#7188b2!important}
html[data-theme="dark"] body.stem-playground :is(
 input:not([type="checkbox"]):not([type="radio"]),select,textarea,.form-control,
 #epqa-menu-search
){
 background:#283147!important;color:#f0f4ff!important;
 border-color:#667693!important;-webkit-text-fill-color:#f0f4ff!important;
}
html[data-theme="dark"] body.stem-playground :is(input,select,textarea)::placeholder{
 color:#b2c0d6!important;opacity:1;
}
html[data-theme="dark"] body.stem-playground :is(input,textarea,select):focus{
 outline-color:#a98de5!important;box-shadow:0 0 0 3px rgba(159,141,226,.22)!important;
}
html[data-theme="dark"] body.stem-playground :is(a:not(.btn):not(.nav-link),.epqa-resource-card a):hover{
 text-decoration-color:#81c7ff;
}
html[data-theme="dark"] body.stem-playground :is(
 .epqa-detail__side dt,.proof-item,.tutor-card strong,.course-tag,
 .epqa-creations__stat,.epqa-resource-engagement,.resource-badge,.account-label
){color:#e5eeff!important}
/* Espaciado estable para inglés/coreano. Evita que las traducciones rompan tarjetas. */
html[lang] body.stem-playground :is(.navbar-nav,.epqa-header-shortcuts,.epqa-resource-card,
 .epqa-creations__item,.masterclass-grid,.course-actions,.epqa-detail__layout){
 min-width:0;
}
html[lang] body.stem-playground :is(.epqa-page-title,.epqa-resources-page-title,
 .epqa-creations__item h3,.masterclass-content h2,.epqa-detail__body h1,
 .epqa-resource-card h3,.epqa-resource-card p,.epqa-nav-filter label){
 overflow-wrap:anywhere;word-break:normal;text-wrap:pretty;
}
html[lang] body.stem-playground :is(.epqa-resource-card,.epqa-creations__item,
 .masterclass-grid,.course-actions){min-width:0}
@media(max-width:991.98px){
 html[lang] body.stem-playground .masterclass-grid,
 html[lang] body.stem-playground .epqa-detail__layout{grid-template-columns:minmax(0,1fr)}
}
@media (prefers-reduced-motion:reduce){
 .epqa-theme-switch{transition:none!important}
}


/* Las vistas históricas declaran fondos claros directamente sobre .site-main. */
html[data-theme="dark"] body.stem-playground .site-main,
html[data-theme="dark"] body.stem-playground :is(
 .epqa-resources-page,.epqa-resource-page,.epqa-library-page,.courses-page,
 .account-page,.epqa-training-page,.training-page,.auth-page,
 .epqa-login-page,.epqa-plan-page,.home-stem,.home-hub-page
){background:transparent!important}
html[data-theme="dark"] body.stem-playground :is(
 .account-section,.account-summary-card,.account-section-title,
 .account-detail-list,.auth-panel,.auth-card,.auth-shell,
 .courses-hero,.epqa-resources-header,.epqa-resource-hero,
 .course-actions .secondary,.tutor-card,.masterclass-proof,
 .training-hero,.training-card,.epqa-plan-card,.epqa-plan-feature,
 .epqa-plan-action,.epqa-impulsos__card,.epqa-creations__stats,
 .modal-content,.dropdown-menu
){
 background:#343e56!important;border-color:#667590!important;
 color:#edf2ff!important;
}
html[data-theme="dark"] body.stem-playground :is(
 .account-summary-card strong,.account-section-title h3,
 .account-detail-list strong,.auth-title,.courses-hero h1,.epqa-plan-card__title,
 .epqa-plan-card__price,.epqa-impulsos__card strong
){color:#f0f4ff!important}
html[data-theme="dark"] body.stem-playground :is(
 .account-section p,.account-summary-card span,.account-detail-list span,
 .auth-subtitle,.auth-provider-note,.training-card p
){color:#c0cde3!important}
html[data-theme="dark"] body.stem-playground :is(
 .account-action,.account-action--soft,.auth-links a,.btn-auth-secondary,
 .epqa-plan-action
){background:#465779!important;color:#e2efff!important;border-color:#7187b1!important}
html[data-theme="dark"] body.stem-playground :is(
 .auth-form label,.account-form label,.form-label,.epqa-language-menu .dropdown-item
){color:#e9f0ff!important}
html[data-theme="dark"] body.stem-playground .epqa-resource-card :is(
 .epqa-resource-card__title,.epqa-resource-card__description,.resource-card-title
){color:#ecf3ff!important}
html[data-theme="dark"] body.stem-playground :is(
 .epqa-page-title span,.epqa-resources-page-title,.epqa-resource-dynamic-title span
){color:#9dd9ff!important}
html[data-theme="dark"] body.stem-playground a:focus-visible,
html[data-theme="dark"] body.stem-playground button:focus-visible{
 outline:3px solid #91c6ff;outline-offset:2px
}
