/* ============================================================
   COMPONENTS — cards, pills, bars, rows, states
   ------------------------------------------------------------
   Ek usool jo poore file mein chalta hai: DIRECTION kabhi sirf rang se
   nahi kehi jaati. Har jagah rang + arrow/label + bar — teen channel.
   ============================================================ */

/* ============================================================
   CARD / PANEL
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.card__head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.card__title {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-2);
}
.card__hint {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  margin-left: auto;
  font-weight: 500;
}
.card__body { padding: var(--s4); }
.card__body--flush { padding: 0; }

/* ============================================================
   PILLS / BADGES
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 3px var(--s2);
  border-radius: 20px;
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill--bull { color: var(--bull-bright); background: var(--bull-wash); border-color: rgba(43,179,163,0.3); }
.pill--bear { color: var(--bear-bright); background: var(--bear-wash); border-color: rgba(240,85,78,0.3); }
.pill--flat { color: var(--text-dim);    background: var(--flat-wash); border-color: rgba(122,133,153,0.25); }
.pill--warn { color: var(--warn);        background: var(--warn-wash); border-color: var(--warn-border); }
.pill--live { color: var(--live);        background: var(--live-wash); border-color: rgba(43,179,163,0.3); }
.pill--danger { color: var(--danger);    background: var(--danger-wash); border-color: var(--danger-border); }

.pill__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.pill__dot--pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .pill__dot--pulse { animation: none; }
}

.clock {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
  color: var(--text-2);
  letter-spacing: 0.02em;
}
.clock small { color: var(--text-faint); margin-left: 4px; font-size: var(--fs-micro); }

/* ---- global search (placeholder in this phase) ---- */
.search {
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: 260px;
  max-width: 32vw;
  padding: 5px var(--s3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-faint);
  font-size: var(--fs-sm);
}
.search { cursor: pointer; text-align: left; }
.search:hover { border-color: var(--border-strong); color: var(--text-2); }
.search__label { flex: 1 1 auto; min-width: 0; }
.search kbd {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 1px 4px;
}
@media (max-width: 1100px) { .search { display: none; } }

/* ============================================================
   DATA-STATE BANNER — product ka sabse zaroori component
   ------------------------------------------------------------
   Yeh dismissible NAHI hai, aur yeh design hai. Jis din user bhool jaaye
   ki woh simulated data dekh raha hai, us din product jhooth bol raha hai.
   ============================================================ */
.banner {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s5);
  font-size: var(--fs-sm);
  border-bottom: 1px solid transparent;
}
.banner--test {
  background: var(--warn-wash);
  border-bottom-color: var(--warn-border);
  color: var(--warn);
}
.banner--stale {
  background: var(--warn-wash);
  border-bottom-color: var(--warn-border);
  color: var(--warn);
}
.banner--danger {
  background: var(--danger-wash);
  border-bottom-color: var(--danger-border);
  color: var(--danger);
}
.banner--live {
  background: var(--live-wash);
  border-bottom-color: rgba(43,179,163,0.28);
  color: var(--live);
}
.banner__icon { font-size: var(--fs-md); line-height: 1; flex: 0 0 auto; }
.banner__text { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.banner__detail {
  color: var(--text-dim);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-left: auto;
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
@media (max-width: 900px) {
  .banner { flex-wrap: wrap; padding: var(--s2) var(--s3); }
  .banner__detail { margin-left: 0; width: 100%; text-align: left; }
}

/* ============================================================
   MARKET VIEW CARD
   ============================================================ */
.mview { text-align: center; padding: var(--s5) var(--s4) var(--s4); }
.mview__arrow { font-size: var(--fs-xl); line-height: 1; }
.mview__word {
  font-size: var(--fs-2xl);
  font-weight: 750;
  letter-spacing: 0.14em;
  line-height: 1.1;
  margin-top: var(--s1);
}
.mview--bull .mview__word, .mview--bull .mview__arrow { color: var(--bull-bright); }
.mview--bear .mview__word, .mview--bear .mview__arrow { color: var(--bear-bright); }
.mview--flat .mview__word, .mview--flat .mview__arrow { color: var(--flat); }

.mview__strength {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin-top: var(--s3);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  font-weight: 600;
}
.mview__reasons {
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--border);
  text-align: left;
  display: grid;
  gap: var(--s2);
}
.mview__reason {
  display: flex;
  gap: var(--s2);
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.4;
}
.mview__reason::before {
  content: "";
  flex: 0 0 auto;
  width: 3px;
  border-radius: 2px;
  background: var(--border-strong);
}

/* ---- segmented strength meter ---- */
.meter { display: flex; gap: 2px; }
.meter__seg {
  width: 14px; height: 5px;
  border-radius: 1px;
  background: var(--surface-3);
}
.mview--bull .meter__seg.is-on { background: var(--bull); }
.mview--bear .meter__seg.is-on { background: var(--bear); }
.mview--flat .meter__seg.is-on { background: var(--flat); }

/* ============================================================
   INDEX STRIP
   ============================================================ */
.idx {
  display: grid;
  /* 132px chuna gaya hai taaki chaar index tiles ek hi row mein rahein
     jab tak jagah hai. 150px par 1024 viewport 3+1 mein toot jaata tha,
     jisse ek aadhi khaali row bachti thi. */
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 1px;
  background: var(--border);
}
.idx__tile {
  background: var(--surface);
  padding: var(--s3) var(--s4);
  display: grid;
  gap: 2px;
  min-width: 0;
}
.idx__name {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--s1);
}
.idx__note {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 0 3px;
  letter-spacing: 0.02em;
}
.idx__value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.idx__change {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
  display: flex;
  gap: var(--s2);
  align-items: baseline;
}
.idx__prev {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
  color: var(--text-faint);
  margin-top: 2px;
}

