How does decay work?

Not completely sure either.
It seems like it starts counting from either a server defined fixed time each week or when you finish your placements. When you do not reach your minimum of played games in a 7 day time span from then on, you’ll lose some points each day.
For example if you drop to 3000 but haven’t played in over a week and play 1-2 games you will still lose points the next day (if above 3000) for not having played enough in the past 7 days. The decay will not stop when dropping, only when you play enough.
Loss is usually minor at first, but then grows bigger each day. On the plus side you’ll get more SR for wins afterwards since the internal mmr still sees you higher than you’re placed so it gives more SR to get you up (at least that’s my impression, I’m back on 3083 on my dropped account after two games).
Usually it’s very easy to keep your SR by just playing 3-4 games at least every 3 days, but you’d probably want more like 3-5 games every 2 days if SR is important to you.