Click the cookie to get cookies, click the buttons to upgrade! Don't worry about the fact that the Mania chance goes down, because that shows the range of numbers that can be chosen for the Mania. If you didn't understand that, it means that the smaller the number the bigger the chance. The bigger the Rat Spawn chance, the smaller the actual chance. If you have Mania all the time (when the Mania chance is 0), then if a rat comes you'll have no problem at all.
I got the idea from a https://www.kongregate.com idle game called Cookie Clicker.