@import url('bloomberg.css');

/* ══════════════════════════════════════════════════════════════════════
   Page-specific layouts
   Design tokens, typography, and component classes live in bloomberg.css
   ══════════════════════════════════════════════════════════════════════ */

/* ── Layout ────────────────────────────────────────────────────────── */
main { flex: 1; max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; width: 100%; }

/* ── /rc/ landing — unified with /nw/ + /copula/ landings ─────────── */
main.rc-page { max-width: 1400px; padding: 1rem 1.5rem 3rem; }
main.rc-page .header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
main.rc-page .header-row h1 {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0;
}
main.rc-page .sub {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
}
main.rc-page .rc-info-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  margin-top: 0.8rem;
  margin-bottom: 1rem;
  background: rgba(255, 140, 0, 0.06);
  border-left: 2px solid var(--accent);
  font-size: 11px;
  color: var(--text-muted);
}
main.rc-page .rc-info-banner .rc-info-icon {
  color: var(--accent);
  font-size: 13px;
}
main.rc-page .header-row .faq-link {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── /rc/ landing card grid (parity with /nw/ + /copula/) ─────────── */
main.rc-page .rc-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
main.rc-page .rc-picker-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  background: var(--panel-bg, #0a0a0a);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font);
  transition: border-color .12s, background .12s;
}
main.rc-page .rc-picker-card:hover {
  border-color: var(--accent);
  background: #111;
}
main.rc-page .rc-picker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
main.rc-page .rc-picker-title {
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
}
main.rc-page .rc-picker-market {
  display: inline-block;
  font-size: 9px;
  letter-spacing: .08em;
  padding: 1px 5px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
  flex-shrink: 0;
}
main.rc-page .rc-picker-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: .02em;
}
main.rc-page .rc-picker-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
main.rc-page .rc-picker-meta .note-marker {
  color: var(--accent);
  margin-left: 1px;
}
main.rc-page .rc-picker-meta .rc-picker-empty {
  font-style: italic;
  opacity: .8;
}
main.rc-page .rc-badge {
  align-self: flex-start;
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 1px 6px;
  margin-top: auto;
  font-family: var(--font);
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
}
main.rc-page .rc-badge.ready {
  border-color: var(--positive, #00FF00);
  color: var(--positive, #00FF00);
}
main.rc-page .rc-badge.running {
  border-color: var(--accent);
  color: var(--accent);
}
main.rc-page .rc-badge.error {
  border-color: var(--negative, #FF4444);
  color: var(--negative, #FF4444);
}

/* ── Footer ── (see bloomberg.css for .site-footer base styles) ───── */

/* ── Card Grid ────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

/* ── Chip List ────────────────────────────────────────────────────── */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0;
  min-height: 2rem;
}

/* ── Custom Builder ───────────────────────────────────────────────── */
.builder {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.builder h2 { margin-bottom: 0.75rem; }

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-end;
}
.form-row .field { flex: 1; }
.form-row .field-sm { flex: 0 0 120px; }

.ticker-input-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.ticker-input-wrap input { flex: 1; }
.ticker-status {
  font-size: 12px;
  min-width: 24px;
  text-align: center;
}
.ticker-status.valid { color: var(--positive); }
.ticker-status.invalid { color: var(--negative); }
.ticker-status.loading { color: var(--text-muted); }
.ticker-status.busy { color: #d97706; }
.ticker-msg { font-size: 11px; color: var(--text-muted); margin: 4px 0 0 0; min-height: 14px; font-family: var(--font); }
.ticker-msg.busy { color: #d97706; }
.ticker-msg.error { color: var(--negative); }

.pair-preview {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font);
  margin: 0.5rem 0;
}
.pair-preview.at-cap { color: var(--negative); font-weight: 600; }

.builder-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.name-error {
  font-size: 11px;
  color: var(--negative);
  margin-top: 0.2rem;
}

/* ── Recent Changes ───────────────────────────────────────────────── */
.changes-section { margin-top: 2rem; }
.changes-section h2 { margin-bottom: 0.75rem; }
.change-item {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.change-item:last-child { border-bottom: none; }
.change-added { color: var(--positive); }
.change-removed { color: var(--negative); }
.change-date { color: var(--text-muted); font-size: 11px; margin-right: 0.5rem; }
.changes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.changes-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 0.75rem;
}
.changes-card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.4rem;
}
.changes-card-title a { color: var(--accent); }

/* ── Report Page ──────────────────────────────────────────────────── */
.report-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.report-header .kicker {
  display: inline-block;
  color: var(--warn);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.report-header h1 { font-size: 16px; }
.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font);
  margin-top: 0.5rem;
}
.report-meta span { white-space: nowrap; }
.report-meta code {
  color: var(--accent);
  background: var(--card-bg);
  padding: 0.1rem 0.4rem;
  font-size: 11px;
}

.prune-notice {
  font-size: 11px;
  color: var(--warn);
  margin-top: 0.3rem;
}

.report-warnings { margin-top: 0.3rem; }
.report-warning-item { font-size: 11px; color: var(--warn); }

.stale-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.4rem 0.7rem;
  font-size: 12px;
  color: var(--warn);
  background: rgba(255, 140, 0, 0.08);
  border-left: 3px solid var(--warn);
}
.stale-banner .stale-icon { font-size: 14px; line-height: 1; }

/* ── Chart Sections ───────────────────────────────────────────────── */
main { counter-reset: report-section; }
.section {
  margin-bottom: 2rem;
  counter-increment: report-section;
  scroll-margin-top: 80px;
}

/* ── Section navigator (sticky tab bar) ───────────────────────────── */
/* Mirrors /copula/ tab UX so the report feels like multi-page navigation
   without hiding sections from Plotly. Sits below the report header and
   sticks under the global navbar. */
.report-tab-bar {
  position: sticky;
  top: 48px;  /* sits beneath the global navbar */
  z-index: 40;
  display: flex;
  gap: 0;
  background: var(--bg, #000);
  border-bottom: 1px solid var(--border);
  margin: 0 0 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.report-tab-bar::-webkit-scrollbar { display: none; }
.report-tab-btn {
  flex: 0 0 auto;
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font, 'Courier New', monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.report-tab-btn:hover { color: var(--text); }
.report-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
@media (max-width: 700px) {
  .report-tab-bar { top: 44px; }
  .report-tab-btn { font-size: 10px; padding: 8px 12px; }
}

/* Real-tab panels: only the .active panel is visible. Matches /copula/ UX.
   Plotly charts render lazily on first tab click, so hidden panels never
   host 0-dimension canvases. */
.rc-tab-panel { display: none; }
.rc-tab-panel.active { display: block; }

/* ── Methodology tab ─────────────────────────────────────────────── */
.rc-methodology {
  max-width: 760px;
  margin: 0.5rem auto 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}
.rc-methodology-lede {
  margin: 0 0 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text);
}
.rc-methodology-section { margin: 1rem 0; }
.rc-methodology-section h3 {
  margin: 0 0 0.45rem;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}
.rc-methodology-section p {
  margin: 0 0 0.5rem;
  color: var(--text);
}
.rc-methodology-tabs, .rc-methodology-limits {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}
.rc-methodology-tabs li, .rc-methodology-limits li {
  margin: 0.3rem 0;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .rc-methodology { padding: 0.9rem 1rem; font-size: 12.5px; }
  .rc-methodology-section h3 { font-size: 11px; }
}

/* ── Methodology — Symbols + Formulas (shared by /rc/ and /copula/) ── */
.method-symbol-grid {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}
.method-symbol-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.4rem 0.7rem;
  background: var(--card-bg);
  border-left: 2px solid var(--border);
  border-radius: 0;
}
.method-symbol-row dt.method-symbol-tex {
  margin: 0;
  color: var(--accent);
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}
.method-symbol-row dt.method-symbol-tex .katex { font-size: 1.05em; }
.method-symbol-row dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.55;
}
.method-formula-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-top: 0.4rem;
}
.method-formula-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 0;
  padding: 0.7rem 0.9rem 0.8rem;
}
.method-formula-name {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.method-formula-tex {
  margin: 0.25rem 0 0.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--text);
}
.method-formula-tail {
  margin: 0.35rem 0;
  padding: 0.35rem 0.55rem;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 13px;
  overflow-x: auto;
}
.method-formula-plain {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.55;
  font-style: italic;
}
.copula-method-section {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border);
}
.copula-method-h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
.copula-method-formulas-intro {
  margin: 0 0 0.7rem;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.55;
}
@media (max-width: 600px) {
  .method-symbol-row { grid-template-columns: 60px 1fr; gap: 0.6rem; padding: 0.35rem 0.55rem; }
  .method-symbol-row dt.method-symbol-tex { font-size: 12px; }
  .method-symbol-row dd, .method-formula-plain, .copula-method-formulas-intro { font-size: 12px; }
  .method-formula-card { padding: 0.55rem 0.7rem; }
}

