The Brexit Supreme Court case ruling explained
It's done. The Supreme Court has ruled and plotted a course towards Brexit.
Amid all the division and rancour over leaving the EU, they have set out how power in the UK is separated between ministers who govern, Parliament that legislates, the devolved bodies that administer parts of the UK and lastly the role of judges in arbitrating between everyone.
So what does it all mean?
In essence, the judgement is quite simple because it says that it's for Parliament, not ministers, to change the constitution of the UK.
At the heart of this case was the question of what the 1972 European Communities Act, that took the UK into what's now the EU, amounted to.
The government argued it was a pipeline down which EU law flowed.
Ministers have the power to make and break treaties - that's always been the case.
And they argued the 1972 Act is the UK's method of turning the EU treaty into practical law - such as regulations on consumer rights or freedom of movement.
But eight of the 11 justices disagreed. In their judgement, the majority said the EU law that has poured into the UK through the 1972 Act has become part of the law of our lands.
"One of the fundamental functions of the constitution of any state is to identify the sources of its law," said the judgement.
"The 1972 Act effectively constitutes EU law as an entirely new, independent and overriding source of domestic law. Withdrawal... will constitute as significant a constitutional change as that which occurred [when the UK joined].
"It would be inconsistent with long-standing and fundamental principle for such a far-reaching change to the UK constitutional arrangements to be brought about by ministerial decision or ministerial action alone.
"All the more so when the source in question was brought into existence by Parliament through primary legislation, which gave that source an overriding supremacy in the hierarchy of domestic law sources."
The justices went on to say that leaving the EU wasn't just a case of shredding the membership card.
Leaving would involve removing existing domestic rights of UK residents which came from being part of the club.
Those rights have changed over four decades as ministers have agreed new deals at summits and the union has evolved.
But the justices said that the 1972 Act never envisaged those rights could be removed entirely on the whim of a minister following an advisory referendum. This, again, is a matter for Parliament to decide.
Now, the government further argued that ministers had the power to take us out of the EU because Parliament had not taken it away.
This is an argument about the balance of power between Parliament and ministers which dates back 300 years.
But the Supreme Court majority rejected that out of hand because, turning the issue on its head, they said that Parliament could have explicitly told ministers they had the power to trigger Article 50. But where are those words to be found in our law? They don't exist.
And if those words don't exist, the power to change the constitution lies with Parliament.
What about devolution? Here, the government won hands down. It may look today like something of a pointless victory, given they lost on the fundamental point - but in years to come this judgement will become a key in disputes relating to the complicated jigsaw of how the UK is now governed.
Firstly, the justices said that while Scottish Parliament and Welsh and Northern Ireland Assemblies had a role in administering EU rules and law (for example, in relation to agriculture) they have no constitutional role in making or breaking the international treaties that lie behind those responsibilities.
So what about consulting them? The so-called "Sewel Convention" says that government in London will normally consult devolved bodies before passing a law that affects the powers they already exercise.
Westminster could come up with all sorts of new laws that affect Scotland, Wales and Northern Ireland - but in practice it has promised to *normally* not do so without speaking to them first.
And that's the point, say the justices, it's just an assurance - it's not a legally-binding obligation on London. And if it's not a law, the Supreme Court has no role in deciding its workings.
That will be a huge blow to Scottish First Minister Nicola Sturgeon's attempts to force Prime Minister Theresa May to cut some kind of unique deal.
She's said today there is a "clear political obligation" to consult and Scotland's voice "is simply not being heard".
But the brutal reality is that while there may be political fireworks between Downing Street and Holyrood, the law says London can, quite simply, just get on with Brexit whether the SNP or other parties in the nations like it or not.
Unique status of Northern Ireland?
So on to Northern Ireland: does it have a unique status?
Well yes and no. The justices said the Good Friday or Belfast Agreement in 1998 did indeed give its people a lock over their future - but not in this context.
The court said: "In our view this important provision which rose out of the Belfast Agreement gave the people of Northern Ireland the right to determine whether to remain part of the UK or to become part of a united Ireland.
"It neither regulated any other change in the constitutional status of Northern Ireland nor required the consent of a majority of the people of Northern Ireland to the withdrawal of the UK from the EU."
What happens now?
It's now up to ministers to decide what kind of Bill to put before Parliament. It could be very short.
"What form such legislation should take is entirely a matter for Parliament," said the justices.
"There is no equivalence between the constitutional importance of a statute, or any other document, and its length or complexity.
"A notice [triggering Article 50] could no doubt be very short indeed, but that would not undermine its momentous significance.
"The essential point is that, if, as we consider, what would otherwise be a prerogative act would result in a change in domestic law, the act can only lawfully be carried out with the sanction of primary legislation enacted by the Queen in Parliament."
One last point. During the hearing in December, one of the counsel sarcastically quipped that the only reason why everybody was in court was because nobody in government thought there would be a vote to leave.
Amid the legal jargon of the judgement, the justices appear sympathetic to that view.
"The effect of any particular referendum must depend on the terms of the statute [law] which authorises it," they wrote. "[Past] legislation authorising a referendum more often than not has provided for the consequences on that result."
The 2015 European Union Referendum Act made no such plans.
The subtext of the entire judgement? Former Prime Minister David Cameron really should have thought about what-happens-next and written it into the referendum bill he presented to Parliament.