<div class="border-t pt-4 mt-2" style="border-color: var(--border-default);">
  <h3 class="text-sm font-semibold mb-3" style="color: var(--text-primary);">Corpus Drilldown</h3>

  {# Total Triples + Readiness #}
  <div class="flex items-center gap-4 mb-4">
    <div>
      <p class="text-xs uppercase" style="color: var(--text-muted);">Total Triples</p>
      <p class="text-2xl font-bold" style="color: var(--text-primary);">{{ "{:,}".format(corpus.total_triples) }}</p>
    </div>
    <div>
      <p class="text-xs uppercase" style="color: var(--text-muted);">Phase C Readiness</p>
      <p class="text-lg">
        {% if corpus.readiness == "green" %}
          <span class="inline-flex items-center px-2 py-1 rounded text-xs font-bold" style="background: #dcfce7; color: #166534;">500+ Ready</span>
        {% elif corpus.readiness == "yellow" %}
          <span class="inline-flex items-center px-2 py-1 rounded text-xs font-bold" style="background: #fef9c3; color: #854d0e;">100-499 Building</span>
        {% else %}
          <span class="inline-flex items-center px-2 py-1 rounded text-xs font-bold" style="background: #fef2f2; color: #991b1b;">&lt;100 Early</span>
        {% endif %}
      </p>
    </div>
  </div>

  {# Resource Type Distribution #}
  {% if corpus.resource_type_distribution %}
  <div>
    <p class="text-xs uppercase mb-2" style="color: var(--text-muted);">Resource Type Distribution</p>
    <table class="w-full text-sm">
      <thead>
        <tr style="color: var(--text-muted);">
          <th class="text-left text-xs uppercase py-1">Type</th>
          <th class="text-right text-xs uppercase py-1">Count</th>
        </tr>
      </thead>
      <tbody>
        {% for rtype, count in corpus.resource_type_distribution.items() %}
        <tr style="border-bottom: 1px solid var(--border-default);">
          <td class="py-1" style="color: var(--text-primary);">{{ rtype }}</td>
          <td class="py-1 text-right font-medium" style="color: var(--text-primary);">{{ count }}</td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
  {% endif %}
</div>
