/*
 * Manabi Video Navi — Contrast Guard V244
 *
 * Final presentation-only color layer. It repairs text/background pairs that
 * became ambiguous when V243 changed surface brightness after older selectors
 * had already assigned a foreground color. No layout, form, iframe, canvas,
 * QR, data, permission or application-event contract is owned here.
 */

body.mnv-contrast-v244 {
  --mnv-cg-dark-bg: #041333;
  --mnv-cg-dark-surface: #0b2447;
  --mnv-cg-dark-primary: #f7fbff;
  --mnv-cg-dark-secondary: #d6e5f8;
  --mnv-cg-dark-muted: #b8cee8;
  --mnv-cg-dark-link: #80ebff;
  --mnv-cg-dark-accent: #ff9f5a;
  --mnv-cg-light-bg: #f8fbff;
  --mnv-cg-light-surface: #ffffff;
  --mnv-cg-light-primary: #071a33;
  --mnv-cg-light-secondary: #294964;
  --mnv-cg-light-muted: #405f77;
  --mnv-cg-light-link: #075cc9;
  --mnv-cg-light-accent: #9b3d00;
  --mnv-cg-focus: #20c8f4;
}

/* -------------------------------------------------------------------------
   Shared chrome: dark header/drawer and the light notification popover
   ------------------------------------------------------------------------- */

