/* fitzralph.wrootpress.com — see site/DESIGN.md. Colour from CCCC MS 180 fol. 1r; shape from the 1512 print. */
:root {
  --paper: #F4EADB; --ink: #2A2118; --grey: #6E6155; --rule: #DCCFBC;
  --rose: #8A645C; --gold: #A38A5C; --red: #A9482A; --wash: #EBDDC8;
  --body: "Cardo", "Iowan Old Style", Georgia, serif;
  --gothic: "Grenze Gotisch", "Cardo", serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B1712; --ink: #EDE3D3; --grey: #A89A88; --rule: #3D352B;
    --rose: #D2A79C; --gold: #CDB27E; --red: #E07A55; --wash: #26201A;
  }
  :root:not([data-theme="light"]) .top img { filter: invert(.9) sepia(.3); }
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.6 var(--body);
  padding-inline: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--rose); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red); }
em, i { font-style: italic; }

/* header / footer */
header.top { max-width: 72rem; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
header.top .home { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; }
header.top nav { display: flex; gap: 1.2rem; }
header.top nav a { color: var(--grey); text-decoration: none; }
header.top nav a:hover { color: var(--red); }
footer { max-width: 72rem; margin: 4rem auto 0; padding: 1.2rem 0 2.5rem; border-top: 1px solid var(--rule);
  color: var(--grey); font-size: .9rem; }
footer p { margin: .3rem 0; max-width: 46rem; }

.runhead { font-family: var(--gothic); font-weight: 600; color: var(--ink); font-size: 1.5rem; margin: 0; letter-spacing: .01em; }

/* index */
main.index { max-width: 72rem; margin: 0 auto; }
.hero { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 3rem; align-items: end; padding: 3rem 0 2rem; }
.portrait { margin: 0; }
.portrait img { width: 100%; height: auto; display: block; border-radius: 2px; }
.portrait figcaption { color: var(--grey); font-size: .85rem; line-height: 1.4; margin-top: .6rem; }
.titles h1 { font-family: var(--gothic); font-weight: 700; font-size: clamp(2.3rem, 5.5vw, 4rem); line-height: 1.05;
  margin: .5rem 0 .4rem; color: var(--ink); }
.titles .runhead { color: var(--rose); font-size: 1.3rem; }
.author { font-size: 1.3rem; font-style: italic; margin: 0 0 1.6rem; color: var(--grey); }
.standfirst { font-size: 1.3rem; line-height: 1.5; margin: 0 0 1rem; max-width: 38rem; }
.titles p { max-width: 38rem; }
#plan { border-top: 2px solid var(--ink); margin-top: 2rem; padding-top: 1.4rem; }
#plan h2 { font-family: var(--gothic); font-weight: 700; font-size: 2rem; margin: 0 0 .3rem; }
.plannote { color: var(--grey); margin: 0 0 1.5rem; max-width: 40rem; }
#plan h3 { font-weight: 700; font-size: 1.15rem; margin: 2.2rem 0 .4rem; color: var(--rose); }
#plan h3 .range { font-weight: 400; color: var(--grey); font-style: italic; margin-left: .4rem; }
ol.plan { list-style: none; margin: 0; padding: 0; }
.bk { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr); gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.bk .num { font-family: var(--gothic); font-weight: 700; font-size: 1.35rem; color: var(--rose); line-height: 1.2; }
.bt > a, .bt > span:first-child { font-weight: 700; margin-right: .6rem; }
.bt > span:first-child { color: var(--grey); }
.bt .what { color: var(--ink); }
.rule { display: block; height: 5px; background: var(--wash); margin-top: .5rem; border-radius: 1px; min-width: 2rem; }
.rule > span { display: block; height: 100%; background: var(--gold); border-radius: 1px; }

/* book page */
main.book { max-width: 72rem; margin: 0 auto; }
.bookhead { padding: 3rem 0 1.5rem; border-bottom: 2px solid var(--ink); margin-bottom: 2rem; }
.bookhead h1 { font-family: var(--gothic); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.2rem); margin: .2rem 0 .3rem; line-height: 1.1; }
.bookhead .runhead { color: var(--rose); font-size: 1.3rem; }
.lede { font-size: 1.25rem; font-style: italic; margin: 0; max-width: 46rem; }
.notice { border-left: 3px solid var(--red); padding: .2rem 0 .2rem 1rem; color: var(--grey); max-width: 46rem; }
.sec { margin: 0 0 3.5rem; }
.sec > h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 1.4rem; padding-top: .5rem; border-top: 1px solid var(--rule); }
.sec > h2 .where { display: block; font-weight: 400; font-size: .85rem; color: var(--red); margin-bottom: .1rem; }

