Detecting Machine-Generated Long-Form Content with Latent-Space Variables