/* METODICAMENTE · capa final de paleta clara
   Papel descansado, azul funcional y rojo institucional breve. */
:root {
  --light-paper: #ffffff;
  --light-surface: #ffffff;
  --light-soft: #ffffff;
  --light-blue-pale: #dceaf5;
  --light-ink: #142238;
  --light-ink-soft: #44546a;
  --light-muted: #647084;
  --light-blue: #225ba6;
  --light-blue-deep: #173f78;
  --light-red: #c04a50;
  --light-red-deep: #832e35;
  --light-line: #d7e0e9;
  --light-line-strong: #bdcad7;
  --light-shadow: 0 18px 48px rgba(20, 34, 56, .09);

  /* Azul charrua: mas limpio y vivo que el azul grisaceo anterior. */
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-soft: #ffffff;
  --ink: #142238;
  --ink-soft: #44546a;
  --muted: #647084;
  --blue: #225ba6;
  --blue-deep: #173f78;
  --blue-pale: #dce9f7;
  --red: #c04a50;
  --red-deep: #832e35;
  --line: #d7e0e9;
  --line-strong: #bdcad7;
  --signature-blue: #225ba6;
  --signature-red: #a65a5f;
}

/* Superficie deliberadamente oscura dentro del mapa de capacidades. */
body:not([class]) .level-reading :where(h3,b,strong) { color: #fff !important; }
body:not([class]) .level-reading > p,
body:not([class]) .level-reading .level-reading__bridge > p { color: #d5e0eb !important; }
body:not([class]) .level-reading :where(.panel-label,label) { color: #a9c7df !important; }
body:not([class]) .level-reading .level-reading__areas span,
body:not([class]) .level-reading > small { color: #9fb3c8 !important; }
body:not([class]) .level-reading .level-reading__actions a { color: #fff !important; }

html[data-home-theme="paper-spectrum"] {
  --paper: #ffffff;
  --bg: #ffffff;
  --surface: #ffffff;
  --s: #ffffff;
  --ink: #142238;
  --ink-2: #44546a;
  --ink-3: #647084;
  --sp-blue: #225ba6;
  --violet-ink: #173f78;
  --blue-ink: #173f78;
  scroll-padding-top: 90px !important;
}

/* Bloqueo cromatico autorizado: el plano dominante es blanco real. */
@media screen {
  html,
  html body,
  html body[class],
  html[data-site-theme] body {
    background-color: #fff !important;
  }

  body.math-landing .portal-hero,
  body.linguistica-landing .hero,
  body.psychology-landing .psy-hero {
    background: #fff !important;
  }
}

@media screen {
  html body main .platform-lock .platform-lock-actions a.platform-lock-primary {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }
  html,
  html body,
  html[data-site-theme] body,
  html body[class],
  html body:not([class]) {
    background: var(--light-paper) !important;
    color: var(--light-ink) !important;
  }
  html[data-site-theme="unified"] body.unified-site {
    background: var(--light-paper) !important;
    background-image: none !important;
  }

  /* Landing: hasta las demostraciones visuales permanecen dentro del papel. */
  html[data-site-theme="unified"] body.page-home .hero-compass {
    border-color: var(--light-line-strong) !important;
    background: var(--light-surface) !important;
    box-shadow: var(--light-shadow) !important;
  }
  html[data-site-theme="unified"] body.page-home .hero-compass img {
    opacity: .9 !important;
    filter: saturate(.74) brightness(1.08) contrast(.88) !important;
  }

  /* La sala principal vuelve a ser papel: tarjetas blancas y tinta oscura. */
  html[data-site-theme="unified"] body.page-home .home-workbench {
    border-color: var(--light-line) !important;
    background: var(--light-paper) !important;
    color: var(--light-ink) !important;
  }
  html[data-site-theme="unified"] body.page-home .home-workbench .section-order {
    border-color: var(--light-red) !important;
    color: var(--light-red-deep) !important;
  }
  html[data-site-theme="unified"] body.page-home .w,
  html[data-site-theme="unified"] body.page-home .sec,
  html[data-site-theme="unified"] body.page-home #entradas,
  html[data-site-theme="unified"] body.page-home .secondary-development {
    background: var(--light-surface) !important;
  }
  html[data-site-theme="unified"] body.page-home .secondary-development {
    border-color: var(--light-line) !important;
    box-shadow: none !important;
  }
  @media (max-width: 860px) {
    html[data-site-theme="unified"] body.page-home [id] { scroll-margin-top: 82px !important; }
    html[data-site-theme="unified"] body.page-home .site-header {
      background: rgba(255,255,255,.99) !important;
      box-shadow: 0 8px 20px rgba(20,34,56,.045) !important;
    }
  }
  html[data-site-theme="unified"] body.page-home .home-workbench .serv-group-head h2,
  html[data-site-theme="unified"] body.page-home .home-workbench > .serv-works-grid .serv-card-title,
  html[data-site-theme="unified"] body.page-home .home-workbench > .serv-works-grid .serv-mini-extra-subtitle,
  html[data-site-theme="unified"] body.page-home #matematica-entrada .serv-card-title,
  html[data-site-theme="unified"] body.page-home #linguistica-entrada .serv-card-title,
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .serv-card-title,
  html[data-site-theme="unified"] body.page-home #matematica-entrada .serv-mini-extra-subtitle,
  html[data-site-theme="unified"] body.page-home #linguistica-entrada .serv-mini-extra-subtitle,
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .serv-mini-extra-subtitle,
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .serv-mini-extra-copy > em strong {
    color: var(--light-ink) !important;
  }
  html[data-site-theme="unified"] body.page-home .home-workbench .serv-group-head p,
  html[data-site-theme="unified"] body.page-home .home-workbench > .serv-works-grid .serv-mini-extra-copy > em,
  html[data-site-theme="unified"] body.page-home #matematica-entrada .serv-mini-extra-copy > em,
  html[data-site-theme="unified"] body.page-home #linguistica-entrada .serv-mini-extra-copy > em,
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .serv-mini-extra-copy > em {
    color: var(--light-ink-soft) !important;
  }
  html[data-site-theme="unified"] body.page-home .home-workbench > .serv-works-grid .serv-mini-extra-links a,
  html[data-site-theme="unified"] body.page-home #matematica-entrada .serv-mini-extra-links a,
  html[data-site-theme="unified"] body.page-home #linguistica-entrada .serv-mini-extra-links a,
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .serv-mini-extra-links a {
    border-color: var(--light-line-strong) !important;
    color: var(--light-blue-deep) !important;
  }
  html[data-site-theme="unified"] body.page-home #matematica-entrada .serv-mini-extra-links a:first-child,
  html[data-site-theme="unified"] body.page-home #linguistica-entrada .serv-mini-extra-links a:first-child,
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .serv-mini-extra-links a:first-child {
    border-color: var(--light-line-strong) !important;
    color: var(--light-blue-deep) !important;
  }
  html[data-site-theme="unified"] body.page-home #matematica-entrada .serv-mini-extra-k,
  html[data-site-theme="unified"] body.page-home #linguistica-entrada .serv-mini-extra-k,
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .serv-mini-extra-k {
    color: var(--light-red-deep) !important;
  }
  html[data-site-theme="unified"] body.page-home #matematica-entrada .serv-mini-proof span,
  html[data-site-theme="unified"] body.page-home #linguistica-entrada .serv-mini-proof span,
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .serv-mini-proof span {
    border-color: var(--light-line) !important;
    background: var(--light-blue-pale) !important;
    color: var(--light-blue-deep) !important;
  }
  html[data-site-theme="unified"] body.page-home .home-workbench > .serv-works-grid > .serv-mini-extra,
  html[data-site-theme="unified"] body.page-home #matematica-entrada,
  html[data-site-theme="unified"] body.page-home #linguistica-entrada,
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada {
    border-color: var(--light-line) !important;
    background: var(--light-surface) !important;
    box-shadow: var(--light-shadow) !important;
  }
  html[data-site-theme="unified"] body.page-home .psych-interface-proof,
  html[data-site-theme="unified"] body.page-home .sample-interface,
  html[data-site-theme="unified"] body.page-home .value-lab__result,
  html[data-site-theme="unified"] body.page-home .open-kitchen,
  html[data-site-theme="unified"] body.page-home .home-expansion-note {
    border-color: var(--light-line-strong) !important;
    background: var(--light-surface) !important;
    color: var(--light-ink) !important;
    box-shadow: 0 12px 34px rgba(20, 34, 56, .07) !important;
  }
  html[data-site-theme="unified"] body.page-home .psych-interface-proof__bar,
  html[data-site-theme="unified"] body.page-home .sample-interface__bar {
    border-color: var(--light-line) !important;
    background: var(--light-surface) !important;
    color: var(--light-blue-deep) !important;
  }
  html[data-site-theme="unified"] body.page-home .psych-interface-proof__bar > b {
    color: var(--light-red-deep) !important;
  }
  html[data-site-theme="unified"] body.page-home .psych-interface-proof__canvas,
  html[data-site-theme="unified"] body.page-home .sample-interface__canvas {
    background: radial-gradient(circle at 86% 18%, rgba(192,74,80,.07), transparent 32%), linear-gradient(145deg,#fff,#edf3f8) !important;
    color: var(--light-ink) !important;
  }
  html[data-site-theme="unified"] body.page-home .psych-interface-proof__canvas > strong,
  html[data-site-theme="unified"] body.page-home .sample-interface__canvas > strong,
  html[data-site-theme="unified"] body.page-home .open-kitchen h2,
  html[data-site-theme="unified"] body.page-home .open-kitchen h3,
  html[data-site-theme="unified"] body.page-home .open-kitchen__flow strong,
  html[data-site-theme="unified"] body.page-home .home-expansion-note strong {
    color: var(--light-ink) !important;
  }
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .psych-interface-proof__canvas > strong {
    color: var(--light-ink) !important;
  }
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .psych-door-summary {
    border-color: var(--light-line) !important;
    background: var(--light-surface) !important;
  }
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .psych-door-summary__title {
    color: var(--light-red-deep) !important;
  }
  html[data-site-theme="unified"] body.page-home #psicologicamente-entrada .psych-door-summary li {
    color: var(--light-ink-soft) !important;
  }
  html[data-site-theme="unified"] body.page-home .psych-interface-proof__canvas > em,
  html[data-site-theme="unified"] body.page-home .open-kitchen p,
  html[data-site-theme="unified"] body.page-home .open-kitchen__flow span,
  html[data-site-theme="unified"] body.page-home .open-kitchen__cases p {
    color: var(--light-ink-soft) !important;
  }
  html[data-site-theme="unified"] body.page-home .psych-interface-proof__canvas > div span,
  html[data-site-theme="unified"] body.page-home .open-kitchen__flow li,
  html[data-site-theme="unified"] body.page-home .open-kitchen__cases article {
    border-color: var(--light-line) !important;
    background: var(--light-soft) !important;
    color: var(--light-ink-soft) !important;
  }
  html[data-site-theme="unified"] body.page-home .open-kitchen__flow { background: var(--light-line) !important; }
  html[data-site-theme="unified"] body.page-home .open-kitchen a,
  html[data-site-theme="unified"] body.page-home .home-expansion-note a { color: var(--light-blue-deep) !important; }
  html[data-site-theme="unified"] body.page-home .value-lab__result strong { color: var(--light-blue-deep) !important; }
  html[data-site-theme="unified"] body.page-home .value-lab__result span { color: var(--light-ink-soft) !important; }
  html[data-site-theme="unified"] body.page-home .math-interface-proof__levels > i:first-child {
    border-color: var(--light-red) !important;
    color: var(--light-red-deep) !important;
  }

  /* Barras de pedido en páginas de servicio: claras y subordinadas. */
  body.page-academia .pedido-bar,
  body.page-data .pedido-bar {
    border-color: var(--light-line) !important;
    background: rgba(255,255,255,.97) !important;
    color: var(--light-ink) !important;
    box-shadow: 0 -12px 38px rgba(20,34,56,.10) !important;
  }
  body.page-academia .pedido-bar button,
  body.page-data .pedido-bar button { border-color: var(--light-blue-deep) !important; }

  /* MATEMÁTICA: las secciones de manifiesto y laboratorio dejan de ser franjas nocturnas. */
  body.math-landing .thinking-manifesto,
  body.math-landing .portal-lab-demo {
    border-color: var(--light-line) !important;
    background: var(--light-soft) !important;
    color: var(--light-ink) !important;
  }
  body.math-landing .thinking-manifesto h2,
  body.math-landing .thinking-manifesto .thinking-steps strong,
  body.math-landing .manifesto-close,
  body.math-landing .portal-lab-demo h2 { color: var(--light-ink) !important; }
  body.math-landing .thinking-manifesto header p,
  body.math-landing .thinking-steps p,
  body.math-landing .portal-lab-demo header p,
  body.math-landing .demo-reading,
  body.math-landing .inventory-note { color: var(--light-ink-soft) !important; }
  body.math-landing .thinking-manifesto .kicker,
  body.math-landing .thinking-steps span,
  body.math-landing .demo-control label,
  body.math-landing .demo-results strong,
  body.math-landing .demo-lab > a { color: var(--light-blue-deep) !important; }
  body.math-landing .thinking-steps,
  body.math-landing .demo-lab { border-color: var(--light-line-strong) !important; background: var(--light-surface) !important; }
  body.math-landing .thinking-steps li,
  body.math-landing .demo-results article,
  body.math-landing .demo-data span {
    border-color: var(--light-line) !important;
    background: var(--light-surface) !important;
    color: var(--light-ink) !important;
  }
  body.math-landing .demo-results span,
  body.math-landing .demo-results small { color: var(--light-muted) !important; }
  body.math-landing .site-footer {
    border-color: var(--light-line) !important;
    background: var(--light-surface) !important;
    color: var(--light-ink-soft) !important;
  }
  body.math-landing .product-footer-services-label { color: var(--light-red-deep) !important; }

  /* LENGUA: secundaria e ingresos conservan jerarquía sin bloques azul oscuro. */
  body.linguistica-landing .diagnostic-progress,
  body.linguistica-landing .section.secondary,
  body.linguistica-landing .section.admission,
  body.linguistica-landing .secondary-grid,
  body.linguistica-landing .recovery-banner,
  body.linguistica-landing .site-footer {
    border-color: var(--light-line) !important;
    background: var(--light-soft) !important;
    color: var(--light-ink) !important;
  }
  body.linguistica-landing .school-card,
  body.linguistica-landing .exam-shape,
  body.linguistica-landing .writing-focus,
  body.linguistica-landing .exam-workshop article,
  body.linguistica-landing .secondary-grid article,
  body.linguistica-landing .analysis-result {
    border-color: var(--light-line-strong) !important;
    background: var(--light-surface) !important;
    color: var(--light-ink) !important;
    box-shadow: 0 10px 30px rgba(20,34,56,.06) !important;
  }
  body.linguistica-landing .admission .section-head h2,
  body.linguistica-landing .secondary .section-head h2,
  body.linguistica-landing .school-card h3,
  body.linguistica-landing .writing-focus h3,
  body.linguistica-landing .secondary-grid h3,
  body.linguistica-landing .analysis-result strong,
  body.linguistica-landing .recovery-banner h3 { color: var(--light-ink) !important; }
  body.linguistica-landing .admission .section-head p,
  body.linguistica-landing .admission .source-note,
  body.linguistica-landing .school-card ul,
  body.linguistica-landing .exam-shape ol,
  body.linguistica-landing .writing-focus p,
  body.linguistica-landing .writing-focus ol,
  body.linguistica-landing .secondary-grid ul,
  body.linguistica-landing .secondary-grid small,
  body.linguistica-landing .recovery-banner p { color: var(--light-ink-soft) !important; }
  body.linguistica-landing .school-card header span,
  body.linguistica-landing .school-card a,
  body.linguistica-landing .writing-focus a,
  body.linguistica-landing .writing-meter,
  body.linguistica-landing .secondary-grid header > span,
  body.linguistica-landing .recovery-banner .eyebrow { color: var(--light-red-deep) !important; }
  body.linguistica-landing .recovery-banner a { border-color: var(--light-blue-deep) !important; color: var(--light-blue-deep) !important; }
  body.linguistica-landing .syntax-lab { background: var(--light-blue-pale) !important; color: var(--light-ink) !important; }
  body.linguistica-landing .syntax-lab h3 { color: var(--light-ink) !important; }
  body.linguistica-landing .analysis-buttons button { border-color: var(--light-line-strong) !important; color: var(--light-blue-deep) !important; }
  body.linguistica-landing .analysis-buttons button:hover,
  body.linguistica-landing .analysis-buttons button.active { background: var(--light-blue-deep) !important; color: #fff !important; }
  body.linguistica-landing .exam-workshop h3,
  body.linguistica-landing .expansion-board h3 { color: var(--light-ink) !important; }
  body.linguistica-landing .product-footer-services-label { color: var(--light-red-deep) !important; }

  /* PSICOLOGÍA: misma lógica editorial clara, sin convertir el portal en una franja oscura. */
  body.psychology-landing .terrain-feature,
  body.psychology-landing .routes-section,
  body.psychology-landing .case-lab__scene,
  body.psychology-landing .psy-footer {
    border-color: var(--light-line) !important;
    background: var(--light-soft) !important;
    color: var(--light-ink) !important;
  }
  body.psychology-landing .terrain-feature .section-head h2,
  body.psychology-landing .terrain-feature__footer p strong,
  body.psychology-landing .routes-section .section-head h2,
  body.psychology-landing .route-card h3,
  body.psychology-landing .case-lab__scene h3,
  body.psychology-landing .psy-footer strong { color: var(--light-ink) !important; }
  body.psychology-landing .terrain-feature .section-head p,
  body.psychology-landing .terrain-feature__footer p,
  body.psychology-landing .routes-section .section-head p,
  body.psychology-landing .route-card p,
  body.psychology-landing .case-lab__scene p,
  body.psychology-landing .psy-footer,
  body.psychology-landing .psy-footer p,
  body.psychology-landing .psy-footer small { color: var(--light-ink-soft) !important; }
  body.psychology-landing .terrain-feature .eyebrow,
  body.psychology-landing .routes-section .eyebrow,
  body.psychology-landing .route-card__tag { color: var(--light-red-deep) !important; }
  body.psychology-landing .route-card {
    border-color: var(--light-line-strong) !important;
    background: var(--light-surface) !important;
    color: var(--light-ink) !important;
    box-shadow: 0 12px 34px rgba(20,34,56,.07) !important;
  }
  body.psychology-landing .route-card li { border-color: var(--light-line) !important; background: var(--light-soft) !important; color: var(--light-ink-soft) !important; }
  body.psychology-landing .route-card .button,
  body.psychology-landing .terrain-feature .button.secondary { border-color: var(--light-blue-deep) !important; color: var(--light-blue-deep) !important; }
  body.psychology-landing .terrain-feature .button.primary { border-color: var(--light-blue-deep) !important; background: var(--light-blue-deep) !important; color: #fff !important; }
  body.psychology-landing .psy-footer a { color: var(--light-blue-deep) !important; }
  body.psychology-landing .psy-footer small { border-color: var(--light-line) !important; }

  /* Cierre coherente en portales, manuales y recorridos internos. */
  body .site-footer,
  body .psy-footer,
  body .trajectory-page .site-footer {
    border-color: var(--light-line) !important;
    background: var(--light-surface) !important;
    color: var(--light-ink-soft) !important;
  }
  body .site-footer :where(h2,h3,h4,p,strong,small,span,li),
  body .psy-footer :where(h2,h3,h4,p,strong,small,span,li) { color: var(--light-ink-soft) !important; }
  body .site-footer a,
  body .psy-footer a { color: var(--light-blue-deep) !important; }
  body .site-footer .product-footer-services-label,
  body .psy-footer .product-footer-services-label { color: var(--light-red-deep) !important; }

  /* Las franjas heredadas pasan a planos de papel, no a escenas nocturnas. */
  body .niche-section--dark,
  body .status-band,
  body .records,
  body .opening,
  body .translation,
  body .formula,
  body .school-routes,
  body .next-step,
  body .roadmap,
  body .closing-note,
  body .finder-controls,
  body .practice-recommendation {
    border-color: var(--light-line) !important;
    background: var(--light-soft) !important;
    color: var(--light-ink) !important;
  }
  body .niche-section--dark :where(h2,h3,h4,p,strong,small,span,li,label),
  body :where(.status-band,.records) :where(h2,h3,h4,p,strong,small,span,li,label),
  body :where(.opening,.translation,.formula,.school-routes,.next-step,.roadmap,.closing-note,.finder-controls,.practice-recommendation) :where(h1,h2,h3,h4,p,strong,small,span,li,label) {
    color: var(--light-ink-soft) !important;
  }
  body :where(.opening,.translation,.formula,.school-routes,.next-step,.roadmap,.closing-note,.finder-controls,.practice-recommendation) :where(h1,h2,h3,h4,strong) {
    color: var(--light-ink) !important;
  }
  body .school-grid article,
  body .route-picker,
  body .records article,
  body .finder-controls fieldset {
    border-color: var(--light-line) !important;
    background: var(--light-surface) !important;
  }

  /* Paginas heredadas: tinta oscura sobre el papel que ya estaba restaurado. */
  body main :where(.hero-title,.title,.srv-title,.serv-title,.hero-lead,.sec-intro,.serv-lead,.sit-text,.srv-desc,.serv-desc,.cs-quote) {
    color: var(--light-ink) !important;
  }
  body main :where(.hero-lead,.sec-intro,.serv-lead,.sit-text,.srv-desc,.serv-desc) { color: var(--light-ink-soft) !important; }
  body main :where(.gold,.gs,.tool,.eyebrow,.kicker) { color: var(--light-red-deep) !important; }
  body main a.activo { color: var(--light-blue-deep) !important; }
  body .nav {
    border-color: var(--light-line) !important;
    background: rgba(255,255,255,.97) !important;
    color: var(--light-ink) !important;
  }
  body .nav a { color: var(--light-blue-deep) !important; }

  body:not([class]) .brand-word { color: var(--light-ink) !important; }
  html body:not([class]) .nav .nav-btn,
  html body:not([class]) a.nav-btn,
  html body:not([class]) .nav a.activo,
  html body:not([class]) .sitio-nav a.activo,
  html body[class=""] a.nav-btn,
  html body[class=""] .nav a.activo,
  html body[class=""] .sitio-nav a.activo {
    color: var(--light-blue-deep) !important;
    -webkit-text-fill-color: var(--light-blue-deep) !important;
  }
  body:not([class]) main :where(h1,h2,h3,h4,strong,span,li,small,label) { color: var(--light-ink) !important; }
  body:not([class]) main :where(p) { color: var(--light-ink-soft) !important; }
  body:not([class]) main a:not(.btn-p):not(.primary) { color: var(--light-blue-deep) !important; }
  body:not([class]) main :where(.gold,.gs,.tool,.eyebrow,.kicker) { color: var(--light-red-deep) !important; }
  body:not([class]) main :where(button,.btn-p,.primary) :where(span,strong) { color: inherit !important; }
  body:not([class]) footer {
    border-color: var(--light-line) !important;
    background: var(--light-surface) !important;
    color: var(--light-ink-soft) !important;
  }
  body:not([class]) footer :where(h2,h3,h4,p,strong,small,span,li) { color: var(--light-ink-soft) !important; }
  body:not([class]) footer a { color: var(--light-blue-deep) !important; }

  body:has(>main>nav[aria-label="Opciones sin conexion"]),
  body:has(>main>nav[aria-label="Opciones sin conexión"]),
  body:has(>main>nav[aria-label="Opciones sin conexion"]) > main,
  body:has(>main>nav[aria-label="Opciones sin conexión"]) > main {
    border-color: var(--light-line) !important;
    background: var(--light-paper) !important;
    color: var(--light-ink) !important;
  }
  body:has(>main>nav[aria-label="Opciones sin conexion"]) > main a,
  body:has(>main>nav[aria-label="Opciones sin conexión"]) > main a { color: var(--light-blue-deep) !important; }

  body.brief-practice-page :where(h1,h2,h3,p,strong,small,span,label) { color: var(--light-ink) !important; }
  body.brief-practice-page :where(.clear-search,.clear-history) {
    border-color: var(--light-line-strong) !important;
    background: var(--light-surface) !important;
    color: var(--light-blue-deep) !important;
  }

  body .terrain-feature,
  body .routes-section {
    border-color: var(--light-line) !important;
    background: var(--light-soft) !important;
    color: var(--light-ink) !important;
  }
  body :where(.terrain-feature,.routes-section) :where(h1,h2,h3,h4,strong) { color: var(--light-ink) !important; }
  body :where(.terrain-feature,.routes-section) :where(p,li,small) { color: var(--light-ink-soft) !important; }
  body .product-footer-services-label { color: var(--light-red-deep) !important; }

  body.linguistica-landing .admission .exam-shape h3,
  body.linguistica-landing .curriculum-evidence h3 { color: var(--light-ink) !important; }

  /* Correcciones de contraste y ajuste tipografico verificadas en movil. */
  body.math-landing .portal-overview,
  body.math-landing .portal-overview p,
  body.math-landing .portal-overview .overview-lines span {
    color: var(--light-ink-soft) !important;
  }
  body.math-landing .portal-overview h2 { color: var(--light-ink) !important; }
  body.math-landing .portal-overview .overview-lines strong { color: var(--light-red-deep) !important; }
  body.math-landing .portal-overview .overview-stats span { color: var(--light-ink-soft) !important; }
  body.math-landing .portal-overview .overview-stats strong { color: var(--light-blue-deep) !important; }

  @media (max-width: 760px) {
    body.math-landing .portal-hero .hero-primary h1 {
      max-width: 100% !important;
      font-size: clamp(29px, 8.4vw, 34px) !important;
      line-height: 1 !important;
      letter-spacing: -.045em !important;
      white-space: nowrap !important;
      overflow-wrap: normal !important;
    }
    body.psychology-landing .psy-hero h1 {
      max-width: 100% !important;
      font-size: clamp(31px, 8.7vw, 38px) !important;
      line-height: .94 !important;
      letter-spacing: -.05em !important;
      white-space: normal !important;
      overflow-wrap: normal !important;
      word-break: normal !important;
    }
  }
}

@media screen {
  /* Contraste final de paneles oscuros que conviven con la capa clara. */
  html body:not([class]) main .level-reading .level-reading__actions a {
    color: #fff !important;
  }
  html body:not([class]) main .program-summary .summary-primary strong {
    color: #142238 !important;
  }
  html body:not([class]) main .program-summary .gradation-distribution span {
    color: #44546a !important;
  }

  html body:not([class]) main .program-summary .gradation-distribution b {
    color: #214e78 !important;
  }

  html body:not([class]) main .program-summary .summary-progress {
    color: #44546a !important;
  }
}

@media screen and (max-width: 760px) {
  html body:not([class]) main .program-summary .summary-primary strong {
    color: #fff !important;
  }
  html body:not([class]) main .program-summary .gradation-distribution span {
    color: #d5e0eb !important;
  }
  html body:not([class]) main .program-summary .gradation-distribution b {
    color: #a9d5f4 !important;
  }
  html body:not([class]) main .program-summary .summary-progress {
    color: #d5e0eb !important;
  }
}
