{% set phase_colors = {'discovery': '#f59e0b', 'phase1': '#60a5fa', 'phase2': '#4ade80'} %}
{% set phase_labels = {'discovery': 'Discovery Phase', 'phase1': 'Phase 1 — Target Foundation', 'phase2': 'Phase 2 — Target Integration (FY2027)'} %}
{% set phase_css = {'discovery': 'discovery', 'phase1': 'phase1', 'phase2': 'phase2'} %}
{% for phase_slug in ['discovery', 'phase1', 'phase2'] %}
{% set acts = activities_by_phase.get(phase_slug, []) %}
{% set pstat = phases_status|selectattr('slug', 'eq', phase_slug)|first %}
{% set color = phase_colors[phase_slug] %}
{% set pct = pstat.pct_complete if pstat else 0 %}
{{ pct }}%
{{ phase_labels[phase_slug] }}
{% if pstat %}{{ pstat.complete }}/{{ pstat.total }} activities complete • {{ pstat.in_progress }} in progress{% endif %}
{{ pstat.complete if pstat else 0 }} done{{ pstat.in_progress if pstat else 0 }} active{{ pstat.not_started if pstat else 0 }} pending
{% set grouped = {} %}
{% for act in acts %}
{% if act.pillar_slug not in grouped %}{% set _ = grouped.update({act.pillar_slug: []}) %}{% endif %}
{% set _ = grouped[act.pillar_slug].append(act) %}
{% endfor %}
{% for pillar_slug, pillar_acts in grouped.items() %}