The Scottish government has published details of a new five-level alert system of Covid-19 restrictions.
It will allow the government to impose different restrictions in local areas, depending on the prevalence of the infection.
First Minister Nicola Sturgeon said it would mean a part of the country with low rates would not have to live with the same restrictions as one with a high rate.
The new system - which adds two levels to the three tiers used in England - will come into force from Monday 2 November.
Every area of Scotland will fall into one of five categories depending on the local rate of infection. It is expected that which level each area falls into will be announced next week.
Ms Sturgeon said her objective at all levels was to keep schools open.
What are the full level zero rules?
This level is the closest to normality that the Scottish government thinks we can safely get to without a vaccine. It is broadly comparable to the position in August when the virus was very suppressed in Scotland but still a threat.
However, there are still restrictions. A maximum of six people from three households would be able to meet indoors. Outdoors, the limit is 15 people from five households. Non-essential travel to areas in level 3 or above is advised against. The national physical distancing and face covering rules still apply. Leisure and entertainment is open with the exception of nightclubs. Weddings, funerals and wakes are limited to 50 people.
What are the full level one rules?
There would be a "reasonable" degree of normality in level one.
Tighter restrictions on indoor and outdoor meeting kick in at this stage, with no more than six people from two households being allowed to meet up.
On Tuesday, Ms Sturgeon announced that public health advice had recommended the current prohibition on meeting anyone from other households in our own homes should remain in place for a period as an extra precaution. This will be reviewed each week.
Level one also may see time restrictions on hospitality such as a 10.30pm curfew. Weddings and life events would be restricted to a maximum of 20 people. Indoor contact sports for adults are not permitted. Small indoor seated events would be allowed, although outdoor standing events would be banned. Only those who could not work from home should go to their place of employment.
What are the full level two rules?
This involves restrictions which are broadly similar to those in place outside Scotland's central belt at the moment.
No in-home socialising is allowed and up to six people from two households can meet outdoors and in hospitality settings.
Indoors, alcohol is only permitted with a main meal and only until 8pm.
Most leisure and entertainment premises are closed except cinemas, bingo halls and amusement arcades. Music venues and theatres are closed. Indoor bowling, snooker halls, funfairs and soft play are also closed. Stadium gatherings and events will be banned, other than those which are drive-in.
What are the full level three rules?
These restrictions are similar to the tougher rules that currently apply across the central belt of Scotland.
There are the same rules on socialising as in level two, but with stricter curbs on hospitality - alcohol cannot be served either indoors or outdoors.
Cafes, pubs and restaurants are allowed to open indoors until 6pm to serve food and non-alcoholic drinks. Outdoors, they can open until 10.30pm.
All leisure and entertainment venues are closed, including cinemas.
No non-essential travel is allowed out of a level 3 area. Indoor exercise will be restricted to individuals.
What are the full level four rules?
This level would be closer to a full lockdown, similar to the one introduced at the end of March, with non-essential shops being forced to close. It would not be used "unless absolutely necessary", at a time when cases were very high and there was a risk of the NHS being overwhelmed.
Socialising would not be allowed in people's homes, but six people from two households could still meet outdoors and there would be no limit on outdoor exercise.
All hospitality venues would be closed.
Hotels, B&Bs and self-catering would only be used for essential accommodation. No non-essential travel would be allowed and there could be limits on the distance people can travel, as well as guidance to stay at home. No use of public transport unless essential, and non-essential shops would be closed. Hairdressers, tailors, barbers and beauticians would have to shut, as would public buildings. Weddings would be limited to 15 people.
Schools would remain open, but there would be stricter rules on teaching at university and college. Gyms would be closed and only non-contact sports would be allowed outdoors. All leisure, entertainment and visitor attractions would be closed, along with all hospitality premises.
The Scottish Parliament will debate the framework next week before it is expected to come into force on Monday 2 November.