/* CERTIS IMMO — shared accessible light/dark theme. */
:root {
  --theme-canvas: #fbf9f8;
  --theme-surface: #ffffff;
  --theme-surface-raised: #ffffff;
  --theme-surface-soft: #f3f0ee;
  --theme-input: #ffffff;
  --theme-text: #1b1b1b;
  --theme-muted: #68615b;
  --theme-heading: #3f2e0f;
  --theme-border: #ddd7d2;
  --theme-border-soft: #eeeae7;
  --theme-accent: #614a26;
  --theme-gold: #aa8050;
  --theme-on-accent: #ffffff;
  --theme-success: #17633f;
  --theme-success-soft: #e8f4ee;
  --theme-warning: #7a5613;
  --theme-warning-soft: #fff4d6;
  --theme-danger: #8b3028;
  --theme-danger-soft: #f9e8e5;
  --theme-focus: rgba(170, 128, 80, .42);
  --theme-shadow: 0 12px 32px rgba(63, 46, 15, .065);
}

html[data-theme="dark"] {
  --theme-canvas: #12110f;
  --theme-surface: #1b1916;
  --theme-surface-raised: #23201c;
  --theme-surface-soft: #28241f;
  --theme-input: #201d19;
  --theme-text: #f3eee7;
  --theme-muted: #c1b8ae;
  --theme-heading: #f1d7ae;
  --theme-border: #4b443c;
  --theme-border-soft: #39342e;
  --theme-accent: #dfc69f;
  --theme-gold: #e0bb80;
  --theme-on-accent: #17130e;
  --theme-success: #c8e7bc;
  --theme-success-soft: #1d2a1b;
  --theme-warning: #f5d7a1;
  --theme-warning-soft: #302617;
  --theme-danger: #ffd2c9;
  --theme-danger-soft: #321d19;
  --theme-focus: rgba(223, 198, 159, .58);
  --theme-shadow: 0 18px 44px rgba(0, 0, 0, .28);
  background: var(--theme-canvas);
}

.theme-mode-toggle {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 11px;
  color: var(--theme-text);
  border: 1px solid var(--theme-border);
  border-radius: 8px;
  background: var(--theme-surface);
  font: 700 10px/1 "Manrope", "Jost", sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .08s ease;
}
.theme-mode-toggle:hover {
  color: var(--theme-heading);
  border-color: var(--theme-gold);
  background: var(--theme-surface-raised);
}
.theme-mode-toggle:active { transform: translateY(1px); }
.theme-mode-toggle:focus-visible {
  outline: 3px solid var(--theme-focus);
  outline-offset: 2px;
}
.theme-mode-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-mode-floating {
  position: fixed;
  z-index: 100002;
  top: 18px;
  right: 18px;
  box-shadow: var(--theme-shadow);
}
.v3-top-actions .theme-mode-toggle,
.partner-v3-header .theme-mode-toggle {
  height: 38px;
  margin: 0 4px 0 0;
}

/*
 * Partner light shell.
 * app-shell.css intentionally owns a dark sidebar for the closer portal and
 * has more-specific navigation selectors. The partner shell is light, so its
 * foreground states must be explicitly restored here, after app-shell.css.
 */
html:not([data-theme="dark"]) body[data-portal="partner"] > .top {
  color: var(--pv3-ink) !important;
  border-color: var(--pv3-line) !important;
  background: #fbfaf8 !important;
}
html:not([data-theme="dark"]) body[data-portal="partner"] > .top .bar,
html:not([data-theme="dark"]) body[data-portal="partner"] > .top .nav {
  color: var(--pv3-ink) !important;
  border-color: var(--pv3-line) !important;
  background: transparent !important;
}
html:not([data-theme="dark"]) body[data-portal="partner"] > .top .nav button:not(.lg_fr):not(.lg_en):not(.lg_de):not(.lg_es):not(.lg_ar),
html:not([data-theme="dark"]) body[data-portal="partner"] > .top .nav .navlogout {
  color: #665d54 !important;
  border-color: transparent !important;
  background: transparent !important;
}
html:not([data-theme="dark"]) body[data-portal="partner"] > .top .nav button:hover,
html:not([data-theme="dark"]) body[data-portal="partner"] > .top .nav .navlogout:hover {
  color: var(--pv3-ink) !important;
  background: var(--pv3-soft) !important;
}
html:not([data-theme="dark"]) body[data-portal="partner"] > .top .nav button.on {
  color: var(--pv3-ink) !important;
  border-color: transparent !important;
  background: #ebe7df !important;
  box-shadow: inset 3px 0 0 var(--pv3-gold) !important;
}
html:not([data-theme="dark"]) body[data-portal="partner"] :is(.partner-nav-group, .nav-group-label) {
  color: #756d65 !important;
}
html:not([data-theme="dark"]) body[data-portal="partner"] .partner-account {
  color: var(--pv3-ink) !important;
  border-color: var(--pv3-line) !important;
  background: #fbfaf8 !important;
}
html:not([data-theme="dark"]) body[data-portal="partner"] .partner-account small {
  color: var(--pv3-muted) !important;
}

