/* ============================================================
   SPY 择时 Tab · 样式
   ============================================================ */

.spy-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 0;
}

.spy-charts-wrap {
  position: relative;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  flex: 1;
  min-height: 0;
  padding: 10px;
  gap: 8px;
}

.spy-chart {
  min-height: 0;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 0;
  position: relative;
  background: var(--bg-surface);
  overflow: hidden;
  isolation: isolate;
}

.spy-chart > div:not(.spy-chart-value):not(.vix-zone-overlay):not(.vxn-spread-badge) {
  max-height: 100%;
  overflow: hidden;
}

.spy-chart-value {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 5;
  pointer-events: none;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(13, 17, 23, 0.82);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  border: 1px solid var(--border);
}

.spy-chart-value.hidden {
  display: none;
}

/* VXN-VIX Spread 角标 */
.vxn-spread-badge {
  position: absolute;
  top: 28px;
  left: 12px;
  z-index: 6;
  pointer-events: none;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
}
.vxn-spread-badge.hidden { display: none; }
.vxn-spread-badge.spread-low      { background: rgba(63,185,80,0.15); color: #3fb950; border-color: rgba(63,185,80,0.35); }
.vxn-spread-badge.spread-normal   { background: rgba(13,17,23,0.82);  color: #8b949e; border-color: var(--border); }
.vxn-spread-badge.spread-elevated { background: rgba(242,204,96,0.12); color: #f2cc60; border-color: rgba(242,204,96,0.3); }
.vxn-spread-badge.spread-extreme  { background: rgba(248,81,73,0.12);  color: #f85149; border-color: rgba(248,81,73,0.3); }

.spy-chart:last-child {
  margin-bottom: 0;
}

.vix-zone-overlay {
  position: absolute;
  inset: 0 70px 0 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  border-radius: 4px 0 0 4px;
}

.vix-zone-band {
  position: absolute;
  left: 0;
  right: 0;
}

.vix-zone-band.calm {
  background: rgba(35, 134, 54, 0.10);
}

.vix-zone-band.normal {
  background: rgba(88, 166, 255, 0.10);
}

.vix-zone-band.warning {
  background: rgba(242, 204, 96, 0.11);
}

.vix-zone-band.panic {
  background: rgba(248, 81, 73, 0.12);
}

.fg-zone-overlay {
  position: absolute;
  inset: 0 70px 0 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  border-radius: 4px 0 0 4px;
}

.fg-zone-band {
  position: absolute;
  left: 0;
  right: 0;
}

.fg-zone-band.extreme-fear {
  background: rgba(248, 81, 73, 0.12);
}

.fg-zone-band.extreme-greed {
  background: rgba(63, 185, 80, 0.12);
}

.spy-sidebar {
  width: 280px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: var(--bg-base);
}

.spy-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.spy-card h3 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

/* 市场状态卡片 */
.indicator-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.indicator-item label {
  font-size: 12px;
  color: var(--text-muted);
}

.vix-regime,
.vvix-regime,
.spy-extra-metric {
  font-weight: 600;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bg-elevated);
}

.spy-extra-metric {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.spy-extra-metric.normal {
  color: var(--signal-high);
}

.spy-extra-metric.risk-on {
  color: var(--signal-high);
}

.spy-extra-metric.neutral {
  color: var(--signal-mid);
}

.spy-extra-metric.bounce {
  color: var(--signal-mid);
}

.spy-extra-metric.watch {
  color: var(--signal-warn);
}

.spy-extra-metric.risk-off {
  color: #fb8500;
}

.spy-extra-metric.high-risk {
  color: #f85149;
}

.spy-extra-metric.panic {
  color: #f85149;
}

.vix-regime.low,
.vvix-regime.low {
  color: var(--signal-high);
}

.vix-regime.normal,
.vvix-regime.normal {
  color: var(--signal-mid);
}

.vix-regime.elevated,
.vvix-regime.elevated {
  color: #fb8500;
}

.vix-regime.panic,
.vvix-regime.panic {
  color: var(--signal-warn);
}

.vix-regime.extreme,
.vvix-regime.extreme {
  color: #f85149;
}

.progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  margin: 8px 0;
  overflow: hidden;
}

.progress-bar .filled {
  height: 100%;
  background: var(--signal-mid);
  transition: width 0.3s ease;
  width: 0%;
}

/* 预测概率卡片 */
.forecast-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  margin-bottom: 8px;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.forecast-ref-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 6px;
  margin: -2px 0 8px 0;
  padding: 0 0 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.forecast-ref-row.hidden {
  display: none;
}

.forecast-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.forecast-row .label,
.forecast-ref-row .label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.forecast-ref-row .label {
  font-size: 10px;
  color: var(--accent-blue);
  font-weight: 700;
}

.forecast-probs {
  display: flex;
  gap: 10px;
  align-items: center;
}

.prob-up,
.prob-down {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.prob-label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.prob-value {
  font-weight: 700;
  font-size: 12px;
  font-family: var(--font-mono);
}

.prob-value.up {
  color: var(--price-up);
}

.prob-value.down {
  color: var(--price-down);
}

.percent {
  font-weight: 700;
  color: var(--signal-mid);
  font-size: 13px;
  text-align: right;
}

.percent.high-conf {
  color: var(--signal-high);
}

.percent.medium-conf {
  color: var(--signal-mid);
}

.percent.low-conf {
  color: var(--signal-warn);
}

.conf {
  font-size: 10px;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bg-elevated);
  min-width: 40px;
  text-align: center;
  font-weight: 500;
}

.conf.conflict {
  color: var(--signal-warn);
  background: rgba(245, 158, 11, 0.16);
}

.calibration-note {
  grid-column: 1 / -1;
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  line-height: 1.35;
}

.calibration-note.hidden {
  display: none;
}

.calibration-note.conflict {
  color: #c4b5fd;
}

.forecast-row.forecast-conflict,
.forecast-ref-row.forecast-conflict {
  background: rgba(124, 58, 237, 0.08);
}

.forecast-ref-row .conf {
  color: var(--accent-blue);
}

.regime-conflict-card {
  margin-top: 0;
  border-color: rgba(88, 166, 255, 0.18);
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.055), rgba(13, 17, 23, 0.12));
}

.regime-conflict-card.conflict {
  border-color: rgba(196, 181, 253, 0.42);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.16), rgba(13, 17, 23, 0.12));
}

