hair's breadth
So close you could count the hairs on your head, and still be too lazy to actually do it.
He passed the test by a hair's breadth. He didn't even study, just guessed.
She almost got hit by a car by a hair's breadth. She was too busy texting her crush.
He barely made it to the party by a hair's breadth. He was five minutes late and everyone was already drunk.