If it were a basic structure then nested lists would be your awnser but as you said it's complicated I'm thinking you should be using internal links.
<div class="step" id="A">
<p>Does the thing do the thing?</p>
<div class="step" id="AA">
<p>Then hit it. <strong>End of process</strong></p>