The calendar favored Edwards: He took Iowa, where he had finished a strong second in 2004; won Nevada, where the labor unions loved him; lost New Hampshire to Clinton; took South Carolina and lost Michigan to Obama and then New York to Clinton.

But while Republicans had a winner-take-all rule in which the winner of each primary got all the delegates at stake, the Democrats divided up the delegates among the top finishers, which guaranteed a long, bruising fight in 2008. Edwards didn’t need to win every primary; he just needed to win enough of them and come in a consistent second in the states he lost.

There had not been a deadlocked convention in America since 1952, when it took Democrats three ballots to nominate Adlai Stevenson, but in 2008 the TV networks finally got what they wanted: a political convention where the outcome was not known in advance. Deadlock in Denver! was the logo every network used.

Early in the morning of August 28, 2008, after an incredible 15 ballots, Hillary Clinton pledged her delegates to Edwards on the condition that he choose Obama as his running mate. It was a selfless act. Now she knew she would become a figure like Ted Kennedy, an important voice in her party and a good senator but never again a national candidate. Walled off by her staff, she had never been able to connect with voters. She had never seemed real.

McCain thought Edwards/Obama was a strong ticket for the Democrats, but it was the independent candidacy of Mayor Michael Bloomberg of New York that worried him most. Though Bloomberg had no chance of winning, he could drain independent and Republican votes away from McCain. In Weaver’s doomsday scenario, Bloomberg could keep both McCain and Edwards from getting 270 electoral votes, throwing the election into the House of Representatives, where the Democratic majority would make Edwards president.But Bloomberg found life on the road unpleasant, forced to answer countless questions about process—“How do you expect to win, Mr. Mayor?”—rather than on the issues he believed in. When he failed to reach 15 percent in the polls and, therefore, was not invited to take part in the presidential debates, he stopped active campaigning and ended up with the same number of electoral votes Ross Perot had achieved in his two runs: zero.

It was wild out there for a while. “Everybody is running for president,” Joe Biden had joked on his campaign plane a week before the Iowa caucus. “A Jew, a woman, a black, a Mormon. It’s getting like the bar scene in Star Wars!” It seemed funny at the time, and most of the reporters representing the old media on Biden’s plane knew he had a pointed sense of humor and made nothing of it. After all, in July 2006, Biden had said, “In Delaware, the largest growth in population is Indian-Americans moving from India. You cannot go to a 7-Eleven or a Dunkin’ Donuts unless you have a slight Indian accent. I am not joking.” He had gotten away with that one—“The point Senator Biden was making is that there has been a vibrant Indian-American community in Delaware for decades,” his spokesperson had said—but in presidential politics there are few second chances.

A blogger on the Biden plane caught Biden’s Star Wars joke on videotape; it was on YouTube 12 minutes after the plane landed and all five networks in two hours. In high-def, no less. The next morning, an ashed-faced Biden withdrew from the race, even though Bloomberg, Clinton, Obama, and Romney had come to his defense. “Perhaps it was without real humor,” Obama said of the joke, “but it was also without real malice.”

It did not matter. In 2008, the stakes were too high. The 24-hour news cycle had become superheated by the Internet, and no mistakes were allowed. “A flawless campaign,” Weaver told the staff. “That is what we will need to win. Candidates can have flaws; they are human. But the campaign must be perfect.” Roger Ailes had invented the theory when he was George H.W. Bush’s media adviser in 1988, and he gave an interview to Advertising Age that year in which he said that political consultants could make ads better than advertising people, that he could sell products like Oreo cookies better and faster than ad guys could.

Is there a difference between a product and a candidate? the reporter asked.

“There’s an enormous difference between cookies and candidates,” Ailes said. “Cookies don’t get off the shelf and hold news conferences or make gaffes or go on Meet the Press.”

And from then on, the game became keeping the candidate on the shelf, as passive as a box of cookies. Because as any political consultant could tell you, the most dangerous person to the candidate was the candidate himself.

McCain’s gaffes had been notorious; all you had to do was ask him. He loved to regale reporters with the time he referred to the Leisure World senior citizens’ home as “Seizure World” and the time he said “the nice thing about Alzheimer’s is you get to hide your own Easter eggs,” and then there was the national eruption he caused with a joke that went something like, “Why is Chelsea Clinton so ugly? Because Janet Reno is her father.” (McCain apologized to the Clintons for that one, though he never apologized to Reno. He didn’t like Reno.)

“I have been guilty of foot-in-mouth disease all my life,” McCain said.

“He is authentic,” his press secretary said whenever a gaffe hit the news. “He sometimes says things he regrets. Just like a real person would.”

“Many of the independents and even Democrats who are supporting you have no idea how conservative you really are,” a reporter said to McCain at one of his daily news conferences.

“Done a hell of a job fooling them, haven’t we?” McCain said.

Weaver cut the news conferences down to weekly.

But the public liked McCain’s answers. They seemed real. He seemed real.

There was a little problem, however. Bill McInturff, McCain’s pollster, had said before the campaign began, “Along with the Republican base, McCain has the potential to put together a 55- to 58-percent majority in a