/* MISSÃO 012.4 — Contrast Shield 1.0. Scoped to the app, never wp-admin/Elementor.
 * White/light surfaces MUST use dark text independent of the active theme.
 * Explicit dark surfaces MUST use light text. Semantic notices keep their own ink.
 * Last-resort high specificity is local to Conquistei, not a global CSS reset. */
.cq-app {
 --cq-light-surface:#fff;--cq-light-ink:#172b47;--cq-light-muted:#475b74;
 --cq-light-link:#1559a9;--cq-input-ink:#142842;--cq-dark-ink:#f5f8ff;
}
.cq-app.cq-theme-dourado{--cq-light-surface:#fffdf7;--cq-light-ink:#202b3c;--cq-light-muted:#4a576d;--cq-light-link:#184f93}
.cq-app.cq-theme-metalico{--cq-light-surface:#fff;--cq-light-ink:#142742;--cq-light-muted:#435a77;--cq-light-link:#1456a9}
/* Light cards even in the metallic theme: inheritance from --cq-t-text (=white)
   used to produce white-on-white text after changing themes. */
.cq-app .cq-app-main :is(.cq-evo-stat,.cq-evo-panel,.cq-review-card,.cq-review-summary span,.cq-price-card,.cq-price-card-v2,.cq-memo-import-preview,.cq-memo-card-row,.cq-memo-decks details,.cq-memo-help,.cq-recovery-row,.cq-recovery-preview) {
 color:var(--cq-light-ink);
}
.cq-app .cq-app-main :is(.cq-evo-stat,.cq-evo-panel,.cq-review-card,.cq-review-summary span,.cq-price-card,.cq-price-card-v2,.cq-memo-import-preview,.cq-memo-card-row,.cq-memo-decks details,.cq-memo-help) :is(h2,h3,h4,h5,h6,strong,legend,label,summary){color:var(--cq-light-ink)}
.cq-app .cq-app-main :is(.cq-evo-stat,.cq-evo-panel,.cq-review-card,.cq-review-summary span,.cq-price-card,.cq-price-card-v2,.cq-memo-import-preview,.cq-memo-card-row,.cq-memo-decks details,.cq-memo-help) :is(small,.cq-evo-help,.cq-memo-disclaimer,.cq-memo-card-row>summary span){color:var(--cq-light-muted)}
.cq-app .cq-app-main :is(.cq-evo-stat,.cq-evo-panel,.cq-review-card,.cq-price-card,.cq-memo-import-preview,.cq-memo-card-row,.cq-memo-help) a:not(.cq-btn):not(.cq-action){color:var(--cq-light-link)}
/* Contrast must follow the actual surface, not the palette's generic text token.
   White form controls live inside both light and dark cards. */
.cq-app :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select){background-color:#fff;color:var(--cq-input-ink);color-scheme:light;caret-color:#132b4c}
.cq-app :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select)::placeholder{color:#50637b;opacity:1}
.cq-app :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select):disabled{background:#eef1f6;color:#48566a;opacity:1}
/* Memorize has intentionally dark theme cards, but the flashcard body and help
   blocks are independent light surfaces. Retain original ink in those areas. */
.cq-app .cq-app-main .cq-memo :is(.cq-memo-flash,.cq-memo-answer,.cq-memo-import-preview,.cq-memo-help,.cq-memo-card-row,.cq-memo-decks details){color:var(--cq-light-ink)}
.cq-app .cq-app-main .cq-memo :is(.cq-memo-flash,.cq-memo-answer,.cq-memo-import-preview,.cq-memo-help,.cq-memo-card-row,.cq-memo-decks details) :is(h3,h4,legend,label,summary){color:var(--cq-light-ink)}
/* In the metal theme, memorization card shells deliberately use DARK --cq-t-card.
   In those containers restore light ink, while white flashcards retain dark ink. */
.cq-app.cq-theme-metalico .cq-app-main .cq-memo :is(.cq-memo-panel,.cq-memo-stats>div){color:#f2f6ff}
.cq-app.cq-theme-metalico .cq-app-main .cq-memo :is(.cq-memo-panel,.cq-memo-stats>div) :is(h2,h3,h4,label){color:#f2f6ff}
.cq-app.cq-theme-metalico .cq-app-main .cq-memo :is(.cq-memo-flash,.cq-memo-answer,.cq-memo-import-preview,.cq-memo-help,.cq-memo-card-row,.cq-memo-decks details) :is(h2,h3,h4,label){color:var(--cq-light-ink)}
/* Generic demo cards in Modelo inherit theme-dependent (light OR dark) tokens;
   their own explicitly WHITE note box and textarea always use dark ink. */
.cq-app .cq-app-main .cq-modelo :is(textarea,input:not([type=checkbox]),select){background:#fff;color:var(--cq-light-ink);border-color:#9aafc9}
.cq-app .cq-app-main .cq-demo-palette span:nth-child(1){color:#143e75}
.cq-app .cq-app-main .cq-demo-palette span:nth-child(2){color:#eaf3ff}
.cq-app .cq-app-main .cq-demo-palette span:nth-child(3){color:#f1d184}
.cq-app .cq-app-main .cq-demo-palette span:nth-child(4){color:#172737}
/* Existing dark onboarding and account shells always keep white labels and copy,
   while its light informational boxes keep an explicit dark foreground. */
.cq-app .cq-app-main .cq-shell :is(.cq-note,.cq-error){color:#112844}
.cq-app .cq-app-main .cq-shell .cq-note :is(p,strong,small,a){color:#112844}
.cq-app .cq-app-main .cq-shell .cq-error :is(p,strong,small,a){color:#732d0a}
.cq-app .cq-app-main .cq-shell :is(.cq-mission,.cq-replan){color:#f5f8ff}
/* Review ratings and semantic buttons must not inherit dark card text. */
.cq-app .cq-app-main .cq-memo :is(.cq-memo-rate-1,.cq-memo-rate-2,.cq-memo-rate-3,.cq-memo-rate-4,.cq-memo-rate-5){color:#fff}
.cq-app .cq-app-main .cq-memo .cq-memo-btn{color:var(--cq-t-accent-text)}
/* Navigation dark vs light is selected by NAV surface, not page surface. */
.cq-app.cq-theme-clean .cq-nav-top a{color:#163b6f}
.cq-app.cq-theme-clean .cq-nav-top a:hover{color:#0c3979;background:#dae9ff}
.cq-app.cq-theme-clean .cq-nav-top a[aria-current=page]{color:#fff;background:#1757af}
.cq-app :is(.cq-nav-top,.cq-nav-side) a[aria-current=page] .dashicons{color:inherit}
/* Accessible focus that remains visible on white and on navy. */
.cq-app .cq-app-main :is(input,select,textarea,button,a):focus-visible{outline:3px solid #dc9f27;outline-offset:3px}
/* Narrow-screen labels and placeholder remain legible without browser zoom. */
@media(max-width:760px){.cq-app :is(input:not([type=checkbox]),textarea,select){font-size:16px;line-height:1.4}}
/* Clarify the actual background of light Memorize flashcards: text and
   surface change as one pair, never dark text on a dark inherited token. */
.cq-app .cq-app-main .cq-memo :is(.cq-memo-flash,.cq-memo-answer,.cq-memo-import-preview,.cq-memo-help,.cq-memo-card-row,.cq-memo-decks details){background-color:#f8fbff;color:#172b47}
.cq-app .cq-app-main .cq-memo :is(.cq-memo-flash,.cq-memo-answer,.cq-memo-import-preview,.cq-memo-help,.cq-memo-card-row,.cq-memo-decks details) :is(p,small,span:not(.dashicons)){color:inherit}
.cq-app .cq-app-main .cq-memo .cq-memo-flash summary{background:#19488e;color:#fff}
.cq-app.cq-theme-metalico .cq-app-main .cq-memo .cq-memo-flash summary{background:#edbf62;color:#17223a}
/* Recovery previews are pale; dark page-level type cannot be inherited here. */
.cq-app .cq-app-main :is(.cq-recovery-row,.cq-recovery-preview){color:#172b47}
.cq-app .cq-app-main :is(.cq-recovery-row,.cq-recovery-preview) :is(strong,small,label,p){color:#172b47}

/* Theme Engine Premium 5.0 — actual dark surfaces in Black must retain light ink.
 * These overrides intentionally come last because the generic shield assumes legacy white cards. */
.cq-app.cq-theme-black{--cq-light-link:#62dfff;--cq-dark-ink:#f5f8fc}
.cq-app.cq-theme-black .cq-app-main :is(.cq-evo-stat,.cq-evo-panel,.cq-evo-compare>div,.cq-evo-insight,.cq-review-card,.cq-review-summary span,.cq-recovery-row,.cq-recovery-preview,.cq-history-row,.cq-study-goal,.cq-study-summary>div,.cq-discipline-card,.cq-schedule-panel,.cq-schedule-preview,.cq-schedule-current,.cq-intelligence-panel,.cq-risk-card){color:#f5f8fc}
.cq-app.cq-theme-black .cq-app-main :is(.cq-evo-stat,.cq-evo-panel,.cq-evo-compare>div,.cq-evo-insight,.cq-review-card,.cq-review-summary span,.cq-recovery-row,.cq-recovery-preview,.cq-history-row,.cq-study-goal,.cq-study-summary>div,.cq-discipline-card,.cq-schedule-panel,.cq-schedule-preview,.cq-schedule-current,.cq-intelligence-panel,.cq-risk-card) :is(h1,h2,h3,h4,h5,h6,strong,legend,label,summary){color:#f5f8fc}
.cq-app.cq-theme-black .cq-app-main :is(.cq-evo-stat,.cq-evo-panel,.cq-evo-compare>div,.cq-evo-insight,.cq-history-row,.cq-study-goal,.cq-study-summary>div,.cq-discipline-card,.cq-schedule-panel,.cq-schedule-preview,.cq-schedule-current,.cq-intelligence-panel,.cq-risk-card) :is(p,small,span:not(.dashicons)){color:#9fb2c9}
.cq-app.cq-theme-black .cq-app-main :is(.cq-evo-stat,.cq-evo-panel,.cq-evo-insight,.cq-history-row,.cq-discipline-card,.cq-schedule-panel,.cq-schedule-preview,.cq-schedule-current,.cq-intelligence-panel,.cq-risk-card) a:not(.cq-btn):not(.cq-action){color:#62dfff}
/* Semantic badges deliberately keep their own accessible ink/background pairs. */
.cq-app.cq-theme-black .cq-app-main :is(.cq-risk-critico,.cq-risk-alto,.cq-risk-atencao,.cq-risk-controlado,.cq-risk-atenção){color:revert}