/* ── Overlay Filter Bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}
.filter-bar input, .filter-bar select {
  width: auto;
  min-width: 150px;
}
.filter-bar .count { color: var(--text-muted); font-size: 12px; margin-left: auto; }
kbd {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 3px;
  color: var(--accent);
  font-family: var(--font);
  font-size: 11px;
  padding: 0.1rem 0.35rem;
  margin: 0 0.1rem;
}

/* ── Cohesion Readout ─────────────────────────────────────────────── */
.cr-strip {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
  padding: 0.6rem 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0;
  align-items: center;
}
.cr-strip .cr-title {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 0.5rem;
}
.cr-cell { text-align: center; }
.cr-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cr-value { font-size: 14px; font-family: var(--font); font-weight: 600; }
.cohesion-caption { color: var(--text-muted); font-size: 11px; margin-top: 0.4rem; line-height: 1.5; }

/* ── Empty State ─────────────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  padding: 2rem 1.5rem;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  text-align: center;
  color: var(--text-muted);
}
.empty-state .es-icon { font-size: 1.2rem; margin-bottom: 0.4rem; display: block; }
.empty-state .es-title { font-size: 12px; font-weight: 500; margin-bottom: 0.3rem; }
.empty-state .es-hint { font-size: 11px; color: var(--text-muted); }

/* ── Shortcut Row ────────────────────────────────────────────────── */
.shortcut-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.shortcut-row .sc-item { display: flex; align-items: center; gap: 0.3rem; }