.pa { display: grid; grid-template-columns: 9rem minmax(0, .9fr) minmax(0, 1.25fr); gap: 0 2rem; margin-bottom: 1.6rem; }
.rail { font-size: .8rem; line-height: 1.35; color: var(--grey); }
.rail .cite { color: var(--red); text-decoration: none; display: block; margin-bottom: .4rem; }
.mg { font-style: italic; overflow-wrap: anywhere; }
details.la { font-size: .93rem; line-height: 1.55; color: var(--grey); }
details.la > summary { display: none; }
details.la [lang="la"] { overflow-wrap: anywhere; }
a.fol { color: var(--red); font-size: .78rem; text-decoration: none; font-variant-numeric: lining-nums; white-space: nowrap; }
a.fol:hover { text-decoration: underline; }
.en p { margin: 0 0 .9rem; hyphens: auto; }
.en h3.cap { font-size: 1rem; font-weight: 700; margin: 1.2rem 0 .5rem; }
.sp { font-variant: small-caps; font-weight: 700; letter-spacing: .04em; text-transform: lowercase; font-size: 1.08em; }
.sp-john { color: var(--rose); }
.q { color: var(--red); }
sup.nr { line-height: 0; font-size: .7em; }
sup.nr a { color: var(--red); text-decoration: none; padding: 0 .1em; }
ol.notes { margin: .5rem 0 0 calc(9rem + 2rem); padding: 1rem 0 0 1.4rem; border-top: 1px solid var(--rule);
  font-size: .9rem; line-height: 1.5; max-width: 46rem; }
ol.notes li { margin-bottom: .45rem; }
ol.notes li::marker { color: var(--red); }
ol.notes .back { text-decoration: none; color: var(--grey); }
.emend { border-top: 2px solid var(--ink); padding-top: 1rem; }
.emend h2 { font-family: var(--gothic); font-weight: 700; font-size: 1.6rem; margin: 0 0 .4rem; }
.emend p { color: var(--grey); max-width: 46rem; }
.emend table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.emend th { text-align: left; font-weight: 700; border-bottom: 1px solid var(--ink); padding: .3rem .6rem .3rem 0; }
.emend td { border-bottom: 1px solid var(--rule); padding: .3rem .6rem .3rem 0; vertical-align: top; }
.emend td:first-child { color: var(--red); white-space: nowrap; }
nav.pn { display: flex; justify-content: space-between; border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 1rem; font-size: 1.1rem; }

/* about */
main.prose { max-width: 40rem; margin: 0 auto; padding: 2.5rem 0; }
main.prose h1 { font-family: var(--gothic); font-weight: 700; font-size: 2.6rem; margin: 0 0 1rem; }
main.prose h2 { font-size: 1.15rem; font-weight: 700; color: var(--rose); margin: 2rem 0 .3rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; }
  .portrait { max-width: 15rem; }
  .pa { grid-template-columns: minmax(0, 1fr); }
  .pa .rail { order: 0; display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .3rem; }
  .pa .rail .cite { margin: 0; }
  .pa .en { order: 1; }
  .pa details.la { order: 2; margin-bottom: .6rem; }
  details.la > summary { display: list-item; cursor: pointer; color: var(--red); font-size: .85rem; }
  ol.notes { margin-left: 0; }
  .emend table, .emend thead, .emend tbody, .emend tr, .emend td { display: block; }
  .emend thead { display: none; }
  .emend tr { padding: .4rem 0; border-bottom: 1px solid var(--rule); }
  .emend td { border: 0; padding: 0; }
}
