/* Requested dark hues in light mode; muted readable hues in dark mode. */
:root { --passage-red:#991b1b; --passage-blue:#164c96; --passage-purple:#6b2689; }
:is(html[data-theme="dark"], .night-mode) { --passage-red:#f3a6a6; --passage-blue:#a4c9f5; --passage-purple:#d7b4ee; }
#bibleTextContent .word.passage-red, .passage-key.passage-red { color:var(--passage-red) !important; }
#bibleTextContent .word.passage-blue, .passage-key.passage-blue { color:var(--passage-blue) !important; }
#bibleTextContent .word.passage-purple, .passage-key.passage-purple { color:var(--passage-purple) !important; }
/* Existing personal highlights use pale backgrounds in both themes. */
:is(html[data-theme="dark"], .night-mode) #bibleTextContent .highlighted .word.passage-red,
:is(html[data-theme="dark"], .night-mode) #bibleTextContent .word.word-highlighted.passage-red { color:#991b1b !important; }
:is(html[data-theme="dark"], .night-mode) #bibleTextContent .highlighted .word.passage-blue,
:is(html[data-theme="dark"], .night-mode) #bibleTextContent .word.word-highlighted.passage-blue { color:#164c96 !important; }
:is(html[data-theme="dark"], .night-mode) #bibleTextContent .highlighted .word.passage-purple,
:is(html[data-theme="dark"], .night-mode) #bibleTextContent .word.word-highlighted.passage-purple { color:#6b2689 !important; }
.passage-legend, .passage-dialog { color:var(--thf-text); background:var(--thf-surface); border:1px solid var(--thf-border); border-radius:8px; padding:1rem; }
.passage-legend { margin:1rem 0; font-size:0.9rem; }
.passage-legend summary { cursor:pointer; font-weight:600; }
.passage-legend p { margin:0.7rem 0; }
.passage-dialog { width:min(38rem, calc(100% - 2rem)); max-height:80vh; overflow:auto; }
.passage-dialog::backdrop { background:rgb(0 0 0 / 55%); }
.passage-dialog h2, .passage-dialog h3 { color:var(--thf-heading); }
.passage-dialog section { border-top:1px solid var(--thf-border); margin-top:1rem; padding-top:1rem; }
.passage-dialog a { color:var(--thf-link); text-decoration:underline; }
.passage-reference { display:block; margin-top:0.7rem; }
.passage-dialog button { color:var(--thf-text); background:var(--thf-surface-2); border:1px solid var(--thf-border); border-radius:4px; padding:0.3rem 0.6rem; cursor:pointer; }
.passage-dialog :focus-visible, .passage-legend :focus-visible, .passage-preview :focus-visible { outline:2px solid var(--thf-link); outline-offset:3px; }

.passage-preview {
    position:fixed; z-index:11000; box-sizing:border-box;
    width:min(26rem, calc(100vw - 1.5rem)); max-height:min(28rem, 62vh);
    overflow:auto; overscroll-behavior:contain;
    color:var(--thf-text); background:var(--thf-surface);
    border:1px solid var(--thf-border); border-radius:8px;
    padding:0.75rem 0.85rem; box-shadow:0 8px 24px var(--thf-shadow);
    font-size:0.9rem; line-height:1.45;
}
.passage-preview[hidden] { display:none; }
.passage-preview h3 { color:var(--thf-heading); font-size:0.95rem; margin:0 0 0.4rem; }
.passage-preview-cue { margin:0 0 0.35rem; font-size:0.78rem; font-weight:600; }
.passage-preview-explanation { margin:0 0 0.5rem; color:var(--thf-text); }
.passage-preview blockquote {
    margin:0 0 0.55rem; padding:0.35rem 0.55rem;
    border-left:3px solid var(--passage-purple);
    max-height:7rem; overflow:auto; overscroll-behavior:contain;
}
.passage-preview section[data-category="blue"] blockquote { border-left-color:var(--passage-blue); }
.passage-preview section[data-category="red"] blockquote { border-left-color:var(--passage-red); }
.passage-preview section + section { border-top:1px solid var(--thf-border); margin-top:0.7rem; padding-top:0.7rem; }
.passage-preview a { color:var(--thf-link); text-decoration:underline; }
.passage-preview-read { display:block; margin-top:0.45rem; }
.passage-preview button {
    color:var(--thf-text); background:var(--thf-surface-2);
    border:1px solid var(--thf-border); border-radius:4px;
    padding:0.3rem 0.6rem; cursor:pointer; margin-top:0.75rem;
}
/* Small "i" after a colored verse. The colored words open nothing on hover,
   so right-clicking them goes straight to the verse menu. The letter comes
   from ::before, so the button adds no text to copies or read-aloud. */
#bibleTextContent .passage-info {
    --passage-info-color:var(--passage-purple);
    /* Meant to be barely noticeable (Daniel 2026-11-12): small, thin, faint,
       with the letter well clear of the ring. */
    display:inline-flex; align-items:center; justify-content:center;
    box-sizing:border-box; width:1.2em; height:1.2em; min-width:0; margin:0 0 0 .3em; padding:0;
    vertical-align:.18em; position:relative;
    font:600 .58em/1 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color:var(--passage-info-color); background:transparent;
    border:1px solid currentColor; border-radius:50%;
    opacity:.6; cursor:help; user-select:none; -webkit-user-select:none;
    -webkit-tap-highlight-color:transparent;
}
#bibleTextContent .passage-info::before { content:"i"; font-size:.72em; line-height:1; }
/* Bigger touch target than the drawn circle, for phones. */
#bibleTextContent .passage-info::after { content:""; position:absolute; inset:-1em; }
#bibleTextContent .passage-info-red { --passage-info-color:var(--passage-red); }
#bibleTextContent .passage-info-blue { --passage-info-color:var(--passage-blue); }
#bibleTextContent .passage-info:hover,
#bibleTextContent .passage-info[aria-expanded="true"] { opacity:1; color:var(--thf-surface); background:var(--passage-info-color); border-color:var(--passage-info-color); }
#bibleTextContent .passage-info:focus-visible { opacity:1; outline:2px solid var(--thf-link); outline-offset:2px; }
@media print { #bibleTextContent .passage-info { display:none; } }
/* Right-click menu: "Why is this red?" items carry their own color dot. */
.bible-study-menu-item.passage-color-note::before {
    content:""; display:inline-block; flex:0 0 auto; width:.6em; height:.6em; margin-right:.5em;
    border-radius:50%; background:var(--passage-note-dot, var(--passage-purple)); vertical-align:.05em;
}
.bible-study-menu-item.passage-color-note-red { --passage-note-dot:var(--passage-red); }
.bible-study-menu-item.passage-color-note-blue { --passage-note-dot:var(--passage-blue); }

/* Each study category keeps its own preference; long lists stay inside the menu. */
.passage-categories { border:0; margin:.8rem 0; padding:0; display:grid; gap:.4rem; max-height:24rem; overflow:auto; }
.passage-categories legend { font-weight:600; margin-bottom:.4rem; }
.passage-category { display:flex; gap:.65rem; align-items:flex-start; padding:.65rem .3rem; cursor:pointer; }
.passage-category input { flex:0 0 auto; width:1.1rem; height:1.1rem; margin-top:.2rem; accent-color:var(--thf-link); }
.passage-category .passage-key { display:block; font-weight:600; }
.passage-category small { display:block; margin-top:.2rem; line-height:1.5; color:inherit; }