html[data-theme="dark"] body[data-portal] {
  --ink: var(--theme-heading);
  --ink2: var(--theme-text);
  --em: #8dac7d;
  --em2: #a8c498;
  --gold: var(--theme-gold);
  --soft: var(--theme-surface-soft);
  --line: var(--theme-border);
  --mut: var(--theme-muted);
  --tx: var(--theme-text);
  --bg: var(--theme-canvas);
  --v3-canvas: var(--theme-canvas);
  --v3-paper: var(--theme-surface);
  --v3-soft: var(--theme-surface-soft);
  --v3-soft-2: var(--theme-border-soft);
  --v3-ink: var(--theme-text);
  --v3-muted: var(--theme-muted);
  --v3-line: var(--theme-border);
  --v3-brown: var(--theme-gold);
  --v3-brown-2: var(--theme-accent);
  --v3-shadow: var(--theme-shadow);
  --shell-bg: var(--theme-canvas);
  --shell-surface: var(--theme-surface);
  --shell-ink: var(--theme-text);
  --shell-muted: var(--theme-muted);
  --shell-line: var(--theme-border);
  color: var(--theme-text);
  background: var(--theme-canvas);
}
html[data-theme="dark"] body[data-portal="partner"] {
  --pv3-bg: var(--theme-canvas);
  --pv3-surface: var(--theme-surface);
  --pv3-ink: var(--theme-text);
  --pv3-muted: var(--theme-muted);
  --pv3-line: var(--theme-border);
  --pv3-gold: var(--theme-gold);
  --pv3-gold-soft: #4a3720;
  --pv3-soft: var(--theme-surface-soft);
}

html[data-theme="dark"] body[data-portal] :is(h1, h2, h3, h4, h5, h6, .vh, .ct, .rt, .tot.big, .kv .v) {
  color: var(--theme-heading);
}

html[data-theme="dark"] body[data-portal] > .top,
html[data-theme="dark"] body[data-portal="partner"] > .top {
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  background: #181511 !important;
}
html[data-theme="dark"] body[data-portal] > .top .bar,
html[data-theme="dark"] body[data-portal] > .top .nav {
  border-color: var(--theme-border) !important;
  background: transparent !important;
}
html[data-theme="dark"] body[data-portal] > .top :is(.ttl, .nav button, .navlogout, .nav-label, .nav-icon) {
  color: var(--theme-muted) !important;
}
html[data-theme="dark"] body[data-portal] > .top :is(.nav button:hover, .nav button.on, .navlogout:hover) {
  color: var(--theme-heading) !important;
}
html[data-theme="dark"] body[data-portal] > .top .nav button.on {
  border-color: var(--theme-gold) !important;
  background: var(--theme-surface-soft) !important;
}
html[data-theme="dark"] body[data-portal] :is(.workspace-header, .partner-v3-header, .partner-account, .v3-sidebar-user) {
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  background: rgba(27, 25, 22, .97) !important;
}
html[data-theme="dark"] body[data-portal] :is(.workspace-search, .partner-search) {
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  background: var(--theme-input) !important;
}

