She tacked into a leeward overlap and luffed me to head to wind — is that legal?

Yes. Rule 17's proper-course limit only binds a leeward boat that became overlapped from clear astern within two hull lengths. A boat that arrives to leeward by tacking was never clear astern, so Rule 17 never switches on, and Rule 11 makes you keep clear. Her only limits are Rule 16.1 (room to respond) and head to wind itself — past it she is tacking and Rule 13 puts the duty back on her.

▶ Watch on YouTube ↓ Download (via YouTube)
<iframe width="560" height="315" src="https://www.youtube.com/embed/w3iUb3LWf6Q" title="Sailing Kiwi" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<p><a href="https://sailing.kiwi.nz/v/w3iUb3LWf6Q/">Source: Sailing Kiwi</a></p>

Next on this shelf — The Upwind Beat