A combinatorial calculus for polytopes in scattering amplitudes