In medieval literature there is this tradition of Courtly Love. Knights who swear their troth to fair ladies (or monarchs). To pledge one’s troth was to make a vow of loyalty and faithfulness. Not unlike a “Duty of Care”.
I think this trope applies perfectly to Twelve and Clara. Capaldi said that the Doctor has this sense of debt to Clara (or duty of care), because of what she did as “The impossible girl”.
And hey, Clara and Twelve were juxtaposed to Robin Hood and Maid Marion (a courtly/ chivalric love story).
According to wikipedia, “ courtly love was an experience between erotic desire and spiritual attainment that now seems contradictory as “a love at once illicit and morally elevating, passionate and disciplined, humiliating and exalting, human and transcendent”.”