.chapter-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: end;
  gap: 10px;
  min-height: 360px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--surface-strong);
  background-image: linear-gradient(180deg, rgba(15, 27, 24, 0.1) 0%, rgba(15, 27, 24, 0.72) 68%, rgba(15, 27, 24, 0.9) 100%);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  color: #ffffff;
  text-decoration: none;
}

.chapter-card:hover {
  border-color: var(--accent);
}

.chapter-card__label {
  color: #d9fff7;
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.chapter-card strong {
  font-size: 1.1rem;
  line-height: 1.3;
}

.chapter-card__excerpt {
  max-height: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  opacity: 0;
  transform: translateY(0.35rem);
  transition: max-height 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.chapter-card:hover .chapter-card__excerpt,
.chapter-card:focus-visible .chapter-card__excerpt {
  max-height: 11rem;
  opacity: 1;
  transform: translateY(0);
}

.home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  align-items: center;
  max-width: 1120px;
  margin: 28px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.home-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 0.8rem;
  color: var(--line);
}

.search-results {
  position: fixed;
  top: 58px;
  right: 28px;
  z-index: 30;
  width: min(520px, calc(100vw - 32px));
  max-height: 60vh;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.search-results a {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.search-results a:hover {
  background: var(--accent-soft);
}

.search-results small {
  color: var(--muted);
}
