:root {
  color-scheme: light;
  --bg: #f3efe7;
  --surface: #fffdf8;
  --ink: #27251f;
  --muted: #6f6a5f;
  --line: #d8d1c4;
  --gold: #a77935;
  --gold-soft: #efe3cd;
  --accent: #4f684b;
  --accent-contrast: #fff;
  --danger: #8c4037;
  --shadow: 0 18px 45px rgba(65, 53, 34, 0.1);
  --focus: #8b5d18;
  --scrollbar-track: #e6dfd3;
  --scrollbar-thumb: #897a62;
  --scrollbar-thumb-hover: #72634e;
  --scrollbar-size: 12px;
  --interface-scale: 1;
  --interface-scale-inverse: 1;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171a18;
  --surface: #202520;
  --ink: #f1eddf;
  --muted: #b9b4a8;
  --line: #3a4038;
  --gold: #e2b66c;
  --gold-soft: #3a3020;
  --accent: #a7c09a;
  --accent-contrast: #171a18;
  --danger: #e0a097;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
  --focus: #ffd27f;
  --scrollbar-track: #171a18;
  --scrollbar-thumb: #667168;
  --scrollbar-thumb-hover: #929e94;
}

:root[data-theme="sepia"] {
  color-scheme: light;
  --bg: #e8d3a8;
  --surface: #f8ebce;
  --ink: #392a1b;
  --muted: #67533d;
  --line: #b69b72;
  --gold: #87591e;
  --gold-soft: #e1c999;
  --accent: #526345;
  --accent-contrast: #fffdf4;
  --danger: #8a3c32;
  --shadow: 0 18px 45px rgba(75, 51, 23, .16);
  --focus: #69400d;
  --scrollbar-track: #dfc48f;
  --scrollbar-thumb: #8e6228;
  --scrollbar-thumb-hover: #684415;
}

:root[data-vision-mode] {
  scroll-behavior: auto;
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #000000;
  --muted: #202020;
  --line: #000000;
  --gold: #714400;
  --gold-soft: #fff0a8;
  --accent: #004b87;
  --accent-contrast: #ffffff;
  --danger: #820000;
  --shadow: none;
  --focus: #c84f00;
  --scrollbar-track: #ffffff;
  --scrollbar-thumb: #000000;
  --scrollbar-thumb-hover: #004b87;
  --scrollbar-size: 16px;
}

:root[data-theme="dark"][data-vision-mode] {
  --bg: #000000;
  --surface: #080808;
  --ink: #ffffff;
  --muted: #f0f0f0;
  --line: #ffffff;
  --gold: #ffd34f;
  --gold-soft: #302600;
  --accent: #9ed7ff;
  --accent-contrast: #000000;
  --danger: #ffaaa1;
  --shadow: none;
  --focus: #ffd34f;
  --scrollbar-track: #000000;
  --scrollbar-thumb: #ffffff;
  --scrollbar-thumb-hover: #ffd34f;
}

:root[data-theme="sepia"][data-vision-mode] {
  color-scheme: light;
  --bg: #f0d38c;
  --surface: #fff1c2;
  --ink: #160e05;
  --muted: #312109;
  --line: #211304;
  --gold: #5b3500;
  --gold-soft: #e7c36d;
  --accent: #234f3b;
  --accent-contrast: #ffffff;
  --danger: #700000;
  --shadow: none;
  --focus: #8b2500;
  --scrollbar-track: #f0d38c;
  --scrollbar-thumb: #3d2405;
  --scrollbar-thumb-hover: #6a3900;
}

* {
  box-sizing: border-box;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar { width: var(--scrollbar-size); height: var(--scrollbar-size); }
*::-webkit-scrollbar-track { background: var(--scrollbar-track); }
*::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 3px solid var(--scrollbar-track);
  border-radius: 999px;
  background: var(--scrollbar-thumb);
}
*::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
*::-webkit-scrollbar-corner { background: var(--scrollbar-track); }

html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  zoom: var(--interface-scale);
  background: radial-gradient(circle at 8% 5%, var(--gold-soft), transparent 27rem), var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

button, input, select { font: inherit; }

.app-shell { width: min(100% - 44px, 1080px); margin: 0 auto; }

.topbar {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: .95;
  letter-spacing: .02em;
  text-decoration: none;
}

.brand strong { font-size: 21px; font-weight: 600; }
.brand-mark { color: var(--gold); font-size: 27px; transform: translateY(-1px); }
.topbar-meta, .eyebrow, .hint, footer { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }

