The share of Americans in the middle class has declined over the past four decades, but not because families are falling behind.