What layout thrashing looks like
Reading measurements and writing styles in the same loop creates avoidable cost.
If you ask for `offsetHeight` or `getBoundingClientRect()` and immediately mutate styles on every iteration, the browser may recalculate layout again and again.
That pattern becomes especially visible in long lists, repeated filters and animation-like updates.