Almost every large town or city in the United States has a railway terminus, and most share the same name – Union Station. In transport terminology Union simply means a place where two or more lines meet, enabling passengers to change trains without going to another station, but the political symbolism is obvious. American railways were at their height when America was expanding and about to dominate the 20th century, so this transport Union knitted a vast country together.

Over the past six weeks I’ve travelled to more than 20 American cities and almost as many States – often by train – and it seems to me that the once-dynamic Union is under immense strain. Not in the constitutional sense, as in the UK and EU, but when it comes to other aspects of American Unionism, its attempt at solidarity between different social classes, nationalities and, of course, races.

Elections, particularly contests as memorable as the one ending this week, naturally highlight these tensions, and even in a month and a half I feel I’ve only begun to scratch the surface. But I’ve gleaned enough, usually in amiable conversations with my hosts, with taxi drivers and those riding alongside me in planes, trains and automobiles. Americans like to talk, especially to visitors, and there’s been lots to talk about.

Let me begin with trains. Like the US travel writer Paul Theroux, I can rarely watch a train go by without wishing to be on it, but like most things requiring tax dollars, they divide Americans. Today’s network grew out of an impasse resulting from Democrats opposed to subsidies for privately-owned railroads and Republicans opposed to a nationalised network. Finally, in 1970, Congress created the hybrid National Railroad Passenger Corporation (NRPC) to subsidise and oversee intercity passenger trains. Its original brand name was Railpax, but eventually it became known as Amtrak.

At the time, political insiders viewed this as a face-saving exercise, a last hurrah for passenger trains to satisfy nostalgic public opinion. But more than 40 years later it survives, although political and financial support tends to fluctuate according to who’s in power on Capitol Hill. Crudely speaking, Republicans don’t care for trains and Democrats are more sympathetic; it seems unlikely Donald Trump has ever ridden one (much like Margaret Thatcher in her pomp), although it’s just about possible to picture Hillary Rodham Clinton in coach class.

In Alaska, where I started my pre-election trip, regular scenic trips on the railroad had unfortunately ended for the season. Voters I spoke to there felt detached politically and geographically; it took me a while to figure out what “the lower 48” referred to. A safe red (or Republican) state, its former governor Sarah Palin provided a dry-run for Trump-style populism at the last election, but with only three votes in the Electoral College, Alaskans realised they didn’t matter much.

It was the same in the Pacific North-West, where states such as Washington and Oregon were almost certain to remain blue (Democratic) come election day. The train from Seattle’s newly-restored King Street Station to Portland reflected the more liberal political climate in this part of the US. Here trains and other forms of public transport received political and financial support. And generally, those using them were Democrats, firm if unenthusiastic supports of Hillary Clinton.

There were obviously exceptions. Two women I chatted to in a queue for Seattle’s iconic Space Needle were evangelical Christians and regarded the Democratic candidate as a godless “socialist”. Where did that leave Trump? They were conscious, in short, of the religious quandary he put them in. Could the Republican candidate win? “God will decide,” replied one after another long silence.

What was striking in this part of the US was the level of homelessness. Having travelled a lot (and lived in London) this rarely shocks me, but in otherwise affluent cities such as Seattle and Portland there was an obvious problem, often congregating around railway stations. Outside my hostel in Portland there appeared to be more people sleeping outside on the sidewalk than inside several spacious dorms. And nobody, as far as I could see, batted an eyelid.

Indeed, conspicuous by its absence from US election discourse is much about welfare, social justice or poverty – all perennials in Scotland or the UK – yet walk around any major American city and it’s right before your eyes, not just rows of tents like those I saw near Los Angeles’ elegant Union Station, but modern-day soup kitchens, many run by churches rather than federal or state government. I read the New York Times every day of my six-week trip and came across just one article on this politically-invisible “broken class”.

But most of them don’t vote, thus ubiquitous references to the “middle class”, on whom most campaigning activity is concentrated. In US parlance “middle” encompasses rather more than it does here, but it generally means those in work. Sympathy for those outside this group, even among self-identifying Democrats, was not something I encountered.