html[data-theme="dark"] body[data-portal] :is(
  .card, .panel, .doc, .rule, .prog, .ob, .autobox, .ctrls, .tablebox, .invnote,
  .docframe, .qzframe, .cblock, .msgb, .proginfo, .pl-card, .kpi, .dbox,
  .activity-indicator, .activity-score-card, .v3-status-strip, .v3-quick,
  .v3-panel, .v3-kpi, .v3-agenda-list, .v3-agenda-event, .partner-panel,
  .partner-quick, .partner-status, .partner-match-state, .partner-match-form,
  .partner-match-card, .lpmodal .card, .amane-notify-item, .command-panel
) {
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  box-shadow: var(--theme-shadow);
}
html[data-theme="dark"] body[data-portal] :is(.partner-status > div, .partner-program-row, .partner-panel-head) {
  color: var(--theme-text);
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
}
html[data-theme="dark"] body[data-portal] .partner-status .lead {
  color: #f8e0bd !important;
  background: #3b2a10 !important;
}
html[data-theme="dark"] body[data-portal] :is(.partner-quick::after, .v3-quick::after) {
  background: var(--theme-surface-soft) !important;
}

html[data-theme="dark"] body[data-portal] :is(
  input, select, textarea, .objsearch, .lk_url, .langsel, .objprojsel,
  .btn.g, .btn.s, .lotplanbtn,
  .aud-copy, .aud-ab button, .pl_resvtbl .btnx, .partner-header-action,
  .partner-mobile-toggle, .workspace-search
) {
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  background: var(--theme-input) !important;
}

/* Stateful controls are deliberately separate from neutral fields. */
html[data-theme="dark"] body[data-portal] :is(.pf, .objchip, .optchip, .optbtn, .chips .chip, .chip) {
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  background: var(--theme-input) !important;
}
html[data-theme="dark"] body[data-portal] :is(.pf, .objchip, .optchip, .chips .chip, .chip):hover {
  color: var(--theme-heading) !important;
  border-color: var(--theme-gold) !important;
  background: var(--theme-surface-raised) !important;
}
html[data-theme="dark"] body[data-portal] :is(.pf.on, .objchip.on, .optchip.on, .chips .chip.on, .chip.on) {
  color: var(--theme-on-accent) !important;
  border-color: var(--theme-gold) !important;
  background: var(--theme-gold) !important;
  box-shadow: 0 0 0 2px rgba(224, 187, 128, .18) !important;
}
html[data-theme="dark"] body[data-portal] :is(.btn.p, .btn.primary) {
  color: var(--theme-on-accent) !important;
  border-color: var(--theme-gold) !important;
  background: var(--theme-gold) !important;
}
html[data-theme="dark"] body[data-portal] :is(.btn.p, .btn.primary):hover {
  color: #0f0d0a !important;
  border-color: #f1cf99 !important;
  background: #f1cf99 !important;
}
html[data-theme="dark"] body[data-portal] :is(.chip.d, .lot.d, .sb.d, .stt.d) {
  color: var(--theme-success) !important;
  border-color: #52704a !important;
  background: var(--theme-success-soft) !important;
}
html[data-theme="dark"] body[data-portal] :is(.chip.r, .lot.r, .sb.r, .stt.r, .optbtn.reservee) {
  color: var(--theme-warning) !important;
  border-color: #8b6831 !important;
  background: var(--theme-warning-soft) !important;
}
html[data-theme="dark"] body[data-portal] :is(.chip.v, .lot.v, .sb.v, .stt.v) {
  color: var(--theme-danger) !important;
  border-color: #805048 !important;
  background: var(--theme-danger-soft) !important;
}
html[data-theme="dark"] body[data-portal] .optbtn.optionnee {
  color: #ffd9aa !important;
  border-color: #9a6631 !important;
  background: #352314 !important;
}
html[data-theme="dark"] body[data-portal] .ob .ot {
  color: var(--theme-text) !important;
  border-color: var(--theme-border-soft) !important;
  background: var(--theme-surface-soft) !important;
}
html[data-theme="dark"] body[data-portal] :is(input, select, textarea)::placeholder {
  color: #9e958b;
}
html[data-theme="dark"] body[data-portal] :is(input, select, textarea):focus {
  border-color: var(--theme-gold) !important;
  box-shadow: 0 0 0 3px var(--theme-focus) !important;
}

