Structure of PP4397 reveals the molecular basis for different c-di-GMP binding modes by Pilz domain proteins.