Thermodynamics and structure of the primitive model near its gas–liquid transition