/* House of Abba - Bible study (scoped under .hb).
   The expanded website navigation needs a drawer before its links can overflow. */
#site-header .header-inner { max-width: 1680px; }
@media (min-width: 769px) and (max-width: 1599px) {
  #main-nav { display:none; position:fixed; top:72px; left:0; right:0; bottom:0; background:var(--primary); flex-direction:column; padding:24px; gap:8px; overflow-y:auto; }
  #main-nav.open { display:flex; }
  #main-nav .nav-link { padding:14px 20px; font-size:1.05rem; border-radius:var(--radius); }
  .mobile-menu-btn { display:flex; }
}
#hoa-preview-banner + #app-content .hb { padding-top: 0; }
.hb {
  --hb-bg: #faf9f6; --hb-page: #fffdf8; --hb-ink: #2a2733; --hb-soft: #6b6676; --hb-line: #e8e1d2;
  --hb-gold: #c9a84c; --hb-gold-d: #8f6e22; --hb-navy: #1a1a2e; --hb-wine: #8e1747;
  --hb-hl-gold: rgba(201,168,76,.32); --hb-hl-rose: rgba(196,84,120,.22); --hb-hl-sage: rgba(118,150,108,.26); --hb-hl-sky: rgba(86,140,190,.22);
  --hb-size: 19px;
  background: var(--hb-bg); color: var(--hb-ink); min-height: 100dvh; padding-top: 72px;
}
.hb-theme-sepia { --hb-bg: #f3ead7; --hb-page: #f8f0de; --hb-ink: #3b2f1e; --hb-soft: #75654c; --hb-line: #e0d1b0; }
.hb-theme-dark { --hb-bg: #12121f; --hb-page: #1a1a2e; --hb-ink: #ece6d6; --hb-soft: #a9a3b5; --hb-line: #2e2e48; --hb-gold-d: #e0c57a;
  --hb-hl-gold: rgba(201,168,76,.3); --hb-hl-rose: rgba(220,110,150,.28); --hb-hl-sage: rgba(140,180,128,.26); --hb-hl-sky: rgba(110,160,215,.28); }

.hb-head { background: linear-gradient(135deg, #1a1a2e, #16213e); border-bottom: 1px solid rgba(201,168,76,.25); }
.hb-head-inner { max-width: 1200px; margin: 0 auto; padding: 18px 24px 0; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.hb-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; }
.hb-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: rgba(250,249,246,.94); padding: 3px; }
.hb-eyebrow { display: block; font: 600 .7rem/1.4 var(--font-body); letter-spacing: .22em; text-transform: uppercase; color: var(--hb-gold-d); }
.hb-head .hb-eyebrow { color: var(--hb-gold); }
.hb-title { font: 700 1.45rem/1.15 var(--font-display); color: #faf9f6; }
.hb-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.hb-tab { color: rgba(250,249,246,.72); font: 500 .9rem var(--font-body); padding: 10px 14px 12px; border-bottom: 3px solid transparent; white-space: nowrap; }
.hb-tab:hover { color: var(--hb-gold); }
.hb-tab[aria-current="page"] { color: var(--hb-gold); border-bottom-color: var(--hb-gold); }

.hb-wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px 80px; }
.hb-banner { padding: 14px 18px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; line-height: 1.6; }
.hb-banner ul { margin: 8px 0 8px 20px; list-style: disc; }
.hb-banner-error { background: rgba(142,23,71,.08); border: 1px solid rgba(142,23,71,.3); color: var(--hb-ink); }
.hb-hint { display: flex; gap: 14px; align-items: flex-start; background: var(--hb-navy); color: #f1ecdf; padding: 16px 18px; border-radius: 14px; margin-bottom: 20px; border-left: 4px solid var(--hb-gold); font-size: .93rem; line-height: 1.6; }
.hb-hint a { color: var(--hb-gold); text-decoration: underline; }
.hb-hint-mark { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--hb-gold); color: var(--hb-gold); display: grid; place-items: center; font: italic 700 .95rem var(--font-display); }
.hb-hint .hb-btn { color: var(--hb-gold); border-color: rgba(201,168,76,.5); flex: none; }
.hb-status { position: sticky; top: 84px; z-index: 50; margin: 0 auto 16px; max-width: 640px; padding: 12px 18px; border-radius: 10px; background: var(--hb-navy); color: #f5f0e4; font-size: .92rem; box-shadow: 0 8px 24px rgba(26,26,46,.2); }
.hb-status-error { background: #6e1238; }

.hb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 18px; border-radius: 10px; font: 600 .88rem var(--font-body); border: 1.5px solid var(--hb-line); color: var(--hb-ink); background: transparent; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.hb-btn:hover:not(:disabled) { border-color: var(--hb-gold); }
.hb-btn:active:not(:disabled) { transform: translateY(1px); }
.hb-btn:disabled { opacity: .45; cursor: not-allowed; }
.hb-btn-primary { background: var(--hb-gold); border-color: var(--hb-gold); color: #1a1a2e; }
.hb-btn-primary:hover:not(:disabled) { background: #b8963d; }
.hb-danger { color: #8e1747; }
.hb-theme-dark .hb-danger { color: #f08bb0; }
.hb-danger-solid { background: #8e1747; border-color: #8e1747; color: #fff8f0; }
.hb-danger-solid:hover:not(:disabled) { background: #74113a; }
.hb-chip { min-height: 36px; padding: 6px 12px; border-radius: 999px; font: 500 .84rem var(--font-body); color: var(--hb-soft); border: 1px solid transparent; background: none; cursor: pointer; }
.hb-chip:hover { color: var(--hb-ink); }
.hb-chip[aria-pressed="true"] { background: var(--hb-navy); color: var(--hb-gold); }
.hb-theme-dark .hb-chip[aria-pressed="true"] { background: var(--hb-gold); color: #1a1a2e; }
.hb-linkbtn { color: var(--hb-gold-d); font: 600 .84rem var(--font-body); text-decoration: underline; text-underline-offset: 3px; background: none; cursor: pointer; }
.hb-select, .hb-input { min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--hb-line); background: var(--hb-page); color: var(--hb-ink); font: 500 .92rem var(--font-body); }
.hb-select:focus, .hb-input:focus, .hb-note:focus { outline: none; border-color: var(--hb-gold); box-shadow: 0 0 0 3px rgba(201,168,76,.3); }
.hb-input { width: 100%; }
.hb-input-lg { font-size: 1.05rem; min-height: 52px; }
.hb-label { display: block; font: 600 .78rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--hb-soft); margin: 18px 0 6px; }
.hb-prow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.hb-fine { font-size: .82rem; color: var(--hb-soft); margin-top: 12px; }

/* reader */
.hb-reader { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 0 32px; align-items: start; }
.hb-toolbar, .hb-share-fallback { grid-column: 1 / -1; }
.hb-toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--hb-line); margin-bottom: 8px; }
.hb-pick, .hb-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hb-select-book { min-width: 180px; }
.hb-seg { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--hb-line); }
.hb-size { font: 600 .8rem var(--font-body); color: var(--hb-soft); min-width: 22px; text-align: center; }
.hb-share-fallback { margin: 8px 0 12px; }
.hb-page { grid-column: 1; background: var(--hb-page); border: 1px solid var(--hb-line); border-radius: 18px; padding: clamp(24px, 5vw, 64px); margin-top: 16px; max-width: 760px; width: 100%; justify-self: center; }
.hb-page-head { text-align: center; margin-bottom: 36px; }
.hb-page-head h1 { font: 700 clamp(2rem, 5vw, 3rem)/1.1 var(--font-display); color: var(--hb-ink); margin: 6px 0 10px; }
.hb-chnum { color: var(--hb-gold-d); font-style: italic; }
.hb-edition { font: italic .85rem var(--font-reading); color: var(--hb-soft); }
.hb-page-head::after { content: ''; display: block; width: 56px; height: 2px; background: var(--hb-gold); margin: 22px auto 0; }
.hb-text { font-family: var(--font-reading); font-size: var(--hb-size); line-height: 1.95; color: var(--hb-ink); }
.hb-verse { cursor: pointer; border-radius: 4px; padding: 2px 1px; transition: background-color .2s; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hb-verse:hover { background: rgba(201,168,76,.12); }
.hb-verse:focus-visible { outline: 2px solid var(--hb-gold); outline-offset: 2px; }
.hb-verse.is-active { background: rgba(26,26,46,.08); box-shadow: inset 0 -2px 0 var(--hb-gold); }
.hb-theme-dark .hb-verse.is-active { background: rgba(236,230,214,.1); }
.hb-vn { font: 700 .62em var(--font-body); color: var(--hb-gold-d); margin-right: 3px; vertical-align: super; }
.hb-hl-gold { background: var(--hb-hl-gold); } .hb-hl-rose { background: var(--hb-hl-rose); }
.hb-hl-sage { background: var(--hb-hl-sage); } .hb-hl-sky { background: var(--hb-hl-sky); }
.hb-vmarks i { display: inline-block; vertical-align: middle; margin-left: 4px; }
.hb-ico-bm { width: 8px; height: 11px; background: var(--hb-wine); clip-path: polygon(0 0,100% 0,100% 100%,50% 72%,0 100%); }
.hb-theme-dark .hb-ico-bm { background: #e47ba3; }
.hb-ico-note { width: 7px; height: 7px; border-radius: 50%; background: var(--hb-gold-d); }
.hb-flash { animation: hbFlash 1.6s ease-out; }
@keyframes hbFlash { 0% { background: rgba(201,168,76,.55); } 100% { background: transparent; } }
.hb-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--hb-line); }
.hb-pg { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--hb-line); font: 600 1rem var(--font-display); color: var(--hb-ink); transition: border-color .15s, transform .15s; }
.hb-pg span { font: 600 .7rem var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--hb-soft); }
.hb-pg:hover { border-color: var(--hb-gold); transform: translateY(-2px); }
.hb-pg-next { text-align: right; }

.hb-panel { grid-column: 2; position: sticky; top: 96px; margin-top: 16px; background: var(--hb-page); border: 1px solid var(--hb-line); border-top: 3px solid var(--hb-gold); border-radius: 16px; padding: 20px; box-shadow: 0 16px 40px rgba(26,26,46,.12); animation: hbIn .22s ease-out; max-height: calc(100dvh - 120px); overflow-y: auto; }
@keyframes hbIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hb-panel-head { display: flex; justify-content: space-between; gap: 12px; }
.hb-panel h2 { font: 700 1.3rem var(--font-display); color: var(--hb-ink); }
.hb-x { width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; color: var(--hb-soft); background: none; cursor: pointer; }
.hb-x:hover { background: rgba(201,168,76,.15); color: var(--hb-ink); }
.hb-quote { font: italic .98rem/1.7 var(--font-reading); color: var(--hb-soft); border-left: 2px solid var(--hb-gold); padding-left: 12px; margin: 12px 0 0; max-height: 7.5em; overflow: auto; }
.hb-swatches { border: 0; margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hb-swatches legend { font: 600 .78rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--hb-soft); margin-bottom: 8px; }
.hb-sw { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--hb-line); cursor: pointer; transition: transform .15s; }
.hb-sw:hover { transform: scale(1.08); }
.hb-sw[aria-pressed="true"] { border-color: var(--hb-ink); box-shadow: 0 0 0 3px var(--hb-page) inset; }
.hb-sw-gold { background: #e3cd8b; } .hb-sw-rose { background: #e2a6bb; } .hb-sw-sage { background: #b6c9a9; } .hb-sw-sky { background: #a9c6e0; }
.hb-note { width: 100%; min-height: 120px; resize: vertical; padding: 12px; border-radius: 10px; border: 1.5px solid var(--hb-line); background: var(--hb-bg); color: var(--hb-ink); font: 1rem/1.6 var(--font-reading); }
.hb-note-actions .hb-dirty { flex: 1 1 100%; font-size: .8rem; color: #8e1747; min-height: 1em; }
.hb-theme-dark .hb-note-actions .hb-dirty { color: #f08bb0; }

/* sections */
.hb-section { max-width: 860px; margin: 0 auto; }
.hb-sec-head { margin-bottom: 26px; }
.hb-sec-head h1 { font: 700 clamp(1.9rem, 4vw, 2.6rem)/1.15 var(--font-display); color: var(--hb-ink); margin: 6px 0 10px; }
.hb-sec-head p { color: var(--hb-soft); max-width: 640px; }
.hb-searchform { display: grid; grid-template-columns: 1fr 200px auto; gap: 10px; }
.hb-progress { display: flex; align-items: center; gap: 12px; margin: 16px 0; font-size: .85rem; color: var(--hb-soft); }
.hb-bar { flex: 1; height: 6px; border-radius: 6px; background: var(--hb-line); overflow: hidden; }
.hb-bar span { display: block; height: 100%; background: var(--hb-gold); transform-origin: left; transform: scaleX(0); transition: transform .25s; }
.hb-count { margin: 20px 0 10px; font-size: .85rem; color: var(--hb-soft); }
.hb-results, .hb-lib { display: flex; flex-direction: column; gap: 8px; }
.hb-results a, .hb-lib a { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 12px; background: var(--hb-page); border: 1px solid var(--hb-line); transition: border-color .15s, transform .15s; }
.hb-results a:hover, .hb-lib a:hover { border-color: var(--hb-gold); transform: translateX(3px); }
.hb-rref { font: 700 1rem var(--font-display); color: var(--hb-gold-d); }
.hb-rtext, .hb-lnote { font: 1rem/1.7 var(--font-reading); color: var(--hb-ink); }
.hb-rtext mark { background: var(--hb-hl-gold); color: inherit; border-radius: 3px; padding: 0 2px; }
.hb-lnote { white-space: pre-wrap; font-style: italic; }
.hb-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; font-size: .9rem; color: var(--hb-soft); }
.hb-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 18px; }
.hb-filters .hb-select { margin-left: auto; }
.hb-lib-item a { border-left-width: 4px; }
.hb-edge-gold a { border-left-color: #d6b65b; } .hb-edge-rose a { border-left-color: #c95f87; } .hb-edge-sage a { border-left-color: #7f9e6f; } .hb-edge-sky a { border-left-color: #6596c3; }
.hb-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.hb-tag { font: 600 .7rem var(--font-body); letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(26,26,46,.07); color: var(--hb-soft); }
.hb-theme-dark .hb-tag { background: rgba(236,230,214,.1); }
.hb-tag-gold { background: var(--hb-hl-gold); } .hb-tag-rose { background: var(--hb-hl-rose); } .hb-tag-sage { background: var(--hb-hl-sage); } .hb-tag-sky { background: var(--hb-hl-sky); }
.hb-date { font-size: .78rem; color: var(--hb-soft); }
.hb-backup { margin-top: 40px; padding: 24px; border-radius: 16px; background: var(--hb-navy); color: #ece6d6; }
.hb-backup h2 { font: 700 1.4rem var(--font-display); color: var(--hb-gold); margin-bottom: 6px; }
.hb-backup p { color: rgba(236,230,214,.8); }
.hb-backup .hb-btn-quiet { color: #ece6d6; border-color: rgba(236,230,214,.3); }
.hb-backup .hb-fine { color: rgba(236,230,214,.7); }
.hb-backup .hb-banner-error { background: rgba(255,240,245,.08); color: #fbe3ec; border-color: rgba(240,139,176,.5); }
.hb-file { position: relative; overflow: hidden; }
.hb-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hb-file:focus-within { outline: 2px solid var(--hb-gold); outline-offset: 2px; }
.hb-confirm { margin-top: 16px; padding: 18px; border-radius: 12px; border: 1px solid rgba(201,168,76,.5); background: rgba(201,168,76,.08); }
.hb-confirm h3 { font: 700 1.1rem var(--font-display); color: var(--hb-gold); }

.hb-offbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 14px 18px; border-radius: 12px; background: var(--hb-page); border: 1px solid var(--hb-line); position: sticky; top: 84px; z-index: 5; }
.hb-offbar .hb-prow { margin: 0; }
.hb-offgroup { border: 0; margin-top: 26px; }
.hb-offgroup legend { font: 700 1.15rem var(--font-display); color: var(--hb-ink); margin-bottom: 10px; }
.hb-offgroup ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px; }
.hb-offgroup li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--hb-line); background: var(--hb-page); font-size: .9rem; }
.hb-offgroup li.is-saved { border-color: rgba(201,168,76,.6); }
.hb-offgroup label { display: flex; gap: 8px; align-items: center; cursor: pointer; min-height: 32px; }
.hb-offgroup input { accent-color: #c9a84c; width: 18px; height: 18px; }
.hb-osize { color: var(--hb-soft); font-size: .8rem; }
.hb-ostate { font: 600 .72rem var(--font-body); letter-spacing: .05em; text-transform: uppercase; color: var(--hb-soft); }
.is-saved .hb-ostate { color: var(--hb-gold-d); }

.hb-prose h2 { font: 700 1.35rem var(--font-display); color: var(--hb-ink); margin: 30px 0 8px; }
.hb-prose p, .hb-prose li { line-height: 1.75; color: var(--hb-ink); }
.hb-prose ul { list-style: disc; padding-left: 22px; }
.hb-prose a:not(.hb-btn) { color: var(--hb-gold-d); text-decoration: underline; }
.hb-notice { font: italic 1rem/1.7 var(--font-reading); border-left: 3px solid var(--hb-gold); padding-left: 14px; }
.hb-callout { padding: 18px 20px; border-radius: 14px; background: var(--hb-navy); color: #f1ecdf; border-left: 4px solid var(--hb-gold); font-size: 1rem; line-height: 1.65; }
.hb-stats { display: flex; gap: 32px; margin-bottom: 20px; }
.hb-stats dt { font: 600 .72rem var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--hb-soft); }
.hb-stats dd { font: 700 1.8rem var(--font-display); color: var(--hb-gold-d); }

.hb-empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--hb-line); border-radius: 16px; background: var(--hb-page); }
.hb-empty h2 { font: 700 1.4rem var(--font-display); color: var(--hb-ink); margin-bottom: 8px; }
.hb-empty p { color: var(--hb-soft); margin-bottom: 18px; }
.hb-skel { display: flex; flex-direction: column; gap: 14px; padding: 32px; max-width: 760px; margin: 16px auto; }
.hb-skel span { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--hb-line), rgba(201,168,76,.18), var(--hb-line)); background-size: 200% 100%; animation: hbShim 1.4s linear infinite; }
@keyframes hbShim { to { background-position: -200% 0; } }

@media (max-width: 1024px) {
  .hb-reader { grid-template-columns: 1fr; }
  .hb-panel { grid-column: 1; position: fixed; left: 0; right: 0; bottom: 0; top: auto; margin: 0; border-radius: 18px 18px 0 0; max-height: 72dvh; z-index: 900; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
@media (max-width: 767px) {
  .hb-head-inner { padding: 14px 16px 0; }
  .hb-wrap { padding: 20px 14px 72px; }
  .hb-searchform { grid-template-columns: 1fr; }
  .hb-toolbar { flex-direction: column; align-items: stretch; }
  .hb-pick .hb-select-book { flex: 1; min-width: 0; }
  .hb-tools { justify-content: space-between; }
  .hb-page { border-radius: 14px; padding: 24px 18px; }
  .hb-pager { grid-template-columns: 1fr; }
  .hb-offgroup ul { grid-template-columns: 1fr; }
  .hb-filters .hb-select { margin-left: 0; }
  .hb-hint { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .hb *, .hb *::before, .hb *::after { animation: none !important; transition: none !important; }
}
@media print {
  .hb-head, .hb-toolbar, .hb-panel, .hb-pager, .hb-hint { display: none !important; }
  .hb { padding-top: 0; }
}
.hb-intro { font: italic .95em/1.6 var(--font-reading); color: var(--hb-soft); text-align: center; margin: -12px auto 20px; max-width: 34em; }
.hb-fnmark { font: 700 .55em var(--font-body); color: var(--hb-soft); margin-left: 1px; }
.hb-tnotes { margin-top: 28px; font-size: .88rem; color: var(--hb-soft); }
.hb-tnotes summary { cursor: pointer; font: 600 .78rem var(--font-body); letter-spacing: .1em; text-transform: uppercase; min-height: 32px; display: inline-flex; align-items: center; }
.hb-tnotes summary:focus-visible { outline: 2px solid var(--hb-gold); outline-offset: 2px; }
.hb-tnotes ul { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--hb-line); line-height: 1.6; }
.hb-tnotes .hb-rref { font-size: .85rem; margin-right: 4px; }
