/* Stock detail — scanner intelligence panels (desktop + mobile) */

.sd-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: stretch;
}

.sd-chart-layout__main {
  min-width: 0;
}

.sd-vp-panel {
  width: 4.5rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.25rem 0 0.25rem 0.35rem;
  border-left: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.25));
}

.sd-vp-panel__head {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #64748b);
  line-height: 1.2;
}

.sd-vp-panel__status {
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.25;
}

.sd-vp-panel__status--above { color: #059669; }
.sd-vp-panel__status--below { color: #dc2626; }

.sd-vp-panel__bars {
  flex: 1;
  min-height: 12rem;
  display: flex;
  flex-direction: column-reverse;
  justify-content: stretch;
  gap: 1px;
  position: relative;
}

.sd-vp-panel__row {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 2px;
}

.sd-vp-panel__bar {
  height: 100%;
  min-width: 2px;
  max-width: 100%;
  border-radius: 1px 2px 2px 1px;
  background: rgba(99, 102, 241, 0.35);
  transition: width 0.15s ease;
}

.sd-vp-panel__bar--value { background: rgba(99, 102, 241, 0.55); }
.sd-vp-panel__bar--poc { background: #f59e0b; box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.4); }

.sd-vp-panel__price-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #4f46e5;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.sd-vp-panel__labels {
  font-size: 0.55rem;
  color: var(--text-muted, #64748b);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sd-vp-panel__labels span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sd-intel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .sd-intel-grid--2x2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .sd-intel-grid--2x2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

.sd-intel-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.sd-intel-card__head {
  flex-shrink: 0;
  min-height: 3.35rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}

.sd-intel-card__title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.sd-intel-card__lede {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0.2rem 0 0;
  line-height: 1.35;
}

.sd-intel-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 5rem;
}

.sd-intel-card__body > .sd-oh-gauge,
.sd-intel-card__body > .sd-chase,
.sd-intel-card__body > .sd-coil,
.sd-intel-card__body > .sd-radar-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.sd-intel-card__body .sd-intel-card__hint,
.sd-intel-card__body .sd-chase__flags {
  margin-top: auto;
  flex-shrink: 0;
}

.sd-intel-card__hint {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0.65rem 0 0;
  line-height: 1.45;
  text-align: center;
}

.sd-intel-card__sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

/* Overhead supply gauge */
.sd-oh-gauge {
  align-items: center;
  text-align: center;
}

.sd-oh-gauge__stack,
.sd-chase__hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0.45rem;
}

.sd-oh-gauge__arc,
.sd-chase--lg .sd-chase__meter {
  width: 10.5rem;
  height: 5.5rem;
  margin: 0 auto;
  flex-shrink: 0;
}

.sd-oh-gauge__arc svg,
.sd-chase__meter svg {
  display: block;
  width: 100%;
  height: auto;
}

.sd-oh-gauge__val,
.sd-chase__score {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

.sd-oh-gauge__pct {
  font-size: 1.1rem;
  font-weight: 700;
  color: #64748b;
}

.sd-oh-gauge__band {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.sd-oh-gauge__band--low { background: #d1fae5; color: #047857; }
.sd-oh-gauge__band--moderate { background: #fef3c7; color: #b45309; }
.sd-oh-gauge__band--high { background: #fee2e2; color: #b91c1c; }

/* VCP coil */
.sd-coil {
  gap: 0.75rem;
}

.sd-coil__bubble-wrap {
  position: relative;
  height: 7rem;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.95), rgba(248, 250, 252, 0.5));
  border-radius: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.sd-coil__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sd-coil__stat {
  text-align: center;
  padding: 0.45rem 0.35rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.sd-coil__stat-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: #312e81;
  line-height: 1.1;
}

.sd-coil__stat-lbl {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sd-coil__section-title {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sd-coil__ladder {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  height: 4.5rem;
}

.sd-coil__leg {
  font-size: 0.68rem;
}

.sd-coil__pivot-track--lg {
  height: 10px;
}

.sd-coil__pivot-needle {
  top: -4px;
  width: 4px;
  height: 18px;
}

.sd-coil__axis-label {
  position: absolute;
  font-size: 0.55rem;
  color: #94a3b8;
}

.sd-coil__axis-label--x { bottom: 0.2rem; right: 0.35rem; }
.sd-coil__axis-label--y { top: 0.2rem; left: 0.35rem; }

.sd-coil__bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.2);
  border: 2px solid #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #3730a3;
}

.sd-coil__ladder {
  display: flex;
  gap: 0.35rem;
  align-items: flex-end;
  height: 3.5rem;
}

.sd-coil__leg {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.6rem;
  color: #64748b;
}

.sd-coil__leg-bar {
  width: 100%;
  max-width: 2.5rem;
  background: linear-gradient(180deg, #818cf8, #4f46e5);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
}

.sd-coil__pivot {
  margin-top: 0.25rem;
}

.sd-coil__pivot-track {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
}

.sd-coil__pivot-ideal {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(16, 185, 129, 0.25);
  border-radius: 999px;
}

.sd-coil__pivot-needle {
  position: absolute;
  top: -3px;
  width: 3px;
  height: 12px;
  background: #4f46e5;
  border-radius: 2px;
  transform: translateX(-50%);
}

.sd-coil__pivot-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.55rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* Scanner journey — proof board (v3) */
.sd-journey-v3 {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.sd-journey-v3__empty {
  font-size: 0.9rem;
  color: #64748b;
}

.sd-journey-v3__banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid transparent;
}

.sd-journey-v3__banner--up {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 45%, #eef2ff 100%);
  border-color: rgba(16, 185, 129, 0.25);
}

.sd-journey-v3__banner--down {
  background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 45%, #f8fafc 100%);
  border-color: rgba(239, 68, 68, 0.2);
}

.sd-journey-v3__banner-gain {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #047857;
  min-width: 5.5rem;
}

.sd-journey-v3__banner--down .sd-journey-v3__banner-gain {
  color: #b91c1c;
}

.sd-journey-v3__banner-gain-sub {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #059669;
  margin-top: 0.2rem;
}

.sd-journey-v3__banner--down .sd-journey-v3__banner-gain-sub {
  color: #dc2626;
}

.sd-journey-v3__banner-headline {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.sd-journey-v3__banner-lede {
  font-size: 0.88rem;
  color: #334155;
  margin: 0;
  line-height: 1.45;
}

.sd-journey-v3__banner-lede strong {
  color: #0f172a;
  font-weight: 800;
}

.sd-journey-v3__banner-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.sd-journey-v3__chip {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sd-journey-v3__chip strong {
  color: #0f172a;
  font-weight: 800;
}

.sd-journey-v3__path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sd-journey-v3__step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}

.sd-journey-v3__step-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.35rem;
}

.sd-journey-v3__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #c7d2fe;
  background: #6366f1;
  flex-shrink: 0;
  z-index: 1;
}

.sd-journey-v3__step--pre .sd-journey-v3__dot {
  background: #6366f1;
  box-shadow: 0 0 0 2px #c7d2fe;
}

.sd-journey-v3__step--breakout .sd-journey-v3__dot {
  background: #10b981;
  box-shadow: 0 0 0 2px #a7f3d0;
}

.sd-journey-v3__step--bearish .sd-journey-v3__dot {
  background: #ef4444;
  box-shadow: 0 0 0 2px #fecaca;
}

.sd-journey-v3__step--now .sd-journey-v3__dot,
.sd-journey-v3__step--current .sd-journey-v3__dot {
  width: 16px;
  height: 16px;
  background: #4f46e5;
  box-shadow: 0 0 0 3px #c7d2fe, 0 0 12px rgba(79, 70, 229, 0.35);
}

.sd-journey-v3__line {
  flex: 1;
  width: 3px;
  min-height: 1.25rem;
  margin-top: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a5b4fc, #c7d2fe);
}

.sd-journey-v3__step-card {
  padding: 0.65rem 0.9rem 0.85rem;
  margin-bottom: 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.sd-journey-v3__step--current .sd-journey-v3__step-card {
  border-color: #818cf8;
  background: linear-gradient(180deg, #eef2ff, #fff);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.1);
}

.sd-journey-v3__step-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}

.sd-journey-v3__stage {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
}

.sd-journey-v3__step--pre .sd-journey-v3__stage { color: #3730a3; }
.sd-journey-v3__step--breakout .sd-journey-v3__stage { color: #047857; }
.sd-journey-v3__step--bearish .sd-journey-v3__stage { color: #b91c1c; }
.sd-journey-v3__step--current .sd-journey-v3__stage { color: #4338ca; }

.sd-journey-v3__when {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.sd-journey-v3__step-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
}

.sd-journey-v3__kv {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.sd-journey-v3__k {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.sd-journey-v3__v {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.sd-journey-v3__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding-top: 0.25rem;
  border-top: 1px solid #e2e8f0;
}

@media (min-width: 640px) {
  .sd-journey-v3__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.sd-journey-v3__stat {
  text-align: center;
  padding: 0.65rem 0.5rem;
  border-radius: 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.sd-journey-v3__stat-n {
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.sd-journey-v3__stat-l {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-top: 0.25rem;
}

.sd-journey-v3__stat--pre .sd-journey-v3__stat-n { color: #4338ca; }
.sd-journey-v3__stat--bo .sd-journey-v3__stat-n { color: #047857; }
.sd-journey-v3__stat--bear .sd-journey-v3__stat-n { color: #b91c1c; }

@media (max-width: 520px) {
  .sd-journey-v3__banner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .sd-journey-v3__banner-gain {
    font-size: 2.35rem;
    min-width: 0;
  }

  .sd-journey-v3__banner-chips {
    justify-content: center;
  }
}

/* Smart money flow — 60-day panel */
.sd-smart-flow {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sd-smart-flow__panel {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 0.65rem 0.75rem 0.75rem;
}

.sd-smart-flow__row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.sd-smart-flow__row-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
}

.sd-smart-flow__row-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.sd-smart-flow__sessions {
  display: grid;
  grid-template-columns: repeat(var(--flow-days, 60), minmax(0, 1fr));
  gap: 2px;
  height: 2.25rem;
  width: 100%;
}

.sd-smart-flow__cell {
  min-width: 0;
  height: 100%;
  border-radius: 2px;
  cursor: default;
}

.sd-smart-flow__cell--acc { background: #10b981; }
.sd-smart-flow__cell--dist { background: #ef4444; }
.sd-smart-flow__cell--neutral { background: #94a3b8; opacity: 0.35; }

.sd-smart-flow__cell:hover {
  outline: 2px solid rgba(79, 70, 229, 0.45);
  outline-offset: 1px;
  z-index: 1;
}

.sd-smart-flow__obv {
  height: 3.75rem;
  width: 100%;
  background: #fff;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.sd-smart-flow__spark {
  display: block;
  width: 100%;
  height: 100%;
}

.sd-smart-flow__flag {
  font-size: 0.8rem;
  font-weight: 700;
  color: #047857;
  padding: 0.5rem 0.75rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 0.5rem;
}

.sd-smart-flow__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.sd-smart-flow__foot-sep {
  color: #cbd5e1;
}

.sd-smart-flow__legend {
  margin-top: 0;
}

@media (max-width: 480px) {
  .sd-smart-flow__sessions {
    height: 1.75rem;
    gap: 1px;
  }
}

/* Legacy flow-ext (unused) */
.sd-flow-ext {
  display: grid;
  gap: 0.85rem;
}

.sd-flow-ext--lg {
  gap: 1rem;
}

.sd-flow-ext__block {
  display: grid;
  gap: 0.4rem;
}

.sd-flow-ext__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sd-flow-ext__label-hint {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #94a3b8;
}

.sd-flow-ext__strip {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  min-height: 2rem;
  padding: 0.35rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.sd-flow-ext__cell {
  width: 8px;
  height: 28px;
  border-radius: 3px;
  flex-shrink: 0;
}

.sd-flow-ext__cell--acc { background: #10b981; }
.sd-flow-ext__cell--dist { background: #ef4444; }
.sd-flow-ext__cell--neutral { background: #cbd5e1; }

.sd-flow-ext__mini {
  height: 4.5rem;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0.4rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.sd-flow-ext__mini-bar {
  flex: 1;
  min-width: 3px;
  background: linear-gradient(180deg, #818cf8, #4f46e5);
  border-radius: 2px 2px 0 0;
  opacity: 0.85;
}

.sd-flow-ext__flag {
  font-size: 0.78rem;
  font-weight: 700;
  color: #047857;
  padding: 0.45rem 0.65rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 0.5rem;
}

/* 52w zones */
.se-range__zone {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0.35;
}

.se-range__zone--early { background: #fef3c7; }
.se-range__zone--ideal { background: #d1fae5; }

/* Radar */
.sd-radar-layout {
  gap: 0.75rem;
  width: 100%;
}

.sd-radar-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

.sd-radar {
  width: min(100%, 13rem);
  height: auto;
  display: block;
}

.sd-radar__score {
  position: absolute;
  font-size: 1.35rem;
  font-weight: 900;
  color: #312e81;
  line-height: 1;
}

.sd-radar__score span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}

.sd-radar__label {
  font-size: 7px;
  fill: #475569;
  font-weight: 700;
}

.sd-radar__axes {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 0.35rem;
  width: 100%;
}

.sd-radar__row {
  display: grid;
  grid-template-columns: minmax(4.75rem, auto) 1fr 2.25rem;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
}

.sd-radar__row-label {
  font-weight: 600;
  color: #475569;
}

.sd-radar__row-bar {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.sd-radar__row-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #818cf8, #4f46e5);
}

.sd-radar__row-val {
  font-weight: 800;
  color: #312e81;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Chase risk */
.sd-chase {
  align-items: center;
  text-align: center;
}

.sd-chase__readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.35rem;
}

.sd-chase__score {
  /* color set inline by band */
}

.sd-chase__band {
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.2rem;
}

.sd-chase__flags {
  width: 100%;
  text-align: left;
  font-size: 0.75rem;
  color: #334155;
  list-style: none;
  padding: 0;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.65rem;
}

.sd-chase__flags li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #f8fafc;
  line-height: 1.4;
}

.sd-chase__flags li::before {
  content: "⚠ ";
  color: #f59e0b;
}

/* ── Pattern context panels ─────────────────────────────────────── */
.sd-pattern-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sd-pattern-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .sd-pattern-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sd-pattern-panel--wide {
    grid-column: 1 / -1;
  }
}

.sd-pattern-panel {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 1rem;
  padding: 1.1rem 1.15rem 1.15rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.sd-pattern-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.sd-pattern-panel__head--stack {
  flex-wrap: wrap;
  align-items: center;
}

.sd-pattern-panel__title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.sd-pattern-panel__sub {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0.15rem 0 0;
}

.sd-pattern-panel__badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #4338ca;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sd-pattern-panel__range-ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-top: 0.45rem;
  font-variant-numeric: tabular-nums;
}

.sd-pattern-panel__note,
.sd-pattern-panel__meta {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0.65rem 0 0;
  line-height: 1.4;
}

.sd-pattern-panel__meta {
  font-weight: 600;
  color: #475569;
}

.sd-pattern-panel__loading,
.sd-pattern-panel__empty {
  font-size: 0.8rem;
  color: #94a3b8;
}

.sd-pattern-panel__zone-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 2px;
}

.sd-pattern-panel__zone-dot--ideal { background: #86efac; }
.sd-pattern-panel__zone-dot--early { background: #fde68a; }

.sd-pattern-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sd-pattern-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.5rem;
}

.sd-pattern-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sd-pattern-legend .se-heatmap__legend {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.sd-pattern-verdict {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

.sd-pattern-verdict--acc {
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.sd-pattern-verdict--dist {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.sd-pattern-verdict--neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Larger 52w range inside pattern context */
.sd-pattern-panel .se-range--lg {
  height: 44px;
  margin-top: 0.15rem;
}

.sd-pattern-panel .se-range--lg .se-range__track,
.sd-pattern-panel .se-range--lg .se-range__fill {
  height: 10px;
}

.sd-pattern-panel .se-range--lg .se-range__marker--level {
  width: 3px;
  height: 22px;
}

.sd-pattern-panel .se-range--lg .se-range__marker--current {
  width: 14px;
  height: 14px;
}

.sd-pattern-panel .se-range__legend--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.75rem;
  margin-top: 0.65rem;
}

.sd-pattern-panel .se-range__legend-item--grid {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: #64748b;
}

.sd-pattern-panel .se-range__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.sd-pattern-panel .se-range__legend-copy {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.sd-pattern-panel .se-range__legend-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
}

.sd-pattern-panel .se-range__legend-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.sd-pattern-panel .se-chip--lg {
  font-size: 0.8rem;
  padding: 0.4rem 0.7rem;
  gap: 0.35rem;
}

.sd-pattern-panel .se-chip--lg .se-chip__icon {
  font-size: 1rem;
}

@media (max-width: 767px) {
  .sd-chart-layout {
    grid-template-columns: 1fr;
  }

  .sd-vp-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.25));
    padding: 0.5rem 0 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .sd-vp-panel__bars {
    flex: 1;
    min-height: 4rem;
    min-width: 60%;
    flex-direction: row;
    align-items: stretch;
  }

  .sd-vp-panel__row {
    flex-direction: column;
    flex: 1;
    min-width: 2px;
  }

  .sd-vp-panel__bar {
    width: 100% !important;
    height: auto;
    flex: 1;
    min-height: 2px;
    border-radius: 2px 2px 1px 1px;
  }

  .sd-vp-panel__price-line {
    width: 2px;
    height: auto;
    top: 0;
    bottom: 0;
    left: auto;
  }
}
