Bleeding

What causes brown blood and mild cramping 4 days before period is due?