The results of today's independence vote in Scotland won't be known until at least Friday, but if the majority of voters choose to separate from the United Kingdom, there will be several key issues the leaders of a newly independent Scotland will need to address right away.
The Scottish government's white paper, which spells out what independence would look like, sets March 24, 2016, as the official beginning of Scotland's life as an independent state. That means politicians would have about 18 months to transfer powers from Westminster to Holyrood, as the Scottish Parliament is known.
Until then, Scotland would officially remain part of the U.K.
During this time, the two sides would have to disentangle control over a number of nationally administered government programs and agencies — everything from driver's licences to social welfare benefits and the health-care system.
The division of government debts, assets and revenues from things like taxes, oil and gas operations and the National Lottery would also have to be sorted out.
The first parliamentary election in an independent Scotland would take place May 5, 2016, according to the white paper.
The Yes side has stressed that not all aspects of the dissolution of its union with Britain would have to be resolved by then, pointing to the example of the Czech Republic and Slovakia, which continued to negotiate some aspects of their divorce after separation.
Unlike some other countries, the United Kingdom doesn't have one, overarching constitutional document (Magna Carta notwithstanding), but a new independent state of Scotland would have its own written constitution.
One of the first tasks of the Scottish Parliament after the referendum would be to establish the so-called Constitutional Convention that would be charged with writing the constitution. The Yes side has said it wants the constitution-drafting process to be a "citizen-led forum" similar to those held in countries like Iceland, although in that case, the citizen-drafted constitution ultimately failed to pass.
Other countries — the U.S. and Canada, for example — have preferred to use smaller committees of constitutional experts, legal advisers and parliamentarians to draft their founding documents.
One of the things the new constitution will need to spell out is whether Scotland would be a constitutional monarchy and retain the Queen as its head of state.
The U.K. is a member of the European Union, but membership for an independent Scotland would not necessarily be automatic, and the exemptions to certain aspects of EU regulations that Britain has negotiated for itself would likely not automatically extend to Scotland.
Questions have been raised throughout the referendum campaign as to whether Scotland would have to wait until after it is officially independent to negotiate membership, and whether the U.K. would support its membership bid, especially given that the Britain will hold its own referendum on whether to leave the EU in 2017.
Applicants for EU membership must be approved unanimously by all 28 members.
The Yes side has argued that the matter of EU membership could be negotiated within the 18 months between the referendum and official independence while Scotland is still technically a member of the EU.
"The speed at which Europe responded to German reunification shows that it can quickly evolve in response to new situations," the Yes side said in an FAQ on the subject. "Less than a year after the fall of the Berlin Wall (in 1989), German reunification came into effect, and the old East Germany became part of the EEC (European Economic Community)."
Some of the more heated debates in the pre-referendum period have concerned the question of whether an independent Scotland would keep the British pound.
The white paper advocates keeping the pound and entering a currency union with Britain, but all three major U.K. parties have said they would not support a currency union with an independent Scotland. Bank of England governor Mark Carney has also rejected the idea.
The Scottish National Party has floated the idea of using the pound even without Britain's approval, similarly to how Montenegro unofficially uses the euro or El Salvador the U.S. dollar, for example. But most economists see this as a risky and unadvisable option.
Alternatively, Scotland could create its own currency, which would also require creating a new central bank. Although the nationalists have not advocated this, some economists see it as the best option, pointing to examples of post-Soviet countries such as Estonia that have made successful transitions to a new currency and central bank system in recent history.
An independent Scotland could also choose to adopt the euro, something it would, in theory, be committed to doing eventually under EU membership but that it likely wants to avoid given the recent problems in the eurozone economy.
Scotland has a large financial sector and, for the most part, it has come out against separation, with prominent banks such as the taxpayer-owned Royal Bank of Scotland and Lloyds questioning the economic viability of an independent Scotland and vowing to move their headquarters to England in the event of separation.
An independent Scotland would have its own military, and it would be up to the elected Parliament to decide the size and funding of the forces. The Yes side's defence plan refers to a "phased build-up of personnel to some 15,000 regular and 5,000 reserve personnel across land, air and maritime forces over 10 years."
Several former military leaders criticized the nationalists' defence plans. NATO's former deputy supreme allied commander in Europe, Gen. Richard Shirreff, called the plans "amateurish, unrealistic and lacking any clear strategic purpose."
Several former chiefs of defence staff who served in the British military published an open letter in the Sun newspaper just a day before the referendum, warning those on the Yes side that separation would undermine the defences of both Scotland and the United Kingdom.
"The division of the U.K. may or may not be politically or economically sensible, but in military terms we are clear: it will weaken us all," they wrote.
Part of disentangling from the union would involve removing Britain's nuclear arsenal from Scottish territory. Britain currently has four Trident missile-armed nuclear submarines stationed at the Clyde naval base on the west coast of Scotland, and these would have to be transferred elsewhere — at a cost to the U.K. government that some have estimated could be as high as $6.3 billion.
The Scottish National Party has said an independent Scotland would be nuclear-free and that the Trident submarines should be removed from Scotland within four years of independence.
An independent Scotland would also have to negotiate its membership in NATO. The Yes side has said it wants to be a non-nuclear member of the military alliance and will notify NATO of its intention to join immediately after the referendum.
All the other stuff
There are many other issues that would have to be tackled in the event of a Yes vote — everything from the creation of a Supreme Court to the negotiation of new trade agreements, not to mention less consequential matters such as the establishment of a new national anthem and the organization of a new national team for the 2016 Rio Olympics.