:root {
  --amber: #ffcc66;
  --cyan: #64d9ff;
}

.exhaustion-shell {
  max-width: 1440px;
}

.exhaustion-control-grid {
  grid-template-columns: minmax(320px, 480px);
  margin-bottom: 16px;
}

.chart-only-mode {
  width: min(1640px, calc(100vw - 24px));
  max-width: none;
}

.chart-only-mode .exhaustion-control-grid {
  margin-bottom: 10px;
}

.multi-chart-section {
  margin-top: 4px;
}

.multi-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.multi-empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
}

.multi-chart-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #121b18;
}

.multi-chart-card.bullish {
  border-color: rgba(64, 211, 138, 0.45);
}

.multi-chart-card.bearish {
  border-color: rgba(255, 111, 125, 0.45);
}

.multi-chart-card.watch {
  border-color: rgba(255, 204, 102, 0.42);
}

.multi-chart-card.error {
  border-color: rgba(255, 111, 125, 0.45);
}

.multi-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.multi-chart-header div {
  display: grid;
  gap: 3px;
}

.multi-chart-header strong {
  font-size: 1rem;
  line-height: 1;
}

.multi-chart-header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.multi-signal-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: #101615;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.multi-signal-badge.bullish {
  color: #052015;
  border-color: var(--bull);
  background: var(--bull);
}

.multi-signal-badge.bearish {
  color: #25080c;
  border-color: var(--bear);
  background: var(--bear);
}

.multi-signal-badge.watch {
  color: #1c1505;
  border-color: var(--amber);
  background: var(--amber);
}

.multi-chart-meta {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 3px;
}

.multi-chart-canvas svg {
  width: 100%;
  height: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.creator-signature {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.3;
}

.creator-signature strong {
  color: var(--accent);
  font-weight: 900;
}

.site-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: #07130f;
  border-color: var(--accent);
  background: var(--accent);
}

.inline-check {
  min-height: 42px;
  align-content: end;
}

.custom-product-field {
  grid-column: 1 / -1;
}

.readonly-control {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #101615;
}

.scan-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 16px;
}

.scan-row button {
  min-width: 180px;
}

.exhaustion-metrics {
  grid-template-columns: 1.05fr 1.35fr repeat(4, minmax(0, 1fr));
}

.score-metric {
  display: grid;
  gap: 10px;
}

.score-ring {
  --score: 0;
  --score-color: var(--muted);
  width: 88px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #101615 0 57%, transparent 58%),
    conic-gradient(var(--score-color) calc(var(--score) * 1%), rgba(255, 255, 255, 0.08) 0);
}

.score-ring strong {
  color: var(--text);
  font-size: 1.85rem;
  line-height: 1;
}

.score-ring.bearish {
  --score-color: var(--bear);
}

.score-ring.bullish {
  --score-color: var(--bull);
}

.score-ring.watch {
  --score-color: var(--amber);
}

.signal-metric {
  display: grid;
  align-content: start;
  gap: 8px;
}

.signal-metric small {
  color: var(--muted);
  font-size: 0.8rem;
}

.signal-text.bearish {
  color: var(--bear);
}

.signal-text.bullish {
  color: var(--bull);
}

.signal-text.watch {
  color: var(--amber);
}

.exhaustion-visual-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.65fr);
}

.exhaustion-workspace {
  grid-template-columns: minmax(340px, 0.65fr) minmax(0, 1.35fr);
  align-items: start;
}

.exhaustion-sidebar {
  display: grid;
  gap: 16px;
  align-self: start;
}

.last-signals-panel .panel-heading {
  justify-content: center;
  text-align: center;
}

.last-signals-panel .panel-heading h2 {
  width: 100%;
}

.follow-through-panel .panel-heading {
  justify-content: center;
  text-align: center;
}

.follow-through-panel .panel-heading h2 {
  width: 100%;
}

.follow-through-panel-content,
.follow-through-grid {
  display: grid;
  gap: 10px;
}

.follow-through-card {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  padding: 12px;
  background: #101615;
}

.follow-through-card.bullish {
  border-left-color: var(--bull);
}

.follow-through-card.bearish {
  border-left-color: var(--bear);
}

.follow-through-title,
.follow-through-row,
.follow-through-rate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.follow-through-title {
  margin-bottom: 8px;
  font-weight: 900;
}

.follow-through-title span,
.follow-through-row span,
.follow-through-rate span {
  color: var(--muted);
  font-size: 0.82rem;
}

.follow-through-row span {
  display: grid;
  gap: 2px;
}

