Accordion List with static content

I am hoping someone can help me with an Accordion list containing static content.

I have put together a codepen and feel the code is not quite right.

I woul also like to remove teh white space from lists that dont have all 7 items populated.

Any help would be greatly appreciated.


Look at this CodePen:

Hi Mark

Excellent thank you very much, exactly what I am looking for.

@markdark Would you be able to please show me how to apply conditional style to the dynamic content:
i.e. INTRODUCTION has a blue background, PREPARATION has an orange background etc.