Could a budget standoff trigger a Holyrood election?
Politicians are speculating about the possibility of a snap Holyrood election, with the Scottish government struggling to win support from opposition parties.
John Swinney and his senior ministers have hinted at the prospect when pressed by journalists about opposition anger over budget cuts.
And his administration has now lost two votes in parliament on the same day, underlining the lack of political capital the government has.
But for all the rhetoric, the process to end up at an extraordinary election would be highly complex - and any vote might need to be run on a short timetable due to deadlines around setting tax rates.
It also would not change the fact there is a Scottish Parliament poll fixed for 2026, which would go ahead regardless.
What is the narrow path to a snap election, and how likely is it to happen?
The budget process is really already under way in the back offices of the Scottish government, but it will kick off in earnest when Shona Robison sets out her draft spending and tax plans at Holyrood on 4 December.
The finance secretary has already warned that she faces incredibly difficult choices, and opposition parties have been vocal in their criticism of the cuts she has felt compelled to make in-year.
The Greens - lately the first port of call for a deal - are smarting after being kicked out of government by Humza Yousaf, and have seen some of their favourite policies shredded by Robison.
Labour want to replace the SNP in government, and have little incentive to do them any favours.
The Conservatives will have a new leader by the time the budget rolls around, but with the party desperate to retain its position as the core opposition to the SNP, a deal similar to the kind Annabelle Goldie used to do with Alex Salmond feels distinctly unlikely.
The Lib Dems might be keen to look like dealmakers, and one or two of them have backed budgets in the past in return for specific spending pledges.
That is the kind of agreement Shona Robison will be furiously trying to work towards in the weeks after she sets out her plans, even as they are examined by Holyrood's committees.
Votes won't actually be cast in parliament until February, when the budget bill goes before MSPs for the first time.
The SNP currently has 62 MSPs - 63 if you include John Mason, who currently has the whip suspended.
They would need the votes of two opposition MSPs to get to a true majority of 65.
Or they could try to reduce the numbers on the other side by convincing three MSPs to abstain.
If the vote were to be tied, then the presiding officer would, in line with the convention of backing the status quo, break the tie by voting the legislation down.
This happened in 2009, when the stage one vote was tied 64-64.
That's also an handy illustration that the bill failing to pass would not automatically trigger an election. The government can always tweak it and head back to parliament for another try.
That's what happened in 2009 - a week later, a revised version of the plans passed overwhelmingly.
There are only two ways for an extraordinary Holyrood election to be triggered.
One would be for the first minister to resign, and for the office to remain vacant for 28 days.
The other would be for a two-thirds majority of MSPs - 86 - to vote to dissolve parliament.
It isn't quite as straightforward as that simple two-thirds vote, though.
Things have become more complicated since 2009, with the devolution of income tax rates.
The budget bill can bounce around at length, but MSPs do need to pass a rates resolution, confirming the rates and bands of Scottish income tax, before the end of March - or the whole system falls apart.
It isn't a situation where existing rates would just continue; the government literally wouldn't be allowed to levy taxes in the coming financial year.
That sets a very hard deadline. If you want to have an election, the government that it produces needs to be in place in time to pass a rates resolution by the end of March.
If the failed budget votes were in February, that would leave a very short window - a matter of weeks - for any election.
MSPs would likely need to agree to a short campaign, and the whole thing would be haunted by the prospect of the vote not yielding a decisive result.
The Holyrood system is not designed to produce majority governments, let alone ones strong enough to bash through an emergency budget in a matter of days after taking office.
As a brief sidetrack - what would actually happen in the absence of a rates resolution?
In theory there just wouldn't be a Scottish rate of income tax, leaving a £20bn gap in devolved finances.
But realistically some kind of agreement would need to be made, probably with the UK government stepping in to help.
There could be a move to void that year's block grant adjustment and just use UK-wide tax rates, but that would still leave a big shortfall.
Or a deal could potentially be done to amend the Scotland Act to allow existing rates to continue until a rates resolution was agreed.
The only certainty is that it would be a horrible mess, which all concerned would far rather avoid.
There is technically a path to avoiding the tax deadline - MSPs could agree to pass the first two stages of the budget, then pass a tax rates resolution, and then vote the budget itself down at stage three.
It would require quite a lot of coordination and cooperation between parties apparently incapable of doing a deal.
But there's actually another deadline in terms of local authority budgets - councils need to set their own tax and spending plans by mid-March, ahead of the new financial year. It's not hugely clear how they could do that in the absence of a Scottish government budget outlining how much funding they are getting.
There's a reason why elections aren't usually held in the middle of the budget process, on the eve of a new financial year - it throws up all kinds of monstrous complications, and the kind of uncertainty that citizens and businesses could really do without.
And then of course we would have to do it all again in May 2026.
That election date remains fixed, and the rules state it would only be changed by an extraordinary election taking place within six months of it.
So we're not talking about an early election - it would be an extra one.
Do voters really want to have two Holyrood polls in just over a year, hot on the heels of this summer's general election?
It's another issue which could in theory be overcome by a two-thirds majority of parliament - 86 MSPs could band together to change the election date, and in fairness most would want to if they had only just had one.
But that, added to the complexity of the process around tax and triggering a vote, are why ministers are privately reasonably confident that they can do a deal.
It's true they are perilously short on political capital, and we live in an era of unprecedented political events.
But not every party necessarily wants an election, regardless of their publicly strident positions.
The SNP is certainly among them, but there are others who might struggle to afford three major campaigns in three years, before you even get to the question of whether they're up or down in the polls.
Ultimately the government will hope that the weeks and months between now and February, they can win over the necessary handful of MSPs.