I had an IUD inserted about a year ago, and now my period lasts for approximately twelve days, whereas before it used to be seven or eight days. Please note that when it begins it is dark yellow trending towards brown, and is accompanied by cramps. That lasts for two days, then there is heavy bleeding for three or four days, and it begins to lighten until it becomes dark yellow or brown, and that carries on for a while. I do not know exactly when the period ends, but a while ago I heard that what is meant by dryness is inserting a piece of white cotton or a tissue and the like, and if there is any colour on it, that means that I have not become pure yet, and if there is no colour on it, then I have become pure [i.e., my period has ended]. I have been relying on this method to determine whether I have become pure or not, but I do not know whether it is correct or not. This month, on the second day of Shawwaal, the same thing happened: light discharge, then heavy bleeding, then it became yellow and light brown, but the brown discharge continued for a long time. About three days ago, the colour began to get darker again, so I inserted a piece of cloth and it came out dark brown. Should I do ghusl and pray? If we say that it is istihaadah, should I work out the times of my menses according to the natural cycle that I had before inserting the IUD or the cycle I had after that? Is it permissible to have intercourse in this situation?