Scratch the surface of a liberal and there were pretty conservative views about healthcare and government assistance. One Uber driver in LA was particularly exercised about “Obama phones”, free mobiles given out to poor citizens so they can get in touch with prospective employers and stay in contact with medical professionals.

“When they break they just get a new one,” he complained, “and they’re paid for by people like me.” There were also the usual contradictions: the strongest opposition to welfare comes from parts of the US most likely to rely on it.

On the train from Chicago, Illinois, to Grand Rapids, Michigan, I sat next to a quartet of Republicans who found the four-hour journey so intolerable that only constant chatter and several bloody marys got them through it. Guns came up now and again, mainly speculation that Clinton would interfere with the Second Amendment, thus depriving law-abiding citizens such as them the means by which they could defend themselves from an undefined threat.

In Little Rock, Arkansas, meanwhile, I saw where the Clintons’ political partnership began, both Bill’s several terms as governor and Hillary’s initial forays into public life. The southern state was an unlikely birthplace for Clintonian liberalism; just two decades before they first moved into the governor’s mansion the city’s Central High School had witnessed a prolonged battle over desegregation. Change has usually been painful in the US, especially anything involving race.

Although things have improved significantly since those days, low-level racism still permeates the US, although it’s often so nuanced as to be undetectable. While in 1950s Arkansas it was African-Americans struggling to assert basic rights as citizens, today it’s Hispanics. In the Californian city of San Diego, for example, I was surprised by the response I got on telling people I was planning to cross the border into the Mexican town of Tijuana (the city’s excellent “trolley” system goes right to the border). “It’s not safe,” people told me. “Don’t take your iPhone.”

Roughly translated this meant “it’s full of Mexicans”, and Mexicans are, of course, criminals, yet my iPhone and I survived. The same code was used in overheard references to “public transit”. Anyone using that in LA, I heard someone say at a hostel in Austin, Texas, was “poor and dirty” (in other words, black or Latino). In Charlotte, North Carolina, I spoke to a taxi driver from Karachi who said he and his hijab-wearing wife only started experiencing abuse with the rise of Donald Trump. His children had been told to go back home and potential passengers had taken another taxi on seeing the colour of his skin.

His take on the election was surprising. “I’m a Muslim, so I’m a conservative,” he told me. “I won’t vote for Hillary, but Trump missed a genuine chance to get my support.” The following day, he added, he was planning to purchase a gun for the first time since arriving in the US 17 years earlier. “November 8th and 9th are going to be the darkest days this country has seen,” he predicted. “There’ll be riots, and I need to protect my family.”

This could easily appear paranoid, but when placed in context it’s rather more plausible. In a country, roughly speaking, half globalist and half nationalist (although the globalists are pretty nationalist too), it shouldn’t really come as a surprise that the two don’t really get along. Not only that, but these two polarised world views – not unlike Nationalists and Unionists in Scotland – can give rise to anger, hyperbolic rhetoric and, occasionally, hatred, sheer hatred, of one candidate or the other.

Democrats don’t really hate Trump, they just think he’s preposterous, but many Republicans really hate Hillary (as, indeed, do many left-wing Democrats). Although Clinton is arguably the most experienced presidential candidate since George H Bush or Theodore Roosevelt, the flip side of having been around so long is that it also puts her beyond reach; indisputably part of the political elite, she’s no longer a person your average American can imagine having a beer with.

The slogan "I’m With Her" therefore has a grudging quality. Nobody I spoke to, even Democratic voters, felt they stood with HRC, just that they didn’t really have any choice given the alternative. And whenever I asked Trump supporters why they liked the Republican contender (and he certainly appeared to inspire more affection than his opponent), they stressed his business experience, his ability to “tell it like it is” and, above all, the fact he wasn’t a politician.

This, of course, was absurd, for if the Donald hadn’t started the race as a traditional politician he was certainly one by its end. Such rationales also highlight the relatively narrow American definition of “the Establishment”. To Republicans I met this meant anyone connected with politics, particularly Democrats called Clinton. Therefore, a multi-millionaire businessman born to privilege could pose as an anti-establishment figure and get away with it.

