/* Financial meaning stays consistent across appearance palettes. */
:root {
  --feedback-favorable: #166534;
  --feedback-costlier: #a52233;
  --feedback-neutral: #59616b;
}

/* Explicit semantic classes override decorative theme and inherited colours. */
.feedback-favorable { color: var(--feedback-favorable) !important; }
.feedback-costlier { color: var(--feedback-costlier) !important; }
.feedback-neutral { color: var(--feedback-neutral) !important; }

.tradeoff-cash,
.tradeoff-quantity,
.tradeoff-unit {
  font-variant-numeric: tabular-nums;
}

/* One purchase can cost more at checkout and less per unit. Keep the shared
   panel neutral so each amount communicates its own comparison. */
.coop-product .tradeoff:has(.tradeoff-cash),
.replacement-card .tradeoff:has(.tradeoff-cash),
.habits-view .habit-purchase:has(.tradeoff-cash) {
  background: var(--soft, #f2f4f3);
  border-color: var(--line, #dce3df);
  color: var(--ink, #26332d);
}

.habits-view .habit-purchase .tradeoff-unit {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.45;
}

@media (forced-colors: active) {
  .feedback-favorable,
  .feedback-costlier,
  .feedback-neutral { color: CanvasText !important; }
}
