Changing ContourStyle based on an inequality


I would like to create a bifurcation diagram with ContourPlot. Suppose I want to plot the contour 1-2*a*Q+3*Q^3==0 with a the x-axis, Q the y-axis. I also want linestyle/thickness of the contour plot to change depending on the expression expr = 9*Q^2-2*a. If expr>0, I want it to be dashed; if expr<0, I want it to be a thick line. How to accomplish this?

Some previous posts about similar topic suggested putting an If statement inside the plot, but when I try something like

ContourPlot[If[expr>0, 1-2*a*Q+3*Q^3 == 0], {a,-2,2}, {Q,-2,2}] 

it gives error.