Brexit: What is the SNP's policy?
The Scottish National Party (SNP) has consistently voted against Theresa May's Brexit deal in Westminster. The party has also pushed the UK government to rule out leaving the European Union (EU) with no deal, arguing that such an outcome would have a "severe and disproportionate" impact on Scotland.
So what is the SNP's Brexit policy?
'Coalition of opposition'
The Scottish government's ultimate objective, of course, is for an independent Scotland that is a full member of the European Union.
If the UK ended up leaving the EU, which it is currently scheduled to do by 31 October, the SNP says it would seek a second referendum on Scottish independence by 2021.
The party is strongly opposed to Brexit, and points out that Scotland voted "overwhelmingly" in favour of staying in the EU in the referendum - with the result 62% Remain and 38% Leave.
Scotland's First Minister, Nicola Sturgeon, has previously said that the 35 SNP MPs at Westminster would back any proposals for a confirmatory referendum on the Brexit terms - a so-called "People's Vote".
But if the option to remain is not available, the SNP says it could not support any Brexit deal that does not include Scotland remaining a member of both the EU single market and customs union.
It says this could be done either through a differentiated deal that would see Scotland stay in both when the rest of the UK leaves - or through its preferred option of the UK as a whole retaining full membership of them.
So what would it mean in practice if the SNP's policy was adopted and the UK remained in the single market and customs union?
What could the UK do and not do?
Under this version of Brexit, the UK would continue to have full access to the single market and very few trade barriers with the EU. That means there would be the same friction-free flow of goods to and from the remaining 27 member countries.
The SNP says remaining in the single market would "protect jobs, living standards, our economy and public services".
But by remaining part of the customs union, the UK would not be allowed to negotiate its own free trade deals with countries outside the EU.
The UK would also be tied to EU rules and regulations and it would have very little capacity to change them. That's because having left the EU, the UK would no longer have any MEPs or representation on the European Commission.
Also, despite no longer being an EU member, the UK would have to abide by freedom of movement rules. So EU citizens would still be allowed to live and work in the UK and vice versa.
The UK would also have to continue to make a contribution to the EU budget, although the exact amount would be subject to negotiation. Currently, the UK pays about £10.8bn net a year.
The UK would, though, be able to leave both the Common Agricultural Policy (CAP) and the Common Fisheries Policy (CFP) which would save money in EU budget contributions and allow the UK to set its own policy in these areas. But the more the UK restricts access for EU boats to UK fishing waters, the more the EU is likely to restrict access for UK fish produce to EU markets.
At the moment, there is no country in Europe that is a member of both the single market and the customs union, but not part of the EU.
So the SNP is arguing for an arrangement that would be unique.
The closest equivalent would be Norway, which is not part of the EU, but is part of the single market, through its membership of the European Free Trade Association (EFTA).
In order to continue to have access to the single market, the UK would need to formally apply to EFTA to become its fifth member.
The EFTA has its own court, but it still needs to pay heed to European Court of Justice rulings when it comes to disputes involving EU law.
But Norway is not part of the customs union, something which the SNP also wants the UK to retain.
Mrs May has resisted any previous attempts to go along with a Norway-style Brexit model, arguing that it "wouldn't deliver on the vote of the British people".
However, it would alleviate the problem of preventing a possible hard border between Northern Ireland and the Republic - something for which negotiators on both sides are still trying to find a long-term solution.
Speaking of Northern Ireland, the SNP is unhappy with the Irish "backstop" proposal contained in the draft withdrawal agreement which Theresa May has negotiated.
The backstop would be triggered if the transition period expires without a new trade deal being ready in time. The SNP argues that if this happens, Northern Ireland will gain a competitive advantage over Scotland.
That's because Northern Ireland would be in a deeper customs relationship with the EU, and it would be closer entwined with the rules of the single market than the rest of the UK.
Ms Sturgeon says this would mean Northern Ireland businesses would get easier access to the single market, which she fears would have a "devastating" impact on Scottish jobs and investment.
The SNP's argument is: if Northern Ireland can have such arrangements, why can't Scotland?
The UK government's answer is that the backstop is needed to protect the Good Friday peace agreement and that Northern Ireland is in a unique situation, given it shares a physical border with an EU country.
This amounts to another reason why the SNP favours continued membership of the customs union and the single market for the whole of the UK.