@font-face { font-family: "AK Computer Modern"; src: local("CMU Serif"), local("Computer Modern Serif"), local("Latin Modern Roman"), url("../fonts/cmu-serif-roman.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "AK Computer Modern"; src: local("CMU Serif Bold"), local("Latin Modern Roman Bold"), url("../fonts/cmu-serif-bold.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "AK Computer Modern"; src: local("CMU Serif Italic"), local("Latin Modern Roman Italic"), url("../fonts/cmu-serif-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "AK Computer Modern"; src: local("CMU Serif BoldItalic"), local("Latin Modern Roman Bold Italic"), url("../fonts/cmu-serif-bolditalic.woff2") format("woff2"); font-style: italic; font-weight: 700; font-display: swap; }

:root,
:root[data-theme="classic"] {
  color-scheme: light;
  --bg: #F2F1ED;
  --surface: #FAF9F6;
  --surface-muted: #E7E5E0;
  --reader-bg: #FFFDF8;
  --text: #171717;
  --text-soft: #5F5D58;
  --primary: #191919;
  --primary-hover: #303030;
  --on-primary: #F7F6F2;
  --border: #C9C6BE;
  --border-strong: #88857E;
  --shadow: rgba(0, 0, 0, .10);
  --link: #3F3F3F;
  --verse: #6D6961;
  --words-of-jesus: #9A282C;
  --selection: #D6D4CE;
  --scripture-font-size: 20px;
  --reading-tools-space: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}
:root[data-theme="classic-dark"] {
  color-scheme: dark;
  --bg: #0B0B0B;
  --surface: #151515;
  --surface-muted: #202020;
  --reader-bg: #111111;
  --text: #F0EFEB;
  --text-soft: #AAA8A2;
  --primary: #EAE8E2;
  --primary-hover: #FFFFFF;
  --on-primary: #111111;
  --border: #3B3B3B;
  --border-strong: #686868;
  --shadow: rgba(0, 0, 0, .55);
  --link: #D6D4CE;
  --verse: #A8A49B;
  --words-of-jesus: #E58B8E;
  --selection: #343434;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); scroll-padding-block: 9rem var(--reading-tools-space); }
[hidden] { display: none !important; }
body.reading-active { padding-bottom: var(--reading-tools-space); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: "AK Computer Modern", "CMU Serif", "Latin Modern Roman", "Computer Modern Serif", Georgia, "Times New Roman", serif; }
body, button, select { font-size: 18px; }
::selection { background: var(--selection); }
a { color: var(--link); text-decoration-thickness: .06em; text-underline-offset: .15em; }
button, select { font-family: inherit; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.skip-link { position: fixed; top: -4rem; left: 1rem; z-index: 9999; padding: .65rem 1rem; background: var(--primary); color: var(--on-primary); border-radius: 3px; }
.skip-link:focus { top: 1rem; }
.site-header { position: sticky; top: 0; z-index: 100; background: var(--surface); color: var(--text); border-bottom: 1px solid var(--border-strong); box-shadow: none; }
.header-inner { max-width: 1600px; margin: 0 auto; min-height: 64px; padding: .5rem 1rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem) auto; gap: 1rem; align-items: center; }
.brand { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; min-width: 0; }
.brand-title { font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-controls { display: flex; justify-content: center; gap: .5rem; min-width: 0; }
.control-group { min-width: 0; flex: 1; }
.chapter-control { flex: 0 0 4.5rem; }
.control-group select, .compact-select, .theme-toggle { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 3px; min-height: 2.35rem; padding: .35rem .65rem; }
.control-group select { width: 100%; min-width: 0; }
.control-group select option, .compact-select option { background: var(--surface); color: var(--text); }
.site-switchers { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; }
.scripture-font-control, .chapter-button { border: 1px solid var(--border-strong); border-radius: 3px; background: var(--surface); color: var(--text); box-shadow: 0 .15rem .45rem var(--shadow); }
.scripture-font-control { position: fixed; z-index: 90; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); display: inline-flex; align-items: stretch; padding: 0; overflow: hidden; }
.font-size-button, .font-size-value { min-width: 44px; min-height: 44px; border: 0; border-radius: 0; background: transparent; color: var(--text); font-family: inherit; cursor: pointer; padding: .5rem .7rem; line-height: 1; }
.font-size-value { min-width: 4rem; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: .9rem; font-variant-numeric: tabular-nums; }
.font-size-button:hover, .font-size-value:hover, .chapter-button:hover { background: var(--surface-muted); }
.font-size-button:disabled { opacity:.42; cursor:not-allowed; background:transparent; }
.theme-toggle { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 4px; background: transparent; border-color: transparent; }
.theme-toggle:hover { background: var(--surface-muted); border-color: var(--border); }
.theme-floppy { width: 34px; height: 34px; object-fit: contain; display: block; }
.theme-floppy-on-dark { display: none; }
:root[data-theme="classic-dark"] .theme-floppy-on-light { display: none; }
:root[data-theme="classic-dark"] .theme-floppy-on-dark { display: block; }
.parallel-switcher { position:relative; }
.parallel-summary { list-style:none; cursor:pointer; min-height:2.35rem; display:inline-flex; align-items:center; border:1px solid var(--border); background:var(--bg); color:var(--text); border-radius:3px; padding:.35rem .65rem; user-select:none; }
.parallel-summary::-webkit-details-marker { display:none; }
.parallel-switcher[open] .parallel-summary, .parallel-summary:hover { background:var(--surface-muted); }
.parallel-panel { position:absolute; z-index:300; right:0; top:calc(100% + .45rem); width:min(22rem, calc(100vw - 2rem)); max-height: calc(100dvh - 9rem); overflow-y:auto; padding:1rem; border:1px solid var(--border); border-radius:3px; background:var(--surface); color:var(--text); box-shadow:0 .35rem 1rem var(--shadow); }
.parallel-panel-title { margin:0 0 .65rem; font-weight:700; }
.parallel-panel label { display:flex; gap:.5rem; align-items:center; padding:.3rem 0; }
.parallel-help { color:var(--text-soft); font-size:.82rem; line-height:1.35; margin:.7rem 0; }
.parallel-actions { display:flex; justify-content:flex-end; gap:.5rem; }
.small-button { border:1px solid var(--border); background:var(--bg); color:var(--text); padding:.42rem .65rem; border-radius:3px; cursor:pointer; }
.small-button:hover { background:var(--surface-muted); }
.primary-small { background:var(--primary); color:var(--on-primary); border-color:var(--primary); }

main { min-height: calc(100vh - 126px); }
.home-view, .reader-view, .error-view { max-width: 1220px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 4rem) 1.25rem; }
.home-view { padding-top: clamp(1rem, 2vw, 2rem); }
.hero { max-width: 820px; margin: 0 auto 1.5rem; text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; color: var(--text-soft); margin: 0 0 .6rem; }
.primary-button { cursor: pointer; color: var(--on-primary); background: var(--primary); border: none; border-radius: 3px; padding: .7rem 1.3rem; }
.primary-button:hover { background: var(--primary-hover); }
.book-index { border-top: 1px solid var(--border); padding-top: 1.25rem; }
.book-index > h1 { font-size: 2rem; font-weight: 500; margin-top: 0; }
.testament-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.testament-grid h3 { color: var(--text-soft); font-weight: 500; border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .3rem 1rem; }
.book-link { border: 0; background: transparent; color: var(--text); padding: .35rem .15rem; text-align: left; cursor: pointer; border-bottom: 1px dotted transparent; }
.book-link:hover { color: var(--primary); border-bottom-color: var(--border); }
.reading-shell { max-width: 1520px; margin: 0 auto; }
.reader-view:not(.parallel-active) .reading-shell { max-width: 850px; }
.reader-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 2rem; }
.reader-heading h1 { font-weight: 500; font-size: clamp(2.2rem, 6vw, 4rem); margin: 0; line-height: 1; }
.chapter-title { font-size: 1.35rem; margin: 0; color: var(--text-soft); white-space: nowrap; }
.scripture-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.scripture-grid[data-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scripture-grid[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.scripture-column { min-width: 0; background: var(--reader-bg); border: 1px solid var(--border); box-shadow: 0 2px 8px var(--shadow); padding: clamp(1.5rem, 4vw, 3.5rem); min-height: 50vh; }
.scripture-grid[data-columns="1"] .scripture-column { padding: clamp(1.75rem, 6vw, 4.75rem); }
.scripture-column-header { display:flex; justify-content:space-between; gap:.75rem; align-items:baseline; padding-bottom:.75rem; margin-bottom:1.3rem; border-bottom:1px solid var(--border); color:var(--text-soft); }
.scripture-column-header strong { color:var(--text); font-weight:500; }
.scripture-lang-badge { font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; }
.scripture-body { font-size: var(--scripture-font-size); line-height: 1.72; text-rendering: optimizeLegibility; }
.scripture-prose { margin: 0; }
.scripture-verse { margin: 0 0 1.05em; text-align: left; hyphens: none; }
.scripture-continuation { margin: 0 0 .7em; text-align: left; hyphens: none; }
.verse-number { vertical-align: super; font-size: .62em; line-height: 0; color: var(--verse); margin-right: .18em; font-variant-numeric: oldstyle-nums; user-select: none; }
.section-heading { font-size: 1.22em; text-align: center; font-variant: small-caps; letter-spacing: .035em; font-weight: 500; margin: 2.1em 0 .8em; color: var(--text-soft); }
.poetry { margin: 0 0 .85em 1.5em; }
.poetry.q2, .poetry.q3 { margin-left: 3em; }
.poetry-line { display: block; text-align:left; }
.poetry .scripture-verse { margin-bottom: .7em; }
.scripture-column em, .char-it { font-style: italic; }
.char-bd { font-weight: 700; }
.char-sc { font-variant: small-caps; }
.jesus-words { color: var(--words-of-jesus); }
.source-note, .cross-reference { display: none; }
.chapter-nav { position: fixed; z-index: 90; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); left: max(1rem, env(safe-area-inset-left, 0px)); right: max(1rem, env(safe-area-inset-right, 0px)); display: flex; justify-content: space-between; gap: 1rem; pointer-events: none; }
.chapter-button { min-width: 44px; min-height: 44px; padding: .5rem .7rem; line-height: 1; cursor: pointer; pointer-events: auto; white-space: nowrap; }
.chapter-button:disabled { color: var(--text-soft); cursor: not-allowed; background: var(--surface); }
.chapter-contents { display: flex; justify-content: center; margin: 2rem 0; }
.contents-link { color: var(--text-soft); }
.error-view { text-align: center; }
.site-footer { background: var(--primary); color: var(--on-primary); padding: 1.1rem; text-align: center; font-size: .88rem; }
.site-footer p { margin: 0; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.site-header :focus-visible { outline-color: var(--text); }
@media (max-width: 980px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; position: relative; }
  .reader-controls { grid-row: 2; grid-column: 1 / -1; width: 100%; }
  .reader-controls .control-group:first-child { flex: 1; }
  .control-group select { width: 100%; min-width: 0; }
  .site-switchers { grid-column: 2; grid-row: 1; }
  .parallel-switcher { position: static; }
  .parallel-panel { right: 1rem; top: calc(100% + .45rem); }
}
@media (max-width: 720px) {
  body, button, select { font-size: 16px; }
  .header-inner { grid-template-columns: minmax(0, 1fr); }
  .brand { grid-column: 1; grid-row: 1; justify-self: start; max-width: 100%; }
  .site-switchers { grid-column: 1; grid-row: 2; width: 100%; justify-content: flex-end; }
  .reader-controls { grid-column: 1; grid-row: 3; }
  .testament-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .book-grid { grid-template-columns: 1fr 1fr; }
  .reader-heading { display: block; }
  .chapter-title { margin-top: .75rem; }
  .scripture-column { padding: 1.5rem 1.25rem; border-left: 0; border-right: 0; margin-left: -1.25rem; margin-right: -1.25rem; box-shadow: none; }
}
@media (max-width: 540px) {
  :root, :root[data-theme] { --reading-tools-space: calc(9rem + env(safe-area-inset-bottom, 0px)); }
  .chapter-nav { bottom: calc(1rem + env(safe-area-inset-bottom, 0px) + 44px + .75rem); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
.scripture-grid.parallel-aligned {
  grid-template-rows: repeat(var(--parallel-rows), auto);
  align-items: stretch;
  row-gap: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.parallel-aligned[data-columns="2"] { grid-template-columns: repeat(2, minmax(17rem, 1fr)); }
.parallel-aligned[data-columns="3"] { grid-template-columns: repeat(3, minmax(17rem, 1fr)); }
.parallel-aligned .scripture-column {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: 1 / -1;
  min-height: 0;
  margin: 0;
  padding: clamp(1rem, 2vw, 2rem);
}
.parallel-aligned .scripture-column-header { grid-row: 1; }
.parallel-aligned .scripture-body {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: 2 / -1;
}
.parallel-verse, .parallel-preface { display: flow-root; min-width: 0; overflow-wrap: anywhere; }
@media print {
  .site-header, .site-footer, .chapter-nav, .chapter-contents, .scripture-font-control { display:none !important; }
  body.reading-active { padding-bottom: 0; }
  .reader-view { max-width:none; padding:0; }
  .scripture-column { border:0; box-shadow:none; padding:0; }
  .parallel-aligned[data-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parallel-aligned[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scripture-grid.parallel-aligned { overflow: visible; }
}
