What if a bridge could prevent its own collapse in real time?