
.feed-cards,
.feed-banner {
  --feed-border: #dcdcd6;
  --feed-surface: #ffffff;
  --feed-muted: #5b5b56;
  --feed-accent: currentColor;
  --feed-radius: 6px;
}

/* ---------- cards (home page) ---------- */

.feed-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.feed-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.125rem 1.25rem 1.25rem;
  border: 1px solid var(--feed-border);
  border-radius: var(--feed-radius);
  background: var(--feed-surface);
}

.feed-card-title {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.35;
}

.feed-card-title a {
  color: inherit;
  text-decoration: none;
}

.feed-card-title a:hover,
.feed-card-title a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.feed-card-snippet {
  margin: 0;
  max-width: 60ch;
  color: var(--feed-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ---------- banner (map app page) ---------- */
#navbar-latest-posts {
  padding-right: 3rem;
}

.feed-banner {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.5rem;
  font-size: 0.9375rem;
  overflow: hidden;
  margin: 0;
}

.feed-banner p, .feed-message {
  margin: 0;
}

.feed-banner-link {
  align-items: baseline;
  gap: 0.6rem;
  min-width: 0;          /* lets the children shrink instead of overflowing */
  color: inherit;
  text-decoration: none;
  transition: opacity 350ms ease;   /* keep in sync with fadeDuration in the JS */
}

.feed-banner.is-swapping .feed-banner-link {
  opacity: 0;
}

.feed-banner-title {
  flex: 0 1 auto;
  max-width: 20rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-banner-snippet {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--feed-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-banner-link:hover .feed-banner-title,
.feed-banner-link:focus-visible .feed-banner-title {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Optional: floats the banner over the map instead of sitting above it.
   Add the class alongside the id: <div id="feed-strip" class="feed-banner--overlay"> */
.feed-banner--overlay {
  position: absolute;
  z-index: 500;          /* above Leaflet/MapLibre panes, below their controls' popups */
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  max-width: 34rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

@media screen and (max-width: 1023px) {
  #navbar-latest-posts {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feed-banner-link {
    transition: none;
  }
}