/* Dark mode, the default: base.html renders html[data-theme="dark"] and the header
   toggle removes it for light mode, which these rules never affect. The tokens below
   are hand-tuned. The per-file sections override colors hardcoded in each stylesheet,
   keeping the original specificity through :where(). New CSS should use the tokens
   and need no entry here. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --color-canvas: #171717;
    --color-surface: #171717;
    --color-surface-warm: #1f1f1f;
    --color-surface-alt: #1f1f1f;
    --color-text: #e6e6e6;
    --color-text-secondary: #a9a9a9;
    --color-border: #373737;
    --color-accent: #ef3e4d;
    --color-accent-hover: #ff6873;
    --color-accent-soft: #3a1d21;
    --color-positive: #3cc47c;
    --color-negative: #ff5c69;
    --color-warning: #e0a84a;
    --surface-container: #232323;
    --surface-container-high: #2d2d2d;
    --outline: #989898;
    --sidebar-bg: #1c1d1e;
    --sidebar-text: #d5d8da;
    --sidebar-muted: #9aa0a4;
}

[data-theme="dark"] body.platform-theme { color-scheme: dark; }

/* ---- styles.css ---- */
.indicator-range button[aria-pressed="true"]:where([data-theme="dark"] *) { background: var(--surface-container-high); }
.indicator-source-note > div:where([data-theme="dark"] *) { border-left: 1px solid #363636; }
.topbar:where([data-theme="dark"] *) { border-bottom: 1px solid rgba(76, 78, 78, 0.85); }
.nav-link-active:where([data-theme="dark"] *) { border-bottom-color: #171717; }
.event-badge-medium:where([data-theme="dark"] *) { background: #b0afaf; }
.home-masthead:where([data-theme="dark"] *) { background: #1f1f1f; }
.home-masthead-kicker:where([data-theme="dark"] *),
.home-masthead-date:where([data-theme="dark"] *),
.home-masthead-dot:where([data-theme="dark"] *) { color: #bab1a5; }
.home-search-field:where([data-theme="dark"] *) { color: #e6e6e6; }
.home-search-field:where([data-theme="dark"] *)::placeholder { color: #a9a9a9; }
.home-intro:where([data-theme="dark"] *) { border-bottom: 1px solid #363636; }
.home-intro-label:where([data-theme="dark"] *),
.search-hero-label:where([data-theme="dark"] *) { color: #a9a9a9; }
.home-intro-title:where([data-theme="dark"] *) { color: #e6e6e6; }
.home-intro-summary:where([data-theme="dark"] *),
.search-hero-note:where([data-theme="dark"] *) { color: #d7d3ce; }
.ticker-rule:where([data-theme="dark"] *),
.section-divider:where([data-theme="dark"] *) { border-top: 1px solid #363636; }
.ticker-strip:where([data-theme="dark"] *) { border-bottom: 1px solid #363636; }
.ticker-pill:where([data-theme="dark"] *) { border-right: 1px solid #363636; }
.ticker-label:where([data-theme="dark"] *) { color: #b6ada2; }
.section-title:where([data-theme="dark"] *) { color: #a9a9a9; }
.main-headline:where([data-theme="dark"] *) { color: #e6e6e6; }
.secondary-headline:where([data-theme="dark"] *) { color: #e6e6e6; }
.story-byline:where([data-theme="dark"] *) { color: #b3aea8; }
.sidebar-card:where([data-theme="dark"] *) { background: linear-gradient(180deg, #171717 0%, #1f1f1f 100%); }
.sidebar-card .section-title:where([data-theme="dark"] *) { border-bottom: 1px solid #363636; color: #f8f6f5; }
.event-row-divider:where([data-theme="dark"] *) { border-bottom: 1px solid #363636; }
.event-meta:where([data-theme="dark"] *) { color: #b6ada2; }
.quote-row:where([data-theme="dark"] *),
.currency-row:where([data-theme="dark"] *) { border-bottom: 1px solid #3e3932; }
.quote-row .market-data:where([data-theme="dark"] *),
.currency-row .market-data:where([data-theme="dark"] *) { color: #faf8f6; }
.currency-header:where([data-theme="dark"] *) { color: #a9a9a9; }
.currency-label:where([data-theme="dark"] *) { color: #faf8f6; }
.article-masthead:where([data-theme="dark"] *) { background: #1f1f1f; border-top: 2px solid #e6e6e6; border-bottom: 1px solid #363636; }
.article-masthead-utility:where([data-theme="dark"] *) { border-bottom: 1px solid #363636; }
.article-masthead-kicker:where([data-theme="dark"] *) { color: #bbb2a6; }
.article-masthead-home:where([data-theme="dark"] *) { color: #e6e6e6; }
.article-masthead-brand:where([data-theme="dark"] *) { color: #e6e6e6; }
.article-masthead-tagline:where([data-theme="dark"] *) { color: #b9b0a2; }
.article-masthead-nav:where([data-theme="dark"] *) { border-top: 1px solid #363636; }
.article-masthead-link:where([data-theme="dark"] *) { color: #e2dfdb; }
.article-masthead-link-active:where([data-theme="dark"] *) { border-bottom-color: #e6e6e6; }
.article-hed:where([data-theme="dark"] *) { color: #e6e6e6; }
.article-meta-label:where([data-theme="dark"] *) { color: #b8ae9f; }
.article-byline:where([data-theme="dark"] *) { color: #f5f5f5; }
.article-date:where([data-theme="dark"] *) { color: #bfbbb6; }
.prose p:where([data-theme="dark"] *) { color: #f2f0ef; }
.prose > p:first-of-type:where([data-theme="dark"] *) { color: #edebe7; }
.prose h2:where([data-theme="dark"] *),
.prose h3:where([data-theme="dark"] *),
.prose h4:where([data-theme="dark"] *) { color: #e6e6e6; }
.prose blockquote:where([data-theme="dark"] *) { border-left: 2px solid #e6e6e6; color: #edebe7; }
.prose table:where([data-theme="dark"] *) { border: 1px solid #363636; background: #171717; }
.prose th:where([data-theme="dark"] *),
.prose td:where([data-theme="dark"] *) { border: 1px solid #423d36; }
.prose th:where([data-theme="dark"] *) { background: #292621; }
.prose img:where([data-theme="dark"] *) { border: 1px solid #47423b; }
.read-article-link:where([data-theme="dark"] *) { color: #cfcbc5; }
@media (max-width: 720px) {
    .ticker-pill:where([data-theme="dark"] *) { border: 1px solid #363636; }
}
.market-database-header p:last-child:where([data-theme="dark"] *) { color: #b0afaf; }
.market-summary span:where([data-theme="dark"] *) { color: #b0afaf; }
.market-filter input:where([data-theme="dark"] *) { background: #171717; color: #f9f9f9; }
.market-chart-header p:where([data-theme="dark"] *) { color: #aca9a6; }
.market-chart-header > span:where([data-theme="dark"] *),
.market-chart-empty:where([data-theme="dark"] *),
.market-chart-hint:where([data-theme="dark"] *) { color: #aca9a6; }
.market-table-section small:where([data-theme="dark"] *) { color: #979999; }
.market-table th a:hover:where([data-theme="dark"] *),
.market-table th a:focus-visible:where([data-theme="dark"] *) { color: #f9f9f9; }
.market-table th[aria-sort="ascending"] a:where([data-theme="dark"] *),
.market-table th[aria-sort="descending"] a:where([data-theme="dark"] *) { color: #f9f9f9; }
.sort-indicator:where([data-theme="dark"] *) { color: #f9f9f9; }
.ticker-identity p:where([data-theme="dark"] *) { color: #b1afab; }
.ticker-variants a:where([data-theme="dark"] *) { color: #b7b5b1; }
.ticker-quote-label:where([data-theme="dark"] *),
.ticker-session-panel > p:where([data-theme="dark"] *),
.ticker-instrument-strip > p:where([data-theme="dark"] *) { color: #b1ada8; }
.ticker-price-change.positive:where([data-theme="dark"] *) { color: #8de9bd; }
.ticker-price-change.negative:where([data-theme="dark"] *) { color: #d87474; }
.ticker-quote-primary > p:where([data-theme="dark"] *) { color: #a8a5a1; }
.ticker-quote-stats dt:where([data-theme="dark"] *) { color: #a6a29e; }
.ticker-instrument-strip dt:where([data-theme="dark"] *) { color: #a09c98; }
.ticker-chart-ranges button:where([data-theme="dark"] *) { color: #b1aeaa; }
.market-directory-card:where([data-theme="dark"] *) { color: #f8f6f5; }
.market-directory-index:where([data-theme="dark"] *) { color: #b2a799; }
.market-section-heading p:where([data-theme="dark"] *) { color: #a9a5a0; }
.market-quote-card:where([data-theme="dark"] *) { color: #f7f5f4; }
.market-quote-card span:where([data-theme="dark"] *) { color: #a6a29e; }
.market-breadcrumb:where([data-theme="dark"] *) { color: #a3a09b; }
.market-view-toggle a:where([data-theme="dark"] *),
.market-denominations a:where([data-theme="dark"] *) { color: #b7b5b1; }
.market-name-link:where([data-theme="dark"] *) { color: #f8f6f5; }
.market-issuer-link:where([data-theme="dark"] *) { color: #d5d2cf; }
.market-variant-note:where([data-theme="dark"] *) { color: #a5a19d; }
.market-entity-header dl div:where([data-theme="dark"] *) { border-left: 1px solid #4d4a45; }
.market-entity-header dt:where([data-theme="dark"] *),
.on-instrument-summary dt:where([data-theme="dark"] *) { color: #a6a29e; }
.on-last-price span:where([data-theme="dark"] *),
.on-last-price p:where([data-theme="dark"] *) { color: #b1ada8; }
.on-live-ohlcv span:where([data-theme="dark"] *) { color: #b1ada8; }
.on-live-ohlcv b:where([data-theme="dark"] *) { color: #f7f6f4; }
.on-instrument-summary dl div:where([data-theme="dark"] *) { border-right: 1px solid #363636; border-bottom: 1px solid #363636; }
@media (max-width: 720px) {
    .market-summary div:nth-child(n + 3):where([data-theme="dark"] *) { border-top: 1px solid #4c4e4e; }
}
.dashboard-page .dashboard-tooltip.dashboard-floating-tooltip:where([data-theme="dark"] *),
[data-bond-curve-page] .dashboard-tooltip.dashboard-floating-tooltip:where([data-theme="dark"] *),
.cashflow-chart-tooltip.dashboard-floating-tooltip:where([data-theme="dark"] *) { background: #171717; border: 1px solid #363636; }
.market-table td:where([data-theme="dark"] *) { border-bottom-color: #35322e; }
.market-table tbody tr:hover:where([data-theme="dark"] *) { background: #1b1d1d; }
.market-count-chip:where([data-theme="dark"] *),
.market-denomination-chip:where([data-theme="dark"] *) { border-color: #3a4043; }
.ticker-session-panel > p:where([data-theme="dark"] *),
.ticker-quote-stats div:where([data-theme="dark"] *),
.ticker-instrument-strip:where([data-theme="dark"] *),
.ticker-instrument-strip dl div:where([data-theme="dark"] *) { border-color: #3b4144; }
.home-footer-column:where([data-theme="dark"] *) { border-color: rgba(23, 23, 23, 0.18); }
.indicator-card small:where([data-theme="dark"] *) { border-top: 1px solid #33302c; }
.indicator-index-intro > p:last-child:where([data-theme="dark"] *) { color: #afb2b5; }
.indicator-index-search input:where([data-theme="dark"] *) { border: 1px solid #424343; }
.indicator-index-search input:where([data-theme="dark"] *)::placeholder { color: #9b9ea2; }
.indicator-index-section-heading span:where([data-theme="dark"] *) { color: #a0a4a7; }
.indicator-directory-item a:hover:where([data-theme="dark"] *),
.indicator-directory-item a:focus-visible:where([data-theme="dark"] *) { background: #21201d; }
.indicator-directory-copy > span:where([data-theme="dark"] *) { color: #a9acb0; }
.indicator-directory-copy small:where([data-theme="dark"] *) { color: #9b9fa3; }
.dollar-index-hero > p:where([data-theme="dark"] *) { color: #afb2b5; }
.dollar-ledger .dollar-ledger-buy:where([data-theme="dark"] *) { color: #b1b6ba; }
.dollar-ledger-change .delta-up:where([data-theme="dark"] *) { background: #232926; }
.dollar-ledger-change .delta-down:where([data-theme="dark"] *) { background: #292222; }
@media (max-width: 720px) {
    .dollar-ledger .dollar-ledger-buy:where([data-theme="dark"] *)::before { color: #919498; }
}
.indicator-ledger-page .market-database-header > p:last-child:where([data-theme="dark"] *) { color: #b0b2b5; }
.indicator-ledger-count:where([data-theme="dark"] *) { color: #b5b8bb; }
.indicator-ledger-search input:where([data-theme="dark"] *) { border: 1px solid #424343; }
.indicator-ledger-search input:where([data-theme="dark"] *)::placeholder { color: #9b9ea2; }
.indicator-ledger:where([data-theme="dark"] *) { color: #acc4e7; }
.indicator-ledger thead th:where([data-theme="dark"] *) { color: #b4b8bc; }
.indicator-ledger-group small:where([data-theme="dark"] *) { color: #9a9fa4; }
.indicator-ledger-row > th:where([data-theme="dark"] *),
.indicator-ledger-row > td:where([data-theme="dark"] *) { border-bottom: 1px solid #333434; }
.indicator-ledger-row > th:where([data-theme="dark"] *) { color: #acc4e7; }
.indicator-ledger-row:hover > :is(th, td):where([data-theme="dark"] *) { background: #1b1c1d; }
.indicator-ledger-link small:where([data-theme="dark"] *) { color: #9ea1a5; }
.indicator-ledger .indicator-ledger-value:where([data-theme="dark"] *) { color: #eef2f6; }
.indicator-no-history:where([data-theme="dark"] *) { color: #8f9295; }
@media (max-width: 720px) {
    .indicator-ledger .indicator-ledger-row:where([data-theme="dark"] *) { border-bottom: 1px solid #333434; }
}
.indicator-detail-subcategory:where([data-theme="dark"] *) { color: #a9acaf; }
.indicator-detail-latest > span:where([data-theme="dark"] *),
.indicator-detail-facts dt:where([data-theme="dark"] *),
.indicator-history-chart .market-chart-header p:where([data-theme="dark"] *),
.ticker-chart-period > span:where([data-theme="dark"] *),
.indicator-methodology > p:where([data-theme="dark"] *) { color: #a1a5a8; }
.indicator-detail-latest strong:where([data-theme="dark"] *) { color: #ecf1f6; }
.indicator-detail-latest p:where([data-theme="dark"] *) { color: #9b9fa2; }
.indicator-detail-facts > div:where([data-theme="dark"] *) { border-bottom: 1px solid #3b3935; }
.indicator-detail-facts > div:nth-child(odd):where([data-theme="dark"] *) { border-right: 1px solid #3b3935; }
.indicator-detail-facts dd:where([data-theme="dark"] *) { color: #e6eaef; }
.indicator-detail-page .ticker-chart-ranges:where([data-theme="dark"] *) { border-color: #424343; }
.indicator-detail-page .ticker-chart-ranges button:where([data-theme="dark"] *) { color: #a6a9ad; }
.indicator-section-title span:where([data-theme="dark"] *) { color: #9b9fa2; }
.indicator-observations .market-table th:where([data-theme="dark"] *) { color: #a9acb0; }
.indicator-observations .market-table td:where([data-theme="dark"] *) { border-bottom: 1px solid #333434; color: #cfd3d7; }
.indicator-observations .market-table td:last-child:where([data-theme="dark"] *) { color: #eef2f6; }
.indicator-methodology > div:where([data-theme="dark"] *) { color: #a6a9ad; }
.home-search-field:where([data-theme="dark"] *) { border-color: #494949; }
.search-shortcut:where([data-theme="dark"] *) { border-color: #363636; }
.article-summary:where([data-theme="dark"] *) { color: #d4d2cf; }
.sidebar-data-panel.sidebar-card:where([data-theme="dark"] *) { border: 1px solid #363636; background: #171717; }
.sidebar-data-panel__header:where([data-theme="dark"] *) { border-bottom: 1px solid #363636; }
.sidebar-data-panel .section-title:where([data-theme="dark"] *) { color: #ea5965; }
.sidebar-data-panel__columns:where([data-theme="dark"] *) { background: #1f1f1f; color: #a9a9a9; }
.sidebar-data-panel__row:where([data-theme="dark"] *) { border-bottom: 1px solid #393632; }
.sidebar-data-panel__row:hover:where([data-theme="dark"] *) { background: #1f1f1f; }
.sidebar-data-panel__row-currency .currency-label:where([data-theme="dark"] *) { color: #e6e6e6; }
.sidebar-data-panel__row-currency .market-data:where([data-theme="dark"] *) { color: #e6e6e6; }
.sidebar-data-panel__row-calendar .event-meta:where([data-theme="dark"] *) { color: #a9a9a9; }
.sidebar-data-panel__row-calendar .event-name:where([data-theme="dark"] *) { color: #e6e6e6; }
.sidebar-data-panel__row-calendar .event-badge-high:where([data-theme="dark"] *) { background: #292222; color: #ea5965; }
.sidebar-data-panel__row-calendar .event-badge-medium:where([data-theme="dark"] *) { background: #2a2926; color: #bebcba; }
.sidebar-data-panel__row-pulse .quote-symbol:where([data-theme="dark"] *) { color: #e6e6e6; }
.sidebar-data-panel__row-pulse .market-data:where([data-theme="dark"] *) { color: #e6e6e6; }
.sidebar-data-panel__row-pulse .delta-up:where([data-theme="dark"] *) { background: #232926; color: #80f5bb; }
.sidebar-data-panel__row-pulse .delta-down:where([data-theme="dark"] *) { background: #292222; color: #ea5965; }
.sidebar-card-calendar .event-row:hover:where([data-theme="dark"] *) { background: #1e1e1c; }
.home-calendar-source:where([data-theme="dark"] *) { color: #9c9c98; }
.home-calendar-footer:where([data-theme="dark"] *) { color: #9c9c98; }
.home-calendar-footer a:where([data-theme="dark"] *) { color: #e7ebeb; }
.info-tip:where([data-theme="dark"] *)::after { background: var(--surface-container-high); }
.public-bond-detail-page #cotizacion .bond-fact-group dt:where([data-theme="dark"] *)::after,
.bond-facts-list dt:where([data-theme="dark"] *)::after { border-bottom: 1px dotted #5a5a5a; }
.bond-metric-tooltip:where([data-theme="dark"] *) { background: var(--surface-container-high); }

/* ---- automotive-monitor.css ---- */
.auto-controls:where([data-theme="dark"] *) { border-bottom: 1px solid var(--border,#2e3032); }
.auto-controls select:where([data-theme="dark"] *) { border: 1px solid #55585c; background: #171717; }
.auto-controls small:where([data-theme="dark"] *),
.auto-headline span:where([data-theme="dark"] *) { color: #a9adb2; }
[data-auto-more]:where([data-theme="dark"] *) { border: 1px solid #5d6064; background: #171717; }
@media(max-width:800px) {
    .auto-ranking tr:where([data-theme="dark"] *) { border-bottom: 1px solid #373737; }
    .auto-ranking td:where([data-theme="dark"] *):before { color: #a9adb2; }
}
.auto-ranking td small:where([data-theme="dark"] *) { color: #999fa4; }
.auto-rank-controls input:where([data-theme="dark"] *),
.auto-rank-controls select:where([data-theme="dark"] *),
.auto-rank-controls>button:where([data-theme="dark"] *) { background: #171717; }
.dashboard-legend [data-series-toggle]:where([data-theme="dark"] *) { border: 1px solid var(--series-color,#797d81); border-left: 6px solid var(--series-color,#797d81); background: color-mix(in srgb,var(--series-color,#797d81) 8%,#171717); }
.dashboard-legend [data-series-toggle][aria-pressed=true]:where([data-theme="dark"] *) { border-color: var(--series-color,#797d81); }
.dashboard-legend [data-series-toggle] i:where([data-theme="dark"] *) { background: var(--series-color,#797d81); }
.dashboard-legend [data-series-toggle][aria-pressed=false]:where([data-theme="dark"] *) { background: #171717; }
.dashboard-legend [data-series-toggle]:hover:where([data-theme="dark"] *) { background: color-mix(in srgb,var(--series-color,#797d81) 14%,#171717); }
.auto-costs-table caption:where([data-theme="dark"] *) { color: #a9adb2; }
.auto-costs-table th small:where([data-theme="dark"] *) { color: #a9adb2; }
.dashboard-page .auto-costs-table thead th:where([data-theme="dark"] *),
.dashboard-page .auto-costs-table thead th:first-child:where([data-theme="dark"] *) { background: #212122; color: #b7bcc2; }
.dashboard-page .auto-costs-table tbody th:where([data-theme="dark"] *),
.dashboard-page .auto-costs-table tbody th:first-child:where([data-theme="dark"] *) { background: #1c1c1c; color: #d5dbe1; }
.auto-heatmap-key:where([data-theme="dark"] *) { color: #a9adb2; }
.auto-heatmap-key i:where([data-theme="dark"] *) { background: linear-gradient(to right,#171717,#e18d93); border: 1px solid #2e3032; }

/* ---- bond-arbitrage.css ---- */
.arb-workspace:where([data-theme="dark"] *) { background: #171717; border: 1px solid #303233; }
.arb-controls:where([data-theme="dark"] *) { border-bottom: 1px solid #292a2c; }
.arb-input-wrap input:where([data-theme="dark"] *) { background: #1a1b1b; color: #e3e6e9; border: 1px solid #414346; }
.arb-input-wrap>span:where([data-theme="dark"] *) { color: #9fa4aa; }
.arb-picker small:where([data-theme="dark"] *) { color: #a3a8ad; }
.arb-picker ul:where([data-theme="dark"] *) { background: #171717; border: 1px solid #333639; }
.arb-picker li span:where([data-theme="dark"] *) { color: #999fa3; }
.arb-picker li[aria-selected=true]:where([data-theme="dark"] *) { background: #212224; }
.arb-picker li:hover:where([data-theme="dark"] *) { background: #1f1f20; }
.arb-swap:where([data-theme="dark"] *) { border: 1px solid #333639; background: #171717; color: #b2b8bd; }
.arb-swap:hover:where([data-theme="dark"] *) { background: #1e1f20; }
.arb-toolbar:where([data-theme="dark"] *) { color: #9fa3a8; }
.arb-range:where([data-theme="dark"] *) { border: 1px solid #3a3c3e; }
.arb-range button:where([data-theme="dark"] *) { border-right: 1px solid #3a3c3e; background: #171717; color: #b2b6bb; }
.arb-status:where([data-theme="dark"] *) { color: #9fa3a8; }
.arb-note:where([data-theme="dark"] *) { background: #1f2021; color: #c2c8cd; }
.arb-retry:where([data-theme="dark"] *) { color: #ef6777; }
.arb-workspace hr:where([data-theme="dark"] *) { border-top: 1px solid #2a2b2d; }
.arb-section-heading h2:where([data-theme="dark"] *) { color: #dadfe3; }
.arb-section-heading>span:where([data-theme="dark"] *) { color: #979b9f; }
.arb-current:where([data-theme="dark"] *) { border-right: 1px solid #2c2e30; color: #a2a8ad; }
.arb-current strong:where([data-theme="dark"] *) { color: #a9c3d6; }
.arb-reference-legend:where([data-theme="dark"] *) { color: #989ea4; }
.arb-reference-legend i:where([data-theme="dark"] *) { background: #27292b; }
.arb-tables caption:where([data-theme="dark"] *) { color: #d3d8dd; }
.arb-tables caption small:where([data-theme="dark"] *) { color: #989da2; }
.arb-tables th:where([data-theme="dark"] *),
.arb-tables td:where([data-theme="dark"] *) { border-bottom: 1px solid #242627; }
.arb-tables thead:where([data-theme="dark"] *) { color: #989da2; }
.arb-tables td small:where([data-theme="dark"] *) { color: #91959a; }
.arb-method:where([data-theme="dark"] *) { background: #1a1b1b; border-top: 1px solid #282a2c; color: #a4aaaf; }
.arb-method summary:where([data-theme="dark"] *) { color: #c2c8cd; }
.arb-empty:where([data-theme="dark"] *) { color: #9fa9b1; }
.arb-page .market-chart-wrap:where([data-theme="dark"] *) { background: #171717; }
@media(max-width:700px) {
    .arb-current:where([data-theme="dark"] *) { border-bottom: 1px solid #2c2e30; }
    .arb-bond-table tbody tr:where([data-theme="dark"] *) { border-bottom: 1px solid #282a2c; }
    .arb-bond-table tbody td:where([data-theme="dark"] *):before { color: #93999e; }
}
.arb-page .arb-tables thead th:where([data-theme="dark"] *) { background: #1e1f20; }
.arb-page .arb-metric-table thead th:where([data-theme="dark"] *) { border-bottom: 1px solid #2b2d2e; }
.arb-page .arb-metric-table tbody tr:where([data-theme="dark"] *) { border-bottom: 1px dotted #35383a; }
.arb-tab-toolbar:where([data-theme="dark"] *) { border-bottom: 1px solid #2f3133; }
.arb-tabs button:where([data-theme="dark"] *) { border: 1px solid #2f3133; background: #1f2021; color: #a0a9b2; }
.arb-tabs button:hover:where([data-theme="dark"] *) { background: #242728; color: #abc2d2; }
.arb-tabs button[aria-selected=true]:where([data-theme="dark"] *) { background: #171717; color: #e66d7d; border-bottom-color: #171717; }
.arb-scatter-metric:where([data-theme="dark"] *) { border: 1px solid #3a3c3e; background: #171717; color: #b2b6bb; }
.arb-scatter-metric:hover:where([data-theme="dark"] *) { background: #1a1b1b; }
.arb-scatter-inequality:where([data-theme="dark"] *) { background: rgba(23, 23, 23, 0.851); color: #9eaab2; }
.arb-reference-legend .arb-band-outer:where([data-theme="dark"] *) { background: #1f2123; border: 1px solid #2b2e32; }
.arb-reference-legend .arb-band-middle:where([data-theme="dark"] *) { background: #2a2f34; }
.arb-date-legend:where([data-theme="dark"] *) { color: #a5b1bb; }
.arb-gradient-scale [data-date-ticks]>span:where([data-theme="dark"] *):before { border-left: 1px solid #5f6367; }
.arb-page .arb-tables caption:where([data-theme="dark"] *) { border-bottom: 2px solid #282a2c; }
.arb-page .arb-tables tbody th:where([data-theme="dark"] *) { color: #a3afb8; }
.arb-page .arb-tables td:where([data-theme="dark"] *) { color: #aac2d3; }
.arb-page .arb-tables tbody tr:hover:where([data-theme="dark"] *) { background: #1b1c1d; }
.arb-page .arb-stat-table tbody tr:first-child:where([data-theme="dark"] *) { background: #1f2122; }
.arb-page .arb-stat-table tbody tr:first-child th:where([data-theme="dark"] *) { color: #aac2d3; }
.arb-page .arb-bond-table thead th:nth-child(2):where([data-theme="dark"] *) { color: #ea6878; }
.arb-page .arb-bond-table thead th:nth-child(3):where([data-theme="dark"] *) { color: #97b6c9; }

/* ---- bond-curve.css ---- */
.bond-curve:where([data-theme="dark"] *) { --family-linked: #d9d9d9; --family-otras: #969696; }
.bond-search:where([data-theme="dark"] *) { border: 1px solid var(--color-border, #373737); background: #171717; }
.bond-search button:where([data-theme="dark"] *) { background: #222222; }
.bond-search button:hover:where([data-theme="dark"] *) { background: #2b2b2b; }
.bond-filter-grid:where([data-theme="dark"] *) { border: 1px solid var(--color-border, #373737); background: #1e1e1e; }
.bond-filter-grid > :is(label, .bond-filter-field):where([data-theme="dark"] *) { border-left: 1px solid var(--color-border, #373737); }
.bond-filter-grid > :is(label, .bond-filter-field):nth-child(n + 5):where([data-theme="dark"] *) { border-top: 1px solid var(--color-border, #373737); }
.bond-curve select:where([data-theme="dark"] *) { border: 1px solid var(--color-border, #373737); background: #171717; }
.bond-filter-grid > :is(label, .bond-filter-field):focus-within:where([data-theme="dark"] *) { background: #171717; }
.bond-trend-switch:where([data-theme="dark"] *) { background: #404040; }
.bond-trend-switch:where([data-theme="dark"] *)::after { background: #171717; }
[data-bond-curve-page] [data-retry]:where([data-theme="dark"] *) { border: 1px solid var(--color-border, #373737); background: #171717; }
.bond-curve-table th:where([data-theme="dark"] *),
.bond-curve-table td:where([data-theme="dark"] *) { border-bottom: 1px dotted var(--color-border, #373737); }
.bond-curve-table tr.is-inspected:where([data-theme="dark"] *) { background: var(--color-surface-soft, #202020); }
@media (max-width: 800px) {
    .bond-filter-grid > :is(label, .bond-filter-field):where([data-theme="dark"] *) { border-top: 1px solid var(--color-border, #373737); }
    .bond-filter-grid > :is(label, .bond-filter-field):nth-child(2n):where([data-theme="dark"] *) { border-left: 1px solid var(--color-border, #373737); }
}
.bond-legend-panel:where([data-theme="dark"] *) { background: rgba(23, 23, 23, 0.92); }
.bond-trend-mode select:where([data-theme="dark"] *) { background: #1e1e1e; }
.bond-column-picker > summary:where([data-theme="dark"] *) { border: 1px solid var(--color-border, #373737); }
.bond-column-panel:where([data-theme="dark"] *) { border: 1px solid var(--color-border, #373737); background: #171717; }
.bond-curve-table input[type=checkbox]:where([data-theme="dark"] *) { accent-color: var(--color-text, #d9d9d9); }
.bond-curve-table tr.is-selected:where([data-theme="dark"] *) { background: #222222; }
.bond-selection-bar button:where([data-theme="dark"] *),
.bond-comparison button:where([data-theme="dark"] *) { color: var(--color-text, #d9d9d9); background: #171717; border: 1px solid var(--color-border, #373737); }
.bond-selection-bar:where([data-theme="dark"] *) { background: #171717; border-top: 1px solid var(--color-border, #373737); }
.bond-selection-chip:where([data-theme="dark"] *) { border: 1px solid var(--color-border, #373737); }
.bond-selection-bar .bond-compare-primary:where([data-theme="dark"] *) { background: var(--surface-container-high); border-color: var(--color-text, #d9d9d9); }
.bond-comparison:where([data-theme="dark"] *) { border: 1px solid #313436; background: #171717; color: var(--color-text, #d9d9d9); }
.bond-comparison .bond-comparison-close:where([data-theme="dark"] *) { border: 1px solid rgba(23, 23, 23, 0.141); background: rgba(23, 23, 23, 0.039); }
.bond-comparison .bond-comparison-close:hover:where([data-theme="dark"] *) { background: rgba(23, 23, 23, 0.125); }
.bond-comparison .bond-comparison-close:focus-visible:where([data-theme="dark"] *) { outline-color: #171717; }
.bond-comparison-table th:where([data-theme="dark"] *),
.bond-comparison-table td:where([data-theme="dark"] *) { border-bottom: 1px solid #242627; }
.bond-comparison-table thead th:where([data-theme="dark"] *) { background: #1f2021; border-bottom: 1px solid #303335; }
.bond-comparison-table tbody th:where([data-theme="dark"] *) { background: #171717; }
.bond-comparison-table .bond-comparison-corner:where([data-theme="dark"] *) { background: #171717; }
.bond-comparison-table :is(th, td).is-reference:where([data-theme="dark"] *) { background: #25282a; }
.bond-comparison-table tbody th:where([data-theme="dark"] *) { color: #9fa4a9; }
.bond-comparison-table strong:where([data-theme="dark"] *) { color: #dbdfe3; }
.bond-comparison-table small:where([data-theme="dark"] *) { color: #959aa0; }
.bond-comparison-table .bond-comparison-difference:where([data-theme="dark"] *) { color: #9ea9b2; }
.bond-comparison-table .bond-reference-select:where([data-theme="dark"] *) { color: #e1e3e5; }
.bond-comparison-table .bond-comparison-grip:where([data-theme="dark"] *) { color: #9a9da0; }
.bond-comparison-table .bond-comparison-grip:hover:where([data-theme="dark"] *),
.bond-comparison-table .bond-remove:hover:where([data-theme="dark"] *) { background: rgba(255, 255, 255, 0.047); }
.bond-comparison-table .is-dragging:where([data-theme="dark"] *) { background: #171717; }
.bond-comparison-table thead .is-dragging:where([data-theme="dark"] *) { background: #1f2021; }
.bond-comparison-table tr.is-dragging > *:where([data-theme="dark"] *) { background: #171717; }
.bond-comparison-table .is-dragging.is-reference:where([data-theme="dark"] *),
.bond-comparison-table tr.is-dragging > .is-reference:where([data-theme="dark"] *) { background: #25282a; }
.bond-comparison-table .bond-metric-help:where([data-theme="dark"] *) { border: 1px solid #73777b; color: #a5b1bb; }
.bond-comparison-metrics:where([data-theme="dark"] *) { border-top: 1px solid #242627; }
.bond-comparison .bond-metric-toggle:where([data-theme="dark"] *) { border-color: #2c2f31; color: #969ba0; }
.bond-comparison .bond-metric-toggle[aria-pressed=true]:where([data-theme="dark"] *) { background: #25282a; border-color: #373d42; color: #a2bbce; }
.bond-comparison :focus-visible:where([data-theme="dark"] *),
.bond-selection-bar :focus-visible:where([data-theme="dark"] *) { outline: 2px solid var(--color-text, #d9d9d9); }
.bond-multi-panel:where([data-theme="dark"] *) { border: 1px solid var(--color-border, #373737); background: #171717; }
.bond-multi-options > label:hover:where([data-theme="dark"] *),
.bond-multi-options > label:focus-within:where([data-theme="dark"] *) { background: #202020; }
.bond-multi-options input:where([data-theme="dark"] *) { accent-color: var(--color-text, #d9d9d9); }
.bond-multi-options > label:first-of-type:where([data-theme="dark"] *) { border-bottom: 1px solid var(--color-border, #373737); }
.bond-multi-panel .bond-multi-search:where([data-theme="dark"] *) { border: 1px solid var(--color-border, #373737); }

/* ---- carry-refresh.css ---- */
.carry-summary:where([data-theme="dark"] *),
.equilibrium-page .carry-curve:where([data-theme="dark"] *) { background: #171717; }
.equilibrium-page .carry-readout:where([data-theme="dark"] *) { background: #171717; }

/* ---- dashboards.css ---- */
.dashboard-filters button:where([data-theme="dark"] *) { background: var(--surface-container-high); }
.dashboard-history:where([data-theme="dark"] *) { --signal-bg: #1f2122; }
.dashboard-history[data-tone=positive]:where([data-theme="dark"] *) { --signal-bg: #253025; }
.dashboard-history[data-tone=warning]:where([data-theme="dark"] *) { --signal-bg: #252318; }
.dashboard-history[data-tone=negative]:where([data-theme="dark"] *) { --signal-bg: #2d2122; }
@media(max-width:800px) {
    .dashboard-collection .market-table tr:where([data-theme="dark"] *) { border-bottom: 1px solid var(--line,#373737); }
}
.dashboard-table-expand button:hover:where([data-theme="dark"] *) { background: var(--color-background,#202020); }
.dashboard-room-options button:hover:where([data-theme="dark"] *) { background: var(--color-background,#212121); }
.dashboard-number[data-value-tone="positive"]:where([data-theme="dark"] *) { background: #253025; }
.dashboard-number[data-value-tone="negative"]:where([data-theme="dark"] *) { background: #2d2122; }
.dashboard-number[data-value-tone="warning"]:where([data-theme="dark"] *) { background: #252318; }
.dashboard-consumption-cluster>.dashboard-metric:where([data-theme="dark"] *) { border: 1px solid var(--line,#2c2d2f); }
.dashboard-consumption-cluster>.dashboard-metric:has([data-value-tone="positive"]):where([data-theme="dark"] *) { background: #253025; }
.dashboard-consumption-cluster>.dashboard-metric:has([data-value-tone="negative"]):where([data-theme="dark"] *) { background: #2d2122; }
.dashboard-consumption-cluster>.dashboard-metric:has([data-value-tone="warning"]):where([data-theme="dark"] *) { background: #252318; }
.dashboard-basket-help:where([data-theme="dark"] *) { border: 1px solid #333638; background: #171717; color: #a0bfdc; }

/* ---- economic-calendar.css ---- */
.ec-page:where([data-theme="dark"] *) { --ec-line: #333230; --ec-muted: #9c9c98; --ec-warm: #1e1e1c; --ec-ink: #e7ebeb; --ec-high-bg: #241d1e; --ec-low: #7f8281; }
.ec-hero h1>span:where([data-theme="dark"] *) { color: #ea5965; }
.ec-subtitle:where([data-theme="dark"] *) { color: #9c9d99; }
.ec-mini-grid>span:where([data-theme="dark"] *) { color: #878885; }
.ec-mini-grid button:where([data-theme="dark"] *) { color: #aeb0ae; }
.ec-mini-grid button:hover:where([data-theme="dark"] *) { background: #282927; }
.ec-filter-options button:where([data-theme="dark"] *) { color: #a0a39f; }
.ec-filter-options button[aria-pressed=true]:where([data-theme="dark"] *) { background: #292926; }
.ec-filter-options button:hover:where([data-theme="dark"] *) { background: #222220; }
.ec-count:where([data-theme="dark"] *) { color: #838682; }
.ec-impact-filters button:where([data-theme="dark"] *) { background: #171717; color: #989996; }
.ec-dot-low:where([data-theme="dark"] *) { background: var(--ec-low,#7f8281); }
.ec-filter-group select:where([data-theme="dark"] *) { background: #171717; color: #a9aca8; }
.ec-saved-toggle:where([data-theme="dark"] *) { color: #a4a7a3; }
.ec-saved-toggle[aria-pressed=true] svg:where([data-theme="dark"] *) { fill: #31332e; }
.ec-note-rule:where([data-theme="dark"] *) { background: #717068; }
.ec-sidebar-note small:where([data-theme="dark"] *) { color: #888984; }
.ec-icon-button:where([data-theme="dark"] *) { border: 1px solid var(--ec-line,#333230); color: #afb3af; }
.ec-icon-button:hover:where([data-theme="dark"] *) { background: var(--ec-warm,#1e1e1c); }
.ec-today:where([data-theme="dark"] *) { color: #a2a5a2; }
.ec-view-switch:where([data-theme="dark"] *) { background: #242422; border: 1px solid #2a2a27; }
.ec-view-switch button:where([data-theme="dark"] *) { color: #888985; }
.ec-view-switch button[aria-pressed=true]:where([data-theme="dark"] *) { color: #d3d8d4; background: #171717; border-color: #343431; }
.ec-search>svg:where([data-theme="dark"] *) { color: #868883; }
.ec-search input:where([data-theme="dark"] *)::placeholder { color: #81837e; }
.ec-search kbd:where([data-theme="dark"] *) { border: 1px solid #2e2e2b; }
.ec-timezone:where([data-theme="dark"] *) { color: #8f918c; }
.ec-timezone select:where([data-theme="dark"] *) { color: #9a9d97; }
.ec-export:where([data-theme="dark"] *) { color: #b5bab4; }
.ec-context-bar:where([data-theme="dark"] *) { color: #878884; }
.ec-context-bar strong:where([data-theme="dark"] *) { color: #b9bdb7; }
.ec-calendar-table th:where([data-theme="dark"] *) { color: #7d7f7a; }
.ec-calendar-table td.is-weekend:where([data-theme="dark"] *) { background: #1b1b1a; }
.ec-calendar-table td.is-outside:where([data-theme="dark"] *) { background: #1c1d1b; }
.ec-calendar-table td.is-selected:where([data-theme="dark"] *) { background: #21221f; }
.ec-calendar-table td.is-today:where([data-theme="dark"] *) { background: #211f1c; }
.ec-date-number:where([data-theme="dark"] *) { color: #a2a69e; }
.ec-today-label:where([data-theme="dark"] *) { color: #a4a995; }
.ec-event-chip:where([data-theme="dark"] *) { background: #262724; border-left: 2px solid #5d6059; color: #b9c0b4; }
.ec-event-chip.high:where([data-theme="dark"] *) { color: #cf9888; }
.ec-event-chip.medium:where([data-theme="dark"] *) { background: #292824; color: #bfb7a0; }
.ec-more:where([data-theme="dark"] *) { color: #84877f; }
.ec-agenda-time:where([data-theme="dark"] *) { color: #bec3bb; }
.ec-agenda-time small:where([data-theme="dark"] *) { color: #7c7f79; }
.ec-agenda-main>span:where([data-theme="dark"] *) { color: #848881; }
.ec-agenda-main small:where([data-theme="dark"] *) { color: #80837c; }
.ec-agenda-status:where([data-theme="dark"] *) { color: #81847b; }
.ec-status-released:where([data-theme="dark"] *) { color: #a2b79f; }
.ec-status-cancelled:where([data-theme="dark"] *) { color: #c59384; }
.ec-save-button[aria-pressed=true]:where([data-theme="dark"] *) { color: #b2c2a6; }
.ec-save-button[aria-pressed=true] svg:where([data-theme="dark"] *) { fill: #343831; }
.ec-empty:where([data-theme="dark"] *) { color: #7d8079; }
.ec-empty strong:where([data-theme="dark"] *) { color: #adb9a4; }
.ec-loading:where([data-theme="dark"] *) { color: #84897f; }
.ec-error:where([data-theme="dark"] *) { border: 1px solid #463a34; background: #231f1c; color: #c9a795; }
.ec-agenda-group h3:where([data-theme="dark"] *) { color: #8e9288; }
.ec-agenda-group h3 strong:where([data-theme="dark"] *) { color: #b4c1a9; }
.ec-agenda-group.is-today h3:where([data-theme="dark"] *) { background: #2b2722; color: #bf9f8c; }
.ec-dialog:where([data-theme="dark"] *) { border: 1px solid #3d4039; color: #e2e7e0; background: #171717; }
.ec-detail-kicker:where([data-theme="dark"] *) { color: #82887d; }
.ec-detail-date:where([data-theme="dark"] *) { border-top: 1px solid #373933; border-bottom: 1px solid #373933; }
.ec-detail-date span:where([data-theme="dark"] *) { color: #80847a; }
.ec-detail-description:where([data-theme="dark"] *) { color: #92978c; }
.ec-detail-note:where([data-theme="dark"] *) { color: #bc9e8e; background: #24221e; }
.ec-detail-actions a:where([data-theme="dark"] *),
.ec-detail-actions button:where([data-theme="dark"] *) { border: 1px solid #393c35; background: #171717; color: #b2c2a6; }
.ec-detail-actions .ec-primary:where([data-theme="dark"] *) { border-color: #e3e9e1; }
@media(max-width:800px) {
    .ec-mobile-filters:where([data-theme="dark"] *) { background: #171717; }
}
@media(max-width:580px) {
    .ec-event-chip:where([data-theme="dark"] *) { background: #777c71!important; }
}
@media(min-width:581px) {
    .ec-calendar-table th:where([data-theme="dark"] *) { color: #9da29a; }
}
.ec-calendar-footer:where([data-theme="dark"] *),
.ec-detail-verified:where([data-theme="dark"] *) { color: #9ba096; }
.ec-detail-full:where([data-theme="dark"] *) { color: #9fa599; }
.ec-detail-facts dt:where([data-theme="dark"] *) { color: #9ba195; }

/* ---- equity-screener.css ---- */
.equity-screener-filters select:where([data-theme="dark"] *) { background: #171717; }
.equity-screener-actions span:where([data-theme="dark"] *),
.equity-screener-method:where([data-theme="dark"] *) { color: #a5b0bb; }
.equity-screener-table caption:where([data-theme="dark"] *) { color: #a5b0bb; }
.equity-screener-table tbody tr:hover:where([data-theme="dark"] *) { background: #1f1f20; }
.equity-screener-table .equity-return.positive:where([data-theme="dark"] *) { color: #86eaaa; }
.equity-screener-table .equity-return.negative:where([data-theme="dark"] *) { color: #df6b75; }
.equity-range-track:where([data-theme="dark"] *) { background: linear-gradient(90deg, #4e3638, #2c2c2c 50%, #b9dfc9); }
.equity-event-chip:where([data-theme="dark"] *) { background: #262c29; }

/* ---- futures-monitor.css ---- */
[data-futures-page] .dashboard-section-nav a:hover:where([data-theme="dark"] *) { color: var(--color-accent,#f1526b); }

/* ---- fx-market.css ---- */
.fx-page:where([data-theme="dark"] *) { color: var(--color-text,#afcbdd); }
.fx-pair-selectors select:where([data-theme="dark"] *) { background: #1a1b1b; border: 1px solid #414346; }
.fx-header>p:last-child:where([data-theme="dark"] *) { color: #a1adb3; }
.fx-ticker small:where([data-theme="dark"] *) { color: #959ca0; }
.fx-section:where([data-theme="dark"] *) { background: #171717; }
.fx-heading small:where([data-theme="dark"] *),
.fx-heading>span:where([data-theme="dark"] *),
.fx-note:where([data-theme="dark"] *),
.fx-page small:where([data-theme="dark"] *) { color: #a0abb2; }
.fx-kpis>div:where([data-theme="dark"] *) { border-left: 2px solid #282a2d; }
.fx-page .fx-up:where([data-theme="dark"] *) { color: #80f5bb; }
.fx-page .fx-down:where([data-theme="dark"] *) { color: #ea5965; }
.fx-neutral:where([data-theme="dark"] *) { color: #969da1; }
.fx-table th:where([data-theme="dark"] *),
.fx-table td:where([data-theme="dark"] *) { border-bottom: 1px solid #2f2d2a; }
.fx-table thead th:where([data-theme="dark"] *) { color: #a1adb3; }
.fx-table tr>*:first-child:where([data-theme="dark"] *) { background: #171717; }
.fx-heatmap td.fx-up:where([data-theme="dark"] *) { background: #202422; }
.fx-heatmap td.fx-down:where([data-theme="dark"] *) { background: #25201f; }
.fx-range-track:where([data-theme="dark"] *) { background: #282926; }
.fx-range-track i:where([data-theme="dark"] *) { border: 1px solid #171717; }
.fx-buttons button:where([data-theme="dark"] *),
.fx-retry:where([data-theme="dark"] *) { background: #171717; border: 1px solid #3b3a36; color: #a3bac6; }
.fx-benchmark select:where([data-theme="dark"] *) { background: #171717; }
.fx-tooltip:where([data-theme="dark"] *) { background: #1f2122; }
.fx-chart-status:where([data-theme="dark"] *) { color: #a1adb3; }
.fx-structure-track:where([data-theme="dark"] *) { background: linear-gradient(to right,transparent calc(50% - 1px),#474d51 50%,transparent calc(50% + 1px)); }
.fx-macro a:where([data-theme="dark"] *) { border-left: 2px solid #282a2d; }
.fx-events a:where([data-theme="dark"] *) { border-top: 1px solid #2f2d2a; }
.fx-method:where([data-theme="dark"] *) { color: #9facb5; }
.fx-range-header:where([data-theme="dark"] *) { color: #959ca0; border-bottom: 1px solid #373531; }
.fx-range-item:where([data-theme="dark"] *) { border-bottom: 1px solid #2e2c29; }
.fx-range-visual .fx-range-track:where([data-theme="dark"] *) { background: #282926; }
.fx-range-visual .fx-range-track i:where([data-theme="dark"] *) { border: 3px solid #171717; }
.fx-range-visual .fx-range-labels:where([data-theme="dark"] *) { color: #959ca0; }
.fx-range-labels b:where([data-theme="dark"] *) { color: #a7bfcd; }
.fx-table.fx-history-table thead th:where([data-theme="dark"] *) { background: #171717; }
.fx-band .fx-range-track:where([data-theme="dark"] *) { background: #2a2c2e; }
.fx-band .fx-range-track i:where([data-theme="dark"] *) { border: 3px solid #171717; }

/* ---- home.css ---- */
.home-view:where([data-theme="dark"] *) { background: #171717; }
.edition-tabs [role="tab"]:hover:where([data-theme="dark"] *) { background: #1f1f1f; }
.edition-tabs [role="tab"][aria-selected="true"]:where([data-theme="dark"] *) { background: #1f1f1f; }
.edition-table :is(th, td):where([data-theme="dark"] *) { border-bottom: 1px solid #282828; }
.edition-spark:where([data-theme="dark"] *) { color: #a6b2bb; }
.edition-spark-tooltip:where([data-theme="dark"] *) { background: #171717; }
.edition-chart-gridline:where([data-theme="dark"] *) { stroke: #313131; }
.edition-chart-bar:where([data-theme="dark"] *) { fill: color-mix(in srgb, currentColor 45%, #171717); }
.edition-tool:where([data-theme="dark"] *),
.edition-report:where([data-theme="dark"] *) { background: #171717; }
.edition-category-links a:where([data-theme="dark"] *) { border-bottom: 1px solid #282828; }
.edition-futures-table :is(th,td):where([data-theme="dark"] *) { border-bottom: 1px solid #282828; }
.edition-day-event:where([data-theme="dark"] *) { border-bottom: 1px solid #282828; }
.edition-relevance-dot:where([data-theme="dark"] *) { background: #666b64; }
.home-discover:where([data-theme="dark"] *) { background: #1f1f1f; }

/* ---- indicator-detail.css ---- */
.indicator-chart-feedback button:where([data-theme="dark"] *) { background: #171717; }
.indicator-tooltip:where([data-theme="dark"] *) { background: #171717; }

/* ---- investment-funds.css ---- */
.fund-inflation-help:where([data-theme="dark"] *) { background: #171717; border: 1px solid #363636; color: var(--color-text,#f9f9f9); }
.fund-list-note:where([data-theme="dark"] *) { color: var(--color-text-secondary,#aca9a6); }
.fund-detail-date:where([data-theme="dark"] *) { color: #aca9a6; }
.fund-manager-logo:where([data-theme="dark"] *) { border: 1px solid #323130; background: #171717; }
.fund-detail-note:where([data-theme="dark"] *),
.fund-detail-links:where([data-theme="dark"] *) { color: #aca9a6; }
.fund-bars th:where([data-theme="dark"] *) { border-bottom: 1px solid #232425; }
.fund-bars td:where([data-theme="dark"] *) { border-bottom: 1px solid #232425; }
.fund-pie-chart :is(path,circle):where([data-theme="dark"] *) { stroke: #171717; }
.fund-pie-legend tr.is-active:where([data-theme="dark"] *) { background: #1f1f1f; }
.fund-pie-legend th:where([data-theme="dark"] *) { border-bottom: 1px solid #232425; }
.fund-pie-legend td:where([data-theme="dark"] *) { border-bottom: 1px solid #232425; }
.fund-pie-tooltip:where([data-theme="dark"] *) { background: #171717; border: 1px solid #363636; }
.fund-bars thead th:where([data-theme="dark"] *) { color: #aca9a6; border-bottom: 1px solid #3c3a39; }
.fund-bars .fund-bar-change:where([data-theme="dark"] *) { color: #a9a9a9; }
.fund-bars .fund-bar-change.up:where([data-theme="dark"] *) { color: var(--color-positive,#80f5bb); }
.fund-bars .fund-bar-change.down:where([data-theme="dark"] *) { color: var(--color-negative,#ea5965); }
.fund-category-options:where([data-theme="dark"] *) { border: 1px solid var(--color-border,#3c3a39); background: var(--color-surface,#171717); }
.fund-category-options button:where([data-theme="dark"] *) { color: var(--color-text-secondary,#b1b1b1); }
.fund-category-options button:hover:where([data-theme="dark"] *) { background: var(--color-background,#212121); color: var(--color-text,#f9f9f9); }
.fund-category-options button:focus-visible:where([data-theme="dark"] *) { outline: 2px solid var(--color-text,#f9f9f9); }
.fund-bars .fund-bar-category:where([data-theme="dark"] *) { color: #aca9a6; }

/* ---- macro-monitor.css ---- */
.macro-latest span:where([data-theme="dark"] *),
.macro-latest small:where([data-theme="dark"] *) { color: #a8a8a8; }
.macro-controls label:where([data-theme="dark"] *) { color: #b8b8b8; }
.macro-controls select:where([data-theme="dark"] *) { background: #171717; color: #e3e6e9; border: 1px solid #353739; }
.macro-bar-row:where([data-theme="dark"] *) { border-bottom: 1px solid #232425; }
.macro-bar-track:where([data-theme="dark"] *) { background: linear-gradient(to right,transparent calc(50% - .5px),#4d5054 calc(50% - .5px),#4d5054 calc(50% + .5px),transparent calc(50% + .5px)); }
.macro-range [data-macro-status]:where([data-theme="dark"] *) { color: #a8a8a8; }
button.macro-bar-row:where([data-theme="dark"] *) { background: #171717; border-bottom: 1px solid #232425; }
button.macro-bar-row:hover:where([data-theme="dark"] *),
button.macro-bar-row[aria-pressed=true]:where([data-theme="dark"] *) { background: #202122; }
.macro-matrix caption:where([data-theme="dark"] *) { color: #a8a8a8; }
.macro-matrix td:where([data-theme="dark"] *) { color: #edeff1; }
.macro-matrix th:first-child:where([data-theme="dark"] *) { background: #171717; }
.macro-matrix button:where([data-theme="dark"] *) { color: #c9c9c9; }
.macro-matrix button[aria-pressed=true]:where([data-theme="dark"] *) { color: #f9f9f9; background: #202122; }

/* ---- mortgage.css ---- */
.mortgage-form:where([data-theme="dark"] *) { background: var(--color-surface,#171717); }
.mortgage-form .purchase-field input:where([data-theme="dark"] *),
.mortgage-form select:where([data-theme="dark"] *) { background: #171717; }
.mortgage-bank-facts:where([data-theme="dark"] *) { background: #1f1f1f; }
.mortgage-card:where([data-theme="dark"] *) { background: #171717; }
.mortgage-cost-detail:where([data-theme="dark"] *) { background: #1f1f1f; }
.mortgage-notice:where([data-theme="dark"] *) { background: #211c1c; }
.mortgage-unit-picker button:where([data-theme="dark"] *) { background: #171717; }
.mortgage-table-scroll thead:where([data-theme="dark"] *) { background: #171717; }
.mortgage-card>h2:where([data-theme="dark"] *),
.mortgage-card>.mortgage-chart-header:where([data-theme="dark"] *) { background: var(--surface-container-high); }
.mortgage-payment-row:where([data-theme="dark"] *) { background: #202020; }
.mortgage-inspector:where([data-theme="dark"] *) { background: #1f1f1f; }
.mortgage-bank-strip:where([data-theme="dark"] *) { background: #1f1f1f; }
.mortgage-page .mortgage-inspector:where([data-theme="dark"] *) { background: #171717; border: 1px solid #363636; }
.mortgage-page #mortgage-faq:where([data-theme="dark"] *) { background: #171717; }
.mortgage-faq-header:where([data-theme="dark"] *) { background: var(--surface-container-high); }
#mortgage-faq>.purchase-method summary:where([data-theme="dark"] *)::before { color: #8b8b8b; }
.mortgage-faq-toggle:where([data-theme="dark"] *) { border: 1px solid #363636; }
#mortgage-faq>.purchase-method[open]:where([data-theme="dark"] *) { background: #1c1c1c; }
@media(hover:hover) {
    #mortgage-faq>.purchase-method:not([open]) summary:hover:where([data-theme="dark"] *) { background: #1f1f1f; }
}
.mortgage-page .mortgage-cost-detail:where([data-theme="dark"] *) { background: #171717; }
.mortgage-field-tooltip:where([data-theme="dark"] *) { background: #171717; }
.mortgage-salary-history [data-tooltip]:where([data-theme="dark"] *) { background: #171717; }

/* ---- pesos-dollar.css ---- */
.equilibrium-workspace:where([data-theme="dark"] *) { background: #171717; }
#equilibrium-output:where([data-theme="dark"] *) { background: #171717; }
.equilibrium-directions span:where([data-theme="dark"] *) { color: #9db1bd; }
.carry-zero:where([data-theme="dark"] *) { stroke: #989898; }
.carry-equal-dot:where([data-theme="dark"] *),
.carry-hover-dot:where([data-theme="dark"] *) { stroke: #171717; }
.carry-readout:where([data-theme="dark"] *) { background: #1f2122; }
.carry-band-line:where([data-theme="dark"] *) { stroke: #666d71; }
.carry-curve svg .carry-band-label:where([data-theme="dark"] *) { stroke: #171717; }

/* ---- purchase-refresh.css ---- */
.purchase-comparison-page .purchase-field input:where([data-theme="dark"] *),
.purchase-comparison-page .purchase-field select:where([data-theme="dark"] *) { border-color: #474747; }
.purchase-comparison-page .purchase-summary:where([data-theme="dark"] *) { background: #171717; }
.purchase-comparison-page .purchase-option.is-selected:where([data-theme="dark"] *) { outline: 2px solid #e6e6e6; }
.purchase-comparison-page .purchase-invest-detail:where([data-theme="dark"] *) { background: #171717; }
.purchase-comparison-page .purchase-schedule:where([data-theme="dark"] *) { background: #171717; }
.purchase-comparison-page .purchase-floating-help:where([data-theme="dark"] *) { background: #171717; }
.purchase-faq:where([data-theme="dark"] *) { background: #171717; }
.purchase-faq summary:where([data-theme="dark"] *):before { color: #888888; }
.purchase-faq details[open]:where([data-theme="dark"] *) { background: #1c1c1c; }
.purchase-monthly-chart:where([data-theme="dark"] *) { background: #171717; }
.purchase-cashflow-chart [data-tooltip]:where([data-theme="dark"] *) { background: #171717; }
.purchase-comparison-page .purchase-monthly-chart>.purchase-schedule>summary:where([data-theme="dark"] *) { background: #171717; }

/* ---- purchase.css ---- */
.purchase-form:where([data-theme="dark"] *) { background: #171717; }
.purchase-field input:where([data-theme="dark"] *),
.purchase-field select:where([data-theme="dark"] *) { border: 1px solid #575757; background: #171717; }
.purchase-error:where([data-theme="dark"] *) { color: #e97079; }
.purchase-option:where([data-theme="dark"] *) { border: 1px solid #3b3031; background: #231d1d; }
.purchase-option>strong:where([data-theme="dark"] *) { color: #e8707b; }
.purchase-option-badge:where([data-theme="dark"] *) { color: #de878e; }
.purchase-option.is-best:where([data-theme="dark"] *) { background: #1f2521; }
.purchase-option.is-best>strong:where([data-theme="dark"] *),
.purchase-option.is-best .purchase-option-badge:where([data-theme="dark"] *) { color: #86f5af; }
.purchase-option.is-tie:where([data-theme="dark"] *) { background: #252318; }
.purchase-option.is-tie>strong:where([data-theme="dark"] *),
.purchase-option.is-tie .purchase-option-badge:where([data-theme="dark"] *) { color: #e2d498; }
.purchase-invest-detail:where([data-theme="dark"] *) { background: #1f1f1f; }
.purchase-invest-detail .purchase-contribution:where([data-theme="dark"] *),
.purchase-invest-detail .purchase-remainder:where([data-theme="dark"] *) { border-top: 1px solid #373737; }
.purchase-contribution strong:where([data-theme="dark"] *) { color: #e8707b; }
.purchase-remainder strong:where([data-theme="dark"] *) { color: #86f5af; }
.purchase-empty-options>div:where([data-theme="dark"] *) { background: #1c1c1c; }
.purchase-schedule td:where([data-theme="dark"] *),
.purchase-schedule th:where([data-theme="dark"] *) { border-bottom: 1px solid #272727; }
.purchase-schedule tr>:first-child:where([data-theme="dark"] *) { background: #171717; }
.purchase-schedule thead th:where([data-theme="dark"] *) { background: #1f1f1f; }
.purchase-schedule thead th:first-child:where([data-theme="dark"] *) { background: #1f1f1f; }
.purchase-schedule tbody tr:nth-child(even) td:where([data-theme="dark"] *),
.purchase-schedule tbody tr:nth-child(even) th:where([data-theme="dark"] *) { background: #1a1a1a; }
.purchase-month-dot:where([data-theme="dark"] *) { background: #252525; color: #989898; }
.purchase-schedule .schedule-gain:where([data-theme="dark"] *) { color: #86f5af; }
.purchase-schedule .schedule-balance:where([data-theme="dark"] *) { background: #1e1f1f; }
.purchase-schedule .needs-contribution td:where([data-theme="dark"] *),
.purchase-schedule .needs-contribution th:where([data-theme="dark"] *) { background: #201c1b!important; }
.purchase-schedule .needs-contribution .schedule-contribution:where([data-theme="dark"] *) { color: #e8707b; }
.purchase-schedule tfoot td:where([data-theme="dark"] *),
.purchase-schedule tfoot th:where([data-theme="dark"] *) { background: #222222!important; border-top: 2px solid #373737; }
.calculator-entry:hover:where([data-theme="dark"] *) { background: #1c1c1c; }
.calculator-symbol:where([data-theme="dark"] *) { background: #241d1d; }
.purchase-option:not(.is-selected):hover:where([data-theme="dark"] *) { border-color: #888888; }
.purchase-option:focus-visible:where([data-theme="dark"] *) { outline: 2px solid #b8b8b8; }
.purchase-selection:where([data-theme="dark"] *) { color: #f3f3f3; }
.purchase-cost-bridge:where([data-theme="dark"] *) { border-top: 1px solid #373737; }
.purchase-cost-total:where([data-theme="dark"] *) { border-top: 1px solid #474747; }
.purchase-option.is-selected:where([data-theme="dark"] *) { border-color: #e5e5e5; }

/* ---- rem-report.css ---- */
.rem-report select:where([data-theme="dark"] *),
.rem-report input:where([data-theme="dark"] *) { background: var(--color-surface,#171717); }
.report-plot [data-tooltip]:where([data-theme="dark"] *) { background: #1f1f20; }
.rem-report button:where([data-theme="dark"] *) { background: #171717; }
.report-series .report-band:where([data-theme="dark"] *) { border: 1px solid #5b6064; }
.report-data thead th:where([data-theme="dark"] *) { background: #202122; }
.report-data tbody tr:nth-child(even):where([data-theme="dark"] *) { background: #1e1f1f; }
.report-rankings .market-table thead th:where([data-theme="dark"] *) { background: #202122; }
.report-paired>.report-plot:where([data-theme="dark"] *) { background: var(--color-surface,#171717); }
.report-timeline:where([data-theme="dark"] *) { background: #1d1e1e; }
.rem-report [data-period-step]:where([data-theme="dark"] *) { background: #171717; }
.rem-report .report-timeline input[type=range]:where([data-theme="dark"] *) { background: #323436; }
.report-timeline input[type=range]:where([data-theme="dark"] *)::-webkit-slider-thumb { background: #171717; }
.report-timeline input[type=range]:where([data-theme="dark"] *)::-moz-range-thumb { background: #171717; }
.report-timeline-years span:where([data-theme="dark"] *):before { border-left: 1px solid #5b6064; }
.report-timeline input[type=range]:where([data-theme="dark"] *)::-moz-range-progress { background: #323436; }

/* ---- risk-monitor.css ---- */
.risk-selects select:where([data-theme="dark"] *) { background: var(--color-surface,#171717); }
.risk-bars li[data-selected=true]:where([data-theme="dark"] *) { background: var(--color-surface-alt,#2c2a25); }
.risk-president:where([data-theme="dark"] *) { background: color-mix(in srgb,var(--president-color) 12%,#171717); }
.risk-president-track:where([data-theme="dark"] *) { background: rgba(23, 23, 23, 0.667); }
.risk-comparison-table tr[data-selected=true]:where([data-theme="dark"] *) { background: var(--color-surface-alt,#2c2a25); }

/* ---- showcase.css ---- */
.showcase:where([data-theme="dark"] *) { color: #e6e6e6; }
.sc-back:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-back span:last-child:where([data-theme="dark"] *) { color: #e6e6e6; }
.sc-intro-bottom p:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-scroll:where([data-theme="dark"] *) { color: #e6e6e6; }
.sc-scroll > span:where([data-theme="dark"] *) { border: 1px solid #363636; }
.sc-intro-line:where([data-theme="dark"] *) { border-bottom: 1px solid #363636; color: #a9a9a9; }
.sc-intro-line i:where([data-theme="dark"] *) { background: #363636; }
.sc-guide h2 > span:where([data-theme="dark"] *) { color: #989898; }
.sc-orbit-ring:where([data-theme="dark"] *) { border: 1px solid #333333; }
.sc-orbit-label:where([data-theme="dark"] *) { background: #171717; }
.sc-chapters a:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-progress:where([data-theme="dark"] *) { background: #272727; }
.sc-scene:where([data-theme="dark"] *) { border-bottom: 1px solid #363636; }
.sc-category:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-scene > p:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-visual:where([data-theme="dark"] *) { border: 1px solid #343434; background: #1c1c1c; }
.sc-window-heading small:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-market-value > span:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-grid:where([data-theme="dark"] *) { stroke: #363636; }
.sc-curve-dark:where([data-theme="dark"] *) { stroke: #e6e6e6; }
.sc-asset-row:where([data-theme="dark"] *) { border-top: 1px solid #363636; }
.sc-asset-row b:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-link:where([data-theme="dark"] *) { color: #e6e6e6; border-bottom: 1px solid #686868; }
.sc-context-card:where([data-theme="dark"] *) { background: #171717; border: 1px solid #303030; }
.sc-context-card > span:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-context-bottom > span:where([data-theme="dark"] *) { border: 1px solid #363636; }
.sc-visual-note:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-week > span:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-event:where([data-theme="dark"] *) { border-top: 1px solid #363636; }
.sc-event small:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-event div > span:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-event-tag:where([data-theme="dark"] *) { color: #eb6d78; background: #241d1e; }
.sc-comparison > div > span:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-comparison small:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-comparison-bar:where([data-theme="dark"] *) { background: #272727; }
.sc-result:where([data-theme="dark"] *) { border-top: 1px solid #363636; }
.sc-result > span:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-result p:where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-flow:where([data-theme="dark"] *) { border-top: 1px solid #bdbdbd; }
.sc-cta p:not(.sc-kicker):where([data-theme="dark"] *) { color: #a9a9a9; }
.sc-back-top:where([data-theme="dark"] *) { color: #a9a9a9; }
@media (max-width: 900px) {
    .sc-guide:where([data-theme="dark"] *) { background: #171717; }
}

/* ---- platform-theme.css ---- */
body.platform-theme:where([data-theme="dark"] *) { background: #171717; }
.platform-theme .header-search-trigger:where([data-theme="dark"] *) { border-color: #a8a8a8; }
.platform-theme .header-search-trigger:hover:where([data-theme="dark"] *) { border-color: #171717; }
.platform-theme .header-search-trigger:focus-visible:where([data-theme="dark"] *) { outline: 2px solid #171717; }
.platform-theme .search-field:where([data-theme="dark"] *) { background: #171717; border-color: #494949; }
.platform-theme .search-shortcut:where([data-theme="dark"] *) { background: #1f1f1f; color: #a9a9a9; border-color: #363636; }
.platform-theme .global-search-dialog:where([data-theme="dark"] *),
.platform-theme .universal-search-panel:where([data-theme="dark"] *) { background: #171717; }
.platform-theme .site-footer:where([data-theme="dark"] *) { background: #171717; }
.platform-theme .edition-spark:where([data-theme="dark"] *) { color: #cfcfcf; }
.platform-theme .ec-page:where([data-theme="dark"] *) { --ec-warm: #1f1f1f; }
.platform-theme .fx-table thead th:where([data-theme="dark"] *),
.platform-theme .fx-table thead th:first-child:where([data-theme="dark"] *) { background: #1f1f1f; }
.platform-theme .fx-range-track:where([data-theme="dark"] *) { background: #262626; }
.platform-theme :is(.site-nav-dropdown,.site-nav-submenu) .site-nav-link:hover:where([data-theme="dark"] *) { background: #1f1f1f; }
.platform-theme :is(.market-table,.edition-table,.edition-futures-table,.futures-table,.risk-comparison-table,.purchase-table-scroll table,.fx-table:not(.fx-heatmap)) thead th:where([data-theme="dark"] *) { background: #171717; }

/* ---- chart-tooltips.css ---- */
.platform-theme :is( .dashboard-tooltip, .dashboard-floating-tooltip, .cashflow-chart-tooltip, .market-chart-tooltip, .fx-tooltip, .indicator-tooltip, .edition-spark-tooltip, .mortgage-inspector, .carry-readout, .purchase-cashflow-chart [data-tooltip], .mortgage-salary-history [data-tooltip] ):where([data-theme="dark"] *) { background: #171717; border: 1px solid #363636; }

/* ---- sidebar.css ---- */
.app-sidebar-toggle:hover:where([data-theme="dark"] *),
.app-sidebar-open:hover:where([data-theme="dark"] *) { background: #2b2c2d; }
.app-sidebar-link:hover:where([data-theme="dark"] *) { background: #262728; }
.app-sidebar-link.active:where([data-theme="dark"] *) { background: #171717; }
.platform-theme .site-header:where([data-theme="dark"] *) { background: #1f1f1f; }
.site-header-search .home-search-hero .home-search-field:where([data-theme="dark"] *) { border: 1px solid #525557; background: #171717; }
.site-header-search .home-search-field:where([data-theme="dark"] *)::placeholder { color: #a9a9a9; }
.site-header-search .search-shortcut:where([data-theme="dark"] *) { background: #171717; color: #a9a9a9; border-color: #363636; }

/* ---- Ajustes manuales ---- */
.app-sidebar-link.active:where([data-theme="dark"] *) { background: #2b2d2f; box-shadow: none; }
/* The mark's graphite ring would disappear on dark surfaces; invert it and keep the red hue. */
:is(.site-brand-mark, .app-sidebar-brand img, .footer-brand img):where([data-theme="dark"] *) { filter: invert(1) hue-rotate(180deg); }
/* Indicator sparklines: white line with a soft shading underneath. */
.indicator-sparkline path:where([data-theme="dark"] *) { stroke: var(--color-text); }
.indicator-sparkline .indicator-sparkline-area:where([data-theme="dark"] *) { display: inline; fill: var(--color-text); fill-opacity: .14; stroke: none; }
.indicator-ledger-chevron:where([data-theme="dark"] *) { stroke: var(--color-text-secondary); }
