Magnetic Order, Electrical Doping, and Charge-State Coupling at Amphoteric Defect Sites in Mn-Doped 2D Semiconductors.