Hydrocarbons as Recorders of Cosmic Environments