/* Caltropia shared primitives. Page compositions deliberately remain independent. */
:root {
  --ct-font-ui: "Roboto", Arial, sans-serif;
  --ct-font-display: "League Gothic", "Arial Narrow", sans-serif;
  --ct-bg: #ffffff;
  --ct-panel: #f4f6f8;
  --ct-ink: #192833;
  --ct-muted: #536574;
  --ct-line: #d6dfe5;
  --ct-blue: #47759a;
  --ct-slate: #718fa8;
  --ct-negative: #766c61;
  --ct-selected: #edf2f6;
  --ct-radius: 6px;
  --ct-table-size: 13px;
  --ct-control-size: 13px;
  --ct-chart-size: 12px;
}
:root[data-theme="dark"] {
  --ct-bg: #0a0e0f;
  --ct-panel: #11171b;
  --ct-ink: #edf1f7;
  --ct-muted: #c4cfd9;
  --ct-line: #29343e;
  --ct-blue: #b7d5fa;
  --ct-slate: #849eb8;
  --ct-negative: #eee3d4;
  --ct-selected: #121c25;
}
.ct-access-note, .ct-data-note {
  color: var(--ct-muted); font: 400 12px/1.6 var(--ct-font-ui);
}
.ct-access-note { margin: 16px 0; }
.ct-access-note a { color: var(--ct-blue); text-underline-offset: 3px; }
.ct-access-label { display: block; font: 400 11px/1.5 var(--ct-font-ui); opacity: .85; }
.ct-data-note { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 12px 0; border-bottom: 1px solid var(--ct-line); }
.ct-data-note strong { font-weight: 500; color: var(--ct-ink); }
.ct-data-note [data-freshness="older"] { color: var(--ct-negative); }
.ct-data-note [data-freshness="unavailable"] { font-style: italic; }
/* Preserve individual column widths, charts, state palettes and table renderers. */
body.ct-polished :is(table, .table-scroll, .table-container) {
  font-family: var(--ct-font-ui); font-variant-numeric: tabular-nums;
}
body.ct-polished table :is(th, td) { font-family: var(--ct-font-ui); }
body.ct-polished table th { font-size: 12px; font-weight: 500; }
body.ct-polished table td { font-size: var(--ct-table-size); }
body.ct-polished table th[tabindex="0"] { cursor: pointer; }
body.ct-polished :is(th, [role="columnheader"]):focus-visible { outline: 2px solid var(--ct-blue); outline-offset: -3px; }
body.ct-polished :is(.chart-tooltip, .tooltip, .chart-legend) { font-family: var(--ct-font-ui); font-size: var(--ct-chart-size); }
body.ct-polished :is(.range-btn, .timeframe-btn, .filter-chip) { font-family: var(--ct-font-ui); font-size: var(--ct-control-size); }
body.ct-polished :is(.table-scroll, .table-container, .sector-table-container) { overscroll-behavior-x: contain; }
@media (max-width: 600px) { .ct-data-note { gap: 4px 16px; } }
