We present the science case, reference design, and project plan for the Stage-4 ground-based cosmic microwave background experiment CMB-S4.