html[data-theme="dark"] body[data-portal] :is(.vsub, .cd, .disc, small, .msnote, .partner-match-state) {
  color: var(--theme-muted);
}
html[data-theme="dark"] body[data-portal] :is(table.t td, table.stk td, .pd_tbl td) {
  color: var(--theme-text);
  border-color: var(--theme-border);
  background: var(--theme-surface) !important;
}
html[data-theme="dark"] body[data-portal] :is(table.t tr:nth-child(even) td, table.stk tr:nth-child(even) td, .pd_tbl tr:nth-child(even) td) {
  background: var(--theme-surface-soft) !important;
}
html[data-theme="dark"] body[data-portal] table.stk :is(th.lot, td.lot) {
  color: var(--theme-heading);
  background: var(--theme-surface-raised) !important;
}

html[data-theme="dark"] body[data-portal] :is(.v3-panel-head, .v3-stock-line, .v3-agenda-event, .rlist, .disc, .gf) {
  border-color: var(--theme-border-soft) !important;
}
html[data-theme="dark"] body[data-portal] :is(
  .partner-match-metric, .partner-match-details, .partner-match-details-grid > div
) {
  color: var(--theme-text);
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-soft) !important;
}
html[data-theme="dark"] body[data-portal] :is(.partner-match-details summary:hover, .partner-match-details[open] summary) {
  background: var(--theme-surface-raised) !important;
}
html[data-theme="dark"] body[data-portal] :is(.v3-stock-line strong, .v3-stock-line b, .v3-agenda-date strong, .v3-agenda-empty strong) {
  color: var(--theme-heading);
}
html[data-theme="dark"] body[data-portal] :is(.v3-top-actions, .partner-v3-header) {
  color: var(--theme-text);
}
html[data-theme="dark"] body[data-portal] :is(.v3-icon-button, .v3-role) {
  color: var(--theme-text);
  border-color: var(--theme-border);
  background: var(--theme-surface);
}

html[data-theme="dark"] body[data-portal] .scorehero .score::after,
html[data-theme="dark"] body[data-portal] .partner-match-score::after {
  background: var(--theme-surface);
}
html[data-theme="dark"] body[data-portal] .autobox.warn {
  color: #f5d7a1;
  border-color: #8b6831 !important;
  background: #302617 !important;
}
html[data-theme="dark"] body[data-portal] :is(.partner-match-state.is-ok, .t-ok, .st.ok) {
  color: #c8e7bc !important;
  border-color: #52704a !important;
  background: #1d2a1b !important;
}
html[data-theme="dark"] body[data-portal] :is(.partner-match-state.is-warn, .partner-match-budget-note) {
  color: #ffd2c9 !important;
  border-color: #805048 !important;
  background: #321d19 !important;
}

/* Authentication uses the same choice before the user signs in. */
html[data-theme="dark"] body[data-portal] #gate {
  color: var(--theme-text);
  background: var(--theme-canvas);
}
html[data-theme="dark"] body[data-portal] #gate .gx {
  color: var(--theme-text);
  border-color: var(--theme-border);
  background: rgba(27, 25, 22, .97);
  box-shadow: 0 28px 70px rgba(0,0,0,.42);
}
html[data-theme="dark"] body[data-portal] #gate :is(.gt, .gs, .gf) {
  color: var(--theme-text);
}
html[data-theme="dark"] body[data-portal] #gate .gs,
html[data-theme="dark"] body[data-portal] #gate .gf {
  color: var(--theme-muted);
}
html[data-theme="dark"] body[data-portal] #gate input {
  color: var(--theme-text);
  border-color: var(--theme-border);
  background: var(--theme-input);
}
html[data-theme="dark"] body[data-portal] #gate input:focus {
  border-color: var(--theme-gold);
  background: var(--theme-surface-raised);
}

@media (max-width: 760px) {
  .theme-mode-label { display: none; }
  .theme-mode-toggle { width: 38px; min-width: 38px; padding: 0; }
  .theme-mode-floating { top: 12px; right: 12px; }
}

