/* chapter-next.css: the way on to the next chapter, at the end of a chapter's text (read/*.html).
   Written into the page by scripts/chapter-next.py. All rules are .bkn-. 18 Nov 2026. */
.bkn { display: block; margin: 2.6rem 0 2.2rem; padding: 0; font-family: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif; clear: both; }
.bkn .bkn-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; padding: 1.35rem 1.5rem 1.4rem; border-radius: 6px;
  background: #1c2a3f; color: #f6f1e7; border: 1px solid #1c2a3f; border-top: 4px solid #d8b366; }
.bkn .bkn-k { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #e8cd8a; line-height: 1.4; }
.bkn .bkn-t { font-size: 1.5rem; line-height: 1.22; color: #f6f1e7; text-wrap: balance; }
.bkn .bkn-t b { font-weight: 700; }
.bkn .bkn-n { display: block; font-size: 0.95rem; font-weight: 400; font-style: italic; color: #ddd3bd; line-height: 1.5; }
.bkn .bkn-y { font-size: 1rem; font-weight: 400; color: #ddd3bd; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bkn .bkn-z { font-size: 1.04rem; line-height: 1.55; color: #f1eadb; max-width: 38rem; margin-top: 0.15rem; }
.bkn a.bkn-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 0.75rem; padding: 0.5rem 1.5rem; border-radius: 999px;
  background: #d8b366; color: #141f30; font-size: 1.02rem; font-weight: 700; line-height: 1.2; text-decoration: none; border: 2px solid #d8b366; }
.bkn a.bkn-btn::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }      /* the whole card opens the chapter */
.bkn .bkn-card:hover a.bkn-btn, .bkn a.bkn-btn:hover { background: #f0d9a0; border-color: #f0d9a0; color: #141f30; }
.bkn a.bkn-btn:focus-visible { outline: 3px solid #f6f1e7; outline-offset: 3px; }
.bkn .bkn-more { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.2rem 1.5rem; margin: 0.55rem 0 0; padding: 0 0.15rem; font-size: 0.98rem; line-height: 1.35; }
.bkn a.bkn-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 0.4rem; min-height: 40px; padding: 0.3rem 0; color: #24497a; text-decoration: none; border: 0; }
.bkn a.bkn-link span { color: #5a4c38; font-style: italic; }
.bkn a.bkn-link b { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(36, 73, 122, 0.45); text-underline-offset: 0.18em; }
.bkn a.bkn-link:hover b { text-decoration-color: currentColor; }
.bkn a.bkn-link:focus-visible { outline: 3px solid #24497a; outline-offset: 2px; border-radius: 3px; }
/* without a chapter after: the two links stand alone */
.bkn > .bkn-more:first-child { margin-top: 0; padding: 0.9rem 0 0; border-top: 2px solid #d8b366; }
/* where nothing stands between this block and the builder's own links at the foot of the page, those links would say the same twice */
.bkn + nav.bk-pager { display: none; }
html.theme-dark .bkn .bkn-card { background: #22324c; border-color: rgba(216, 179, 102, 0.55); border-top-color: #d8b366; }
/* the chapter pages color every link in the text in the dark theme (html.theme-dark .bk-wrap a); the button keeps its dark letters */
html.theme-dark .bkn a.bkn-btn, html.theme-dark .bkn .bkn-card:hover a.bkn-btn, html.theme-dark .bkn a.bkn-btn:hover { color: #141f30; }
html.theme-dark .bkn a.bkn-link { color: #e8cd8a; }
html.theme-dark .bkn a.bkn-link span { color: #c8b896; }
html.theme-dark .bkn a.bkn-link b { text-decoration-color: rgba(232, 205, 138, 0.5); }
html.theme-dark .bkn a.bkn-link:focus-visible { outline-color: #e8cd8a; }
@media (max-width: 640px) {
  .bkn { margin: 2.2rem 0 1.8rem; }
  .bkn .bkn-card { padding: 1.1rem 1.1rem 1.2rem; }
  .bkn .bkn-t { font-size: 1.32rem; }
  .bkn a.bkn-btn { align-self: stretch; min-height: 48px; }
  .bkn .bkn-more { gap: 0 1.2rem; }
  .bkn a.bkn-link { min-height: 44px; }
}
@media print { .bkn { display: none !important; } }
