The rule is: your camera is horizontal if an existing line which is vertical in nature coincides with a vertical line in the centre of your viewfinder. Edges must be disregarded completely. Trying to align anything with the edges of the viewfinder is a sure way to have a tilted horizon.
Aligning lines to the frame edge is the typical mistake people make as it is in many introductory books to photography. That doesn't work. In the first ENI building example in my previous post it would work, but in the second and third example it would not. The centre line always works.