/* SRT B149 Gentium visual system.
   Presentation only: every Scripture character, break, role, and annotation is
   emitted by the ledger renderer before this stylesheet is applied. */

@font-face {
  font-family: "Gentium Book Plus";
  src: url("../fonts/GentiumBookPlus-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Gentium Book Plus";
  src: url("../fonts/GentiumBookPlus-Italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Gentium Book Plus";
  src: url("../fonts/GentiumBookPlus-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Gentium Book Plus";
  src: url("../fonts/GentiumBookPlus-BoldItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font: "Gentium Book Plus", serif;
  --page: #f5efe3;
  --page-deep: #ece1cf;
  --paper: #fffdf8;
  --paper-soft: #faf5eb;
  --ink: #211a15;
  --ink-soft: #40352c;
  --muted: #746556;
  --quiet: #aa9b89;
  --line: #d9ccba;
  --line-strong: #c5b299;
  --accent: #8f2e25;
  --accent-deep: #6f211b;
  --accent-soft: #f1ded5;
  --gold: #9c7440;
  --focus: #7f271f;
  --shadow-soft: 0 1.1rem 3.8rem rgba(55, 38, 24, .075);
  --shadow-float: 0 .8rem 2.4rem rgba(43, 29, 18, .13);
  --measure: min(86ch, calc(100vw - 2rem));
  --reader-size: clamp(1.08rem, 1.01rem + .26vw, 1.28rem);
  --reader-leading: 1.76;
  --header-height: 5rem;
  --book-jump-height: 0px;
  --srt-route-clearance: calc(var(--header-height) + var(--book-jump-height) + 2.4rem);
}

html[data-theme="reading"] {
  color-scheme: light;
  --page: #e7d9bd;
  --page-deep: #daccad;
  --paper: #f8efd9;
  --paper-soft: #f2e5c9;
  --ink: #2c241b;
  --ink-soft: #493c2e;
  --muted: #6d5c49;
  --quiet: #9d8a70;
  --line: #cbb994;
  --line-strong: #bba57d;
  --accent: #81412a;
  --accent-deep: #64301f;
  --accent-soft: #e8d1b9;
  --gold: #896735;
  --focus: #71321f;
  --measure: min(82ch, calc(100vw - 2rem));
  --reader-size: clamp(1.12rem, 1.03rem + .32vw, 1.34rem);
  --reader-leading: 1.88;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #15120f;
  --page-deep: #0f0d0b;
  --paper: #211b16;
  --paper-soft: #29211a;
  --ink: #f1e8d8;
  --ink-soft: #d8cab7;
  --muted: #c0b09d;
  --quiet: #8d7e6b;
  --line: #463b31;
  --line-strong: #5a493a;
  --accent: #e59282;
  --accent-deep: #efaa9c;
  --accent-soft: #462721;
  --gold: #d2ad70;
  --focus: #ffd19b;
  --shadow-soft: 0 1.1rem 3.8rem rgba(0, 0, 0, .23);
  --shadow-float: 0 .8rem 2.4rem rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--srt-route-clearance);
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -15rem, color-mix(in srgb, var(--paper) 74%, transparent), transparent 38rem),
    linear-gradient(180deg, var(--page), var(--page-deep));
  color: var(--ink);
  font: 400 19px/1.64 var(--font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}
a { color: inherit; }
button, input, select { font: inherit; }
button, summary, select { touch-action: manipulation; }
::selection { background: var(--accent-soft); color: var(--ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 1rem;
  top: -7rem;
  z-index: 200;
  padding: .65rem .9rem;
  border: 2px solid var(--focus);
  border-radius: .5rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* Identity and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .78rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  box-shadow: 0 .2rem 1.4rem rgba(45, 31, 20, .045);
  backdrop-filter: blur(15px) saturate(1.12);
}
.site-mark { min-width: 0; }
.site-mark a {
  display: grid;
  max-width: min(68vw, 40rem);
  color: var(--ink);
  line-height: 1.04;
  text-decoration: none;
}
.eyebrow {
  color: var(--accent);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .17em;
  line-height: 1.15;
  text-transform: uppercase;
}
.site-mark .eyebrow { margin-bottom: .14rem; }
.site-title {
  font-size: clamp(1.4rem, 2.9vw, 2.18rem);
  font-weight: 700;
  letter-spacing: .035em;
  overflow-wrap: anywhere;
}
.site-subtitle {
  margin-top: .2rem;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .045em;
  line-height: 1.16;
}
.site-controls {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: .46rem;
}
.theme-toggle,
.index-menu summary,
.button {
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--paper) 92%, var(--accent-soft));
  color: var(--ink-soft);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--paper) 75%, white);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.theme-toggle:hover,
.index-menu summary:hover,
.button:hover {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  color: var(--accent-deep);
}
.theme-toggle:active,
.index-menu summary:active,
.button:active { transform: scale(.98); }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.66rem;
  height: 2.66rem;
  padding: 0;
  border-radius: 50%;
}
.theme-toggle-icon { width: 1.38rem; height: 1.38rem; overflow: visible; }
.bulb-rays, .bulb-base {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bulb-glow {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linejoin: round;
  transition: fill .16s ease, filter .16s ease;
}
.theme-toggle[data-theme-current="reading"] {
  color: #7b491f;
  background: color-mix(in srgb, var(--paper) 76%, #e7bd69);
}
.theme-toggle[data-theme-current="reading"] .bulb-glow {
  fill: #dfb45f;
  filter: drop-shadow(0 0 4px rgba(167, 104, 29, .3));
}
.theme-toggle[data-theme-current="dark"] { color: var(--gold); }
.theme-toggle[data-theme-current="dark"] .bulb-glow {
  fill: color-mix(in srgb, var(--gold) 66%, transparent);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--gold) 36%, transparent));
}
.index-menu { position: relative; z-index: 70; }
.index-menu summary {
  list-style: none;
  border-radius: 999px;
  padding: .67rem .92rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}
