{% extends 'base.html' %}{% from 'macros.html' import idea_card,signal_card,empty with context %} {% block content %}
{{ t('kz_focus') }}

{{ t('welcome') }}

{{ t('subtitle') }}

{% if user.role in ['admin','analyst'] %}
{% endif %}{{ t('ideas') }} ↗
{% if running %}

◌ {{ t('running') }}

{% endif %}
{% for label,value,icon in [('new_trends',new_trends,'◎'),('opportunities',ideas_count,'◇'),('collected_signals',total,'⌁'),('directions',directions,'▦')] %}
{{ t(label) }}{{ icon }}
{{ value }}
{% if label=='collected_signals' %}{{ '+' if recent>=prior }}{{ recent-prior }} · {{ t('new_signals') }}: {{ recent }}
{{ t('signals') }}: {{ analyzed }}{% else %}{{ t('hypothesis') if label=='opportunities' else t('materials') }}{% endif %}
{% endfor %}

✧ {{ t('weekly') }}

{{ t('weekly_hint') }}

{{ t('view_all') }} ↗
{% for item in top %}{{ idea_card(item,loop.index) }}{% else %}{{ empty(true) }}{% endfor %}

{{ t('trend_map') }}

↗
{% for item in grouped %}{{ item.category }}{{ item.n }} {{ t('materials')|lower }}{% else %}{{ empty() }}{% endfor %}
✧{{ t('recommendation') }}{% if top %}

{{ t('recommend_prefix') }} {{ category_label(top[0].category) }}

{{ json_load(top[0].data).recommendation }}

{{ t('demo') if top[0].mock else t('hypothesis') }}{{ t('open_idea') }} →{% else %}

{{ t('empty_ideas') }}

{{ t('recommend_hint') }}

{% endif %}

{{ t('world_news') }}

{{ t('sources_hint') }}

{{ t('view_all') }} ↗
{% for item in news %}{{ signal_card(item) }}{% else %}{{ empty() }}{% endfor %}
{% endblock %}