Anti-Trump backlash drove voters to the polls, leading to historic gains for the Democrats. The Virginia state legislature will undergo a huge culture change, as a lot of old white dudes were replaced by the legislature's first out Lesbian, first two Latina women, first Asian-American woman, first Democratic Socialist, and the first openly transgender legislator to be elected in America. (This last legislator, Danica Roem, will likely garner most of the attention from this group, and for good reason: not every state legislator attends the American Music Awards with Demi Lovato, and GOP legislators are being forced to deal with gendered titles and pronouns, probably for the first time in their lives.)

After a number of close races, the election ended with the GOP holding onto a slim majority at 51-49. However, some races are still undecided.

Over in the 94th District, incumbent David Yancey has only a 10-vote (!) lead over Democratic challenger Shelly Simonds.

The 28th is the biggest mess. Republican Bob Thomas is ahead of Democrat Joshua Cole by 82 votes, but some voters in the district apparently got the wrong ballot. (Thanks to incredibly stupid election laws, voter precincts don't always overlap with House districts. See this VPAP overview if you want to understand how this works.)

The state Board of Elections has just certified the results of the last of these elections, so we can move on to the recount/challenge phase.

What's at stake here?

The outcomes of these three contested elections will determine which party controls one of the houses of Virginia's bicameral (two-house) legislature. The House of Delegates has 100 members, and it’s been skewed heavily towards the GOP in past years – in 2017, it was 66 to 34 for the Republicans.

Again, the GOP lead is now down to 51 to 49. And, if a single one of the three contested election results are reversed at any point, the house would be evenly divided. That’s happened at least once before in the chamber’s history, and both parties worked out a power-sharing arrangement, with co-Committee Chairs and shared speaker duties.

Over in the Senate, legislators get four-year terms, so their next election isn’t until 2019. But that house also has just a narrow Republican majority, 21-19.

So what can happen to change the GOP majority?

A bunch of things can change the House of Delegates math, actually. There are at least four ways that the Democrats could block the Republicans from controlling the chamber:

1. Recounts

Virginia state law allows losing candidates to request a recount, as long as they lost by less than 1% of the total votes cast. You don't need a lot of math to realize that all three of the contested races fall within that margin. Still, Hugo and Thomas probably have little to worry about here; it's unlikely that a recount will turn up enough miscounted or discounted votes to overcome their lead.

Yancey, on the other hand, is SUPER vulnerable. We last saw a recount for the 2013 Attorney General election; there election officials found ~750 more Democratic votes statewide. Based on that math, finding more than 10 new votes for Democrats in a single district is certainly possible. In fact, insiders say Democratic votes are more likely to be found in recounts. (This is probably due to demographics; Democrats are more likely to claim poor, young, and inexperienced voters.)

The 2013 recount took place over two days in mid-December, so we'll probably know the recount outcomes before the legislative session starts in January.

2. Contest in the house

Our endlessly inventive Virginia election laws also allow losing candidates to contest the election in the General Assembly. It’s not clear if this has ever happened before, so it's hard to know exactly how this would proceed. But the state code allows for such a challenge to be overseen by the House's Committee on Privileges and Elections. If the chamber remains Republican-controlled, it's unlikely the contest will go anywhere. But under a power-sharing arrangement, things could get more interesting.

3. Court challenges

Democrats will most likely look to the courts for the 28th district, where voters were assigned the wrong ballots. Still, only about 80 votes seem to be at question here. Surely not all of them voted Democratic, so it's unlikely the Democrats could generate enough votes from these folks even if they were allowed to submit new ballots.

The Democrats might instead try to get the original results thrown out and demand a special election. But they would have to find judges willing to interfere with election outcomes, which they are generally reluctant to do. The bottom line: these court challenges are less about the legal arguments made, and more about the politics of the situation. Will any Virginia judges be willing to wade into partisan politics and "overturn" an election? My guess is no, but we’ll see soon.

4. Political appointments

One final method that the Democrats could use: Governor-Elect Ralph Northam has a lot of jobs to fill in his administration. Some Republicans are worried he could try to change the legislature's math by offering plum spots to Republican Delegates or Senators. At the same time, the Governor has to be careful not to pull a legislator out of a weak Democratic district.

Northam's transition team may not end up affecting this year’s legislature much. (His predecessor, Terry MacAuliffe, only created one special election through appointment, and that wasn’t until August.) But remember that being a state legislator is only a part-time job; administration appointments can be lucrative, as well as allowing significant contributions to public service. Everyone will be eying the work of his transition team very closely.

Why do we care?

This is fascinating for political junkies for sure. But there are real policy consequences stemming from partisan control. For example, Republicans have blocked Medicaid expansion for years; so 400,000 Virginians who could have health insurance should care greatly about which party runs the legislature. Laws covering reproductive rights, gun regulations, and the environment all depend on whether or not they can get through committees.

So there’s a lot at stake. The next few weeks will determine what happens. Stay tuned.