This may be smart campaigning, but it’s terrible for the rest of the country, which is rendered effectively invisible, distorting our politics, our policy debates and even the distribution of federal funds. Candidates focus their platforms on the concerns of battleground states, and presidents who want to stay in office make sure to lavish attention, and money, on the same places. The emphasis on a small number of states also increases the risk to our national security, by creating an easy target for hackers who want to influence the outcome of an election. Perhaps most important, voters outside of swing states know their votes are devalued, if not worthless, and they behave accordingly. In 2012, 64 percent of swing-state voters showed up, compared with 57 percent everywhere else, a pattern that persisted in 2016. What better way to get more voters to register and go to the polls than to ensure that everyone’s vote is weighed equally?

The Electoral College has been the subject of more amendment efforts — 595 as of 2004 — than any other part of the Constitution. But amending the Constitution is a heavy lift. A quicker and more realistic fix is the National Popular Vote interstate compact, under which states agree to award all of their electoral votes to the winner of the national popular vote. The agreement kicks in as soon as states representing a total of 270 electoral votes sign on, ensuring that the popular vote will always pick the president. So far, 10 states and the District of Columbia have joined, representing 165 electoral votes. The problem is that they are all solidly Democratic, which only adds to the suspicion that this is no more than a partisan game. It’s not: When Mr. Trump is not making up stories about millions of illegal voters, he has argued that if the presidency were decided by popular vote, he would have campaigned differently and still would have won. He may well be right.

How can red states be persuaded to sign on and give all their citizens a voice? Some, like Georgia and Arizona, may not stay red for much longer. But even deep-red states would benefit from the infusion of attention and cash from campaigns seeking to rustle up every vote they can find.

This problem isn’t going away; if anything it’s going to get worse as Americans continue to cluster. Half the population now lives in just nine states. It’s time for states that have been on the fence about the national popular-vote compact to get off and sign on. Connecticut, Oregon and Delaware have all come close to passing the compact in recent years; they should get it done now. Yes, they’re three reliably blue states representing 17 electoral votes among them, but every vote counts.