/* Final mobile Light palette, loaded after the page-specific mobile styles. */
@media (max-width: 760px) {
  html[data-appearance="light"] body.theme-blue {
    --mobile-light-page: #f4f9fc;
    --mobile-light-panel: #ffffff;
    --mobile-light-soft: #f2f7fb;
    --mobile-light-border: #d7e6ef;
    --mobile-light-text: #173353;
    --mobile-light-muted: #607c99;
    --mobile-light-accent: #009c93;
    --banymay-app-page-bg: var(--mobile-light-page);
    --app-mobile-panel-surface: var(--mobile-light-panel);
    background: var(--mobile-light-page) !important;
    color: var(--mobile-light-text) !important;
  }
  html[data-appearance="light"] body.theme-blue > .container { background: var(--mobile-light-page) !important; }
  html[data-appearance="light"] body.theme-blue :is(
    #stocks-section#stocks-section#stocks-section#stocks-section#stocks-section,
    #sectors-section#sectors-section#sectors-section#sectors-section#sectors-section,
    #deposits-section#deposits-section#deposits-section#deposits-section#deposits-section,
    #withdrawals-section#withdrawals-section#withdrawals-section#withdrawals-section#withdrawals-section,
    #dividends-section#dividends-section#dividends-section#dividends-section#dividends-section,
    #stocks-gains-section#stocks-gains-section#stocks-gains-section#stocks-gains-section#stocks-gains-section,
    #taxes-section#taxes-section#taxes-section#taxes-section#taxes-section,
    #profile-section#profile-section#profile-section#profile-section#profile-section,
    #settings-section#settings-section#settings-section#settings-section#settings-section,
    #leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section,
    #admin-section#admin-section#admin-section#admin-section#admin-section
  ).active {
    background: var(--mobile-light-page) !important;
    background-image: none !important;
    color: var(--mobile-light-text) !important;
  }
  html[data-appearance="light"] body.theme-blue :is(
    #stocks-section#stocks-section#stocks-section#stocks-section#stocks-section,
    #sectors-section#sectors-section#sectors-section#sectors-section#sectors-section,
    #deposits-section#deposits-section#deposits-section#deposits-section#deposits-section,
    #withdrawals-section#withdrawals-section#withdrawals-section#withdrawals-section#withdrawals-section,
    #dividends-section#dividends-section#dividends-section#dividends-section,
    #stocks-gains-section#stocks-gains-section#stocks-gains-section#stocks-gains-section,
    #taxes-section#taxes-section#taxes-section#taxes-section,
    #profile-section#profile-section#profile-section#profile-section,
    #settings-section#settings-section#settings-section#settings-section,
    #leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section,
    #admin-section#admin-section#admin-section#admin-section
  ).active :is(
    .stocks-mobile-holding,.stocks-mobile-panel,.allocation-card,.allocation-switch,.allocation-stats,
    .allocation-account-panel,.deposits-stat-band,.deposits-invested-band,.deposits-history-card,
    .deposits-mobile-row,.withdrawals-mobile-overview,.withdrawals-summary-panel,
    .withdrawals-mobile-card,.withdrawals-table-scroll,.dividends-chart-card,
    .dividends-history-card,.realized-pl-card,.realized-pl-summary,.taxes-mobile-shell,
    .taxes-mobile-country,.capital-gains-calculation,.taxes-mobile-metric,
    .my-plan-nav,.my-plan-panel,.my-plan-kpi-card,.my-plan-projection-tabs,
    .my-plan-projection-assumption,.my-plan-projection-result,.my-plan-indicator-item,
    .rr-panel,.rr-kpi,.rr-assumptions,.leaderboard-card,.leaderboard-mobile-investor-card,
    .leaderboard-table-card,.settings-card,.settings-section-card,.settings-subpage-card,
    .billing-panel,.billing-hero,.chart-history-panel,.download-data-hero,.contact-form,
    .panel,.card
  ) {
    background: var(--mobile-light-panel) !important;
    background-image: none !important;
    border-color: var(--mobile-light-border) !important;
    color: var(--mobile-light-text) !important;
    box-shadow: 0 1px 4px rgba(36, 76, 105, .06) !important;
  }
  html[data-appearance="light"] body.theme-blue :is(
    #stocks-section#stocks-section#stocks-section#stocks-section,
    #sectors-section#sectors-section#sectors-section#sectors-section,
    #deposits-section#deposits-section#deposits-section#deposits-section,
    #withdrawals-section#withdrawals-section#withdrawals-section#withdrawals-section,
    #dividends-section#dividends-section#dividends-section#dividends-section,
    #stocks-gains-section#stocks-gains-section#stocks-gains-section#stocks-gains-section,
    #taxes-section#taxes-section#taxes-section#taxes-section,
    #profile-section#profile-section#profile-section#profile-section,
    #settings-section#settings-section#settings-section#settings-section,
    #leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section,
    #admin-section#admin-section#admin-section#admin-section
  ).active :is(h1,h2,h3,h4,p,span,strong,small,label,th,td,em) {
    color: var(--mobile-light-text) !important;
  }
  html[data-appearance="light"] body.theme-blue :is(
    #stocks-section#stocks-section#stocks-section#stocks-section,
    #sectors-section#sectors-section#sectors-section#sectors-section,
    #deposits-section#deposits-section#deposits-section#deposits-section,
    #withdrawals-section#withdrawals-section#withdrawals-section,
    #dividends-section#dividends-section#dividends-section,
    #stocks-gains-section#stocks-gains-section#stocks-gains-section,
    #taxes-section#taxes-section#taxes-section,
    #profile-section#profile-section#profile-section,
    #settings-section#settings-section#settings-section,
    #leaderboard-section#leaderboard-section#leaderboard-section
  ).active :is(.stocks-mobile-asset span,.stocks-mobile-weight span,.stocks-mobile-shares span,
    .stocks-mobile-head button,.deposits-summary-title,.withdrawals-mobile-meta,
    .dividend-mobile-metadata,.realized-mobile-meta,.rr-summary,.rr-metric-list span,
    .my-plan-kpi-label,.my-plan-indicator-label,.leaderboard-mobile-card-cell small,
    .settings-section-description,small) {
    color: var(--mobile-light-muted) !important;
  }
  html[data-appearance="light"] body.theme-blue :is(
    #stocks-section#stocks-section#stocks-section#stocks-section,
    #sectors-section#sectors-section#sectors-section#sectors-section,
    #deposits-section#deposits-section#deposits-section,
    #withdrawals-section#withdrawals-section#withdrawals-section,
    #dividends-section#dividends-section#dividends-section,
    #stocks-gains-section#stocks-gains-section#stocks-gains-section,
    #taxes-section#taxes-section#taxes-section,
    #profile-section#profile-section#profile-section,
    #settings-section#settings-section#settings-section,
    #leaderboard-section#leaderboard-section#leaderboard-section
  ).active :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,
    .stocks-mobile-tools button,.leaderboard-filter,.leaderboard-search) {
    background: var(--mobile-light-panel) !important;
    border-color: var(--mobile-light-border) !important;
    color: var(--mobile-light-text) !important;
  }
  html[data-appearance="light"] body.theme-blue :is(input,textarea)::placeholder { color: #8198af !important; }
  html[data-appearance="light"] body.theme-blue :is(
    #stocks-section#stocks-section#stocks-section#stocks-section,
    #sectors-section#sectors-section#sectors-section#sectors-section,
    #deposits-section#deposits-section#deposits-section,
    #withdrawals-section#withdrawals-section#withdrawals-section,
    #dividends-section#dividends-section#dividends-section,
    #stocks-gains-section#stocks-gains-section#stocks-gains-section,
    #taxes-section#taxes-section#taxes-section,
    #profile-section#profile-section#profile-section,
    #settings-section#settings-section#settings-section,
    #leaderboard-section#leaderboard-section#leaderboard-section
  ).active :is(.positive,.rr-green,.rr-cyan,.my-plan-fi-value,.stocks-mobile-change.positive,
    .stocks-mobile-risk.safe,.allocation-percentage,.leaderboard-pct-positive) {
    color: #008f80 !important;
  }
  html[data-appearance="light"] body.theme-blue :is(
    #stocks-section#stocks-section#stocks-section#stocks-section,
    #deposits-section#deposits-section#deposits-section,
    #withdrawals-section#withdrawals-section#withdrawals-section,
    #dividends-section#dividends-section#dividends-section,
    #stocks-gains-section#stocks-gains-section#stocks-gains-section,
    #profile-section#profile-section#profile-section,
    #leaderboard-section#leaderboard-section#leaderboard-section
  ).active :is(.negative,.rr-red,.stocks-mobile-change.negative,.stocks-mobile-risk.high,.leaderboard-pct-negative) {
    color: #d6465f !important;
  }
  html[data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section#stocks-section.active .stocks-mobile-risk.medium { color: #a87500 !important; }
  html[data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section#stocks-section.active .stocks-mobile-holding { background: #fff !important; border-color: var(--mobile-light-border) !important; }
  html[data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section#stocks-section.active .stocks-mobile-head { background: transparent !important; color: var(--mobile-light-muted) !important; }
  html[data-appearance="light"] body.theme-blue #dividends-section#dividends-section#dividends-section#dividends-section.active #dividends-monthly-table tbody tr,
  html[data-appearance="light"] body.theme-blue #stocks-gains-section#stocks-gains-section#stocks-gains-section#stocks-gains-section.active #stocks-gains-table-body tr,
  html[data-appearance="light"] body.theme-blue #deposits-section#deposits-section#deposits-section#deposits-section.active #deposits-tbody tr,
  html[data-appearance="light"] body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body tr {
    background: #fff !important; border-color: var(--mobile-light-border) !important;
  }
  html[data-appearance="light"] body.theme-blue #dividends-section#dividends-section#dividends-section#dividends-section.active #dividends-monthly-table tbody td:not([data-field="gross_dividend"]):not([data-field="net_dividend"]),
  html[data-appearance="light"] body.theme-blue #stocks-gains-section#stocks-gains-section#stocks-gains-section#stocks-gains-section.active #stocks-gains-table-body td:not([data-field="realized_gain"]),
  html[data-appearance="light"] body.theme-blue #deposits-section#deposits-section#deposits-section#deposits-section.active #deposits-tbody td,
  html[data-appearance="light"] body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section#withdrawals-section.active #withdrawals-table-body td {
    color: var(--mobile-light-text) !important;
  }
  html[data-appearance="light"] body.theme-blue #taxes-section#taxes-section#taxes-section#taxes-section.active :is(.taxes-mobile-shell,.taxes-mobile-country,.capital-gains-calculation,.taxes-mobile-metric,.taxes-mobile-toggle),
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section#profile-section.active :is(.my-plan-nav,.my-plan-panel,.my-plan-kpi-card,.my-plan-projection-tabs,.my-plan-projection-assumption,.my-plan-projection-result,.rr-panel),
  html[data-appearance="light"] body.theme-blue #leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section.active :is(.leaderboard-card,.leaderboard-mobile-investor-card,.leaderboard-filter,.leaderboard-search),
  html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section#settings-section.active :is(.settings-card,.settings-section-card,.settings-subpage-card,.billing-panel,.chart-history-panel,.download-data-hero,.contact-form) {
    background: #fff !important; border-color: var(--mobile-light-border) !important; color: var(--mobile-light-text) !important;
  }
  html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section#settings-section#settings-section.active .settings-side-nav .settings-side-link {
    color: #173353 !important;
    background: #fff !important;
    background-image: none !important;
    border-color: #d7e6ef !important;
    box-shadow: 0 1px 4px rgba(36, 76, 105, .06) !important;
  }
  html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section#settings-section#settings-section.active .settings-side-nav .settings-side-link:is(.is-active,[aria-current="page"]) {
    color: #007fbd !important;
    background: #e3f4fb !important;
    border-color: #8ed4eb !important;
  }
  html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section#settings-section#settings-section.active .settings-side-link .settings-side-icon {
    color: inherit !important;
    background: transparent !important;
  }
  html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section#settings-section#settings-section.active .settings-side-link .settings-side-icon svg {
    stroke: currentColor !important;
  }
  html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section#settings-section#settings-section.active :is(.settings-mobile-section-icon,.settings-section-intro h2,.settings-section-intro p,.settings-field>label,.settings-input-addon) {
    color: #173353 !important;
  }
  html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section#settings-section#settings-section.active :is(.settings-mobile-section-icon,.settings-input-shell,.settings-field input,.settings-field select,.settings-field textarea) {
    background: #fff !important;
    background-image: none !important;
    color: #173353 !important;
    border-color: #d7e6ef !important;
    box-shadow: none !important;
  }
  html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section#settings-section#settings-section.active .settings-input-addon {
    border-left-color: #d7e6ef !important;
  }
  html[data-appearance="light"] body.theme-blue #settings-section#settings-section#settings-section#settings-section#settings-section.active :is(.settings-section-description,.settings-section-intro p,.settings-field-help,.settings-input-addon) {
    color: #526f8a !important;
  }
  html[data-appearance="light"] body.theme-blue #leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section.active :is(.leaderboard-card,.leaderboard-mobile-investor-card) {
    background: #fff !important;
    background-image: none !important;
    color: #173353 !important;
    border-color: #d7e6ef !important;
  }
  html[data-appearance="light"] body.theme-blue #leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section.active :is(.leaderboard-card-name,.leaderboard-popular-name,.leaderboard-mobile-name,.leaderboard-like-count,.leaderboard-card-stats strong,.leaderboard-mobile-stats strong) {
    color: #173353 !important;
  }
  html[data-appearance="light"] body.theme-blue #leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section.active :is(.leaderboard-card-stats span,.leaderboard-mobile-stats span,.leaderboard-card-stats small,.leaderboard-mobile-card-cell small) {
    color: #526f8a !important;
  }
  html[data-appearance="light"] body.theme-blue #leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section.active :is(.leaderboard-like-btn,.leaderboard-mobile-investor-card .leaderboard-like-btn) {
    background: #e9f7f5 !important;
    background-image: none !important;
    color: #008f80 !important;
    border: 1px solid #a9ddd5 !important;
  }
  html[data-appearance="light"] body.theme-blue #leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section#leaderboard-section.active :is(.leaderboard-like-btn svg,.leaderboard-mobile-investor-card .leaderboard-like-btn svg) {
    fill: currentColor !important;
    stroke: currentColor !important;
  }
  html[data-appearance="light"] body.theme-blue #sectors-section#sectors-section#sectors-section#sectors-section#sectors-section.active .allocation-hover-popup:not(.is-account-summary) .allocation-hover-popup-header {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1fr) !important;
    gap: 5px !important;
  }
  html[data-appearance="light"] body.theme-blue #sectors-section#sectors-section#sectors-section#sectors-section#sectors-section.active .allocation-hover-popup:not(.is-account-summary) .allocation-hover-popup-title {
    overflow: visible !important;
    font-size: 12px !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
  html[data-appearance="light"] body.theme-blue .mobile-nav-menu,
  html[data-appearance="light"] body.theme-blue .banymay-mobile-nav-menu {
    background: #fff !important; border-color: var(--mobile-light-border) !important; color: var(--mobile-light-text) !important;
  }
  html[data-appearance="light"] body.theme-blue .banymay-header #primary-navigation.nav-menu {
    border: 1px solid #d8e4ee !important;
    border-radius: 18px !important;
    background: linear-gradient(155deg, #fff 0%, #f7fafc 100%) !important;
    box-shadow: 0 18px 42px rgba(24, 52, 78, .18) !important;
  }
  html[data-appearance="light"] body.theme-blue .banymay-header #primary-navigation .mobile-nav-group {
    color: #71869d !important;
    border-color: #d9e5ef !important;
  }
  html[data-appearance="light"] body.theme-blue .banymay-header #primary-navigation li a.nav-link {
    color: #173353 !important;
    background: transparent !important;
  }
  html[data-appearance="light"] body.theme-blue .banymay-header #primary-navigation .mobile-nav-icon,
  html[data-appearance="light"] body.theme-blue .banymay-header #primary-navigation .mobile-nav-chevron {
    stroke: #607c99 !important;
  }
  html[data-appearance="light"] body.theme-blue .banymay-header #primary-navigation li a.nav-link:is(.active,[aria-current="page"]) {
    color: #078dc2 !important;
    background: linear-gradient(90deg, #e0f4fc, #eaf7fc) !important;
  }
  html[data-appearance="light"] body.theme-blue .banymay-header #primary-navigation li a.nav-link.active::before {
    background: #14a8d8 !important;
  }
  html[data-appearance="light"] body.theme-blue .banymay-header #primary-navigation .nav-link.active .mobile-nav-icon,
  html[data-appearance="light"] body.theme-blue .banymay-header #primary-navigation .nav-link.active .mobile-nav-chevron {
    stroke: #078dc2 !important;
  }
  html[data-appearance="light"] body.theme-blue #stocks-section#stocks-section#stocks-section#stocks-section#stocks-section.active :is(.stocks-mobile-asset span,.stocks-mobile-weight span,.stocks-mobile-shares span,.stocks-mobile-head button),
  html[data-appearance="light"] body.theme-blue #dividends-section#dividends-section#dividends-section#dividends-section#dividends-section.active .dividend-mobile-metadata,
  html[data-appearance="light"] body.theme-blue #stocks-gains-section#stocks-gains-section#stocks-gains-section#stocks-gains-section#stocks-gains-section.active .realized-mobile-meta,
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section#profile-section#profile-section.active :is(.rr-summary,.rr-metric-list span,.my-plan-kpi-label,.my-plan-indicator-label) {
    color: var(--mobile-light-muted) !important;
  }
  html[data-appearance="light"] body.theme-blue #dividends-section#dividends-section#dividends-section#dividends-section#dividends-section.active #dividends-monthly-table tbody :is(td[data-field="gross_dividend"],td[data-field="net_dividend"]),
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section#profile-section#profile-section.active :is(.my-plan-kpi-value,.my-plan-fi-value),
  html[data-appearance="light"] body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section#withdrawals-section#withdrawals-section.active .withdrawals-mobile-amount {
    color: var(--mobile-light-accent) !important;
  }
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section#profile-section#profile-section.active .rr-red,
  html[data-appearance="light"] body.theme-blue #stocks-gains-section#stocks-gains-section#stocks-gains-section#stocks-gains-section#stocks-gains-section.active #stocks-gains-table-body td.realized-negative {
    color: #d6465f !important;
  }
}

