@import url("/static/research_nav.css?v=2");
@import url("/static/control_typography.css?v=1");
/* Reader shell uses the approved interface finish. Passage formatting and
   reader_mode.css/JS retain ownership of Read/Verses layout and motion. */
body.browse-reader-page {
 --ui-panel:var(--bg-card);--ui-line:var(--border-color);--ui-text:#e8eef5;
 --ui-muted:#a9b6c7;--ui-action:#397fae;--ui-link:#9fc7e2;--ui-focus:#b5dfff;
 margin:0;padding:0;background:var(--bg-primary);font-family:system-ui,sans-serif;
}
html.light-mode body.browse-reader-page {
 --ui-text:#22334a;--ui-muted:#566980;--ui-action:#32678f;--ui-link:#305f82;--ui-focus:#174f86;
}
body.browse-reader-page .reader-page-shell {width:100%;max-width:1144px;margin:16px auto 0;padding:0 22px;box-sizing:border-box}
body.browse-reader-page .back-link {font:400 14px/21px system-ui,sans-serif;color:var(--ui-link);margin-bottom:16px}
body.browse-reader-page :is(.reader-header,.chapter-nav,.passage-content) {background:var(--ui-panel);border-color:var(--ui-line);border-radius:9px}
body.browse-reader-page .reader-title {font:600 20px/1.4 system-ui,sans-serif;color:var(--ui-text)}
body.browse-reader-page .reader-chapter {font:500 17px/1.5 system-ui,sans-serif;color:var(--ui-link)}
body.browse-reader-page :is(.reader-meta,.reader-note,.reader-chapter-date) {color:var(--ui-muted)}
body.browse-reader-page .reader-title-row {display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
body.browse-reader-page .reader-title-row .reader-title {min-width:0;overflow-wrap:anywhere}
body.browse-reader-page .reader-title-row .tradition-tag {flex-shrink:0;margin-top:2px}
body.browse-reader-page .nav-title {font:600 14px/21px system-ui,sans-serif;padding-bottom:10px;border-bottom:1px solid var(--ui-line);color:var(--ui-text)}
body.browse-reader-page :is(.chapter-link,.anchor-link) {font:400 14px/21px system-ui,sans-serif;border-radius:6px}
body.browse-reader-page .chapter-link {color:var(--ui-text)}
body.browse-reader-page .anchor-link {color:var(--ui-link)}
body.browse-reader-page .chapter-link.active {
 background:color-mix(in srgb,var(--ui-action) 20%,var(--ui-panel));
 color:var(--ui-link);border-left-color:var(--ui-action);font-weight:600;
}
body.browse-reader-page .chapter-link.active:hover {background:color-mix(in srgb,var(--ui-action) 28%,var(--ui-panel))}
body.browse-reader-page .anchor-link.current {background:color-mix(in srgb,var(--ui-action) 12%,var(--ui-panel));color:var(--ui-link)}
body.browse-reader-page .reader-chapter-bar {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin-bottom:16px;padding:12px 16px;background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:9px;box-sizing:border-box;position:sticky;top:8px;z-index:5;pointer-events:none}
body.browse-reader-page .reader-chapter-label {flex:1 1 140px;min-width:0;pointer-events:auto}
body.browse-reader-page .reader-chapter-label .reader-chapter {margin:0;overflow-wrap:anywhere}
body.browse-reader-page .reader-chapter-date[hidden] {display:none}
body.browse-reader-page .reader-mode-toolbar {flex:0 0 auto;gap:0;margin:0 0 0 auto;position:static}
body.browse-reader-page .reader-mode-toolbar button {
 flex:0 0 80px;width:80px;height:35px;min-height:35px;padding:0 8px;
 border:1px solid var(--ui-line);background:var(--ui-panel);color:var(--ui-muted);
 font:400 12px/18px system-ui,sans-serif;box-sizing:border-box;
}
body.browse-reader-page .reader-mode-toolbar button:first-child {border-radius:6px 0 0 6px}
body.browse-reader-page .reader-mode-toolbar button:last-child {border-radius:0 6px 6px 0}
body.browse-reader-page .reader-mode-toolbar button[aria-pressed="true"] {
 background:color-mix(in srgb,var(--ui-action) 20%,var(--ui-panel));
 color:var(--ui-link);box-shadow:inset 0 -2px var(--ui-action);
}
body.browse-reader-page :is(.chapters-mobile-toggle,.nav-button) {border:1px solid var(--ui-line);border-radius:6px;background:var(--ui-panel);color:var(--ui-text);font:400 14px/21px system-ui,sans-serif}
body.browse-reader-page :is(.chapter-link,.anchor-link,.nav-button,.chapters-mobile-toggle,.reader-mode-toolbar button):focus-visible {outline:3px solid var(--ui-focus);outline-offset:3px}
body.browse-reader-page .contact-footer {width:100%;margin:16px 0 0}
@media(max-width:768px) {
 body.browse-reader-page .reader-page-shell {padding:0 13px}
 body.browse-reader-page .reader-mode-toolbar button {height:44px;min-height:44px}
 body.browse-reader-page .chapters-mobile-toggle {min-height:44px;margin-bottom:0}
 body.browse-reader-page .reader-container.chapters-expanded .chapter-nav {background:var(--ui-panel);border-bottom:1px solid var(--ui-line)}
}

/* Keep navigation controls below the scrolling chapter list. */
body.browse-reader-page .chapter-nav {display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;max-height:calc(100vh - var(--reader-sidebar-top, 16px) - 16px)}
body.browse-reader-page .chapter-nav .nav-title {flex-shrink:0}
body.browse-reader-page .chapter-list {min-height:0;overflow-y:auto;overscroll-behavior:contain}
body.browse-reader-page .chapter-nav-footer {flex-shrink:0;gap:8px}
body.browse-reader-page .chapter-nav-footer .nav-button {padding:10px 12px;min-width:0}
body.browse-reader-page .nav-button:disabled {opacity:.5;cursor:not-allowed}
@media(max-width:768px) {
 body.browse-reader-page .chapter-nav {display:none;max-height:60vh}
 body.browse-reader-page .reader-container.chapters-expanded .chapter-nav {display:flex;overflow:hidden}
}