/* Components whose original premium palette used fixed light-theme colors. */
html[data-theme="dark"] body[data-portal] > .top .ttl small,
html[data-theme="dark"] body[data-portal] :is(.nav-group-label, .partner-nav-group) {
  color: var(--theme-muted) !important;
}
html[data-theme="dark"] body[data-portal] :is(
  .workspace-kicker, .partner-eyebrow, .v3-eyebrow, .v3-link,
  .v3-agenda-event time, .partner-panel-head button
) {
  color: var(--theme-accent) !important;
}
html[data-theme="dark"] body[data-portal] .v3-action {
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-raised) !important;
}
html[data-theme="dark"] body[data-portal] .v3-action.primary {
  color: #17130e !important;
  border-color: var(--theme-gold) !important;
  background: var(--theme-gold) !important;
}
html[data-theme="dark"] body[data-portal] .v3-status-strip .lead {
  color: #f8e0bd !important;
  background: #3b2a10 !important;
}
html[data-theme="dark"] body[data-portal] .v3-status-strip .lead :is(strong, small) {
  color: inherit !important;
}
html[data-theme="dark"] body[data-portal] :is(.v3-sidebar-user-avatar, .partner-account-avatar) {
  color: #17130e !important;
  background: var(--theme-gold) !important;
}
html[data-theme="dark"] body[data-portal] :is(.amane-notify-drawer, .pm_box) {
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
}
html[data-theme="dark"] body[data-portal] .amane-notify-drawer :is(h2, h3) {
  color: var(--theme-heading) !important;
}
html[data-theme="dark"] body[data-portal] .v3-sidebar-user > span,
html[data-theme="dark"] body[data-portal] .partner-avatar {
  color: #17130e !important;
  background: var(--theme-gold) !important;
}
html[data-theme="dark"] body[data-portal] .v3-status-main {
  color: #f8e0bd !important;
  background: #3b2a10 !important;
}
html[data-theme="dark"] body[data-portal] .v3-status-main :is(strong, small) {
  color: inherit !important;
}
html[data-theme="dark"] body[data-portal="closer"] .v3-mobile-bar {
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  background: rgba(27, 25, 22, .98) !important;
}
html[data-theme="dark"] body[data-portal="closer"] .v3-mobile-bar button {
  color: var(--theme-muted) !important;
}
html[data-theme="dark"] body[data-portal="closer"] .v3-mobile-bar button.on {
  color: #f0c875 !important;
}
html[data-theme="dark"] body[data-portal] :is(
  .v3-priority time, .v3-kpi span, .partner-section-head button,
  .amane-notify-head small
) {
  color: var(--theme-accent) !important;
}
html[data-theme="dark"] body[data-portal] .amane-notify-empty {
  color: var(--theme-muted) !important;
  border-color: var(--theme-border) !important;
}


