/* MLV V20 Phase 1 HF8 — final acceptance contrast owner.
 * This dedicated late asset supersedes cumulative HF5/HF6/HF7 contrast overrides
 * without changing mobile navigation, layout geometry, forms or business behavior.
 * Desktop-only because the remaining live evidence was captured at >=1181px and
 * Admin mobile is frozen for Phase 1 acceptance. */
@media (min-width:1181px){
  /* Public Home — light cream/ivory surfaces only. */
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .hero.hero-v4 .eyebrow,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .hero.hero-v4 .trust-row span,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .journey-platform .eyebrow,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .journey-platform .platform-feature-grid>article>span,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .category-section>.section-heading .eyebrow,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .experience-section>.section-heading .eyebrow,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .home-hotels-section>.section-heading .eyebrow,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .home-hotel-body .eyebrow,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .home-hotel-meta span,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .featured-reviews>.section-heading .eyebrow,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .featured-reviews footer :is(strong,small),
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .featured-reviews .review-public-date-v1632,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .site-header .brand :is(strong,small),
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .site-header .client-account-link span,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .site-header .theme-toggle small{
    color:#493126!important;
    opacity:1!important;
  }

  /* Category cards are image-backed. The opaque copy backing guarantees real
     contrast regardless of the uploaded photograph underneath. */
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .category-card>span{
    background:#2f211a!important;
    color:#fff8f0!important;
  }
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .category-card>span :is(small,strong,em){
    color:#fff8f0!important;
    opacity:1!important;
    text-shadow:none!important;
  }

  /* Client / Travel Agent command center — Moroccan Ivory light cards. */
  html[data-theme="light"][data-app-theme="moroccan-ivory"] body.account-page.account-home-page .client-command-center :is(small,.eyebrow),
  html[data-theme="light"][data-app-theme="moroccan-ivory"] body.account-page.account-home-page .client-command-footer{
    color:#3a281f!important;
    opacity:1!important;
  }
  html[data-theme="light"][data-app-theme="moroccan-ivory"] body.account-page .mlv-notification-badge.is-empty{
    color:#3a281f!important;
    background:#f1e5d8!important;
    opacity:1!important;
  }

  /* Undo HF7's over-broad Admin small-text override. Computed inheritance lets
     text on dark panels stay light and text on light panels inherit dark ink. */
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page .admin-topbar small,
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page .admin-main small{
    color:inherit!important;
    opacity:1!important;
  }

  /* Payments — known light helper surfaces receive explicit dark ink after the
     inheritance reset above. Protected payments.php remains byte-identical. */
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page .admin-main :is(
    .payment-test-form,
    .payment-setup,
    .payment-status-heading,
    .fx-market-status,
    .fx-market-warning,
    .fx-card-rate,
    .v132-fx-studio,
    .v13-context-status,
    .v13-currency-grid,
    .v13-currency-card,
    .admin-form-grid,
    .admin-subpanel,
    .gateway-card,
    .provider-card
  ) small,
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page .admin-main label>small{
    color:#3f3547!important;
    opacity:1!important;
  }
}


/* MLV V20 Phase 2 Candidate 1 R1 — live-verification contrast acceptance.
 * Scope is presentation-only. It closes only selectors observed by the live
 * browser Observatory after Candidate 1 installation. Desktop-only preserves
 * the frozen Admin/mobile and Candidate 14 mobile workspace contracts. */
@media (min-width:1181px){
  /* Travel Agent B2B / commissions — current-MLV light ivory surfaces. */
  html[data-theme="light"][data-app-theme="current-mlv"] body.account-page :is(
    .agent-booking-studio,
    .agent-panel,
    .agent-booking-list,
    .agent-commission-meta,
    .agent-privacy-note,
    .agent-commission-summary,
    .agent-commission-pagination
  ) small{
    color:#493126!important;
    opacity:1!important;
  }

  /* System & Updates — known light cards/forms only. */
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.system-updates-page :is(
    .system-installed-version,
    .system-status-card,
    .system-field-grid,
    .system-check-card,
    .system-inspection-pass,
    .system-security-gate,
    .system-action-card
  ) small{
    color:#3f3547!important;
    opacity:1!important;
  }

  /* Booking list/detail light surfaces. */
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page .stat-grid small,
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page .admin-table small,
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page .admin-table .table-new,
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page .booking-title>div>p,
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page :is(
    .detail-panel,
    .action-panel,
    .booking-timeline,
    .configuration-list,
    .event-list,
    .event-timeline
  ) small{
    color:#3f3547!important;
    opacity:1!important;
  }
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page .admin-table .table-new{
    background:#e8dcf3!important;
  }

  /* Diagnostics light cards: exact Observatory warning family from C1 live verification. */
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page :is(
    #health-score-truth,
    #database,
    #errors,
    #repairs,
    #repair-history,
    .health-checks,
    .health-formula-card,
    .diagnostic-group,
    .diagnostic-matrix,
    .diagnostic-row,
    .diagnostic-summary,
    .health-empty,
    .theme-qa-note
  ) :is(p,small,summary){
    color:#3f3547!important;
    opacity:1!important;
  }
  html[data-theme="light"][data-app-theme="obsidian-glass"] body.admin-page .health-severity.severity-warning{
    color:#38291e!important;
    background:#f1dfb7!important;
    opacity:1!important;
  }

  /* Travel Agents admin dark title copy was measured at 4.4:1; use the
     existing light-ink family with sufficient margin above 4.5:1. */
  html[data-theme="dark"][data-app-theme="obsidian-glass"] body.admin-page .admin-title>div>p,
  html[data-theme="dark"][data-app-theme="obsidian-glass"] body.admin-page .admin-title .eyebrow{
    color:#eee8f4!important;
    opacity:1!important;
  }
}


