@php
// Phones: two cards per row. A card with an email is too wide for half a row, so it takes the full row.
// If the other cards would leave one alone in a row, the last of them takes the full row too.
$cards = array_values($c['cards'] ?? []);
$hasEmail = fn ($card) => str_contains((string) ($card['lines'] ?? ''), '@');
$plain = array_keys(array_filter($cards, fn ($card) => ! $hasEmail($card)));
$lonely = count($plain) % 2 === 1 ? end($plain) : null;
@endphp
@foreach ($cards as $i => $card)