Tehran's nuclear programme will shrink significantly under a framework deal to make any Iranian moves towards building an atom bomb virtually impossible for years - but the devil is in the detail.
Iran has agreed with six world powers to curb its nuclear activity in three main areas: the size and grade of its uranium stockpile, the number of centrifuges that enrich uranium, and the maximum fissile purity of the product of these machines.
"The approach outlined will effectively prevent Iran from building a nuclear bomb for an extended period of time," said Robert Einhorn, senior fellow at the US-based Brookings institution.
Still, some details have yet to be determined and the pact will take effect only if a final deal is agreed by June 30, a big "if" which can still scupper an agreement.
Here is an overview of the known details based on a US fact sheet and their potential pitfalls:
At marathon talks this week in Lausanne, Iran agreed it will operate only around 5,000 centrifuges out of 6,100 installed machines, which is less than half of its current capacity.
According to the latest report by the International Atomic Energy Agency (IAEA) on Feb. 19, Iran had around 19,500 installed centrifuges of which it was operating around 10,200.
While the number of centrifuges has been in the spotlight, enriching uranium is also a question of what kind of centrifuges are used to spin at supersonic speed to purify uranium.
Iran will not be able to enrich uranium with centrifuges that are much more efficient than the so-called IR-1 model. However, it will still be allowed to use the more modern models for research and development (R&D) purposes.
Iran is supposed to submit a detailed long-term R&D plan to the IAEA, but it is not clear how and when this will happen.
Stockpiles and enrichment
Since a 2013 accord with the six powers, Iran has stopped enriching uranium above 5 percent purity - no material of a higher grade than this is normally used in nuclear power plants. It has "downblended" or further processed its 20-percent enriched uranium stockpile.
Western countries see the step from 20-percent to 90-percent purity - the level needed for a bomb - as a relatively small one.
Iran's stockpile of low-enriched uranium is to be cut to 300 kg of 3.67-percent purification from what the United States said was now 10,000 kg. According to the IAEA, Iran had around 8,000 kg in February.
One technical detail that might be a sticky point in any final deal is the so-called tails - the byproduct of enriched uranium extracted from a centrifuge.
Setting the concentration of tails affects the separative power of a centrifuge. "Tails concentration needs to be determined," said one expert and former IAEA employee.
Iranian Foreign Minister and top nuclear negotiator Mohammad Javad Zarif, pays respect to his well wishers upon arrival at the Mehrabad airport in Tehran, Iran from Lausanne, Switzerland. (AP Photo/Ebrahim Noroozi)
Under the deal, Iran's "breakout" time - the time it would need to acquire enough fissile material for one weapon - would be extended to at least one year, for a duration of at least 10 years. The US fact sheet said it is now thought to be two to three months.
Experts say a bomb needs at least 25 kg of 90-percent enriched uranium, or 250 kg of 20-percent enriched uranium.
Senior Western diplomats have said that the calculation of break out times can be adapted to political needs. Variables include whether facilities are assumed to be constantly online and if construction of an actual bomb and the conversion of uranium gas into metal are included.
With 6,500 IR-1 centrifuges fed with natural uranium in gas form, which has 0.7 percent of the isotope used in bombs, breakout time would be around 43 weeks, Olli Heinonen, former chief inspector at the IAEA, told the Washington Institute for Near East Policy.
Feeding them with 3.5 percent enriched uranium gas, it would take around 12 weeks, he said.
Crucially, all this will have to be monitored and verified by the Vienna-based IAEA. The degree to which Iran improves cooperation with the U.N. agency will be vital for measuring the success of a deal.
The agency now has around four to eight people in Iran at any one time. They inspect declared facilities, monitor video surveillance footage and can seal uranium canisters.
Under the Lausanne deal, Iran agreed to allow the agency more intrusive access to its sites - both declared and, crucially, undeclared - and inform it of its nuclear construction plans.
However, Iran has been stalling for months an IAEA investigation into "possible military dimensions" (PMD) of its nuclear programme, which mainly took place before 2003.
Two issues, related to explosives tests and neutron calculations, should have been resolved last August. Iran has also been required to come up with more practical measures to allay concerns about its past nuclear work, a demand renewed in the Lausanne deal.
The US fact sheet says "Iran will be required to grant access to the IAEA to investigate suspicious sites".
This might include the Parchin site, to which the IAEA has unsuccessfully sought access to determine whether any past action related to PMD might have taken place there.
The IAEA's expanded role might need reorganising the way it is funded.
Fordow and Arak
The redesign of the Fordow enrichment site, buried deep within a mountain, and of the Arak heavy-water reactor, a type of plant which could yield fissile plutonium usable in a nuclear bomb, will have to be detailed in any final deal.