Unified Theory for Solar Energetic Particles: Basic Composition, 3He-Rich Events, and Prompt Ion Acceleration