Hillary did not “nearly” win.
Actually, she did.
Re-distribute 200,000 votes over the three critical states of MI, WI and PA and she wins.
(Of course, that cuts both ways...Trump was pretty close in MN and NH).