.top-stock-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}
.top-stock-hdr-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ts-sub {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}
#ts-backdrop > .ts-sub:not(:first-child) { margin-top: 36px; }
.ts-opps-hdr { margin-top: 32px; margin-bottom: 24px; }
#ts-backdrop > .ts-prose { margin-bottom: 0; }
.ts-opps-hdr .ts-sub { margin-bottom: 0; }
#ts-fold-all {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 3px 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
#ts-fold-all:hover { color: var(--text-primary); }
#ts-fold-all[hidden] { display: none; }
.ts-brain {
  display: inline-flex;
  color: var(--neon-violet);
}
.ts-run-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}
.ts-run-nav button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 4px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  line-height: 1;
}
.ts-run-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}
.ts-prose {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 14px;
}
.ts-caption {
  color: var(--text-muted);
  font-size: 12px;
  margin: 10px 0 20px;
}
.ts-index-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.ts-index-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.ts-pe {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ts-stat-value { font-size: 18px; font-weight: 650; }
.ts-stat-value.up { color: var(--gain); }
.ts-stat-value.down { color: var(--loss); }
.ts-stat-label { color: var(--text-muted); font-size: 12px; margin-bottom: 6px; }
.ts-breadth {
  display: flex;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--border);
  margin-top: 6px;
}
.ts-breadth i { display: block; height: 100%; }
.ts-breadth .up { background: var(--gain); }
.ts-breadth .down { background: var(--loss); }
.ts-breadth-lab {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 12px;
}
.ts-vix-greed { color: var(--gain); }
.ts-vix-panic { color: var(--loss); }
.ts-vix-hl { margin-top: 6px; }
.ts-vix-track {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gain), #f59e0b, var(--loss));
}
.ts-vix-track i {
  position: absolute;
  top: -3px;
  width: 8px;
  height: 10px;
  margin-left: -4px;
  border-radius: 2px;
  background: var(--text-primary);
}
.ts-bars {
  display: flex;
  gap: 8px;
  height: 200px;
}
.ts-bars-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 44px;
  color: var(--text-muted);
  font-size: 11px;
}
.ts-bars-plot { position: relative; flex: 1; }
.ts-bars-zero {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: var(--text-primary);
}
.ts-bars-row { display: flex; height: 100%; gap: 6px; }
.ts-bar-col { flex: 1; position: relative; }
.ts-bar {
  position: absolute;
  left: 4px; right: 4px;
}
.ts-bar.up { background: var(--gain); }
.ts-bar.down { background: var(--loss); }
.ts-bar-pct {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  color: var(--text-secondary);
}
.ts-etfs {
  display: flex;
  margin-left: 52px;
  gap: 6px;
  margin-top: 8px;
}
.ts-sector {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  line-height: 1.2;
}
.ts-sector:hover { color: var(--text-primary); }
.ts-sector:hover span { text-decoration: underline; }
.ts-sector-logo {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.ts-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg-elevated);
  margin-bottom: 12px;
}
.ts-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ts-side {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 4px;
  color: #fff;
}
.ts-side.buy { background: var(--gain); }
.ts-side.sell { background: var(--loss); }
.ts-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  flex: 1;
}
.ts-stock:hover .ts-name { text-decoration: underline; }
.ts-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.ts-name { font-weight: 650; min-width: 0; }
.ts-ticker {
  color: var(--text-secondary);
  font-size: 13px;
  flex-shrink: 0;
}
.ts-why { margin: 10px 0 0; color: var(--text-primary); font-size: 14px; line-height: 1.45; }
.ts-fold { margin-top: 10px; }
.ts-scr-chart { margin-top: 10px; }

.ts-fold summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
}
.ts-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.ts-tile {
  flex: 1 1 160px;
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  background: var(--bg-card);
  font-size: 13px;
}
.ts-tile .lab { color: var(--text-muted); font-size: 12px; }
.ts-tile.for { border-left-color: var(--gain); }
.ts-tile.against { border-left-color: var(--loss); }
.ts-tile.info, .ts-tile.silent { border-left-color: var(--text-muted); }
.ts-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 6px;
}
.ts-swatch { width: 8px; height: 8px; display: inline-block; }
.ts-line { width: 14px; height: 2px; display: inline-block; }
@media (max-width: 800px) {
  .ts-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-stock-hdr { align-items: flex-start; }
}
@media (max-width: 768px) {
  .ts-sector span { display: none; }
}
