The continued fraction is actually related to the principle cycle, which in turn is related to the class group. For example, it is an easy exercise to prove that the period length for $\sqrt{D}$ is at most a logarithmic factor away from the regulator of $\mathbb{Z}[\sqrt{D}]$ (this need not be a maximal order).
The first place I recall that contains a bit on the correspondence with classes, the relation to the regulator, and computational applications is chpater 5.6 and 5.7 in Cohen's "A Course in Computational Algebraic Number Theory".
The second being "Quadratics" by Mollin, chapter 2.

