/* Topic pages (/topics/, built by tools/build_topics.py) */
:root {
    --bar: #1e40af; --bar-ink: #fff;
    --bg: #f9fafb; --card: #fff; --ink: #111827; --muted: #4b5563; --line: #e5e7eb;
    --accent: #1d4ed8; --accent-soft: #dbeafe; --quote: #374151;
}
html.dark {
    --bar: #1e3a8a; --bg: #111827; --card: #1f2937; --ink: #f3f4f6; --muted: #9ca3af; --line: #374151;
    --accent: #93c5fd; --accent-soft: #1e3a5f; --quote: #d1d5db;
    color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
       font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bar { position: sticky; top: 0; z-index: 10; background: var(--bar); color: var(--bar-ink);
       display: flex; align-items: center; gap: 12px; padding: 10px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.bar a { color: inherit; text-decoration: none; display: flex; align-items: center; }
.bar img { height: 28px; width: auto; }
.bar-title { font-weight: 600; }
.bar .back { margin-left: auto; font-size: .875rem; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.14); }
.bar .back:hover { background: rgba(255,255,255,.24); }

main { max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.crumbs a { text-decoration: underline; text-underline-offset: 2px; }
h1 { font-size: 1.75rem; line-height: 1.25; margin: 4px 0 6px; }
.lede { color: var(--muted); margin: 0 0 12px; }
.scroll-btn { display: inline-block; margin: 0 0 18px; padding: 8px 16px; border-radius: 999px; background: #1d4ed8; color: #fff;
              text-decoration: none; font-weight: 600; font-size: .9rem; }
.scroll-btn:hover { filter: brightness(1.1); }
.note { color: var(--muted); font-size: .85rem; margin: -6px 0 10px; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 18px; }
h2 { font-size: 1.15rem; margin: 0 0 10px; }
h3 { font-size: 1rem; margin: 14px 0 6px; }

.verses { list-style: none; margin: 0; padding: 0; }
.verses li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.verses li:last-child { border-bottom: 0; }
.verses .ref { font-weight: 600; text-decoration: none; }
.verses .ref:hover { text-decoration: underline; }
.verses p { margin: 2px 0 0; color: var(--quote); }
.more { font-size: .9rem; margin: 6px 0 0; }
.more a, .entry.see a, .credits a { text-decoration: underline; text-underline-offset: 2px; }
.entry { margin-bottom: 4px; }
.entry.sub { margin-left: 16px; padding-left: 12px; border-left: 2px solid var(--line); }
.entry.sub h3 { font-size: .95rem; }
.entry.see { font-size: .92rem; color: var(--muted); margin: 6px 0; }

.filter input { width: 100%; font: inherit; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line);
                background: var(--card); color: var(--ink); }
.filter { margin-bottom: 16px; }
.filter .note { margin: 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); text-decoration: none; font-size: .9rem; }
.jump { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; }
.jump a { display: inline-block; min-width: 30px; text-align: center; padding: 4px 6px; border-radius: 6px;
          background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .9rem; }
.letter { scroll-margin-top: 64px; }
.all { list-style: none; margin: 0; padding: 0; columns: 2 220px; column-gap: 24px; }
.all li { padding: 3px 0; break-inside: avoid; }
.all a { text-decoration: none; }
.all a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.credits { max-width: 760px; margin: 0 auto; padding: 0 16px 32px; font-size: .78rem; color: var(--muted); }
@media (max-width: 480px) { h1 { font-size: 1.5rem; } .bar img { height: 24px; } section { padding: 14px; } }
