IF A week is a long time in politics, then a month is an eternity. In mid-August, Hillary Clinton had opened up a seemingly unassailable polling lead of eight percentage points over Donald Trump. Quantitative forecasting models pegged her odds of victory near 90%, and betting markets approached an 80% probability. Mrs Clinton’s cushion has now all but deflated. By Labour Day, Mr Trump had trimmed her lead in half. And just when the race appeared to be stabilising, the underdog had another growth spurt, picking up about three more points over the past two weeks. Mrs Clinton is now barely clinging to a one-point lead. That puts a man who calls for “unpredictability” in America’s use of nuclear weapons in a near-tie for a presidential election just six weeks away.

Barack Obama held a similarly slim edge in national polling over Mitt Romney on the eve of an election he won comfortably in 2012. But the president had plenty of breathing room in state-specific polls, which turned out to be a better predictor of the outcome. By contrast, Mrs Clinton has lost even more ground in many state polling averages than she has nationally. Iowa, which Mr Obama carried by ten and six points in 2008 and 2012, seems to have slipped from her grasp entirely: the last two polls there have her trailing by eight and five. Recent surveys of Maine’s second congressional district, which awards an electoral vote independent of the statewide winner, put Mr Trump up by 11, ten and five points; Mr Obama won it by nine. Four of the past five Ohio polls give Mr Trump a lead of at least three points. And Florida, which Mrs Clinton led by four in late summer, now looks like a coin-flip.

Mrs Clinton could afford to lose all of these places and still eke out a win. Recent polls show her maintaining an edge in Michigan, Wisconsin, Pennsylvania, Virginia and New Hampshire. But those states alone would leave her short of victory. With those in the bag, her easiest path to the presidency runs through Colorado, whose electorate is better-educated and more Hispanic than the national average. In July and August, her polling leads there ranged from five percentage points to 13. But the only survey taken of the state so far this month gave Mr Trump a four-point lead. If Mrs Clinton cannot hold on in the Centennial State, expect Mr Trump to be sworn in on January 20th.

There is no doubt that current polling suggests the election would be close to a toss-up if it were held today. As a result, betting markets now give Mrs Clinton just a 65% chance of victory. Democrats, as well as never-Trump Republicans and independents can only hope either that recent surveys misrepresent public opinion, that Mrs Clinton’s superior campaign infrastructure will enable her to outperform them or that the polls will eventually swing back in her direction. There is solid evidence to back all three claims.

The news has recently been unkind to Mrs Clinton. On September 9th she said that half of Mr Trump’s supporters belong in a “basket of deplorables”. She then fell ill with pneumonia, and unwisely tried to conceal the ailment, giving ammunition for two of Mr Trump’s attacks—that she is untrustworthy and that she is frail. Moreover, she had to take three days off from campaigning to convalesce, ceding the spotlight to Mr Trump. These stumbles coincided with his gains.

However, they may not have actually led many voters to change their minds. Some studies suggest that sharp swings in the polls, such as the “bounces” candidates enjoy after their conventions, are caused mostly by partisans being more eager to talk to interviewers following good news for their preferred candidates than they are after a setback. Andrew Gelman, a professor at Columbia University, has found that when a candidate seems to surge in the polls, the share of respondents who say they belong to that politician’s party—and were thus always likely to be supporters—also increases.

Sure enough, recent battleground-state surveys showing Mr Trump ahead, like one in Ohio conducted from September 9th to 12th by the well-respected Ann Selzer, often contain more people calling themselves Republicans than do earlier polls. It is possible—though far from certain—that disgruntled Democrats haven’t felt like picking up the phone of late when pollsters call, even if they are sure to pull the lever for Mrs Clinton in November.

Another argument for Mrs Clinton’s chances is the disparity between her war chest and ground game and Mr Trump’s. Even as small donors, whom Republicans have historically had trouble courting, have flocked to Mr Trump, his fund-raising lags far behind the establishment favourite’s: Mrs Clinton pulled in $143m in August, compared with his $90m. That has enabled her to clobber him on the airwaves—she is outspending him on advertising by a factor of five—and to invest in a formidable get-out-the-vote operation. Mrs Clinton has opened over three times as many field offices in battleground states as Mr Trump has. And Mr Trump’s continued battles with much of the Republican establishment—particularly in Ohio, whose governor, John Kasich, still refuses to endorse him—may also hinder co-operation between his staff and those working for down-ballot Republican candidates.

Moreover, Mrs Clinton’s vaunted analytics department can target persuadable voters whose doors await a knock, and likely supporters with a middling propensity to vote who could use a ride to the polls, with the pinpoint accuracy of a Facebook advertisement. In contrast, Mr Trump has scoffed at data-driven campaigning, calling it “overrated”. No one knows quite how much of a difference these factors will make, because in the past presidential candidates have generally fought each other to a draw in the ground game. But as long as they are worth more than zero, Mrs Clinton should show better results at the ballot box than she does in telephone polls.

The final argument in favour of Mrs Clinton’s chances is that polling averages tend to revert towards their means, and that Mr Trump is now bumping up against his previous ceiling of around 40% of the vote. She will presumably benefit from returning to the campaign trail, and could get a boost from increased efforts on her behalf by Democratic heavyweights. Even if Mr Trump does well in the debates, they will likely push talk of deplorables and pneumonia off the front pages. Moreover, both the economy and the president’s approval ratings have been on the rise of late, strengthening the appeal of Mrs Clinton’s run for a third Obama term.

The two third-party candidates could also lose some of their lustre. They currently appear to be taking more votes away from the Democrat than the Republican—by a slight margin in the case of the Libertarian Gary Johnson, but a large one in that of the far-left Green Party’s Jill Stein, who gobbles up 3% in national polls. But support for third parties tends to dwindle as elections draw near. The combination of the also-rans’ expected absence from the debates, which only admit candidates averaging at least 15% in the polls, and the growing plausibility of a Trump presidency could drive Stein supporters worried about her playing Ralph Nader to Mrs Clinton’s Al Gore into the Democratic camp.

For all these reasons, it is far too early for Mrs Clinton’s supporters to panic. But even though virtually every variable besides recent polls points in her favour, the race is now close enough that even a mild “October surprise”—perhaps in the form of the unflattering document-dump that Julian Assange, the head of WikiLeaks and a harsh critic of Mrs Clinton, promises is forthcoming—could vault Mr Trump ahead. Even without that, the idea that a Clinton landslide would lead to the banishment from American politics of Mr Trump’s appeals to racial and cultural resentment is receding fast.

What academics call the fundamentals of the race—the economy is performing modestly well, the same party has held power for eight years, and neither side benefits from incumbency—suggest a tie between an identikit Democrat and a generic Republican. Mrs Clinton is the second-least-popular major-party candidate in modern history. The main reason she is ahead is that Mr Trump is the first. But in the month since he hired Kellyanne Conway as his campaign manager, he has mostly avoided self-sabotage. If he can continue to do so, the election could remain the nail-biter that fundamentals have indicated all along.