Rival male chemical cues evoke changes in male pre- and post-copulatory investment in a flour beetle