Yes, if you’re reading this right now, you survived political doomsday and are here among the rest of us to pick through the ruins.

Somewhere amid the wreckage of smashed conventions and exploded institutions, you might find the tattered remains of predictions made just 18 months ago. All the experts then foresaw a contest between Hillary Clinton, the unchallenged heir apparent, and former Florida Gov. Jeb Bush, whose family suffered from an apparent hereditary disorder that forced them to return to the White House every eight years.

It seemed to promise a bloodless competition like the 2000 race between George W. Bush and Al Gore: two bland candidates with roughly the same worldview and cocktail party financiers, bickering their way to the Oval Office over tax cuts and abortion and who loved their mothers and America more.

How did such a massaged, polished, temperature-controlled affair morph into a colossal snowball with odd limbs and debris sticking out at all angles, hurtling toward D.C.? And how did it finally stop at this once unthinkable phrase: “President Donald Trump?”

Journalists and pundits, staring in transfixed terror at the shapeless mass gathering speed and size, have spewed all kinds of explanations—deindustrialization, demographic change, Twitter, talk radio, resistance to globalization, plain old anger and prejudice—as if guessing the problem’s name could make it miraculously evaporate at the last second.

And many, and possibly all, of these factors played some part. But the real answer to how the downhill momentum got started is much simpler.

The Republicans, flush with ambitious up-and-comers elected in the 2010 and 2014 midterms, had a crowded, competitive primary. The Democrats, with their depleted bench and the prohibitive Clinton candidacy, didn’t. And the twin processes that churned out these two deeply unpopular, baggage-laden nominees each illustrated the atrophy of the America’s political parties.

The Republican presidential candidates. Ethan Miller/Getty Images

A tale of two primaries

“The Republicans had an actually open and transparent process,” argued GOP Staten Island Councilman Joseph Borelli, an outspoken Trump supporter and surrogate, in an interview with the Observer. “”With the Democrats, you had the establishment essentially guaranteeing its own decided outcomes with the Clinton nomination.”

Borelli cited the thousands of emails hacked from the accounts of top Democratic operatives as proof the contest that elevated Clinton was, as supporters of Trump and Vermont Sen. Bernie Sanders both alleged, “rigged.” Clinton tied up party support and cash so early that even the immensely popular and charismatic sitting vice president —somebody the councilman argued would have trounced Trump “by a great margin”—opted not to get in the race.

The only contention on the Democratic side came from a few low-profile governors and senators, most with little allegiance to the party, and all but one of whom dropped out early in the season.

On the other hand, the anarchic, 17-candidate Republican presidential pileup enabled the nomination of a man who had never held a single political office or even a single coherent political stance in his life, had never grappled with a substantive matter of domestic or foreign policy nor gone through the usual wringer of intra-party scrutiny. That latter process tends to strain out people who possibly avoided paying income taxes for 20 years, or who might have a video floating out there where they relate their fondness for grabbing women “by the pussy.” Or who might hold an unusually sanguine view of a despotic foreign regime.

Yet, even as he sprang damaging leaks like a punctured waterbed, Trump still managed to defeat the far more tested and credentialed Clinton. And this speaks to the simultaneous degeneration of Democratic structures and institutions.

Clinton has never gotten charged with any crime, and most probes into her conduct have withered for lack of sustenance. But it’s also undeniable that decades steeped in Washington culture left her with some questionable habits: the impulse to receive official email on a private server, for instance, or to vacuum up cash by chatting amicably with the heads of major financial firms, or to arrange meetings with officials from authoritarian regimes at the same time her husband was hitting them up for charitable donations.

Or to retain an aide wedded to an ambitious Brooklyn congressman and aspiring New York City mayor, who might have some questionable habits of his own.

“Clinton has this unique problem of having been object of unrelenting hostility for 25 years. So many of the charges made against her are untrue. But that doesn’t matter. What matter is that she’s damaged goods,” said Ken Sherrill, professor emeritus of political science at Hunter College. “She’s so shell-shocked that her normal human instincts of being open are gone. She’s so guarded, she’s just waiting for the next attack. And that doesn’t communicate humanity.”

