A major Hanafi distinction is whether the two letters can ordinarily be distinguished without hardship.
• If they are clearly distinct and easy to separate, and the substitution produces the legally serious change discussed by the jurists, the stricter ruling applies. A classical example is reading a word with ط in place of ص where the letters are readily distinguishable.
• If distinction is difficult for ordinary speakers — classical examples include ظ/ض, ص/س, and ط/ت in the discussed contexts — many Hanafi jurists do not invalidate the prayer because of widespread difficulty.
Therefore “close letters never matter” and “every letter substitution invalidates” are both inaccurate.