/**
 * Category Feed template (Podcasts, Publications, News, etc.) — full
 * width, dark treatment for now per the approved mockup (easy to flip
 * back to a light background later if that changes; nothing else on
 * the site depends on these tokens). The rest of the site is
 * untouched.
 *
 * .blog-item .title a / .button-style4 already use `color: inherit`
 * in the legacy main.css, and .blog-item .date / .desc already default
 * to light-friendly grays — so setting the base text color here is
 * enough to carry through to the card contents. The newer
 * .blog-item__meta/__byline (added for the sticker-tag card redesign)
 * are NOT part of that legacy light/dark-scheme system and need their
 * own explicit dark-context colors here, same pattern as .author-articles
 * in css/pages/author.css — omitting this was why bylines read as
 * nearly invisible on this dark background.
 */
.category-feed {
  background: var(--color-off-black);
  color: var(--color-white);
}

/* Category tag shown below a single post's featured image
   (template-parts/content-post.php) — same rotated-pill treatment as
   the card component's sticker (css/components/blog-card.css), just
   sitting in the flow instead of overlaid on an image. */
.post-tags {
  margin: var(--space-4) 0;
}

.post-tags__tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-white);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 999px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.post-tags__tag:hover {
  opacity: 0.85;
}

.category-feed .blog-item__meta { color: rgba(255, 255, 255, 0.62); }
.category-feed .blog-item__meta .blog-item__byline { color: rgba(255, 255, 255, 0.9); }
.category-feed .blog-item .desc { color: rgba(255, 255, 255, 0.68); }

.category-feed .container-fluid {
  padding: var(--space-8) var(--space-6) var(--space-16);
}

/* ==== Directory: filter this feed by sub-category (shows, types) ==== */
.category-feed__directory {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-feed__directory a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-fast);
}

.category-feed__directory a:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-white);
}

.category-feed__directory a.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

/* ==== Layout: content + minimal sidebar ==== */
.category-feed__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--space-16);
  align-items: start;
}

/* Switching directory tabs (js/interactions.js's initCategoryFeedDirectory)
   swaps this in place instead of reloading the page — a brief fade while
   the new grid loads makes that swap read as a transition, not a jump. */
.category-feed__main {
  transition: opacity 0.15s ease;
}

.category-feed__main.is-loading {
  opacity: 0.4;
}

.category-feed__layout--full {
  grid-template-columns: 1fr;
}

@media (max-width: 992px) {
  .category-feed__layout {
    grid-template-columns: 1fr;
  }
}

/* ==== Minimal sidebar ==== */
.category-feed__sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.feed-sidebar__module {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-4);
}

.feed-sidebar__dropdown summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-white);
}

.feed-sidebar__dropdown summary::-webkit-details-marker {
  display: none;
}

.feed-sidebar__dropdown summary::after {
  content: "+";
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
}

.feed-sidebar__dropdown[open] summary::after {
  content: "\2212";
}

.feed-sidebar__dropdown ul {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feed-sidebar__dropdown a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
}

.feed-sidebar__dropdown a:hover {
  color: var(--color-accent);
}

.feed-sidebar__dropdown a .count {
  color: rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
}

.feed-sidebar__latest h3 {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 var(--space-4);
}

.feed-sidebar__latest ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.feed-sidebar__latest li {
  display: flex;
  gap: var(--space-3);
}

.feed-sidebar__latest .thumb {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.feed-sidebar__latest .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-sidebar__latest .meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  justify-content: center;
}

.feed-sidebar__latest .meta a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-white);
  text-decoration: none;
  line-height: 1.3;
}

.feed-sidebar__latest .meta a:hover {
  color: var(--color-accent);
}

.feed-sidebar__latest .meta time {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
}

/* Latest / Popular toggle — only rendered when both lists actually have
   posts (see template-parts/category-feed/sidebar.php); otherwise it's a
   plain heading and this is unused. Reuses the site's [data-tabs] pattern
   (js/interactions.js), so only the show/hide + button look live here. */
.feed-sidebar__latest-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.feed-sidebar__latest-tabs button {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.feed-sidebar__latest-tabs button:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--color-white);
}

.feed-sidebar__latest-tabs button.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.feed-sidebar__latest [data-tab-panel] {
  display: none;
}

.feed-sidebar__latest [data-tab-panel].is-active {
  display: flex;
}

/* ==== Search module ==== */
.feed-sidebar__search-form {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: var(--space-2);
}

.feed-sidebar__search-form input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 13px;
  font-family: inherit;
}

.feed-sidebar__search-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.feed-sidebar__search-form input:focus {
  outline: none;
}

.feed-sidebar__search-form button {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--color-accent);
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background var(--transition-fast);
}

