google sheets – “Complicated” Conditional formatting with checkboxes and matches

First of all I apologize that I am failing to come up with a specific title about what exactly I am trying to achieve, so I made this picture as an example result.

enter image description here

If a recipe is checked, I want the formula for the conditional formatting to be looking for a recipe match (of all of the recipes checked (for which rows column C is True)) in D3:G7 and highlight certain cells if a match occurs.

The highlighted cells should be:

  • The cell in the row where the match was found in column A.
  • The cells where the match was found.

I have tried for hours and got familiar with a lot of new functions while working on my sheet but I just keep getting overwhelmed and find myself at a dead end on this specific task.

Would very much appreciate your help!