:root {
  --bg: #f8f5ef;
  --ink: #2b2218;
  --muted: #6b5e4e;
  --accent: #8b5a2b;
  --accent-dark: #6b4420;
  --card: #ffffff;
  --line: #e7dfd1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
}

header.site {
  background: var(--ink);
  color: #f3ead8;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

header.site .brand {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

header.site .brand a {
  color: #f3ead8;
  text-decoration: none;
}

header.site .tag {
  font-style: italic;
  font-size: 0.9rem;
  color: #d9c9a3;
  margin-left: 0.5rem;
}

nav.primary a {
  color: #f3ead8;
  margin-left: 1.5rem;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
}

nav.primary a:hover { color: #ffd27a; }

.hero {
  background: linear-gradient(135deg, #8b5a2b 0%, #5b3a1a 100%);
  color: #fdf7e8;
  padding: 5rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.hero .verse {
  font-style: italic;
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto;
  opacity: 0.95;
}

.hero .cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

h2 {
  font-size: 2rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
  margin-top: 2.5rem;
}

h3 { font-size: 1.35rem; margin-top: 1.8rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem;
  transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(43, 34, 24, 0.1);
}

.card h3 { margin-top: 0; color: var(--accent-dark); }
.card a { color: var(--accent); text-decoration: none; font-weight: 600; }
.card a:hover { text-decoration: underline; }

/* Music player */
.player {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.player .now-playing {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 0.5rem;
}

.player audio {
  width: 100%;
  margin-top: 0.5rem;
}

.songlist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.songlist li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: var(--card);
  cursor: pointer;
  transition: background .15s;
}

.songlist li:hover { background: #fbf6ea; }
.songlist li.active {
  background: #f3e5cb;
  border-color: var(--accent);
}

.songlist .title { font-weight: 600; }
.songlist .meta { color: var(--muted); font-size: 0.9rem; font-family: -apple-system, sans-serif; }
.songlist .play-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 0.9rem;
}

.study-block {
  background: var(--card);
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
  border-radius: 0 8px 8px 0;
}

.study-block h3 { margin-top: 0; }
.study-block .week {
  font-family: -apple-system, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nlm-embed {
  background: #faf4e6;
  border: 1px dashed var(--accent);
  padding: 1rem;
  border-radius: 8px;
  font-family: -apple-system, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 1rem 0;
}

footer {
  background: var(--ink);
  color: #d9c9a3;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  font-family: -apple-system, sans-serif;
  font-size: 0.9rem;
}

footer a { color: #ffd27a; }

@media (max-width: 600px) {
  .hero h1 { font-size: 2.1rem; }
  header.site { flex-direction: column; gap: 0.75rem; }
  nav.primary a { margin: 0 0.6rem; }
}