body.mnv-contrast-v244 .site-header :is(.brand-text strong, .site-nav a, .nav-link, .nav-guide-button, .logout-inline-form button) {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244 .site-header .brand-text small,
body.mnv-contrast-v244 .site-header .guest-pill {
  color: var(--mnv-cg-dark-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244 .site-header .nav-cta,
body.mnv-contrast-v244 .site-header .site-nav-area .nav-actions :is(.nav-cta, .button.primary) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244 .notification-menu-panel {
  background: #fff !important;
  color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244 .notification-menu-panel :is(h1, h2, h3, strong, a) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244 .notification-menu-panel :is(p, small, time) {
  color: var(--mnv-cg-light-muted) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244 .notification-menu-panel li a {
  background: #eef5fc !important;
  color: var(--mnv-cg-light-primary) !important;
}

/* Wide desktop navigation is not the dark mobile drawer. Pair its pill
   foreground and background explicitly instead of inheriting one side only. */
@media screen and (min-width: 1801px) {
  body.mnv-contrast-v244.public-app:is(.shell-public, .shell-auth) .site-header .site-nav :is(a, .nav-guide-button),
  body.mnv-contrast-v244.public-app:is(.shell-public, .shell-auth) .site-header .nav-actions :is(.nav-link, .logout-inline-form button) {
    border-color: rgba(126, 203, 255, .26) !important;
    background: rgba(5, 27, 62, .82) !important;
    color: var(--mnv-cg-dark-primary) !important;
    -webkit-text-fill-color: currentColor !important;
  }

  body.mnv-contrast-v244.public-app:is(.shell-public, .shell-auth) .site-header .site-nav :is(a, .nav-guide-button):is(:hover, :focus-visible),
  body.mnv-contrast-v244.public-app:is(.shell-public, .shell-auth) .site-header .nav-actions :is(.nav-link, .logout-inline-form button):is(:hover, :focus-visible) {
    border-color: rgba(91, 224, 255, .68) !important;
    background: #103c70 !important;
    color: #fff !important;
  }
}

/* -------------------------------------------------------------------------
   V243 homepage: every dark act receives light copy explicitly
   ------------------------------------------------------------------------- */

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-hero-copy,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-hero-stage,
body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .mnv-v243-manifesto,
  .mnv-v243-impact,
  .mnv-v243-proof,
  .koto-pain-section,
  .koto-scenes-section,
  .homepage-trust-section,
  .koto-flow-section,
  .koto-experience-section,
  .brand-film-section,
  .mnv-v243-organization-scene,
  .koto-final-cta
) {
  color: var(--mnv-cg-dark-primary) !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-hero-copy :is(h1, h2, h3, h4),
body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .mnv-v243-manifesto,
  .mnv-v243-impact,
  .mnv-v243-proof,
  .koto-pain-section,
  .koto-scenes-section,
  .homepage-trust-section,
  .koto-flow-section,
  .koto-experience-section,
  .brand-film-section,
  .mnv-v243-organization-scene,
  .koto-final-cta
) :is(.koto-section-heading, .conversion-section-heading, .koto-flow-copy, .mnv-v243-display-copy) :is(h1, h2, h3, h4, strong) {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-hero-promise,
body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .mnv-v243-manifesto,
  .mnv-v243-impact,
  .mnv-v243-proof,
  .koto-pain-section,
  .koto-scenes-section,
  .homepage-trust-section,
  .koto-flow-section,
  .koto-experience-section,
  .brand-film-section,
  .mnv-v243-organization-scene,
  .koto-final-cta
) :is(.koto-section-heading, .conversion-section-heading, .koto-flow-copy, .mnv-v243-manifesto-copy, .mnv-v243-horizon-scene > div:last-child) > p {
  color: var(--mnv-cg-dark-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .mnv-v243-manifesto,
  .mnv-v243-impact,
  .koto-pain-section,
  .koto-scenes-section,
  .homepage-trust-section,
  .koto-flow-section,
  .koto-experience-section,
  .brand-film-section,
  .mnv-v243-organization-scene,
  .koto-final-cta
) :is(.koto-section-heading, .conversion-section-heading, .koto-flow-copy) > span,
body.mnv-contrast-v244.public-app.shell-public.page-index .mnv-v243-display-copy em,
body.mnv-contrast-v244.public-app.shell-public.page-index .mnv-v243-manifesto-facts li b {
  color: var(--mnv-cg-dark-accent) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .mnv-v243-manifesto-copy h2 small {
  color: var(--mnv-cg-dark-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

/* Critical headline text never depends on transparent gradient clipping. */
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-hero-solution :is(em, strong) {
  background: none !important;
  color: #ffb15f !important;
  -webkit-text-fill-color: #ffb15f !important;
  text-shadow: 0 5px 28px rgba(0, 0, 0, .52) !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-hero-bridge,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-hero-bridge > span,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-audience-scope,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-audience-scope strong,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-audience-scope li,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-trust-row span {
  color: var(--mnv-cg-dark-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .mnv-v243-section-meta,
  .mnv-v243-act-label,
  .mnv-v243-hero-code,
  .mnv-v243-sequence,
  .mnv-v243-hero-field > span,
  .mnv-v243-hero-index,
  .mnv-v243-kinetic-rail
) {
  color: #c6daf0 !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: .9 !important;
}

/* -------------------------------------------------------------------------
   Homepage light acts and light cards: dark text is explicit
   ------------------------------------------------------------------------- */

body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .koto-learning-range-section,
  .koto-features-section,
  .koto-support-section
) {
  color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .koto-learning-range-section,
  .koto-features-section,
  .koto-support-section
) :is(.koto-section-heading, .koto-learning-range-intro) :is(h1, h2, h3, h4, strong) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .koto-learning-range-section,
  .koto-features-section,
  .koto-support-section
) :is(.koto-section-heading, .koto-learning-range-intro) > p {
  color: var(--mnv-cg-light-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .koto-learning-range-section,
  .koto-features-section,
  .koto-support-section
) :is(.koto-section-heading, .koto-learning-range-intro) > span {
  color: var(--mnv-cg-light-accent) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .koto-learning-range-grid > article,
  .koto-feature-grid > article,
  .koto-pain-grid > article,
  .koto-experience-track > article,
  .koto-scene-grid > article,
  .koto-role-grid > article,
  .homepage-trust-grid > article,
  .org-path-card,
  .homepage-faq details,
  .mnv-v243-impact-grid > *
) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .koto-learning-range-grid > article,
  .koto-feature-grid > article,
  .koto-pain-grid > article,
  .koto-experience-track > article,
  .koto-scene-grid > article,
  .koto-role-grid > article,
  .homepage-trust-grid > article,
  .org-path-card,
  .homepage-faq details,
  .mnv-v243-impact-grid > *
) :is(h1, h2, h3, h4, strong, summary, label) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .koto-learning-range-grid > article,
  .koto-feature-grid > article,
  .koto-pain-grid > article,
  .koto-experience-track > article,
  .koto-scene-grid > article,
  .koto-role-grid > article,
  .homepage-trust-grid > article,
  .org-path-card,
  .homepage-faq details,
  .mnv-v243-impact-grid > *
) :is(p, small, .muted, li, span:not(.button):not(.status-badge)) {
  color: var(--mnv-cg-light-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index :is(
  .koto-learning-range-grid > article,
  .koto-feature-grid > article,
  .koto-pain-grid > article,
  .koto-experience-track > article,
  .koto-role-grid > article,
  .homepage-trust-grid > article,
  .org-path-card
) > span:first-child {
  color: var(--mnv-cg-light-accent) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .mnv-v243-manifesto-facts li b,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-experience-track article > b {
  color: var(--mnv-cg-light-accent) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-experience-track article:not(.is-goal) > b {
  border-color: #176a9e !important;
  color: #145c89 !important;
}

/* The learning orbit lives in a dark act, but its center and step cards are
   deliberately light surfaces. Do not let the act's white copy enter them. */
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-flow-board :is(.koto-flow-center, li) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-flow-board :is(.koto-flow-center, li) :is(strong, span) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-flow-board :is(.koto-flow-center, li) small {
  color: var(--mnv-cg-light-muted) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-flow-board li > b {
  background: #9a3412 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-flow-board li:is(.is-two, .is-four) > b {
  background: #075985 !important;
}

/* The night footer must not reuse legacy slate copy intended for white pages. */
body.mnv-contrast-v244 .site-footer {
  color: var(--mnv-cg-dark-secondary) !important;
}

body.mnv-contrast-v244 .site-footer :is(.footer-brand p, .footer-bottom, p, small) {
  color: var(--mnv-cg-dark-muted) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244 .site-footer :is(h1, h2, h3, h4, strong) {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244 .site-footer a {
  color: #cde9ff !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index :is(.brand-film-timeline span, .brand-film-dialog-foot) {
  color: var(--mnv-cg-dark-muted) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

/* -------------------------------------------------------------------------
   Search cockpit: V243 made the screen light, so every V242 white foreground
   must be remapped to the light-surface palette.
   ------------------------------------------------------------------------- */

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-device-screen,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-device-content {
  color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-device-welcome :is(span, h2),
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-search-form :is(label, legend, summary),
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-plan-options label {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-device-welcome h2 {
  background: none !important;
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-device-welcome > div > span,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-search-form > label,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-time-field legend,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .char-counter,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-guided-keywords > button > small {
  color: var(--mnv-cg-light-muted) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-search-form {
  border-color: #9bbad6 !important;
  background: #f5f9fd !important;
  color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-input-shell textarea,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-plan-options :is(input, select) {
  border-color: #7fa6c8 !important;
  background: #fff !important;
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
  caret-color: #075cc9 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-input-shell textarea::placeholder,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-plan-options :is(input, select)::placeholder {
  color: #526c82 !important;
  -webkit-text-fill-color: #526c82 !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-guided-keywords > button,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-time-pills span,
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-plan-options {
  border-color: #bfd2e2 !important;
  background: #fff !important;
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-guided-keywords > button :is(span, b, small) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-guided-keywords > button > span {
  border-color: #78a6d0 !important;
  background: #e6f2ff !important;
  color: #0754b4 !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-guided-keywords > button:is(:hover, :focus-visible, .is-selected, .is-guide-preview, .is-guide-active),
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-time-pills input:checked + span {
  border-color: #075cc9 !important;
  background: #dcecff !important;
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .first-visit-guide {
  border-color: #8ab7d8 !important;
  background: #e7f4ff !important;
  color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .first-visit-guide :is(span, strong, small, button) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .first-visit-guide > button {
  border-color: #7ca7c8 !important;
  background: #fff !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .status-badge.status-info {
  border-color: #68b99d !important;
  background: #e6f8f1 !important;
  color: #0b684b !important;
  -webkit-text-fill-color: #0b684b !important;
}

/* The cockpit app bar and the showcase remain dark. */
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .koto-appbar :is(a, strong, span),
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .cosmic-live-showcase :is(h1, h2, h3, h4, strong),
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .cosmic-preview-cards article :is(h1, h2, h3, h4, strong, b) {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .cosmic-live-showcase :is(p, small, span),
body.mnv-contrast-v244.public-app.shell-public.page-index .koto-cosmic-hero .cosmic-preview-cards article :is(p, small, span) {
  color: var(--mnv-cg-dark-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
}

/* -------------------------------------------------------------------------
   Authentication surfaces
   ------------------------------------------------------------------------- */

body.mnv-contrast-v244.public-app.shell-auth :is(.auth-card, .auth-side) :is(h1, h2, h3, label, legend, strong, li) {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-auth :is(.auth-card, .auth-side) :is(p, small, .muted) {
  color: var(--mnv-cg-dark-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-auth :is(.auth-card, .auth-side) a:not(.button):not(.google-login-button) {
  color: var(--mnv-cg-dark-link) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-auth .search-form :is(input, select, textarea) {
  border-color: #668db8 !important;
  background: var(--mnv-cg-dark-surface) !important;
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.public-app.shell-auth .search-form :is(input, select, textarea)::placeholder {
  color: var(--mnv-cg-dark-muted) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.public-app.shell-auth .google-login-button,
body.mnv-contrast-v244.public-app.shell-auth .google-login-button span {
  background: #fff !important;
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

/* -------------------------------------------------------------------------
   Learner and immersive shells: audited exceptions only. Broad panel/strong
   recoloring is deliberately avoided so answer and semantic colors survive.
   ------------------------------------------------------------------------- */

body.mnv-contrast-v244 .mnv-next-action-v243 .mnv-next-journey li {
  color: #a9c1dc !important;
}

body.mnv-contrast-v244 .mnv-next-action-v243 .mnv-next-journey li:is(.is-complete, .is-current),
body.mnv-contrast-v244 .mnv-next-action-copy > :is(strong, small) {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

/* Light learning sheets that older broad night-mode selectors can reach. */
body.mnv-contrast-v244 :is(
  .practice-ai-reading,
  .practice-ai-feedback-grid > div,
  .adaptive-plan-board,
  .adaptive-plan-metrics > div,
  .adaptive-day-row,
  .notification-menu-panel
) {
  color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244 :is(
  .practice-ai-reading,
  .practice-ai-feedback-grid > div,
  .adaptive-plan-board,
  .adaptive-plan-metrics > div,
  .adaptive-day-row,
  .notification-menu-panel
) :is(h1, h2, h3, h4, label, legend, strong, summary) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244 :is(
  .practice-ai-reading,
  .practice-ai-feedback-grid > div,
  .adaptive-plan-board,
  .adaptive-plan-metrics > div,
  .adaptive-day-row,
  .notification-menu-panel
) :is(p, small, .muted, span:not(.chip):not(.status-chip), li, time) {
  color: var(--mnv-cg-light-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244 :is(
  .practice-ai-reading,
  .practice-ai-feedback-grid > div,
  .adaptive-plan-board,
  .adaptive-plan-metrics > div,
  .adaptive-day-row
) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border-color: #8aa9c2 !important;
  background: #fff !important;
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244 :is(.adaptive-day-date, .adaptive-day-date :is(span, small, strong)) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

/* Audited light islands nested inside the dark learning cockpit. These
   selectors are intentionally exact; global span/p/strong recoloring would
   erase semantic badges and answer states. */
body.mnv-contrast-v244:is(.shell-learner, .shell-immersive) :is(
  .adaptive-alert,
  .learning-mission-grid article,
  .course-learning-outcome,
  .standard-review-context-score,
  .practice-paper-alternative,
  .practice-easy-rebuild,
  .practice-fallback-note,
  .practice-growth-note,
  .practice-finish-mark,
  .practice-complete-stats > div,
  .standard-review-result-summary > div,
  .assessment-retry-limit,
  .dekiru-diagnosis-summary > div,
  .dekiru-reroute-note,
  .dekiru-hint,
  .outcome-evidence,
  .dekiru-clarity-form,
  .standard-review-flow li,
  .standard-review-task-tags span,
  .standard-review-mastery,
  .standard-review-meta-v1324 > span,
  .standard-review-more-note,
  .standard-review-future-v1324
) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244:is(.shell-learner, .shell-immersive) :is(
  .adaptive-alert,
  .learning-mission-grid article,
  .course-learning-outcome,
  .standard-review-context-score,
  .practice-paper-alternative,
  .practice-easy-rebuild,
  .practice-fallback-note,
  .practice-growth-note,
  .practice-finish-mark,
  .practice-complete-stats > div,
  .standard-review-result-summary > div,
  .assessment-retry-limit,
  .dekiru-diagnosis-summary > div,
  .dekiru-reroute-note,
  .dekiru-hint,
  .outcome-evidence,
  .dekiru-clarity-form,
  .standard-review-flow li,
  .standard-review-task-tags span,
  .standard-review-mastery,
  .standard-review-meta-v1324 > span,
  .standard-review-more-note,
  .standard-review-future-v1324
) :is(h1, h2, h3, h4, label, legend, strong, summary, b) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244:is(.shell-learner, .shell-immersive) :is(
  .adaptive-alert,
  .learning-mission-grid article,
  .course-learning-outcome,
  .standard-review-context-score,
  .practice-paper-alternative,
  .practice-easy-rebuild,
  .practice-fallback-note,
  .practice-growth-note,
  .practice-finish-mark,
  .practice-complete-stats > div,
  .standard-review-result-summary > div,
  .assessment-retry-limit,
  .dekiru-diagnosis-summary > div,
  .dekiru-reroute-note,
  .dekiru-hint,
  .outcome-evidence,
  .dekiru-clarity-form,
  .standard-review-flow li,
  .standard-review-mastery,
  .standard-review-more-note,
  .standard-review-future-v1324
) :is(p, small, .muted, li, time) {
  color: var(--mnv-cg-light-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244:is(.shell-learner, .shell-immersive) :is(
  .dekiru-clarity-form,
  .standard-review-future-v1324
) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border-color: #8aa9c2 !important;
  background: #fff !important;
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

/* Muted legacy colors that sit directly on dark learning panels. */
body.mnv-contrast-v244:is(.shell-learner, .shell-immersive) :is(.metric-cell .metric-text span, .watch-info-list span) {
  color: var(--mnv-cg-dark-muted) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244:is(.shell-learner, .shell-immersive) .today-video-choice-body b {
  color: #ffbe87 !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-practice_lab .practice-hints > button :is(span, b) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-practice_lab .practice-finish-mark {
  color: #814800 !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-practice_lab .notice.warning,
body.mnv-contrast-v244.page-practice_lab .notice.warning :is(h1, h2, h3, p, small, span, strong) {
  color: #684200 !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.page-practice_lab .learning-carryover,
body.mnv-contrast-v244.page-practice_lab .learning-carryover h2 {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-practice_lab .learning-carryover :is(blockquote, footer) {
  color: var(--mnv-cg-light-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-practice_lab .learning-carryover > span {
  color: #075cc9 !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-practice_lab .practice-source-strip > span,
body.mnv-contrast-v244.page-dekiru_review .standard-review-future time {
  color: var(--mnv-cg-dark-link) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-dekiru_route .dekiru-step-label {
  color: #0c55b3 !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-dekiru_route .dekiru-reason strong {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-dekiru_review .standard-review-state-icon.is-complete {
  color: #0b8064 !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-dekiru_review .standard-review-state-icon.is-warning {
  color: #a94408 !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-diagnostic .diagnostic-safe-note,
body.mnv-contrast-v244.page-diagnostic .diagnostic-safe-note strong {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-diagnostic .diagnostic-safe-note p {
  color: var(--mnv-cg-light-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.page-diagnostic .diagnostic-error,
body.mnv-contrast-v244.page-diagnostic .diagnostic-error :is(h1, h2, h3, p, small, strong, span) {
  color: #84251f !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

/* -------------------------------------------------------------------------
   Child/family, organization and administration
   ------------------------------------------------------------------------- */

body.mnv-contrast-v244:is(.shell-child, .shell-family) main.shell-container,
body.mnv-contrast-v244:is(.shell-child, .shell-family) :is(.child-today-board, .child-today-task, .child-assignment-card, .child-home-quick-nav > a, .family-hero, .family-child-card, .family-add-child, .guardian-ring-card, .guardian-week-card, .guardian-plan-card, .guardian-activity-calendar, .guardian-skill-insights > div) {
  color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244:is(.shell-child, .shell-family) :is(.child-today-board, .child-today-task, .child-assignment-card, .child-home-quick-nav > a, .family-hero, .family-child-card, .family-add-child, .guardian-ring-card, .guardian-week-card, .guardian-plan-card, .guardian-activity-calendar, .guardian-skill-insights > div) :is(h1, h2, h3, h4, label, legend, strong) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244:is(.shell-child, .shell-family) :is(.child-today-board, .child-today-task, .child-assignment-card, .child-home-quick-nav > a, .family-hero, .family-child-card, .family-add-child, .guardian-ring-card, .guardian-week-card, .guardian-plan-card, .guardian-activity-calendar, .guardian-skill-insights > div) :is(p, small, .muted, time) {
  color: var(--mnv-cg-light-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.shell-child .child-home-hero :is(h1, h2, h3, p, small, span, strong) {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.shell-child .child-search-recovery :is(.child-search-recovery-copy h1, .child-search-recovery-copy h2, .child-search-recovery-copy h3, .child-search-recovery-copy p, .child-search-technical-note) {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.shell-child .child-search-error-card :is(h1, h2, h3, p, small, strong),
body.mnv-contrast-v244.shell-child .child-search-error-card .child-search-technical-note {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

body.mnv-contrast-v244.shell-child .child-search-error-card :is(p, small, .child-search-technical-note) {
  color: var(--mnv-cg-dark-secondary) !important;
}

body.mnv-contrast-v244.shell-child .child-search-recovery .child-search-recovery-copy p,
body.mnv-contrast-v244.shell-child .child-search-recovery .child-search-technical-note {
  color: var(--mnv-cg-dark-secondary) !important;
}

body.mnv-contrast-v244.organization-app .org-sidebar :is(.org-brand, .org-switcher, .org-nav a, h1, h2, h3, p, small, span, strong) {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.organization-app.page-index .org-main :is(.org-page-head, .org-kpi, .org-card) :is(h1, h2, h3, h4, label, legend, strong) {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.organization-app.page-index .org-main :is(.org-page-head, .org-kpi, .org-card) :is(p, small, .muted, span:not(.org-status), time) {
  color: var(--mnv-cg-dark-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.organization-app:not(.page-index) .org-main,
body.mnv-contrast-v244.organization-app:not(.page-index) :is(.org-card, .org-kpi, .org-page-head, .org-empty) {
  color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244.organization-app:not(.page-index) :is(.org-card, .org-kpi, .org-page-head, .org-empty) :is(h1, h2, h3, h4, label, legend, strong) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.organization-app:not(.page-index) :is(.org-card, .org-kpi, .org-page-head, .org-empty) :is(p, small, .muted, span:not(.org-status), time) {
  color: var(--mnv-cg-light-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.shell-admin :is(.admin-topbar, .admin-sidebar, .admin-page-head, .admin-card, .kpi-card) :is(h1, h2, h3, h4, label, legend, strong, a) {
  color: var(--mnv-cg-dark-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244.shell-admin :is(.admin-topbar, .admin-sidebar, .admin-page-head, .admin-card, .kpi-card) :is(p, small, .muted, span:not(.chip):not(.status-chip), time) {
  color: var(--mnv-cg-dark-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
}

/* -------------------------------------------------------------------------
   Semantic messages use opaque backgrounds so scenery cannot reduce contrast
   ------------------------------------------------------------------------- */

body.mnv-contrast-v244.shell-public :is(.alert.info, .org-notice.info),
body.mnv-contrast-v244.shell-reading :is(.alert.info, .org-notice.info),
body.mnv-contrast-v244.shell-ops :is(.alert.info, .org-notice.info) {
  border-color: #8bb8dc !important;
  background: #e7f4ff !important;
  color: #123f68 !important;
}

body.mnv-contrast-v244.shell-public :is(.alert.warning, .org-notice.warning),
body.mnv-contrast-v244.shell-reading :is(.alert.warning, .org-notice.warning),
body.mnv-contrast-v244.shell-ops :is(.alert.warning, .org-notice.warning) {
  border-color: #d7a94d !important;
  background: #fff4d8 !important;
  color: #684200 !important;
}

body.mnv-contrast-v244.shell-public :is(.alert.error, .org-notice.error),
body.mnv-contrast-v244.shell-reading :is(.alert.error, .org-notice.error),
body.mnv-contrast-v244.shell-ops :is(.alert.error, .org-notice.error) {
  border-color: #d58d98 !important;
  background: #fff0f2 !important;
  color: #762333 !important;
}

body.mnv-contrast-v244.shell-public :is(.alert.success, .org-notice.success),
body.mnv-contrast-v244.shell-reading :is(.alert.success, .org-notice.success),
body.mnv-contrast-v244.shell-ops :is(.alert.success, .org-notice.success) {
  border-color: #73b99f !important;
  background: #e7f8f1 !important;
  color: #0b5e45 !important;
}

body.mnv-contrast-v244:is(.shell-auth, .shell-learner, .shell-immersive, .shell-admin) :is(.alert.info, .org-notice.info),
body.mnv-contrast-v244.organization-app.page-index :is(.alert.info, .org-notice.info) {
  background: #0d365f !important;
  color: #e0f1ff !important;
}

body.mnv-contrast-v244:is(.shell-auth, .shell-learner, .shell-immersive, .shell-admin) :is(.alert.warning, .org-notice.warning),
body.mnv-contrast-v244.organization-app.page-index :is(.alert.warning, .org-notice.warning) {
  background: #443311 !important;
  color: #ffe8b5 !important;
}

body.mnv-contrast-v244:is(.shell-auth, .shell-learner, .shell-immersive, .shell-admin) :is(.alert.error, .org-notice.error),
body.mnv-contrast-v244.organization-app.page-index :is(.alert.error, .org-notice.error) {
  background: #481927 !important;
  color: #ffd4dc !important;
}

body.mnv-contrast-v244:is(.shell-auth, .shell-learner, .shell-immersive, .shell-admin) :is(.alert.success, .org-notice.success),
body.mnv-contrast-v244.organization-app.page-index :is(.alert.success, .org-notice.success) {
  background: #0b3c31 !important;
  color: #c4f6e2 !important;
}

body.mnv-contrast-v244 :is(.alert, .org-notice, .mode-banner, .system-announcement, .maintenance-inline-banner) :is(h1, h2, h3, p, span, small, strong, a) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

/* Standalone operational pages are intentionally light. */
body.mnv-contrast-v244:is(.maintenance-page, .page-offline, .page-setup) {
  background: var(--mnv-cg-light-bg) !important;
  color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244:is(.maintenance-page, .page-offline, .page-setup) :is(.maintenance-panel, .future-status-panel, .setup-safe-main, .panel) {
  background: #fff !important;
  color: var(--mnv-cg-light-primary) !important;
}

body.mnv-contrast-v244:is(.maintenance-page, .page-offline, .page-setup) :is(.maintenance-panel, .future-status-panel, .setup-safe-main, .panel) :is(h1, h2, h3, h4, label, legend, strong) {
  color: var(--mnv-cg-light-primary) !important;
  -webkit-text-fill-color: currentColor !important;
}

body.mnv-contrast-v244:is(.maintenance-page, .page-offline, .page-setup) :is(.maintenance-panel, .future-status-panel, .setup-safe-main, .panel) :is(p, small, .muted) {
  color: var(--mnv-cg-light-secondary) !important;
  -webkit-text-fill-color: currentColor !important;
}

/* The light mobile dashboard must win over shared dark learner rules. */
@media (max-width: 680px) {
  body.mnv-contrast-v244.shell-learner.page-mypage main.shell-container,
  body.mnv-contrast-v244.shell-learner.page-mypage :is(.today-learning-card, .stat-card, .next-card, .route-card-s, .dash-side .side-card, .panel:not(.dash-greet), .mobile-mypage-menu) {
    color: var(--mnv-cg-light-primary) !important;
  }

  body.mnv-contrast-v244.shell-learner.page-mypage :is(.today-learning-card, .stat-card, .next-card, .route-card-s, .dash-side .side-card, .panel:not(.dash-greet), .mobile-mypage-menu) :is(h1, h2, h3, h4, label, strong, a:not(.button)) {
    color: var(--mnv-cg-light-primary) !important;
    -webkit-text-fill-color: currentColor !important;
  }

  body.mnv-contrast-v244.shell-learner.page-mypage :is(.today-learning-card, .stat-card, .next-card, .route-card-s, .dash-side .side-card, .panel:not(.dash-greet), .mobile-mypage-menu) :is(p, small, .muted, span:not(.chip):not(.status-chip), time) {
    color: var(--mnv-cg-light-secondary) !important;
    -webkit-text-fill-color: currentColor !important;
  }
}

@media (forced-colors: active) {
  body.mnv-contrast-v244,
  body.mnv-contrast-v244 :is(.panel, .card, .side-card, .auth-card, .org-card, .admin-card, .koto-section, .mnv-v243-manifesto, .mnv-v243-impact) {
    color: CanvasText !important;
    forced-color-adjust: auto;
  }

  body.mnv-contrast-v244 a { color: LinkText !important; }
}

@media print {
  body.mnv-contrast-v244,
  body.mnv-contrast-v244 :is(.panel, .card, .side-card, .auth-card, .org-card, .admin-card, .koto-section) {
    background: #fff !important;
    color: #111827 !important;
    text-shadow: none !important;
  }
}