.up   { color: var(--bull-bright); }
.down { color: var(--bear-bright); }
.flat { color: var(--text-dim); }
.muted { color: var(--text-faint); }

/* ============================================================
   BREADTH PANEL  (SIGNAL breadth — advance/decline NAHI)
   ============================================================ */
.breadth { display: grid; gap: var(--s3); }
.breadth__row { display: grid; gap: var(--s1); }
.breadth__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 650;
  color: var(--text-dim);
}
.breadth__count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}
.breadth__track {
  height: 7px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}
.breadth__fill { height: 100%; border-radius: 4px; }
.breadth__fill--bull { background: var(--bull); }
.breadth__fill--bear { background: var(--bear); }
.breadth__fill--flat { background: var(--flat); }

.breadth__foot {
  margin-top: var(--s1);
  padding-top: var(--s3);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--text-faint);
  line-height: 1.4;
}

/* ============================================================
   SECTOR PANEL
   ============================================================ */
.sect__group + .sect__group { margin-top: var(--s3); }
.sect__heading {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--s2);
}
.sect__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--s3);
  padding: 5px 0;
}
.sect__name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sect__chg {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: right;
  min-width: 62px;
}
.sect__mix {
  display: flex;
  gap: 1px;
  width: 54px;
  height: 6px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--surface-3);
}
.sect__mix i { display: block; height: 100%; }
.sect__mix .b { background: var(--bull); }
.sect__mix .r { background: var(--bear); }
.sect__mix .n { background: var(--flat); }

/* ============================================================
   SIGNAL PANEL (top bull / top bear)
   ============================================================ */
.sig { display: grid; }
.sig__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s2) var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
}
.sig__row:last-child { border-bottom: 0; }
.sig__row--bull { border-left-color: var(--bull); }
.sig__row--bear { border-left-color: var(--bear); }

.sig__ident { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.sig__sym {
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sig__conf {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 0 3px;
  flex: 0 0 auto;
}
.sig__price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
  text-align: right;
  display: grid;
  gap: 1px;
  justify-items: end;
}
.sig__ltp { color: var(--text-2); }

.sig__scorewrap {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s3);
}
.sig__track {
  height: 4px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}
.sig__fill { height: 100%; border-radius: 3px; }
.sig__row--bull .sig__fill { background: var(--bull); }
.sig__row--bear .sig__fill { background: var(--bear); }
.sig__score {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
  font-weight: 700;
  min-width: 26px;
  text-align: right;
}
.sig__row--bull .sig__score { color: var(--bull-bright); }
.sig__row--bear .sig__score { color: var(--bear-bright); }

.sig__why {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  margin-top: 2px;
}
.sig__whyline {
  display: flex;
  gap: var(--s2);
  align-items: baseline;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.35;
}
.sig__whyline::before {
  content: "·";
  color: var(--text-faint);
  font-weight: 700;
  flex: 0 0 auto;
}

.sig__flag {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--warn);
  background: var(--warn-wash);
  border: 1px solid var(--warn-border);
  border-radius: 2px;
  padding: 0 4px;
  flex: 0 0 auto;
}

/* ============================================================
   VOLUME PANEL
   ============================================================ */
.vol { display: grid; }
/* Do lines, HAMESHA. Pehle yeh ek chaudi 4-column row thi, jo side rail
   (~440px) mein tootkar explanation ko ek patli 90px ki naali bana deti
   thi. Layout ko container ki chaudai par bharosa nahi karna chahiye —
   yeh row har jagah ek jaisi padhi jaati hai. */
