/* The per-book summary pages (biblestudy/helps/booksummaries/<book>/index.html).
   One stylesheet for all of them, since every page is the same layout with different words;
   the pages themselves are written by tools/book-summaries-pages.py. */

main { padding-top: 1rem; max-width: 1000px; }

.bd-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem 1rem; flex-wrap: wrap; }
.bd-head h1 { margin-bottom: 0.2rem; }
.bd-place { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.02em; }

/* At a glance: the facts anyone wants before reading a book. */
.bd-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.5rem 1.1rem; margin: 0.9rem 0 0; padding: 0.9rem 0 0; border-top: 1px solid var(--divider);
}
.bd-facts .bd-fact { min-width: 0; }
.bd-facts dt {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted);
}
.bd-facts dd { margin: 0.1rem 0 0; font-size: 0.92rem; line-height: 1.45; color: var(--text); }

.bd-key {
  margin: 1.1rem 0 0; padding: 0.7rem 0.95rem; border-radius: 10px;
  background: var(--scheme-tint); border-left: 4px solid var(--accent);
  font-family: Georgia, 'Times New Roman', serif; font-size: 1rem; line-height: 1.6; color: var(--text);
}
.bd-key cite { display: block; margin-top: 0.3rem; font-family: inherit; font-style: normal; font-size: 0.8rem; }
/* Which translation the verse is being shown in — it follows the Bible Reader's setting. */
.bd-key .bd-key-ver { color: var(--text-muted); font-weight: 700; letter-spacing: 0.03em; }
.bd-read { margin: 0.9rem 0 0; font-size: 0.92rem; font-weight: 600; }

/* Take it with you: this book alone, typeset in two columns, in either public-domain
   translation. Sizes are printed because a phone on mobile data deserves the warning. */
.bd-get { margin: 0.75rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.45rem 0.7rem;
          font-size: 0.85rem; color: var(--text-muted); }
.bd-get .bd-get-label { font-weight: 600; }
.bd-get a {
  display: inline-flex; align-items: baseline; gap: 0.3rem; text-decoration: none;
  color: var(--accent); font-weight: 600;
  border: 1px solid var(--divider); border-radius: 7px; padding: 0.22rem 0.55rem;
}
.bd-get a:hover { background: var(--scheme-tint); }
.bd-get a .bd-get-size { color: var(--text-muted); font-weight: 400; font-size: 0.92em; }

.bd-ref { color: var(--accent); text-decoration: none; white-space: nowrap; }
.bd-ref:hover { text-decoration: underline; }

.card h2 { margin-top: 1.3rem; }
.card h2:first-child { margin-top: 0; }
.card p { line-height: 1.7; }

.bd-list { margin: 0.4rem 0 0; padding-left: 1.15rem; line-height: 1.7; }
.bd-list li { margin-bottom: 0.35rem; }

/* The outline: a chapter range, what that stretch is, and what happens in it. */
.bd-outline { list-style: none; margin: 0.5rem 0 0; padding: 0; counter-reset: bd-step; }
.bd-outline li { padding: 0.6rem 0; border-bottom: 1px solid var(--divider); }
.bd-outline li:last-child { border-bottom: none; }
.bd-out-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.bd-out-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.bd-out-note { margin: 0.2rem 0 0; font-size: 0.92rem; line-height: 1.6; color: var(--text-muted); }

.bd-events { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.bd-events li { padding: 0.35rem 0; border-bottom: 1px solid var(--divider); font-size: 0.95rem; line-height: 1.6; }
.bd-events li:last-child { border-bottom: none; }
.bd-events .bd-ev { color: var(--text-muted); }

/* Previous book · all summaries · next book */
.bd-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 1rem;
  flex-wrap: wrap; margin: 1rem 0.2rem 0; font-size: 0.92rem; font-weight: 600;
}
/* The book names take the page's text color, not the accent: the accent green measured 4.01:1
   on the light page, under the 4.5 needed at this size, and it changes with every color scheme
   the site offers. The accent is kept for hover. */
.bd-nav a { color: var(--text); text-decoration: none; }
.bd-nav a:hover { color: var(--accent); text-decoration: underline; }
.bd-nav .bd-nav-all { color: var(--text-muted); font-weight: 600; }

/* Embedded view (opened from Bible Study with a parameter): hide nav, show a close button */
html.embedded nav { display: none; }
#bs-close-btn { display: none; }
html.embedded #bs-close-btn {
  display: flex; position: fixed; top: 0.7rem; right: 0.7rem; z-index: 200;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--divider); background: var(--card-bg); color: var(--text-muted);
  font-size: 1.15rem; cursor: pointer; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px var(--card-shadow); transition: color 0.15s, background 0.15s;
}
html.embedded #bs-close-btn:hover { color: var(--text); background: var(--scheme-tint); }

/* The way back for anyone who did not arrive from the Bible Study hub — a shared link,
   a search result, a bookmark. Embedded readers get the close button instead. */
.bs-home { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem;
           color: var(--text-muted); text-decoration: none; margin-bottom: 0.6rem; }
.bs-home:hover { color: var(--text); text-decoration: underline; }
html.embedded .bs-home { display: none; }

/* Where the Gospels quote a book: three short facts a row, so a table rather than prose.
   Optional — only a book whose record carries nt_uses gets one. */
.bd-nt-wrap { margin: 0.2rem 0 0.4rem; }
.bd-nt { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.bd-nt th, .bd-nt td { text-align: left; padding: 0.5rem 0.6rem; vertical-align: top;
                       border-bottom: 1px solid var(--divider); }
.bd-nt thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
                  color: var(--text-muted); border-bottom-width: 2px; white-space: nowrap; }
.bd-nt tbody tr:last-child td { border-bottom: 0; }
.bd-nt td:first-child { white-space: nowrap; font-weight: 600; }

@media (max-width: 600px) {
  .bd-facts { grid-template-columns: 1fr 1fr; }
  .bd-nav { font-size: 0.86rem; }

  /* Three columns will not fit a phone, and a table that scrolls sideways hides the column
     that matters. Each row becomes a small block instead, every cell keeping its heading. */
  .bd-nt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bd-nt, .bd-nt tbody, .bd-nt tr, .bd-nt td { display: block; width: 100%; }
  .bd-nt tr { padding: 0.6rem 0; border-bottom: 1px solid var(--divider); }
  .bd-nt tbody tr:last-child { border-bottom: 0; }
  .bd-nt td { border: 0; padding: 0.1rem 0; }
  .bd-nt td::before { content: attr(data-label) ": "; color: var(--text-muted);
                      font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
  .bd-nt td:first-child::before { content: attr(data-label) " "; }
}
