The issue is .card { grid-column: span 4; } while the desktop grid has only 3 columns, so each card tries to span more columns than available. I would change it to grid-column: span 1 or remove that property entirely. The mobile breakpoint is fine, but I would also check whether the 120px minimum column width causes overflow on smaller screens.
Spot the Bug answer: The .card element spans 4 columns, but the grid only has 3 columns (or 1 on small screens).
The fix: .card{ grid-column: span 1; }
Why:
The ‘span 4’ declaration for .card forces it to try and occupy more columns than are available in the .dashboard grid. This will cause layout issues, as the card will overflow its intended grid area or behave unexpectedly. Changing it to ‘span 1’ ensures it occupies a single column, fitting correctly within the defined grid structure.
Bonus round: How would you modify the CSS to make the card span two columns specifically when the screen is wider than 768px, but only one column on smaller screens?
For the bonus round I’d keep the base card at one column, then only widen it once you’re past 768px. That way the small-screen case stays safe instead of depending on the old span 4.