/* Bible — plain printed-page aesthetic. White paper, black ink. */

@font-face {
  font-family: 'Noto Sans Ethiopic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/noto-sans-ethiopic-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans Ethiopic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/noto-sans-ethiopic-700.woff2') format('woff2');
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #000000;
}

body {
  font-family: 'Noto Sans Ethiopic', 'Nyala', 'Abyssinica SIL', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 18px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: #000000; text-decoration: none; border-bottom: 1px solid #cccccc; }
a:hover { border-bottom-color: #000000; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.3;
  margin: 0 0 1.25rem;
  font-weight: 700;
}

/* ------- Language toggle (top-right corner of every non-landing page) ------- */
.lang-toggle {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem 0;
  text-align: right;
  font-size: 0.95rem;
}
.lang-toggle a {
  color: #666666;
  border-bottom: 1px solid #cccccc;
}
.lang-toggle a:hover {
  color: #000000;
  border-bottom-color: #000000;
}

/* ------- Landing page ------- */
.page-landing main.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}
.page-landing .landing-title {
  font-size: 1.4rem;
  font-weight: 400;
  margin: 0;
  color: #000000;
}
.page-landing .card {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 1.75rem;
  font-weight: 400;
  color: #000000;
  text-decoration: none;
  border-bottom: 1px solid #cccccc;
}
.page-landing .card:hover {
  background: transparent;
  color: #000000;
  border-bottom-color: #000000;
}

