2004 Sportsman 600 Wiring Harness(newbie)

All, Needing some help… While riding over the weekend, during a short break went to start the atv back up and It started but smoked boiled out from main center housing. The ignition is now shot and the Brown wire burned all the insulation off down to the first splice housing. It’s been garage kept and has low miles, I’m the original owner, Hate to see her go…

Questions:
1. What could have caused it?
2. How hard could it be to fix?
3. Replace the brown wire and ignition? or the entire wiring harness?

Thoughts? And Thanks!
Rob