Families do not leave alone. When people cross to another nation by choice, the clerks, schoolmasters and money-changers of their town go with them, and the desks they leave stay empty until new ones grow up.
What drains a town
Any move of people out of a town into another nation by choice: an immigration wave the other nation took in, or a rich town abroad quietly pulling families away. People who flee a war, are sold, or are driven out do not drain it this way.
What a drained town costs
For a while the town earns less money, more for a bigger town, and the nation's research falls a little for each drained town. A town drained again while still drained sinks one step deeper, to a floor.
The learned ask
When people leave a town that is already drained, its learned come to the nation and ask to be kept. Pay them, from the capital, and the drain goes no deeper; it still runs its course. Let them go, and it deepens, and the Merchants lose the clerks who kept their books. A computer master pays only when the capital can afford it and money is its way; a careful one lets them go.
What stops it
Closed Borders stops the leaving, so it stops the drain. The drain ends by itself after some turns. It does not touch a town's people count, its food or its happiness: only its money and the nation's research.
