The overturning moment is ma times the distance from the CG perpendicular to the roadway.
For toppling, the W = mg force vector acts vertically downwards through the CG. The decel force vector F = ma acts in the direction of motion. Sum those two vectors to get a new resultant vector acting through the CG. If the new vector intersects the ground ahead of front wheel, the vehicle will topple.