:root {
  color-scheme: light;
}

body.charts-page {
  --bg: #f4f8f2;
  --panel: #ffffff;
  --panel-2: #edf3ee;
  --line: #cfdcd2;
  --chart-bg: #ffffff;
  --chart-grid: rgba(120, 136, 153, 0.22);
  --text: #17212b;
  --muted: #64748b;
  --green: #4f9f79;
  --red: #c86d76;
  --amber: #c18b39;
  --blue: #3d7fb8;
  background: linear-gradient(180deg, #f8fbf6 0%, #eef6ed 100%);
  color: var(--text);
}

.charts-page .topbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #d9e4db;
  box-shadow: 0 8px 24px rgba(32, 48, 38, 0.08);
}

.charts-page .brand {
  color: #17212b;
  font-weight: 700;
}

.charts-page .attribution,
.charts-page .top-control,
.charts-page .account-control {
  color: #64748b;
}

.charts-page .account-control {
  min-width: 0;
  margin-left: auto;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
}

.charts-page .account-control > span {
  max-width: min(240px, 22vw);
  color: #40504a;
}

.charts-page .account-control button {
  width: auto;
  min-width: 104px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #17202a;
  border-radius: 8px;
  padding: 0 12px;
  background: #17202a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(23, 32, 42, 0.12);
}

.charts-page .account-control button:hover,
.charts-page .account-control button:focus-visible {
  border-color: #0f1720;
  background: #0f1720;
  color: #ffffff;
}

.charts-page .account-control button span {
  display: inline;
}

.charts-page .account-control button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.charts-page .nav-link,
.charts-page select,
.charts-page input,
.charts-page button {
  border-color: #cfdcd2;
  background: #f3f7f2;
  color: #17212b;
  font-weight: 500;
}

.charts-page .nav-link:hover,
.charts-page .nav-link.active,
.charts-page button:hover,
.charts-page button:focus-visible {
  border-color: rgba(61, 127, 184, 0.42);
  background: #e8f2ec;
  color: #255f92;
}

.charts-page .dashboard-shell,
.charts-page .chart-grid {
  background: #f4f8f2;
}

.charts-page .pane,
.charts-page .panel-section {
  border-color: #d6e2d8;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(48, 63, 51, 0.09);
}

.charts-page .pane.active-pane {
  border-color: rgba(61, 127, 184, 0.58);
  box-shadow: 0 0 0 1px rgba(61, 127, 184, 0.16), 0 18px 38px rgba(48, 63, 51, 0.12);
}

.charts-page .pane-toolbar,
.charts-page .panel-heading,
.charts-page .range-bar,
.charts-page .watchlist-form,
.charts-page .screener-toolbar,
.charts-page .screener-pressure-tape {
  border-color: #d9e4db;
  background: #f8fbf7;
}

.charts-page .chart-host {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 252, 249, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(120, 136, 153, 0.12) 36px 37px);
}

.charts-page .chart {
  background: #ffffff;
}

.charts-page .chart::after {
  border-top-color: rgba(23, 33, 43, 0.04);
  border-bottom-color: rgba(23, 33, 43, 0.08);
}

