The origin of life as a planetary phenomenon