/* ------- Breadcrumb ------- */
.crumb {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
  font-size: 0.95rem;
  color: #666666;
}
.crumb a { color: #666666; border-bottom: none; }
.crumb a:hover { color: #000000; text-decoration: underline; }
.crumb .sep { margin: 0 0.4rem; color: #999999; }
.crumb .here { color: #000000; }

/* ------- Per-book translator/recension note above the chapter list ------- */
.book-note {
  margin: 0 0 1.25rem 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  color: #555555;
  background: #f7f7f5;
  border-left: 3px solid #cccccc;
}

/* ------- Lists (book list, chapter list): zebra rows ------- */
.book-list, .chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.book-list li, .chapter-list li {
  margin: 0;
  position: relative;
  scroll-margin-top: 1.25rem;
}
.book-list li:nth-child(odd), .chapter-list li:nth-child(odd) {
  background: #f7f7f5;
}
.book-list a, .chapter-list a {
  display: block;
  padding: 0.9rem 3rem 0.9rem 0.75rem;
  border-bottom: none;
  font-size: 1.1rem;
  color: #000000;
}
.book-list a:hover, .chapter-list a:hover { background: #ececea; }

/* ------- Chapter page ------- */
.verses { margin: 1rem 0 2rem; }

.verse {
  position: relative;
  padding: 0.5rem 2.75rem 0.5rem 0.75rem;
  margin: 0;
  scroll-margin-top: 1.25rem;
}
.verse:nth-child(odd) { background: #f7f7f5; }

.verse-num {
  display: inline-block;
  min-width: 1.5em;
  margin-right: 0.35em;
  font-size: 0.78em;
  color: #777777;
  font-weight: 700;
  vertical-align: 0.35em;
}

/* ------- Highlighted row/verse (target of #anchor) ------- */
.verse.is-highlighted,
.verse.is-highlighted:nth-child(odd),
.row.is-highlighted,
.row.is-highlighted:nth-child(odd) {
  background: #fff3a6;
  color: #000000;
}

/* ------- Share button (used on every shareable row) ------- */
.share-action {
  background: transparent;
  border: none;
  padding: 0.35rem;
  margin: 0;
  cursor: pointer;
  color: #888888;
  line-height: 0;
  position: absolute;
  z-index: 1;
}
.share-action:hover { color: #000000; }
.share-action:focus { outline: 1px solid #000000; outline-offset: 1px; }

.verse > .share-action {
  top: 0.4rem;
  right: 0.35rem;
}
.book-list > li > .share-action,
.chapter-list > li > .share-action {
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
}

/* ------- Chapter nav ------- */
.chap-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eeeeee;
  font-size: 1.75rem;
}
.chap-nav a, .chap-nav .placeholder {
  display: inline-block;
  min-width: 2.5rem;
  padding: 0.25rem 0.75rem;
  text-align: center;
  border-bottom: none;
  color: #000000;
}
.chap-nav a:hover { color: #666666; }

/* ------- Popover (icon-only) ------- */
.popover {
  position: absolute;
  z-index: 100;
  background: #ffffff;
  border: 1px solid #000000;
  padding: 0.25rem;
  display: flex;
  flex-direction: row;
  gap: 0.25rem;
}
.popover[hidden] { display: none; }
.po-action {
  background: transparent;
  border: none;
  padding: 0.5rem;
  font: inherit;
  cursor: pointer;
  color: #000000;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.po-action:hover, .po-action:focus { background: #f0f0f0; outline: none; }

/* ------- Search page ------- */
.page-search main.search-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.page-search .search-form {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.6rem;
}
.page-search .search-input {
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1.1rem;
  font: inherit;
  font-size: 1.4rem;
  border: 1px solid #000000;
  background: #ffffff;
  border-radius: 0;
  color: #000000;
}
/* The search page is a functional tool, so (unlike the reading pages) it
   carries a single accent color — steel blue #1a5fa0 — on its interactive
   affordances. See README "Plain printed-page aesthetic" for the carve-out. */
.page-search .search-go {
  padding: 0 1.4rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  background: #1a5fa0;
  color: #ffffff;
  border: 1px solid #1a5fa0;
  cursor: pointer;
  border-radius: 0;
}
.page-search .search-go:hover { background: #134a7c; border-color: #134a7c; }
.page-search .search-input:focus {
  outline: none;
  border-color: #1a5fa0;
  background: #f4f8fc;
  box-shadow: 0 0 0 2px rgba(26, 95, 160, 0.22);
}
.page-search .search-status {
  font-size: 0.8rem;
  color: #000000;
  margin: 0.4rem 0 0;
  min-height: 1em;
}
.page-search .search-excluded {
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.page-search .search-excluded:empty { margin: 0; }
.page-search .sr-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.3rem 0.1rem 0.55rem;
  font-size: 0.85rem;
  color: #555555;
  background: #f7f7f5;
  border: 1px solid #cccccc;
}
.page-search .sr-chip-x {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 0.2rem;
  font-size: 1.05em;
  line-height: 1;
  color: #666666;
}
.page-search .sr-chip-x:hover { color: #000000; }
.page-search .sr-reset {
  font-size: 0.8rem;
  background: transparent;
  border: none;
  color: #888888;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  margin-left: 0.25rem;
  text-decoration: underline;
}
.page-search .sr-reset:hover { color: #000000; }
.page-search .search-results { margin: 1rem 0 0; }
.page-search .sr-empty {
  color: #888888;
  font-size: 0.95rem;
  padding: 1.25rem 0;
}
.page-search .search-jump { margin: 0; }
.page-search .search-jump:empty { margin: 0; }
.page-search .sr-jump-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.85rem;
  background: #ffffff;
  border: 1px solid #1a5fa0;
  text-decoration: none;
  color: #0b2a47;
  transition: border-color 0.12s linear;
}
.page-search .sr-jump-card:hover { border-color: #134a7c; }
.page-search .sr-jump-ref { font-weight: 700; font-size: 1.05rem; color: #1a5fa0; }
.page-search .sr-jump-preview {
  display: block;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #0b2a47;
}
.page-search .sr-jump-preview:empty { display: none; }
.page-search .sr-empty-head {
  color: #000000;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 1.25rem 0 0.35rem;
}
.page-search .sr-empty-note {
  color: #555555;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 0.75rem;
}
.page-search .sr-empty-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.page-search .sr-empty-links li {
  padding: 0.4rem 0.25rem;
  border-top: 1px solid #f3f3f0;
}
.page-search .sr-empty-links li:first-child { border-top: none; }
.page-search .sr-book {
  margin: 0;
  border-top: 1px solid #eeeeee;
}
.page-search .sr-book:first-child { border-top: none; }
.page-search .sr-book-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0 0.45rem;
}
.page-search .sr-book-name {
  font-weight: 700;
  font-size: 1.05rem;
}
.page-search .sr-book-head .sr-exclude { margin-left: 0; }
.page-search .sr-exclude {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: opacity 0.12s linear;
}
.page-search .sr-exclude:hover { opacity: 1; }
.page-search .sr-exclude:focus-visible {
  outline: 1px solid #000000;
  outline-offset: 1px;
}
.page-search .sr-icon {
  width: 18px;
  height: 18px;
  display: block;
}
.page-search .sr-chapters {
  list-style: none;
  margin: 0;
  padding: 0;
}
.page-search .sr-row {
  padding: 0.45rem 0.25rem;
  border-top: 1px solid #f3f3f0;
}
.page-search .sr-row:first-child { border-top: none; }
.page-search .sr-link {
  flex: 1;
  border-bottom: none;
  color: #000000;
  display: block;
  text-decoration: none;
  min-width: 0;
}
.page-search .sr-link:hover .sr-snip { color: #444444; }
.page-search .sr-link:hover .sr-loc { text-decoration: underline; }
.page-search .sr-loc {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a5fa0;
  margin-bottom: 0.1rem;
}
.page-search .sr-snip {
  display: block;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #000000;
}
.page-search .sr-snip mark {
  background: #fff3a6;
  color: #000000;
  padding: 0 1px;
}
.page-search .sr-load-more {
  display: block;
  width: 100%;
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 0;
  font: inherit;
  font-size: 0.95rem;
  color: #000000;
  cursor: pointer;
}
.page-search .sr-load-more:hover { border-color: #1a5fa0; color: #1a5fa0; background: #f4f8fc; }
.page-search .sr-load-more:disabled { opacity: 0.6; cursor: progress; }
.page-search .search-noscript {
  margin: 1.25rem 0;
  padding: 0.75rem;
  font-size: 0.95rem;
  color: #555555;
  background: #f7f7f5;
  border-left: 3px solid #cccccc;
}

/* ------- Reader controls bar (rendered after the breadcrumb) -------
   Markup is just <div class="page-controls"></div>; app.js fills it in
   and adds .pc-ready to <body> once the bar is mounted. */

.page-controls {
  max-width: 720px;
  margin: 0.5rem auto 0;
  padding: 0 1.25rem;
}
.pc-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.4rem 0;
}
.pc-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.pc-lang .pc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding: 0 0.55rem;
  font: inherit;
  font-size: 0.9rem;
  background: #ffffff;
  color: #000000;
  border: 1px solid #cccccc;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}
.pc-lang .pc-btn:hover {
  color: #000000;
  border-color: #000000;
}
/* The current page's language and any non-existing counterpart are rendered
   as <span> (with aria-current or aria-disabled). They share the greyed,
   non-interactive look so the actionable side carries the visual weight. */
.pc-lang span.pc-btn {
  color: #bbbbbb;
  cursor: default;
}
.pc-lang span.pc-btn:hover {
  color: #bbbbbb;
  border-color: #cccccc;
}
.pc-tog {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: #ffffff;
  color: #555555;
  border: 1px solid #cccccc;
  cursor: pointer;
  line-height: 0;
}
.pc-tog:hover { color: #000000; border-color: #000000; }
.pc-tog[aria-pressed="false"] {
  color: #bbbbbb;
  background: #ffffff;
}
.pc-tog[aria-pressed="false"]:hover { color: #000000; }
.pc-tog svg { display: block; }
.pc-tog-num {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.pc-search {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 0;
}
.pc-search[hidden] { display: none; }
.pc-search-form {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.5rem;
}
.pc-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid #000000;
  background: #ffffff;
  color: #000000;
  border-radius: 0;
}
.pc-search-input:focus { outline: none; background: #fffced; }
.pc-search-go {
  padding: 0.5rem 1.5rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  background: #ffffff;
  color: #000000;
  border: 1px solid #cccccc;
  cursor: pointer;
  border-radius: 0;
}
.pc-search-go:hover { border-color: #000000; }

/* When the controls bar is active, replace zebra rows with hover highlight. */
body.pc-ready .verse:nth-child(odd),
body.pc-ready .book-list li:nth-child(odd),
body.pc-ready .chapter-list li:nth-child(odd) {
  background: transparent;
}
body.pc-ready .verse:hover,
body.pc-ready .book-list li:hover,
body.pc-ready .chapter-list li:hover {
  background: #f4f4f0;
}
/* Targeted-anchor highlight still wins over hover. */
body.pc-ready .verse.is-highlighted,
body.pc-ready .row.is-highlighted {
  background: #fff3a6;
}

/* Share-button toggle. */
body.pc-hide-share .share-action { display: none; }

/* "Hide verse numbers" actually means: collapse verses into one flowing
   paragraph and shrink the numbers into clickable superscripts (per a real
   printed Bible). The superscript itself becomes the share-popover trigger,
   so .share-action is suppressed in this mode. */
body.pc-hide-numbers .verses {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
body.pc-hide-numbers .verse {
  display: inline;
  padding: 0;
  margin: 0;
  background: transparent;
}
body.pc-hide-numbers .verse:hover { background: transparent; }
body.pc-hide-numbers .verse-num {
  display: inline-block;
  min-width: 0;
  margin: 0 0.1em 0 0.05em;
  padding: 0 0.25em;
  vertical-align: super;
  font-size: 0.6em;
  font-weight: 700;
  color: #333333;
  cursor: pointer;
  user-select: none;
  border-radius: 2px;
}
body.pc-hide-numbers .verse-num:hover {
  color: #000000;
  background: #f0f0f0;
}
body.pc-hide-numbers .verse > .share-action { display: none; }
body.pc-hide-numbers .verse.is-highlighted { background: #fff3a6; }

/* ------- Site footer (every page) ------- */
.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #000000;
  text-align: center;
  border-top: 1px solid #eeeeee;
}
.site-footer a {
  color: #000000;
  border-bottom: 1px solid #cccccc;
}
.site-footer a:hover {
  color: #000000;
  border-bottom-color: #000000;
}
.page-landing .site-footer {
  border-top: none;
  padding-top: 0.5rem;
}