.vol__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--s1) var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
}
.vol__row:last-child { border-bottom: 0; }
.vol__sym {
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vol__ratio {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--warn);
}
.vol__why {
  grid-column: 1 / -1;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.4;
}

/* ============================================================
   DATA QUALITY (collapsed by default — user ko dabana nahi hai)
   ============================================================ */
.dq { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.dq > summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s2) var(--s4);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: var(--s2);
  user-select: none;
}
.dq > summary::-webkit-details-marker { display: none; }
.dq > summary::before {
  content: "▸";
  font-size: 10px;
  color: var(--text-faint);
  transition: transform 0.12s;
}
.dq[open] > summary::before { transform: rotate(90deg); }
.dq > summary:hover { color: var(--text-2); }
.dq__body {
  padding: var(--s2) var(--s4) var(--s4) var(--s6);
  display: grid;
  gap: var(--s2);
  border-top: 1px solid var(--border);
}
.dq__note {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: 1.45;
  display: flex;
  gap: var(--s2);
}
.dq__note::before { content: "·"; color: var(--text-faint); font-weight: 700; }
.dq__count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 6px;
}

/* ============================================================
   EMPTY / ERROR / LOADING
   ============================================================ */
.state {
  display: grid;
  place-items: center;
  gap: var(--s2);
  padding: var(--s8) var(--s4);
  text-align: center;
}
.state__icon { font-size: var(--fs-xl); line-height: 1; opacity: 0.6; }
.state__title {
  font-size: var(--fs-base);
  font-weight: 650;
  color: var(--text-2);
}
.state__msg {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  max-width: 46ch;
  line-height: 1.5;
}
.state__detail {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-faint);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--s2) var(--s3);
  max-width: 70ch;
  text-align: left;
  line-height: 1.5;
  word-break: break-word;
}
.state--error .state__icon { color: var(--danger); opacity: 1; }
.state--error .state__title { color: var(--danger); }

.state__action {
  margin-top: var(--s2);
  padding: 5px var(--s4);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}
.state__action:hover { background: var(--surface-hover); color: var(--text); }

/* skeleton while the first payload is in flight */
.skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r);
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.skel--line { height: 11px; margin: var(--s2) 0; }

/* "Coming next" — nav items jo abhi kaam nahi karte */
.soon {
  display: grid;
  place-items: center;
  min-height: 55vh;
}
.soon__box {
  text-align: center;
  display: grid;
  gap: var(--s2);
  justify-items: center;
  padding: var(--s8);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  max-width: 460px;
}
.soon__icon { font-size: var(--fs-2xl); opacity: 0.35; }
.soon__title { font-size: var(--fs-md); font-weight: 650; }
.soon__msg { font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.5; }

/* ============================================================
   STOCK DETAIL
   ============================================================ */
.sd {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr);
  gap: var(--s3);
  align-items: start;
  margin-top: var(--s3);
}
.sd__main, .sd__side { display: grid; gap: var(--s3); align-content: start; }
@media (max-width: 1200px) { .sd { grid-template-columns: minmax(0, 1fr); } }

.sd__picker { max-width: 560px; margin: var(--s8) auto; display: grid; gap: var(--s3); }
.sd__pickerhint { font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.5; }

/* ---- header ---- */
.sdh { padding: var(--s4) var(--s5); display: grid; gap: var(--s3); }
.sdh__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s4); flex-wrap: wrap;
}
.sdh__sym { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.sdh__name { font-size: var(--fs-sm); color: var(--text-dim); margin-top: 2px; }
.sdh__price { text-align: right; }
.sdh__ltp {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: var(--fs-2xl); font-weight: 650; line-height: 1.1;
}
.sdh__chg {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: var(--fs-md); margin-top: 2px;
}
.sdh__meta {
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  padding-top: var(--s3); border-top: 1px solid var(--border);
}
.sdh__metaitem {
  font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-faint);
}
.sdh__ohlc {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border);
}
.sdh__ohlcitem { display: grid; gap: 2px; }
.sdh__ohlclabel {
  font-size: var(--fs-micro); text-transform: uppercase;
  letter-spacing: var(--track-caps); color: var(--text-faint); font-weight: 700;
}
.sdh__ohlcvalue {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: var(--fs-base); color: var(--text-2);
}

