/* Load after the AgentQuant theme. Apply only to the dark screen interface. */
@media screen {
  html.dark {
    --foreground: #f5f8fc;
    --card-foreground: #f5f8fc;
    --popover-foreground: #f5f8fc;
    --sidebar-foreground: #f5f8fc;
    --secondary-foreground: #d8e4f2;
    --muted-foreground: #c3d2e5;
  }

  html.dark table {
    color: var(--foreground);
    font-variant-numeric: tabular-nums;
  }

  html.dark thead,
  html.dark thead.text-muted-foreground,
  html.dark thead .text-muted-foreground,
  html.dark .fr-page thead th {
    color: #e3edf9;
  }

  html.dark :where(.text-slate-400, .text-slate-500,
    [class~="text-[#8b949e]"], [class~="text-[#6e7681]"], [class~="text-[#6b7280]"]) {
    color: var(--muted-foreground);
  }

  html.dark .text-market-up,
  html.dark [class~="text-[#f6465d]"] {
    color: #ffb6b2;
  }

  html.dark .text-market-down,
  html.dark [class~="text-[#2ebd85]"] {
    color: #a1edc9;
  }

  html.dark :is([class~="text-[8px]"], [class~="text-[9px]"],
    [class~="text-[10px]"], [class~="text-[11px]"]) {
    font-size: 12px;
  }

  html.dark .advisor-performance-board {
    --ap-muted: var(--muted-foreground);
  }

  html.dark .futures-board {
    --fm-text: var(--foreground);
    --fm-muted: var(--muted-foreground);
  }

  html.dark .futures-board :is(.fm-subtitle, .fm-exchange h2, .fm-exchange h2 small,
    .fm-code, .fm-source, .fm-chip, .fm-chip small, .fm-list-heading, .fm-advisor-portfolio,
    .fm-advisor-meta, .fm-advisor-name b, .fm-holding-grid, .fm-kv, .fm-section h3,
    .fm-note, .fm-chart figcaption, .fm-signal p, .fm-quote-select) {
    font-size: 12px;
  }

  html.dark :is(.fr-eyebrow, .fr-id, .fr-metrics small, .fr-section-title > span,
    .fr-page td small, .fr-note-footer, .fr-price span, .fr-fundamental legend,
    .fr-empty, .fr-indicator-title small, .fr-indicator-frame dt,
    .fr-entry-indicator dt, .fr-day-change small, .fr-factor-muted) {
    color: var(--muted-foreground);
  }

  html.dark .fr-page :is(th, td small, .fr-eyebrow, .fr-note-footer, .fr-metrics small,
    .fr-section-title > span, .fr-price span, .fr-chart-readout, .fr-indicator-title small,
    .fr-indicator-frame dt, .fr-indicator-frame dd small, .fr-day-change small,
    .fr-entry-indicator dt, .fr-entry-indicator h4 small, .fr-entry-indicator details,
    .fr-factor-points small, .fr-product-tile small, .fr-roster small) {
    font-size: 12px;
  }

  /* The research desk sets both help properties with !important in its own theme. */
  html.dark .fr-page .fr-help {
    color: var(--muted-foreground) !important;
    font-size: 12px !important;
  }

  html.dark svg text:is([fill="#94a3b8" i], [fill="#7f91af" i], [fill="#6b7280" i],
    [fill="#71809d" i], [fill="#64748b" i], [fill="#8b949e" i]) {
    fill: var(--muted-foreground);
  }

  html.dark .recharts-cartesian-axis-tick text:is([font-size="8"], [font-size="9"],
    [font-size="10"]) {
    font-size: 11px;
  }
}
