diff --git a/index.html b/index.html index 97e020a..a6ee261 100644 --- a/index.html +++ b/index.html @@ -2159,6 +2159,13 @@ function updateROI() { const remaining = Math.max(deposits - earned, 0); document.getElementById('roiStatROI').querySelector('.roi-stat-value').textContent = roiPct.toFixed(1) + '%'; + // Green when past breakeven + const roiEl = document.getElementById('roiStatROI').querySelector('.roi-stat-value'); + if (roiPct >= 100) { + roiEl.style.color = '#22c55e'; + } else { + roiEl.style.color = ''; + } document.getElementById('roiStatRecouped').querySelector('.roi-stat-value').textContent = '$' + recouped.toFixed(2); document.getElementById('roiStatRemaining').querySelector('.roi-stat-value').textContent = remaining > 0 ? '$' + remaining.toFixed(2) : '+$' + Math.abs(remaining).toFixed(2); document.getElementById('roiBarROI').style.width = Math.min(roiPct, 100) + '%';