if there is a fine line between one thing and another, they are very similar although the second thing is bad.
There's a thin line between courage and foolishness.
(often + between)
a thin line
A very narrow division between two alternatives, one of which is much worse than the other. As a new parent, you learn that there's a thin line between looking out for your child's welfare and being overprotective.