Theory and practice of delegation to non-majoritarian institutions