/* Reader — chapter view. Layered on top of book.css, which supplies the
   page chrome (header, wrap, crumbs, h1, statrow, connected, pager, footer). */

.reader .text {
  max-width: 34em;          /* ~66 characters: the comfortable reading measure */
  margin: 2rem 0 2.5rem;
  font-size: 1.19rem;
  line-height: 1.72;
}

.reader .text .v {
  margin: 0 0 0.85rem;
  text-indent: 0;
}

/* Verse numbers sit in the margin so the prose edge stays straight. */
.reader .text .vnum {
  display: inline-block;
  min-width: 2.1em;
  margin-left: -2.1em;
  padding-right: 0.6em;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.7em;
  font-weight: 500;
  line-height: 1;
  text-align: right;
  vertical-align: 0.35em;
  color: #9a8c6d;
  text-decoration: none;
  border: 0;
}

a.vnum:hover {
  color: #7a3e1d;
  text-decoration: underline;
}

.reader .text .vt {
  /* Keeps the hanging indent intact when a verse wraps. */
  display: inline;
}

@media (max-width: 620px) {
  .reader .text {
    max-width: none;
    padding-left: 2.1em;
    font-size: 1.12rem;
  }
}

/* Chapter jump strip. Long books (Psalms: 150) scroll horizontally rather
   than pushing the page wider. */
.chapstrip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 1.4rem 0 0.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(122, 62, 29, 0.14);
  max-height: 7.2rem;
  overflow-y: auto;
}

.chapstrip a {
  display: inline-block;
  min-width: 1.9rem;
  padding: 0.18rem 0.3rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  text-align: center;
  color: #6b5c43;
  border: 1px solid rgba(122, 62, 29, 0.18);
  border-radius: 3px;
  text-decoration: none;
}

.chapstrip a:hover {
  background: rgba(122, 62, 29, 0.08);
  color: #7a3e1d;
}

.chapstrip a.here {
  background: #7a3e1d;
  border-color: #7a3e1d;
  color: #f6efe0;
  font-weight: 700;
}

/* Chapter grid on a book's reader index. */
.chapgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr));
  gap: 0.5rem;
  margin: 1rem 0 2rem;
}

.chapgrid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.6rem 0.3rem;
  border: 1px solid rgba(122, 62, 29, 0.18);
  border-radius: 4px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.35);
}

.chapgrid a:hover {
  background: rgba(122, 62, 29, 0.08);
  border-color: rgba(122, 62, 29, 0.4);
}

.chapgrid .cnum {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 500;
  color: #3b3226;
}

.chapgrid .clab {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  color: #9a8c6d;
}

/* The shared .pager puts prev on the left, next on the right. */
.reader .pager,
.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.pager .next {
  margin-left: auto;
  text-align: right;
}
