/* ============================================================
   /prayers/print — the printed prayer book.

   Set after the maintainer's own prayer book, Prayers.docx: Letter, one-inch
   margins, two columns half an inch apart; Book Antiqua 10pt at 1.2 line
   spacing; prayer titles bold 11pt in the document's purple; "Prayers" as a
   bold 16pt title; "Amen." in bold; a "Contents" heading in the document's
   blue over a two-column list with dotted leaders and page numbers; and
   "Page N of M" in the footer. Book Antiqua is the document's face; where a
   reader's computer lacks it, Palatino (its model) or the site's EB Garamond
   stands in. The cover and the closing page keep the site's own type.

   Each .sheet is a whole sheet of paper, margins and all, laid out by
   prayer-book.js; @page has no margin of its own (see the script). On
   screen the sheets are shown as paper on a grey ground, as in a word
   processor; in print each is one page.
   ============================================================ */
:root{
  --ink:#241a10;
  --paper:#f6f1e6;
  --rule:#ddd0b4;
  --gold:#9a7a2e;
  --gold-deep:#7d6224;
  --muted:#655740;
  --espresso:#1a120b;
  --display:'Cinzel',serif;
  --head:'Cormorant Garamond',serif;
  --body:'EB Garamond',serif;

  /* The document's own. */
  --doc:'Book Antiqua','Palatino Linotype',Palatino,'EB Garamond',serif;
  --doc-head:'Calibri Light',Calibri,Carlito,'Segoe UI',Arial,sans-serif;
  --doc-purple:#7030A0;
  --doc-blue:#2F5496;
  --doc-grey:#595959;

  /* Set by prayer-book.js from the paper size. */
  --page-w:8.5in;--page-h:10.98in;--m:1in;--gap:.5in;--foot:.5in;

  --text:10pt;
  --title:11pt;
}
html.is-large{--text:12pt;--title:13pt;}

*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:var(--doc);font-size:var(--text);line-height:1.2;color:#000;-webkit-font-smoothing:antialiased;}
a{color:inherit;text-decoration:none;}

/* ───────────────── THE SHEETS ───────────────── */
.sheet{
  position:relative;overflow:hidden;
  width:var(--page-w);height:var(--page-h);padding:var(--m);
  background:#fff;
}
.sheet + .sheet{break-before:page;}

/* The text block: two columns of fixed height. Whatever would make a third
   column is moved to the next sheet by the script. */
.flow{
  height:calc(var(--page-h) - 2 * var(--m));
  column-count:2;column-gap:var(--gap);column-fill:auto;
}
.flow-probe{position:absolute;left:-9999px;top:0;visibility:hidden;}

.folio{
  position:absolute;left:0;right:0;bottom:var(--foot);
  text-align:center;font-family:var(--doc);font-size:10pt;color:var(--doc-grey);
}
.folio b{color:var(--doc-grey);}

