/* bradwardine.wrootpress.com — see DESIGN.md. One family, three faces; three hands, three colours. */
@font-face { font-family: "EB Garamond"; src: url(/fonts/ebg-regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap }
@font-face { font-family: "EB Garamond"; src: url(/fonts/ebg-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap }
@font-face { font-family: "EB Garamond SC"; src: url(/fonts/ebg-sc.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap }

:root {
  --paper: #F6F1E6; --paper2: #EDE6D7; --ink: #221E1A; --latin: #4A443C; --grey: #655F55; --rule: #DCD4C4;
  --azure: #2A4A7B;   /* Savile, 1618 */
  --gules: #962D20;   /* our hand, 2026 */
  --gold:  #A5833A;   /* rules only */
  --serif: "EB Garamond", "Iowan Old Style", Garamond, "Times New Roman", serif;
  --sc: "EB Garamond SC", "EB Garamond", Garamond, serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #19181A; --paper2: #232226; --ink: #E8E2D5; --latin: #BDB5A7; --grey: #A39C90; --rule: #36343A;
  --azure: #8FB2E3; --gules: #E2846D; --gold: #C9AC6E; color-scheme: dark } }
:root[data-theme="dark"] {
  --paper: #19181A; --paper2: #232226; --ink: #E8E2D5; --latin: #BDB5A7; --grey: #A39C90; --rule: #36343A;
  --azure: #8FB2E3; --gules: #E2846D; --gold: #C9AC6E; color-scheme: dark }

* { box-sizing: border-box }
html { font-size: 16px }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 1.22rem; line-height: 1.55;
  font-variant-numeric: oldstyle-nums proportional-nums; font-feature-settings: "liga", "kern";
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .14em }
a:hover { text-decoration-color: currentColor }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--azure); outline-offset: 2px }
.sc, h1, h2, h3, .addr, .caphead, .colhead, .pn, .tools, .chgrid, .rh, .booklabel, .notes h2, .errata summary, .parts h2 {
  font-family: var(--sc); letter-spacing: .12em; font-weight: 400; font-variant-numeric: lining-nums }
.wrap { max-width: 80rem; margin: 0 auto }

/* running head, as the folio sets it */
header.site { max-width: 80rem; margin: 0 auto; display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; align-items: baseline; padding: 1.1rem 0 .5rem; border-bottom: 1px solid var(--rule) }
header.site .brand { font-style: italic; text-decoration: none; font-size: 1.05rem; color: var(--ink) }
header.site .rh { margin-left: auto; font-size: .95rem; color: var(--ink) }
header.site nav { font-size: .95rem; font-style: italic; color: var(--grey) }
header.site nav a { margin-left: 1rem; text-decoration: none }
header.site nav a:hover { text-decoration: underline }
.draft { max-width: 80rem; margin: 0 auto; text-align: center; font-style: italic; font-size: .98rem; color: var(--gules); padding: .45rem 0 0 }
.draft a { color: inherit }
main { max-width: 80rem; margin: 0 auto; padding: 1rem 0 3rem }
footer { max-width: 80rem; margin: 0 auto; font-size: .95rem; color: var(--grey); padding: 1.2rem 0 3rem; border-top: 1px solid var(--rule); font-style: italic }
footer a { color: inherit }

/* headings */
.crumb { font-style: italic; font-size: 1rem; color: var(--grey); text-align: center; margin-top: 1.4rem }
.crumb a { text-decoration: none } .crumb a:hover { text-decoration: underline }
h1 { text-align: center; font-size: 1.5rem; line-height: 1.3; margin: .4rem 0 1.4rem; text-wrap: balance }
h1::before { content: ""; display: block; width: 7rem; height: 2px; background: var(--gold); margin: 0 auto .8rem }
.mast h1::before { display: none }
h2 { font-size: 1.1rem; margin: 2.4rem 0 .8rem }
h3 { font-size: 1rem }
.sub, .lead { font-style: italic; color: var(--grey) }
.jump { text-align: center; font-size: .95rem; color: var(--grey); margin: -.6rem 0 1.2rem; font-variant-numeric: lining-nums }
.jump a { text-decoration: none; margin: 0 .2rem; color: var(--azure) } .jump a:hover { text-decoration: underline }

/* the block grid: | Savile | Latin | English | */
.tools { display: flex; justify-content: flex-end; font-size: .85rem; color: var(--grey) }
.tools label { cursor: pointer } .tools input { accent-color: var(--azure); vertical-align: -.1em; margin-right: .35rem }
.colhead { display: none; grid-template-columns: 11rem minmax(0, 27rem) minmax(0, 36rem); gap: 0 2rem; font-size: .8rem; color: var(--grey); padding: .3rem 0 .4rem; border-bottom: 1px solid var(--rule) }
.blk { display: grid; grid-template-columns: 11rem minmax(0, 27rem) minmax(0, 36rem); gap: 0 2rem; padding: 1.05rem 0 .5rem; border-top: 1px dotted var(--rule); scroll-margin-top: 1rem }
.blk:first-of-type { border-top: 0 }
.blk .rail { grid-column: 1; grid-row: 1; font-size: .9rem; line-height: 1.4; color: var(--grey) }
.blk .la { grid-column: 2; grid-row: 1; font-size: 1.0625rem; line-height: 1.5; color: var(--latin); min-width: 0 }
.blk .en { grid-column: 3; grid-row: 1; min-width: 0 }
body.nolatin .blk, body.nolatin .colhead { grid-template-columns: 11rem minmax(0, 40rem) }
body.nolatin .la, body.nolatin .colhead span:nth-child(2) { display: none }
body.nolatin .blk .en { grid-column: 2 }

/* Savile's rail */
.addr { display: block; color: var(--azure); font-size: 1.05rem; text-decoration: none; letter-spacing: .08em }
.addr:hover { text-decoration: underline }
.rail .img { font-size: .8rem; font-style: italic; margin: .05rem 0 .55rem }
.rail .img a { text-decoration: none; color: var(--grey) } .rail .img a:hover { text-decoration: underline }
.mgl { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem }
.mgl li { padding-left: 1.6rem; text-indent: -1.6rem; transition: background .15s }
.mgl li.hot, .mgl li:target { background: var(--paper2); box-shadow: 0 0 0 .3rem var(--paper2) }
.mgl li.variant { font-style: italic } .mgl li.variant i { font-style: normal }
.mk, .mg { font-family: var(--sc); color: var(--azure); letter-spacing: .06em; text-decoration: none; font-variant-numeric: lining-nums }
.mk { display: inline-block; width: 1.6rem; text-indent: 0; font-size: .85rem }
.mk:hover { text-decoration: underline }
a.mg, span.mg { font-size: .6em; vertical-align: .5em; line-height: 1; margin: 0 .1em; white-space: nowrap }
.sign { font-family: var(--serif); letter-spacing: 0; margin-right: .05em }

/* the text */
.en p, .la p { margin: 0 0 .85em } .en p:last-child { margin-bottom: .3em }
.en p { hyphens: auto }
.caphead { font-size: 1rem; color: var(--ink); text-align: center; margin: .2em 0 .6em }
.argument { font-style: italic; color: var(--ink); margin-bottom: 1.1em } .argument i { font-style: normal }
.init::first-letter { float: left; font-size: 3.35em; line-height: .82; padding: .06em .1em 0 0; color: var(--ink) }
.ua { font-family: var(--sc); color: var(--azure); font-size: .8rem; letter-spacing: .06em; margin-right: .25em; font-variant-numeric: lining-nums }
.cont { font-size: .95rem }
.lonly { font-style: italic }
.la .mg { color: var(--azure) }
a.nr { font-family: var(--serif); color: var(--gules); font-size: .62em; vertical-align: .55em; line-height: 1; text-decoration: none; padding: 0 .08em; font-variant-numeric: lining-nums }
a.nr:hover { text-decoration: underline }
.latbtn { display: none }

/* notes, errata, parts: under the text, aligned with the text columns */
.apparatus-left { margin-left: 13rem }
.notes, .errata, .parts, .pn { margin-left: 13rem; max-width: 65rem }
.notes h2, .parts h2, .errata summary { font-size: 1rem; color: var(--gules); margin: 2.6rem 0 .9rem }
.parts h2 { color: var(--ink) }
.notes ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; font-size: 1.05rem; line-height: 1.5 }
.notes li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); scroll-margin-top: 1rem }
.notes li:target { background: var(--paper2); box-shadow: 0 0 0 .4rem var(--paper2) }
.nn { color: var(--gules); font-variant-numeric: lining-nums; padding-top: .05rem }
.notes p { margin: 0 0 .4em } .back { text-decoration: none; color: var(--gules); font-size: .9rem; margin-left: .3rem }
.errata { margin-top: 1.5rem } .errata summary { cursor: pointer; display: inline } .errata summary::-webkit-details-marker { display: none }
.errata summary::before { content: "❧ "; color: var(--gold) }
.tw { overflow-x: auto; margin-top: .6rem }
table { border-collapse: collapse; font-size: .98rem; width: 100% }
th { font-family: var(--sc); letter-spacing: .1em; font-weight: 400; font-size: .85rem; color: var(--grey); text-align: left }
td, th { padding: .3rem 1rem .3rem 0; border-bottom: 1px solid var(--rule); vertical-align: top }
td:first-child { color: var(--azure); font-variant-numeric: lining-nums; white-space: nowrap }
.partlist { padding-left: 0; list-style: none; font-size: 1.05rem } .partlist li { margin-bottom: .35rem } .partlist a { color: var(--azure); text-decoration: none; font-variant-numeric: lining-nums } .partlist a:hover { text-decoration: underline }
.pn { display: flex; justify-content: space-between; margin-top: 2.4rem; padding-top: .8rem; border-top: 1px solid var(--rule); font-size: .9rem }
.pn a { text-decoration: none; color: var(--azure) } .pn a:hover { text-decoration: underline }

