/* Daily Bible Reading. Scripture in Cardo (a face made for biblical texts), study notes in
   Alegreya Sans. The one bold device: rubricated chapter numerals and red letters. */

:root {
  --paper: #f8f8f6;
  --ink: #22252b;
  --slate: #636b76;
  --rubric: #a3201b;
  --rule: #dcddd8;
  --wash: #efefeb;
  --serif: "Cardo", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Alegreya Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --measure: 36rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1c20;
    --ink: #e6e4de;
    --slate: #9aa0a8;
    --rubric: #e8857a;
    --rule: #33363c;
    --wash: #23262b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
}
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--rubric); outline-offset: 3px; border-radius: 2px; }

.top, main, footer { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }

.top {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 1.25rem; padding-bottom: 0.75rem;
  font-size: 0.95rem; color: var(--slate);
}
.top a { text-decoration: none; }
.top a:hover { color: var(--ink); }
.site { font-weight: 500; }

.masthead { padding: 2.5rem 0 1.75rem; border-bottom: 1px solid var(--rule); margin-bottom: 2rem; }
.masthead .date { margin: 0 0 0.35rem; color: var(--slate); font-size: 1rem; }
.masthead h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.masthead .progress { margin: 0.6rem 0 0; color: var(--slate); font-size: 1rem; }

h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--slate);
  margin: 0 0 0.9rem;
}

/* ---- Scripture ---- */
.scripture { margin-bottom: 3rem; }
.scripture p {
  font-family: var(--serif);
  font-size: 1.24rem;
  line-height: 1.72;
  margin: 0 0 0.85rem;
  hanging-punctuation: first;
}
.scripture p.cont { margin-top: -0.85rem; }
.scripture p.poetry { margin: 0; padding-left: 1.5rem; text-indent: -1rem; }
.scripture p.poetry.q2 { padding-left: 2.75rem; }
.scripture p.poetry + p.prose { margin-top: 0.85rem; }
.chapnum {
  float: left;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3.6em;
  line-height: 0.82;
  color: var(--rubric);
  margin: 0.08em 0.14em 0 -0.04em;
}
.chapref { font-family: var(--sans); font-size: 0.8rem; color: var(--slate); }
.vn {
  font-family: var(--sans);
  font-size: 0.62em;
  color: var(--slate);
  vertical-align: 0.55em;
  line-height: 0;
  margin: 0 0.12em 0 0.08em;
  font-weight: 500;
}
.chapnum + .vn { display: none; }
.wj { color: var(--rubric); }
.fn { line-height: 0; font-size: 0.62em; vertical-align: 0.6em; }
.fn a { color: var(--slate); text-decoration: none; font-family: var(--sans); font-style: italic; padding: 0 0.1em; }
.bookhead { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin: 2rem 0 0.75rem; clear: both; }
.notes {
  list-style: none; padding: 0.9rem 0 0; margin: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
  font-size: 0.92rem; color: var(--slate); line-height: 1.5;
  clear: both;
}
.notes li { margin: 0 0 0.3rem; }
.notes .back { font-style: italic; text-decoration: none; margin-right: 0.25rem; }

/* ---- Study ---- */
.study { margin: 0 0 2.5rem; }
.study p, .study li { margin: 0 0 0.9rem; }
.study ul, .study ol { padding-left: 1.3rem; margin: 0 0 0.9rem; }
.study h4 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; }
.study blockquote {
  margin: 0 0 0.9rem; padding-left: 1rem;
  border-left: 2px solid var(--rule);
  font-family: var(--serif); font-size: 1.12rem;
}
.study strong { font-weight: 700; }
.questions ol { padding-left: 1.6rem; }
.questions li { padding-left: 0.2rem; margin-bottom: 1rem; }
.questions li::marker { font-weight: 700; color: var(--slate); }
.prayer p { font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.7; }
.late p { color: var(--slate); }

/* ---- Navigation ---- */
.daynav {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: baseline;
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0 0; margin-top: 3rem;
  font-size: 1rem;
}
.daynav a[rel="next"] { justify-self: end; }

footer { padding-top: 3rem; padding-bottom: 3rem; color: var(--slate); font-size: 0.85rem; }

/* ---- Archive ---- */
.month { margin-bottom: 2.25rem; }
.days { list-style: none; margin: 0; padding: 0; }
.days li a {
  display: grid; grid-template-columns: 11rem 1fr; gap: 1rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.days li a:hover .p { text-decoration: underline; text-decoration-color: var(--rule); }
.days .d { color: var(--slate); }
.days .p { font-family: var(--serif); font-size: 1.15rem; }
.days li.is-today .p { color: var(--rubric); }

@media (max-width: 30rem) {
  body { font-size: 1.08rem; }
  .masthead { padding-top: 1.5rem; }
  .scripture p { font-size: 1.16rem; }
  .days li a { grid-template-columns: 1fr; gap: 0.1rem; }
}

@media print {
  .top, .daynav, footer { display: none; }
  body { background: #fff; color: #000; }
}
