/* Online reader text (/read/{volume}/...): only what Bootstrap has no class for.
 * Everything is scoped to .prs-text, the article holding a document's text; the page layout,
 * contents, buttons and spacing around it use Bootstrap classes in templates/fragments/reader/.
 *
 * Typography follows the print edition: New Baskerville (served as Baskervville), justified and
 * hyphenated, every paragraph indented. Sizes are print point sizes divided by 11 (the body size).
 */

/* Baskervville (ANRT, SIL Open Font License: /fonts/baskervville/OFL.txt), self-hosted.
   One variable file per style covers weights 400-700. latin-ext is fetched only when needed. */
@font-face {
    font-family: "Baskervville"; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url("/fonts/baskervville/baskervville-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Baskervville"; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url("/fonts/baskervville/baskervville-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Baskervville"; font-style: italic; font-weight: 400 700; font-display: swap;
    src: url("/fonts/baskervville/baskervville-italic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Baskervville"; font-style: italic; font-weight: 400 700; font-display: swap;
    src: url("/fonts/baskervville/baskervville-italic-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

.prs-text {
    /* Change the reading font here. No system Baskerville in the fallbacks: those lack
       bold and italic, so browsers would fake them. */
    --prs-font: "Baskervville", Georgia, "Times New Roman", serif;
    font-family: var(--prs-font);
    font-size: 1.15rem;
    line-height: 1.5;
    font-synthesis: small-caps;        /* never fake bold or italic */
    font-variant-numeric: lining-nums; /* print uses full-height figures */
    position: relative;                /* page markers are placed against this */
}

/* ---- document opening: double rule, bold small-caps title, date, headnote */
.prs-text header.doc { text-align: center; margin-bottom: 1.4em; border-top: 3px double; padding-top: 1.2em; }
.prs-text header.doc h1 { font-size: 1.636em; font-weight: 700; font-variant-caps: small-caps; line-height: 1.15; margin: 0; }
.prs-text header.doc.intro h1 { font-size: 3.82em; }                   /* 42pt */
.prs-text header.doc .kicker { font-size: 1.364em; font-weight: 700; text-align: left; margin-bottom: .15em; }
.prs-text header.doc .subtitle { font-size: 2.245em; font-weight: 700; line-height: 1.1; margin-top: .2em; }
.prs-text header.doc .date { font-size: 1.091em; margin-top: .15em; }
.prs-text header.doc p { text-indent: 0; text-align: center; }
.prs-text .headnote { margin: .8em 11% 0; }
@media (max-width: 575.98px) {
    .prs-text header.doc.intro h1 { font-size: 2.6em; }
    .prs-text .headnote { margin-left: 0; margin-right: 0; }
}
.prs-text header.doc .headnote p { text-align: justify; text-align-last: left; }

/* ---- running text */
.prs-text p { margin: 0; text-align: justify; hyphens: auto; text-indent: 1.09em; text-wrap: pretty; }
.prs-text p.cont, .prs-text p.dropcap, .prs-text p.center, .prs-text p.asterism,
.prs-text p.sig, .prs-text p.attrib { text-indent: 0; }
.prs-text p.dropcap::first-letter { float: left; font-size: 3.1em; line-height: .8; padding: .08em .04em 0 0; }
.prs-text p.center, .prs-text p.asterism { text-align: center; }
.prs-text p.asterism { margin: .5em 0; }
.prs-text p.sig, .prs-text p.attrib { text-align: left; }
.prs-text h3, .prs-text h4 { font-size: 1em; font-weight: 700; line-height: 1.2; margin: 1.1em 0 .25em; }
.prs-text .s14 { font-size: 1.273em; }
.prs-text .s13 { font-size: 1.182em; }
.prs-text .s12 { font-size: 1.091em; }
.prs-text .c { text-align: center; }
.prs-text h3.s14::before { content: ""; display: block; width: 8em; margin: 0 auto .5em; border-top: 1px solid; }
.prs-text h3 + h4 { margin-top: .2em; }

.prs-text blockquote { margin: .3em 0 .3em 1.27em; font-size: .909em; }
.prs-text blockquote p { text-indent: 0; }
.prs-text blockquote p + p { margin-top: .25em; }
.prs-text blockquote p.attrib { padding-left: 1.8em; text-indent: -1em; }

.prs-text p.bib { font-size: .909em; text-align: left; text-indent: -1.27em; padding-left: 1.27em; margin-bottom: .3em; }
.prs-text dl.abbr { font-size: .909em; }
.prs-text sup { font-size: .65em; line-height: 0; }

/* ---- photographs: bold caption beneath, as printed */
.prs-text figcaption { font-weight: 700; font-size: .955em; line-height: 1.3; text-align: justify; margin-top: .3em; }
.prs-text a.prs-zoom { cursor: zoom-in; }
#prsZoom .modal-footer { font-weight: 700; }
@media (max-width: 991.98px) {
    /* phones and tablets: show the enlarged picture at full resolution and let it scroll */
    .prs-zoom-img { max-width: none; }
}
@media (min-width: 992px) {
    .prs-zoom-img { max-width: 100%; height: auto; }
}

/* ---- footnotes, under a short rule */
.prs-text sup.fnref a { text-decoration: none; padding: 0 .15em; }
.prs-text section.footnotes { margin-top: 1.5em; font-size: .818em; line-height: 1.35; }
.prs-text section.footnotes::before { content: ""; display: block; width: 30%; border-top: 1px solid; margin-bottom: .6em; }
.prs-text section.footnotes ol { list-style: none; margin: 0; padding: 0; }
.prs-text section.footnotes li { text-align: justify; hyphens: auto; padding-left: 1.1em; text-indent: -1.1em; }
.prs-text section.footnotes .mark { display: inline-block; width: 1.1em; text-indent: 0; }
.prs-text section.footnotes .back { text-decoration: none; display: inline-block; padding: 0 .5em; } /* easy to tap */

/* ---- printed page numbers: in the margin on large screens, inline in brackets below that */
.prs-text a.pb {
    font-family: var(--bs-body-font-family);
    font-size: .75rem;
    font-weight: 400;
    font-style: normal;
    text-indent: 0;
    color: var(--bs-secondary-color);
    text-decoration: none;
    white-space: nowrap;
}
.prs-text a.pb::before { content: "[p. "; }
.prs-text a.pb::after { content: "]"; }
.prs-text a.pb:hover { color: var(--bs-link-hover-color); }
.prs-text div.pbonly { height: 0; }
@media (min-width: 992px) {
    .prs-text a.pb { position: absolute; left: -4.5rem; width: 3.5rem; text-align: right; line-height: 2; }
    .prs-text a.pb::before { content: "p. "; }
    .prs-text a.pb::after { content: none; }
}

/* ---- one-page book: the sidebar entry for the document being read (set by Bootstrap Scrollspy),
        and a little room above a document or footnote when a link jumps to it */
.prs-toc a.active { color: var(--bs-emphasis-color) !important; font-weight: 600; }
.prs-doc, .prs-doc [id], #prs-contents { scroll-margin-top: 1rem; }
