Entanglement entropy at criticality and away from it using the conformal Hilbert space