{% for up in farm.legacy %}
<div class="perk-card legacy-card">
    <span class="perk-icon" aria-hidden="true">{{ up.icon }}</span>
    <strong class="perk-name">{{ up.name }}</strong>
    <span class="perk-level">Lv {{ up.level }}/{{ up.max_level }}</span>
    <span class="perk-effect">{{ up.effect or up.description }}</span>
    {% if up.maxed %}
    <span class="perk-maxed">Maxed</span>
    {% else %}
    <form method="post" action="/game/legacy" data-game-action="legacy">
        <input type="hidden" name="key" value="{{ up.key }}">
        <button type="submit" class="btn btn-sm">Buy ({{ format_exact(up.cost) }} &#9733;)</button>
    </form>
    {% endif %}
</div>
{% endfor %}
