Insert semi-sorted into unsorted array
JavaScript (ES6), 81 bytes

(a,d)=&gt;a.map((e,i)=&gt;d[l="toLowerCase"]()&lt;e[l]()?s--:++s&gt;m&amp;&amp;(++m,p=++i),m=s=p=0)|p


Ungolfed:

function position(archive, document) {
    var score = 0;
    var max = 0;
    var pos = 0;
    var i = 0;
    while (i &lt; archive.length) {
        if (archive[i++].toLowerCase() &gt; document.toLowerCase()) {
            score--;
        } else {
            score++;
            if (score &gt; max) {
                max++;
                pos = i;
            }
        }
    }
    return pos;
}


Edit: Saved a lot of bytes thanks to @user81655.