/* ==========================================================================
   Parallel Machines / live.css
   Internals of the live instruments, on top of the design-system components
   (components.css owns the frames: .kpi-strip / .kpi / .kpi__num, .status-dot,
   .live-chip, .source-line, .fig). This file adds only what the live client needs:
     - KPI digits that fit their tile (container query) and an unambiguous
       decimal point (Doto draws "." as a five-dot cross)
     - extra status-dot states (paused, stale): status by shape, never colour
     - the status line with endpoint · head · lag (Pulse, lab)
     - the block-river frame
   ========================================================================== */

/* ---------- KPI tiles built by live/kpi.js (mountKpiRow) ---------- */
.kpi[data-kpi] { container-type: inline-size; }
.kpi[data-kpi] .kpi__num {
  display: inline-flex;
  align-items: baseline;
  /* 10 Doto glyphs ("12,422,657") are ~5.9em wide: keep them inside the tile */
  font-size: min(var(--fs-num, 3.5rem), 15.5cqi);
}
.kpi__point {
  display: inline-block;
  flex: none;
  width: .1em;
  height: .1em;
  margin: 0 .09em 0 .07em;
  background: currentColor;
}
.kpi[data-kpi] .kpi__spark { --pc-h: 44px; }
.kpi[data-kpi] .kpi__foot { flex-direction: column; justify-content: flex-start; gap: 2px; }
.kpi__note:empty { display: none; }
.kpi-strip[data-mode="snapshot"] .kpi__num,
.kpi-strip[data-mode="stale"] .kpi__num { opacity: .8; }

/* ---------- status dot: states the design system does not define ---------- */
.status-dot[data-state="paused"] { opacity: .55; }
.status-dot[data-state="stale"] { background: none; box-shadow: inset 0 0 0 1px currentColor; opacity: .7; }

/* ---------- status line: [dot] LIVE  evm.peaq.network · head #… · lag 0 blocks · block 3 s ago ---------- */
.live-status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: var(--fs-label, .75rem);
  line-height: 1.4;
  letter-spacing: var(--tr-label, .08em);
  text-transform: uppercase;
  color: var(--fg-2, currentColor);
}
.live-status__label { font-weight: 600; color: var(--fg, currentColor); }
.live-status__meta {
  text-transform: none;
  letter-spacing: .02em;
  color: var(--fg-3, currentColor);
  font-variant-numeric: tabular-nums;
}

/* ---------- block river frame ---------- */
/* one column that never grows past its box: the data table under the river scrolls inside its own frame */
.river { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.river .pc-river { --pc-h: var(--river-h, 132px); }

/* screen-reader-only fallback (base.css has .sr-only too) */
.live-announcer,
.live-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (forced-colors: active) {
  .kpi__point { background: CanvasText; }
}
