  For $g,n\geq 0$ a 3-dimensional Calabi-Yau $A_\infty$-category $\mathcal
C_{g,n}$ is constructed such that a component of the space of Bridgeland
stability conditions, $\mathrm{Stab}(\mathcal C_{g,n})$, is a moduli space of
quadratic differentials on a genus $g$ surface with simple zeros and $n$ simple
poles. For a generic point in the moduli space the corresponding
quantum/refined Donaldson--Thomas invariants are computed in terms of counts of
finite-length geodesics on the flat surface determined by the quadratic
differential. As a consequence, these counts satisfy wall-crossing formulas.
