.card figure {
  height: 200px;
  overflow: hidden;
}

.card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Featured Post */
.featured-post-wrapper {
  padding: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.featured-post-card {
  flex-direction: column;
}

.featured-post-figure {
  overflow: hidden;
  max-height: 260px;
}

.featured-post-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 768px) {
  .featured-post-card {
    flex-direction: row;
  }

  .featured-post-figure {
    width: 42%;
    min-width: 42%;
    flex-shrink: 0;
    max-height: none;
    height: auto;
  }
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  background-color: #f59e0b;
  color: #1a1a1a;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.featured-post-title {
  font-size: 1.5rem;
}

/* Homepage library teaser */
.home-library-teaser {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  display: block;
}

.home-library-arrow {
  color: #2ec4b6;
}

/* Homepage currently reading card */
.home-cr-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #2ec4b6;
  margin-bottom: 12px;
}

.home-cr-card {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  background: #1a1a1a;
  border-left: 4px solid #2ec4b6;
  border-radius: 10px;
  padding: 28px;
}

.home-cr-cover {
  width: 160px;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  flex-shrink: 0;
  display: block;
}

.home-cr-placeholder {
  width: 160px;
  height: 240px;
  border-radius: 8px;
  flex-shrink: 0;
  background: #2a2a2a;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  text-align: center;
  padding: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  line-height: 1.4;
}

.home-cr-hidden {
  display: none;
}

.home-cr-ph-show {
  display: flex;
}

.home-cr-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.home-cr-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.home-cr-author {
  font-size: 15px;
  color: #2ec4b6;
  margin-bottom: 14px;
}

.home-cr-note {
  font-size: 14px;
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.home-cr-link {
  font-size: 13px;
  color: #2ec4b6;
  text-decoration: none;
  text-align: right;
  margin-top: auto;
}

/* Ensure library shortcode renders above the footer in the flip-back stacking context */
#bs-root {
  position: relative;
  z-index: 1;
}

footer {
  position: relative;
  z-index: 0;
}
