* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
  color: #111;
  background: #fafafa;
}

header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

header h1 {
  margin: 0;
  font-size: 1.25rem;
}

header a {
  color: inherit;
  text-decoration: none;
}

#search-form {
  display: flex;
  gap: 0.5rem;
  flex: 1 1 20rem;
  max-width: 36rem;
}

#search-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font: inherit;
}

main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem;
}

body.home-page main {
  max-width: 72rem;
}

.panel {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.meta {
  color: #555;
  font-size: 0.95rem;
}

.meta p {
  margin: 0.25rem 0;
}

.section-path-label {
  margin-right: 0.35rem;
}

.breadcrumb-sep {
  margin: 0 0.35rem;
  color: #999;
}

.copyright-notice {
  font-size: 0.85rem;
  color: #666;
}

.copyright-label {
  margin-right: 0.35rem;
}

.nav-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.nav-row a {
  color: #036;
}

.result-list,
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.result-list li,
.link-list li {
  border-bottom: 1px solid #eee;
  padding: 0.75rem 0;
}

.result-list li:last-child,
.link-list li:last-child {
  border-bottom: none;
}

.result-list a,
.link-list a {
  color: #036;
  text-decoration: none;
}

.result-list a:hover,
.link-list a:hover {
  text-decoration: underline;
}

.lyric-block {
  margin: 1.25rem 0;
}

.lyric-block h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
}

.lyric-block pre {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
}

.tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
  background: #eee;
  border-radius: 3px;
  vertical-align: middle;
}

.muted {
  color: #666;
}

.error {
  color: #900;
}

.list-summary {
  margin: 0 0 1rem;
}

.song-table-wrap {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.song-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.song-table thead {
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

.song-table th {
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
}

.song-table td {
  padding: 0.65rem 0.75rem;
  vertical-align: top;
  border-bottom: 1px solid #eee;
}

.song-row {
  cursor: pointer;
}

.song-row:hover {
  background: #f8fbff;
}

.song-row:focus {
  outline: 2px solid #036;
  outline-offset: -2px;
}

.song-row.is-hidden {
  display: none;
}

.col-number {
  width: 3.5rem;
  font-weight: bold;
  color: #036;
  white-space: nowrap;
}

.col-title {
  width: 28%;
  font-weight: bold;
  line-height: 1.3;
}

.col-preview {
  width: 28%;
  color: #555;
  white-space: pre-line;
  line-height: 1.4;
  font-size: 0.9rem;
}

.no-results {
  text-align: center;
  color: #666;
  padding: 2rem 1rem;
}

body.song-page main {
  max-width: 36rem;
}

.song-sheet {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1.5rem 1.75rem 2rem;
}

.song-section-heading {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #444;
  line-height: 1.4;
}

.song-section-heading .breadcrumb-sep {
  margin: 0 0.3rem;
  letter-spacing: normal;
  text-transform: none;
}

.song-entry + .song-entry {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.song-entry {
  --song-number-col: 2.5rem;
  --song-text-gap: 0.75rem;
  --verse-num-gap: 0.5rem;
}

.song-heading {
  display: flex;
  gap: var(--song-text-gap);
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.song-number {
  flex: 0 0 2.5rem;
  font-size: 1.35rem;
  font-weight: bold;
  line-height: 1.2;
  color: #111;
}

.song-heading-text {
  flex: 1;
  min-width: 0;
}

.song-opening {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.song-tune-link {
  color: #036;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.song-tune-link:hover {
  color: #024;
}

.song-scripture {
  margin: 0.2rem 0 0;
  font-style: italic;
  font-size: 0.92rem;
  color: #444;
}

.song-alt-tunes {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  color: #444;
}

.song-lyrics {
  display: grid;
  grid-template-columns: var(--song-number-col) 1fr;
  column-gap: var(--song-text-gap);
  font-size: 0.98rem;
  line-height: 1.45;
}

.lyric-verse {
  margin: 0.75rem 0;
}

.lyric-verse:first-child {
  margin-top: 0;
}

.lyric-verse-numbered {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--song-number-col) 1fr;
  column-gap: var(--song-text-gap);
  margin: 0.75rem 0;
}

.lyric-verse-numbered:first-child {
  margin-top: 0;
}

.verse-num {
  text-align: right;
  padding-right: var(--verse-num-gap);
  font-size: 1.12rem;
  font-weight: bold;
  line-height: 1.45;
  color: #333;
  align-self: start;
}

.verse-lines {
  min-width: 0;
}

.lyric-line-first {
  font-variant: small-caps;
}

.lyric-chorus {
  grid-column: 2;
  margin: 0.5rem 0 0.75rem;
  font-style: italic;
}

.song-authors {
  margin: 1rem 0 0.35rem;
  text-align: right;
  font-style: italic;
  font-size: 0.92rem;
  color: #333;
}

.song-copyright {
  margin: 0.15rem 0 0 calc(var(--song-number-col) + var(--song-text-gap));
  font-size: 0.68rem;
  line-height: 1.35;
  color: #666;
}