
html, body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
button, input, select, textarea {
  font-family: inherit;
}
.biz-hub-switch { display: none !important; }

html, body, button, input, select, textarea, h1, h2, h3, h4, a, label, td, th, p, span, div {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
.bg-header, .bk-header, .mort-header, .ins-header, .ffa-header,
.pl-header, .rt-header, .pt-header, .wb-header, .rcs-header {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif !important;
  padding: 12px 20px !important;
  box-sizing: border-box !important;
}
.bg-header h1, .bk-header h1, .mort-header h1, .ins-header h1, .ffa-header h1,
.pl-header h1, .rt-header h1, .pt-header h1, .wb-header h1, .rcs-header h1,
.wb-header h1 {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  color: #f1f5f9 !important;
  margin: 0 !important;
}
.ffa-header .subtitle, .ins-header .subtitle, .wb-header p {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  color: #64748b !important;
  margin-top: 2px !important;
}
.biz-hub-switch { display: none !important; }


.pl-tabs, .rt-tabs, .pt-tabs, .bk-tabs, .ffa-tabs, .ins-tabs, .bg-tabs, .wb-tabs,
.mort-main .tab-nav, .rcs-root .tab-nav {
  display: flex !important;
  gap: 0 !important;
  background: var(--ff-tab, #0f172a) !important;
  border-bottom: 3px solid var(--ff-accent, #0ea5e9) !important;
  flex-wrap: wrap;
}
.pl-tab, .rt-tab, .pt-tab, .bk-tab, .ffa-tab, .ins-tab, .bg-tab,
.mort-main .tab-btn, .wb-tabs > a, .rcs-root .tab-btn {
  color: var(--ff-muted, #94a3b8) !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  padding: 10px 16px !important;
  cursor: pointer !important;
}
.pl-tab:hover, .rt-tab:hover, .pt-tab:hover, .bk-tab:hover, .ffa-tab:hover,
.ins-tab:hover, .bg-tab:hover:not(.active), .mort-main .tab-btn:hover, .wb-tabs > a:hover,
.rcs-root .tab-btn:hover {
  color: var(--ff-text, #fff) !important;
  background: color-mix(in srgb, var(--ff-tab, #0f172a) 70%, var(--ff-accent, #0ea5e9) 30%) !important;
}
.pl-tab.active, .rt-tab.active, .pt-tab.active, .bk-tab.active, .ffa-tab.active,
.ins-tab.active, .bg-tab.active, .mort-main .tab-btn.active, .wb-tabs > a[style*="background:#0ea5e9"],
.rcs-root .tab-btn.active {
  color: #fff !important;
  background: var(--ff-accent, #0ea5e9) !important;
}


html, body {
  background: var(--ff-bg, #0f172a);
  color: var(--ff-text, #e2e8f0);
}
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=image]),
select, textarea {
  background: var(--ff-input, #0f172a) !important;
  color: var(--ff-text, #e2e8f0) !important;
  border-color: var(--ff-border, #475569) !important;
}
input[type=file] {
  background: var(--ff-input, #0f172a) !important;
  color: var(--ff-text, #e2e8f0) !important;
  border: 1px solid var(--ff-border, #475569) !important;
  border-radius: 6px !important;
  padding: 6px 8px !important;
  max-width: 100%;
}
input[type=file]::file-selector-button {
  background: var(--ff-panel, #1e293b) !important;
  color: var(--ff-text, #e2e8f0) !important;
  border: 1px solid var(--ff-border, #334155) !important;
  border-radius: 4px !important;
  padding: 5px 12px !important;
  margin-right: 10px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
}
input[type=file]::-webkit-file-upload-button {
  background: var(--ff-panel, #1e293b) !important;
  color: var(--ff-text, #e2e8f0) !important;
  border: 1px solid var(--ff-border, #334155) !important;
  border-radius: 4px !important;
  padding: 5px 12px !important;
  margin-right: 10px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
}
.form-group label, .filter-bar label, label.ff-std-label {
  color: var(--ff-muted, #cbd5e1) !important;
}
.empty-msg, .section-subtitle, .card-sub, .ffa-header .subtitle, .ins-header .subtitle {
  color: var(--ff-muted, #94a3b8) !important;
}


.panel, .scenario-panel, .benefit-box, .detail-section, .compare-section,
.chat-section, .type-card, .stat-card, .chart-card, .wb-card, .section-card {
  background: var(--ff-panel, #1e293b) !important;
  border: 1px solid var(--ff-border, #334155) !important;
  color: var(--ff-text, #e2e8f0) !important;
  box-shadow: none !important;
}
.s-card, .sc-card, .afford-card, .kpi-tile, .acc-card, .lstat, .ren-section {
  background: var(--ff-bg, #0f172a) !important;
  border: 1px solid var(--ff-border, #334155) !important;
  color: var(--ff-text, #e2e8f0) !important;
}
.s-card .lbl, .sc-card .lbl, .afford-card .label, .panel-title, .kpi-label {
  color: var(--ff-muted, #94a3b8) !important;
}
.info-box {
  background: rgba(14,165,233,.12) !important;
  border: 1px solid rgba(14,165,233,.35) !important;
  color: var(--ff-text, #e2e8f0) !important;
}
.info-box strong {
  color: var(--ff-text, #f1f5f9) !important;
}
.btn-add, .btn-calc, .btn-primary {
  background: #0ea5e9 !important;
  color: #fff !important;
  border-color: #0ea5e9 !important;
}
.btn-add:hover, .btn-calc:hover, .btn-primary:hover {
  background: #0284c7 !important;
}
.btn-edit {
  background: #334155 !important;
  color: #fff !important;
}
.spouse-section {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
}
.spouse-section h3 {
  color: #f1f5f9 !important;
}

body {
  background: var(--ff-bg, #0f172a) !important;
  color: var(--ff-text, #e2e8f0) !important;
}
.page-root, .panel, .controls, .sidebar-card, .charts-wrapper, .sidebar-card-wrapper,
.decision-card, .watch-card, .import-panel, .summary-growth, .summary-growth-col {
  background: var(--ff-panel, #1e293b) !important;
  border-color: var(--ff-border, #334155) !important;
  box-shadow: none !important;
  color: var(--ff-text, #e2e8f0) !important;
}
.summary-growth .sidebar-card-wrapper,
.summary-growth .charts-wrapper {
  background: transparent !important;
}
table, #summary-table, #positions-table, #history-table {
  background: var(--ff-table, #0f172a) !important;
  border: 1px solid var(--ff-border, #334155) !important;
  box-shadow: none !important;
  color: var(--ff-text, #e2e8f0) !important;
}
th, td, .summary-cell, .summary-field {
  border-bottom-color: var(--ff-border, #334155) !important;
  color: var(--ff-text, #e2e8f0) !important;
}
td, .summary-cell {
  background: var(--ff-table, #0f172a) !important;
  color: var(--ff-text, #e2e8f0) !important;
}
/* CORP-style header row */
th, .summary-header {
  background: var(--ff-table-header, #0f172a) !important;
  color: var(--ff-muted, #94a3b8) !important;
  border-bottom: 1px solid var(--ff-border, #334155) !important;
}
th a {
  color: var(--ff-accent, #38bdf8) !important;
}
tr:hover td {
  filter: brightness(1.12);
}
.summary-symbol,
.summary-tag-filter-row td,
.summary-tag-note-set,
.controls-extra,
.sidebar-card,
.sidebar-card-wrapper,
.pf-card {
  background: var(--ff-table, #0f172a) !important;
  color: var(--ff-text, #e2e8f0) !important;
  border-color: var(--ff-border, #334155) !important;
}
.pf-title,
.pf-line,
.pf-line span:last-child {
  color: var(--ff-text, #e2e8f0) !important;
}
.pf-line span:first-child {
  color: var(--ff-muted, #94a3b8) !important;
}
.summary-note-label,
.tickers-list,
.filter-row,
.controls-main label,
.controls label,
.updated, .muted, .hint, .filter-row label {
  color: var(--ff-muted, #94a3b8) !important;
}
h1, h2, h3, .summary-growth-title, .summary-wrapper h3 {
  color: var(--ff-text, #f1f5f9) !important;
}
a:not(.pill) {
  color: var(--ff-accent, #38bdf8) !important;
}
a.pill {
  color: var(--ff-text, #e2e8f0) !important;
}
a.pill.active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
input, select, textarea,
input[type="text"], input[type="number"],
#ticker-filter, #summary-filter, #history-filter, #global-history-filter,
.summary-tag-select, .summary-note-input, .summary-tag-filter {
  background: var(--ff-input, #0f172a) !important;
  color: var(--ff-text, #e2e8f0) !important;
  border: 1px solid var(--ff-border, #475569) !important;
  box-shadow: none !important;
}
input[type="submit"]:not([class*="btn"]):not(.wb-btn):not(#ff-headup-edit):not(#ff-headup-save):not(#ff-headup-cancel):not(#ff-headup-hide):not(#ff-headup-show),
button:not([class*="btn"]):not(.wb-btn):not(#gen-btn):not(#send-btn):not(.shortcut-panel button):not(.scope-btn):not(.scope-pf-btn):not(#ff-grok-root *):not(#ff-headup-edit):not(#ff-headup-save):not(#ff-headup-cancel):not(#ff-headup-hide):not(#ff-headup-show):not(.ff-ticker-btn),
.controls-toggle-btn {
  background: var(--ff-panel, #334155) !important;
  color: var(--ff-text, #e2e8f0) !important;
  border: 1px solid var(--ff-border, #475569) !important;
}
input[type="submit"]:not([class*="btn"]):not(.wb-btn):not(#ff-headup-edit):not(#ff-headup-save):not(#ff-headup-cancel):not(#ff-headup-hide):not(#ff-headup-show):hover,
button:not([class*="btn"]):not(.wb-btn):not(#gen-btn):not(#send-btn):not(.shortcut-panel button):not(.scope-btn):not(.scope-pf-btn):not(#ff-grok-root *):not(#ff-headup-edit):not(#ff-headup-save):not(#ff-headup-cancel):not(#ff-headup-hide):not(#ff-headup-show):not(.ff-ticker-btn):hover,
.controls-toggle-btn:hover {
  filter: brightness(1.1);
  color: var(--ff-text, #fff) !important;
}
.recommendation-box.warn {
  background: #78350f !important;
  border-color: #b45309 !important;
  color: #fde68a !important;
}
.recommendation-box.ok {
  background: #14532d !important;
  border-color: #166534 !important;
  color: #86efac !important;
}
.error-box {
  background: #7f1d1d !important;
  border-color: #dc2626 !important;
  color: #fecaca !important;
}
.pct-pos { color: #16a34a !important; }
.pct-neg { color: #dc2626 !important; }
html[data-ff-theme="dark"] .pct-pos { color: #4ade80 !important; }
html[data-ff-theme="dark"] .pct-neg { color: #f87171 !important; }

body {
  background: var(--ff-bg, #0f172a) !important;
  color: var(--ff-text, #e2e8f0) !important;
}
.sidebar, .main-content, .content-area, .card, .panel, .chat-panel,
.chat-container, .shortcut-panel, .chat-input, .stat-box {
  background: var(--ff-panel, #1e293b) !important;
  border-color: var(--ff-border, #334155) !important;
  color: var(--ff-text, #e2e8f0) !important;
}
.sidebar-header, .chat-header {
  background: #0ea5e9 !important;
  color: #fff !important;
}
.portfolio-header, .suggested-btn, .stock-item {
  background: var(--ff-bg, #0f172a) !important;
  color: var(--ff-text, #e2e8f0) !important;
  border-color: var(--ff-border, #334155) !important;
}
.portfolio-header:hover, .suggested-btn:hover, .stock-item:hover {
  background: color-mix(in srgb, var(--ff-panel, #1e293b) 70%, var(--ff-accent, #0ea5e9) 30%) !important;
  color: var(--ff-accent, #38bdf8) !important;
}
.message.assistant .message-content,
.message.user .message-content {
  color: var(--ff-text, #e2e8f0) !important;
}
.message.assistant .message-content th,
.message.assistant .message-content table.ai-engine-table th {
  background: var(--ff-bg, #0f172a) !important;
  color: var(--ff-muted, #94a3b8) !important;
}

#ff-auth-bar {
  z-index: 2147483646 !important;
}
#ff-auth-bar, #ff-auth-bar a, #ff-auth-bar button {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif !important;
}
#ff-auth-bar .ff-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1 !important;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid #334155;
  background: #1e293b;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  flex-shrink: 0;
  margin: 0 2px;
}
#ff-auth-bar .ff-nav-link:hover {
  color: #fff !important;
  background: #334155;
  border-color: #475569;
}
#ff-auth-bar .ff-nav-link.is-active {
  color: #fff !important;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  border-color: #0369a1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
#ff-auth-bar .ff-nav-sep {
  display: inline-block;
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: #334155;
  color: transparent;
  font-size: 0;
  padding: 0;
  user-select: none;
  vertical-align: middle;
}
#ff-auth-bar button {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif !important;
}
#ff-auth-bar button[onclick*="ffOpenProfile"],
#ff-auth-bar .ff-bar-guest button {
  border-radius: 6px;
}
#ff-auth-bar .ff-os-home {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 700;
  text-decoration: none; white-space: nowrap; letter-spacing: .01em;
  background: linear-gradient(180deg, #0ea5e9 0%, #0369a1 100%);
  color: #fff !important;
  border: 1px solid #0c4a6e;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.12);
}
#ff-auth-bar .ff-os-home { min-width: 40px; }
#ff-auth-bar .ff-os-home .ff-os-home-ico { font-size: 17px; line-height: 1; }
#ff-auth-bar .ff-os-home:hover {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  color: #fff !important;
  border-color: #0369a1;
}
#ff-auth-bar .ff-os-home.is-active {
  background: linear-gradient(180deg, #0ea5e9 0%, #075985 100%);
  box-shadow: 0 0 0 1px #94a3b8, 0 1px 2px rgba(0,0,0,0.3);
}
#ff-auth-bar .ff-os-back {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  background: #1e293b; color: #e2e8f0 !important; border: 1px solid #64748b;
}
#ff-auth-bar .ff-os-back:hover { background: #334155; color: #fff !important; border-color: #94a3b8; }
#ff-auth-bar .ff-os-about {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  background: #6d28d9; color: #fff !important; border: 1px solid #5b21b6;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
#ff-auth-bar .ff-os-about:hover { background: #7c3aed; color: #fff !important; border-color: #6d28d9; }
  #ff-auth-bar .ff-os-back .ff-os-back-short { display: none; }
  #ff-auth-bar .ff-sa-short { display: none; }
@media (max-width: 900px) {
  #ff-auth-bar .ff-os-back .ff-os-back-full { display: none !important; }
  #ff-auth-bar .ff-os-back .ff-os-back-short { display: inline !important; }
  #ff-auth-bar .ff-sa-full { display: none !important; }
  #ff-auth-bar .ff-sa-short { display: inline !important; }
  #ff-auth-bar .ff-nav-link,
  #ff-auth-bar .ff-os-home,
  #ff-auth-bar .ff-os-back,
  #ff-auth-bar .ff-os-about {
    min-height: 32px; padding: 4px 8px; font-size: 0.72rem;
  }
  #ff-auth-bar .ff-os-left {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  #ff-auth-bar .ff-os-left::-webkit-scrollbar { display: none; }
  #ff-auth-bar .ff-nav-sep { display: none; }
}

:root {
  --ff-bg: #0f172a;
  --ff-panel: #1e293b;
  --ff-text: #e2e8f0;
  --ff-muted: #94a3b8;
  --ff-border: #334155;
  --ff-input: #0f172a;
  --ff-accent: #0ea5e9;
  --ff-table: #0f172a;
  --ff-table-header: #0f172a;
  --ff-tab: #0f172a;
}
/* Light: OS-row blue accents + white surfaces + black text */
html[data-ff-theme="light"] {
  --ff-bg: #ffffff;
  --ff-panel: #ffffff;
  --ff-text: #000000;
  --ff-muted: #111827;
  --ff-border: #93c5fd;
  --ff-input: #ffffff;
  --ff-accent: #2563eb;
  --ff-table: #ffffff;
  --ff-table-header: #f1f5f9;
  --ff-tab: #c5d0de;
}
html[data-ff-theme="dark"] {
  --ff-bg: #0f172a;
  --ff-panel: #1e293b;
  --ff-text: #e2e8f0;
  --ff-muted: #cbd5e1;
  --ff-border: #334155;
  --ff-input: #0f172a;
  --ff-accent: #38bdf8;
  --ff-table: #0f172a;
  --ff-table-header: #1e293b;
  --ff-tab: #0f172a;
}
html[data-ff-theme] body,
html[data-ff-theme] .page-root,
html[data-ff-theme] .rcs-root,
html[data-ff-theme] .ff-hub-shell {
  background: var(--ff-bg) !important;
  color: var(--ff-text) !important;
}
html[data-ff-theme] .panel, html[data-ff-theme] .controls,
html[data-ff-theme] .sidebar, html[data-ff-theme] .sidebar-card,
html[data-ff-theme] .charts-wrapper, html[data-ff-theme] .section-card,
html[data-ff-theme] .wb-card, html[data-ff-theme] .stat-card,
html[data-ff-theme] .wb-header, html[data-ff-theme] .wb-body,
html[data-ff-theme] .wb-readiness, html[data-ff-theme] .wb-viewer,
html[data-ff-theme] .pl-header, html[data-ff-theme] .pl-content,
html[data-ff-theme] .rt-header, html[data-ff-theme] .rt-content,
html[data-ff-theme] .pt-header, html[data-ff-theme] .pt-content,
html[data-ff-theme] .chart-card, html[data-ff-theme] .type-card,
html[data-ff-theme] .summary-card, html[data-ff-theme] .vehicle-card,
html[data-ff-theme] .scenario-panel, html[data-ff-theme] .benefit-box,
html[data-ff-theme] .summary-growth, html[data-ff-theme] .ba-panel,
html[data-ff-theme] .main-content, html[data-ff-theme] .content-area,
html[data-ff-theme] .card, html[data-ff-theme] .add-form,
html[data-ff-theme] .rcs-header, html[data-ff-theme] .chat-container,
html[data-ff-theme] .shortcut-panel, html[data-ff-theme] .chat-input,
html[data-ff-theme] .stat-box, html[data-ff-theme] .calc-box,
html[data-ff-theme] .filter-bar, html[data-ff-theme] .section-title,
html[data-ff-theme] .s-card, html[data-ff-theme] .sc-card,
html[data-ff-theme] .afford-card, html[data-ff-theme] .kpi-tile,
html[data-ff-theme] .acc-card, html[data-ff-theme] .lstat,
html[data-ff-theme] .ren-section, html[data-ff-theme] .spouse-section,
html[data-ff-theme] .decision-card, html[data-ff-theme] .watch-card,
html[data-ff-theme] .import-panel, html[data-ff-theme] .summary-growth-col,
html[data-ff-theme] .sidebar-card-wrapper, html[data-ff-theme] .data-table,
html[data-ff-theme] .table-scroll {
  background: var(--ff-panel) !important;
  color: var(--ff-text) !important;
  border-color: var(--ff-border) !important;
  box-shadow: none !important;
}
html[data-ff-theme] .card-value, html[data-ff-theme] .panel-title,
html[data-ff-theme] .rcs-header h1, html[data-ff-theme] .rcs-header,
html[data-ff-theme] .card-value, html[data-ff-theme] strong {
  color: var(--ff-text) !important;
}
html[data-ff-theme] .card-label, html[data-ff-theme] .form-group label,
html[data-ff-theme] .card-sub {
  color: var(--ff-muted) !important;
}
html[data-ff-theme] .tab-nav, html[data-ff-theme] .add-form,
html[data-ff-theme] .portfolio-header, html[data-ff-theme] .suggested-btn,
html[data-ff-theme] .summary-symbol, html[data-ff-theme] .controls-extra {
  background: var(--ff-bg) !important;
  color: var(--ff-text) !important;
  border-color: var(--ff-border) !important;
}
html[data-ff-theme] .tab-nav,
html[data-ff-theme] .pl-tabs, html[data-ff-theme] .rt-tabs,
html[data-ff-theme] .pt-tabs, html[data-ff-theme] .bk-tabs,
html[data-ff-theme] .ffa-tabs, html[data-ff-theme] .ins-tabs,
html[data-ff-theme] .bg-tabs, html[data-ff-theme] .wb-tabs {
  background: var(--ff-tab) !important;
  border-bottom-color: var(--ff-accent) !important;
  color: var(--ff-text) !important;
}
html[data-ff-theme] .tab-btn,
html[data-ff-theme] .pl-tab, html[data-ff-theme] .rt-tab,
html[data-ff-theme] .pt-tab, html[data-ff-theme] .bk-tab,
html[data-ff-theme] .ffa-tab, html[data-ff-theme] .ins-tab,
html[data-ff-theme] .bg-tab, html[data-ff-theme] .wb-tabs > a {
  background: transparent !important;
  color: var(--ff-muted) !important;
}
html[data-ff-theme] .tab-btn:hover,
html[data-ff-theme] .pl-tab:hover, html[data-ff-theme] .rt-tab:hover,
html[data-ff-theme] .pt-tab:hover, html[data-ff-theme] .bk-tab:hover,
html[data-ff-theme] .ffa-tab:hover, html[data-ff-theme] .ins-tab:hover,
html[data-ff-theme] .bg-tab:hover, html[data-ff-theme] .wb-tabs > a:hover {
  background: color-mix(in srgb, var(--ff-tab) 65%, var(--ff-accent) 35%) !important;
  color: var(--ff-text) !important;
}
html[data-ff-theme] .tab-btn.active,
html[data-ff-theme] .pl-tab.active, html[data-ff-theme] .rt-tab.active,
html[data-ff-theme] .pt-tab.active, html[data-ff-theme] .bk-tab.active,
html[data-ff-theme] .ffa-tab.active, html[data-ff-theme] .ins-tab.active,
html[data-ff-theme] .bg-tab.active {
  background: var(--ff-accent) !important;
  color: #fff !important;
}
html[data-ff-theme] table,
html[data-ff-theme] #summary-table, html[data-ff-theme] #positions-table,
html[data-ff-theme] #history-table,
html[data-ff-theme] .data-table {
  background: var(--ff-table) !important;
  border-color: var(--ff-border) !important;
  color: var(--ff-text) !important;
}
html[data-ff-theme] th,
html[data-ff-theme] .summary-header,
html[data-ff-theme] .data-table th {
  background: var(--ff-table-header) !important;
  color: var(--ff-muted) !important;
  border-bottom-color: var(--ff-border) !important;
}
html[data-ff-theme] td,
html[data-ff-theme] .data-table td,
html[data-ff-theme] .summary-cell, html[data-ff-theme] .summary-field,
html[data-ff-theme] .summary-symbol,
html[data-ff-theme] .summary-tag-filter-row td,
html[data-ff-theme] .pf-card,
html[data-ff-theme] .sidebar-card-wrapper {
  color: var(--ff-text) !important;
  border-bottom-color: var(--ff-border) !important;
  background: var(--ff-table) !important;
}
html[data-ff-theme] .pf-title,
html[data-ff-theme] .pf-line,
html[data-ff-theme] .pf-line span:last-child,
html[data-ff-theme] .summary-growth-title {
  color: var(--ff-text) !important;
}
html[data-ff-theme] .pf-line span:first-child {
  color: var(--ff-muted) !important;
}
html[data-ff-theme="dark"] tr:hover td,
html[data-ff-theme="dark"] .data-table tr:hover td {
  background: #334155 !important;
}
html[data-ff-theme="dark"] .message.assistant .message-content tr:hover td,
html[data-ff-theme="dark"] .message.assistant .message-content tr.ff-ai-row:hover td {
  background: #334155 !important;
  color: inherit;
}
html[data-ff-theme="light"] tr:hover td,
html[data-ff-theme="light"] .data-table tr:hover td,
html[data-ff-theme="custom"] tr:hover td {
  filter: brightness(0.97);
}
html[data-ff-theme] h1, html[data-ff-theme] h2, html[data-ff-theme] h3,
html[data-ff-theme] .summary-growth-title, html[data-ff-theme] .section-title {
  color: var(--ff-text) !important;
}
html[data-ff-theme] label, html[data-ff-theme] .filter-row,
html[data-ff-theme] .empty-msg, html[data-ff-theme] .card-sub,
html[data-ff-theme] .section-subtitle, html[data-ff-theme] .updated,
html[data-ff-theme] .muted, html[data-ff-theme] .hint,
html[data-ff-theme] .tickers-list, html[data-ff-theme] .summary-note-label {
  color: var(--ff-muted) !important;
}
html[data-ff-theme] input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=image]),
html[data-ff-theme] select, html[data-ff-theme] textarea {
  background: var(--ff-input) !important;
  color: var(--ff-text) !important;
  border-color: var(--ff-border) !important;
}
html[data-ff-theme] input[type=file] {
  background: var(--ff-input) !important;
  color: var(--ff-text) !important;
  border-color: var(--ff-border) !important;
}
html[data-ff-theme] input[type=file]::file-selector-button,
html[data-ff-theme] input[type=file]::-webkit-file-upload-button {
  background: #dbeafe !important;
  color: #000000 !important;
  border: 1px solid var(--ff-border) !important;
}
html[data-ff-theme] .btn-add, html[data-ff-theme] .btn-calc, html[data-ff-theme] .btn-primary {
  background: var(--ff-accent) !important;
  border-color: var(--ff-accent) !important;
  color: #fff !important;
}
/* Home hub CTAs and other filled buttons must keep white label text */
html[data-ff-theme] a[class^="btn-"]:not(.btn-secondary):not(.btn-note):not(.btn-ghost):not([class="btn-sm"]),
html[data-ff-theme] a[class*=" btn-"]:not(.btn-secondary):not(.btn-note):not(.btn-ghost):not([class="btn-sm"]),
html[data-ff-theme] .card > a[class^="btn-"]:not(.btn-secondary):not(.btn-note):not(.btn-ghost):not([class="btn-sm"]),
html[data-ff-theme] .home-cta {
  color: #ffffff !important;
}
/* Secondary / outline buttons: dark text on light fill (not white-on-white) */
html[data-ff-theme] a.btn-secondary,
html[data-ff-theme] .btn-secondary {
  background: #e5e7eb !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}
html[data-ff-theme="dark"] a.btn-secondary,
html[data-ff-theme="dark"] .btn-secondary {
  background: #334155 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}
html[data-ff-theme] a.btn-history,
html[data-ff-theme] .btn-history {
  background: #00C2A8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-ff-theme] a:not(.active):not(.pill):not(.ff-os-home):not(.ff-nav-link):not(.ff-os-about):not(.ff-os-back):not(.pl-tab):not(.rt-tab):not(.pt-tab):not(.bk-tab):not(.ffa-tab):not(.ins-tab):not(.bg-tab):not(.tab-btn):not([class^="btn-"]):not(.btn-primary):not(.is-active):not(.train-nav a):not(.nav-cta):not(.home-cta):not(.wb-btn):not(#next-btn) {
  color: var(--ff-accent) !important;
}
html[data-ff-theme] th a {
  color: var(--ff-accent) !important;
}

/* Family Budget / Hub filter pills — never inherit link accent onto active fill */
html[data-ff-theme] a.pill,
html[data-ff-theme] .pill {
  background: var(--ff-input, #0f172a) !important;
  color: var(--ff-text, #e2e8f0) !important;
  -webkit-text-fill-color: var(--ff-text, #e2e8f0) !important;
  border: 1px solid var(--ff-border, #475569) !important;
}
html[data-ff-theme] a.pill:hover:not(.active),
html[data-ff-theme] .pill:hover:not(.active) {
  border-color: var(--ff-accent) !important;
  color: var(--ff-text) !important;
  -webkit-text-fill-color: var(--ff-text) !important;
  background: color-mix(in srgb, var(--ff-panel) 70%, var(--ff-accent) 30%) !important;
}
html[data-ff-theme] a.pill.active,
html[data-ff-theme] .pill.active {
  background: var(--ff-accent) !important;
  border-color: var(--ff-accent) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-ff-theme] .ff-filter-label {
  color: var(--ff-muted, #cbd5e1) !important;
}
html[data-ff-theme="light"] a.pill,
html[data-ff-theme="light"] .pill {
  background: #ffffff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] a.pill:hover:not(.active),
html[data-ff-theme="light"] .pill:hover:not(.active) {
  background: #dbeafe !important;
  color: #1e3a8a !important;
  -webkit-text-fill-color: #1e3a8a !important;
  border-color: #2563eb !important;
}
html[data-ff-theme="light"] a.pill.active,
html[data-ff-theme="light"] .pill.active {
  background: #2563eb !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-ff-theme="light"] .ff-filter-label {
  color: #111827 !important;
}
html[data-ff-theme="light"] .bg-header {
  background: #ffffff !important;
  border-bottom-color: #93c5fd !important;
}
html[data-ff-theme="light"] .bg-header h1 {
  color: #0f172a !important;
}
html[data-ff-theme="light"] .filter-bar select,
html[data-ff-theme="light"] .filter-bar input,
html[data-ff-theme="light"] #tx-year,
html[data-ff-theme="light"] #tx-month,
html[data-ff-theme="light"] #tx-acc,
html[data-ff-theme="light"] #tx-type {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #93c5fd !important;
}

/* Light mode: force black text / white+blue surfaces over dark hardcodes */
html[data-ff-theme="light"] body,
html[data-ff-theme="light"] .page-root,
html[data-ff-theme="light"] .rcs-root {
  background: #ffffff !important;
  color: #000000 !important;
}
html[data-ff-theme="light"] .panel,
html[data-ff-theme="light"] .card,
html[data-ff-theme="light"] .controls,
html[data-ff-theme="light"] .sidebar,
html[data-ff-theme="light"] .rcs-header,
html[data-ff-theme="light"] .chat-container,
html[data-ff-theme="light"] .shortcut-panel,
html[data-ff-theme="light"] .chat-input,
html[data-ff-theme="light"] .stat-box,
html[data-ff-theme="light"] .add-form,
html[data-ff-theme="light"] .filter-bar,
html[data-ff-theme="light"] .calc-box,
html[data-ff-theme="light"] .sidebar-card,
html[data-ff-theme="light"] .charts-wrapper {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] .tab-nav,
html[data-ff-theme="light"] .pl-tabs,
html[data-ff-theme="light"] .rt-tabs,
html[data-ff-theme="light"] .pt-tabs,
html[data-ff-theme="light"] .bk-tabs,
html[data-ff-theme="light"] .ffa-tabs,
html[data-ff-theme="light"] .ins-tabs,
html[data-ff-theme="light"] .bg-tabs,
html[data-ff-theme="light"] .wb-tabs,
html[data-ff-theme="light"] .section-title,
html[data-ff-theme="light"] .portfolio-header {
  background: #c5d0de !important;
  color: #000000 !important;
  border-color: #94a3b8 !important;
  border-bottom-color: #2563eb !important;
}
html[data-ff-theme="light"] th,
html[data-ff-theme="light"] .data-table th,
html[data-ff-theme="light"] .tax-bracket-table th,
html[data-ff-theme="light"] .cca-schedule th,
html[data-ff-theme="light"] .summary-header {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] #summary-table,
html[data-ff-theme="light"] #positions-table,
html[data-ff-theme="light"] #history-table,
html[data-ff-theme="light"] .data-table,
html[data-ff-theme="light"] .tax-bracket-table,
html[data-ff-theme="light"] .cca-schedule table,
html[data-ff-theme="light"] .pf-card,
html[data-ff-theme="light"] .sidebar-card-wrapper {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] a.pf-card.is-active {
  background: #dbeafe !important;
  color: #1e3a8a !important;
  border-color: #2563eb !important;
}
html[data-ff-theme="light"] a.pf-card.is-active .pf-title,
html[data-ff-theme="light"] a.pf-card.is-active .pf-line,
html[data-ff-theme="light"] a.pf-card.is-active .pf-line span:last-child {
  color: #1e3a8a !important;
}
html[data-ff-theme="light"] td,
html[data-ff-theme="light"] .data-table td,
html[data-ff-theme="light"] .tax-bracket-table td,
html[data-ff-theme="light"] .cca-schedule td,
html[data-ff-theme="light"] .summary-cell,
html[data-ff-theme="light"] .summary-field,
html[data-ff-theme="light"] .summary-symbol,
html[data-ff-theme="light"] .summary-tag-filter-row td,
html[data-ff-theme="light"] .card-value,
html[data-ff-theme="light"] .panel-title,
html[data-ff-theme="light"] .rcs-header h1,
html[data-ff-theme="light"] .summary-growth-title,
html[data-ff-theme="light"] .pf-title,
html[data-ff-theme="light"] .pf-line,
html[data-ff-theme="light"] .pf-line span:last-child {
  background: #ffffff !important;
  color: #0f172a !important;
}
/* RCS Summary collapsibles (YoY / multi-year / monthly / …) stay dark without these */
html[data-ff-theme="light"] .rcs-sum-section {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] .rcs-sum-section > summary {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-bottom-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] .rcs-sum-section > summary::before,
html[data-ff-theme="light"] .rcs-sum-hint,
html[data-ff-theme="light"] .rcs-sum-toolbar-label {
  color: #64748b !important;
}
html[data-ff-theme="light"] .rcs-sum-section-body {
  background: #ffffff !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] .rcs-dt-bar,
html[data-ff-theme="light"] .filter-bar,
html[data-ff-theme="light"] .filter-row {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] .data-table tr.total-row td,
html[data-ff-theme="light"] .data-table tr.subtotal-row td {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-top-color: #cbd5e1 !important;
}
html[data-ff-theme="light"] .data-table tfoot tr td,
html[data-ff-theme="light"] .data-table tfoot tr.total-row td,
html[data-ff-theme="light"] .data-table tr[style*="background:#1e293b"] td,
html[data-ff-theme="light"] .data-table tr[style*="background: #1e293b"] td,
html[data-ff-theme="light"] .data-table tr[style*="background:#0f172a"] td,
html[data-ff-theme="light"] .data-table tr[style*="background: #0f172a"] td {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] .data-table td.total-row {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] .data-table tr:hover td,
html[data-ff-theme="light"] .tax-bracket-table tr:hover td,
html[data-ff-theme="light"] .rcs-sortable th[data-rcs-sort]:hover {
  background: #eff6ff !important;
  filter: none;
}
html[data-ff-theme="light"] .tax-bracket-table tr.highlight td {
  background: #fef3c7 !important;
  color: #0f172a !important;
}
/* Inline dark slabs on Investments Calculator / drill-downs */
html[data-ff-theme="light"] .rcs-root [style*="background:#0f172a"],
html[data-ff-theme="light"] .rcs-root [style*="background: #0f172a"],
html[data-ff-theme="light"] .rcs-root [style*="background:#1e293b"],
html[data-ff-theme="light"] .rcs-root [style*="background: #1e293b"] {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] .rcs-root thead tr[style*="background:#1e293b"],
html[data-ff-theme="light"] .rcs-root thead tr[style*="background: #1e293b"],
html[data-ff-theme="light"] .rcs-root tr[style*="background:#1e293b"],
html[data-ff-theme="light"] .rcs-root tr[style*="background: #1e293b"] {
  background: #f1f5f9 !important;
}
html[data-ff-theme="light"] .rcs-root table[style*="color:#e2e8f0"],
html[data-ff-theme="light"] .rcs-root table[style*="color: #e2e8f0"],
html[data-ff-theme="light"] .rcs-root div[style*="color:#e2e8f0"],
html[data-ff-theme="light"] .rcs-root div[style*="color: #e2e8f0"] {
  color: #0f172a !important;
}
/* Service-page headings only — never paint a box behind marketing/home/profile/train/community titles */
html[data-ff-theme="light"] body:not(.ff-home):not(.ff-profile-page):not(.ff-train-page):not(.ff-marketing-page):not(.ff-community) h1,
html[data-ff-theme="light"] body:not(.ff-home):not(.ff-profile-page):not(.ff-train-page):not(.ff-marketing-page):not(.ff-community) h2,
html[data-ff-theme="light"] body:not(.ff-home):not(.ff-profile-page):not(.ff-train-page):not(.ff-marketing-page):not(.ff-community) h3 {
  background: #f3f4f6 !important;
  color: #000000 !important;
}
/* Service headers in light mode use dark text on light backgrounds */
html[data-ff-theme="light"] .chat-header h1,
html[data-ff-theme="light"] .chat-header h2,
html[data-ff-theme="light"] .chat-header h3,
html[data-ff-theme="light"] .chat-header .analytics-header-line1,
html[data-ff-theme="light"] .sidebar-header h1,
html[data-ff-theme="light"] .sidebar-header h2,
html[data-ff-theme="light"] .sidebar-header h3 {
  background: transparent !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}
html[data-ff-theme="light"] body.ff-profile-page h1,
html[data-ff-theme="light"] body.ff-profile-page h2,
html[data-ff-theme="light"] body.ff-profile-page h3,
html[data-ff-theme="light"] body.ff-train-page h1,
html[data-ff-theme="light"] body.ff-train-page h2,
html[data-ff-theme="light"] body.ff-train-page h3,
html[data-ff-theme="light"] body.ff-marketing-page h1,
html[data-ff-theme="light"] body.ff-marketing-page h2,
html[data-ff-theme="light"] body.ff-marketing-page h3,
html[data-ff-theme="light"] body.ff-community h1,
html[data-ff-theme="light"] body.ff-community h2,
html[data-ff-theme="light"] body.ff-community h3 {
  background: transparent !important;
}
html[data-ff-theme="light"] body.ff-community .panel,
html[data-ff-theme="light"] body.ff-community .topic,
html[data-ff-theme="light"] body.ff-community .rules,
html[data-ff-theme="light"] body.ff-community .reply,
html[data-ff-theme="light"] body.ff-community .login-hint {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}
html[data-ff-theme="light"] body.ff-community .reply {
  background: #f8fafc !important;
}
html[data-ff-theme="light"] body.ff-community .talk-list li button {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}
html[data-ff-theme="light"] .pf-line span:first-child {
  color: #374151 !important;
  background: transparent !important;
}
html[data-ff-theme="light"] th,
html[data-ff-theme="light"] .data-table th,
html[data-ff-theme="light"] .summary-header {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] .summary-field.summary-field-sep-after::after,
html[data-ff-theme="light"] .cell-empty {
  color: #4b5563 !important;
}
html[data-ff-theme="light"] .summary-field-toggle {
  color: #111827 !important;
}
html[data-ff-theme="light"] .card-label,
html[data-ff-theme="light"] .card-sub,
html[data-ff-theme="light"] .form-group label,
html[data-ff-theme="light"] label,
html[data-ff-theme="light"] .empty-msg,
html[data-ff-theme="light"] .muted,
html[data-ff-theme="light"] .hint,
html[data-ff-theme="light"] .updated {
  color: #111827 !important;
}
html[data-ff-theme="light"] .tab-btn,
html[data-ff-theme="light"] .pl-tab,
html[data-ff-theme="light"] .rt-tab,
html[data-ff-theme="light"] .pt-tab,
html[data-ff-theme="light"] .bk-tab,
html[data-ff-theme="light"] .ffa-tab,
html[data-ff-theme="light"] .ins-tab,
html[data-ff-theme="light"] .bg-tab,
html[data-ff-theme="light"] .wb-tabs > a {
  color: #1e3a5f !important;
  background: transparent !important;
}
html[data-ff-theme="light"] .tab-btn:hover,
html[data-ff-theme="light"] .pl-tab:hover,
html[data-ff-theme="light"] .rt-tab:hover,
html[data-ff-theme="light"] .pt-tab:hover,
html[data-ff-theme="light"] .bk-tab:hover,
html[data-ff-theme="light"] .ffa-tab:hover,
html[data-ff-theme="light"] .ins-tab:hover,
html[data-ff-theme="light"] .bg-tab:hover,
html[data-ff-theme="light"] .wb-tabs > a:hover {
  background: #a8b6c8 !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] .tab-btn.active,
html[data-ff-theme="light"] .pl-tab.active,
html[data-ff-theme="light"] .rt-tab.active,
html[data-ff-theme="light"] .pt-tab.active,
html[data-ff-theme="light"] .bk-tab.active,
html[data-ff-theme="light"] .ffa-tab.active,
html[data-ff-theme="light"] .ins-tab.active,
html[data-ff-theme="light"] .bg-tab.active {
  background: #2563eb !important;
  color: #ffffff !important;
}
html[data-ff-theme="light"] .btn-add,
html[data-ff-theme="light"] .btn-calc,
html[data-ff-theme="light"] .btn-primary {
  background: #2563eb !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}
html[data-ff-theme="light"] .sidebar-header {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] .chat-header {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] .btn-add:hover,
html[data-ff-theme="light"] .btn-calc:hover,
html[data-ff-theme="light"] .btn-primary:hover {
  background: #1d4ed8 !important;
}
html[data-ff-theme="light"] input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=image]),
html[data-ff-theme="light"] select,
html[data-ff-theme="light"] textarea {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] a:not(.pill):not(.ff-os-home):not(.ff-nav-link):not(.ff-os-about):not(.ff-os-back):not(.pl-tab):not(.rt-tab):not(.pt-tab):not(.bk-tab):not(.ffa-tab):not(.ins-tab):not(.bg-tab):not(.tab-btn):not([class^="btn-"]):not(.btn-primary):not(.is-active):not(.train-nav a):not(.home-cta):not(.header-quick-nav a):not(.biz-hub-switch a):not(.wb-btn):not(#next-btn),
html[data-ff-theme="light"] th a {
  color: #1e3a8a !important;
}
html[data-ff-theme="light"] a.pill.active,
html[data-ff-theme="light"] .pill.active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-ff-theme="light"] a[class^="btn-"]:not(.btn-secondary):not(.btn-note):not(.btn-ghost):not([class="btn-sm"]),
html[data-ff-theme="light"] a[class*=" btn-"]:not(.btn-secondary):not(.btn-note):not(.btn-ghost):not([class="btn-sm"]),
html[data-ff-theme="light"] .card > a[class^="btn-"]:not(.btn-secondary):not(.btn-note):not(.btn-ghost):not([class="btn-sm"]),
html[data-ff-theme="light"] .home-cta,
html[data-ff-theme="light"] a.wb-btn,
html[data-ff-theme="light"] #next-btn {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
/* Home page ignores light theme — always identical to dark marketing page */
html[data-ff-theme="light"] body.ff-home {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}
html[data-ff-theme="light"] body.ff-home .card {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: none !important;
  color: #e2e8f0 !important;
}
html[data-ff-theme="light"] body.ff-home .card:hover {
  border-color: #60a5fa !important;
}
html[data-ff-theme="light"] body.ff-home .card h2,
html[data-ff-theme="light"] body.ff-home .hero h1,
html[data-ff-theme="light"] body.ff-home .footer-brand h3 {
  background: transparent !important;
  color: #f1f5f9 !important;
}
html[data-ff-theme="light"] body.ff-home .hero h1 span,
html[data-ff-theme="light"] body.ff-home .footer-brand h3 span,
html[data-ff-theme="light"] body.ff-home a.ff-home-learn {
  color: #38bdf8 !important;
  background: transparent !important;
}
html[data-ff-theme="light"] body.ff-home a.ff-home-inline {
  color: #38bdf8 !important;
  background: transparent !important;
  border-bottom-color: rgba(56,189,248,.45) !important;
}
html[data-ff-theme="light"] body.ff-home .hero p,
html[data-ff-theme="light"] body.ff-home .card p,
html[data-ff-theme="light"] body.ff-home .footer-col h4 {
  color: #94a3b8 !important;
  background: transparent !important;
}
html[data-ff-theme="light"] body.ff-home .ff-home-sub {
  color: #64748b !important;
}
html[data-ff-theme="light"] body.ff-home .site-footer,
html[data-ff-theme="light"] body.ff-home .footer-bottom {
  border-top-color: #1e293b !important;
}
html[data-ff-theme="light"] body.ff-home .footer-brand p,
html[data-ff-theme="light"] body.ff-home .footer-col ul li a,
html[data-ff-theme="light"] body.ff-home .footer-col ul li span {
  color: #64748b !important;
}
/* Home keeps its dark slate in light mode — footer ink stays light */
html[data-ff-theme="light"] body.ff-home .footer-bottom p {
  color: #94a3b8 !important;
}
html[data-ff-theme="light"] body.ff-home .footer-bottom a {
  color: #94a3b8 !important;
}
html[data-ff-theme="light"] body.ff-home .footer-col ul li a:hover,
html[data-ff-theme="light"] body.ff-home .footer-bottom a:hover {
  color: #38bdf8 !important;
}
/* Home hub CTAs — pure white labels on deep fills (both themes) */
html[data-ff-theme] body.ff-home .card a.home-cta,
html[data-ff-theme] body.ff-home .card a.home-cta:link,
html[data-ff-theme] body.ff-home .card a.home-cta:visited,
html[data-ff-theme] body.ff-home .card a.home-cta:hover,
html[data-ff-theme] body.ff-home .card a.home-cta:active,
html[data-ff-theme="light"] body.ff-home .card a.home-cta,
html[data-ff-theme="light"] body.ff-home .card a.home-cta:link,
html[data-ff-theme="light"] body.ff-home .card a.home-cta:visited,
html[data-ff-theme="light"] body.ff-home .card a.home-cta:hover {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-ff-theme] body.ff-home .btn-blue { background: #1e40af !important; border-color: #1e3a8a !important; }
html[data-ff-theme] body.ff-home .btn-violet { background: #5b21b6 !important; border-color: #4c1d95 !important; }
html[data-ff-theme] body.ff-home .btn-planning { background: #047857 !important; border-color: #065f46 !important; }
html[data-ff-theme] body.ff-home .btn-blue:hover { background: #1d4ed8 !important; }
html[data-ff-theme] body.ff-home .btn-violet:hover { background: #6d28d9 !important; }
html[data-ff-theme] body.ff-home .btn-planning:hover { background: #059669 !important; }
/* Profile modal — light surfaces */
html[data-ff-theme="light"] #ff-profile-content,
html[data-ff-theme="light"] #ff-auth-modal > div {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] #ff-profile-content h2,
html[data-ff-theme="light"] #ff-profile-content h3,
html[data-ff-theme="light"] #ff-auth-modal h2 {
  color: #0f172a !important;
}
html[data-ff-theme="light"] #ff-profile-content p,
html[data-ff-theme="light"] #ff-profile-content label,
html[data-ff-theme="light"] #ff-profile-content summary {
  color: #334155 !important;
}
html[data-ff-theme="light"] #ff-profile-content hr {
  border-top-color: #bfdbfe !important;
}
html[data-ff-theme="light"] #ff-profile-content input:not([type=checkbox]):not([type=radio]):not([type=color]),
html[data-ff-theme="light"] #ff-profile-content select,
html[data-ff-theme="light"] #ff-profile-content textarea,
html[data-ff-theme="light"] #ff-auth-modal input,
html[data-ff-theme="light"] #ff-auth-modal select,
html[data-ff-theme="light"] #ff-auth-modal textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] #ff-privacy-settings-wrap > div,
html[data-ff-theme="light"] #ff-ai-settings-wrap > div,
html[data-ff-theme="light"] #ff-privacy-settings-wrap [style*="background:#0a1628"],
html[data-ff-theme="light"] .ff-privacy-panel,
html[data-ff-theme="light"] #ff-privacy-settings-wrap [style*="background: #0a1628"] {
  background: #f8fafc !important;
  border-color: #93c5fd !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] #ff-privacy-load-msg {
  color: #64748b !important;
}
html[data-ff-theme="light"] tr:hover td {
  background: #eff6ff !important;
}
html[data-ff-theme="light"] .summary-tag-filter-row td,
html[data-ff-theme="light"] .summary-symbol,
html[data-ff-theme="light"] .controls-extra {
  background: #ffffff !important;
  color: #000000 !important;
}
/* Light mode: keep Dark OS row chrome (same slate bar) */
html[data-ff-theme="light"] #ff-auth-bar {
  background: rgba(15,23,42,0.96) !important;
  color: #94a3b8 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
  border-bottom: none !important;
}
html[data-ff-theme="light"] #ff-auth-bar .ff-nav-link {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25) !important;
}
html[data-ff-theme="light"] #ff-auth-bar .ff-nav-link:hover {
  background: #334155 !important;
  color: #ffffff !important;
  border-color: #475569 !important;
}
html[data-ff-theme="light"] #ff-auth-bar .ff-nav-link.is-active {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  border-color: #0369a1 !important;
}
html[data-ff-theme="light"] #ff-auth-bar .ff-os-back {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #64748b !important;
}
html[data-ff-theme="light"] #ff-auth-bar .ff-os-back:hover {
  background: #334155 !important;
  color: #ffffff !important;
}
html[data-ff-theme="light"] #ff-auth-bar .ff-os-home,
html[data-ff-theme="light"] #ff-auth-bar .ff-os-home.is-active {
  background: linear-gradient(180deg, #0ea5e9 0%, #0369a1 100%) !important;
  border-color: #0c4a6e !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.12) !important;
}
html[data-ff-theme="light"] #ff-auth-bar .ff-os-home:hover {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%) !important;
  border-color: #0369a1 !important;
}
html[data-ff-theme="light"] #ff-auth-bar span,
html[data-ff-theme="light"] #ff-auth-bar .ff-lang-switcher,
html[data-ff-theme="light"] #ff-auth-bar .ff-lang-switcher a,
html[data-ff-theme="light"] #ff-auth-bar .ff-nav-hide-sm {
  color: #94a3b8 !important;
  opacity: 1 !important;
}
html[data-ff-theme="light"] #ff-auth-bar .ff-lang-switcher a {
  color: #94a3b8 !important;
}
html[data-ff-theme="light"] #ff-auth-bar button[onclick*="ffOpenProfile"],
html[data-ff-theme="light"] #ff-auth-bar.ff-bar-guest button[style*="transparent"],
html[data-ff-theme="light"] #ff-auth-bar button[onclick*="ff-auth-modal"][style*="transparent"] {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}
html[data-ff-theme="light"] #ff-auth-bar.ff-bar-guest button[style*="2563eb"],
html[data-ff-theme="light"] #ff-auth-bar.ff-bar-guest button[style*="#2563eb"] {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
}
html[data-ff-theme="light"] #ff-auth-bar.ff-bar-guest button[style*="7c3aed"],
html[data-ff-theme="light"] #ff-auth-bar .ff-os-about {
  background: #6d28d9 !important;
  border-color: #5b21b6 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25) !important;
}
html[data-ff-theme="light"] #ff-auth-bar .ff-os-about:hover {
  background: #7c3aed !important;
  border-color: #6d28d9 !important;
}
html[data-ff-theme="light"] #ff-profile-content {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] #ff-profile-content h2,
html[data-ff-theme="light"] #ff-profile-content h3,
html[data-ff-theme="light"] #ff-profile-content p,
html[data-ff-theme="light"] #ff-profile-content label {
  color: #000000 !important;
}
html[data-ff-theme="light"] .header-quick-nav a {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] .header-quick-nav a.active,
html[data-ff-theme="light"] .biz-hub-switch a.active {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
}
html[data-ff-theme="light"] .ff-hub-iframe,
html[data-ff-theme="light"] iframe {
  background: #ffffff !important;
}
/* Remap common dark inline leftovers to theme vars (all modes).
   Skip buttons so Analytics Buy/Sell/Ideas keep their action colors. */
html[data-ff-theme] [style*="background:#1e293b"]:not(button):not([class*="btn"]),
html[data-ff-theme] [style*="background: #1e293b"]:not(button):not([class*="btn"]),
html[data-ff-theme] [style*="background:#0f172a"]:not(button):not([class*="btn"]),
html[data-ff-theme] [style*="background: #0f172a"]:not(button):not([class*="btn"]),
html[data-ff-theme] [style*="background:#0b1220"]:not(button):not([class*="btn"]),
html[data-ff-theme] [style*="background:#0a0f1e"]:not(button):not([class*="btn"]),
html[data-ff-theme] [style*="background: #0a0f1e"]:not(button):not([class*="btn"]),
html[data-ff-theme] [style*="background:#020617"]:not(button):not([class*="btn"]),
html[data-ff-theme] [style*="background: #020617"]:not(button):not([class*="btn"]),
html[data-ff-theme] [style*="background: #0b1220"]:not(button):not([class*="btn"]) {
  background: var(--ff-panel) !important;
  color: var(--ff-text) !important;
  border-color: var(--ff-border) !important;
}
html[data-ff-theme] [style*="color:#f8fafc"],
html[data-ff-theme] [style*="color: #f8fafc"],
html[data-ff-theme] [style*="color:#f1f5f9"],
html[data-ff-theme] [style*="color: #f1f5f9"],
html[data-ff-theme] [style*="color:#e2e8f0"],
html[data-ff-theme] [style*="color: #e2e8f0"],
html[data-ff-theme] [style*="color:#cbd5e1"],
html[data-ff-theme] [style*="color: #cbd5e1"] {
  color: var(--ff-text) !important;
}
html[data-ff-theme="light"] #ff-headup {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
html[data-ff-theme="light"] #ff-headup-text {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}
html[data-ff-theme="light"] #ff-headup-edit {
  background: #e2e8f0 !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  border-color: #94a3b8 !important;
}
html[data-ff-theme="light"] #ff-headup-hide {
  background: #e2e8f0 !important;
  color: #1e293b !important;
  -webkit-text-fill-color: #1e293b !important;
  border-color: #cbd5e1 !important;
}
html[data-ff-theme="light"] #ff-headup-show {
  color: #1e3a8a !important;
  -webkit-text-fill-color: #1e3a8a !important;
  background: transparent !important;
  border: none !important;
}
/* Portfolio ticker symbols: dark blue on white — never sky #38bdf8 */
html[data-ff-theme="light"] .ff-ticker-btn,
html[data-ff-theme="light"] button.ff-ticker-btn {
  background: transparent !important;
  color: #1e3a8a !important;
  -webkit-text-fill-color: #1e3a8a !important;
  border: none !important;
}
html[data-ff-theme="light"] .ff-ticker-btn:hover,
html[data-ff-theme="light"] button.ff-ticker-btn:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
}
/* Toolbar / secondary toggles: black on light fill (never white-on-white) */
html[data-ff-theme="light"] .controls-toggle-btn {
  background: #e5e7eb !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  border: 1px solid #94a3b8 !important;
}
html[data-ff-theme] [style*="color:#94a3b8"],
html[data-ff-theme] [style*="color: #94a3b8"],
html[data-ff-theme] [style*="color:#64748b"],
html[data-ff-theme] [style*="color: #64748b"] {
  color: var(--ff-muted) !important;
}
html[data-ff-theme] [style*="border:1px solid #334155"],
html[data-ff-theme] [style*="border:1px solid #475569"],
html[data-ff-theme] [style*="border: 1px solid #334155"],
html[data-ff-theme] [style*="border: 1px solid #475569"] {
  border-color: var(--ff-border) !important;
}
html[data-ff-theme] a:not(.active):not(.ff-os-home):not(.ff-nav-link):not(.ff-os-about):not(.ff-os-back):not(.pl-tab):not(.rt-tab):not(.pt-tab):not(.bk-tab):not(.ffa-tab):not(.ins-tab):not(.bg-tab):not(.tab-btn):not([class^="btn-"]):not([class*=" btn-"]):not(.home-cta):not(.btn-service):not(.btn-price):not(.btn-primary):not(.btn-gold):not(.btn-outline):not(.btn-submit):not(.nav-cta):not(.is-active):not(.train-nav a):not(.wb-btn):not(#next-btn) {
  color: var(--ff-accent) !important;
}
/* Will wizard CTAs: keep white labels on filled buttons (light + dark) */
html[data-ff-theme] .wb-btn,
html[data-ff-theme] a.wb-btn,
html[data-ff-theme] button.wb-btn,
html[data-ff-theme] #next-btn {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-ff-theme] .wb-btn-primary,
html[data-ff-theme] a.wb-btn-primary,
html[data-ff-theme] #next-btn {
  background: #7c3aed !important;
  border-color: #6d28d9 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-ff-theme] .wb-btn-secondary,
html[data-ff-theme] a.wb-btn-secondary,
html[data-ff-theme] button.wb-btn-secondary {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-ff-theme="light"] .wb-btn-secondary,
html[data-ff-theme="light"] a.wb-btn-secondary,
html[data-ff-theme="light"] button.wb-btn-secondary {
  background: #1e3a5f !important;
  border-color: #1e40af !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
/* Active Summary / Monthly / hub pills: white label on accent (beats blanket link color) */
html[data-ff-theme] body .header-quick-nav a.active,
html[data-ff-theme] body .biz-hub-switch a.active,
html[data-ff-theme="light"] body .header-quick-nav a.active,
html[data-ff-theme="light"] body .biz-hub-switch a.active,
html[data-ff-theme="light"] .rcs-root .header-quick-nav a.active,
html[data-ff-theme="light"] .rcs-root .biz-hub-switch a.active {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #1d4ed8 !important;
}
html[data-ff-theme="light"] body .header-quick-nav a:not(.active),
html[data-ff-theme="light"] body .biz-hub-switch a:not(.active),
html[data-ff-theme="light"] .rcs-root .header-quick-nav a:not(.active),
html[data-ff-theme="light"] .rcs-root .biz-hub-switch a:not(.active) {
  background: #ffffff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  border-color: #93c5fd !important;
}
/* Train section chips + service CTAs: always white labels on filled buttons */
html[data-ff-theme] body.ff-train-page .train-nav a,
html[data-ff-theme] body.ff-train-page .train-nav a:hover,
html[data-ff-theme] body.ff-train-page .btn-service,
html[data-ff-theme] body.ff-train-page a.btn-service {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-ff-theme] body.ff-train-page .train-nav a {
  background: #0369a1 !important;
  border-color: #0284c7 !important;
}
html[data-ff-theme="light"] body.ff-train-page .train-nav a {
  background: #1d4ed8 !important;
  border-color: #1e40af !important;
}
html[data-ff-theme="light"] body.ff-train-page .train-nav a:hover {
  background: #2563eb !important;
  border-color: #1d4ed8 !important;
}
html[data-ff-theme] .wb-tabs > a {
  color: var(--ff-muted) !important;
}
html[data-ff-theme] .wb-tabs > a:hover {
  color: var(--ff-text) !important;
}
html[data-ff-theme] a[class^="btn-"]:not(.btn-secondary):not(.btn-note):not(.btn-ghost):not([class="btn-sm"]),
html[data-ff-theme] a[class*=" btn-"]:not(.btn-secondary):not(.btn-note):not(.btn-ghost):not([class="btn-sm"]),
html[data-ff-theme] .btn-service,
html[data-ff-theme] .btn-price.filled,
html[data-ff-theme] .btn-primary,
html[data-ff-theme] .btn-gold,
html[data-ff-theme] .btn-submit,
html[data-ff-theme] .nav-cta,
html[data-ff-theme] .home-cta {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html[data-ff-theme] .btn-add, html[data-ff-theme] .btn-calc, html[data-ff-theme] .btn-primary,
html[data-ff-theme] .tab-btn.active,
html[data-ff-theme] .pl-tab.active, html[data-ff-theme] .rt-tab.active,
html[data-ff-theme] .pt-tab.active, html[data-ff-theme] .bk-tab.active,
html[data-ff-theme] .ffa-tab.active, html[data-ff-theme] .ins-tab.active,
html[data-ff-theme] .bg-tab.active {
  background: var(--ff-accent) !important;
  border-color: var(--ff-accent) !important;
  color: #fff !important;
}

/* ---- Light: platform-wide bright surfaces (tables, panels, advisor, tax) ---- */
html[data-ff-theme="light"] .ba-panel,
html[data-ff-theme="light"] .calc-box,
html[data-ff-theme="light"] .calc-result,
html[data-ff-theme="light"] .mc-toolbar,
html[data-ff-theme="light"] .mc-col,
html[data-ff-theme="light"] .mc-card,
html[data-ff-theme="light"] .mc-proj-banner,
html[data-ff-theme="light"] .mc-modal-panel,
html[data-ff-theme="light"] .mc-toast {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] .ba-chat-messages,
html[data-ff-theme="light"] .ba-msg.assistant .ba-bubble {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] .ba-rec-body,
html[data-ff-theme="light"] .calc-result-row,
html[data-ff-theme="light"] .mc-col-balances input,
html[data-ff-theme="light"] .mc-card-row input,
html[data-ff-theme="light"] .mc-card-row select {
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}
html[data-ff-theme="light"] .tax-bracket-table,
html[data-ff-theme="light"] .tax-bracket-table th,
html[data-ff-theme="light"] .tax-bracket-table td,
html[data-ff-theme="light"] .cca-schedule th,
html[data-ff-theme="light"] .cca-schedule td {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] .tax-bracket-table th,
html[data-ff-theme="light"] .cca-schedule th {
  background: #f1f5f9 !important;
}
html[data-ff-theme="light"] .section-title {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-left-color: #2563eb !important;
}
/* Broad light remap: any remaining slate slabs → white / soft header */
html[data-ff-theme="light"] [style*="background:#0f172a"]:not(button):not([class*="btn"]),
html[data-ff-theme="light"] [style*="background: #0f172a"]:not(button):not([class*="btn"]),
html[data-ff-theme="light"] [style*="background:#1e293b"]:not(button):not([class*="btn"]),
html[data-ff-theme="light"] [style*="background: #1e293b"]:not(button):not([class*="btn"]),
html[data-ff-theme="light"] [style*="background:#0b1220"]:not(button):not([class*="btn"]),
html[data-ff-theme="light"] [style*="background: #0b1220"]:not(button):not([class*="btn"]),
html[data-ff-theme="light"] [style*="background:#0a0f1e"]:not(button):not([class*="btn"]),
html[data-ff-theme="light"] [style*="background: #0a0f1e"]:not(button):not([class*="btn"]),
html[data-ff-theme="light"] [style*="background:#020617"]:not(button):not([class*="btn"]),
html[data-ff-theme="light"] [style*="background: #020617"]:not(button):not([class*="btn"]),
html[data-ff-theme="light"] [style*="background:#0a1628"]:not(button):not([class*="btn"]),
html[data-ff-theme="light"] [style*="background: #0a1628"]:not(button):not([class*="btn"]) {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] thead tr[style*="background:#1e293b"] th,
html[data-ff-theme="light"] thead tr[style*="background: #1e293b"] th,
html[data-ff-theme="light"] th[style*="background:#0f172a"],
html[data-ff-theme="light"] th[style*="background: #0f172a"],
html[data-ff-theme="light"] th[style*="background:#1e293b"],
html[data-ff-theme="light"] th[style*="background: #1e293b"] {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] [style*="color:#e2e8f0"],
html[data-ff-theme="light"] [style*="color: #e2e8f0"],
html[data-ff-theme="light"] [style*="color:#f1f5f9"],
html[data-ff-theme="light"] [style*="color: #f1f5f9"],
html[data-ff-theme="light"] [style*="color:#cbd5e1"],
html[data-ff-theme="light"] [style*="color: #cbd5e1"] {
  color: #0f172a !important;
}

/* Family Hub: Will / Planning / Retirement / Rental stay light in light mode */
html[data-ff-theme="light"] .wb-header,
html[data-ff-theme="light"] .wb-body,
html[data-ff-theme="light"] .wb-card,
html[data-ff-theme="light"] .wb-readiness,
html[data-ff-theme="light"] .wb-viewer,
html[data-ff-theme="light"] #will-viewer,
html[data-ff-theme="light"] #gen-status,
html[data-ff-theme="light"] .pl-header,
html[data-ff-theme="light"] .pl-content,
html[data-ff-theme="light"] .rt-header,
html[data-ff-theme="light"] .rt-content,
html[data-ff-theme="light"] .pt-header,
html[data-ff-theme="light"] .pt-content,
html[data-ff-theme="light"] .sc-card,
html[data-ff-theme="light"] .scenario-panel,
html[data-ff-theme="light"] .benefit-box,
html[data-ff-theme="light"] .spouse-section,
html[data-ff-theme="light"] .summary-card,
html[data-ff-theme="light"] .vehicle-card,
html[data-ff-theme="light"] .info-box {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] .wb-header h1,
html[data-ff-theme="light"] .pl-header h1,
html[data-ff-theme="light"] .rt-header h1,
html[data-ff-theme="light"] .pt-header h1,
html[data-ff-theme="light"] .wb-readiness,
html[data-ff-theme="light"] .wb-card h2,
html[data-ff-theme="light"] .wb-card h3 {
  color: #0f172a !important;
}
html[data-ff-theme="light"] .wb-header p,
html[data-ff-theme="light"] .pl-header .subtitle,
html[data-ff-theme="light"] .rt-header .subtitle,
html[data-ff-theme="light"] .pt-header .subtitle {
  color: #334155 !important;
}
html[data-ff-theme="light"] .wb-readiness,
html[data-ff-theme="light"] .wb-gen-status {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] .wb-readiness-title,
html[data-ff-theme="light"] .wb-sec-label,
html[data-ff-theme="light"] .wb-gen-msg {
  color: #0f172a !important;
}
html[data-ff-theme="light"] .wb-sec-count,
html[data-ff-theme="light"] .wb-gen-sub {
  color: #475569 !important;
}
html[data-ff-theme="light"] .wb-readiness-icon {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}
html[data-ff-theme="light"] .wb-readiness-msg[data-level="ok"] {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: #86efac !important;
}
html[data-ff-theme="light"] .wb-readiness-msg[data-level="warn"] {
  background: #ffedd5 !important;
  color: #9a3412 !important;
  border-color: #fdba74 !important;
}
html[data-ff-theme="light"] .wb-readiness-msg[data-level="bad"] {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #fca5a5 !important;
}
html[data-ff-theme="light"] .wb-sec-row {
  border-bottom-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] .info-box {
  background: #eff6ff !important;
  border: 1px solid #93c5fd !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] .cra-note {
  background: #ecfdf5 !important;
  border-color: #86efac !important;
  color: #14532d !important;
}
html[data-ff-theme="light"] body .pl-content,
html[data-ff-theme="light"] body .rt-content,
html[data-ff-theme="light"] body .pt-content,
html[data-ff-theme="light"] body .wb-body {
  background: #ffffff !important;
}
html[data-ff-theme="light"] .pl-content table,
html[data-ff-theme="light"] .rt-content table,
html[data-ff-theme="light"] .pt-content table,
html[data-ff-theme="light"] .pl-content th,
html[data-ff-theme="light"] .rt-content th,
html[data-ff-theme="light"] .pt-content th,
html[data-ff-theme="light"] .pl-content td,
html[data-ff-theme="light"] .rt-content td,
html[data-ff-theme="light"] .pt-content td,
html[data-ff-theme="light"] .pl-content tfoot td,
html[data-ff-theme="light"] .rt-content tfoot td,
html[data-ff-theme="light"] .pt-content tfoot td {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] .pl-content th,
html[data-ff-theme="light"] .rt-content th,
html[data-ff-theme="light"] .pt-content th,
html[data-ff-theme="light"] .pl-content tfoot td,
html[data-ff-theme="light"] .rt-content tfoot td,
html[data-ff-theme="light"] .pt-content tfoot td {
  background: #f1f5f9 !important;
}
html[data-ff-theme="light"] .pl-content tr:hover td,
html[data-ff-theme="light"] .rt-content tr:hover td,
html[data-ff-theme="light"] .pt-content tr:hover td {
  background: #f8fafc !important;
}

/* ---- Dark: tighten low-contrast leftovers ---- */
html[data-ff-theme="dark"] .empty-msg,
html[data-ff-theme="dark"] .card-sub,
html[data-ff-theme="dark"] .hint,
html[data-ff-theme="dark"] .muted {
  color: #cbd5e1 !important;
}
html[data-ff-theme="dark"] .shortcut-panel,
html[data-ff-theme="dark"] .shortcut-panel label,
html[data-ff-theme="dark"] .ff-scope-label,
html[data-ff-theme="dark"] .message.system .message-content,
html[data-ff-theme="dark"] .message.assistant .message-content,
html[data-ff-theme="dark"] .message.user .message-content {
  color: #e2e8f0 !important;
}
html[data-ff-theme="dark"] .shortcut-panel .hint,
html[data-ff-theme="dark"] .ff-scope-muted {
  color: #cbd5e1 !important;
}
html[data-ff-theme="dark"] .shortcut-panel button:not(.scope-reset-btn):not(#portfolio-ideas-btn):not(#ca-portfolio-ideas-btn):not(#world-portfolio-ideas-btn):not(#financial-news-btn) {
  color: #ffffff !important;
}
html[data-ff-theme="dark"] #portfolio-ideas-btn {
  background: #c4b5fd !important;
  color: #1e1b4b !important;
  border-color: #ddd6fe !important;
}
html[data-ff-theme="dark"] #ca-portfolio-ideas-btn {
  background: #fecaca !important;
  color: #7f1d1d !important;
  border-color: #fca5a5 !important;
}
html[data-ff-theme="dark"] #world-portfolio-ideas-btn {
  background: #99f6e4 !important;
  color: #134e4a !important;
  border-color: #5eead4 !important;
}
html[data-ff-theme="dark"] #financial-news-btn {
  background: #7dd3fc !important;
  color: #0c4a6e !important;
  border-color: #bae6fd !important;
}
html[data-ff-theme="dark"] .scope-reset-btn {
  background: #be123c !important;
  color: #fff1f2 !important;
  border-color: #fb7185 !important;
}
html[data-ff-theme="dark"] [style*="color:#374151"],
html[data-ff-theme="dark"] [style*="color: #374151"],
html[data-ff-theme="dark"] [style*="color:#1d4ed8"],
html[data-ff-theme="dark"] [style*="color: #1d4ed8"],
html[data-ff-theme="dark"] [style*="color:#0052a3"],
html[data-ff-theme="dark"] [style*="color: #0052a3"],
html[data-ff-theme="dark"] [style*="color:#111827"],
html[data-ff-theme="dark"] [style*="color: #111827"],
html[data-ff-theme="dark"] [style*="color:#0f172a"],
html[data-ff-theme="dark"] [style*="color: #0f172a"],
html[data-ff-theme="dark"] [style*="color:#1e293b"],
html[data-ff-theme="dark"] [style*="color: #1e293b"],
html[data-ff-theme="dark"] [style*="color:#333"],
html[data-ff-theme="dark"] [style*="color: #333"] {
  color: #e2e8f0 !important;
}
html[data-ff-theme="dark"] [style*="color:#6b7280"],
html[data-ff-theme="dark"] [style*="color: #6b7280"],
html[data-ff-theme="dark"] [style*="color:#6B7280"],
html[data-ff-theme="dark"] [style*="color:#888"],
html[data-ff-theme="dark"] [style*="color: #888"],
html[data-ff-theme="dark"] [style*="color: #6B7280"] {
  color: #cbd5e1 !important;
}
html[data-ff-theme="dark"] .scope-btn[style*="color:#333"],
html[data-ff-theme="dark"] .scope-pf-btn[style*="color:#374151"],
html[data-ff-theme="dark"] .scope-btn[style*="color: #333"],
html[data-ff-theme="dark"] .scope-pf-btn[style*="color: #374151"] {
  background: #334155 !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}
html[data-ff-theme="dark"] .rcs-header a,
html[data-ff-theme="dark"] .header-quick-nav a {
  color: #cbd5e1 !important;
}
html[data-ff-theme="dark"] .status-paid,
html[data-ff-theme="dark"] .tag-pos {
  background: #14532d !important;
  color: #86efac !important;
}
html[data-ff-theme="dark"] .status-notpaid,
html[data-ff-theme="dark"] .tag-neg {
  background: #7f1d1d !important;
  color: #fecaca !important;
}
html[data-ff-theme="dark"] .status-pending {
  background: #713f12 !important;
  color: #fde68a !important;
}
html[data-ff-theme="dark"] .info-box {
  background: rgba(14,165,233,.14) !important;
  border-color: rgba(56,189,248,.4) !important;
  color: #e2e8f0 !important;
}
html[data-ff-theme="dark"] .msg-banner {
  background: #14532d !important;
  color: #86efac !important;
  border-color: #166534 !important;
}
html[data-ff-theme="dark"] .err-banner {
  background: #7f1d1d !important;
  color: #fecaca !important;
  border-color: #991b1b !important;
}
html[data-ff-theme="dark"] table,
html[data-ff-theme="dark"] #summary-table,
html[data-ff-theme="dark"] #positions-table,
html[data-ff-theme="dark"] #history-table,
html[data-ff-theme="dark"] .data-table,
html[data-ff-theme="dark"] .ff-soft-panel,
html[data-ff-theme="dark"] .pf-card,
html[data-ff-theme="dark"] .sidebar-card,
html[data-ff-theme="dark"] .sidebar-card-wrapper,
html[data-ff-theme="dark"] .mgmt-card {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
html[data-ff-theme="dark"] .mgmt-card--danger {
  background: #78350f !important;
  border-color: #fcd34d !important;
}
html[data-ff-theme="dark"] th,
html[data-ff-theme="dark"] .summary-header,
html[data-ff-theme="dark"] .data-table th {
  background: #1e293b !important;
  color: #cbd5e1 !important;
}
html[data-ff-theme="dark"] td,
html[data-ff-theme="dark"] .data-table td,
html[data-ff-theme="dark"] .summary-cell,
html[data-ff-theme="dark"] .summary-symbol,
html[data-ff-theme="dark"] .summary-field {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}
html[data-ff-theme="dark"] tr[style*="background"] td {
  background: transparent !important;
}
html[data-ff-theme="dark"] .mgmt-card-title,
html[data-ff-theme="dark"] .summary-field-toggle {
  color: #e2e8f0 !important;
}
html[data-ff-theme="dark"] .mgmt-action-link {
  background: #0c4a6e !important;
  color: #e0f2fe !important;
  border-color: #0369a1 !important;
}
html[data-ff-theme="dark"] .btn-danger-submit {
  background: #7f1d1d !important;
  color: #fecaca !important;
  border-color: #dc2626 !important;
}
html[data-ff-theme="dark"] #col-mgmt-modal > div,
html[data-ff-theme="dark"] #row-color-menu {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
html[data-ff-theme="dark"] [style*="background:white"],
html[data-ff-theme="dark"] [style*="background: white"],
html[data-ff-theme="dark"] [style*="background:#ffffff"],
html[data-ff-theme="dark"] [style*="background: #ffffff"],
html[data-ff-theme="dark"] [style*="background:#fff;"],
html[data-ff-theme="dark"] [style*="background: #fff;"],
html[data-ff-theme="dark"] [style*="background:#f9f9f9"],
html[data-ff-theme="dark"] [style*="background: #f9f9f9"],
html[data-ff-theme="dark"] [style*="background:#f9fafb"],
html[data-ff-theme="dark"] [style*="background:#f8fafc"],
html[data-ff-theme="dark"] [style*="background: #f8fafc"],
html[data-ff-theme="dark"] [style*="background:#f8f9fa"],
html[data-ff-theme="dark"] [style*="background:#f0f0f0"],
html[data-ff-theme="dark"] [style*="background: #f0f0f0"],
html[data-ff-theme="dark"] [style*="background:#f3f4f6"],
html[data-ff-theme="dark"] [style*="background:#f5f5f5"],
html[data-ff-theme="dark"] [style*="background:#eee"],
html[data-ff-theme="dark"] [style*="background:#f0f9ff"],
html[data-ff-theme="dark"] [style*="background:#e8f4ff"],
html[data-ff-theme="dark"] [style*="background:#dbeafe"],
html[data-ff-theme="dark"] [style*="background:#eff6ff"],
html[data-ff-theme="dark"] [style*="background: #f9fafb"],
html[data-ff-theme="dark"] [style*="background: #f8f9fa"],
html[data-ff-theme="dark"] [style*="background: #f3f4f6"],
html[data-ff-theme="dark"] [style*="background: #f5f5f5"],
html[data-ff-theme="dark"] [style*="background: #eee"],
html[data-ff-theme="dark"] [style*="background: #f0f9ff"],
html[data-ff-theme="dark"] [style*="background: #e8f4ff"],
html[data-ff-theme="dark"] [style*="background: #dbeafe"],
html[data-ff-theme="dark"] [style*="background: #eff6ff"] {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
/* Dark: pastel card fills → slate (background: only — never bare hex, or borders overwrite tinted cards) */
html[data-ff-theme="dark"] [style*="background:#ecfdf3"],
html[data-ff-theme="dark"] [style*="background:#ecfdf5"],
html[data-ff-theme="dark"] [style*="background:#dcfce7"],
html[data-ff-theme="dark"] [style*="background:#d1fae5"],
html[data-ff-theme="dark"] [style*="background:#f0fdf4"],
html[data-ff-theme="dark"] [style*="background:#ccfbf1"],
html[data-ff-theme="dark"] [style*="background:#e0f2fe"],
html[data-ff-theme="dark"] [style*="background:#bae6fd"],
html[data-ff-theme="dark"] [style*="background:#f0f4ff"],
html[data-ff-theme="dark"] [style*="background:#e8eaf6"],
html[data-ff-theme="dark"] [style*="background:#f5f3ff"],
html[data-ff-theme="dark"] [style*="background:#ede9fe"],
html[data-ff-theme="dark"] [style*="background:#f3e8ff"],
html[data-ff-theme="dark"] [style*="background:#fff7ed"],
html[data-ff-theme="dark"] [style*="background:#ffedd5"],
html[data-ff-theme="dark"] [style*="background:#fef3c7"],
html[data-ff-theme="dark"] [style*="background:#fef9c3"],
html[data-ff-theme="dark"] [style*="background:#fee2e2"],
html[data-ff-theme="dark"] [style*="background:#a7f3d0"],
html[data-ff-theme="dark"] [style*="background:#bfdbfe"],
html[data-ff-theme="dark"] [style*="background:#c4b5fd"],
html[data-ff-theme="dark"] [style*="background: white"],
html[data-ff-theme="dark"] [style*="background:white"],
html[data-ff-theme="dark"] [style*="background:#ffffff"],
html[data-ff-theme="dark"] [style*="background: #ffffff"],
html[data-ff-theme="dark"] [style*="background:#fff;"],
html[data-ff-theme="dark"] [style*="background: #fff;"],
html[data-ff-theme="dark"] [style*="background: #ecfdf3"],
html[data-ff-theme="dark"] [style*="background: #ecfdf5"],
html[data-ff-theme="dark"] [style*="background: #dcfce7"],
html[data-ff-theme="dark"] [style*="background: #d1fae5"],
html[data-ff-theme="dark"] [style*="background: #f0fdf4"],
html[data-ff-theme="dark"] [style*="background: #ccfbf1"],
html[data-ff-theme="dark"] [style*="background: #e0f2fe"],
html[data-ff-theme="dark"] [style*="background: #bae6fd"],
html[data-ff-theme="dark"] [style*="background: #f0f4ff"],
html[data-ff-theme="dark"] [style*="background: #e8eaf6"],
html[data-ff-theme="dark"] [style*="background: #f5f3ff"],
html[data-ff-theme="dark"] [style*="background: #ede9fe"],
html[data-ff-theme="dark"] [style*="background: #f3e8ff"],
html[data-ff-theme="dark"] [style*="background: #fff7ed"],
html[data-ff-theme="dark"] [style*="background: #ffedd5"],
html[data-ff-theme="dark"] [style*="background: #fef3c7"],
html[data-ff-theme="dark"] [style*="background: #fef9c3"],
html[data-ff-theme="dark"] [style*="background: #fee2e2"],
html[data-ff-theme="dark"] [style*="background: #a7f3d0"],
html[data-ff-theme="dark"] [style*="background: #bfdbfe"],
html[data-ff-theme="dark"] [style*="background: #c4b5fd"] {
  background: #1e293b !important;
  background-image: none !important;
}
/* Tinted education cards LAST so they beat generic white/#fff* remaps (LIRA/RRIF/ATH/etc.) */
html[data-ff-theme="dark"] [style*="background:#fffbe6"],
html[data-ff-theme="dark"] [style*="background:#fff9e6"],
html[data-ff-theme="dark"] [style*="background:#fffbeb"],
html[data-ff-theme="dark"] [style*="background:#fff3cd"],
html[data-ff-theme="dark"] [style*="background:#fefce8"],
html[data-ff-theme="dark"] [style*="background: #fefce8"],
html[data-ff-theme="dark"] [style*="background:#fef08a"],
html[data-ff-theme="dark"] [style*="background: #fffbe6"],
html[data-ff-theme="dark"] [style*="background: #fff9e6"],
html[data-ff-theme="dark"] [style*="background: #fffbeb"],
html[data-ff-theme="dark"] [style*="background: #fff3cd"],
html[data-ff-theme="dark"] [style*="background: #fef08a"] {
  background: #422006 !important;
  color: #fde68a !important;
  border-color: #b45309 !important;
}
html[data-ff-theme="dark"] [style*="background:#f0fff0"],
html[data-ff-theme="dark"] [style*="background:#e8f5e9"],
html[data-ff-theme="dark"] [style*="background: #f0fff0"],
html[data-ff-theme="dark"] [style*="background: #e8f5e9"] {
  background: #14532d !important;
  color: #86efac !important;
  border-color: #166534 !important;
}
html[data-ff-theme="dark"] [style*="background:#fff0f0"],
html[data-ff-theme="dark"] [style*="background:#fef2f2"],
html[data-ff-theme="dark"] [style*="background: #fef2f2"],
html[data-ff-theme="dark"] [style*="background:#fef9f9"],
html[data-ff-theme="dark"] [style*="background: #fef9f9"],
html[data-ff-theme="dark"] [style*="background:#fff1f2"],
html[data-ff-theme="dark"] [style*="background: #fff0f0"],
html[data-ff-theme="dark"] [style*="background: #fff1f2"] {
  background: #7f1d1d !important;
  color: #fecaca !important;
  border-color: #dc2626 !important;
}
html[data-ff-theme="dark"] [style*="background:#f0fdf4"],
html[data-ff-theme="dark"] [style*="background:#ecfdf5"],
html[data-ff-theme="dark"] [style*="background:#dcfce7"],
html[data-ff-theme="dark"] [style*="background: #f0fdf4"],
html[data-ff-theme="dark"] [style*="background: #ecfdf5"],
html[data-ff-theme="dark"] [style*="background: #dcfce7"] {
  background: #14532d !important;
  color: #bbf7d0 !important;
  border-color: #166534 !important;
}
html[data-ff-theme="dark"] [style*="background:#eff6ff"],
html[data-ff-theme="dark"] [style*="background:#f0f9ff"],
html[data-ff-theme="dark"] [style*="background:#e0f2fe"],
html[data-ff-theme="dark"] [style*="background: #eff6ff"],
html[data-ff-theme="dark"] [style*="background: #f0f9ff"],
html[data-ff-theme="dark"] [style*="background: #e0f2fe"] {
  background: #172554 !important;
  color: #bae6fd !important;
  border-color: #3b82f6 !important;
}
html[data-ff-theme="dark"] [style*="background:#f5f3ff"],
html[data-ff-theme="dark"] [style*="background:#ede9fe"],
html[data-ff-theme="dark"] [style*="background:#f3e8ff"],
html[data-ff-theme="dark"] [style*="background:#faf5ff"],
html[data-ff-theme="dark"] [style*="background:#fdf4ff"],
html[data-ff-theme="dark"] [style*="background: #f5f3ff"],
html[data-ff-theme="dark"] [style*="background: #ede9fe"],
html[data-ff-theme="dark"] [style*="background: #f3e8ff"],
html[data-ff-theme="dark"] [style*="background: #faf5ff"],
html[data-ff-theme="dark"] [style*="background: #fdf4ff"] {
  background: #4c1d95 !important;
  color: #ddd6fe !important;
  border-color: #8b5cf6 !important;
}
html[data-ff-theme="dark"] [style*="background:#fbfcfe"],
html[data-ff-theme="dark"] [style*="background: #fbfcfe"],
html[data-ff-theme="dark"] [style*="background:#f9fafb"],
html[data-ff-theme="dark"] [style*="background: #f9fafb"],
html[data-ff-theme="dark"] [style*="background:#f8fafc"],
html[data-ff-theme="dark"] [style*="background: #f8fafc"],
html[data-ff-theme="dark"] [style*="background:#f1f5f9"],
html[data-ff-theme="dark"] [style*="background:#e2e8f0"],
html[data-ff-theme="dark"] [style*="background:#e5e7eb"],
html[data-ff-theme="dark"] [style*="background: #f1f5f9"],
html[data-ff-theme="dark"] [style*="background: #e2e8f0"],
html[data-ff-theme="dark"] [style*="background: #e5e7eb"] {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
/* Body/muted text on remapped pastels */
html[data-ff-theme="dark"] [style*="color:#0f172a"],
html[data-ff-theme="dark"] [style*="color: #0f172a"],
html[data-ff-theme="dark"] [style*="color:#1e293b"],
html[data-ff-theme="dark"] [style*="color: #1e293b"],
html[data-ff-theme="dark"] [style*="color:#1f2937"],
html[data-ff-theme="dark"] [style*="color: #1f2937"],
html[data-ff-theme="dark"] [style*="color:#334155"],
html[data-ff-theme="dark"] [style*="color: #334155"],
html[data-ff-theme="dark"] [style*="color:#374151"],
html[data-ff-theme="dark"] [style*="color: #374151"],
html[data-ff-theme="dark"] [style*="color:#475569"],
html[data-ff-theme="dark"] [style*="color: #475569"],
html[data-ff-theme="dark"] [style*="color:#4b5563"],
html[data-ff-theme="dark"] [style*="color: #4b5563"],
html[data-ff-theme="dark"] [style*="color:#64748b"],
html[data-ff-theme="dark"] [style*="color: #64748b"],
html[data-ff-theme="dark"] [style*="color:#6b7280"],
html[data-ff-theme="dark"] [style*="color: #6b7280"],
html[data-ff-theme="dark"] [style*="color:#9ca3af"],
html[data-ff-theme="dark"] [style*="color: #9ca3af"] {
  color: #f1f5f9 !important;
}
html[data-ff-theme="dark"] [style*="color:#451a03"],
html[data-ff-theme="dark"] [style*="color: #451a03"] {
  color: #fef3c7 !important;
}
html[data-ff-theme="dark"] [style*="color:#450a0a"],
html[data-ff-theme="dark"] [style*="color: #450a0a"],
html[data-ff-theme="dark"] [style*="color:#7f1d1d"],
html[data-ff-theme="dark"] [style*="color: #7f1d1d"] {
  color: #fee2e2 !important;
}
/* Semantic title hues readable on dark remapped cards */
html[data-ff-theme="dark"] [style*="color:#991b1b"],
html[data-ff-theme="dark"] [style*="color: #991b1b"],
html[data-ff-theme="dark"] [style*="color:#b91c1c"],
html[data-ff-theme="dark"] [style*="color: #b91c1c"],
html[data-ff-theme="dark"] [style*="color:#dc2626"],
html[data-ff-theme="dark"] [style*="color: #dc2626"] {
  color: #fecaca !important;
}
html[data-ff-theme="dark"] [style*="color:#065f46"],
html[data-ff-theme="dark"] [style*="color: #065f46"],
html[data-ff-theme="dark"] [style*="color:#047857"],
html[data-ff-theme="dark"] [style*="color: #047857"],
html[data-ff-theme="dark"] [style*="color:#14532d"],
html[data-ff-theme="dark"] [style*="color: #14532d"],
html[data-ff-theme="dark"] [style*="color:#166534"],
html[data-ff-theme="dark"] [style*="color: #166534"],
html[data-ff-theme="dark"] [style*="color:#115e59"],
html[data-ff-theme="dark"] [style*="color: #115e59"] {
  color: #bbf7d0 !important;
}
html[data-ff-theme="dark"] [style*="color:#b45309"],
html[data-ff-theme="dark"] [style*="color: #b45309"],
html[data-ff-theme="dark"] [style*="color:#92400e"],
html[data-ff-theme="dark"] [style*="color: #92400e"],
html[data-ff-theme="dark"] [style*="color:#78350f"],
html[data-ff-theme="dark"] [style*="color: #78350f"],
html[data-ff-theme="dark"] [style*="color:#713f12"],
html[data-ff-theme="dark"] [style*="color: #713f12"],
html[data-ff-theme="dark"] [style*="color:#9a3412"],
html[data-ff-theme="dark"] [style*="color: #9a3412"],
html[data-ff-theme="dark"] [style*="color:#d97706"],
html[data-ff-theme="dark"] [style*="color: #d97706"] {
  color: #fde68a !important;
}
html[data-ff-theme="dark"] [style*="color:#0369a1"],
html[data-ff-theme="dark"] [style*="color: #0369a1"],
html[data-ff-theme="dark"] [style*="color:#0284c7"],
html[data-ff-theme="dark"] [style*="color: #0284c7"],
html[data-ff-theme="dark"] [style*="color:#1d4ed8"],
html[data-ff-theme="dark"] [style*="color: #1d4ed8"],
html[data-ff-theme="dark"] [style*="color:#1e40af"],
html[data-ff-theme="dark"] [style*="color: #1e40af"] {
  color: #bae6fd !important;
}
html[data-ff-theme="dark"] [style*="color:#7c3aed"],
html[data-ff-theme="dark"] [style*="color: #7c3aed"],
html[data-ff-theme="dark"] [style*="color:#6d28d9"],
html[data-ff-theme="dark"] [style*="color: #6d28d9"] {
  color: #ddd6fe !important;
}

/* ---- Light: visibility + blue/white/black consistency ---- */
html[data-ff-theme="light"] .empty-msg,
html[data-ff-theme="light"] .card-sub,
html[data-ff-theme="light"] .hint,
html[data-ff-theme="light"] .muted,
html[data-ff-theme="light"] .ffa-header .subtitle,
html[data-ff-theme="light"] .ins-header .subtitle {
  color: #111827 !important;
}
html[data-ff-theme="light"] .rcs-header a {
  color: #2563eb !important;
}
html[data-ff-theme="light"] .status-paid,
html[data-ff-theme="light"] .tag-pos {
  background: #dcfce7 !important;
  color: #14532d !important;
}
html[data-ff-theme="light"] .status-notpaid,
html[data-ff-theme="light"] .tag-neg {
  background: #fee2e2 !important;
  color: #7f1d1d !important;
}
html[data-ff-theme="light"] .status-pending {
  background: #fef3c7 !important;
  color: #78350f !important;
}
html[data-ff-theme="light"] .info-box {
  background: #eff6ff !important;
  border: 1px solid #93c5fd !important;
  color: #000000 !important;
}
html[data-ff-theme="light"] .msg-banner {
  background: #dcfce7 !important;
  color: #14532d !important;
  border-color: #86efac !important;
}
html[data-ff-theme="light"] .err-banner {
  background: #fee2e2 !important;
  color: #7f1d1d !important;
  border-color: #fca5a5 !important;
}
html[data-ff-theme="light"] .year-notice {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1e3a5f !important;
}
html[data-ff-theme="light"] .btn-edit {
  background: #dbeafe !important;
  color: #1e3a5f !important;
}
html[data-ff-theme="light"] .btn-delete {
  color: #b91c1c !important;
}
html[data-ff-theme="light"] .pct-badge {
  background: #dbeafe !important;
  color: #1e3a5f !important;
}
html[data-ff-theme="light"] .month-badge {
  background: #eff6ff !important;
  color: #111827 !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] .biz-hub-switch,
html[data-ff-theme="light"] .filter-bar {
  background: #ffffff !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] .scope-reset-btn {
  background: #be123c !important;
  color: #fff1f2 !important;
  border-color: #fb7185 !important;
}
html[data-ff-theme="light"] #portfolio-ideas-btn {
  background: #c4b5fd !important;
  color: #1e1b4b !important;
  border-color: #a78bfa !important;
}
html[data-ff-theme="light"] #ca-portfolio-ideas-btn {
  background: #fecaca !important;
  color: #7f1d1d !important;
  border-color: #f87171 !important;
}
html[data-ff-theme="light"] #world-portfolio-ideas-btn {
  background: #99f6e4 !important;
  color: #134e4a !important;
  border-color: #2dd4bf !important;
}
html[data-ff-theme="light"] #financial-news-btn {
  background: #7dd3fc !important;
  color: #0c4a6e !important;
  border-color: #38bdf8 !important;
}
html[data-ff-theme="light"] .mgmt-action-link {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
  color: #1e40af !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] .mgmt-card-title {
  color: #374151 !important;
}
html[data-ff-theme="light"] .btn-danger-submit {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%) !important;
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
}
html[data-ff-theme="light"] .ff-soft-panel {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
html[data-ff-theme="light"] .suggested-btn,
html[data-ff-theme="light"] .stock-item,
html[data-ff-theme="light"] .portfolio-header {
  background: #eff6ff !important;
  color: #000000 !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] .suggested-btn:hover,
html[data-ff-theme="light"] .stock-item:hover,
html[data-ff-theme="light"] .portfolio-header:hover {
  background: #dbeafe !important;
  color: #000000 !important;
}
html[data-ff-theme="light"] .message.error .message-content {
  background: #fee2e2 !important;
  color: #7f1d1d !important;
}
html[data-ff-theme="light"] .message.system .message-content {
  background: #eff6ff !important;
  color: #1e3a5f !important;
}
html[data-ff-theme="light"] .message.assistant .message-content {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
}
html[data-ff-theme="light"] .ai-agent-badge {
  color: #475569 !important;
}
html[data-ff-theme="light"] .ai-agent-badge strong {
  color: #0f172a !important;
}
html[data-ff-theme="light"] .chat-input button:disabled {
  background: #cbd5e1 !important;
  color: #475569 !important;
}
/* ---- Contrast floor: text written for one theme that lands on the other ---- */
/* Light: slate-400 captions (#94a3b8) are ~2.5:1 on white — lift to slate-600 */
html[data-ff-theme="light"] .s-card .sub,
html[data-ff-theme="light"] .sc-card .sub,
html[data-ff-theme="light"] .summary-card .sub,
html[data-ff-theme="light"] .stat-pill .sub,
html[data-ff-theme="light"] .stat-card .sublabel,
html[data-ff-theme="light"] .stat-card .label,
html[data-ff-theme="light"] .fi-comp-label,
html[data-ff-theme="light"] .fi-comp-detail,
html[data-ff-theme="light"] .fi-score-desc,
html[data-ff-theme="light"] .fi-subcheck-label,
html[data-ff-theme="light"] .cf-no-data,
html[data-ff-theme="light"] .ffc-cat-name,
html[data-ff-theme="light"] .ffc-side-note,
html[data-ff-theme="light"] .cg-fold-caret,
html[data-ff-theme="light"] .summary-card .lbl,
html[data-ff-theme="light"] .sc-card .lbl {
  color: #475569 !important;
}
html[data-ff-theme="light"] .fi-score-level {
  color: #0f172a !important;
}
/* Light: dark-theme pastel figures (#4ade80/#38bdf8/#f87171) → deeper hues on white */
html[data-ff-theme="light"] .val.green { color: #15803d !important; }
html[data-ff-theme="light"] .val.emerald { color: #047857 !important; }
html[data-ff-theme="light"] .val.blue { color: #1d4ed8 !important; }
html[data-ff-theme="light"] .val.red { color: #b91c1c !important; }
html[data-ff-theme="light"] .val.amber { color: #b45309 !important; }
/* Dark: slate-600 captions (#475569) are ~2:1 on panels — lift to muted token */
html[data-ff-theme="dark"] .cf-no-data,
html[data-ff-theme="dark"] .fi-comp-detail {
  color: var(--ff-muted, #94a3b8) !important;
}
/* Dark: indigo figures written for white cards */
html[data-ff-theme="dark"] [style*="color:#4f46e5"],
html[data-ff-theme="dark"] [style*="color:#4338ca"],
html[data-ff-theme="dark"] [style*="color: #4f46e5"],
html[data-ff-theme="dark"] [style*="color: #4338ca"] {
  color: #a5b4fc !important;
}
/* Light: translucent tip/result boxes keep dark-theme amber/green ink — deepen it */
html[data-ff-theme="light"] .warn-box { color: #92400e !important; }
html[data-ff-theme="light"] .result-box strong { color: #15803d !important; }
html[data-ff-theme="light"] .result-box.warn strong { color: #b45309 !important; }
html[data-ff-theme="light"] .strategy-h { color: #0369a1 !important; }
html[data-ff-theme="light"] .stat-pill {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
html[data-ff-theme="light"] .stat-pill .label { color: #475569 !important; }
html[data-ff-theme="light"] .stat-pill .value:not([style*="color"]),
html[data-ff-theme="light"] .sc-card .val[class="val"]:not([style*="color"]) { color: #0f172a !important; }
html[data-ff-theme="light"] a[class="btn-sm"] {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}
/* Light: dark tinted inline cards (written for dark mode) → matching pastel + dark ink */
html[data-ff-theme="light"] [style*="background:#713f12"],
html[data-ff-theme="light"] [style*="background:#78350f"],
html[data-ff-theme="light"] [style*="background:#422006"],
html[data-ff-theme="light"] [style*="background: #713f12"],
html[data-ff-theme="light"] [style*="background: #78350f"],
html[data-ff-theme="light"] [style*="background: #422006"] {
  background: #fffbeb !important;
  color: #78350f !important;
  border-color: #fcd34d !important;
}
html[data-ff-theme="light"] [style*="background:#7f1d1d"],
html[data-ff-theme="light"] [style*="background:#450a0a"],
html[data-ff-theme="light"] [style*="background: #7f1d1d"],
html[data-ff-theme="light"] [style*="background: #450a0a"] {
  background: #fef2f2 !important;
  color: #7f1d1d !important;
  border-color: #fca5a5 !important;
}
html[data-ff-theme="light"] [style*="background:#14532d"],
html[data-ff-theme="light"] [style*="background:#052e16"],
html[data-ff-theme="light"] [style*="background: #14532d"],
html[data-ff-theme="light"] [style*="background: #052e16"] {
  background: #f0fdf4 !important;
  color: #14532d !important;
  border-color: #86efac !important;
}
html[data-ff-theme="light"] [style*="background:#172554"],
html[data-ff-theme="light"] [style*="background:#1e3a8a"],
html[data-ff-theme="light"] [style*="background: #172554"],
html[data-ff-theme="light"] [style*="background: #1e3a8a"] {
  background: #eff6ff !important;
  color: #1e3a8a !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] [style*="background:#4c1d95"],
html[data-ff-theme="light"] [style*="background:#2e1065"],
html[data-ff-theme="light"] [style*="background: #4c1d95"],
html[data-ff-theme="light"] [style*="background: #2e1065"] {
  background: #f5f3ff !important;
  color: #4c1d95 !important;
  border-color: #c4b5fd !important;
}
/* Light: bright inline hues (tuned for dark slate) → deeper shade of the same hue on white */
html[data-ff-theme="light"] [style*="color:#f59e0b"]:not([style*="-color:#f59e0b"]),
html[data-ff-theme="light"] [style*="color:#fbbf24"]:not([style*="-color:#fbbf24"]),
html[data-ff-theme="light"] [style*="color:#d97706"]:not([style*="-color:#d97706"]),
html[data-ff-theme="light"] [style*="color: #f59e0b"]:not([style*="-color: #f59e0b"]),
html[data-ff-theme="light"] [style*="color: #fbbf24"]:not([style*="-color: #fbbf24"]),
html[data-ff-theme="light"] [style*="color: #d97706"]:not([style*="-color: #d97706"]) { color: #b45309 !important; }
html[data-ff-theme="light"] [style*="color:#f97316"]:not([style*="-color:#f97316"]),
html[data-ff-theme="light"] [style*="color:#fb923c"]:not([style*="-color:#fb923c"]),
html[data-ff-theme="light"] [style*="color: #f97316"]:not([style*="-color: #f97316"]),
html[data-ff-theme="light"] [style*="color: #fb923c"]:not([style*="-color: #fb923c"]) { color: #c2410c !important; }
html[data-ff-theme="light"] [style*="color:#10b981"]:not([style*="-color:#10b981"]),
html[data-ff-theme="light"] [style*="color:#34d399"]:not([style*="-color:#34d399"]),
html[data-ff-theme="light"] [style*="color:#4ade80"]:not([style*="-color:#4ade80"]),
html[data-ff-theme="light"] [style*="color:#22c55e"]:not([style*="-color:#22c55e"]),
html[data-ff-theme="light"] [style*="color: #10b981"]:not([style*="-color: #10b981"]),
html[data-ff-theme="light"] [style*="color: #34d399"]:not([style*="-color: #34d399"]),
html[data-ff-theme="light"] [style*="color: #4ade80"]:not([style*="-color: #4ade80"]),
html[data-ff-theme="light"] [style*="color: #22c55e"]:not([style*="-color: #22c55e"]) { color: #047857 !important; }
html[data-ff-theme="light"] [style*="color:#0ea5e9"]:not([style*="-color:#0ea5e9"]),
html[data-ff-theme="light"] [style*="color:#38bdf8"]:not([style*="-color:#38bdf8"]),
html[data-ff-theme="light"] [style*="color: #0ea5e9"]:not([style*="-color: #0ea5e9"]),
html[data-ff-theme="light"] [style*="color: #38bdf8"]:not([style*="-color: #38bdf8"]) { color: #0369a1 !important; }
html[data-ff-theme="light"] [style*="color:#f87171"]:not([style*="-color:#f87171"]),
html[data-ff-theme="light"] [style*="color:#ef4444"]:not([style*="-color:#ef4444"]),
html[data-ff-theme="light"] [style*="color: #f87171"]:not([style*="-color: #f87171"]),
html[data-ff-theme="light"] [style*="color: #ef4444"]:not([style*="-color: #ef4444"]) { color: #b91c1c !important; }
/* Dark: deep violet ink written for lavender cards */
html[data-ff-theme="dark"] [style*="color:#6b21a8"]:not([style*="-color:#6b21a8"]),
html[data-ff-theme="dark"] [style*="color:#5b21b6"]:not([style*="-color:#5b21b6"]),
html[data-ff-theme="dark"] [style*="color:#7c3aed"]:not([style*="-color:#7c3aed"]),
html[data-ff-theme="dark"] [style*="color: #6b21a8"]:not([style*="-color: #6b21a8"]),
html[data-ff-theme="dark"] [style*="color: #5b21b6"]:not([style*="-color: #5b21b6"]),
html[data-ff-theme="dark"] [style*="color: #7c3aed"]:not([style*="-color: #7c3aed"]) { color: #ddd6fe !important; }
/* Green action buttons: always a filled button, never white-on-white */
html[data-ff-theme] .btn-green,
html[data-ff-theme] a.btn-green {
  background: #15803d !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
/* Contrast guard: no light-on-light / dark-on-dark text */
html[data-ff-theme="dark"] [style*="background:#d4edda"],
html[data-ff-theme="dark"] [style*="background: #d4edda"],
html[data-ff-theme="dark"] [style*="background:#c3e6cb"],
html[data-ff-theme="dark"] [style*="background: #c3e6cb"],
html[data-ff-theme="dark"] [style*="background:#ECFDF5"],
html[data-ff-theme="dark"] [style*="background: #ECFDF5"],
html[data-ff-theme="dark"] [style*="background:#ECFDF8"],
html[data-ff-theme="dark"] [style*="background: #ECFDF8"],
html[data-ff-theme="dark"] [style*="background:#f0fdfa"],
html[data-ff-theme="dark"] [style*="background: #f0fdfa"],
html[data-ff-theme="dark"] [style*="background:#bbf7d0"],
html[data-ff-theme="dark"] [style*="background: #bbf7d0"],
html[data-ff-theme="dark"] [style*="background:#e6ffed"],
html[data-ff-theme="dark"] [style*="background: #e6ffed"],
html[data-ff-theme="dark"] [style*="background:#d1fae5"],
html[data-ff-theme="dark"] [style*="background: #d1fae5"],
html[data-ff-theme="dark"] [style*="background:#D1FAE5"],
html[data-ff-theme="dark"] [style*="background: #D1FAE5"] {
  background: #14532d !important;
  background-image: none !important;
  color: #bbf7d0 !important;
  border-color: #166534 !important;
}
html[data-ff-theme="dark"] [style*="background:#f8d7da"],
html[data-ff-theme="dark"] [style*="background: #f8d7da"],
html[data-ff-theme="dark"] [style*="background:#f5c6cb"],
html[data-ff-theme="dark"] [style*="background: #f5c6cb"],
html[data-ff-theme="dark"] [style*="background:#fee;"],
html[data-ff-theme="dark"] [style*="background: #fee;"],
html[data-ff-theme="dark"] [style*="background:#ffeeee"],
html[data-ff-theme="dark"] [style*="background: #ffeeee"],
html[data-ff-theme="dark"] [style*="background:#fde8e8"],
html[data-ff-theme="dark"] [style*="background: #fde8e8"],
html[data-ff-theme="dark"] [style*="background:#fecaca"],
html[data-ff-theme="dark"] [style*="background: #fecaca"],
html[data-ff-theme="dark"] [style*="background:#fee2e2"],
html[data-ff-theme="dark"] [style*="background: #fee2e2"],
html[data-ff-theme="dark"] [style*="background:#ffe4e6"],
html[data-ff-theme="dark"] [style*="background: #ffe4e6"],
html[data-ff-theme="dark"] [style*="background:#fca5a5"],
html[data-ff-theme="dark"] [style*="background: #fca5a5"],
html[data-ff-theme="dark"] [style*="background:#FEE2E2"],
html[data-ff-theme="dark"] [style*="background: #FEE2E2"],
html[data-ff-theme="dark"] [style*="background:#fdd;"],
html[data-ff-theme="dark"] [style*="background: #fdd;"],
html[data-ff-theme="dark"] [style*="background:#ffdddd"],
html[data-ff-theme="dark"] [style*="background: #ffdddd"] {
  background: #7f1d1d !important;
  background-image: none !important;
  color: #fecaca !important;
  border-color: #dc2626 !important;
}
html[data-ff-theme="dark"] [style*="background:#d1ecf1"],
html[data-ff-theme="dark"] [style*="background: #d1ecf1"],
html[data-ff-theme="dark"] [style*="background:#cce5ff"],
html[data-ff-theme="dark"] [style*="background: #cce5ff"],
html[data-ff-theme="dark"] [style*="background:#e8f0fe"],
html[data-ff-theme="dark"] [style*="background: #e8f0fe"],
html[data-ff-theme="dark"] [style*="background:#e7f3ff"],
html[data-ff-theme="dark"] [style*="background: #e7f3ff"],
html[data-ff-theme="dark"] [style*="background:#e8f4ff"],
html[data-ff-theme="dark"] [style*="background: #e8f4ff"],
html[data-ff-theme="dark"] [style*="background:#bfdbfe"],
html[data-ff-theme="dark"] [style*="background: #bfdbfe"],
html[data-ff-theme="dark"] [style*="background:#dbeafe"],
html[data-ff-theme="dark"] [style*="background: #dbeafe"] {
  background: #172554 !important;
  background-image: none !important;
  color: #bae6fd !important;
  border-color: #3b82f6 !important;
}
html[data-ff-theme="dark"] [style*="background:#fffde7"],
html[data-ff-theme="dark"] [style*="background: #fffde7"],
html[data-ff-theme="dark"] [style*="background:#fff0e0"],
html[data-ff-theme="dark"] [style*="background: #fff0e0"],
html[data-ff-theme="dark"] [style*="background:#fef9c3"],
html[data-ff-theme="dark"] [style*="background: #fef9c3"],
html[data-ff-theme="dark"] [style*="background:#ffeeba"],
html[data-ff-theme="dark"] [style*="background: #ffeeba"],
html[data-ff-theme="dark"] [style*="background:#fff8e1"],
html[data-ff-theme="dark"] [style*="background: #fff8e1"],
html[data-ff-theme="dark"] [style*="background:#ffecb3"],
html[data-ff-theme="dark"] [style*="background: #ffecb3"] {
  background: #422006 !important;
  background-image: none !important;
  color: #fde68a !important;
  border-color: #b45309 !important;
}
html[data-ff-theme="dark"] [style*="background:#f3e8fd"],
html[data-ff-theme="dark"] [style*="background: #f3e8fd"],
html[data-ff-theme="dark"] [style*="background:#c4b5fd"],
html[data-ff-theme="dark"] [style*="background: #c4b5fd"],
html[data-ff-theme="dark"] [style*="background:#EDE9FE"],
html[data-ff-theme="dark"] [style*="background: #EDE9FE"] {
  background: #4c1d95 !important;
  background-image: none !important;
  color: #ddd6fe !important;
  border-color: #8b5cf6 !important;
}
html[data-ff-theme="dark"] [style*="background:#ddd;"],
html[data-ff-theme="dark"] [style*="background: #ddd;"],
html[data-ff-theme="dark"] [style*="background:#dddddd"],
html[data-ff-theme="dark"] [style*="background: #dddddd"],
html[data-ff-theme="dark"] [style*="background:#cbd5e1"],
html[data-ff-theme="dark"] [style*="background: #cbd5e1"],
html[data-ff-theme="dark"] [style*="background:#e2e3e5"],
html[data-ff-theme="dark"] [style*="background: #e2e3e5"],
html[data-ff-theme="dark"] [style*="background:#e9ecef"],
html[data-ff-theme="dark"] [style*="background: #e9ecef"],
html[data-ff-theme="dark"] [style*="background:#F9FAFB"],
html[data-ff-theme="dark"] [style*="background: #F9FAFB"],
html[data-ff-theme="dark"] [style*="background:#F3F4F6"],
html[data-ff-theme="dark"] [style*="background: #F3F4F6"],
html[data-ff-theme="dark"] [style*="background:#fafafa"],
html[data-ff-theme="dark"] [style*="background: #fafafa"],
html[data-ff-theme="dark"] [style*="background:#e9e9e9"],
html[data-ff-theme="dark"] [style*="background: #e9e9e9"],
html[data-ff-theme="dark"] [style*="background:#efefef"],
html[data-ff-theme="dark"] [style*="background: #efefef"],
html[data-ff-theme="dark"] [style*="background:#f4f4f4"],
html[data-ff-theme="dark"] [style*="background: #f4f4f4"] {
  background: #1e293b !important;
  background-image: none !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
html[data-ff-theme="dark"] :is([style*="color:#1e3a8a"], [style*="color: #1e3a8a"], [style*="color:#075985"], [style*="color: #075985"], [style*="color:#0066cc"], [style*="color: #0066cc"], [style*="color:#1e40af"], [style*="color: #1e40af"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #bae6fd !important; }
html[data-ff-theme="dark"] :is([style*="color:#2563eb"], [style*="color: #2563eb"], [style*="color:#2563EB"], [style*="color: #2563EB"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #93c5fd !important; }
html[data-ff-theme="dark"] :is([style*="color:#0f766e"], [style*="color: #0f766e"], [style*="color:#0e7490"], [style*="color: #0e7490"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #99f6e4 !important; }
html[data-ff-theme="dark"] :is([style*="color:#c2410c"], [style*="color: #c2410c"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #fdba74 !important; }
html[data-ff-theme="dark"] :is([style*="color:#15803d"], [style*="color: #15803d"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #86efac !important; }
html[data-ff-theme="dark"] :is([style*="color:#1e1b4b"], [style*="color: #1e1b4b"], [style*="color:#312e81"], [style*="color: #312e81"], [style*="color:#3730a3"], [style*="color: #3730a3"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #c7d2fe !important; }
html[data-ff-theme="dark"] :is([style*="color:#134e4a"], [style*="color: #134e4a"], [style*="color:#064e3b"], [style*="color: #064e3b"], [style*="color:#050"], [style*="color: #050"], [style*="color:#005500"], [style*="color: #005500"], [style*="color:#155724"], [style*="color: #155724"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #bbf7d0 !important; }
html[data-ff-theme="dark"] :is([style*="color:#4c1d95"], [style*="color: #4c1d95"], [style*="color:#7C3AED"], [style*="color: #7C3AED"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #ddd6fe !important; }
html[data-ff-theme="dark"] :is([style*="color:#a16207"], [style*="color: #a16207"], [style*="color:#854d0e"], [style*="color: #854d0e"], [style*="color:#856404"], [style*="color: #856404"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #fde68a !important; }
html[data-ff-theme="dark"] :is([style*="color:#721c24"], [style*="color: #721c24"], [style*="color:#c00;"], [style*="color: #c00;"], [style*="color:#cc0000"], [style*="color: #cc0000"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #fecaca !important; }
html[data-ff-theme="dark"] :is([style*="color:#444"], [style*="color: #444"], [style*="color:#555"], [style*="color: #555"], [style*="color:#333"], [style*="color: #333"], [style*="color:#666"], [style*="color: #666"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #cbd5e1 !important; }
html[data-ff-theme="light"] [style*="background:#060e1a"],
html[data-ff-theme="light"] [style*="background: #060e1a"] {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
html[data-ff-theme="light"] [style*="background:#0c4a6e"],
html[data-ff-theme="light"] [style*="background: #0c4a6e"] {
  background: #e0f2fe !important;
  color: #0c4a6e !important;
  border-color: #7dd3fc !important;
}
html[data-ff-theme="light"] [style*="background:rgba(120,53,15"],
html[data-ff-theme="light"] [style*="background: rgba(120,53,15"],
html[data-ff-theme="light"] [style*="background:rgba(120, 53, 15"],
html[data-ff-theme="light"] [style*="background: rgba(120, 53, 15"] {
  background: #fffbeb !important;
  color: #78350f !important;
  border-color: #fcd34d !important;
}
html[data-ff-theme="light"] [style*="background:#334155"],
html[data-ff-theme="light"] [style*="background: #334155"],
html[data-ff-theme="light"] [style*="background:#374151"],
html[data-ff-theme="light"] [style*="background: #374151"],
html[data-ff-theme="light"] [style*="background:#475569"],
html[data-ff-theme="light"] [style*="background: #475569"],
html[data-ff-theme="light"] [style*="background:#1a2235"],
html[data-ff-theme="light"] [style*="background: #1a2235"],
html[data-ff-theme="light"] [style*="background:#1a2744"],
html[data-ff-theme="light"] [style*="background: #1a2744"],
html[data-ff-theme="light"] [style*="background:rgba(15,23,42"],
html[data-ff-theme="light"] [style*="background: rgba(15,23,42"],
html[data-ff-theme="light"] [style*="background:rgba(15, 23, 42"],
html[data-ff-theme="light"] [style*="background: rgba(15, 23, 42"] {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}
html[data-ff-theme="light"] [style*="background:#431407"],
html[data-ff-theme="light"] [style*="background: #431407"] {
  background: #fff7ed !important;
  color: #7c2d12 !important;
  border-color: #fdba74 !important;
}
html[data-ff-theme="light"] [style*="background:#0c2a1a"],
html[data-ff-theme="light"] [style*="background: #0c2a1a"],
html[data-ff-theme="light"] [style*="background:#0f2d1a"],
html[data-ff-theme="light"] [style*="background: #0f2d1a"] {
  background: #f0fdf4 !important;
  color: #14532d !important;
  border-color: #86efac !important;
}
html[data-ff-theme="light"] [style*="background:#3b0764"],
html[data-ff-theme="light"] [style*="background: #3b0764"] {
  background: #faf5ff !important;
  color: #581c87 !important;
  border-color: #d8b4fe !important;
}
html[data-ff-theme="light"] [style*="background:#1e3a5f"],
html[data-ff-theme="light"] [style*="background: #1e3a5f"] {
  background: #eff6ff !important;
  color: #1e3a8a !important;
  border-color: #93c5fd !important;
}
html[data-ff-theme="light"] :is([style*="color:#bbf7d0"], [style*="color: #bbf7d0"], [style*="color:#86efac"], [style*="color: #86efac"], [style*="color:#6ee7b7"], [style*="color: #6ee7b7"], [style*="color:#e6ffef"], [style*="color: #e6ffef"], [style*="color:#a7f3d0"], [style*="color: #a7f3d0"], [style*="color:#d1fae5"], [style*="color: #d1fae5"], [style*="color:#dcfce7"], [style*="color: #dcfce7"], [style*="color:#a3e635"], [style*="color: #a3e635"]) { --ff-ink-fix: #166534; }
html[data-ff-theme="light"] :is([style*="color:#fee2e2"], [style*="color: #fee2e2"], [style*="color:#fecaca"], [style*="color: #fecaca"], [style*="color:#fca5a5"], [style*="color: #fca5a5"], [style*="color:#fda4af"], [style*="color: #fda4af"], [style*="color:#ffe4e6"], [style*="color: #ffe4e6"]) { --ff-ink-fix: #b91c1c; }
html[data-ff-theme="light"] :is([style*="color:#fde68a"], [style*="color: #fde68a"], [style*="color:#fef3c7"], [style*="color: #fef3c7"], [style*="color:#fffbeb"], [style*="color: #fffbeb"], [style*="color:#fdba74"], [style*="color: #fdba74"], [style*="color:#ffedd5"], [style*="color: #ffedd5"], [style*="color:#fcd34d"], [style*="color: #fcd34d"], [style*="color:#fef08a"], [style*="color: #fef08a"]) { --ff-ink-fix: #92400e; }
html[data-ff-theme="light"] :is([style*="color:#dbeafe"], [style*="color: #dbeafe"], [style*="color:#bfdbfe"], [style*="color: #bfdbfe"], [style*="color:#bae6fd"], [style*="color: #bae6fd"], [style*="color:#93c5fd"], [style*="color: #93c5fd"], [style*="color:#7dd3fc"], [style*="color: #7dd3fc"], [style*="color:#e0f2fe"], [style*="color: #e0f2fe"]) { --ff-ink-fix: #1e40af; }
html[data-ff-theme="light"] :is([style*="color:#e9d5ff"], [style*="color: #e9d5ff"], [style*="color:#ddd6fe"], [style*="color: #ddd6fe"], [style*="color:#ede9fe"], [style*="color: #ede9fe"], [style*="color:#f5f3ff"], [style*="color: #f5f3ff"], [style*="color:#c4b5fd"], [style*="color: #c4b5fd"], [style*="color:#a78bfa"], [style*="color: #a78bfa"]) { --ff-ink-fix: #5b21b6; }
html[data-ff-theme="light"] :is([style*="color:#ffffff"], [style*="color: #ffffff"], [style*="color:#fff;"], [style*="color: #fff;"], [style*="color:white"], [style*="color: white"]) { --ff-ink-fix: #0f172a; }
html[data-ff-theme="light"] :is([style*="background:#0f172a"], [style*="background: #0f172a"], [style*="background:#1e293b"], [style*="background: #1e293b"], [style*="background:#0b1220"], [style*="background: #0b1220"], [style*="background:#0a0f1e"], [style*="background: #0a0f1e"], [style*="background:#020617"], [style*="background: #020617"], [style*="background:#0a1628"], [style*="background: #0a1628"], [style*="background:#060e1a"], [style*="background: #060e1a"], [style*="background:#052e16"], [style*="background: #052e16"], [style*="background:#14532d"], [style*="background: #14532d"], [style*="background:#7f1d1d"], [style*="background: #7f1d1d"], [style*="background:#450a0a"], [style*="background: #450a0a"], [style*="background:#422006"], [style*="background: #422006"], [style*="background:#172554"], [style*="background: #172554"], [style*="background:#1e3a8a"], [style*="background: #1e3a8a"], [style*="background:#4c1d95"], [style*="background: #4c1d95"], [style*="background:#2e1065"], [style*="background: #2e1065"], [style*="background:#0c4a6e"], [style*="background: #0c4a6e"], [style*="background:rgba(120,53,15"], [style*="background: rgba(120,53,15"], [style*="background:#334155"], [style*="background: #334155"], [style*="background:#374151"], [style*="background: #374151"], [style*="background:#475569"], [style*="background: #475569"], [style*="background:#1a2235"], [style*="background: #1a2235"], [style*="background:#1a2744"], [style*="background: #1a2744"], [style*="background:#431407"], [style*="background: #431407"], [style*="background:#0c2a1a"], [style*="background: #0c2a1a"], [style*="background:#0f2d1a"], [style*="background: #0f2d1a"], [style*="background:#3b0764"], [style*="background: #3b0764"], [style*="background:#1e3a5f"], [style*="background: #1e3a5f"], td, th, .card, .panel, .sidebar-card, .decision-card, .watch-card, .import-panel) :is([style*="color:#bbf7d0"], [style*="color: #bbf7d0"], [style*="color:#86efac"], [style*="color: #86efac"], [style*="color:#6ee7b7"], [style*="color: #6ee7b7"], [style*="color:#e6ffef"], [style*="color: #e6ffef"], [style*="color:#a7f3d0"], [style*="color: #a7f3d0"], [style*="color:#d1fae5"], [style*="color: #d1fae5"], [style*="color:#dcfce7"], [style*="color: #dcfce7"], [style*="color:#a3e635"], [style*="color: #a3e635"], [style*="color:#fee2e2"], [style*="color: #fee2e2"], [style*="color:#fecaca"], [style*="color: #fecaca"], [style*="color:#fca5a5"], [style*="color: #fca5a5"], [style*="color:#fda4af"], [style*="color: #fda4af"], [style*="color:#ffe4e6"], [style*="color: #ffe4e6"], [style*="color:#fde68a"], [style*="color: #fde68a"], [style*="color:#fef3c7"], [style*="color: #fef3c7"], [style*="color:#fffbeb"], [style*="color: #fffbeb"], [style*="color:#fdba74"], [style*="color: #fdba74"], [style*="color:#ffedd5"], [style*="color: #ffedd5"], [style*="color:#fcd34d"], [style*="color: #fcd34d"], [style*="color:#fef08a"], [style*="color: #fef08a"], [style*="color:#dbeafe"], [style*="color: #dbeafe"], [style*="color:#bfdbfe"], [style*="color: #bfdbfe"], [style*="color:#bae6fd"], [style*="color: #bae6fd"], [style*="color:#93c5fd"], [style*="color: #93c5fd"], [style*="color:#7dd3fc"], [style*="color: #7dd3fc"], [style*="color:#e0f2fe"], [style*="color: #e0f2fe"], [style*="color:#e9d5ff"], [style*="color: #e9d5ff"], [style*="color:#ddd6fe"], [style*="color: #ddd6fe"], [style*="color:#ede9fe"], [style*="color: #ede9fe"], [style*="color:#f5f3ff"], [style*="color: #f5f3ff"], [style*="color:#c4b5fd"], [style*="color: #c4b5fd"], [style*="color:#a78bfa"], [style*="color: #a78bfa"], [style*="color:#ffffff"], [style*="color: #ffffff"], [style*="color:#fff;"], [style*="color: #fff;"], [style*="color:white"], [style*="color: white"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]),
html[data-ff-theme="light"] :is([style*="background:#0f172a"], [style*="background: #0f172a"], [style*="background:#1e293b"], [style*="background: #1e293b"], [style*="background:#0b1220"], [style*="background: #0b1220"], [style*="background:#0a0f1e"], [style*="background: #0a0f1e"], [style*="background:#020617"], [style*="background: #020617"], [style*="background:#0a1628"], [style*="background: #0a1628"], [style*="background:#060e1a"], [style*="background: #060e1a"], [style*="background:#052e16"], [style*="background: #052e16"], [style*="background:#14532d"], [style*="background: #14532d"], [style*="background:#7f1d1d"], [style*="background: #7f1d1d"], [style*="background:#450a0a"], [style*="background: #450a0a"], [style*="background:#422006"], [style*="background: #422006"], [style*="background:#172554"], [style*="background: #172554"], [style*="background:#1e3a8a"], [style*="background: #1e3a8a"], [style*="background:#4c1d95"], [style*="background: #4c1d95"], [style*="background:#2e1065"], [style*="background: #2e1065"], [style*="background:#0c4a6e"], [style*="background: #0c4a6e"], [style*="background:rgba(120,53,15"], [style*="background: rgba(120,53,15"], [style*="background:#334155"], [style*="background: #334155"], [style*="background:#374151"], [style*="background: #374151"], [style*="background:#475569"], [style*="background: #475569"], [style*="background:#1a2235"], [style*="background: #1a2235"], [style*="background:#1a2744"], [style*="background: #1a2744"], [style*="background:#431407"], [style*="background: #431407"], [style*="background:#0c2a1a"], [style*="background: #0c2a1a"], [style*="background:#0f2d1a"], [style*="background: #0f2d1a"], [style*="background:#3b0764"], [style*="background: #3b0764"], [style*="background:#1e3a5f"], [style*="background: #1e3a5f"], td, th, .card, .panel, .sidebar-card, .decision-card, .watch-card, .import-panel):is([style*="color:#bbf7d0"], [style*="color: #bbf7d0"], [style*="color:#86efac"], [style*="color: #86efac"], [style*="color:#6ee7b7"], [style*="color: #6ee7b7"], [style*="color:#e6ffef"], [style*="color: #e6ffef"], [style*="color:#a7f3d0"], [style*="color: #a7f3d0"], [style*="color:#d1fae5"], [style*="color: #d1fae5"], [style*="color:#dcfce7"], [style*="color: #dcfce7"], [style*="color:#a3e635"], [style*="color: #a3e635"], [style*="color:#fee2e2"], [style*="color: #fee2e2"], [style*="color:#fecaca"], [style*="color: #fecaca"], [style*="color:#fca5a5"], [style*="color: #fca5a5"], [style*="color:#fda4af"], [style*="color: #fda4af"], [style*="color:#ffe4e6"], [style*="color: #ffe4e6"], [style*="color:#fde68a"], [style*="color: #fde68a"], [style*="color:#fef3c7"], [style*="color: #fef3c7"], [style*="color:#fffbeb"], [style*="color: #fffbeb"], [style*="color:#fdba74"], [style*="color: #fdba74"], [style*="color:#ffedd5"], [style*="color: #ffedd5"], [style*="color:#fcd34d"], [style*="color: #fcd34d"], [style*="color:#fef08a"], [style*="color: #fef08a"], [style*="color:#dbeafe"], [style*="color: #dbeafe"], [style*="color:#bfdbfe"], [style*="color: #bfdbfe"], [style*="color:#bae6fd"], [style*="color: #bae6fd"], [style*="color:#93c5fd"], [style*="color: #93c5fd"], [style*="color:#7dd3fc"], [style*="color: #7dd3fc"], [style*="color:#e0f2fe"], [style*="color: #e0f2fe"], [style*="color:#e9d5ff"], [style*="color: #e9d5ff"], [style*="color:#ddd6fe"], [style*="color: #ddd6fe"], [style*="color:#ede9fe"], [style*="color: #ede9fe"], [style*="color:#f5f3ff"], [style*="color: #f5f3ff"], [style*="color:#c4b5fd"], [style*="color: #c4b5fd"], [style*="color:#a78bfa"], [style*="color: #a78bfa"], [style*="color:#ffffff"], [style*="color: #ffffff"], [style*="color:#fff;"], [style*="color: #fff;"], [style*="color:white"], [style*="color: white"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: var(--ff-ink-fix) !important; }
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#e2e8f0"]:not([style*="-color:#e2e8f0"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #e2e8f0"]:not([style*="-color:#e2e8f0"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#f1f5f9"]:not([style*="-color:#f1f5f9"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #f1f5f9"]:not([style*="-color:#f1f5f9"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#cbd5e1"]:not([style*="-color:#cbd5e1"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #cbd5e1"]:not([style*="-color:#cbd5e1"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#f8fafc"]:not([style*="-color:#f8fafc"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #f8fafc"]:not([style*="-color:#f8fafc"]):not([style*="background:#"]) { color: #f8fafc !important; }
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#38bdf8"]:not([style*="-color:#38bdf8"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #38bdf8"]:not([style*="-color:#38bdf8"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#0ea5e9"]:not([style*="-color:#0ea5e9"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #0ea5e9"]:not([style*="-color:#0ea5e9"]):not([style*="background:#"]) { color: #bae6fd !important; }
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#4ade80"]:not([style*="-color:#4ade80"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #4ade80"]:not([style*="-color:#4ade80"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#22c55e"]:not([style*="-color:#22c55e"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #22c55e"]:not([style*="-color:#22c55e"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#10b981"]:not([style*="-color:#10b981"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #10b981"]:not([style*="-color:#10b981"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#34d399"]:not([style*="-color:#34d399"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #34d399"]:not([style*="-color:#34d399"]):not([style*="background:#"]) { color: #bbf7d0 !important; }
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#f59e0b"]:not([style*="-color:#f59e0b"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #f59e0b"]:not([style*="-color:#f59e0b"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#fbbf24"]:not([style*="-color:#fbbf24"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #fbbf24"]:not([style*="-color:#fbbf24"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#d97706"]:not([style*="-color:#d97706"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #d97706"]:not([style*="-color:#d97706"]):not([style*="background:#"]) { color: #fde68a !important; }
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#f87171"]:not([style*="-color:#f87171"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #f87171"]:not([style*="-color:#f87171"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color:#ef4444"]:not([style*="-color:#ef4444"]):not([style*="background:#"]),
html[data-ff-theme="light"] [style*="gradient"] [style*="color: #ef4444"]:not([style*="-color:#ef4444"]):not([style*="background:#"]) { color: #fecaca !important; }
html[data-ff-theme="dark"] [style*="gradient"][style*="color:#0f172a"],
html[data-ff-theme="dark"] [style*="gradient"][style*="color: #0f172a"],
html[data-ff-theme="dark"] [style*="gradient"][style*="color:#111"],
html[data-ff-theme="dark"] [style*="gradient"][style*="color: #111"],
html[data-ff-theme="dark"] [style*="gradient"][style*="color:#1e293b"],
html[data-ff-theme="dark"] [style*="gradient"][style*="color: #1e293b"] { color: #0f172a !important; }
html[data-ff-theme="light"] :is([style*="color:#aaa"], [style*="color: #aaa"], [style*="color:#999"], [style*="color: #999"], [style*="color:#bbb"], [style*="color: #bbb"], [style*="color:#9ca3af"], [style*="color: #9ca3af"], [style*="color:#9CA3AF"], [style*="color: #9CA3AF"], [style*="color:#d1d5db"], [style*="color: #d1d5db"], [style*="color:#D1D5DB"], [style*="color: #D1D5DB"], [style*="color:#c4c9d2"], [style*="color: #c4c9d2"]):not([style*="background:#"]):not([style*="background: #"]):not([style*="background-color"]):not([style*="gradient"]):not([style*="gradient"] *):not([class*="btn"]) { color: #4b5563 !important; }
html[data-ff-theme] [style*="background"] strong:not([style*="color"]),
html[data-ff-theme] [style*="background"] b:not([style*="color"]) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-ff-theme] [style*="background:#0ea5e9"]:is([style*="color:#fff"], [style*="color: #fff"], [style*="color:white"], [style*="color: white"], [style*="color:#f8fafc"], [style*="color: #f8fafc"]),
html[data-ff-theme] [style*="background: #0ea5e9"]:is([style*="color:#fff"], [style*="color: #fff"], [style*="color:white"], [style*="color: white"], [style*="color:#f8fafc"], [style*="color: #f8fafc"]) { background: #0284c7 !important; }
html[data-ff-theme] [style*="background:#10b981"]:is([style*="color:#fff"], [style*="color: #fff"], [style*="color:white"], [style*="color: white"], [style*="color:#f8fafc"], [style*="color: #f8fafc"]),
html[data-ff-theme] [style*="background: #10b981"]:is([style*="color:#fff"], [style*="color: #fff"], [style*="color:white"], [style*="color: white"], [style*="color:#f8fafc"], [style*="color: #f8fafc"]) { background: #047857 !important; }
html[data-ff-theme] [style*="background:#10B981"]:is([style*="color:#fff"], [style*="color: #fff"], [style*="color:white"], [style*="color: white"], [style*="color:#f8fafc"], [style*="color: #f8fafc"]),
html[data-ff-theme] [style*="background: #10B981"]:is([style*="color:#fff"], [style*="color: #fff"], [style*="color:white"], [style*="color: white"], [style*="color:#f8fafc"], [style*="color: #f8fafc"]) { background: #047857 !important; }
html[data-ff-theme] [style*="background:#00C2A8"]:is([style*="color:#fff"], [style*="color: #fff"], [style*="color:white"], [style*="color: white"], [style*="color:#f8fafc"], [style*="color: #f8fafc"]),
html[data-ff-theme] [style*="background: #00C2A8"]:is([style*="color:#fff"], [style*="color: #fff"], [style*="color:white"], [style*="color: white"], [style*="color:#f8fafc"], [style*="color: #f8fafc"]) { background: #00897b !important; }
html[data-ff-theme="dark"] tr.ticker-row[data-row-color="#fde8e8"] td { background: #4a1d1d !important; }
html[data-ff-theme="dark"] tr.ticker-row[data-row-color="#fff0e0"] td { background: #4a2a10 !important; }
html[data-ff-theme="dark"] tr.ticker-row[data-row-color="#fffde7"] td { background: #3d3510 !important; }
html[data-ff-theme="dark"] tr.ticker-row[data-row-color="#e8f5e9"] td { background: #123a22 !important; }
html[data-ff-theme="dark"] tr.ticker-row[data-row-color="#e8f0fe"] td { background: #172a4f !important; }
html[data-ff-theme="dark"] tr.ticker-row[data-row-color="#f3e8fd"] td { background: #35184f !important; }
html[data-ff-theme="light"] tr.ticker-row[data-row-color] td { background: transparent !important; }
html[data-ff-theme="light"] tr.ticker-row[data-row-color] { color: #0f172a !important; }
