{% from "_provenance_macros.html" import provenance_link %} {% set _profile = profile if profile is defined else None %} {# ── Cash subtitle helper (free / pledged share + net contributed) ──────── #} {% macro cash_breakdown_subtitle(cash_kpis, csp_total, csp_n) %} {% set _csp = (csp_total|float) if csp_total is defined and csp_total else 0 %} {% set _cash = (cash_kpis.cash_balance|float) if cash_kpis else 0 %} {% set _free = _cash - _csp %} {% if _csp > 0 and cash_kpis %} {% set _pledged_pct = (_csp / _cash * 100) if _cash > 0 else 0 %}