Another “draw order” thing that’s perhaps worth mentioning is the z_order handling for roads that OSM Carto uses: https://github.com/gravitystorm/openstreetmap-carto/blob/master/openstreetmap-carto.lua#L180 .