Understanding affordability: The economics of housing markets