:root {
  --bg: #0b0f1a;
  --bg-glow: #14203a;
  --panel: #111726;
  --panel-2: #141a2e;
  --border: #26304a;
  --row-border: #1e2740;
  --chip-bg: #1b2338;
  --hover-border: #3b4a6a;
  --text: #e6ebf5;
  --muted: #8b96b0;
  --on-accent: #0b0f1a;
  --up: #4ade80;
  --down: #f87171;
  --warn: #fbbf24;
  --accent: #60a5fa;
  --up-rgb: 74, 222, 128;
  --down-rgb: 248, 113, 113;
  --rich-rgb: 96, 165, 250;
  --cheap-rgb: 248, 113, 113;
  --gold: #c9a227;
  --gold2: #b8901f;
  --bbg: #ff6600;
  --cyan: #38bdf8;
  --violet: #a78bfa;
  --spark-up: #5aa9e6;
  --spark-down: #e6795a;
  --grid: var(--border);
  --axis: var(--muted);
  --tf-today: #e6ebf5;
  /* --fg was referenced 42× as var(--fg, #e5e7eb) but never defined → the near-white fallback
     rendered in BOTH themes, invisible on light. Alias it to the theme text color. */
  --fg: var(--text);
  --input-bg: rgba(255, 255, 255, 0.04);
  --panel-border: var(--border);
  --panel-shadow: none;
  --glow-pct: 35;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

:root[data-theme="contrast"] {
  --bg: #000000;
  --bg-glow: #05060c;
  --panel: #0a0a10;
  --panel-2: #15151f;
  --border: #4a4a60;
  --row-border: #2a2a38;
  --chip-bg: #1b1b28;
  --hover-border: #7a7a98;
  --text: #ffffff;
  --muted: #c4c4d6;
  --on-accent: #000000;
  --up: #00e676;
  --down: #ff5252;
  --warn: #ffb300;
  --accent: #ffd54f;
  --up-rgb: 0, 230, 118;
  --down-rgb: 255, 82, 82;
  --rich-rgb: 56, 189, 248;
  --cheap-rgb: 255, 82, 82;
  --gold: #ffd54f;
  --gold2: #ffd54f;
  --bbg: #ff8f1f;
  --cyan: #22d3ee;
  --violet: #c084fc;
  --spark-up: #38bdf8;
  --spark-down: #ff6b6b;
  --tf-today: #ffffff;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-glow: #e9eef8;
  --panel: #ffffff;
  --panel-2: #f1f3f8;
  --border: #d9dfea;
  --row-border: #edf0f5;
  --chip-bg: #eef1f7;
  --hover-border: #b7c1d4;
  --text: #1a2233;
  --muted: #5c6678;
  --on-accent: #ffffff;
  --up: #15a34a;
  --down: #dc2626;
  --warn: #d97706;
  --accent: #2563eb;
  --up-rgb: 21, 163, 74;
  --down-rgb: 220, 38, 38;
  --rich-rgb: 37, 99, 235;
  --cheap-rgb: 220, 38, 38;
  --gold: #b8860b;
  --gold2: #b8860b;
  --bbg: #ea6a00;
  --cyan: #0284c7;
  --violet: #7c3aed;
  --spark-up: #2563eb;
  --spark-down: #dc2626;
  --tf-today: #334155;
  --input-bg: #ffffff;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, var(--bg-glow) 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.app { max-width: 1800px; margin: 0 auto; padding: 20px 24px 40px; }

/* Header */
.app-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { line-height: 1; display: inline-flex; align-items: center; }
.logo-svg { height: 42px; width: auto; display: block; filter: drop-shadow(0 2px 7px rgba(40, 110, 230, 0.35)); }
.brandtext { display: flex; flex-direction: column; line-height: 1; }
.brandname { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: 0.3px; white-space: nowrap; }
.bn-lens { color: #5ab2f6; }
.brandtag { font-size: 8.5px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin-top: 4px; }
.app-header h1 { margin: 0; font-size: 22px; letter-spacing: 0.5px; }
.subnav {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: nowrap;
  border-bottom: 1px solid var(--border); margin-bottom: 10px;
}

/* live headline ticker (between the tabs and the content) */
.ticker {
  display: flex; align-items: center; gap: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  height: 30px; margin-bottom: 14px; box-shadow: var(--panel-shadow);
}
.ticker-label {
  flex: none; align-self: stretch; display: inline-flex; align-items: center; gap: 5px;
  padding: 0 10px; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--on-accent, #0b0b12);
  background: var(--down); position: relative;
}
.ticker-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: dr-pulse 1.1s ease-in-out infinite; }
.ticker-viewport { flex: 1; overflow: hidden; }
.ticker-track { display: inline-flex; white-space: nowrap; will-change: transform; animation: ticker-scroll 80s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 7px; padding: 0 20px; font-size: 12.5px;
  color: var(--text); text-decoration: none; border-right: 1px solid var(--row-border);
}
.ticker-item:hover { color: #a78bfa; }
.ticker-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ticker-tp { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* News tab */
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; justify-content: space-between; }
.news-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.news-source { background: var(--input-bg, rgba(255,255,255,0.04)); border: 1px solid var(--panel-border); border-radius: 6px; color: var(--text); padding: 5px 8px; font-size: 12px; font-family: inherit; max-width: 220px; }
.news-source:focus { outline: none; border-color: #fb7185; }
.news-chip {
  background: var(--chip-bg); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 12px; cursor: pointer;
}
.news-chip:hover { color: var(--text); }
.news-chip.active { background: #fb7185; color: #0b0b12; border-color: #fb7185; }
.news-chip b { margin-left: 5px; opacity: 0.75; font-weight: 700; }
.news-list { display: flex; flex-direction: column; }
.news-item { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 11px 8px; border-bottom: 1px solid var(--row-border); }
.news-item:hover { background: var(--panel-2); }
.news-when { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; padding-top: 2px; white-space: nowrap; }
.news-main { min-width: 0; }
.news-hl { font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; }
.news-hl:hover { color: #a78bfa; text-decoration: underline; }
.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 4px 0; font-size: 11px; color: var(--muted); }
.news-tag { display: inline-flex; align-items: center; gap: 5px; }
.news-snip { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.pill {
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--muted);
}
.mkt-status {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 12px; font-size: 12px; color: var(--muted);
}
.mkt-dot { width: 8px; height: 8px; border-radius: 50%; background: #7a8397; }
.mkt-status.open { color: var(--text); }
.mkt-status.open .mkt-dot { background: var(--up); box-shadow: 0 0 7px var(--up); }

/* slim freshness/provenance line at the top of a data tab (replaces big titles) */
.data-stamp { color: var(--muted); font-size: 11px; margin: 0 0 10px; font-variant-numeric: tabular-nums; }

/* data + auto-refresh chip, sits next to the market-status chip */
.data-refresh {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 12px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.data-refresh .dr-dot { width: 7px; height: 7px; border-radius: 50%; background: #7a8397; }
.data-refresh.live { color: var(--text); border-color: color-mix(in srgb, var(--up) 45%, var(--border)); }
.data-refresh.live .dr-dot { background: var(--up); box-shadow: 0 0 7px var(--up); animation: dr-pulse 1.1s ease-in-out infinite; }
@keyframes dr-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* KPI cards */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.indicator-card {
  text-align: left; color: inherit; font: inherit; cursor: pointer; width: 100%;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.indicator-card:hover { border-color: var(--hover-border); transform: translateY(-2px); }
.indicator-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px -12px var(--accent);
}
.card-head {
  display: flex; justify-content: space-between; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted);
}
.card-name { margin-top: 8px; font-size: 14px; color: var(--muted); }
.card-value { font-size: 28px; font-weight: 600; margin: 2px 0 12px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.badges { display: flex; flex-direction: column; gap: 4px; }
.badge {
  font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--chip-bg);
  color: var(--muted); white-space: nowrap;
}
.badge.up { color: var(--up); background: rgba(var(--up-rgb), 0.14); }
.badge.down { color: var(--down); background: rgba(var(--down-rgb), 0.14); }
.sparkline { display: block; }

/* Panels */
.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; margin-bottom: 22px;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 18px; }
.detail-sub { margin: 3px 0 0; font-size: 12px; }
.empty { grid-column: 1 / -1; color: var(--muted); padding: 28px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; }
.empty code, .error-box code { background: var(--chip-bg); padding: 1px 6px; border-radius: 5px; }
.app-footer a { color: var(--accent); text-decoration: none; }

/* ===== Task-force tabs ===== */
.tabs {
  display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 0; min-width: 0;
}
.tab {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap;
  padding: 7px 8px; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--tf-accent); }
.tab-dot { width: 8px; height: 8px; border-radius: 50%; opacity: 0.5; }
.tab.active .tab-dot { opacity: 1; }
.tab-count {
  font-size: 10.5px; color: var(--muted); background: var(--chip-bg);
  border-radius: 999px; padding: 0 6px;
}

/* ===== Task-force header ===== */
.tf-head { margin-bottom: 18px; }
.tf-head.compact { margin-bottom: 12px; }
.tf-head.compact h2 { font-size: 17px; margin: 0; }
.tf-head h2 { margin: 0 0 6px; font-size: 20px; }
.tf-head h2::before {
  content: ''; display: inline-block; width: 10px; height: 18px;
  background: var(--tf-accent); border-radius: 3px; margin-right: 10px; vertical-align: -3px;
}
.tf-mandate { margin: 0 0 10px; color: var(--muted); font-size: 14px; max-width: 90ch; line-height: 1.5; }
.tf-note {
  background: color-mix(in srgb, var(--tf-accent) 10%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--tf-accent) 35%, var(--border));
  border-left: 3px solid var(--tf-accent);
  border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.5; max-width: 100ch;
}
.tf-note strong { color: var(--tf-accent); }

/* ===== Card delta + accent overrides ===== */
.indicator-card.selected {
  border-color: var(--tf-accent, var(--accent));
  box-shadow: 0 0 0 1px var(--tf-accent, var(--accent)), 0 8px 24px -12px var(--tf-accent, var(--accent));
}
.delta { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.delta-lbl { color: var(--muted); font-size: 11px; }
.chip.active {
  background: var(--tf-accent, var(--accent)); border-color: var(--tf-accent, var(--accent)); color: var(--on-accent);
}
.detail-panel .panel-head h3 { margin: 0; font-size: 17px; }

/* ===== Chart target line ===== */
.chart-target { stroke: var(--gold2); stroke-width: 1; stroke-dasharray: 4 3; opacity: 0.8; }
.chart-target-lbl { fill: var(--gold2); font-size: 11px; }

/* ===== Release / surprise analysis ===== */
.surprise { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; }
.surprise-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.surprise-head h4 { margin: 0; font-size: 15px; }
.exp-source { color: var(--muted); font-size: 12px; }
.surprise-metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px;
}
.sm { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.sm-l { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.sm-v { display: block; font-size: 17px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.sm.hl { border-color: var(--tf-accent); box-shadow: inset 0 0 0 1px var(--tf-accent); }
.sm.hl .sm-v { color: var(--tf-accent); }
.surprise-narrative { color: var(--text); font-size: 14px; line-height: 1.6; margin: 0; max-width: 100ch; }
.bbg-badge {
  display: inline-block; background: var(--bbg); color: var(--on-accent); font-weight: 700;
  font-size: 10px; letter-spacing: 0.5px; padding: 1px 6px; border-radius: 4px; margin-right: 4px;
}
.mdl-tag { font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }

/* ===== Today's Data ===== */
.today-head { margin-bottom: 18px; }
.today-head h2 { margin: 0 0 4px; font-size: 22px; }
.today-date { color: var(--muted); font-weight: 400; font-size: 15px; margin-left: 8px; }
.today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .today-grid { grid-template-columns: 1fr; } }
.rel-list { display: flex; flex-direction: column; gap: 3px; }
.rel-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
  padding: 9px 10px; text-align: left; color: inherit; font: inherit; cursor: pointer;
}
.rel-row:hover { background: var(--panel-2); border-color: var(--border); }
.rel-row.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.rel-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.rel-when { width: 96px; flex-shrink: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rel-when b { color: var(--text); }
.rel-rel { display: block; font-size: 10px; opacity: 0.7; }
.rel-name { flex: 1; min-width: 0; font-size: 14px; }
.rel-cons, .rel-vals { text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.surprise-badge {
  flex-shrink: 0; min-width: 92px; text-align: right; font-size: 12px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px; background: var(--chip-bg); color: var(--muted);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.surprise-badge.up { color: var(--up); background: rgba(var(--up-rgb), 0.14); }
.surprise-badge.down { color: var(--down); background: rgba(var(--down-rgb), 0.14); }

/* Today event widgets (releases / speakers / treasury) */
.widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
@media (max-width: 900px) { .widgets { grid-template-columns: 1fr; } }
.widget { display: flex; flex-direction: column; }
.widget-count { font-size: 11px; color: var(--muted); background: var(--chip-bg); border-radius: 999px; padding: 1px 8px; }
.widget-head-right { display: flex; align-items: center; gap: 6px; }
.widget-day { font-size: 11px; color: var(--accent); background: rgba(96, 165, 250, 0.14); border-radius: 999px; padding: 1px 8px; }
.widget-body { display: flex; flex-direction: column; gap: 2px; min-height: 96px; }
.ev {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  padding: 7px 8px; text-align: left; color: inherit; font: inherit;
}
button.ev { cursor: pointer; }
button.ev:hover { background: var(--panel-2); border-color: var(--border); }
.ev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--muted); }
.ev-dot.auction { background: #4e79a7; }
.ev-dot.qra { background: var(--gold2); }
.ev-time { width: 44px; flex-shrink: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ev-title { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-meta { font-size: 11px; color: var(--muted); text-align: right; white-space: nowrap; }
.widget-empty { color: var(--muted); font-size: 13px; padding: 12px 6px; }
.widget-next { margin-top: 6px; font-size: 12px; }

/* ===== Rates dashboard (compact — fits one page) ===== */
.rates-head { margin-bottom: 12px; }
.rates-head h2 { font-size: 18px; }
.rates-head p { font-size: 12px; margin: 4px 0 0; }
.rate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.rate-grid-2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; margin-bottom: 12px; }
.rate-bottom { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; margin-bottom: 12px; align-items: start; }
.rate-bottom-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rate-bottom .fedpath-panel { margin-bottom: 0; position: sticky; top: 12px; }
@media (max-width: 1000px) { .rate-grid { grid-template-columns: repeat(2, 1fr); } .rate-grid-2, .rate-bottom { grid-template-columns: 1fr; } .rate-bottom .fedpath-panel { position: static; } }
@media (max-width: 620px) { .rate-grid { grid-template-columns: 1fr; } }
.rate-grid .panel, .rate-grid-2 .panel, .rate-bottom .panel { padding: 11px 13px; }
.rate-grid .panel-head, .rate-grid-2 .panel-head, .rate-bottom .panel-head { margin-bottom: 7px; }
.rate-grid .panel-head h3, .rate-grid-2 .panel-head h3, .rate-bottom .panel-head h3 { font-size: 13px; }
.rate-table { width: 100%; border-collapse: collapse; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.rate-table th {
  text-align: right; color: var(--muted); font-weight: 600; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.3px; padding: 2px 5px; border-bottom: 1px solid var(--border);
}
.rate-table th:first-child { text-align: left; }
.rate-table td { padding: 2.5px 5px; border-bottom: 1px solid var(--row-border); }
.rate-table tbody tr:hover { background: var(--panel-2); }
.rt-tenor { font-weight: 600; white-space: nowrap; }
.rt-num { text-align: right; }
.rt-num.up { color: var(--up); }
.rt-num.down { color: var(--down); }
.rt-z { text-align: right; border-radius: 3px; }
.rt-spark { text-align: right; width: 64px; }
.mini-spark { display: inline-block; vertical-align: middle; }
.rt-kind { font-size: 9px; color: var(--muted); margin-left: 6px; text-transform: uppercase; }
.struct-table th:not(:first-child), .struct-table td:not(:first-child) { text-align: right; }
.live-dot { font-size: 11px; color: var(--muted); margin-left: 8px; font-weight: 600; }
.live-dot.open { color: var(--up); }
.builder { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.builder select {
  background: var(--chip-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 7px; font: inherit; font-size: 12px;
}
.fedpath-panel { padding: 12px 14px 6px; margin-bottom: 12px; }
.fedpath-panel .panel-head h3 { font-size: 14px; }
.fedpath-panel .chart-svg { width: 100%; height: auto; }

/* ===== Rates tab: GMLCurve builder + market monitor, dense masonry ===== */
/* the rates tab trims its chrome further so the whole dashboard packs onto one
   screen on a wide monitor (width matches the global expanded cap) */
body[data-tab="rates"] .app { padding: 12px 16px 14px; }
.rates-compact { display: flex; flex-direction: column; }
.rates-zone-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--muted); margin: 2px 0 6px; padding-bottom: 3px; border-bottom: 1px solid var(--border);
}
.rates-zone-label:not(:first-child) { margin-top: 10px; }

/* masonry: every widget flows into as many columns as fit, packed tight so the
   whole tab fits on one screen without scrolling on a wide monitor */
.rates-masonry { column-width: 270px; column-gap: 8px; }
.rates-masonry > .panel {
  break-inside: avoid; -webkit-column-break-inside: avoid;
  margin: 0 0 8px;
}

/* dense panels + tables across the whole tab */
.rates-compact .panel { padding: 6px 9px; margin-bottom: 0; }
.rates-compact .panel-head { margin-bottom: 4px; }
.rates-compact .panel-head h3 { font-size: 11px; }
.rates-compact .rate-table { font-size: 10px; }
.rates-compact .rate-table td { padding: 1px 4px; }
.rates-compact .rate-table th { padding: 1px 4px; font-size: 8.5px; letter-spacing: 0; }
.rates-compact .rt-spark { width: 42px; }
.rates-compact .mini-spark { width: 38px; }
.rates-compact .rt-kind { display: none; }
.rates-compact .builder { margin-bottom: 5px; gap: 4px; }
.rates-compact .fedpath-panel { position: static; padding: 6px 9px; }
.rates-compact .fedpath-panel .panel-head h3 { font-size: 11px; }

/* GMLCurve tile specifics */
.gml-panel .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.gml-curve th:not(:first-child), .gml-curve td:not(:first-child) { text-align: right; }
.gml-curve .gml-rule { text-align: left; color: var(--muted); font-size: 9px; white-space: nowrap; }
.gml-gml, .gml-fed { font-weight: 600; }
.gml-inputs th:not(:first-child), .gml-inputs td:not(:first-child) { text-align: right; }
.gml-inputs td.gml-in { text-align: right; padding: 1px 3px; }
.gml-pin { color: var(--muted); font-size: 9px; }
.gml-src {
  background: var(--chip-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; padding: 0 2px; font: inherit; font-size: 9px; max-width: 58px;
}
.gml-val {
  width: 40px; background: var(--chip-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; padding: 0 3px; font: inherit; font-size: 9.5px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.gml-val:focus, .gml-src:focus { outline: none; border-color: var(--cyan); }
.gml-reset {
  background: var(--chip-bg); color: var(--muted); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 6px; font: inherit; font-size: 9px; cursor: pointer;
}
.gml-reset:hover:not(:disabled) { color: var(--text); border-color: var(--cyan); }
.gml-reset:disabled { opacity: 0.4; cursor: default; }

/* invoice spreads (Treasury futures) — compact, constrained width */
.inv-panel { padding: 7px 10px; margin-top: 0; max-width: 1000px; }
.inv-panel .panel-head { display: flex; align-items: center; gap: 8px; }
.inv-imm-code { font-size: 12px; color: var(--tf-accent, var(--cyan)); font-weight: 700; margin-left: 3px; }
/* conversion-factor column + native/reconciled badge */
.inv-cf { font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.cf-warn { color: #f59e0b; font-weight: 700; }
.cf-badge { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 4px; letter-spacing: .02em; white-space: nowrap; }
.cf-badge.ok { background: color-mix(in srgb, #22c55e 16%, transparent); color: #4ade80; }
.cf-badge.warn { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #fbbf24; }
.bs-cf { font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; margin: 0 2px; }
.inv-table { width: 100%; font-size: 10.5px; }
.inv-table th:nth-child(n+3), .inv-table td:nth-child(n+3) { text-align: right; }
.inv-table td.inv-dlv, .inv-table th:last-child { text-align: left; }
.inv-table th { padding: 1px 5px; }
.inv-table td { padding: 1.5px 5px; }
.inv-ctd { width: 42%; }
.inv-pick {
  width: 100%; max-width: 250px; background: var(--chip-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 4px; font: inherit; font-size: 10px;
}
.inv-pick:focus, #inv-imm:focus { outline: none; border-color: var(--cyan); }
.inv-opt {
  font-weight: 700; border-radius: 4px;
  background: color-mix(in srgb, var(--tf-accent, var(--cyan)) 15%, transparent);
}
.inv-side { font-size: 8.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 3px; padding: 0 3px; }
.inv-dlv { color: var(--muted); font-size: 10px; white-space: nowrap; }
#inv-imm {
  margin-left: 8px; background: var(--chip-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 7px; font: inherit; font-size: 11px;
}
.inv-metric { margin-left: auto; display: inline-flex; gap: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.inv-mbtn {
  background: transparent; color: var(--muted); border: none; padding: 2px 8px;
  font: inherit; font-size: 10.5px; cursor: pointer;
}
.inv-mbtn:hover { color: var(--text); }
.inv-mbtn.active { background: var(--tf-accent, var(--cyan)); color: #06121f; font-weight: 700; }

/* native <select> option popups render OS-native (white on Windows) unless the
   option itself carries an explicit background — set a solid, theme-aware one */
option { background: var(--panel-2); color: var(--text); }

/* ===== Basis tab: cash-futures basis model ===== */
.bs-panel { padding: 8px 12px; max-width: 1120px; }
.bs-panel .panel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bs-panel .panel-head h3 { color: var(--tf-accent, #fb923c); }
.bs-imm-code { font-size: 12px; color: var(--tf-accent, #fb923c); font-weight: 700; margin-left: 3px; }
.bs-gate { margin-left: auto; font-size: 10.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--border); white-space: nowrap; }
.bs-gate.off { color: var(--good, #34d399); border-color: color-mix(in srgb, #34d399 45%, var(--border)); }
.bs-gate.on { color: #fbbf24; border-color: color-mix(in srgb, #fbbf24 55%, var(--border));
  background: color-mix(in srgb, #fbbf24 12%, transparent); }
#bs-imm { background: var(--chip-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 7px; font: inherit; font-size: 11px; }
#bs-imm:focus { outline: none; border-color: var(--tf-accent, #fb923c); }
.bs-table { width: 100%; font-size: 11px; margin-top: 4px; }
.bs-table th:nth-child(n+2), .bs-table td:nth-child(n+2) { text-align: right; }
.bs-table th:nth-child(9), .bs-table td.bs-sig { text-align: center; }
.bs-table th { padding: 2px 6px; color: var(--muted); font-weight: 600; }
.bs-table td { padding: 2.5px 6px; }
.bs-row { cursor: pointer; }
.bs-row:hover { background: color-mix(in srgb, var(--tf-accent, #fb923c) 8%, transparent); }
.bs-row.open { background: color-mix(in srgb, var(--tf-accent, #fb923c) 6%, transparent); }
.bs-ctd { text-align: left !important; white-space: nowrap; }
.bs-exp { display: inline-block; width: 12px; color: var(--muted); font-size: 9px; }
.bs-ctddesc { color: var(--muted); font-size: 10px; margin-left: 3px; }
.bs-special { color: #c084fc; font-weight: 600; }        /* CTD special (IRR < GC) */
.bs-sig { font-size: 10px; font-weight: 700; white-space: nowrap; }
.bs-sig.bs-sell { color: #f87171; }
.bs-sig.bs-buy { color: #34d399; }
.bs-sig.bs-gated { color: var(--muted); font-style: italic; font-weight: 600; }
.bs-sig.bs-neutral { color: var(--muted); font-weight: 500; }
.bs-detail > td { padding: 0 !important; }
.bs-detail-in { display: flex; gap: 18px; flex-wrap: wrap; padding: 8px 10px 10px 24px;
  border-left: 2px solid var(--tf-accent, #fb923c);
  background: color-mix(in srgb, var(--tf-accent, #fb923c) 5%, transparent); }
.bs-sub { flex: 1 1 340px; min-width: 300px; }
.bs-sublbl { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 5px; }
.bs-basket { display: flex; flex-wrap: wrap; gap: 5px; }
.bs-bk { font-size: 10px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 5px;
  background: var(--chip-bg); white-space: nowrap; }
.bs-bk b { color: var(--text); }
.bs-bk.ctd { border-color: color-mix(in srgb, var(--tf-accent, #fb923c) 60%, var(--border)); }
.bs-bk.maxirr { background: color-mix(in srgb, var(--tf-accent, #fb923c) 14%, var(--chip-bg)); }
.bs-tag { font-size: 8px; font-weight: 700; padding: 0 3px; border-radius: 3px;
  background: var(--tf-accent, #fb923c); color: #06121f; margin-left: 2px; }
.bs-tag.alt { background: #c084fc; }
.bs-latbtn { background: transparent; color: var(--tf-accent, #fb923c); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 9px; font: inherit; font-size: 10.5px; cursor: pointer; }
.bs-latbtn:hover { border-color: var(--tf-accent, #fb923c);
  background: color-mix(in srgb, var(--tf-accent, #fb923c) 12%, transparent); }
.bs-latgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 6px 14px; align-items: end; }
.bs-latgrid > div { display: flex; flex-direction: column; }
.bs-latgrid .k { font-size: 9.5px; color: var(--muted); }
.bs-latgrid .v { font-size: 12px; font-weight: 600; }
.bs-latgrid .v.bs-fair { color: var(--tf-accent, #fb923c); }
.bs-rerun { justify-content: flex-end; }
.bs-note { font-size: 10px; margin-top: 7px; line-height: 1.4; }

/* ===== STIR tab: short-term rates / Fed path ===== */
.stir-panel { padding: 8px 12px; max-width: 1120px; }
.stir-panel .panel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stir-panel .panel-head h3 { color: var(--tf-accent, #facc15); }
.stir-sub { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.stir-summ { font-size: 12px; color: var(--text); margin: 2px 0 8px; }
.stir-summ b { color: var(--tf-accent, #facc15); }
.stir-turns { font-size: 11px; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stir-turns-lbl { color: var(--muted); }
.stir-turn { padding: 1px 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--chip-bg);
  color: var(--text); font-size: 10px; }
.stir-turn.ye { border-color: color-mix(in srgb, #22d3ee 55%, var(--border)); color: #22d3ee; }
.stir-turnmk { stroke: #22d3ee; stroke-width: 2; }
.stir-turnmk.ye { stroke-width: 3; }
.stir-turnbp { fill: #22d3ee; font-size: 8.5px; font-weight: 600; }
.stir-chart { width: 100%; margin-bottom: 8px; }
.stir-svg { width: 100%; height: auto; display: block; }
.stir-mtg { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.6; }
.stir-mv { font-size: 9px; font-weight: 600; }
.stir-mv.up { fill: #34d399; }
.stir-mv.down { fill: #f87171; }
.stir-table { width: 100%; font-size: 11px; }
.stir-table th:nth-child(n+2), .stir-table td:nth-child(n+2) { text-align: right; }
.stir-table th:last-child, .stir-table td.stir-odds { text-align: left; }
.stir-table th { padding: 2px 7px; color: var(--muted); font-weight: 600; }
.stir-table td { padding: 2.5px 7px; }
.stir-table tbody tr:hover { background: color-mix(in srgb, var(--tf-accent, #facc15) 8%, transparent); }
.stir-odds { white-space: nowrap; }
.stir-bar { display: inline-flex; width: 90px; height: 9px; border-radius: 3px; overflow: hidden;
  background: var(--chip-bg); border: 1px solid var(--border); vertical-align: middle; }
.stir-seg { height: 100%; display: inline-block; }
.stir-seg.cut { background: #f87171; }
.stir-seg.hold { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.stir-seg.hike { background: #34d399; }
.stir-lbl { font-size: 9.5px; color: var(--muted); margin-left: 7px; }

/* ---- FOMC scenario tool ---- */
.stir-scn-panel { padding: 8px 12px; max-width: 1120px; }
.stir-scn-h { color: var(--tf-accent, #facc15); font-size: 13px; margin: 0 0 8px; }
.stir-scn-tables { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.stir-scn-col { flex: 1 1 340px; min-width: 300px; }
.stir-scn-cap { font-size: 11px; margin: 0 0 5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tbl-scroll { overflow-x: auto; }
.stir-deftbl, .stir-imptbl { width: 100%; font-size: 11px; border-collapse: collapse; }
.stir-deftbl th, .stir-imptbl th { padding: 3px 7px; color: var(--muted); font-weight: 600; text-align: right; white-space: nowrap; }
.stir-deftbl th:first-child, .stir-imptbl th:first-child { text-align: left; }
.stir-deftbl td, .stir-imptbl td { padding: 2.5px 7px; white-space: nowrap; }
.stir-deftbl tbody tr:hover, .stir-imptbl tbody tr:hover { background: color-mix(in srgb, var(--tf-accent, #facc15) 7%, transparent); }
.stir-cell { text-align: right; }
.stir-in { width: 42px; font-size: 11px; text-align: right; padding: 1px 4px; border: 1px solid var(--border);
  border-radius: 4px; background: var(--panel-2); color: var(--text); font-variant-numeric: tabular-nums; }
.stir-in:focus { outline: none; border-color: var(--tf-accent, #facc15); }
.stir-scnhd { text-align: right; }
.stir-name { width: 74px; font-size: 10.5px; font-weight: 600; padding: 1px 4px; border: 1px solid transparent;
  border-radius: 4px; background: transparent; color: var(--text); text-align: right; }
.stir-name:hover, .stir-name:focus { border-color: var(--border); background: var(--panel-2); outline: none; }
.stir-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 12px; padding: 0 2px; line-height: 1; }
.stir-del:hover { color: var(--down); }
.stir-add { border: 1px solid var(--border); background: var(--panel-2); color: var(--text); border-radius: 5px;
  font-size: 10.5px; padding: 2px 8px; cursor: pointer; }
.stir-add:hover { border-color: var(--tf-accent, #facc15); }
.stir-sum td { border-top: 1px solid var(--border); font-weight: 600; color: var(--text); }
.stir-grp td { padding-top: 7px; color: var(--tf-accent, #facc15); font-weight: 700; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.6px; }
.stir-d { margin-left: 6px; font-size: 9.5px; font-variant-numeric: tabular-nums; }
.stir-d.pos { color: var(--up, #34d399); }
.stir-d.neg { color: var(--down, #f87171); }
.stir-d.muted { color: var(--muted); }
.stir-note { font-size: 10px; margin-top: 7px; line-height: 1.4; }
.stir-carry { margin: 10px 0 4px; max-width: 460px; }
.cr-head { font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.cr-head .muted { font-weight: 400; font-size: 10px; }
.cr-table { width: 100%; font-size: 11px; }
.cr-table th { padding: 2px 8px; color: var(--muted); font-weight: 600; text-align: right; }
.cr-table th:first-child { text-align: left; }
.cr-table td { padding: 2px 8px; text-align: right; }
.cr-table td.cr-lbl { text-align: left; white-space: nowrap; color: var(--muted); }
.cr-table tr.cr-top td { border-top: 1px solid var(--row-border); }
.cr-effr { color: var(--tf-accent, #facc15); }
.cr-sofr { color: #22d3ee; }
.cr-sub { padding-left: 10px; }
.stir-macro { margin-top: 12px; }
.mm-lean { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.mm-lean.hawk { color: #f87171; background: color-mix(in srgb, #f87171 14%, transparent); }
.mm-lean.dov { color: #34d399; background: color-mix(in srgb, #34d399 14%, transparent); }
.mm-lean.mix { color: var(--muted); background: var(--chip-bg); }
.mm-table { width: 100%; font-size: 10.5px; }
.mm-table thead th { padding: 2px 7px; color: var(--muted); font-weight: 600; text-align: right; }
.mm-table thead th:first-child { text-align: left; }
.mm-table td { padding: 1.5px 7px; }
.mm-ghead td { padding-top: 7px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--tf-accent, #facc15); }
.mm-name { text-align: left; white-space: nowrap; }
.mm-table td.rt-num { text-align: right; }
.mm-table tbody tr:hover { background: color-mix(in srgb, var(--tf-accent, #facc15) 7%, transparent); }
.mm-stance { text-align: center; width: 26px; }
.mm-st { font-size: 10px; font-weight: 700; }
.mm-st.hawk { color: #f87171; }
.mm-st.dov { color: #34d399; }
.mm-st.neu, .mm-st.info { color: var(--muted); }
.stir-rx { margin-top: 12px; }
.rx-table { width: 100%; font-size: 11px; }
.rx-table th { padding: 2px 7px; color: var(--muted); font-weight: 600; text-align: left; }
.rx-table td { padding: 3px 7px; vertical-align: middle; }
.rx-win { white-space: nowrap; color: var(--muted); }
.rx-up { background: color-mix(in srgb, var(--tf-accent, #facc15) 8%, transparent); }
.rx-up .rx-win { color: var(--text); font-weight: 600; }
.rx-prints { display: flex; flex-wrap: wrap; gap: 3px; }
.rx-print { font-size: 9.5px; padding: 1px 5px; border-radius: 3px; border: 1px solid var(--border); }
.rx-print.hawkish { color: #f87171; border-color: color-mix(in srgb, #f87171 45%, var(--border)); }
.rx-print.dovish { color: #34d399; border-color: color-mix(in srgb, #34d399 45%, var(--border)); }
.rx-print.neutral { color: var(--muted); }
.rx-lean-b { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.rx-lean-b.hawk { color: #f87171; background: color-mix(in srgb, #f87171 14%, transparent); }
.rx-lean-b.dov { color: #34d399; background: color-mix(in srgb, #34d399 14%, transparent); }
.rx-lean-b.mix { color: var(--muted); background: var(--chip-bg); }
.rx-act { font-size: 11px; font-weight: 700; }
.rx-act.hawkish { color: #f87171; }
.rx-act.dovish { color: #34d399; }
.rx-act.neutral { color: var(--muted); }
.rx-act.upcoming { color: var(--tf-accent, #facc15); font-style: italic; }
.stir-matrix { margin-top: 10px; overflow-x: auto; }
.mx-h { font-size: 10px; margin-bottom: 4px; }
.mx-table { font-size: 10.5px; }
.mx-table th, .mx-table td { padding: 2px 6px; text-align: center; }
.mx-table th:first-child, .mx-table td.mx-name { text-align: left; white-space: nowrap; color: var(--muted); }
.mx-col { font-size: 9.5px; color: var(--muted); }
.mx-col.up { color: var(--tf-accent, #facc15); }
.mx-dec { display: block; font-size: 9px; font-weight: 700; margin-top: 1px; }
.mx-dec.hawkish { color: #f87171; }
.mx-dec.dovish { color: #34d399; }
.mx-dec.neutral { color: var(--muted); }
.mx-dec.up { color: var(--tf-accent, #facc15); font-style: italic; }
.mx-cell { width: 34px; }
.mx { font-size: 11px; font-weight: 700; }
.mx.hot { color: #f87171; }
.mx.cool { color: #34d399; }
.mx.same { color: var(--muted); opacity: 0.5; }
.stir-members { margin-top: 12px; }
.fm-align { margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); }
.fm-align.hawk { color: #f87171; border-color: color-mix(in srgb, #f87171 45%, var(--border)); }
.fm-align.dov { color: #34d399; border-color: color-mix(in srgb, #34d399 45%, var(--border)); }
.fm-align.neu { color: var(--muted); }
.fm-sec { margin: 6px 0; }
.fm-lbl { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.fm-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.fm-chip { font-size: 10.5px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--chip-bg); display: inline-flex; align-items: center; gap: 6px; }
.fm-chip.hawk { border-color: color-mix(in srgb, #f87171 50%, var(--border)); }
.fm-chip.dov { border-color: color-mix(in srgb, #34d399 50%, var(--border)); }
.fm-lean { font-size: 8.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.fm-chip.hawk .fm-lean { color: #f87171; }
.fm-chip.dov .fm-lean { color: #34d399; }
.bl-svg { width: 100%; max-width: 500px; height: auto; display: block; margin-top: 4px; }
.bl-haw { fill: color-mix(in srgb, #f87171 7%, transparent); }
.bl-dov { fill: color-mix(in srgb, #34d399 7%, transparent); }
.bl-zero { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 3; }
.bl-line { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.bl-dot { stroke: var(--panel); stroke-width: 1; }
.bl-dot.hawk { fill: #f87171; }
.bl-dot.dov { fill: #34d399; }
.bl-dot.neu { fill: var(--muted); }
.bl-dot.cur { stroke: var(--tf-accent, #facc15); stroke-width: 2; }
.bl-x { font-size: 8.5px; fill: var(--muted); }
.bl-x.cur { fill: var(--tf-accent, #facc15); font-weight: 700; }
.bl-y { font-size: 8px; }
.bl-y.hawk { fill: #f87171; }
.bl-y.dov { fill: #34d399; }
.bl-era { stroke: var(--tf-accent, #facc15); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.45; }
.bl-chair { font-size: 8.5px; font-weight: 600; fill: var(--muted); }
.fd-table { width: 100%; font-size: 10.5px; margin-top: 2px; }
.fd-table th { padding: 2px 8px; color: var(--muted); font-weight: 600; text-align: left; }
.fd-table td { padding: 2px 8px; }
.fd-date { white-space: nowrap; color: var(--muted); }
.fd-act { font-weight: 600; white-space: nowrap; }
.fd-act.hawk { color: #f87171; }
.fd-act.dov { color: #34d399; }
.fd-act.neu { color: var(--text); }
.fm-unan { font-size: 10px; color: var(--muted); }
.fm-dis { font-size: 9.5px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--chip-bg); white-space: nowrap; margin-right: 3px; }
.fm-dis.hawk { color: #f87171; border-color: color-mix(in srgb, #f87171 45%, var(--border)); }
.fm-dis.dov { color: #34d399; border-color: color-mix(in srgb, #34d399 45%, var(--border)); }

/* ===== SDR tab: SOFR swap dissemination blotter ===== */
.sdr-panel { padding: 8px 12px; max-width: 1120px; }
.sdr-panel .panel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sdr-panel .panel-head h3 { color: var(--tf-accent, #84cc16); }
.sdr-daybar { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; flex-wrap: wrap; }
.sdr-daylbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #8b93a7); }
.sdr-day { background: var(--chip-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 8px; font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; }
.sdr-refresh { font-size: 11px; }
.sdr-live { color: #84cc16; font-weight: 700; font-size: 11.5px; letter-spacing: .03em;
  animation: sdrpulse 2s ease-in-out infinite; }
@keyframes sdrpulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.sdr-eod { color: var(--muted, #8b93a7); font-weight: 700; font-size: 11.5px; border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; }
.sdr-summ { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.sdr-tc { font-size: 11px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--chip-bg); }
.sdr-tc b { font-weight: 700; }
.sdr-tc.o { border-color: color-mix(in srgb, #84cc16 45%, var(--border)); color: #a3e635; }
.sdr-tc.s { border-color: color-mix(in srgb, #f59e0b 45%, var(--border)); color: #fbbf24; }
.sdr-tc.sw { border-color: color-mix(in srgb, #22d3ee 45%, var(--border)); color: #22d3ee; }
.sdr-tc.f { border-color: color-mix(in srgb, #c084fc 45%, var(--border)); color: #c084fc; }
.sdr-tc.p { color: var(--muted); }
.sdr-sefs { margin-bottom: 8px; }
.sdr-sefwrap { display: flex; flex-wrap: wrap; gap: 10px; }
.sdr-sef { font-size: 10.5px; color: var(--text); }
.sdr-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.sdr-fb { background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 10px; font: inherit; font-size: 11px; cursor: pointer; }
.sdr-fb:hover { color: var(--text); }
.sdr-fb.active { background: var(--tf-accent, #84cc16); color: #0a1206; font-weight: 700; border-color: transparent; }
.sdr-sel { background: var(--chip-bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 8px; font: inherit; font-size: 11px; }
.sdr-sel:focus { outline: none; border-color: var(--tf-accent, #84cc16); }
.sdr-count { font-size: 10.5px; margin-left: auto; }
.sdr-tablewrap { max-height: 460px; overflow-y: auto; }
.sdr-table { width: 100%; font-size: 11px; }
.sdr-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; padding: 3px 8px;
  color: var(--muted); font-weight: 600; text-align: left; }
.sdr-table th:nth-child(4), .sdr-table th:nth-child(5),
.sdr-table td.rt-num { text-align: right; }
.sdr-table td { padding: 2px 8px; }
.sdr-table tbody tr:hover { background: color-mix(in srgb, var(--tf-accent, #84cc16) 8%, transparent); }
.sdr-time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sdr-struct { font-weight: 600; white-space: nowrap; }
.sdr-venue { color: var(--muted); white-space: nowrap; }
.sdr-badge { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: .03em; }
.sdr-badge.o { background: color-mix(in srgb, #84cc16 18%, transparent); color: #a3e635; }
.sdr-badge.s { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #fbbf24; }
.sdr-badge.sw { background: color-mix(in srgb, #22d3ee 18%, transparent); color: #22d3ee; }
.sdr-badge.f { background: color-mix(in srgb, #c084fc 18%, transparent); color: #c084fc; }
.sdr-badge.p { background: var(--chip-bg); color: var(--muted); }
.sdr-blk { color: #f59e0b; font-size: 9px; }

/* swap-spreads breakdown matrix (tenor × venue) */
.sdr-spreads { margin-bottom: 14px; }
.ss-table { width: 100%; font-size: 11px; }
.ss-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; padding: 4px 10px;
  color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--border); }
.ss-table td { padding: 3px 10px; font-variant-numeric: tabular-nums; }
.ss-table td.ss-ten, .ss-table th.ss-ten { text-align: left; }
.ss-ten { font-weight: 700; white-space: nowrap; }
.ss-ct { color: var(--muted); font-size: 9px; }
.ss-tot-n { color: var(--text); font-weight: 600; }
.ss-table tbody tr:hover { background: color-mix(in srgb, #f59e0b 8%, transparent); }
.ss-table tr.ss-tot { border-top: 2px solid var(--border); }
.ss-table tr.ss-tot td { padding-top: 5px; font-weight: 700; }
/* volume bar chart */
.ss-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 2px 0 8px; font-size: 10px; color: var(--muted); }
.ss-lg { display: inline-flex; align-items: center; gap: 5px; }
.ss-lg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.ss-lg i.ss-resid-sw { background: var(--muted); opacity: .35; }
.ss-chart { width: 100%; margin-bottom: 10px; }
.ss-svg { width: 100%; height: auto; display: block; }
.ss-grid { stroke: var(--border); stroke-width: 1; opacity: .5; }
.ss-yl { fill: var(--muted); font-size: 9px; text-anchor: end; font-variant-numeric: tabular-nums; }
.ss-xl { fill: var(--text); font-size: 11px; text-anchor: middle; font-weight: 700; }
.ss-bl { fill: var(--muted); font-size: 9px; text-anchor: middle; font-variant-numeric: tabular-nums; }
.ss-resid { fill: var(--muted); opacity: .35; }
.ss-svg rect { transition: opacity .1s; }
.ss-svg rect:hover { opacity: .8; }

/* ===== Worksheet tab: user-defined product tracker ===== */
.ws-panel { padding: 8px 10px; }
.ws-panel .panel-head { display: flex; align-items: center; gap: 8px; }
.ws-add { position: relative; display: flex; gap: 6px; margin: 6px 0 8px; }
.ws-in { flex: 0 0 460px; max-width: 60%; background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 5px; padding: 5px 9px; font-size: 12px; font-family: inherit; }
.ws-in:focus { outline: none; border-color: var(--tf-accent, #e879f9); }
.ws-addbtn { background: color-mix(in srgb, var(--tf-accent, #e879f9) 20%, transparent); color: var(--text);
  border: 1px solid var(--tf-accent, #e879f9); border-radius: 5px; padding: 5px 12px; font-size: 11px; font-weight: 700; cursor: pointer; }
.ws-addbtn:hover { background: color-mix(in srgb, var(--tf-accent, #e879f9) 34%, transparent); }
.ws-sug { position: absolute; top: 34px; left: 0; z-index: 20; width: 460px; max-width: 60%;
  background: var(--panel); border: 1px solid var(--border); border-radius: 5px; max-height: 260px; overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.ws-sugitem { padding: 4px 9px; font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.ws-sugitem:hover { background: color-mix(in srgb, var(--tf-accent, #e879f9) 14%, transparent); }
.ws-tablewrap { overflow-x: auto; }
.ws-table { width: 100%; font-size: 11px; }
.ws-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; padding: 3px 8px;
  color: var(--muted); font-weight: 600; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
.ws-table thead th:first-child { text-align: left; }
.ws-table td { padding: 3px 8px; font-variant-numeric: tabular-nums; }
.ws-table tbody tr:hover { background: color-mix(in srgb, var(--tf-accent, #e879f9) 8%, transparent); }
.ws-prod { text-align: left; white-space: nowrap; }
.ws-desc { font-weight: 700; }
.ws-meta { display: block; font-size: 9px; color: var(--muted); }
.ws-mid { font-weight: 600; }
.ws-px { display: block; color: var(--muted); font-size: 9px; line-height: 1.1; }

/* VWAP / tape tab */
.vwap-table th, .vwap-table td { white-space: nowrap; }
.vwap-inst { text-align: left; }
.vwap-tk { font-weight: 600; }
.vwap-vwap { color: var(--tf-accent, #fbbf24); }
.vwap-sz { color: var(--muted); font-size: 10px; margin-left: 3px; }
.vwap-imb { position: relative; display: inline-block; width: 46px; height: 9px; background: var(--panel-2, #161d2b);
  border: 1px solid var(--border, #2a3446); border-radius: 2px; vertical-align: middle; overflow: hidden; }
.vwap-imb-fill { position: absolute; top: 0; height: 100%; }
.vwap-spark { vertical-align: middle; }
.vwap-range { color: var(--muted); font-size: 11px; }

/* RV Signals (band-cross screener) */
.sig-controls { display: flex; gap: 18px; align-items: center; margin: 6px 0 10px; font-size: 12px; color: var(--muted); }
.sig-controls label { display: inline-flex; gap: 6px; align-items: center; }
.sig-chk { cursor: pointer; }
.sig-struct { text-align: left; }
.sig-lbl { font-weight: 600; }
.sig-kind { font-size: 9px; text-transform: uppercase; letter-spacing: .04em; padding: 1px 5px; border-radius: 3px;
  margin-left: 5px; color: var(--muted); border: 1px solid var(--border, #2a3446); }
.sig-fly { color: #fbbf24; border-color: #fbbf2455; }
.sig-curve { color: #38bdf8; border-color: #38bdf855; }
.sig-band { position: relative; display: inline-block; width: 130px; height: 14px; vertical-align: middle;
  background: var(--panel-2, #161d2b); border: 1px solid var(--border, #2a3446); border-radius: 3px; overflow: hidden; }
.sig-band-range { position: absolute; top: 0; height: 100%; background: color-mix(in srgb, var(--tf-accent, #fb923c) 26%, transparent); }
.sig-band-mean { position: absolute; top: 0; width: 1px; height: 100%; background: var(--muted, #8892a6); opacity: .7; }
.sig-band-mark { position: absolute; top: -1px; width: 3px; height: calc(100% + 2px); border-radius: 1px; }
.sig-sigcell { text-align: left; white-space: nowrap; }
.sig-cross { color: #fb923c; font-weight: 700; font-size: 11px; letter-spacing: .02em; }
.sig-out { font-size: 11px; font-weight: 600; }
.sig-out-above { color: #ef4444; }
.sig-out-below { color: #22c55e; }
.sig-row-cross { background: color-mix(in srgb, #fb923c 10%, transparent); }
.sig-row-near { background: color-mix(in srgb, #fb923c 5%, transparent); }
.sig-z { font-variant-numeric: tabular-nums; font-weight: 600; }
.sig-clickable { cursor: pointer; }
.sig-clickable:hover { background: color-mix(in srgb, var(--tf-accent, #fb923c) 8%, transparent); }
.sig-row-sel { background: color-mix(in srgb, var(--tf-accent, #fb923c) 16%, transparent) !important; }

/* macro regime banner */
.sig-regime { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 8px;
  padding: 7px 10px; background: var(--panel-2, #161d2b); border: 1px solid var(--border, #2a3446); border-radius: 6px; font-size: 12px; }
.sig-rlabel { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.sig-rchip .sig-rk { color: var(--muted); font-size: 11px; }
.sig-raxes { color: var(--muted); font-size: 11px; margin-left: auto; }

/* macro deep-dive panel */
.sig-macro-panel { margin-top: 10px; }
.sig-macro-inner { background: var(--panel-2, #161d2b); border: 1px solid var(--border, #2a3446); border-radius: 8px; padding: 12px 14px; }
.sig-macro-head { font-size: 14px; margin-bottom: 10px; position: relative; }
.sig-macro-x { position: absolute; right: 0; top: -2px; }
.sig-macro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) { .sig-macro-grid { grid-template-columns: 1fr; } }
.sig-mc-title { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.sig-mc-big { font-size: 13px; margin-bottom: 4px; }
.sig-mc-reg { font-size: 12px; color: var(--fg); line-height: 1.5; }
.sig-brow { display: flex; align-items: center; gap: 8px; margin: 3px 0; font-size: 11px; }
.sig-blabel { width: 130px; color: var(--muted); text-align: right; flex: none; }
.sig-btrack { position: relative; flex: 1; height: 10px; background: var(--panel, #0e1524); border-radius: 2px; }
.sig-btrack::before { content: ''; position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1px; background: var(--border, #2a3446); }
.sig-bfill { position: absolute; top: 0; height: 100%; border-radius: 2px; }
.sig-bval { width: 46px; text-align: right; flex: none; font-variant-numeric: tabular-nums; }

/* combined 3-lens conviction */
.sig-conv-agree { display: inline-block; font-size: 9px; font-weight: 700; padding: 0 4px; border-radius: 3px;
  color: var(--muted); border: 1px solid var(--border, #2a3446); vertical-align: middle; }
.sig-conv-all { color: #fb923c; border-color: #fb923c; background: color-mix(in srgb, #fb923c 12%, transparent); }
.sig-lens3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 2px 0 12px;
  padding: 7px 10px; background: var(--panel, #0e1524); border: 1px solid var(--border, #2a3446); border-radius: 6px; font-size: 12px; }
.sig-lpill .sig-lk { color: var(--muted); font-size: 11px; }
.sig-lens-score { margin-left: auto; font-size: 12px; }

/* longer-term / intraday mode toggle */
.sig-modetabs { display: inline-flex; gap: 2px; margin: 0 10px; vertical-align: middle;
  background: var(--panel-2, #161d2b); border: 1px solid var(--border, #2a3446); border-radius: 6px; padding: 2px; }
.sig-modetab { font-size: 12px; padding: 3px 11px; border-radius: 4px; border: none; background: transparent;
  color: var(--muted); cursor: pointer; font-weight: 600; }
.sig-modetab.on { background: var(--tf-accent, #fb923c); color: #0e1524; }
.sig-newsedge { color: #fb923c; font-weight: 700; }
.sig-edge { color: var(--tf-accent, #fb923c); font-weight: 700; font-variant-numeric: tabular-nums; }
.sig-rcaxes { display: flex; flex-wrap: wrap; gap: 5px 16px; font-size: 12px; margin-top: 2px; }
.sig-rcaxis .sig-lk { color: var(--muted); font-size: 11px; }
.ws-inst { color: var(--muted); font-size: 9px; }
.ws-risk, .ws-hedge { cursor: help; }
.ws-err { color: #f87171; font-size: 10.5px; }
.ws-rm { text-align: center; }
.ws-rmbtn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; line-height: 1; padding: 2px 4px; }
.ws-rmbtn:hover { color: #f87171; }
.ws-chkcell { text-align: center; }
.ws-chk, #ws-chk-all { accent-color: var(--tf-accent, #e879f9); cursor: pointer; }
.ws-szcell { white-space: nowrap; }
.ws-sz { width: 62px; background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 4px; padding: 2px 5px; font-size: 10.5px; font-family: inherit; text-align: right; font-variant-numeric: tabular-nums; }
.ws-sz:focus { outline: none; border-color: var(--tf-accent, #e879f9); }
.ws-table tbody tr.ws-sel { background: color-mix(in srgb, var(--tf-accent, #e879f9) 12%, transparent); }
/* selected-rows risk ladder */
.ws-ladder-panel { margin: 10px 0 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: color-mix(in srgb, var(--tf-accent, #e879f9) 5%, transparent); }
.wl-head { display: flex; align-items: baseline; gap: 10px; font-size: 12px; font-weight: 700; flex-wrap: wrap; }
.wl-tot { margin-left: auto; font-weight: 600; font-size: 11px; }
.wl-legend { font-size: 10px; margin: 3px 0 7px; }
.wl-table { width: auto; min-width: 200px; font-size: 11px; }
.wl-table th { text-align: right; color: var(--muted); font-weight: 600; padding: 2px 10px; border-bottom: 1px solid var(--border); }
.wl-table th:first-child { text-align: left; }
.wl-table td { padding: 2px 10px; font-variant-numeric: tabular-nums; }
.wl-table td.rt-tenor { color: var(--muted); font-weight: 600; }
.wl-table tr.wl-sum td { border-top: 1px solid var(--border); font-weight: 700; padding-top: 4px; }
.wl-table tr.wl-sum td.rt-tenor, .wl-table tr.wl-hedge td.rt-tenor { color: var(--text); }

/* ===== Charts tab: grid of per-structure chart widgets ===== */
.charts-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.charts-title { font-size: 14px; font-weight: 700; }
.charts-bar .muted { font-size: 11px; }
.charts-legend { display: flex; gap: 12px; margin-left: auto; flex-wrap: wrap; }
.cw-leg { font-size: 10px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.cw-leg i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.cw-leg-ic { width: 9px; height: 9px; display: inline-block; }
.cw-leg-ma100 { width: 12px; height: 0; border-top: 1.5px dotted var(--muted); border-radius: 0 !important; }
.cw-leg-ma200 { width: 12px; height: 0; border-top: 1.5px dashed var(--muted); border-radius: 0 !important; }
.cw-leg-ar { width: 12px; height: 0; border-top: 1.5px dashed var(--tf-accent, #c084fc); border-radius: 0 !important; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; }
@media (max-width: 760px) { .charts-grid { grid-template-columns: 1fr; } }

.cw {
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px;
  padding: 8px 9px 6px; display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.cw-head { display: flex; align-items: center; gap: 8px; }
.cw-struct {
  flex: 1 1 0; min-width: 0; background: var(--chip-bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; padding: 3px 7px;
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.2px;
}
.cw-struct:focus { outline: none; border-color: var(--tf-accent, var(--cyan)); }
.cw-stat { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cw-stat b { font-size: 13px; }
.cw-chg { font-size: 11px; }
.cw-chg.up { color: var(--up); }
.cw-chg.down { color: var(--down); }
.cw-z { font-size: 10px; color: var(--muted); }
.cw-analytics { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 13px; }
.cw-zt { white-space: nowrap; }
.cw-zt.zw { color: var(--text); }
.cw-zt.zx { color: var(--tf-accent, #c084fc); font-weight: 700; }
.cw-tag { color: var(--muted); opacity: 0.7; }
.cw-ar { white-space: nowrap; margin-left: auto; padding: 0 4px; border-radius: 4px; background: var(--chip-bg); }
.cw-ar-up { color: var(--up); }
.cw-ar-down { color: var(--down); }
.cw-ar-flat { color: var(--muted); }
.cw-periods { display: flex; gap: 2px; flex-wrap: wrap; }
.cw-per {
  background: transparent; color: var(--muted); border: 1px solid transparent;
  border-radius: 5px; padding: 1px 6px; font: inherit; font-size: 10px; cursor: pointer;
}
.cw-per:hover { color: var(--text); background: var(--chip-bg); }
.cw-per.active { background: var(--tf-accent, var(--cyan)); color: #10061f; font-weight: 700; }
.cw-chart { position: relative; height: 118px; }
.cw-svg { width: 100%; height: 118px; display: block; }
.cw-svg .cw-ax { fill: var(--muted); font-size: 8px; font-family: inherit; }
.cw-svg .cw-ax-r { text-anchor: end; }
.cw-zeroline { stroke: var(--border); stroke-width: 0.6; stroke-dasharray: 3 3; }
.cw-ma { stroke-width: 0.8; opacity: 0.55; }
.cw-ma100 { stroke: var(--muted); stroke-dasharray: 1.5 1.5; }
.cw-ma200 { stroke: var(--muted); stroke-dasharray: 4 2; opacity: 0.4; }
.cw-fcband { fill: var(--tf-accent, #c084fc); opacity: 0.1; stroke: none; }
.cw-fcline { stroke-width: 1; stroke-dasharray: 3 2; opacity: 0.85; }
.cw-fcdiv { stroke: var(--border); stroke-width: 0.6; stroke-dasharray: 2 2; }
.cw-tri-hawk { fill: var(--down); stroke: var(--panel); stroke-width: 0.5; }
.cw-tri-dove { fill: var(--up); stroke: var(--panel); stroke-width: 0.5; }
/* hover scrubber overlays */
.cw-cross { position: absolute; top: 2px; bottom: 16px; width: 1px; background: var(--muted); opacity: 0.45; pointer-events: none; }
.cw-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--text); border: 1px solid var(--panel); pointer-events: none; margin: -3px 0 0 -3px; }
.cw-tip { position: absolute; top: 3px; z-index: 6; pointer-events: none; display: flex; gap: 7px; align-items: center;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px;
  font-size: 10px; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cw-tip-ev { font-weight: 700; }
.cw-load, .cw-err {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted); text-align: center; padding: 0 8px;
}
.cw-err { color: var(--down); }

/* ===== Treasury: debt & deficit ===== */
.fiscal-kpis {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.kpi-card {
  background: var(--panel); border: 1px solid var(--panel-border); box-shadow: var(--panel-shadow);
  border-radius: 9px; padding: 10px 12px; border-left: 3px solid var(--muted);
}
.kpi-card.tone-down { border-left-color: var(--down); }
.kpi-card.tone-up { border-left-color: var(--up); }
.kpi-card.tone-neutral { border-left-color: var(--muted); }
.kpi-label { color: var(--muted); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.kpi-value { font-size: 24px; font-weight: 700; margin: 3px 0 2px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.kpi-unit { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.kpi-sub { color: var(--muted); font-size: 10.5px; }
.fiscal-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .fiscal-charts { grid-template-columns: 1fr; } }
.chart-panel { padding: 11px 13px 8px; }
.chart-panel .panel-head { margin-bottom: 6px; display: flex; align-items: baseline; justify-content: space-between; }
.chart-panel .panel-head h3 { font-size: 13px; }
.chart-note { color: var(--muted); font-size: 10px; }
.fiscal-chart { width: 100%; height: auto; display: block; }
.ch-lbl { fill: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.chart-empty { color: var(--muted); font-size: 12px; padding: 20px; text-align: center; }

/* ===== RV: smooth SOFR curve ===== */
.rv-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
@media (max-width: 980px) { .rv-wrap { grid-template-columns: 1fr; } }
.rv-chart-panel { padding: 12px 14px 10px; }
.rv-chart-panel .panel-head { margin-bottom: 6px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rv-chart-panel .panel-head h3 { font-size: 14px; }
.rv-chart { width: 100%; height: auto; display: block; }
.rv-tension { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.rv-tension .ap-slider { width: 130px; }
.rv-tension b { color: #a78bfa; font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }
.rv-method { flex-basis: 100%; font-size: 10px; }
.rv-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.rv-legend i { display: inline-block; width: 14px; height: 3px; margin-right: 5px; vertical-align: middle; }
.rv-side { display: flex; flex-direction: column; gap: 12px; }
.rv-calc { padding: 12px 14px; }
.rv-calc .panel-head h3 { font-size: 13px; }
.rv-calc-row { display: flex; align-items: center; gap: 8px; }
.rv-sel {
  flex: 1; background: var(--chip-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 7px; font: inherit; font-size: 12px;
}
.rv-arrow { color: var(--muted); }
.rv-calc-out { margin-top: 10px; text-align: center; }
.rv-fwd { font-size: 30px; font-weight: 700; color: #a78bfa; font-variant-numeric: tabular-nums; line-height: 1; }
.rv-fwd-u { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.rv-knots { padding: 10px 12px; }
.rv-knots .panel-head h3 { font-size: 13px; }
.rv-knots-scroll { max-height: 360px; overflow-y: auto; }
.rv-knots-scroll thead th { position: sticky; top: 0; background: var(--panel); }

/* forwards blotter */
.rv-blotter-panel { padding: 12px 14px 10px; }
.rv-blotter-panel .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-blotter-panel .panel-head h3 { font-size: 14px; }
.rvb-hint { font-size: 10px; font-weight: 400; margin-left: 8px; }
.rvb-scroll { max-height: 440px; overflow-y: auto; }
.rvb-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.rvb-table thead th {
  position: sticky; top: 0; background: var(--panel); text-align: right; color: var(--muted);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; padding: 4px 8px; border-bottom: 1px solid var(--border);
}
.rvb-table thead th:nth-child(2) { text-align: left; }
.rvb-table td { padding: 2px 8px; border-bottom: 1px solid var(--row-border); text-align: right; }
.rvb-row { cursor: pointer; }
.rvb-row:hover { background: var(--panel-2); }
.rvb-row.sel { background: color-mix(in srgb, #a78bfa 16%, transparent); box-shadow: inset 3px 0 0 #a78bfa; }
.rvb-n { color: var(--muted); width: 26px; }
.rvb-struct { text-align: left; }
.rvb-input {
  width: 132px; background: transparent; border: 1px solid transparent; border-radius: 5px;
  color: var(--text); font: inherit; font-size: 12px; padding: 3px 6px; font-variant-numeric: tabular-nums;
}
.rvb-input:hover { border-color: var(--border); }
.rvb-input:focus { outline: none; border-color: #a78bfa; background: var(--chip-bg); }
.rvb-last { font-weight: 600; }
.rvb-u { color: var(--muted); font-size: 10px; margin-left: 2px; font-weight: 400; }
.rvb-chg.up { color: var(--up); }
.rvb-chg.down { color: var(--down); }
.rvb-z { border-radius: 4px; min-width: 46px; }
.rvb-spark { width: 116px; }
.rvb-spk { display: inline-block; vertical-align: middle; }
.rvb-warn { color: var(--gold); cursor: help; }
.rvh-sel { color: #a78bfa; }

/* butterfly model tab */
.fly-table .rvb-input { width: 108px; }
.fly-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 14px; align-items: start; }
@media (max-width: 940px) { .fly-detail-grid { grid-template-columns: 1fr; } }
.fly-charts { min-width: 0; }
.fly-chart-note { font-size: 10px; color: var(--muted); margin: 4px 0 2px; }
.fly-loadings { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 8px; font-size: 11px; }
.fly-load { padding: 2px 7px; border-radius: 5px; background: var(--chip-bg); font-variant-numeric: tabular-nums; }
.fly-load.up { color: var(--up); } .fly-load.down { color: var(--down); }
.fly-stats { display: flex; flex-direction: column; gap: 8px; }

/* forward-structure history */
.rv-hist-panel { padding: 12px 14px 10px; }
.rv-hist-panel .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-hist-panel .panel-head h3 { font-size: 14px; }
.rvh-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rvh-input {
  background: var(--chip-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 9px; font: inherit; font-size: 13px; width: 140px; font-variant-numeric: tabular-nums;
}
.rvh-btn {
  background: #a78bfa; color: #0b0b12; border: none; border-radius: 6px;
  padding: 5px 12px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.rvh-periods { display: inline-flex; gap: 2px; }
.rvh-per {
  background: var(--chip-bg); color: var(--muted); border: 1px solid var(--border);
  padding: 4px 9px; font: inherit; font-size: 11px; cursor: pointer;
}
.rvh-per:first-child { border-radius: 6px 0 0 6px; }
.rvh-per:last-child { border-radius: 0 6px 6px 0; }
.rvh-per.active { color: var(--on-accent, #0b0b12); background: #a78bfa; border-color: #a78bfa; }
.rvh-grid { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 14px; align-items: start; }
@media (max-width: 900px) { .rvh-grid { grid-template-columns: 1fr; } }
.rvh-chart { width: 100%; height: auto; display: block; }
.rvh-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.rvh-legend i { display: inline-block; width: 14px; height: 3px; margin-right: 5px; vertical-align: middle; }
.rvh-stats { display: flex; flex-direction: column; gap: 8px; }
.rvh-stat { background: var(--panel-2); border: 1px solid var(--row-border); border-radius: 8px; padding: 7px 10px; }
.rvh-stat span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); }
.rvh-stat b { font-size: 15px; font-variant-numeric: tabular-nums; }
.rvh-stat b i { font-size: 11px; font-style: normal; color: var(--muted); margin-left: 2px; }
.rvh-stat small { color: var(--muted); font-size: 10px; }
.rvh-stat.big b { font-size: 22px; color: #a78bfa; }
.rvh-stat b.z-mid { color: var(--gold); }
.rvh-stat b.z-hi { color: var(--down); }
.rvh-err { color: var(--muted); font-size: 12px; padding: 16px; }

/* ===== Nominals (cash Treasury RV + futures/CTD basis) ===== */
.nom-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.nom-secs { flex-wrap: wrap; }
.nom-sec.active { color: var(--on-accent, #0b0b12); background: #818cf8; border-color: #818cf8; }
.nom-meta { font-size: 11px; }
.nom-curve-panel { padding: 12px 14px 10px; margin-bottom: 14px; }
.nom-curve-panel .panel-head, .nom-issues-panel .panel-head, .nom-fut .panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px;
}
.nom-curve-panel .panel-head h3 { font-size: 14px; }
.nom-issues-panel { padding: 12px 14px 10px; margin-bottom: 14px; }
.nom-fut { margin-top: 14px; }
.nom-table-scroll { max-height: 460px; overflow-y: auto; }
.nom-issue-table th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.nom-issue-table td { padding: 2px 8px; }
.nom-otr { background: color-mix(in srgb, #818cf8 12%, transparent); }
.nom-otr-tag { font-size: 9px; color: #818cf8; margin-left: 5px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.nom-rc { font-size: 9px; text-transform: uppercase; letter-spacing: 0.3px; margin-left: 4px; opacity: 0.85; }
.nom-rc.cheap { color: rgb(var(--cheap-rgb)); }
.nom-rc.rich { color: rgb(var(--rich-rgb)); }
.nom-ctd { text-align: right; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== RV DV01 ladder ===== */
.rv-risk-panel { padding: 12px 14px 10px; margin-top: 14px; }
.rv-risk-panel .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-risk-panel .panel-head h3 { font-size: 14px; }
.rsk-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rsk-seg { display: inline-flex; }
.rsk-opt { background: var(--chip-bg); color: var(--muted); border: 1px solid var(--border); padding: 4px 10px; font: inherit; font-size: 11px; cursor: pointer; }
.rsk-seg .rsk-opt:first-child { border-radius: 6px 0 0 6px; }
.rsk-seg .rsk-opt:last-child { border-radius: 0 6px 6px 0; }
.rsk-opt.active { color: var(--on-accent, #0b0b12); background: #a78bfa; border-color: #a78bfa; }
.rsk-size { width: 78px; background: var(--chip-bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.rsk-size:focus { outline: none; border-color: #a78bfa; }
.rsk-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.rsk-kpi { display: flex; flex-direction: column; }
.rsk-kpi span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); }
.rsk-kpi b { font-size: 16px; font-variant-numeric: tabular-nums; }
.rsk-kpi b.up { color: var(--up); } .rsk-kpi b.down { color: var(--down); }
.rsk-legs { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.rsk-leg { font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--row-border); font-variant-numeric: tabular-nums; }
.rsk-leg i { font-style: normal; text-transform: uppercase; font-size: 9px; color: var(--muted); margin: 0 2px; }
.rsk-leg.rec { box-shadow: inset 2px 0 0 var(--up); }
.rsk-leg.pay { box-shadow: inset 2px 0 0 var(--down); }
.rsk-leg.up { box-shadow: inset 2px 0 0 var(--up); }    /* pay-positive: pay/short = green */
.rsk-leg.down { box-shadow: inset 2px 0 0 var(--down); } /* receive/long = red */
.rsk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .rsk-grid { grid-template-columns: 1fr; } }
.rsk-sub { font-size: 11px; margin-bottom: 4px; }
.dv01-ladder { width: 100%; height: auto; display: block; }
.rsk-struct-table td { padding: 2px 8px; }
.rsk-struct-table .up { color: var(--up); } .rsk-struct-table .down { color: var(--down); }

/* ===== Structure risk (typed spec + size) ===== */
.rv-risk-panel .rvb-hint code { background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 3px; }
.strk-controls { display: flex; gap: 8px; margin-bottom: 10px; }
.strk-input { flex: 1; background: var(--input-bg, rgba(255,255,255,0.04)); border: 1px solid var(--panel-border); border-radius: 6px; color: var(--text); padding: 8px 12px; font-size: 14px; font-family: ui-monospace, monospace; letter-spacing: 0.2px; }
.strk-input:focus { outline: none; border-color: #a78bfa; }
.strk-hor { width: 54px; background: var(--input-bg, rgba(255,255,255,0.04)); border: 1px solid var(--panel-border); border-radius: 6px; color: var(--text); padding: 8px 6px; font-size: 13px; font-family: ui-monospace, monospace; text-align: center; }
.strk-hor:focus { outline: none; border-color: #a78bfa; }
.strk-risk-grid { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .strk-risk-grid { grid-template-columns: 1fr; } }
.strk-pnl-table { max-width: 300px; }
.strk-pnl-table th { font-size: 9px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); text-align: right; padding: 0 10px 3px; font-weight: 600; }
.strk-pnl-table th:first-child { text-align: left; }
.strk-pnl-table td { padding: 2px 10px; }
.strk-pnl-table td:first-child { color: var(--muted); }
.strk-pnl-table .rt-num { text-align: right; }
.strk-pnl-table b { font-variant-numeric: tabular-nums; }
.strk-pnl-table b.up { color: var(--up); } .strk-pnl-table b.down { color: var(--down); }
.strk-cr td:first-child { padding-left: 20px; font-size: 11px; opacity: 0.85; }
.strk-pnl-total td { border-top: 1px solid var(--panel-border); font-weight: 700; padding-top: 4px; }
.strk-pnl-total td:first-child { color: var(--text); }

/* ===== Markets — Koyfin-style cross-market performance grid ===== */
.mk-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 11px; margin-bottom: 14px; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(540px, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 620px) { .mk-grid { grid-template-columns: 1fr; } }

/* Cracks — late-cycle stress monitor */
.cr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 14px; flex-wrap: wrap; }
.cr-title { font-size: 20px; margin: 0; }
.cr-sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.cr-framing { max-width: 660px; font-size: 12px; margin: 6px 0 0; }
.cr-hero { display: flex; align-items: center; gap: 14px; background: rgba(244,63,94,0.06); border: 1px solid rgba(244,63,94,0.35); border-radius: 12px; padding: 12px 18px; }
.cr-score { display: flex; align-items: baseline; }
.cr-score-n { font-size: 34px; font-weight: 700; color: #f43f5e; font-variant-numeric: tabular-nums; }
.cr-score-d { font-size: 16px; color: var(--muted); margin-left: 4px; }
.cr-score-lbl { display: flex; flex-direction: column; }
.cr-score-lbl b { font-size: 13px; }
.cr-score-lbl .muted { font-size: 11px; }
.cr-panel { padding: 10px 12px 12px; margin-bottom: 14px; }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.cr-tile { border: 1px solid var(--border, #1f2937); border-left-width: 3px; border-radius: 8px; padding: 8px 10px; background: rgba(255,255,255,0.015); }
.cr-tile.cr-red { border-left-color: #f43f5e; }
.cr-tile.cr-amber { border-left-color: #f59e0b; }
.cr-tile.cr-green { border-left-color: #4ade80; }
.cr-tile.cr-off { border-left-color: #64748b; opacity: 0.6; }
.cr-top { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.cr-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cr-val { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cr-unit { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.cr-meta { display: flex; gap: 8px; font-size: 11px; margin: 2px 0 4px; }
.cr-z { color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-worse { color: #f87171; }
.cr-better { color: #4ade80; }
.cr-spark { height: 22px; color: var(--muted); }
.cr-src { font-size: 10px; color: var(--muted); margin-top: 2px; }
.cr-foot p { font-size: 11px; margin: 4px 0; }
.cr-link { background: none; border: 1px solid var(--border, #1f2937); border-radius: 6px; color: var(--muted); font-size: 11px; padding: 2px 8px; cursor: pointer; margin-left: 6px; }
.cr-link:hover { color: var(--fg, #e5e7eb); }

/* FOMC read — archived as a clickable pill on the Today tab */
.fomc-pillwrap { margin-bottom: 12px; }
.fomc-pill { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer; background: rgba(255,255,255,0.02); border: 1px solid var(--border, #1f2937); border-left-width: 3px; border-radius: 8px; padding: 8px 12px; color: var(--fg, #e5e7eb); font: inherit; }
.fomc-pill:hover { background: rgba(255,255,255,0.05); }
.fomc-pill-hawk { border-left-color: #f87171; }
.fomc-pill-dove { border-left-color: #4ade80; }
.fomc-pill-neutral { border-left-color: #94a3b8; }
.fomc-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold, #fbbf24); flex: none; }
.fomc-pill-lbl { font-weight: 600; font-size: 13px; }
.fomc-pill-meta { color: var(--muted); font-size: 12px; }
.fomc-pill .fw-lean { margin-left: auto; }
.fomc-pill-arrow { color: var(--muted); font-size: 11px; transition: transform 0.15s; }
.fomc-pill.open .fomc-pill-arrow { transform: rotate(180deg); }
.fomc-pill-dd { margin-top: 8px; }

/* Data tab — category-organised economic-data catalog */
.dt-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.dt-navb { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.02); border: 1px solid var(--border, #1f2937); border-radius: 999px; color: var(--muted); font-size: 12px; padding: 4px 12px; cursor: pointer; }
.dt-navb:hover { color: var(--fg, #e5e7eb); }
.dt-navb.on { color: var(--fg, #e5e7eb); border-color: var(--tf-accent, #38bdf8); background: color-mix(in srgb, var(--tf-accent, #38bdf8) 16%, transparent); }
.dt-navn { font-style: normal; font-size: 10px; opacity: 0.55; }
.dt-dialpanel, .dt-gridpanel { padding: 10px 12px 12px; margin-bottom: 14px; }
.dt-dials { display: flex; flex-wrap: wrap; gap: 12px; }
.dt-dial { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 10px; border: 1px solid transparent; border-radius: 8px; transition: background 0.12s, border-color 0.12s; }
.dt-dial:hover { background: rgba(255,255,255,0.045); }
.dt-dial.on { background: rgba(56,189,248,0.08); border-color: rgba(56,189,248,0.4); }
.dt-dial-meta { display: flex; flex-direction: column; }
.dt-dial-meta b { font-size: 12px; }
.dt-dial-meta .muted { font-size: 11px; }
.dt-dial-hint { font-size: 10px; color: var(--muted); opacity: 0; transition: opacity 0.12s; }
.dt-dial:hover .dt-dial-hint, .dt-dial.on .dt-dial-hint { opacity: 0.75; }
.dt-mppanel { padding: 10px 12px 12px; margin-bottom: 14px; }
.mp-svg { width: 100%; max-width: 720px; height: auto; display: block; margin: 4px auto 2px; }
.mp-tlabel { fill: #fff; font-size: 12px; font-weight: 600; }
.mp-tval { fill: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mp-tval .mp-pos { fill: #86efac; font-weight: 600; } .mp-tval .mp-neg { fill: #fca5a5; font-weight: 600; }
.mp-tval tspan { font-size: 10px; }
.mp-slabel { fill: #cbd5e1; font-size: 10px; font-weight: 600; }
.mp-scap { fill: var(--muted); font-size: 10px; }
.mp-stats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 6px 0 4px; }
.mp-stat { display: flex; flex-direction: column; align-items: center; padding: 6px 14px; border: 1px solid var(--border, #1f2937); border-radius: 8px; background: rgba(78,121,167,0.08); min-width: 120px; }
.mp-stat-v { font-size: 18px; font-weight: 700; color: #7aa6d6; font-variant-numeric: tabular-nums; }
.mp-stat-l { font-size: 10px; color: var(--muted); text-align: center; }
.mp-comp { margin: 8px auto 2px; max-width: 720px; }
.mp-comp-head { font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.mp-comp-head .muted { font-weight: 400; }
.mp-c-bar { display: flex; width: 100%; height: 26px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border, #1f2937); }
.mp-c-seg { height: 100%; transition: opacity 0.12s; }
.mp-c-seg:hover { opacity: 0.82; }
.mp-c-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 11px; }
.mp-c-li { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.mp-c-li i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.mp-note { font-size: 10px; text-align: center; margin-top: 4px; }
.dt-mipanel { padding: 10px 12px 12px; margin-bottom: 14px; }
.mi-lead-h { font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.mi-split-bar { display: flex; width: 100%; height: 24px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border, #1f2937); }
.mi-seg-real { background: #4ade80; height: 100%; } .mi-seg-infl { background: #f87171; height: 100%; }
.mi-split-lbl { display: flex; justify-content: space-between; font-size: 11px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.mi-split-lbl .pos { color: #4ade80; } .mi-split-lbl .neg { color: #f87171; }
.mi-bfb { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 0 8px; padding: 8px 12px; border: 1px solid var(--border, #1f2937); border-radius: 8px; background: rgba(255,255,255,0.02); }
.mi-bfb.pos { background: rgba(74,222,128,0.08); border-color: rgba(74,222,128,0.35); }
.mi-bfb.neg { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.35); }
.mi-bfb-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mi-bfb-read { font-size: 15px; font-weight: 700; }
.mi-bfb-pct { font-size: 11px; color: var(--muted); margin-left: auto; }
.mi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.mi-tile { border: 1px solid var(--border, #1f2937); border-radius: 8px; padding: 8px 10px; background: rgba(255,255,255,0.015); }
.mi-v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; } .mi-v i { font-size: 11px; color: var(--muted); font-weight: 400; font-style: normal; margin-left: 2px; }
.mi-l { display: block; font-size: 10.5px; color: var(--muted); margin: 2px 0; }
.mi-s { display: block; height: 16px; color: var(--muted); }
.mi-note { font-size: 10px; margin-top: 8px; line-height: 1.5; }
.dt-dialchart { margin-top: 12px; border-top: 1px solid var(--border, #1f2937); padding-top: 8px; }
.dth-svg { width: 100%; height: auto; }
.dth-rec { fill: var(--muted); opacity: 0.14; }
.dth-mk { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.55; }
.dth-mklab { fill: var(--muted); font-size: 9px; opacity: 0.85; }
.dt-sub { font-size: 12px; font-weight: 400; }
.dt-group { margin-top: 12px; }
.dt-group:first-of-type { margin-top: 4px; }
.dt-group-head { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--tf-accent, var(--accent, #38bdf8)); margin: 0 0 7px; padding-bottom: 5px;
  border-bottom: 1px solid var(--border, #1f2937); }
.dt-group-n { font-weight: 500; color: var(--muted, #94a3b8); background: rgba(255,255,255,0.05);
  border-radius: 999px; padding: 1px 7px; font-size: 10px; letter-spacing: 0; }
.dt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; align-items: start; }
.dt-tile { border: 1px solid var(--border, #1f2937); border-radius: 8px; padding: 8px 10px; background: rgba(255,255,255,0.015); cursor: pointer; }
.dt-tile:hover { background: rgba(255,255,255,0.045); }
.dt-tile.open { grid-column: 1 / -1; }
.dt-tile.dt-off { opacity: 0.5; cursor: default; }
.dt-t-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.dt-t-name { font-size: 12px; font-weight: 600; }
.dt-t-exparr { color: var(--muted); font-size: 10px; flex: none; transition: transform 0.15s; }
.dt-tile.open .dt-t-exparr { transform: rotate(180deg); }
.dt-t-val { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.dt-t-unit { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.dt-t-meta { display: flex; gap: 8px; font-size: 11px; margin: 2px 0; font-variant-numeric: tabular-nums; }
.dt-t-meta .pos { color: #4ade80; } .dt-t-meta .neg { color: #f87171; }
.dt-z { color: var(--muted); } .dt-z.pos, .dt-z.neg { color: #fbbf24; font-weight: 600; }  /* amber = extreme reading (|z|>=1.5), sign-neutral */
.dt-t-spark { height: 16px; color: var(--muted); }
.dt-t-src { font-size: 10px; color: var(--muted); margin-top: 2px; }
.dt-t-exp { margin-top: 10px; }
.dt-exp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 12px; }

/* ---- Inflation-measures explorer: dial cascade + compact subcomponent panels ---- */
.infl-cascade { padding: 10px 12px 12px; margin-bottom: 14px; }
.infl-casc-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.infl-rollup { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 14px;
  border: 1px solid var(--border, #1f2937); border-radius: 12px; background: rgba(255,255,255,0.02); min-width: 176px; }
.infl-rollup-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--muted, #94a3b8); }
.infl-rollup-sub { font-size: 12px; text-align: center; }
.infl-econ-link { margin-top: 4px; font-size: 11px; background: none; border: none; color: var(--accent, #38bdf8);
  cursor: pointer; padding: 2px 4px; }
.infl-econ-link:hover { text-decoration: underline; }
.infl-casc-arrow { font-size: 11px; color: var(--muted, #94a3b8); writing-mode: vertical-rl; transform: rotate(180deg); }
.infl-dials { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; flex: 1; min-width: 320px; }
.infl-dial { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px 5px;
  border: 1px solid var(--border, #1f2937); border-radius: 9px; background: rgba(255,255,255,0.015); cursor: pointer; }
.infl-dial:hover { background: rgba(255,255,255,0.05); }
.infl-dial .hlt-gauge { width: 74px; height: auto; }
.infl-dial-na { height: 44px; display: flex; align-items: center; color: var(--muted, #94a3b8); font-size: 11px; }
.infl-dial-rate { font-size: 13px; font-weight: 600; margin-top: -6px; }
.infl-dial-name { font-size: 10.5px; color: var(--muted, #94a3b8); }
.infl-dial.st-good { border-color: rgba(34,197,94,0.4); }
.infl-dial.st-warn { border-color: rgba(234,179,8,0.4); }
.infl-dial.st-bad { border-color: rgba(239,68,68,0.45); }

/* ── Overall Economy home (Data-tab landing) ───────────────────────────────────────── */
.dt-navb-ov { font-weight: 700; }
.dt-navb-ov .dt-navn { color: #e2b13c; font-style: normal; }
.econ-home { padding: 12px 14px 14px; }
.econ-home .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.econ-toggle { display: inline-flex; border: 1px solid var(--border, #1f2937); border-radius: 999px; overflow: hidden; }
.econ-tg { background: rgba(255,255,255,0.02); border: none; color: var(--muted, #94a3b8); font-size: 12px; padding: 5px 14px; cursor: pointer; }
.econ-tg:hover { color: var(--fg, #e5e7eb); }
.econ-tg.on { color: #0b1220; background: var(--accent, #38bdf8); font-weight: 600; }
.econ-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.econ-master { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 20px 14px;
  border: 1px solid var(--border, #1f2937); border-radius: 16px; background: rgba(255,255,255,0.025); min-width: 200px; }
.econ-master.st-good { border-color: rgba(34,197,94,0.5); box-shadow: 0 0 0 1px rgba(34,197,94,0.18); }
.econ-master.st-warn { border-color: rgba(234,179,8,0.5); box-shadow: 0 0 0 1px rgba(234,179,8,0.16); }
.econ-master.st-bad { border-color: rgba(239,68,68,0.55); box-shadow: 0 0 0 1px rgba(239,68,68,0.18); }
.econ-master-label { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted, #94a3b8); }
.econ-master .hlt-gauge { width: 150px; height: auto; }
.econ-master-sub { font-size: 15px; }
.econ-master-hint { font-size: 11px; text-align: center; max-width: 220px; line-height: 1.4; margin-top: 2px; }
.econ-casc-arrow { font-size: 11px; color: var(--muted, #94a3b8); writing-mode: vertical-rl; transform: rotate(180deg); }
.econ-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; flex: 1; min-width: 320px; }
.econ-cat { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 5px 6px;
  border: 1px solid var(--border, #1f2937); border-radius: 10px; background: rgba(255,255,255,0.015); cursor: pointer; text-align: center; }
.econ-cat:hover { background: rgba(255,255,255,0.05); border-color: var(--tf-accent, #38bdf8); }
.econ-cat .hlt-gauge { width: 78px; height: auto; }
.econ-cat.st-good { border-color: rgba(34,197,94,0.35); }
.econ-cat.st-warn { border-color: rgba(234,179,8,0.35); }
.econ-cat.st-bad { border-color: rgba(239,68,68,0.4); }
.econ-cat-name { font-size: 11.5px; font-weight: 600; color: var(--fg, #e5e7eb); margin-top: -4px; }
.econ-cat-sub { font-size: 10px; line-height: 1.3; }
.econ-note { font-size: 11px; margin-top: 12px; line-height: 1.5; }

/* Today-tab link out to the full economy dial board (blocks/context now live on Overall home) */
.hlt-board-link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 4px; }
.hlt-board-btn { background: color-mix(in srgb, var(--accent, #38bdf8) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #38bdf8) 42%, transparent); color: var(--fg, #e5e7eb);
  border-radius: 9px; padding: 8px 15px; font-size: 12.5px; cursor: pointer; }
.hlt-board-btn:hover { background: color-mix(in srgb, var(--accent, #38bdf8) 26%, transparent); }
.hlt-board-link .muted { font-size: 11px; max-width: 340px; line-height: 1.45; }

/* ── AI Mania — the AI supply chain (demand -> supply) ─────────────────────────────── */
.aim-wrap { max-width: 1120px; margin: 0 auto; }
.aim-hero { padding: 14px 16px 12px; }
.aim-hero h2 { font-size: 18px; margin: 0; }
.aim-totals { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0 12px; }
.aim-stat { flex: 1 1 150px; border: 1px solid var(--border, #1f2937); border-radius: 12px;
  background: rgba(232,121,249,0.05); padding: 10px 14px; }
.aim-snum { display: block; font-size: 26px; font-weight: 700; color: var(--tf-accent, #e879f9); letter-spacing: -0.02em; }
.aim-slbl { font-size: 11.5px; color: var(--muted, #94a3b8); }
.aim-themes { margin: 4px 0 6px; padding-left: 18px; font-size: 12px; line-height: 1.6; color: var(--fg, #e5e7eb); }
.aim-themes li { margin-bottom: 2px; }
.aim-note { font-size: 11px; line-height: 1.5; }
.aim-flowlabel { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--muted, #94a3b8); margin: 6px 4px 2px; }
.aim-layer { border: 1px solid var(--border, #1f2937); border-left: 3px solid var(--tf-accent, #e879f9);
  border-radius: 12px; background: var(--panel, rgba(255,255,255,0.02)); padding: 10px 14px 12px; margin: 6px 0; }
.aim-lhead { display: flex; align-items: center; gap: 12px; }
.aim-lpos { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 700; color: #0b1220; background: var(--tf-accent, #e879f9); }
.aim-ltitles { flex: 1; min-width: 0; }
.aim-ltitles h3 { font-size: 14.5px; margin: 0; }
.aim-lone { font-size: 11.5px; color: var(--muted, #94a3b8); }
.aim-ltot { font-size: 12px; color: var(--fg, #e5e7eb); text-align: right; white-space: nowrap; }
.aim-ltot b { color: var(--tf-accent, #e879f9); }
.aim-lbottle { font-size: 11px; color: #f59e0b; margin: 5px 0 8px; opacity: 0.92; }
.aim-cos { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 8px; }
.aim-co { text-align: left; border: 1px solid var(--border, #1f2937); border-radius: 9px; padding: 8px 10px;
  background: rgba(255,255,255,0.015); cursor: pointer; display: flex; flex-direction: column; gap: 3px;
  border-left: 3px solid rgba(148,163,184,0.35); }
.aim-co:hover { background: rgba(255,255,255,0.05); }
.aim-co.exp-pure-play { border-left-color: #e879f9; }
.aim-co.exp-major { border-left-color: #38bdf8; }
.aim-co.exp-partial { border-left-color: rgba(148,163,184,0.4); }
.aim-co-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.aim-name { font-size: 12.5px; font-weight: 600; color: var(--fg, #e5e7eb); }
.aim-tk { font-size: 10px; font-weight: 600; color: var(--muted, #94a3b8); font-family: ui-monospace, monospace; }
.aim-priv { font-size: 9.5px; font-weight: 600; color: #e879f9; text-transform: uppercase; letter-spacing: 0.04em; }
.aim-co-mid { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.aim-val { font-size: 15px; font-weight: 700; color: var(--fg, #e5e7eb); }
.aim-ref { font-size: 10.5px; color: var(--muted, #94a3b8); font-style: italic; }
.aim-move { font-size: 10.5px; display: inline-flex; gap: 5px; font-variant-numeric: tabular-nums; }
.aim-move .pos { color: #22c55e; } .aim-move .neg { color: #ef4444; } .aim-move .aim-m0 { color: var(--muted, #64748b); }
.aim-co-role { font-size: 10.5px; color: var(--muted, #94a3b8); line-height: 1.35; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.aim-co.open .aim-co-role { -webkit-line-clamp: unset; }
.aim-co-note { font-size: 10px; color: var(--muted, #64748b); line-height: 1.4; display: none; margin-top: 2px;
  border-top: 1px dashed var(--border, #1f2937); padding-top: 3px; }
.aim-co.open .aim-co-note { display: block; }
.aim-flow { text-align: center; color: var(--tf-accent, #e879f9); font-size: 12px; opacity: 0.55; margin: -1px 0; }
.aim-subnav { display: inline-flex; gap: 6px; margin: 4px 0 10px; }
.aim-subbtn { background: rgba(255,255,255,0.02); border: 1px solid var(--border, #1f2937); border-radius: 999px;
  color: var(--muted, #94a3b8); font-size: 12.5px; padding: 6px 14px; cursor: pointer; }
.aim-subbtn:hover { color: var(--fg, #e5e7eb); }
.aim-subbtn.on { color: #0b1220; background: var(--tf-accent, #e879f9); font-weight: 600; border-color: var(--tf-accent, #e879f9); }

/* Atoms -> Data center pipeline graphic */
.aip-panel { padding: 12px 14px 14px; }
.aip-chartwrap { overflow-x: auto; }
.aip-chart { width: 100%; min-width: 640px; height: auto; display: block; }
.aip-chart .aip-grid { stroke: var(--border, #1f2937); stroke-dasharray: 2 3; }
.aip-chart .aip-dot { fill: var(--tf-accent, #e879f9); }
.aip-chart .aip-axis { stroke: var(--border, #1f2937); stroke-width: 1; }
.aip-chart .aip-vlabel { fill: var(--fg, #e5e7eb); font-size: 12.5px; font-weight: 700; }
.aip-chart .aip-icon { font-size: 17px; }
.aip-chart .aip-xlabel { fill: var(--muted, #94a3b8); font-size: 10.5px; }
.aip-cards { display: flex; gap: 0; align-items: stretch; overflow-x: auto; padding: 6px 2px 4px; }
.aip-card { flex: 0 0 200px; border: 1px solid var(--border, #1f2937); border-top: 3px solid var(--tf-accent, #e879f9);
  border-radius: 10px; background: rgba(255,255,255,0.015); padding: 9px 11px; display: flex; flex-direction: column; gap: 5px; }
.aip-c-head { display: flex; align-items: center; gap: 7px; }
.aip-c-icon { font-size: 18px; }
.aip-c-stage { font-size: 12.5px; font-weight: 700; color: var(--fg, #e5e7eb); line-height: 1.15; }
.aip-c-val { font-size: 15px; font-weight: 700; color: var(--tf-accent, #e879f9); }
.aip-c-yr { font-size: 10px; font-weight: 400; color: var(--muted, #94a3b8); }
.aip-c-transform { font-size: 10.5px; color: var(--muted, #94a3b8); line-height: 1.4; }
.aip-c-capex { font-size: 10.5px; color: #f59e0b; line-height: 1.4; }
.aip-c-capex b { color: var(--fg, #e5e7eb); font-weight: 600; }
.aip-c-cos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 3px; }
.aip-chip { font-size: 9.5px; color: var(--fg, #e5e7eb); background: rgba(255,255,255,0.05);
  border: 1px solid var(--border, #1f2937); border-radius: 5px; padding: 1px 5px; }
.aip-arrow { flex: 0 0 auto; align-self: center; color: var(--tf-accent, #e879f9); font-size: 16px; padding: 0 3px; opacity: 0.7; }
.aip-cap { font-size: 10.5px; margin-top: 8px; }

/* AI economics view (tokens -> energy -> revenue/profit) */
.aie-flowlabel { font-size: 12px; color: var(--muted, #94a3b8); margin: 4px 2px 10px; }
.aie-flowlabel b { color: var(--tf-accent, #e879f9); }
.aie-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aie-card { padding: 12px 14px 12px; margin: 0; }
.aie-card-wide { grid-column: 1 / -1; }
.aie-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.aie-head h3 { font-size: 14.5px; margin: 0; }
.aie-icon { font-size: 18px; }
.aie-hero { margin-bottom: 10px; }
.aie-hnum { font-size: 30px; font-weight: 700; color: var(--tf-accent, #e879f9); letter-spacing: -0.02em; }
.aie-hunit { font-size: 13px; color: var(--fg, #e5e7eb); }
.aie-hsub { font-size: 11.5px; line-height: 1.4; margin-top: 2px; }
.aie-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.aie-metric { border: 1px solid var(--border, #1f2937); border-radius: 8px; padding: 6px 9px; background: rgba(255,255,255,0.015); }
.aie-m-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.aie-m-label { font-size: 11px; color: var(--muted, #94a3b8); }
.aie-m-val { font-size: 14px; font-weight: 700; color: var(--fg, #e5e7eb); }
.aie-m-sub { font-size: 10px; color: var(--muted, #64748b); line-height: 1.35; margin-top: 2px; }
.aie-cos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 7px; margin-top: 10px; }
.aie-co { border: 1px solid var(--border, #1f2937); border-left: 3px solid var(--muted, #64748b); border-radius: 8px;
  padding: 6px 10px; display: flex; flex-direction: column; gap: 1px; background: rgba(255,255,255,0.015); }
.aie-co.profit-profit { border-left-color: #22c55e; }
.aie-co.profit-loss { border-left-color: #ef4444; }
.aie-co.profit-mixed { border-left-color: #f59e0b; }
.aie-co-name { font-size: 12px; font-weight: 600; color: var(--fg, #e5e7eb); }
.aie-co-val { font-size: 12px; color: var(--fg, #e5e7eb); }
.aie-co.profit-profit .aie-co-val { color: #22c55e; }
.aie-co.profit-loss .aie-co-val { color: #f87171; }
.aie-co-note { font-size: 10px; color: var(--muted, #64748b); }
.aie-note { font-size: 11px; line-height: 1.5; margin-top: 10px; }
@media (max-width: 720px) { .aie-wrap { grid-template-columns: 1fr; } }

/* per-token unit economics panel */
.apt-card { border-top: 3px solid var(--tf-accent, #e879f9); }
.apt-barwrap { overflow-x: auto; margin: 2px 0 10px; }
.apt-bar { width: 100%; min-width: 480px; height: auto; display: block; }
.apt-bar .apt-costbar { fill: rgba(239,68,68,0.22); }
.apt-bar .apt-revbar { fill: rgba(34,197,94,0.5); }
.apt-bar .apt-dot.cost, .apt-bar .apt-tick.cost, .apt-bar .apt-costm, .apt-bar .apt-dot.costm, .apt-bar .apt-tick.costm { fill: #f87171; stroke: #f87171; }
.apt-bar .apt-dot.rev, .apt-bar .apt-tick.rev, .apt-bar .apt-dot.revlist, .apt-bar .apt-tick.revlist { fill: #22c55e; stroke: #22c55e; }
.apt-bar .apt-tick { stroke-width: 1.5; }
.apt-bar .apt-lab { font-size: 10px; }
.apt-bar .apt-lab.cost, .apt-bar .apt-lab.costm { fill: #f87171; }
.apt-bar .apt-lab.rev, .apt-bar .apt-lab.revlist { fill: #22c55e; }
.apt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.apt-h { font-size: 12px; font-weight: 700; margin-bottom: 6px; padding-bottom: 3px; border-bottom: 1px solid var(--border, #1f2937); }
.apt-h-cost { color: #f87171; }
.apt-h-rev { color: #22c55e; }
.apt-verdict { margin-top: 10px; font-size: 13px; padding: 8px 12px; border-radius: 8px;
  background: color-mix(in srgb, var(--tf-accent, #e879f9) 12%, transparent); border: 1px solid color-mix(in srgb, var(--tf-accent, #e879f9) 30%, transparent); }
.apt-verdict b { color: var(--fg, #e5e7eb); }
.apt-narr { margin-top: 8px; }
@media (max-width: 720px) { .apt-cols { grid-template-columns: 1fr; } }

/* Support us (donate) page */
.sup-wrap { max-width: 820px; margin: 0 auto; }
.sup-hero { text-align: center; padding: 30px 26px 28px; }
.sup-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #f43f5e; border: 1px solid rgba(244,63,94,0.4); border-radius: 999px; padding: 3px 12px; margin-bottom: 14px; }
.sup-hero h1 { font-size: 26px; margin: 0 0 12px; line-height: 1.2; }
.sup-lead { font-size: 14px; line-height: 1.6; color: var(--fg, #e5e7eb); opacity: 0.9; max-width: 620px; margin: 0 auto 22px; }
.sup-btn { display: inline-block; font-size: 16px; font-weight: 700; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #f43f5e, #e11d48); border: none; border-radius: 12px; padding: 13px 34px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(244,63,94,0.35); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.sup-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(244,63,94,0.45); }
.sup-btn-off { background: var(--panel, #1f2937); color: var(--muted, #94a3b8); box-shadow: none; cursor: not-allowed; }
.sup-btn-off:hover { transform: none; box-shadow: none; }
.sup-sec { font-size: 11.5px; margin: 16px auto 0; max-width: 480px; line-height: 1.5; }
.sup-what { padding: 16px 18px 18px; margin-top: 14px; }
.sup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.sup-card { border: 1px solid var(--border, #1f2937); border-radius: 11px; padding: 12px 14px; background: rgba(255,255,255,0.015);
  display: flex; flex-direction: column; gap: 4px; }
.sup-ic { font-size: 22px; }
.sup-card b { font-size: 13px; color: var(--fg, #e5e7eb); }
.sup-card span:last-child { font-size: 11.5px; color: var(--muted, #94a3b8); line-height: 1.45; }
.sup-thanks { text-align: center; font-size: 12.5px; margin-top: 16px; }

/* politician trade search */
.pol-search { width: 100%; box-sizing: border-box; background: rgba(255,255,255,0.03); border: 1px solid var(--border, #1f2937);
  border-radius: 8px; color: var(--fg, #e5e7eb); font-size: 13px; padding: 8px 12px; margin-bottom: 8px; }
.pol-search:focus { outline: none; border-color: var(--tf-accent, #e879f9); }
.pol-results { max-height: 380px; overflow-y: auto; }
.pol-hint { font-size: 11px; margin-bottom: 4px; }

/* Stocks-tab money flows (per-ticker) */
.sfl-panel { padding: 12px 14px 14px; }
.sfl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sfl-col h4 { font-size: 12.5px; margin: 0 0 6px; display: flex; align-items: baseline; gap: 8px; }
.sfl-col h4 .up { color: #22c55e; font-size: 11px; font-weight: 600; }
.sfl-col h4 .down { color: #f87171; font-size: 11px; font-weight: 600; }
.sfl-ih { font-size: 12.5px; margin: 12px 0 6px; display: flex; align-items: baseline; gap: 8px; }
.sfl-ih .muted { font-size: 10px; font-weight: 400; }
.sfl-holds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.sfl-hold { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "inst val" "sh as"; gap: 0 8px;
  border: 1px solid var(--border, #1f2937); border-left: 3px solid #818cf8; border-radius: 7px; padding: 5px 9px; }
.sfl-inst { grid-area: inst; font-size: 12px; font-weight: 600; color: var(--fg, #e5e7eb); }
.sfl-val { grid-area: val; font-size: 13px; font-weight: 700; color: #818cf8; text-align: right; }
.sfl-sh { grid-area: sh; font-size: 10px; }
.sfl-as { grid-area: as; font-size: 10px; text-align: right; }
@media (max-width: 720px) { .sfl-grid { grid-template-columns: 1fr; } }

/* token segregation (stacked bars) */
.aseg-block { margin-bottom: 10px; }
.aseg-h { font-size: 11.5px; font-weight: 600; color: var(--muted, #94a3b8); margin-bottom: 4px; }
.astack { display: flex; width: 100%; height: 30px; border-radius: 7px; overflow: hidden; border: 1px solid var(--border, #1f2937); }
.aseg { display: flex; align-items: center; justify-content: center; min-width: 2px; overflow: hidden; }
.aseg-lab { font-size: 10.5px; font-weight: 700; color: #0b1220; white-space: nowrap; padding: 0 6px; text-shadow: 0 0 3px rgba(255,255,255,0.3); }
/* China disruption panel */
.achina-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 7px; margin-bottom: 4px; }
.achina-model { border: 1px solid var(--border, #1f2937); border-left: 3px solid #ef4444; border-radius: 8px; padding: 7px 9px; background: rgba(255,255,255,0.015); }
.achina-m-top { display: flex; align-items: baseline; gap: 6px; }
.achina-m-top b { font-size: 12.5px; color: var(--fg, #e5e7eb); }
.achina-ow { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #22c55e;
  border: 1px solid rgba(34,197,94,0.4); border-radius: 4px; padding: 0 4px; }
.achina-org { font-size: 10px; color: var(--muted, #94a3b8); }
.achina-note { font-size: 10.5px; color: var(--fg, #e5e7eb); opacity: 0.85; line-height: 1.35; margin-top: 3px; }
.achina-vh { margin-top: 10px; }
.achina-vecs { display: flex; flex-direction: column; gap: 4px; }
.achina-vec { font-size: 11.5px; line-height: 1.4; padding-left: 12px; position: relative; }
.achina-vec::before { content: "▸"; position: absolute; left: 0; color: #ef4444; }
.achina-vec b { color: var(--fg, #e5e7eb); }
/* China vs US bubble chart */
.abx-ctrls { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 4px 0 2px; }
.abx-axl { font-size: 11px; font-weight: 700; color: var(--muted, #94a3b8); margin-left: 6px; }
.abx-axl:first-child { margin-left: 0; }
.abx-mbtn { background: rgba(255,255,255,0.02); border: 1px solid var(--border, #1f2937); border-radius: 999px;
  color: var(--muted, #94a3b8); font-size: 11px; padding: 2px 9px; cursor: pointer; }
.abx-mbtn:hover { color: var(--fg, #e5e7eb); }
.abx-mbtn.on { color: #0b1220; background: var(--tf-accent, #e879f9); font-weight: 600; border-color: var(--tf-accent, #e879f9); }
.abx-wrap { overflow-x: auto; margin: 6px 0 12px; }
.abx { width: 100%; min-width: 540px; height: auto; display: block; }
.abx .abx-grid { stroke: var(--border, #1f2937); stroke-dasharray: 2 3; }
.abx .abx-ax { fill: var(--muted, #94a3b8); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.abx .abx-title { fill: var(--muted, #94a3b8); font-size: 10.5px; }
.abx .abx-b { opacity: 0.5; stroke-width: 1.2; }
.abx .abx-b.cn { fill: #e11d48; stroke: #fb7185; }
.abx .abx-b.us { fill: #3b82f6; stroke: #93c5fd; }
.abx .abx-lab { font-size: 8.5px; }
.abx .abx-lab.cn { fill: #fb7185; }
.abx .abx-lab.us { fill: #93c5fd; }
.abx-leg { font-size: 10.5px; color: var(--muted, #94a3b8); line-height: 1.5; }
.abx-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 3px 0 8px; vertical-align: middle; }
.abx-dot.cn { background: #e11d48; }
.abx-dot.us { background: #3b82f6; }

/* AI money flows (insider / congress / institutions) */
.aif-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.aif-sec { padding: 10px 14px 12px; margin: 0; }
.aif-sec:nth-child(3) { grid-column: 1 / -1; }
.aif-note { font-size: 11px; line-height: 1.4; margin: 2px 0 8px; }
.aif-err { color: #f59e0b; font-size: 10.5px; margin-bottom: 6px; }
.aif-list { display: flex; flex-direction: column; gap: 3px; max-height: 420px; overflow-y: auto; }
.aif-row { display: grid; grid-template-columns: 52px 1fr auto auto auto; gap: 8px; align-items: baseline;
  font-size: 11.5px; padding: 4px 6px; border-radius: 6px; border-left: 3px solid transparent; }
.aif-row:hover { background: rgba(255,255,255,0.03); }
.aif-row.buy { border-left-color: #22c55e; }
.aif-row.sell { border-left-color: #ef4444; }
.aif-tk { font-family: ui-monospace, monospace; font-weight: 700; color: var(--fg, #e5e7eb); }
.aif-who { color: var(--fg, #e5e7eb); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aif-who i { color: var(--muted, #94a3b8); font-style: normal; font-size: 10px; }
.aif-act { font-size: 10.5px; }
.aif-row.buy .aif-act { color: #22c55e; } .aif-row.sell .aif-act { color: #f87171; }
.aif-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.aif-dt { color: var(--muted, #94a3b8); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.aif-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; font-size: 11px; color: var(--muted, #94a3b8); align-items: center; }
.aif-chip { font-size: 10.5px; border: 1px solid var(--border, #1f2937); border-radius: 5px; padding: 1px 6px; background: rgba(255,255,255,0.02); }
.aif-chip.buy { color: #22c55e; border-color: rgba(34,197,94,0.35); }
.aif-chip.sell { color: #f87171; border-color: rgba(239,68,68,0.35); }
.aif-sec-inst { grid-column: 1 / -1; }
/* size filter */
.aif-filter { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; }
.aif-fbtn { background: rgba(255,255,255,0.02); border: 1px solid var(--border, #1f2937); border-radius: 999px;
  color: var(--muted, #94a3b8); font-size: 11.5px; padding: 3px 11px; cursor: pointer; }
.aif-fbtn:hover { color: var(--fg, #e5e7eb); }
.aif-fbtn.on { color: #0b1220; background: var(--tf-accent, #e879f9); font-weight: 600; border-color: var(--tf-accent, #e879f9); }
.aif-fnote { margin-left: 4px; font-size: 10px; }
/* institutional heatmap */
.aih-scroll { overflow-x: auto; }
.aih-grid { display: grid; gap: 2px; min-width: 620px; }
.aih-h { font-size: 10px; font-weight: 700; color: var(--muted, #94a3b8); text-align: center; padding: 3px 2px;
  font-family: ui-monospace, monospace; align-self: end; }
.aih-inst { font-size: 11px; font-weight: 600; color: var(--fg, #e5e7eb); padding: 5px 8px 5px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aih-h.aih-inst { font-family: inherit; text-align: left; }
.aih-c { font-size: 10px; text-align: center; padding: 6px 3px; border-radius: 3px; color: var(--fg, #e5e7eb);
  font-variant-numeric: tabular-nums; background: rgba(255,255,255,0.02); }
.aih-c.aih-total { background: rgba(255,255,255,0.05); font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.15; }
.aih-pct { font-size: 9px; font-weight: 600; color: var(--tf-accent, #e879f9); }
.aih-h i { font-weight: 400; font-size: 8.5px; color: var(--muted, #64748b); }
.aih-leg { font-size: 10px; margin-top: 6px; line-height: 1.5; }
.aih-leg b { color: var(--fg, #e5e7eb); }
@media (max-width: 720px) { .aif-wrap { grid-template-columns: 1fr; } }

.infl-panel { padding: 12px 14px 14px; margin-bottom: 14px; }
.infl-panel.infl-flash { animation: inflFlash 1.2s ease; }
@keyframes inflFlash { 0%,100% { box-shadow: none; } 30% { box-shadow: 0 0 0 2px var(--accent, #38bdf8); } }
.infl-p-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.infl-p-dial { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
.infl-p-dial .hlt-gauge { width: 90px; height: auto; }
.infl-p-rate { font-size: 15px; font-weight: 600; margin-top: -8px; }
.infl-p-titles h3 { font-size: 15px; margin: 0 0 2px; }
.infl-p-what { font-size: 12px; color: var(--fg, #e5e7eb); opacity: 0.85; margin-bottom: 3px; }
.infl-p-why { font-size: 12px; color: var(--muted, #94a3b8); line-height: 1.5; }
.infl-p-why b { color: var(--fg, #e5e7eb); font-weight: 600; }
.md-read { font-size: 12.5px; font-weight: 600; margin: 1px 0 4px; }
.md-read-arrow { font-size: 10px; }
.md-read-improving { color: #22c55e; }
.md-read-deteriorating { color: #ef4444; }
.md-read-flat { color: var(--muted, #94a3b8); }
.infl-p-body { display: flex; gap: 16px; align-items: flex-start; }
.infl-p-tablewrap { flex: 1 1 46%; overflow-x: auto; }
.infl-p-chart { flex: 1 1 54%; min-width: 300px; }
.infl-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.infl-table th { text-align: right; font-weight: 500; color: var(--muted, #94a3b8); padding: 3px 8px; border-bottom: 1px solid var(--border, #1f2937); font-size: 11px; }
.infl-table th.infl-c-name { text-align: left; }
.infl-table td { padding: 3px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.infl-c-name { text-align: left; white-space: nowrap; }
.infl-c-num { text-align: right; font-variant-numeric: tabular-nums; }
.infl-wt { color: var(--muted, #94a3b8); }
.infl-row { cursor: pointer; }
.infl-row:hover { background: rgba(255,255,255,0.04); }
.infl-row.active { background: rgba(225,87,89,0.14); }
.infl-row.active .infl-c-name { color: var(--accent, #e15759); font-weight: 600; }
.infl-r-na td { color: var(--muted, #94a3b8); }
.infl-p-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.infl-ct-title { font-size: 12px; }
.infl-views { display: inline-flex; gap: 3px; }
.infl-vbtn { font-size: 10.5px; padding: 2px 8px; border: 1px solid var(--border, #1f2937); border-radius: 999px;
  background: none; color: var(--muted, #94a3b8); cursor: pointer; }
.infl-vbtn.on { background: var(--accent, #e15759); color: #fff; border-color: var(--accent, #e15759); }
.infl-ct-slot { min-height: 150px; }
.infl-ct-empty { display: flex; align-items: center; justify-content: center; min-height: 150px; font-size: 12px; }
@media (max-width: 760px) { .infl-p-body { flex-direction: column; } .infl-p-chart { min-width: 0; width: 100%; } }

/* ---- Inflation sub-nav (Dashboard | All data) + the "All data" grid ---- */
.infl-subnav { display: inline-flex; gap: 4px; margin: 2px 0 12px; padding: 3px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border, #1f2937); }
.infl-subtab { font-size: 12px; font-weight: 600; padding: 5px 16px; border-radius: 999px; border: none;
  background: none; color: var(--muted, #94a3b8); cursor: pointer; }
.infl-subtab.on { background: var(--accent, #e15759); color: #fff; }
.it-tablepanel { padding: 10px 12px 12px; }
.it-body { display: flex; gap: 16px; align-items: flex-start; }
.it-scroll { flex: 1 1 auto; min-width: 0; overflow-x: auto; }
.it-chartpanel { flex: 0 0 380px; position: sticky; top: 8px; border: 1px solid var(--border, #1f2937);
  border-radius: 10px; padding: 10px 12px; background: rgba(255,255,255,0.015); }
.it-chart-empty { display: flex; align-items: center; justify-content: center; min-height: 170px; font-size: 12px; text-align: center; }
.it-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.it-chart-title { font-size: 13px; }
.it-views { display: inline-flex; gap: 3px; }
.it-chart-slot { min-height: 170px; }
@media (max-width: 900px) { .it-body { flex-direction: column; } .it-chartpanel { flex: none; width: 100%; position: static; } }
.it-table { border-collapse: collapse; font-size: 11.5px; white-space: nowrap; }
.it-table th, .it-table td { padding: 3px 9px; }
.it-table thead th { position: sticky; top: 0; background: var(--panel, #0e1524); z-index: 2; }
.it-grp { text-align: center; font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted, #94a3b8); border-bottom: 1px solid var(--border, #1f2937); }
.it-g-annual { color: #a3b8d8; } .it-g-quarter { color: #c9b58a; } .it-g-month { color: #d99; }
.it-table th.it-num { text-align: right; font-weight: 500; color: var(--muted, #94a3b8); }
.it-name { text-align: left; position: sticky; left: 0; background: var(--panel, #0e1524); z-index: 1; }
.it-table thead th.it-name, .it-corner { z-index: 3; }
.it-num { text-align: right; font-variant-numeric: tabular-nums; }
.it-mgroup td { font-weight: 700; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent, #e15759); padding-top: 10px; border-bottom: 1px solid var(--border, #1f2937); background: var(--panel, #0e1524); }
.it-row { cursor: pointer; }
.it-row td { border-bottom: 1px solid rgba(255,255,255,0.04); }
.it-row:hover td { background: rgba(255,255,255,0.05); }
.it-row:hover .it-name { background: var(--chip-bg); }
.it-row.active td { background: rgba(225,87,89,0.14); }
.it-row.active .it-name { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--accent, #e15759); font-weight: 600; }
.it-row.it-na td { opacity: 0.5; }
.it-legwarm { color: #ef4444; } .it-legcool { color: #22c55e; }
.mk-panel { padding: 10px 12px 8px; }
.mk-panel .panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.mk-panel .panel-head h3 { font-size: 13px; }
.mk-sub { font-size: 10px; }
.mk-table { width: 100%; border-collapse: collapse; }
.mk-table th { font-size: 9px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); font-weight: 600; text-align: right; padding: 2px 8px 4px; }
.mk-table th:first-child { text-align: left; }
.mk-table td { padding: 3px 8px; border-top: 1px solid rgba(255,255,255,0.03); }
.mk-table .rt-num { text-align: right; font-variant-numeric: tabular-nums; }
.mk-table .up { color: var(--up); } .mk-table .down { color: var(--down); }
.mk-name { text-align: left; white-space: nowrap; }
.mk-grp { font-size: 9px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); margin-left: 6px; }
.mk-last { font-weight: 600; }
.mk-table .rt-spark { text-align: right; width: 62px; }
/* view toggle + heatmap horizon */
.mk-controls { display: flex; align-items: center; gap: 10px; }
.mk-viewtoggle { display: inline-flex; border: 1px solid var(--panel-border); border-radius: 6px; overflow: hidden; }
.mk-viewtoggle button { background: transparent; border: none; color: var(--muted); padding: 5px 12px; font-size: 12px; cursor: pointer; }
.mk-viewtoggle button.active { background: #38bdf8; color: #0b0b12; font-weight: 600; }
/* heatmap tiles */
.mk-heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 6px; }
.mk-tile { border-radius: 6px; padding: 7px 8px 6px; display: flex; flex-direction: column; gap: 3px; border: 1px solid rgba(255,255,255,0.05); }
.mk-tile-hdr { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.mk-tile-n { font-size: 11px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-tile-v { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.mk-tsvg { width: 100%; height: 20px; display: block; color: var(--text); opacity: 0.5; }
.mk-tile-lv { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* watchlist */
.mk-watch-add { display: inline-flex; gap: 6px; }
#mk-watch-in { background: var(--input-bg, rgba(255,255,255,0.04)); border: 1px solid var(--panel-border); border-radius: 5px; color: var(--text); padding: 4px 8px; font-size: 12px; font-family: inherit; width: 150px; }
#mk-watch-in:focus { outline: none; border-color: #38bdf8; }
.mk-watch-add button { background: #38bdf8; color: #0b0b12; border: none; border-radius: 5px; padding: 4px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.mk-del { background: none; border: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; padding: 0 4px; }
.mk-del:hover { color: var(--down); }
.mk-delcell { width: 24px; text-align: center; }
.strk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; padding: 8px 2px 12px; border-top: 1px solid var(--panel-border); }
.rsk-kpi b.strk-total { font-size: 20px; }
.strk-conv { flex-basis: 100%; font-size: 10px; letter-spacing: 0.2px; }
.strk-sum td { font-weight: 700; border-bottom: 1px solid var(--panel-border); }
.strk-sum .rt-tenor { text-transform: uppercase; font-size: 10px; letter-spacing: 0.3px; color: var(--muted); }
.strk-hgroup { margin-bottom: 10px; }
.strk-hgroup-h { font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); border-bottom: 1px solid var(--panel-border); padding-bottom: 2px; margin-bottom: 2px; }
.strk-hgroup .rate-table { width: 100%; }
.strk-hgroup .rate-table td { padding: 2px 8px; }
.rate-table .up { color: var(--up); } .rate-table .down { color: var(--down); }
.strk-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.strk-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .strk-grid, .strk-grid3 { grid-template-columns: 1fr; } }
.strk-col .rate-table { width: 100%; }
.strk-col .rate-table td, .strk-col .rate-table th { padding: 2px 8px; }
.strk-ten-table .rt-num { font-variant-numeric: tabular-nums; }
.strk-ten-table thead th { font-size: 9px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); font-weight: 600; text-align: right; padding: 0 8px 2px; }
.strk-ten-table thead th:first-child { text-align: left; }
.strk-ten-table .rt-ch { color: var(--muted); font-variant-numeric: tabular-nums; }
.strk-risk-only { max-width: 460px; }
.strk-pnl-tot { font-size: 11px; margin-top: 6px; color: var(--muted); }
.strk-pnl-tot span { text-transform: uppercase; font-size: 9px; letter-spacing: 0.3px; }
.strk-pnl-tot b { font-variant-numeric: tabular-nums; }
.strk-pnl-tot b.up { color: var(--up); } .strk-pnl-tot b.down { color: var(--down); }
.rate-table .up { color: var(--up); } .rate-table .down { color: var(--down); }
.strk-cum-head { margin-top: 16px; border-top: 1px solid var(--panel-border); padding-top: 10px; }
.strk-cum-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: center; }
@media (max-width: 900px) { .strk-cum-grid { grid-template-columns: 1fr; } }
.cumerr-chart { width: 100%; height: auto; display: block; }
.strk-cum-stats { flex-direction: column; gap: 12px; }
.strk-carry { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline; font-size: 12px; padding-top: 8px; border-top: 1px solid var(--panel-border); }
.strk-carry span { color: var(--muted); text-transform: uppercase; font-size: 10px; letter-spacing: 0.3px; }
.strk-carry b { font-variant-numeric: tabular-nums; font-size: 13px; }
.strk-carry b.up { color: var(--up); } .strk-carry b.down { color: var(--down); }
.rsk-leg sup { color: #a78bfa; font-size: 9px; }

/* ===== Portfolio & spot-hedge panel ===== */
.rv-port-panel { padding: 12px 14px 12px; margin-top: 14px; }
.rv-port-panel .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.rv-port-panel .panel-head h3 { font-size: 14px; }
.port-run { background: #a78bfa; color: #0b0b12; border: none; border-radius: 6px; padding: 6px 16px; font-weight: 700; font-size: 12px; cursor: pointer; }
.port-run:hover { filter: brightness(1.08); }
.port-build { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 18px; align-items: start; margin-bottom: 10px; }
@media (max-width: 900px) { .port-build { grid-template-columns: 1fr; } }
.port-trade-table { width: 100%; border-collapse: collapse; }
.port-trade-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); padding: 2px 6px; font-weight: 600; }
.port-trade-table td { padding: 2px 6px; }
.port-in { width: 100%; background: var(--input-bg, rgba(255,255,255,0.04)); border: 1px solid var(--panel-border); border-radius: 4px; color: var(--text); padding: 4px 6px; font-size: 12px; font-family: inherit; }
.port-struct { min-width: 130px; } .port-size { width: 68px; }
.port-seg { background: rgba(255,255,255,0.05); border: 1px solid var(--panel-border); border-radius: 4px; color: var(--text); padding: 4px 8px; font-size: 11px; cursor: pointer; min-width: 42px; }
.port-dir.rec { color: var(--up); box-shadow: inset 2px 0 0 var(--up); } .port-dir.pay { color: var(--down); box-shadow: inset 2px 0 0 var(--down); }
.port-del { background: none; border: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; } .port-del:hover { color: var(--down); }
.port-add { margin-top: 6px; background: none; border: 1px dashed var(--panel-border); border-radius: 5px; color: var(--muted); padding: 4px 10px; font-size: 11px; cursor: pointer; } .port-add:hover { color: var(--text); border-color: var(--muted); }
.port-sub { font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); margin-bottom: 6px; }
.port-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.port-chip { background: rgba(255,255,255,0.05); border: 1px solid var(--panel-border); border-radius: 5px; color: var(--muted); padding: 4px 10px; font-size: 12px; cursor: pointer; font-variant-numeric: tabular-nums; }
.port-chip.on { background: rgba(167,139,250,0.18); border-color: #a78bfa; color: var(--text); }
.port-hint { font-size: 12px; padding: 8px 2px; }
.port-summary { display: flex; flex-wrap: wrap; gap: 22px; padding: 10px 2px 4px; border-top: 1px solid var(--panel-border); }
.port-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 10px; }
@media (max-width: 900px) { .port-grid { grid-template-columns: 1fr; } }
.port-card { background: rgba(255,255,255,0.02); border: 1px solid var(--panel-border); border-radius: 8px; padding: 10px 12px; margin-top: 12px; }
.port-grid .port-card { margin-top: 0; }
.port-side { font-style: normal; font-size: 10px; text-transform: uppercase; opacity: 0.7; margin-left: 2px; }
.port-note { font-size: 11px; margin-top: 6px; line-height: 1.4; }
.port-verdict { font-weight: 700; font-size: 13px; margin: 6px 0 10px; padding-left: 10px; border-left: 3px solid var(--muted); }
.port-verdict.up { border-color: var(--up); color: var(--up); }
.port-verdict.down { border-color: var(--down); color: var(--down); }
.port-verdict.gold { border-color: var(--gold); color: var(--gold); }
.port-verdict span { display: block; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 2px; }
.port-reg-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.port-stat { display: flex; flex-direction: column; min-width: 92px; }
.port-stat span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); }
.port-stat b { font-size: 15px; font-variant-numeric: tabular-nums; }
.port-stat b.up { color: var(--up); } .port-stat b.down { color: var(--down); } .port-stat b.gold { color: var(--gold); }
.port-stat small { font-size: 10px; color: var(--muted); }
.port-beta { margin-top: 10px; }
.port-beta summary { font-size: 11px; color: var(--muted); cursor: pointer; }
.port-beta table { margin-top: 6px; }

/* ===== Themed widget border + glow ===== */
.panel { border-color: var(--panel-border); box-shadow: var(--panel-shadow); }
.card { border-color: var(--panel-border); }

/* ===== Appearance switcher ===== */
.header-right { display: flex; align-items: center; gap: 10px; }
/* ===== Economic Outlook grid ===== */
.ol-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.ol-title { font-size: 16px; margin: 0 0 2px; }
.ol-anchor { font-size: 11px; font-weight: 400; margin-left: 8px; }
.ol-scroll { overflow-x: auto; border: 1px solid var(--panel-border); border-radius: 10px; background: var(--panel); }
.ol-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ol-table th, .ol-table td { padding: 3px 10px; font-size: 12px; text-align: right; }
.ol-table thead th { color: var(--muted); font-weight: 600; font-size: 11px; border-bottom: 1px solid var(--panel-border); }
.ol-superhead th { font-size: 9px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); text-align: center; padding-bottom: 1px; border-bottom: none; }
.ol-name { text-align: left !important; position: sticky; left: 0; background: var(--panel); z-index: 1; min-width: 210px; }
.ol-num { min-width: 46px; }
.ol-group td { text-align: left; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--accent, #f59e0b); background: rgba(245,158,11,0.06); border-top: 1px solid var(--panel-border); position: sticky; left: 0; }
.ol-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.ol-table tbody tr:hover .ol-name { background: var(--panel-2); }
.ol-neg { color: var(--down); }
.ol-fcst, .ol-fcst-h { background: rgba(245,158,11,0.10); }
.ol-fcst-h { color: #f59e0b; }
.ol-annsep { border-left: 2px solid var(--panel-border); }
.ol-ann { color: var(--text); background: rgba(255,255,255,0.02); }
.ol-wt { color: var(--muted); }
.cpi-panel { margin-top: 16px; padding: 12px 14px; }
.cpi-panel .panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.cpi-panel .panel-head h3 { font-size: 14px; }
.cpi-panel .ol-scroll { background: transparent; }
.cpi-err { padding: 10px; }

.build-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #0b0b12; background: #38bdf8; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.footer-public { color: var(--muted); }
.footer-public b { color: #38bdf8; }
.appearance { position: relative; }
.appearance-btn {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; cursor: pointer;
}
.appearance-btn:hover { border-color: var(--hover-border); }
.demo-btn { background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 13px; cursor: pointer; }
.demo-btn:hover { border-color: var(--accent); color: var(--accent); }
.promo-modal { position: relative; width: min(780px, 94vw); background: #000; border-radius: 14px;
  overflow: hidden; box-shadow: 0 24px 60px -12px rgba(0,0,0,.7); }
.promo-video { width: 100%; display: block; max-height: 78vh; }
.promo-x { position: absolute; top: 6px; right: 8px; z-index: 3; background: rgba(0,0,0,.45); border-radius: 50%; }
.appearance-panel {
  position: absolute; right: 0; top: 42px; z-index: 50; width: 272px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  box-shadow: 0 16px 44px -16px rgba(0, 0, 0, 0.55);
}
.appearance-panel[hidden] { display: none; }
.ap-group { margin-bottom: 13px; }
.ap-group:last-child { margin-bottom: 0; }
.ap-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 7px; }
.ap-seg { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.ap-opt {
  background: var(--chip-bg); border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; padding: 5px 11px; font: inherit; font-size: 12px; cursor: pointer;
}
.ap-opt:hover { color: var(--text); }
.ap-opt.active { border-color: var(--accent); color: var(--text); }
.ap-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.ap-swatch.active { border-color: var(--text); }
.ap-slider { width: 100%; accent-color: var(--accent); cursor: pointer; }

.detail-body { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
@media (max-width: 860px) { .detail-body { grid-template-columns: 1fr; } }
.chart-wrap { min-width: 0; }
.chart-svg { width: 100%; height: auto; display: block; }

/* Chart internals */
.chart-grid { stroke: var(--grid); stroke-dasharray: 3 3; }
.chart-axis { fill: var(--axis); font-size: 11px; }
.chart-line-value { fill: none; stroke: var(--up); stroke-width: 2; }
.chart-line-ma { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart-legend { fill: var(--axis); font-size: 12px; }
.chart-swatch-value { fill: var(--up); }
.chart-swatch-ma { fill: var(--accent); }

/* MA picker */
.ma-picker { display: flex; align-items: center; gap: 6px; }
.chip {
  background: var(--chip-bg); border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.chip.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }

/* Stat panel */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.stat { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 18px; font-weight: 600; margin-top: 3px; }
.stat-value.up { color: var(--up); }
.stat-value.down { color: var(--down); }

/* Correlation matrix */
.matrix-wrap { overflow-x: auto; }
.matrix { border-collapse: collapse; font-size: 13px; width: 100%; }
.matrix th, .matrix td { border: 1px solid var(--border); padding: 8px 10px; text-align: center; }
.matrix thead th { color: var(--muted); font-weight: 600; }
.matrix .corner { background: transparent; border: none; }
.matrix .row-label { text-align: left; color: var(--text); white-space: nowrap; cursor: pointer; font-weight: 500; }
.matrix .row-label:hover { color: var(--accent); }
.matrix td { font-variant-numeric: tabular-nums; }
.matrix-note { color: var(--muted); font-size: 12px; margin: 12px 0 0; }

/* States */
.error-box { background: var(--panel); border: 1px solid var(--down); border-radius: 14px; padding: 20px; margin-bottom: 22px; }
.error-box h2 { margin-top: 0; color: var(--down); }
/* warming = the cold-start data-load wait; a calm accent, not the red error look */
.error-box.warming { border-color: rgba(20,184,166,.5); }
.error-box.warming h2 { color: #14b8a6; }
.error-box.warming h2::before { content: '◷ '; }
.muted { color: var(--muted); }

.app-footer { text-align: center; color: var(--muted); font-size: 12px; padding-top: 8px; }
.gml-instr-note { font-size: 9px; margin: 4px 2px 0; line-height: 1.4; }
/* GMLCurve instrument-format history chart */
.gml-hist { max-width: 600px; }
.gml-hbar { display: flex; align-items: center; gap: 6px; margin: 2px 0 6px; }
.gml-hbtn { background: var(--chip-bg); border: 1px solid var(--border); color: var(--muted);
  border-radius: 4px; padding: 2px 8px; font-size: 10px; font-weight: 600; cursor: pointer; }
.gml-hbtn.active { background: color-mix(in srgb, var(--cyan) 20%, transparent); color: var(--text); border-color: var(--cyan); }
.gml-hlegwrap { margin-left: auto; }
.gml-hleg { font-size: 10px; font-weight: 700; margin-left: 8px; }
.gml-hist-svg { width: 100%; height: auto; }
.gml-hist-svg .ch-zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: .5; }
.gml-hist-svg .ch-yl { fill: var(--muted); font-size: 9px; text-anchor: end; }
.gml-hist-svg .ch-xl { fill: var(--muted); font-size: 9px; }
/* Convexity tab */
.cvx-panel { padding: 8px 10px; max-width: 720px; }
.cvx-panel .panel-head { display: flex; align-items: baseline; gap: 8px; }
.cvx-legend { display: flex; gap: 12px; margin: 2px 0 4px; }
.cvx-leg { font-size: 10px; font-weight: 700; }
.cvx-svg { width: 100%; height: auto; margin-bottom: 6px; }
.cvx-svg .ch-zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: .5; }
.cvx-svg .ch-yl { fill: var(--muted); font-size: 9px; text-anchor: end; }
.cvx-svg .ch-xl { fill: var(--muted); font-size: 8px; }
.cvx-tablewrap { overflow-x: auto; max-height: 420px; overflow-y: auto; }
.cvx-table { width: 100%; font-size: 11px; }
.cvx-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; padding: 3px 8px;
  color: var(--muted); font-weight: 600; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
.cvx-table thead th:first-child { text-align: left; }
.cvx-table td { padding: 2px 8px; font-variant-numeric: tabular-nums; }
.cvx-table td.rt-tenor { font-weight: 700; }
.cvx-dt { color: var(--muted); font-size: 10px; white-space: nowrap; }
.cvx-now { font-weight: 700; }
.cvx-table tbody tr:hover { background: color-mix(in srgb, var(--cvx-accent, #f472b6) 8%, transparent); }
.cvx-packleg { margin-left: auto; display: inline-flex; gap: 10px; }
.cvx-table tbody tr.cvx-pack-first-1 td { border-top: 1px solid var(--border); }
.cvx-fit { font-size: 10px; font-weight: 700; color: var(--cvx-accent, #f472b6); padding: 1px 8px; border: 1px solid var(--border); border-radius: 4px; }
.cvx-mdl { color: var(--text); font-weight: 600; }
.cvx-ctrl { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; font-size: 11px; flex-wrap: wrap; }
.cvx-mbtn { background: var(--chip-bg); border: 1px solid var(--border); color: var(--muted); border-radius: 4px; padding: 2px 9px; font-size: 10px; font-weight: 700; cursor: pointer; }
.cvx-mbtn.active { background: color-mix(in srgb, var(--cvx-accent, #f472b6) 20%, transparent); color: var(--text); border-color: var(--cvx-accent, #f472b6); }
.cvx-lbl { color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.cvx-in { width: 58px; background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 4px; padding: 2px 5px; font-size: 11px; font-family: inherit; text-align: right; }
.cvx-in:disabled { opacity: .5; }
.cvx-in:focus { outline: none; border-color: var(--cvx-accent, #f472b6); }
.cvx-rmse { margin-left: auto; color: var(--muted); }
.cvx-rmse b.neg { color: #f87171; }
/* per-pack fit panel */
.cvx-pack { margin: 2px 0 8px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  background: color-mix(in srgb, var(--cvx-accent, #f472b6) 5%, transparent); }
.cvx-pack-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; font-size: 11px; }
.cvx-ok { color: #4ade80; font-weight: 700; }
.cvx-miss { color: #fbbf24; font-weight: 700; }
.cvx-packtbl { width: auto; font-size: 11.5px; }
.cvx-packtbl th { text-align: right; padding: 2px 10px; color: var(--muted); font-weight: 600; }
.cvx-packtbl td { padding: 2px 10px; }
.cvx-packtbl .rt-tenor { text-align: left; font-weight: 700; }
.cvx-anote { font-size: 10px; margin: 5px 0 0; line-height: 1.4; }
/* ===== Consumer Credit tab ===== */
.cct-panel { padding: 8px 10px; }
.cct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin: 6px 0; }
.cct-card { border: 1px solid var(--border); border-radius: 7px; padding: 9px 11px;
  background: color-mix(in srgb, var(--cct-accent, #14b8a6) 5%, transparent); }
.cct-cardhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cct-name { font-weight: 700; font-size: 12.5px; color: var(--cct-accent, #14b8a6); }
.cct-note { font-size: 9px; color: var(--muted); text-align: right; }
.cct-bal { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0 1px; }
.cct-yoy { font-size: 11px; font-weight: 600; }
.cct-spark { height: 26px; margin: 2px 0 5px; opacity: .85; }
.cct-spark svg { width: 100%; height: 26px; }
.cct-metrics { display: flex; flex-direction: column; gap: 2px; }
.cct-m { display: flex; justify-content: space-between; font-size: 11px; }
.cct-ml { color: var(--muted); }
.cct-mv { font-variant-numeric: tabular-nums; font-weight: 600; }
.cct-chg { font-size: 9px; font-weight: 600; }
.cct-sloos { display: flex; justify-content: space-between; font-size: 11px; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); }
.cct-mba { font-size: 10.5px; margin-top: 3px; }
.cct-mba b { font-variant-numeric: tabular-nums; }
.cct-m.cct-sub { font-size: 10px; opacity: .8; margin-top: -1px; }
.cct-m.cct-sub .cct-ml { padding-left: 8px; }

/* ---------- Markets & Economy tab ---------- */
.gtm-panel { padding: 14px 16px 18px; }
.gtm-sec-head { display: flex; align-items: baseline; gap: 10px; margin: 18px 2px 9px; padding-bottom: 5px; border-bottom: 1px solid var(--border); }
.gtm-sec-head:first-of-type { margin-top: 6px; }
.gtm-sec-head h4 { margin: 0; font-size: 14px; letter-spacing: .3px; color: var(--text); }
.gtm-sec-head .muted { font-size: 11px; font-variant-numeric: tabular-nums; }
.gtm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gtm-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px 8px; display: flex; flex-direction: column; }
.gtm-card.gtm-wide { grid-column: span 2; }
.gtm-card.gtm-off { opacity: .85; border-style: dashed; }
.gtm-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.gtm-pg { font: 600 10px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--on-accent); background: var(--tf-accent, #6366f1); border-radius: 4px; padding: 3px 5px; letter-spacing: .5px; }
.gtm-title { font-size: 12.5px; font-weight: 600; color: var(--text); flex: 1; line-height: 1.25; }
.gtm-badge { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 5px; border-radius: 4px; white-space: nowrap; }
.gtm-badge.bbg { color: var(--bbg); border: 1px solid var(--bbg); }
.gtm-badge.towire { color: var(--muted); border: 1px solid var(--border); }
.gtm-body { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 78px; }
.gtm-note { font-size: 10px; color: var(--muted); line-height: 1.35; margin: 7px 0 0; }
.gtm-src { font-size: 9.5px; color: var(--muted); opacity: .82; margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--row-border); }
.gtm-src::before { content: 'Source: '; opacity: .7; }
.gtm-empty { color: var(--muted); font-size: 11px; text-align: center; padding: 22px 0; }
.gtm-svg { width: 100%; height: auto; display: block; }
.gtm-axis { stroke: var(--border); stroke-width: 1; }
.gtm-yl, .gtm-xl { fill: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.gtm-last { font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gtm-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 3px; font-size: 9.5px; color: var(--muted); }
.gtm-lg { display: inline-flex; align-items: center; gap: 4px; }
.gtm-lg i { width: 9px; height: 3px; border-radius: 2px; display: inline-block; }
.gtm-bars { display: flex; flex-direction: column; gap: 4px; }
.gtm-bar-row { display: grid; grid-template-columns: 96px 1fr 66px; align-items: center; gap: 7px; }
.gtm-bar-lbl { font-size: 10.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtm-bar-track { position: relative; height: 13px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.gtm-zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--border); }
.gtm-bf { position: absolute; top: 2px; bottom: 2px; border-radius: 2px; }
.gtm-bf.pos { background: var(--up); }
.gtm-bf.neg { background: var(--down); }
.gtm-bar-val { font-size: 10.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.1; }
.gtm-bar-val.pos { color: var(--up); }
.gtm-bar-val.neg { color: var(--down); }
.gtm-bar-v2 { display: block; font-size: 8.5px; font-weight: 500; color: var(--muted); }
.gtm-bench { margin-top: 7px; font-size: 10.5px; color: var(--muted); text-align: right; }
.gtm-bench b { color: var(--text); font-variant-numeric: tabular-nums; }
.gtm-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.gtm-stat { flex: 1; min-width: 92px; display: flex; flex-direction: column; gap: 1px; }
.gtm-stat-lbl { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.gtm-stat-val { font-size: 20px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.15; }
.gtm-stat-u { font-size: 10px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.gtm-stat-sub { font-size: 9.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gtm-iy-bar.pos { fill: var(--up); }
.gtm-iy-bar.neg { fill: var(--down); }
.gtm-iy-ann { font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gtm-iy-ann.pos { fill: var(--up); }
.gtm-iy-ann.neg { fill: var(--down); }
.gtm-iy-dot { fill: var(--down); stroke: var(--panel-2); stroke-width: 1; }
.gtm-iy-dd { fill: var(--muted); font-size: 8.5px; font-variant-numeric: tabular-nums; }
.gtm-blk { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 8px 4px; color: var(--muted); }
.gtm-blk-icon { font-size: 20px; opacity: .5; }
.gtm-blk p { margin: 0; font-size: 10.5px; line-height: 1.4; }
.gtm-card.gtm-link { background: transparent; border-style: dashed; }
.gtm-see { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; justify-content: center; }
.gtm-seebtn { font: 600 12px var(--font); color: var(--tf-accent, #6366f1); background: transparent; border: 1px solid var(--tf-accent, #6366f1); border-radius: 6px; padding: 5px 11px; cursor: pointer; }
.gtm-seebtn:hover { background: var(--tf-accent, #6366f1); color: var(--on-accent); }
.gtm-see p { margin: 0; font-size: 10px; color: var(--muted); line-height: 1.4; }
@media (max-width: 720px) { .gtm-card.gtm-wide { grid-column: span 1; } }

/* ---------- Guide: asset-class annual-return "quilt" ---------- */
.qz-scroll { overflow-x: auto; margin: 2px 0 0; -webkit-overflow-scrolling: touch; }
.qz-table { border-collapse: separate; border-spacing: 2px; width: 100%; }
.qz-table th { font-size: 9.5px; font-weight: 700; color: var(--muted); text-align: center; padding: 2px 0 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qz-table th.qz-sep { border-left: 1px solid var(--border); }
.qz-cell { border-radius: 3px; padding: 3px 5px; min-width: 46px; text-align: center; line-height: 1.15; }
.qz-cell.qz-empty { background: transparent !important; box-shadow: none !important; }
.qz-k { display: block; font-size: 9.5px; font-weight: 700; color: var(--text); }
.qz-v { display: block; font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qz-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 9px; }
.qz-leg { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--muted); }
.qz-leg i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.qz-cell.qz-blend .qz-k { font-weight: 800; }
.qz-leg-b { color: var(--text); font-weight: 700; }

/* ---------- Guide: return-vs-downside frontier + optimal blend ---------- */
.gtm-frontier { display: flex; flex-direction: column; gap: 10px; }
.gf-top { display: grid; grid-template-columns: 1fr 1.5fr; gap: 16px; align-items: start; }
.gf-scatter { min-width: 0; }
.gf-al { fill: var(--text); font-size: 8.5px; font-weight: 600; }
.gf-bl { fill: var(--muted); font-size: 8px; }
.gf-ol { fill: #10b981; font-size: 9px; font-weight: 700; }
.gf-ax { fill: var(--muted); font-size: 9px; }
.gf-side { min-width: 0; }
.gf-wtitle { font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.gf-wrow { display: grid; grid-template-columns: 62px 1fr 34px; align-items: center; gap: 6px; margin-bottom: 4px; }
.gf-wlbl { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gf-wtrack { height: 11px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.gf-wfill { display: block; height: 100%; border-radius: 3px; }
.gf-wval { font-size: 9.5px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.gf-ostats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 10px; color: var(--muted); }
.gf-ostats b { color: var(--text); font-variant-numeric: tabular-nums; }
.gf-tblwrap { overflow-x: auto; }
.gf-tbl { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.gf-tbl th { text-align: right; color: var(--muted); font-weight: 600; padding: 3px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.gf-tbl th:first-child { text-align: left; }
.gf-tbl td { text-align: right; padding: 3px 8px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gf-tbl td:first-child { text-align: left; }
.gf-tbl tr.gf-opt td { color: var(--text); font-weight: 700; background: rgba(16, 185, 129, .08); }
@media (max-width: 720px) { .gf-top { grid-template-columns: 1fr; } }

/* ---------- Capital & liquidity (the "everything rally" lens) ---------- */
.cap-panel { --cap: #10b981; padding: 14px 16px 20px; }
.cap-err { padding: 24px; color: var(--down); }
.cap-hero { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 14px; }
.cap-hero h2 { margin: 0 0 4px; font-size: 18px; color: var(--cap); }
.cap-headline { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text); max-width: 640px; }
.cap-refs { display: flex; gap: 10px; flex-wrap: wrap; }
.cap-ref { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; min-width: 96px; }
.cap-ref-v { display: block; font-size: 17px; font-weight: 700; color: var(--cap); font-variant-numeric: tabular-nums; }
.cap-ref-l { display: block; font-size: 9.5px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.cap-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
/* responsive chart grid — fit 2 (or 3) charts across the full width; stack on narrow screens.
   minmax(0,1fr) lets the SVGs scale down inside their column instead of forcing overflow. */
.cap-grid { display: grid; gap: 12px; margin-top: 12px; align-items: start; }
.cap-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cap-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cap-grid > .cap-card { margin-top: 0; }        /* the grid gap handles spacing */
@media (max-width: 880px) { .cap-grid-2, .cap-grid-3 { grid-template-columns: 1fr; } }
@media (min-width: 881px) and (max-width: 1200px) { .cap-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cap-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 8px; flex-wrap: wrap; }
.cap-tgs { display: inline-flex; gap: 3px; }
.cap-tg { font: 600 10.5px var(--font); color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.cap-tg.on { color: var(--on-accent, #04120c); background: var(--cap); border-color: var(--cap); }
.cap-svg { width: 100%; height: auto; display: block; }
.cap-area { stroke: var(--panel-2); stroke-width: 0.8; }
/* macro shock-event overlay lines (+ labels) on historical time-series charts */
.shock-line { stroke: var(--text); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.26; }
.shock-lbl { fill: var(--muted); font-size: 8px; opacity: 0.85; }
.cap-svg-mini { max-width: 360px; }
.cap-yl, .cap-xl { fill: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.cap-legend { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 8px; }
.cap-lg { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.cap-lg i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.cap-lg b { color: var(--text); font-variant-numeric: tabular-nums; }
.cap-lg-basis { color: var(--muted); opacity: .7; font-style: italic; margin-left: 3px; }
.cap-lg-note { font-style: italic; opacity: .7; }
.cap-note { font-size: 10.5px; color: var(--muted); line-height: 1.45; margin: 9px 0 0; }
.cap-note-sm { font-size: 9.8px; }
.cap-decomp { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 2px; }
.cap-dc-row, .cap-rank-row { display: grid; grid-template-columns: 190px 1fr 52px; align-items: center; gap: 8px; }
.cap-dc-lbl, .cap-rank-lbl { font-size: 11px; color: var(--text); }
.cap-dc-track, .cap-rank-track { position: relative; height: 15px; background: var(--panel); border-radius: 3px; }
.cap-rank-zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--border); }
.cap-dc-fill, .cap-rank-fill { position: absolute; top: 2px; bottom: 2px; border-radius: 2px; }
.cap-dc-fill.pos, .cap-rank-fill.pos { background: #10b981; }
.cap-dc-fill.neg, .cap-rank-fill.neg { background: #ef4444; }
.cap-dc-val, .cap-rank-val { font-size: 11px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.cap-dc-val.pos, .cap-rank-val.pos { color: #10b981; }
.cap-dc-val.neg, .cap-rank-val.neg { color: #ef4444; }
.cap-mini-wrap { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.cap-mini { flex: 1; min-width: 240px; }
.cap-mini-t { display: block; font-size: 10.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.cap-mini-c { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.cap-reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cap-reg-sub { font-size: 10.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.cap-r2-row { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.cap-r2-v { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.cap-r2-v.bad { color: #ef4444; background: rgba(239, 68, 68, .12); }
.cap-r2-v.ok { color: #10b981; background: rgba(16, 185, 129, .12); }
.cap-r2-l { font-size: 10px; color: var(--muted); line-height: 1.3; }
.cap-bkr2 { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.cap-bkr2-i { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.cap-bkr2-i i { width: 8px; height: 8px; border-radius: 2px; }
.cap-bkr2-i b { color: var(--text); font-variant-numeric: tabular-nums; }
.cap-caveats ul { margin: 2px 0 0; padding-left: 16px; }
.cap-caveats li { font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-bottom: 6px; }
.cap-src { font-size: 9.5px; color: var(--muted); opacity: .8; margin-top: 8px; }
/* AI capital loop panel */
.cap-ai-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; margin-top: 4px; }
.cap-ai-diagram { min-width: 0; }
.cap-ai-svg { width: 100%; height: auto; display: block; }
.cap-ai-nl { fill: var(--text); font-size: 10px; font-weight: 600; }
.cap-ai-nt { fill: var(--text-dim); font-size: 8px; font-weight: 600; letter-spacing: -0.2px; }
.cap-ai-in { fill: #5fb98e; }
.cap-ai-out { fill: #d98a4e; }
.cap-ai-el rect { fill: var(--panel-2); opacity: 0.9; stroke: var(--line); stroke-width: 0.5; }
.cap-ai-el text { font-size: 8.5px; font-weight: 700; letter-spacing: -0.3px; }
.cap-ai-elead { stroke: var(--text-dim); stroke-width: 0.5; opacity: 0.4; }
.cap-ai-side { min-width: 0; }
.cap-ai-loops { list-style: none; margin: 6px 0 0; padding: 0; }
.cap-ai-loops li { font-size: 10.5px; color: var(--text); line-height: 1.4; margin-bottom: 6px; padding-left: 14px; position: relative; }
.cap-ai-loops li::before { content: '↻'; position: absolute; left: 0; color: var(--cap); font-weight: 700; }
.cap-ai-loop-path { font-weight: 600; }
.cap-ai-loop-note { color: var(--muted); font-size: 9.5px; }
.cap-ai-table-wrap { overflow-x: auto; margin-top: 12px; }
.cap-ai-tbl { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.cap-ai-tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cap-ai-tbl td { padding: 4px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cap-ai-arrow { color: var(--muted); }
.cap-ai-amt { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.cap-ai-kind { font-weight: 600; }
.cap-ai-when { color: var(--muted); }
.cap-ai-conf { text-align: center; font-weight: 700; }
.cap-ai-conf-high { color: #10b981; }
.cap-ai-conf-medium { color: #f59e0b; }
.cap-ai-conf-low { color: #ef4444; }
.cap-ai-framing { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.cap-ai-framing b { color: var(--text); }
@media (max-width: 880px) { .cap-ai-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .cap-reg-grid { grid-template-columns: 1fr; } .cap-dc-row, .cap-rank-row { grid-template-columns: 130px 1fr 48px; } }

/* ---------- Economy Health (composite z-score meters) ---------- */
.hlt-panel { padding: 14px 16px 18px; }
.hlt-top { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 14px; margin-bottom: 6px; }
.hlt-overall { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center; }
.hlt-olabel { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.hlt-ostat { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 2px; }
.hlt-obig { font-size: 15px; color: var(--text); }
.hlt-omath { font-size: 10px; color: var(--muted); margin-top: 6px; }
.hlt-omath b { color: var(--text); font-variant-numeric: tabular-nums; }
.hlt-flags { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.hlt-flabel { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 8px; }
/* Sahm / recession-stress flags collapsed into a clickable pill (mirrors .hlt-drillbtn/.hlt-obtn) */
.hlt-fbtn { display: flex; align-items: center; gap: 9px; width: 100%; background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); font: inherit; }
.hlt-fbtn .hlt-flabel { margin-bottom: 0; }
.hlt-fcount { font-size: 10.5px; font-weight: 700; letter-spacing: .3px; padding: 1px 8px; border-radius: 999px; color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); border: 1px solid var(--border); }
.hlt-fcount.on { color: var(--down); background: color-mix(in srgb, var(--down) 15%, transparent); border-color: color-mix(in srgb, var(--down) 45%, transparent); }
.hlt-farrow { margin-left: auto; font-size: 11px; color: var(--muted); }
.hlt-fbtn:hover .hlt-flabel, .hlt-fbtn.open .hlt-flabel { color: var(--text); }
.hlt-fbtn.firing .hlt-flabel { color: var(--text); }
.hlt-fdd { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--row-border); }

/* ── Economic data releases (free FRED calendar + per-release analysis) ── */
.er-wklabel { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; margin: 2px 0 7px; }
.er-wkstrip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.er-wk { display: flex; flex-direction: column; gap: 1px; align-items: flex-start; text-align: left; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; min-width: 96px; }
.er-wk:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.er-wk.today { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); }
.er-wk-d { font-size: 10.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.er-wk-n { font-size: 11px; color: var(--text); }
.er-wk-t { font-size: 9.5px; color: var(--muted); }
.er-list { display: flex; flex-direction: column; gap: 6px; }
.er-item { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--panel-2); }
.er-item.open { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.er-head { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 10px 12px; cursor: pointer; color: var(--text); font: inherit; text-align: left; }
.er-head:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.er-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.er-dot.inflation { background: #f59e0b; } .er-dot.labor { background: #38bdf8; }
.er-dot.growth { background: #22c55e; } .er-dot.housing { background: #a78bfa; }
.er-name { font-size: 12.5px; font-weight: 600; }
.er-val { font-size: 12.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; margin-left: 6px; }
.er-badge { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 1px 7px; border-radius: 999px; margin-left: auto; }
.er-badge.today { color: var(--up); background: color-mix(in srgb, var(--up) 15%, transparent); }
.er-badge.due { color: #f59e0b; background: color-mix(in srgb, #f59e0b 15%, transparent); }
.er-next { font-size: 10px; color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.er-exp { font-size: 11px; color: var(--muted); margin-left: 10px; }
.er-item.open .er-exp { transform: rotate(180deg); }
.er-detail { padding: 4px 12px 12px; border-top: 1px solid var(--row-border); }
.er-dcard { display: flex; flex-direction: column; gap: 14px; padding-top: 10px; }
.er-metric.off { color: var(--muted); font-size: 12px; }
.er-mtop { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }
.er-mact { font-size: 15px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.er-chip { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--muted) 12%, transparent); }
.er-chip.pos { color: var(--up); } .er-chip.neg { color: var(--down); } .er-chip.muted { color: var(--muted); }
.er-read { font-size: 12px; color: var(--text); line-height: 1.5; margin-bottom: 6px; }
.er-chart { margin: 2px 0 4px; }
.er-mmeta { font-size: 10px; font-variant-numeric: tabular-nums; }

/* ── Market-implied Fed path & scenarios (Communications tab) ── */
.fw-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.fw-gaptile { min-width: 260px; }
.fw-gap { font-size: 11.5px; color: var(--text); } .fw-gap b { color: var(--accent); }
.fw-chart-svg { width: 100%; height: auto; display: block; }
.fw-dotlbl { font-size: 9px; fill: #22c55e; }
.fw-sep { display: inline-block; margin-left: 5px; padding: 0 4px; font-size: 8px; font-weight: 700; letter-spacing: .04em; color: #22c55e; border: 1px solid color-mix(in srgb, #22c55e 45%, transparent); border-radius: 3px; vertical-align: middle; }
.fw-obar { display: inline-flex; width: 92px; height: 10px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--muted) 14%, transparent); vertical-align: middle; margin-right: 6px; }
.fw-osq { height: 100%; } .fw-osq.hike { background: var(--down); } .fw-osq.cut { background: var(--up); } .fw-osq.hold { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.fw-oddscell { white-space: nowrap; } .fw-oddstxt { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fw-grid td, .fw-grid th { text-align: center; font-size: 10.5px; font-variant-numeric: tabular-nums; padding: 3px 5px; }
.fw-gcell { color: var(--text); }
.fw-grid th.fw-spotcol { color: var(--accent); }
/* scenario builder */
.fw-scen { display: flex; flex-direction: column; gap: 10px; }
.fw-scenhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.fw-screset { margin-left: auto; font-size: 10.5px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); cursor: pointer; }
.fw-screset.off { opacity: .5; }
.fw-scengrid { display: flex; flex-direction: column; gap: 5px; }
.fw-screrow { display: flex; align-items: center; gap: 10px; }
.fw-scmtg { min-width: 74px; font-size: 12px; font-weight: 600; }
.fw-scmkt { min-width: 78px; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.fw-scbtns { display: inline-flex; gap: 3px; }
.fw-mvbtn { font-size: 10.5px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--panel-2); color: var(--muted); cursor: pointer; font-variant-numeric: tabular-nums; }
.fw-mvbtn:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.fw-mvbtn.on { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.fw-scenhint { font-size: 11.5px; padding: 4px 0; }
.fw-scdelta { font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 4px; }
.fw-scdelta.pos { color: var(--up); } .fw-scdelta.neg { color: var(--down); }
.fw-scaspriced { font-size: 10px; color: var(--muted); margin-left: 4px; }
.fw-sctbls { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.fw-sctblcol { flex: 1 1 220px; min-width: 200px; }
/* dated FOMC read card */
.fw-read { border: 1px solid var(--border); border-left-width: 3px; border-radius: 10px; padding: 12px 14px; margin: 4px 0 14px; background: var(--panel-2); }
.fw-read-hawk { border-left-color: var(--down); }
.fw-read-dove { border-left-color: var(--up); }
.fw-read-neutral { border-left-color: var(--muted); }
.fw-read-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fw-read-title { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.fw-lean { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 9px; border-radius: 999px; }
.fw-lean.hawk { color: var(--down); background: color-mix(in srgb, var(--down) 16%, transparent); }
.fw-lean.dove { color: var(--up); background: color-mix(in srgb, var(--up) 16%, transparent); }
.fw-lean.neutral { color: var(--muted); background: color-mix(in srgb, var(--muted) 16%, transparent); }
.fw-read-decision { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 4px; }
.fw-read-headline { font-size: 13.5px; font-weight: 650; color: var(--text); margin-top: 8px; line-height: 1.45; }
.fw-read-summary { font-size: 12px; color: var(--text); line-height: 1.55; margin-top: 6px; }
.fw-read-quote { margin: 10px 0; padding: 4px 0 4px 12px; border-left: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); font-style: italic; font-size: 12px; color: var(--text); }
.fw-read-cols { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.fw-read-col { flex: 1 1 300px; min-width: 260px; }
.fw-read-sub { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; margin-bottom: 3px; }
.fw-read-sub.hawk { color: var(--down); } .fw-read-sub.dove { color: var(--up); }
.fw-read-col ul { margin: 0; padding-left: 16px; }
.fw-read-col li { font-size: 11.5px; color: var(--text); line-height: 1.5; margin-bottom: 3px; }
.fw-read-mkt { font-size: 12px; color: var(--text); line-height: 1.55; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--row-border); }
.fw-read-src { font-size: 10px; margin-top: 8px; }
.fw-read-src a { color: color-mix(in srgb, var(--accent) 80%, var(--fg)); }
.fw-read-disc { font-size: 9.5px; font-style: italic; }
.fw-read-today { margin-bottom: 16px; }
.fw-fresh { display: inline-block; font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--up); background: color-mix(in srgb, var(--up) 16%, transparent); border-radius: 999px; padding: 1px 6px; margin: 0 4px; vertical-align: middle; }
.fw-read-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.fw-read-golink { flex: none; font-size: 10.5px; font-weight: 600; padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: color-mix(in srgb, var(--accent) 85%, var(--fg)); cursor: pointer; }
.fw-read-golink:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
/* EFFR/SOFR space toggle + chart legend + SOFR term strip */
.fw-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fw-spacetog { display: inline-flex; gap: 2px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 7px; padding: 2px; }
.fw-sptog { font-size: 10.5px; padding: 3px 10px; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; }
.fw-sptog.on { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.fw-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 2px; }
.fw-lg { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); }
.fw-lg i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.fw-lg i.dot { width: 8px; height: 8px; border-radius: 50%; }
.fw-lg i.dash { background: repeating-linear-gradient(90deg, #f59e0b 0 4px, transparent 4px 7px) !important; }
.fw-sofrcell { color: #22d3ee; font-variant-numeric: tabular-nums; }
.fw-terms { display: flex; gap: 18px; flex-wrap: wrap; }
.fw-termcol { flex: 1; min-width: 180px; }
.fw-termcol table { max-width: 260px; }
/* Priced-by-meeting + probability grid side by side, with tight columns */
.fw-sbs { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.fw-sbs-col { flex: 1 1 340px; min-width: 300px; }
#fed-scenario .opt-dtable th, #fed-scenario .opt-dtable td { padding: 3px 6px; font-size: 10.5px; white-space: nowrap; }
#fed-scenario .fw-grid th, #fed-scenario .fw-grid td { padding: 3px 5px; }
#fed-scenario .fw-obar { width: 62px; }
#fed-scenario .fw-oddstxt { font-size: 9px; }
.hlt-flag { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); padding: 4px 0; border-bottom: 1px solid var(--row-border); }
.hlt-flag:last-child { border-bottom: 0; }
.hlt-flag b { color: var(--text); font-variant-numeric: tabular-nums; margin-left: auto; }
.hlt-fdot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); flex: none; }
.hlt-flag.on { color: var(--text); }
.hlt-flag.on .hlt-fdot { background: var(--down); box-shadow: 0 0 6px var(--down); }
.hlt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.hlt-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 11px 8px; display: flex; flex-direction: column; align-items: center; }
.hlt-card.off { opacity: .6; border-style: dashed; }
.hlt-chead { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 6px; }
.hlt-title { font-size: 12px; font-weight: 600; color: var(--text); }
.hlt-regime { font-size: 8.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 5px; border-radius: 4px; white-space: nowrap; }
.hlt-regime.exp { color: var(--up); border: 1px solid var(--up); }
.hlt-regime.rec { color: #38bdf8; border: 1px solid #38bdf8; }
.hlt-regime.slow { color: #f59e0b; border: 1px solid #f59e0b; }
.hlt-regime.con { color: var(--down); border: 1px solid var(--down); }
.hlt-gauge { width: 100%; max-width: 132px; height: auto; display: block; }
.hlt-gauge.big { max-width: 200px; }
.hlt-needle { stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.hlt-hub { fill: var(--text); }
.hlt-val { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hlt-val.big { font-size: 32px; }
.hlt-meta { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--muted); margin-top: 1px; }
.hlt-mom { font-weight: 700; font-variant-numeric: tabular-nums; }
.hlt-mom.pos { color: var(--up); }
.hlt-mom.neg { color: var(--down); }
.hlt-mom.flat { color: var(--muted); }
.hlt-spark { margin-top: 3px; opacity: .85; }
.hlt-drillbtn { margin-top: 5px; font: 600 9.5px var(--font); color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 5px; padding: 3px 8px; cursor: pointer; }
.hlt-drillbtn:hover, .hlt-drillbtn.open { color: var(--tf-accent, #22c55e); border-color: var(--tf-accent, #22c55e); }
.hlt-dd { width: 100%; margin-top: 8px; border-top: 1px solid var(--row-border); padding-top: 7px; overflow-x: auto; }
/* expanded dial takes the full grid row so its 6-column indicator table fits (was overflowing the ~287px card) */
.hlt-card.expanded { grid-column: 1 / -1; }
.hlt-card.expanded .hlt-chead, .hlt-card.expanded .hlt-dd { max-width: 720px; }
.hlt-ddnote { margin: 0 0 6px; font-size: 9.5px; color: var(--muted); line-height: 1.4; }
.hlt-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.hlt-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 9px; text-transform: uppercase; letter-spacing: .3px; padding: 3px 4px; border-bottom: 1px solid var(--border); }
.hlt-table td { padding: 3px 4px; border-bottom: 1px solid var(--row-border); color: var(--text); vertical-align: middle; }
.hlt-table td.num, .hlt-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.hlt-table tr.hlt-na td { color: var(--muted); font-style: italic; }
.hlt-il { max-width: 190px; }
.hlt-inote { margin-left: 4px; color: var(--muted); cursor: help; }
.hlt-id { font-size: 9px; color: var(--muted); white-space: nowrap; }
.hlt-src { font-size: 7.5px; font-weight: 700; text-transform: uppercase; padding: 1px 3px; border-radius: 3px; margin-left: 3px; }
.hlt-src.fred { color: var(--muted); border: 1px solid var(--border); }
.hlt-src.fed { color: #38bdf8; border: 1px solid #38bdf8; }
.hlt-src.proxy { color: #f59e0b; border: 1px solid #f59e0b; }
.hlt-src.bbg { color: var(--bbg); border: 1px solid var(--bbg); }
.hlt-contrib { position: relative; min-width: 96px; }
.hlt-cbar { display: inline-block; height: 7px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.hlt-cbar.pos { background: var(--up); }
.hlt-cbar.neg { background: var(--down); }
.hlt-contrib b { font-variant-numeric: tabular-nums; font-size: 9.5px; }
@media (max-width: 860px) { .hlt-top { grid-template-columns: 1fr; } }
.hlt-strip-msg { padding: 10px 12px; font-size: 11px; }
/* overall-dial drill-down: today's releases -> signal impact */
.hlt-obtn { margin-top: 8px; font: 600 10px var(--font); color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.hlt-obtn:hover, .hlt-obtn.open { color: var(--tf-accent, #22c55e); border-color: var(--tf-accent, #22c55e); }
.hlt-odd { margin: 2px 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); padding: 12px 14px; }
.hlt-oddhead { font-size: 11.5px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.hlt-ocards { display: grid; grid-template-columns: repeat(auto-fill, minmax(324px, 1fr)); gap: 10px; }
.hlt-ocard { border: 1px solid var(--row-border); border-radius: 8px; padding: 9px 11px; background: var(--panel); }
.hlt-ohead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hlt-oname { font-size: 12px; font-weight: 600; color: var(--text); }
.hlt-owhen { font-size: 9.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hlt-onums { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; margin: 5px 0 4px; font-variant-numeric: tabular-nums; color: var(--muted); }
.hlt-onums b { color: var(--text); }
.hlt-oanalysis { font-size: 10.5px; color: var(--muted); margin-bottom: 6px; line-height: 1.45; }
.hlt-oimpact { border-top: 1px dashed var(--row-border); padding-top: 6px; }
.hlt-improw { font-size: 10.5px; color: var(--text); line-height: 1.55; }
.hlt-improw + .hlt-improw { margin-top: 3px; }
.hlt-sig { color: var(--tf-accent, #22c55e); font-weight: 600; }
.hlt-odd .pos { color: var(--up, #34d399); }
.hlt-odd .neg { color: var(--down, #f87171); }

/* ---------- Today: "Released — latest prints" ---------- */
.prt-head, .prt-row { display: grid; grid-template-columns: 10px 92px minmax(140px, 1fr) 74px 68px 62px 92px 52px 62px; align-items: center; gap: 8px; }
.prt-head { padding: 4px 10px; font-size: 9px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); border-bottom: 1px solid var(--border); }
.prt-head span:nth-child(n+4) { text-align: right; }
.prt-row { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--row-border); padding: 6px 10px; cursor: pointer; text-align: left; font: inherit; color: var(--text); }
.prt-row:hover { background: var(--panel-2); }
.prt-when { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prt-when b { color: var(--text); }
.prt-name { font-size: 11.5px; display: flex; flex-direction: column; line-height: 1.25; }
.prt-src { font-size: 8.5px; color: var(--muted); }
.prt-actual { font-size: 12.5px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.prt-chg, .prt-cons, .prt-surpcell, .prt-z { text-align: right; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.prt-cons { color: var(--muted); }
.prt-surp { font-weight: 700; }
.prt-surp em { font-style: normal; font-size: 8.5px; opacity: .8; }
.prt-z { font-weight: 600; }
.prt-spark { text-align: right; opacity: .85; }
@media (max-width: 900px) {
  .prt-head, .prt-row { grid-template-columns: 10px 78px 1fr 70px 62px; }
  .prt-head span:nth-child(n+6), .prt-row > span:nth-child(n+6) { display: none; }
}
/* CPI/PCE print → inline component breakdown */
.prt-row.drill .prt-exp { color: var(--tf-accent, var(--cyan)); font-weight: 700; }
.prt-row.drill.open .prt-exp { color: var(--cyan); }
.prt-dd { padding: 8px 12px 12px 30px; border-bottom: 1px solid var(--row-border); background: var(--panel); }
.prt-cpihead { font-size: 10.5px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.prt-cpitable { max-width: 720px; }
.prt-cpitable td.num, .prt-cpitable th.num { text-align: right; }
.prt-cpifoot { margin: 6px 0 0; font-size: 9.5px; }

/* ---------- Health: history chart ---------- */
.hh-wrap { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px 8px; }
.hh-svg { width: 100%; height: auto; display: block; color: var(--text); }
.hh-mid { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: .5; }
.hh-line { transition: opacity .15s; }
.hh-line.off { display: none; }
.hh-lo { fill: var(--down); stroke: var(--panel-2); stroke-width: 1.5; }
.hh-lolab { fill: var(--down); font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hh-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hh-chip { font: 600 9px var(--font); color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 10px; padding: 3px 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.hh-chip::before { content: ''; width: 8px; height: 2.5px; border-radius: 2px; background: var(--c, var(--muted)); opacity: .35; }
.hh-chip.on { color: var(--text); border-color: var(--c, var(--text)); }
.hh-chip.on::before { opacity: 1; }

/* ---------- Health: granular sub-panels + digest ---------- */
.hp-digest { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 4px; }
.hp-dpanel { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.hp-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text); }
.hp-take { margin: 7px 0 0; padding-left: 16px; }
.hp-take li { font-size: 11px; color: var(--muted); line-height: 1.55; }
.hp-alert { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; color: var(--muted); padding: 5px 0; border-bottom: 1px solid var(--row-border); }
.hp-alert:last-child { border-bottom: 0; }
.hp-ai { flex: none; font-size: 9px; line-height: 1.6; }
.hp-alert.crit { color: var(--text); } .hp-alert.crit .hp-ai { color: var(--down); }
.hp-alert.warn .hp-ai { color: #f59e0b; }
.hp-alert.info .hp-ai { color: var(--cyan); }
.hp-alert.ok .hp-ai { color: var(--up); }
.hp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.hp-panel { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px 9px; }
.hp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.hp-see { font: 600 9px var(--font); color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; cursor: pointer; white-space: nowrap; }
.hp-see:hover { color: var(--cyan); border-color: var(--cyan); }
.hp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 9px; }
.hp-tile { display: flex; flex-direction: column; gap: 1px; padding: 6px 7px; background: var(--panel); border: 1px solid var(--row-border); border-radius: 7px; }
.hp-lbl { font-size: 8.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); line-height: 1.3; min-height: 22px; }
.hp-val { font-size: 17px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.15; }
.hp-unit { font-size: 9px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.hp-vs { font-size: 8.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hp-vs b { color: var(--text); font-weight: 600; }
.hp-spark { margin-top: 2px; opacity: .8; }
.hp-note { margin: 8px 0 0; font-size: 9.5px; color: var(--muted); line-height: 1.4; }
@media (max-width: 860px) { .hp-digest { grid-template-columns: 1fr; } }
.prt-n { font-size: 8px; color: var(--muted); margin-left: 3px; }
.prt-n::before { content: '·'; margin-right: 2px; }

/* ---------- Debt & Solvency ---------- */
.slv-panel { padding: 14px 16px 18px; }
.slv-panel .hp-panel { margin-bottom: 4px; }
.slv-panel .hp-tiles { margin-bottom: 10px; }
.slv-shade { font-size: 9px; color: var(--muted); margin-left: auto; }
.slv-stack, .slv-corp { max-width: 760px; margin-top: 10px; }
.slv-kind { display: block; font-size: 8px; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
.slv-corp td.num b { font-variant-numeric: tabular-nums; }
.gtm-sec-head .hlt-src { margin-left: 6px; }


/* ── Solvency · fragility vs trigger ── */
.slv-frag td.num { font-variant-numeric: tabular-nums; }
.slv-frag tr.slv-now { background: rgba(234, 179, 8, .07); }
.slv-frag tr.slv-now td { border-top: 1px solid rgba(234, 179, 8, .35); }
.hp-blink { color: #eab308; animation: hpblink 1.4s ease-in-out infinite; }
@keyframes hpblink { 0%, 100% { opacity: .35 } 50% { opacity: 1 } }
.slv-chart-cap { font-size: 12px; color: var(--muted, #8b93a7); margin: 14px 0 4px; font-weight: 600; letter-spacing: .01em; }


/* ── r* comparison sub-tabs ── */
.rs-cmp-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.rs-cmp-chip { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12);
  color: var(--muted, #8b93a7); border-radius: 999px; padding: 4px 11px; font-size: 12px;
  font-weight: 600; cursor: pointer; transition: all .15s ease; }
.rs-cmp-chip:hover { color: var(--text); border-color: rgba(250,204,21,.45); }
.rs-cmp-chip.on { background: rgba(250,204,21,.14); border-color: #facc15; color: #facc15; }
.rs-cmp-sub { font-size: 11.5px; color: var(--muted, #8b93a7); margin: 2px 0 6px; font-variant-numeric: tabular-nums; }

/* ===================== Stocks tab ===================== */
.stk-search { position: relative; max-width: 460px; margin-bottom: 14px; }
.stk-search input { width: 100%; background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 9px 12px; font-size: 13px; font-family: inherit; }
.stk-search input:focus { outline: none; border-color: #22d3ee; }
.stk-results { position: absolute; top: 42px; left: 0; right: 0; z-index: 30; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.stk-results:empty { display: none; }
.stk-res { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; background: none; border: none; border-bottom: 1px solid var(--border);
  color: var(--text); text-align: left; cursor: pointer; font-family: inherit; font-size: 12.5px; }
.stk-res:last-child { border-bottom: none; }
.stk-res:hover { background: var(--panel-2); }
.stk-res b { color: #22d3ee; min-width: 56px; }
.stk-res span { color: var(--muted); }

.stk-header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.stk-id h2 { margin: 0; font-size: 22px; }
.stk-tk { color: var(--muted); font-weight: 600; font-size: 15px; margin-left: 6px; }
.stk-px { display: flex; align-items: baseline; gap: 12px; margin-top: 6px; }
.stk-px-last { font-size: 26px; font-weight: 700; }   /* proportional figures: tabular-nums looks loose at display size */
.stk-px-chg { font-size: 13px; font-weight: 600; }
.stk-px-chg.up { color: var(--up); } .stk-px-chg.down { color: var(--down); }
.stk-perf { display: flex; gap: 18px; }
.stk-perf-i { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.stk-perf-l { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.stk-perf-i span.up { color: var(--up); font-weight: 600; } .stk-perf-i span.down { color: var(--down); font-weight: 600; }

.stk-chart-panel { margin-bottom: 14px; }
.stk-chart { width: 100%; height: auto; }
.stk-chart .stk-grid { stroke: var(--border); stroke-width: 1; opacity: 0.55; }
.stk-chart .stk-axl { fill: var(--muted); font-size: 10px; }
.stk-chart-empty { padding: 40px; text-align: center; }

.stk-val { margin-bottom: 14px; }
.stk-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stk-chip { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.stk-chip-l { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.stk-chip-v { display: block; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 3px; }

.stk-metrics { margin-bottom: 14px; }
.stk-mgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.stk-mcol h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.stk-mrow { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.stk-mrow b { font-variant-numeric: tabular-nums; }
.stk-mrow b.down { color: var(--down); }

.stk-stmt-head { align-items: center; flex-wrap: wrap; }
.stk-segs { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.stk-seg { background: none; border: none; color: var(--muted); padding: 6px 14px; font-size: 12px; font-family: inherit; cursor: pointer; }
.stk-seg.active { background: #22d3ee; color: #061014; font-weight: 600; }
.stk-stmt-scroll { overflow-x: auto; }
.stk-stmt { min-width: 520px; }
.stk-stmt th, .stk-stmt td { padding: 6px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.stk-stmt thead th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--panel); }
.stk-lbl { text-align: left; }
.stk-stmt tbody tr:hover { background: var(--panel-2); }
.stk-src { margin-top: 10px; font-size: 11px; }
.stk-note, .stk-nostmt { padding: 20px; }

/* ===================== Index tab ===================== */
.ix-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.ix-uni { max-width: 320px; font-size: 13px; }
.ix-wnote { font-size: 10.5px; margin-top: 5px; max-width: 460px; }
.ix-level { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.ix-lvl { font-size: 24px; font-weight: 700; }
.ix-level .up { color: var(--up); font-weight: 600; } .ix-level .down { color: var(--down); font-weight: 600; }
.ix-lsub { font-size: 11px; }

.ix-top, .ix-mid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.ix-panel { margin: 0; }
@media (max-width: 900px) { .ix-top, .ix-mid { grid-template-columns: 1fr; } }

.ix-breadth { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ix-bstat { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.ix-bl { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.ix-bstat b { font-size: 18px; font-variant-numeric: tabular-nums; } .ix-bstat b.up { color: var(--up); } .ix-bstat b.down { color: var(--down); }

.ix-clists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ix-clist h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.ix-crow { display: grid; grid-template-columns: 48px 1fr auto; gap: 6px; padding: 3px 0; font-size: 12px; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--border); }
.ix-ct { font-weight: 600; } .ix-cc.up { color: var(--up); } .ix-cc.down { color: var(--down); }

.ix-sectors { display: flex; flex-direction: column; gap: 5px; }
.ix-secrow { display: grid; grid-template-columns: 120px 1fr 46px 52px; align-items: center; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.ix-secn { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-secbar { background: var(--panel-2); border-radius: 4px; height: 12px; overflow: hidden; }
.ix-secbar > span { display: block; height: 100%; background: #818cf8; border-radius: 4px; }
.ix-secw { text-align: right; } .ix-secchg { text-align: right; } .ix-secchg.up { color: var(--up); } .ix-secchg.down { color: var(--down); }

.ix-hm-wrap { overflow-x: auto; }
.ix-hm { border-collapse: collapse; font-size: 10px; font-variant-numeric: tabular-nums; }
.ix-hm th, .ix-hm td { padding: 3px 5px; text-align: center; }
.ix-hm-h, .ix-hm-rh { color: var(--muted); font-weight: 600; }
.ix-hm-rh { text-align: right; }
.ix-hm-c { border: 1px solid var(--bg, #0a0a10); min-width: 30px; }

.ix-cons-scroll { overflow: auto; max-height: 560px; }
.ix-cons { min-width: 720px; }
.ix-cons th, .ix-cons td { padding: 5px 9px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ix-cons thead th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-weight: 600; z-index: 2; }
.ix-sortable { cursor: pointer; user-select: none; }
.ix-sortable:hover { color: var(--text); }
.ix-sorted { color: #818cf8; }
.ix-sorted::after { content: ' ▾'; }
.ix-tk { font-weight: 600; }
.ix-nm { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.ix-sec { color: var(--muted); font-size: 11px; }
.ix-cons tbody tr:hover { background: var(--panel-2); }
.ix-spk { width: 124px; }

/* ── manual-build controls for the heavy Bloomberg pulls ── */
.slv-buildbox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin: 8px 0; border: 1px dashed rgba(255,255,255,.16); border-radius: 8px;
  background: rgba(255,255,255,.02); }
.slv-build-btn { background: rgba(234,179,8,.14); border: 1px solid #eab308; color: #eab308;
  border-radius: 6px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: all .15s ease; }
.slv-build-btn:hover { background: rgba(234,179,8,.26); }
.slv-build-txt { font-size: 11.5px; color: var(--muted, #8b93a7); line-height: 1.45; }


/* ── manual-mode "Load Bloomberg" trigger ── */
.bbg-load { background: rgba(250,204,21,.12); border: 1px solid #facc15; color: #facc15;
  border-radius: 6px; padding: 5px 11px; font-size: 12px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: all .15s ease; }
.bbg-load:hover:not(:disabled) { background: rgba(250,204,21,.24); }
.bbg-load:disabled { opacity: .55; cursor: default; }
.bbg-load.on { background: rgba(34,197,94,.16); border-color: #22c55e; color: #22c55e; }


/* ── R / C / R&C carry-roll columns in the Rates tab ── */
.rate-table th.rt-cr, .rate-table td.rt-cr { text-align: right; font-variant-numeric: tabular-nums;
  background: rgba(56,189,248,.045); }
.rate-table th.rt-cr { color: #38bdf8; font-size: 10.5px; letter-spacing: .02em; }
.rate-table td.rt-cr { font-size: 11.5px; color: var(--muted, #8b93a7); }
.rate-table td.rt-cr.pos { color: #22c55e; } .rate-table td.rt-cr.neg { color: #f87171; }
.rate-table th.rt-crtot, .rate-table td.rt-crtot { font-weight: 700;
  border-right: 1px solid rgba(56,189,248,.28); }
.rt-crnote { font-size: 10.5px; }

.rsk-cr { display: block; font-style: normal; font-size: 10px; letter-spacing: .01em;
  color: var(--muted, #8b93a7); margin-top: 2px; font-variant-numeric: tabular-nums; }
.rsk-cr.pos { color: #22c55e; } .rsk-cr.neg { color: #f87171; }

.rate-table th.rt-ctr, .rate-table td.rt-ctr { text-align: right; font-variant-numeric: tabular-nums;
  background: rgba(167,139,250,.06); }
.rate-table th.rt-ctr { color: #a78bfa; font-size: 10.5px; }
.rate-table td.rt-ctr { font-size: 11.5px; color: var(--muted, #8b93a7); }
.rate-table td.rt-ctr.pos { color: #22c55e; } .rate-table td.rt-ctr.neg { color: #f87171; }
.rate-table td.rt-ctr.strong { font-weight: 700; }


/* ── Geo tab: choropleth maps ── */
.geo-scopes, .geo-metrics { display: flex; flex-wrap: wrap; gap: 5px; margin: 5px 0; }
.geo-scope, .geo-metric { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12);
  color: var(--muted, #8b93a7); border-radius: 999px; padding: 3px 10px; font-size: 11.5px;
  font-weight: 600; cursor: pointer; transition: all .15s ease; }
.geo-scope:hover, .geo-metric:hover { color: var(--text); border-color: rgba(20,184,166,.5); }
.geo-scope.on, .geo-metric.on { background: rgba(20,184,166,.16); border-color: #14b8a6; color: #14b8a6; }
.geo-scope { font-size: 12px; padding: 4px 12px; }

/* ---- timeline ("movie") ---- */
.geo-time { margin: 8px 2px 0; border-top: 1px solid rgba(255,255,255,.07); padding-top: 8px; }
.geo-blocked { margin: 8px 2px 0; padding: 7px 11px; border-radius: 5px; font-size: 11.5px;
  background: rgba(234,179,8,.10); border: 1px solid rgba(234,179,8,.42); color: #eab308; }
.geo-years { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.geo-year { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12);
  color: var(--muted, #8b93a7); border-radius: 5px; padding: 3px 11px; font-size: 12px;
  font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; transition: all .12s ease; }
.geo-year:hover { color: var(--text); border-color: rgba(20,184,166,.5); }
.geo-year.on { background: rgba(20,184,166,.18); border-color: #14b8a6; color: #14b8a6; }
.geo-time-row { display: flex; align-items: center; gap: 12px; }
.geo-play { background: rgba(20,184,166,.16); border: 1px solid #14b8a6; color: #14b8a6;
  border-radius: 5px; padding: 4px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
  min-width: 84px; font-variant-numeric: tabular-nums; }
.geo-play:hover { background: rgba(20,184,166,.28); }
.geo-period { min-width: 86px; font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.geo-slider-wrap { flex: 1; position: relative; padding-bottom: 14px; }
.geo-slider { width: 100%; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(248,113,113,.45), rgba(113,122,140,.4), rgba(34,197,94,.45));
  outline: none; cursor: pointer; }
.geo-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: #14b8a6; border: 2px solid #0b0e14; cursor: grab;
  box-shadow: 0 0 0 1px #14b8a6; }
.geo-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #14b8a6;
  border: 2px solid #0b0e14; cursor: grab; }
.geo-ticks { position: absolute; left: 0; right: 0; top: 12px; height: 12px; }
/* translateX(-50%) centres each label on its frame; the ends would otherwise overhang the track */
.geo-tick { position: absolute; transform: translateX(-50%); font-size: 9.5px; color: var(--muted, #8b93a7);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.geo-tick::before { content: ''; position: absolute; left: 50%; top: -5px; width: 1px; height: 3px;
  background: rgba(255,255,255,.18); }
.geo-time-note { font-size: 10.5px; color: var(--muted, #8b93a7); margin-top: 6px; }
.geo-svg .geo-sh { transition: fill .12s linear; }
/* The map is the page: cap it against the VIEWPORT so the tab fits without scrolling, rather
   than letting a wide panel make it arbitrarily tall. preserveAspectRatio keeps it centred. */
/* Budgeted, not guessed: at 1440x900 the surrounding chrome (header, tab row, panel head, chips,
   legend, note, footer) measures ~470px, so the map gets what is left. 44vh keeps the page inside
   the viewport with a little slack. preserveAspectRatio centres it, so the leftover width on a wide
   screen shows as symmetric margin rather than a stretched map. */
/* The chrome around the map (header, tab row, panel head, chips, legend, note, footer) is a roughly
   CONSTANT ~505px — it does not shrink with the viewport. So a percentage cap is wrong: 44vh fits a
   900px-tall screen and overflows a 1366x768 laptop. Budget the leftover instead, with a floor so a
   very short window still shows a usable map rather than a sliver. */
.geo-svg { width: 100%; height: auto; display: block; margin: 0 auto;
  max-height: max(200px, calc(100vh - 525px)); }   /* +10px slack: exact-fit is fragile */
.geo-body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 14px; align-items: start; }
.geo-mapcol { min-width: 0; }
.geo-sh { stroke: rgba(10,14,22,.55); stroke-width: .5; transition: opacity .12s ease; cursor: default; }
.geo-sh:hover { opacity: .72; stroke: #e6ebf5; stroke-width: 1.1; }
.geo-legend { display: flex; flex-wrap: wrap; gap: 2px; margin: 2px 0 0; align-items: center; }
.geo-lg-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.geo-lg-cell span { display: block; width: 46px; height: 8px; border-radius: 2px; }
.geo-lg-cell i { font-style: normal; font-size: 10px; color: var(--muted, #8b93a7);
  font-variant-numeric: tabular-nums; }
.geo-ranks { display: flex; flex-direction: column; gap: 10px; }
.geo-ranks .hlt-table td { padding: 1px 4px; font-size: 11px; }
.geo-rank-col h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .6px; color: var(--muted, #8b93a7); }
@media (max-width: 900px) {
  .geo-body { grid-template-columns: 1fr; }
  .geo-ranks { flex-direction: row; gap: 16px; }
  .geo-ranks > * { flex: 1; }
  /* narrow: the tab row wraps, so the chrome is taller — give the map less */
  /* the two-tier nav no longer wraps to 4 lines here, so the map gets ~95px back */
  .geo-svg { max-height: max(180px, calc(100vh - 545px)); }
}

/* keep the Geo tab inside one screen: trim the chrome around the map */
.geo-panel { padding-top: 8px; padding-bottom: 8px; }
.geo-panel .panel-head { margin-bottom: 2px; padding-bottom: 4px; }
.geo-panel .panel-head h3 { font-size: 15px; }
.geo-panel .hp-note { margin: 4px 0 0; font-size: 10.5px; line-height: 1.4; }
.geo-rank-col h4 { margin: 0 0 3px; }


/* ── two-tier navigation ── */
/* Neither row wraps. With 26 tabs the old single wrapping row grew to 164px on a narrow window —
   more than a third of the viewport before any content. Both rows scroll instead, so the header
   height is constant at every width. */
.subnav .navrow { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  gap: 3px; scrollbar-width: thin; }
.subnav .navrow::-webkit-scrollbar { height: 4px; }
.subnav .navrow::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 2px; }
.navrow-g { padding-bottom: 3px; border-bottom: 1px solid rgba(255,255,255,.07); }
.navrow-t { padding-top: 3px; }
.navrow > * { flex: 0 0 auto; }
.navg { display: inline-flex; align-items: center; gap: 6px; background: none; border: none;
  color: var(--muted, #8b93a7); font: inherit; font-size: 12.5px; font-weight: 700;
  padding: 5px 10px; border-radius: 6px 6px 0 0; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .12s ease, background .12s ease; }
.navg:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
.navg.on { color: var(--tf-accent); border-bottom-color: var(--tf-accent);
  background: rgba(255,255,255,.05); }
.navg-n { font-style: normal; font-size: 10px; font-weight: 600; opacity: .6;
  background: rgba(255,255,255,.1); border-radius: 8px; padding: 0 5px; }
/* a PINNED group's tabs sit inline in the group row, fenced off from the group buttons */
.navpin { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto;
  padding: 0 6px; margin: 0 2px; border-left: 1px solid rgba(255,255,255,.12);
  border-right: 1px solid rgba(255,255,255,.12); }
.navrow-g .tab { padding: 4px 8px; font-size: 12px; }


/* ── keyboard switcher / help ── */
.kb-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(6,10,16,.62);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh;
  backdrop-filter: blur(2px); }
.kb-card { background: var(--panel, #121821); border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.5); width: min(520px, 92vw);
  overflow: hidden; }
.kb-input { width: 100%; box-sizing: border-box; background: none; border: none;
  border-bottom: 1px solid rgba(255,255,255,.12); color: var(--text, #e6ebf5);
  font: inherit; font-size: 14px; padding: 13px 16px; outline: none; }
.kb-list { max-height: 46vh; overflow-y: auto; padding: 5px; }
.kb-row { display: flex; align-items: center; gap: 9px; width: 100%; background: none;
  border: none; color: var(--muted, #8b93a7); font: inherit; font-size: 13px; text-align: left;
  padding: 7px 11px; border-radius: 6px; cursor: pointer; }
.kb-row b { color: var(--text, #e6ebf5); font-weight: 600; }
.kb-row i { margin-left: auto; font-style: normal; font-size: 11px; opacity: .65; }
.kb-row:hover, .kb-row.on { background: color-mix(in srgb, var(--text) 8%, transparent); }
.kb-row.on b { color: #14b8a6; }
.kb-empty { padding: 16px; text-align: center; color: var(--muted, #8b93a7); font-size: 12.5px; }
.kb-card h3 { margin: 0; padding: 12px 16px 8px; font-size: 14px; }
.kb-tbl { width: 100%; border-collapse: collapse; margin: 0 0 4px; }
.kb-tbl td { padding: 5px 16px; font-size: 12.5px; color: var(--muted, #8b93a7); }
.kb-tbl td:first-child { width: 90px; }

/* Product & instrument guide — pill (Charts + Worksheet) + overlay card */
.pg-pill { background: rgba(20,184,166,.12); border: 1px solid rgba(20,184,166,.4); color: #2dd4bf;
  font: inherit; font-size: 11px; padding: 3px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.pg-pill:hover { background: rgba(20,184,166,.22); }
.pg-card { position: relative; background: var(--panel, #121821); border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.5); width: min(780px, 94vw); max-height: 80vh; overflow: hidden; }
.pg-body { max-height: 80vh; overflow-y: auto; padding: 16px 20px 20px; }
.pg-x { position: absolute; top: 6px; right: 10px; z-index: 2; background: none; border: none;
  color: var(--muted, #8b93a7); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.pg-x:hover { color: var(--text, #e6ebf5); }
.pg-title { font-size: 15px; font-weight: 700; }
.pg-intro { font-size: 12px; color: var(--muted, #8b93a7); margin: 4px 0 12px; }
.pg-sec { font-size: 12.5px; font-weight: 700; color: #2dd4bf; margin: 15px 0 5px; }
.pg-tbl { width: 100%; border-collapse: collapse; }
.pg-tbl td { padding: 4px 8px 4px 0; font-size: 12px; color: var(--muted, #8b93a7);
  vertical-align: top; border-bottom: 1px solid rgba(255,255,255,.05); }
.pg-tbl td.pg-k { width: 46%; color: var(--text, #e6ebf5); }
.pg-body code { background: var(--chip-bg); color: var(--text); border-radius: 4px; padding: 1px 5px;
  font-size: 11px; color: #e6ebf5; }
.pg-note { font-size: 11px; color: var(--muted, #8b93a7); margin: 5px 0 0; }
.pg-list { margin: 6px 0 0; padding-left: 18px; }
.pg-list li { font-size: 12px; color: var(--muted, #8b93a7); margin-bottom: 5px; }
.pg-list b, .pg-tbl b, .pg-body b { color: var(--text, #e6ebf5); }
.kb-tbl kbd { background: var(--chip-bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 4px; padding: 1px 6px; font-size: 11px; font-family: inherit; color: #e6ebf5; }
.kb-note { margin: 0; padding: 6px 16px 12px; font-size: 11px; color: var(--muted, #8b93a7); }

/* ============ dataviz palette (validated: lightness band, chroma, CVD ΔE, contrast) ============
   Fixed categorical order — slot 1 blue, 2 green, 3 magenta. Steps chosen per surface,
   not an automatic flip. --viz-ctx/-ctx2 are the de-emphasis greys used for context series
   (moving averages) so the price line alone carries the accent. */
:root { --viz-1: #3987e5; --viz-2: #008300; --viz-3: #d55181; --viz-ctx: #8b96b0; --viz-ctx2: #5f6b85; }
:root[data-theme="light"] { --viz-1: #2a78d6; --viz-2: #008300; --viz-3: #e87ba4; --viz-ctx: #6b7689; --viz-ctx2: #a3adbf; }
:root[data-theme="contrast"] { --viz-1: #3987e5; --viz-2: #008300; --viz-3: #d55181; --viz-ctx: #c4c4d6; --viz-ctx2: #8b96b0; }

/* ---- filter row (one row, above everything it scopes) ---- */
.stk-filters { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 12px; }
.stk-rangebar { display: inline-flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.stk-rangebar button { background: none; border: none; color: var(--muted); padding: 5px 12px; font-size: 12px; font-family: inherit; cursor: pointer; }
.stk-rangebar button.active { background: var(--viz-1); color: #fff; font-weight: 600; }
.stk-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }

/* ---- KPI stat tiles ---- */
.stk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stk-kpi { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }
.stk-kpi-l { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.stk-kpi-v { display: block; font-size: 16px; font-weight: 700; margin-top: 3px; }
.stk-kpi-v.up { color: var(--up); } .stk-kpi-v.down { color: var(--down); }
.stk-kpi-sub { font-size: 10.5px; color: var(--muted); }
/* 52-week range meter: unfilled track is a lighter step of the same ramp */
.stk-meter { position: relative; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--viz-1) 22%, transparent); margin-top: 6px; }
.stk-meter-dot { position: absolute; top: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--viz-1); box-shadow: 0 0 0 2px var(--panel-2); transform: translateX(-50%); }

/* ---- charts ---- */
.stk-figure { position: relative; margin-top: 4px; }
.stk-svg { width: 100%; height: auto; display: block; }
.stk-svg .g-line { stroke: var(--border); stroke-width: 1; opacity: .55; }      /* solid hairline, never dashed */
.stk-svg .g-txt { fill: var(--muted); font-size: 11px; }
.stk-svg .g-txt-end { fill: var(--muted); font-size: 11px; text-anchor: end; }
.stk-svg .ref-line { stroke: var(--viz-ctx2); stroke-width: 1; opacity: .8; }
.stk-svg .ser { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.stk-svg .ctx-line { fill: none; stroke-width: 1.5; stroke-linejoin: round; }
.stk-svg .vol-bar { fill: var(--viz-ctx); opacity: .55; }
.stk-svg .col { rx: 2; }
.stk-svg .end-dot { stroke: var(--panel); stroke-width: 2; }                     /* 2px surface ring */
.stk-svg .cross { stroke: var(--muted); stroke-width: 1; opacity: .7; }
.stk-svg .lbl { font-size: 11px; font-weight: 600; fill: var(--text); }
/* legend — identity is never colour-alone; mark mirrors the series (line key) */
.stk-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 8px 0 2px; font-size: 11.5px; color: var(--muted); }
.stk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stk-legend i { width: 14px; height: 2px; border-radius: 1px; display: inline-block; }
.stk-legend i.dot { width: 9px; height: 9px; border-radius: 2px; }
/* tooltip — values lead, labels follow */
.stk-tip { position: absolute; pointer-events: none; z-index: 20; background: var(--panel); border: 1px solid var(--border);
  border-radius: 7px; padding: 7px 9px; font-size: 11.5px; box-shadow: 0 6px 20px rgba(0,0,0,.35); white-space: nowrap; }
.stk-tip-d { color: var(--muted); margin-bottom: 4px; }
.stk-tip-r { display: flex; align-items: center; gap: 7px; justify-content: space-between; }
.stk-tip-r b { font-variant-numeric: tabular-nums; }
.stk-tip-k { width: 12px; height: 2px; border-radius: 1px; display: inline-block; }
.stk-chartgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.stk-cap { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* price chart + written analysis side by side (chart narrower, analysis fills the freed space) */
.stk-chart-row { display: flex; gap: 18px; align-items: flex-start; }
.stk-chart-main { flex: 1 1 62%; min-width: 0; }          /* min-width:0 lets the SVG shrink */
.stk-analysis { flex: 0 0 clamp(260px, 33%, 380px); border-left: 1px solid var(--border); padding-left: 16px; }
.stk-an-h { margin: 0 0 10px; font-size: 14px; }
.stk-an-sec { margin-bottom: 13px; }
.stk-an-sec h4 { margin: 0 0 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.stk-an-item { padding: 4px 0 4px 11px; margin-bottom: 3px; font-size: 12.5px; line-height: 1.5; border-left: 2px solid var(--viz-ctx); }
.stk-an-item.pos { border-color: var(--up); }
.stk-an-item.neg { border-color: var(--down); }
.stk-an-item.neu { border-color: var(--viz-ctx); }
.stk-an-note { font-size: 10.5px; color: var(--muted); margin-top: 12px; font-style: italic; }
.stk-an-empty { padding: 8px 0; }
@media (max-width: 900px) {
  .stk-chart-row { flex-direction: column; }
  .stk-analysis { flex-basis: auto; width: 100%; border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 14px; }
}

/* ===================== Analyst estimates ===================== */
.est-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; margin-top: 14px; }
.est-cell { min-width: 0; }
.est-wide { grid-column: 1 / -1; }
.est-head2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .est-grid { grid-template-columns: 1fr; } }

/* recommendation split bar */
.est-ratebar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; margin: 6px 0 8px; background: var(--panel-2); }
.est-seg { display: flex; align-items: center; justify-content: center; min-width: 18px; color: #06121f; font-size: 12px; font-weight: 700; }
.est-seg + .est-seg { border-left: 2px solid var(--panel); }        /* 2px surface gap */
.est-ratekey { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); align-items: center; }
.est-ratekey i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.est-ratekey-tot { margin-left: auto; }

/* price-target range track */
.est-track { position: relative; height: 8px; border-radius: 4px; background: var(--panel-2); margin: 26px 0 30px; }
.est-track-fill { position: absolute; top: 0; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--viz-1) 30%, transparent); }
.est-tmk { position: absolute; top: -4px; width: 2px; height: 16px; transform: translateX(-50%); }
.est-tmk.cur { background: var(--muted); } .est-tmk.mean { background: var(--viz-1); }
.est-tmk-l { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); white-space: nowrap; }
.est-tmk-v { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; white-space: nowrap; }
.est-tmk.mean .est-tmk-v { color: var(--viz-1); }
.est-track-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: -6px; }

.est-tbl { min-width: 420px; margin-top: 8px; }
.est-tbl .up { color: var(--up); } .est-tbl .down { color: var(--down); }

/* ===================== Macro cockpit · §1 Liquidity ("the oxygen") ===================== */
.cockpit-divider { margin: 18px 2px 10px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); border-top: 1px dashed var(--border); padding-top: 10px; }
.liq-panel .panel-head h3 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.liq-top { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
@media (max-width: 860px) { .liq-top { grid-template-columns: 1fr; } }
.liq-hero, .liq-wfwrap { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.liq-herohead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.liq-heronum { font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.liq-herolbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.liq-chg { font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: rgba(var(--up-rgb), .12); color: var(--up); }
.liq-chg.neg { background: rgba(var(--down-rgb), .12); color: var(--down); }
.liq-chg .muted { font-weight: 500; }
.liq-hero-svg { width: 100%; height: auto; display: block; margin-top: 4px; }
.liq-grid { stroke: var(--grid); stroke-width: 1; opacity: .5; }
.liq-yl, .liq-xl { fill: var(--muted); font-size: 10px; }
.liq-wftitle { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.liq-wftitle .muted { text-transform: none; }
.liq-wf-svg { width: 100%; height: auto; display: block; }
.liq-wf.asset { fill: #38bdf8; }
.liq-wf.drain { fill: color-mix(in srgb, var(--down) 74%, transparent); }
.liq-wf.net { fill: #22d3ee; }
.liq-wfval { fill: var(--text); font-size: 11px; font-weight: 600; }
.liq-wfval.drain { fill: var(--down); }
.liq-wfx { fill: var(--muted); font-size: 10.5px; }
.liq-wfconn { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; opacity: .55; }
.liq-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.liq-tile { background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
.liq-tl { font-size: 11px; color: var(--muted); line-height: 1.25; min-height: 27px; }
.liq-tv { font-size: 20px; font-weight: 700; color: var(--text); margin-top: 2px; }
.liq-tu { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.liq-tm { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.liq-tchg { font-size: 11.5px; font-weight: 600; color: var(--up); }
.liq-tchg.neg { color: var(--down); }
.liq-tchg .muted { font-weight: 500; }

/* ===================== Macro cockpit · §2 Housing ("shelter") ===================== */
.house-leg { fill: var(--text); font-size: 11px; font-weight: 600; }
.house-bar-svg { width: 100%; height: auto; display: block; margin-top: 6px; }
.house-track { fill: color-mix(in srgb, var(--muted) 22%, transparent); }
.house-bal { fill: color-mix(in srgb, var(--up) 30%, transparent); }
.house-marker { stroke: #f97316; stroke-width: 2.5; }
.house-mval { fill: #f97316; font-size: 12px; font-weight: 700; }
.house-tick { fill: var(--muted); font-size: 10px; }
.house-blabel { fill: var(--muted); font-size: 11px; }
.house-bbg { margin: 12px 0 0; padding-left: 16px; }
.house-bbg li { font-size: 11px; color: var(--muted); line-height: 1.45; }

/* ===================== Macro cockpit · §3 Consumer / §4 Bank stress ===================== */
.ck-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ===================== Macro cockpit · sticky "at a glance" jump-bar (Phase 6B) ===================== */
.ck-topbar { position: sticky; top: 0; z-index: 30; background: var(--bg);
  border-bottom: 1px solid var(--border); margin: 0 0 12px; padding: 8px 0 9px; }
.ck-glance-lbl { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: 6px; }
.ck-jump { display: flex; gap: 6px; flex-wrap: wrap; }
.ck-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); border-left: 3px solid var(--chip); background: var(--panel-2);
  cursor: pointer; text-decoration: none; transition: background .12s ease, transform .12s ease; }
.ck-chip:hover { background: color-mix(in srgb, var(--chip) 15%, var(--panel-2)); transform: translateY(-1px); }
.ck-chip-n { font-size: 10px; font-weight: 700; color: var(--muted); }
.ck-chip-l { font-size: 11.5px; font-weight: 600; color: var(--text); }
.ck-chip-v { font-size: 11.5px; font-weight: 700; color: var(--text); } /* accent identity is the left border; value stays legible in both themes */
.ck-chip-v.ck-dim { color: var(--muted); font-weight: 500; }
#tab-content section[id^="ck-"] { scroll-margin-top: 78px; }

/* ===================== Macro cockpit · chart event markers ===================== */
.ck-evline { stroke: var(--muted); stroke-width: 1; opacity: .13; stroke-dasharray: 2 3; } /* faint backdrop; the coloured top dot is the marker */
.ck-ev { cursor: help; }
.ck-ev:hover .ck-evline { opacity: .8; stroke-dasharray: none; }
.ck-evleg { margin-left: 10px; font-size: 10px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.ck-evleg i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin: 0 3px 0 7px; vertical-align: middle; }

/* ===================== Bank securities books (Consumer Credit tab) ===================== */
.banksec-panel { margin-top: 16px; }
.bs-agg { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; }
.bs-aggnum { font-size: 30px; font-weight: 700; color: #f43f5e; letter-spacing: -.01em; }
.bs-agglbl { font-size: 12.5px; color: var(--muted); max-width: 640px; line-height: 1.4; }
.bs-agglbl b { color: var(--text); }
.bs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.bs-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.bs-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bs-name { font-size: 13px; font-weight: 600; color: var(--text); }
.bs-asof { font-size: 10.5px; }
.bs-lossrow { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.bs-loss { font-size: 22px; font-weight: 700; }
.bs-plbl { font-size: 11.5px; color: var(--muted); }
.bs-plbl b { font-weight: 700; }
.bs-bar { height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--muted) 22%, transparent); margin: 7px 0 8px; overflow: hidden; }
.bs-barfill { height: 100%; border-radius: 3px; }
.bsev-lo { color: #22c55e; } .bs-barfill.bsev-lo { background: #22c55e; }
.bsev-md { color: #f59e0b; } .bs-barfill.bsev-md { background: #f59e0b; }
.bsev-hi { color: #f43f5e; } .bs-barfill.bsev-hi { background: #f43f5e; }
.bs-split { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.bs-split b { color: var(--text); font-weight: 700; }
.bs-detail { font-size: 10.5px; margin-top: 4px; line-height: 1.35; }
.bs-spark { margin-top: 7px; }

/* bank card: balance / income / maturity ladder */
.bs-fin { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.bs-finrow { font-size: 11px; color: var(--muted); line-height: 1.5; }
.bs-finrow b { color: var(--text); font-weight: 700; }
.bs-fl { display: inline-block; min-width: 66px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); opacity: .8; }
.bs-ladder { margin-top: 3px; }
.bl-bar { display: flex; height: 9px; border-radius: 3px; overflow: hidden; margin: 3px 0 4px; background: color-mix(in srgb, var(--muted) 18%, transparent); }
.bl-seg { height: 100%; }
.bl-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-lg { font-size: 9.5px; color: var(--muted); }
.bl-lg i { display: inline-block; width: 6px; height: 6px; border-radius: 1px; margin-right: 3px; vertical-align: middle; }
.bl-na { font-size: 10.5px; }

/* corporate FCF (Solvency §5) */
.fcf-top { margin: 8px 0 4px; font-size: 11.5px; }
.fcf-toplbl { color: var(--muted); margin-right: 6px; }
.fcf-chip { display: inline-block; margin: 2px 5px 2px 0; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, #10b981 12%, var(--panel-2)); border: 1px solid var(--border);
  font-size: 11px; color: var(--muted); }
.fcf-chip b { color: var(--text); font-weight: 700; }

/* bank card: reserves-trend drilldown */
.bs-drill-tog { cursor: pointer; border-bottom: 1px dotted var(--muted); }
.bs-drill-tog:hover { color: var(--text); }
.bs-chev { display: inline-block; font-size: 9px; color: var(--muted); transition: transform .15s ease; }
.bs-card.expanded .bs-chev { transform: rotate(90deg); }
.bs-drill { display: none; margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 6px; }
.bs-card.expanded .bs-drill { display: block; }

/* ===================== Derivatives tab (volatility & positioning) ===================== */
.deriv-term { margin-top: 4px; }
.deriv-termnum { font-size: 30px; font-weight: 700; color: var(--text); }
.deriv-termsub { font-size: 11px; margin-top: 6px; line-height: 1.4; }
.cot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cot-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.cot-head { font-size: 12.5px; margin-bottom: 7px; display: flex; align-items: baseline; gap: 6px; }
.cot-head b { color: var(--text); }
.cot-row { display: grid; grid-template-columns: 56px 1fr 48px 46px; align-items: center; gap: 7px; margin: 4px 0; padding: 1px 3px; border-radius: 4px; }
.cot-g { font-size: 11px; color: var(--muted); }
.cot-bar { position: relative; height: 10px; background: color-mix(in srgb, var(--muted) 16%, transparent); border-radius: 3px; }
.cot-zero { position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1px; background: var(--muted); opacity: .5; }
.cot-fill { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.cot-fill.pos { background: var(--up); } .cot-fill.neg { background: var(--down); }
.cot-n { font-size: 11px; font-weight: 700; text-align: right; }
.cot-n.pos { color: var(--up); } .cot-n.neg { color: var(--down); }
.cot-trend { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 10px; }

/* COT z-score extremes */
.cot-zsc { font-size: 10px; color: var(--muted); text-align: right; white-space: nowrap; }
.cot-zsc.cot-ext { color: var(--down); font-weight: 700; }
.cot-rowext { background: color-mix(in srgb, var(--down) 9%, transparent); }
.cot-extremes { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 12px;
  padding: 8px 11px; background: color-mix(in srgb, var(--down) 7%, var(--panel-2)); border: 1px solid var(--border); border-radius: 9px; }
.cot-extlbl { font-size: 11.5px; font-weight: 600; color: var(--text); }
.cot-extchip { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); }
.cot-extchip b { font-weight: 700; }
.cot-extchip.pos b { color: var(--up); } .cot-extchip.neg b { color: var(--down); }

/* COT at-a-glance dashboard (net %-of-OI × trader group matrix) */
.cot-dash { margin-bottom: 14px; }
.cot-dashhead { font-size: 11.5px; margin-bottom: 6px; }
.cot-dashhead b { color: var(--text); }
.cot-dwrap { overflow-x: auto; }
.cot-dtable { border-collapse: collapse; width: 100%; font-size: 12px; }
.cot-dtable thead th { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; padding: 4px 8px; text-align: center; border-bottom: 1px solid var(--border); }
.cot-dtable thead th.cot-drow { text-align: left; }
.cot-drow { text-align: left; padding: 6px 10px 6px 3px; white-space: nowrap; font-weight: 400; }
.cot-drow b { color: var(--text); font-size: 12px; }
.cot-drow .muted { font-size: 10px; margin-left: 6px; }
.cot-dtable tbody tr { border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.cot-dcell { text-align: center; padding: 5px 8px; min-width: 74px; }
.cot-dpct { display: block; font-weight: 700; font-size: 12.5px; }
.cot-dz { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.cot-dcell.pos .cot-dpct { color: var(--up); } .cot-dcell.neg .cot-dpct { color: var(--down); }
.cot-dcell.cot-dext { background: color-mix(in srgb, var(--down) 12%, transparent); border-radius: 5px; }
.cot-dcell.cot-dext .cot-dz { color: var(--down); font-weight: 700; }

/* COT positioning-vs-price drilldown */
.cot-drilltog { margin-left: auto; font-size: 10px; color: #f472b6; cursor: pointer; white-space: nowrap; border-bottom: 1px dotted currentColor; }
.cot-drilltog:hover { color: var(--text); }
.cot-drill { display: none; margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 6px; }
.cot-card.expanded .cot-drill { display: block; }
.cot-card.expanded .cot-drilltog::after { content: ' ▾'; }

/* Derivatives §4 · Options rich/cheap (vol-risk-premium, index-level) */
.opt-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.opt-stat { flex: 1 1 90px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; }
.opt-stat-l { display: block; font-size: 10.5px; color: var(--muted); }
.opt-stat-v { display: block; font-size: 18px; font-weight: 700; color: var(--text); margin: 1px 0; }
.opt-stat-s { display: block; font-size: 9.5px; }
.opt-carry { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.opt-carry-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 10px; font-size: 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.opt-carry-row:last-child { border-bottom: none; }
.opt-carry-l { color: var(--muted); }
.opt-carry-v { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.opt-carry-v.pos { color: var(--up); } .opt-carry-v.neg { color: var(--down); }
.opt-carry-row.sub { background: color-mix(in srgb, var(--muted) 8%, transparent); }
.opt-carry-row.sub .opt-carry-l, .opt-carry-row.net .opt-carry-l { color: var(--text); font-weight: 600; }
.opt-carry-row.net { background: color-mix(in srgb, var(--accent, #a78bfa) 12%, transparent); font-size: 13px; }
.opt-xhead { font-size: 11.5px; margin: 16px 0 7px; }
.opt-xhead b { color: var(--text); }
.opt-dwrap { overflow-x: auto; }
.opt-dtable { border-collapse: collapse; width: 100%; font-size: 12px; }
.opt-dtable thead th { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.opt-dtable thead th.opt-drow { text-align: left; }
.opt-drow { text-align: left; padding: 6px 12px 6px 3px; white-space: nowrap; font-weight: 400; }
.opt-drow b { color: var(--text); font-size: 12px; }
.opt-dtable tbody tr { border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.opt-dtable tbody td { text-align: right; padding: 5px 8px; font-variant-numeric: tabular-nums; }
.opt-dtable td.pos { color: var(--up); } .opt-dtable td.neg { color: var(--down); }
.opt-dz.pos { color: var(--up); font-weight: 700; } .opt-dz.neg { color: var(--down); font-weight: 700; }
.opt-drowext { background: color-mix(in srgb, var(--accent, #a78bfa) 8%, transparent); }
.opt-sig { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.opt-sig.rich { color: var(--down); border-color: color-mix(in srgb, var(--down) 45%, var(--border)); }
.opt-sig.cheap { color: var(--up); border-color: color-mix(in srgb, var(--up) 45%, var(--border)); }
.opt-sig.fair, .opt-sig.na { color: var(--muted); }
.opt-stat-v.pos { color: var(--up); } .opt-stat-v.neg { color: var(--down); }
.opt-weights { font-size: 10px; margin-top: 6px; }
.opt-movenote { font-size: 11.5px; line-height: 1.5; padding: 8px 2px; }
.opt-futrow { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-futchip { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel-2); }
.opt-futchip b { color: var(--text); font-weight: 700; }
.opt-swtable th, .opt-swtable td { text-align: center; }
.opt-swtable .opt-drow { text-align: left; }
.opt-swtable tbody th.opt-drow { font-weight: 400; }

/* Treasury Auctions tab */
.auc-table td, .auc-table th { text-align: right; white-space: nowrap; }
.auc-table .opt-drow { text-align: left; }
.auc-table tbody td { font-variant-numeric: tabular-nums; }
.auc-badge { font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.auc-badge.pos { color: var(--up); border-color: color-mix(in srgb, var(--up) 45%, var(--border)); }
.auc-badge.neg { color: var(--down); border-color: color-mix(in srgb, var(--down) 45%, var(--border)); }
.auc-badge.muted { color: var(--muted); }
.auc-z { font-size: 9.5px; color: var(--muted); }
.auc-z.pos { color: var(--up); } .auc-z.neg { color: var(--down); }
.auc-flag { display: inline-block; margin-left: 4px; padding: 0 4px; font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); border-radius: 3px; vertical-align: middle; }
.auc-flag.onepm { color: color-mix(in srgb, var(--accent) 80%, var(--fg)); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.auc-tag { display: inline-block; margin-left: 5px; padding: 0 4px; font-size: 8.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 75%, var(--fg)); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 3px; vertical-align: middle; }
.auc-tag.reopen { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }
.auc-compbar { display: inline-flex; width: 130px; height: 11px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--muted) 14%, transparent); vertical-align: middle; }
.auc-seg { display: inline-block; height: 100%; }
.auc-seg.d1 { background: #f59e0b; } .auc-seg.d2 { background: #38bdf8; } .auc-seg.d3 { background: #a78bfa; }
.auc-compcell { text-align: center !important; }
.auc-key { font-weight: 900; } .auc-key.d1 { color: #f59e0b; } .auc-key.d2 { color: #38bdf8; } .auc-key.d3 { color: #a78bfa; }
.auc-netbar.pos { fill: var(--up); } .auc-netbar.neg { fill: var(--down); }
.auc-tenor-row { cursor: pointer; }
.auc-tenor-row:hover { background: color-mix(in srgb, var(--muted) 8%, transparent); }
.auc-drilltog { font-size: 10px; color: #fbbf24; white-space: nowrap; border-bottom: 1px dotted currentColor; }
.auc-tenor-row.expanded .auc-drilltog::after { content: ' ▾'; }
.auc-drill-row { display: none; }
.auc-tenor-row.expanded + .auc-drill-row { display: table-row; }
.auc-drill-row td { padding: 4px 2px 10px; }
.auc-drill { display: flex; gap: 14px; flex-wrap: wrap; }
.auc-drillchart { flex: 1 1 240px; min-width: 220px; }
.auc-drillchart-wide { flex: 1 1 100%; min-width: 100%; }
.auc-subtabs { display: flex; gap: 4px; margin: 2px 0 12px; border-bottom: 1px solid var(--border); }
.auc-subtab { font-size: 12.5px; padding: 7px 20px; border: 1px solid var(--border); border-bottom: none; background: var(--panel-2); color: var(--muted); border-radius: 8px 8px 0 0; cursor: pointer; margin-bottom: -1px; }
.auc-subtab:hover { color: var(--text); }
.auc-subtab.active { color: var(--text); background: var(--panel); font-weight: 600; box-shadow: inset 0 2px 0 #fbbf24; }
.auc-live { font-size: 10.5px; color: var(--up); font-weight: 700; margin-left: 8px; animation: aucpulse 2s ease-in-out infinite; }
@keyframes aucpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---- Financing / QRA sub-tab ---- */
.fin-rcpt-c { color: var(--up); } .fin-outly-c { color: var(--down); }
.fin-line { stroke-width: 2.2; } .fin-line.fin-rcpt { stroke: var(--up); } .fin-line.fin-outly { stroke: var(--down); }
.fin-proj { stroke-width: 2; stroke-dasharray: 4 3; opacity: .8; } .fin-proj.fin-rcpt { stroke: var(--up); } .fin-proj.fin-outly { stroke: var(--down); }
.fin-gap { fill: rgba(248,113,113,.13); }
.fin-qra { display: flex; flex-direction: column; gap: 10px; }
.fin-qgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fin-qstat { background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; }
.fin-qv { display: block; font-size: 22px; font-weight: 700; color: #fbbf24; } .fin-qv i { font-size: 12px; font-style: normal; color: var(--muted); margin-left: 2px; }
.fin-ql { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.fin-qnote { font-size: 11.5px; line-height: 1.5; }
.fin-refund { font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fin-refpill, .fin-legpill { display: inline-flex; align-items: center; gap: 5px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; font-size: 11.5px; }
.fin-releases { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 12px; }
.fin-rel { display: inline-flex; flex-direction: column; gap: 3px; }
.fin-rel-t { font-weight: 600; }
.qra-sumbtn { font-size: 10.5px; padding: 1px 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); border-radius: 6px; cursor: pointer; align-self: flex-start; }
.qra-sumbtn:hover { color: var(--text); }
.qra-sum { font-size: 11.5px; line-height: 1.5; margin-top: 4px; max-width: 620px; border-left: 2px solid #fbbf24; padding-left: 8px; }
.fin-qnext { font-size: 11px; }
.fin-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.fin-tile { background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; }
.fin-tv { display: block; font-size: 19px; font-weight: 700; } .fin-tv.neg { color: var(--down); } .fin-tv.accent { color: #fbbf24; }
.fin-tl { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.fin-chartkey, .fin-sub { font-size: 10.5px; margin-top: 6px; } .fin-key { margin-right: 10px; }
.fin-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.fin-idterm { display: inline-flex; flex-direction: column; font-size: 18px; font-weight: 700; } .fin-idterm i { font-size: 10.5px; font-style: normal; font-weight: 400; color: var(--muted); }
.fin-idterm.neg { color: var(--down); } .fin-idterm.accent { color: #fbbf24; }
.fin-idop { font-size: 18px; color: var(--muted); }
.fin-mixbar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.fin-mixseg { height: 100%; } .fin-bills, .fin-dot.fin-bills { background: #fbbf24; } .fin-coupons, .fin-dot.fin-coupons { background: #60a5fa; } .fin-tips, .fin-dot.fin-tips { background: #4ade80; } .fin-frn, .fin-dot.fin-frn { background: #a78bfa; }
.fin-legend, .fin-compmix { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; }
.fin-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fin-billshead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.fin-billpct { font-size: 30px; font-weight: 800; color: #fbbf24; } .fin-billpct.neg { color: var(--down); }
.fin-gauge { margin: 4px 0 8px; }
.fin-gauge-track { position: relative; height: 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; }
.fin-gauge-band { position: absolute; top: 0; bottom: 0; background: rgba(74,222,128,.25); border-left: 1px dashed var(--up); border-right: 1px dashed var(--up); }
.fin-gauge-mark { position: absolute; top: -4px; width: 2px; height: 22px; background: #fbbf24; }
.fin-gauge-mark.over { background: var(--down); } .fin-gauge-mark span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.fin-gauge-lbls { display: flex; justify-content: space-between; font-size: 10px; margin-top: 4px; }
.fin-remhead { margin-bottom: 10px; }
.fin-remmeter { position: relative; height: 24px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.fin-remfill { position: absolute; top: 0; bottom: 0; left: 0; background: linear-gradient(90deg, rgba(251,191,36,.35), rgba(251,191,36,.6)); }
.fin-remtxt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600; }
.fin-flag { font-size: 10.5px; line-height: 1.5; margin-top: 8px; }
.fin-ny-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 780px) { .fin-ny-cols { grid-template-columns: 1fr; } }
.fin-subhd { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.fin-vtable-wrap { overflow-x: auto; }
.fin-nytable { width: 100%; border-collapse: collapse; font-size: 12px; }
.fin-nytable th { text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 0 8px 5px; border-bottom: 1px solid var(--border); }
.fin-nytable th:first-child { text-align: left; }
.fin-nytable td { padding: 5px 8px; text-align: right; border-bottom: 1px solid rgba(148,163,184,.10); }
.fin-nytable td:first-child { text-align: left; }
.fin-nytable tr.fin-hl { background: rgba(251,191,36,.10); }
.fin-nytable tr.fin-hl td:first-child { font-weight: 600; color: #fbbf24; }
.fin-yoy { font-size: 11px; font-weight: 700; } .fin-yoy.pos { color: var(--up); } .fin-yoy.neg { color: var(--down); }
.fin-exprow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; padding: 5px 0; }
.fin-expval { white-space: nowrap; }
.fin-expbar { height: 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin: 2px 0 6px; }
.fin-expbar-int { height: 100%; background: rgba(248,113,113,.55); }

/* ---- Fundamentals: sector capex ---- */
.capex-wrap { max-width: 1080px; }
.capex-hero { display: flex; flex-wrap: wrap; gap: 26px; margin-bottom: 8px; }
.capex-herostat { display: flex; flex-direction: column; }
.capex-hv { font-size: 30px; font-weight: 800; color: #f472b6; } .capex-hv.proj { color: #fbbf24; }
.capex-hl { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.capex-bar { fill: #f472b6; opacity: .85; } .capex-bar.proj { fill: #fbbf24; opacity: .55; }
.capex-blabel { fill: var(--text); font-size: 10.5px; font-weight: 600; }
.capex-macro { font-size: 11.5px; margin-top: 8px; }
.capex-twrap { overflow-x: auto; }
.capex-table { width: 100%; border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.capex-table th { text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 0 10px 6px; border-bottom: 1px solid var(--border); }
.capex-table th:first-child { text-align: left; }
.capex-table td { text-align: right; padding: 7px 10px; border-bottom: 1px solid rgba(148,163,184,.10); }
.capex-table td:first-child { text-align: left; }
.capex-srow { cursor: pointer; } .capex-srow:hover { background: rgba(244,114,182,.06); }
.capex-sname { font-weight: 600; } .capex-names { font-weight: 400; font-size: 10.5px; }
.capex-projcell { background: rgba(251,191,36,.07); }
.capex-covwrap { margin-top: 2px; }
.capex-yoy { font-weight: 700; font-size: 11px; } .capex-yoy.pos { color: var(--up); } .capex-yoy.neg { color: var(--down); }
.capex-cov { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.capex-cov.ok { background: rgba(74,222,128,.16); color: #4ade80; } .capex-cov.mid { background: rgba(245,158,11,.16); color: #f59e0b; } .capex-cov.lo { background: rgba(248,113,113,.16); color: #f87171; }
.capex-total td { font-weight: 700; border-top: 2px solid var(--border); border-bottom: none; padding-top: 9px; }
.capex-detailbox { margin-top: 12px; font-size: 12px; line-height: 1.6; }
.capex-pill { display: inline-block; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; margin: 2px; font-size: 11.5px; }
.capex-projnote { font-size: 11px; margin-top: 6px; }
.capex-caveat { font-size: 10.5px; line-height: 1.5; margin-top: 10px; }
.capex-vcell { color: var(--text); }
.capex-c2e { font-weight: 600; } .capex-c2e.hi { color: #fbbf24; }
/* AI capex→earnings ROI (Equities p11) */
.fund-roi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.fund-roi-card { border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; background: var(--panel-2); border-top: 3px solid #f472b6; }
.fund-roi-head { display: flex; justify-content: space-between; align-items: baseline; }
.fund-roi-name { font-weight: 800; font-size: 13.5px; }
.fund-roi-tag { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; }
.fund-roi-tag.converting { color: #4ade80; background: rgba(74,222,128,.13); }
.fund-roi-tag.lagging { color: #fbbf24; background: rgba(251,191,36,.13); }
.fund-roi-tag.pre-profit { color: #f87171; background: rgba(248,113,113,.13); }
.fund-roi-capex { font-size: 15px; font-weight: 800; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.fund-roi-row { display: grid; grid-template-columns: 56px 1fr 46px; gap: 6px; align-items: center; font-size: 11px; padding: 1.5px 0; }
.fund-roi-lbl { color: var(--muted); }
.fund-roi-row b { text-align: right; font-variant-numeric: tabular-nums; }
.fund-roi-track { height: 8px; background: var(--panel); border-radius: 4px; overflow: hidden; }
.fund-roi-bar { display: block; height: 100%; border-radius: 4px; }
.fund-roi-bar.cap { background: #f472b6; } .fund-roi-bar.earn { background: #4ade80; }
.fund-roi-meta { font-size: 10.5px; margin-top: 7px; font-variant-numeric: tabular-nums; }
/* earnings bridge (p7) + Mag 7 (p10) two-up */
.fund-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 820px) { .fund-two { grid-template-columns: 1fr; } }
.fund-block { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--panel-2); }
.fund-blk-h { font-weight: 800; font-size: 13.5px; margin-bottom: 10px; }
.fund-blk-h2 { font-size: 11px; margin: 12px 0 6px; }
.fund-blk-note { font-size: 10.5px; line-height: 1.5; margin: 9px 0 0; }
.fund-br-row, .fund-br-total { display: grid; grid-template-columns: 70px 1fr 44px; gap: 8px; align-items: center; font-size: 12px; padding: 3px 0; }
.fund-br-lbl { color: var(--muted); }
.fund-br-row b, .fund-br-total b { text-align: right; font-variant-numeric: tabular-nums; }
.fund-br-track { position: relative; height: 12px; background: var(--panel); border-radius: 4px; }
.fund-br-track::before { content: ''; position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1px; background: var(--border); }
.fund-br-fill { position: absolute; top: 1px; bottom: 1px; border-radius: 3px; }
.fund-br-fill.rev { background: #60a5fa; } .fund-br-fill.margin { background: #a78bfa; } .fund-br-fill.bb { background: #34d399; }
.fund-br-total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 7px; font-weight: 800; }
.fund-block .pos { color: var(--up); } .fund-block .neg { color: var(--down); }
.fund-m7-cmp { display: grid; gap: 7px; font-size: 12.5px; }
.fund-m7-lab { display: inline-block; min-width: 78px; font-weight: 700; }
.fund-m7-lab.hot { color: #f472b6; }
.fund-disp-row { display: grid; grid-template-columns: 48px 1fr 48px; gap: 8px; align-items: center; font-size: 11.5px; padding: 2px 0; }
.fund-disp-tk { font-weight: 700; }
.fund-disp-row b { text-align: right; font-variant-numeric: tabular-nums; }
.fund-disp-track { position: relative; height: 10px; background: var(--panel); border-radius: 4px; }
.fund-disp-track::before { content: ''; position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1px; background: var(--border); }
.fund-disp-fill { position: absolute; top: 1px; bottom: 1px; border-radius: 3px; }
.fund-disp-fill.pos { background: #4ade80; } .fund-disp-fill.neg { background: #f87171; }
/* earnings calendar */
.earn-cal-panel { overflow: visible; }
.earn-cal-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-bottom: 14px; }
.earn-cal-legend .earn-cal-chip { position: static; cursor: default; }
.earn-cal-dot-today { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid #818cf8; background: rgba(129,140,248,.14); vertical-align: middle; }
.earn-cal-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.earn-cal-mh { font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.earn-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.earn-cal-wd { text-align: center; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 2px; }
.earn-cal-cell { min-height: 54px; border: 1px solid var(--border); border-radius: 6px; padding: 3px 3px 4px; background: var(--panel-2); position: relative; }
.earn-cal-cell.empty { border: none; background: transparent; min-height: 0; }
.earn-cal-cell.wknd { background: transparent; border-style: dashed; opacity: .55; }
.earn-cal-cell.today { border-color: #818cf8; box-shadow: inset 0 0 0 1px #818cf8; }
.earn-cal-cell.has { background: var(--panel); }
.earn-cal-dn { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.earn-cal-cell.today .earn-cal-dn { color: #a5b4fc; font-weight: 800; }
.earn-cal-chips { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.earn-cal-chip { position: relative; font-size: 9.5px; font-weight: 800; padding: 1px 4px; border-radius: 3px; cursor: default; white-space: nowrap; }
.earn-cal-chip.est { color: #a5b4fc; background: rgba(99,102,241,.16); }
.earn-cal-chip.rep { color: #6ee7b7; background: rgba(52,211,153,.12); }
.earn-cal-chip:hover, .earn-cal-chip:focus { z-index: 50; outline: none; }
.earn-cal-tip { display: none; position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%); z-index: 60; width: 212px; padding: 9px 11px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 10px 28px rgba(0,0,0,.5); white-space: normal; text-align: left; font-weight: 400; }
.earn-cal-tip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--border); }
.earn-cal-chip:hover .earn-cal-tip, .earn-cal-chip:focus .earn-cal-tip { display: block; }
.earn-tip-h { display: block; font-size: 13px; }
.earn-tip-nm { display: block; font-size: 11px; color: var(--text); margin-top: 1px; }
.earn-tip-st { display: inline-block; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; margin: 6px 0 4px; }
.earn-tip-st.est { color: #a5b4fc; background: rgba(99,102,241,.16); }
.earn-tip-st.rep { color: #4ade80; background: rgba(52,211,153,.13); }
.earn-tip-dt { display: block; font-size: 11px; font-variant-numeric: tabular-nums; }
.earn-tip-note { display: block; font-size: 10px; line-height: 1.4; margin-top: 4px; }
/* earnings schedule + AI analysis */
.earn-cols { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
@media (max-width: 820px) { .earn-cols { grid-template-columns: 1fr; } }
.earn-row { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; font-size: 12.5px; border-bottom: 1px solid rgba(148,163,184,.08); }
.earn-item { padding: 6px 0; border-bottom: 1px solid rgba(148,163,184,.10); }
.earn-rtop { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.earn-tk { font-weight: 700; min-width: 46px; color: #f472b6; }
.earn-sec { font-size: 11px; flex: 1; }
.earn-date { font-variant-numeric: tabular-nums; }
.earn-sumbtn { margin-left: auto; }
.bbg-tag { font-size: 10px; font-weight: 700; color: #fb923c; vertical-align: middle; }
.capex-bbgcol { color: #fb923c !important; }
th.capex-bbgcol { color: #fb923c; }
.fund-bbg-refresh { font-size: 12px; padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); cursor: pointer; margin-bottom: 10px; }
.fund-bbg-refresh:hover:not(:disabled) { border-color: #fb923c; }
.fund-bbg-refresh:disabled { opacity: .5; cursor: default; }
.fund-bbg-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 820px) { .fund-bbg-cols { grid-template-columns: 1fr; } }

/* ---- Fed page ---- */
.fed-wrap { max-width: 1100px; }
.fed-sec-h { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 10px; }
.fed-sec-h h2 { font-size: 17px; margin: 0; }
.fed-voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 18px; }
.fed-card { padding: 12px 14px; }
.fed-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.fed-head h3 { font-size: 15px; margin: 0; }
.fed-seat { font-size: 11px; color: var(--muted); } .fed-seat.former { text-decoration: line-through; }
.fed-badge.former { font-size: 9px; font-weight: 700; background: #6b7280; color: #fff; border-radius: 4px; padding: 1px 5px; letter-spacing: .04em; }
.fed-lean { font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 8px; margin-left: auto; text-transform: uppercase; letter-spacing: .03em; }
.fed-lean.hawk { background: rgba(248,113,113,.16); color: #f87171; } .fed-lean.dov { background: rgba(96,165,250,.16); color: #60a5fa; } .fed-lean.neu { background: rgba(148,163,184,.16); color: #94a3b8; }
.fed-role { font-size: 11px; margin: 4px 0 6px; line-height: 1.45; }
.fed-stance { font-size: 12.5px; line-height: 1.55; margin-bottom: 8px; }
.fed-sub-h { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 4px; }
.fed-themes { margin: 0 0 4px; padding-left: 18px; } .fed-themes li { font-size: 12px; line-height: 1.5; margin-bottom: 2px; }
.fed-item { border-top: 1px solid var(--border, #1f2937); padding: 6px 0 4px; }
.fed-item-top { display: flex; gap: 8px; align-items: baseline; }
.fed-date { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.fed-title { font-size: 12.5px; font-weight: 600; }
.fed-venue { font-size: 10.5px; } .fed-gist { font-size: 12px; line-height: 1.5; margin: 2px 0 4px; }
.fed-sumbtn { font-size: 10.5px; background: none; border: 1px solid var(--border, #1f2937); color: var(--muted); border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.fed-sumbtn:hover { background: rgba(201,162,39,.1); color: var(--text); }
.fed-sum { font-size: 12px; line-height: 1.55; margin-top: 6px; padding: 8px 10px; border-left: 2px solid #c9a227; background: rgba(201,162,39,.06); border-radius: 4px; }
.fed-plumb { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 8px; }
.fed-stat { border: 1px solid var(--border, #1f2937); border-radius: 8px; padding: 8px 10px; text-align: center; }
.fed-stat-v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; } .fed-stat-v i { font-size: 10px; color: var(--muted); font-style: normal; font-weight: 400; margin-left: 1px; }
.fed-stat-v.neg { color: #f87171; }
.fed-stat-l { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.fed-state { font-size: 12px; line-height: 1.55; margin-top: 6px; }
.fed-table-wrap { overflow-x: auto; }
.fed-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fed-table th { text-align: left; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px; border-bottom: 1px solid var(--border, #1f2937); }
.fed-table td { padding: 8px; border-bottom: 1px solid var(--border, #1f2937); vertical-align: top; line-height: 1.5; }
.fed-abbr { font-weight: 700; color: #c9a227; white-space: nowrap; }
.fed-mech { font-size: 11px; margin-top: 3px; } .fed-imp { font-size: 11.5px; }
.fed-watch { border-top: 1px solid var(--border, #1f2937); padding: 8px 0; }
.fed-watch-top { display: flex; align-items: baseline; gap: 10px; }
.fed-watch-a { font-size: 12.5px; font-weight: 600; }
.fed-lik { font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 8px; margin-left: auto; white-space: nowrap; }
.fed-lik.hi { background: rgba(248,113,113,.16); color: #f87171; } .fed-lik.md { background: rgba(245,158,11,.16); color: #f59e0b; } .fed-lik.lo { background: rgba(148,163,184,.16); color: #94a3b8; }
.fed-watch-r { font-size: 11.5px; line-height: 1.5; margin-top: 2px; }
.fed-caveats { font-size: 10px; line-height: 1.7; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--border, #1f2937); }
.fedr-panel { padding: 6px 12px 8px; max-height: 640px; overflow-y: auto; }
.fedr-item { padding: 7px 0 5px; }
.fedr-series { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #c9a227; background: rgba(201,162,39,.12); border-radius: 4px; padding: 1px 6px; flex: none; white-space: nowrap; }
.fedr-item .fed-title { font-weight: 600; }
.fed-dissent { padding: 10px 14px; margin-bottom: 14px; border-left: 3px solid #f87171; background: rgba(248,113,113,.06); }
.fed-dissent-h { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.fed-dissent-tag { font-size: 9px; font-weight: 800; letter-spacing: .06em; background: #f87171; color: #1a1000; border-radius: 4px; padding: 1px 6px; margin-right: 8px; vertical-align: middle; }
.fed-dissent-vote { font-size: 12px; line-height: 1.5; margin-bottom: 8px; }
.fed-dissent-members { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-bottom: 8px; }
.fed-dissent-m { font-size: 12px; border: 1px solid var(--border, #1f2937); border-radius: 6px; padding: 6px 9px; }
.fed-dissent-m b { font-size: 12.5px; }
.fed-dissent-why { font-size: 11px; line-height: 1.45; margin-top: 3px; }
.fed-dissent-ctx { font-size: 11px; line-height: 1.55; }
/* ---- Fed voter map (hawk/dove roster table) ---- */
.fed-voter { margin: 10px 0 4px; }
.fed-vsum { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 2px 0 12px; }
.fed-vtallies { display: inline-flex; gap: 6px; }
.fed-vtally { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.fed-vtally.hawk { background: rgba(248,113,113,.16); color: #f87171; }
.fed-vtally.dov { background: rgba(96,165,250,.16); color: #60a5fa; }
.fed-vtally.neu { background: rgba(148,163,184,.16); color: #94a3b8; }
.fed-vnet { font-size: 12px; }
.fed-vnetlbl { text-transform: capitalize; }
.fed-align { font-weight: 700; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; margin-left: 4px; }
.fed-align.against { background: rgba(245,158,11,.18); color: #f59e0b; }
.fed-align.aligned { background: rgba(74,222,128,.16); color: #4ade80; }
.fed-align.balanced { background: rgba(148,163,184,.16); color: #94a3b8; }
.fed-align-wait { font-style: italic; }
.fed-dl-hawkish { color: #f87171; } .fed-dl-dovish { color: #60a5fa; } .fed-dl-balanced { color: #94a3b8; }
.fed-vtable-wrap { overflow-x: auto; }
.fed-vtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fed-vtable thead th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #94a3b8); padding: 0 10px 6px; border-bottom: 1px solid var(--border, #1f2937); }
.fed-vtable td { padding: 6px 10px; border-bottom: 1px solid rgba(148,163,184,.10); }
.fed-vtable tr:last-child td { border-bottom: none; }
.fed-vname { font-weight: 600; white-space: nowrap; }
.fed-vseat { font-size: 11.5px; }
.fed-vchip { text-align: right; white-space: nowrap; }
.fed-vlean { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; display: inline-block; }
.fed-vlean.hawk { background: rgba(248,113,113,.16); color: #f87171; }
.fed-vlean.dov { background: rgba(96,165,250,.16); color: #60a5fa; }
.fed-vlean.neu { background: rgba(148,163,184,.14); color: #94a3b8; }
.fed-vnonwrap { margin-top: 10px; }
.fed-vnonwrap summary { cursor: pointer; font-size: 12px; color: var(--muted, #94a3b8); padding: 4px 0; }
.fed-vtable-non td { opacity: .82; }
.fed-vnote { font-size: 10.5px; line-height: 1.5; margin-top: 10px; }
/* ---- voter map two-pane: table (left) + clicked member's research (right) ---- */
.fed-vlayout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.fed-vleft { min-width: 0; }
.fed-vdetail { min-width: 0; border-left: 1px solid var(--border, #1f2937); padding-left: 18px; }
@media (max-width: 860px) {
  .fed-vlayout { grid-template-columns: 1fr; }
  .fed-vdetail { border-left: none; padding-left: 0; border-top: 1px solid var(--border, #1f2937); padding-top: 14px; margin-top: 4px; }
}
.fed-vlink { color: var(--accent, #60a5fa); cursor: pointer; text-decoration: none; font-weight: 600; }
.fed-vlink:hover { text-decoration: underline; }
.fed-vlink.sel { color: var(--text, #e5e7eb); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.fed-vname-plain { color: var(--text, #e5e7eb); }
.fed-vrow-sel { background: rgba(96,165,250,.08); }
.fed-vother { margin-top: 10px; font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.fed-vdetail-empty { padding: 18px 2px; font-size: 12.5px; line-height: 1.55; }
.fed-mdetail .fed-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.fed-mdetail .fed-head h3 { margin: 0; }
.fed-mdetail .fed-item { margin-top: 10px; }

/* ===================== Capital Cycle / Fragility ===================== */
.frag-hero-h h2 { color: #e11d48; }
.frag-herowrap { padding: 16px 18px; }
.frag-hero { display: grid; grid-template-columns: minmax(200px, 240px) minmax(260px, 320px) 1fr; gap: 22px; align-items: center; }
.frag-hero-gauge { display: flex; flex-direction: column; align-items: center; }
.frag-flabel { font-size: 10.5px; letter-spacing: .16em; color: var(--muted); font-weight: 700; margin-top: -6px; }
.frag-cyc { font-size: 17px; font-weight: 800; margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.frag-mom { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.frag-mom.pos { color: var(--up); } .frag-mom.neg { color: var(--down); } .frag-mom.flat { color: var(--muted); }
.frag-hero-clock { display: flex; justify-content: center; }
.frag-clock { width: 100%; max-width: 320px; height: auto; }
.frag-clockframe { stroke: var(--border); stroke-width: 1; }
.frag-qlab { font-size: 9px; fill: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.frag-qlab.danger { fill: #ef4444; font-weight: 700; }
.frag-dot { fill: #e11d48; stroke: #fff; stroke-width: 1.5; }
.frag-dot-halo { fill: rgba(225,29,72,.18); }
.frag-dotlab { font-size: 11px; font-weight: 800; fill: var(--text); }
.frag-hero-read { min-width: 0; }
.frag-oneliner { font-size: 14px; font-weight: 600; margin: 0 0 10px; color: var(--text); line-height: 1.4; }
.frag-readrow { display: flex; align-items: baseline; gap: 10px; font-size: 12.5px; padding: 3px 0; border-top: 1px solid var(--border); }
.frag-rk { width: 52px; color: var(--muted); font-weight: 700; flex: none; }
.frag-rv { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 62px; }
.frag-thesis { margin: 10px 0 0; font-size: 11.5px; line-height: 1.5; }
.frag-blocks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 14px; }
.frag-blockcard { border-top: 3px solid var(--acc); }
.frag-blockcard .hlt-chead { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.frag-drillbtn { margin-top: 6px; }
.frag-dd { width: 100%; }
.frag-btable { width: 100%; font-size: 11px; }
.frag-btable td { padding: 3px 4px; vertical-align: middle; }
.frag-btable .hlt-il { line-height: 1.25; }
.frag-zbar { display: inline-block; height: 7px; border-radius: 3px; min-width: 2px; }
.frag-zbar.hi { background: #ef4444; } .frag-zbar.lo { background: #4ade80; }
.frag-sparkpanel { padding: 14px 16px; }
.frag-detrow { display: flex; flex-wrap: wrap; gap: 8px; }
.frag-det { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 10px; border-radius: 20px; border: 1px solid var(--border); background: var(--panel-2); }
.frag-det.lit { border-color: #ef4444; background: rgba(239,68,68,.10); }
.frag-detdot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.frag-det.lit .frag-detdot { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.frag-det b { font-variant-numeric: tabular-nums; }
.frag-stackpanel { padding: 12px 16px; display: flex; flex-direction: column; gap: 7px; }
.frag-stackrow { display: grid; grid-template-columns: 130px 120px 1fr; gap: 12px; align-items: center; padding: 5px 0; border-top: 1px solid var(--border); }
.frag-stackrow:first-child { border-top: none; }
.frag-stacklab { font-weight: 700; font-size: 12.5px; }
.frag-stackbarwrap { height: 12px; background: var(--panel-2); border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.frag-stackbar { display: block; height: 100%; border-radius: 6px; }
.frag-stackbar.green { background: #4ade80; } .frag-stackbar.amber { background: #f59e0b; } .frag-stackbar.red { background: #ef4444; }
.frag-stackmeasures { display: flex; flex-wrap: wrap; gap: 5px; }
.frag-measure { font-size: 10.5px; padding: 2px 7px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.frag-measure b { font-variant-numeric: tabular-nums; }
.frag-measure.red { color: #fca5a5; border-color: rgba(239,68,68,.5); }
.frag-measure.amber { color: #fcd34d; border-color: rgba(245,158,11,.4); }
.frag-histlegend { display: flex; gap: 16px; font-size: 11.5px; margin-bottom: 8px; }
.frag-histlegend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.frag-lg-f::before { content: ''; width: 16px; height: 3px; background: #e11d48; border-radius: 2px; }
.frag-lg-s::before { content: ''; width: 16px; height: 0; border-top: 2px dashed #8b96b0; }
.frag-lg-r::before { content: ''; width: 14px; height: 11px; background: rgba(239,68,68,.16); border-radius: 2px; }
.frag-histsvg { width: 100%; height: auto; }
.frag-recess { fill: rgba(239,68,68,.13); }
.frag-hist-f { stroke: #e11d48; stroke-width: 2.4; }
.frag-hist-stretch { stroke: #8b96b0; stroke-width: 1.6; stroke-dasharray: 4 3; opacity: .9; }
.frag-hist-dot { fill: #e11d48; }
.frag-bbgbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 14px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); font-size: 12px; }
.frag-bbgbar.on { border-color: rgba(201,162,39,.55); background: rgba(201,162,39,.07); }
.frag-bbgtag { font-weight: 800; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: #c9a227; padding: 2px 8px; border: 1px solid rgba(201,162,39,.5); border-radius: 4px; }
.frag-bbgtag.off { color: var(--muted); border-color: var(--border); }
.frag-bbgbar .muted { flex: 1; min-width: 200px; }
.frag-bbgbtn { padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; }
.frag-bbgbtn:hover:not(:disabled) { border-color: #c9a227; }
.frag-bbgbtn:disabled { opacity: .6; cursor: default; }
.frag-degraded { margin-bottom: 12px; padding: 9px 14px; border: 1px solid rgba(245,158,11,.55); background: rgba(245,158,11,.10); border-radius: 8px; font-size: 12.5px; color: #fcd34d; line-height: 1.45; }
.frag-notepanel { padding: 14px 18px; }
.frag-caveats { margin: 6px 0 10px; padding-left: 18px; font-size: 12.5px; line-height: 1.55; }
.frag-caveats li { margin: 5px 0; }
@media (max-width: 900px) {
  .frag-hero { grid-template-columns: 1fr; gap: 16px; }
  .frag-blocks { grid-template-columns: repeat(2, 1fr); }
  .frag-stackrow { grid-template-columns: 1fr; gap: 4px; }
}

/* ===================== Scorecard ===================== */
.sc-hero-h h2 { color: #38bdf8; }
.sc-provenance { padding: 12px 16px; }
.sc-prov-main { font-size: 13.5px; }
.sc-prov-k { font-size: 20px; font-weight: 800; color: #38bdf8; font-variant-numeric: tabular-nums; }
.sc-provenance code { font-size: 11px; color: var(--muted); background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.sc-prov-note { margin: 8px 0 0; font-size: 12px; line-height: 1.55; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; padding: 14px; }
.sc-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 13px; background: var(--panel-2); border-top: 3px solid var(--acc); display: flex; flex-direction: column; }
.sc-chead { display: flex; justify-content: space-between; align-items: baseline; }
.sc-title { font-weight: 800; font-size: 14px; }
.sc-fam { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; }
.sc-cur { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 2px; }
.sc-val { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--acc); }
.sc-unit { font-size: 11px; color: var(--muted); }
.sc-meta { font-size: 11px; color: var(--muted); margin-left: 4px; }
.sc-stale { font-size: 10px; color: var(--muted); font-style: italic; margin-left: 4px; }
.sc-thesis { font-size: 11.5px; line-height: 1.45; color: var(--text); margin: 4px 0 10px; opacity: .9; }
.sc-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.sc-pane { border: 1px solid var(--border); border-radius: 7px; padding: 7px 8px; background: var(--panel); min-width: 0; }
.sc-pane-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 5px; font-size: 10.5px; }
.sc-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; padding: 1px 5px; border-radius: 3px; }
.sc-tag.live { background: rgba(56,189,248,.18); color: #7dd3fc; }
.sc-tag.bt { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }
.sc-spark { width: 60px; height: 20px; margin-left: auto; }
.sc-empty { margin-left: auto; color: var(--muted); }
.sc-ic { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.sc-ic.pos { color: #4ade80; } .sc-ic.neg { color: #f87171; } .sc-ic.flat { color: var(--muted); }
.sc-ic.strong { background: rgba(74,222,128,.12); } .sc-ic.weak { opacity: .8; }
.sc-livescore { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; }
.sc-accum { font-size: 10.5px; line-height: 1.4; color: var(--muted); }
.sc-btrow { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.sc-btn { font-size: 10px; }
.sc-tbars { display: flex; flex-direction: column; gap: 3px; }
.sc-tbar-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 5px; align-items: center; font-size: 10px; }
.sc-tbar-lab { color: var(--muted); }
.sc-tbar-track { height: 9px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.sc-tbar { display: block; height: 100%; border-radius: 4px; }
.sc-tbar.hi { background: var(--acc); } .sc-tbar.lo { background: #64748b; }
.sc-tbar-val { font-variant-numeric: tabular-nums; font-weight: 600; }
.sc-outdesc, .sc-btnone, .sc-btn { color: var(--muted); }
.sc-outdesc { font-size: 9.5px; margin-top: 4px; line-height: 1.35; }
.sc-btnone { font-size: 10.5px; line-height: 1.4; }
/* forecast-error metrics grid (labor nowcasts) */
.sc-fchead { font-size: 10px; color: var(--muted); margin-bottom: 5px; line-height: 1.35; }
.sc-fcgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; }
.sc-fcm { display: flex; flex-direction: column; gap: 1px; font-size: 10px; }
.sc-fcm i { color: var(--muted); font-style: normal; font-size: 9px; }
.sc-fcm b { font-variant-numeric: tabular-nums; font-weight: 600; }
.sc-fcm.good b { color: #22c55e; } .sc-fcm.bad b { color: #f87171; }
.sc-notepanel { padding: 12px 16px; }
.sc-notepanel p { margin: 4px 0; font-size: 12px; line-height: 1.55; }
@media (max-width: 560px) { .sc-panels { grid-template-columns: 1fr; } }

/* ===================== Curve — macro fair value ===================== */
.crv-hero-h h2 { color: #14b8a6; }
.crv-legend { display: flex; gap: 16px; font-size: 11.5px; margin-bottom: 8px; }
.crv-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.crv-lg-a::before { content: ''; width: 16px; height: 3px; background: #14b8a6; border-radius: 2px; }
.crv-lg-f::before { content: ''; width: 16px; height: 0; border-top: 2px dashed #8b96b0; }
.crv-lg-g::before { content: ''; width: 14px; height: 11px; background: rgba(20,184,166,.14); border-radius: 2px; }
.crv-gap { fill: rgba(20,184,166,.14); stroke: none; }
.crv-actline { fill: none; stroke: #14b8a6; stroke-width: 2.4; }
.crv-fairline { fill: none; stroke: #8b96b0; stroke-width: 1.8; stroke-dasharray: 4 3; }
.crv-fairdot { fill: #8b96b0; }
.crv-pt { fill: var(--text); font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.crv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 14px; }
.crv-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 13px; background: var(--panel-2); border-top: 3px solid #14b8a6; }
.crv-card.off { opacity: .6; border-style: dashed; }
.crv-chead { display: flex; justify-content: space-between; align-items: baseline; }
.crv-ten { font-weight: 800; font-size: 18px; }
.crv-rc { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.crv-rc.cheap { color: #4ade80; background: rgba(74,222,128,.12); }
.crv-rc.rich { color: #f87171; background: rgba(248,113,113,.12); }
.crv-rc.fair { color: var(--muted); background: var(--panel); }
.crv-yields { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 2px; flex-wrap: wrap; }
.crv-act { font-size: 24px; font-weight: 800; color: #14b8a6; font-variant-numeric: tabular-nums; }
.crv-fair { font-size: 16px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 6px; }
.crv-meta { font-size: 10.5px; margin-bottom: 6px; }
.crv-decomp { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.crv-dpill { font-size: 10.5px; padding: 2px 7px; border-radius: 4px; background: var(--panel); border: 1px solid var(--border); color: var(--muted); }
.crv-dpill b { color: var(--text); font-variant-numeric: tabular-nums; }
.crv-bhead { font-size: 11px; font-weight: 700; margin: 8px 0 5px; }
.crv-brow { display: grid; grid-template-columns: 1fr 90px 40px; gap: 6px; align-items: center; font-size: 10.5px; padding: 2px 0; }
.crv-blab { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crv-btrack { position: relative; height: 9px; background: var(--panel); border-radius: 4px; border: 1px solid var(--border); }
.crv-btrack::before { content: ''; position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1px; background: var(--border); }
.crv-bfill { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.crv-bfill.up { background: #f59e0b; } .crv-bfill.dn { background: #60a5fa; }
.crv-bval { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.crv-bval.up { color: #f59e0b; } .crv-bval.dn { color: #60a5fa; }
/* level/slope/curvature PCA */
.crv-pca { padding: 12px 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.crv-pca-row { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; background: var(--panel-2); }
.crv-pca-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 11.5px; }
.crv-pca-name { font-weight: 800; font-size: 14px; text-transform: capitalize; color: #14b8a6; }
.crv-pca-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.crv-pca-loads { display: flex; align-items: flex-end; gap: 6px; height: 46px; }
.crv-pca-leg { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 46px; width: 22px; }
.crv-pca-bar { width: 12px; border-radius: 2px; min-height: 2px; }
.crv-pca-bar.up { background: #14b8a6; } .crv-pca-bar.dn { background: #f59e0b; }
.crv-pca-t { font-size: 9px; color: var(--muted); margin-top: 3px; }
.crv-pca-stat { text-align: right; }
.crv-pca-z { display: block; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 15px; }
.crv-pca-z.up { color: #f87171; } .crv-pca-z.dn { color: #4ade80; }
/* supply & term premium */
.crv-lg-s2::before { content: ''; width: 16px; height: 0; border-top: 2px dashed #f59e0b; display: inline-block; }
.crv-supline { fill: none; stroke: #f59e0b; stroke-width: 2; stroke-dasharray: 5 3; }
.crv-supplyrow { font-size: 12px; margin: 2px 0 4px; }
.crv-supplyrow b { color: #f59e0b; font-variant-numeric: tabular-nums; }
.crv-rc.sm { font-size: 10px; padding: 1px 5px; margin-left: 4px; }
.crv-sp-panel { padding: 14px 16px; }
.crv-sp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.crv-sp-stat { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; background: var(--panel-2); }
.crv-sp-v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.crv-sp-v.hot { color: #f59e0b; }
.crv-sp-l { font-size: 11px; margin-top: 2px; }
.crv-sp-sub { font-size: 10px; margin-top: 3px; line-height: 1.35; }
.crv-sp-verdict { font-size: 13.5px; font-weight: 600; margin: 12px 0 6px; line-height: 1.5; }
.crv-sp-note { font-size: 11.5px; line-height: 1.55; margin: 0; }
/* scenarios (Phase 3) */
.crv-scen-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 4px 4px 10px; font-size: 11.5px; }
.crv-scen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 14px; }
.crv-scen-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 13px; background: var(--panel-2); border-top: 3px solid #888; }
.crv-scen-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.crv-scen-name { font-weight: 800; font-size: 15px; }
.crv-scen-shape { font-size: 11px; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.crv-scen-desc { font-size: 11px; line-height: 1.4; margin: 4px 0 8px; }
.crv-scen-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 9px; }
.crv-scen-chip { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--panel); border: 1px solid var(--border); color: var(--text); font-variant-numeric: tabular-nums; }
.crv-scen-chip.scr { opacity: .45; text-decoration: line-through; }
.crv-scen-tens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 7px; }
.crv-scen-ten { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--border); border-radius: 7px; padding: 5px 2px; background: var(--panel); }
.crv-scen-tlab { font-size: 10px; color: var(--muted); }
.crv-scen-proj { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.crv-scen-chg { font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.crv-scen-chg.up { color: #f87171; } .crv-scen-chg.dn { color: #4ade80; }
.crv-scen-slopes { font-size: 11px; font-variant-numeric: tabular-nums; }
.crv-scen-slopes b { color: var(--text); }
.crv-scen-was { font-size: 10px; opacity: .8; }
.crv-scen-drv { font-size: 10.5px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.crv-scen-drv b.up { color: #f87171; } .crv-scen-drv b.dn { color: #4ade80; }
.crv-scen-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
/* momentum tilt */
.crv-tilt { padding: 14px 16px; }
.crv-tilt-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.crv-tilt-seg { transition: width .3s; }
.crv-tilt-legs { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 12px; }
.crv-tilt-leg { display: inline-flex; align-items: center; }
.crv-tilt-leg b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.crv-tilt-note { font-size: 11px; line-height: 1.5; margin: 10px 0 0; }
/* 3D yield-curve surface */
.surf-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; margin-bottom: 8px; }
.surf-legend-grad { display: inline-block; width: 90px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, rgb(37,99,235), rgb(128,68,137), rgb(220,38,38)); }
.surf-legend-hi { margin-left: -4px; }
.surf-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.surf-cvwrap { position: relative; width: 100%; }
.surf-canvas { display: block; width: 100%; border-radius: 10px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); cursor: crosshair; }
.surf-hover { position: absolute; z-index: 20; pointer-events: none; background: var(--panel); border: 1px solid var(--border); border-radius: 7px; padding: 5px 8px; font-size: 11px; box-shadow: 0 6px 20px rgba(0,0,0,.45); font-variant-numeric: tabular-nums; }
.surf-controls { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; }
.surf-play { flex: none; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); font-size: 13px; cursor: pointer; }
.surf-play:hover { border-color: #818cf8; color: #a5b4fc; }
.surf-slider { flex: 1; accent-color: #6366f1; cursor: pointer; }
.surf-date { flex: none; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 220px; text-align: right; }
.surf-bottom { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-top: 10px; }
@media (max-width: 720px) { .surf-bottom { grid-template-columns: 1fr; } .surf-date { min-width: 0; } }
.surf-panel { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); }
.surf-ph { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.surf-ph b { color: var(--text); font-variant-numeric: tabular-nums; }
.surf-cross-svg { width: 100%; height: auto; }
.surf-spread { display: flex; flex-direction: column; justify-content: center; text-align: center; }
.surf-spread-v { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.surf-spread-v .pos { color: #4ade80; } .surf-spread-v .neg { color: #f87171; }

/* ================= accounts & personalization ================= */
.account { display: flex; align-items: center; position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); padding: 5px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 12px; }
.acct-btn:hover { border-color: var(--accent); }
.acct-btn.signin { font-weight: 600; }
.acct-av { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #0b0f1a; display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.acct-email { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; top: 112%; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.35); padding: 5px; display: flex; flex-direction: column; min-width: 152px; z-index: 60; }
.acct-menu[hidden] { display: none; }   /* class rule above would otherwise override the UA [hidden] */
.acct-menu button { background: none; border: none; color: var(--text); text-align: left; padding: 8px 10px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 12.5px; }
.acct-menu button:hover { background: var(--panel-2); }

.auth-overlay { position: fixed; inset: 0; background: rgba(4,8,16,.68); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 200; }
.auth-modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px 26px 20px; width: min(380px, 92vw); position: relative; box-shadow: 0 24px 60px -12px rgba(0,0,0,.6); }
.auth-x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.auth-brand { font-weight: 800; font-size: 18px; margin-bottom: 14px; letter-spacing: -.3px; }
.auth-promo { width: 100%; display: block; border-radius: 10px; margin: 0 0 14px; background: #000; max-height: 220px; border: 1px solid var(--line); }
.auth-tabs { display: flex; gap: 4px; background: var(--panel-2); border-radius: 9px; padding: 3px; margin-bottom: 16px; }
.auth-t { flex: 1; background: none; border: none; color: var(--muted); padding: 8px; border-radius: 7px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
.auth-t.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.auth-form input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; color: var(--text); font: inherit; font-size: 14px; }
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-submit { background: var(--accent); color: #0b0f1a; border: none; border-radius: 8px; padding: 11px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.auth-submit:disabled { opacity: .6; cursor: default; }
.auth-err { background: rgba(244,63,94,.12); border: 1px solid rgba(244,63,94,.4); color: #fca5a5; border-radius: 7px; padding: 8px 10px; font-size: 12.5px; }
.auth-note { color: var(--muted); font-size: 11px; margin: 2px 0 0; text-align: center; }

.my-signedout { max-width: 560px; text-align: center; padding: 40px 26px; margin: 0 auto; }
.my-so-btns { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.my-ghost { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 11px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.my-hub { padding: 18px; }
.my-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.my-head h2 { margin: 0; }
.my-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.my-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.my-card.my-wide { grid-column: 1 / -1; }
.my-card h3 { margin: 0 0 12px; font-size: 14px; }
.my-loading, .my-err { color: var(--muted); font-size: 12.5px; }
.my-err { color: #fca5a5; }
.my-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.my-list li { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.wl-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dial-open, .wl-lbl[data-tab] { cursor: pointer; }
.dial-open:hover, .wl-lbl[data-tab]:hover { color: var(--accent); }
.wl-type { color: var(--muted); font-size: 10.5px; text-transform: uppercase; }
.my-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.my-del:hover { color: #f43f5e; }
.my-add { display: flex; gap: 8px; }
.my-add select, .my-field select, .my-field input, .db-name, .db-row input, .sig-add input { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 8px; color: var(--text); font: inherit; font-size: 12.5px; }
.my-add select { flex: 1; }
.my-save, .db-save2, .db-addrow { background: var(--accent); color: #0b0f1a; border: none; border-radius: 7px; padding: 8px 12px; font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; }
.db-save2 { background: var(--panel); color: var(--text); border: 1px solid var(--accent); }
.db-addrow { background: var(--panel); color: var(--text); border: 1px dashed var(--line); width: 100%; margin: 4px 0 10px; }
.my-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.my-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); margin-bottom: 12px; }
.db-actions { display: flex; align-items: center; gap: 10px; }
.my-saved { color: #22c55e; font-size: 12px; }
.dial-builder { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.db-head { font-weight: 700; font-size: 12.5px; margin-bottom: 8px; }
.db-name { width: 100%; margin-bottom: 8px; }
.db-row { display: grid; grid-template-columns: 1.2fr 1fr 60px auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.db-inv { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.db-delrow { background: none; border: none; color: var(--muted); cursor: pointer; }
.db-win { max-width: 200px; }
.db-err { color: #fca5a5; font-size: 12px; margin-top: 8px; }
.db-probs { margin-top: 8px; font-size: 11px; }
.dial-result { margin: 6px 0; }
.dial-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.dl-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dl-score { font-size: 22px; font-weight: 800; }
.dl-z.up { color: #22c55e; } .dl-z.down { color: #f43f5e; }
.dl-comps { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.dl-comp { font-size: 11px; padding: 3px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); }
.dl-comp.up { color: #22c55e; } .dl-comp.down { color: #f43f5e; }
.dial-hist { width: 100%; height: auto; margin-top: 6px; }
.sig-add { display: grid; grid-template-columns: 1fr 1fr 130px 1.4fr auto; gap: 6px; margin-bottom: 12px; }
.sig-tbl-wrap { overflow-x: auto; }
.sig-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sig-tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.sig-tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .my-grid { grid-template-columns: 1fr; } .db-row, .sig-add { grid-template-columns: 1fr 1fr; } }

/* ================= global concept search ================= */
.gsearch { position: relative; flex: 1 1 auto; max-width: 440px; margin: 0 18px; display: flex; align-items: center; }
.gs-ic { position: absolute; left: 11px; color: var(--muted); font-size: 15px; pointer-events: none; }
#gs-input { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 34px 8px 32px; color: var(--text); font: inherit; font-size: 13px; }
#gs-input:focus { outline: none; border-color: var(--accent); background: var(--panel); }
#gs-input::placeholder { color: var(--muted); }
.gs-kbd { position: absolute; right: 9px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 11px; background: var(--panel); pointer-events: none; }
.gs-results { position: absolute; top: 110%; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px -8px rgba(0,0,0,.5); padding: 6px; max-height: 62vh; overflow-y: auto; z-index: 120; }
.gs-grp { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 8px 8px 4px; }
.gs-row { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: none; color: var(--text); text-align: left; padding: 8px 9px; border-radius: 7px; cursor: pointer; font: inherit; font-size: 13px; }
.gs-row:hover, .gs-row.on { background: var(--panel-2); }
.gs-row .tab-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.gs-row b { font-weight: 600; }
.gs-row i { margin-left: auto; color: var(--muted); font-style: normal; font-size: 11px; }
.gs-empty { color: var(--muted); font-size: 12.5px; padding: 12px; text-align: center; }
@media (max-width: 900px) { .gsearch { max-width: 240px; margin: 0 8px; } .gs-kbd { display: none; } }
@media (max-width: 620px) { .gsearch { display: none; } }   /* keyboard "/" still opens the old palette */

.search-flash { animation: searchflash 1.6s ease-out; border-radius: 8px; }
@keyframes searchflash {
  0%, 12% { box-shadow: 0 0 0 3px var(--accent), 0 0 20px 3px color-mix(in srgb, var(--accent) 55%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ================= loading skeletons ================= */
/* Every `.loading` placeholder becomes a shimmering panel instead of bare "Loading…" text —
   one rule lifts all ~90 loading states across the tabs. */
.loading {
  position: relative;
  min-height: 140px;
  margin: 6px 0;
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  font-size: 12.5px;
  overflow: hidden;
  isolation: isolate;
}
.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, transparent 0%,
    color-mix(in srgb, var(--text) 8%, transparent) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: skelSweep 1.5s ease-in-out infinite;
}
/* compact variant for small inline spots (opt-in) */
.loading.loading-sm { min-height: 54px; font-size: 11.5px; }
@keyframes skelSweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .loading::after { animation: none; } }

/* ================= density modes (Appearance → Density; Compact is the default) ================= */
/* One set of overrides on the shared building blocks rescales the whole dashboard. Comfortable = base. */
:root[data-density="compact"] #tab-content { font-size: 13px; }
:root[data-density="compact"] .panel { padding: 12px 14px; margin-bottom: 14px; }
:root[data-density="compact"] #tab-content .card,
:root[data-density="compact"] #tab-content [class*="-card"] { padding: 11px; }
:root[data-density="compact"] .panel-head { margin-bottom: 10px; }
:root[data-density="compact"] .panel-head h2 { font-size: 16px; }
:root[data-density="compact"] .detail-panel .panel-head h3 { font-size: 15px; }
:root[data-density="compact"] #tab-content h2 { font-size: 16px; }
:root[data-density="compact"] #tab-content h3 { font-size: 14px; }
:root[data-density="compact"] .cards-grid { gap: 10px; margin-bottom: 14px; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
:root[data-density="compact"] .stat-grid { gap: 7px; }
:root[data-density="compact"] .stat { padding: 7px 9px; }
:root[data-density="compact"] .stat-value { font-size: 16px; }
:root[data-density="compact"] #tab-content table th,
:root[data-density="compact"] #tab-content table td { padding-top: 4px; padding-bottom: 4px; }
:root[data-density="compact"] #tab-content [class*="-note"] { margin-top: 6px; margin-bottom: 6px; }

:root[data-density="ultra"] #tab-content { font-size: 12px; line-height: 1.32; }
:root[data-density="ultra"] .panel { padding: 8px 10px; margin-bottom: 9px; border-radius: 12px; }
:root[data-density="ultra"] #tab-content .card,
:root[data-density="ultra"] #tab-content [class*="-card"] { padding: 8px; border-radius: 10px; }
:root[data-density="ultra"] .panel-head { margin-bottom: 7px; }
:root[data-density="ultra"] .panel-head h2 { font-size: 15px; }
:root[data-density="ultra"] .detail-panel .panel-head h3 { font-size: 14px; }
:root[data-density="ultra"] #tab-content h2 { font-size: 15px; }
:root[data-density="ultra"] #tab-content h3 { font-size: 13px; }
:root[data-density="ultra"] .cards-grid { gap: 7px; margin-bottom: 9px; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); }
:root[data-density="ultra"] .stat-grid { gap: 5px; }
:root[data-density="ultra"] .stat { padding: 5px 7px; border-radius: 8px; }
:root[data-density="ultra"] .stat-value { font-size: 15px; }
:root[data-density="ultra"] .stat-label { font-size: 10px; }
:root[data-density="ultra"] #tab-content table th,
:root[data-density="ultra"] #tab-content table td { padding-top: 2px; padding-bottom: 2px; font-size: 11.5px; }
:root[data-density="ultra"] #tab-content [class*="-note"] { margin-top: 5px; margin-bottom: 5px; font-size: 11px; }

/* ================= density reflow + table number alignment ================= */
.reflow-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); align-items: start; }
.reflow-grid > .reflow-span { grid-column: 1 / -1; }
:root[data-density="compact"] .reflow-grid { gap: 10px; }
:root[data-density="ultra"] .reflow-grid { gap: 7px; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
/* neat numeric columns everywhere (digits share a fixed width so figures line up + read tighter) */
#tab-content table { font-variant-numeric: tabular-nums; }
.rt-num { text-align: right; font-variant-numeric: tabular-nums; }

/* right-align numeric columns in the two real data tables (the label column stays left) */
.capex-table th:not(:first-child), .capex-table td:not(:first-child) { text-align: right; }
.capex-table .capex-sname { text-align: left; }
.auc-table th:not(.opt-drow):not(:first-child):not(.auc-compcell),
.auc-table td:not(.opt-drow):not(:first-child):not(.auc-compcell) { text-align: right; }
.auc-table .opt-drow { text-align: left; }
.auc-table th:first-child, .auc-table td:first-child { text-align: left; }   /* date / tenor label column */

/* ============================ Commodities tab ============================ */
.cmdty-panel { --acc: var(--tf-accent, #e0913a); }
.cmdty-panel .panel-head h3 { color: var(--acc); }
.cmdty-subnav { display: flex; gap: 8px; margin: 10px 0 14px; }
.cmdty-subbtn { background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.cmdty-subbtn.on { background: color-mix(in srgb, var(--acc) 22%, var(--panel-2)); color: var(--text); border-color: var(--acc); }

/* price strip */
.cmp-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.cmp-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px;
  display: flex; flex-direction: column; gap: 1px; position: relative; }
.cmp-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.cmp-val { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cmp-chg { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.cmp-chg.up { color: var(--up); } .cmp-chg.dn { color: var(--down); }
.cmp-card .sparkline { position: absolute; right: 8px; top: 8px; opacity: .5; width: 70px; height: 22px; }
.cmp-as { font-size: 10px; color: var(--muted); opacity: .7; }
.cmp-ratio { background: color-mix(in srgb, #c9a227 12%, var(--panel-2)); border-color: #c9a22766; }

/* map card */
.cmdty-mapcard { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.cmdty-maphead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cmdty-mapmodes { display: flex; gap: 6px; flex-wrap: wrap; }
.cmdty-mbtn { background: var(--panel); border: 1px solid var(--border); color: var(--muted); border-radius: 8px;
  padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.cmdty-mbtn.on { background: color-mix(in srgb, var(--acc) 25%, var(--panel)); color: var(--text); border-color: var(--acc); }
.cmdty-mbtn.dis { opacity: .4; cursor: not-allowed; }
.cmdty-mapwrap { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; align-items: start; }
.cmdty-mapbody { background: #0d1420; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cmdty-map { width: 100%; height: auto; display: block; }
.cmdty-mapaside { max-height: 460px; overflow-y: auto; }
.cmdty-mapcap { font-size: 11.5px; color: var(--muted); margin: 10px 2px 0; line-height: 1.5; }
.cmdty-nomap { padding: 24px; text-align: center; }
.ckm circle { transition: r .12s ease, fill-opacity .12s ease; }
.ckm:hover circle { fill-opacity: .85; }

/* chokepoint list */
.cmdty-chlist { display: flex; flex-direction: column; gap: 5px; }
.cmdty-chrow { display: flex; gap: 8px; align-items: flex-start; text-align: left; width: 100%;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--text); }
.cmdty-chrow.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, var(--panel)); }
.cmdty-chdot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex: 0 0 auto; }
.cmdty-chmain { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.cmdty-chname { font-size: 13px; font-weight: 700; }
.cmdty-chvol { font-size: 11px; font-weight: 600; color: var(--acc); margin-left: 4px; font-variant-numeric: tabular-nums; }
.cmdty-chreg { font-size: 11px; color: var(--muted); }
.cmdty-chnote { font-size: 11.5px; color: var(--text); margin-top: 5px; line-height: 1.5; }
.cmdty-chalt { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.cmdty-chrisk { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 2px 7px;
  border-radius: 999px; height: fit-content; flex: 0 0 auto; }
.cmdty-r-high { background: #ef444422; color: #f87171; } .cmdty-r-medium { background: #f59e0b22; color: #fbbf24; }
.cmdty-r-low { background: #22c55e22; color: #4ade80; }

/* ranked bars (producers/consumers/mine) */
.cmdty-rank { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.cmdty-rank-h { font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.cmdty-rkrow { display: grid; grid-template-columns: 108px 1fr 56px; gap: 8px; align-items: center; margin: 3px 0; }
.cmdty-rkname { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdty-rkbar { background: #0d1420; border-radius: 4px; height: 12px; overflow: hidden; }
.cmdty-rkbar > span { display: block; height: 100%; border-radius: 4px; }
.cmdty-rkval { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* blocks + stats */
.cmdty-block { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.cmdty-block h4 { margin: 0 0 10px; font-size: 15px; }
.cmdty-block h4 .muted, .muted { color: var(--muted); font-weight: 500; }
/* historical oil charts */
.cmdty-histhead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cmdty-histhead h4 { margin: 0; }
.cmdty-histctrls { display: flex; gap: 10px; flex-wrap: wrap; }
.cmdty-hbtn { padding: 3px 9px; font-size: 12px; }
.cmdty-histchart svg, .cmdty-histcard svg { width: 100%; height: auto; display: block; }
.cmdty-histchart { max-width: 560px; }   /* keep the full-width crude overlay chart compact */
.cmdty-histgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.cmdty-histcard { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.cmdty-histcard-h { font-size: 13px; margin-bottom: 2px; }
.cmdty-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cmdty-stats-wrap { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.cmdty-stat { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.cmdty-stat-lbl { font-size: 11px; color: var(--muted); }
.cmdty-stat-val { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cmdty-stat-as { font-size: 10px; color: var(--muted); opacity: .7; }
.cmdty-balspark { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.cmdty-sparklbl { font-size: 11px; color: var(--muted); }
/* metals supply-vs-demand trend panel (same layout as the oil balance) */
.cmdty-sdtrend { margin-bottom: 16px; }
.cmdty-sdtrend-h { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
/* platinum & palladium side by side (supply/demand trend + price history) */
.cmdty-sdpair, .cmdty-histpair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cmdty-histpair { margin-top: 10px; }
.cmdty-sdmini { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.cmdty-sdmini-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 13px; }
@media (max-width: 620px) { .cmdty-sdpair, .cmdty-histpair { grid-template-columns: 1fr; } }

/* ============================ Labor forecast ============================ */
.lf-panel { margin-top: 14px; }
.lf-block { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.lf-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.lf-head h4 { margin: 0; font-size: 15px; }
.lf-hero { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.lf-point { font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); }
.lf-point-ur { color: #f59e0b; }
.lf-point-rev { font-size: 30px; } .lf-point-rev.neg { color: var(--down); } .lf-point-rev.pos { color: var(--up); }
.lf-heroright { min-width: 0; }
.lf-sub { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.lf-sub b { color: var(--text); font-variant-numeric: tabular-nums; }
.lf-band { position: relative; height: 12px; background: #0d1420; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.lf-band-90 { position: absolute; top: 0; bottom: 0; background: rgba(96,165,250,0.18); }
.lf-band-68 { position: absolute; top: 0; bottom: 0; background: rgba(96,165,250,0.42); }
.lf-band-zero { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--muted); }
.lf-band-pt { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; background: var(--accent); border-radius: 2px; }
.lf-band-ax { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.lf-members { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.lf-chip { font-size: 11px; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; }
.lf-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.lf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
.lf-colh { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.lf-contrib { display: grid; grid-template-columns: 96px 1fr 42px; gap: 8px; align-items: center; margin: 3px 0; font-size: 12px; }
.lf-contrib-nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.lf-contrib-bar { position: relative; height: 10px; background: #0d1420; border-radius: 3px; }
.lf-contrib-bar > span { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.lf-contrib-bar.pos { direction: ltr; } .lf-contrib-bar.pos > span { left: 50%; background: var(--up); }
.lf-contrib-bar.neg > span { right: 50%; background: var(--down); }
.lf-contrib-bar::before { content: ''; position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1px; background: var(--border); }
.lf-contrib-v { text-align: right; font-variant-numeric: tabular-nums; }
.lf-metrics { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.lf-metrics b { color: var(--text); font-variant-numeric: tabular-nums; }
.lf-note { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 8px 0 0; }
.lf-caveat { background: var(--panel-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 6px; padding: 8px 10px; font-size: 11px; color: var(--text); opacity: .92; }
.lf-revrisk { background: var(--panel-2); border: 1px solid var(--border); border-left: 3px solid #f59e0b; border-radius: 6px; padding: 8px 10px; margin-top: 8px; font-size: 11px; line-height: 1.5; }
.lf-revrisk.down { border-left-color: #f87171; }
.lf-rr-tag { font-weight: 700; color: #f9a88f; margin-right: 6px; white-space: nowrap; }
.lf-revrisk.up .lf-rr-tag { color: #86efac; }
.lf-rr-detail { color: var(--muted); }
.lf-rr-detail b { color: var(--text); }
.lf-foot { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 4px 2px 0; }
/* data-enrichment / maturity meter */
.lf-maturity { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; margin: 10px 0; }
.lf-mat-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; margin-bottom: 7px; }
.lf-mat-stage { font-weight: 700; font-size: 11.5px; padding: 2px 9px; border-radius: 10px; }
.lf-mat-stage.s0 { background: rgba(244,114,80,.16); color: #f9a88f; }
.lf-mat-stage.s1 { background: rgba(234,179,8,.16); color: #eab308; }
.lf-mat-stage.s2 { background: rgba(34,197,94,.16); color: #22c55e; }
.lf-mat-bar { position: relative; height: 16px; background: #10182a; border-radius: 8px; overflow: hidden; margin-bottom: 7px; }
.lf-mat-bar > span { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--accent), #22c55e); border-radius: 8px; }
.lf-mat-bar > i { position: absolute; left: 8px; top: 0; line-height: 16px; font-style: normal; font-size: 10px; color: var(--text); mix-blend-mode: difference; }
.lf-mat-chips { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 10px; }
.lf-mat-lbl { color: var(--muted); margin: 0 2px 0 4px; }
.lf-mat-chip { padding: 1px 7px; border-radius: 9px; border: 1px solid var(--border); }
.lf-mat-chip.in { color: #86efac; border-color: rgba(34,197,94,.35); }
.lf-mat-chip.pend { color: var(--muted); opacity: .7; }
.lf-laddder-row { display: flex; gap: 6px; margin: 4px 0 7px; flex-wrap: wrap; }
.lf-ladder { font-size: 10.5px; color: var(--muted); padding: 2px 7px; border-radius: 8px; background: var(--chip-bg); font-variant-numeric: tabular-nums; }
.lf-ladder b { color: var(--text); }
.lf-ladder.cur { background: rgba(56,189,248,.16); color: var(--accent); }
.lf-ladder.cur b { color: var(--accent); }
.lf-buckets { display: flex; align-items: flex-end; gap: 8px; height: 84px; }
.lf-bucket { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.lf-bucket-bar { width: 100%; max-width: 34px; height: 56px; background: #0d1420; border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.lf-bucket-bar > span { width: 100%; background: #f59e0b; border-radius: 4px 4px 0 0; }
.lf-bucket-p { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lf-bucket-r { font-size: 10px; color: var(--muted); }
.lf-revrow { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; }
.lf-revlbl { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.lf-revchart svg { width: 100%; height: auto; }
/* predicted-vs-actual walk-forward chart */
.lf-pc-head { font-size: 12px; font-weight: 600; margin: 14px 2px 4px; color: var(--text); }
.lf-pc-wrap { background: #0d1420; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px 2px; }
.lf-pc { width: 100%; height: auto; display: block; }
.lf-pc-legend { display: flex; gap: 14px; padding: 3px 4px 0; font-size: 10.5px; }
.lf-pc-lg { color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.lf-pc-lg::before { content: ''; width: 12px; height: 2px; border-radius: 2px; display: inline-block; }
.lf-pc-lg.act::before { background: #cbd5e1; }
.lf-pc-lg.pred::before { background: var(--accent); }
.lf-pc-lg.miss { margin-left: auto; font-variant-numeric: tabular-nums; }
.lf-pc-lg.miss::before { display: none; }
.lf-pc-grid { stroke: rgba(148,163,184,.14); stroke-width: 1; }
.lf-pc-zero { stroke: rgba(148,163,184,.4); stroke-width: 1; stroke-dasharray: 3 3; }
.lf-pc-dev { stroke: rgba(244,114,80,.35); stroke-width: 1.5; }
.lf-pc-ax { fill: var(--muted); font-size: 9.5px; font-variant-numeric: tabular-nums; }
.lf-pc-act { fill: none; stroke: #cbd5e1; stroke-width: 1.8; stroke-linejoin: round; }
.lf-pc-pred { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-dasharray: 4 2.5; }
@media (max-width: 720px) { .lf-cols, .lf-revrow, .lf-hero { grid-template-columns: 1fr; } }
/* world-balance: stat column beside the production-vs-consumption chart */
.cmdty-balrow { display: grid; grid-template-columns: minmax(160px, 0.8fr) minmax(280px, 1.7fr); gap: 14px; align-items: start; }
.cmdty-balstats { display: flex; flex-direction: column; gap: 8px; }
.cmdty-balchart { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 8px 3px; }
.cmdty-balchart svg { width: 100%; height: auto; display: block; }
.cmdty-cl-row { display: flex; gap: 14px; padding: 3px 4px 1px; flex-wrap: wrap; }
.cmdty-cl { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.cmdty-cl i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
@media (max-width: 520px) { .cmdty-balrow { grid-template-columns: 1fr; } }
.cmdty-eianote { background: color-mix(in srgb, #fbbf24 10%, var(--panel-2)); border: 1px solid #fbbf2455;
  border-radius: 10px; padding: 10px 14px; font-size: 12.5px; margin-bottom: 16px; }

/* grade scatter + table */
.cmdty-grades { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.cmdty-scatterwrap { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.cmdty-scatter { width: 100%; height: auto; }
.cmdty-sc-lbl { fill: var(--text); font-size: 10px; font-weight: 600; }
.cmdty-ax { fill: var(--muted); font-size: 10px; text-anchor: middle; }
.cmdty-ax-y { text-anchor: end; }
.cmdty-axttl { font-size: 10.5px; fill: var(--muted); }
.cmdty-quad { fill: var(--muted); font-size: 10px; opacity: .8; }
.cmdty-gtbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.cmdty-gtbl th, .cmdty-gtbl td { padding: 5px 7px; border-bottom: 1px solid var(--border); text-align: left; }
.cmdty-gtbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.cmdty-g-name { font-weight: 700; }
.cmdty-g-full { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; }
.cmdty-g-reg { color: var(--muted); font-size: 11px; }
.cmdty-q { font-size: 10px; padding: 2px 6px; border-radius: 999px; white-space: nowrap; }
.cmdty-q-l { background: #38bdf822; color: #7dd3fc; } .cmdty-q-m { background: #eab30822; color: #fcd34d; }
.cmdty-q-h { background: #f9731622; color: #fdba74; }
.cmdty-note { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 8px 2px 0; }

/* metals */
.cmp-strip-metals { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.cmdty-mtsel { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.cmdty-mtbtn { background: var(--panel); border: 1px solid var(--border); color: var(--muted); border-radius: 999px;
  padding: 6px 16px; font-size: 13px; font-weight: 600; cursor: pointer; border-left: 3px solid var(--m); }
.cmdty-mtbtn.on { background: color-mix(in srgb, var(--m) 20%, var(--panel)); color: var(--text); border-color: var(--m); }
.cmdty-mtdetail { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; align-items: start; }
.cmdty-sdrow { margin-bottom: 14px; }
.cmdty-sdhd { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 5px; }
.cmdty-sdhd span { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .5px; }
.cmdty-stackbar { display: flex; height: 22px; border-radius: 5px; overflow: hidden; background: #0d1420; border: 1px solid var(--border); }
.cmdty-seg { height: 100%; }
.cmdty-lgrow { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.cmdty-lg { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.cmdty-lg i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.cmdty-lg b { color: var(--text); font-variant-numeric: tabular-nums; }
.cmdty-bal { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: auto; }
.cmdty-bal.def { background: #ef444422; color: #f87171; } .cmdty-bal.sur { background: #22c55e22; color: #4ade80; }
.cmdty-mtmap { display: flex; flex-direction: column; gap: 10px; }

/* map legends */
.cmdty-leg { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted); flex-wrap: wrap; background: rgba(0,0,0,.15); }
.cmdty-leg-grad { flex: 1; min-width: 80px; height: 10px; border-radius: 3px; border: 1px solid rgba(255,255,255,.12); }
.cmdty-leg-t { font-variant-numeric: tabular-nums; color: var(--text); }
.cmdty-leg-unit { color: var(--muted); }
.cmdty-leg-choke { gap: 14px; }
.cmdty-leg-risk { display: inline-flex; align-items: center; gap: 5px; }
.cmdty-leg-risk i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cmdty-leg-size { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.cmdty-leg-size b { border-radius: 50%; background: var(--muted); display: inline-block; }
.cmdty-leg-size .s1 { width: 5px; height: 5px; }
.cmdty-leg-size .s2 { width: 8px; height: 8px; }
.cmdty-leg-size .s3 { width: 12px; height: 12px; }

/* hover tooltip + country highlight */
.cmdty-cty { cursor: pointer; transition: stroke .08s; }
.cmdty-cty:hover { stroke: #e6ebf5; stroke-width: 0.9; }
.cmdty-tip { position: fixed; z-index: 9999; pointer-events: none; background: var(--panel);
  border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; font-size: 12px; color: var(--text);
  box-shadow: 0 6px 20px rgba(0,0,0,.45); max-width: 260px; line-height: 1.35; }
.cmdty-tip[hidden] { display: none; }
.cmdty-tip b { display: block; font-weight: 700; }
.cmdty-tip span { color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .cmdty-mapwrap, .cmdty-grades, .cmdty-mtdetail { grid-template-columns: 1fr; }
  .cmdty-mapaside { max-height: none; }
}

/* ===== Stocks tab — Phase-1 evaluation engine ===== */
.stk-eval .ev-top { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.ev-scorebox { min-width: 118px; text-align: center; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); }
.ev-score-num { font-size: 38px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ev-score-band { font-size: 12px; margin-top: 5px; font-weight: 600; letter-spacing: .02em; }
.ev-band-exceptional .ev-score-num, .ev-band-exceptional .ev-score-band,
.ev-band-attractive .ev-score-num, .ev-band-attractive .ev-score-band { color: var(--up); }
.ev-band-fair .ev-score-num, .ev-band-fair .ev-score-band,
.ev-band-mixed .ev-score-num, .ev-band-mixed .ev-score-band { color: var(--warn); }
.ev-band-unattractive .ev-score-num, .ev-band-unattractive .ev-score-band,
.ev-band-avoid .ev-score-num, .ev-band-avoid .ev-score-band { color: var(--down); }
.ev-meta { flex: 1; min-width: 220px; }
.ev-arch { font-size: 17px; font-weight: 700; }
.ev-arch-sub { font-size: 12px; margin-top: 2px; }
.ev-caveat { font-size: 12px; margin-top: 7px; max-width: 66ch; line-height: 1.45; }

.ev-dims { display: flex; flex-direction: column; gap: 6px; }
.ev-dim { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--bg); }
.ev-dim-sum { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; list-style: none; }
.ev-dim-sum::-webkit-details-marker { display: none; }
.ev-dim-sum:hover { background: color-mix(in srgb, var(--panel) 60%, transparent); }
.ev-dim-l { flex: 0 0 200px; font-weight: 600; font-size: 13.5px; }
.ev-dim-w { flex: 0 0 40px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ev-bar { flex: 1; height: 8px; border-radius: 5px; background: var(--border); overflow: hidden; min-width: 70px; }
.ev-bar-fill { display: block; height: 100%; border-radius: 5px; }
.ev-dim-s { flex: 0 0 34px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-subs { padding: 6px 12px 10px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.ev-sub-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.ev-sub-l { flex: 0 0 148px; }
.ev-sub-v { flex: 0 0 72px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ev-sub-sc { flex: 0 0 26px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-sub-note { flex: 1; font-size: 11px; }
.ev-mini { flex: 0 0 58px; height: 6px; border-radius: 4px; background: var(--border); overflow: hidden; }
.ev-mini > span { display: block; height: 100%; }
/* score-tier colors: bar fills use background, numbers use text color */
.ev-bar-fill.ev-hi, .ev-mini > .ev-hi { background: var(--up); }
.ev-bar-fill.ev-mid, .ev-mini > .ev-mid { background: var(--warn); }
.ev-bar-fill.ev-lo, .ev-mini > .ev-lo { background: var(--down); }
.ev-bar-fill.ev-na, .ev-mini > .ev-na { background: var(--muted); }
.ev-dim-s.ev-hi, .ev-sub-sc.ev-hi, .ev-vh-sc.ev-hi { color: var(--up); }
.ev-dim-s.ev-mid, .ev-sub-sc.ev-mid, .ev-vh-sc.ev-mid { color: var(--warn); }
.ev-dim-s.ev-lo, .ev-sub-sc.ev-lo, .ev-vh-sc.ev-lo { color: var(--down); }
.ev-dim-s.ev-na, .ev-sub-sc.ev-na { color: var(--muted); }

.ev-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.ev-scard { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--bg); text-align: center; }
.ev-scard-h { font-size: 12px; color: var(--muted); font-weight: 600; }
.ev-scard-v { font-size: 26px; font-weight: 800; margin: 4px 0; font-variant-numeric: tabular-nums; }
.ev-scard-v span { font-size: 14px; color: var(--muted); font-weight: 600; }
.ev-scard-n { font-size: 11px; margin-top: 3px; }
.ev-scard-off { opacity: .55; }
.ev-pips { display: flex; gap: 3px; justify-content: center; margin: 5px 0; }
.ev-pip { width: 13px; height: 6px; border-radius: 2px; background: var(--border); }
.ev-pip.on { background: var(--up); }
.ev-zone { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 10px; }
.ev-zone-safe { color: var(--up); border: 1px solid var(--up); }
.ev-zone-grey { color: var(--warn); border: 1px solid var(--warn); }
.ev-zone-distress { color: var(--down); border: 1px solid var(--down); }

.ev-block { margin-top: 14px; }
.ev-block-h { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.ev-vh-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 12.5px; }
.ev-vh-l { flex: 0 0 76px; font-weight: 600; }
.ev-vh-cur { flex: 0 0 58px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.ev-spark { flex: 0 0 90px; height: 22px; }
.ev-vh-range { flex: 1; font-size: 11px; }
.ev-vh-sc { flex: 0 0 56px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-vh-sc-x { display: block; font-size: 9px; color: var(--muted); font-weight: 500; }

.ev-fv { margin-top: 14px; border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; background: var(--bg); }
.ev-fv-h { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.ev-fv-na { font-size: 12.5px; }
.ev-fv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ev-fv-card { border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; background: var(--panel); }
.ev-fv-k { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ev-fv-v { font-size: 24px; font-weight: 800; margin: 3px 0; font-variant-numeric: tabular-nums; }
.ev-fv-v span { font-size: 12px; color: var(--muted); font-weight: 600; }
.ev-fv-range { font-size: 11px; }
.ev-fv-up { font-size: 13px; font-weight: 700; margin: 4px 0 7px; }
.ev-fv-up.up { color: var(--up); }
.ev-fv-up.down { color: var(--down); }
.ev-fv-note { font-size: 11px; margin-top: 9px; }

.ev-sector { margin-top: 14px; border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; background: var(--bg); }
.ev-sector-h { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.ev-sector-meta { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; font-size: 12px; }
.ev-sector-rank { font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-sector-subs { border-top: 1px solid var(--border); padding-top: 8px; }

.ev-filings { margin-top: 14px; border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; background: var(--bg); }
.ev-filings-ok { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.ev-filings-tick { color: var(--up); font-weight: 800; }
.ev-filings-h { font-size: 13px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-filings-pill { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.ev-fband-clean { color: var(--up); border: 1px solid var(--up); }
.ev-fband-watch { color: var(--warn); border: 1px solid var(--warn); }
.ev-fband-elevated, .ev-fband-severe { color: var(--down); border: 1px solid var(--down); }
.ev-flags { display: flex; flex-direction: column; gap: 8px; }
.ev-flag { display: flex; align-items: baseline; gap: 10px; font-size: 12.5px; padding-left: 10px; border-left: 3px solid var(--border); flex-wrap: wrap; }
.ev-flag-critical { border-left-color: var(--down); }
.ev-flag-high { border-left-color: var(--warn); }
.ev-flag-l { font-weight: 600; }
.ev-flag-sev { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--panel); }
.ev-sev-critical { color: var(--down); } .ev-sev-high { color: var(--warn); } .ev-sev-medium, .ev-sev-low { color: var(--muted); }
.ev-flag-n { flex: 1 1 100%; font-size: 11px; }
.ev-flag-n a { color: var(--accent); }

@media (max-width: 720px) {
  .ev-dim-l { flex-basis: 130px; font-size: 12.5px; }
  .ev-scores, .ev-fv-grid { grid-template-columns: 1fr; }
  .ev-sub-note { display: none; }
  .ev-sub-l { flex-basis: 110px; }
}

.ev-synth { margin: 0 0 14px; padding: 13px 16px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 11px; background: var(--bg); }
.ev-synth-head { font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.ev-synth-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 11px; }
.ev-synth-col ul { margin: 5px 0 0; padding-left: 18px; }
.ev-synth-col li { font-size: 13px; margin: 3px 0; color: var(--ink-soft, var(--text)); }
.ev-synth-t { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.ev-synth-pro { color: var(--up); }
.ev-synth-con { color: var(--warn); }
@media (max-width: 620px) { .ev-synth-cols { grid-template-columns: 1fr; } }

/* ===== Auctions — Debt & holders sub-tab ===== */
.dh-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; margin: 12px 0 14px; }
.dh-panel { margin-top: 14px; }
.dh-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dh-holders h4 { margin: 4px 0 10px; font-size: 13.5px; }
.dh-h2 { margin-top: 16px !important; }
.dh-row, .dh-lrow { display: flex; align-items: center; gap: 9px; padding: 3px 0; font-size: 12.5px; }
.dh-name { flex: 0 0 158px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-lb { flex: 0 0 52px; font-variant-numeric: tabular-nums; }
.dh-bar { flex: 1; height: 9px; border-radius: 5px; background: var(--grid); overflow: hidden; display: inline-flex; }
.dh-bar > span { display: block; height: 100%; border-radius: 5px; }
.dh-amt { flex: 0 0 66px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.dh-pct { flex: 0 0 44px; text-align: right; font-variant-numeric: tabular-nums; }
.dh-agg .dh-name { color: var(--muted); font-style: italic; }
.dh-meta { font-size: 12px; margin-top: 8px; }
.dh-note { font-size: 11.5px; margin-top: 7px; line-height: 1.45; }
.dh-stack { display: flex; height: 20px; border-radius: 6px; overflow: hidden; margin: 6px 0 8px; }
.dh-seg { display: block; height: 100%; }
.dh-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; margin-bottom: 4px; }
.dh-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.dh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dh-chip { border: 1px solid var(--border); border-radius: 9px; padding: 7px 12px; display: flex; flex-direction: column; gap: 1px; font-size: 12px; }
.dh-chip b { font-size: 16px; font-variant-numeric: tabular-nums; }
.dh-chip i { font-style: normal; font-size: 11px; }
.dh-cap { font-size: 12px; font-weight: 600; margin-bottom: 7px; color: var(--muted); }
.dh-bp-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dh-wall { font-size: 13px; line-height: 1.5; border-left: 3px solid var(--gold); padding-left: 10px; }
.dh-creep-head { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.dh-creep-sub { font-size: 13px; line-height: 1.55; }
.dh-scen td, .dh-scen th { padding: 4px 8px; }
.dh-cur { background: color-mix(in srgb, var(--gold) 12%, transparent); font-weight: 600; }
@media (max-width: 860px) { .dh-grid2 { grid-template-columns: 1fr; } .dh-name { flex-basis: 120px; } }

/* ===== Auctions — Global spillover sub-tab ===== */
.sp-banner { font-size: 12px; margin: 10px 0 12px; padding: 9px 13px; border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 9px; line-height: 1.5; }
.sp-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.sp-controls .dh-cap { margin-bottom: 0; }
.sp-g10 { margin-left: auto; font-size: 13px; }
.sp-row { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 12.5px; flex-wrap: wrap; }
.sp-name { flex: 0 0 168px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-track { flex: 1 1 120px; min-width: 90px; height: 9px; border-radius: 5px; background: var(--grid); overflow: hidden; display: inline-flex; justify-content: flex-end; }
.sp-fill { display: block; height: 100%; border-radius: 5px; }
.sp-fill.sp-dn { background: var(--down); }
.sp-fill.sp-up { background: var(--up); }
.sp-move { flex: 0 0 96px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-move i { font-style: normal; font-weight: 400; font-size: 10.5px; }
.sp-conv { font-size: 9.5px; text-transform: uppercase; font-weight: 700; padding: 1px 6px; border-radius: 6px; letter-spacing: .04em; }
.sp-conv-high { color: var(--up); border: 1px solid var(--up); }
.sp-conv-med { color: var(--gold); border: 1px solid var(--gold); }
.sp-conv-low { color: var(--muted); border: 1px solid var(--border); }
.sp-man { font-size: 9.5px; text-transform: uppercase; font-weight: 700; padding: 1px 6px; border-radius: 6px; color: var(--cyan); border: 1px solid var(--cyan); }
.sp-cpi { flex: 0 0 88px; font-variant-numeric: tabular-nums; font-size: 11.5px; }
.sp-sell { flex: 0 0 72px; font-size: 11.5px; }
.sp-meta { flex: 0 0 190px; font-size: 10.5px; text-align: right; margin-left: auto; }
.sp-conts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; }
.sp-cont { border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.sp-cont b { font-size: 17px; }
.sp-cont-s { color: var(--down); font-size: 11px; }
.sp-case { border-left: 3px solid var(--cyan); padding-left: 14px; }
.sp-step { display: flex; gap: 10px; margin: 7px 0; font-size: 12.5px; line-height: 1.5; }
.sp-step b { flex: 0 0 74px; color: var(--cyan); }
@media (max-width: 860px) { .sp-meta { display: none; } .sp-name { flex-basis: 130px; } }

/* ===== carry-unwind spiral monitor ===== */
.cb-flow { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.cb-arrow { align-self: center; color: var(--muted); font-size: 15px; }
.cb-stage { flex: 1 1 130px; min-width: 128px; border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; }
.cb-st-n { font-size: 10px; color: var(--muted); font-weight: 700; }
.cb-st-name { font-weight: 700; font-size: 12.5px; }
.cb-st-status { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.cb-st-read { font-size: 10.5px; color: var(--muted); line-height: 1.4; }
.cb-active { border-color: var(--down); box-shadow: inset 3px 0 0 var(--down); }
.cb-active .cb-st-status { color: var(--down); }
.cb-watch { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
.cb-watch .cb-st-status { color: var(--warn); }
.cb-done .cb-st-status { color: var(--muted); }
.cb-off { opacity: .65; }
.cb-off .cb-st-status { color: var(--muted); }
.warn-txt { color: var(--warn); }
.cb-ev-spark { flex: 0 0 92px; }
.cb-ev-spark .ev-spark { width: 90px; height: 22px; }
.cb-bookspark .ev-spark { width: 100%; height: 60px; }
.cb-light { font-size: 9.5px; text-transform: uppercase; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.cb-light-unwinding { color: var(--down); border: 1px solid var(--down); }
.cb-light-holding { color: var(--muted); border: 1px solid var(--border); }
.cb-light-building { color: var(--up); border: 1px solid var(--up); }
.cb-iv { display: flex; gap: 9px; align-items: baseline; font-size: 12px; margin: 5px 0; flex-wrap: wrap; }
.cb-iv b { flex: 0 0 108px; }
.cb-iv span { flex: 1; min-width: 200px; line-height: 1.45; }
.cb-iv-kind { font-style: normal; font-size: 10px; text-transform: uppercase; font-weight: 700; color: var(--cyan); border: 1px solid var(--cyan); border-radius: 6px; padding: 1px 6px; }
.dh-chg { flex: 0 0 78px; text-align: right; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dh-tenor { flex: 0 0 128px; text-align: right; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: help; }
@media (max-width: 900px) { .dh-tenor { display: none; } }

/* ── Plain-language tab explainer (#tab-explainer, copy in explainers.js) ── */
.tx { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--tf-accent, #38bdf8);
  border-radius: 8px; margin: 10px 0 2px; box-shadow: var(--panel-shadow); overflow: hidden; }
.tx-bar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px;
  background: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: var(--ink, inherit); }
.tx-bar:hover { background: var(--panel-2); }
.tx-emoji { font-size: 15px; line-height: 1; flex: 0 0 auto; }
.tx-line { flex: 1 1 auto; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.tx-more { flex: 0 0 auto; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--tf-accent, #38bdf8); white-space: nowrap; }
.tx-caret { font-size: 9px; }
.tx-body { padding: 2px 14px 12px; border-top: 1px solid var(--border); }
.tx-sec { margin-top: 10px; }
.tx-h { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--tf-accent, #38bdf8); margin-bottom: 3px; }
.tx-sec p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--ink, inherit); max-width: 860px; }
.tx-terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; }
.tx-term { font-size: 12px; line-height: 1.45; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 9px; }
.tx-term b { display: block; font-size: 11.5px; }
.tx-term span { color: var(--muted); }
@media (max-width: 640px) {
  .tx-line { display: none; }                 /* small screens: emoji + button only when collapsed */
  .tx-bar { padding: 7px 10px; }
  .tx-more { margin-left: auto; }
}

/* ── Today desk: fixings strip + unified schedule timeline ── */
.td-fixes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 4px 0 10px; border-bottom: 1px solid var(--border); }
.td-fixlbl { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-right: 2px; }
.td-fix { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px;
  font-size: 12px; font-variant-numeric: tabular-nums; cursor: help; white-space: nowrap; }
.td-fix b { font-weight: 600; }
.td-fix em { font-style: normal; font-size: 10.5px; margin-left: 2px; }
.td-fixnote { flex-basis: 100%; font-size: 10.5px; }
.td-list { display: flex; flex-direction: column; padding-top: 6px; }
.td-row { display: flex; align-items: baseline; gap: 9px; padding: 5px 2px; font-size: 12.5px;
  background: none; border: 0; border-bottom: 1px dashed var(--border); text-align: left; color: inherit; font: inherit; }
.td-row:last-child { border-bottom: 0; }
.td-row.drill { cursor: pointer; }
.td-row.drill:hover { background: var(--panel-2); }
.td-time { flex: 0 0 62px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.td-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; align-self: center; }
.td-title { flex: 0 0 auto; max-width: 34%; font-weight: 600; }
.td-exp { font-weight: 600; font-size: 10px; color: var(--tf-accent, #38bdf8); }
.td-detail { flex: 1 1 auto; color: var(--muted); font-size: 12px; min-width: 0; }
.td-read { display: block; font-size: 11.5px; margin-top: 1px; }
.td-st { flex: 0 0 auto; font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); white-space: nowrap; }
.td-st.done { color: #34d399; }
.td-st.due { color: var(--gold); }
.td-nextlbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; padding: 10px 0 2px; }
.td-next .td-row { opacity: 0.85; }
.td-empty { padding: 8px 2px; }
@media (max-width: 700px) {
  .td-title { max-width: 46%; }
  .td-detail { display: none; }
}

/* ── post-speech analysis card (Today desk) ── */
.td-spk { margin: 2px 0 6px 78px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px 8px; }
.td-spk summary { cursor: pointer; font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: #c084fc; padding: 4px 0; list-style: none; }
.td-spk summary::-webkit-details-marker { display: none; }
.td-spk-row { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.5; padding: 3px 0; }
.td-spk-row > b { flex: 0 0 58px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); padding-top: 2px; }
.td-lean { font-style: normal; font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px; padding: 1px 7px; border-radius: 9px; margin-right: 4px; }
.td-lean.hawk { background: rgba(239,68,68,.14); color: #f87171; }
.td-lean.dove { background: rgba(52,211,153,.14); color: #34d399; }
.td-lean.neut { background: var(--panel); color: var(--muted); border: 1px solid var(--border); }
.td-mkt { margin-right: 10px; font-variant-numeric: tabular-nums; }
.td-mkt em { font-style: normal; color: var(--muted); font-size: 11px; }
.td-spk-link { display: inline-block; margin-top: 4px; font-size: 11.5px; }
@media (max-width: 700px) { .td-spk { margin-left: 8px; } }

/* ── health top row: dial + the dial-through-time chart side by side; flags as a link ── */
.hlt-hist { min-width: 0; display: flex; flex-direction: column; }
.hlt-hist .hh-wrap { flex: 1; }
.hh-minihead { display: flex; align-items: baseline; gap: 10px; padding: 0 2px 6px; font-size: 12px; }
.hh-minihead .muted { font-size: 10.5px; }
.hh-wrap.compact { padding: 6px 8px 4px; }
.hh-wrap.compact .hh-legend { margin-top: 2px; }
.hlt-flaglink { display: block; width: 100%; margin-top: 8px; background: none; border: 0; padding: 2px 0; cursor: pointer;
  font: inherit; font-size: 11.5px; color: var(--muted); text-align: center; }
.hlt-flaglink:hover, .hlt-flaglink.open { color: var(--text); }
.hlt-flaglink.firing { color: var(--text); }
.hlt-fdd { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
@media (max-width: 860px) { .hlt-top { grid-template-columns: 1fr; } }

/* ── week board: Mon-Fri columns of event tiles; released numbers light up ── */
.tdw-wrap { overflow-x: auto; padding-top: 4px; }
.tdw-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 8px; min-width: 780px; }
.tdw-day { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 7px 8px; }
.tdw-day.today { border-color: var(--tf-accent, #38bdf8); box-shadow: 0 0 0 1px var(--tf-accent, #38bdf8) inset; }
.tdw-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); padding: 0 2px 6px; }
.tdw-day.today .tdw-head { color: var(--tf-accent, #38bdf8); }
.tdw-head b { font-size: 9px; letter-spacing: 1px; }
.tdw-tile { display: block; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--border);
  border-radius: 7px; padding: 5px 8px 6px; margin-bottom: 6px; font: inherit; color: inherit; }
.tdw-tile:last-child { margin-bottom: 0; }
.tdw-tile[data-rid] { cursor: pointer; }
.tdw-tile[data-rid]:hover { border-color: var(--tf-accent, #38bdf8); }
.tdw-top { display: flex; justify-content: space-between; align-items: baseline; }
.tdw-time { font-size: 9.5px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.4px; }
.tdw-check { font-size: 10px; color: #34d399; font-weight: 700; }
.tdw-name { display: block; font-size: 11.5px; font-weight: 600; line-height: 1.3; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdw-val { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.35; margin-top: 2px;
  font-variant-numeric: tabular-nums; }
/* the release color effect: a lit tile with a green pulse when it carries a fresh number */
.tdw-tile.done { background: rgba(52, 211, 153, 0.09); border-color: rgba(52, 211, 153, 0.45); }
.tdw-tile.done .tdw-val.lit { color: var(--text); font-weight: 600; }
.tdw-day.today .tdw-tile.done { animation: tdw-pulse 2.2s ease-out 2; }
.tdw-tile.due { border-color: var(--gold); }
@keyframes tdw-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  100% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
}
@media (prefers-reduced-motion: reduce) { .tdw-day.today .tdw-tile.done { animation: none; } }
.tdw-none { text-align: center; font-size: 12px; padding: 8px 0; }

/* ── compact health top: small dial + links + digest in the left column, chart-height matched ── */
.hlt-top.compact { align-items: stretch; }
.hlt-overall.compact { display: flex; flex-direction: column; text-align: left; padding: 10px 12px; }
.hlt-odial { display: flex; align-items: center; gap: 10px; }
.hlt-odial .hlt-gauge { width: 118px; flex: 0 0 auto; }
.hlt-odial-txt { min-width: 0; }
.hlt-odial-txt .hlt-ostat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0; }
.hlt-odial-txt .hlt-omath { font-size: 10px; margin-top: 2px; }
.hlt-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0 4px; border-bottom: 1px solid var(--border); }
.hlt-overall.compact .hlt-obtn, .hlt-overall.compact .hlt-flaglink { width: auto; margin: 0; text-align: left; font-size: 10.5px; }
.hlt-board-btn.slim { padding: 1px 8px; font-size: 10.5px; border-radius: 6px; }
.hlt-overall.compact .hp-digest { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 6px 0 0; }
.hlt-overall.compact .hp-dpanel { background: none; border: 0; padding: 4px 0 2px; }
.hlt-overall.compact .hp-title { font-size: 10px; }
.hlt-overall.compact .hp-take { margin-top: 3px; padding-left: 14px; }
.hlt-overall.compact .hp-take li { font-size: 10.5px; line-height: 1.45; }
.hlt-overall.compact .hp-alert { font-size: 10.5px; padding: 3px 0; }
@media (min-width: 861px) { .hlt-top.compact { grid-template-columns: minmax(300px, 390px) 1fr; }
  .hlt-overall.compact .hp-digest { max-height: 210px; } }

/* ── scorecard release-print log ── */
.scr-head, .scr-row { display: grid; grid-template-columns: 52px 1.6fr 0.8fr 0.7fr 0.6fr; gap: 8px; align-items: baseline; }
.scr-list.cons .scr-row, .scr-list.cons ~ .scr-head, .scr-head:has(+ .scr-list.cons) { grid-template-columns: 52px 1.6fr 0.8fr 0.7fr 0.6fr 0.9fr 1fr; }
.scr-head { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 2px 2px 6px; border-bottom: 1px solid var(--border); }
.scr-row { padding: 5px 2px; border-bottom: 1px dashed var(--row-border); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.scr-row:last-child { border-bottom: 0; }
.scr-date { font-size: 11px; color: var(--muted); }
.scr-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-name em { font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--muted); margin-left: 6px; }
.scr-cons em { font-style: normal; font-size: 9.5px; color: var(--muted); margin-left: 3px; }
.sc-verdict { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-left: 6px; }
.sc-verdict.beat { color: var(--up); }
.sc-verdict.miss { color: var(--down); }
.sc-verdict.inline { color: var(--muted); }
@media (max-width: 760px) { .scr-head, .scr-row { grid-template-columns: 44px 1.4fr 0.8fr 0.6fr !important; }
  .scr-z, .scr-cons, .scr-surp { display: none; } }

/* ── Debt tab: wall chart + spiral projection ── */
.dw-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 6px 2px 0; font-size: 11px; color: var(--muted); }
.dw-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.dw-legend em { font-style: normal; font-size: 10px; }
.dw-wac { font-size: 8.5px; fill: var(--muted); }
.dw-projrow { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; padding-top: 12px; }
.dw-projside { min-width: 0; }
.dw-mech { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 12px; }
.dw-mech b { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: #fb923c; margin-bottom: 5px; }
.dw-mrow { padding: 2.5px 0; color: var(--muted); line-height: 1.45; }
@media (max-width: 820px) { .dw-projrow { grid-template-columns: 1fr; } }
.dw-scen-y { flex: 1; font-variant-numeric: tabular-nums; font-weight: 600; }
.dw-scen-y em { font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--muted); }
.dw-pk { display: inline-block; min-width: 148px; color: var(--text); font-weight: 600; }

/* ── Debt verdict gauge ── */
.dv-top { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 18px; align-items: start; }
.dv-gauge { text-align: center; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 12px; }
.dv-band { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 2px; }
.dv-band.exp { color: #22c55e; } .dv-band.rec { color: #eab308; } .dv-band.slow { color: #fb923c; } .dv-band.con { color: #ef4444; }
.dv-vtext { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 8px; text-align: left; }
.dv-comps { min-width: 0; }
.dv-crow { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--row-border); cursor: help; }
.dv-crow:last-of-type { border-bottom: 0; }
.dv-clabel { flex: 0 0 260px; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-clabel em { font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--muted); margin-left: 7px; }
.dv-cbar { flex: 1; height: 9px; background: var(--grid); border-radius: 5px; overflow: hidden; }
.dv-cbar i { display: block; height: 100%; border-radius: 5px; }
.dv-cscore { flex: 0 0 26px; text-align: right; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dv-cw { flex: 0 0 30px; font-size: 10px; }
@media (max-width: 780px) { .dv-top { grid-template-columns: 1fr; } .dv-clabel { flex-basis: 150px; } .dv-clabel em { display: none; } }

/* ── Debt verdict gauge ── */
.dv-top { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 18px; align-items: start; }
.dv-gauge { text-align: center; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 12px; }
.dv-band { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 2px; }
.dv-band.exp { color: #22c55e; } .dv-band.rec { color: #eab308; } .dv-band.slow { color: #fb923c; } .dv-band.con { color: #ef4444; }
.dv-vtext { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 8px; text-align: left; }
.dv-comps { min-width: 0; }
.dv-crow { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--row-border); cursor: help; }
.dv-crow:last-of-type { border-bottom: 0; }
.dv-clabel { flex: 0 0 260px; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-clabel em { font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--muted); margin-left: 7px; }
.dv-cbar { flex: 1; height: 9px; background: var(--grid); border-radius: 5px; overflow: hidden; }
.dv-cbar i { display: block; height: 100%; border-radius: 5px; }
.dv-cscore { flex: 0 0 26px; text-align: right; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dv-cw { flex: 0 0 30px; font-size: 10px; }
@media (max-width: 780px) { .dv-top { grid-template-columns: 1fr; } .dv-clabel { flex-basis: 150px; } .dv-clabel em { display: none; } }
.dv-scale { font-size: 10px; letter-spacing: 0.3px; margin-top: 2px; }

/* ── live yields strip (Debt tab) ── */
.dw-ly { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px;
  font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; cursor: help; }
.dw-ly b { font-weight: 600; }
.dw-ly em { font-style: normal; font-size: 10.5px; }
.dw-ly-note { font-size: 10px; margin-left: auto; }

/* ── world lens country cards ── */
.wc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.wc-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.wc-head { display: flex; align-items: baseline; gap: 8px; padding-bottom: 7px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.wc-flag { font-size: 17px; }
.wc-head .muted { font-size: 10.5px; margin-left: auto; text-align: right; }
.wc-row { display: flex; align-items: baseline; gap: 8px; padding: 3.5px 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.wc-l { flex: 0 0 86px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.wc-row b { font-weight: 650; }
.wc-sub { font-size: 10.5px; margin-left: auto; text-align: right; }

/* ── world politics cards ── */
.wp-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; font-size: 12.5px; }
.wp-row { display: flex; gap: 10px; padding: 3px 0; line-height: 1.5; }
.wp-row > b { flex: 0 0 92px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--muted); padding-top: 2px; }
.wp-cand { padding: 6px 0 5px; border-top: 1px dashed var(--row-border); line-height: 1.5; }
.wp-cand > b { margin-right: 6px; }
.wp-cand .muted { display: block; font-size: 12px; }
.wp-feas { display: block; font-size: 11.5px; color: var(--text); opacity: 0.85; margin-top: 2px; }
.wp-overton { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 7px; }
.wp-src { font-size: 10px; margin-top: 6px; cursor: help; }
.wc-usd { display: flex; flex-wrap: wrap; gap: 5px 12px; border-top: 1px dashed var(--row-border); margin-top: 5px; padding-top: 6px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.wc-usd span { cursor: help; color: var(--muted); }
.wc-usd b { color: var(--text); }
.wc-usd-h { flex-basis: 100%; font-size: 9.5px; text-transform: uppercase; letter-spacing: 1px; color: #22d3ee !important; cursor: default !important; }

/* ── central banks & gold ── */
.cbg-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; padding-top: 8px; }
.cbg-chg { flex: 0 0 74px; text-align: right; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cbg-mover { display: flex; justify-content: space-between; gap: 10px; padding: 3.5px 0; font-size: 12.5px;
  border-bottom: 1px dashed var(--row-border); font-variant-numeric: tabular-nums; }
.cbg-mover:last-child { border-bottom: 0; }
.cbg-bars { display: flex; align-items: flex-end; gap: 8px; padding-top: 6px; }
.cbg-bar { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 9.5px; color: var(--muted); }
.cbg-bar i { display: block; width: 26px; background: #c9a227; border-radius: 3px 3px 0 0; min-height: 4px; }
.cbg-bar b { font-size: 10px; color: var(--text); }
@media (max-width: 820px) { .cbg-cols { grid-template-columns: 1fr; } }

/* ══ LIGHT-THEME LEGIBILITY REMEDIATION (runtime contrast sweep 2026-08-22) ══
   Dark-theme literal tints (pale yellows/limes/skies/reds designed for dark grounds) remapped to
   darker equivalents when the light theme is active. Keep every entry paired with its dark rule. */
:root[data-theme="light"] .sdr-badge.o { color: #4d7c0f; }
:root[data-theme="light"] .sdr-badge.s { color: #b45309; }
:root[data-theme="light"] .sdr-badge.sw { color: #0e7490; }
:root[data-theme="light"] .sdr-badge.f { color: #7c3aed; }
:root[data-theme="light"] .sdr-live { color: #4d7c0f; }
:root[data-theme="light"] .cr-better { color: var(--up); }
:root[data-theme="light"] .fw-sofrcell { color: #0e7490; }
:root[data-theme="light"] .hlt-src.fed { color: #0369a1; border-color: #0369a1; }
:root[data-theme="light"] .hlt-src.proxy { color: #b45309; border-color: #b45309; }
:root[data-theme="light"] .rs-cmp-chip:hover { color: var(--text); }
:root[data-theme="light"] .rs-cmp-chip.on { background: rgba(202,138,4,.12); border-color: #a16207; color: #a16207; }
:root[data-theme="light"] .slv-build-btn { background: rgba(202,138,4,.10); border-color: #a16207; color: #a16207; }
:root[data-theme="light"] .auc-drilltog { color: #b45309; }
:root[data-theme="light"] .cmdty-q-l { color: #0369a1; }
:root[data-theme="light"] .cmdty-q-m { color: #a16207; }
:root[data-theme="light"] .cmdty-q-h { color: #c2410c; }
:root[data-theme="light"] .cmdty-chrisk.cmdty-r-medium { color: #b45309; }
:root[data-theme="light"] .frag-measure.red { color: #dc2626; }
:root[data-theme="light"] .frag-measure.amber { color: #b45309; }
:root[data-theme="light"] .frag-degraded { color: #92400e; }
:root[data-theme="light"] .auth-err, :root[data-theme="light"] .my-err, :root[data-theme="light"] .db-err { color: #dc2626; }
:root[data-theme="light"] .mp-tval .mp-pos { fill: #15803d; }
:root[data-theme="light"] .mp-tval .mp-neg { fill: #dc2626; }
/* gauge value numerals: the yellow/lime zone colors wash out on white — darken via filter so the
   JS zone logic stays untouched */
:root[data-theme="light"] .hlt-gauge .hlt-val { filter: brightness(.72) saturate(1.35); }

:root[data-theme="light"] .dt-z.pos, :root[data-theme="light"] .dt-z.neg { color: #b45309; }
:root[data-theme="light"] .hp-blink { color: #b45309; }
:root[data-theme="light"] .bbg-load { color: #a16207; border-color: #a16207; background: rgba(202,138,4,.10); }
:root[data-theme="light"] .geo-blocked { color: var(--warn); }
:root[data-theme="light"] .slv-buildbox { border-color: var(--border); }
:root[data-theme="light"] .lf-revrisk b, :root[data-theme="light"] .lf-revrisk .lf-rr-tag { filter: brightness(.6) saturate(1.4); }
:root[data-theme="light"] .dt-navb-ov .dt-navn { color: #92400e; }
:root[data-theme="light"] .it-g-annual { color: #47597a; }
:root[data-theme="light"] .it-g-quarter { color: #7a6532; }
:root[data-theme="light"] .it-g-month { color: #8a4a4a; }
/* the choropleth map footer stays dark by design — pin its legend text to light regardless of theme */
.cmdty-mapbody .cmdty-leg, .cmdty-mapbody .cmdty-leg-t { color: #c8d2e8; }
/* curve-tab literal palette, light-mode remap */
:root[data-theme="light"] .crv-rc.cheap { color: #15803d; }
:root[data-theme="light"] .crv-bval.up { color: #b45309; }
:root[data-theme="light"] .crv-bval.dn { color: #1d4ed8; }
:root[data-theme="light"] .crv-pca-z.up { color: var(--down); }
:root[data-theme="light"] .crv-pca-z.dn { color: #15803d; }
:root[data-theme="light"] .crv-scen-chg.up { color: var(--down); }
:root[data-theme="light"] .crv-scen-chg.dn { color: #15803d; }
:root[data-theme="light"] .crv-scen-drv b.up { color: var(--down); }
:root[data-theme="light"] .crv-scen-drv b.dn { color: #15803d; }
:root[data-theme="light"] .cmdty-chrisk.cmdty-r-low { color: #15803d; }
:root[data-theme="light"] .mi-split-lbl .pos, :root[data-theme="light"] .dt-t-meta .pos { color: var(--up); }
:root[data-theme="light"] .crv-sp-v.hot { color: #b45309; }
:root[data-theme="light"] .crv-scen-shape { filter: brightness(.75) saturate(1.3); }

/* ══════════════════════════════════════════════════════════════════════════════════════
   LIGHT-THEME DESIGN SYSTEM (the rules the light mode follows)
   1. SURFACE HIERARCHY — three distinct levels so pills, tiles and charts never blur:
        charts  = white paper (--surface-chart) with a solid border — data stands out
        tiles   = tinted card (--surface-tile)
        pills   = deepest tint (--surface-pill) + strong border — read as small objects
   2. LABELS — every small uppercase label is BOLD and a darker ink (--label)
   3. DOTS & SWATCHES — accent dots are darkened + edged so they hold on white
   Dark theme keeps its existing values (tokens map to the current dark surfaces).
   ══════════════════════════════════════════════════════════════════════════════════════ */
:root {
  --surface-chart: var(--panel-2);
  --surface-tile: var(--panel-2);
  --surface-pill: var(--chip-bg);
  --pill-border: var(--border);
  --label: var(--muted);
}
:root[data-theme="light"] {
  --surface-chart: #ffffff;
  --surface-tile: #eef1f7;
  --surface-pill: #e2e8f4;
  --pill-border: #bfcbe0;
  --label: #3f4a61;
}
/* ── ACCENT FAMILIES (chosen in ◐ Appearance → Accent; "Auto" = the theme default blue).
   Each accent brings a full coordinated light-mode family — ink accent, background glow,
   tile/pill tints, label ink — so the WHOLE page shifts together, never one element. ── */
:root[data-theme="light"][data-accent="blue"] {
  --accent: #2563eb;
}
:root[data-theme="light"][data-accent="cyan"] {
  --accent: #0e7490;
  --surface-tile: #e9f4f6; --surface-pill: #d9ecef; --pill-border: #aed3da; --label: #33494e;
  --bg: #f7fbfc; --bg-glow: #d3eaef;
}
:root[data-theme="light"][data-accent="violet"] {
  --accent: #6d28d9;
  --surface-tile: #f1eff8; --surface-pill: #e6e2f3; --pill-border: #c8bfe0; --label: #453f61;
  --bg: #fbfafd; --bg-glow: #e4ddf6;
}
:root[data-theme="light"][data-accent="green"] {
  --accent: #15803d;
  --surface-tile: #ebf3eb; --surface-pill: #dcebdc; --pill-border: #b9d2b9; --label: #38493a;
  --bg: #f4faf4; --bg-glow: #cdeacf;
}
:root[data-theme="light"][data-accent="amber"] {
  --accent: #b45309;
  --surface-tile: #f7efdf; --surface-pill: #efe3c9; --pill-border: #d9c8a4; --label: #4a4434;
  --bg: #fdfbf7; --bg-glow: #f7e6cd;
}
/* dark + contrast: chosen accent = the bright palette hue (surfaces stay untouched) */
:root:not([data-theme="light"])[data-accent="blue"]   { --accent: #3b82f6; }
:root:not([data-theme="light"])[data-accent="cyan"]   { --accent: #06b6d4; }
:root:not([data-theme="light"])[data-accent="violet"] { --accent: #8b5cf6; }
:root:not([data-theme="light"])[data-accent="green"]  { --accent: #22c55e; }
:root:not([data-theme="light"])[data-accent="amber"]  { --accent: #f59e0b; }

/* 1. surfaces — charts */
.hh-wrap, .cmdty-balchart, .cmdty-scatterwrap, .dw-projchart, .hlt-hist .hh-wrap,
.cmdty-histcard, .er-chart, .chart-wrap {
  background: var(--surface-chart);
}
/* 1. surfaces — tiles */
.hp-tile, .wc-card, .wp-card, .tdw-day, .hlt-overall, .dv-gauge, .hp-panel, .hp-dpanel,
.dw-mech, .cbg-wrap .hp-tile {
  background: var(--surface-tile);
}
/* 1. surfaces — pills & chips */
.dw-ly, .td-fix, .tx-term, .er-wk, .tdw-tile, .sdr-badge, .hlt-src, .dh-chg, .cbg-chg,
.td-lean, .dt-navb, .rs-cmp-chip, .econ-tg, .cmdty-mtbtn {
  background: var(--surface-pill);
  border-color: var(--pill-border);
}
:root[data-theme="light"] .tdw-tile { background: var(--surface-chart); }  /* week tiles sit ON tinted day columns */

/* 2. labels — bold, darker ink in light mode */
:root[data-theme="light"] .hp-lbl, :root[data-theme="light"] .wc-l,
:root[data-theme="light"] .tx-h, :root[data-theme="light"] .td-fixlbl,
:root[data-theme="light"] .tdw-head, :root[data-theme="light"] .wc-usd-h,
:root[data-theme="light"] .dv-clabel, :root[data-theme="light"] .wp-row > b,
:root[data-theme="light"] .er-wklabel, :root[data-theme="light"] .td-nextlbl,
:root[data-theme="light"] .hh-minihead b, :root[data-theme="light"] .dh-h2,
:root[data-theme="light"] .hlt-olabel, :root[data-theme="light"] .scr-head,
:root[data-theme="light"] .dw-pk, :root[data-theme="light"] .cbg-bar span,
:root[data-theme="light"] .econ-cat-name, :root[data-theme="light"] .panel-head h3 {
  font-weight: 700;
  color: var(--label);
}

/* 3. dots & swatches — darker + edged so they hold on light surfaces */
:root[data-theme="light"] .ev-dot, :root[data-theme="light"] .td-dot,
:root[data-theme="light"] .rel-dot, :root[data-theme="light"] .tab-dot,
:root[data-theme="light"] .hlt-fdot, :root[data-theme="light"] .dw-legend i,
:root[data-theme="light"] .hh-chip, :root[data-theme="light"] .dh-seg,
:root[data-theme="light"] .dh-legend i {
  filter: brightness(.78) saturate(1.35);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
}

/* ── HEADER CONSISTENCY RULE (light theme): section headers are ONE ink color across every
   page — the per-tab accent stays on dots/underlines/chips, never on the header font. ── */
:root[data-theme="light"] .panel-head h3,
:root[data-theme="light"] .fed-sec-h h2,
:root[data-theme="light"] .gtm-sec-head h4,
:root[data-theme="light"] .bs-panel .panel-head h3,
:root[data-theme="light"] .stir-panel .panel-head h3,
:root[data-theme="light"] .sdr-panel .panel-head h3,
:root[data-theme="light"] .cmdty-panel .panel-head h3 {
  color: var(--label);
}

/* ── LIGHT BACKGROUND: soft centered glow on a near-white page (per reference) ── */
:root[data-theme="light"] { --bg: #fafbfd; --bg-glow: #d9e8fc; }
:root[data-theme="light"] body {
  background: radial-gradient(1100px 640px at 50% 38%, var(--bg-glow) 0%, var(--bg) 72%);
  background-attachment: fixed;
}
/* ── CHART BACKGROUND (light): the soft zone-wash the health chart wears — mint top fading
   through white to blush — applied to every chart surface via the --surface-chart token.
   Deliberately the SAME across all accent families: it encodes good→bad zones, not theme. ── */
:root[data-theme="light"] {
  --surface-chart: linear-gradient(180deg, #f1faf4 0%, #ffffff 44%, #fdf3f2 100%);
}

/* ── ACCENT COHERENCE RULE: ONE accent hue everywhere.
   In light mode ALWAYS (Auto = the ink blue) — per-tab accents are what made light feel
   incoherent. In dark/contrast, only once an accent is explicitly chosen; Auto keeps the
   classic per-tab hues there. !important is required: JS sets --tf-accent inline per tab,
   and only an !important declaration outranks an inline style. Data marks (chart lines,
   composition bars) keep their own semantic colors — this governs UI accents only. ── */
:root[data-theme="light"] { --tf-accent: var(--accent) !important; }
:root[data-accent]        { --tf-accent: var(--accent) !important; }

/* Part 2 — elements that carry their OWN inline --tf-accent (nav tabs, group chips,
   per-section panels, category buttons) escape the root rule, because an element's inline
   style beats any inherited value. Re-assert at element level with !important (author
   !important beats inline). Data encodings — .aim-layer supply-chain colors, chart series,
   composition bars — are deliberately NOT listed and keep their own hues. */
:root[data-theme="light"] .tab, :root[data-accent] .tab,
:root[data-theme="light"] .navg, :root[data-accent] .navg,
:root[data-theme="light"] .aim-wrap, :root[data-accent] .aim-wrap,
:root[data-theme="light"] .cmdty-panel, :root[data-accent] .cmdty-panel,
:root[data-theme="light"] .dt-gridpanel, :root[data-accent] .dt-gridpanel,
:root[data-theme="light"] .dt-navb, :root[data-accent] .dt-navb,
:root[data-theme="light"] .econ-cat, :root[data-accent] .econ-cat {
  --tf-accent: var(--accent) !important;
}
:root[data-theme="light"] .tab-dot, :root[data-accent] .tab-dot {
  background: var(--accent) !important;
}
:root[data-theme="light"] .cmdty-mtbtn, :root[data-accent] .cmdty-mtbtn {
  --m: var(--accent) !important;
}
:root[data-theme="light"] .sc-card, :root[data-accent] .sc-card,
:root[data-theme="light"] .frag-blockcard, :root[data-accent] .frag-blockcard {
  --acc: var(--accent) !important;
}

/* ── The money ring (Capital tab): area-true 7-year capital-allocation rings ── */
.mring-main { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.mring-feat { flex: 0 0 auto; }
.mring-side { flex: 1 1 300px; min-width: 260px; }
.mr-svg .mr-seg { stroke: var(--panel, #141a2e); stroke-width: 1; }
.mr-svg .mr-seg:hover { opacity: .82; }
.mr-core { fill: var(--muted); opacity: .55; }
.mr-yr { font-size: 11px; font-weight: 700; fill: var(--muted); }
.mr-yr.on { fill: var(--text); }
.mr-yv { font-size: 10px; fill: var(--muted); }
.mr-yh { font-size: 13px; color: var(--text); margin-bottom: 8px; }
.mr-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 14px; }
.mr-leg-g { margin-bottom: 6px; break-inside: avoid; }
.mr-leg-gh { display: block; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--label, var(--muted)); margin-bottom: 2px; }
.mr-leg-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); padding: 1px 0; }
.mr-leg-row i { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.mr-leg-row b { color: var(--text); font-weight: 600; }
.mr-leg-s { margin-left: auto; font-size: 10.5px; color: var(--muted); }
.mr-res { margin-top: 10px; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.mr-res-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); opacity: .55; flex: 0 0 auto; }
.mr-res b { color: var(--text); }
.mr-wraps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 2px; font-size: 11px; color: var(--muted); }
.mr-wraps-h { font-weight: 700; color: var(--label, var(--muted)); }
.mr-wrap-chip { background: var(--surface-pill, var(--chip-bg)); border: 1px solid var(--pill-border, var(--border)); border-radius: 999px; padding: 2px 9px; }
.mr-wrap-chip b { color: var(--text); }
.mr-wraps-note { font-size: 10px; opacity: .8; }
.mr-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--row-border, var(--border)); }
.mr-small { background: none; border: none; padding: 2px; cursor: pointer; border-radius: 8px; }
.mr-small.on, .mr-small:hover { background: var(--surface-tile, var(--panel-2)); }
:root[data-theme="light"] .mr-svg .mr-seg { stroke: #ffffff; }
.mr-leg-split { font-size: 10px; margin-left: 6px; opacity: .85; }
.mr-leg-split i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 3px; vertical-align: -1px; }
.mr-derivs { border-top: 1px dashed var(--row-border, var(--border)); padding-top: 10px; }
.mr-dv-arr { color: var(--muted); font-size: 12px; }
.mr-og-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 880px) { .mr-og-grid { grid-template-columns: 1fr; } }
.mr-og-col { display: flex; flex-direction: column; gap: 14px; }
.mr-og-card { background: var(--surface-tile, var(--panel-2)); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.mr-og-h { font-size: 12px; font-weight: 700; color: var(--label, var(--text)); margin-bottom: 9px; }
.mr-og-sub { font-weight: 400; color: var(--muted); font-size: 10.5px; }
.mr-og-verdict { margin-top: 10px; font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--row-border, var(--border)); padding-top: 8px; }
.mr-og-verdict b { color: var(--text); }
.mr-bl-row { font-size: 11.5px; color: var(--muted); padding: 4px 0; line-height: 1.5; }
.mr-bl-row b { color: var(--text); font-weight: 600; }
.mr-bl-row b.neg, .mr-og-card .neg { color: var(--down, #ef4444); }
.mr-seg.mr-gap { fill-opacity: .35; stroke-dasharray: 3 2; }
.mr-leg-split.mr-below { color: var(--down, #ef4444); }
.mr-era-chip { display: inline-block; background: var(--surface-pill, var(--chip-bg)); border: 1px solid var(--pill-border, var(--border)); border-radius: 6px; padding: 1px 6px; margin: 2px 2px 0 0; font-size: 10px; color: var(--muted); }
.mr-era-chip b { color: var(--text); }
.mr-era-chip.on { border-color: var(--accent); color: var(--text); }
.mr-cpo { margin-top: 12px; }
.mr-cpo-svg { width: 100%; height: auto; display: block; background: var(--surface-chart, transparent); border: 1px solid var(--border); border-radius: 8px; }
.mr-cpo-bar { cursor: pointer; }
.mr-cpo-rect { fill: #3b82f6; opacity: .5; }
.mr-cpo-bar.on .mr-cpo-rect, .mr-cpo-bar:hover .mr-cpo-rect { opacity: 1; }
.mr-cpo-v { font-size: 9.5px; fill: var(--muted); font-weight: 700; }
.mr-cpo-bar.on .mr-cpo-v { fill: var(--text); }
.mr-cpo-x { font-size: 9px; fill: var(--muted); }
.mr-cpo-axis { stroke: var(--axis, var(--border)); }
.mr-cpo-norm { stroke: var(--muted); stroke-dasharray: 4 3; opacity: .65; }
.mr-cpo-normlbl { font-size: 9px; fill: var(--muted); }

/* ── The Treasury–Fed circle (Fed tab) ── */
.ftc-svg { width: 100%; height: auto; display: block; background: var(--surface-chart, transparent); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; }
.ftc-node { fill: var(--surface-tile, var(--panel-2)); stroke: var(--border); }
.ftc-nname { font-size: 12px; font-weight: 700; fill: var(--label, var(--text)); letter-spacing: .04em; }
.ftc-nbig { font-size: 12.5px; font-weight: 700; fill: var(--text); }
.ftc-nsub { font-size: 10px; fill: var(--muted); }
.ftc-arrow path { fill: none; stroke-width: 1.6; }
.ftc-ahead { fill: var(--muted); }
.ftc-out path { stroke: #3b82f6; }
.ftc-hold path { stroke: #8b5cf6; }
.ftc-leak path { stroke: #f59e0b; }
.ftc-stop path { stroke: var(--down, #ef4444); stroke-dasharray: 6 4; }
.ftc-tga path { stroke: #06b6d4; stroke-dasharray: 2 3; }
.ftc-albl { font-size: 10.5px; font-weight: 700; fill: var(--label, var(--text)); }
.ftc-aval { font-size: 10.5px; fill: var(--muted); }
.ftc-stop .ftc-albl, .ftc-stop .ftc-aval { fill: var(--down, #ef4444); }
.ftc-grid { margin-top: 2px; }
.ftc-bs { background: var(--surface-tile, var(--panel-2)); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.ftc-bscols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.ftc-bsh { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--label, var(--muted)); margin-bottom: 4px; }
.ftc-bsrow { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); padding: 2px 4px; border-radius: 5px; }
.ftc-bsrow b { color: var(--text); font-weight: 600; }
.ftc-link-ust { background: color-mix(in srgb, #8b5cf6 14%, transparent); }
.ftc-link-tga { background: color-mix(in srgb, #06b6d4 14%, transparent); }
.ftc-linkdot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; vertical-align: -1px; }
span.ftc-linkdot.ftc-link-ust { background: #8b5cf6; }
span.ftc-linkdot.ftc-link-tga { background: #06b6d4; }
.ftc-def { margin-top: 9px; font-size: 11px; color: var(--muted); border-top: 1px dashed var(--row-border, var(--border)); padding-top: 7px; }
.ftc-def b.neg { color: var(--down, #ef4444); }
.ftc-inc { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.ftc-yr { background: var(--surface-pill, var(--chip-bg)); border: 1px solid var(--pill-border, var(--border)); border-radius: 6px; padding: 2px 7px; font-size: 10.5px; color: var(--muted); }
.ftc-yr.pos b { color: var(--up, #22c55e); }
.ftc-yr.neg b { color: var(--down, #ef4444); }
.ftc-verdict { margin-top: 12px; }

/* ── AI debt & the long end (AI Mania) ── */
.aid-panel .panel-head { align-items: center; }
.aid-grade { background: color-mix(in srgb, #f59e0b 18%, transparent); border: 1px solid #f59e0b; color: var(--text); border-radius: 999px; padding: 2px 10px; font-size: 10.5px; font-weight: 700; }
.aid-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; font-size: 11px; color: var(--muted); }
.aid-svg { width: 100%; height: auto; display: block; background: var(--surface-chart, transparent); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; }
.aid-line { fill: none; stroke: #3b82f6; stroke-width: 1.8; }
.aid-wave { fill: color-mix(in srgb, #f59e0b 10%, transparent); }
.aid-wavelbl { font-size: 10.5px; font-weight: 700; fill: var(--label, var(--muted)); }
.aid-deal circle { fill: #ec4899; stroke: var(--panel, #141a2e); stroke-width: 1.5; }
:root[data-theme="light"] .aid-deal circle { stroke: #ffffff; }
.aid-table td, .aid-table th { font-size: 11px; }
.aid-issue { margin: 4px 0 12px; }
.aid-bar { display: flex; height: 26px; border-radius: 7px; overflow: hidden; border: 1px solid var(--border); font-size: 10.5px; font-weight: 700; margin: 6px 0; }
.aid-bar-done { background: color-mix(in srgb, #ec4899 30%, var(--panel-2)); color: var(--text); display: flex; align-items: center; padding: 0 10px; white-space: nowrap; }
.aid-bar-left { background: var(--surface-pill, var(--chip-bg)); color: var(--muted); display: flex; align-items: center; padding: 0 10px; flex: 1; white-space: nowrap; }

/* ── What moved the curve (yield attribution) ── */
.yat-row { display: flex; align-items: center; gap: 12px; padding: 5px 2px; border-bottom: 1px solid var(--row-border, var(--border)); }
.yat-t { width: 32px; font-weight: 700; color: var(--label, var(--text)); font-size: 12px; }
.yat-d { width: 62px; font-weight: 700; font-size: 13px; }
.yat-d.neg { color: var(--down, #ef4444); }
.yat-d.pos { color: var(--up, #22c55e); }
.yat-segs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); }
.yat-seg { display: inline-flex; align-items: center; gap: 4px; }
.yat-seg i { display: inline-block; height: 9px; border-radius: 2px; }
.yat-real i { background: #3b82f6; }
.yat-be i { background: #f59e0b; }
.yat-tp i { background: #8b5cf6; }
.yat-path i { background: #06b6d4; }
.yat-note { font-size: 10px; opacity: .85; }
.yat-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 10px; color: var(--muted); }

/* ── Morning Brief podcast card (Today tab) ── */
.bc-panel { padding: 10px 16px; }
.bc-row { display: flex; align-items: center; gap: 14px; }
.bc-mic { font-size: 22px; }
.bc-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.bc-title { font-size: 12px; font-weight: 700; color: var(--label, var(--text)); }
.bc-audio { width: 100%; max-width: 560px; height: 34px; }
.bc-feed { font-size: 11px; color: var(--accent); white-space: nowrap; text-decoration: none; border: 1px solid var(--pill-border, var(--border)); border-radius: 999px; padding: 3px 10px; background: var(--surface-pill, var(--chip-bg)); }
.capex-cotbl-wrap { max-height: 520px; overflow-y: auto; }
.capex-cotbl td, .capex-cotbl th { font-size: 11px; white-space: nowrap; }
.capex-cotbl thead th { position: sticky; top: 0; background: var(--panel, #141a2e); z-index: 1; }

/* ── Dashboard: the frosted-glass summary page (theme per the reference video) ──
   Glass = translucent card over a rich ambient backdrop, blur-through, thin light border,
   top inner highlight. The backdrop paints its own bokeh glows in BOTH themes. */
.dash-bg { position: relative; margin: -8px -10px 0; padding: 26px 22px 30px; min-height: 78vh; border-radius: 14px;
  background:
    radial-gradient(760px 420px at 12% 8%, rgba(45, 212, 191, .16), transparent 60%),
    radial-gradient(820px 480px at 88% 14%, rgba(139, 92, 246, .15), transparent 60%),
    radial-gradient(700px 420px at 55% 96%, rgba(244, 114, 182, .12), transparent 62%),
    linear-gradient(165deg, #0a0f1e 0%, #0d1424 48%, #101a30 100%); }
:root[data-theme="light"] .dash-bg {
  background:
    radial-gradient(760px 420px at 12% 8%, rgba(13, 148, 136, .14), transparent 60%),
    radial-gradient(820px 480px at 88% 14%, rgba(109, 40, 217, .12), transparent 60%),
    radial-gradient(700px 420px at 55% 96%, rgba(190, 24, 93, .10), transparent 62%),
    linear-gradient(165deg, #eef2fb 0%, #e7edf9 48%, #e3ebf8 100%); }
.dash-hero { margin: 2px 4px 18px; }
.dash-hero h2 { color: #f1f5fb; font-size: 22px; letter-spacing: .01em; margin: 0; }
.dash-hero-sub { color: rgba(226, 232, 244, .62); font-size: 12px; }
:root[data-theme="light"] .dash-hero h2 { color: #16223a; }
:root[data-theme="light"] .dash-hero-sub { color: rgba(22, 34, 58, .6); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 14px; }
.dash-tile { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
  padding: 15px 16px 13px; border-radius: 16px; font: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 34px -18px rgba(0, 0, 0, .55);
  backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25);
  color: #eef2f9; transition: transform .14s ease, border-color .14s ease; }
.dash-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--dacc) 55%, rgba(255,255,255,.2)); }
:root[data-theme="light"] .dash-tile {
  background: linear-gradient(160deg, rgba(255, 255, 255, .66), rgba(255, 255, 255, .42));
  border: 1px solid rgba(255, 255, 255, .75); color: #17233c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 14px 34px -20px rgba(30, 45, 80, .35); }
.dash-t-head { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: rgba(226, 232, 244, .75); }
:root[data-theme="light"] .dash-t-head { color: rgba(23, 35, 60, .66); }
.dash-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dacc); box-shadow: 0 0 10px var(--dacc); }
.dash-t-val { font-size: 26px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 8px;
  font-variant-numeric: tabular-nums; }
.dash-delta { font-size: 12px; font-style: normal; font-weight: 700; }
.dash-delta.pos { color: #4ade80; } .dash-delta.neg { color: #f87171; }
:root[data-theme="light"] .dash-delta.pos { color: #15803d; } :root[data-theme="light"] .dash-delta.neg { color: #dc2626; }
.dash-t-sub { font-size: 11px; color: rgba(226, 232, 244, .6); }
.dash-t-read { font-size: 11.5px; line-height: 1.45; color: rgba(226, 232, 244, .82); min-height: 30px; }
:root[data-theme="light"] .dash-t-sub { color: rgba(23, 35, 60, .55); }
:root[data-theme="light"] .dash-t-read { color: rgba(23, 35, 60, .8); }
.dash-t-go { align-self: flex-end; font-size: 10.5px; font-weight: 700; color: var(--dacc); opacity: 0; transition: opacity .14s; }
.dash-tile:hover .dash-t-go { opacity: 1; }
.dash-note { margin: 16px 6px 0; font-size: 11px; color: rgba(226, 232, 244, .5); }
:root[data-theme="light"] .dash-note { color: rgba(23, 35, 60, .5); }
.dash-snaptile { cursor: pointer; }
.dash-rows { display: flex; flex-direction: column; }
.dash-r { display: flex; align-items: baseline; gap: 8px; padding: 3.5px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 12px; }
:root[data-theme="light"] .dash-r { border-bottom-color: rgba(23,35,60,.08); }
.dash-r:last-child { border-bottom: none; }
.dash-rl { color: rgba(226,232,244,.68); min-width: 84px; }
:root[data-theme="light"] .dash-rl { color: rgba(23,35,60,.6); }
.dash-r b { font-variant-numeric: tabular-nums; margin-left: auto; }
.dash-chg { font-size: 11px; font-weight: 700; min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.dash-chg.pos { color: #4ade80; } .dash-chg.neg { color: #f87171; }
:root[data-theme="light"] .dash-chg.pos { color: #15803d; } :root[data-theme="light"] .dash-chg.neg { color: #dc2626; }
.dash-asof { font-size: 9.5px; color: rgba(226,232,244,.4); }
:root[data-theme="light"] .dash-asof { color: rgba(23,35,60,.4); }
.dash-time { min-width: 64px; font-size: 10.5px; }
.dash-ev { flex: 1; font-size: 11.5px; }
.dash-done { color: #4ade80; font-size: 11px; }
.dash-news { flex: 1; font-size: 11.5px; color: inherit; text-decoration: none; }
.dash-news:hover { text-decoration: underline; }
.dash-hero2 { margin-top: 22px; }
.dash-hero2 h2 { font-size: 16px; }
.dash-grid { grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 12px; }
.dash-tile { padding: 12px 14px 11px; }
.dash-wide { grid-column: span 2; }
@media (max-width: 560px) { .dash-wide { grid-column: span 1; } }
.dash-sep { margin: 5px 0 2px; font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgba(226,232,244,.42); border-top: 1px dashed rgba(255,255,255,.1); padding-top: 5px; }
:root[data-theme="light"] .dash-sep { color: rgba(23,35,60,.42); border-top-color: rgba(23,35,60,.12); }
.dash-lens .dash-t-val { font-size: 20px; }
.dash-lens .dash-t-read { min-height: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* snapshot tiles hosted on the Today tab (no dash-bg backdrop): slightly stronger card fill */
.dash-ontoday { margin-bottom: 14px; }
.dash-ontoday .dash-tile { background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.03)); }
:root[data-theme="light"] .dash-ontoday .dash-tile { background: linear-gradient(160deg, rgba(255,255,255,.8), rgba(255,255,255,.55)); border-color: rgba(120,140,180,.28); }
/* compact Today header rows (explain · brief · fixings · live yields) */
.td-toprows { padding: 8px 14px; }
.td-toprows .td-fixes { padding: 4px 0; border-bottom: 1px solid var(--row-border, var(--border)); }
.td-toprows .td-fixes:last-child { border-bottom: none; }
.tt-explain { font-size: 11.5px; color: var(--muted); }
.tt-briefname { font-size: 11.5px; font-weight: 700; color: var(--label, var(--text)); white-space: nowrap; }
.tt-audio { height: 28px; max-width: 420px; flex: 1; min-width: 180px; }
/* 2y close chip: visually distinct from the live tenors */
.dw-ly.close { opacity: .85; border-style: dashed; }
.tt-grid { display: grid; grid-template-columns: minmax(280px, 2fr) minmax(340px, 3fr); gap: 2px 26px; align-items: start; }
@media (max-width: 940px) { .tt-grid { grid-template-columns: 1fr; } }
.tt-col .td-fixes:last-child { border-bottom: none; }
/* compact lens minis inside the snapshot's wide "Lenses" card */
.dlm-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

/* Today: (top stories + schedule) stacked left, lens card spanning the full height right */
.td-mainrow { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); gap: 14px; align-items: stretch; margin-bottom: 22px; }
.td-maincol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.td-maincol .td-panel { flex: 1; }
.td-mainrow .td-panel { margin-bottom: 0; min-width: 0; }
.td-lenscard { min-width: 0; display: flex; flex-direction: column; }
/* tall lens card = SMALL chip tiles packed from the top at natural height — never stretched;
   unfilled space below is headroom for more stats */
.td-lenscard .dlm-tall { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 7px; align-content: start; flex: 1; margin-top: 8px; }
.dlm-tall .dash-lens-mini { width: 100%; padding: 6px 9px; border-radius: 9px; }
.dlm-tall .dlm-v { font-size: 12.5px; }
.dlm-tall .dlm-h { font-size: 8.5px; }
.dlm-tall .dlm-s { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.td-maincol .dash-ontoday { margin-bottom: 0; }
.dlm-s { font-size: 9.5px; color: rgba(226,232,244,.5); line-height: 1.25; }
:root[data-theme="light"] .dlm-s { color: rgba(23,35,60,.5); }
@media (max-width: 980px) { .td-mainrow { grid-template-columns: 1fr; } .td-mainrow .td-panel { margin-bottom: 0; } }
.dash-lens-mini { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; cursor: pointer;
  font: inherit; text-align: left; padding: 7px 11px; border-radius: 11px;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.13); color: inherit; transition: border-color .12s; }
.dash-lens-mini:hover { border-color: color-mix(in srgb, var(--dacc) 55%, rgba(255,255,255,.2)); }
:root[data-theme="light"] .dash-lens-mini { background: linear-gradient(160deg, rgba(255,255,255,.8), rgba(255,255,255,.55)); border-color: rgba(120,140,180,.28); }
.dlm-h { display: flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgba(226,232,244,.7); }
:root[data-theme="light"] .dlm-h { color: rgba(23,35,60,.62); }
.dlm-v { font-size: 14px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.dlm-v .dash-delta { font-size: 10.5px; }
/* row overflow fix: values can never overshoot the tile */
.dash-tile, .dash-rows { min-width: 0; }
.dash-r { flex-wrap: nowrap; min-width: 0; }
.dash-r .dash-rl { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-r b { flex-shrink: 0; }
.dash-chg { min-width: 0; flex-shrink: 0; }

/* ── World calendar ── */
.wcal-ev { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; padding: 3px 2px; border-bottom: 1px solid var(--row-border, var(--border)); }
.wcal-ev:last-child { border-bottom: none; }
.wcal-ev.cb .wcal-t { font-weight: 700; color: var(--label, var(--text)); }
.wcal-flag { flex: 0 0 auto; }
.wcal-approx { font-style: normal; color: var(--muted); font-weight: 700; }
.wcal-none { font-size: 11px; padding: 4px 2px; }
.wcal-cblist { display: flex; flex-direction: column; }
.wcal-cbrow { display: flex; align-items: baseline; gap: 10px; padding: 5px 2px; border-bottom: 1px solid var(--row-border, var(--border)); font-size: 12px; }
.wcal-cbrow:last-child { border-bottom: none; }
.wcal-cbrow b { color: var(--label, var(--text)); }
.wcal-date { margin-left: auto; font-variant-numeric: tabular-nums; }
.wcal-in { min-width: 52px; text-align: right; font-size: 11px; }

/* bank anatomy (Fed tab) */
.ba-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 4px 0 12px; border-bottom: 1px solid var(--row-border, var(--border)); margin-bottom: 12px; }
.ba-hero-t { font-size: 14px; font-weight: 600; }
.ba-hero-v { font-size: 22px; color: #c9a227; font-variant-numeric: tabular-nums; }
.ba-hero-s { flex-basis: 100%; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.ba-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ba-col { min-width: 0; }
.ba-col h4 { margin: 0 0 8px; font-size: 13px; }
.ba-sub { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.ba-row { display: grid; grid-template-columns: minmax(120px, 38%) 1fr 64px; gap: 8px; align-items: center; padding: 3px 0; min-width: 0; }
.ba-l { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ba-badge { font-style: normal; font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #c9a227; border: 1px solid rgba(201,162,39,.5); border-radius: 5px; padding: 1px 4px; margin-left: 6px; }
.ba-track { height: 10px; border-radius: 5px; background: var(--row-border, rgba(128,140,160,.15)); overflow: hidden; min-width: 0; }
.ba-fill { display: block; height: 100%; border-radius: 5px; }
.ba-fill.ba-int { background: #14b8a6; }
.ba-fill.ba-non { background: #818cf8; }
.ba-fill.ba-exp { background: #e15759; }
.ba-iorb .ba-fill { background: #c9a227; }
.ba-iorb .ba-l { color: #c9a227; font-weight: 600; }
.ba-v { font-size: 11.5px; text-align: right; font-variant-numeric: tabular-nums; }
.ba-net { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--row-border, var(--border)); font-size: 12.5px; }
.ba-htm { margin-top: 12px; font-size: 11.5px; line-height: 1.5; padding: 9px 11px; border: 1px solid rgba(225,87,89,.35); border-radius: 9px; background: rgba(225,87,89,.07); }
@media (max-width: 860px) { .ba-cols { grid-template-columns: 1fr; } }

/* bank anatomy drill-downs */
.ba-row.has-drill { cursor: pointer; }
.ba-row.has-drill:hover .ba-l { text-decoration: underline dotted; text-underline-offset: 3px; }
.ba-chev { font-style: normal; display: inline-block; width: 12px; color: var(--muted); transition: transform .15s; }
.ba-row.open .ba-chev { transform: rotate(90deg); }
.ba-drill { margin: 2px 0 6px 20px; padding: 7px 10px; border-left: 2px solid var(--row-border, var(--border)); font-size: 11px; line-height: 1.5; }
.ba-dl { display: flex; justify-content: space-between; gap: 10px; padding: 1.5px 0; }
.ba-dl span { min-width: 0; }
.ba-dl b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ba-iorb + .ba-drill { border-left-color: rgba(201,162,39,.6); }
