States have beat their dour expectations for several reasons. While the economy is still weak, hiring and consumer spending have bounced back faster than many economists forecasted (in part because Americans in large swaths of the country have decided to shrug off the virus and dine out, even if it means catching the plague). Inequality has helped too, perversely: Most job losses have been concentrated among low-wage service workers, while well-paid professionals have largely kept their jobs, to the benefit of states that rely on progressive income taxes. The booming stock market, meanwhile, has plumped capital gains collections.

The federal rescue has helped, too. Last year, Republicans stymied Democratic efforts to provide states with an unrestricted pot of money they could use to deal with their potential budget woes. But Congress did provide them with $150 billion to spend on combating the virus in the CARES Act last March and increased the federal portion of Medicaid funding during the COVID emergency. The generous federal unemployment insurance programs Congress created also helped, since many states tax those benefits.

Our unequal, K-shaped recovery has worked out especially well for California, where Silicon Valley’s workers have kept on coding from home, and record capital gains driven by the initial public offerings of companies like Airbnb and DoorDash helped hand the state an $18.5 billion windfall.