From the ruins of the soon-to-be-defunct Resource Management Act (RMA), a new law is about to transform how New Zealand deals with the risks posed by climate change - and decide who foots the bill for our retreat from the coast.
Tens of thousands of coastal Kiwi homes could be deemed uninsurable over the next few decades thanks to a rapid increase in erosion fuelled by sea level rises, and a 'managed retreat' has been posited as a way to fix this very expensive looming crisis.
As it stands, however, no one is sure what a managed retreat should look like nor who should be responsible.
There are many questions still to be answered. How do you stop people buying homes near the coast? Whose problem is it when a home becomes uninhabitable, or infrastructure unusable? Do you reinforce the coast or just let nature run its course? Who pays for all this?
Finding answers to these complex questions is the challenge facing Climate Change Minister James Shaw and other legislators drafting the much-anticipated Climate Change Adaptation Act (CAA) this term.
How sea level rises are putting NZ homes at risk
Coastal erosion isn't a new problem in New Zealand, but climate change is likely to accelerate it. That's because as temperatures go up, glaciers and ice sheets melt and ocean water expands, causing sea levels to rise.
"By having an increased sea level, you will inundate more of the coast - so your coastline is automatically shifted landward," Matt Rivers, a senior coastal engineer for Auckland Council, explained to Newshub.
"[Sea level rises] allow in larger waves, and those will have greater energy because they won't be dissipated by the shallow bathymetry offshore - so you'll have greater wave energy coming in, and that will cause greater rates of erosion."
Sea levels have been rising about 3.3mm a year since 1993 - and even if the world follows the most optimistic projections, it's likely to have risen another 69cm between 2000 and 2100.
That's bad news for Kiwis living by the coast.
Last year, the Deep South Challenge examined the risk posed by rising sea levels in Auckland, Wellington, Christchurch, and Dunedin. It found New Zealand had a small tidal range compared to the rest of the world, meaning just a small rise in sea level could have noticeable effects.
"Only a very modest amount of sea-level rise is sufficient to change the probability of a storm surge overtopping previous high-water marks," the report reads. "Further, while climate change is changing our hazards, we are also increasing our exposure to those hazards."
Of the four regions, Christchurch will be worst affected by sea level rises, while Wellington will face the issue first.
Researchers found a full insurance retreat - when companies lift their premiums and eventually refuse to insure coastal properties due to the risk of erosion - is likely for at least 10,230 properties in New Zealand by 2050.
Belinda Storey, managing director at Climate Sigma and one of the report's authors, says that figure is a "very conservative" estimate.
She believes the true number of Kiwi properties that'll be affected by insurance retreat in the next 30 years is likely to be significantly higher - and worries homeowners aren't going to be prepared for when it hits them in the pocket.
"People's perception is that providing they pay their insurance premiums on time and don't engage in insurance fraud, their insurance will be renewed indefinitely - or at least for the period of time that they own an asset," Storey told Newshub.
"But what our research demonstrates is that... insurance will start to become unavailable or very expensive, no matter how consistent you are as an insurance consumer."
Dr Judy Lawrence, a senior research fellow at Victoria University who specialises in climate change adaptation, says the implications for Kiwis by the coast are twofold.
"One is the impact on existing developments, and two is the impact on where we build now, particularly the infrastructure under the land - our wastewater, stormwater and [drinking] water supply.
"We really need to rethink where we're locating ourselves, how long we can sustain that and what the options are over the longer term for new development, because if people start to be affected more than they are now, the resources to deal with it would have to be immense."
Why NZ's current managed retreats laws don't work
With erosion putting coastal homes at risk and insurance costs escalating all the time, the time has come for a national managed retreat plan - a strategy shifting of people and infrastructure away from at-risk areas.
At the moment, managed retreats are the responsibility of local governments, who follow the coastal hazard adaptation guidelines issued by the Ministry for the Environment. But they're in a difficult position; it's unclear what powers they actually have, and they risk being sued if they get it wrong.
Ross Roberts, Auckland Council's Geotechnical and Geological Practice Lead, says they're mainly reliant on case law inherited from the UK to work out what they can and can't do.
"That means we don't have clarity over the responsibilities when it comes to these sorts of decisions. It's not very easy for us to know exactly how things would turn out in court - there's a limit to how much council can justify a policy and then prescribe it," he explained.
"We can only do what's allowed within the law - and so without having that legislative framework, we can't have a really clear policy on it because it might not be legal. We have to be very careful that we do things that are defensible."
Dr Lawrence says the implications of sea level rises are far bigger than any local government can deal with by themselves. She's among the chorus of experts calling for a national plan to address it.
"At least the Government's looking at it now, so the agenda's on the table," she told Newshub.
"But there is some urgency to it, because we've got this large building programme going on, the replacement of infrastructure, and we're trying to get more houses - so we've got to be really careful where we put them."
The largest-scale managed retreat in New Zealand's history came after the 2011 Christchurch earthquake, when the scale of liquefaction in the city became apparent. More than 8000 homes were purchased by the Government so the land could be remediated and residents relocated.
Climate Change Minister Shaw says large-scale responses like these tend to become the Government's problem, as councils aren't confident of what they can legally do. He agrees new legislation is needed to address the "poorly defined" guidance on how to deal with sea level rises.
"It's not clear what the precise balance of risk and responsibility is between homeowner, insurance company, bank, local government and central Government," he said.
"Where that is murky is that it tends to land in central Government's lap, and the central Government is not going to be able to insure against every single loss over the course of the coming decades.
"So we just need to be really clear about who is responsible for what, and over what time."
How NZ's new-look managed retreat laws should look
The Government's plan to tackle sea level rises will make up part of the CAA - one of three new pieces of legislation alongside the Natural and Built Environments Act (NBA) and Strategic Planning Act (SPA) that will replace the much-maligned RMA this term.
Shaw told Newshub there are three options for how the Government deals with sea level rises.
"Do you defend the property by building seawalls and other hard infrastructure; do you accommodate by putting a house on stilts, or something like that; or do you have what we would describe as a managed retreat, where you essentially swap that property for another property?"
Storey, whose research with the Deep South Challenge last year confirmed the urgent need for climate adaptation, says the Government cannot afford to think short-term about the issue.
She hopes the CAA moves to reduce the long-term risks to Kiwis, rather than just mitigating them for now to cut costs.
"People invariably say 'how can we hold back the sea?' They want to know about how we build defences like sea walls - but that can be a very maladaptive response because when you build any sort of wall, people feel safer and they end up accumulating assets behind it."
Storey says the only time an option other than managed retreat should be considered is when there's absolutely critical infrastructure that can't move and needs to be protected.
She acknowledges many will point to the situation in the Netherlands - a country that has successfully held back the sea for centuries with the likes of sea walls and its famous Maeslantkering - and ask why we can't replicate their strategies here.
But there's a simple reason - we can't afford it.
"If you think about the length of the coastline of the Netherlands compared to New Zealand, ours is more than 10 times longer," Storey explained. "When you compare the amount of GDP they have per kilometre of coastline to the amount of GDP we have, it's 47 times the size."
Storey says a range of different tools are needed to manage our retreat from the coast, and she's already thought up one herself: putting a legal time limit on at-risk properties to give councils and people a reason to stop building there.
"You convert those properties from freehold to leasehold in a legal sense… And you use a lease valuation methodology to calculate what proportion of value is being surrendered in that conversion.
"My recommendation would be that you identify those hazardous locations today, and that would halt the economic development there. People can buy and sell that lease, but everyone would have an understanding of what that time limit is, because it would be part of the legal term of it.
"At the end of that term period, you would need to have some provision within the lease terms which would establish how the house would be removed."
Dr Lawrence says there needs to be a compensatory mechanism based on fairness and equity and a "line in the sand" on what happens to those who buy or develop in coastal areas at risk due to sea level rises.
"We have to have legislation that makes it very clear that if people make the choice to put themselves in harm's way from whenever the legislation is effective, they're on their own," she said.
"So you have rules for people who are already there - who have done this unknowingly, if you like - and [rules for] somebody who has bought a property knowingly in the last four or five years, that they may not be supported by the rest of the country.
"I'm not necessarily recommending that, but we have to have that discussion."
She says the main thing is that transformative change does occur under the CAA and hard decisions are taken.
"We can't continue to just deal with the problems as they arise because that will become more frequent and the system just won't cut them. And it's unconscionable that we continue to build in places that we know are going to be affected by sea level rise."
Managed retreat legislation being written 'with urgency'
No policy decisions have yet been made on the CAA, as Shaw says there's "quite a complex set of intertwined problems" still to unravel, but he's provided assurances legislators are working on it "with some urgency".
"These things aren't going to happen tomorrow, so currently we have the advantage of time. But that window of opportunity is closing - and the narrower that window opening gets, the more difficult it gets to solve the problem," he told Newshub.
"We need to take advantage of our knowledge to develop a system that allows us to manage this situation over the coming decades, without people falling through the cracks or any of those unintended consequences."
Shaw says legislators have been working closely with insurance companies and banks, as sea level rises present a risk to them as well.
"I think everybody kind of shares the same set of motivations here, which is that the sooner that we can develop a coherent regime, the cheaper and simpler it is for everybody involved - including individual property owners and families."
It's not yet known when the CAA will be implemented.