<!-- Stats partial — returned by /api/stats/overview -->
<!-- Hero number -->
<div class="hero-section">
    <div class="hero-number" data-counter="{{ conversations }}">{{ "{:,}".format(conversations) }}</div>
    <div class="hero-label">Conversations</div>
</div>

<!-- Small stat cards -->
<div class="grid">
    <article class="stat-card">
        <hgroup>
            <span class="stat-icon">🏷️</span>
            <h2 data-counter="{{ topics }}">{{ "{:,}".format(topics) }}</h2>
            <p>Topics</p>
        </hgroup>
    </article>
    <article class="stat-card">
        <hgroup>
            <span class="stat-icon">⚡</span>
            <h2>{{ search_speed }}</h2>
            <p>Search speed</p>
        </hgroup>
    </article>
    <article class="stat-card"
             style="cursor:pointer"
             hx-get="/api/stats/health-summary.html"
             hx-target="#health-detail"
             hx-swap="innerHTML"
             hx-trigger="click"
             hx-on::after-request="this.classList.toggle('expanded')">
        <hgroup>
            <span class="stat-icon">✅</span>
            {% if tools_ok == tools_total %}
            <h2>All good</h2>
            <p>Everything's working ✓</p>
            {% else %}
            <h2>{{ tools_total - tools_ok }} need attention</h2>
            <p>{{ tools_ok }}/{{ tools_total }} tools working</p>
            {% endif %}
            <small><a href="/tools">See details →</a></small>
        </hgroup>
    </article>
</div>

<!-- Health detail expands here -->
<div id="health-detail"></div>
