/* The Evolutionary Persistence of Male Androphilia — a single-column manuscript page.
   Text in Source Serif 4; tables, captions, and labels in Source Sans 3. */

:root {
    --ap-serif: 'Source Serif 4', 'Source Serif Pro', Charter, Georgia, 'Times New Roman', serif;
    --ap-sans: 'Source Sans 3', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --ap-ink: #1a1a1a;
    --ap-ink-2: #444;
    --ap-ink-3: #6b6b6b;
    --ap-rule: #1a1a1a;
    --ap-line: #d6d6d6;
    --ap-line-soft: #e8e8e8;
    --ap-link: #1f4e9c;
    --ap-bg: #fff;
    --ap-measure: 44rem;
}

/* ---- page frame ------------------------------------------------------- */

html { -webkit-text-size-adjust: 100%; }
body.ap-page {
    margin: 0;
    background: var(--ap-bg);
    color: var(--ap-ink);
    font-family: var(--ap-serif);
    font-size: 18px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.ap-skip { position: absolute; left: -999px; top: 8px; padding: 6px 10px; background: #fff; color: var(--ap-ink); }
.ap-skip:focus { left: 8px; z-index: 10; }

.ap-topbar { border-bottom: 1px solid var(--ap-line); font-family: var(--ap-sans); font-size: 15px; background: #fff; }
.ap-topbar__inner { max-width: var(--ap-measure); margin: 0 auto; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ap-topbar__site { color: var(--ap-ink); text-decoration: none; font-weight: 600; letter-spacing: 0.01em; }
.ap-topbar__site:hover { text-decoration: underline; }
.ap-topbar__pdf { display: inline-flex; align-items: center; gap: 6px; color: var(--ap-ink); text-decoration: none; font-weight: 600; }
.ap-topbar__pdf:hover { text-decoration: underline; }

.ap-main { max-width: var(--ap-measure); margin: 0 auto; padding: 40px 20px 60px; }
.ap-main--embedded { padding-top: 0; }

.ap-footer { border-top: 1px solid var(--ap-line); font-family: var(--ap-sans); font-size: 14px; color: var(--ap-ink-3); }
.ap-footer p { max-width: var(--ap-measure); margin: 0 auto; padding: 16px 20px 28px; }
.ap-footer a { color: inherit; }

/* ---- links ------------------------------------------------------------ */

.ap-paper a { color: var(--ap-link); text-decoration: none; }
.ap-paper a:hover, .ap-paper a:focus { text-decoration: underline; }
.ap-paper a.ap-x { color: var(--ap-link); }
.ap-paper :target { scroll-margin-top: 16px; }

/* ---- title block ------------------------------------------------------ */

.ap-title { margin: 0 0 36px; padding-bottom: 24px; border-bottom: 1px solid var(--ap-line); }
.ap-title h1 { font-family: var(--ap-serif); font-size: 32px; line-height: 1.25; font-weight: 700; letter-spacing: -0.005em; margin: 0 0 18px; }
.ap-author { font-size: 19px; margin: 0 0 4px; display: flex; align-items: center; gap: 6px; }
.ap-orcid { display: inline-flex; line-height: 0; }
.ap-affiliation { font-size: 16px; color: var(--ap-ink-2); margin: 0 0 10px; line-height: 1.45; }
.ap-meta { font-family: var(--ap-sans); font-size: 15px; color: var(--ap-ink-3); margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.ap-meta a { color: inherit; }
.ap-pdfline { margin: 0 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-family: var(--ap-sans); }
.ap-pdf { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1.5px solid var(--ap-ink); border-radius: 3px; color: var(--ap-ink) !important; font-weight: 600; font-size: 15px; text-decoration: none !important; background: #fff; }
.ap-pdf:hover, .ap-pdf:focus { background: var(--ap-ink); color: #fff !important; }
.ap-pdfline__note { font-size: 15px; color: var(--ap-ink-3); }
.ap-status { font-family: var(--ap-sans); font-size: 14px; color: var(--ap-ink-3); margin: 0; line-height: 1.5; }

/* ---- headings --------------------------------------------------------- */

.ap-paper h2 { font-family: var(--ap-serif); font-size: 23px; line-height: 1.3; font-weight: 700; margin: 44px 0 14px; }
.ap-paper h2 .ap-num { display: inline-block; min-width: 1.6em; }
.ap-paper h2 .ap-num[aria-hidden="true"] { display: none; }
.ap-paper h3 { font-family: var(--ap-serif); font-size: 19px; line-height: 1.35; font-weight: 700; margin: 30px 0 10px; }
.ap-paper h2.ap-part { font-size: 27px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--ap-line); }
.ap-abstract h2, .ap-citation h2, .ap-supplement--note h2 { margin-top: 0; }

/* ---- text ------------------------------------------------------------- */

.ap-paper p { margin: 0 0 1em; }
.ap-abstract { margin: 0 0 40px; }
.ap-abstract > p { font-size: 17px; }
.ap-keywords, .ap-pss { font-size: 16px; color: var(--ap-ink-2); }
.ap-section { margin: 0; }
.ap-identity { margin: 1.3em 1.8em 1.5em; padding: 0; font-size: 17.5px; line-height: 1.55; }
.ap-identity p { margin: 0; }
.ap-runin { }
.ap-supp__note { font-size: 16px; color: var(--ap-ink-2); }

/* ---- tables ----------------------------------------------------------- */

.ap-table { margin: 2em 0 2.2em; font-family: var(--ap-sans); }
.ap-table figcaption { font-size: 15.5px; line-height: 1.4; margin: 0 0 8px; }
.ap-table__num { font-weight: 700; }
.ap-table__num a { color: inherit; }
.ap-table__title { font-style: italic; }
.ap-table__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ap-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.4; border-top: 1.5px solid var(--ap-rule); border-bottom: 1.5px solid var(--ap-rule); }
.ap-table thead th { text-align: left; font-weight: 600; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--ap-rule); vertical-align: bottom; }
.ap-table tbody th, .ap-table tbody td { text-align: left; font-weight: 400; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--ap-line-soft); vertical-align: top; }
.ap-table tbody tr:last-child th, .ap-table tbody tr:last-child td { border-bottom: 0; }
.ap-table tbody th { font-weight: 600; }
.ap-table th:last-child, .ap-table td:last-child { padding-right: 0; }
.ap-table table p { margin: 0 0 0.45em; }
.ap-table table p:last-child { margin-bottom: 0; }
.ap-table__note { font-size: 14px; line-height: 1.45; color: var(--ap-ink-2); margin: 8px 0 0; }

/* ---- figures ---------------------------------------------------------- */

.ap-figure { margin: 2em 0 2.2em; padding: 0; font-family: var(--ap-sans); }
.ap-figure svg { display: block; width: 100%; height: auto; border: 1px solid var(--ap-line-soft); }
.ap-figure figcaption { font-size: 15px; line-height: 1.45; margin: 10px 0 0; color: var(--ap-ink-2); }
.ap-figure figcaption .ap-table__num { color: var(--ap-ink); }

/* ---- references ------------------------------------------------------- */

.ap-refs { font-size: 16px; line-height: 1.5; }
.ap-ref { margin: 0 0 0.6em; padding-left: 2em; text-indent: -2em; overflow-wrap: break-word; }
.ap-ref a { overflow-wrap: anywhere; }

/* ---- supplement, citation -------------------------------------------- */

.ap-supplement--note { margin-top: 44px; }
.ap-citation { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--ap-line); }
.ap-citation__text { padding-left: 2em; text-indent: -2em; overflow-wrap: anywhere; }

/* ---- small screens ---------------------------------------------------- */

@media (max-width: 640px) {
    body.ap-page { font-size: 17px; }
    .ap-main { padding: 28px 16px 48px; }
    .ap-topbar__inner, .ap-footer p { padding-left: 16px; padding-right: 16px; }
    .ap-title h1 { font-size: 26px; }
    .ap-paper h2 { font-size: 21px; margin-top: 36px; }
    .ap-paper h3 { font-size: 18px; }
    .ap-identity { margin-left: 1em; margin-right: 1em; }
    .ap-table table { font-size: 13.5px; min-width: 520px; }
    .ap-refs { font-size: 15px; }
}

/* ---- print ------------------------------------------------------------ */

@media print {
    .ap-topbar, .ap-footer, .ap-skip, .ap-pdfline { display: none; }
    body.ap-page { font-size: 11pt; }
    .ap-main { max-width: none; padding: 0; }
    .ap-paper a { color: inherit; }
    .ap-table, .ap-figure { break-inside: avoid; }
    .ap-paper h2, .ap-paper h3 { break-after: avoid; }
}

/* ---- additions for this paper ---------------------------------------- */

.ap-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--ap-line-soft); }
.ap-eq { text-align: center; margin: 1.2em 0 1.4em; padding: 0 1em; line-height: 1.7; overflow-wrap: anywhere; }
.ap-runin { }
.ap-paper h2 .ap-num { min-width: 2.4em; }
.ap-paper h3 .ap-num { display: inline-block; min-width: 3.2em; }
