/* El Profe Que Aprende — workspace & catalog UX, Oct 2026.
   Lightweight CSS, scoped by page. Respect system reduced-motion preference. */

/* ---- Logged-in dashboard only: remove full-screen empty canvas ---- */
body.page-dashboard .home-stem--dashboard,
body.page-dashboard .home-stem--dashboard .home-stem-shell {
  min-height: 0 !important;
}
body.page-dashboard .home-stem--dashboard {
  overflow: visible;
  padding: 0 0 32px;
}
body.page-dashboard .home-stem--dashboard .home-stem-shell {
  width: min(1250px, calc(100% - 32px));
  padding: 16px clamp(16px, 2.3vw, 32px) 26px;
  border-radius: 0 0 24px 24px;
}
body.page-dashboard .home-stem--dashboard .stem-hero {
  min-height: 0;
  padding: 0 10px 2px;
}
body.page-dashboard .home-stem--dashboard .epqa-home-question {
  font-size: clamp(1.55rem, 2.9vw, 2.5rem);
  line-height: 1.12;
  margin: 7px auto 12px;
}
body.page-dashboard .home-stem--dashboard .epqa-home-question::after {
  height: 3px;
  margin-top: 10px;
  width: 72px;
}
body.page-dashboard .home-stem--dashboard .stem-route-grid {
  gap: 12px;
  margin: 5px auto 6px;
}
body.page-dashboard .home-stem--dashboard .stem-route-card {
  min-height: 164px;
  padding: 12px 14px 13px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
body.page-dashboard .home-stem--dashboard .route-visual {
  width: 65px;
  height: 52px;
  margin-bottom: 2px;
}
body.page-dashboard .home-stem--dashboard .route-copy h2 {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}
body.page-dashboard .home-stem--dashboard .route-copy p {
  margin: 5px auto 6px;
  font-size: .79rem;
}
body.page-dashboard .home-stem--dashboard .route-btn {
  min-width: 0;
  padding: 0 14px;
  height: 34px;
  font-size: .72rem;
}
body.page-dashboard .home-stem--dashboard .stem-road {
  height: 45px;
  margin-bottom: 12px;
}
body.page-dashboard .home-stem--dashboard .road-stop span {
  transition: transform .18s ease, box-shadow .18s ease;
}
body.page-dashboard .home-stem--dashboard .road-stop.is-road-active span {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 0 0 5px rgba(36, 99, 235, .12), 0 8px 20px rgba(25, 61, 130, .22);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body.page-dashboard .home-stem--dashboard .stem-route-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(24, 50, 108, .12);
  }
}

/* Workspace: actual resources and actions instead of decorative whitespace */
.epqa-workspace {
  padding: 15px 0 0;
  max-width: 1170px;
  margin-inline: auto;
}
.epqa-workspace__heading {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  margin-bottom: 13px;
}
.epqa-workspace__eyebrow {
  display: block;
  font-size: .72rem;
  color: #335faf;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.epqa-workspace h2 {
  color: #112c57;
  font-size: clamp(1.22rem, 2vw, 1.62rem);
  font-weight: 900;
  line-height: 1.22;
  margin: 3px 0;
}
.epqa-workspace__heading > a {
  text-decoration: none;
  font-size: .88rem;
  font-weight: 800;
  color: #2259b7;
}
.epqa-workspace__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(265px, .85fr);
  gap: 15px;
  align-items: stretch;
}
.epqa-workspace__panel {
  min-width: 0;
  background: rgba(255, 255, 255, .94);
  border: 1px solid #dbe5f4;
  box-shadow: 0 6px 20px rgba(33, 63, 106, .06);
  border-radius: 20px;
  padding: 17px;
}
.epqa-workspace__panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}
.epqa-workspace__panel h3 {
  font-size: .96rem;
  line-height: 1.3;
  font-weight: 900;
  color: #1b355f;
  margin: 0;
}
.epqa-workspace__count {
  font-size: .76rem;
  color: #516782;
  white-space: nowrap;
}
.epqa-workspace__resource-list {
  display: grid;
  gap: 8px;
}
.epqa-workspace__resource {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: #f6faff;
  color: #183763;
  border: 1px solid #e0eaf7;
  border-radius: 12px;
  text-decoration: none;
  padding: 10px 12px;
  min-height: 56px;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.epqa-workspace__resource strong {
  display: block;
  font-size: .88rem;
  line-height: 1.32;
  color: #173058;
}
.epqa-workspace__resource small {
  display: block;
  font-size: .75rem;
  margin-top: 2px;
  color: #587092;
}
.epqa-workspace__resource i {
  font-size: 1.15rem;
  color: #2563eb;
}
.epqa-workspace__resource:hover,
.epqa-workspace__resource:focus-visible {
  background: #eef6ff;
  border-color: #94bfff;
}
.epqa-workspace__shortcuts {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}
.epqa-workspace__shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #f5f8ff;
  border: 1px solid transparent;
  color: #233e70;
  font-weight: 750;
  font-size: .84rem;
  line-height: 1.3;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}
