/**
 * Command-center viz primitives (SVG/CSS). Bind via frontend/js/viz/*.js
 */
.to-viz-ring {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  position: relative;
}
.to-viz-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.to-viz-ring .track { fill: none; stroke: var(--to-slate-200); stroke-width: 10; }
.to-viz-ring .value { fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset var(--motion-slow) var(--ease-out); }
.to-viz-ring .label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.to-viz-ring .label strong { display: block; font-size: 1.35rem; color: var(--text-main); }
.to-viz-ring .label span { font-size: var(--text-micro); color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }

.to-viz-sparkline { display: block; width: 100%; height: 36px; }
.to-viz-sparkline path { fill: none; stroke: var(--primary); stroke-width: 2; }
.to-viz-sparkline .area { fill: var(--primary-subtle); stroke: none; opacity: 0.9; }

.to-viz-bars { display: flex; flex-direction: column; gap: 0.55rem; }
.to-viz-bars .row { display: grid; grid-template-columns: minmax(4rem, 8rem) 1fr auto; gap: 0.5rem; align-items: center; font-size: var(--text-small); }
.to-viz-bars .track { height: 8px; background: var(--to-slate-100); border-radius: var(--radius-full); overflow: hidden; }
.to-viz-bars .fill { height: 100%; background: var(--primary); border-radius: inherit; transition: width var(--motion-slow) var(--ease-out); }
.to-viz-bars .meta { font-family: var(--font-mono); color: var(--text-muted); font-size: var(--text-micro); }

.to-viz-heatmap {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(auto-fill, minmax(14px, 1fr));
}
.to-viz-heatmap .cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--to-slate-100);
}
.to-viz-heatmap .cell[data-level="1"] { background: #dbeafe; }
.to-viz-heatmap .cell[data-level="2"] { background: #93c5fd; }
.to-viz-heatmap .cell[data-level="3"] { background: #3b82f6; }
.to-viz-heatmap .cell[data-level="4"] { background: #1d4ed8; }

.to-viz-timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border-subtle); }
.to-viz-timeline li {
  position: relative;
  padding: 0 0 1rem 1rem;
  margin-left: 0.35rem;
}
.to-viz-timeline li::before {
  content: "";
  position: absolute;
  left: -0.55rem;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--primary-border);
}
.to-viz-timeline .when {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--text-muted);
}
.to-viz-timeline .what { font-size: var(--text-body); color: var(--text-primary); margin-top: 0.15rem; }