.follow-through-row span em {
  color: rgba(159, 176, 170, 0.72);
  font-size: 0.72rem;
  font-style: normal;
}

.follow-through-row {
  border-top: 1px solid rgba(159, 176, 170, 0.16);
  padding: 7px 0;
}

.follow-through-values {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.follow-through-values small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.follow-through-rate {
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 9px;
  font-weight: 900;
}

.exhaustion-chart {
  min-height: 430px;
}

.chart-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.vwap-badge {
  color: var(--amber);
  border-color: rgba(255, 204, 102, 0.42);
}

.exhaustion-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-grid {
  stroke: rgba(159, 176, 170, 0.18);
  stroke-width: 1;
}

.price-path,
.vwap-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.price-path {
  stroke: var(--cyan);
  stroke-width: 3;
}

.vwap-path {
  stroke: var(--amber);
  stroke-width: 2;
  stroke-dasharray: 7 7;
}

.volume-bar {
  fill: rgba(159, 176, 170, 0.32);
}

.volume-bar.bearish {
  fill: rgba(255, 111, 125, 0.5);
}

.volume-bar.bullish {
  fill: rgba(64, 211, 138, 0.5);
}

.volume-bar.watch {
  fill: rgba(255, 204, 102, 0.5);
}

.chart-marker {
  stroke: #101615;
  stroke-width: 2;
}

.chart-marker.bearish {
  fill: var(--bear);
}

.chart-marker.bullish {
  fill: var(--bull);
}

.chart-marker.watch {
  fill: var(--amber);
}

.chart-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-label.right {
  text-anchor: end;
}

.chart-time-tick {
  stroke: rgba(159, 176, 170, 0.2);
  stroke-width: 1;
}

.chart-time-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
}

.component-list {
  display: grid;
  gap: 10px;
}

.component-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  row-gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #101615;
}

.component-dot {
  width: 12px;
  height: 12px;
  grid-row: span 2;
  border-radius: 50%;
  background: var(--muted);
}

.component-row strong {
  font-size: 0.92rem;
}

.component-row em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

.component-row.active .component-dot,
.component-row.watch .component-dot {
  background: var(--amber);
}

.component-row.bearish .component-dot {
  background: var(--bear);
}

.component-row.bullish .component-dot {
  background: var(--bull);
}

.last-signal-list {
  display: grid;
  gap: 10px;
}

.last-signal-card {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  padding: 12px;
  background: #101615;
}

.last-signal-card.bullish {
  border-left-color: var(--bull);
}

.last-signal-card.bearish {
  border-left-color: var(--bear);
}

.last-signal-card.watch {
  border-left-color: var(--amber);
}

.last-signal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  font-weight: 900;
}

.last-signal-title span {
  color: var(--text);
  font-weight: 900;
}

.last-signal-meta,
.last-signal-stats,
.last-signal-range {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.last-signal-stats,
.last-signal-range {
  margin-top: 4px;
}

.signal-pill.watch {
  color: #1c1505;
  background: var(--amber);
}

.signal-pill.bullish {
  color: #052015;
  background: var(--bull);
}

.signal-pill.bearish {
  color: #25080c;
  background: var(--bear);
}

.signal-pill.neutral {
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
}

.value-positive {
  color: var(--bull);
}

.value-negative {
  color: var(--bear);
}

.exhaustion-workspace table {
  min-width: 760px;
}

.history-pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.history-page-button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #101615;
  font-weight: 900;
}

.history-page-button:hover,
.history-page-button.active {
  color: #07130f;
  border-color: var(--accent);
  background: var(--accent);
}

.history-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.signal-history-row.bearish {
  background: rgba(255, 111, 125, 0.07);
}

.signal-history-row.bullish {
  background: rgba(64, 211, 138, 0.07);
}

.signal-history-row.watch {
  background: rgba(255, 204, 102, 0.07);
}

@media (max-width: 1180px) {
  .exhaustion-metrics,
  .exhaustion-control-grid,
  .exhaustion-visual-grid,
  .exhaustion-workspace,
  .multi-chart-grid {
    grid-template-columns: 1fr;
  }

  .score-ring {
    width: 78px;
  }
}

@media (min-width: 1181px) and (max-width: 1400px) {
  .multi-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .exhaustion-chart,
  .multi-chart-canvas {
    min-height: 360px;
  }

  .exhaustion-workspace {
    gap: 12px;
  }

  .last-signal-list {
    max-height: 540px;
  }

  .history-page-button {
    width: 32px;
    height: 32px;
  }
}
