The @layer rule lets you group styles into named cascade layers and explicitly order them. Later layers always win over earlier ones, regardless of specificity inside.
The big win is interop: a Tailwind layer, a reset layer, and a custom-components layer can coexist without escalating specificity wars. @layer reset, base, components, utilities declares the order up front.
Anything outside a layer wins over anything inside a layer — useful for one-off overrides, but disable it in vendor CSS by importing into a fallback layer.