Continuous-variable approach to the spectral properties and quantum states of the two-component Bose-Hubbard dimer