@font-face { font-family: "Crimson"; src: url("fonts/CrimsonText-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Crimson"; src: url("fonts/CrimsonText-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Crimson"; src: url("fonts/CrimsonText-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Crimson"; src: url("fonts/CrimsonText-SemiBoldItalic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }

:root {
  --indigo: #23264f;
  --indigo-deep: #1b1d3f;
  --gold: #a8834a;
  --gold-text: #7f6130;
  --gold-light: #c9a46a;
  --paper: #fcfbf8;
  --ink: #26262b;
  --soft: #5f5e6b;
  --rule: #e4dccd;
  --mark: #f3e3bf;
  --link: var(--indigo);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15172c;
    --ink: #e8e3d7;
    --soft: #a9a6b8;
    --rule: #2f3256;
    --gold-text: #d2b27b;
    --mark: #5a4722;
    --link: #d8cfee;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Crimson", Georgia, "Times New Roman", serif;
  font-size: 1.25rem; line-height: 1.65;
  font-kerning: normal; font-variant-ligatures: common-ligatures;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
a { color: var(--link); text-decoration-color: color-mix(in srgb, var(--gold) 70%, transparent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--indigo); color: #fff; padding: .5rem 1rem; z-index: 9; }
.skip:focus { left: 1rem; top: 1rem; }

/* header */
.site-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem;
  padding: .85rem clamp(1rem, 4vw, 2.5rem); background: var(--indigo); color: #f4ecdc;
  border-bottom: 1px solid rgba(201,164,106,.35);
}
.wordmark { font-size: 1.35rem; color: #f4ecdc; text-decoration: none; letter-spacing: .01em; line-height: 1.2; }
.wordmark span { font-style: italic; color: var(--gold-light); font-size: 1rem; margin-left: .35rem; }
.site-head nav { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; font-size: 1.02rem; }
.nav-link {
  color: #d9d4ea; text-decoration: none; padding: .3rem .75rem; border-radius: 999px; line-height: 1.3;
  transition: background-color .15s, color .15s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-btn {
  margin-left: .4rem; padding: .32rem 1rem; border-radius: 999px; line-height: 1.3; text-decoration: none;
  background: var(--gold-light); color: var(--indigo-deep); font-weight: 600;
  transition: background-color .15s;
}
.nav-btn:hover { background: #d9b881; }
.home .site-head { border-bottom-color: transparent; }
.home .wordmark { visibility: hidden; }

/* hero */
.hero {
  position: relative; overflow: hidden; background: var(--indigo); color: #f4ecdc;
  text-align: center; padding: clamp(3rem, 9vw, 6rem) 1.25rem clamp(9rem, 22vw, 13rem);
}
.hero-text { position: relative; z-index: 1; }
.hero h1 { font-weight: 400; font-size: clamp(3rem, 10vw, 5.6rem); line-height: 1; margin: 0; letter-spacing: .005em; }
.hero .via { font-style: italic; color: var(--gold-light); font-size: clamp(1.3rem, 3vw, 1.7rem); margin: .8rem 0 .1rem; }
.hero .tag { color: #cfc8de; margin: .2rem 0 2.2rem; font-size: 1.15rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.btn {
  display: inline-block; padding: .55rem 1.2rem .6rem; border: 1px solid color-mix(in srgb, var(--gold-light) 60%, transparent);
  border-radius: 999px; color: #f4ecdc; text-decoration: none; font-size: 1.1rem; line-height: 1.3;
}
.btn:hover { border-color: var(--gold-light); background: rgba(201,164,106,.12); }
.btn.primary { background: var(--gold-light); border-color: var(--gold-light); color: var(--indigo-deep); font-weight: 600; }
.btn.primary:hover { background: #d6b47c; }
.ripples {
  position: absolute; left: 50%; bottom: 0; width: min(1100px, 170vw); transform: translateX(-50%);
  fill: none; stroke: var(--gold-light); stroke-width: 1;
}
.ripples ellipse { opacity: calc(.75 - var(--i) * .065); vector-effect: non-scaling-stroke; }
.ripples circle { fill: var(--gold-light); stroke: none; }
@media (prefers-reduced-motion: no-preference) {
  .ripples ellipse { transform-origin: 300px 150px; animation: ripple 2.8s cubic-bezier(.2,.6,.3,1) both; animation-delay: calc(var(--i) * .16s); }
  @keyframes ripple { from { transform: scale(.2); opacity: 0; } }
}

/* reading column */
.reading, .listing { max-width: 36rem; margin: 0 auto; padding: 3rem 1.25rem 2rem; }
.listing { max-width: 44rem; }
.reading h1, .reading h2, .listing h1 {
  font-weight: 400; color: var(--indigo); text-align: center; margin: 0 0 1.8rem; line-height: 1.2;
}
@media (prefers-color-scheme: dark) { .reading h1, .reading h2, .listing h1 { color: #e8e3d7; } }
.reading h1 { font-size: 2.1rem; }
.sitting h1 { font-size: clamp(1.7rem, 5vw, 2.1rem); text-wrap: balance; }
.reading h1.sitting-title { font-size: 1.9rem; line-height: 1.25; text-wrap: balance; }
.sitting-title .topic { color: var(--gold-text); }
.reading h2, .listing h1 { font-size: 1.8rem; }
.reading h1::after, .reading h2::after, .listing h1::after {
  content: ""; display: block; width: 3.2rem; height: 1px; margin: .9rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
}
.text p { margin: 0; hyphens: auto; -webkit-hyphens: auto; }
.text p + p { text-indent: 1.4em; }
.verse { margin: .9rem 0 .9rem 1.2rem; font-style: italic; }
.verse p { margin: 0 0 .8rem; text-indent: 0 !important; }
.verse .l { display: block; padding-left: 1.2em; text-indent: -1.2em; }
.text > .verse + p { text-indent: 0; }
.centred { text-align: center; font-style: italic; color: var(--soft); margin: 1.4rem 0; line-height: 1.5; }
.centred span { display: block; }
.centred .name { font-style: normal; font-weight: 600; font-size: .82em; letter-spacing: .16em; color: var(--gold-text); margin-top: .2rem; }
.text > .centred + p { text-indent: 0; }

.home-intro { padding-top: 3.5rem; }
.home-intro .text p + p { text-indent: 0; margin-top: 1rem; }
.home-intro strong { font-weight: 600; }
.prayer { text-align: center; font-style: italic; border-top: 1px solid var(--rule); }
.prayer p { margin: 0 0 .9rem; }
.prayer .amen { font-style: normal; font-weight: 600; color: var(--gold-text); letter-spacing: .08em; margin-top: 1.3rem; }
.contents { border-top: 1px solid var(--rule); padding-bottom: 4rem; }
.contents-list { list-style: none; padding: 0; margin: 0; columns: 2 12rem; column-gap: 2.5rem; }
.contents-list li { break-inside: avoid; padding: .15rem 0; }
.contents-list a { text-decoration: none; }
.contents-list a:hover { text-decoration: underline; }
.dedication { text-align: center; font-style: italic; color: var(--soft); margin-top: 3rem; font-size: 1.1rem; }

/* pager */
.pager {
  max-width: 36rem; margin: 0 auto 3rem; padding: 1.2rem 1.25rem 0; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: 1rem;
}
.pager a { text-decoration: none; font-size: 1.1rem; line-height: 1.3; max-width: 48%; }
.pager a small { display: block; font-size: .9rem; font-style: italic; color: var(--soft); }
.pager a[rel="prev"] small { padding-left: .75em; }
.pager a[rel="next"] { text-align: right; }
.pager a[rel="next"] small { padding-right: .75em; }
.pager a[rel="prev"]::before { content: "\2039\00a0"; color: var(--gold); }
.pager a[rel="next"] { margin-left: auto; }
.pager a[rel="next"]::after { content: "\00a0\203A"; color: var(--gold); }
.pager a:hover { text-decoration: underline; }

/* sitting list */
.lede { text-align: center; color: var(--soft); margin: -0.6rem 0 1.4rem; }
.jump { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem .9rem; font-size: 1rem; margin-bottom: 2.5rem; }
.group { margin-bottom: 2.5rem; scroll-margin-top: 1rem; }
.group h2 { font-weight: 400; font-size: 1.35rem; color: var(--gold-text); border-bottom: 1px solid var(--rule); padding-bottom: .3rem; margin: 0 0 .4rem; }
.sitting-list, .results { list-style: none; margin: 0; padding: 0; }
.sitting-list a, .results a {
  display: grid; grid-template-columns: 3.2rem 1fr; gap: .8rem; align-items: baseline;
  padding: .45rem 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent);
  line-height: 1.4;
}
.results a:hover .snip { color: var(--link); }
.sitting-list a { display: block; padding: .55rem .2rem; }
.sitting-list .n { color: var(--gold-text); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.sitting-list .dash { color: var(--gold); }
.sitting-list .label { color: var(--ink); }
.sitting-list a:hover .label { color: var(--link); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .18em; }
.note { text-align: center; color: var(--soft); font-size: 1rem; font-style: italic; margin: -0.6rem auto 1.6rem; max-width: 30rem; }

/* search */
.search-form label { display: block; text-align: center; color: var(--soft); font-size: 1.05rem; margin-bottom: .5rem; }
.search-form input {
  width: 100%; font: inherit; font-size: 1.3rem; padding: .6rem 1rem; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink);
}
.search-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
#status { margin: 1.2rem 0; }
.results a { grid-template-columns: 1fr; gap: .1rem; padding: .8rem 0; }
.results .n { color: var(--gold-text); font-weight: 600; }
.results .snip { color: var(--soft); font-size: 1.05rem; }
.results mark { background: var(--mark); color: inherit; padding: 0 .1em; border-radius: 2px; }
.results .more { color: var(--soft); text-align: center; padding: 1rem 0; }

.notfound { text-align: center; }

/* footer */
.site-foot {
  text-align: center; color: var(--soft); font-size: 1rem; line-height: 1.5;
  padding: 2rem 1.25rem 2.5rem; border-top: 1px solid var(--rule);
}
.site-foot p { margin: .2rem 0; }

@media (max-width: 560px) {
  body { font-size: 1.18rem; }
  .site-head { flex-direction: column; align-items: center; text-align: center; }
  .home .wordmark { display: none; }
  .site-head nav { justify-content: center; }
  .nav-link { padding: .3rem .55rem; }
  .nav-btn { margin-left: 0; }
  .reading, .listing { padding-top: 2.2rem; }
  .verse { margin-left: 0; }
}
@media print {
  .site-head, .site-foot, .pager, .hero .actions { display: none; }
  body { font-size: 12pt; }
}
