:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1e1e1b;
  --muted: #6b6b64;
  --line: #e4e2dc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.site-header {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.15rem);
}

.subtitle {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.search-wrap {
  min-width: 220px;
  width: min(420px, 100%);
}

#search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  background: var(--surface);
  color: inherit;
}

#search-input:focus {
  outline: 2px solid #c9c6bd;
  outline-offset: 1px;
}

.layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.chapter-nav,
.content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}

.chapter-nav h2 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
}

#chapter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chapter-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  color: inherit;
  font-size: 0.9rem;
}

.chapter-link.active,
.chapter-link:hover {
  background: #eceae3;
}

.results-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.8rem;
}

#verses {
  display: grid;
  gap: 0.75rem;
}

.verse-card {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.verse-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.verse-text {
  margin: 0;
  font-size: 1rem;
}

.verse-meta-row {
  margin-top: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.verse-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.copy-btn {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.24rem 0.55rem;
}

.copy-btn:hover {
  background: #eceae3;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (min-width: 880px) {
  .layout {
    grid-template-columns: 260px 1fr;
    align-items: start;
  }

  .chapter-nav {
    position: sticky;
    top: 1rem;
  }

  #chapter-list {
    display: grid;
  }
}
