/* All articles and topic pages: Trending + ads | cards two per row | categories */
body.wp-page-topic { background: #f4f7f5; }
.wp-topic-grid { max-width: 1280px; margin: 0 auto; padding: 20px 16px 90px; display: grid; grid-template-columns: 240px minmax(0, 1fr) 240px; gap: 18px; }
.wp-topic-side { min-width: 0; }
.wp-topic-center h1 { font-size: 22px; font-weight: 700; color: #1a1a2e; margin: 0 0 14px; }
#wp-topic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#wp-topic-list .wyp-art-card { max-width: none; width: 100%; margin: 0; }
/* An odd last card, once everything has loaded, sits in the middle */
#wp-topic-list.is-done .wyp-art-card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 8px); }
#wp-topic-status { text-align: center; color: #6b7280; font-size: 14px; padding: 16px 0; }

.wp-topic-card { background: #fff; border: 1px solid #e2ece6; border-radius: 12px; box-shadow: 0 2px 12px rgba(5, 102, 54, 0.06); overflow: hidden; margin-bottom: 14px; }
.wp-topic-card-title { padding: 11px 14px; font-size: 13px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; text-align: center; color: #fff; background: linear-gradient(135deg, #056636 0%, #0a8a4a 55%, #1e9b57 100%); }
.wp-topic-ad { background: #fff; border: 1px solid #e2ece6; border-radius: 12px; padding: 8px; margin-bottom: 14px; overflow: hidden; text-align: center; }
/* The last ad stays beside the cards once Trending has scrolled past (below header + topic bar) */
.wp-topic-ad-stick { position: sticky; top: 126px; }

.wp-topic-right { position: sticky; top: 126px; align-self: start; }
.wp-topic-cats { list-style: none; margin: 0; padding: 8px 0 4px; }
.wp-topic-cats a { display: flex; gap: 10px; padding: 11px 16px; color: #244034; font-size: 14.5px; font-weight: 600; text-decoration: none; border-left: 3px solid transparent; }
.wp-topic-cats a:hover, .wp-topic-cats a.is-active { color: #056636; background: #eef8f2; border-left-color: #056636; text-decoration: none; }
.wp-topic-legal { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 10px 14px 14px; border-top: 1px solid #eef3f0; }
.wp-topic-legal a { font-size: 11.5px; font-weight: 600; color: #7a8f84; }

@media (max-width: 1100px) {
  .wp-topic-grid { grid-template-columns: minmax(0, 1fr); max-width: 760px; padding-left: 10px; padding-right: 10px; }
  .wp-topic-side { display: none; }
}
@media (max-width: 640px) {
  #wp-topic-list { grid-template-columns: minmax(0, 1fr); }
  #wp-topic-list.is-done .wyp-art-card:last-child:nth-child(odd) { width: 100%; }
}
