/* ============================================================
   JesusChrist.com — Bible reader (bible.html)
   Uses the site theme variables from styles.css.
   ============================================================ */

.bible-reader h2 { margin-bottom: 4px; }
.bible-sub { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 16px; }

/* ---------- search bar ---------- */
.bible-search {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.bible-search input[type="search"] {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 15.5px;
  background: var(--card);
  color: var(--ink);
}
.bible-search input[type="search"]:focus { outline: none; border-color: var(--accent); }
.bible-search select,
.bible-jump select {
  padding: 10px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 14.5px;
  background: var(--card);
  color: var(--ink);
}
.bible-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.bible-btn:hover { filter: brightness(1.08); }
.bible-btn.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
  font-weight: 600;
}
.bible-btn.ghost:hover { border-color: var(--accent); filter: none; }
.bible-btn:disabled { opacity: .4; cursor: default; filter: none; }

/* ---------- testament tabs ---------- */
.bible-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.bible-tabs button {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}
.bible-tabs button.active {
  background: var(--nav-active-bg);
  border-color: var(--nav-active-bg);
  color: var(--nav-active-ink);
}

/* ---------- book & chapter grids ---------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 8px;
}
.book-grid a {
  display: block;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--list-item-bg);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.book-grid a:hover { border-color: var(--accent); color: var(--accent-dark); }
.book-grid a .chap-count { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-soft); }

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 8px;
}
.chapter-grid a {
  display: block;
  padding: 11px 0;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--list-item-bg);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.chapter-grid a:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- breadcrumb + prev/next ---------- */
.bible-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  font-size: 14.5px;
}
.bible-crumbs a { font-weight: 600; }
.bible-jump { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bible-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 0;
}

/* ---------- scripture text ---------- */
.bible-text {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 17.5px;
  line-height: 1.85;
  max-width: 46em;
}
.bible-text .mt, .bible-text .mt2, .bible-text .mt3 {
  text-align: center;
  font-weight: 700;
  color: var(--accent-dark);
}
.bible-text .mt { font-size: 26px; margin-bottom: 4px; }
.bible-text .mt2, .bible-text .mt3 { font-size: 15px; color: var(--ink-soft); }
.bible-text .chapterlabel {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  margin: 14px 0 6px;
}
.bible-text .p, .bible-text .m, .bible-text .pi, .bible-text .nb { margin: 0 0 10px; }
.bible-text .s, .bible-text .s1, .bible-text .s2, .bible-text .ms, .bible-text .ms1 {
  font-family: var(--font-body);
  font-weight: 750;
  font-size: 15.5px;
  color: var(--accent-dark);
  margin: 18px 0 6px;
}
.bible-text .q, .bible-text .q1 { padding-left: 1.3em; text-indent: -0.9em; }
.bible-text .q2 { padding-left: 2.3em; text-indent: -0.9em; }
.bible-text .q3 { padding-left: 3.3em; text-indent: -0.9em; }
.bible-text .qs { text-align: right; font-style: italic; }
.bible-text .d { font-style: italic; color: var(--ink-soft); margin: 0 0 10px; }
.bible-text .b { height: .8em; }
.bible-text .verse {
  color: var(--accent);
  font-size: .68em;
  font-weight: 700;
  vertical-align: super;
  font-family: var(--font-body);
}
.bible-text .wj { color: #b03535; }
body[data-theme="lion"] .bible-text .wj { color: #e88a8a; }

/* footnote markers & hover popups */
.bible-text a.notemark {
  position: relative;
  text-decoration: none;
  color: var(--accent);
  vertical-align: super;
  font-size: .72em;
  line-height: 0;
  margin-left: .1em;
}
.bible-text .popup, .bible-text .crpopup {
  display: none;
  position: absolute;
  bottom: 1.3em;
  left: 0;
  z-index: 60;
  width: min(330px, 76vw);
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 13.8px;
  line-height: 1.55;
  font-weight: 400;
  box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .4);
}
.bible-text a.notemark:hover .popup, .bible-text a.notemark:focus .popup,
.bible-text a.notemark:hover .crpopup, .bible-text a.notemark:focus .crpopup { display: block; }

/* footnote list at the end of a chapter */
.bible-text .footnote {
  margin-top: 22px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
}
.bible-text .footnote hr { border: 0; border-top: 1px solid var(--line); }
.bible-text .footnote .notemark { color: var(--accent); text-decoration: none; }
.bible-text .footnote .notebackref { font-weight: 700; }

/* highlighted verse (arrived from search) */
.bible-text .bible-hl { background: var(--accent-soft); border-radius: 6px; }

/* ---------- search results ---------- */
.bible-results { list-style: none; margin: 14px 0 0; padding: 0; }
.bible-results li {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.bible-results li:last-child { border-bottom: none; }
.bible-results .ref { font-weight: 700; margin-right: 6px; white-space: nowrap; }
.bible-results mark {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  border-radius: 3px;
  padding: 0 2px;
}
.bible-note { color: var(--ink-soft); font-size: 14px; margin-top: 10px; }

/* attribution line */
.bible-credit {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

@media (max-width: 560px) {
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
  .bible-text { font-size: 16.5px; }
}