.regime-conflict-card.watch {
  border-color: rgba(245, 158, 11, 0.36);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(13, 17, 23, 0.12));
}

.regime-conflict-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.regime-conflict-head span {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
}

.regime-conflict-head b {
  min-width: 42px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-elevated);
  font-size: 10px;
  text-align: center;
}

.regime-conflict-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.regime-conflict-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.regime-conflict-grid div {
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: rgba(13, 17, 23, 0.28);
}

.regime-conflict-grid span {
  display: block;
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
}

.regime-conflict-grid b {
  display: block;
  overflow: hidden;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.regime-conflict-action {
  margin-bottom: 7px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(88, 166, 255, 0.1);
  color: var(--accent-blue);
  font-size: 12px;
  font-weight: 800;
}

.regime-conflict-note {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

.regime-conflict-card .strong {
  color: var(--price-up);
}

.regime-conflict-card .warning {
  color: var(--signal-warn);
}

.regime-conflict-card .danger {
  color: #c4b5fd;
}

.regime-conflict-card .neutral {
  color: var(--text-muted);
}

/* VIX期限结构卡片 */
.ts-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
}

.ts-row.state {
  border-bottom: none;
  margin-top: 4px;
  padding: 6px 0;
  color: var(--signal-mid);
  font-weight: 500;
  font-size: 11px;
}

.ts-row:last-child {
  border-bottom: none;
}

.ts-row span:first-child {
  color: var(--text-muted);
}

.ts-row .value {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 500;
}

#ts-state {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bg-elevated);
}

/* 历史统计卡片 */
.stats-group {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.stats-group.reference {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--signal-mid);
  margin-bottom: 2px;
  display: block;
}

.stat-detail {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

/* 高置信度闪动 */
/* Fear & Greed gauge */
.fear-greed-card {
  min-height: 178px;
}

.fg-gauge {
  position: relative;
  height: 122px;
  margin-top: 4px;
  overflow: hidden;
}

.fg-arc {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 230px;
  height: 115px;
  transform: translateX(-50%);
  border-radius: 230px 230px 0 0;
  background:
    conic-gradient(
      from 270deg at 50% 100%,
      rgba(248, 113, 113, 0.95) 0deg 45deg,
      rgba(252, 165, 165, 0.82) 45deg 81deg,
      rgba(209, 213, 219, 0.78) 81deg 99deg,
      rgba(187, 247, 208, 0.82) 99deg 135deg,
      rgba(74, 222, 128, 0.95) 135deg 180deg,
      transparent 180deg 360deg
    );
}

.fg-arc::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 126px;
  height: 63px;
  transform: translateX(-50%);
  border-radius: 126px 126px 0 0;
  background: var(--bg-surface);
  z-index: 1;
}