/* ---- signal card ---- */
.sig-card { border-left: 2px solid var(--border-strong); }
.sig-card--bull { border-left-color: var(--bull); }
.sig-card--bear { border-left-color: var(--bear); }
.sig-card__verdict { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.sig-card__arrow { font-size: var(--fs-lg); }
.sig-card__word { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.01em; }
.sig-card--bull .sig-card__word { color: var(--bull-bright); }
.sig-card--bear .sig-card__word { color: var(--bear-bright); }
.sig-card--flat .sig-card__word { color: var(--flat); }
.sig-card__conf { font-size: var(--fs-sm); color: var(--text-dim); }
.sig-card__strength {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: var(--s3); margin-top: var(--s3);
}
.sig-card__track { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.sig-card__fill { height: 100%; border-radius: 3px; background: var(--flat); }
.sig-card--bull .sig-card__fill { background: var(--bull); }
.sig-card--bear .sig-card__fill { background: var(--bear); }
.sig-card__score {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm); font-weight: 700; color: var(--text-2);
}
.sig-card__why { margin-top: var(--s4); display: grid; gap: 5px; }
.sig-card__whyhead {
  font-size: var(--fs-micro); text-transform: uppercase; font-weight: 700;
  letter-spacing: var(--track-caps); color: var(--text-faint);
}
.sig-card__line {
  display: flex; gap: var(--s2); font-size: var(--fs-sm);
  color: var(--text-2); line-height: 1.4;
}
.sig-card__line::before { content: "•"; color: var(--text-faint); flex: 0 0 auto; }
.sig-card__note {
  margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--border);
  font-size: var(--fs-xs); color: var(--text-faint); line-height: 1.45;
}

/* ---- indicators ---- */
.ind { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: var(--s4) var(--s3); }
.ind__cell { display: grid; gap: 2px; align-content: start; }
.ind__label {
  font-size: var(--fs-micro); text-transform: uppercase; font-weight: 700;
  letter-spacing: var(--track-caps); color: var(--text-faint);
}
.ind__value {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: var(--fs-md); font-weight: 600; color: var(--text);
}
.ind__hint { font-size: var(--fs-xs); color: var(--text-faint); }
.ind__warn {
  margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border);
  font-size: var(--fs-xs); color: var(--warn); line-height: 1.45;
}

/* ---- measured range ---- */
.rng__row { display: flex; justify-content: space-between; gap: var(--s4); }
.rng__end { display: grid; gap: 2px; }
.rng__end--right { text-align: right; }
.rng__value {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: var(--fs-md); font-weight: 650;
}
.rng__track {
  position: relative; height: 5px; margin: var(--s4) 0 var(--s2);
  border-radius: 3px;
  background: linear-gradient(90deg, var(--bear-dim), var(--surface-3) 50%, var(--bull-dim));
}
.rng__marker {
  position: absolute; top: -4px; width: 3px; height: 13px;
  border-radius: 2px; background: var(--text); transform: translateX(-50%);
}
.rng__note { font-size: var(--fs-xs); color: var(--text-faint); line-height: 1.45; }

/* ---- chart ---- */
.chart__body { padding: var(--s3) var(--s4) 0; }
.chart__svg { width: 100%; height: 340px; display: block; }
.chart__grid line { stroke: var(--border); stroke-width: 1; shape-rendering: crispEdges; }
.chart__axis {
  fill: var(--text-faint); font-family: var(--font-mono); font-size: 11px;
}
.chart__wick { stroke-width: 1.2; }
.chart__wick.is-up { stroke: var(--bull); }
.chart__wick.is-down { stroke: var(--bear); }
.chart__body rect.is-up, .chart__candles .is-up { fill: var(--bull); }
.chart__body rect.is-down, .chart__candles .is-down { fill: var(--bear); }
.chart__vol .is-up { fill: var(--bull); opacity: 0.42; }
.chart__vol .is-down { fill: var(--bear); opacity: 0.42; }
.chart__foot {
  padding: var(--s2) var(--s4) var(--s3);
  font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-faint);
}

