/* Study Assistant tab (inside the Bible Library study panel). */
.bssa { color: var(--c-paper-ink, #0f1a3d); }
.bssa-disclaimer { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: #eef3ff; color: #33405f; font-size: .88rem; line-height: 1.5; }
.bssa-card .bssa-disclaimer { margin: 14px 0 0; }
.bssa-msg { margin: 0 0 12px; padding: 14px 16px; border: 1px dashed var(--c-paper-line, #cbd5ea); border-radius: 14px; color: var(--c-paper-muted, #5b6785); }
.bssa-form { display: grid; gap: 14px; }
.bssa-form[hidden] { display: none; }
.bssa-intro, .bssa-passage, .bssa-tip { margin: 0; }
.bssa-tip { color: var(--c-paper-muted, #5b6785); font-size: .88rem; }
.bssa-passage strong { color: var(--c-royal, #0b2454); }
.bssa-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.bssa-modes legend { width: 100%; margin-bottom: 6px; font-weight: 700; font-size: .9rem; color: var(--c-paper-muted, #5b6785); }
.bssa-mode { position: relative; }
.bssa-mode input { position: absolute; opacity: 0; }
.bssa-mode span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--c-paper-line, #e1e7f3); border-radius: 999px; background: #fff; font-weight: 700; font-size: .9rem; color: var(--c-royal, #0b2454); cursor: pointer; }
.bssa-mode input:checked + span { border-color: var(--c-royal, #0b2454); background: var(--c-royal, #0b2454); color: #fff; }
.bssa-mode input:focus-visible + span { outline: 3px solid rgba(37, 82, 196, .45); outline-offset: 2px; }
.bssa-lang, .bssa-q { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--c-paper-muted, #5b6785); }
.bssa-lang select, .bssa-q textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--c-paper-line, #e1e7f3); border-radius: 14px; background: #fff; color: var(--c-paper-ink, #0f1a3d); font: 400 1.02rem/1.5 inherit; font-family: inherit; }
.bssa-q textarea { min-height: 96px; resize: vertical; }
.bssa-lang select:focus, .bssa-q textarea:focus { outline: none; border-color: var(--c-royal-2, #043a96); box-shadow: 0 0 0 3px rgba(37, 82, 196, .18); }
.bssa-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bssa-send { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; min-width: 140px; padding: 0 24px; border: 0; border-radius: 14px; background: var(--c-royal-2, #043a96); color: #fff !important; font: 800 1.02rem inherit; font-family: inherit; text-decoration: none; cursor: pointer; }
.bssa-send:hover { background: var(--c-royal, #0b2454); }
.bssa-send:disabled { opacity: .6; cursor: progress; }
.bssa-send:focus-visible, .bssa-clear:focus-visible { outline: 3px solid rgba(229, 165, 27, .75); outline-offset: 2px; }
.bssa-clear { min-height: 50px; padding: 0 18px; border: 1.5px solid var(--c-paper-line, #e1e7f3); border-radius: 14px; background: #fff; color: var(--c-paper-muted, #5b6785); font: 700 .95rem inherit; font-family: inherit; cursor: pointer; }
.bssa-clear[hidden] { display: none; }
.bssa-log { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.bssa-you { justify-self: end; max-width: 88%; padding: 12px 16px; border-radius: 16px 16px 4px 16px; background: var(--c-royal, #0b2454); color: #fff; }
.bssa-you p { margin: 4px 0 0; overflow-wrap: anywhere; }
.bssa-you .bssa-who { color: #c9d5ff; }
.bssa-who { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c-gold-deep, #8a6200); }
.bssa-card { padding: 18px 20px; border: 1px solid var(--c-paper-line, #e1e7f3); border-left: 4px solid var(--c-royal-2, #043a96); border-radius: 16px; background: #fff; }
.bssa-text { margin-top: 8px; line-height: 1.7; overflow-wrap: break-word; }
.bssa-text h4 { margin: 1em 0 .35em; font-size: 1.02rem; color: var(--c-royal, #0b2454); }
.bssa-text h4:first-child { margin-top: .2em; }
.bssa-text p { margin: 0 0 .7em; }
.bssa-text ul, .bssa-text ol { margin: 0 0 .8em; padding-left: 1.3em; }
.bssa-reduced { margin: 10px 0 0; color: #6b4d00; font-size: .88rem; }
.bssa-src-title { margin: 16px 0 8px; font-size: .9rem; color: var(--c-paper-muted, #5b6785); }
.bssa-sources { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bssa-src { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--c-paper-line, #e1e7f3); border-radius: 12px; background: var(--c-paper-2, #f6f8fc); }
.bssa-src-type { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c-paper-muted, #5b6785); }
.bssa-src.is-commentary .bssa-src-type { color: var(--c-gold-deep, #8a6200); }
.bssa-src a, .bssa-src span:not(.bssa-src-type) { font-weight: 700; color: var(--c-royal-2, #043a96); overflow-wrap: anywhere; }
.bssa-src small { color: var(--c-paper-muted, #5b6785); }
.bssa-wait { padding: 12px 16px; border-radius: 14px; background: var(--c-paper-2, #f6f8fc); color: var(--c-paper-muted, #5b6785); font-style: italic; }
.bssa-error { padding: 12px 16px; border-radius: 14px; background: #fff6f5; color: #7a271a; }
@media (max-width: 640px) { .bssa-send { flex: 1; } .bssa-card { padding: 14px; } .bssa-you { max-width: 100%; } }
@media (prefers-reduced-motion: reduce) { .bssa * { transition: none !important; } }
