The result of the June 23 UK referendum on EU membership has opened a Pandora’s box: membership is no longer forever, European integration is reversible, everything is possible. Any proposal for how the EU, its soon to be 27 member states, and its citizens should respond to this watershed vote needs to take this turning point into account. Ideas have to be bold; action has to be courageous.

With intra-European diplomacy abounding in the aftermath of the British vote to leave the EU, it is worth noting what the French, German, and Polish foreign ministers declared on August 28: a “more flexible European Union” should take full advantage of the EU treaty framework to respond to varying levels of ambition among its members. That’s a fair starting point but falls far short of the challenges Europe is facing, both domestic and external.

So let’s expand their thinking. The objective should be not just the EU but Europe as a whole. And the mission should be flexibility not only within the treaties but also through a new structure in which European integration can be organized. Flexible integration should no longer be the last resort if all countries cannot agree; rather, it would become the organizing principle of a Europe that aims for an ever-closer union without prescribing a particular way of uniform, simultaneous integration.

It’s time for a pan-European union that encompasses all of the continent’s sovereign countries at different levels of integration.

The most basic integration level would be about rights and democracy as currently embodied in the Council of Europe. Its 47 members have all signed the European Convention on Human Rights. Fusing this body’s work in the name of 800 million Europeans with the EU’s own rights mechanisms would give human rights and democracy promotion a much-needed lift. It would also offer a chance to reset EU relations with Russia: negotiating with Moscow to stay in would be a way to mend fences, while Russia’s refusal to remain would be a clear sign that the country does not share basic European values.

The next level of integration would be economic, as currently enshrined in the EU’s single market and its association with the European Economic Area (which includes the EU members plus Iceland, Liechtenstein, and Norway) and Switzerland. Here, a revision should put in place mechanisms that aim to increase EU members’ economic competitiveness and social cohesion, while introducing an emergency brake on the free movement of people that is applicable to all members, not just one. With such reforms, this level of integration is what the UK would presumably want to keep, as it would allow the country access to the single market while providing some opt-outs on specific policies.

Higher levels of integration would include the monetary integration of the eurozone, political-internal integration based on the Schengen passport-free area, and, possibly, new (and much-needed) security and defense integration. These higher echelons of integration begin with their current memberships and a clearly defined set of accession rules for aspirant countries. However, entering them represents an enhancement of a country’s membership status rather than an enlargement of the union as a whole.

There would be no general obligation for member states to advance to a certain level of membership, and there would be a time lag for governments declaring their wish to reduce their country’s integration level. In addition, affiliation with a membership level would be valid only for, say, ten to fifteen years before it had to be renewed.

Offering explicit levels of membership rather than the current implicit variations would enable all member states to choose a degree of integration that better fits their preferences. It would also considerably improve the prospects for countries in Southeastern and Eastern Europe (including Turkey) or even the South Caucasus to advance within the pan-European union rather than outside it. Under the current system, it is difficult for these countries to know when they would be good enough to join or—even if they do fulfill all technical criteria—whether a political hurdle would be erected in one or other member state.

Framing European integration around different levels in one big organization has other major benefits. Any future changes to membership status—moves up or down the integration ladder—would be politically less disruptive than under the current system. Such changes would not threaten the overall cohesion of the union. Indeed, making membership time bound would enhance internal control as no country could take its association with one level of integration for granted. Instead, each state would have to prove to its peers that it upholds the rules and values that it has subscribed to. This system of checks and balances would more than compensate for the loss of cohesion resulting from allowing for more flexibility.

By promoting subsidiarity, the system would moreover ease separatist as well as populist pressures. Should certain regions still want to become independent, they would not pull the whole union into crisis, because their continued memberships could be secured more easily. Finally, a reorganization would give Europe the positive boost needed to overcome its political and economic crisis, while at the same time providing a constructive framework to address the treaty changes necessary to stabilize the eurozone.

The response to the UK’s Leave vote should be a Congress of Europe institutionalizing a Europe whole and free. This pan-European union would be built with new internal mechanisms to distribute responsibilities among all levels of government. Such an act, brought about by the shock of a close British vote as well as the millions of disillusioned voters and frustrated protesters throughout the continent, would go a long way to meeting Europe’s current challenges.