/* MLV V20 Phase 2 Candidate 1 R2 — semantic theme-tooltip contrast ownership.
 * Live C1R1 verification reduced 14 failures to 8; every remaining current
 * observation was the unclassed <small> inside a desktop theme toggle.
 * Earlier broad small-text acceptance rules overrode the tooltip's inverse
 * palette (and, on Admin, its hidden-until-hover opacity). This restores the
 * original semantic tooltip contract only. No geometry or business behavior. */
@media (min-width:1181px){
  html[data-theme="light"] body.account-page .account-actions .theme-toggle>small,
  html[data-theme="light"] body.admin-page .admin-header-actions .theme-toggle>small,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .site-header .theme-toggle>small{
    color:var(--cream)!important;
    opacity:0!important;
  }
  html[data-theme="light"] body.account-page .account-actions .theme-toggle:hover>small,
  html[data-theme="light"] body.account-page .account-actions .theme-toggle:focus-visible>small,
  html[data-theme="light"] body.admin-page .admin-header-actions .theme-toggle:hover>small,
  html[data-theme="light"] body.admin-page .admin-header-actions .theme-toggle:focus-visible>small,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .site-header .theme-toggle:hover>small,
  html[data-theme="light"] body:not(.admin-page):not(.account-page) .site-header .theme-toggle:focus-visible>small{
    color:var(--cream)!important;
    opacity:1!important;
  }
}

/* MLV V20 Phase 2 Candidate 6 — current visual-contrast closure.
 * Scope is color/opacity only for the five current Observatory observations
 * captured after C5R1. No layout, mobile controller, booking, Hotel, finance,
 * commission, refund, payout, MLV Credit or Phase 3 behavior is changed. */
html[data-theme="light"][data-app-theme="current-mlv"] body.account-page.account-home-page .client-command-center :is(
  .client-command-welcome h1>span,
  .client-command-kpis strong,
  .client-department-open span
){
  color:#7b5918!important;
  opacity:1!important;
}
html[data-theme="light"][data-app-theme="current-mlv"] body.account-page.agent-studio-page .agent-booking-studio :is(
  .agent-studio-progress,
  .agent-studio-stage-shell,
  .agent-studio-summary
) small{
  color:#5f554a!important;
  opacity:1!important;
}
html[data-theme="light"][data-app-theme="moroccan-ivory"] body:not(.admin-page):not(.account-page) .hotel-market-layout p.eyebrow{
  color:#a6532d!important;
  opacity:1!important;
}
html[data-theme="light"][data-app-theme="moroccan-ivory"] body:not(.admin-page):not(.account-page) .hotel-search-bar button{
  color:var(--ui-accent-contrast,#fffaf3)!important;
}


/* MLV V20 Phase 2 Candidate 6 R1 — live selector-ownership contrast closure.
 * C6 live evidence proved the Hotel owners but showed three remaining selector
 * ownership gaps: Travel Agent overview KPI text, the floating Agent navigation
 * helper label on Booking Studio, and the portal-login transition span.
 * Color/opacity only. No geometry, navigation controller or business behavior. */
html[data-theme="light"] body.account-page.account-home-page :is(.client-command-kpis,.agent-kpis) article :is(strong,span){
  color:#5a4010!important;
  opacity:1!important;
}
html[data-theme="light"] body.account-page.agent-studio-page .account-floating-nav>header small,
html[data-theme="light"] body.account-page.agent-studio-page .agent-booking-studio small,
html[data-theme="light"] body.account-page.agent-studio-page .agent-studio-activity small{
  color:#4f463e!important;
  opacity:1!important;
}
html[data-theme="light"] body :is(.portal-login-choice,.portal-mode-switch) span{
  color:#514840!important;
  opacity:1!important;
}
