/* ============================================
   Nota de pertenencia institucional del autor:
   asterisco(s) en vez de número, coordinado entre
   el texto y la lista de notas al pie
   ============================================ */

/* 1) Número en el texto: contador propio para todas las llamadas reales */
.entry-content {
    counter-reset: webfootnote;
}
.entry-content a.footnote > sup.footnote {
    counter-increment: webfootnote;
    font-size: 0;
}
.entry-content a.footnote > sup.footnote::after {
    content: "[" counter(webfootnote) "]";
    font-size: 10px;
    position: relative;
    bottom: 1ex;
}

/* Llamadas dentro de la nota de autor: no cuentan como nota real */
h2.chapter_author > a.footnote > sup.footnote {
    counter-increment: none;
}

/* Llamada en el texto: un asterisco por cada nota de autor, según su orden */
h2.chapter_author > a.footnote:nth-of-type(1) > sup.footnote::after {
    content: "[*]" !important;
}
h2.chapter_author > a.footnote:nth-of-type(2) > sup.footnote::after {
    content: "[**]" !important;
}
h2.chapter_author > a.footnote:nth-of-type(3) > sup.footnote::after {
    content: "[***]" !important;
}

/* 2) Número en la lista de notas al pie del capítulo */

/* Capítulo con 1 autor con nota de afiliación */
body:has(h2.chapter_author > a.footnote:nth-of-type(1):last-of-type) div.footnotes ol li:nth-child(1)::before {
    content: "*";
}
body:has(h2.chapter_author > a.footnote:nth-of-type(1):last-of-type) div.footnotes ol li:nth-child(1) + li {
    counter-reset: footernote 0;
}

/* Capítulo con 2 autores con nota de afiliación */
body:has(h2.chapter_author > a.footnote:nth-of-type(2):last-of-type) div.footnotes ol li:nth-child(1)::before {
    content: "*";
}
body:has(h2.chapter_author > a.footnote:nth-of-type(2):last-of-type) div.footnotes ol li:nth-child(2)::before {
    content: "**";
}
body:has(h2.chapter_author > a.footnote:nth-of-type(2):last-of-type) div.footnotes ol li:nth-child(2) + li {
    counter-reset: footernote 0;
}

/* Capítulo con 3 autores con nota de afiliación */
body:has(h2.chapter_author > a.footnote:nth-of-type(3):last-of-type) div.footnotes ol li:nth-child(1)::before {
    content: "*";
}
body:has(h2.chapter_author > a.footnote:nth-of-type(3):last-of-type) div.footnotes ol li:nth-child(2)::before {
    content: "**";
}
body:has(h2.chapter_author > a.footnote:nth-of-type(3):last-of-type) div.footnotes ol li:nth-child(3)::before {
    content: "***";
}
body:has(h2.chapter_author > a.footnote:nth-of-type(3):last-of-type) div.footnotes ol li:nth-child(3) + li {
    counter-reset: footernote 0;
}