/* BMI Calculator — a form (measurements card + result card) from
   styles/components/form.css. The inputs are shared unit fields
   (--fill); only the category scale is the page's own. */

.bmi-cat { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

/* Scale 12–42 BMI → 0–100%: 18.5 → 21.67%, 25 → 43.33%, 30 → 60%. The legend
   uses the same four widths, so each label sits under its own band. */
.bmi-gauge {
  --b1: 21.67fr; --b2: 21.66fr; --b3: 16.67fr; --b4: 40fr;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
  max-width: 420px;
  padding-top: var(--space-3);
}
.bmi-scale { position: relative; }
.bmi-scale__bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: linear-gradient(to right,
    var(--accent) 0%, var(--accent) 21.67%,
    var(--success, #34C759) 21.67%, var(--success, #34C759) 43.33%,
    var(--warning, #FF9500) 43.33%, var(--warning, #FF9500) 60%,
    var(--danger, #FF3B30) 60%, var(--danger, #FF3B30) 100%);
}
.bmi-scale__marker {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--text);
  box-shadow: 0 0 0 2px var(--bg-elev);
  transform: translateX(-50%);
  transition: left var(--duration-snap) var(--ease-standard);
}

.bmi-legend {
  display: grid;
  grid-template-columns: minmax(0, var(--b1)) minmax(0, var(--b2)) minmax(0, var(--b3)) minmax(0, var(--b4));
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-dim);
}
.bmi-legend > li {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Cells share the row's height; a band name that wraps must not push its
     range below the other three. */
  justify-content: space-between;
  padding-inline: 2px;
  text-align: center;
}
.bmi-legend__range {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
