Rearranging variables can make this clearer. In plot below, it's relatively easy to see that total effect needs no adjustment, and that direct effect from A to Y needs to block the indirect path that traverses D and C. D is a collider, and C the child of the collider, hence adjustment on B is needed