Why is fair value of a bond the real level of debt for a company?

I get that when market interest rates decrease, the price of the bond increases and the company’s economic liability may be higher than its reported debt (and vice versa).

I’m wondering how would the fair value of the bond impact a company’s debt-to-total-capital ratio and similar leverage ratios?

How is the market price of debt the real debt level the company has? Why is it not based on the book value…isn’t the book value the actual amount actually owed?