/* ───────────────── ON SCREEN ───────────────── */
@media screen{
  body{background:#d9d9d9;padding:24px 16px 48px;}
  html.is-preview body{padding:12px 12px 32px;}
  .book{zoom:var(--zoom,1);}
  .sheet{margin:0 auto 20px;box-shadow:0 2px 10px rgba(0,0,0,.18);}
  .book-status{max-width:32em;margin:40px auto;text-align:center;font-family:var(--body);font-size:17px;color:var(--muted);}
  .book-status a{color:var(--gold-deep);text-decoration:underline;}

  .book-toolbar{
    display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;
    max-width:var(--page-w);margin:0 auto 20px;
  }
  .book-toolbar[hidden]{display:none;}
  .book-toolbar-back{font-family:var(--display);font-size:12px;letter-spacing:.1em;color:var(--espresso);padding:8px 0;}
  .book-toolbar-back:hover{text-decoration:underline;}
  .book-toolbar-print{
    font-family:var(--display);font-size:12px;font-weight:600;letter-spacing:.12em;
    padding:10px 16px;min-height:40px;border:1px solid var(--espresso);border-radius:2px;
    background:var(--espresso);color:var(--paper);cursor:pointer;
  }
  .book-toolbar-print:hover{background:var(--gold-deep);border-color:var(--gold-deep);}
  :focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
  .end-note a{color:var(--gold-deep);text-decoration:underline;}
}

/* ───────────────── COVER AND CLOSING PAGE ───────────────── */
.sheet-plain{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;}
.cover-emblem{display:block;width:1.9in;height:auto;margin:0 auto .5in;filter:brightness(0);}
.cover-title{font-family:var(--display);font-weight:500;font-size:28pt;letter-spacing:.05em;line-height:1.2;color:#000;}
.cover-sub{font-family:var(--head);font-style:italic;font-weight:500;font-size:14pt;margin-top:.14in;color:#000;}
.cover-orn{margin:.34in auto;}
.cover-for{font-family:var(--body);font-size:13pt;color:#000;}
.cover-name{font-variant-caps:small-caps;letter-spacing:.04em;}
.cover-date{font-family:var(--body);font-style:italic;font-size:11.5pt;margin-top:.1in;color:#000;}
html[data-paper="half"] .cover-title,html[data-paper="a5"] .cover-title{font-size:22pt;}
html[data-paper="half"] .cover-emblem,html[data-paper="a5"] .cover-emblem{width:1.5in;}

.orn{display:flex;align-items:center;justify-content:center;gap:10pt;}
.orn .ln{display:block;height:0;width:.5in;border-top:.5pt solid #555;}
.orn .dot{font-size:10pt;line-height:1;color:#444;}

.end-orn{margin-bottom:.3in;}
.end-quote{max-width:4.6in;}
.end-quote p{font-family:var(--head);font-style:italic;font-weight:500;font-size:13pt;line-height:1.45;color:#000;}
.end-quote cite{display:block;margin-top:.12in;font-style:normal;font-family:var(--display);font-size:9pt;letter-spacing:.12em;color:#000;}
.end-amdg{margin-top:.5in;font-family:var(--display);font-size:10pt;letter-spacing:.16em;color:#000;}
.end-url{margin-top:.12in;font-family:var(--body);font-size:10pt;color:#000;}
.end-title{font-family:var(--display);font-weight:500;font-size:16pt;color:#000;}
.end-note{margin-top:.2in;max-width:24em;font-family:var(--body);font-size:12pt;}

/* ───────────────── CONTENTS ───────────────── */
.toc-title{font-family:var(--doc-head);font-weight:300;font-size:16pt;line-height:1.2;color:var(--doc-blue);margin:0 0 10pt;}
/* Leaders as Word draws them: a row of dots along the entry's last line,
   covered by the title text and the page number, which sit on white. A
   title that wraps keeps its dots on its final line. */
.toc-e{display:block;color:inherit;text-decoration:none;position:relative;overflow:hidden;padding-right:2.4em;margin:0 0 5pt;break-inside:avoid;font-size:var(--text);line-height:1.2;}
.toc-e::after{
  content:". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .";
  position:absolute;left:0;right:0;bottom:0;z-index:0;white-space:nowrap;overflow:hidden;letter-spacing:.06em;
}
.toc-t{position:relative;z-index:1;background:#fff;padding-right:4pt;}
.toc-n{position:absolute;right:0;bottom:0;z-index:1;background:#fff;padding-left:4pt;}
@media screen{
  .toc-e:hover .toc-t,.toc-e:hover .toc-n{color:var(--doc-purple);text-decoration:underline;text-underline-offset:2px;}
  .toc-e:focus-visible{outline:2px solid var(--gold);outline-offset:1px;}
  .prayer-title{scroll-margin-top:16px;}
}

/* ───────────────── PRAYERS ───────────────── */
.bk-title{font-weight:700;font-size:16pt;letter-spacing:-.5pt;line-height:1.1;margin:0 0 4pt;}
.bk-prayer{orphans:2;widows:2;}
.bk-prayer.is-short{break-inside:avoid;}
.prayer-title{
  font-family:var(--doc);font-weight:700;font-size:var(--title);line-height:1.2;
  color:var(--doc-purple);margin:12pt 0 2pt;break-after:avoid;
}
.prayer-title em{font-style:normal;}
.prayer-text,.prayer-verse,.prayer-list{font-family:var(--doc);font-size:var(--text);line-height:1.2;color:#000;text-align:left;hyphens:manual;}
.prayer-text{margin:1pt 0 4pt;}
.prayer-verse p{margin:0;}
.prayer-verse p.stanza{margin-top:.6em;}
.prayer-verse p.indent{padding-left:1.5em;}
.prayer-verse br{line-height:.6;}
.prayer-text strong,.prayer-verse strong,.prayer-list strong{font-weight:700;}
.incipit{font-weight:400 !important;}
.amen{font-weight:700;}
.rubric,.prayer-note{font-family:var(--doc);font-style:italic;font-size:var(--text);line-height:1.2;color:#000;margin:1pt 0 4pt;}
.rubric strong{font-weight:700;font-style:normal;}
.rubric-inline{font-style:italic;}
.prayer-list{list-style:disc;padding-left:.35in;}
.prayer-list li{margin:0 0 2pt;}

/* ℣. and ℟. in a hanging column; the source's "V." and "R." stay in the
   text, drawn over, so a copied PDF still reads sensibly. */
.dlg{padding-left:1.6em;text-indent:-1.6em;}
.vr{display:inline-block;width:1.6em;text-indent:0;position:relative;font-weight:400;color:transparent;}
.vr::after{position:absolute;left:0;top:0;color:#000;}
.vr-v::after{content:"\2123.";}
.vr-r::after{content:"\211F.";}

/* Latin, when asked for: first, under the prayer's one title, in Book
   Antiqua italic at the body size; a hairline of white space; then the
   English as ever. prayer-book.js moves the Latin ahead of the English. */
.prayer-latin{margin:0 0 5pt;}
.prayer-latin .prayer-text,.prayer-latin .prayer-verse,.prayer-latin .prayer-list{font-style:italic;}
.prayer-latin .rubric,.prayer-latin .prayer-note{font-style:normal;}
.prayer-latin .prayer-text:last-child{margin-bottom:0;}
/* EB Garamond's Latin locale form sets every u as v; the missals do not. */
[lang="la"]{font-feature-settings:"locl" 0;font-language-override:"ENG";}

/* ───────────────── IN PRINT ───────────────── */
@media print{
  html,body{background:#fff !important;}
  body{padding:0;}
  .book-toolbar,.book-status{display:none !important;}
  .sheet{margin:0;box-shadow:none;}
  *{box-shadow:none !important;text-shadow:none !important;}
  a{text-decoration:none !important;color:#000 !important;}
}
