To an ideal class of a real quadratic field we associate a certain surface. This surface, which is a new geometric invariant, has the usual modular closed geodesic as its boundary. Furthermore, its area is determined by the length of an associated backward continued fraction. We study the distribution properties of this surface on average over a genus. In the process we give an extension and refinement of the Katok-Sarnak formula.