Hi Dot,
If you use the external counter that you’re setting up ($c) instead of $wp_query->current_post, does that output the correct wrapper code?
It would be pretty easy to write a function that updates an option in the WP options table (last_login) and hook it onto a login action.
You could then check whether the current date is more than 3 months after the last login and add the CSS to un-hide the div.
At least that way you’d take the manual work out of it, in case you forget to update the date field in the DB.
I had the same problem, what theme are you using?