A compact boundary-condition- determined wavefunction for two-electron atomic systems