/* Article page (article.html): title block, metadata list, full-text link and
   the server-rendered citation. The citation block repeats the panel styles of
   article_list.css, scoped to .article_citation, because that sheet belongs to
   the article-list partial and is not loaded here. */
.article_title_section {
    margin-bottom: 25px;
}
.article_title_section > span {
    font-size: smaller;
    color: var(--gold);
    font-weight: bold;
}
.article_title_section > div {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
/* Fluid title (em, so the accessibility font-size setting still scales it);
   long titles wrap anywhere rather than widen the page. */
.article_heading {
    flex: 1;
    margin: 0;
    font-size: clamp(1.5em, 1em + 2vw, 2.25em);
    font-weight: bolder;
    overflow-wrap: anywhere;
}
.article_share {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    border: none;
    border-radius: 1000px;
    background-color: var(--gray2);
    color: var(--black3);
    cursor: pointer;
}
.article_share > img {
    max-height: 1.33em;
    width: auto;
}

.article_metadata {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 12px 30px;
    margin: 0 0 30px;
}
/* The <div> groups only pair a dt with its dd; the grid lays out the pairs. */
.article_metadata > div {
    display: contents;
}
.article_metadata dt {
    color: var(--gold);
    font-weight: bold;
}
.article_metadata dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.article_metadata a {
    color: var(--black3);
    font-weight: bold;
}

.article_fulltext {
    margin-bottom: 40px;
}
.article_pdf {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 1000px;
    background-color: var(--gold);
    color: white;
    font-weight: 600;
    text-decoration: none;
}
.article_no_fulltext {
    margin: 0;
    color: var(--black1);
}

.article_citation {
    margin-bottom: 40px;
    background-color: var(--beige1);
}
.article_citation > h2 {
    margin: 0;
    padding: 20px 75px 0;
    font-size: 1.25em;
}
.article_citation > div {
    padding: 20px 75px;
    overflow: hidden;
}
.article_citation button {
    float: right;
    margin: 0 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 1000px;
    background-color: var(--beige2);
    color: var(--black3);
    cursor: pointer;
}
.article_citation .text_citation {
    border-top: 1px solid var(--gold);
}
.article_citation .bibtex_citation {
    border-top: 1px solid var(--black3);
}
.article_citation .text_citation > p {
    overflow-wrap: anywhere;
}
.article_citation .bibtex_citation > pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.9em;
}
.article_citation .citation_header {
    color: var(--gold);
}

@media (hover: hover) {
    .article_share:hover {
        background-color: var(--gray3);
    }
    .article_pdf:hover {
        background-color: var(--black2);
    }
    .article_citation button:hover {
        background-color: var(--beige3);
    }
}

/* Compact layout: the share button drops under the title, the metadata pairs
   stack (label above value), and every control gets its 44px touch target. */
@media (max-width: 960px) {
    .article_title_section > div {
        flex-direction: column;
        gap: 12px;
    }
    .article_share {
        min-height: 44px;
    }
    .article_metadata {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .article_metadata > div + div > dt {
        margin-top: 14px;
    }
    .article_metadata a {
        display: inline-block;
        min-height: 44px;
        padding: 10px 0;
        box-sizing: border-box;
    }
    .article_pdf {
        min-height: 44px;
        box-sizing: border-box;
    }
    .article_citation > h2 {
        padding: 16px 16px 0;
    }
    .article_citation > div {
        padding: 16px;
    }
    .article_citation button {
        float: none;
        margin: 8px 0 0;
        min-height: 44px;
    }
}

@media (max-width: 640px) {
    .article_heading {
        font-size: 1.5em;
    }
}