main { padding: 72px 0 34px; }
.hero { max-width: 700px; }
.eyebrow { margin: 0 0 15px; font-weight: 700; }
h1, h2, h3, .verse-text { font-family: Georgia, "Times New Roman", serif; }
h1 { margin: 0; font-size: clamp(46px, 6vw, 74px); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.hero-copy { max-width: 500px; margin: 25px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }

.search-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 30px; align-items: end; margin-top: 52px; padding: 25px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 86%, transparent); box-shadow: var(--shadow); }
.lookup-form { min-width: min(100%, 550px); scroll-margin-top: clamp(80px, 10vh, 100px); }
.search-label, .version-switch legend { display: block; margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.search-row { display: flex; align-items: stretch; gap: 9px; }
input[type="text"] { width: 100%; min-width: 0; padding: 15px 16px; border: 1px solid var(--line); border-radius: 3px; outline: none; background: var(--surface); color: var(--ink); font: 500 17px Consolas, "Courier New", monospace; transition: border .15s, box-shadow .15s; }
input[type="text"]:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
.search-row button { flex: 0 0 auto; padding: 0 19px; border: 0; border-radius: 3px; background: var(--accent); color: var(--accent-contrast); cursor: pointer; font-size: 13px; font-weight: 700; transition: filter .15s, transform .15s; }
.search-row button:hover { filter: brightness(1.08); }
.search-row button:active { transform: translateY(1px); }
.hint { margin: 10px 0 0; font-size: 10px; letter-spacing: .04em; text-transform: none; }
.search-assists { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 9px 16px; margin-top: 11px; }
.assist-button, .query-help summary { display: inline-flex; align-items: center; gap: 7px; padding: 3px 0; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .025em; transition: color .18s ease, border-color .18s ease, transform .18s ease; }
.assist-button:hover, .query-help summary:hover, .query-help[open] summary { border-bottom-color: var(--gold); color: var(--ink); }
.assist-button:focus-visible, .query-help summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.browser-toggle::after { width: 6px; height: 6px; margin-left: 1px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; content: ""; transform: translateX(-1px) rotate(-45deg); transition: color .18s ease, transform .18s ease; }
.browser-toggle[aria-expanded="true"] { border-bottom-color: var(--gold); color: var(--ink); }
.browser-toggle[aria-expanded="true"]::after { color: var(--gold); transform: translateY(-2px) rotate(45deg); }
.query-help { position: static; }
.query-help summary { list-style: none; }
.query-help summary::-webkit-details-marker { display: none; }
.help-mark { display: inline-grid; width: 18px; height: 18px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font: 700 11px/1 Georgia, "Times New Roman", serif; }
.query-help-content { position: absolute; z-index: 12; top: calc(100% + 10px); left: 0; width: min(560px, calc(100vw - 56px)); max-height: min(720px, calc(100vh - 80px)); overflow-y: auto; padding: 20px 22px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); box-shadow: var(--shadow); }
.query-help[open] .query-help-content { animation: popover-in .22s ease-out both; transform-origin: top left; }
.query-help-lead, .query-help-rule { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.query-examples { display: grid; gap: 0; margin: 14px 0; }
.query-examples div { display: grid; grid-template-columns: minmax(165px, .9fr) minmax(0, 1.1fr); gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.query-examples div:last-child { border-bottom: 1px solid var(--line); }
.query-examples dt { color: var(--muted); font-size: 11px; }
.query-examples dd { margin: 0; color: var(--ink); font-size: 12px; }
.query-examples small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.query-examples code { padding: 2px 4px; border-radius: 2px; background: var(--gold-soft); font: 500 11px Consolas, "Courier New", monospace; }
.query-help-rule strong { color: var(--ink); }
.query-help-rule code { color: var(--ink); font: 500 11px Consolas, "Courier New", monospace; }
.clear-search-button { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 3px 0; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; letter-spacing: .025em; transition: color .18s ease, border-color .18s ease, opacity .18s ease; }
.clear-search-button span { font-size: 15px; font-weight: 400; line-height: .7; }
.clear-search-button:hover { border-bottom-color: var(--danger); color: var(--danger); }
.clear-search-button:disabled { border-color: transparent; cursor: default; opacity: .35; }
.clear-search-button:focus-visible { outline: 2px solid var(--danger); outline-offset: 3px; }

.ordering-settings { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.ordering-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 9px; min-width: 0; }
.ordering-title { color: var(--ink); font-size: 10px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.ordering-hint { color: var(--muted); font-size: 10px; line-height: 1.45; }
.ordering-toggles { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; }
.ordering-toggle { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; white-space: nowrap; transition: color .18s ease; }
.ordering-toggle:hover { color: var(--ink); }
.ordering-toggle-master { margin-right: 1px; padding-right: 12px; border-right: 1px solid var(--line); }
.ordering-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ordering-switch { position: relative; width: 29px; height: 17px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); transition: border-color .2s ease, background-color .2s ease; }
.ordering-switch::after { position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--muted); content: ""; transition: width .2s ease, border-radius .2s ease, background-color .2s ease, transform .2s ease; }
.ordering-toggle input:checked + .ordering-switch { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 78%, var(--surface)); }
.ordering-toggle input:checked + .ordering-switch::after { background: #fff; transform: translateX(12px); }
.ordering-toggle input:indeterminate + .ordering-switch { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 24%, var(--surface)); }
.ordering-toggle input:indeterminate + .ordering-switch::after { width: 13px; border-radius: 4px; background: var(--accent); transform: translateX(5px); }
.ordering-toggle input:focus-visible + .ordering-switch { outline: 2px solid var(--gold); outline-offset: 2px; }

