The earliest detective stories — Poe’s Dupin, Collins’s Moonstone, and Gaboriau’s Lecoq — the blueprints every mystery since has followed.