CSS container queries style a component by its own width, not the viewport. Learn container-type, named containers, query units, and the traps that break layouts.