.confirm-dialog { width: min(470px, calc(100% - 34px)); padding: 0; border: 1px solid var(--line); border-radius: 5px; outline: none; background: var(--surface); color: var(--ink); box-shadow: 0 28px 80px rgba(20, 17, 12, .28); }
.confirm-dialog[open] { animation: dialog-in .22s ease-out both; }
.confirm-dialog::backdrop { background: rgba(18, 17, 14, .48); backdrop-filter: blur(2px); }
.confirm-dialog-content { padding: 27px 28px 25px; }
.confirm-dialog-content .eyebrow { margin-bottom: 8px; }
.confirm-dialog-content h2 { font-size: 31px; }
.confirm-dialog-content > p:not(.eyebrow) { margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.62; }
.confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; }
.confirm-dialog-actions button { min-height: 39px; padding: 0 15px; border-radius: 3px; cursor: pointer; font-size: 11px; font-weight: 700; transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .14s ease; }
.confirm-dialog-actions button:active { transform: translateY(1px); }
.dialog-cancel { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.dialog-cancel:hover { border-color: var(--ink); }
.dialog-confirm { border: 1px solid var(--danger); background: var(--danger); color: var(--surface); }
:root[data-theme="dark"] .dialog-confirm { color: #171a18; }
.dialog-confirm:hover { filter: brightness(1.06); }
.confirm-dialog-actions button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.version-switch { padding: 0; border: 0; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 9px 10px; border-radius: 2px; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; transition: color .22s ease, background-color .22s ease, transform .18s ease; }
.segmented input:checked + span { background: var(--gold-soft); color: var(--ink); }
.segmented input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 1px; }

.bible-browser { margin-top: 20px; padding: 28px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow); }
.bible-browser[hidden] { display: none; }
.bible-browser:not([hidden]) { animation: panel-in .3s ease-out both; transform-origin: top center; }
.browser-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.browser-heading .eyebrow { margin-bottom: 8px; }
.browser-heading h2 { font-size: clamp(28px, 3.5vw, 38px); }
.browser-intro { max-width: 590px; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.browser-close { flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 22px; line-height: 1; transition: color .18s ease, border-color .18s ease, transform .18s ease; }
.browser-close:hover { border-color: var(--ink); color: var(--ink); }
.browser-close:active { transform: scale(.92); }
.browser-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.book-picker { display: grid; grid-template-columns: auto minmax(220px, 390px); align-items: center; gap: 14px; margin-top: 25px; padding: 15px 17px; border: 1px solid var(--line); background: var(--surface); }
.book-picker label, .selection-label { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.book-picker select { width: 100%; padding: 10px 35px 10px 12px; border: 1px solid var(--line); border-radius: 3px; outline: none; background: var(--bg); color: var(--ink); cursor: pointer; font-size: 14px; }
.book-picker select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
.browser-picker { display: grid; grid-template-columns: minmax(260px, .78fr) minmax(0, 1.22fr); gap: 18px; margin-top: 18px; }
.number-section { min-width: 0; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.number-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.number-section-heading h3 { margin: 0; font-size: 20px; font-weight: 500; }
.number-section-heading span { color: var(--muted); font-size: 10px; }
.number-section-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 11px; }
.number-section-actions button { padding: 3px 0; border: 0; border-bottom: 1px solid var(--muted); background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; transition: color .18s ease, border-color .18s ease; }
.number-section-actions button:hover { border-color: var(--accent); color: var(--ink); }
.number-section-actions button:disabled { border-color: transparent; cursor: default; opacity: .42; }
.number-section-actions button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.number-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 7px; }
.number-button { min-width: 38px; min-height: 38px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer; font: 600 12px Consolas, "Courier New", monospace; transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .14s ease, box-shadow .18s ease; }
.number-button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.number-button:active { transform: scale(.91); }
.number-button.is-active { outline: 1px solid color-mix(in srgb, var(--ink) 48%, transparent); outline-offset: 2px; }
.number-button.is-selected { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }
.number-button.is-partial { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--ink); }
.number-button.is-all-selected { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); }
.number-button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.verse-grid:empty::before { content: "Выберите номер главы слева — здесь появятся все её стихи."; grid-column: 1 / -1; padding: 24px 8px; color: var(--muted); font: 14px/1.55 Georgia, "Times New Roman", serif; text-align: center; }
.selection-tray { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 13px 18px; margin-top: 18px; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
.selection-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.selection-heading > div { display: flex; align-items: center; gap: 9px; }
.selection-count { display: inline-grid; min-width: 22px; height: 22px; padding: 0 6px; place-items: center; border-radius: 12px; background: var(--gold-soft); color: var(--ink); font-size: 10px; font-weight: 700; }
.selection-heading button { padding: 3px 0; border: 0; border-bottom: 1px solid var(--muted); background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.selection-heading button:disabled { cursor: default; opacity: .4; }
.selection-chips { display: flex; min-height: 38px; flex-wrap: wrap; align-items: center; gap: 7px; }
.selection-empty { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.selection-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 7px 6px 11px; border: 1px solid color-mix(in srgb, var(--accent) 54%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--ink); font: 600 11px Consolas, "Courier New", monospace; animation: chip-in .2s ease-out both; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.selection-chip:hover { transform: translateY(-1px); }
.selection-chip button { display: inline-grid; width: 20px; height: 20px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--ink); cursor: pointer; font-size: 15px; line-height: 1; }
.selection-chip button:hover { background: var(--accent); color: var(--accent-contrast); }
.selection-read { align-self: end; min-height: 38px; padding: 0 15px; border: 0; border-radius: 3px; background: var(--accent); color: var(--accent-contrast); cursor: pointer; font-size: 11px; font-weight: 700; transition: filter .18s ease, transform .18s ease, opacity .18s ease; }
.selection-read:not(:disabled):hover { filter: brightness(1.08); transform: translateY(-1px); }
.selection-read:not(:disabled):active { transform: translateY(0); }
.selection-read:disabled { cursor: default; opacity: .42; }

.result-section { margin-top: 63px; }
.result-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.result-heading .eyebrow { margin-bottom: 9px; }
h2 { margin: 0; font-size: clamp(30px, 4vw, 43px); font-weight: 500; letter-spacing: -.035em; }
.copy-controls { display: flex; align-items: end; gap: 15px; }
.copy-format { padding: 0; border: 0; text-align: right; }
.copy-format legend { margin: 0 0 5px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.copy-format .segmented span { padding: 7px 8px; font-size: 10px; }
.copy-button, .translation-copy-button { border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.copy-button { padding: 8px 0; }
.translation-copy-button { flex: 0 0 auto; padding: 5px 0; font-size: 9px; }
.copy-button:disabled { cursor: default; opacity: .42; }
.message { margin: 22px 0 0; padding: 14px 16px; border-left: 3px solid var(--gold); background: var(--gold-soft); color: var(--ink); font-size: 14px; }
.result-groups { margin-top: 25px; }
.reference-group + .reference-group { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }
.reference-group { animation: content-in .3s ease-out both; }
.reference-group-title { margin: 0 0 16px; color: var(--ink); font-size: 26px; font-weight: 500; letter-spacing: -.025em; }
.translations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.translations.is-single-translation { grid-template-columns: minmax(0, 1fr); }
.translations.is-single-translation .translation-card { grid-column: 1 / -1; }
.translation-card { min-height: 278px; padding: 25px 26px 29px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 5px 16px rgba(54, 45, 33, .035); }
.translation-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 28px; }
.translation-card h3 { margin: 0; font-size: 25px; font-weight: 500; letter-spacing: -.025em; }
.translation-card .subtitle { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.verse { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 6px; margin-top: 13px; }
.verse:first-of-type { margin-top: 0; }
.verse--separated { position: relative; margin-top: 26px; padding-top: 21px; }
.verse--separated::before { position: absolute; top: 0; right: 0; left: 37px; height: 1px; background: var(--line); content: ""; }
.verse-number { padding-top: 7px; color: var(--gold); font: 500 11px Consolas, "Courier New", monospace; -webkit-user-select: none; user-select: none; }
.verse-text { margin: 0; font-size: 19px; line-height: 1.62; }
.empty-translation { margin: 0; color: var(--muted); font: 16px/1.55 Georgia, "Times New Roman", serif; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 23px 0 34px; border-top: 1px solid var(--line); font-size: 9px; letter-spacing: .055em; }
.back-to-search { position: fixed; z-index: 40; bottom: 24px; left: 24px; display: grid; width: 42px; height: 42px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; font-size: 21px; line-height: 1; transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease; zoom: var(--interface-scale-inverse); }
.back-to-search:hover { border-color: var(--accent); background: var(--gold-soft); transform: translateY(-2px); }
.back-to-search:active { transform: translateY(0) scale(.94); }
.display-controls { position: fixed; z-index: 40; right: 24px; bottom: 24px; display: flex; align-items: flex-end; gap: 8px; zoom: var(--interface-scale-inverse); }
.display-controls-panel { display: flex; align-items: stretch; gap: 8px; transform-origin: right center; }
.display-controls.is-collapsed .display-controls-panel { display: none; }
.interface-scale-control, .theme-control { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); box-shadow: var(--shadow); }
.interface-scale-control button, .vision-mode-toggle, .display-controls-toggle { min-width: 38px; height: 36px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; font-weight: 600; line-height: 1; transition: color .18s ease, background-color .18s ease, opacity .18s ease; }
.interface-scale-control > * + * { border-left: 1px solid var(--line); }
.interface-scale-control output { display: inline-grid; min-width: 51px; height: 36px; padding: 0 7px; place-items: center; color: var(--ink); font: 700 10px/1 Consolas, "Courier New", monospace; }
.interface-scale-control .interface-scale-reset { font-size: 15px; }
.interface-scale-control button:hover:not(:disabled), .vision-mode-toggle:hover, .display-controls-toggle:hover { background: var(--gold-soft); color: var(--ink); }
.interface-scale-control button:disabled { cursor: default; opacity: .34; }
.vision-mode-toggle { min-width: 42px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); box-shadow: var(--shadow); font-size: 12px; letter-spacing: -.03em; }
.vision-mode-toggle.is-active { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }
.display-controls-toggle { width: 36px; min-width: 36px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); box-shadow: var(--shadow); font-family: "Segoe UI Symbol", "Segoe UI", sans-serif; }
.display-controls.is-collapsed .display-controls-toggle { color: var(--gold); }
.theme-button { width: 38px; height: 36px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 17px; }
.sepia-mark { font-size: 14px; }
.system-theme-mark { position: relative; display: inline-block; width: 16px; height: 11px; border: 1.5px solid currentColor; border-radius: 1px; vertical-align: -1px; }
.system-theme-mark::before { position: absolute; bottom: -4px; left: 6px; width: 2px; height: 3px; background: currentColor; content: ""; }
.system-theme-mark::after { position: absolute; bottom: -5px; left: 3px; width: 8px; height: 1.5px; border-radius: 1px; background: currentColor; content: ""; }
.theme-button:first-child { border-left: 0; }
.theme-button.is-active { color: var(--gold); background: var(--gold-soft); }
.theme-button:focus-visible, .interface-scale-control button:focus-visible, .vision-mode-toggle:focus-visible, .display-controls-toggle:focus-visible, .back-to-search:focus-visible, .copy-button:focus-visible, .translation-copy-button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

:root[data-vision-mode] body { background: var(--bg); }
:root[data-vision-mode] h1,
:root[data-vision-mode] h2,
:root[data-vision-mode] h3,
:root[data-vision-mode] .brand,
:root[data-vision-mode] .verse-text,
:root[data-vision-mode] .empty-translation,
:root[data-vision-mode] .verse-grid:empty::before { font-family: Arial, "Segoe UI", sans-serif; }
:root[data-vision-mode] .verse-text { font-weight: 600; line-height: 1.75; }
:root[data-vision-mode] .topbar-meta,
:root[data-vision-mode] .eyebrow,
:root[data-vision-mode] .hint,
:root[data-vision-mode] footer,
:root[data-vision-mode] .search-label,
:root[data-vision-mode] .version-switch legend { letter-spacing: .025em; }
:root[data-vision-mode] .search-panel,
:root[data-vision-mode] .bible-browser,
:root[data-vision-mode] .number-section,
:root[data-vision-mode] .selection-tray,
:root[data-vision-mode] .translation-card { border-width: 2px; box-shadow: none; }
:root[data-vision-mode] :focus-visible { outline: 3px solid var(--focus) !important; outline-offset: 3px !important; }
:root[data-vision-mode] *,
:root[data-vision-mode] *::before,
:root[data-vision-mode] *::after { animation: none !important; transition: none !important; }
:root[data-vision-mode]::view-transition-old(root),
:root[data-vision-mode]::view-transition-new(root) { animation: none !important; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .34s; animation-timing-function: ease-in-out; }
html.theme-transition *, html.theme-transition *::before, html.theme-transition *::after { transition: color .34s ease, background-color .34s ease, border-color .34s ease, box-shadow .34s ease !important; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-9px) scaleY(.985); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes popover-in {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes content-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes chip-in {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
  html { min-width: 0; -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  .app-shell { width: auto; margin-right: max(15px, env(safe-area-inset-right)); margin-left: max(15px, env(safe-area-inset-left)); }
  .topbar { min-height: 74px; }
  .topbar-meta { display: none; }
  .brand { gap: 9px; }
  .brand-mark { font-size: 24px; }
  main { padding: 42px 0 28px; }
  h1 { font-size: clamp(40px, 6vw, 54px); line-height: 1; }
  .hero-copy { margin-top: 20px; font-size: 16px; line-height: 1.62; }
  .search-panel { grid-template-columns: 1fr; gap: 22px; margin-top: 36px; padding: 18px; }
  .lookup-form { min-width: 0; scroll-margin-top: 40px; }
  .search-row { gap: 8px; }
  input[type="text"] { min-height: 50px; padding: 13px 14px; font-size: 16px; }
  .search-row button { min-width: 74px; min-height: 50px; padding-inline: 16px; }
  .ordering-settings { align-items: flex-start; flex-direction: column; }
  .ordering-toggles { width: 100%; justify-content: flex-start; }
  .ordering-toggle { min-height: 40px; }
  .version-switch { width: 100%; }
  .segmented { width: 100%; }
  .segmented label { flex: 1; text-align: center; }
  .segmented span { display: grid; min-height: 42px; padding-inline: 5px; place-items: center; }
  .translations { grid-template-columns: 1fr; }
  .query-help-content { left: 0; width: min(560px, calc(100vw - 46px)); }
  .query-examples div { grid-template-columns: 1fr; gap: 4px; }
  .bible-browser { padding: 20px 17px; }
  .browser-heading { gap: 15px; }
  .browser-close { width: 44px; height: 44px; font-size: 25px; }
  .book-picker { grid-template-columns: 1fr; gap: 7px; }
  .book-picker select { min-height: 46px; font-size: 16px; }
  .browser-picker { grid-template-columns: 1fr; }
  .number-section-actions button { min-height: 36px; }
  .number-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
  .number-button { min-width: 44px; min-height: 44px; font-size: 13px; }
  .selection-tray { grid-template-columns: 1fr; }
  .selection-chip { min-height: 40px; }
  .selection-chip button { width: 28px; height: 28px; }
  .selection-read { width: 100%; min-height: 46px; }
  .result-heading { align-items: flex-start; flex-direction: column; }
  .copy-controls { width: 100%; justify-content: space-between; }
  .result-section { margin-top: 47px; }
  .translation-card { min-height: unset; padding: 21px 19px 25px; }
  .copy-button, .translation-copy-button { min-height: 40px; }
  .display-controls { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .back-to-search { bottom: max(12px, env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left)); width: 44px; height: 44px; }
  .interface-scale-control button, .vision-mode-toggle, .display-controls-toggle { min-width: 44px; height: 44px; }
  .interface-scale-control output { min-width: 54px; height: 44px; }
  .vision-mode-toggle { min-width: 46px; }
  .display-controls-toggle { width: 44px; min-width: 44px; }
  .theme-button { width: 44px; height: 44px; }
  footer { display: block; padding-bottom: calc(116px + env(safe-area-inset-bottom)); line-height: 2; }
  footer span { display: block; }
}

@media (max-width: 520px) {
  .app-shell { margin-right: max(12px, env(safe-area-inset-right)); margin-left: max(12px, env(safe-area-inset-left)); }
  .topbar { min-height: 68px; }
  main { padding-top: 34px; }
  .eyebrow { margin-bottom: 11px; }
  .hero-copy { margin-top: 17px; }
  .search-panel { gap: 18px; margin-top: 30px; padding: 15px; }
  .search-row button { min-width: 68px; padding-inline: 13px; }
  .verse-text { font-size: 18px; }
  .search-assists { align-items: stretch; flex-direction: column; gap: 3px; }
  .assist-button, .query-help summary, .clear-search-button { min-height: 40px; }
  .clear-search-button { margin: 0; }
  .query-help { width: 100%; }
  .query-help-content { position: relative; top: auto; right: auto; left: auto; width: 100%; max-height: min(520px, calc(100dvh - 140px)); margin-top: 7px; padding: 16px; box-shadow: none; }
  .ordering-toggles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .ordering-toggle { justify-content: center; }
  .ordering-toggle-master { margin-right: 0; padding-right: 0; border-right: 0; }
  .version-switch .segmented { display: grid; grid-template-columns: 1fr; gap: 3px; }
  .version-switch .segmented label { width: 100%; }
  .bible-browser { padding: 16px 14px; }
  .browser-heading h2 { font-size: 30px; }
  .browser-intro { font-size: 12px; }
  .book-picker { margin-top: 20px; padding: 13px; }
  .number-section { padding: 14px; }
  .number-section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .number-section-actions { width: 100%; justify-content: space-between; }
  .selection-tray { padding: 14px; }
  .selection-heading { align-items: flex-start; }
  .copy-controls { align-items: stretch; flex-direction: column; gap: 10px; }
  .copy-format { width: 100%; text-align: left; }
  .copy-format .segmented { width: 100%; }
  .copy-format .segmented label { flex: 1; }
  .copy-button { width: 100%; }
  .translation-card { padding: 19px 16px 23px; }
  .translation-card-heading { align-items: flex-start; flex-direction: column; gap: 11px; margin-bottom: 22px; }
  .translation-copy-button { align-self: flex-start; }
  .confirm-dialog { width: calc(100% - 24px); }
  .confirm-dialog-content { padding: 22px 19px 20px; }
  .confirm-dialog-actions button { min-height: 44px; }
  .display-controls-panel { display: grid; grid-template-columns: auto auto; }
  .interface-scale-control { grid-column: 1 / -1; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0s; }
  html.theme-transition *, html.theme-transition *::before, html.theme-transition *::after { transition: none !important; }
  .bible-browser:not([hidden]), .query-help[open] .query-help-content, .reference-group, .selection-chip, .confirm-dialog[open] { animation: none; }
  .assist-button, .query-help summary, .segmented span, .ordering-toggle, .ordering-switch, .ordering-switch::after, .browser-close, .number-button, .selection-chip, .selection-read, .back-to-search { transition: none; }
}


.online-note {
  max-width: 620px;
  margin: 19px 0 0;
  padding: 10px 13px;
  border-left: 2px solid var(--gold);
  background: color-mix(in srgb, var(--gold-soft) 54%, transparent);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.source-link {
  color: var(--muted);
  text-decoration-color: color-mix(in srgb, var(--muted) 45%, transparent);
  text-underline-offset: 3px;
}

.sources-main { max-width: 760px; padding: 72px 0 60px; }
.sources-main h1 { margin: 0; font-size: clamp(42px, 6vw, 62px); font-weight: 500; letter-spacing: -.045em; }
.sources-intro { max-width: 620px; margin: 22px 0 35px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.source-card { margin-top: 18px; padding: 23px 25px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.source-card h2 { font-size: 26px; }
.source-card p, .source-card li { color: var(--muted); font-size: 14px; line-height: 1.65; }
.source-card a { color: var(--accent); }
.back-link { display: inline-block; margin-top: 28px; color: var(--accent); font-size: 13px; font-weight: 700; }

@media (max-width: 760px) {
  .sources-main { padding: 48px 0 42px; }
  .source-card { padding: 20px; }
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 11px;
  font-weight: 700;
}

.topbar-links a,
.footer-links a {
  color: var(--muted);
  text-decoration-color: color-mix(in srgb, var(--muted) 42%, transparent);
  text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.topbar-links a:hover,
.footer-links a:hover {
  color: var(--ink);
  text-decoration-color: var(--gold);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px 18px;
}

.reader-main {
  padding: 44px 0 58px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 42px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumbs a {
  color: var(--muted);
  text-underline-offset: 3px;
}

.breadcrumbs a:hover {
  color: var(--ink);
}

.reader-hero {
  max-width: 790px;
  padding: 12px 0 28px;
}

.reader-hero--compact {
  max-width: 700px;
}

.reader-hero h1,
.reader-text-heading h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 70px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.045em;
}

.reader-hero > p:not(.eyebrow),
.reader-text-heading > div > p:not(.eyebrow) {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.reader-primary-link,
.support-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  margin-top: 25px;
  padding: 0 17px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease;
}

.reader-primary-link:hover,
.support-action:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.testament-section,
.chapter-picker-section {
  margin-top: 42px;
  padding-top: 31px;
  border-top: 1px solid var(--line);
}

.testament-section h2,
.chapter-picker-section h2 {
  margin: 0 0 20px;
  font-size: 30px;
  font-weight: 500;
}

.book-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.book-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 50px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  text-decoration: none;
  transition: background-color 160ms ease, padding-left 160ms ease;
}

.book-link-list a:hover {
  padding-left: 17px;
  background: color-mix(in srgb, var(--gold-soft) 42%, transparent);
}

.book-link-list small {
  flex: none;
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10px;
}

.reader-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
}

.reader-chapter-grid a {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.reader-chapter-grid a:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
  transform: translateY(-1px);
}

.reader-text {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.reader-text-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 32px 34px 29px;
  border-bottom: 1px solid var(--line);
}

.reader-text-heading h1 {
  font-size: clamp(39px, 5vw, 58px);
}

.reader-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
}

.reader-actions a {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-underline-offset: 4px;
}

.reader-actions button {
  min-height: 39px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.reader-actions button:hover {
  border-color: var(--gold);
}

.reader-verses {
  margin: 0;
  padding: 28px 34px 36px;
  list-style: none;
}

.reader-verse {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  padding: 9px 0;
}

.reader-verse-number {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  user-select: none;
}

.reader-verse-text {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.55;
}

.reader-chapter-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.reader-chapter-navigation a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.reader-chapter-navigation a:last-child {
  text-align: right;
}

.reader-search-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 52px;
  padding: 25px 28px;
  border: 1px solid var(--line);
  background: var(--gold-soft);
}

.reader-search-callout h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
}

.reader-search-callout .reader-primary-link {
  flex: none;
  margin-top: 0;
}

.support-main {
  max-width: 800px;
}

.support-card {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
}

.support-pending {
  display: inline-block;
  margin: 10px 0 0;
  padding: 11px 13px;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.not-found-main {
  max-width: 720px;
  padding: 18vh 0 80px;
}

.not-found-main > p:not(.eyebrow) {
  max-width: 520px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

:root[data-vision-mode] .topbar-links,
:root[data-vision-mode] .footer-links,
:root[data-vision-mode] .breadcrumbs,
:root[data-vision-mode] .book-link-list small,
:root[data-vision-mode] .reader-actions a,
:root[data-vision-mode] .reader-actions button,
:root[data-vision-mode] .reader-verse-number,
:root[data-vision-mode] .reader-chapter-navigation a {
  font-size: 16px;
}

:root[data-vision-mode] .reader-verse-text {
  font-family: Arial, sans-serif;
  font-size: 25px;
  line-height: 1.65;
}

@media (max-width: 760px) {
  .topbar-links {
    gap: 12px;
    font-size: 10px;
  }

  .topbar-links a:nth-child(2) {
    display: none;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 5px;
  }

  .reader-main {
    padding: 34px 0 46px;
  }

  .breadcrumbs {
    margin-bottom: 28px;
  }

  .reader-hero h1,
  .reader-text-heading h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .book-link-list {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .reader-text-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 20px 21px;
  }

  .reader-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .reader-actions button {
    min-height: 44px;
  }

  .reader-verses {
    padding: 21px 18px 27px;
  }

  .reader-verse {
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 3px;
    padding: 8px 0;
  }

  .reader-verse-text {
    font-size: 19px;
    line-height: 1.58;
  }

  .reader-search-callout {
    align-items: stretch;
    flex-direction: column;
    margin-top: 38px;
    padding: 21px;
  }

  .reader-search-callout .reader-primary-link {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .topbar-links a:nth-child(3) {
    display: none;
  }

  .reader-chapter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar-links a,
  .footer-links a,
  .reader-primary-link,
  .support-action,
  .book-link-list a,
  .reader-chapter-grid a {
    transition: none;
  }
}
