A short CSS tutorial showing how to build a layout that chooses its own number of columns based on how many child elements it contains, using :has(), :nth-child() and :last-child without extra classes or JavaScript. It also covers making the column count configurable and setting an upper limit with :not().