{# brutalist popular-posts override — compact ranked list from the `posts` provider. Fields: heading, posts[], showRank, showThumbnail. #}
<section class="bg-background text-foreground{% if class %} {{ class }}{% endif %}">
{% if heading %}<h2 class="bru-meta mb-4 text-foreground">{{ heading }}</h2>{% endif %}
<ol class="space-y-3">
{% for post in posts %}
<li class="bru-slab bru-shadow-sm bru-hover flex items-start gap-3 p-3">
{% if showRank %}<span class="bru-index" style="font-size:1.5rem;line-height:1">{{ forloop.Counter }}</span>{% endif %}
{% if showThumbnail and post.featured_image_url %}<a href="{{ post.url }}" class="h-12 w-12 flex-shrink-0 overflow-hidden bg-muted" style="border:2px solid hsl(var(--border))">{% img post.featured_image_url alt=post.title class="h-full w-full object-cover" %}</a>{% endif %}
<div class="min-w-0">
<h3 class="bru-kicker text-sm leading-snug" style="text-transform:none"><a href="{{ post.url }}" class="transition-colors hover:text-accent">{{ post.title }}</a></h3>
{% if post.published_at %}<p class="bru-meta mt-0.5">{{ post.published_at|date:"M j, Y" }}</p>{% endif %}
</div>
</li>
{% endfor %}
</ol>
</section>
