Image copyright Getty Images

"We're going to get blamed if we lose," a Texan member of the low-tax, small-government Tea Party movement told me before the first presidential debate appeared to turn the election on its head.

A civil war may be about to break out between fiscal conservatives and what remains of the more moderate wing of the party, but it will be the wrong battle to fight.

The comment came around the time that then-Republican presidential candidate Mitt Romney and his team seemed to be sliding to near inevitable defeat. The convention hadn't gone well, and the Romney campaign seemed unable to land a punch on the resurgent Democrats.

It was pretty much the first time that Republicans spoke openly about defeat.

Which is part of a Republican problem, and which is worth coming back to - seeing the world as you would like it to be (the opinion polls are wrong, everyone believes that cuts should come before tax rises, the president isn't actually an American at all) rather than how it actually is.

Republicans had a lot of electoral wind in their favour this time around: a weak economy with anaemic growth, a president who seemed unable to regain the magic of his first campaign, unemployment at 8% or more for what felt like forever.

Ruthless

Perhaps more important than all the economic statistics in the world was the sense that the country was leaderless and going the wrong way. As I pointed out in a blog early on election night, back in September last year, more than three-quarters of the country felt that America was on the wrong track.

He can't talk like that. It has to stop Hispanic businesswoman

But from late spring and early summer, the economy started to show signs of sustained, if slow, life. Housing - which had done nothing but drag the economy down for the whole of the Barack Obama's time in office - started to contribute to growth. Employment grew enough to make small dents in the jobless rate.

It may have been despite, rather than because of, the Obama administration's policies; that's for economists to mull.

But the turnaround, did, surprisingly quickly, change the perception of the electorate about the way the country was going.

Meanwhile, the Republicans had a candidate whose claim to fame was that - whilst he may have had little or no charisma - he was a businessman who knew how to make the economy work.

In 2010, that alone might have been enough. But Mr Romney's back-story in corporate turnarounds and wealth creation (his own, as well as other people's) was ruthlessly mined by the Democratic campaign machine and used against him.

A long summer of campaign advertising threw him entirely on to the defensive.

Two flawed candidates

"I just have trouble voting for someone with an overseas bank account," said an auto worker in Cadillac, north Michigan, who told me that he swung between the Democrats and the Republicans. He also described one of his chief concerns as being the national debt and the way the government spent so much on people who did too little.

Image copyright AP Image caption Hispanics - including stars like actress Eva Longoria - backed Obama

Republicans spent the summer fighting the impression that Mr Romney was a corporate asset-stripper who cackled as he merrily shipped jobs off to Mexico and China.

By the autumn, the election was no longer a referendum on four hard and seemingly fruitless years of Mr Obama; it was a choice between two flawed candidates.

At which point, with the benefit of that wonderful thing, hindsight, the election was Mr Obama's.

It's not a traditional America anymore Bill O'Reilly, Talk show host

Back in the brutal primary battle early in the year, when Republican activists chose their candidate, Mr Romney was forced to paint himself as a tough guy on immigration, so as to outflank his rivals.

"Self-deportation" (a term used by Mr Romney in one of the Republican primary debates) might have seemed like a humane option - and Republican vote winner - to Mr Romney. But to the Republican Hispanics I spoke to in Florida in late January, it was an electoral disaster waiting to happen.

"He can't talk like that. It has to stop," one Hispanic businesswoman told me at a Republican debate watching party in Orlando, Florida.

America is changing at a revolutionary pace: the white majority is hurrying towards minority status. And the electorate reflects that. Non-Hispanic whites were 87% of the voters in 1992. Exit polls suggest that they were 72% this time around.

Hispanics were 2% of voters then. They are 10% now. But over a long summer and autumn of Republican events - the convention, rallies, meetings in diners and homes - I searched in vain for any sign of them.

Republicans opine that there is more to the Hispanic vote than just immigration; they are right. There are plenty of Hispanics who rather like the message of the party on business, on self-reliance and on social issues. But the tone - driven by the immigration debate - is wrong, at local, state and national level.

There is more to Republican electoral discomfort than just the Hispanic vote. Halfway through Tuesday night, renegade conservative commentator David Frum tweeted: "Upper class TV commentators think the only change the GOP needs is on immigration. Of course they all have health insurance."

He was pointing, rather sharply, to the lack of policy ideas that might excite on the Republican side. It was just not good enough to try for a referendum. The Republicans needed more.

But without the increasing Hispanic share - Romney won 27%, down from an already low 32% in 2008 - the Republicans will not win nationally, however good their ideas.

Early on Tuesday evening, a shocked-looking Bill O'Reilly, a firebrand conservative talk-show host, went on the Republicans' favourite news broadcaster, Fox News.

"The white establishment," he said, "is in a minority".

"The demographics are changing. It's not a traditional America anymore."

The challenge for Republicans now is simple: change or die. Because, with or without you, America is changing fast.