Media queries respond to the viewport. Container queries respond to the size of a component's parent, so the same card can be compact in a sidebar and spacious in the main column — true component-level responsiveness. How to use them Mark an ancestor as a container: container-type: inline-size (optionally container-name). Write @container (min-width: 400px) { … } rules for its descendants. Use container units like cqi (1% of the container's inline size) for fluid sizing. Other modern layout tools aspect-ratio — keep media boxes at 16 / 9 without padding hacks. gap — works in flexbox as well as grid. subgrid — child grids align to the parent grid's tracks. Logical properties — margin-inline, padding-block, inset-inline-start adapt to right-to-left languages automatically. min(), max()…