.feed-sidebar__search-form button:hover {
  background: var(--color-white);
  color: var(--color-off-black);
}

/* ==== Support Our Work module ==== */
.feed-sidebar__support-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.feed-sidebar__support-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.feed-sidebar__support-link i {
  flex: none;
  width: 16px;
  text-align: center;
  color: var(--color-accent);
  font-size: 14px;
  transition: color var(--transition-fast);
}

.feed-sidebar__support-link:hover {
  border-color: var(--color-accent);
  background: rgba(222, 75, 45, 0.1);
}

.feed-sidebar__support-link:hover i {
  color: var(--color-white);
}

/* ==== Join Us (social + follower counts) module ==== */
.feed-sidebar__joinus-list {
  display: flex;
  flex-direction: column;
}

.feed-sidebar__joinus-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.feed-sidebar__joinus-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.feed-sidebar__joinus-item:hover {
  color: var(--color-accent);
}

.feed-sidebar__joinus-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 12.5px;
  font-weight: 600;
}

.mato-x-logo,
.mato-letterboxd-logo,
.mato-bluesky-logo,
.mato-social-icon-custom {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: none;
  object-fit: contain;
  vertical-align: middle;
}

.feed-sidebar__joinus-label i {
  flex: none;
  width: 16px;
  text-align: center;
  font-size: 13px;
}

.feed-sidebar__joinus-count {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  font-variant-numeric: tabular-nums;
  transition: color var(--transition-fast);
}

.feed-sidebar__joinus-item:hover .feed-sidebar__joinus-count {
  color: inherit;
}

/* ==== Patreon Exclusives sidebar module — same list treatment as
   .feed-sidebar__latest, plus a CTA link to Patreon at the bottom. ==== */
.feed-sidebar__patreon-list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.feed-sidebar__patreon-list li {
  display: flex;
  gap: var(--space-3);
}

.feed-sidebar__patreon-list .thumb {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.feed-sidebar__patreon-list .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-sidebar__patreon-list .meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  justify-content: center;
}

.feed-sidebar__patreon-list .meta a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-white);
  text-decoration: none;
  line-height: 1.3;
}

.feed-sidebar__patreon-list .meta a:hover {
  color: var(--color-accent);
}

.feed-sidebar__patreon-list .meta time {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
}

.feed-sidebar__patreon-cta {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
}

.feed-sidebar__patreon-cta:hover {
  color: var(--color-accent-dark);
}

/* ==== Newsletter module — teal CTA matches the popup/pill's "Rewind"
   brand treatment (--color-retro-1), everything else in the usual
   dark-sidebar palette. Everything about the module itself (spacing,
   heading style, the top-border separator every other sidebar module
   also gets) is untouched — the only addition is a pair of full-height
   green corner brackets sitting just outside the box's own edges, so
   nothing inside has to shift to make room for them. */
.feed-sidebar__module.feed-sidebar__newsletter {
  position: relative;
}

.feed-sidebar__newsletter::before,
.feed-sidebar__newsletter::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  border: 3px solid var(--color-retro-1);
  pointer-events: none;
}

.feed-sidebar__newsletter::before {
  left: -10px;
  border-right: none;
}

.feed-sidebar__newsletter::after {
  right: -10px;
  border-left: none;
}

.feed-sidebar__newsletter-sub {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 var(--space-4);
}

.feed-sidebar__newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.feed-sidebar__newsletter-form input[type="email"] {
  font-family: inherit;
  font-size: 13px;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  width: 100%;
}

.feed-sidebar__newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.feed-sidebar__newsletter-form input:focus {
  outline: none;
  border-color: var(--color-retro-1);
}

.feed-sidebar__newsletter-form button[type="submit"] {
  background: var(--color-retro-1);
  color: var(--color-retro-5);
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-family: inherit;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.feed-sidebar__newsletter-form button[type="submit"]:hover {
  background: #67ab90;
}

.feed-sidebar__newsletter-form .rw-form__status {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.feed-sidebar__newsletter-form .rw-form__status.is-error {
  color: var(--color-retro-4);
}

.feed-sidebar__newsletter-form.is-success input[type="email"],
.feed-sidebar__newsletter-form.is-success button[type="submit"] {
  display: none;
}

.feed-sidebar__newsletter-form.is-success .rw-form__status {
  color: var(--color-retro-1);
  font-size: 13px;
}

/* ==== Single post: auto-spaced body paragraphs ====
   Scoped to .category-feed__main so it only touches a post's own body
   copy (single.php), not the card grid the same class wraps on
   the Category Feed template itself. */
.category-feed__main .post-content p {
  margin: 0 0 20px;
}

.category-feed__main .post-content p:last-child {
  margin-bottom: 0;
}
