Two distinct DNA binding modes guide dual roles of a CRISPR-Cas protein complex.