There’s really no way around it: This was an awful year for climate change. And much—but not all—of that is due to Donald Trump. In his first year as president, Trump staffed his administration with climate deniers and fossil fuel allies, began the process of repealing the Clean Power Plan, pulled the US out of the Paris climate agreement, and basically did everything possible to halt progress at a time when it desperately needs to be accelerated. As if that isn’t enough, a report in November showed that global emissions grew in 2017 after several years of modest decline, thanks in part to a bump in coal use in China. So yeah, it was a pretty terrible 12 months overall.

But as bad as all these things are, they only tell part of a larger story. Buried in the avalanche of depressing news this year were legitimate reasons for hope. The nine trends and events listed below are not just excuses for wishful thinking: Any of these on their own is a major step forward for fixing climate change. And taken together, they show we might not be as screwed as the year’s headlines suggest.

1. China is making big moves on climate

It’s true that China is the biggest carbon polluter on the planet. And, yes, its coal use went up last year. But China is taking serious steps to shift off of fossil fuels. This year alone, the Communist government promised $361 billion in spending on renewables, said that it will be banning gas-powered vehicles, moved to close hundreds of coal plants, and unveiled the world’s largest financial market for reducing emissions. China sees solving climate change as a way to get richer and stronger. And its actions could reshape the entire global economy.

2. Renewables are beating fossil fuels

You wouldn’t know it from all the attention given to the coal industry by Trump’s administration, but renewable energy is doing spectacularly well. There’s a simple economic reason for that: Stuff like wind and solar is getting ridiculously cheap and outcompeting fossil fuels. More than two-thirds of new electricity added to the world in 2016 was from renewables. Prices reached record-breaking lows in Argentina, Chile, India, Denmark, and several other countries, industry tracker REN21 calculated last June. Even the International Energy Agency, which has underestimated renewables in the past, argued in October “what we are witnessing is the birth of a new era.”

3. Clean energy survived the GOP tax bill

There’s a curious fact about the Republican Party’s denial of global warming. It doesn’t include a rejection of renewable energy. In red states such as Texas, Iowa, and Kansas, clean energy is booming and creating hundreds of thousands of new jobs. So when Republicans in House and Senate proposed big cuts in its tax bill for federal programs that support wind, solar, and electric cars, some Republican congresspeople raised concerns. The final bill, while projected to add more than $1 trillion to the debt to fund tax cuts that disproportionately benefit the wealthy, nonetheless preserves credits for clean energy that both Democrats and Republicans support.

4. The era of fossil fuel cars is ending

The vast majority of vehicles on today’s roads are still run by gas and diesel. But there were many signs in 2017 this could quickly change. It wasn’t just that Volvo announced plans to only sell electric vehicles and hybrids by 2019. Nor that China, as I noted earlier, will be banning gas-powered cars. There is an emerging consensus among followers of the industry that the entire auto business model is radically changing—shifting from privately owned cars to fleets of robot-driven electric vehicles hailed on your phone. “It saddens me to say it,” acknowledged the former vice chairman of General Motors Bob Lutz in an article for Automotive News, “but we are approaching the end of the automotive era.”

5. Voters are electing climate leaders

Though the big political story of this past year remained the global rise of the far right, there is growing evidence of a progressive backlash. First came the national election this summer in the UK, where a surge of young voters helped create unexpected gains for Jeremy Corbyn’s Labour Party. Next were the string of Democratic wins in this year's state and local elections. Climate change wasn’t central to any of these elections. But many of the winning candidates, including Doug Jones in Alabama, have promised strong solutions to global warming. And a Democratic “wave” in 2018 could help deliver on them.

6. Fossil fuel divestment keeps growing

Amid the insanity of 2017, a movement urging investors to sell off investments in fossil fuels didn’t grab much attention. But it won some big victories. Indigenous activists helped pressure cities like Seattle and Santa Monica to sell off billions of dollars worth of financial ties to banks financing the Dakota Access Pipeline. And in November, Norway’s $1 trillion sovereign wealth fund caused European oil stocks to fall after it floated plans to dump $35 billion in oil and natural gas stocks. So far, institutions worth over $5 trillion have committed to some form of divestment.

7. Climate lawsuits are multiplying

Suing governments or companies for causing climate change is hard. With federal leaders unwilling to take action, however, more and more people are willing to try. Researchers from the United Nations and Columbia University calculated that the number of climate lawsuits worldwide has tripled since 2014, with 654 cases in the US alone. Experts like Tim Crosland of the UK climate law group Plan B think that only one big case has to be successful—whether it’s former tobacco lawyer Steve Berman suing big oil or a Peruvian farmer taking on a German utility—to cause an “avalanche” with “the potential really to bring down the fossil fuel companies.”

8. States and cities are stepping up

When California governor Jerry Brown went to China for an energy conference earlier this year, he got a private meeting with President Xi Jinping. Secretary of Energy Rick Perry, who also attended, met with a lower-ranking official. It pretty much sums up US climate policy in 2017: States such as California passed wildly ambitious legislation, while the Trump administration denied basic climate science. Actions of states and cities can’t replace strong and focussed federal policy. Yet they’ve helped the US already get halfway towards its Paris emissions goal.

9. Oil companies are questioning their future

The CEO of Royal Dutch Shell made an astounding prediction in July: Global oil demand could peak and then begin declining in about ten years, due partly to the trends and events I’ve described above. Statoil is making similar predictions. It raises existential questions for an industry whose profits depend on continuous expansion. Others like Chevron are publicly dismissing the concept of peak oil demand—but the fact that big oil is debating it at all means industry leaders are increasingly unsure about their future. With Trump as president the fossil fuel industry has never looked so powerful. In reality, its days may be numbered.