The line of Presidential succession goes as follows: VP, Speaker of the House, President Pro Temp of the Senate, then the Sec. of State.
To my line of reasoning it makes more sense as follows: VP, Sec. of State, the various Sec. in the order of the posts creation, then the Speaker of the House, then the President Pro Temp. I think it makes more sense to elevate the cabinet members as they are all appointed by the executive, and this maintains the separation of the Executive and Legislative branches.