/* ── Analytics: the activity chart and the surface meters ──
   Split from dashboard.css at the line ceiling (docs/IMPLEMENTATION.md §15).
   One measure over time = one hue, no legend; columns capped at 24px with a
   2px surface gap; meters are the part-to-whole form that is not a pie. */

/* ── Charts ─────────────────────────────────────────────────
   One measure over time = one hue, no legend (the title names it).
   Marks: columns capped at 24px, 4px rounded cap and square at the
   baseline, 2px surface gap between neighbours, hairline recessive axis. */

.chart { display: flex; flex-direction: column; gap: 10px; }

.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chart-title { font-size: 14.5px; font-weight: 500; }
.chart-sub { font-size: 12.5px; color: var(--subtle); }

.chart-plot {
  display: flex;
  align-items: flex-end;
  gap: 2px;                      /* the surface gap, one consistent width */
  height: 132px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line);
}

.chart-col {
  flex: 1;
  min-width: 0;
  max-width: 24px;               /* never fill the slot -- the rest is air */
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: flex-end;
  position: relative;
  cursor: default;
}

.chart-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 4px 4px 0 0;    /* rounded data-end, square at the baseline */
  min-height: 2px;
  transition: opacity 0.15s var(--ease);
}

.chart-col:hover .chart-bar { opacity: 0.75; }

.chart-col .chart-tip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -6px);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--bg-raised);
  border: 1px solid var(--line-hi);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s var(--ease);
  z-index: 3;
}

.chart-col:hover .chart-tip { opacity: 1; }
.chart-tip b { font-weight: 600; }

.chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
}

/* Meter list — part-to-whole without a pie, same-ramp track */
.meter-list { display: flex; flex-direction: column; gap: 12px; }
.meter-row { display: flex; flex-direction: column; gap: 6px; }
.meter-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.meter-head span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.meter-track { height: 6px; border-radius: var(--r-pill); background: var(--accent-soft); overflow: hidden; }
.meter-fill { height: 100%; border-radius: var(--r-pill); background: var(--accent); }

/* Phones: a shorter plot with hairline gaps keeps thirty columns legible at
   360px, and the tips go — they are hover-only, and a phone has no hover. */
@media (max-width: 700px) {
  .chart-plot { height: 104px; gap: 1px; }
  .chart-col .chart-tip { display: none; }
}
