So, where did the Democrats go wrong?

That’s part of it, due to how well she was doing in the Polls.

Another part is GOP voter Jim Crow laws.

Another part is the Bernie-Bros- they didnt know how to campaign* for* their candidate, so they bought Roves lies and kept using them against Hillary, even long after the Nomination was sealed up. I got a couple in my FB feed, they are still going on how the DNC stole the nomination from Bernie.

Karl Roves lies worked really well. He pushed really hard on the idea that both candidates were so crappy you might as well not vote.