U.S. Must Keep Terror Hearings Open, Court Says