        <header class="page-heading"><p class="eyebrow">ECONOMÍA POSTESCASA</p><h1>Frontera estratégica</h1><p>Produce ocho recursos raros, combina industrias planetarias y construye megaproyectos únicos que cambian permanentemente las reglas de tu imperio.</p></header>
        <section class="metric-grid" aria-label="Estado de la frontera tecnológica">
          <article><span>Recursos estratégicos</span><strong>{{ strategic_resources.values()|sum|round(1) }}</strong><small>unidades combinadas</small></article>
          <article><span>Industrias activas</span><strong>{{ strategic_industry_count }}</strong><small>tipos de producción</small></article>
          <article><span>Megaproyectos</span><strong>{{ completed_projects }}</strong><small>completados</small></article>
          <article><span>Construcción colosal</span><strong>{{ 'Activa' if active_projects else 'Disponible' }}</strong><small>solo una simultánea</small></article>
        </section>
        <section class="panel" aria-labelledby="strategic-resource-title"><div class="panel-heading"><div><p class="eyebrow">RESERVA IMPERIAL</p><h2 id="strategic-resource-title">Recursos estratégicos</h2></div><a href="{{ url_for('game_view', section='economy') }}">Construir industrias</a></div><div class="table-wrap"><table><caption>Cantidades compartidas por todos los planetas y producción por hora de universo.</caption><thead><tr><th scope="col">Recurso</th><th scope="col">Descripción</th><th scope="col">Reserva</th><th scope="col">Producción por hora</th></tr></thead><tbody>{% for key, resource in STRATEGIC_RESOURCES.items() %}<tr><th scope="row">{{ resource.name }}</th><td>{{ resource.description }}</td><td>{{ strategic_resources[key]|round(1) }}</td><td>+{{ (strategic_rates[key] * game.speed)|round(2) }}</td></tr>{% endfor %}</tbody></table></div></section>
        {% if active_projects %}<section class="active-queue" data-project-id="{{ active_projects[0].id }}" aria-labelledby="project-active-title">{% set project = active_projects[0] %}<div><span>Megaproyecto en construcción</span><strong id="project-active-title">{{ MEGAPROJECTS[project.project_key].name }}</strong></div><div class="queue-time"><span>Tiempo restante</span><time class="countdown" data-end="{{ project.completes_at }}">{{ (project.completes_at-now)|duration }}</time></div></section>{% endif %}
        <section aria-labelledby="megaproject-title"><h2 id="megaproject-title" class="section-title">Megaproyectos imperiales</h2><div class="card-grid">{% for project in project_rows %}<article class="tech-card"><div class="card-number" aria-hidden="true">{{ '%02d'|format(loop.index) }}</div><div class="card-copy"><h3>{{ project.definition.name }}</h3><p>{{ project.definition.description }}</p>{% if project.missing %}<p class="requirement">Requiere: {{ project.missing|join(', ') }}</p>{% endif %}<h4>Recursos planetarios</h4><dl class="cost-list">{% for key, value in project.definition.core.items() %}<div><dt>{{ {'metal':'Metal','crystal':'Cristal','deuterium':'Deuterio'}[key] }}</dt><dd>{{ value|number }}</dd></div>{% endfor %}<div><dt>Tiempo</dt><dd>{{ project.duration|duration }}</dd></div></dl><h4>Recursos estratégicos</h4><ul class="compact-list">{% for key, value in project.definition.special.items() %}<li>{{ STRATEGIC_RESOURCES[key].name }}: {{ value }}</li>{% endfor %}</ul><h4>Efectos permanentes</h4><ul class="compact-list">{% for key, value in project.definition.bonuses.items() %}<li>+{{ (value * 100)|round|int }} % {{ PROJECT_BONUS_NAMES[key] }}</li>{% endfor %}</ul></div>{% if project.state %}<p class="project-state" role="status"><strong>{{ 'Completado' if project.state.status == 'completed' else 'En construcción' }}</strong></p>{% else %}<form method="post" action="{{ url_for('megaproject_action') }}"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><input type="hidden" name="project" value="{{ project.key }}"><button class="button button-primary" type="submit" {% if active_projects or not project.met %}disabled{% endif %}>Iniciar megaproyecto</button></form>{% endif %}</article>{% endfor %}</div></section>
