:root {
  --brand: #391800;
  --on-brand: #fff;
  --bg: #fffbf9;
  --fg: #1f1b18;
  --muted: #6b5d56;
  --line: #e6ddd7;
  --card: #f5f0ed;
  --link: #7a3a10;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181210;
    --fg: #ece0db;
    --muted: #b8a89f;
    --line: #3a3330;
    --card: #251e1b;
    --link: #e3c9b5;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); }
header.top { background: var(--brand); padding: 12px 16px; display: flex; align-items: center; gap: 20px; }
header.top a { color: var(--on-brand); text-decoration: none; }
header.top nav { display: flex; gap: 18px; font-size: .95rem; }
header.top nav a { opacity: .9; }
header.top nav a:hover { opacity: 1; text-decoration: underline; }
header.top .brand { font-weight: 700; font-size: 1.15rem; margin-right: auto; display: flex; align-items: center; gap: 10px; }
header.top .brand img { display: block; }
main, footer { max-width: 860px; margin: 0 auto; padding: 0 16px; }
main { padding-top: 8px; padding-bottom: 32px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding-bottom: 32px; }
h1 { font-size: 1.8rem; line-height: 1.2; margin: 24px 0 8px; }
h2 { font-size: 1.25rem; margin-top: 32px; }
code { font-size: .92em; overflow-wrap: anywhere; }
.crumbs { margin-top: 16px; font-size: .95rem; color: var(--muted); }
.intro p { color: var(--muted); max-width: 40em; }
.button {
  display: inline-block; background: var(--brand); color: var(--on-brand);
  padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 600;
  border: 1px solid var(--brand);
}
.button.secondary { background: transparent; color: var(--link); border-color: var(--line); }
.apps {
  list-style: none; padding: 0; margin: 24px 0;
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.apps a {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  background: var(--card); border-radius: 16px; text-decoration: none; color: var(--fg);
}
.apps img { border-radius: 50%; flex: none; }
.apps span { display: flex; flex-direction: column; }
.apps small { color: var(--muted); }
.note { background: var(--card); border-radius: 16px; padding: 4px 20px; margin-top: 32px; }
.app-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.app-head img, .sermon > img { border-radius: 50%; }
.app-head h1 { margin-top: 8px; }
.app-head p { margin: 4px 0 12px; color: var(--muted); }
.filter { position: sticky; top: 0; background: var(--bg); padding: 12px 0; z-index: 1; }
.filter input {
  width: 100%; font: inherit; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--fg);
}
.topics { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; scrollbar-width: thin; }
.topics button {
  flex: none; font: inherit; font-size: .9rem; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer;
}
.topics button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.sermons { list-style: none; padding: 0; margin: 0; }
.sermons li { display: flex; gap: 12px; border-bottom: 1px solid var(--line); }
.sermons a { flex: 1; padding: 12px 0; text-decoration: none; color: var(--fg); }
.sermons .dur { color: var(--muted); padding: 12px 0; font-variant-numeric: tabular-nums; }
.sermon { text-align: center; padding-top: 16px; }
.sermon .by { color: var(--muted); margin-top: 0; }
.sermon audio { width: 100%; margin: 16px 0; }
.sermon .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.prevnext { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; text-align: left; }
.prevnext a:last-child { text-align: right; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lead { color: var(--muted); }
.cloud { line-height: 2.1; text-align: center; }
.cloud a { text-decoration: none; margin: 0 .35em; white-space: nowrap; }
.cloud a:hover { text-decoration: underline; }
.cloud .t1 { font-size: .85rem; color: var(--muted); }
.cloud .t2 { font-size: 1rem; }
.cloud .t3 { font-size: 1.25rem; }
.cloud .t4 { font-size: 1.6rem; font-weight: 600; }
.cloud .t5 { font-size: 2.1rem; font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tags a {
  font-size: .9rem; padding: 3px 12px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); color: var(--fg);
}
h2.preacher { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
h2.preacher img { border-radius: 50%; }
h2.preacher a { color: var(--fg); text-decoration: none; }
h2.preacher small { color: var(--muted); font-weight: 400; font-size: .9rem; }

/* Homepage */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; padding: 28px 0 8px; }
.hero h1 { font-family: Georgia, "DejaVu Serif", serif; font-size: 2.7rem; line-height: 1.1; margin: 8px 0 14px; color: var(--link); }
@media (prefers-color-scheme: light) { .hero h1 { color: var(--brand); } }
.eyebrow { margin: 0; color: var(--muted); font-style: italic; }
.lead { font-size: 1.1rem; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; justify-items: center; }
.mosaic img { width: 88px; height: 88px; border-radius: 50%; display: block; box-shadow: 0 2px 8px rgba(57, 24, 0, .18); transition: transform .15s; }
.mosaic a:hover img { transform: scale(1.06); }
.promises { list-style: none; padding: 0; margin: 32px 0 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.promises li {
  background: var(--card); border-radius: 18px; padding: 20px 18px 18px; display: flex; flex-direction: column; gap: 6px;
  border-top: 3px solid var(--brand); box-shadow: 0 1px 2px rgba(57, 24, 0, .06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.promises li:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(57, 24, 0, .12); }
.promises .badge {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px;
  background: var(--brand); color: #FAF5EA;
}
.promises strong { font-family: Georgia, "DejaVu Serif", serif; font-size: 1.25rem; color: var(--link); }
@media (prefers-color-scheme: light) { .promises strong { color: var(--brand); } }
.promises li > span:last-child { color: var(--muted); font-size: .95rem; line-height: 1.45; }
@media (prefers-color-scheme: dark) { .promises li { border-top-color: var(--link); } .promises .badge { background: var(--link); color: #181210; } }
.band { background: var(--brand); color: #FAF5EA; border-radius: 20px; padding: 8px 28px 20px; margin-top: 36px; }
.band h2 { color: #FAF5EA; }
.band p { color: #EBE0D6; max-width: 40em; }
.button.light { background: #FAF5EA; color: #391800; border-color: #FAF5EA; }
.small, footer .disclaimer { font-size: .88rem; color: var(--muted); }
footer .disclaimer { font-style: italic; }
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero h1 { font-size: 2.1rem; }
  .mosaic { grid-template-columns: repeat(6, 1fr); gap: 6px; order: -1; }
  .mosaic a:nth-child(n+7) { display: none; }
  .mosaic img { width: 100%; height: auto; }
  .promises { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .promises li { padding: 16px 14px 14px; }
  header.top { gap: 10px; padding: 10px 12px; }
  header.top .brand { font-size: 1rem; white-space: nowrap; gap: 8px; }
  header.top .brand img { width: 26px; height: 26px; }
  header.top nav { gap: 10px; font-size: .85rem; }
}
