/*
 * Charting Mode — self-hosted typeface bundle (April 2026).
 *
 * The Charting Mode modal opens out of the dashboard-editorial Watchlist
 * toolbar. Its editorial typography is `Source Serif 4` (italic + roman)
 * for headlines/kickers; the body falls back to the global system stack
 * already loaded by the dashboard.
 *
 * We ship four woff2 files (Regular + Italic, Latin + Latin-Ext) sourced
 * from Google Fonts so we never make a runtime request to fonts.gstatic
 * when the modal opens. Total payload: ~76 KB across all four files,
 * served only when the modal mounts (the <link rel=stylesheet> in _app
 * preloads the CSS shell which is ~2 KB; the woff2 files are then
 * lazy-fetched by the browser the first time a glyph is requested).
 *
 * font-display: swap so the system serif renders instantly while the
 * woff2 swaps in without blocking paint.
 *
 * SCOPING: every selector that wants Source Serif 4 must live under
 * `.charting-mode` (set on the modal root). This guarantees the rest of
 * the app cannot accidentally cascade into Source Serif 4 if a sibling
 * stylesheet lands later.
 */

/* ---------- Source Serif 4 — Regular ---------- */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/charting-mode/SourceSerif4-Regular.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/charting-mode/SourceSerif4-Regular-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Source Serif 4 — Italic ---------- */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/charting-mode/SourceSerif4-Italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/charting-mode/SourceSerif4-Italic-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Scoped scrollbar styling — only inside .charting-mode so it
 * cannot leak into the rest of the app. Mirrors the cot-luxe approach. */
.charting-mode ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.charting-mode ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}
.charting-mode ::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.18);
}
.charting-mode ::-webkit-scrollbar-track {
  background: transparent;
}

/* Focus ring — used by every interactive element inside the modal. */
.charting-mode :focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Pulsing dot used by the "next refresh" indicator. */
@keyframes chartingModeDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(1.35); }
}