/* ── Pair Grid ────────────────────────────────────────────────────── */
.pair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
  gap: 0.75rem;
}

/* ── Stats Wrap ───────────────────────────────────────────────────── */
.stats-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  transition: box-shadow 0.25s;
}
/* Right-edge fade hint when content overflows */
.stats-wrap.scroll-right {
  box-shadow: inset -20px 0 12px -12px rgba(0, 0, 0, 0.7);
}

/* ── Loading Screen ───────────────────────────────────────────────── */
.loading-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}
.loading-card {
  text-align: center;
  max-width: 400px;
}
.loading-card h2 { margin-bottom: 0.75rem; }

.progress-ring-wrapper {
  position: relative;
  display: inline-block;
  margin: 1.5rem 0;
}
.progress-ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}
.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s var(--ease);
}
.progress-pct {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-family: var(--font);
  font-weight: 600;
}
.status-text {
  color: var(--text-muted);
  font-size: 13px;
}
.error-state { margin-top: 1rem; }
.error-msg { color: var(--negative); margin-bottom: 0.75rem; }

/* ── Admin ────────────────────────────────────────────────────────── */
.admin-login {
  max-width: 340px;
  margin: 0 auto;
  text-align: center;
  min-height: calc(100vh - 44px - 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.admin-login form {
  width: 100%;
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
}
.admin-login input { margin: 0.5rem 0; width: 100%; }
.admin-login .admin-lock {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.admin-login .admin-lock::before {
  content: '▸ ';
  color: var(--accent);
  opacity: 0.6;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.admin-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1rem;
}
.admin-section h3 { margin-bottom: 0.75rem; color: var(--accent); }

/* ── Surface Section ──────────────────────────────────────────────── */
.surface-wrap { position: relative; }
.surface-date-overlay {
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: bold;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.8);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  pointer-events: none;
  letter-spacing: 0.04em;
  z-index: 10;
}
.surface-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.surface-controls button {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font);
}
.surface-controls button:hover { border-color: var(--accent); }
.surface-controls input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}
.surface-date {
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-muted);
  min-width: 90px;
}

