Washington — He warned that Donald Trump was dangerous, a nuclear hair-trigger, proud to get away with sexual assault. And now it falls to President Barack Obama to reassure America that it can survive four years of President Trump.The impulsive billionaire's improbable victory sets in motion a remarkable reversal of fortune for Obama. He had planned to coast through his final months while ushering in a simpatico Hillary Clinton, but will instead spend his time presiding over a country that is divided, anxious and has little idea what's coming next.Riding approval ratings higher than at any time since he was first elected, Obama was poised to become one of the country's most consequential leaders — a modern-day Franklin Delano Roosevelt, with a wealth of domestic and foreign accomplishments that most presidents would envy.He still may — but not if Trump succeeds in carrying out what he's said he plans to do.Trump rooted his campaign in a pledge to systematically roll back Obama's achievements, on health care, immigration, climate change, trade, international relations and more, and soon will have the tools to do it: the first single-party control of both Congress and the White House since Obama's first two years in office.Mindful that his legacy could be pulled out from under him, Obama said last week that a Trump victory would mean "it all goes out the window".It was unsurprising, then, that the mood at the White House was despondent the day after Trump's triumph. White House aides who had gathered with friends Tuesday to witness the election of the first female president instead found themselves asking the next morning whether the last eight years would end up a fool's errand.There were tears — lots of them — on the faces of a few hundred Obama staffers who gathered in the Rose Garden as Obama delivered his post-election statement to reporters. Looking dazed and queasy, they stood on the grass and listened as Obama assured them their efforts hadn't been for naught."That remarkable work has left the next president with a stronger, better country than the one that existed eight years ago," Obama said, standing with Vice President Joe Biden. "Sometimes you lose an argument. Sometimes you lose an election. The path that this country has taken has never been a straight line."If Obama was as depressed about the election's outcome as most suspected, he didn't show it. White House officials said he felt a responsibility to calm the nation after a bruising, divisive campaign in which the victorious candidate offended wide swaths of the country.Obama's aides said the president took a measure of solace that many of Trump's policy prescriptions have been vague and open-ended, perhaps allowing him more wiggle-room to preserve some of Obama's achievements than other Republicans like Texas Sen. Ted Cruz might have had. And they held out hope that the socially moderate Trump, who once supported abortion rights and has proposed paid family leave programmes, might end up having more in common with Obama than is immediately apparent.Yet by reducing Clinton's loss to a version of "you win some, you lose some," Obama glossed over the dark vision of Trump's America he'd painted for voters as the campaign neared the finish. Casting Trump as an existential threat in ways other GOP nominees were not, Obama told rally-goers that the world was "teetering" and that "the fate of the Republic rests on your shoulders".Less than 12 hours after the race was called for Trump, the White House had softened its tone. The administration noted that as president-elect, Trump is entitled to the same daily intelligence briefing as Obama receives — one that includes information on US covert operations, information gleaned about world leaders and other data gathered by America's 17 intelligence agencies.Where Obama had once deemed Trump unfit to get anywhere near the nuclear codes, the White House instead referred to policy differences not wholly unlike the ones that previous consecutive presidents have had, with no disastrous consequences for the nation."By relying on our institutions and democratic traditions, demonstrating a faithful commitment to the will of the American people, our democracy hasn't just survived, it has thrived," White House spokesperson Josh Earnest said.