SMS dit: Classical and geometrical theory of chemical and phase thermodynamics