

/* ---- Additive tokens (extend, don't replace) -------------- */
:root {
  --d-radius:      16px;
  --d-radius-sm:   10px;
  --d-gap:         14px;
  --d-shadow:      0 1px 2px rgba(19,32,51,0.04), 0 8px 24px rgba(19,32,51,0.06);
  --d-shadow-hov:  0 2px 6px rgba(19,32,51,0.06), 0 16px 40px rgba(19,32,51,0.10);
  --d-pos:         var(--green);
  --d-neg:         var(--red);
  --d-pos-dim:     var(--green-dim);
  --d-neg-dim:     var(--red-dim);
  --d-grid-line:   var(--border);
}

/* ---- Section heading ------------------------------------- */
.dash-section-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 4px 0 12px;
}
.dash-section-head h2 {
  font-size: 15px; font-weight: 800; letter-spacing: -0.3px;
  color: var(--text);
}
.dash-section-head .sub {
  font-size: 11px; color: var(--text3);
  font-family: 'DM Mono', monospace;
}

/* ---- Hero index strip ------------------------------------ */
.hero-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--d-gap);
  margin-bottom: 18px;
}
.hero-card {
  position: relative;
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--border);
  border-radius: var(--d-radius);
  padding: 16px 18px 10px;
  box-shadow: var(--d-shadow);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  cursor: default;
}
.hero-card:hover { box-shadow: var(--d-shadow-hov); transform: translateY(-1px); }
.hero-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--border2); transition: background .25s ease;
}
.hero-card.is-up::before   { background: var(--d-pos); }
.hero-card.is-down::before { background: var(--d-neg); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.hero-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.9px; text-transform: uppercase;
  color: var(--text3);
}
.hero-pill {
  font-size: 11px; font-weight: 700; font-family: 'DM Mono', monospace;
  padding: 2px 8px; border-radius: 999px;
}
.hero-pill.is-up   { background: var(--d-pos-dim); color: var(--d-pos); }
.hero-pill.is-down { background: var(--d-neg-dim); color: var(--d-neg); }
.hero-value {
  font-size: 26px; font-weight: 800; letter-spacing: -0.6px;
  font-family: 'DM Mono', monospace; color: var(--text);
  margin-top: 6px; line-height: 1.1;
}
.hero-spark { margin-top: 8px; height: 40px; width: 100%; }
.hero-spark svg { display: block; width: 100%; height: 100%; }

/* ---- Dashboard grid (asymmetric) ------------------------- */
.dash-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--d-gap);
  margin-bottom: 18px;
  align-items: stretch;
}
.dash-grid.triple { grid-template-columns: 1fr 1fr 1fr; }
.dash-grid > .card { margin: 0; }
@media (max-width: 1100px) { .dash-grid, .dash-grid.triple { grid-template-columns: 1fr; } }

/* ---- Regime gauge ---------------------------------------- */
.regime-panel { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.regime-gauge { flex: 0 0 auto; width: 150px; height: 96px; position: relative; }
.regime-gauge svg { display: block; width: 100%; height: 100%; }
.regime-gauge-label {
  position: absolute; left: 0; right: 0; bottom: 2px; text-align: center;
  font-size: 11px; font-weight: 800; letter-spacing: 0.3px;
  font-family: 'DM Mono', monospace;
}
.regime-meta { flex: 1 1 200px; min-width: 180px; }
.regime-state {
  font-size: 18px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2;
  display: flex; align-items: center; gap: 8px;
}
.regime-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.regime-note { font-size: 12px; color: var(--text2); line-height: 1.55; margin-top: 6px; }
.regime-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.regime-kv-item {
  border: 1px solid var(--border); border-radius: var(--d-radius-sm);
  padding: 8px 10px; background: var(--bg2);
}
.regime-kv-item .k { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); }
.regime-kv-item .v { font-size: 14px; font-weight: 700; font-family: 'DM Mono', monospace; margin-top: 2px; }
.regime-warn {
  margin-top: 10px; padding: 8px 12px; border-radius: var(--d-radius-sm);
  background: var(--red-dim); border: 1px solid var(--border2);
  color: var(--yellow); font-size: 11px; font-family: 'DM Mono', monospace;
}

/* ---- Breadth bar ----------------------------------------- */
.breadth-row { display: flex; flex-direction: column; gap: 14px; }
.breadth-item .breadth-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px;
}
.breadth-item .breadth-name { font-size: 12px; font-weight: 600; color: var(--text2); }
.breadth-item .breadth-val { font-size: 12px; font-weight: 700; font-family: 'DM Mono', monospace; }
.breadth-track {
  position: relative; height: 8px; border-radius: 999px;
  background: var(--bg3); overflow: hidden;
}
.breadth-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; transition: width .6s ease; }
.breadth-fill.good { background: var(--d-pos); }
.breadth-fill.mid  { background: var(--accent); }
.breadth-fill.bad  { background: var(--d-neg); }

/* ---- Sector heatmap -------------------------------------- */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.heat-cell {
  border-radius: var(--d-radius-sm); padding: 10px 10px 8px;
  border: 1px solid var(--border); cursor: default;
  transition: transform .15s ease, box-shadow .15s ease;
  min-height: 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.heat-cell:hover { transform: translateY(-1px); box-shadow: var(--d-shadow); }
.heat-name { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .85; }
.heat-val  { font-size: 14px; font-weight: 800; font-family: 'DM Mono', monospace; }

/* ---- Movers / watchlist refresh -------------------------- */
.mlist { display: flex; flex-direction: column; }
.mrow {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: 12px; align-items: center;
  padding: 9px 4px; border-top: 1px solid var(--border);
  transition: background .12s ease;
}
.mrow:first-child { border-top: none; }
.mrow:hover { background: var(--bg3); }
.mrow .m-tk { font-weight: 800; color: var(--accent); cursor: pointer; font-size: 13px; }
.mrow .m-nm { font-size: 11px; color: var(--text3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.mrow .m-px { font-family: 'DM Mono', monospace; font-size: 13px; text-align: right; font-weight: 600; }
.mrow .m-ch { font-family: 'DM Mono', monospace; font-size: 12px; text-align: right; font-weight: 700; min-width: 64px; }

/* ---- Segmented control (tabs) ---------------------------- */
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 999px;
}
.seg button {
  border: none; background: none; cursor: pointer;
  font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; color: var(--text2);
  transition: background .15s ease, color .15s ease;
}
.seg button.active { background: var(--accent); color: #fff; }

/* ---- Main chart wrapper ---------------------------------- */
.chart-tall { height: 300px; }
.chart-tall.chart-area { color: var(--text3); }

@media (max-width: 640px) {
  .hero-value { font-size: 22px; }
  .regime-gauge { width: 130px; height: 84px; }
}
