
:root {
  --ink: #1f1a14;
  --muted: #5c554c;
  --paper: #f7f3ea;
  --panel: #fffcf7;
  --line: #ddd4c6;
  --accent: #5c3424;
  --accent-soft: #efe3d4;
  --sel-bg: #5c3424;
  --sel-fg: #fffaf3;
  --ok: #2f5d3a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}
.ui, button, input, .meta, nav, footer, .kicker, .crumb, .count,
.listen, .btn, .nav a, th, .chip, label, .search-row {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 1.1rem 1rem 3rem; }
.site-header {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
}
.brand { text-decoration: none; color: inherit; }
.kicker {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.25rem;
}
h1 { font-size: clamp(1.55rem, 3vw, 2rem); font-weight: 600; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
.sub { margin: 0; color: var(--muted); font-size: 1.02rem; }
.nav {
  display: flex; flex-wrap: wrap; gap: 0.55rem 1rem;
  margin-top: 0.85rem; font-size: 0.95rem;
}
.nav a {
  text-decoration: none; color: var(--muted);
  border-bottom: 2px solid transparent; padding-bottom: 0.1rem;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--accent); border-bottom-color: var(--accent);
}
.lede { max-width: 40rem; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  border-radius: 3px;
}
.grid-2 {
  display: grid; gap: 1rem;
}
@media (min-width: 820px) {
  .grid-2 { grid-template-columns: 1.2fr 1fr; }
}
.search-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.search-row input[type="search"], .search-row input[type="text"], #q, #ask-q {
  flex: 1 1 16rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  border-radius: 2px;
}
.btn, button.btn {
  appearance: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fffaf3;
  padding: 0.55rem 0.95rem;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { filter: brightness(1.05); }
.btn.ghost {
  background: transparent;
  color: var(--accent);
}
.listen, a.listen {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.28rem 0.55rem;
  border-radius: 2px;
  white-space: nowrap;
}
.listen:hover { background: var(--accent-soft); }
.links { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; margin: 0.75rem 0 0; }
.meta { color: var(--muted); font-size: 0.9rem; }
.chip {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--ink);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.8rem;
  margin-right: 0.25rem;
}
footer.site-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}
.layout { display: grid; gap: 1.25rem; }
@media (min-width: 860px) {
  .layout { grid-template-columns: 15.5rem 1fr; align-items: start; }
}
.book-list, .chap-list, .series-list { display: flex; flex-wrap: wrap; gap: 0.3rem; }
@media (min-width: 860px) {
  .book-list, .series-list { flex-direction: column; flex-wrap: nowrap; max-height: 70vh; overflow: auto; }
}
button.pick {
  appearance: none; border: 1px solid transparent; background: transparent;
  color: var(--ink); text-align: left; cursor: pointer;
  padding: 0.28rem 0.5rem; border-radius: 2px; font-size: 0.92rem;
}
button.pick:hover, button.pick:focus-visible {
  background: var(--accent-soft); outline: none;
}
button.pick[aria-pressed="true"] {
  background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg);
}
button.pick .count { opacity: 0.72; font-size: 0.8rem; margin-left: 0.35rem; }
.crumb { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.7rem; }
table.sermons { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
table.sermons th {
  text-align: left; font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--line); padding: 0.35rem 0.5rem 0.4rem 0;
}
table.sermons td {
  padding: 0.55rem 0.6rem 0.55rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.sermons td.title-cell a { color: inherit; text-decoration: none; }
table.sermons td.title-cell a:hover { color: var(--accent); text-decoration: underline; }
.note {
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.55rem 0.75rem;
  margin: 0 0 1rem;
}
.quote-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  margin: 0 0 0.85rem;
  border-radius: 3px;
}
.quote-card blockquote {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
  quotes: "\201C" "\201D";
}
.quote-card .cite { font-size: 0.92rem; color: var(--muted); }
.quote-card .cite strong { color: var(--ink); font-weight: 600; }
.quote-card .row {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
  align-items: center; justify-content: space-between;
}
.status { color: var(--muted); font-size: 0.92rem; }
.error { color: #8a2b2b; }
.sermon-card h2 { margin: 0 0 0.35rem; font-size: 1.45rem; }
.sermon-card .facts { margin: 0.75rem 0; }
.sermon-card .facts dt {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin-top: 0.55rem;
}
.sermon-card .facts dd { margin: 0.1rem 0 0; }
.empty { color: var(--muted); font-style: italic; }
@media (max-width: 640px) {
  table.sermons thead { display: none; }
  table.sermons tr { display: block; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
  table.sermons td { display: block; border: 0; padding: 0.15rem 0; }
  table.sermons td.meta::before {
    content: attr(data-label) ": ";
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }
}
