Breakdown of Ég reyni að sefa hann, sama hvað það kostar.
ég
I
hann
he
það
it / there (existential) / the one (n)
hvað
what
Questions & Answers about Ég reyni að sefa hann, sama hvað það kostar.
How does sama function in this sentence, and does it decline?
In the phrase sama hvað, the word sama acts as a fixed particle meaning no matter. It is an invariable adjective in this construction, meaning it never changes its ending for gender, number, or case regardless of what follows it.
The translation says what it takes, but is kosta literally the verb for to cost?
Yes, kosta literally means to cost in a financial sense. Just as in English, it is frequently used metaphorically here to mean whatever effort or sacrifice is required.
Why is the pronoun hann in the accusative case here?
Does the clause sama hvað það kostar require the subjunctive mood?
No. While some concessive clauses in Icelandic (like those using þótt) often take the subjunctive, clauses built with sama plus an interrogative word almost always use the regular indicative mood, as seen here with the present indicative kostar.