There is no proof she has done anything illegal, and the Clinton Foundation has actually done tremendous good. And Anthony Weiner’s behavior has never been the fault of Clinton or Huma Abedin or anybody else not named Anthony Weiner. But poor instincts and unfortunate associations can become chronic injuries for players in the game too long.

Sherrill pointed out that a truly robust political machine functions as a farm system, recruiting and training clean, youthful talent to replace the busted knees and torn rotator cuffs and fried-out livers of seasons past.

“There isn’t a process, as there was in what is viewed as the corrupt old days, of bringing young people up through political clubs, inculcating political norms, deciding they’re ready to run for political office,” he said. “The political parties are weakening, eroding as meaningful structures. And in the case of the Democratic Party, what we’ve seen has been the failure to develop a bench of credible candidates, ambitious candidates ready to move up.”

This problem for the Democrats is on display across the country. There are only 18 sitting Democratic governors nationwide (and starting in January there will likely be just 16), 11 of them are age 60 or above. Of the 46 members of the Senate Democratic Caucus, 22 are old enough to receive full Social Security benefits. The party’s strongest mainstream prospect besides Clinton, Vice President Joseph Biden, was born in 1942.

Sherrill’s take, as he admits, owes a lot to the late sociologist James Q. Wilson. Best remembered now as a theorist of “broken windows” policing in the 1980s, two decades earlier Wilson published a book called The Amateur Democrat.

The Amateur Democrat runs nearly 400 pages long and studies an array of insurgent political organizations in New York, Chicago and Los Angeles. Its thesis, though, is pretty simple.

For nearly a century, the two political parties had been more pragmatic than ideological. They existed primarily to win elections, secondarily to connect constituents with jobs and government services and thirdly to operate local clubs where people seeking those jobs and services could meet. Winning elections guaranteed access to public goods, which kept people coming to the clubhouses, which kept everybody voting loyally down the party line.

Each party, at different times, had more right or left-leaning candidates or platforms, but these were based on political expedience and the brokering of regional and ethnic interests.

Politicians stayed in office by offering constituents what Wilson called “material incentives,” not “intangible” ones like commitment to a particular dogma. It was a “politics of interest” rather than a “politics of principle.” Electeds cared little about being doctrinaire “conservatives” or “progressives,” and they changed their positions year to year with the shifting winds.

This system birthed all the classic stereotypes of American politics: fat, cigar-chomping bosses and two-faced pols and murky backrooms and bribery and graft and incompetent hacks on the public payroll. It also yielded the New Deal, civil rights legislation and the Pax Republicana of the 1950s.

But beginning that same decade, young, educated, cosmopolitan whites in major cities had started to demand Democratic politicians focus less on handing out turkeys on street corners and more on ideology and “the issues.” They formed their own organizations and put up their own candidates, and had mixed success nationwide—though they did manage to finally pull down Manhattan’s infamous, enfeebled Tammany Hall machine.

In Wilson’s view, the problem with the “reformers” and their approach to politics was that ideology isn’t a very good way of motivating lots of voters. First off, it alienates people who aren’t particularly ideological or have disagreements with the party program. Second, it leads to endless infighting over who is the truer and purer ideologue—usually even more off-putting.

Wilson warned in 1962 that, if successful, reformers would cause a fundamental realignment of the parties: liberals would dominate the Democrats, conservatives the Republicans. Political leaders rigidly committed to a dogmatic platform would struggle to adapt to changing circumstances. Legislatures would become more polarized and more fractious, and so power would become concentrated in the executive branch.

This system would be more susceptible to a single candidate’s hollow demagoguery and extravagant campaign promises than one under the control of entrenched, triangulating power brokers.

“The need to employ issues as incentives and to distinguish one’s party from the opposition along policy lines will mean that political conflict will be intensified, social cleavages will be exaggerated, party leaders will tend to be men skilled in the rhetorical arts, and the party’s ability to produce agreement by trading issue-free resources will be reduced,” Wilson wrote.