.index-menu summary::-webkit-details-marker { display: none; }
.index-menu[open] summary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}
.index-panel {
  position: absolute;
  right: 0;
  top: calc(100% + .7rem);
  width: min(92vw, 42rem);
  max-height: min(76vh, 46rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.12rem;
  background: var(--paper);
  box-shadow: 0 1.4rem 4.5rem rgba(41, 28, 18, .18);
}
.index-search,
.hero-search,
.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
}
.index-search { margin-bottom: .9rem; }
.index-search input,
.hero-search input,
.search-row input {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink);
  padding: .68rem .92rem;
}
.button {
  border-radius: 999px;
  padding: .62rem .9rem;
  font-weight: 700;
  line-height: 1;
}
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffaf1;
  box-shadow: 0 .25rem .8rem color-mix(in srgb, var(--accent) 22%, transparent);
}
.button.primary:hover { background: var(--accent-deep); color: #fffaf1; }
.index-edition-link {
  margin: .8rem 0 1rem;
  padding: .65rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.index-edition-link a {
  color: var(--accent);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-decoration: none;
}
.index-edition-link a:hover { text-decoration: underline; text-underline-offset: .2em; }
.index-group { padding-top: .25rem; }
.index-group + .index-group { margin-top: .85rem; padding-top: .95rem; border-top: 1px solid var(--line); }
.index-group h2 {
  margin: 0 0 .55rem;
  color: var(--muted);
  font-size: .7rem;
  letter-spacing: .17em;
  line-height: 1;
}
.index-book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .25rem .52rem;
}
.index-book-grid a {
  display: block;
  border-radius: .48rem;
  padding: .3rem .38rem;
  font-size: .92rem;
  line-height: 1.1;
  text-decoration: none;
}
.index-book-grid a:hover,
.index-book-grid a:focus-visible { background: var(--accent-soft); color: var(--accent-deep); }

/* Home and shared page composition */
main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.5rem);
}
.hero {
  max-width: 58rem;
  margin: clamp(3.4rem, 8vw, 7.5rem) auto clamp(3rem, 7vw, 6rem);
  text-align: center;
}
.identity-hero .hero-kicker {
  display: block;
  margin: 0 auto 1.15rem;
  color: var(--accent);
}
.identity-hero h1 {
  margin: 0;
  font-size: clamp(3.4rem, 9.4vw, 7.7rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: .84;
  text-wrap: balance;
}
.identity-hero h1 span {
  display: block;
  margin-top: .24em;
  color: var(--gold);
  font-size: .38em;
  font-weight: 400;
  letter-spacing: .2em;
}
.hero-witness,
.hero p,
.lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 1rem + .25vw, 1.24rem);
}
.identity-hero .hero-witness {
  margin: 1.6rem auto 0;
  letter-spacing: .025em;
}
.identity-hero .translation-credit {
  display: grid;
  gap: .18rem;
  margin: 1.35rem auto 0;
  color: var(--ink-soft);
  font-size: clamp(.88rem, .84rem + .18vw, 1rem);
  letter-spacing: .035em;
  line-height: 1.35;
}
.identity-hero .translation-credit span:first-child { font-style: italic; }
.identity-hero .translation-credit span:last-child {
  color: var(--muted);
  font-size: .9em;
  letter-spacing: .065em;
}
.hero-search { max-width: 39rem; margin: 2.1rem auto 0; }
.panel {
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  box-shadow: var(--shadow-soft);
}
.book-catalog { padding: clamp(1.15rem, 3.5vw, 2.6rem); }
.catalog-note {
  margin: 0 0 1.5rem;
  color: var(--muted);
  text-align: center;
}
code {
  color: var(--accent-deep);
  font-family: var(--font);
  font-size: .9em;
  font-weight: 700;
}
.testament-heading {
  margin: 2.35rem 0 .75rem;
  color: var(--accent);
  font-size: .75rem;
  letter-spacing: .18em;
  line-height: 1;
}
.testament-heading:first-of-type { margin-top: .5rem; }
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: .72rem;
}
.book-card {
  display: block;
  min-height: 5rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: .88rem;
  background: var(--paper-soft);
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.book-card:hover,
.book-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  background: var(--paper);
  box-shadow: 0 .65rem 1.5rem rgba(44, 30, 19, .08);
}
.book-card strong {
  display: block;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.05;
}
.book-card span {
  display: block;
  margin-top: .42rem;
  color: var(--muted);
  font-size: .88rem;
  letter-spacing: .025em;
}

