Housing affordability climbs to highest level in four years