Text this: Schedule and magnitude of reproductive investment under immune trade-offs explains sex differences in immunity