/* Light-mode mobile control and contrast normalization. Page-specific mobile
   styles are loaded earlier and may otherwise leave dark selects/CTAs behind. */
@media (max-width: 760px) {
  html[data-appearance="light"] body.theme-blue :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    color-scheme: light !important;
    color: #173353 !important;
    background-color: #fff !important;
    border-color: #d7e6ef !important;
  }
  html[data-appearance="light"] body.theme-blue :is(
    #deposits-section .deposits-mobile-sort-wrap,
    #withdrawals-section .withdrawals-mobile-sort
  ) {
    color: #173353 !important;
    background: #fff !important;
    border-color: #d7e6ef !important;
  }
  html[data-appearance="light"] body.theme-blue #deposits-section .deposits-sort-menu:not([hidden]) {
    background: #fff !important;
    border-color: #d7e6ef !important;
    box-shadow: 0 8px 24px rgba(36, 76, 105, .16) !important;
  }
  html[data-appearance="light"] body.theme-blue #deposits-section .deposits-sort-menu button {
    color: #173353 !important;
  }
  html[data-appearance="light"] body.theme-blue #deposits-section#deposits-section#deposits-section.active .deposits-sort-trigger {
    color: #173353 !important;
    background: #fff !important;
    border-color: #c8dce9 !important;
    box-shadow: 0 1px 4px rgba(36, 76, 105, .08) !important;
  }
  html[data-appearance="light"] body.theme-blue #deposits-section#deposits-section#deposits-section.active .deposits-sort-trigger span {
    color: #607c99 !important;
  }
  html[data-appearance="light"] body.theme-blue #dividends-section#dividends-section#dividends-section.active .dividends-chart-card {
    background: #fff !important;
    background-image: none !important;
    border-color: #d7e6ef !important;
  }
  html[data-appearance="light"] body.theme-blue #dividends-section#dividends-section#dividends-section.active :is(#monthly-broker-filter,#dividends-show-above-select) {
    appearance: none !important;
    -webkit-appearance: none !important;
    color: #173353 !important;
    background-color: #f7fafc !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23607c99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 7px center !important;
    background-size: 12px !important;
    border-color: #d1e0eb !important;
    box-shadow: none !important;
  }
  html[data-appearance="light"] body.theme-blue #dividends-section#dividends-section#dividends-section.active #monthly-broker-filter option,
  html[data-appearance="light"] body.theme-blue #dividends-section#dividends-section#dividends-section.active #dividends-show-above-select option {
    color: #173353 !important;
    background: #fff !important;
  }
  html[data-appearance="light"] body.theme-blue #dividends-section#dividends-section#dividends-section.active #dividends-monthly-chart-filter label {
    color: #526f8a !important;
  }
  html[data-appearance="light"] body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section.active .withdrawals-mobile-sort {
    color: #173353 !important;
    background: #fff !important;
    border-color: #c8dce9 !important;
    box-shadow: 0 1px 4px rgba(36, 76, 105, .08) !important;
  }
  html[data-appearance="light"] body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section.active .withdrawals-mobile-sort select {
    appearance: none !important;
    -webkit-appearance: none !important;
    color: #173353 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  html[data-appearance="light"] body.theme-blue #withdrawals-section#withdrawals-section#withdrawals-section.active .withdrawals-sort-icon {
    color: #607c99 !important;
  }
  html[data-appearance="light"] body.theme-blue select option {
    color: #173353 !important;
    background: #fff !important;
  }
  html[data-appearance="light"] body.theme-blue :is(input, textarea)::placeholder {
    color: #607c99 !important;
    opacity: 1 !important;
  }
  html[data-appearance="light"] body.theme-blue :is(
    #deposits-section, #withdrawals-section, #dividends-section, #stocks-section,
    #stocks-gains-section, #taxes-section, #profile-section, #settings-section,
    #leaderboard-section
  ).active :is(.deposits-sort-trigger, .withdrawals-sort-trigger, .withdrawal-sort-select,
    #monthly-broker-filter, #dividends-show-above-select, .my-plan-projection-edit,
    .my-plan-projection-assumption, .rr-assumptions > summary) {
    color: #173353 !important;
    background: #fff !important;
    border-color: #d7e6ef !important;
    box-shadow: 0 1px 4px rgba(36, 76, 105, .06) !important;
  }
  html[data-appearance="light"] body.theme-blue #dividends-section.active #dividends-monthly-chart-filter label,
  html[data-appearance="light"] body.theme-blue #dividends-section.active .dividends-chart-filter label,
  html[data-appearance="light"] body.theme-blue #profile-section.active .my-plan-lifestyle-item > div > span,
  html[data-appearance="light"] body.theme-blue #profile-section.active .my-plan-lifestyle-grid small,
  html[data-appearance="light"] body.theme-blue #profile-section.active .my-plan-projection-requirements .profile-table-row span {
    color: #526f8a !important;
  }
  html[data-appearance="light"] body.theme-blue #taxes-section.active .capital-gains-calculation :is(h2,h3,h4,strong,label,span,.capital-gains-heading),
  html[data-appearance="light"] body.theme-blue #taxes-section.active .taxes-mobile-country :is(h2,h3,h4,strong,label,span) {
    color: #173353 !important;
  }
  html[data-appearance="light"] body.theme-blue #taxes-section.active .capital-gains-calculation :is(p,small),
  html[data-appearance="light"] body.theme-blue #taxes-section.active .taxes-mobile-country :is(p,small) {
    color: #607c99 !important;
  }
  html[data-appearance="light"] body.theme-blue #taxes-section.active .capital-gains-option-text :is(strong,small) {
    color: #173353 !important;
  }
  html[data-appearance="light"] body.theme-blue #taxes-section.active .capital-gains-option input[type="radio"] {
    background: #fff !important;
    border-color: #607c99 !important;
  }
  html[data-appearance="light"] body.theme-blue #taxes-section.active .capital-gains-option input[type="radio"]:checked {
    background: #009c93 !important;
    border-color: #009c93 !important;
    box-shadow: inset 0 0 0 4px #fff !important;
  }
  html[data-appearance="light"] body.theme-blue #taxes-section#taxes-section#taxes-section.active .taxes-card .settings-chevron,
  html[data-appearance="light"] body.theme-blue #taxes-section#taxes-section#taxes-section.active .taxes-mobile-toggle {
    color: #173353 !important;
    background: #fff !important;
    border-color: #c8dce9 !important;
    box-shadow: none !important;
  }
  html[data-appearance="light"] body.theme-blue #taxes-section#taxes-section#taxes-section.active .capital-gains-heading {
    color: #173353 !important;
  }
  html[data-appearance="light"] body.theme-blue #taxes-section#taxes-section#taxes-section.active :is(.taxes-mobile-country-total,.taxes-mobile-metric span,.capital-gains-option-text small) {
    color: #526f8a !important;
  }
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section.active .my-plan-projection-edit {
    color: #007f79 !important;
    background: #fff !important;
    background-image: none !important;
    border: 1px solid #d7e6ef !important;
    box-shadow: 0 1px 4px rgba(36, 76, 105, .06) !important;
  }
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section.active .my-plan-projection-edit :is(span,svg),
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section.active .my-plan-projection-edit::after {
    color: #007f79 !important;
    stroke: #007f79 !important;
  }
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section.active .my-plan-projection-requirements :is(.profile-table-row span,.profile-table-row strong,.my-plan-projection-requirements-heading p) {
    color: #526f8a !important;
  }
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section.active .my-plan-projection-requirements .profile-table-row :is([data-fi-field="annual"],[data-fi-field="net"],[data-fi-field^="req"],[data-fi-field="finite"]) {
    color: #173353 !important;
  }
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section.active .my-plan-projection-requirements .profile-table-row [data-fi-field="annual"]::before,
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section.active .my-plan-projection-requirements .profile-table-row [data-fi-field="net"]::before,
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section.active .my-plan-projection-requirements .profile-table-row [data-fi-field^="req"]::before,
  html[data-appearance="light"] body.theme-blue #profile-section#profile-section#profile-section.active .my-plan-projection-requirements .profile-table-row [data-fi-field="finite"]::before {
    color: #526f8a !important;
  }
  html[data-appearance="light"] body.theme-blue #deposits-section.active :is(.deposit-mobile-date,.deposits-mobile-date,.deposit-mobile-amount,.deposits-mobile-amount),
  html[data-appearance="light"] body.theme-blue #withdrawals-section.active :is(.withdrawals-mobile-date,.withdrawals-mobile-meta),
  html[data-appearance="light"] body.theme-blue #dividends-section.active :is(.dividend-mobile-date,.dividend-mobile-metadata),
  html[data-appearance="light"] body.theme-blue #stocks-gains-section.active .realized-mobile-meta {
    color: #526f8a !important;
  }
  html[data-appearance="light"] body.theme-blue #deposits-section.active #deposits-tbody td,
  html[data-appearance="light"] body.theme-blue #deposits-section.active #deposits-tbody td * {
    color: #173353 !important;
  }
  html[data-appearance="light"] body.theme-blue #deposits-section#deposits-section#deposits-section.active #deposits-tbody td[data-field="date"]::before {
    color: #526f8a !important;
  }
  html[data-appearance="light"] body.theme-blue #deposits-section#deposits-section#deposits-section.active #deposits-tbody td[data-field="amount"]::before {
    color: #173353 !important;
  }
  html[data-appearance="light"] body.theme-blue #deposits-section#deposits-section#deposits-section.active #deposits-tbody td[data-field="currency"] {
    color: #526f8a !important;
  }
  html[data-appearance="light"] body.theme-blue #stocks-section.active .stocks-bulk-delete-btn,
  html[data-appearance="light"] body.theme-blue #stocks-section.active #delete-selected-stocks-btn {
    color: #b4233a !important;
    background: #fff1f2 !important;
    border: 1px solid #e5a0aa !important;
    opacity: 1 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  html[data-appearance="light"] body.theme-blue #stocks-section.active .stocks-bulk-delete-btn:disabled,
  html[data-appearance="light"] body.theme-blue #stocks-section.active #delete-selected-stocks-btn:disabled {
    color: #9d3b4b !important;
    background: #fff5f5 !important;
    border-color: #e8b6bd !important;
    opacity: 1 !important;
  }
  html[data-appearance="light"] body.theme-blue #stocks-gains-section#stocks-gains-section#stocks-gains-section.active .realized-pl-card::before,
  html[data-appearance="light"] body.theme-blue #stocks-gains-section#stocks-gains-section#stocks-gains-section.active .realized-pl-card:nth-child(2)::before {
    background: transparent !important;
    box-shadow: none !important;
  }
  /* Keep chart plotting surfaces dark by design; only their controls use the light palette. */
  html[data-appearance="light"] body.theme-blue #dividends-section.active :is(.dividends-chart-surface,.chart-canvas-wrap) {
    color-scheme: light;
  }
}
