/* ============================================================================
   PROGRESS
   Conic ring (56-64px) and the per-session segment bar.
   --ring-pct is a plain number (0-100) set inline as a custom property.
   ============================================================================ */

.progress-ring {
  --ring-pct: 0;
  --ring-size: 60px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ring-size);
  height: var(--ring-size);
  border-radius: var(--r-pill);
  flex-shrink: 0;
  background: conic-gradient(var(--ac) calc(var(--ring-pct) * 1%), var(--ac-bg) 0);
}

/* The track is about 11% of the diameter: 7px on the 64px Today ring,
   6px on the 56px phone ring */
.progress-ring::before {
  content: "";
  position: absolute;
  inset: calc(var(--ring-size) * 0.11);
  border-radius: var(--r-pill);
  background: var(--bg);
}

.progress-ring-label {
  position: relative;
  font: var(--fw-bold) 15px/1 var(--font);
  color: var(--tx);
  font-variant-numeric: tabular-nums;
}

.segment-bar {
  display: flex;
  gap: 3px;
}

.segment-bar-item {
  height: 8px;
  flex: 1;
  border-radius: var(--r-pill);
  background: var(--nx-track);
}

.segment-bar-item.is-done {
  background: var(--ac);
}

/* Effort chart: 12 bars, colour by effort band */
.effort-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}

.effort-chart-bar {
  --bar-pct: 0;
  width: 100%;
  height: calc(var(--bar-pct) * 1%);
  min-height: 4px;
  border-radius: 4px 4px 3px 3px;
  background: var(--ac-bg);
}

/* Solid fills (the band's -solid token, not the pastel pill tint or its
   -tx text color) to read as data at a glance in both themes. */
.effort-chart-bar--high { background: var(--mint-solid); }
.effort-chart-bar--mid  { background: var(--butter-solid); }
.effort-chart-bar--low  { background: var(--peach-solid); }
.effort-chart-bar--no-show { background: var(--line); }

/* Phone mini strip: "8.1 effort lately" + a short row of thin bars */
.effort-chart--mini {
  height: 24px;
  gap: 3px;
}

.effort-chart--mini .effort-chart-bar {
  border-radius: 2px;
}

.effort-chart-mini-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.effort-chart-mini-label {
  flex-shrink: 0;
  font: var(--fw-bold) 15px/20px var(--font);
  color: var(--tx);
  font-variant-numeric: tabular-nums;
}

.effort-chart-mini-label span {
  display: block;
  font: var(--fw-regular) 12px/16px var(--font);
  color: var(--tx3);
}

/* Insights "Effort"/"Trend" breakdown bar: one horizontal segmented bar,
   solid-filled proportional sections. */
.breakdown-bar {
  display: flex;
  height: 10px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--sf2);
}

.breakdown-bar-segment {
  --segment-w: 0%;
  height: 100%;
  width: var(--segment-w);
  background: var(--segment-colour);
}
