Two $2$-inch squares are placed with their bases on the same line, $1$ inch apart. A third $2$-inch square is centered above the gap and rotated $45^\circ$, then lowered until it touches both squares, as shown. How many inches is the point $B$ from the line?