{# Math explainer fragment for the Unrealized P/L KPI tile. Receives `b: UnrealizedBreakdown`. #}
| {{ line.symbol }} | {{ "{:,.2f}".format(line.qty|float) }} × ${{ "{:,.2f}".format(line.last_price|float) }} − basis ${{ "{:,.2f}".format(line.cost_basis|float) }} | {% if line.unrealized < 0 %}−{% elif line.unrealized > 0 %}+{% endif %}${{ "{:,.2f}".format(line.unrealized|float|abs) }} |
| Subtotal | {% if b.long_subtotal < 0 %}−{% else %}+{% endif %}${{ "{:,.2f}".format(b.long_subtotal|float|abs) }} | |