/* dash-marketwatch.css — GPU compute spot-market monitor.
   Engineering-schematic flavor in the dash.css mission-control
   palette: dark navy ground, cyan readouts, tight monospaced
   tabular numerics. Color codes per row tone:
     .tone-best     — cheapest in class (green)
     .tone-worst    — most expensive (amber/rose)
     .tone-muted    — 0-offer / no-data rows
*/

.marketwatch-page .mc-stage { padding-bottom: 100px; }
.marketwatch-stage {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 28px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.marketwatch-intro {
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--line-mid);
  border-radius: 4px;
}

.marketwatch-intro h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  color: var(--cyan-soft);
}

.marketwatch-lede {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-1);
  max-width: 880px;
  margin: 0 0 10px;
}

.marketwatch-lede:last-child { margin-bottom: 0; }

.marketwatch-lede code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-strip);
  padding: 1px 5px;
  border-radius: 2px;
  color: var(--amber-0);
}

.marketwatch-h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-deep);
  margin: 0 0 12px;
}

.marketwatch-table-card {
  background: var(--bg-card);
  border: 1px solid var(--line-mid);
  border-radius: 4px;
  padding: 16px 18px;
  overflow-x: auto;
}

.marketwatch-table {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-1);
}

.marketwatch-table th {
  text-align: left;
  padding: 6px 12px 10px;
  border-bottom: 1px solid var(--line-mid);
  font-weight: 500;
  color: var(--cyan-deep);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: 10.5px;
}

.marketwatch-table th.num,
.marketwatch-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.marketwatch-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.marketwatch-table tbody tr:last-child td {
  border-bottom: none;
}

.marketwatch-table tbody tr:hover {
  background: var(--bg-card-hot);
}

.marketwatch-table .class-name {
  color: var(--ink-0);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.marketwatch-table .cheapest-cell {
  color: var(--ink-1);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.marketwatch-table .cheapest-provider {
  color: var(--cyan-soft);
  font-weight: 500;
}

.marketwatch-table .cheapest-region {
  color: var(--ink-2);
}

.marketwatch-table .cheapest-verified {
  color: var(--green-ok);
  margin: 0 4px;
}

.marketwatch-table .cheapest-verified.unverified {
  color: var(--ink-3);
}

.marketwatch-table .cheapest-reliability {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* Row tones */
.marketwatch-table .tone-best {
  background: rgba(76, 217, 152, 0.05);
}
.marketwatch-table .tone-best .class-name {
  color: var(--green-ok);
}

.marketwatch-table .tone-worst {
  background: rgba(255, 186, 73, 0.05);
}
.marketwatch-table .tone-worst .class-name {
  color: var(--amber-0);
}

.marketwatch-table .tone-muted {
  color: var(--ink-3);
}
.marketwatch-table .tone-muted .class-name {
  color: var(--ink-3);
}
.marketwatch-table .tone-muted td.num,
.marketwatch-table .tone-muted .cheapest-cell {
  color: var(--ink-3);
}

.marketwatch-loading {
  text-align: center;
  color: var(--ink-3);
  font-style: italic;
  padding: 14px;
  letter-spacing: 0.10em;
}

/* ── sparkline column ─────────────────────────────────────── */
.marketwatch-table .th-spark {
  text-align: left;
}

.marketwatch-table .class-spark {
  padding: 4px 12px;
  min-width: 130px;
}

.spark-svg {
  display: block;
  width: 100%;
  max-width: 160px;
  min-width: 80px;
  height: 28px;
  overflow: visible;
}

.spark-axis {
  stroke: var(--line-mid);
  stroke-width: 1;
}

.spark-line {
  fill: none;
  stroke: var(--cyan-0);          /* baseline: cyan readout */
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: spark-draw 1100ms ease-out forwards;
}

.spark-dot-last {
  fill: var(--cyan-soft);
  stroke: var(--cyan-0);
  stroke-width: 0.8;
  filter: drop-shadow(0 0 3px rgba(73, 210, 255, 0.55));
}

.spark-empty {
  fill: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

/* Sparkline colour follows the row tone so the trend reads at-a-glance */
.tone-best .spark-line       { stroke: var(--green-ok); }
.tone-best .spark-dot-last   { fill: var(--green-ok); stroke: var(--green-ok);
                               filter: drop-shadow(0 0 3px rgba(76, 217, 152, 0.55)); }

.tone-worst .spark-line      { stroke: var(--amber-0); }
.tone-worst .spark-dot-last  { fill: var(--amber-0); stroke: var(--amber-0);
                               filter: drop-shadow(0 0 3px rgba(255, 186, 73, 0.55)); }

.tone-muted .spark-line      { stroke: var(--ink-3); }
.tone-muted .spark-dot-last  { fill: var(--ink-3); stroke: var(--ink-3);
                               filter: none; }

@keyframes spark-draw {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 720px) {
  .marketwatch-stage { padding: 12px; }
  .marketwatch-table { font-size: 11px; }
  .marketwatch-table th, .marketwatch-table td { padding: 6px 8px; }
  .marketwatch-table .class-spark { min-width: 90px; padding: 4px 6px; }
  .spark-svg { max-width: 110px; min-width: 80px; height: 24px; }
  .cheapest-cell { font-size: 10.5px; }
}

.marketwatch-table-mini { font-size: 12px; }

.marketwatch-footnote {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 880px;
}

.marketwatch-footnote code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cyan-soft);
  background: var(--bg-strip);
  padding: 1px 4px;
  border-radius: 2px;
}
