/* Global Public Domain Hymn Library — public pages.
   BibleSlide identity: deep royal blue, gold accents, light paper, rounded cards.
   Uses the theme's tokens when present (--c-gold, --c-ink…) with fallbacks, so it also
   works with another theme. Everything is scoped under .bsghl. */
.bsghl {
  --g-royal: var(--c-royal, #1e3a8a);
  --g-royal-2: var(--c-royal-2, #2552c4);
  --g-ink: var(--c-ink, #0b1020);
  --g-gold: var(--c-gold, #f4b400);
  --g-gold-2: var(--c-gold-2, #ffcf4a);
  --g-gold-ink: var(--c-gold-ink, #1a1300);
  --g-paper: var(--c-paper, #f7f8fc);
  --g-text: var(--c-paper-text, #1d2433);
  --g-muted: var(--c-paper-muted, #5a6478);
  --g-line: #dfe4f0;
  --g-ok: #1f7a55;
  --g-r: 16px;
  color: var(--g-text);
}
.bsghl *, .bsghl *::before, .bsghl *::after { box-sizing: border-box; }
.bsghl-wrap { width: min(100% - 2rem, 1180px); margin-inline: auto; }

/* hero */
.bsghl-hero { padding: 2.5rem 0 2rem; color: #fff; background: radial-gradient(800px 380px at 85% 0%, rgba(91, 140, 255, .28), transparent 60%), radial-gradient(500px 300px at 0% 100%, rgba(244, 180, 0, .14), transparent 60%), linear-gradient(160deg, #0f1e4a, var(--g-ink)); }
.bsghl-hero h1 { margin: .25rem 0 .5rem; font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.2rem); line-height: 1.1; color: #fff; }
.bsghl-lead { max-width: 46rem; margin: 0 0 1.25rem; color: #c9d2ec; font-size: 1.1rem; }
.bsghl-eyebrow { margin: 0; color: var(--g-gold); font-weight: 700; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.bsghl-crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .9rem; color: #aab6d8; }
.bsghl-crumbs a { color: #dfe6ff; text-decoration: none; }
.bsghl-crumbs a:hover { text-decoration: underline; }
.bsghl-alt { margin: 0 0 .75rem; color: #c9d2ec; font-style: italic; }

.bsghl-search { display: flex; gap: .5rem; max-width: 46rem; padding: .4rem; border-radius: 999px; background: #fff; box-shadow: 0 12px 40px rgba(5, 8, 20, .35); }
.bsghl-search input { flex: 1; min-width: 0; min-height: 48px; padding: 0 1rem; border: 0; border-radius: 999px; font-size: 1.05rem; color: var(--g-text); background: transparent; }
.bsghl-search input:focus { outline: none; }
.bsghl-search:focus-within { box-shadow: 0 0 0 3px rgba(244, 180, 0, .6), 0 12px 40px rgba(5, 8, 20, .35); }

/* buttons */
.bsghl-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: .6em 1.15em; border: 1.5px solid transparent; border-radius: 999px; font: 600 .98rem/1 inherit; text-decoration: none !important; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; }
.bsghl-btn:hover { transform: translateY(-1px); }
.bsghl-btn:focus-visible, .bsghl-tab:focus-visible, .bsghl-tool:focus-visible, .bsghl-az a:focus-visible { outline: 3px solid rgba(244, 180, 0, .7); outline-offset: 2px; }
.bsghl-btn-lg { min-height: 52px; padding: .8em 1.4em; font-size: 1.05rem; }
.bsghl-btn-gold { background: var(--g-gold); color: var(--g-gold-ink) !important; }
.bsghl-btn-gold:hover { background: var(--g-gold-2); }
.bsghl-btn-royal { background: var(--g-royal); color: #fff !important; }
.bsghl-btn-royal:hover { background: var(--g-royal-2); }
.bsghl-btn-outline { background: #fff; color: var(--g-royal) !important; border-color: #c8d3ee; }
.bsghl-btn-outline:hover { border-color: var(--g-royal-2); }
.bsghl-btn-ghost { background: rgba(255, 255, 255, .06); color: #fff !important; border-color: rgba(255, 255, 255, .28); }
.bsghl-btn-ghost:hover { border-color: rgba(255, 255, 255, .6); }

/* paper area */
.bsghl-paper { padding: 1.5rem 0 3rem; background: var(--g-paper); }
.bsghl-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.bsghl-tab { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .4rem 1.05rem; border: 1.5px solid var(--g-line); border-radius: 14px; background: #fff; color: var(--g-text) !important; font-weight: 700; text-decoration: none !important; }
.bsghl-tab:hover { border-color: var(--g-royal-2); }
.bsghl-tab.is-active { background: var(--g-royal); border-color: var(--g-royal); color: #fff !important; }
.bsghl-tab-quiet { font-weight: 600; }
.bsghl-count { padding: .1rem .5rem; border-radius: 999px; background: #eef1f8; color: var(--g-muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.bsghl-tab.is-active .bsghl-count { background: var(--g-gold); color: var(--g-gold-ink); }

.bsghl-filters { margin-bottom: 1rem; border: 1.5px solid var(--g-line); border-radius: var(--g-r); background: #fff; }
.bsghl-filters summary { min-height: 48px; padding: .8rem 1rem; font-weight: 700; cursor: pointer; }
.bsghl-filters-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; padding: 0 1rem 1rem; }
.bsghl-field label { display: block; margin-bottom: .3rem; font-size: .9rem; font-weight: 600; color: var(--g-muted); }
.bsghl-field select { width: 100%; min-height: 44px; padding: .4rem .6rem; border: 1.5px solid var(--g-line); border-radius: 10px; background: #fff; color: var(--g-text); }
.bsghl-field-actions { display: flex; align-items: flex-end; gap: 1rem; }
.bsghl-reset { color: var(--g-royal-2); }

.bsghl-az { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1.25rem; }
.bsghl-az a, .bsghl-az span { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; padding: 0 .5rem; border-radius: 10px; font-weight: 700; text-decoration: none !important; }
.bsghl-az a { background: #fff; border: 1.5px solid var(--g-line); color: var(--g-royal) !important; }
.bsghl-az a:hover { border-color: var(--g-royal-2); }
.bsghl-az a.is-active { background: var(--g-royal); border-color: var(--g-royal); color: #fff !important; }
.bsghl-az span { color: #b8c0d4; }

.bsghl-results { margin: .5rem 0 1rem; font-size: 1.15rem; color: var(--g-muted); }

/* cards */
.bsghl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.bsghl-card { display: flex; flex-direction: column; gap: .45rem; padding: 1.1rem 1.15rem; border: 1.5px solid var(--g-line); border-radius: var(--g-r); background: #fff; box-shadow: 0 2px 10px rgba(16, 24, 48, .04); }
.bsghl-card:hover { border-color: #c3cdea; box-shadow: 0 8px 24px rgba(16, 24, 48, .08); }
.bsghl-card-title { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.bsghl-card-title a { color: var(--g-text) !important; text-decoration: none !important; }
.bsghl-card-title a:hover { color: var(--g-royal-2) !important; }
.bsghl-card-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin: 0; color: var(--g-muted); font-size: .92rem; }
.bsghl-lang { font-weight: 700; color: var(--g-royal); }
.bsghl-tune { font-variant: small-caps; letter-spacing: .03em; }
.bsghl-badge { display: inline-flex; align-self: flex-start; align-items: center; gap: .3rem; margin: 0; padding: .2rem .6rem; border-radius: 999px; background: #e6f4ee; color: var(--g-ok); font-size: .85rem; font-weight: 700; }
.bsghl-card-actions { display: flex; gap: .5rem; margin: auto 0 0; padding-top: .4rem; }
.bsghl-card-actions .bsghl-btn { flex: 1; }

.bsghl-empty { padding: 2rem; border: 1.5px dashed var(--g-line); border-radius: var(--g-r); background: #fff; text-align: center; }
.bsghl-empty h2 { margin: 0 0 .4rem; font-size: 1.25rem; }
.bsghl-pages { margin-top: 1.5rem; }
.bsghl-pages .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; margin: 0 .15rem .3rem 0; padding: 0 .7rem; border: 1.5px solid var(--g-line); border-radius: 10px; background: #fff; color: var(--g-royal) !important; text-decoration: none !important; font-weight: 600; }
.bsghl-pages .page-numbers.current { background: var(--g-royal); border-color: var(--g-royal); color: #fff !important; }
.bsghl-note { margin-top: 2rem; padding: 1rem 1.15rem; border-left: 4px solid var(--g-gold); border-radius: 8px; background: #fff; color: var(--g-muted); font-size: .95rem; }
.bsghl-note p { margin: 0; }

/* hymn page */
.bsghl-facts { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: 1rem 0 1.25rem; }
.bsghl-facts div { min-width: 0; }
.bsghl-facts dt { color: #9fb0db; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.bsghl-facts dd { margin: .1rem 0 0; font-size: 1.05rem; }
.bsghl-facts a { color: #fff; }
.bsghl-meter { color: #c9d2ec; font-size: .9em; }
.bsghl-hero .bsghl-badge { background: rgba(31, 122, 85, .18); color: #7fe0b5; }
.bsghl-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.bsghl-also { margin: 1rem 0 0; color: #c9d2ec; }
.bsghl-also a { margin-left: .5rem; color: var(--g-gold-2); }

.bsghl-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-bottom: 1.25rem; }
.bsghl-size, .bsghl-share { display: flex; flex-wrap: wrap; gap: .4rem; }
.bsghl-tool { min-width: 44px; min-height: 44px; padding: 0 .85rem; border: 1.5px solid var(--g-line); border-radius: 10px; background: #fff; color: var(--g-royal); font-weight: 700; cursor: pointer; }
.bsghl-tool:hover { border-color: var(--g-royal-2); }

.bsghl-lyrics { --lyric-size: 1.25rem; max-width: 46rem; }
.bsghl-section { margin: 0 0 1.6rem; }
.bsghl-label { margin: 0 0 .3rem; color: var(--g-royal); font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.bsghl-section p { margin: 0; font-size: var(--lyric-size); line-height: 1.65; white-space: pre-line; }
.bsghl-chorus p, .bsghl-refrain p { padding-left: 1rem; border-left: 3px solid var(--g-gold); font-style: italic; }

.bsghl-topics { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 1.5rem; }
.bsghl-chip { padding: .35rem .8rem; border-radius: 999px; background: #e9eefb; color: var(--g-royal) !important; font-weight: 600; font-size: .9rem; text-decoration: none !important; }
.bsghl-scripture { color: var(--g-muted); font-size: .92rem; }

.bsghl-pd { max-width: 46rem; padding: 1.25rem 1.35rem; border: 1.5px solid var(--g-line); border-radius: var(--g-r); background: #fff; }
.bsghl-pd h2 { margin: 0 0 .75rem; font-size: 1.15rem; }
.bsghl-pd dl { display: grid; gap: .55rem; margin: 0; }
.bsghl-pd dl > div { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: .75rem; }
.bsghl-pd dt { color: var(--g-muted); font-weight: 600; }
.bsghl-pd dd { margin: 0; overflow-wrap: anywhere; }
.bsghl-pd-claim { margin: .9rem 0 0; color: var(--g-ok); font-weight: 600; font-size: .95rem; }
.bsghl-rights { margin-top: 1rem; border-top: 1px solid var(--g-line); }
.bsghl-rights summary { min-height: 44px; padding: .75rem 0 .5rem; font-weight: 700; cursor: pointer; color: var(--g-royal); }
.bsghl-evidence { display: block; margin-top: .2rem; color: var(--g-muted); }
.bsghl-back { margin-top: 2rem; }

@media (max-width: 640px) {
  .bsghl-hero { padding: 1.75rem 0 1.5rem; }
  .bsghl-search { border-radius: 18px; flex-wrap: wrap; }
  .bsghl-search .bsghl-btn { width: 100%; }
  .bsghl-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
  .bsghl-tab { flex: 0 0 auto; }
  .bsghl-cards { grid-template-columns: 1fr; }
  .bsghl-actions .bsghl-btn { flex: 1 1 100%; }
  .bsghl-pd dl > div { grid-template-columns: 1fr; gap: .1rem; }
  .bsghl-lyrics { --lyric-size: 1.15rem; }
}
@media print {
  .bsghl-hero { background: none; color: #000; padding: 0; }
  .bsghl-hero h1, .bsghl-facts a { color: #000; }
  .bsghl-actions, .bsghl-tools, .bsghl-crumbs, .bsghl-back, .bsghl-also, .bsghl-rights summary { display: none; }
  .bsghl-paper { background: none; }
}
@media (prefers-reduced-motion: reduce) { .bsghl-btn { transition: none; } .bsghl-btn:hover { transform: none; } }
.bsghl-collections { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
