Robust legal system key to thriving democracy: CM