import { fmtSigned } from '../utils/format.js'; const COMPONENTS = [ { key: 'base_reward', label: 'Base (prosperity)' }, { key: 'productivity_bonus', label: 'Productivity bonus' }, { key: 'survival_bonus', label: 'Survival bonus' }, { key: 'over_alloc_penalty', label: 'Over-alloc penalty' }, { key: 'under_alloc_penalty', label: 'Under-alloc penalty' }, { key: 'critical_penalty', label: 'Critical penalty' }, ]; export default function RewardCard({ reward, cumulative }) { if (!reward) return null; const max = Math.max( 1, ...COMPONENTS.map(c => Math.abs(reward[c.key] || 0)), ); return (