/* ── Eye Toggle Button (section show/hide) ───────────────────────── */
.toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  margin-left: auto;
}
.toggle-btn .icon-closed { display: none; }
.section.collapsed .toggle-btn .icon-open { display: none; }
.section.collapsed .toggle-btn .icon-closed { display: inline; }
.section-header:hover .toggle-btn { color: var(--accent); }
.section-header {
  justify-content: space-between;
}

/* ── Sector Quick-Filter Buttons ─────────────────────────────────── */
.sector-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
  font-size: 11px;
}
.sector-row .sr-label {
  color: var(--text-muted);
  margin-right: 0.4rem;
}
.sec-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--accent);
  font-family: var(--font);
  font-size: 11px;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.12s ease;
  outline: none;
}
.sec-btn:hover { border-color: var(--accent); color: var(--text); }
.sec-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.sec-btn .sec-btn-name { color: var(--text-muted); font-size: 10px; }
.sec-btn:hover .sec-btn-name { color: var(--text); }
.sec-btn.active .sec-btn-name { color: var(--bg); }
.sec-btn-all { color: var(--text-muted); }
.sec-btn-all.active { background: var(--border); color: var(--text); border-color: var(--border); }

/* ── Insights Card (Market Summary) ──────────────────────────────── */
.insights-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.2rem;
  margin: 1rem 0;
}
.insights-title {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}
.insight-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.insight-icon {
  font-size: 14px;
  width: 1.2rem;
  text-align: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.insight-row.increase .insight-icon { color: var(--positive); }
.insight-row.decrease .insight-icon { color: var(--negative); }
.insight-row.trend .insight-icon { color: var(--warn); }
.insight-label {
  color: var(--text-muted);
  font-size: 11px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.insight-text { font-size: 12px; }

/* ── Jump Analysis ───────────────────────────────────────────────── */
.jump-intro {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 0.6rem;
  line-height: 1.5;
}
.jump-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.3rem 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.jump-row:last-of-type { border-bottom: none; }
.jump-date { color: var(--text-muted); min-width: 80px; }
.jump-pair { flex: 1; }
.jump-up { color: var(--positive); }
.jump-down { color: var(--negative); }
.jump-note {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 0.6rem;
  line-height: 1.5;
  font-style: italic;
}

/* ── Info items (factors behind correlation changes) ─────────────── */
.info-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.info-item:last-child { border-bottom: none; }
.info-icon {
  font-size: 16px;
  line-height: 1.4;
  flex-shrink: 0;
}
.info-item-title {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.03em;
}
.info-item-desc {
  display: block;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Expand Button Row ───────────────────────────────────────────── */
.expand-row {
  display: flex;
  justify-content: center;
  margin: 1rem 0 0.4rem;
}
.expand-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--accent);
  font-family: var(--font);
  font-size: 12px;
  padding: 0.45rem 1.2rem;
  cursor: pointer;
  transition: all 0.12s ease;
  letter-spacing: 0.02em;
}
.expand-btn:hover { border-color: var(--accent); color: var(--text); }
.expand-btn .caret {
  display: inline-block;
  margin-left: 0.4rem;
  transition: transform 0.15s ease;
}

/* ── Pair card collapse/expand ────────────────────────────────────── */
.chart-card-collapsed .chart-card-title {
  border-bottom: none;
}
.card-caret {
  display: inline-block;
  font-size: 9px;
  color: var(--text-muted);
  margin-right: 0.25rem;
  transition: transform 0.15s ease;
}

/* ── Event legend (macro event markers) ───────────────────────────── */
.event-legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  font-size: 11px;
  font-family: var(--font);
  color: var(--text-muted);
}
.event-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.15rem;
}
.event-cat-label {
  margin-right: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Loading indicator ────────────────────────────────────────────── */
.loading-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1s ease-in-out infinite;
  vertical-align: middle;
  margin-right: 0.3rem;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .card-grid { grid-template-columns: 1fr; }
  .pair-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .form-row .field-sm { flex: 1; }
  .admin-grid { grid-template-columns: 1fr; }
  .report-meta { gap: 0.75rem; }
  .filter-bar select { min-width: 100px; }
}

/* Hide Plotly modebar toolbar on all charts */
.modebar { display: none !important; }
