Nature Restoration Law survives knife-edge vote in the European Parliament amid right-wing backlash