By 1966, when Wilson updated the book, his prediction of an equal-but-opposite reaction from the GOP had come true: in Sen. Barry Goldwater’s disastrous 1964 campaign for the presidency. In 1968, embittered liberals rioted in the streets of Chicago while Democratic bosses inside the International Amphitheatre nominated Hubert Humphrey for president, even though he hadn’t won or even bothered to compete in the 13 state primaries that existed at the time.

In the aftermath of that embarrassing spectacle and Humphrey’s squeaker loss to Richard Nixon, the Democrats impaneled an internal commission headed by George McGovern to lay out a number of changes to the nominating process. The result: the modern national primary system. The liberal reformers had won.

Sherrill, who said he backed the McGovern Commission’s proposals in his “wild youth,” now argues the system they created weakened the parties overall. In addition, primary turnout is nearly always low, and activists and ideologues are overrepresented among those who show up at the polls.

“Primaries are a chaotic way of nominating candidates. The people who vote in primaries are rarely motivated to choose their candidate on the basis of who’s likely to win the election in November,” he said. “We did a good thing: we democratized the process. And we did a bad thing: we weakened the checks and balances on the people who didn’t keep their eye on winning.”

McGovern quickly capitalized on the changes he’d championed, and captured the party’s nomination in 1972—only to lose to Nixon in a historic rout. This led the party leadership to try and reassert itself by creating what we now call superdelegates: high-ranking elected officials from each state, who support the candidate of their choosing at the convention.

The old school party bosses were state legislators and local district leaders, who usually lived within walking distance of most of their voters. The superdelegate system privileged governors, senators and congressmen, meaning the “establishment” had become more top-down. The grassroots withered.

In 1988, the Democratic Leadership Council—which then-Arkansas Gov. Bill Clinton co-founded—established “Super Tuesday,” mostly to force Northeastern liberals through a gamut of southern states at a pivotal period of the campaign.

Bernie Sanders greets supporters at a rally at Temple University in Philadelphia on April 6. Photo by Dominick Reuter/AFP/Getty Images

The political devolution

Over the last few decades, Democratic presidential contests have generally broken down into a competition between an insider candidate and an outsider candidate, with the insider always winning. This changed with Barack Obama’s defeat of Clinton in 2008.

The intellectual, urbane Obama is in most ways the portrait of the cosmopolitan “amateur Democrat” Wilson studied in the 1960s—so much so that the president actually won his first election to a Chicago State Senate seat with the support of one of the organizations Wilson profiled, the Independent Voters of Illinois. But there is, of course, a demographic difference: The Amateur Democrat noted that reformers were rarely able to rally black voters to their cause, and that African-American leaders preferred to work within the existing system in order to gain access to services other ethnic groups took for granted.

Obama beat Clinton in 2008 thanks to a coalition of enthusiastic white youth and African-Americans. It’s important to remember that the second group, which is still loyal to the Democratic Party and its stalwarts in a fairly old-fashioned way, initially favored the former first lady but abandoned her for the promise of a black president. And that happened only after mostly white college students in Iowa elevated Obama’s candidacy in their state’s caucuses.

As Congressman Charles Rangel—a constant Clinton ally—described in an interview with the Observer in February, Obama’s Hawkeye state victory led to the disintegration of the then-New York senator’s African-American support.

“I didn’t know who the hell he was, really,” said Rangel, very much the model of a traditional transactional politician, with lifelong machine ties. “It was only after Iowa that I had to talk to Hillary, and make it abundantly clear that we had problems now that we never had before.”

Clinton then turned to that other ancient mainstay of the Democratic establishment: the white working-class. Here, deindustrialization might have played a role: the erosion of the nation’s manufacturing base weakened organized labor, which had bound blue collar Caucasians to the Democratic column. Without strong unions, this group had largely either dropped out of the process or become Republicans. The strategy failed, and Obama won.

Once in office, Obama struggled to marshal his fellow party members into line and to overcome fierce resistance from Republicans. He made compromises: the banks went unbroken, Guantanamo Bay prison remained open, American military intervention continued overseas and Obamacare passed without a public option.

Further, the president owed little to the party apparatus, which had backed his primary opponent. He left the Democratic National Committee in the hands of sitting elected officials, who had to attend to their day jobs while maintaining the party infrastructure. And he attempted to convert his campaign into a parallel, competing operation, Organizing for America.