.charts-page .ticker {
  border-color: #d5e2d8;
  background: linear-gradient(135deg, rgba(220, 237, 227, 0.88), #ffffff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.charts-page .ticker.up {
  background: rgba(211, 238, 224, 0.88);
}

.charts-page .ticker.down {
  background: rgba(247, 221, 224, 0.9);
}

.charts-page .ticker-price,
.charts-page .ticker-symbol,
.charts-page .ticker-name,
.charts-page .ticker-bidask strong {
  color: #17212b;
}

.charts-page .indicator-menu,
.charts-page .indicator-group,
.charts-page .indicator-tooltip {
  border-color: #d6e2d8;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(48, 63, 51, 0.16);
  color: #17212b;
}

.charts-page .watchlist-row {
  border-bottom-color: #e0e8e1;
}

.charts-page .watchlist-row:hover,
.charts-page .watchlist-row.active,
.charts-page .news-item:hover {
  background: linear-gradient(90deg, rgba(206, 229, 216, 0.76), rgba(232, 242, 236, 0.42));
}

.charts-page .watchlist-remove {
  border-color: rgba(200, 109, 118, 0.28);
  background: #fbf4f4;
  color: #9f6169;
}

.charts-page .watchlist-remove:hover,
.charts-page .watchlist-remove:focus-visible {
  color: #8f3f4a;
  border-color: rgba(200, 109, 118, 0.58);
  background: #f5dcdf;
}

.charts-page .news-item,
.charts-page .fundamentals-profile {
  border-bottom-color: #e0e8e1;
  color: #17212b;
}

.charts-page .official-trades-note {
  border-bottom-color: #d9e4db;
  background: linear-gradient(180deg, #f8fbf7 0%, #eef6ef 100%);
  color: #17212b;
}

.charts-page .official-trades-note strong {
  color: #22313f;
  font-weight: 700;
}

.charts-page .official-trades-note span {
  color: #50637a;
}

.charts-page .official-trades-note a {
  color: #256fa8;
  font-weight: 600;
}

.charts-page .official-trades-note a:hover,
.charts-page .official-trades-note a:focus-visible {
  color: #174f7d;
}

.charts-page .official-trade-row {
  border-bottom-color: #e0e8e1;
  color: #17212b;
}

.charts-page .watchlist,
.charts-page .screener-content,
.charts-page .news-list,
.charts-page .fundamentals-content,
.charts-page .analyst-content,
.charts-page .sec-monitor-content,
.charts-page .ownership-content,
.charts-page .official-trades-content {
  background: #ffffff;
  color: #17212b;
}

.charts-page .sec-monitor-note,
.charts-page .fundamentals-profile {
  border-bottom-color: #d9e4db;
  background: linear-gradient(180deg, #f8fbf7 0%, #eef6ef 100%);
  color: #17212b;
}

.charts-page .sec-monitor-note strong,
.charts-page .fundamentals-profile strong,
.charts-page .events-heading,
.charts-page .event-row strong,
.charts-page .official-mini-row strong,
.charts-page .metric-cell strong,
.charts-page .analyst-summary strong,
.charts-page .ownership-row strong {
  color: #22313f;
}

.charts-page .sec-monitor-note span,
.charts-page .fundamentals-profile span,
.charts-page .event-row small,
.charts-page .official-mini-row small,
.charts-page .metric-cell span,
.charts-page .metric-cell small,
.charts-page .analyst-summary span,
.charts-page .ownership-row,
.charts-page .ownership-note {
  color: #64748b;
}

.charts-page .sec-monitor-note a,
.charts-page a.event-row,
.charts-page .screener-website-link {
  color: #256fa8;
}

.charts-page .sec-monitor-note a:hover,
.charts-page a.event-row:hover,
.charts-page .screener-website-link:hover {
  color: #174f7d;
}

.charts-page .metric-grid,
.charts-page .analyst-summary,
.charts-page .screener-facts-grid,
.charts-page .screener-pressure-detail-grid,
.charts-page .screener-pressure-calibration {
  background: #dfe9e2;
  border-color: #d6e2d8;
}

.charts-page .metric-cell,
.charts-page .analyst-summary > div,
.charts-page .screener-fact,
.charts-page .screener-pressure-calibration > div,
.charts-page .screener-key-fact {
  border-color: #d6e2d8;
  background: #ffffff;
  color: #17212b;
}

.charts-page .confidence-meter {
  background: #dfe9e2;
}

.charts-page .ownership-pie {
  border-color: rgba(61, 127, 184, 0.3);
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.88), 0 12px 24px rgba(48, 63, 51, 0.1);
}

.charts-page .official-mini-list,
.charts-page .official-mini-row,
.charts-page .events-list,
.charts-page .event-row,
.charts-page .analyst-target-grid {
  border-color: #e0e8e1;
}

.charts-page .event-row,
.charts-page .official-mini-row,
.charts-page .sec-alert-row {
  background: #ffffff;
  color: #17212b;
}

.charts-page .event-row:hover,
.charts-page a.event-row:hover,
.charts-page .official-trade-row:hover {
  background: #f0f7f2;
}

.charts-page .sec-alert-list {
  background: #ffffff;
}

.charts-page .sec-alert-row {
  border-color: #d7e4db;
  box-shadow: 0 6px 14px rgba(48, 63, 51, 0.06);
}

.charts-page .sec-alert-row span {
  color: #64748b;
}

.charts-page .sec-alert-row.high {
  border-left-color: #c86d76;
}

.charts-page .sec-alert-row.medium {
  border-left-color: #c18b39;
}

.charts-page .sec-alert-row.info {
  border-left-color: #3d7fb8;
}

.charts-page .data-pager {
  border-color: #d9e4db;
  background: #f8fbf7;
  color: #64748b;
}

.charts-page .data-pager strong {
  color: #22313f;
}

.charts-page .screener-toolbar,
.charts-page .screener-pressure-tape {
  border-color: #d9e4db;
  background: #f8fbf7;
  color: #17212b;
}

.charts-page .screener-toolbar input,
.charts-page .screener-toolbar select {
  background: #ffffff;
}

.charts-page .screener-pressure-status {
  border-color: #cfdcd2;
  background: #ffffff;
  color: #64748b;
}

.charts-page .screener-pressure-status.ok {
  border-color: rgba(79, 159, 121, 0.38);
  background: #eaf6ef;
  color: #367257;
}

.charts-page .screener-pressure-status.watch {
  border-color: rgba(193, 139, 57, 0.38);
  background: #fff6e5;
  color: #8b641f;
}

.charts-page .screener-pressure-status.warn {
  border-color: rgba(200, 109, 118, 0.4);
  background: #fbebed;
  color: #9f4854;
}

.charts-page .screener-pressure-metrics > div,
.charts-page .screener-pressure-sector,
.charts-page .screener-pressure-note,
.charts-page .screener-pressure-driver-list > div,
.charts-page .screener-pressure-sparkline {
  border-color: #d6e2d8;
  background: #ffffff;
  color: #17212b;
}

.charts-page .screener-pressure-head strong,
.charts-page .screener-pressure-metrics strong,
.charts-page .screener-pressure-sector strong,
.charts-page .screener-pressure-note strong,
.charts-page .screener-pressure-driver-list span,
.charts-page .screener-pressure-driver-list strong,
.charts-page .screener-facts-heading strong,
.charts-page .screener-fact strong,
.charts-page .screener-key-fact strong,
.charts-page .screener-fin-section h3,
.charts-page .screener-fin-section h4 {
  color: #22313f;
}

.charts-page .screener-pressure-head span,
.charts-page .screener-pressure-note span,
.charts-page .screener-pressure-metrics span,
.charts-page .screener-pressure-sector span,
.charts-page .screener-pressure-sector small,
.charts-page .screener-pressure-driver-list small,
.charts-page .screener-pressure-driver-list p,
.charts-page .screener-pressure-calibration small,
.charts-page .screener-pressure-calibration span,
.charts-page .screener-facts-heading small,
.charts-page .screener-fact span,
.charts-page .screener-key-fact span,
.charts-page .screener-fin-section p,
.charts-page .screener-health-note,
.charts-page .screener-fundamentals-loading {
  color: #64748b;
}

.charts-page .screener-pressure-metrics strong.up,
.charts-page .screener-pressure-sector strong.up,
.charts-page .screener-pressure-driver-list.positive strong,
.charts-page .screener-pressure-sparkline strong.up,
.charts-page .screener-table td.up,
.charts-page .screener-pressure-score.up,
.charts-page .screener-driver-cell.positive {
  color: #3d8f68;
}

.charts-page .screener-pressure-metrics strong.down,
.charts-page .screener-pressure-sector strong.down,
.charts-page .screener-pressure-driver-list.negative strong,
.charts-page .screener-pressure-sparkline strong.down,
.charts-page .screener-table td.down,
.charts-page .screener-pressure-score.down,
.charts-page .screener-driver-cell.negative {
  color: #b45863;
}

.charts-page .screener-pressure-warning {
  border-color: rgba(193, 139, 57, 0.32);
  background: #fff6e5;
  color: #8b641f;
}

.charts-page .screener-pressure-sparkline line {
  stroke: rgba(100, 116, 139, 0.22);
}

.charts-page .screener-facts-popover {
  border-color: #d6e2d8;
  background: #ffffff;
  box-shadow: 0 22px 52px rgba(48, 63, 51, 0.2);
  color: #17212b;
}

.charts-page .screener-facts-close {
  border-color: #cfdcd2;
  background: #f8fbf7;
  color: #64748b;
}

.charts-page .screener-table th,
.charts-page .screener-table td {
  border-bottom-color: #e0e8e1;
}

.charts-page .screener-table th {
  background: #f8fbf7;
  color: #64748b;
}

.charts-page .screener-table tbody tr,
.charts-page .screener-table .screener-symbol-cell {
  background: #ffffff;
  color: #17212b;
}

.charts-page .screener-table tbody tr:hover,
.charts-page .screener-table tbody tr:hover .screener-symbol-cell {
  background: #f0f7f2;
}

.charts-page .screener-alignment-cell,
.charts-page .screener-symbol-button,
.charts-page .screener-symbol-button strong {
  color: #17212b;
}

.charts-page .screener-symbol-button small {
  color: #64748b;
}

.charts-page .screener-logo-fallback {
  background: #dbe8df;
  color: #40504a;
}

.charts-page .empty-state,
.charts-page .news-meta,
.charts-page .watchlist-symbol span,
.charts-page .watchlist-change,
.charts-page .status,
.charts-page .date-range,
.charts-page .range-tab,
.charts-page .ticker-market,
.charts-page .ticker-bidask {
  color: #64748b;
}

.charts-page .market-footer {
  border-top-color: #d9e4db;
  background: rgba(255, 255, 255, 0.96);
}

.charts-page .market-ticker,
.charts-page .market-status {
  border-color: #d6e2d8;
  background: #f8fbf7;
}

.charts-page .market-ticker-item strong,
.charts-page .status-label {
  color: #17212b;
}

.charts-page .range-tab.active {
  color: #255f92;
  background: #e4f0e9;
}

.charts-page .extended-toggle:has(input:checked) {
  color: #255f92;
  border-color: rgba(61, 127, 184, 0.46);
  background: #e4f0e9;
}

.charts-page .event-flag {
  background: #fff6e5;
  color: #9a6b23;
}

.charts-page .event-flag.earnings {
  background: #e8f2fb;
  color: #255f92;
}

.charts-page .event-flag.dividend {
  background: #e7f4ec;
  color: #367257;
}

.charts-page .event-flag.split {
  background: #f0ebfb;
  color: #6b52a3;
}

.charts-page .event-flag.insider {
  background: #f8e3e6;
  color: #9f4854;
}

.charts-page .event-flag.corporate {
  background: #f1f5f9;
  color: #334155;
}

.charts-page .toast-container {
  top: auto;
  bottom: 18px;
  width: min(520px, calc(100vw - 32px));
}

.charts-page .toast {
  border-color: #d6e2d8;
  background: #ffffff;
  color: #17212b;
  box-shadow: 0 16px 36px rgba(48, 63, 51, 0.14);
}

.charts-page .bottom-error-log {
  right: 18px;
  bottom: 18px;
  width: min(760px, calc(100vw - 36px));
  max-height: min(30vh, 300px);
  border: 1px solid #e8c5c8;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  color: #17212b;
  box-shadow: 0 18px 48px rgba(48, 63, 51, 0.18);
}

.charts-page .bottom-error-log-heading {
  padding: 10px 12px;
  border-bottom: 1px solid #efd2d5;
  background: #fff6f6;
}

.charts-page .bottom-error-log-heading strong {
  color: #8f3f4a;
  font-size: 13px;
  font-weight: 700;
}

.charts-page .bottom-error-log-heading span {
  color: #64748b;
  font-size: 12px;
}

.charts-page .bottom-error-log-heading button {
  min-width: 66px;
  height: 30px;
  border-color: #d6e2d8;
  border-radius: 7px;
  background: #ffffff;
  color: #17212b;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(48, 63, 51, 0.08);
}

.charts-page .bottom-error-log-heading button:hover,
.charts-page .bottom-error-log-heading button:focus-visible {
  border-color: #c86d76;
  background: #fff0f1;
  color: #8f3f4a;
}

.charts-page .bottom-error-log-list {
  padding: 10px 12px;
  background: #ffffff;
}

.charts-page .bottom-error-log-item {
  padding: 10px 12px;
  border: 1px solid #efd2d5;
  border-radius: 8px;
  background: #fffafa;
}

.charts-page .bottom-error-log-item strong {
  color: #8f3f4a;
  font-size: 13px;
  font-weight: 700;
}

.charts-page .bottom-error-log-item span,
.charts-page .bottom-error-log-item p {
  color: #64748b;
  font-size: 12px;
}
