Beneath the glow of stock-market records, darkly bearish trends are lurking