/* note popover */
#pop { position: fixed; z-index: 20; max-width: min(28rem, calc(100vw - 32px)); background: var(--paper); color: var(--ink); border: 1px solid var(--rule); box-shadow: 0 8px 28px rgb(0 0 0 / .18); padding: .7rem 1rem .8rem; font-size: 1.02rem; line-height: 1.45; border-top: 2px solid var(--gules) }
#pop p { margin: 0 0 .4em }

/* home: the title page's own stack, then the books as rules */
.mast { text-align: center; padding: 2.4rem 0 1.6rem }
.fleur { color: var(--gold); font-size: 1.5rem; letter-spacing: .6em; margin-bottom: 1.2rem }
.mast .thomae { font-family: var(--sc); letter-spacing: .4em; font-size: 1.4rem; margin: 0 }
.mast h1 { font-size: clamp(2.4rem, 8vw, 4.6rem); letter-spacing: .18em; line-height: 1.05; margin: .2rem 0 .5rem; font-family: var(--serif) }
.mast .arch { font-style: italic; letter-spacing: .14em; font-size: 1.15rem; margin: 0 0 .9rem; color: var(--grey) }
.mast .causa { font-style: italic; font-size: clamp(1.6rem, 4.5vw, 2.4rem); letter-spacing: .22em; margin: 0 }
.mast .contra { font-family: var(--sc); letter-spacing: .2em; font-size: 1.05rem; margin: .5rem 0 0 }
.mast .ad { font-style: italic; font-size: 1.05rem; color: var(--grey); margin: .5rem 0 0 }
.mast .ad span { font-family: var(--sc); font-style: normal; letter-spacing: .14em }
.mast .rule { width: 9rem; height: 2px; background: var(--gold); margin: 1.6rem auto 1.2rem }
.mast .what { max-width: 38rem; margin: 0 auto; font-size: 1.1rem; text-align: center; text-wrap: balance }
.books { max-width: 60rem; margin: 2rem auto 0 }
.book { margin: 1.8rem 0 }
.booklabel { display: flex; justify-content: space-between; align-items: baseline; font-size: 1rem }
.booklabel a { text-decoration: none; color: var(--ink) } .booklabel a:hover { text-decoration: underline }
.booklabel .pp { color: var(--grey); font-size: .85rem; letter-spacing: .08em }
.bar { height: 3px; background: var(--gold); margin: .45rem 0 .6rem; position: relative; max-width: 100% }
.bar .cor { position: absolute; top: 0; height: 100%; background: var(--paper); opacity: .55 }
.bar .cor::after { content: "the moral corollary, forty parts"; position: absolute; left: 0; top: .45rem; font-style: italic; font-size: .85rem; color: var(--grey); white-space: nowrap; opacity: 1 }
.book .chgrid { margin-top: 1.4rem }
.chgrid { display: flex; flex-wrap: wrap; gap: .15rem .35rem; font-size: .95rem; letter-spacing: 0 }
.chgrid span { color: var(--grey); margin-right: .6rem; letter-spacing: .12em; font-size: .85rem }
.chgrid a { text-decoration: none; min-width: 2.1rem; text-align: center; padding: .05rem .2rem; color: var(--azure); border-bottom: 1px solid transparent }
.chgrid a:hover { border-bottom-color: var(--azure) }
.front { max-width: 60rem; margin: 2.2rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 3rem }
.front h2 { margin: 0 0 .5rem } .front ul { list-style: none; margin: 0; padding: 0; font-size: 1.05rem } .front li { margin-bottom: .2rem } .front a { text-decoration: none } .front a:hover { text-decoration: underline }
.small { font-size: .95rem; color: var(--grey); font-style: italic; text-align: center; max-width: 60rem; margin: 2rem auto 0 }