Left-leaning white millennials seem to have never realized that they made up less than half of Obama’s base, and they saw his election as an endorsement of their whole progressive program. Bound to the president and his party by ideology alone, and not by any social or economic support system, young voters abandoned Obama in droves in 2010.

This, combined with the decay of Democratic organization, allowed the re-energized Republicans to seize the House of Representatives and snatch up state seats across the country.

Obama’s numbers among millenials recovered somewhat in time for 2012, possibly because of his embrace of gay marriage. But by 2014, a year that decimated Democratic power across America, his favorability among whites aged 18 to 29 plunged as low as 34 percent.

“Barack Obama is well on his way to becoming the most harmful to his sub-presidential party of all modern chief executives,” University of Virginia politics guru Larry Sabato wrote that December.

It’s worth noting though that since 1970, the advent of the era of ideological parties, participation in midterm elections has plummeted from nearly half of all eligible voters to a little more than a third.

However, liberal disaffection with Obama was an overwhelmingly white phenomenon. Among black voters, his approval ratings remained consistently strong.

Clinton’s initial strategy for 2016 was to try to replicate Obama’s winning admixture from 2008. She wrapped herself in the president’s record, blasted Top 40 pop at her rallies and posed for photos with young celebrities.

But she was still saddled with the baggage of the Iraq war and the image of an unprincipled, opportunistic Washington insider. Millenials rejected her once again, and cast about for an alternative.

Massachusetts Sen. Elizabeth Warren, the new darling of the collegiate left, declined to get in the race. Former Maryland Gov. Martin O’Malley had signaled his intention to run against Clinton as a progressive crusader, but he had a centrist resume and bore the stigma of a burning Baltimore.

It was the 75-year-old Sanders, not even a Democrat, who galvanized the liberal white youth who backed Obama eight years before.

“They were looking for a candidate and he was the only one they could get,” said Sherrill. “He was willing to do it when nobody else was. And he said what the activist cadre wanted to hear.”

Sanders was actually more of a fixture in D.C. than Clinton, having arrived in the House of Representatives in 1990, while she was still first lady of Arkansas. But he had spent much of his career in the Capitol as a gadfly, pontificating against the rightward tilt of government and sponsoring his own, more left-wing versions of Democratic bills.

“The African-American vote remained loyal to the Clintons, and to some degree the Latino vote. You take away those two segments, those two groups, and perhaps Hillary wouldn’t have won,” the lawmaker, who also favored Obama in 2008, told the Observer. “When it comes down to raw numbers, they essentially decided the primary.”

Sanders’s support from activists and loosely attached elements of the white working class allowed him to carry states like New Hampshire, Oregon, West Virginia and Wisconsin. But he couldn’t beat Clinton in diverse Democratic bedrock states like New York, and his loss here tolled doom for his campaign.

“Hillary was a senator here. She had a history of working with the elected officials here, and especially those who have been in office for a long time. And Hillary was considered the heir apparent to Barack Obama,” Sepulveda recalled.

Tellingly, Sanders performed better in open primaries where independents could participate than in closed primaries, where only registered Democrats could vote. In New York, he showed poorly in generational Democratic strongholds and well in Republican-leaning areas and in neighborhoods that have experienced influxes of white cosmopolitans: that is, where party machinery was weak or nonexistent.

That Sanders, who has always boasted about not belonging to either party. could capture 47 percent of the primary vote underscored both the depth of Clinton fatigue and the Democrats’ fading influence over their own internal affairs.

“By the fact that Bernie Sanders emerged as a credible candidate, tells you that the Democrats aren’t that far away from where the Republicans were, when it comes to recruiting leadership and structuring the way a political party nominates its candidates,” said Sherrill.

Donald Trump. Ralph Freso/Getty Images

Trump le monde

Creating a national primary system meant Democrats had to alter state laws, and altering state laws caused parallel changes to the Republican nominating process. This gave the GOP its first-ever competitive primary in 1976, and enabled the rise of Ronald Reagan. The realignment along ideological lines that Wilson predicted in ’62 was complete.

