/* Appearance controls in both palettes */
#gfThemeToggle svg { width: 19px; height: 19px; display: block; }
#gfThemeToggle [data-theme-icon="light"], html[data-gf-theme=light] #gfThemeToggle [data-theme-icon="dark"] { display: none; }
html[data-gf-theme=light] #gfThemeToggle [data-theme-icon="light"] { display: block; }
#gfThemeChoices { display: inline-flex; gap: 3px; padding: 3px; margin-inline-start: auto; }
#gfThemeChoices button { min-height: 36px; padding-inline: 10px; line-height: 1.12; }
.gf-cobalt .gf-theme-preference { gap: 10px; flex-wrap: wrap; }
@media (max-width: 400px) {
  .gf-cobalt .hero-head .head-actions { gap: 5px; }
  .gf-cobalt .hero-head .head-actions #health { padding-inline: 0; }
  .gf-cobalt .hero-head .head-actions #health span { display: none; }
  .gf-cobalt .hero-head .head-actions #gfThemeToggle { width: 38px; height: 38px; }
}

/* Light palette */
html[data-gf-theme=light] { background: #f2f5fa; color-scheme: light; }
html[data-gf-theme=light] body.gf-cobalt {
  --bg: #f2f5fa;
  --panel: #fff;
  --panel2: #f6f8fc;
  --line: #d7e0ed;
  --ink: #15243d;
  --text: var(--ink);
  --muted: #475b76;
  --blue: #2348a5;
  --up: #08735a;
  --down: #b2274b;
  --theme-border-strong: #bac9df;
  --theme-wash: #e8effc;
  --theme-primary: #2449b3;
  --theme-gold: #805317;
  background: var(--bg)!important;
  color: var(--ink);
  color-scheme: light;
  accent-color: var(--theme-primary);
}

[data-gf-theme=light] .gf-cobalt :is(.hero-head .brand-line b, .sig-level b, .gc-news-clean h3, .gf-feature h1, #homeLead h1, #homeLead h2,
  .asset-row, .market-row, .gf-market-title, .market-identity strong, .market-quote strong, .news-evidence-link, #chartLastPrice,
  .gf-stat strong, .gf-number, .watch-price, .parent-chip b, .gf-side-caption strong, .gf-rvol strong, .gf-ice-amount strong) { color: var(--ink); }
[data-gf-theme=light] .gf-cobalt :is(.hero-head .brand-line strong, #health, .page-title p, .section-top p, #homeLead .lead-meta,
  .section-note, .market-note, .market-method, .market-table-head, .market-turnover, .market-controls, .sig-main small, .sig-level,
  .gf-signal-details>summary, .research-notice, .news-status, .news-summary, .gc-news-clean p, .news-disclaimer, .news-meta,
  .gf-feature-meta, .gf-empty-text, .gf-instrument, .gf-plot, .gf-note, .gf-detail-evidence p, .gf-section-label, .gf-card-footer,
  .gf-stat>span, .gf-stat>small, .gf-hero p, .gf-rvol>span, .gf-sources, .gf-source-row, .gf-count, .gf-side-help, .watch-footer, .gf-screener-meta,
  .chart-hint, #chartReadout.gf-inspect, #gfArchive small, .profile-card span, .dm-status, .gf-release-info, .membership-note,
  .asset-news-toolbar p, .instrument-news .section-kicker, .gf-side-selection, .gf-screener-state, #gfFilterSummary) { color: var(--muted); }
[data-gf-theme=light] .gf-cobalt :is(.link-btn, .news-link, .signal-open, .gf-link, .news-label, .section-kicker, .gf-release-info a,
  .history-more, .gf-first-steps .gf-first-dismiss, #homeLead .lead-kicker, #homeLead .lead-action, .search-icon, .search-clear) { color: var(--blue); }
[data-gf-theme=light] .gf-cobalt :is(.flat, .gf-screener-quote .flat) { color: var(--muted)!important; }
[data-gf-theme=light] .gf-cobalt :is(.gf-positive, .gf-side-bid .gf-ice-amount) { color: var(--up)!important; }
[data-gf-theme=light] .gf-cobalt :is(.gf-negative, .gf-side-ask .gf-ice-amount) { color: var(--down)!important; }

[data-gf-theme=light] .gf-cobalt .gf-feature {
  background: radial-gradient(ellipse at 100% 0%, #dce8fb 0, transparent 57%), linear-gradient(155deg, #fff 47%, #ebf2fc);
  border-color: var(--line);
  box-shadow: 0 12px 32px rgba(33, 58, 100, .07);
}
[data-gf-theme=light] body.gf-cobalt .gf-feature::before { opacity: .33; }
[data-gf-theme=light] .gf-cobalt .gf-feature-tag { color: var(--blue); }
[data-gf-theme=light] .gf-cobalt .gf-feature-tag::before { background: #b07931; }
[data-gf-theme=light] .gf-cobalt #homeLead { border-left-color: #7897e2!important; }
[data-gf-theme=light] .gf-cobalt :is(.market-pulse, .signal-card, .rules-card, .profile-card, .settings-card, .membership-card,
  .favorite-card, .gf-card, .gf-settings, .asset-profile, .trade-plan, .checks-card, .context-card, .home-context-card, .news-card,
  .chart-card, .gf-first-steps, .gf-screener-card, .gf-hero, .gf-empty, .instrument-news, .profile-language, .gf-advanced,
  #gfFilterSheet, .drawing-text-dialog, .watch-card) {
  color: var(--ink);
  background: var(--panel)!important;
  border-color: var(--line)!important;
  box-shadow: 0 3px 12px rgba(33, 58, 100, .035)!important;
}
[data-gf-theme=light] .gf-cobalt :is(.sector-card, .gf-settings-group, .notification-options, .settings-group, .gf-card-stats .gf-stat,
  .gf-hero-ice, .gf-rail, .gf-sheet, .gf-detail-evidence, .gf-screener-state, .gf-empty-icon, .gf-zone, .gf-source-row,
  .gf-side-panel, .gf-member-plan, .gf-member-consent, .gf-member-trial, .gf-sources, .gf-field, .news-details,
  .news-correction, .news-meaning, .explanation-block, .parent-context, .asset-profile-origin, .gf-compare, .gf-first-steps p) {
  color: var(--muted);
  background: var(--panel2);
  border-color: var(--line);
}
[data-gf-theme=light] .gf-cobalt :is(.asset-row, .market-row, .news-card, .gc-news-clean, .research-notice, .instrument-news,
  .gf-card-footer, .market-table-head, .watch-footer, .gf-detail-evidence, .gf-screener-meta, .gf-side-caption) { border-color: var(--line)!important; }
[data-gf-theme=light] .gf-cobalt :is(.news-empty, .no-data, .news-empty-icon) { color: var(--muted); background: var(--panel2); border-color: var(--line); }
[data-gf-theme=light] .gf-cobalt :is(.global-search, .search-results, .profile-avatar, .coin-monogram, .coin-image-wrap) {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}
[data-gf-theme=light] .gf-cobalt :is(input:not([type=checkbox],[type=radio],[type=range]), select, .gf-search, .gf-field input,
  #gfFilterBody select, .gf-market-sort-combined, .okx-basis-picker, .gf-side-select) {
  color: var(--ink);
  background-color: var(--panel);
  border-color: var(--theme-border-strong);
  box-shadow: none;
}
[data-gf-theme=light] .gf-cobalt :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
[data-gf-theme=light] .gf-cobalt :is(button, a, input, select, summary):focus-visible { outline-color: var(--theme-primary); }
[data-gf-theme=light] .gf-cobalt :is(#gfFilterSheet, .drawing-text-dialog)::backdrop { background: rgba(22, 35, 60, .43); }
[data-gf-theme=light] .gf-cobalt :is(.flow-tabs, .gf-screener-mode, .gf-screener-toolbar, .chart-tfs, .gf-fav-tabs, .language-switch,
  #gfFilterBody .okx-basis-picker, #gfFilterBody .gf-market-sort-combined, .gf-presets) {
  background: #edf2f9;
  color: var(--muted);
  border-color: var(--line);
  box-shadow: none;
}
[data-gf-theme=light] .gf-cobalt :is(.filter-chip, .filter, .flow-tabs button, .gf-screener-mode button, .gf-screener-toolbar button,
  .chart-tfs button, .gf-fav-tabs button, .language-switch button, .gf-side-select button) { color: var(--muted); }
[data-gf-theme=light] .gf-cobalt :is(.head-actions button, .gf-filter-launch, .gf-retry, .gf-chart-actions button,
  .chart-tools button, .back-btn, .star-btn, .gf-button, .gf-secondary, .gf-chip, .gf-member-secondary,
  .market-sort-group button, .gf-icon-button, .gf-preset, .secondary-btn, .gf-first-steps button,
  .fullscreen-exit, .formation-geometry-panel button, .chart-fullscreen-tfs button, .drawing-toolbar button, .drawing-text-dialog button,
  .event-level-chip, .chart-history-notice button, .news-toggle-icon) {
  color: var(--blue);
  background: var(--panel);
  border-color: var(--theme-border-strong);
  box-shadow: none;
}
[data-gf-theme=light] .gf-cobalt .head-actions #gfSearch { color: transparent; }
[data-gf-theme=light] .gf-cobalt #gfSearch::before { border-color: var(--blue); }
[data-gf-theme=light] .gf-cobalt #gfSearch::after { background: var(--blue); }
[data-gf-theme=light] .gf-cobalt :is(.filter-chip.on, .filter.on, .gf-chip.selected, .chart-tfs .on, .chart-fullscreen-tfs .on,
  .flow-tabs button[aria-pressed=true], .gf-screener-mode button[aria-pressed=true], .gf-screener-toolbar button[aria-pressed=true],
  .gf-fav-tabs button[aria-pressed=true], .language-switch button[aria-pressed=true], .gf-side-select button[aria-pressed=true],
  .gf-chart-actions button[aria-pressed=true], .gf-chart-actions button[aria-expanded=true], .drawing-toolbar button[aria-pressed=true]) {
  color: var(--blue)!important;
  background: var(--theme-wash)!important;
  border-color: #a8bee8!important;
}
[data-gf-theme=light] .gf-cobalt :is(.gf-feature .gf-cta, #gfDone, .primary, .gf-primary, .gf-member-primary, .lead-action.primary) {
  color: white;
  background: var(--theme-primary);
  border-color: var(--theme-primary);
  box-shadow: none;
}
[data-gf-theme=light] .gf-cobalt :is(.page-count, .market-type, .online-mini, .gf-tf, .gf-badge, .gf-badge-soft,
  .gf-eyebrow, .gf-membership-badge, .gf-active-label, .membership-badge, .parent-chip, .gf-screener-live,
  .gf-rvol, .gf-ice-amount, .trend-percentage, .status-badge, .live-pill, .gf-live) {
  color: var(--blue);
  background: var(--theme-wash);
  border-color: var(--line);
}
[data-gf-theme=light] .gf-cobalt :is(.direction-badge.long, .parent-chip.positive, .gf-ice-badge, .live-pill.live, .gf-live.is-live) {
  color: var(--up);
  background: #e5f5ee;
  border-color: #b4dfd0;
}
[data-gf-theme=light] .gf-cobalt :is(.direction-badge.short, .parent-chip.negative) {
  color: var(--down);
  background: #fce9ef;
  border-color: #eac2d0;
}
[data-gf-theme=light] .gf-cobalt :is(.gf-ice-label, .gf-venue-binance, .gf-venue-bybit, .importance, .news-urgent, #gfCoverage,
  .chart-event-notice, .chart-history-notice, .connection-notice, .drawing-notice, .gf-withdrawn, .gf-field-error) {
  color: var(--theme-gold);
  background: #fff3dd;
  border-color: #e5c897;
}
[data-gf-theme=light] .gf-cobalt :is(.gf-venue-okx, .direction-badge.neutral) {
  color: var(--ink);
  background: var(--panel2);
  border-color: var(--line);
}
[data-gf-theme=light] .gf-cobalt :is(.bottom-nav, #gf-subscription-gate) {
  background: rgba(249, 251, 255, .97)!important;
  border-color: var(--line);
  box-shadow: 0 -7px 24px rgba(35, 59, 100, .06);
}
[data-gf-theme=light] .gf-cobalt :is(.nav-btn, #gf-subscription-gate .gf-support) { color: var(--muted); }
[data-gf-theme=light] .gf-cobalt .nav-btn.active::before { background: var(--theme-primary); }
[data-gf-theme=light] .gf-cobalt .nav-btn.active { color: var(--blue); background: var(--theme-wash); }
[data-gf-theme=light] .gf-cobalt #gf-subscription-gate .gf-card { background: var(--panel)!important; border-color: var(--line)!important; }
[data-gf-theme=light] .gf-cobalt :is(.chart-stage, #chartStage, #chart, .flow-chart, .chart-canvas-frame, .drawing-toolbar) {
  background: var(--panel)!important;
  border-color: var(--line);
  color: var(--ink);
}
[data-gf-theme=light] .gf-cobalt :is(.chart-toolbar, .chart-fullscreen-tfs, #gfArchive, .chart-context-tools) {
  background: var(--panel2);
  border-color: var(--line);
  color: var(--ink);
}
[data-gf-theme=light] .gf-cobalt :is(.chart-live-row, #chartPairLabel, .chart-live-row small, .chart-symbol p, .chart-history-notice span) {
  color: var(--muted);
}
[data-gf-theme=light] .gf-cobalt :is(.gf-grid, .gf-screener-grid) { stroke: #d5e0ef; }
[data-gf-theme=light] .gf-cobalt :is(.gf-level, .gf-bracket) { stroke: #976921; }
[data-gf-theme=light] .gf-cobalt :is(.gf-scale, .gf-screener-svg text) { fill: #485e7e; }
[data-gf-theme=light] .gf-cobalt .gf-gold { fill: var(--theme-gold); }
[data-gf-theme=light] .gf-cobalt :is(.gf-plot, .gf-screener-svg, .watch-spark) :is([stroke="#62dfb8"], [stroke="#31d4ab"], [stroke="#2dd4b3"]) { stroke: #147b63; }
[data-gf-theme=light] .gf-cobalt :is(.gf-plot, .gf-screener-svg, .watch-spark) :is([stroke="#fa839f"], [stroke="#f27599"], [stroke="#f47b9d"]) { stroke: #b83254; }
[data-gf-theme=light] .gf-cobalt :is(.gf-plot, .gf-screener-svg) :is([fill="#62dfb8"], [fill="#31d4ab"]) { fill: #147b63; }
[data-gf-theme=light] .gf-cobalt :is(.gf-plot, .gf-screener-svg) :is([fill="#fa839f"], [fill="#f27599"]) { fill: #b83254; }
[data-gf-theme=light] .gf-cobalt :is(.geometry-trendline, .geometry-upper, .geometry-level) { --geometry-color: #245ca9; color: #245ca9; }
[data-gf-theme=light] .gf-cobalt .geometry-lower { --geometry-color: #713eb0; color: #713eb0; }
[data-gf-theme=light] .gf-cobalt .geometry-pole { --geometry-color: #94611e; color: #94611e; }
[data-gf-theme=light] .gf-cobalt .formation-geometry-panel { color: var(--muted); background: var(--panel2); border-color: var(--line); }

/* Supporting labels and financial direction */
html[data-gf-theme=light] { scrollbar-color: #adbed7 #f2f5fa; }
[data-gf-theme=light] .gf-cobalt .head-actions .icon-btn svg { color: var(--blue); }
[data-gf-theme=light] .gf-cobalt .head-actions [data-go="profile"] .gf-membership-badge { color: var(--up); }
[data-gf-theme=light] .gf-cobalt :is(.gf-inplay-status, .gf-inplay-empty, .gf-inplay-bottom time, .gf-card time,
  .okx-basis-info, .market-identity small, .market-count, #marketCount, .gf-screener-identity small,
  .sector-name, .sector-card small, .sector-breadth, .overview-footer, .pulse-period, .gf-membership p,
  .gf-membership small, .notification-options label, .settings-group small, .chart-event-notice small) { color: var(--muted); }
[data-gf-theme=light] .gf-cobalt :is(.research-notice a, .research-explainer summary, .research-explainer a,
  .gf-member-links a, .access-hint, .access-hint b, .sector-heading, .notification-options summary,
  .notification-options summary span, .news-evidence-link, .settings-card .link-btn) { color: var(--blue); }
[data-gf-theme=light] .gf-cobalt :is(.gf-inplay-side.long, .direction-badge.long, .gf-live.is-live) { color: var(--up); }
[data-gf-theme=light] .gf-cobalt :is(.gf-inplay-side.short, .direction-badge.short) { color: var(--down); }
[data-gf-theme=light] .gf-cobalt .gf-member-plan[aria-pressed="true"] { background: var(--theme-wash); border-color: #8ca7df; color: var(--blue); }
[data-gf-theme=light] .gf-cobalt :is(#billingProfile, #accessPanel).gf-membership { color: var(--ink); }
[data-gf-theme=light] .gf-cobalt .gf-membership .gf-member-feedback { color: var(--theme-gold); }
[data-gf-theme=light] .gf-cobalt .gf-detail-evidence { background: var(--panel); }
[data-gf-theme=light] .gf-cobalt .sector-card svg { color: var(--blue); }
[data-gf-theme=light] .gf-cobalt .sector-breadth .positive { color: var(--up); }
[data-gf-theme=light] .gf-cobalt .sector-breadth .negative { color: var(--down); }
[data-gf-theme=light] .gf-cobalt :is(.gf-membership h2, .gf-membership h3, .gf-market-title strong,
  .gf-detail-evidence h3, .gf-settings h3, .gf-empty h3) { color: var(--ink); }
[data-gf-theme=light] .gf-cobalt :is(.gf-market-title>span, .gf-side-caption, .gf-side-panel>p, .gf-side-panel>small,
  .gf-ice-amount>span, .gf-zone>span, .gf-screener-card footer small) { color: var(--muted); }
[data-gf-theme=light] .gf-cobalt .gf-side-bid { background: #edf7f3; border-color: #b4dfd0; border-left-color: var(--up); }
[data-gf-theme=light] .gf-cobalt .gf-side-ask { background: #fcf0f4; border-color: #eac2d0; border-left-color: var(--down); }
[data-gf-theme=light] .gf-cobalt .gf-side-bid>strong { color: var(--up); }
[data-gf-theme=light] .gf-cobalt .gf-side-ask>strong { color: var(--down); }
[data-gf-theme=light] .gf-cobalt :is(.gf-ice-label, .gf-ice-amount) { background: transparent; }
[data-gf-theme=light] .gf-cobalt .gf-card-stats { border-color: var(--line); }
[data-gf-theme=light] .gf-cobalt .gf-screener-card footer :is(button, .gf-screener-tf) {
  color: var(--blue);
  background: var(--theme-wash);
  border-color: var(--line);
}
[data-gf-theme=light] .gf-cobalt .news-card .news-label { color: var(--blue); background: var(--theme-wash); border-color: var(--line); }
