How to close other panels when one is chosen?

I’m trying to make an accordion widget (plus radio button to show that the option/panel is chosen).

Could anyone please help me with understanding how to close the other panels when one is chosen?

For now, I can open/close each panel by two clicks on it and it works for push/pull widgets below. But when I open another panel expecting the previous one to be closed It closed incorrectly and leaves an empty space. I set up it like this:
I have panels a b and c.
When I open panel a the panels b and с should be close. When I open panel b the panels c and a should be close etc.
But for now, It just leaves an empty space instead “pull widgets”.

And the second question. Could you help me to make the experience clearly and set the behavior like that:
a click just opens the panel and closes the others (now the second click by the same panel can close/open it).

The source file:
acc-radio-btn.rp (81.7 KB)

Correct behavior

Wrong behavior

I think the problem is that your project has gotten a bit convoluted and as such not clean enough for someone else to understand and debug.