The stage is set for a November brawl that could loosen President Donald Trump's grip on Washington.
Elections in New York Thursday marked the end of a long, dramatic and sometimes tumultuous primary season that reshaped both parties going into the midterm elections.
Democrats have a younger, more liberal, and more diverse slate of candidates they believe can flip control of the House and reclaim several governor's offices. Republicans, meanwhile, have doubled down on being the party of Trump.
Here are some takeaways from primary season as the focus shifts to the Nov. 6 general election.
DEMOCRATS ARE ENERGIZED, BUT THE GOP BASE ISN'T ASLEEP
An avowed democratic socialist upset a House Democratic leader in New York. A self-styled progressive knocked off a former congressman in a Nebraska swing district. An unabashed liberal won the Democratic nomination for governor in Georgia and is a serious contender for the fall race.
Single-payer health insurance advocates came out on top and are aiming for House seats from West Virginia to California and in governor's races in Maryland and Florida. Elsewhere, Democrats opted for more centrist candidates — but many of them still further left than the old Blue Dog Democrats booted from Congress during President Barack Obama's two terms.
And in a series of House special elections in more conservative districts, Democrats managed much narrower margins than usual even in defeat, with raw vote totals much closer to their typical presidential election turnout than what Republicans produced.
In short: The political left has exploded since Trump's election. If all these trends hold nationwide in November, Democrats would benefit.
Yet it's not accurate to say the Republican base is depressed. The president's approval rating among self-identified Republicans typically exceeds 90 percent. Democrats set primary turnout records this year in Florida and Texas — only to watch Republicans do the same. In perennial battleground Florida, for example, there were at least 100,000 more GOP ballots despite both parties having competitive primaries for governor.
All of that together means Democrats are poised to make gains in November. But the difference in gaining limited ground and having anything approaching a wave election will depend on independents and moderates who didn't cast a primary ballot at all.
FOR REPUBLICANS, IT'S ALL TRUMP, ALL THE TIME
Alongside Democrats' leftward shift, the GOP has even more consistently held to their core supporters: the Trump base.
Crossing those voters proved perilous for Republicans such as Rep. Mark Sanford of South Carolina, who lost his primary race this summer to an opponent who pledged her loyalty to Trump. Rep. Martha Roby of Alabama, who criticized Trump in the final weeks of the 2016 campaign, avoided a similar fate after promising voters she backed the president.
But now Republicans have to thread a needle in the general election to reach moderates who dislike, for example, Trump's policy of separating immigrant children from their parents at the nation's southern border. It's an especially delicate balance for candidates such as former Rep. Ron DeSantis, nominee for Florida governor; Rep. Barbara Comstock, seeking re-election in a Virginia district that Trump lost big; and Mike Braun, an Indiana businessman trying to unseat Sen. Joe Donnelly.
Trump put the tightrope on full display Thursday with his evidence-free rejection of the revised death toll in Puerto Rico after Hurricane Maria. In Florida, which has seen an influx of displaced Puerto Ricans added to voter rolls, DeSantis and outgoing Gov. Rick Scott, now a Senate candidate, had to release statements assuring voters they support the Puerto Rican recovery and do not dispute new estimates that almost 3,000 people died because of the storm.
TRUMP'S MIDWESTERN WALL AT RISK
The pendulum could swing against Trump in the band of Great Lakes and Rust Belt states that delivered him to the Oval Office. Aided by a court-ordered redraw of congressional districts, Democrats will pick up at least a few seats in Pennsylvania. Michigan, Ohio, Wisconsin and Iowa each have multiple GOP House districts where Democrats have nominated competitive, if not favored, candidates. Republican governors in Wisconsin and Iowa are at-risk, and open GOP seats in Michigan and Ohio are toss-ups. Meanwhile, Democratic senators across the region are either favored or in re-election tossups — but none are considered underdogs.
EVEN WITH GOP-FRIENDLY MAP, THE SENATE IS IN PLAY
Republicans began the cycle with hopes of expanding their 51-49 Senate majority. After all, 10 Democratic senators face re-election in states Trump won — five of them by wide margins. Yet senators like Joe Manchin in West Virginia and Jon Tester in Montana are reminding Republicans why they were elected in the first place: They've proven adept at establishing their own brands and they raise lots of money.
Florida Sen. Bill Nelson is the only one of the 10 who's collected less money than the GOP challenger — and Gov. Rick Scott's advantage comes from his personal fortune. Handicappers in both parties don't think Democrats will hold all 10 seats, but they also agree that GOP prospects of big gains have diminished if not disappeared.
Meanwhile, Republicans always expected to have tough races defending Arizona and Nevada, but now must pay attention to the surprisingly competitive contests in Texas and Tennessee.
IT REALLY IS THE YEAR OF WOMEN...
Women make up less than a fifth of Congress and fill just six governor's chairs, but those numbers are almost certain to go up.
The Center for American Women and Politics at Rutgers University counts a record 239 women nominated for House seats (187 Democrats, 52 Republicans). That obliterates the previous high mark of 167 set two years ago; the new record includes 47 open-seat candidates (34 Democrats, 13 Republicans) and 121 challengers (99 Democrats, 22 Republicans). More than half the candidates on national Democrats' priority list (those viewed as most likely to flip a GOP House seat) are women.
There are 12 new female nominees for governor, in addition to four incumbents seeking re-election.
Several high-profile races involve two women, headlined by the Arizona Senate race between two congresswomen: Republican Martha McSally and Democrat Kyrsten Sinema.
... AND THE YEAR OF VIRAL VIDEO
The internet has given upstart candidates a new avenue to viability: the viral video.
Two female congressional candidates found immediate success with professionally-produced web ads that chronicled their improbable climbs as combat pilots against the barriers of a sexist system. To date, Kentucky's Amy McGrath has drawn almost 1.9 million YouTube views for her "Told Me" bio ad. She knocked off the national party's choice in a primary. In Texas, Democrat M.J. Hegar is still a longshot in a GOP stronghold, but she's raised plenty of money after her "Doors" video caught fire. Its YouTube count now tops 2.3 million.
It's not always television-quality ads. When Texas Senate hopeful Beto O'Rourke recently answered a voter's question with a defense of NFL players protesting systemic racism by kneeling during the national anthem, the video quickly morphed on YouTube, Twitter and other social media platforms. O'Rourke has kept pace in fundraising with Republican Sen. Ted Cruz.