/* Final, shared appearance layer. Keep this after all page styles.
   Theme is a presentation preference only; permissions, data and sessions stay unchanged. */
:root[data-theme] {
  --a-bg:#faf8fc; --a-surface:#ffffff; --a-soft:#f0eaf5; --a-raised:#e7ddf0;
  --a-ink:#30203e; --a-muted:#62516e; --a-line:#c9b9d5; --a-control-line:#95809f;
  --a-accent:#614078; --a-on-accent:#ffffff; --a-focus:#754391;
  --a-success:#245c40; --a-success-bg:#e5f3eb; --a-warning:#704611; --a-warning-bg:#fff0d9;
  --a-danger:#8b2d3f; --a-danger-bg:#fbe9ed; --a-disabled:#e9e3ee; --a-disabled-ink:#675771;
  --a-inverse:#352544; --a-on-inverse:#fbf7ff; --a-inverse-muted:#e2d4ed;
  --a-shadow:0 12px 36px #35254412;
}
:root[data-theme=dark] {
  --a-bg:#19121f; --a-surface:#271d31; --a-soft:#35283f; --a-raised:#453350;
  --a-ink:#f4edf9; --a-muted:#d2c2dd; --a-line:#665173; --a-control-line:#9c81ac;
  --a-accent:#d3b0ec; --a-on-accent:#291735; --a-focus:#e5c2ff;
  --a-success:#a9e5c3; --a-success-bg:#203c2d; --a-warning:#ffda9e; --a-warning-bg:#49351e;
  --a-danger:#ffb5c4; --a-danger-bg:#492632; --a-disabled:#382c41; --a-disabled-ink:#cbbbd6;
  --a-shadow:0 12px 36px #0003;
}
/* Bridge every generation of the visual system to the same color pairs. */
:root[data-theme], html[data-theme] body {
  --bl-bg:var(--a-bg); --bl-paper:var(--a-surface); --bl-soft:var(--a-soft); --bl-ink:var(--a-ink); --bl-muted:var(--a-muted); --bl-line:var(--a-line);
  --v-ink:var(--a-ink); --v-muted:var(--a-muted); --v-line:var(--a-line);
  --r-card:var(--a-surface); --r-wash:var(--a-soft); --r-text:var(--a-ink); --r-muted:var(--a-muted); --r-line:var(--a-line);
  --tx-bg:var(--a-bg); --tx-card:var(--a-surface); --tx-ink:var(--a-ink); --tx-muted:var(--a-muted); --tx-soft:var(--a-soft); --tx-line:var(--a-line); --tx-current:var(--a-accent); --tx-done:var(--a-success);
  --ink:var(--a-ink); --muted:var(--a-muted); --soft:var(--a-muted); --paper:var(--a-bg); --line:var(--a-line); --stroke:var(--a-line);
}
html[data-theme] body { background:var(--a-bg)!important; color:var(--a-ink)!important; }
html[data-theme] body :is(h1,h2,h3,h4,h5,h6,legend) { color:var(--a-ink)!important; }
html[data-theme] body :is(p,small,label,dt,dd,li,figcaption) { color:inherit; }
html[data-theme] body :is(.muted,.quiet,.source,.source-note,.field-hint,.account-footnote,.employee-number,.list-summary,.report-time,.report-reference,.unverified,.scope-note,.lab-disclosure,.feature-note,.hero-meta,.brand-shortcuts,.entry-note,.bottle-caption small,.chapter-number,.practice-instruction,.practice-top>span,.account-header p,.route-heading p,.setup-shell p,.report-intro,.login-intro,.overline,.eyebrow,.practice-eyebrow,.entry-kicker,.portal-kicker,.company-eyebrow) { color:var(--a-muted)!important; }
html[data-theme] body :is(a,button,input,select,textarea,summary) { -webkit-tap-highlight-color:transparent; }
html[data-theme] body :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline:3px solid var(--a-focus)!important; outline-offset:3px!important; }
html[data-theme] ::selection { background:var(--a-accent); color:var(--a-on-accent); }
/* Solid navigation and dialogs prevent content behind them from competing with text. */
html[data-theme] :is(.site-nav,.site-nav .site-links,.site-links.open,.center-header,.access-header,.entry-header,body:has(#bottle)>header,.controls,.review-mobile-nav,.review-honor-nav,.tabs) { background:var(--a-surface)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] :is(.site-brand,.site-brand small,.site-links a,.site-links.open a,.center-header a,.access-header a,.entry-header a,.review-mobile-nav a,.review-honor-nav a,.tabs a,.back,.brand,.brand small) { color:var(--a-ink)!important; }
html[data-theme] .site-links a:is(:hover,[aria-current=page]), html[data-theme] .review-mobile-nav a[aria-current] { background:var(--a-soft)!important; border-color:var(--a-accent)!important; }
html[data-theme] :is(.menu-toggle,.bl-theme-toggle,.platform-search-open,.search-close,.close-button,.dialog-head button,.reading-tools button,.utility-row button,.favorite-button,.review-tools button,.review-tools a,.review-control) { background:var(--a-soft)!important; color:var(--a-ink)!important; border:1px solid var(--a-control-line)!important; }
html[data-theme] .bl-theme-toggle { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; min-width:44px; min-height:44px; border-radius:50%; padding:0; margin:0; font:24px/1 Arial,sans-serif; cursor:pointer; }
.theme-toolbar { display:flex; justify-content:flex-end; max-width:1180px; margin:12px auto; padding:0 20px; }
html[data-theme] :is(dialog,.platform-search-dialog,.platform-search-results,.platform-search-result) { background:var(--a-surface)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] dialog { max-height:calc(100dvh - 32px); overflow:auto; overscroll-behavior:contain; }
html[data-theme] dialog::backdrop { background:#120b1cd1; }
html[data-theme] :is(dialog,.platform-search-dialog) :is(p,span,small,a,label,legend,li,b,strong) { color:inherit; }
html[data-theme] .platform-search-dialog a { color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] .platform-search-dialog a:hover { background:var(--a-soft)!important; }
html[data-theme] .platform-search-dialog small { color:var(--a-muted)!important; }
/* Card and secondary surfaces, including client-rendered learning/admin content. */
html[data-theme] body :is(.card,.panel,.course,.path-card,.home-card:not(.featured),.perfume-card,.catalog-tool,.filter-bar,.stage-card,.staff-card,.lesson-tile,.metric-box,.metric,.quick-help,.utility-row,.platform-context,.platform-updates,.my-shortcuts,.account-tabs,.cycle-bar,.module,.quick,.honor-panel,.news-card,.opening-card,.home-film,.assessment-note,.record-detail,.team-filters,.form-card,.login-card,.access-card,.entry-layout,.entry-panel,.auth-panel,.report-card,.empty-state,.guided-lesson,.lesson,.calculator,.results,.journey-panel,.hub-card,.portal-group,.company-section,.manager-invite,.training-path,.program-map,.program-boundary,.program-doors>a,.reference-grid>a,.training-flow,.workflow-panel,.product-card,.persona-card,.conversation,.receipt,.monthly-summary-card,.board,.ranking-card,.news-item,.summary-grid article,.review-home-news,.review-formal-grid article,.review-drawer,.review-destination:not(.lead),#practiceQuiz) {
  background:var(--a-surface)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important;
}
html[data-theme] body :is(.card,.panel,.course,.path-card,.home-card:not(.featured),.perfume-card,.catalog-tool,.stage-card,.staff-card,.lesson-tile,.metric,.quick-help,.platform-context,.platform-updates,.module,.quick,.honor-panel,.news-card,.opening-card,.home-film,.record-detail,.form-card,.access-card,.entry-panel,.auth-panel,.report-card,.empty-state,.guided-lesson,.lesson,.calculator,.results,.journey-panel,.hub-card,.portal-group,.company-section,.manager-invite,.training-path,.program-map,.program-boundary,.program-doors>a,.reference-grid>a,.product-card,.persona-card,.conversation,.receipt,.monthly-summary-card,.board,.ranking-card,.news-item,.review-destination:not(.lead),#practiceQuiz) :is(p,small,b,strong,label,legend,span,li,summary,dt,dd) { color:inherit; }
html[data-theme] body :is(.hero,.hero-copy,.portal-hero,.home-hero,.academy-hero,.pyramid-entrance,.review-destination.journey,.lab-feature,.video-feature,.training-note,.tour-panel,.program-doors>a:first-child,.region-card,.shift-panel,.example-panel,.guided-answer,.quote-box,.scenario-box,.practice-intro aside,.practice-option,.practice-domain-grid article,.answer-option,.order-answer,.ratings label,.scope-check,.quiz-question label,.calendar-item,.staff-scores>span,.activation-details,.activation-code,.next-task,.data-quality,.cycle-list article,.training-flow__step,.workflow-card,.reflection-card,.lab-coach,.bubble.customer,.bubble.employee,.shift-results article,.shift-message,.tour-steps li,.notes li,.actual,.explain blockquote,.review-practice,.review-note,.saved-links a,.conversation-preview span,.company-values span,.role-switch,.account-tabs,.lab-tabs,.catalog-tabs,.filter-bar,.intent-bar a,.notes-steps article) { background:var(--a-soft)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] body :is(.hero,.hero-copy,.portal-hero,.home-hero,.academy-hero,.pyramid-entrance,.lab-feature,.video-feature,.training-note,.tour-panel,.region-card,.shift-panel,.example-panel,.guided-answer,.quote-box,.scenario-box,.practice-intro aside,.practice-option,.practice-domain-grid article,.answer-option,.ratings,.quiz-question,.calendar-item,.staff-scores,.activation-details,.next-task,.data-quality,.cycle-list,.reflection-card,.lab-coach,.bubble,.shift-results,.shift-message,.tour-steps,.notes,.actual,.explain,.review-practice,.review-note,.conversation-preview,.company-values) :is(p,small,b,strong,label,legend,span,li,em) { color:inherit!important; }
html[data-theme] body :is(.portal-card h3,.portal-card p,.portal-card strong,.home-siyaj h2,.home-siyaj p,.region-intro h2,.region-intro p,.tour-copy h2,.tour-copy p,.chapter p,.intro p,.intro h1,.intro em,.bottle-caption,.bottle-caption span,.receipt-line,.receipt-total,.product-price,.stepper output,.staff-stage,.report-description,.audit-item,.audit-item b,.audit-item time,.branch-list li,.member-row small,.followup-count b,.report-credit,.practice-percent,.lab-bottom,.lab-bottom a,.return-link,.cancel-link,.text-link,.path-link,.tour-action,.access-options a,.activation-code,.lesson-number,.guided-lesson legend,#lessonFeedback) { color:var(--a-ink)!important; }
html[data-theme] body :is(.portal-icon,.hub-icon,.ui-icon,.product-glyph,.stage-index,.role-tag,.lesson-number,.orbit-word,.hero-orbit .orbit-word,.tour-steps b) { background:var(--a-raised)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] body :is(.portal-card,.portal-card:hover) { border-color:var(--a-line)!important; }
html[data-theme] :is(.company-story,.formal-door,.entry-hero,.lab-hero,.employee-welcome,.manager-tasks,.command-deck,.next-step,.sales-tip,.journey-callout,.review-destination.lead,.story,.home-card.featured,.quiz,.review-ribbon,.review-compare-tray,.review-toast,.toast,.board-link,.result) {
  background:var(--a-inverse)!important; color:var(--a-on-inverse)!important; border-color:#8c719e!important;
}
html[data-theme] :is(.company-story,.formal-door,.entry-hero,.lab-hero,.employee-welcome,.manager-tasks,.command-deck,.next-step,.sales-tip,.journey-callout,.review-destination.lead,.story,.home-card.featured,.quiz,.review-ribbon,.review-compare-tray,.review-toast,.toast,.board-link,.result) :where(h1,h2,h3,h4,p,small,span,b,strong,label,legend,em,li,.overline,.eyebrow,.portal-kicker,.company-eyebrow) { color:var(--a-on-inverse)!important; }
html[data-theme] :is(.company-story,.formal-door,.entry-hero,.lab-hero,.employee-welcome,.manager-tasks,.command-deck,.next-step,.story) p { color:var(--a-inverse-muted)!important; }
html[data-theme] .role-door:not(.employee-door) { background:#ffffff12!important; color:var(--a-on-inverse)!important; }
html[data-theme] .employee-door, html[data-theme] .employee-door :is(h2,p,b,strong,span) { background:var(--a-surface)!important; color:var(--a-ink)!important; }
html[data-theme] .lab-bottle, html[data-theme] .lab-bottle :is(b,strong,span) { color:#30203e!important; }
html[data-theme] .scriptbox { background:var(--a-soft)!important; color:var(--a-ink)!important; }
html[data-theme] .scriptbox :is(h3,p,small) { color:var(--a-ink)!important; }
html[data-theme] .home-siyaj { background:var(--a-surface)!important; }
html[data-theme] .company-copy blockquote { color:inherit!important; }
html[data-theme] .site-footer, html[data-theme] .site-footer :is(p,a,strong) { background:var(--a-bg)!important; color:var(--a-muted)!important; border-color:var(--a-line)!important; }
/* Inputs are readable before, during and after editing, also outside main/dialogs. */
html[data-theme] body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea) { background:var(--a-surface)!important; color:var(--a-ink)!important; border-color:var(--a-control-line)!important; caret-color:var(--a-accent); }
html[data-theme] body :is(input,textarea)::placeholder { color:var(--a-muted)!important; opacity:1; }
html[data-theme] body option { background:var(--a-surface); color:var(--a-ink); }
html[data-theme] body input:is([type=radio],[type=checkbox]), html[data-theme] body progress { accent-color:var(--a-accent); }
html[data-theme] body input:-webkit-autofill { -webkit-text-fill-color:var(--a-ink)!important; -webkit-box-shadow:0 0 0 1000px var(--a-surface) inset!important; caret-color:var(--a-ink); }
/* Every button has a complete foreground/background pair; selected states are explicit. */
html[data-theme] body :is(button,.secondary,.ghost,.secondary-button,.portal-secondary,.button.secondary,.hub-button.outline,.reply-choice,.guided-answer,.answer,.tab,.chip,.badge,.status-pill) { background:var(--a-soft)!important; color:var(--a-ink)!important; border-color:var(--a-control-line)!important; }
html[data-theme] body :is(button,.p-button,.button,.primary,.secondary,.portal-primary,.portal-secondary) :is(span,b,strong,small) { color:inherit!important; }
html[data-theme] body :is(.p-button,.button:not(.secondary),.primary,.calcbtn,.academy,.portal-primary,button[type=submit],.review-formal-actions button) { background:var(--a-accent)!important; color:var(--a-on-accent)!important; border-color:var(--a-accent)!important; }
html[data-theme] body :is(.secondary-button,.p-button.secondary-button,.p-button.secondary,.p-button.ghost) { background:var(--a-soft)!important; color:var(--a-ink)!important; border-color:var(--a-control-line)!important; }
html[data-theme] body :is(button[aria-pressed=true],button[aria-selected=true],.account-tabs button.active,.view-switch button.active,.phase-selector button.active,.question-nav button.active,.catalog-tabs a[aria-current],.journey-tabs .step.active,.tabs a:hover,.tabs a:focus-visible,.reading-tools button[aria-pressed=true]) { background:var(--a-accent)!important; color:var(--a-on-accent)!important; border-color:var(--a-accent)!important; }
html[data-theme] body :is(.practice-option:has(input:checked),.answer-option:has(input:checked),.ratings label:has(input:checked),.quiz-question label:has(input:checked),.guided-answer[aria-pressed=true]) { background:var(--a-raised)!important; border-color:var(--a-accent)!important; color:var(--a-ink)!important; box-shadow:inset -3px 0 var(--a-accent); }
html[data-theme] body :is(.journey-tabs .step.active,.training-flow__step.current) span { background:var(--a-accent)!important; color:var(--a-on-accent)!important; }
html[data-theme] body :is(button:disabled,input:disabled,select:disabled,textarea:disabled,[aria-disabled=true]) { background:var(--a-disabled)!important; color:var(--a-disabled-ink)!important; border-color:var(--a-line)!important; opacity:1!important; cursor:not-allowed; }
html[data-theme] body :is(button:disabled,[aria-disabled=true]) :is(strong,small,span) { color:inherit!important; }
/* Success, warning and error colors remain distinct in either theme. */
html[data-theme] body :is(.status.good,.status.resolved,.badge.good,.feedback-box:not(.error),.account-alert.success,.practice-feedback.is-correct,.answer-option.correct,.answer.correct,.journey-track li.done,.budget-ok,.check-item:not(.needs-work) b) { background:var(--a-success-bg)!important; color:var(--a-success)!important; border-color:var(--a-success)!important; }
html[data-theme] body :is(.status.warn,.status.in_progress,.draft-banner,.privacy-notice,.privacy-note,.center-alert,.preview-banner,.practice-feedback.is-wrong,.feedback-box.error,.coach-feedback.is-rethink,.check-item.needs-work b) { background:var(--a-warning-bg)!important; color:var(--a-warning)!important; border-color:var(--a-warning)!important; }
html[data-theme] body :is(.status.low,.practice-error,.review-error,.account-alert:not(.success),#dialogAlert,#setupError,.shift-error,.answer-option.wrong,.answer.wrong) { background:var(--a-danger-bg)!important; color:var(--a-danger)!important; border-color:var(--a-danger)!important; }
html[data-theme] body :is(.budget-over,#feedback,#message) { color:var(--a-danger)!important; }
html[data-theme] body :is(.feedback-box,.account-alert,.practice-feedback,.draft-banner,.privacy-notice,.privacy-note,.center-alert,.practice-error,.review-error,.status,.answer-option.correct,.answer-option.wrong) :is(p,small,span,b,strong) { color:inherit!important; }
html[data-theme] .journey-track li.current { background:var(--a-accent)!important; color:var(--a-on-accent)!important; }
html[data-theme] body :is(.status,.badge,.status-pill) { border:1px solid var(--a-line); }
/* Tables retain a distinct header, row boundaries and local horizontal scrolling. */
html[data-theme] body table { background:var(--a-surface)!important; color:var(--a-ink)!important; }
html[data-theme] body :is(th,td) { color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] body th { background:var(--a-soft)!important; }
html[data-theme] body td { background:var(--a-surface)!important; }
html[data-theme] body tr:nth-child(even) td, html[data-theme] .compare-table tr.review-different td { background:var(--a-soft)!important; }
html[data-theme] .before-after td:last-child { background:var(--a-success-bg)!important; color:var(--a-success)!important; }
html[data-theme] body :is(.table-wrap,.table-scroll) { max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
html[data-theme] .monthly-winner-1 { background:var(--a-raised)!important; color:var(--a-ink)!important; }
html[data-theme] .monthly-medal { background:var(--a-accent)!important; color:var(--a-on-accent)!important; }
html[data-theme] :is(.podium article,.monthly-person,.monthly-winner,.daily-person) { background:var(--a-soft)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
/* Layout safety without changing visibility or navigation state. */
html[data-theme] body :is(main,section,article,aside,fieldset,.nav-inner,.dialog-top,.dialog-head,.account-header,.platform-context,.portal-card>div,.region-card,.entry-panel,.report-card) { min-width:0; }
html[data-theme] body :is(p,h1,h2,h3,h4,label,legend,.portal-card,.region-card,.member-row,.report-reference,.dialog-top) { overflow-wrap:break-word; }
html[data-theme] body :is(button,.p-button,.button,.primary,.secondary,.portal-primary,.portal-secondary,.hub-button) { max-width:100%; white-space:normal; line-height:1.6; }
html[data-theme] body :is(input,select,textarea) { max-width:100%; }
html[data-theme] .platform-context { flex-wrap:wrap; gap:10px; }
html[data-theme] .platform-context nav { min-width:0; flex-wrap:wrap; }
@media(max-width:1200px) {
  html[data-theme] .site-nav .wrap.nav-inner { display:grid!important; grid-template-columns:minmax(0,1fr) 44px 44px 44px; align-items:center; gap:8px; padding-block:12px; }
  html[data-theme] .site-nav .site-brand { grid-column:1; grid-row:1; min-width:0; white-space:normal; padding:0; border:0; }
  html[data-theme] .site-nav .bl-theme-toggle { grid-column:2; grid-row:1; }
  html[data-theme] .site-nav .platform-search-open { grid-column:3; grid-row:1; width:44px; min-width:44px; height:44px; padding:0; }
  html[data-theme] .site-nav .menu-toggle { display:block!important; grid-column:4; grid-row:1; margin:0; width:44px; height:44px; padding:0; min-width:44px; }
  html[data-theme] .site-nav .site-links { display:none!important; grid-column:1/-1; width:100%; margin:0; }
  html[data-theme] .site-nav .site-links.open { display:grid!important; position:static!important; inset:auto!important; grid-template-columns:repeat(2,minmax(0,1fr)); max-height:55dvh; overflow-y:auto; padding:8px; gap:4px; }
  html[data-theme] .site-nav .site-links a { white-space:normal; min-width:0; padding:10px; font-size:14px; }
}
@media(max-width:700px) {
  html[data-theme] body :is(.access-header,.entry-header,.center-header) { flex-wrap:wrap; gap:12px; }
  html[data-theme] body :is(.access-header,.entry-header,.center-header)>a:first-child { min-width:0; flex:1 1 50%; }
  html[data-theme] body :is(.account-header,.route-top,.section-head,.dialog-top,.dialog-head,.command-deck__top) { flex-wrap:wrap; }
  html[data-theme] body :is(.dialog-actions,.dialog-footer,.question-nav,.account-actions) { flex-wrap:wrap; gap:10px; }
  html[data-theme] body :is(dialog,.platform-search-dialog) { width:calc(100% - 24px); padding:20px 16px; }
  html[data-theme] body :is(.input-grid,.metric-grid,.ratings,.summary-grid,.shift-results,.practice-domain-grid) { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  html[data-theme] body :is(.journey-tabs,.account-tabs,.lab-tabs,.catalog-tabs) { position:relative; top:auto; max-width:100%; flex-wrap:wrap; }
  html[data-theme] .journey-tabs { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; overflow:visible; }
  html[data-theme] .journey-tabs .step { width:100%; min-width:0; }
  html[data-theme] .review-honor-nav, html[data-theme] .tabs { position:relative; top:auto; }
  html[data-theme] :is(.toast,.review-toast) { bottom:100px; max-width:calc(100% - 24px); }
  html[data-theme] .command-deck__ring { width:100px; height:100px; }
}
@media(max-width:420px) {
  html[data-theme] body :is(.input-grid,.ratings,.shift-results,.order-answer,.summary-grid) { grid-template-columns:minmax(0,1fr)!important; }
  html[data-theme] .nav-inner .site-brand__text { font-size:11px; }
  html[data-theme] .nav-inner .site-brand small { font-size:10px; }
  html[data-theme] .nav-inner .site-brand__logo { width:22px; }
  html[data-theme] .account-page .field-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  html[data-theme] .account-page .field-row>:first-child { grid-column:1/-1; }
}
@media print {
  :root[data-theme] { color-scheme:light!important; --a-bg:#fff; --a-surface:#fff; --a-soft:#f1edf4; --a-raised:#f1edf4; --a-ink:#24172f; --a-muted:#51435c; --a-line:#a99ab5; --a-control-line:#756383; --a-accent:#49305f; --a-on-accent:#fff; --a-focus:#49305f; --a-success:#205b3c; --a-success-bg:#ecf7ee; --a-warning:#70450e; --a-warning-bg:#fff4df; --a-danger:#9c263d; --a-danger-bg:#fff0f2; --a-disabled:#eeeaf1; --a-disabled-ink:#5c5065; --a-inverse:#fff; --a-on-inverse:#24172f; --a-inverse-muted:#51435c; }
  html[data-theme] body :is(button,a.p-button,.status,.new-badge,.ticker-row>span,.rank,.monthly-seal,.daily-total) { color:#24172f!important; background:#fff!important; }
  .bl-theme-toggle,.theme-toolbar { display:none!important; }
}
/* Legacy learning components and narrow comparison-table cards. */
html[data-theme] body :is(.formula,.steps .step,.calcbox,.details details,.details .inside,.compare article,.note-flow,.checklist div,.scenario,.note,.kpi-card,.kpi-input-group,.kpi-input-group.secondary-group,.example,.insight,#reportStatus) { background:var(--a-soft)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] body :is(.formula,.steps .step,.calcbox,.details,.compare article,.note-flow,.checklist,.scenario,.note,.kpi-card,.kpi-input-group,.example,.insight) :is(p,b,strong,span,small,li,summary) { color:inherit!important; }
html[data-theme] body :is(.tip,.compare article:last-child) { background:var(--a-inverse)!important; color:var(--a-on-inverse)!important; }
html[data-theme] body :is(.tip,.compare article:last-child) :is(p,b,strong,span,small,h3) { color:inherit!important; }
html[data-theme] body :is(.num,.stage-number) { background:var(--a-raised)!important; color:var(--a-ink)!important; }
html[data-theme] body .input-error { color:var(--a-danger)!important; }
html[data-theme] body .dialog-top, html[data-theme] body .comparison-table.mobile-cards tr { background:var(--a-surface)!important; color:var(--a-ink)!important; }
html[data-theme] body .comparison-table.mobile-cards td:before { color:var(--a-muted)!important; }
html[data-theme] .account-page .impact-report { color:var(--a-ink)!important; }
/* Fine-grained nested surfaces verified against rendered page fixtures. */
html[data-theme] body :is(.portal-arrow,.quick-help a,.platform-context a,.review-drawer>summary,.side-link,.brand-word,.brand-ar,.original,.original span,.updated,.section-title>span,.home-siyaj>div>a,.course em) { color:var(--a-ink)!important; }
html[data-theme] body :is(.status:not(.good):not(.warn):not(.low):not(.resolved):not(.in_progress),.tabs a,.note-flow>*,.monthly-kind,.atv-single,.sales-line) { background:var(--a-soft)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] body :is(.monthly-showcase,.monthly-grid,.monthly-tabs,.champions-archive,.champions-record,.board-head,.leader,.rest>*,.daily-empty,.legacy-story,.gusto-story) { background:var(--a-surface)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] body :is(.rank,.monthly-seal,.daily-total) { color:#291735!important; }
html[data-theme] body :is(.rank,.monthly-seal,.daily-total) :is(b,strong,small,span) { color:inherit!important; }
html[data-theme] body :is(.honor-intro,.monthly-hero,.daily-heading,.news-ticker,.nakhlah-copy,.siyaj-story,.opening-copy) { background:var(--a-inverse)!important; color:var(--a-on-inverse)!important; }
html[data-theme] body :is(.honor-intro,.monthly-hero,.daily-heading,.news-ticker,.nakhlah-copy,.siyaj-story,.opening-copy) :is(h1,h2,h3,p,small,strong,b,span,.eyebrow) { color:inherit!important; }
html[data-theme] body :is(.skip,.platform-skip) { background:var(--a-surface)!important; color:var(--a-ink)!important; }
html[data-theme] body:has(#bottle)>footer { color:var(--a-muted)!important; }
html[data-theme] body :is(.champions-record span,.leader-score b,.upcoming-heading>span) { color:var(--a-ink)!important; }
html[data-theme] body :is(.rest li,.scent-tags span,.product-spec span,.pair-tip) { background:var(--a-soft)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] body .pair-tip :is(b,p,span,small) { color:inherit!important; }
html[data-theme] body .ticker-row>span { background:var(--a-accent)!important; color:var(--a-on-accent)!important; }
html[data-theme] .floating-perfume { color-scheme:inherit; --ink:var(--a-ink); --muted:var(--a-muted); --paper:var(--a-surface); background:var(--a-surface)!important; color:var(--a-ink)!important; }
html[data-theme] .floating-perfume :is(.scent-component,.note-cards li) { background:var(--a-soft)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] .floating-perfume :is(.selection-label,.panel-eyebrow,.panel-caption,.component-footer,.verification) { color:var(--a-muted)!important; }
html[data-theme] .floating-perfume .layer,html[data-theme] .floating-perfume .layer[aria-pressed=true] { background:transparent!important; border:0!important; }
html[data-theme] body:has(#bottle) #journey { background:var(--a-soft)!important; }
html[data-theme] body:has(#bottle) .intro { background:var(--a-bg)!important; }
html[data-theme] body .news-ticker .ticker-row>span { color:var(--a-on-accent)!important; }
html[data-theme] body .collection-members { background:var(--a-soft)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
html[data-theme] body .collection-members :is(b,p,a) { color:inherit!important; }
html[data-theme] body .site-footer span { color:var(--a-muted)!important; }
html[data-theme] body :is(.steps .step>span,.new-badge,.review-honor-nav a:first-child) { background:var(--a-accent)!important; color:var(--a-on-accent)!important; }
html[data-theme] body .motion-layer-map span { color:var(--a-ink)!important; background:var(--a-soft)!important; border-color:var(--a-line)!important; }
html[data-theme] body .section-title>div>span { color:var(--a-muted)!important; }
html[data-theme] body .motion-layer-map span[aria-current=true] { background:var(--a-accent)!important; color:var(--a-on-accent)!important; }
/* Buttons nested in inverse panels keep their own color pair, not panel text. */
html[data-theme] body :is(.command-deck,.manager-tasks,.next-step,.formal-door,.quiz,.entry-hero,.lab-hero,.employee-welcome,.review-compare-tray) :is(button,.p-button,.portal-primary,.portal-secondary,.primary,.secondary) :is(span,b,strong,small) { color:inherit!important; }
html[data-theme] body .notice { background:var(--a-warning-bg)!important; color:var(--a-warning)!important; border-color:var(--a-warning)!important; }
html[data-theme] body :is(.metric-box span,.metric-box strong,.account-tabs a,dialog summary) { color:var(--a-ink)!important; }
html[data-theme] body .account-tabs a[aria-current] { background:var(--a-accent)!important; color:var(--a-on-accent)!important; }
html[data-theme] body .catalog-tabs a { color:var(--a-ink)!important; }
html[data-theme] body .catalog-tabs a:is(.active,[aria-current]) { background:var(--a-accent)!important; color:var(--a-on-accent)!important; }
html[data-theme] body .catalog-tabs a { background:var(--a-soft)!important; border-color:var(--a-line)!important; }
html[data-theme] body .catalog-tabs a:is(.active,[aria-current]) { background:var(--a-accent)!important; }
html[data-theme] body .command-deck__actions button { background:var(--a-soft)!important; color:var(--a-ink)!important; border-color:var(--a-line)!important; }
@media print {
  /* Paper output must remain legible even when the printer omits backgrounds. */
  html[data-theme] body * { color:#24172f!important; background:none!important; box-shadow:none!important; text-shadow:none!important; }
}
@media screen {
  html[data-theme] body .official-watch { background:var(--a-inverse)!important; color:var(--a-on-inverse)!important; }
  html[data-theme] body .official-watch :is(h2,p,span,a) { color:inherit!important; }
  html[data-theme] body .lab-bottle :is(b,small) { color:#30203e!important; }
}
@media screen {
  html[data-theme] body .official-watch a { background:var(--a-accent)!important; color:var(--a-on-accent)!important; }
  html[data-theme] body .lab-hero .lab-bottle :is(b,small) { color:#30203e!important; }
}

/* بطاقة الحساب التجريبي وحدها تحتفظ بلونها الكهرماني في كلا الوضعين. */
html[data-theme=light] body .account-page .staff-card-demo { background:#fff3d6!important; border-color:#b4781e!important; }
html[data-theme=dark] body .account-page .staff-card-demo { background:#3d2d20!important; border-color:#f1be62!important; }
html[data-theme=light] body .account-page .staff-card-demo .staff-scores>span { background:#f8e6ba!important; color:#513317!important; }
html[data-theme=dark] body .account-page .staff-card-demo .staff-scores>span { background:#5c4429!important; color:#fff5e7!important; }
html[data-theme] body .account-page .staff-card-demo .p-button { background:#8a5214!important; border-color:#8a5214!important; color:#fff!important; }
