THERESA May’s visit to Trump’s America was supposed to be a triumph. She almost got away with it, too. A new president; a new special relationship; a new era of American trade, with post-Brexit Britain first in the queue for a firm handshake and a square deal. Mainstream pundits seemed to nod along. Maybe Britain had found its role. Yeah, maybe this could work.

But then Trump announced his new immigration policies and the jerry-rigged staging collapsed, leaving the British Government’s spineless opportunism naked for all the world to see.

At first, the Prime Minister shrugged her the shoulders. The line was "America’s immigration policy is America’s business". However, when even Tory MPs were calling it “shocking, ludicrous, appalling and insane”, Number 10 retreated, demonstrating again the unbending moral authority and "iron discipline" of contemporary British Conservatism.

World public opinion has, quite rightly, turned on Trump’s America. We don’t have words in our vocabulary to describe this policy’s awfulness. Racist? Unquestionably. Apartheid? It bears serious comparison. Fascism? Technically not, but still, even a phrase like “devastatingly authoritarian” seems just too weak.

Protests have taken place across the planet, and at these events we united against racism regardless of whether we were conservative, liberal, or socialist. We need to prove on the streets that political allegiance won’t divide us any more than gender, race or religion.

I’ll happily join hands with Scottish Labour, SNP and even the Liberal Democrats. I’ll even unite with people who mistakenly thought Hillary Clinton was a great idea.

However, while the world badly needs unity right now, we also have to keep our eyes open intellectually. After 2008, we should have been celebrating a turn away from the rampant, turbo-charged capitalism that has ruined our economy since the 1970s. Instead, here we are. If we don’t combine our outrage, compassion and solidarity with deep analysis, we’re destined to keep losing.

Why is Trumpism winning? And why has it taken so many serious experts by surprise? Partly, it’s about economic failure. Not just the crisis of 2008, but decades of stagnant real wages, free-trade deals for the rich and privatisation. These are the roots of our current global predicament. 2008 was just the last straw.

Our "experts" have failed to understand the toxicity of free markets, the debt economy and austerity.

But Trump isn’t all about economics. He’s about a racism that transcends class and income. While every society is racist, and Scotland is no exception, America’s history of slavery, segregation and mass incarceration means that politics is liable to divide on racial lines. Mainstream media is usually massive enthusiasts for American politics, so it tends to turn a blind eye to this.

But, looked at honestly, none of this started with Trump, and none of this is really new. Since the Civil Rights era, the Republican Party has built its appeal to Southern Whites – formerly the quintessential Democrats – by using thinly veiled euphemisms that express hidden desires for the full restoration of white supremacy.

"Crime" is perhaps the key loaded word in American politics. Every serious American politician must be tough on crime, which is why America has the world’s highest proportion of people in prison, beating all the world’s wickedest totalitarian dictatorships hands down. For crime, read race. Fewer than one in every hundred American white males are in prison; for black men, the figure is one in 20. A third of black men spend time in prison at some point in their lives. There exists, wild as it may seem, a policy of mass incarceration of predominately young black men in the USA If you haven’t watched the excellent Netflix documentary 13th yet, I recommend you do.

"Drugs" is another trigger word. Official political campaigns against "street" drugs like crack cocaine (cocaine powder was never targeted) devastated the opportunities of a whole generation of black men. And even although whites use drugs to the same degree, black people are much more likely to be arrested on drugs charges and to serve longer sentences. For drugs, read race.

Incidentally, mainstream "liberal" Republicans like the elder George Bush are often worst offenders. He won the presidency after allies launched an appalling racist advert depicting his opponent, Michael Dukakis, as a supporter of the black criminal Willie Horton. That advert, by many accounts, turned a decent Democrat lead into a heavy loss.

The Clinton Democrats were often little better. Clinton’s 1994 crime bill has been a huge factor in rising mass incarceration. Hillary, as first lady, called young black males “super-predators”. However, rather than seeing off racism by tackling "crime", this appeasement simply helped legitimise the ideas that brought Trump to power. The same thing happened, of course, when Hillary claimed she was “adamantly against illegal immigrants” and joined Democrats in supporting a physical barrier along the Mexican border.

The other side to American racism is Islamophobia. This isn’t an ancient feature of American society. It can be dated precisely to the period between 2001 and 2003. The Twin Towers attack played a role, but the White House’s War on Terror policy turned a potential moment of global unity into a Western witch-hunt against a religious faith practised by 1.5 billion people.

The demonisation of Islam began as a pretext for invading oil-rich Iraq. But it morphed and mutated. It became a set of journalistic cliches and shorthands that expressed unsaid racist assumptions. Politicians and reporters have been casually throwing around terms like “terror suspect” for decades, building an often unjustified sense of fear and alarm that has finally come to undermine liberal democracy.

Here, again, some of the worst offenders are "liberal" Republicans like the Bush family and centrists like Tony Blair and the Clintons. Islamophobia is their idea. It was these liberals and neo-conservatives who turned the West into a paranoid state of emergency. Trump is an odious toad, and he’s swimming in their swamp.

Liberal commentators in Europe turned a blind eye to the deep-seated racism of American domestic and foreign policy. That’s why they think Donald Trump emerged out of a clear blue sky. But, realistically, Trump represents an evolution, not a revolution, in American politics.

We’re right to be appalled. We’re right to want revenge. We’re right to feel aghast when our fawning Prime Minister gets down on one slimy knee and begs for a preferential trade deal. But this isn’t new. It’s just standard American politics, albeit now uncut and unfiltered.

American politics is rotten, profoundly so. But Trump’s obscenity has made this apparent to world public opinion. Now we know he’s serious, we must get serious too. Every time Trump uses his office to bully people, let’s inflict the same humiliation on him fivefold. We can start by cancelling his visit to Britain and making clear that he isn’t welcome anywhere in Scotland, before or after independence.

Diplomacy is all very well. But it’s something that Trump seems to be unfamiliar with. And the most diplomatic thing we can do right now is to show our solidarity with the American protestors who are putting themselves on the line for peace and justice in a world that’s lost its way.