.epqa-workspace__shortcut i:first-child {
  font-size: 1.12rem;
  width: 22px;
  color: #365fd3;
}
.epqa-workspace__shortcut i:last-child {
  margin-left: auto;
  opacity: .7;
}
.epqa-workspace__shortcut:hover,
.epqa-workspace__shortcut:focus-visible {
  background: #ebf3ff;
  border-color: #b8cef8;
}
.epqa-workspace__empty {
  color: #586b86;
  font-size: .88rem;
  margin: 12px 0;
}
.epqa-workspace a:focus-visible,
body.page-dashboard .home-stem--dashboard .route-btn:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

/* ---- Resources: discover resources in the first viewport ---- */
body.page-recursos .resources-page {
  width: min(1220px, calc(100% - 36px));
  margin: 14px auto 40px;
}
body.page-recursos .epqa-resources-page-title {
  margin: 5px 0 6px;
  font-size: clamp(1.35rem, 2.25vw, 1.95rem);
  line-height: 1.2;
  text-wrap: balance;
}
body.page-recursos .epqa-library-subtitle {
  margin: 0 0 12px;
  color: #556c8b;
  font-size: .93rem;
  line-height: 1.45;
}
body.page-recursos .epqa-library-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: clamp(12px, 2vw, 22px);
  border-radius: 18px;
  border: 1px solid #d7e6fa;
  background: linear-gradient(115deg, #ffffff 5%, #eff9ff 55%, #eef0ff 100%);
  box-shadow: 0 8px 25px rgba(25, 53, 99, .055);
  padding: 12px 17px;
  margin-bottom: 13px;
  overflow: hidden;
  min-height: 130px;
}
body.page-recursos .epqa-library-intro__eyebrow {
  display: block;
  text-transform: uppercase;
  color: #1979b5;
  letter-spacing: .08em;
  font-size: .68rem;
  font-weight: 900;
  margin-bottom: 4px;
}
body.page-recursos .epqa-library-intro__title {
  font-size: clamp(1.07rem, 1.75vw, 1.35rem);
  font-weight: 900;
  color: #122c5b;
  margin: 0 0 5px;
  line-height: 1.22;
}
body.page-recursos .epqa-library-intro__desc {
  color: #4a6386;
  margin: 0;
  max-width: 64ch;
  font-size: .85rem;
  line-height: 1.47;
}
body.page-recursos .epqa-library-intro__media {
  width: 100%;
  height: 107px;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #d5e8ff;
}
body.page-recursos .epqa-library-intro__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 69% center;
}
body.page-recursos .resources-catalog.epqa-resources-hero {
  padding: clamp(14px, 2vw, 23px) !important;
  margin-top: 0 !important;
  border-radius: 20px;
  scroll-margin-top: 85px;
}
body.page-recursos .epqa-resources-header {
  grid-template-columns: minmax(0, 1.25fr) minmax(265px, 1fr) !important;
  justify-items: stretch !important;
  text-align: left !important;
  align-items: center !important;
  gap: 15px !important;
  margin-bottom: 10px !important;
}
body.page-recursos .epqa-resource-dynamic-title {
  text-align: left !important;
  font-size: clamp(1.35rem, 2.2vw, 2rem) !important;
  margin: 0 0 5px !important;
}
body.page-recursos .epqa-resource-dynamic-title::after {
  margin: 8px 0 0 !important;
  height: 3px;
  width: 58px;
}
body.page-recursos .epqa-resources-copy {
  max-width: none;
}
body.page-recursos .epqa-resources-copy .epqa-page-subtitle {
  margin: 0 0 5px !important;
  font-size: .86rem;
  line-height: 1.4;
}
body.page-recursos .epqa-resources-toolbar {
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}
body.page-recursos .epqa-resources-search {
  min-width: 190px;
  max-width: 100%;
}
body.page-recursos .epqa-catalog-entry-note {
  margin: 0 0 10px;
  font-size: .82rem;
  line-height: 1.4;
  color: #4e6382;
}
body.page-recursos .epqa-catalog-entry-note a {
  font-weight: 850;
  color: #1a5bc0;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
body.page-recursos .epqa-resources-filters {
  justify-content: flex-start;
  margin: 5px 0 9px !important;
  padding-bottom: 0;
}
body.page-recursos .epqa-facet-row {
  margin: 5px 0 15px;
  gap: 9px;
}
body.page-recursos .epqa-resource-card {
  transition: transform 210ms ease, box-shadow 210ms ease, border-color 210ms ease;
}
body.page-recursos .resource-action,
body.page-recursos .resource-filters button {
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
body.page-recursos .epqa-resource-card:focus-within {
  outline: 2px solid #5799ed;
  outline-offset: 2px;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body.page-recursos .epqa-resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(30, 62, 111, .13);
  }
}
@media (max-width: 900px) {
  body.page-dashboard .epqa-workspace__layout { grid-template-columns: minmax(0, 1fr); }
  body.page-recursos .epqa-resources-header {
    grid-template-columns: 1fr !important;
    gap: 11px !important;
  }
  body.page-recursos .epqa-resources-toolbar { justify-content: flex-start; }
  body.page-recursos .epqa-library-intro { grid-template-columns: minmax(0, 1fr) 230px; }
}
@media (max-width: 700px) {
  body.page-dashboard .home-stem--dashboard .home-stem-shell {
    width: 100%;
    padding: 10px 12px 24px;
  }
  body.page-dashboard .home-stem--dashboard .stem-route-card {
    min-height: 0;
    padding: 12px 12px 12px 66px;
  }
  body.page-dashboard .home-stem--dashboard .route-visual {
    width: 40px;
    height: 40px;
    left: 12px;
    top: 44px;
  }
  body.page-dashboard .home-stem--dashboard .stem-road { display: none; }
  body.page-dashboard .epqa-workspace { padding-top: 12px; }
  body.page-dashboard .epqa-workspace__panel { padding: 14px; }
  body.page-dashboard .epqa-workspace__layout { gap: 11px; }
  body.page-recursos .resources-page {
    width: calc(100% - 20px) !important;
    margin: 10px auto 25px !important;
    padding: 0 !important;
  }
  body.page-recursos .epqa-resources-page-title { margin: 0 2px 6px !important; font-size: 1.34rem !important; }
  body.page-recursos .epqa-library-subtitle { margin: 0 2px 11px; font-size: .85rem; }
  body.page-recursos .epqa-library-intro {
    grid-template-columns: 1fr;
    padding: 13px;
    gap: 0;
    min-height: 0;
  }
  body.page-recursos .epqa-library-intro__media { display: none; }
  body.page-recursos .epqa-resources-header {
    text-align: left !important;
    margin-bottom: 12px !important;
  }
  body.page-recursos .epqa-resource-dynamic-title {
    font-size: clamp(1.28rem, 5.8vw, 1.65rem) !important;
    text-align: left !important;
  }
  body.page-recursos .epqa-resources-search { flex-basis: 100%; }
  body.page-recursos .epqa-resources-filters {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }
  body.page-recursos .epqa-resources-filters button {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  body.page-recursos .epqa-facet-row label { min-width: min(100%, 140px); }
}
@media (prefers-reduced-motion: no-preference) {
  body.page-dashboard .epqa-workspace__panel {
    animation: epqa-workspace-in .34s ease both;
  }
  body.page-dashboard .epqa-workspace__panel:nth-child(2) {
    animation-delay: .065s;
  }
  body.page-recursos .epqa-library-intro {
    animation: epqa-workspace-in .32s ease both;
  }
}
@keyframes epqa-workspace-in {
  from { opacity: .65; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  body.page-dashboard .home-stem--dashboard *,
  body.page-dashboard .epqa-workspace *,
  body.page-recursos .epqa-resource-card,
  body.page-recursos .resource-action,
  body.page-recursos .resource-filters button {
    animation: none !important;
    transition: none !important;
  }
  body.page-dashboard .home-stem--dashboard .road-stop.is-road-active span,
  body.page-recursos .epqa-resource-card:hover {
    transform: none !important;
  }
}

/* Grado explícito y distintivo para todos los recursos del catálogo. */
body.page-recursos .epqa-resource-card .resource-meta .epqa-catalog-grade-label {
  order: -2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eaf2ff;
  color: #184c9b;
  border: 1px solid #bfd5ff;
  font-weight: 900;
  line-height: 1.4;
  white-space: normal;
  max-width: 100%;
}
body.page-recursos .epqa-resource-card .resource-meta .epqa-catalog-multigrade-label {
  order: -1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e9fbf2;
  color: #0e7b58;
  border: 1px solid #bdebd6;
  font-weight: 900;
  line-height: 1.4;
}
body.page-recursos .epqa-resource-card .resource-meta .epqa-catalog-multigrade-label i {
  font-size: 12px;
}

/* Authenticated catalog actions: open and download are distinct, first-class actions. */
body.page-recursos .epqa-resource-card .epqa-catalog-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 12px;
}
body.page-recursos .epqa-catalog-actions__primary {
  display: grid;
  grid-template-columns: minmax(0,.76fr) minmax(0,1.24fr);
  gap: 7px;
  align-items: stretch;
}
body.page-recursos .epqa-catalog-actions__open,
body.page-recursos .epqa-catalog-actions__download,
body.page-recursos .epqa-catalog-actions__locked {
  display: inline-flex;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  padding: 8px 7px;
  border-radius: 11px;
  font-size: 11.2px;
  font-weight: 900;
  line-height: 1.25;
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
body.page-recursos .epqa-catalog-actions__open {
  color: #1758c8 !important;
  background: #eef5ff;
  border: 1px solid #bdd4ff;
}
body.page-recursos .epqa-catalog-actions__download {
  color: #fff !important;
  background: linear-gradient(115deg,#6e47e8,#5034cd);
  border: 1px solid #6944dd;
  box-shadow: 0 6px 12px rgba(77,53,173,.12);
}
body.page-recursos .epqa-catalog-actions__locked {
  color: #244a83 !important;
  background: #edf3fd;
  border: 1px solid #cbdaf1;
}
body.page-recursos .epqa-catalog-actions__detail {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 25px;
  color: #2055a5 !important;
  font-size: 11.3px;
  font-weight: 850;
  text-decoration: none;
}
body.page-recursos .epqa-catalog-actions__detail:hover {text-decoration:underline}
body.page-recursos .epqa-catalog-actions__open:focus-visible,
body.page-recursos .epqa-catalog-actions__download:focus-visible,
body.page-recursos .epqa-catalog-actions__detail:focus-visible {
  outline: 3px solid #3391ed;
  outline-offset: 2px;
}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  body.page-recursos .epqa-catalog-actions__open:hover,
  body.page-recursos .epqa-catalog-actions__download:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 20px rgba(49,75,156,.15);
  }
}
@media (max-width:370px) {
  body.page-recursos .epqa-catalog-actions__primary { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion:reduce) {
  body.page-recursos .epqa-catalog-actions__open,
  body.page-recursos .epqa-catalog-actions__download {transition:none !important;}
}

/* Prevent legacy .resource-actions a gradient/clip-path from obscuring new controls.
   Each action has a readable foreground with its own deliberate background. */
body.page-recursos .epqa-resource-card .resource-actions.epqa-catalog-actions a.epqa-catalog-actions__open {
  clip-path:none !important;
  background:#eaf2ff !important;
  color:#154f9c !important;
  border:1px solid #bad2f9 !important;
  border-radius:11px !important;
  box-shadow:none !important;
  margin:0 !important;
  text-shadow:none !important;
  opacity:1 !important;
}
body.page-recursos .epqa-resource-card .resource-actions.epqa-catalog-actions a.epqa-catalog-actions__download {
  clip-path:none !important;
  background:linear-gradient(115deg,#6845d8,#4c32b9) !important;
  color:#fff !important;
  border:1px solid #5539c5 !important;
  border-radius:11px !important;
  margin:0 !important;
  text-shadow:none !important;
  opacity:1 !important;
}
body.page-recursos .epqa-resource-card .resource-actions.epqa-catalog-actions a.epqa-catalog-actions__detail {
  clip-path:none !important;
  background:transparent !important;
  color:#1753a8 !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  margin:0 !important;
  padding:6px 4px !important;
  text-shadow:none !important;
  opacity:1 !important;
  line-height:1.35;
}
body.page-recursos .epqa-resource-card .resource-actions.epqa-catalog-actions a.epqa-catalog-actions__locked {
  clip-path:none !important;
  background:#ecf3ff !important;
  border:1px solid #ccddf4 !important;
  border-radius:11px !important;
  color:#194c87 !important;
  margin:0 !important;
  text-shadow:none !important;
}
body.page-recursos .epqa-resource-card .resource-meta span.epqa-catalog-grade-label{
  color:#184c9b !important;
}
body.page-recursos .epqa-resource-card .resource-meta span.epqa-catalog-multigrade-label{
  color:#0e7b58 !important;
}

/* PHASE MOBILE 2026: all enhancements are scoped to phone/tablet widths.
   Desktop at >=1200px continues using the preexisting exact design. */
.epqa-mobile-facets-toggle{display:none}
@media (max-width:1199.98px) {
  /* Dashboard: act first. Suppress decorative road without hiding learning routes. */
  body.page-dashboard .home-stem--dashboard{padding-bottom:10px;}
  body.page-dashboard .home-stem--dashboard .home-stem-shell {
    width:min(100%,1100px);padding:14px clamp(12px,2.5vw,22px) 12px;
    border-radius:0;box-shadow:none;min-height:0;
  }
  body.page-dashboard .home-stem--dashboard .stem-hero{padding:0 0 8px;}
  body.page-dashboard .home-stem--dashboard .epqa-home-question{
    font-size:clamp(1.3rem,3.9vw,2rem);line-height:1.18;margin:5px 0 8px;
  }
  body.page-dashboard .home-stem--dashboard .epqa-home-question::after{display:none;}
  body.page-dashboard .home-stem--dashboard .stem-circuit,
  body.page-dashboard .home-stem--dashboard .stem-hex,
  body.page-dashboard .home-stem--dashboard .stem-road{display:none!important;}
  body.page-dashboard .home-stem--dashboard .stem-route-grid{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;width:100%;max-width:1100px;margin:0 auto 12px;
  }
  body.page-dashboard .home-stem--dashboard .stem-route-card {
    min-width:0;min-height:0;padding:14px 12px;border-radius:16px;
    box-shadow:0 3px 13px rgba(24,56,108,.05);
  }
  body.page-dashboard .home-stem--dashboard .route-blue{order:1;}
  body.page-dashboard .home-stem--dashboard .route-purple{order:2;}
  body.page-dashboard .home-stem--dashboard .route-green{order:3;}
  body.page-dashboard .home-stem--dashboard .route-corner{display:none;}
  body.page-dashboard .home-stem--dashboard .route-copy p {font-size:.77rem;line-height:1.4;}
  body.page-dashboard .home-stem--dashboard .route-btn {
    min-width:0;min-height:44px;height:auto;
    padding:9px 12px;white-space:normal;line-height:1.25;
    clip-path:none;border-radius:11px;
  }
  body.page-dashboard .epqa-workspace{
    width:min(100%,1100px);padding:5px clamp(12px,2.5vw,22px) 18px;
  }
  body.page-dashboard .epqa-workspace__layout{grid-template-columns:1fr;gap:11px;}
  body.page-dashboard .epqa-workspace__panel{padding:14px;border-radius:16px;box-shadow:none;}
  body.page-dashboard .epqa-workspace__heading{margin-bottom:9px;}
  body.page-dashboard .epqa-workspace__shortcuts{grid-template-columns:repeat(2,minmax(0,1fr));}

  /* Library: search and real resource cards are the principal content. */
  body.page-recursos .resources-page {
    width:min(100%,1100px);padding:0 clamp(12px,2.5vw,22px);
    margin:12px auto 28px;
  }
  body.page-recursos .epqa-resources-page-title {
    font-size:clamp(1.3rem,3.8vw,1.8rem);margin:0 0 5px;
  }
  body.page-recursos .epqa-library-subtitle{font-size:.83rem;margin:0 0 12px;line-height:1.45;}
  body.page-recursos .epqa-library-intro {display:none!important;}
  body.page-recursos .resources-catalog.epqa-resources-hero {
    padding:clamp(12px,2.5vw,18px)!important;margin:0!important;
    border-radius:18px;scroll-margin-top:78px;
  }
  body.page-recursos .epqa-resources-header{
    display:flex!important;flex-direction:column;align-items:stretch!important;
    gap:9px!important;text-align:left!important;margin:0 0 10px!important;
  }
  body.page-recursos .epqa-resource-dynamic-title {
    font-size:clamp(1.17rem,2.7vw,1.5rem)!important;line-height:1.2;
  }
  body.page-recursos .epqa-resources-copy .epqa-page-subtitle {display:none;}
  body.page-recursos .epqa-resources-toolbar {
    display:flex!important;flex-wrap:wrap;justify-content:flex-start;
    align-items:stretch;gap:8px;width:100%;
  }
  body.page-recursos .epqa-resources-search{
    order:-1;flex:1 1 100%;max-width:none!important;min-width:0!important;
    min-height:46px;
  }
  body.page-recursos .epqa-resources-search input {
    width:100%;min-width:0;min-height:44px;font-size:16px;
  }
  body.page-recursos .ai-resource-launch,
  body.page-recursos .epqa-help-button{
    min-height:44px;font-size:.82rem;
  }
  body.page-recursos .resource-filters.epqa-resources-filters{
    display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;
    gap:7px!important;overflow-x:auto;-webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;padding:3px 0 9px;scrollbar-width:thin;
  }
  body.page-recursos .resource-filters.epqa-resources-filters button{
    flex:0 0 auto;min-height:44px;white-space:nowrap;
    border-radius:999px;padding:9px 14px;font-size:.8rem;
  }
  body.page-recursos .epqa-facet-row {gap:9px;align-items:stretch!important;}
  body.page-recursos .epqa-facet-row label {min-width:0;min-height:44px;}
  body.page-recursos .epqa-mobile-facets-toggle {
    display:flex;align-items:center;gap:9px;width:100%;min-height:44px;
    margin:3px 0 7px;border:1px solid #cddffa;border-radius:12px;
    background:#f2f7ff;color:#1b4d92;font-size:.85rem;font-weight:850;
    padding:9px 13px;text-align:left;
  }
  body.page-recursos .epqa-mobile-facets-chevron {margin-left:auto;transition:transform .16s ease;}
  body.page-recursos .epqa-mobile-facets-toggle[aria-expanded="true"] .epqa-mobile-facets-chevron{transform:rotate(180deg);}
  body.page-recursos.epqa-mobile-facets-ready .epqa-mobile-facets-toggle[aria-expanded="false"] + .epqa-facet-row{display:none!important;}
  body.page-recursos .epqa-facet-row select{font-size:16px;}
  body.page-recursos .resource-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;}
  body.page-recursos .epqa-resource-card{min-width:0;min-height:0;padding:14px!important;border-radius:16px;box-shadow:none;}
  body.page-recursos .epqa-resource-card h3{font-size:1rem;line-height:1.32;margin:10px 0 6px;}
  body.page-recursos .epqa-resource-card p{
    display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;
    overflow:hidden;font-size:.8rem;line-height:1.48;
  }
  body.page-recursos .epqa-resource-card .resource-meta{gap:5px;padding-top:9px;}
  body.page-recursos .epqa-resource-card .epqa-catalog-actions {gap:7px;}
  body.page-recursos .epqa-resource-card .epqa-catalog-actions__open,
  body.page-recursos .epqa-resource-card .epqa-catalog-actions__download{
    min-height:44px;font-size:.78rem;padding:9px 8px;
  }
  body.page-recursos .resources-final-message{margin-top:13px;padding:14px;border-radius:15px;}
}
@media (max-width:719.98px) {
  body.page-dashboard .home-stem--dashboard .home-stem-shell{padding:12px;}
  body.page-dashboard .home-stem--dashboard .stem-route-grid{
    grid-template-columns:1fr;gap:9px;max-width:none;
  }
  body.page-dashboard .home-stem--dashboard .stem-route-card{
    display:grid!important;grid-template-columns:52px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;gap:4px 12px!important;
    text-align:left!important;justify-items:stretch!important;
    padding:12px!important;min-height:0;
  }
  body.page-dashboard .home-stem--dashboard .route-visual{
    position:static!important;grid-column:1;grid-row:1/3;
    width:50px!important;height:50px!important;margin:0!important;border-radius:13px;
  }
  body.page-dashboard .home-stem--dashboard .route-visual img,
  body.page-dashboard .home-stem--dashboard .route-visual svg{
    width:40px!important;height:40px!important;max-width:40px!important;
  }
  body.page-dashboard .home-stem--dashboard .route-copy{
    grid-column:2;grid-row:1;min-width:0;text-align:left;
  }
  body.page-dashboard .home-stem--dashboard .route-copy h2{
    font-size:clamp(.94rem,4.3vw,1.12rem);margin:2px 0 6px;
  }
  body.page-dashboard .home-stem--dashboard .route-tag,
  body.page-dashboard .home-stem--dashboard .route-copy p{display:none;}
  body.page-dashboard .home-stem--dashboard .route-btn {
    grid-column:2;grid-row:2;align-self:start;justify-self:start;
    width:auto!important;min-height:44px!important;
    font-size:.76rem!important;margin:0;
  }
  body.page-dashboard .home-stem--dashboard .epqa-home-question{font-size:clamp(1.25rem,6vw,1.6rem);}
  body.page-dashboard .epqa-workspace{padding:3px 12px 18px;}
  body.page-dashboard .epqa-workspace__shortcuts{grid-template-columns:1fr;}
  body.page-dashboard .epqa-workspace__heading{align-items:center;}
  body.page-dashboard .epqa-workspace__resource-list{gap:7px;}
  body.page-dashboard .epqa-workspace__resource{padding:10px;min-height:50px;}
  body.page-recursos .resources-page{padding:0 10px;margin-top:11px;}
  body.page-recursos .resources-catalog.epqa-resources-hero{padding:12px!important;}
  body.page-recursos .epqa-resources-toolbar .ai-resource-launch{flex:1 1 auto;}
  body.page-recursos .epqa-resources-toolbar .epqa-help-button{flex:0 1 auto;}
  body.page-recursos .epqa-facet-row{flex-direction:column;}
  body.page-recursos .epqa-facet-row label{width:100%;flex:auto;}
  body.page-recursos #resource-clear-filters{min-height:44px;}
  body.page-recursos .resource-grid {grid-template-columns:minmax(0,1fr)!important;gap:10px!important;}
  body.page-recursos .epqa-resource-card{padding:13px!important;}
  body.page-recursos .epqa-resource-card h3 {font-size:1.01rem;}
  body.page-recursos .epqa-resource-card .epqa-catalog-actions__primary{grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);}
  body.page-recursos .resources-final-message .final-benefits{display:none;}
}
@media (max-width:360px) {
  body.page-recursos .epqa-resource-card .epqa-catalog-actions__primary{grid-template-columns:1fr;}
}
@media (prefers-reduced-motion:reduce) {
  body.page-recursos .epqa-mobile-facets-chevron{transition:none!important;}
}

/* Mobile stabilization 2026-10-14. Overrides old inline !important rules without
   modifying the desktop appearance, titles or stored resource content. */
@media (max-width:1199.98px) {
  body.page-recursos .resources-catalog .epqa-resources-search input,
  body.page-recursos .resources-catalog #resource-search {
    font-size:16px!important;
    line-height:1.4!important;
  }
  body.page-recursos .resources-catalog .epqa-resource-card h3 {
    font-size:clamp(1rem,2vw,1.18rem)!important;
    line-height:1.3!important;
    overflow-wrap:anywhere;
  }
  body.page-recursos .resources-catalog .epqa-resource-card .resource-meta span{
    font-size:12px!important;
    line-height:1.36!important;
    white-space:normal;
  }
  body.page-recursos .resources-catalog .epqa-resource-card .epqa-catalog-actions__open,
  body.page-recursos .resources-catalog .epqa-resource-card .epqa-catalog-actions__download,
  body.page-recursos .resources-catalog .epqa-resource-card .epqa-catalog-actions__locked {
    min-height:44px!important;
    font-size:.81rem!important;
    overflow-wrap:anywhere;
  }
}
@media (max-width:719.98px) {
  body.page-recursos .resources-catalog .epqa-resource-card h3{
    font-size:clamp(.98rem,4.2vw,1.12rem)!important;
    line-height:1.3!important;
  }
  body.page-recursos .resources-catalog .epqa-resources-toolbar{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:stretch!important;
    gap:8px!important;
  }
  body.page-recursos .resources-catalog .epqa-resources-search {
    order:-1!important;
    flex:1 1 100%!important;
    width:100%!important;
    max-width:100%!important;
  }
}


/* Oct 2026 · Dashboard route cards: reserve the icon's true visual space.
 * Previous layout used a 52px slot with a global 72px image, allowing
 * the illustration to collide with the heading. Desktop/tablet only;
 * the horizontal phone cards (<720px) keep their own grid layout. */
@media (min-width:720px) {
  body.page-dashboard .home-stem--dashboard .stem-route-card {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    gap:0;
    min-height:226px;
    padding:13px 15px 15px;
  }
  body.page-dashboard .home-stem--dashboard .route-visual {
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 60px;
    width:74px;
    height:60px;
    min-height:60px;
    margin:0 0 9px;
  }
  body.page-dashboard .home-stem--dashboard .route-visual :is(img,svg) {
    display:block;
    flex:0 0 auto;
    width:52px;
    height:52px;
    max-width:52px;
    max-height:52px;
    object-fit:contain;
  }
  body.page-dashboard .home-stem--dashboard .route-copy {
    width:100%;
    min-width:0;
    flex:0 0 auto;
    text-align:center;
  }
  body.page-dashboard .home-stem--dashboard .route-copy h2 {
    position:static;
    margin:0;
    font-size:clamp(1rem,1.5vw,1.15rem);
    line-height:1.25;
    overflow-wrap:break-word;
  }
  body.page-dashboard .home-stem--dashboard .route-tag {margin-top:5px;}
  body.page-dashboard .home-stem--dashboard .route-copy p {
    margin:7px auto 9px;
    line-height:1.38;
  }
  body.page-dashboard .home-stem--dashboard .route-btn {
    flex:0 0 auto;
    margin-top:auto;
    align-self:center;
  }
}

/* Inicio autenticado: navegación compacta en pantallas pequeñas. */
@media(max-width:700px){
 body.page-dashboard .home-stem--dashboard .home-stem-shell{padding:10px 12px 18px!important}
 body.page-dashboard .home-stem--dashboard .stem-hero{padding:0 2px!important}
 body.page-dashboard .home-stem--dashboard .epqa-home-question{font-size:clamp(1.35rem,5.3vw,1.8rem)!important;line-height:1.16!important;margin:4px auto 10px!important}
 body.page-dashboard .home-stem--dashboard .stem-route-grid{gap:8px!important;margin:4px auto 10px!important}
 body.page-dashboard .home-stem--dashboard .stem-route-card{min-height:0!important;padding:10px 12px 10px 60px!important;border-radius:16px!important}
 body.page-dashboard .home-stem--dashboard .route-visual{width:34px!important;height:34px!important;left:12px!important;top:50%!important;transform:translateY(-50%)!important;margin:0!important}
 body.page-dashboard .home-stem--dashboard .route-copy h2{font-size:clamp(.94rem,3.8vw,1.12rem)!important;line-height:1.22!important;margin:0 0 5px!important}
 body.page-dashboard .home-stem--dashboard .route-copy p{display:none!important}
 body.page-dashboard .home-stem--dashboard .route-btn{min-height:34px!important;height:34px!important;padding:5px 12px!important;font-size:.73rem!important;border-radius:10px!important}
 body.page-dashboard .epqa-workspace{padding-top:8px!important}
 body.page-dashboard .epqa-workspace__heading{margin-bottom:9px!important}
 body.page-dashboard .epqa-workspace__panel{padding:12px!important;border-radius:15px!important}
 body.page-dashboard .epqa-workspace__resource{min-height:47px!important;padding:8px 10px!important}
 body.page-dashboard .epqa-workspace__shortcuts{gap:5px!important;margin-top:8px!important}
 body.page-dashboard .epqa-workspace__shortcut{min-height:42px!important;padding:7px 10px!important;font-size:.8rem!important}
}


/* 2026-10 · Dashboard docente móvil: hero, una fila de 3 acciones y footer.
   No altera escritorio, portada pública ni el generador de recursos IA. */
.epqa-dashboard-mobile-actions { display:none; }
@media screen and (max-width:767.98px) {
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:clamp(6px,1.8vw,10px)!important;
    width:100%!important;
    margin:6px auto 12px!important;
  }
  body.page-dashboard .home-stem--dashboard .stem-route-grid,
  body.page-dashboard .home-stem--dashboard .epqa-workspace,
  body.page-dashboard .home-stem--dashboard .stem-road,
  body.page-dashboard .home-stem--dashboard .stem-modules,
  body.page-dashboard .home-stem--dashboard .stem-role-shortcuts,
  body.page-dashboard .home-stem--dashboard .stem-help-bar {
    display:none!important;
  }
  body.page-dashboard .home-stem--dashboard {
    min-height:0!important;
    padding:0 0 10px!important;
  }
  body.page-dashboard .home-stem--dashboard .home-stem-shell {
    width:100%!important;
    min-height:0!important;
    padding:18px 14px 17px!important;
    border-radius:0!important;
  }
  body.page-dashboard .home-stem--dashboard .stem-hero {
    min-height:0!important;
    padding:0 0 10px!important;
    text-align:center!important;
  }
  body.page-dashboard .home-stem--dashboard .epqa-home-question {
    max-width:100%!important;
    margin:5px auto 9px!important;
    font-size:clamp(1.35rem,5.2vw,2rem)!important;
    line-height:1.18!important;
    text-wrap:balance;
  }
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item {
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    min-width:0!important;
    min-height:112px!important;
    padding:11px 4px!important;
    background:linear-gradient(160deg,#fff,#eaf6ff)!important;
    border:1px solid #a9d4fb!important;
    border-radius:15px!important;
    box-shadow:0 6px 19px rgba(22,77,152,.11)!important;
    color:#15396b!important;
    text-align:center!important;
    text-decoration:none!important;
    line-height:1.18!important;
    font-family:Nunito,system-ui,sans-serif!important;
    font-size:clamp(.66rem,2.9vw,.85rem)!important;
    font-weight:900!important;
    transition:transform .18s,box-shadow .18s;
    -webkit-tap-highlight-color:transparent;
  }
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item--ai {
    background:linear-gradient(160deg,#f8f1ff,#f1e8ff)!important;
    border-color:#c9a7f8!important;
    color:#6430b1!important;
  }
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item--learn {
    background:linear-gradient(160deg,#f1fff7,#e9faef)!important;
    border-color:#98dfb9!important;
    color:#127747!important;
  }
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item img {
    display:block!important;
    flex:none!important;
    width:56px!important;
    height:56px!important;
    object-fit:contain!important;
    filter:none!important;
  }
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item span {
    display:block;
    min-width:0;
    max-width:100%;
    overflow-wrap:normal;
    white-space:normal;
  }
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item:is(:hover,:focus-visible) {
    transform:translateY(-2px);
    box-shadow:0 9px 23px rgba(19,106,195,.22)!important;
  }
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item:focus-visible {
    outline:3px solid #19b9fa!important;
    outline-offset:3px!important;
  }
  html[data-theme="dark"] body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item {
    background:linear-gradient(145deg,#143d79,#0b2b61)!important;
    border-color:#4385d5!important;
    color:#f1faff!important;
    box-shadow:0 7px 19px rgba(0,11,44,.35)!important;
  }
  html[data-theme="dark"] body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item--ai {
    background:linear-gradient(145deg,#472b89,#2b2165)!important;
    border-color:#9769ed!important;
  }
  html[data-theme="dark"] body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item--learn {
    background:linear-gradient(145deg,#0c6855,#074837)!important;
    border-color:#3dd7a4!important;
  }
}
@media screen and (max-width:359.98px) {
  body.page-dashboard .home-stem--dashboard .home-stem-shell {padding-inline:10px!important;}
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions {gap:5px!important;}
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item {
    min-height:103px!important;
    font-size:.63rem!important;
  }
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item img {
    width:48px!important;height:48px!important;
  }
}
@media (prefers-reduced-motion:reduce) {
  body.page-dashboard .home-stem--dashboard .epqa-dashboard-mobile-actions__item {
    transition:none!important;
  }
}
