/* Reset the footnote counter at the start of the body */
body {
    counter-reset: footnote;
}

/* Targeting only the footnote markers */
.footnote-ref sup {
    visibility: hidden; /* Hide the original number */
    position: relative;
}

.footnote-ref sup::before {
    content: counter(footnote, lower-alpha) " "; /* Convert footnote markers to letters */
    counter-increment: footnote; /* Only increment the footnote counter here */
    visibility: visible;
    position: absolute;
    left: 0;
    top: 0;
}

/* Targeting the footnotes in the margin */
li[id^="fn"] sup {
    visibility: hidden; /* Hide the original number */
    position: relative;
}

li[id^="fn"] sup::before {
    content: counter(footnote, lower-alpha) " "; /* Use the same counter value, no increment */
    visibility: visible;
    position: absolute;
    left: 0;
    top: 0;
}