But it’s important to note that, low as primary participation is among Democrats, it’s usually even lower among Republicans—and that includes during the feverish years of the “Reagan revolution.” As with the Democrats, this process ultimately proved corrosive.

President George W. Bush’s cratering popularity in the last years of his presidency appears to have finally undermined the party’s foundations. The 2006 and 2008 elections caught the GOP listless and despairing, and stripped them of their majorities in the House and Senate.

The Tea Party-fueled rallies of 2010 and 2014, and the subsequent string of Republican successes in capturing governors’ mansions, state houses and the Capitol building has given them a mirror-image problem to the Democrats. Much of the incoming class had risen independent of the party machinery—some had even defeated incumbents—and had never learned the norms and mores of governance in clubhouses, or from the tutelage of GOP elders.

“It became a lot of self-starters,” said Sherrill. “It created this kind of paralysis that we had for six years, persuaded large numbers of Americans that the government was no longer capable of working.”

This crop of lawmakers had no qualms about bucking and humiliating their own speaker, bringing the federal government to precipice of crisis over every budget extender or capsizing the ship of state with their grandstanding. And the party was so faint and palsied that in 2014, an upstart college professor effectively decapitated its second-most-powerful figure, House Majority Leader Eric Cantor.

But Republican presidential primaries remained a pretty staid affair, and before 2016, had fallen into a familiar pattern. Each candidate would insist they were the true heir of Reagan: the most hawkish on defense, the most pro-life and anti-gun control, the most committed to cutting taxes and paring social programs. Sure, 2008 and 2012 saw a religious-oriented candidate win Iowa and a business-oriented candidate take New Hampshire and the nomination, and a libertarian cause some small drama along the way.

But the emphasis was always on adherence to ideology.

“Every presidential election, there would be this debate ‘do we need a real conservative?'” said Jessica Proud, a Republican consultant who works for the New York State GOP. “Trump wasn’t that at all.”

The braggadocious businessman seemed to have recognized that appeals to ideology weren’t terribly effective. The only consistent features of his platform were building a wall on the Mexican border and threatening offshoring manufacturers with retaliatory tariffs, not exactly orthodox conservative stances. It quickly came out that he himself in the past had hired undocumented workers, supported a pathway to citizenship and had his own branded products fabricated overseas.

But instead of addressing issues or fleshing out his proposals beyond the words “great,” “deals” and “winning,” Trump focused on constantly shocking electoral conventions and Hoovering up TV airtime.

“They’d never tried the method of Trump. Which was basically not to say anything politically correct, which you would never expect a presidential candidate to say,” said Borelli. “You listen to most politicians, right from the things they say to the cadence of their speech, they all sound the same. You had somebody basically throw a gin bottle through the window.”

“He was certainly more of a showman than any politician that we’ve ever seen,” he continued.

To exacerbate the problem, the Republican Party lacked the power to stop all its bright prospects from running for president at the same time. This let Trump face a splintered opposition deep into the primary season.

Nor did the party have the clout to instruct the donor class who to support. And big dollar contributors lined up with a name they knew and trusted.

“A lot of these donors, these huge bundlers, these millionaires and billionaires and the superPACS, they got behind Jeb Bush,” said Proud. “And there’s a huge temptation for a party chair to be deferential to that.”

The wonkish, bespectacled, third-generation-in-elected office Bush proved the perfect foil to the Donald. Trump may have needed a loan from his dad to get established in real estate, but in politics he was the ultimate self-starter: three decades of name recognition accrued through best-selling books, towering buildings, tabloid divorces and a hit prime time television show in which he flaunted his supposed power and business acumen.

He had no need for the Republican Party except as a platform to launch himself toward Washington. His fame and propensity for venting on Twitter meant he could dominate the media cycle at will, without any of the usual party intermediaries.

He thus gained unlimited access to the airwaves at a time when 15 of his 16 rivals were scrambling for the meagerest shred of attention.

“It was almost an embarrassment of riches at one point. It was such a diverse slate of candidates—you had an African American, you had a woman, you had governors and senators,” Proud recalled. “At the beginning, I think people were sort of semi-entertained by some of the attacks and crazy remarks that were being made, not realizing how much of a liability it would wind up being.”

