:root {
  color-scheme: light;
  color: #202d25;
  background: #f6f1e6;
  font-family: "Noto Serif CJK SC", "Songti SC", SimSun, Georgia, serif;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #245143; text-underline-offset: 0.2em; }
a:focus-visible, input:focus-visible { outline: 2px solid #9f5038; outline-offset: 4px; }
[hidden] { display: none !important; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem max(1.25rem, calc((100% - 64rem) / 2));
  background: #172a24;
  border-bottom: 3px solid #ad8851;
}

.site-header a { color: #f7ead0; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.65rem 1rem; }
.site-header nav a { padding-block: 0.25rem; }
.brand { font-size: 1.2rem; font-weight: 700; text-decoration: none; }
html[lang="zh-Hant"] { font-family: "Noto Serif CJK TC", "Songti TC", PMingLiU, serif; }
@media (max-width: 30rem) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 0.5rem; }
}
main { max-width: 64rem; margin: auto; padding: clamp(1rem, 4vw, 2.5rem); }
h1, h2 { line-height: 1.35; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); margin: 0.6em 0 0.4em; }
h2 { font-size: clamp(1.25rem, 4vw, 1.7rem); }
.search { max-width: 34rem; margin: 1.6rem 0 0.75rem; }
.search label { display: block; margin: 0 0 0.4rem; font-weight: 700; }
.search input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.8rem;
  background: #fffdf6;
  color: inherit;
  border: 1px solid #968971;
  border-radius: 4px;
  font: inherit;
  font-size: 1rem;
}

.works { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 0 1.5rem; }
.works li { display: flex; align-items: baseline; justify-content: space-between; gap: 0.65rem; border-bottom: 1px solid #d8cdb7; }
.works a, .sections a { display: block; padding: 0.75rem 0; overflow-wrap: anywhere; }
.works span { white-space: nowrap; }
.works span, .source, .edition, #canon-results { color: #5a5242; font-size: 0.9rem; }
article { max-width: 48rem; margin: auto; }
.scripture { white-space: pre-wrap; overflow-wrap: anywhere; font-size: clamp(1.05rem, 3.8vw, 1.3rem); line-height: 2; }
.part-navigation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; gap: 0.4rem; padding: 0.85rem 0; border-block: 1px solid #d8cdb7; }
.source { margin: 2rem 0 0; padding-top: 0.75rem; line-height: 1.6; }
.translation-note, .original-text { padding: 0.75rem 1rem; background: #ebe5d6; border-radius: 0.4rem; line-height: 1.6; }
.original-text { margin-top: 1.25rem; }
.original-text summary, #translation-retry { cursor: pointer; }
#translation-status { color: #4a5f53; }
