/* 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;
}
/* The BibTeX entry as LaTeX typesets it in the plain style
   (services.citation.typeset_plain): a sheet of paper in a serif face with a
   second sheet peeking out below, the "[1]" label hanging like a LaTeX
   bibliography item. Sizes in em and no line-height, so the accessibility
   menu's text size and leading still apply. */
.article_citation .bibtex_typeset {
    display: flex;
    gap: 0.6em;
    margin: 12px 0 18px;
    padding: 1.1em 1.25em;
    border: 1px solid var(--beige3);
    border-radius: 3px;
    background-color: white;
    box-shadow: 3px 3px 0 white, 4px 4px 0 var(--beige3);
    color: var(--black3);
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    font-size: 1.05em;
}
.article_citation .bibtex_label {
    flex: none;
}
.article_citation .bibtex_typeset > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}
/* The raw entry, which the copy button copies, behind a disclosure; the
   button floats right on the summary's line. */
.article_citation .bibtex_source > summary {
    cursor: pointer;
    padding: 6px 0;
    color: var(--black1);
}
.article_citation .bibtex_source > pre {
    clear: both;
    margin: 12px 0 0;
    padding: 2px 0 2px 14px;
    border-left: 3px solid var(--beige3);
    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);
    }
    .article_citation .bibtex_source > summary:hover {
        color: var(--gold);
    }
}

/* 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;
    }
    .article_citation .bibtex_typeset {
        padding: 0.9em 1em;
    }
    .article_citation .bibtex_source > summary {
        min-height: 44px;
        margin-top: 8px;
        padding: 10px 0;
        box-sizing: border-box;
    }
}

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