I've done this dozens of times designing torsion spring hinges.
Start with the formula for lift force based on position from horizontal and the known CG and weight of the lid. The lift force will decrease as it goes up, getting to zero as the CG reaches 90° above the hinge pivot.
Put this into a spreadsheet and graph the lift force vs. lid position (in degrees). Add a second curve for the spring force. You want the spring force curve to intersect the lid force o that you can see where the spring force is enough to keep the lid balanced.
F = w*d*cos(t)
F = force to lift/hold lid
w = weight of lid
horizontal distance CG to hinge axis
t = angle of line from CG to hinge axis w.r.t. horizontal