/* ---- stock search ---- */
.ssearch { position: relative; display: grid; gap: var(--s1); }
.ssearch__box {
  display: flex; align-items: center; gap: var(--s2);
  padding: 7px var(--s3); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
}
.ssearch__box:focus-within { border-color: var(--border-focus); }
.ssearch__icon { color: var(--text-faint); }
.ssearch__input {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent;
  color: var(--text); font: inherit; outline: none;
}
.ssearch__input::placeholder { color: var(--text-faint); }
.ssearch__list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
  margin-top: 3px; max-height: 320px; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: var(--r); box-shadow: var(--shadow);
}
.ssearch__row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: var(--s3); align-items: baseline; width: 100%;
  padding: 7px var(--s3); background: transparent; border: 0;
  border-bottom: 1px solid var(--border); text-align: left; cursor: pointer;
}
.ssearch__row:last-child { border-bottom: 0; }
.ssearch__row:hover { background: var(--surface-hover); }
.ssearch__sym { font-weight: 700; font-size: var(--fs-sm); }
.ssearch__name {
  font-size: var(--fs-sm); color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ssearch__sector { font-size: var(--fs-micro); color: var(--text-faint); text-transform: uppercase; }
.ssearch__empty { padding: var(--s3); font-size: var(--fs-sm); color: var(--text-dim); }
.ssearch__status { font-size: var(--fs-xs); color: var(--text-faint); }
.ssearch__status--bad { color: var(--warn); }

/* ============================================================
   SCANNER
   ============================================================ */
.sc__toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3);
  padding: var(--s3) var(--s4); margin-bottom: var(--s3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.sc__field { display: grid; gap: 3px; min-width: 0; }
.sc__fieldlabel {
  font-size: var(--fs-micro); text-transform: uppercase; font-weight: 700;
  letter-spacing: var(--track-caps); color: var(--text-faint);
}
.sc__search, .sc__select {
  padding: 5px var(--s3); background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--r);
  color: var(--text); font: inherit; font-size: var(--fs-sm); outline: none;
}
.sc__search { min-width: 190px; }
.sc__select { min-width: 150px; cursor: pointer; }
.sc__search:focus, .sc__select:focus { border-color: var(--border-focus); }
.sc__range { width: 150px; accent-color: var(--bull); }
.sc__order {
  padding: 5px var(--s3); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: var(--r);
  color: var(--text-2); cursor: pointer; font-size: var(--fs-base);
}
.sc__order:hover { background: var(--surface-hover); color: var(--text); }

.sc__coverage {
  margin-bottom: var(--s3); padding: var(--s2) var(--s4);
  font-size: var(--fs-sm); color: var(--warn);
  background: var(--warn-wash); border: 1px solid var(--warn-border);
  border-radius: var(--r);
}

/* ---- table ---- */
.sc__table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.sc__th {
  position: sticky; top: 0; z-index: 2;
  padding: var(--s2) var(--s3);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-strong);
  font-size: var(--fs-micro); font-weight: 700; text-transform: uppercase;
  letter-spacing: var(--track-caps); color: var(--text-faint);
  text-align: left; white-space: nowrap;
}
.sc__th.is-num { text-align: right; }
.sc__th.is-sortable { cursor: pointer; user-select: none; }
.sc__th.is-sortable:hover { color: var(--text-2); }
.sc__sortmark { color: var(--bull-bright); }

.sc__group { border-bottom: 1px solid var(--border); }
.sc__group:hover { background: var(--surface-2); }
.sc__row { cursor: pointer; }
.sc__row td { padding: var(--s2) var(--s3); vertical-align: middle; }
.sc__row td.is-num {
  text-align: right; font-family: var(--font-mono);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sc__row:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; }
.sc__group--bull .sc__row td:first-child { box-shadow: inset 2px 0 0 var(--bull); }
.sc__row--bull td:first-child { box-shadow: inset 2px 0 0 var(--bull); }
.sc__row--bear td:first-child { box-shadow: inset 2px 0 0 var(--bear); }
.sc__row--flat td:first-child { box-shadow: inset 2px 0 0 var(--flat); }

.sc__sym { display: flex; align-items: baseline; gap: var(--s2); white-space: nowrap; }
.sc__symtext { font-weight: 700; font-size: var(--fs-base); }
.sc__sector {
  font-size: var(--fs-micro); color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.02em;
}
.sc__conf {
  margin-left: var(--s1); font-size: 9px; font-weight: 700;
  letter-spacing: 0.05em; color: var(--text-faint);
  border: 1px solid var(--border-strong); border-radius: 2px; padding: 0 3px;
}
.sc__scorewrap {
  display: inline-grid; grid-template-columns: 60px auto;
  align-items: center; gap: var(--s2);
}
.sc__track { height: 4px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.sc__fill { height: 100%; border-radius: 3px; }
.sc__fill--bull { background: var(--bull); }
.sc__fill--bear { background: var(--bear); }
.sc__fill--flat { background: var(--flat); }
.sc__score { font-weight: 700; min-width: 22px; text-align: right; }

.sc__whyrow td {
  padding: 0 var(--s3) var(--s2) var(--s3);
  border: 0;
}
.sc__why {
  font-size: var(--fs-xs); color: var(--text-dim); line-height: 1.4;
  padding-left: calc(var(--s3) + 2px);
}
