/* Homepage refresh, November 2026.
   1. A shorter intro on phones, so the first story starts higher.
   2. (Removed: section buttons under the greeting; the "Three ways in" cards cover this.)
   3. A "Most read" list after the featured story (switched off in server.js for now).
   4. Cards show a one-line teaser and the reading time. */

/* ===== Most read ===== */
.home-popular-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}
.home-popular-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #f5f0e81a;
  color: var(--cream);
  text-decoration: none;
}
.home-popular-list li:last-child .home-popular-item { border-bottom: 0; }
.home-popular-rank {
  min-width: 1.3ch;
  font: 700 2rem/1 "Cormorant Garamond", Georgia, serif;
  color: var(--gold);
  opacity: 0.9;
}
.home-popular-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.home-popular-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.home-popular-title {
  font: 600 1.1rem/1.3 "Cormorant Garamond", Georgia, serif;
  color: var(--cream);
  transition: color 0.2s;
}
.home-popular-item:hover .home-popular-title,
.home-popular-item:focus-visible .home-popular-title { color: var(--gold); }
.home-popular-meta {
  font-size: 0.68rem;
  color: #f5f0e873;
}

/* ===== Card teasers and reading time ===== */
.home-feed-item-teaser {
  margin: 0.1rem 0 0.15rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #b9ccbd;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-feed-item-title {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

/* ===== Desktop: Most read in two columns ===== */
@media (min-width: 900px) {
  .home-popular-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }
  .home-popular-list li:nth-last-child(2):nth-child(odd) .home-popular-item { border-bottom: 0; }
}

/* ===== Phones: a shorter intro so the first story starts higher ===== */
@media (max-width: 640px) {
  .home-hero {
    padding: 0.2rem 1.1rem 0.3rem;
  }
  .home-hero-label {
    margin-bottom: 0.45rem;
    font-size: 0.6rem;
  }
  .home-hero-title {
    font-size: clamp(1.75rem, 7.6vw, 2.2rem);
    margin-bottom: 0.4rem;
    padding-bottom: 10px;
  }
  .home-hero-sub {
    display: none;
  }
  .home-welcome-card {
    margin-top: 0.35rem;
  }
  #home-welcome {
    min-height: 84px;
  }
  #home-welcome .pi-welcome-heading {
    font-size: clamp(1.35rem, 5.6vw, 1.7rem);
  }
  #home-welcome .pi-welcome-sub {
    font-size: 0.92rem;
  }
  .home-feed-item-teaser {
    font-size: 0.74rem;
  }
}
