Court of Appeal overturns care order for troubled teenager