“It made for great TV. And they were laughing all the way to the bank on it. And nobody though he would be the nominee,” she continued.

A focus group GOP pollster Frank Luntz convened last August discovered that his supporters by and large didn’t care about his policy views, insofar as he had any. They professed indifference to his history of flip-flops, offensive statements and general ideological incoherence. What attracted them was his aura of reality TV boardroom decisiveness, and the conviction he would fight on their behalf to “make America great again”—a slogan without any clear meaning.

“Trump Has Succeeded in Convincing Conservatives to Discard Their Principles Overnight,” lamented a headline in the National Review, the glossy bastion of “movement conservatism.”

But maybe this should have been unsurprising: polls have long shown widespread Republican support for Democratic policies. Similarly, an April 2015 internal email chain from the Clinton campaign (among the thousands dumped by Wikileaks) discussed surveys that found worrying enthusiasm for Bush’s proposals among Democrats—so long as the sample group didn’t know the proposals came from him.

But he was shouting in the face of the fact that they did not. Voters, it turns out, remain a stubbornly unideological lot. And they were stampeding the polling places in record numbers.

Still, Trump’s escalating outrageousness and long trail of bankrupt companies, bankrupt casinos and bankrupt marriages deterred enough voters to prevent him from winning an outright majority in any of the initial contests. He especially struggled with the party’s most conservative members, and—like Sanders—performed better in open primaries than in closed ones.

That is, until he reached his native New York. Here, his independent name recognition, a thin and decentralized party operation—the New York GOP hasn’t won a statewide race since Gov. George Pataki’s re-election in 2002—and the nonideological bent of Republican voters combined to give Trump his first overwhelming victory. It also awarded him an all-but insurmountable delegate lead, which he carried to the very end.

But once he became the nominee, Trump quickly learned that reaching beyond the narrow band of voters who participate in primaries requires an actual electoral apparatus—the kind only experienced, professional party hands can provide. Basic outreach, cash-gathering and get-out-the-vote operations swiftly fell upon the Republican National Committee, the very establishment he had fulminated against.

“He had no organization, no fundraising, no ground game,” said Proud. “He had to turn to the RNC right away.”

His lack of political training showed in the debates, and his lack of vetting became obvious with every new revelation about his personal conduct. But weak as the GOP was, the Democrats proved even weaker.

Donald Trump and Hillary Clinton. Spencer Platt/Getty Images

The party’s over

So what now?

Depending on whether Trump attempts a second term, the GOP may look to rejigger its nominating process at some point in the future, like the Democrats did after ’68 and ’72, . The party probably won’t institute superdelegates, but it might seek to prevent another bum rush on the White House by making it tougher for presidential contenders to get on the ballot.

But look for the Republicans’ internal order to deteriorate further while he’s in office. If he’s proven anything, it’s that being surly and impudent toward leadership pays off, particularly when directed against House Speaker Paul Ryan. It’s unclear whether Trump has either the interest or the attention span necessary to build a strong party operation from the bottom up, and it certainly doesn’t seem the party can control him.

Proud, for one, voiced doubt the GOP leadership could ever reassert its institutional authority over candidates.

The election last night left the Democrats in an even more degraded political position and with an even more diminished roster. But this cycle has also brought a few impressive additions to the Democratic bench, including California Senator-elect Kamala Harris and Illinois Senator-elect Tammy Duckworth.

One of the ironies Wilson notes in The Amateur Democrat is that the unscrupulous and reviled old political bosses had great success delivering the kind of national candidates and policy objectives the liberal reformers clamored for. Democratic machines could build the New Deal and the Great Society because they had ways of relating to voters other than ideology.

But the millenials may prove resistant to these kinds of appeals. Sepulveda noted that youth today are more attracted to amorphous activist movements like Occupy Wall Street and Black Lives Matter than to organized Democratic Party work.

It’s entirely possible the slow dissolution of organized political parties is another facet of modern social atomization, coinciding with the decline of everything from churches to unions to ethnic clubs to the nuclear family.

And it will likely be another four years before we can know for sure.

Disclosure: Donald Trump is the father-in-law of Jared Kushner, the publisher of Observer Media.