.fg-needle {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 3px;
  height: 90px;
  background: #e6edf3;
  border-radius: 999px;
  transform: translateX(-50%) rotate(-90deg);
  transform-origin: 50% 100%;
  transition: transform 0.35s ease;
  z-index: 3;
}

.fg-hub {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #e6edf3;
  box-shadow: 0 0 0 3px rgba(13, 17, 23, 0.65);
  z-index: 4;
}

.fg-score {
  position: absolute;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  z-index: 4;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.fg-caption {
  margin-top: 2px;
  color: var(--text-secondary);
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
}

.fg-tick,
.fg-label {
  position: absolute;
  color: var(--text-muted);
  font-family: var(--font-mono);
  pointer-events: none;
}

.fg-tick {
  top: 98px;
  font-size: 11px;
}

.fg-tick-0 { left: 0; }
.fg-tick-25 { left: 21%; }
.fg-tick-50 { left: 50%; transform: translateX(-50%); }
.fg-tick-75 { right: 21%; }
.fg-tick-100 { right: 0; }

.fg-label {
  z-index: 2;
  font-size: 9px;
  font-weight: 700;
  color: rgba(13, 17, 23, 0.76);
  white-space: nowrap;
}

.fg-label-extreme-fear {
  left: 14px;
  bottom: 45px;
  transform: rotate(-31deg);
}

.fg-label-fear {
  left: 61px;
  top: 27px;
  transform: rotate(-13deg);
}

.fg-label-neutral {
  left: 50%;
  top: 15px;
  transform: translateX(-50%);
}

.fg-label-greed {
  right: 60px;
  top: 27px;
  transform: rotate(13deg);
}

.fg-label-extreme-greed {
  right: 14px;
  bottom: 45px;
  transform: rotate(31deg);
}

@keyframes spy-flash {
  0% { background: var(--bg-surface); }
  50% { background: rgba(63, 185, 80, 0.1); }
  100% { background: var(--bg-surface); }
}

.spy-sidebar.flash {
  animation: spy-flash 0.5s ease-in-out;
}

/* ── VXN-VIX Spread 卡片 ──────────────────────────── */
.spread-card { padding: 10px 12px; }

.spread-row-vals {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.spread-val-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.spread-val-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.spread-vxn-val { font-size: 14px; font-weight: 700; color: #4fc3f7; }
.spread-vix-val { font-size: 14px; font-weight: 700; color: #ff6f00; }
.spread-minus   { font-size: 16px; color: var(--text-muted); }

/* 进度条 */
.spread-gauge-wrap  { margin-bottom: 6px; }
.spread-gauge-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  overflow: visible;
  display: flex;
}
.spread-gauge-fill { height: 100%; }
.spread-gauge-fill:first-child { border-radius: 4px 0 0 4px; }
.spread-gauge-fill:nth-child(4) { border-radius: 0 4px 4px 0; }
.spread-zone-low    { background: rgba(63,185,80,0.55); }
.spread-zone-normal { background: rgba(139,148,158,0.4); }
.spread-zone-elev   { background: rgba(242,204,96,0.55); }
.spread-zone-ext    { background: rgba(248,81,73,0.55); }

.spread-gauge-marker {
  position: absolute;
  top: -3px;
  width: 3px;
  height: 14px;
  background: #fff;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 4px rgba(0,0,0,0.6);
  transition: left 0.4s ease;
  z-index: 2;
}
.spread-gauge-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  font-size: 9px;
  color: var(--text-muted);
}

/* 当前值 + 制度标签 */
.spread-current-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 4px;
}
.spread-number {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
}
.spread-regime-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid transparent;
}

