/* PFI Build 055 — global note cleanup + persistent light/dark theme */

/* Notes should always sit directly on the true underlying surface. */
.note,
p.note,
div.note,
span.note {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

.pfiThemeToggle {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:36px;
  padding:7px 11px;
  border-radius:10px;
  border:1px solid rgba(227,173,50,.48);
  background:#182938;
  color:#f6f8fa;
  font:700 14px/1.2 "Segoe UI",Arial,sans-serif;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:none;
}
.pfiThemeToggle:hover{border-color:#e3ad32;background:#213445}
.pfiThemeToggle:focus-visible{outline:2px solid #e3ad32;outline-offset:2px}
.pfiThemeToggleFloating{position:fixed;top:14px;right:14px;z-index:100000}

html[data-pfi-theme="dark"]{color-scheme:dark}
html[data-pfi-theme="light"]{
  color-scheme:light;
  --ux-bg:#eef3f7;
  --ux-bg2:#f6f8fa;
  --ux-panel:#ffffff;
  --ux-panel2:#f7f9fb;
  --ux-panel3:#edf2f6;
  --ux-line:#cbd6df;
  --ux-line2:#aebdca;
  --ux-text:#17212b;
  --ux-muted:#596a79;
  --ux-gold:#c78f17;
  --ux-gold2:#e3ad32;
  --ux-green:#167a4a;
  --ux-red:#c43d49;
  --ux-orange:#b86112;
  --ux-blue:#276fb2;
  --ux-purple:#7652b5;
  --ux-shadow:0 12px 30px rgba(28,46,61,.10);

  --pfi-bg:#eef3f7;
  --pfi-panel:#ffffff;
  --pfi-panel2:#f7f9fb;
  --pfi-panel-2:#f7f9fb;
  --pfi-panel-3:#edf2f6;
  --pfi-border:#cbd6df;
  --pfi-border-soft:#aebdca;
  --pfi-text:#17212b;
  --pfi-muted:#596a79;
  --pfi-heading:#17212b;
  --pfi-green:#167a4a;
  --pfi-red:#c43d49;
  --pfi-orange:#b86112;
  --pfi-blue:#276fb2;
  --pfi-gold:#c78f17;
}

/* Base page / authentication surfaces */
html[data-pfi-theme="light"],
html[data-pfi-theme="light"] body{
  background:#eef3f7 !important;
  background-image:linear-gradient(180deg,#f7f9fb,#eef3f7) !important;
  color:#17212b !important;
}
html[data-pfi-theme="light"] .hero,
html[data-pfi-theme="light"] .home-panel,
html[data-pfi-theme="light"] .journey-card,
html[data-pfi-theme="light"] .support-card,
html[data-pfi-theme="light"] .auth-card{
  background:#ffffff !important;
  background-image:none !important;
  border-color:#cbd6df !important;
  color:#17212b !important;
  box-shadow:0 12px 30px rgba(28,46,61,.10) !important;
}
html[data-pfi-theme="light"] .hero p,
html[data-pfi-theme="light"] .home-panel p,
html[data-pfi-theme="light"] .journey-card p,
html[data-pfi-theme="light"] .support-card p,
html[data-pfi-theme="light"] .trust-note span,
html[data-pfi-theme="light"] .form-guidance{
  color:#596a79 !important;
}
html[data-pfi-theme="light"] .auth-form label,
html[data-pfi-theme="light"] .intake-grid label,
html[data-pfi-theme="light"] .wide-label{
  color:#263746 !important;
}
html[data-pfi-theme="light"] .auth-form input,
html[data-pfi-theme="light"] .intake-grid input,
html[data-pfi-theme="light"] .wide-label textarea{
  background:#ffffff !important;
  color:#17212b !important;
  border-color:#b8c7d3 !important;
}
html[data-pfi-theme="light"] .secondary{
  background:#edf2f6 !important;
  color:#17212b !important;
  border-color:#b8c7d3 !important;
}

/* Main dashboard shell */
html[data-pfi-theme="light"] .pfiPlatformNav,
html[data-pfi-theme="light"] header,
html[data-pfi-theme="light"] .tabs{
  background:#ffffff !important;
  background-image:none !important;
  border-color:#cbd6df !important;
  color:#17212b !important;
  box-shadow:none !important;
}
html[data-pfi-theme="light"] .pfiPlatformNav .brand,
html[data-pfi-theme="light"] .pfiPlatformNav .currentUser,
html[data-pfi-theme="light"] header h1,
html[data-pfi-theme="light"] header h2,
html[data-pfi-theme="light"] header h3,
html[data-pfi-theme="light"] h1,
html[data-pfi-theme="light"] h2,
html[data-pfi-theme="light"] h3,
html[data-pfi-theme="light"] h4{
  color:#17212b !important;
}
html[data-pfi-theme="light"] .pfiPlatformNav button:not(.primaryNav),
html[data-pfi-theme="light"] .pfiThemeToggle{
  background:#eef3f7 !important;
  color:#17212b !important;
  border-color:#c0ccd6 !important;
}
html[data-pfi-theme="light"] .pfiPlatformNav button.primaryNav{
  background:#ffffff !important;
  color:#17212b !important;
  border-color:#c78f17 !important;
}
html[data-pfi-theme="light"] .tab{
  background:#ffffff !important;
  color:#243442 !important;
  border-color:#cbd6df !important;
}
html[data-pfi-theme="light"] .tab.active{
  background:linear-gradient(135deg,#f3c65a,#e3ad32) !important;
  color:#111 !important;
  border-color:#c78f17 !important;
}

/* Primary content surfaces. Explicit selectors intentionally cover the recurring PFI component families. */
html[data-pfi-theme="light"] .card,
html[data-pfi-theme="light"] .panel,
html[data-pfi-theme="light"] .section,
html[data-pfi-theme="light"] .journeyHero,
html[data-pfi-theme="light"] .pfi42Panel,
html[data-pfi-theme="light"] .pfi79GuideNote,
html[data-pfi-theme="light"] .pfi093Metric,
html[data-pfi-theme="light"] .pfi093Group,
html[data-pfi-theme="light"] .pfi094Group,
html[data-pfi-theme="light"] .pfi103SubscriptionRow,
html[data-pfi-theme="light"] .pfi103DebtRow,
html[data-pfi-theme="light"] .pfi053CashFlowPanel,
html[data-pfi-theme="light"] .pfi053CashStage,
html[data-pfi-theme="light"] .pfi053CashFooter,
html[data-pfi-theme="light"] .journeyStep,
html[data-pfi-theme="light"] .pfiImportRepoCard,
html[data-pfi-theme="light"] .pfi2026RepoCard,
html[data-pfi-theme="light"] .pfi061Center,
html[data-pfi-theme="light"] .pfiScenario023Section,
html[data-pfi-theme="light"] .pfi086ScoreCard,
html[data-pfi-theme="light"] .pfi086DriversCard,
html[data-pfi-theme="light"] .pfi31Card,
html[data-pfi-theme="light"] .pfi32Panel{
  background:#ffffff !important;
  background-image:none !important;
  color:#17212b !important;
  border-color:#cbd6df !important;
  box-shadow:0 10px 24px rgba(28,46,61,.08) !important;
}
html[data-pfi-theme="light"] .card .card{
  background:#f8fafc !important;
  border-color:#d7e0e7 !important;
}
html[data-pfi-theme="light"] .journeyHero{
  background:#f7fafc !important;
  border-left-color:#c78f17 !important;
}
html[data-pfi-theme="light"] .pfi053CashStage:not(:last-child)::after{
  background:#ffffff !important;
  border-color:#b9c6d0 !important;
  color:#9c6b08 !important;
}

/* Default readable text. Semantic colors are restored below. */
html[data-pfi-theme="light"] p,
html[data-pfi-theme="light"] .note,
html[data-pfi-theme="light"] .mini,
html[data-pfi-theme="light"] label,
html[data-pfi-theme="light"] th,
html[data-pfi-theme="light"] td,
html[data-pfi-theme="light"] .pfi053CashLabel,
html[data-pfi-theme="light"] .pfi053CashStep,
html[data-pfi-theme="light"] .pfi053CashDelta,
html[data-pfi-theme="light"] .pfi093Label,
html[data-pfi-theme="light"] .pfi102Field label,
html[data-pfi-theme="light"] .pfi103Field label{
  color:#596a79 !important;
}
html[data-pfi-theme="light"] strong,
html[data-pfi-theme="light"] .pfi093Value,
html[data-pfi-theme="light"] .pfi103SubShareValue,
html[data-pfi-theme="light"] .pfiBalanceMiniCard strong{
  color:#17212b !important;
}

/* Inputs and tables */
html[data-pfi-theme="light"] input,
html[data-pfi-theme="light"] select,
html[data-pfi-theme="light"] textarea,
html[data-pfi-theme="light"] .pfi103SubShareValue,
html[data-pfi-theme="light"] .am1-input,
html[data-pfi-theme="light"] .am1-select{
  background:#ffffff !important;
  color:#17212b !important;
  border-color:#b8c7d3 !important;
}
html[data-pfi-theme="light"] table,
html[data-pfi-theme="light"] .pfiTableWrap,
html[data-pfi-theme="light"] .accountabilityTableWrap,
html[data-pfi-theme="light"] .changeTableWrap,
html[data-pfi-theme="light"] .am1-table-wrap,
html[data-pfi-theme="light"] .pfi044FullAmortTable{
  background:#ffffff !important;
  color:#17212b !important;
  border-color:#cbd6df !important;
}
html[data-pfi-theme="light"] th,
html[data-pfi-theme="light"] .pfi044FullAmortTable th{
  background:#eef3f7 !important;
  color:#334a5d !important;
  border-color:#d5dee5 !important;
}
html[data-pfi-theme="light"] td{
  background:#ffffff !important;
  color:#17212b !important;
  border-color:#e0e6eb !important;
}
html[data-pfi-theme="light"] .total-row td,
html[data-pfi-theme="light"] .pfi94TotalsRow td,
html[data-pfi-theme="light"] .pfi95TotalsRow td,
html[data-pfi-theme="light"] .pfi78TotalsRow td{
  background:#edf3f7 !important;
  color:#17212b !important;
}

/* Tinted information / status surfaces remain differentiated in light mode. */
html[data-pfi-theme="light"] .callout,
html[data-pfi-theme="light"] .pfi076Disclaimer,
html[data-pfi-theme="light"] .pfi31Note,
html[data-pfi-theme="light"] .pfi32InlineNote,
html[data-pfi-theme="light"] .pfi24Help{
  background:#f5f9fc !important;
  color:#334a5d !important;
  border-color:#bfd0dd !important;
}
html[data-pfi-theme="light"] .recovery-status{background:#f7f9fb;color:#334a5d}

/* Preserve semantic financial colors after generic light-mode text overrides. */
html[data-pfi-theme="light"] .good,
html[data-pfi-theme="light"] .principal,
html[data-pfi-theme="light"] .positive,
html[data-pfi-theme="light"] .pfi42Green,
html[data-pfi-theme="light"] .pfi053CashValue{
  color:#167a4a !important;
}
html[data-pfi-theme="light"] .bad,
html[data-pfi-theme="light"] .interest,
html[data-pfi-theme="light"] .negative,
html[data-pfi-theme="light"] .pfi42Red,
html[data-pfi-theme="light"] .pfi053CashValue.short{
  color:#c43d49 !important;
}
html[data-pfi-theme="light"] .warn,
html[data-pfi-theme="light"] .warning,
html[data-pfi-theme="light"] .darkOrange,
html[data-pfi-theme="light"] .pfi42Orange,
html[data-pfi-theme="light"] .pfi053CashValue.zero,
html[data-pfi-theme="light"] .pfi053CashDelta strong{
  color:#b86112 !important;
}

@media(max-width:760px){
  .pfiThemeToggleFloating{top:8px;right:8px;min-height:34px;padding:6px 9px}
}


/* ========================================================================== 
   PFI BUILD 061 — LIGHT MODE GOVERNANCE
   --------------------------------------------------------------------------
   The login / Command Center light treatment is the reference model. These
   rules bring the dashboard workspace under the same surface, contrast,
   border, control, table, and semantic-color governance without changing
   dark mode or any financial/application logic.
   ========================================================================== */

html[data-pfi-theme="light"] body.pfiDashboardPage{
  --v8-bg:#eef3f7;
  --v8-panel:#ffffff;
  --v8-panel2:#f7f9fb;
  --v8-line:#cbd6df;
  --v8-gold:#8a5f05;
  --v8-green:#147447;
  --v8-orange:#9f5108;
  --v8-red:#b33643;
  --v8-blue:#245f97;
  --v8-text:#17212b;
  --v8-muted:#526575;

  --pfi-bg:#eef3f7;
  --pfi-panel:#ffffff;
  --pfi-panel2:#f7f9fb;
  --pfi-panel-2:#f7f9fb;
  --pfi-panel-3:#edf2f6;
  --pfi-border:#cbd6df;
  --pfi-border-soft:#aebdca;
  --pfi-text:#17212b;
  --pfi-muted:#526575;
  --pfi-heading:#17212b;
  --pfi-green:#147447;
  --pfi-red:#b33643;
  --pfi-orange:#9f5108;
  --pfi-blue:#245f97;
  --pfi-gold:#8a5f05;

  --pfi-lm-bg:#eef3f7;
  --pfi-lm-surface:#ffffff;
  --pfi-lm-surface-soft:#f7f9fb;
  --pfi-lm-surface-muted:#edf2f6;
  --pfi-lm-surface-hover:#e7eef4;
  --pfi-lm-border:#cbd6df;
  --pfi-lm-border-strong:#aebdca;
  --pfi-lm-text:#17212b;
  --pfi-lm-muted:#526575;
  --pfi-lm-gold:#8a5f05;
  --pfi-lm-green:#147447;
  --pfi-lm-red:#b33643;
  --pfi-lm-orange:#9f5108;
  --pfi-lm-blue:#245f97;
  --pfi-lm-purple:#68469c;
  --pfi-lm-shadow:0 10px 26px rgba(34,54,70,.08);

  background:#eef3f7!important;
  background-image:linear-gradient(180deg,#f7f9fb 0,#eef3f7 100%)!important;
  color:var(--pfi-lm-text)!important;
}

/* Dashboard shell: match the calm, high-contrast Command Center treatment. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiPlatformNav{
  background:rgba(255,255,255,.97)!important;
  background-image:none!important;
  border-color:var(--pfi-lm-border)!important;
  box-shadow:0 1px 0 rgba(23,33,43,.04)!important;
  backdrop-filter:blur(14px)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8Sidebar{
  background:linear-gradient(180deg,#ffffff 0,#f7f9fb 68%,#eef3f7 100%)!important;
  border-color:var(--pfi-lm-border)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8SideBrand{
  border-color:#d7e0e7!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8SideBrand strong,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiPlatformNav .brand,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiPlatformNav .currentUser{
  color:var(--pfi-lm-text)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8SideBrand small,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8SidebarFooter,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8PageIntro p{
  color:var(--pfi-lm-muted)!important;
  border-color:#d7e0e7!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8NavBtn{
  background:transparent!important;
  color:#314657!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8NavBtn:hover{
  background:#edf3f7!important;
  color:#17212b!important;
  border-color:#d1dce4!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8NavBtn.active,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8NavBtn[aria-current="page"]{
  background:linear-gradient(90deg,rgba(227,173,50,.20),rgba(227,173,50,.07))!important;
  color:#6f4c04!important;
  border-color:#c99b34!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8NavIcon{
  background:#edf2f6!important;
  color:#314657!important;
  border-color:#c8d4dd!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8NavBtn.active .pfiV8NavIcon,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8NavBtn[aria-current="page"] .pfiV8NavIcon{
  background:#e3ad32!important;
  color:#111!important;
  border-color:#c78f17!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8ActiveArrow{color:#614304!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8PageBadge{
  background:#fff7df!important;
  color:#7b5505!important;
  border-color:#d7b45e!important;
}

/* Shared neutral controls follow the Command Center's light control language. */
html[data-pfi-theme="light"] body.pfiDashboardPage button:not(.danger):not(.pfiUtilityActionButton):not(.pfiStartButton):not(.pfiNext):not(.primaryNav),
html[data-pfi-theme="light"] body.pfiDashboardPage .secondary{
  background:#edf2f6!important;
  background-image:none!important;
  color:#17212b!important;
  border-color:#b8c7d3!important;
  box-shadow:none!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage button:not(.danger):not(.pfiUtilityActionButton):not(.pfiStartButton):not(.pfiNext):not(.primaryNav):hover,
html[data-pfi-theme="light"] body.pfiDashboardPage .secondary:hover{
  background:#e3ebf1!important;
  border-color:#91a7b8!important;
  color:#17212b!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiUtilityActionButton,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiStartButton,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiNext,
html[data-pfi-theme="light"] body.pfiDashboardPage .primaryNav,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiYellowBackgroundBlackText,
html[data-pfi-theme="light"] body.pfiDashboardPage button[style*="background:#f4bd3b" i],
html[data-pfi-theme="light"] body.pfiDashboardPage button[style*="background: #f4bd3b" i],
html[data-pfi-theme="light"] body.pfiDashboardPage button[style*="background:#f7cd5e" i],
html[data-pfi-theme="light"] body.pfiDashboardPage button[style*="background: #f7cd5e" i]{
  background:linear-gradient(135deg,#f3c65a,#e3ad32)!important;
  color:#111!important;
  border-color:#c78f17!important;
  box-shadow:0 4px 12px rgba(138,95,5,.12)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage button.danger,
html[data-pfi-theme="light"] body.pfiDashboardPage button[class*="delete" i],
html[data-pfi-theme="light"] body.pfiDashboardPage button[class*="remove" i]{
  background:#b33643!important;
  color:#000!important;
  border-color:#972b36!important;
}

/* Form controls use one consistent white surface and visible focus state. */
html[data-pfi-theme="light"] body.pfiDashboardPage input,
html[data-pfi-theme="light"] body.pfiDashboardPage select,
html[data-pfi-theme="light"] body.pfiDashboardPage textarea,
html[data-pfi-theme="light"] body.pfiDashboardPage .am1-input,
html[data-pfi-theme="light"] body.pfiDashboardPage .am1-select{
  background:#fff!important;
  background-image:none!important;
  color:#17212b!important;
  border-color:#b8c7d3!important;
  box-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage input:hover,
html[data-pfi-theme="light"] body.pfiDashboardPage select:hover,
html[data-pfi-theme="light"] body.pfiDashboardPage textarea:hover{
  border-color:#91a7b8!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage input:focus,
html[data-pfi-theme="light"] body.pfiDashboardPage select:focus,
html[data-pfi-theme="light"] body.pfiDashboardPage textarea:focus{
  border-color:#c78f17!important;
  box-shadow:0 0 0 3px rgba(199,143,23,.14)!important;
  outline:0!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage input:disabled,
html[data-pfi-theme="light"] body.pfiDashboardPage select:disabled,
html[data-pfi-theme="light"] body.pfiDashboardPage textarea:disabled{
  background:#edf2f6!important;
  color:#6b7280!important;
  opacity:1!important;
}

/* Primary work surfaces. This deliberately covers the component families used
   across Income, Subscriptions, Debt, Snapshot, Calendar, Amortization,
   Discretionary, Events, Accountability, and Imports. */
html[data-pfi-theme="light"] body.pfiDashboardPage .card,
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyHero,
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyStep,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiIndependentCollapseShell,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiExtraSimpleSection,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi111CalendarShell,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi111SummaryPanel,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi111MetricCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi111AwarenessCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42Panel,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42Kpi,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42ScenarioBox,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi051CashStage,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi093Metric,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi093Group,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi094Group,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi103SubscriptionRow,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi103DebtRow,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi053CashFlowPanel,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi053CashStage,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi053CashFooter,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi17SavingsSection,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi020ExtraIncomeCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi024IncomeFinancials,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi043ExtraCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi044Stat,
html[data-pfi-theme="light"] body.pfiDashboardPage .cashMonthCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiAccountabilityCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiAccountabilityJourneyCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiAccountabilityPurposeBox,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiAccountabilityRuleBox,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDecisionHero,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDecisionBody,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiScenario023MetricCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiScenario023TemplateBar,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiScenario023Details,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiScenario023NarrativeState,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiScenario023ApplyBar,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032Intro,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032MetricCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032Assessment,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032AssessmentFacts>div,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032OutsideDetails,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032EmptyState,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032TargetMet,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDatasetCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiCurrentDatasetViewBanner,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDuplicateReviewToolbar,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiCompactFilterCommandBar,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiStickyReviewToolbar,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiFilterDrawerPanel,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBulkWorkbench,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiFindTransactionsPanel,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiCategoryDrillCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiRuleListCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiImportRepoCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiModalBox,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDatasetDeletePanel{
  background:var(--pfi-lm-surface)!important;
  background-image:none!important;
  color:var(--pfi-lm-text)!important;
  border-color:var(--pfi-lm-border)!important;
  box-shadow:var(--pfi-lm-shadow)!important;
}

/* Nested cards receive a softer secondary surface instead of another dark slab. */
html[data-pfi-theme="light"] body.pfiDashboardPage .card .card,
html[data-pfi-theme="light"] body.pfiDashboardPage .cleanEntryZone,
html[data-pfi-theme="light"] body.pfiDashboardPage .reviewZone,
html[data-pfi-theme="light"] body.pfiDashboardPage #subscriptionList>*,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtList>*,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42SavingsCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBalanceMiniCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi48FocusItem,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi043DurationEnd,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiScenario023Check,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032DataNote,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032RecommendationNote,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiImportStatus,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiImportStepBanner,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiUserGuideBox,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiExampleCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .explain,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi84SectionExplainer,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi83FlowNote{
  background:var(--pfi-lm-surface-soft)!important;
  background-image:none!important;
  color:var(--pfi-lm-text)!important;
  border-color:#d4dee6!important;
  box-shadow:none!important;
}

/* Notes stay transparent by design; guidance blocks use borders/tints instead. */
html[data-pfi-theme="light"] body.pfiDashboardPage .note,
html[data-pfi-theme="light"] body.pfiDashboardPage p.note,
html[data-pfi-theme="light"] body.pfiDashboardPage div.note,
html[data-pfi-theme="light"] body.pfiDashboardPage span.note{
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  color:var(--pfi-lm-muted)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .callout,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi076Disclaimer,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi31Note,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi32InlineNote,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi24Help,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiImportStepBanner,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiUserGuideBox{
  background:#f4f8fb!important;
  color:#334a5d!important;
  border-color:#bcd0de!important;
}

/* Collapsible headers and controls use the same visual hierarchy everywhere. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiTargetHeader,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiMiniCollapseHeader,
html[data-pfi-theme="light"] body.pfiDashboardPage .collapsibleHeader,
html[data-pfi-theme="light"] body.pfiDashboardPage .fpiSectionControlHeader,
html[data-pfi-theme="light"] body.pfiDashboardPage .journeySectionTitle,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi60CollapseHeader,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiWelcomeCollapseHeader,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiMonthlyTargetHeader,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDecisionHeader,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiAprScenarioHeader{
  border-color:#d7e0e7!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiTargetCollapseBtn,
html[data-pfi-theme="light"] body.pfiDashboardPage .collapseToggle,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiCollapseButton,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiIndependentCollapseBtn,
html[data-pfi-theme="light"] body.pfiDashboardPage .fpiSectionCollapseBtn,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiMonthlyTargetBtn,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDecisionCollapseBtn,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiAprCollapseBtn,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi111CollapseBtn,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiFormulaToggle,
html[data-pfi-theme="light"] body.pfiDashboardPage .amortCollapseBtn,
html[data-pfi-theme="light"] body.pfiDashboardPage .fullSectionCollapseBtn{
  background:#edf2f6!important;
  color:#243442!important;
  border-color:#c8a64b!important;
  box-shadow:none!important;
}

/* Tables: one neutral hierarchy across every tab. */
html[data-pfi-theme="light"] body.pfiDashboardPage table,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiTableWrap,
html[data-pfi-theme="light"] body.pfiDashboardPage .accountabilityTableWrap,
html[data-pfi-theme="light"] body.pfiDashboardPage .changeTableWrap,
html[data-pfi-theme="light"] body.pfiDashboardPage .am1-table-wrap,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi044FullAmortTable,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42TableWrap,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiImportTableWrap,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiScenario023TableWrap,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032TableWrap{
  background:#fff!important;
  background-image:none!important;
  color:#17212b!important;
  border-color:var(--pfi-lm-border)!important;
  box-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage th,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi044FullAmortTable th,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiScenario023Table thead th,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032Table thead th{
  background:#edf2f6!important;
  color:#334a5d!important;
  border-color:#d5dee5!important;
  box-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage td{
  background:#fff!important;
  color:#17212b!important;
  border-color:#e0e6eb!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage tr:hover td{background:#f7f9fb!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage .total-row td,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi94TotalsRow td,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi95TotalsRow td,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi78TotalsRow td,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032Table tfoot td{
  background:#edf3f7!important;
  color:#17212b!important;
  border-color:#c9d5de!important;
}

/* Snapshot and staged cash progression. */
html[data-pfi-theme="light"] body.pfiDashboardPage #dashboardV2 .pfi42Track,
html[data-pfi-theme="light"] body.pfiDashboardPage #dashboardV2 .pfi051StageDelta{
  background:#e7edf2!important;
  border-color:#cbd6df!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #dashboardV2 .pfi42Line,
html[data-pfi-theme="light"] body.pfiDashboardPage #dashboardV2 .pfi42Table th,
html[data-pfi-theme="light"] body.pfiDashboardPage #dashboardV2 .pfi42Table td{
  border-color:#dde5eb!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #dashboardV2 .pfi051CashStage:not(:last-child)::after{
  background:#fff!important;
  border-color:#bdcbd5!important;
  color:var(--pfi-lm-gold)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #dashboardV2 .pfi051CashLegend{
  background:#f4f8fb!important;
  border-left-color:#4d83b3!important;
  color:#455d70!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #dashboardV2 .pfi42SavingsCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBalanceMiniCard.pfiBalanceGood{
  background:#f0f8f3!important;
  border-color:#9bc7ad!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBalanceMiniCard.pfiBalanceBad{
  background:#fff3f4!important;
  border-color:#d9a7ad!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBalanceMiniCard.pfiBalanceNeutral{
  background:#f4f7fa!important;
  border-color:#c4d0da!important;
}

/* Import / review workspace. */
html[data-pfi-theme="light"] body.pfiDashboardPage #transactionImportLab .pfiImportDropZone{
  background:#f7fafc!important;
  border-color:#8aa9bd!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #transactionImportLab .pfiImportDropZone:hover{
  background:#f1f6f9!important;
  border-color:#8a5f05!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDatasetCard.isCurrentDataset,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiSelectedRow td{
  background:#fff8df!important;
  border-color:#d5b65f!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiPotentialDuplicateRow td{
  background:#fff9ed!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiUnknownRow td{
  background:#fff8f0!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiFilterDrawerBackdrop,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDatasetDeleteBackdrop,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiModalOverlay{
  background:rgba(23,33,43,.34)!important;
}

/* Status panels retain meaning with pale surfaces and darker same-hue text. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiImportStatus.good,
html[data-pfi-theme="light"] body.pfiDashboardPage .accountabilityOk,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032StatusPill.good,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032VariancePill.good{
  background:#eef8f2!important;
  color:var(--pfi-lm-green)!important;
  border-color:#9bc7ad!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiImportStatus.warn,
html[data-pfi-theme="light"] body.pfiDashboardPage .accountabilityWarn,
html[data-pfi-theme="light"] body.pfiDashboardPage .accountabilityPartial,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032StatusPill.warn{
  background:#fff7e7!important;
  color:var(--pfi-lm-orange)!important;
  border-color:#d9b97b!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiImportStatus.bad,
html[data-pfi-theme="light"] body.pfiDashboardPage .accountabilityFlag,
html[data-pfi-theme="light"] body.pfiDashboardPage .accountabilityLessMin,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032StatusPill.bad,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032VariancePill.bad{
  background:#fff1f2!important;
  color:var(--pfi-lm-red)!important;
  border-color:#d9a7ad!important;
}

/* Semantic text palette: same hue family as dark mode, lowered lightness and
   moderated saturation for clear contrast on light surfaces. */
html[data-pfi-theme="light"] body.pfiDashboardPage .good,
html[data-pfi-theme="light"] body.pfiDashboardPage .principal,
html[data-pfi-theme="light"] body.pfiDashboardPage .positive,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42Green,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi053CashValue,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBalanceGood strong,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBalanceGood em,
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#86efac" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color: #86efac" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#61d36b" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#22c55e" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#10b981" i]{color:var(--pfi-lm-green)!important;}

html[data-pfi-theme="light"] body.pfiDashboardPage .bad,
html[data-pfi-theme="light"] body.pfiDashboardPage .interest,
html[data-pfi-theme="light"] body.pfiDashboardPage .negative,
html[data-pfi-theme="light"] body.pfiDashboardPage .criticalRed,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42Red,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi053CashValue.short,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi052Shortfall,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi052KpiShortfall,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBalanceBad strong,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBalanceBad em,
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#fca5a5" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color: #fca5a5" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#ff5353" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#ef4444" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#ff5c63" i]{color:var(--pfi-lm-red)!important;}

html[data-pfi-theme="light"] body.pfiDashboardPage .warn,
html[data-pfi-theme="light"] body.pfiDashboardPage .warning,
html[data-pfi-theme="light"] body.pfiDashboardPage .darkOrange,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42Orange,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiExtraAboveMinimumOrange,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi053CashValue.zero,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi053CashDelta strong,
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#fb923c" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color: #fb923c" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#ff982f" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#f97316" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#fdba74" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#f59e0b" i]{color:var(--pfi-lm-orange)!important;}

html[data-pfi-theme="light"] body.pfiDashboardPage .savingsBlue,
html[data-pfi-theme="light"] body.pfiDashboardPage [class*="BlueText" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#5b9df9" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#38bdf8" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#60a5fa" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#93c5fd" i]{color:var(--pfi-lm-blue)!important;}

html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8PageBadge,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi051StageDelta strong,
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#f4bd3b" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#f7cd5e" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#ffd76f" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#ffe18a" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#e3ad32" i],
html[data-pfi-theme="light"] body.pfiDashboardPage [style*="color:#d4a63f" i]{color:var(--pfi-lm-gold)!important;}

/* Neutral secondary text is dark enough for sustained reading on white. */
html[data-pfi-theme="light"] body.pfiDashboardPage .mini,
html[data-pfi-theme="light"] body.pfiDashboardPage .subtitle,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiWelcomeSubtitle,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi043EndMini,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi043OneTime,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi044StatLabel,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi051StageStep,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi051StageDelta,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi093Label,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiScenario023Secondary,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032Secondary,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032AssessmentFacts span,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDatasetViewEyebrow,
html[data-pfi-theme="light"] body.pfiDashboardPage label{
  color:var(--pfi-lm-muted)!important;
}

/* Strong values and headings use the same near-black reference as Command Center. */
html[data-pfi-theme="light"] body.pfiDashboardPage h1,
html[data-pfi-theme="light"] body.pfiDashboardPage h2,
html[data-pfi-theme="light"] body.pfiDashboardPage h3,
html[data-pfi-theme="light"] body.pfiDashboardPage h4,
html[data-pfi-theme="light"] body.pfiDashboardPage strong,
html[data-pfi-theme="light"] body.pfiDashboardPage .metric,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42Kpi .value,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi051StageLabel,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi093Value,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi103SubShareValue,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBalanceMiniCard strong,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032AssessmentFacts b,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032OutsideDetails summary,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032CategoryName{
  color:var(--pfi-lm-text)!important;
}

/* Re-assert semantic value colors after the generic strong/value rule above. */
html[data-pfi-theme="light"] body.pfiDashboardPage strong.good,
html[data-pfi-theme="light"] body.pfiDashboardPage .metric.good,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42Green,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42SavingsCard strong,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBalanceMiniCard.pfiBalanceGood strong{color:var(--pfi-lm-green)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage strong.bad,
html[data-pfi-theme="light"] body.pfiDashboardPage .metric.bad,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42Red,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiBalanceMiniCard.pfiBalanceBad strong{color:var(--pfi-lm-red)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage strong.warn,
html[data-pfi-theme="light"] body.pfiDashboardPage .metric.warn,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi42Orange{color:var(--pfi-lm-orange)!important;}

/* Progress tracks stay quiet; fills keep their original semantic hue family. */
html[data-pfi-theme="light"] body.pfiDashboardPage .progressTrack,
html[data-pfi-theme="light"] body.pfiDashboardPage .progressMiniBar,
html[data-pfi-theme="light"] body.pfiDashboardPage .snapshotTrendBar,
html[data-pfi-theme="light"] body.pfiDashboardPage .compareBar,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032BarTrack{
  background:#dfe7ed!important;
  border-color:#cbd6df!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .progressFill,
html[data-pfi-theme="light"] body.pfiDashboardPage .progressMiniFill,
html[data-pfi-theme="light"] body.pfiDashboardPage .fillPrincipal,
html[data-pfi-theme="light"] body.pfiDashboardPage .barPrincipal{background:#2a9560!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage .fillInterest,
html[data-pfi-theme="light"] body.pfiDashboardPage .barInterest{background:#c64a55!important;}

/* Yellow controls intentionally keep dark text; destructive controls use black text in Light Mode. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiUtilityActionButton *,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiStartButton *,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiNext *,
html[data-pfi-theme="light"] body.pfiDashboardPage .primaryNav *,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiYellowBackgroundBlackText *{color:#111!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage button.danger *,
html[data-pfi-theme="light"] body.pfiDashboardPage button[class*="delete" i] *,
html[data-pfi-theme="light"] body.pfiDashboardPage button[class*="remove" i] *{color:#000!important;}

/* Tooltips remain intentionally dark: they are transient contrast surfaces. */
html[data-pfi-theme="light"] body.pfiDashboardPage .infoTip:hover::after{
  background:#17212b!important;
  color:#000!important;
  border-color:#17212b!important;
}

@media(max-width:760px){
  html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8Sidebar{background:#fff!important;}
}


/* Build 061 coverage addendum — legacy/dynamic component families still used
   by active tabs are normalized here so they cannot fall back to dark slabs. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi042DebtBalanceCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi104AwarenessCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi054MetricCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi76Card,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi64CapacityCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi97FlowCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiQuestionInsightCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiCategoryInsightCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .pathBox,
html[data-pfi-theme="light"] body.pfiDashboardPage .strikeCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .debtFlowCard,
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyFlowCard{
  background:#fff!important;
  background-image:none!important;
  color:#17212b!important;
  border-color:#cbd6df!important;
  box-shadow:var(--pfi-lm-shadow)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pathABox,
html[data-pfi-theme="light"] body.pfiDashboardPage .pathLinkedA,
html[data-pfi-theme="light"] body.pfiDashboardPage .debtFlowFixed,
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyFixed{border-color:#6f9fbe!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage .pathBBox,
html[data-pfi-theme="light"] body.pfiDashboardPage .pathLinkedB,
html[data-pfi-theme="light"] body.pfiDashboardPage .debtFlowDebt,
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyDebt{border-color:#bd8a35!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage .debtFlowIncome,
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyIncome{border-color:#5d9d78!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage .journeySubscriptions{border-color:#8c73b3!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage .pathBridge{
  background:#f6f2fb!important;
  background-image:none!important;
  color:var(--pfi-lm-purple)!important;
  border-color:#9d84c1!important;
  box-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pathABadge,
html[data-pfi-theme="light"] body.pfiDashboardPage .pathLinkedA::before{
  background:#eaf4fb!important;color:var(--pfi-lm-blue)!important;border-color:#8ab3cf!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pathBBadge,
html[data-pfi-theme="light"] body.pfiDashboardPage .pathLinkedB::before{
  background:#fff5e5!important;color:var(--pfi-lm-orange)!important;border-color:#d1ad70!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .winnerRibbon,
html[data-pfi-theme="light"] body.pfiDashboardPage .snapshotNowBox,
html[data-pfi-theme="light"] body.pfiDashboardPage .forecastWin{
  background:#eef8f2!important;color:var(--pfi-lm-green)!important;border-color:#9bc7ad!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .forecastWatch{
  background:#eef6fb!important;color:var(--pfi-lm-blue)!important;border-color:#9cbdd4!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .forecastWarn{
  background:#fff6e9!important;color:var(--pfi-lm-orange)!important;border-color:#d9b97b!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .debtFlowArrow,
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyFlowArrow{color:var(--pfi-lm-blue)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage .debtFlowStat,
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyStat{color:var(--pfi-lm-muted)!important;border-color:#d7e0e7!important;}

/* Accountability Center's normalized ledger has its own am1/am5 component set. */
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-topbar,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-kpi,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-panel{
  background:#fff!important;
  color:#17212b!important;
  border-color:#cbd6df!important;
  box-shadow:var(--pfi-lm-shadow)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-filterbar{
  background:#f7f9fb!important;
  border-color:#cbd6df!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput details.am5-multi>summary,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-menu,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-menu-tools button,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-option input,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-input,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-select{
  background:#fff!important;
  color:#17212b!important;
  border-color:#b8c7d3!important;
  box-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-menu{box-shadow:0 12px 28px rgba(34,54,70,.16)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-menu-tools{border-color:#d7e0e7!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-option{color:#314657!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-option:hover{background:#edf3f7!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-option input:checked,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-reset{background:#e3ad32!important;color:#111!important;border-color:#c78f17!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-topbar h2,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-panel h3,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-kpi-value{color:#17212b!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-sub,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .mini,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-kpi-label,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-kpi-note,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-filter-summary,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-kind,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput details.am5-multi>summary:after{color:var(--pfi-lm-muted)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-kpi.good .am1-kpi-value,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-standing.paid{color:var(--pfi-lm-green)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-kpi.warn .am1-kpi-value,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-standing.partial,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-standing.needs{color:var(--pfi-lm-orange)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am1-kpi.bad .am1-kpi-value,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-standing.overdue{color:var(--pfi-lm-red)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-standing.scheduled{color:var(--pfi-lm-blue)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-standing{
  background:#f4f7fa!important;border-color:#c3d0da!important;color:#455d70!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-standing.paid{background:#eef8f2!important;border-color:#9bc7ad!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-standing.overdue{background:#fff1f2!important;border-color:#d9a7ad!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-standing.partial,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-standing.needs{background:#fff7e7!important;border-color:#d9b97b!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage #debtReviewRebuiltOutput .am5-standing.scheduled{background:#eef6fb!important;border-color:#9cbdd4!important;}

/* Shared badge / pill governance for dynamically generated UI. */
html[data-pfi-theme="light"] body.pfiDashboardPage [class*="Badge"]:not(.pfiV8PageBadge):not(.pathABadge):not(.pathBBadge),
html[data-pfi-theme="light"] body.pfiDashboardPage [class*="Pill"]{
  background:#f3f6f9!important;
  color:#455d70!important;
  border-color:#c3d0da!important;
  box-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDatasetCard.isCurrentDataset .pfiDatasetScopeBadge,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiOriginalRowBadge,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiReadinessBadge.ready,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiConfidenceHigh{
  background:#eef8f2!important;color:var(--pfi-lm-green)!important;border-color:#9bc7ad!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDuplicateRemoveChoice,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDuplicateBadge,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiReadinessBadge.estimated,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiConfidenceMedium{
  background:#fff7e7!important;color:var(--pfi-lm-orange)!important;border-color:#d9b97b!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiReadinessBadge.limited,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiConfidenceLow{
  background:#fff1f2!important;color:var(--pfi-lm-red)!important;border-color:#d9a7ad!important;
}

/* Additional named semantic text classes from historical modules. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.accountabilityOk,.changeActive,.pfiConfidenceHigh,.pfiPayoffGreen,.pfi31Good,.pfi31Label,.pfi32Good,.pfi32Decision,.pfi38Green,.pfiAvailable,.pfiScenarioDeltaGood,.pfi046BreakdownMessage.good,.pfiReadinessBadge.ready,.pfi054MetricDetail.good,.pfi24AddStatus){color:var(--pfi-lm-green)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.accountabilityFlag,.accountabilityLessMin,.pfiConfidenceLow,.pfiPayoffRed,.pfi31Bad,.pfi32Bad,.pfi38Red,.pfiScenarioDeltaBad,.pfi054MetricDetail.bad,.pfi-negative-value){color:var(--pfi-lm-red)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.accountabilityWarn,.accountabilityPartial,.changeFuture,.pfiConfidenceMedium,.pfiPayoffYellow,.pfiPayoffOrange,.pfi31Warn,.pfi31Orange,.pfi32Warn,.pfi32Orange,.pfi38Orange,.pfiScenarioDeltaNeutral,.pfiUnknown,.pfiLimited,.pfi093Subtotal,.pfi094GroupTotal,.pfi046BreakdownMessage.warn){color:var(--pfi-lm-orange)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.savingsBlue,.pfiDatasetViewEyebrow,.pfi036ActiveFilters>span,.pfi041SelectedBreakdown>span,.pfi041FilterRow>span,.pfi104AwarenessCard span){color:var(--pfi-lm-blue)!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.pfi2026Eyebrow,.pfi093RecordFacts b,.pfi041SelectedBreakdown>strong,.pfi104Tag){color:var(--pfi-lm-gold)!important;}

/* Readable neutrals for dynamic labels that otherwise retain dark-theme pale text. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.pfi054MetricDetail,.pfiAccountabilityAwarenessTitle,.pfiAccountabilityAwarenessSubmetric,.pfi022AccountabilityTitle,.pfi022AccountabilitySecondary,.pfiScenario023MetricTitle,.pfiScenario023Secondary,.pfiScenario023TemplateBar>span,.pfiDisc032MetricTitle,.pfiDisc032Secondary,.pfiDisc032Assessment>p,.pfiDisc032EmptyState p,.pfiDisc032TargetMet p,.pfiDirectImportHelp,.pfiFindTransactionsNote,.pfiStep3SelectionCount,.pfi043RecurringCheck,.pfi044StatValue,.pfi093GroupMeta,.pfi093RecordFacts,.pfi093Why,.pfi094GroupHeader,.pfi094GroupMeta,.pfi094ExpenseName,.pfi094ExpenseCategory,.pfi094FactLabel,.pfi094Empty,.pfi094SourceBadge,.pfi102FixedTextHint,.pfi103EntryHint,.pfi103Empty,.pfi050DebtBurden,.pfi050DebtBurdenLabel strong,.pfi053CashFlowHead h4,.pfi053CashLabel,.pfi053CashDelta,.pfi053CashFooter,.pfi042Label,.pfi042DebtBalanceSplit,.pfi042DebtBalanceNote){
  color:var(--pfi-lm-muted)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.pfi044StatValue,.pfi094GroupHeader,.pfi094ExpenseName,.pfi053CashFlowHead h4,.pfi050DebtBurdenLabel strong){color:var(--pfi-lm-text)!important;}

/* Fixed expense / subscription / debt input grids keep their visual grouping. */
html[data-pfi-theme="light"] body.pfiDashboardPage #setup .pfi094Group,
html[data-pfi-theme="light"] body.pfiDashboardPage #setup .pfi102FixedTextRow,
html[data-pfi-theme="light"] body.pfiDashboardPage #subscriptionList .pfi103SubscriptionRow,
html[data-pfi-theme="light"] body.pfiDashboardPage #debtList .pfi103DebtRow{
  background:#fff!important;
  border-color:#cbd6df!important;
  box-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #setup .pfi102FixedTextRow input[readonly]{background:#edf2f6!important;color:#455d70!important;}

/* Do not let the general badge/pill rule overwrite the intentional gold page badge. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiV8PageBadge{background:#fff7df!important;color:#7b5505!important;border-color:#d7b45e!important;}

/* ========================================================================== 
   PFI BUILD 062 — LIGHT MODE CONTRAST + WHITE-SURFACE GOVERNANCE
   --------------------------------------------------------------------------
   Light Mode now follows a stricter presentation contract:
   - structural typography is black on light surfaces;
   - tables are white with black text;
   - informational/guidance containers do not retain dark-mode slabs;
   - any intentionally dark interactive surface uses white text.
   Dark mode and application/financial logic are unchanged.
   ========================================================================== */

/* Structural typography: titles, subtitles, captions, headings, labels that
   identify a section, and small structural captions use true black. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  h1,h2,h3,h4,h5,h6,
  legend,caption,figcaption,
  [class*="title" i],
  [class*="subtitle" i],
  [class*="caption" i],
  [class*="subcaption" i],
  [class*="heading" i],
  [class*="eyebrow" i]
){
  color:#000!important;
  text-shadow:none!important;
}

/* Common structural labels/captions should never inherit pale dark-theme text. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .journeyStep>span,
  .journeyIntent>span,
  .pfi053CashLabel,
  .pfi053CashStep,
  .pfi093Label,
  .pfi042Label,
  .pfi102Field label,
  .pfi103Field label,
  .pfi24Field label,
  .am1-kpi-label,
  .pfiV8PageIntro p:first-child
){
  color:#000!important;
}

/* Informational and explanatory containers use the same white surface as the
   surrounding Light Mode workspace. They can keep a meaningful border/accent,
   but no dark navy/charcoal fill. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .journeyIntent,
  .cashLeftBig,
  .pfi64CapacityIntro,
  .pfi76Note,
  .pfi81CalendarFlow,
  .pfi95AccountabilityGuide,
  .pfi033RecurringBand,
  .pfi033DurationEnd,
  .pfi043DurationEnd,
  .pfiMoveMiniList,
  .pfi24Help,
  .pfi83FlowNote,
  .pfi84SectionExplainer,
  .pfiUserGuideBox,
  .pfiExampleCard,
  .explain
){
  background:#fff!important;
  background-image:none!important;
  color:#111!important;
  border-color:#cbd6df!important;
  box-shadow:none!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyIntent .note,
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyIntent p,
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyIntent span,
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.pfi64CapacityIntro,.pfi76Note,.pfi81CalendarFlow,.pfi95AccountabilityGuide,.pfi033RecurringBand,.pfi24Help,.pfi83FlowNote,.pfi84SectionExplainer,.pfiUserGuideBox,.pfiExampleCard,.explain) :is(p,span,small,strong,b,em,label){
  color:#111!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyIntent>span{
  color:#000!important;
  font-weight:800!important;
}

/* Additional legacy entry/review surfaces that still carry hard-coded dark
   backgrounds are normalized to the white-surface contract. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .pfi093GroupHead,
  .pfi093RecordSummary,
  #setup .pfi094FixedManager,
  #setup .pfi094AddPanel,
  #setup .pfi094GroupHeader,
  #setup .pfi094EditRow,
  #setup .pfi094Empty,
  #debts #debtList .pfiRecordCard,
  .pfiTabMetricCard,
  .pfiRecordCard,
  .pfiEmptyEntryCard
){
  background:#fff!important;
  background-image:none!important;
  color:#111!important;
  border-color:#cbd6df!important;
  box-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.pfi093GroupHead,.pfi093RecordSummary,#setup .pfi094GroupHeader) :is(span,strong,b,small){
  color:#000!important;
}

/* Semantic dark-mode status cards are converted to light surfaces while
   retaining the original semantic hue through border/text accents. */
html[data-pfi-theme="light"] body.pfiDashboardPage .forecastWin,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiFindActionHint,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiPayoffGreen{
  background:#f3faf6!important;
  color:#123d29!important;
  border-color:#78b997!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .forecastWatch{
  background:#f3f8fc!important;
  color:#173b59!important;
  border-color:#86aecb!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pathABadge{
  background:#eef7fc!important;
  color:#173b59!important;
  border-color:#86aecb!important;
}

/* TABLE CONTRACT: white canvas + black typography everywhere. No gray header,
   tinted total row, hover fill, selected-row fill, or semantic text colors
   inside the table should undermine readability. Selection remains visible
   through borders/accents rather than a different cell background. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  table,
  thead,tbody,tfoot,tr,th,td,
  .pfiTableWrap,
  .accountabilityTableWrap,
  .changeTableWrap,
  .am1-table-wrap,
  .pfi044FullAmortTable,
  .pfi42TableWrap,
  .pfiImportTableWrap,
  .pfiScenario023TableWrap,
  .pfiDisc032TableWrap
){
  background:#fff!important;
  background-image:none!important;
  color:#000!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage table :is(
  th,td,p,span,small,strong,b,em,label,a,div
){
  color:#000!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage table th,
html[data-pfi-theme="light"] body.pfiDashboardPage table td{
  background:#fff!important;
  color:#000!important;
  border-color:#d6dde3!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage table tr:hover>td,
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .total-row,
  .pfi94TotalsRow,
  .pfi95TotalsRow,
  .pfi78TotalsRow,
  .pfiSelectedRow,
  .pfiPotentialDuplicateRow,
  .pfiUnknownRow
)>td,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiDisc032Table tfoot td{
  background:#fff!important;
  color:#000!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiSelectedRow>td:first-child{
  box-shadow:inset 4px 0 0 #8a5f05!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiPotentialDuplicateRow>td:first-child{
  box-shadow:inset 4px 0 0 #9f5108!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiUnknownRow>td:first-child{
  box-shadow:inset 4px 0 0 #526575!important;
}

/* Table-contained controls keep their own button semantics after the table
   text rule above. Neutral/yellow controls use black; genuinely dark/danger
   controls use white. */
html[data-pfi-theme="light"] body.pfiDashboardPage table button,
html[data-pfi-theme="light"] body.pfiDashboardPage table button *{
  color:#000!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage table button.danger,
html[data-pfi-theme="light"] body.pfiDashboardPage table button.danger *,
html[data-pfi-theme="light"] body.pfiDashboardPage table button[class*="delete" i],
html[data-pfi-theme="light"] body.pfiDashboardPage table button[class*="delete" i] *,
html[data-pfi-theme="light"] body.pfiDashboardPage table button[class*="remove" i],
html[data-pfi-theme="light"] body.pfiDashboardPage table button[class*="remove" i] *{
  color:#000!important;
}

/* If a truly dark control/surface remains intentionally dark in Light Mode,
   its foreground must remain legible. These are the remaining intentional dark
   surfaces, not informational content containers. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .pfiBootNotice,
  button.danger,
  button[class*="delete" i],
  button[class*="remove" i]
),
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .pfiBootNotice,
  button.danger,
  button[class*="delete" i],
  button[class*="remove" i]
) *{
  color:#000!important;
}

/* Preserve semantic colors for values/statuses outside tables. Structural
   headings/captions and all table typography remain black by governance. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .good,.principal,.positive,.pfi42Green,.pfi053CashValue,
  .bad,.interest,.negative,.criticalRed,.pfi42Red,.pfi053CashValue.short,
  .warn,.warning,.darkOrange,.pfi42Orange,.pfi053CashValue.zero,
  .savingsBlue,.pfi054MetricDetail.good,.pfi054MetricDetail.bad
):not(h1):not(h2):not(h3):not(h4):not(h5):not(h6){
  text-shadow:none!important;
}


/* ========================================================================== 
   PFI BUILD 063 — COMMAND CENTER LIGHT-MODE PARITY
   --------------------------------------------------------------------------
   The Command Center is the visual authority for Light Mode. The dashboard
   now follows the same white-surface / dark-text / restrained-border system.
   This layer intentionally affects presentation only.
   ========================================================================== */

html[data-pfi-theme="light"] body.pfiDashboardPage{
  --pfi063-page:#eef3f7;
  --pfi063-surface:#ffffff;
  --pfi063-soft:#f7f9fb;
  --pfi063-line:#cbd6df;
  --pfi063-line-soft:#dbe3e9;
  --pfi063-text:#000000;
  --pfi063-body:#334155;
  --pfi063-muted:#526575;
  --pfi063-gold:#d49b17;
  background:linear-gradient(180deg,#f7f9fb 0%,#eef3f7 100%)!important;
  color:var(--pfi063-text)!important;
}

/* One authoritative light workspace. */
html[data-pfi-theme="light"] body.pfiDashboardPage .container,
html[data-pfi-theme="light"] body.pfiDashboardPage main{
  color:var(--pfi063-text)!important;
}

/* Primary PFI tabs: normalize legacy dark cards, panels, heroes, shells, and
   guidance blocks to the same surface language as Command Center. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  #welcome,#setup,#subscriptions,#debts,#dashboardV2,#financialDecisionLab,
  #debtReviewRebuilt,#roadmapCashFlow,#extraPaymentModeling,#amortization,
  #discretionaryEstimates,#transactionImportLab,#faqAwareness,#inputsCenter,#debtReview
) :is(
  .pfiWelcomeHero,.pfiInputsHero,.journeyHero,.journeyIntent,.pfiRuleCard,
  [class*="Card"],[class*="Panel"],[class*="Hero"],[class*="Shell"],
  [class*="Section"],[class*="Summary"],[class*="Guide"],[class*="Intent"]
){
  background:var(--pfi063-surface)!important;
  background-image:none!important;
  color:var(--pfi063-text)!important;
  border-color:var(--pfi063-line)!important;
  text-shadow:none!important;
}

/* Containers that are structural rather than cards should stay visually quiet. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  #welcome,#setup,#subscriptions,#debts,#dashboardV2,#financialDecisionLab,
  #debtReviewRebuilt,#roadmapCashFlow,#extraPaymentModeling,#amortization,
  #discretionaryEstimates,#transactionImportLab,#faqAwareness,#inputsCenter,#debtReview
) :is(.grid,.twoCol,[class*="Grid"],[class*="Body"],[class*="Content"]){
  text-shadow:none!important;
}

/* Explicit Start Here fixes: these had high-specificity legacy dark rules. */
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome .pfiWelcomeHero{
  background:#fff!important;
  border:1px solid var(--pfi063-line)!important;
  border-left:5px solid var(--pfi063-gold)!important;
  box-shadow:0 12px 30px rgba(28,46,61,.08)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome .pfiWelcomeHero h2,
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome .pfiWelcomeSubtitle{
  color:#000!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome .pfiWelcomeSubtitle{
  color:var(--pfi063-body)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome .pfiRuleCard,
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome .card{
  background:#fff!important;
  background-image:none!important;
  border-color:var(--pfi063-line)!important;
  color:#000!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome .card .card{
  background:#fff!important;
  border-color:#d6e0e7!important;
  box-shadow:none!important;
}

/* Typography contract: structural language is black. Explanatory prose is a
   dark slate only when it is not a structural title/caption. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  #welcome,#setup,#subscriptions,#debts,#dashboardV2,#financialDecisionLab,
  #debtReviewRebuilt,#roadmapCashFlow,#extraPaymentModeling,#amortization,
  #discretionaryEstimates,#transactionImportLab,#faqAwareness,#inputsCenter,#debtReview
) :is(
  h1,h2,h3,h4,h5,h6,legend,caption,figcaption,
  [class*="Title"],[class*="title"],[class*="Subtitle"],[class*="subtitle"],
  [class*="Caption"],[class*="caption"],[class*="Heading"],[class*="heading"],
  [class*="Eyebrow"],[class*="eyebrow"]
){
  color:#000!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  #welcome,#setup,#subscriptions,#debts,#dashboardV2,#financialDecisionLab,
  #debtReviewRebuilt,#roadmapCashFlow,#extraPaymentModeling,#amortization,
  #discretionaryEstimates,#transactionImportLab,#faqAwareness,#inputsCenter,#debtReview
) :is(p,.note,.mini,small){
  color:var(--pfi063-body)!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  #welcome,#setup,#subscriptions,#debts,#dashboardV2,#financialDecisionLab,
  #debtReviewRebuilt,#roadmapCashFlow,#extraPaymentModeling,#amortization,
  #discretionaryEstimates,#transactionImportLab,#faqAwareness,#inputsCenter,#debtReview
) :is(label,.journeyStep>span,.journeyIntent>span){
  color:#000!important;
  text-shadow:none!important;
}

/* Journey / explanatory boxes do not need a dark-mode slab in Light Mode. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  #welcome,#setup,#subscriptions,#debts,#dashboardV2,#financialDecisionLab,
  #debtReviewRebuilt,#roadmapCashFlow,#extraPaymentModeling,#amortization,
  #discretionaryEstimates,#transactionImportLab,#faqAwareness,#inputsCenter,#debtReview
) .journeyIntent{
  background:#fff!important;
  border:1px solid var(--pfi063-line)!important;
  box-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyIntent :is(span,p,.note,strong,b){color:#000!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage .journeyIntent p.note{color:var(--pfi063-body)!important;}

/* TABLE AUTHORITY: every table is a white canvas with black typography. The
   :is(#id...) selector supplies ID-level specificity to defeat legacy table
   rules such as #welcome table... that used !important. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  #welcome,#setup,#subscriptions,#debts,#dashboardV2,#financialDecisionLab,
  #debtReviewRebuilt,#roadmapCashFlow,#extraPaymentModeling,#amortization,
  #discretionaryEstimates,#transactionImportLab,#faqAwareness,#inputsCenter,#debtReview
) :is(table,thead,tbody,tfoot,tr,th,td){
  background:#fff!important;
  background-image:none!important;
  color:#000!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  #welcome,#setup,#subscriptions,#debts,#dashboardV2,#financialDecisionLab,
  #debtReviewRebuilt,#roadmapCashFlow,#extraPaymentModeling,#amortization,
  #discretionaryEstimates,#transactionImportLab,#faqAwareness,#inputsCenter,#debtReview
) table :is(th,td,p,span,small,strong,b,em,label,a,div){
  color:#000!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  #welcome,#setup,#subscriptions,#debts,#dashboardV2,#financialDecisionLab,
  #debtReviewRebuilt,#roadmapCashFlow,#extraPaymentModeling,#amortization,
  #discretionaryEstimates,#transactionImportLab,#faqAwareness,#inputsCenter,#debtReview
) table :is(th,td){
  border-color:#d6dde3!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome .pfiWelcomeJourneyTableWrap,
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome table.pfiWelcomeJourneyTable,
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome table.pfiWelcomeJourneyTable :is(th,td){
  background:#fff!important;
  color:#000!important;
  border-color:#d6dde3!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome table.pfiWelcomeJourneyTable td:first-child,
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome table.pfiWelcomeJourneyTable td:nth-child(2),
html[data-pfi-theme="light"] body.pfiDashboardPage #welcome table.pfiWelcomeJourneyTable td:nth-child(3){color:#000!important;}

/* Form fields match Command Center: white, dark text, crisp borders. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(input,select,textarea){
  background:#fff!important;
  background-image:none!important;
  color:#000!important;
  border-color:#b8c7d3!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(input,textarea)::placeholder{color:#64748b!important;opacity:1!important;}

/* Bottom journey navigation should transition with the page, not remain a
   dark-mode bar. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiTabNavFooter{
  background:#fff!important;
  background-image:none!important;
  color:#000!important;
  border-color:var(--pfi063-line)!important;
  box-shadow:0 8px 22px rgba(28,46,61,.07)!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiTabNavFooter .pfiTabNavLabel{color:#000!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiTabNavFooter button:not(.pfiNext){
  background:#fff!important;color:#000!important;border:1px solid #b8c7d3!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiTabNavFooter button.pfiNext{
  background:linear-gradient(135deg,#f3c65a,#e3ad32)!important;
  color:#111!important;border-color:#c78f17!important;
}

/* Known high-specificity historical dark surfaces. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .pfi97FlowSection,.pfi97FlowCard,.pfi97InterestAvoidedCard,
  .pfiSavingsTransferCard,.cashMonthCard,.pfi043DurationEnd,
  .pfi033DurationEnd,.pfi020ExtraIncomeCard,.pfiRecordCard,
  .pfiDecisionHero,.pfiDecisionBody,.pfiInputsHero
){
  background:#fff!important;background-image:none!important;color:#000!important;
  border-color:var(--pfi063-line)!important;box-shadow:none!important;
}

/* Runtime safeguard adds this class only when computed Light Mode still has a
   genuinely dark surface. Black foreground is enforced in Light Mode. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiLightOnDark,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiLightOnDark *{
  color:#000!important;
  text-shadow:none!important;
}

/* Gold / semantic value colors remain recognizable on white backgrounds. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.good,.principal,.positive,.pfi42Green,.pfi053CashValue){color:#147447!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.bad,.interest,.negative,.criticalRed,.pfi42Red,.pfi053CashValue.short){color:#b33643!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.warn,.warning,.darkOrange,.pfi42Orange,.pfi053CashValue.zero){color:#9f5108!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.savingsBlue,.pfiBlue,.pfi42Blue){color:#245f97!important;}

/* Never let semantic overrides make a table unreadable. */
html[data-pfi-theme="light"] body.pfiDashboardPage table :is(.good,.principal,.positive,.bad,.interest,.negative,.warn,.warning,.darkOrange,.savingsBlue,.pfiBlue,.pfi42Blue,.pfi42Green,.pfi42Red,.pfi42Orange){color:#000!important;}


/* ========================================================================== 
   PFI BUILD 064 — LIGHT MODE WHITE-SURFACE GOVERNANCE
   --------------------------------------------------------------------------
   Light Mode is intentionally flat, clean, and consistent: no legacy dark
   content slabs. White is the default content surface, black/dark-slate is the
   default text treatment, and semantic color is reserved for meaning.
   ========================================================================== */

html[data-pfi-theme="light"] body.pfiDashboardPage{
  --pfi064-page:#eef3f7;
  --pfi064-surface:#ffffff;
  --pfi064-line:#cbd6df;
  --pfi064-line-soft:#dbe3e9;
  --pfi064-text:#000000;
  --pfi064-body:#334155;
}

/* Every primary tab itself is transparent against the light workspace. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  #welcome,#setup,#subscriptions,#debts,#dashboardV2,#financialDecisionLab,
  #debtReviewRebuilt,#roadmapCashFlow,#extraPaymentModeling,#amortization,
  #discretionaryEstimates,#transactionImportLab,#faqAwareness,#inputsCenter,#debtReview
){
  background:transparent!important;
  background-image:none!important;
  color:var(--pfi064-text)!important;
}

/* All legacy dark content families become white in Light Mode. This intentionally
   includes informational, guidance, calculation, calendar, accountability,
   snapshot, import, and modeling surfaces. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .card,.panel,.section,.journeyHero,.journeyIntent,.journeyStep,.explain,.callout,
  .pathBox,.strikeCard,.winnerRibbon,.debtFlowCard,.snapshotNowBox,.journeyFlowCard,
  .forecastWin,.forecastWatch,.forecastWarn,.compactMiscRow,.pfi020ExtraIncomeCard,
  .pfi020ExtraIncomeCardHead,.pfi021RecurringToggle,.pfi021RecurringDetails,
  .templateStatus,.savingsMilestone,.columnControls,.dailyEncouragement,
  .accountabilityFilters,.changeRuleBox,.pfi42Panel,.pfi42Kpi,.pfi42ScenarioBox,
  .pfi42SavingsCard,.pfi48FocusItem,.pfi53FlowCard,.pfi54FlowCard,.pfi60FlowCard,
  .pfi64CapacityCard,.pfi64CapacityIntro,.pfi76Card,.pfi76Note,.pfi79GuideNote,
  .pfi81CalendarFlow,.pfi81CalendarCard,.pfi83FlowNote,.pfi84SectionExplainer,
  .pfi88Intro,.pfi88Card,.pfi93MultiFileNote,.pfi93FileQueueCard,.pfi94MonthCard,
  .pfi95AccountabilityGuide,.pfi96CalendarSummary,.pfi96SummaryCard,.pfi97FlowSection,
  .pfi97FlowCard,.pfiWelcomeJourneyTableWrap,.pfiUserGuideBox,.pfiImportRepoCard,
  .pfiTabMetricCard,.pfiRecordCard,.pfiEmptyEntryCard,.pfi106AccountabilityGuide,
  .pfi106GuideCard,.pfi111CalendarShell,.pfi111TopSelector,.pfi111SummaryPanel,
  .pfi111AwarenessPanel,.pfi111MetricCard,.pfi111AwarenessCard,.pfiIndependentCollapseShell,
  .pfiExtraSimpleSection,.pfi043ExtraCard,.pfi043DurationEnd,.pfi033DurationEnd,
  .pfi044Stat,.pfi044FullAmortTable,.cashMonthCard,.cashLeftBig,.pfiAccountabilityCard,
  .pfiAccountabilityJourneyCard,.pfiAccountabilityPurposeBox,.pfiAccountabilityRuleBox,
  .pfiDecisionHero,.pfiDecisionBody,.pfiScenario023Section,.pfiScenario023MetricCard,
  .pfiScenario023TemplateBar,.pfiScenario023Details,.pfiScenario023NarrativeState,
  .pfiScenario023ApplyBar,.pfiDisc032Intro,.pfiDisc032MetricCard,.pfiDisc032Assessment,
  .pfiDisc032OutsideDetails,.pfiDisc032EmptyState,.pfiDisc032TargetMet,.pfiDatasetCard,
  .pfiCurrentDatasetViewBanner,.pfiDuplicateReviewToolbar,.pfiCompactFilterCommandBar,
  .pfiStickyReviewToolbar,.pfiFilterDrawerPanel,.pfiBulkWorkbench,.pfiFindTransactionsPanel,
  .pfiCategoryDrillCard,.pfiRuleListCard,.pfiModalBox,.pfiDatasetDeletePanel,
  .pfiImportStatus,.pfiImportStepBanner,.pfiExampleCard,.pfi061Center,.pfi086ScoreCard,
  .pfi086DriversCard,.pfi31Card,.pfi32Panel,.pfi053CashFlowPanel,.pfi053CashStage,
  .pfi053CashFooter,.pfi093Metric,.pfi093Group,.pfi094Group,.pfi103SubscriptionRow,
  .pfi103DebtRow,.pfi17SavingsSection,.pfi024IncomeFinancials,.pfi054MetricCard,
  .pfi054AllocationCard,.pfi054CashCard,.pfi054DebtCard,.pfi054AwarenessCard
){
  background:#fff!important;
  background-image:none!important;
  color:var(--pfi064-text)!important;
  border-color:var(--pfi064-line)!important;
  text-shadow:none!important;
}

/* Catch component families added dynamically or inherited from older builds. */
html[data-pfi-theme="light"] body.pfiDashboardPage .container :is(
  [class*="Card"],[class*="card"],[class*="Panel"],[class*="panel"],
  [class*="Hero"],[class*="hero"],[class*="Shell"],[class*="shell"],
  [class*="Guide"],[class*="guide"],[class*="Intent"],[class*="intent"],
  [class*="Summary"],[class*="summary"],[class*="Flow"],[class*="flow"],
  [class*="Workspace"],[class*="workspace"]
):not(.pfiModalOverlay):not(.modalOverlay):not([class*="Overlay"]):not([class*="overlay"]){
  background:#fff!important;
  background-image:none!important;
  color:var(--pfi064-text)!important;
  border-color:var(--pfi064-line)!important;
  text-shadow:none!important;
}

/* Guidance should read as content, not as a dark-mode box. Accent borders may
   remain to preserve meaning, but the canvas remains white. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .pfi31Note,.pfi32InlineNote,.pfi24Help,.pfi076Disclaimer,.pfi53RuleBox,
  .pfi54RuleBox,.pfi60RuleBox,.pfi93MultiFileNote,.pfi95AccountabilityGuide,
  .pfi106AccountabilityGuide,.pfi79GuideNote,.pfi83FlowNote,.pfi84SectionExplainer,
  .pfi88Intro,.pfiImportStepBanner,.pfiUserGuideBox,.dailyEncouragement,
  .pfi64CapacityIntro,.pfi76Note
){
  background:#fff!important;
  background-image:none!important;
  color:var(--pfi064-body)!important;
  box-shadow:none!important;
}

/* Text contract on white surfaces. */
html[data-pfi-theme="light"] body.pfiDashboardPage .container :is(
  h1,h2,h3,h4,h5,h6,legend,caption,figcaption,
  [class*="Title"],[class*="title"],[class*="Subtitle"],[class*="subtitle"],
  [class*="Caption"],[class*="caption"],[class*="Heading"],[class*="heading"],
  [class*="Eyebrow"],[class*="eyebrow"],label,strong,b
){
  color:#000!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .container :is(p,.note,.mini,small){
  color:var(--pfi064-body)!important;
  text-shadow:none!important;
}

/* Table contract: no dark headers, total rows, wrappers, or selected rows. */
html[data-pfi-theme="light"] body.pfiDashboardPage .container :is(
  table,thead,tbody,tfoot,tr,th,td,.pfiTableWrap,.accountabilityTableWrap,
  .changeTableWrap,.am1-table-wrap,.pfi044FullAmortTable,.pfiWelcomeJourneyTableWrap
){
  background:#fff!important;
  background-image:none!important;
  color:#000!important;
  border-color:#d6dde3!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .container table *{color:#000!important;text-shadow:none!important;}

/* Neutral pills/controls that were charcoal in Dark Mode become light controls. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .pill,.changePill,.pathBridge,.pathABadge,.pathBBadge,.pfi021IncomeTypeBadge,
  .pfiTabCollapseControls button,.pfiFormulaToggle,.amortCollapseBtn,
  .fullSectionCollapseBtn,.collapseToggle,.pfi60CollapseBtn
){
  background:#f7f9fb!important;
  background-image:none!important;
  color:#000!important;
  border-color:#b8c7d3!important;
  text-shadow:none!important;
}

/* Progress/visualization tracks may be neutral gray, never charcoal/black. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  .progressTrack,.progressMiniBar,.snapshotTrendBar,.compareBar,.pfiBarTrack,
  .pfi054AllocationTrack,.pfi17ProgressBar,.bar
){
  background:#e7edf2!important;
  background-image:none!important;
  border-color:#c7d2dc!important;
}

/* Modals use a light card; only the backdrop itself may remain translucent for
   focus/stacking semantics. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.pfiModalBox,.modalBox,[role="dialog"]){
  background:#fff!important;
  color:#000!important;
  border-color:var(--pfi064-line)!important;
}

/* Any surface identified at runtime as legacy-dark is neutralized instead of
   retaining a dark slab with white text. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiLightNeutralSurface{
  background:#fff!important;
  background-image:none!important;
  color:#000!important;
  border-color:var(--pfi064-line)!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiLightNeutralSurface :is(
  h1,h2,h3,h4,h5,h6,p,span,small,label,legend,caption,figcaption,strong,b,em,a,td,th
){
  color:#000!important;
  text-shadow:none!important;
}

/* The previous white-on-dark emergency treatment is obsolete under Build 064. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiLightOnDark,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiLightOnDark *{
  color:inherit!important;
}

/* Re-apply semantic colors after the neutral surface contract. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.good,.principal,.positive,.pfi42Green,.pfi053CashValue){color:#147447!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.bad,.interest,.negative,.criticalRed,.pfi42Red,.pfi053CashValue.short){color:#b33643!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.warn,.warning,.darkOrange,.pfi42Orange,.pfi053CashValue.zero){color:#9f5108!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(.savingsBlue,.pfiBlue,.pfi42Blue){color:#245f97!important;}
html[data-pfi-theme="light"] body.pfiDashboardPage table :is(.good,.principal,.positive,.bad,.interest,.negative,.warn,.warning,.darkOrange,.savingsBlue,.pfiBlue,.pfi42Blue,.pfi42Green,.pfi42Red,.pfi42Orange){color:#000!important;}


/* ========================================================================== 
   PFI BUILD 066 — LIGHT MODE BLACK-TEXT GOVERNANCE
   --------------------------------------------------------------------------
   Final light-mode readability rule: standard text may not resolve to white or
   near-white. Legacy dark controls are converted to light surfaces so black
   foregrounds remain readable. Semantic value colors remain governed by their
   existing specific classes.
   ========================================================================== */
html[data-pfi-theme="light"] body.pfiDashboardPage{
  --pfi066-text:#000000;
  --pfi066-soft:#334155;
  --pfi066-line:#cbd6df;
  --pfi066-danger-bg:#fde8ea;
  --pfi066-danger-line:#d98d95;
}

/* Remove the last intentionally dark/white-text controls from Light Mode. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  button.danger,
  button[class*="delete" i],
  button[class*="remove" i],
  .pfiBootNotice
){
  background:var(--pfi066-danger-bg)!important;
  background-image:none!important;
  color:#000!important;
  border-color:var(--pfi066-danger-line)!important;
  text-shadow:none!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  button.danger,
  button[class*="delete" i],
  button[class*="remove" i],
  .pfiBootNotice
) *{
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  text-shadow:none!important;
}

/* Tooltips use the same light-surface contract rather than dark-mode inversion. */
html[data-pfi-theme="light"] body.pfiDashboardPage .infoTip:hover::after{
  background:#fff!important;
  color:#000!important;
  border-color:var(--pfi066-line)!important;
  box-shadow:0 8px 20px rgba(15,23,42,.12)!important;
}

/* Any historical emergency light-on-dark class is neutral in Light Mode. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiLightOnDark,
html[data-pfi-theme="light"] body.pfiDashboardPage .pfiLightOnDark *{
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  text-shadow:none!important;
}

/* Runtime audit applies this only to elements whose computed foreground is
   white/near-white. Keeping it class-based makes the correction explicit and
   reversible when the user returns to Dark Mode. */
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi066BlackText{
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  text-shadow:none!important;
  opacity:1!important;
}
html[data-pfi-theme="light"] body.pfiDashboardPage .pfi066LightSurface{
  background:#fff!important;
  background-image:none!important;
  border-color:var(--pfi066-line)!important;
  text-shadow:none!important;
}

/* Native disabled/read-only foregrounds can otherwise stay pale in Chromium. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(input,select,textarea,button):disabled,
html[data-pfi-theme="light"] body.pfiDashboardPage :is(input,select,textarea)[readonly]{
  -webkit-text-fill-color:#000!important;
  color:#000!important;
  opacity:1!important;
}


/* Inline legacy foregrounds: late historical markup sometimes writes white
   directly into style attributes. In Light Mode those declarations are never
   allowed to win over the readability contract. */
html[data-pfi-theme="light"] body.pfiDashboardPage :is(
  [style*="color:#fff" i],[style*="color: #fff" i],
  [style*="color:#ffffff" i],[style*="color: #ffffff" i],
  [style*="color:white" i],[style*="color: white" i],
  [style*="color:rgb(255" i],[style*="color: rgb(255" i],
  [style*="color:rgba(255" i],[style*="color: rgba(255" i]
){
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  text-shadow:none!important;
}


/* PFI Build 067: targeted three-tab light-mode consistency is enforced by the final dashboard scope and runtime normalizer. */
