Congress races against time to secure spending deal and avoid shutdown as lawmakers confront challenging vote math and slim majority