@php $words = preg_split('/\s+/', trim($text)); @endphp @foreach ($words as $word) @php // Make bar width roughly match word length, but clamped $len = mb_strlen($word); $width = min(5 + $len * 8, 80); // px @endphp @endforeach {{-- keep text for screen readers but visually hidden --}} {{ $text }}