/* about, rights */
.prose { max-width: 40rem; margin: 0 auto } .prose h1 { text-align: left } .prose h1::before { margin: 0 0 .8rem } .prose h2 { font-size: 1rem }

@media (min-width: 60rem) { .colhead { display: grid } }
@media (max-width: 59.99rem) {
  .blk, .colhead, body.nolatin .blk { grid-template-columns: minmax(0, 1fr); gap: 0 }
  .blk .rail, .blk .la, .blk .en, body.nolatin .blk .en { grid-column: 1; grid-row: auto }
  .blk .rail { order: 0; display: flex; flex-wrap: wrap; gap: .1rem .9rem; align-items: baseline; margin-bottom: .35rem }
  .rail .img { margin: 0 } .mgl { flex-basis: 100%; margin: .2rem 0 .5rem; padding-left: .8rem; border-left: 1px solid var(--rule) }
  .blk .en { order: 1 } .blk .la { order: 2; margin: .3rem 0 .6rem }
  html.js .latbtn { display: inline-block; font-family: var(--sc); letter-spacing: .12em; font-size: .85rem; background: none; border: 1px solid var(--rule); color: var(--azure); padding: .1rem .7rem; cursor: pointer; border-radius: 2px }
  html.js .lat { display: none; margin-top: .6rem } html.js .la.open .lat { display: block }
  .notes, .errata, .parts, .pn { margin-left: 0 } .tools { display: none }
  .front { grid-template-columns: 1fr }
}
@media (max-width: 40rem) {
  body { font-size: 1.12rem }
  header.site .rh { margin-left: 0; flex-basis: 100% }
  .mast h1 { letter-spacing: .1em }
  .bar .cor::after { display: none }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }
a.xr { text-decoration: underline dotted; text-decoration-color: var(--azure); text-underline-offset: .2em } a.xr:hover { text-decoration-style: solid }
