My question is: Is perpendicular distance in the equation $\tau=Fd$ the distance of the yellow or red line?
My belief was that it was the red line, however when I take moments about $O$ I get $$\begin{align*}\tau=4a\sin\theta\, mg&-2a\sin\theta\,4mg=0;\\ 4a\sin\theta\,mg&=8a\sin\theta mg;\\ 4&=8 \end{align*}$$
Which leads me to think my assumption was wrong. I understand the diagram is not accurate but I don't think I can assume $OC$ is perpendicular to the dashed line since the $\theta$ is not necessarily $45^{\mathrm{o}}$.
I have attempted to look elsewhere online but everything I have seen leads me to think the yellow line is the right distance.
edit: $\angle OBC=90^{\mathrm{o}}$