Both are adverbs deriving from adjectives.
Why in the first case two -нн- and in the second case one -н-?