/* 制度颜色 */
.spread-number.regime-low,
.spread-regime-badge.regime-low    { color: #3fb950; border-color: rgba(63,185,80,0.4); background: rgba(63,185,80,0.1); }
.spread-number.regime-normal       { color: var(--text-secondary); }
.spread-regime-badge.regime-normal { color: var(--text-muted); border-color: var(--border); background: transparent; }
.spread-number.regime-elevated,
.spread-regime-badge.regime-elevated { color: #f2cc60; border-color: rgba(242,204,96,0.4); background: rgba(242,204,96,0.1); }
.spread-number.regime-extreme,
.spread-regime-badge.regime-extreme  { color: #f85149; border-color: rgba(248,81,73,0.4); background: rgba(248,81,73,0.1); }

/* 分位 + 解读 */
.spread-pctile-row {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.spread-pctile-row span { color: var(--text-secondary); font-weight: 600; }
.spread-explain {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 6px;
  margin-top: 2px;
}

/* 响应式 */
@media (max-width: 1400px) {
  .spy-sidebar {
    width: 240px;
  }
}

@media (max-width: 1200px) {
  .spy-sidebar {
    width: 220px;
  }

  .spy-card {
    padding: 10px;
  }
}

/* SPY / QQQ 切换按钮 */
.spy-ticker-tabs {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 5px;
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid var(--border);
}

.spy-ticker-btn {
  padding: 3px 12px;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.15s;
}

.spy-ticker-btn.active {
  background: rgba(88, 166, 255, 0.18);
  color: #58a6ff;
}

.spy-ticker-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* QQQ 预测卡片标题带紫色标记 */
.spy-card.qqq-forecast h3 {
  color: #bc8cff;
}

.qqq-ai-leadership-card { padding: 12px 14px; }
.qqq-ai-title { display:flex; justify-content:space-between; align-items:center; font-size:12px; color:var(--text-muted); }
.qqq-ai-title b { font-size:11px; }
.qqq-ai-score { margin:8px 0; font-size:20px; font-weight:700; color:var(--text-primary); }
.qqq-ai-grid { display:grid; gap:6px; }
.qqq-ai-grid div { display:flex; justify-content:space-between; gap:8px; font-size:11px; }
.qqq-ai-grid span { color:var(--text-muted); }
.qqq-ai-grid b { text-align:right; }
.qqq-ai-status { margin-top:9px; font-size:11px; font-weight:600; }
.qqq-ai-leadership-card .strong { color:#3fb950; }
.qqq-ai-leadership-card .positive { color:#56d4dd; }
.qqq-ai-leadership-card .warning { color:#d29922; }
.qqq-ai-leadership-card .danger { color:#f85149; }
.qqq-ai-leadership-card .neutral { color:var(--text-muted); }
.spy-card.qqq-forecast {
  border-color: rgba(188, 140, 255, 0.25);
}

/* ============================================================
   预测曲线 Tab
   ============================================================ */

.forecast-curve-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--bg-base);
}

.forecast-curve-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 42px minmax(220px, 2.2fr) minmax(170px, 1.4fr) minmax(150px, 1fr);
  gap: 8px;
  padding: 10px;
}

.forecast-curve-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  padding: 0 12px;
}

.forecast-curve-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}

.forecast-curve-symbol {
  font-family: var(--font-mono);
  color: #e6edf3;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  padding: 3px 8px;
}

.forecast-curve-ranges {
  display: flex;
  gap: 4px;
}

.fc-range-btn {
  height: 26px;
  min-width: 38px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.fc-range-btn.active,
.fc-range-btn:hover {
  color: #58a6ff;
  border-color: rgba(88, 166, 255, 0.45);
  background: rgba(88, 166, 255, 0.12);
}

.forecast-curve-chart {
  min-height: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
}

.fc-chart-value {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 5;
  pointer-events: none;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(13, 17, 23, 0.84);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.fc-chart-value.hidden {
  display: none;
}

.fc-legend {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  max-width: 70%;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(13, 17, 23, 0.78);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.2;
}

.fc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fc-legend-swatch {
  width: 18px;
  height: 2px;
  background: var(--legend-color);
}

.fc-legend-swatch.dashed {
  background: repeating-linear-gradient(
    to right,
    var(--legend-color) 0,
    var(--legend-color) 5px,
    transparent 5px,
    transparent 8px
  );
}

.fc-legend-swatch.dotted {
  background: repeating-linear-gradient(
    to right,
    var(--legend-color) 0,
    var(--legend-color) 2px,
    transparent 2px,
    transparent 5px
  );
}

.fc-legend-swatch.bar {
  height: 8px;
  border-radius: 1px;
  opacity: 0.8;
}

.forecast-curve-sidebar {
  width: 330px;
  min-width: 300px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: var(--bg-base);
}

.fc-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  padding: 12px;
  color: var(--text-secondary);
  font-size: 12px;
}

.fc-card-title {
  margin-bottom: 9px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}

.fc-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fc-title-row b {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.fc-forecast-list {
  display: flex;
  flex-direction: column;
}

.fc-forecast-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-bottom: 1px solid var(--border-subtle);
}

.fc-forecast-row:last-child {
  border-bottom: none;
}

.fc-window {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.fc-prob-pair {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fc-prob-pair div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 30px;
}

.fc-prob-pair span {
  color: #9ecbff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.fc-prob-pair b {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.fc-prob-pair b.up {
  color: #3fb950;
}

.fc-prob-pair b.down {
  color: #f85149;
}

.fc-conf {
  justify-self: end;
  min-width: 48px;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(88, 166, 255, 0.12);
  color: #a5c7f7;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.fc-conf.high {
  background: rgba(63, 185, 80, 0.14);
  color: #3fb950;
}

.fc-conf.medium {
  background: rgba(242, 204, 96, 0.12);
  color: #f2cc60;
}

.fc-conf.low {
  background: rgba(88, 166, 255, 0.12);
  color: #a5c7f7;
}

.fc-date {
  color: #e6edf3;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.fc-sub {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.fc-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fc-metric-grid div {
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: rgba(13, 17, 23, 0.24);
  padding: 7px 8px;
}

.fc-metric-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.fc-metric-grid b,
.fc-row b {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
}

.fc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.fc-row:last-of-type {
  border-bottom: none;
}

.fc-row span {
  color: var(--text-muted);
}

.fc-signal,
.fc-flow-state {
  margin-top: 10px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 700;
  line-height: 1.35;
}

.fc-signal.strong,
.fc-flow-state.strong {
  border-color: rgba(63, 185, 80, 0.38);
  background: rgba(63, 185, 80, 0.12);
  color: #3fb950;
}

.fc-signal.bullish,
.fc-flow-state.bullish {
  border-color: rgba(88, 166, 255, 0.38);
  background: rgba(88, 166, 255, 0.12);
  color: #58a6ff;
}

.fc-signal.neutral,
.fc-flow-state.neutral {
  color: var(--signal-mid);
}

.fc-flow-state.warning {
  border-color: rgba(242, 204, 96, 0.34);
  background: rgba(242, 204, 96, 0.1);
  color: #f2cc60;
}

.fc-signal.bearish,
.fc-flow-state.bearish {
  border-color: rgba(248, 81, 73, 0.34);
  background: rgba(248, 81, 73, 0.1);
  color: #f85149;
}

.fc-note {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.55;
}

@media (max-width: 1400px) {
  .forecast-curve-sidebar {
    width: 300px;
    min-width: 280px;
  }

  .forecast-curve-main {
    grid-template-rows: 42px minmax(200px, 2fr) minmax(160px, 1.35fr) minmax(140px, 1fr);
  }
}

.ndx-breadth-box {
  margin-top: 0;
}

.qqq-rsi-card {
  margin-top: 0;
}

.qqq-rsi-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.qqq-rsi-title span {
  color: var(--text-primary);
  font-weight: 700;
}

.qqq-rsi-title b,
.qqq-rsi-main b,
.qqq-rsi-div-grid b {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.qqq-rsi-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.qqq-rsi-main div,
.qqq-rsi-div-grid div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-elevated);
}

.qqq-rsi-main span,
.qqq-rsi-div-grid span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
}

.qqq-rsi-div-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.qqq-rsi-note {
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 4px;
  background: rgba(88, 166, 255, 0.08);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.qqq-rsi-card .strong {
  color: var(--price-up);
}

.qqq-rsi-card .neutral {
  color: var(--text-muted);
}

.qqq-rsi-card .warn {
  color: var(--signal-warn);
}

.qqq-rsi-card .danger {
  color: var(--price-down);
}

.ndx-breadth-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.ndx-breadth-title span {
  color: var(--text-primary);
  font-weight: 700;
}

.ndx-breadth-title b {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.ndx-breadth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ndx-breadth-grid div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-elevated);
}

.ndx-breadth-grid span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
}

.ndx-breadth-grid b {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.ndx-breadth-grid b.weak {
  color: var(--price-down);
}

.ndx-breadth-grid b.neutral {
  color: var(--signal-warn);
}

.ndx-breadth-grid b.strong {
  color: var(--price-up);
}
