These are heady days for greens. Just two short years ago, the country was run by a president and Congress that refused to acknowledge the reality of global warming, much less act to avert it. Energy policy, exemplified by the monstrous Energy Policy Act of 2005, consisted of ever-greater subsidies to domestic fossil-fuel producers. The political transformation needed to prepare the US for a warming world seemed impossibly distant, years or even decades distant, in the face of a problem scientists warn could be out of control by then. Across the nation, environmental journalists grew ever wearier of writing "Bush sux and nothing is happening."

Then ... . Whiz! Bang! Pow! An Inconvenient Truth. The fourth intergovernmental panel on climate change report. Democratic sweep in Congress. One by one, hostile constituencies came around on climate change - evangelicals, corporations, national security hawks. Hell, things got so bad Bush had to start pretending to care about it. The shift was tectonic.

Which brings us to Barack Obama's just-released energy plan. When I tell you that it pushes the mainstream Democratic consensus on energy forward in a few significant ways, and stays somewhat disappointingly inside it in others, I'm referring to a consensus that would have seemed radical not long ago. The Overton window in energy politics has moved so far, so fast, that no one quite knows where the center is any more - what's safe, what's expected, what's too far.

An environment like that is ripe for acts of political courage, and on energy Obama has finally shown some, a welcome change for a campaign in which soaring rhetoric is rarely accompanied by bold policy ideas.

The plan has two central parts: a carbon cap-and-trade system that would raise revenue and an investment program that would spend it.

Two things are notable about the cap-and-trade system (which would set a cap on total carbon emissions, divvy up the emissions as permits and create a market in which the permits could be bought, sold or permanently retired). First is the goal: Obama would reduce greenhouse gas emissions by 80% from 1990 levels by 2050. Though that is the target the scientific community says is necessary to avoid catastrophic warming, it seemed hopelessly ambitious until recently. Thanks to the tireless work of green activists and the first-mover bravery of John Edwards - who on this, as on so many issues this campaign, has pushed the envelope - that target has become the baseline, supported by every Democratic candidate. (Bill Richardson ups the ante to 90%.)

More significantly, Obama would auction 100% of the initial CO2 permits. The issue of how to allocate the initial pollution permits under a cap-and-trade system is somewhat arcane, but vitally important. When the EU set up its carbon-trading system a few years ago, it gave away the initial permits based on the CO2 profile of the participating industries. That meant, perversely, that the most polluting industries got the most free permits and had the least incentive to reduce emissions. US industry is pushing for some or all of the permits to be allocated similarly in the US system. The alternative is to sell the permits at auction to the highest bidder, allowing the market to determine an initial price and creating immediate incentives to reduce emissions. Though Edwards has flirted with the idea, Obama is the first candidate to explicitly call for 100% auction. It's a ballsy move, and greens are justifiably delighted.

The investment program is solid as well, though it contains some of the predictable lemons. First the good news: Obama would invest $150bn over 10 years into creating a clean economy. Some of that investment would go toward basic energy research, which is woefully underfunded at present. Some of it would go toward "green jobs" retraining, which could help bring labour and low-income groups into the green fold. Some of it would go toward a cleantech venture capital fund, modeled on the In-Q-Tel program that helped seed technology development for the CIA. Some of it would go to important but oft-overlooked places like efficiency and a smart electricity grid.

The bad news: big subsidies for ethanol (though Obama is unusually frank about the drawbacks of corn ethanol); big subsidies for the white whale of "clean coal"; big subsidies for nuclear power. Good luck finding a candidate that steers clear of these shibboleths.

There's more good stuff sprinkled throughout the bill - a boost in CAFE standards; some attention focused on creating dense, walkable cities; a vow to use the federal government's purchasing power to accelerate cleantech markets.

Clearly Obama's energy team did its homework. The plan is detailed, well-balanced and thoughtful, a deft mix of political concessions (see: ethanol) and genuine policy boldness (see: 100% permit auction). With its release, Obama vaults to the top tier of Democratic candidates on energy - which has become surprisingly crowded.

The only real energy laggard left among the Dems is the "inevitable" nominee herself, Hillary Clinton. Her detailed energy plan is due in a few weeks. Here's hoping she sees the writing on the wall and joins her opponents in pushing forward on the signal challenge of the 21st century.