/* Global shells share the same saved preference and remain readable in dark mode. */
html[data-theme="dark"] body[data-portal="landing"] {
  --paper: var(--theme-canvas);
  --ink: var(--theme-heading);
  --line: var(--theme-border);
  --mut: var(--theme-muted);
  --green: var(--theme-accent);
  color: var(--theme-text);
  background-color: var(--theme-canvas);
}
html[data-theme="dark"] body[data-portal="landing"] main,
html[data-theme="dark"] body[data-portal="landing"] a.card {
  color: var(--theme-text);
  border-color: var(--theme-border);
  background: var(--theme-surface);
}
html[data-theme="dark"] body[data-portal="landing"] .hero { background: #181511; }
html[data-theme="dark"] body[data-portal="landing"] .card p,
html[data-theme="dark"] body[data-portal="landing"] footer { color: var(--theme-muted); }

html[data-theme="dark"] body[data-portal="academy"] {
  --forest: #181511; --forest-2: #2a241d; --forest-3: var(--theme-accent);
  --ivory: var(--theme-canvas); --paper: var(--theme-surface);
  --ink: var(--theme-text); --muted: var(--theme-muted);
  --line: var(--theme-border); --sage: var(--theme-surface-soft);
}
html[data-theme="dark"] body[data-portal="academy"] :is(.topbar, .module-card, .stat-card, .lesson, .outline, .resume-aside, .exercise-card, .live-card, .badge-card, .resource-list, .glossary-item, .simulator, .result-item, .command-panel) {
  color: var(--theme-text); border-color: var(--theme-border); background: var(--theme-surface);
}
html[data-theme="dark"] body[data-portal="academy"] :is(.search-button, .user-pill, .tool-tabs button, .resource-tabs button, .filter-row button, .quiz-option, .resource-search, .field input, .field select, .mobile-menu) {
  color: var(--theme-text); border-color: var(--theme-border); background: var(--theme-input);
}
html[data-theme="dark"] body[data-portal="academy"] :is(.sim-results, .exercise-detail, .resume-card, th) { background: var(--theme-surface-soft); }
html[data-theme="dark"] body[data-portal="academy"] :is(.button.primary, .tool-tabs button.active, .resource-tabs button.active, .filter-row button.active) { color: var(--theme-on-accent); border-color: var(--theme-gold); background: var(--theme-gold); }

html[data-theme="dark"] body[data-portal="analysis"] {
  --forest: #181511; --forest2: #2a241d; --ivory: var(--theme-canvas);
  --paper: var(--theme-surface); --ink: var(--theme-text);
  --muted: var(--theme-muted); --line: var(--theme-border); --sage: var(--theme-surface-soft);
}
html[data-theme="dark"] body[data-portal="analysis"] :is(.builder, .results, .metrics div, .report, .report-kpis div, input, select, textarea, .icon-button) {
  color: var(--theme-text); border-color: var(--theme-border); background: var(--theme-surface);
}
html[data-theme="dark"] body[data-portal="analysis"] :is(.stepper button, .integrity, .report-warning) { color: var(--theme-text); background: var(--theme-surface-soft); }
html[data-theme="dark"] body[data-portal="analysis"] .stepper button[aria-selected="true"],
html[data-theme="dark"] body[data-portal="analysis"] .button.primary { color: var(--theme-on-accent); border-color: var(--theme-gold); background: var(--theme-gold); }

html[data-theme="dark"] body[data-portal="admin"] { --bg: var(--theme-canvas); --ink: var(--theme-text); --mut: var(--theme-muted); --line: var(--theme-border); }
html[data-theme="dark"] body[data-portal="admin"] :is(.card, input, select, table, th, td, .code) { color: var(--theme-text); border-color: var(--theme-border); background: var(--theme-surface); }
html[data-theme="dark"] body[data-portal="admin"] .btn:not(.warn) { color: var(--theme-on-accent); background: var(--theme-gold); }

html[data-theme="dark"] body[data-portal] :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--theme-gold) !important;
  outline-offset: 3px !important;
}


/* Measured WCAG 2.2 contrast corrections for global pages. */
html:not([data-theme="dark"]) body[data-portal="landing"] .num { color: #805d2f; }
html:not([data-theme="dark"]) body[data-portal="landing"] footer { color: #626a66; }
html:not([data-theme="dark"]) body[data-portal="academy"] .eyebrow { color: #765323; }
html:not([data-theme="dark"]) body[data-portal="academy"] .hero .eyebrow { color: #d1b47f; }
html:not([data-theme="dark"]) body[data-portal="analysis"] .topbar { background: #0d2d25; }
html:not([data-theme="dark"]) body[data-portal="analysis"] .eyebrow { color: #80551f; }
html[data-theme="dark"] body[data-portal="analysis"] .stepper button[aria-selected="true"] b { color: var(--theme-on-accent); border-color: var(--theme-on-accent); }
html[data-theme="dark"] body[data-portal="analysis"] label { color: var(--theme-muted); }
html[data-theme="dark"] body[data-portal="analysis"] .integrity li { color: var(--theme-muted); }

html:not([data-theme="dark"]) body[data-portal="analysis"] .intro .eyebrow { color: #dfc18b; }
@media print {
  html[data-theme] { color-scheme: light; background: #fff !important; }
  html[data-theme] body[data-portal] {
    --ink: #0b0a0d;
    --line: #e2e7e4;
    --mut: #5a625c;
    --tx: #16201b;
    --bg: #fff;
    color: #111 !important;
    background: #fff !important;
  }
  .theme-mode-toggle { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-mode-toggle { transition: none; }
}
