div.article_list_headers {
    border-bottom: 2px solid var(--beige3);
    display: flex;
    font-size: small;
    margin-bottom: 5px;
    color: var(--gold);
    font-weight: bold;
}
div.article_list_headers > span {
    margin-bottom: 5px;
}

ul.article_list {
    padding: 0;
    margin: 0;
    list-style-type: none;
}
ul.article_list > li {
    padding: 15px 0;
    border-bottom: 1px solid var(--gray4);
}

div.article_title_cell > span {
    display: block;
    margin-right: 15px;
    margin-bottom: 5px;
}
div.article_title_cell > span:not(:first-child) {
    font-size: 0.9em;
}
div.article_title_cell > span:not(:first-child) > a {
    color: var(--black3);
    text-decoration: none;
}
div.article_title_cell > span:not(:first-child) > a:hover,
div.article_title_cell > span:not(:first-child) > a:focus-visible {
    color: var(--beige4);
}

span.article_title {
    font-size: larger;
    font-weight: bolder;
}
span.article_pages {
    font-size: smaller;
}

/* Mobile-only inline labels: shown ≤640px where the column header row is hidden,
   so a bare year/pages value keeps its meaning. */
.cell_label {
    display: none;
}

div.article_actions_cell > button, div.article_actions_cell > a {
    display: block;
    color: var(--black3);
    border: none;
    background: none;
    text-decoration: none;
    padding: 5px 0;
}
div.article_actions_cell > button:hover,
div.article_actions_cell > a:hover {
    cursor: pointer;
    color: var(--beige4);
}

div.article_authors_cell > a {
    display: block;
    color: var(--black3);
    text-decoration: none;
    margin-right: 15px;
}
div.article_authors_cell > a:hover {
    color: var(--beige4);
}

div.citations {
    background-color: var(--beige1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s, margin-top 0.5s;
    position: relative;
}
div.citations.expanded {
    margin-top: 20px;
    max-height: 30em; /* might prove to not be enough, to be tested */
}
div.citations > div {
    padding: 20px 75px;
    overflow: hidden;
}
.citation_status {
    min-height: 1.5em;
    padding: 20px 75px 0;
    color: var(--black3);
}
.citations button {
    border: none;
    background-color: var(--beige2);
    border-radius: 1000px;
    padding: 8px 16px;
    float: right;
    margin: 0 10px;
    color: var(--black3);
}
.citations button:hover {
    background-color: var(--beige3);
}
.citations button:disabled {
    cursor: wait;
    opacity: 0.6;
}
.text_citation {
    border-top: 1px solid var(--gold);
}
.bibtex_citation {
    border-top: 1px solid var(--black);
}
.bibtex_citation > p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.text_citation > p {
    overflow-wrap: anywhere;
}
.citation_header {
    color: var(--gold);
}
.citations_x {
    position: absolute;
    right: 15px;
    top: 5px;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    float: none;
}
.citations_x:hover {
    cursor: pointer;
}
.citations_x > img {
    display: block;
}

/* Reflow (WCAG 1.4.10): the .three_col_split/.four_col_split rule in style.css
   already stacks the article rows; here just trim the wide citation padding and
   give the expanded panel room once it is full-width. */
@media (max-width: 640px) {
    /* Column headers don't align to the now-stacked rows — drop them and surface
       the per-value labels instead. */
    div.article_list_headers {
        display: none;
    }
    .cell_label {
        display: inline;
        color: var(--gold);
        font-weight: bold;
        font-size: small;
    }
    div.article_title_cell {
        margin-bottom: 6px;
    }
    /* Actions become a row of tappable pill buttons (≥44px) rather than a stack
       of thin text links. */
    div.article_actions_cell {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }
    div.article_actions_cell > button,
    div.article_actions_cell > a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 16px;
        background-color: var(--beige2);
        border-radius: 1000px;
    }
    div.citations > div {
        padding: 16px;
    }
    .citation_status {
        padding: 16px 16px 0;
    }
    div.citations.expanded {
        max-height: 120em;
    }
    .citations button {
        float: none;
        margin: 8px 0 0;
        min-height: 44px;
    }
    .citations_x {
        padding: 10px;
        top: 0;
        right: 4px;
    }
}