Americans don’t talk about class but it exists. Washington DC, for example, is stuffed full of politicos, lobbyists and government officials with near-identical CVs: upper-middle-class family, Ivy League university, obligatory year at Oxford. White House internships generally go to sons or daughters of party donors, but nobody really talks about it, whereas in the UK it’s subject to endless hand-wringing articles. Indeed, the prominent CNN journalist Anderson Cooper, a son of the prominent Vanderbilt dynasty, is media royalty.

For a country that prides itself on (relative) classlessness and a shared pursuit of the egalitarian American Dream, it’s striking that by 2020 (assuming Clinton wins next week) just two families – the Bushes and Clintons – will have dominated the Oval Office for more than three decades. Indeed, having revolted against an hereditary monarchy 240 years ago, the US has a curious penchant for political dynasties, the Adams, Roosevelts and Kennedys having dominated previous political eras.

As the comedian George Carlin joked of the American Dream, you have to be asleep to believe it. And that’s the point. It seemed to me that more and more Americans were realising the joke was on them, and many had legitimate grievances, not just about economic stagnation but against the political “elite”. In DC I caught up with one Scots-born policy adviser who observed that the theme of recent US political history was diminishing trust in once-revered institutions, not just the three branches of government but things such as free trade.

“E pluribus unum” reads a phrase on the Seal of the United States – “Out of many, one”. But while that might have been true of the New Deal in the 1930s or even Reaganomics in the 1980s, as big-tent politics began to break down in the 1990s it’s become less convincing as a governing mantra. Travel round the US and you’ll encounter not one country but several, and many in conflict with one another.

In Austin, Texas, I spoke to a taxi driver of Polish descent who was absolutely convinced Barack Obama was a “secret Muslim” and others who wanted the outgoing president to rewrite the constitution so he could stay on for a third term. In LA I met female Trump supporters who were completely unbothered by his misogyny and Democrats who flinched at the idea of such an unreconstructed alpha male occupying the White House. In Hollywood, meanwhile, Obama mocked Trump on Jimmy Kimmel Live just hours before a man with a hammer destroyed Donald’s star on the Walk of Fame.

There was another identifiable America, one I’d first encountered on an earlier trip to cover the two party conventions in July, consisting of voters who felt scunnered by the whole process and resented having to choose between two candidates they disliked. In New Orleans I shared a cab with a Latino woman who’d already scrawled “anyone else” on her ballot, and in Wilmington, Delaware, I got a lift from a New Yorker who articulated a familiar complaint, that both Clinton and Trump were the same, both right-wing reactionaries intent on dragging the US into another war.

A barber in Texas made the interesting observation that neither Trump nor Clinton could exist without one another, for if either had been up against a more credible candidate then the election would have been same old, same old. On reflection this was unconvincing, for it was hard to imagine Paul Ryan versus Bernie Sanders resembling past presidential contests; there’d have been the same clash of cultures, the same mutual incomprehension of two such polarised world-views.

And just as I encountered nobody who regarded the election as a positive experience, nor did I find anyone who genuinely believed polling day would resolve anything. Trump supporters, much like Yes supporters in Scotland, aren’t going to go away, however much moderate Republicans would like that. And if victorious, Clinton will find herself at loggerheads with Congress and delivering State of the Union addresses as that Union continues to drift apart.

The prospect of America’s first black president giving way to its first female leader ought to constitute the narrative of a modern, dynamic 21st-century nation, but instead it feels like a story that’ll have a bad ending, either Trump as president or a new commander in chief most voters neither like nor trust. The question asked by so many I’ve encountered over the past six weeks was the despondent “how has it come to this?”.

How indeed. Many of the Union stations I described earlier are ostentatiously grand, architectural embodiments of the US during its gilded age, the sort of era Trump invokes when he speaks of making America great again. Of course it’s already great, or more accurately dominant, not least economically and culturally, but for all that it’s not a country at ease with itself. The Union isn’t yet dissolved, as posters proclaimed during the Civil War, but it’s undoubtedly under immense strain.