/* Reformed Classics: the series look from the covers (dark plates, muted gold, Cinzel capitals),
   with a paper-coloured reading page. data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='18' viewBox='0 0 28 18'%3E %3Cpath d='M0 16.5H28M22 16.5V1.5H6V12.5H17V6.5H11' fill='none' stroke='%23c6a257' stroke-width='1.5'/%3E%3C/svg%3E is filled in by build_site.py. */
@font-face { font-family: "Cinzel"; src: url("/fonts/Cinzel-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/Cinzel-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --charcoal: #2f373b;
  --accent: #2f373b;
  --gold: #c6a257;
  --gold-light: #e1c278;
  --on-dark: #f3ecdc;
  --paper: #f7f2e8;
  --paper-2: #efe6d3;
  --ink: #2b2724;
  --muted: #6b645c;
  --rule: rgba(107, 100, 92, 0.28);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --caps: "Cinzel", "Trajan Pro", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #1d1c1a; --paper-2: #272520; --ink: #ebe4d6; --muted: #a89f91; --rule: rgba(168, 159, 145, 0.28); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.6 var(--serif); }
a { color: inherit; text-underline-offset: 0.15em; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 700px; }

/* header: the series name over a band of Greek key, as on the covers */
.site-head { background: var(--charcoal); padding: 14px 16px 12px; text-align: center; }
.site-head::after {
  content: ""; display: block; max-width: 1100px; height: 24px; margin: 10px auto 0;
  border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='18' viewBox='0 0 28 18'%3E %3Cpath d='M0 16.5H28M22 16.5V1.5H6V12.5H17V6.5H11' fill='none' stroke='%23c6a257' stroke-width='1.5'/%3E%3C/svg%3E") repeat-x left center; background-size: 28px 18px;
}
.home .brand { display: none; }
.home .site-head::after { margin-top: 0; }
.brand { font-family: var(--caps); font-weight: 700; font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-light); text-decoration: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 4px; border: 1px solid transparent;
  font: 600 16px/1.2 var(--serif); text-decoration: none; cursor: pointer; }
.btn small { font-weight: 400; font-size: 13px; opacity: 0.75; }
.btn.gold { background: var(--gold); color: #1f1a12; }
.btn.gold:hover { background: var(--gold-light); }
.btn.light { background: transparent; color: var(--on-dark); border-color: rgba(243, 236, 220, 0.6); }
.btn.light:hover { border-color: var(--gold-light); color: var(--gold-light); }
.btn.ghost { background: transparent; color: rgba(243, 236, 220, 0.75); border: 1px dashed rgba(243, 236, 220, 0.45); cursor: default; }
.btn.dark { background: var(--accent); color: var(--on-dark); }
.btn.dark:hover { filter: brightness(1.15); }
.btn.plain { background: transparent; color: var(--ink); border-color: var(--muted); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }

/* home */
.hero { background: var(--charcoal); color: var(--on-dark); padding: 24px 0 44px; text-align: center; }
.hero h1 { font-family: var(--caps); font-weight: 700; color: var(--gold-light); font-size: clamp(28px, 6vw, 46px);
  letter-spacing: 0.04em; line-height: 1.15; margin: 6px 0 10px; }
.lead { font-size: 19px; max-width: 32em; margin: 0 auto 30px; color: #e8dfcc; }
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 16px; text-align: left; }
@media (min-width: 900px) { .shelf { grid-template-columns: repeat(5, 1fr); gap: 28px; } }
.shelf a { display: block; text-decoration: none; }
.shelf .cover { display: block; width: 100%; border-radius: 3px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); transition: transform 0.15s ease; }
.shelf a:hover .cover { transform: translateY(-3px); }
.shelf .t { display: block; margin-top: 10px; font-size: 16px; line-height: 1.3; color: var(--on-dark); }
.shelf .a { display: block; font-size: 14px; color: var(--gold-light); }
.band { padding: 38px 0 44px; text-align: center; }
h2 { font-family: var(--caps); font-weight: 700; font-size: 23px; letter-spacing: 0.03em; line-height: 1.3; margin: 0 0 10px; }

/* book page */
.book-hero { background: var(--accent); color: var(--on-dark); padding: 26px 0 36px; }
.book-grid { display: grid; gap: 22px; justify-items: center; text-align: center; }
.book-grid .cover { width: min(46vw, 200px); border-radius: 3px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
.book-hero h1 { font-family: var(--caps); font-weight: 700; color: var(--gold-light); font-size: clamp(25px, 5vw, 42px);
  line-height: 1.15; margin: 0 0 8px; }
.subtitle { font-size: 19px; font-style: italic; margin: 0 0 6px; color: #eee5d1; }
.author { font-family: var(--caps); letter-spacing: 0.08em; color: var(--gold-light); margin: 0 0 20px; }
.book-hero .actions { justify-content: center; }
@media (min-width: 900px) {
  .book-grid { grid-template-columns: 320px 1fr; gap: 48px; justify-items: start; align-items: center; text-align: left; }
  .book-grid .cover { width: 320px; }
  .book-hero .actions { justify-content: flex-start; }
}
.about { padding: 30px 0 10px; }
.desc p { margin: 0 0 1em; }
.desc h2, .desc h3 { font-size: 19px; }
.desc ul { padding-left: 1.2em; }
.more summary { cursor: pointer; color: var(--muted); font-style: italic; margin-bottom: 1em; }
.original { background: var(--paper-2); border-top: 1px solid rgba(198, 162, 87, 0.55); padding: 32px 0 42px; margin-top: 20px; }
.original p { margin: 0 0 14px; }
.signup { margin-top: 26px; }
.email-label { display: block; font-weight: 600; margin-bottom: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.signup input[type="email"] { flex: 1 1 230px; min-width: 0; padding: 12px 14px; font: 17px var(--serif);
  border: 1px solid #b6a990; border-radius: 4px; background: #fffdf8; color: #2b2724; }
.fine { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.status { min-height: 1.4em; font-size: 15px; margin: 6px 0 0; }
.status.err { color: #b04532; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.files { margin-top: 22px; }

/* the original texts */
.reading-page { padding: 14px 0 44px; }
@media (min-width: 700px) { body.reading { font-size: 20px; } }
.crumbs { font-size: 15px; color: var(--muted); padding-top: 6px; padding-bottom: 6px; }
.crumbs a { color: var(--muted); }
.reading-page h1 { font-family: var(--caps); font-weight: 700; font-size: clamp(24px, 5vw, 34px); line-height: 1.25;
  letter-spacing: 0.02em; margin: 6px 0 14px; }
.label { font-family: var(--caps); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 18px 0 0; }
.by { color: var(--muted); font-style: italic; margin: -6px 0 22px; }
.note { font-size: 16px; color: var(--muted); }
.reading-page .actions { margin: 22px 0 30px; }
.text p { margin: 0 0 1em; hyphens: auto; -webkit-hyphens: auto; }
.text h2 { font-size: 17px; letter-spacing: 0.05em; text-align: center; margin: 1.8em 0 0.8em; }
.text .center { text-align: center; }
.text .right { text-align: right; }
.text .summary { font-style: italic; color: var(--muted); font-size: 0.92em; border-left: 2px solid var(--gold); padding-left: 14px; }
.text blockquote { margin: 1.4em 0 1.8em; padding: 0 1em; text-align: center; font-style: italic; }
.text blockquote p { margin: 0; }
.text blockquote cite { display: block; margin-top: 6px; font: normal 14px/1.4 var(--caps); letter-spacing: 0.06em; color: var(--muted); }
.fnref a { color: var(--gold); text-decoration: none; font-size: 0.75em; padding: 0 2px; }
.notes { margin-top: 2.6em; padding-top: 0.6em; border-top: 1px solid rgba(198, 162, 87, 0.6); font-size: 16px; }
.notes h2 { font-size: 14px; text-align: left; letter-spacing: 0.12em; }
.notes ol { padding-left: 1.4em; }
.notes .back { color: var(--gold); text-decoration: none; }
.toc { list-style: none; padding: 0; margin: 0; }
.toc li { border-bottom: 1px solid var(--rule); }
.toc a { display: block; padding: 11px 0; text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--gold); }
.toc .lab { display: block; font-family: var(--caps); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.pager a { display: block; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 4px; text-decoration: none; font-size: 15px; line-height: 1.35; }
.pager a:hover { border-color: var(--gold); }
.pager a span { display: block; font-family: var(--caps); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.pager a[rel="next"] { text-align: right; }
.modern { margin-top: 26px; font-size: 16px; color: var(--muted); }

.site-foot { background: var(--charcoal); color: #cfc6b3; text-align: center; font-size: 14px; padding: 22px 16px 28px; }
.site-foot p { margin: 4px 0; }
.site-foot a { color: var(--gold-light); }
