/* ==========================================================
   SOWAYA | news.css
   News feed (list), article page and the shared
   .prose rich-text styles. Load after base.css.
   One reading column, no cards. Flat colour only.
   ========================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Single reading column shared by the feed and the article. */
.col {
  width: min(100% - (var(--gutter) * 2), 46rem);
  margin-inline: auto;
}
.kicker {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}
.meta {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- News page header ---------- */
.feedpage {
  padding-block: clamp(2.5rem, 6vw, 5rem) var(--section);
}
.feedhead {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.feedhead h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1;
  color: var(--green-ink);
}

/* ---------- Feed rows (news page and under an article) ---------- */
.feed {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
}
.feed--first {
  margin-top: 0;
  border-top: 0;
}
.feed--after {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.row {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--line);
}
.row__text {
  flex: 1 1 0;
  min-width: 0;
}
.row__meta {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.row__title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.25;
  color: var(--green-ink);
}
.row__title a {
  color: inherit;
  text-decoration: none;
}
.row__title a:hover {
  color: var(--green);
}
.row__summary {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row__img {
  flex: 0 0 auto;
  width: clamp(6.5rem, 22vw, 11rem);
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--sand);
}
.row__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Pager and empty state ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.pager__link {
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-weight: 600;
  color: var(--green-ink);
  text-decoration: none;
  transition:
    border-color 0.2s,
    background-color 0.2s,
    color 0.2s;
}
a.pager__link:hover {
  border-color: var(--green);
  background: var(--green);
  color: var(--cream);
}
.pager__link.is-off {
  opacity: 0.4;
}
.pager__now {
  font-size: 0.9rem;
  color: var(--muted);
}
.nempty {
  padding: clamp(1.5rem, 4vw, 3rem) 0;
}
.nempty h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--green-ink);
}
.nempty p:not(.kicker) {
  margin: 0 0 1.75rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------- Article page ---------- */
.post__head {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.post__head .crumbs {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.post__title {
  margin: 0 0 1.1rem;
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  line-height: 1.1;
  color: var(--green-ink);
}
.post__main {
  padding-block: clamp(2.5rem, 5vw, 4rem) 0;
}
.post__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 24rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  object-fit: cover;
  border-radius: var(--radius);
}
.post__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.post .feed--after {
  margin-bottom: var(--section);
}
.post__main {
  padding-bottom: 0;
}

/* ---------- Rich text (Unfold's editor output) ---------- */
.prose {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--charcoal);
  overflow-wrap: anywhere;
}
.prose > * {
  margin: 0 0 1.25rem;
}
.prose > *:last-child {
  margin-bottom: 0;
}
.prose h1,
.prose h2,
.prose h3 {
  margin: 2.2rem 0 0.9rem;
  font-size: clamp(1.45rem, 2.4vw, 1.8rem);
  line-height: 1.2;
  color: var(--green-ink);
}
.prose > h1:first-child,
.prose > h2:first-child {
  margin-top: 0;
}
.prose a {
  color: var(--green);
  text-underline-offset: 3px;
}
.prose a:hover {
  color: var(--green-ink);
}
.prose ul,
.prose ol {
  padding-left: 1.4rem;
}
.prose li {
  margin-bottom: 0.4rem;
}
.prose blockquote {
  margin-inline: 0;
  padding: 0.25rem 0 0.25rem 1.4rem;
  border-left: 3px solid var(--gold);
  font-family: var(--font-head);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--green-ink);
}
.prose pre,
.prose code {
  font-size: 0.92rem;
  background: var(--sand);
  border-radius: 8px;
}
.prose pre {
  padding: 1rem 1.25rem;
  overflow-x: auto;
}
.prose code {
  padding: 0.1rem 0.35rem;
}
.prose figure {
  margin-inline: 0;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}
.prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .post__img {
    max-height: 15rem;
  }
  .pager {
    flex-wrap: wrap;
    justify-content: center;
  }
  .pager__now {
    order: -1;
    flex-basis: 100%;
    text-align: center;
  }
}