/* Scripture reader */
.book-header {
  max-width: 56rem;
  margin: clamp(2.4rem, 6vw, 5.2rem) auto 1.55rem;
  text-align: center;
}
.book-title,
.page-header h1,
.prose h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  font-weight: 700;
  letter-spacing: .018em;
  line-height: .96;
  text-wrap: balance;
}
.book-header .lede { margin: 1rem auto 0; }
.book-jump {
  position: sticky;
  top: calc(var(--header-height) + .52rem);
  z-index: 50;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 2.4rem;
  padding: .58rem;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--paper) 91%, transparent);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(14px) saturate(1.08);
}
.book-jump-row {
  display: grid;
  grid-template-columns: minmax(6rem, 1fr) minmax(6rem, 1fr) auto;
  align-items: end;
  gap: .5rem;
}
.book-jump label {
  display: grid;
  gap: .24rem;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;
}
.book-jump select {
  width: 100%;
  min-height: 2.42rem;
  border: 1px solid var(--line);
  border-radius: .68rem;
  background: var(--paper-soft);
  color: var(--ink);
  padding: .35rem .55rem;
}
.book-jump .button { min-height: 2.42rem; border-radius: .68rem; }
.book-jump[data-pending-reference="true"] .button.primary {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.scripture-stream {
  width: var(--measure);
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(1.15rem, 3.8vw, 3.25rem);
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  box-shadow: var(--shadow-soft);
  font-size: var(--reader-size);
  line-height: var(--reader-leading);
  letter-spacing: .003em;
}
.chapter {
  margin: 0 0 clamp(4.5rem, 9vw, 7.2rem);
  scroll-margin-top: var(--srt-route-clearance);
}
.chapter:last-child { margin-bottom: 0; }
.chapter.route-materialized { content-visibility: visible; contain-intrinsic-size: auto; }
.chapter h2 {
  display: grid;
  grid-template-columns: minmax(1.2rem, 1fr) auto minmax(1.2rem, 1fr);
  align-items: center;
  gap: 1rem;
  margin: 0 0 2.3rem;
  color: var(--muted);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: .11em;
  line-height: 1;
  text-align: center;
}
.chapter h2::before,
.chapter h2::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong));
}
.chapter h2::after { background: linear-gradient(90deg, var(--line-strong), transparent); }
.chapter.current-chapter h2 { color: var(--ink-soft); }
.verse {
  position: relative;
  display: grid;
  grid-template-columns: 4.35rem minmax(0, 1fr);
  column-gap: .78rem;
  margin: .12rem 0;
  padding: .04rem .45rem .04rem 0;
  border-radius: .72rem;
  break-inside: avoid;
  scroll-margin-top: var(--srt-route-clearance);
}
.verse-ref {
  align-self: start;
  padding-top: .39em;
  color: var(--quiet);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1;
  text-align: right;
  text-decoration: none;
  white-space: nowrap;
}
.verse-ref:hover,
.verse-ref:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.spatial-lines { min-width: 0; }
.spatial-line { display: block; min-width: 0; }
.line-text { white-space: normal; }
.source-shaped-continuation { padding-left: 1.7em; color: var(--ink-soft); }
.verse.nt-macro-start { margin-top: 1.55rem; }
.verse.nt-macro-continuation { margin-top: 0; }
.ekthesis { margin-left: -.68em; }
.continuation { padding-left: .78em; }
.rubric-initial {
  color: var(--accent);
  font-size: 1.18em;
  font-weight: 700;
}
.petuchah-before { margin-top: 2.05rem; }
.setumah-before .line-text::before {
  content: "";
  display: inline-block;
  width: 4em;
  height: 1px;
  vertical-align: middle;
}
/* SRT-PUB-006/007: at chapter openings the heading and fresh paragraph
   satisfy the boundary. Retain the ledger class, but do not double the gap. */
