/* Поиск по Библии: стили только этой страницы. Шапка, меню, крошки, подвал и тема приходят из /css/pages.css. */
.bs {
  --bs-ink: #222;
  --bs-muted: #5a5a5a;
  --bs-line: #dcdcdc;
  --bs-accent: #1473e6;
  --bs-accent-ink: #fff;
  --bs-bg-soft: #f6f8fb;
  font-size: 16px;
  line-height: 1.4;
}
.bs [hidden] { display: none !important; }
.bs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bs .intro, .bs .bs-lead { max-width: none; margin: 0 0 14px; font-size: 16px; line-height: 1.5; color: var(--bs-muted); }
.bs-lead strong { font-weight: bold; }

.bs a:focus-visible, .bs button:focus-visible, .bs input:focus-visible { outline: 3px solid #ff9f1a; outline-offset: 2px; }

/* Форма */
.bs-form { display: flex; flex-direction: row; align-items: stretch; gap: 10px; font-size: 16px; }
.bs-input-wrap { position: relative; flex: 1; min-width: 0; }
.bs-input {
  box-sizing: border-box; width: 100%; height: 100%; min-width: 0; margin: 0; padding: 16px 48px 16px 16px; font: 18px/1.3 Helvetica, Arial, sans-serif; color: var(--bs-ink);
  border: 2px solid #6b7685; border-radius: 10px; background: #fff; -webkit-appearance: none; appearance: none;
}
.bs-input::placeholder { color: #6b7280; opacity: 1; }
.bs-input::-webkit-search-cancel-button, .bs-input::-webkit-search-decoration { display: none; -webkit-appearance: none; }
.bs-input::-ms-clear { display: none; }
.bs-button {
  flex: 0 0 auto; white-space: nowrap; padding: 15px 22px; font: 600 18px/1.2 Helvetica, Arial, sans-serif; color: var(--bs-accent-ink); background: var(--bs-accent);
  border: 2px solid var(--bs-accent); border-radius: 10px; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.bs-button:hover { background: #0e58b3; border-color: #0e58b3; }
.bs-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #526174; cursor: pointer; appearance: none; -webkit-appearance: none; }
.bs-clear svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.bs-clear:hover { color: #0e58b3; background: #eef4fd; }
@media (max-width: 639px) {
  .bs-form { gap: 8px; }
  .bs-input { padding: 12px 46px 12px 10px; font-size: 16px; min-height: 48px; }
  .bs-button { padding: 12px 14px; font-size: 16px; min-height: 48px; }
}

.bs .bs-examples { max-width: none; margin: 14px 0 6px; font-size: 14px; color: var(--bs-muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bs-chip {
  display: inline-block; padding: 8px 14px; text-decoration: none; font: 15px/1.2 Helvetica, Arial, sans-serif; color: #1a4a8a; background: var(--bs-bg-soft); border: 1px solid #7f9bc0; border-radius: 999px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.bs-chip:hover { background: #e8f0fb; }

/* Результаты */
.bs-results { margin-top: 18px; }
.bs-status { margin: 0 0 10px; font-size: 16px; color: var(--bs-muted); min-height: 1.4em; }
.bs-list { list-style: none; margin: 0; padding: 0; }
.bs-item { padding: 16px 0; border-top: 1px solid var(--bs-line); }
.bs-item:first-child { border-top: 0; }
.bs-ref { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--bs-ink); }
.bs-text { margin: 0 0 10px; font: 19px/1.55 Georgia, "Times New Roman", serif; color: var(--bs-ink); max-width: 38em; }
.bs-text i { font-style: italic; }
.bs-note { margin: 0 0 8px; font-size: 14px; color: var(--bs-muted); }
.bs-link { display: inline-block; padding: 9px 14px; font-size: 15px; color: var(--bs-accent); text-decoration: none; border: 1px solid #4d86d4; border-radius: 8px; background: #fff; }
.bs-link:hover { background: #eef4fd; color: #0e58b3; }
.bs-more { margin: 14px 0; padding: 12px 20px; font: 16px/1.2 Helvetica, Arial, sans-serif; background: #fff; color: var(--bs-accent); border: 2px solid var(--bs-accent); border-radius: 10px; cursor: pointer; }
.bs-hints { margin-top: 20px; padding: 14px 16px; background: var(--bs-bg-soft); border: 1px solid #d7e0ec; border-radius: 10px; }
.bs-hints h2 { margin: 0 0 8px; font-size: 16px; }
.bs-hl { background: #fff2b3; color: inherit; padding: 0 1px; border-radius: 2px; }
@media (prefers-contrast: more) { .bs-note, .bs-status, .bs-examples { color: #222; } }

/* Темы */
.bs-topic { margin: 6px 0 18px; padding: 14px 16px 6px; background: var(--bs-bg-soft); border: 1px solid #d7e0ec; border-radius: 12px; }
.bs .bs-topic-title { margin: 0; font-size: 22px; line-height: 1.2; color: var(--bs-ink); }
.bs-topic-sub { margin: 4px 0 6px; font-size: 15px; color: var(--bs-muted); }
.bs-preview { margin: 8px 0; padding: 8px 10px; font-size: 14px; color: #5b3a00; background: #fff4d6; border: 1px solid #e2c36b; border-radius: 8px; }
.bs-vn { font: 600 13px/1 Helvetica, Arial, sans-serif; color: var(--bs-muted); vertical-align: super; }
.bs-titem .bs-text { font-size: 18px; }
.bs .bs-others { margin: 14px 0 0; font-size: 17px; color: var(--bs-ink); }
.bs-topics-link { margin: 14px 0 0; font-size: 16px; }
.bs-all { margin: 10px 0 14px; }

/* Ответы на вопросы, безопасность */
.bs-question { margin: 6px 0 18px; }
.bs-answer { margin: 0 0 14px; padding: 14px 16px 10px; background: var(--bs-bg-soft); border: 1px solid #d7e0ec; border-radius: 12px; }
.bs .bs-qtitle { margin: 0; font-size: 22px; line-height: 1.25; color: var(--bs-ink); }
.bs .bs-answer .bs-qtitle { margin: 0 0 12px; }
.bs .bs-answer .bs-qlabel { margin: 0 0 16px; }
.bs .bs-answer .bs-qsummary { margin: 0 0 14px; }
.bs-qlabel { margin: 6px 0 8px; font: 600 13px/1.2 Helvetica, Arial, sans-serif; letter-spacing: .02em; text-transform: uppercase; color: #1a4a8a; }
.bs-qlabel-principles { color: #6a4a00; }
.bs-qsummary { margin: 0 0 10px; font: 18px/1.5 Georgia, "Times New Roman", serif; color: var(--bs-ink); max-width: 38em; }
.bs-qpoints { margin: 0 0 10px 1.2em; padding: 0; font-size: 16px; line-height: 1.5; }
.bs-qpoints li { margin: 0 0 6px; }
.bs-qpoints li:last-child:not(:first-child) { list-style: none !important; position: relative; margin: 16px 0 4px -1.2em; padding: 12px 16px; background: #eef4fd; border: 1px solid #cfdcf0; border-left: 4px solid #1473e6; border-radius: 10px; }
.bs-qpoints li:last-child:not(:first-child)::marker { content: ''; }
.bs-qpoints li:last-child:not(:first-child)::before { content: none !important; }
.bs .bs-qverses > h3, .bs .bs-qrelated > h3 { font-size: 18px; color: var(--bs-ink); }
.bs-sensitive { margin: 0 0 14px; padding: 10px 14px; font-size: 15px; line-height: 1.45; background: #fff8e6; border: 1px solid #e2c36b; border-radius: 10px; }
.bs-sensitive h3 { margin: 0 0 4px; font-size: 16px; }
.bs-sensitive p { margin: 0; }
.bs-safety { margin: 0 0 16px; padding: 16px 18px; background: #fff3f0; border: 2px solid #c0392b; border-radius: 12px; color: #2b1210; }
.bs .bs-safety-title { margin: 0 0 8px; font-size: 22px; line-height: 1.25; color: #8a1f12; }
.bs-safety-lead { margin: 0 0 8px; font-size: 17px; line-height: 1.5; }
.bs-safety-steps { margin: 0 0 10px 1.3em; padding: 0; font-size: 17px; line-height: 1.5; }
.bs-safety-steps li { margin: 0 0 8px; }
.bs-safety-lines { margin: 0 0 10px 1.3em; padding: 0; font-size: 17px; }
.bs-safety-closing { margin: 8px 0 6px; font-size: 17px; line-height: 1.5; font-weight: 600; }

/* Компактные ответы: длинные отрывки свёрнуты (js/passage-collapse.js) */
.bs-text.is-collapsed { max-height: calc(var(--bs-lh, 1.55em) * 4); overflow: hidden; -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.bs-expand { display: inline-block; margin: 0 14px 0 0; padding: 4px 0; font: inherit; font-size: 15px; color: var(--bs-accent); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.bs-expand[hidden] { display: none; }
.bs-expand:hover { color: #0e58b3; }
.bs .bs-qverses > h3 { margin: 14px 0 2px; }
.bs-qverses .bs-item { padding: 12px 0; }
.bs-qverses .bs-ref { margin: 0 0 4px; font-size: 17px; }
.bs-qverses .bs-text { margin: 0 0 6px; }
.bs-qverses .bs-link { padding: 4px 11px; font-size: 14px; border-radius: 7px; }
.bs-qrelated { margin: 10px 0 0; }
.bs .bs-qrelated > h3 { margin: 12px 0 6px; }
.bs-qlinks, .bs-qlinks > li { list-style: none !important; margin: 0; padding: 0; background: none; }
.bs-qlinks { display: flex; flex-wrap: wrap; gap: 8px; }
.bs-qlinks > li::marker { content: ''; }
.bs-qlinks > li::before { content: none !important; }
.bs-qlinks .bs-link { padding: 6px 12px; font-size: 14px; border-radius: 999px; background: var(--bs-bg-soft); }
.bs-back { margin: 28px 0 8px; font-size: 16px; }
@media print { .bs-text.is-collapsed { max-height: none; overflow: visible; -webkit-mask-image: none; mask-image: none; } .bs-expand { display: none; } }

/* Тёмная тема (переключатель темы — в общем /js/theme.js) */
html[data-theme="dark"] .bs {
  --bs-ink: #e5e9ef; --bs-muted: #adb5bf; --bs-line: #444b55; --bs-accent: #82b7ff; --bs-accent-ink: #17191c; --bs-bg-soft: #23272d;
}
html[data-theme="dark"] .bs :is(.bs-input) { color: #e5e9ef; background: #23272d; border-color: #59616d; }
html[data-theme="dark"] .bs .bs-input::placeholder { color: #adb5bf; }
html[data-theme="dark"] .bs .bs-button { background: #245fa8; color: #fff; border-color: #245fa8; }
html[data-theme="dark"] .bs .bs-button:hover { background: #1c4e8c; border-color: #82b7ff; }
html[data-theme="dark"] .bs .bs-clear { color: #adb5bf; }
html[data-theme="dark"] .bs .bs-clear:hover { color: #fff; background: #343d48; }
html[data-theme="dark"] .bs :is(.bs-link, .bs-more, .bs-chip, .bs-answer, .bs-topic, .bs-hints) { color: #d9dde3; background: #23272d; border-color: #444b55; }
html[data-theme="dark"] .bs :is(.bs-link, .bs-more, .bs-chip):hover { color: #fff; background: #303a47; border-color: #82b7ff; }
html[data-theme="dark"] .bs :is(.bs-expand, .bs-qlabel) { color: #82b7ff; }
html[data-theme="dark"] .bs .bs-qlabel-principles { color: #f1d395; }
html[data-theme="dark"] .bs .bs-qpoints li:last-child:not(:first-child) { background: #232e3d; border-color: #596b85; border-left-color: #82b7ff; }
html[data-theme="dark"] .bs :is(.bs-sensitive, .bs-preview) { background: #3b321f; color: #f1d395; border-color: #695836; }
html[data-theme="dark"] .bs .bs-safety { background: #3c2526; color: #f1d5d5; border-color: #a96969; }
html[data-theme="dark"] .bs .bs-safety-title { color: #ffb4ab; }
html[data-theme="dark"] .bs .bs-hl { background: #514421; color: #ffe8a6; }