.chapter > .verse:first-of-type.petuchah-before { margin-top: .12rem; }
.chapter > .verse:first-of-type.setumah-before .line-text::before {
  content: none;
  display: none;
}
.verse.selected-verse-current,
.verse:target {
  margin-top: .28rem;
  margin-bottom: .34rem;
  padding-top: .42rem;
  padding-bottom: .48rem;
  background: color-mix(in srgb, var(--accent-soft) 72%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
  outline: none;
}
.book-pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: var(--measure);
  max-width: 100%;
  margin: 2.2rem auto 0;
}
.book-pagination a {
  max-width: 48%;
  padding: .68rem .84rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--paper-soft);
  color: var(--accent-deep);
  text-decoration: none;
}
.book-pagination a:hover { border-color: var(--accent); background: var(--paper); }

/* Search and editorial matter */
.page-header {
  max-width: 48rem;
  margin: clamp(2.5rem, 6vw, 5rem) auto 2.8rem;
  text-align: center;
}
.page-header h1 { margin-top: .35rem; }
.page-header .lede { margin: 1rem auto 0; }
.search-form,
.search-status,
.search-results { max-width: 51rem; margin-left: auto; margin-right: auto; }
.search-form {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.search-form > label { display: block; margin-bottom: .42rem; font-weight: 700; }
.search-status { margin-top: 1rem; color: var(--muted); }
.search-results { margin-top: 1rem; }
.result {
  display: block;
  margin: .65rem 0;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: .86rem;
  background: var(--paper);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.result:hover,
.result:focus-visible {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 .5rem 1.2rem rgba(45, 30, 18, .07);
}
.result strong { color: var(--accent-deep); font-size: 1.15rem; }
.result p { margin: .22rem 0; }
.source-badges { display: flex; flex-wrap: wrap; gap: .32rem; margin-top: .5rem; }
.source-badge {
  padding: .2rem .48rem;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: .76rem;
}
mark { background: var(--accent-soft); color: var(--ink); }
.muted { color: var(--muted); }

.edition-notes-page { max-width: 63rem; }
.edition-notes-hero { margin: clamp(2.4rem, 6vw, 4.8rem) auto 1rem; text-align: center; }
.edition-notes {
  max-width: 78ch;
  margin: 0 auto;
  padding: clamp(1.4rem, 5vw, 4.4rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  font-size: clamp(1.04rem, 1rem + .22vw, 1.2rem);
  line-height: 1.76;
}
.prose h1 {
  margin: 0 0 2rem;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  color: var(--ink);
}
.prose h2 {
  margin: 2.8rem 0 .68rem;
  color: var(--ink-soft);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.08;
  text-wrap: balance;
}
.prose h3 {
  margin: 2.15rem 0 .55rem;
  color: var(--accent-deep);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.15;
}
.prose p { margin: .75rem 0 1.05rem; text-align: justify; hyphens: auto; }
.conformance-note {
  margin: 0 0 2.3rem;
  padding: 1rem 1.15rem;
  border-left: .24rem solid var(--accent);
  border-radius: 0 .55rem .55rem 0;
  background: var(--accent-soft);
  color: var(--ink-soft);
}
.status-definition { padding-left: 1.1rem; }

/* Footer and persistent utility */
.site-footer {
  margin-top: clamp(3rem, 8vw, 7rem);
  padding: 2.1rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .045em;
  text-align: center;
}
.footer-title { max-width: 72ch; margin: 0 auto; }
.return-top {
  position: fixed;
  right: clamp(.8rem, 2.6vw, 1.55rem);
  bottom: clamp(.8rem, 2.6vw, 1.55rem);
  z-index: 55;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  color: var(--accent-deep);
  box-shadow: var(--shadow-float);
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}
.return-top:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--paper); }
.return-top span { display: block; transform: translateY(-.06em); font-size: 1.25rem; font-weight: 700; }

@supports not (backdrop-filter: blur(1px)) {
  .site-header, .book-jump, .return-top { background: var(--paper); }
}

@media (max-width: 760px) {
  :root { --header-height: 4.45rem; }
  body { font-size: 18px; }
  .site-header { gap: .55rem; padding: .7rem .82rem; }
  .site-mark a { max-width: 67vw; }
  .site-title { font-size: clamp(1.18rem, 5.7vw, 1.7rem); }
  .site-subtitle { display: none; }
  .theme-toggle { width: 2.4rem; height: 2.4rem; }
  .theme-toggle-icon { width: 1.2rem; height: 1.2rem; }
  .index-menu summary { padding: .61rem .75rem; font-size: .72rem; }
  .index-panel {
    position: fixed;
    left: .7rem;
    right: .7rem;
    top: calc(var(--header-height) + .45rem);
    width: auto;
    max-height: calc(100dvh - var(--header-height) - 1.15rem);
    padding: .85rem;
  }
  .index-book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .identity-hero { margin-top: 3.5rem; }
  .identity-hero h1 { font-size: clamp(3rem, 17vw, 5.2rem); }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-header { margin-top: 2.4rem; }
  .book-title { font-size: clamp(2.25rem, 12vw, 4rem); overflow-wrap: anywhere; }
  .book-jump { top: calc(var(--header-height) + .36rem); margin-bottom: 1.75rem; border-radius: .88rem; }
  .scripture-stream { padding: 1.35rem .75rem; border-radius: .82rem; }
  .chapter { margin-bottom: 4.5rem; }
  .chapter h2 { gap: .6rem; margin-bottom: 1.8rem; }
  .verse { grid-template-columns: 3.1rem minmax(0, 1fr); column-gap: .5rem; padding-right: .2rem; }
  .verse-ref { font-size: .64rem; }
  .source-shaped-continuation { padding-left: .9em; }
  .ekthesis { margin-left: -.35em; }
  .continuation { padding-left: .45em; }
  .edition-notes { padding: 1.4rem 1.1rem; }
  .prose p { text-align: left; hyphens: manual; }
}

@media (max-width: 520px) {
  .site-mark .eyebrow { font-size: .58rem; }
  .index-search, .hero-search, .search-row { grid-template-columns: 1fr; }
  .index-book-grid { grid-template-columns: 1fr; }
  .book-grid { grid-template-columns: 1fr; }
  .book-jump { width: 100%; }
  .book-jump-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .book-jump .button { grid-column: 1 / -1; width: 100%; }
  .verse { grid-template-columns: 2.72rem minmax(0, 1fr); column-gap: .42rem; }
  .book-pagination { flex-direction: column; }
  .book-pagination a { max-width: none; }
  .return-top { width: 2.45rem; height: 2.45rem; }
}

@media (max-width: 360px) {
  .site-title { font-size: 1.08rem; }
  .theme-toggle { width: 2.25rem; height: 2.25rem; }
  .index-menu summary { padding-inline: .62rem; }
  .identity-hero h1 { font-size: 2.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

@media print {
  :root { --page: #fff; --paper: #fff; --ink: #000; --muted: #555; --line: #bbb; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .book-jump, .book-pagination, .site-footer, .return-top, .skip-link { display: none; }
  main { width: 100%; padding: 0; }
  .book-header { margin: 0 0 1.5rem; }
  .scripture-stream, .edition-notes, .search-form {
    width: 100%;
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: none;
  }
  .chapter { break-before: page; }
  .chapter:first-child { break-before: auto; }
  .verse { grid-template-columns: 3.4rem minmax(0, 1fr); }
  .verse.selected-verse-current, .verse:target { margin: 0; padding-block: .04rem; background: transparent; box-shadow: none; }
  .rubric-initial, .verse-ref { color: #8f2e25; }
}
