/* /substackupdates — Substack RSS feed page.
 * Paragraph colors use !important because the theme forces
 * `.content.block-content p` to black. */
.substack-feed {
  --sf-red: #ea1c2e;
  --sf-navy: #1d2b57;
  --sf-text: #1f2328;
  --sf-muted: #5f6670;
  --sf-border: #e4e7ec;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  font-family: Roboto, sans-serif;
  color: var(--sf-text);
}

.substack-feed__list {
  display: grid;
  gap: 16px;
}

.substack-card {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--sf-border);
  border-radius: 10px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.substack-card:hover,
.substack-card:focus-within {
  border-color: #c9ced6;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.08);
}

.substack-card__media {
  flex: 0 0 200px;
  height: 132px;
  overflow: hidden;
  border-radius: 6px;
  background: #f2f4f7;
}
.substack-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Posts without their own image: show the small logo, not a stretched one. */
.substack-card__media--logo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.substack-card__media--logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.substack-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.substack-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--sf-muted);
}
.substack-card__source {
  color: #0199ff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.substack-card__author {
  font-weight: 600;
  color: var(--sf-navy);
}
.substack-card__title {
  margin: 6px 0 8px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
}
.substack-card__title a {
  color: var(--sf-text) !important;
  text-decoration: none !important;
}
/* Whole card is clickable through the title link. */
.substack-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
}
.substack-card__title a:focus-visible::after {
  outline: 3px solid var(--sf-red);
  outline-offset: 2px;
}
.substack-card:hover .substack-card__title a {
  color: var(--sf-red) !important;
}
.substack-card__excerpt {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--sf-muted) !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.substack-card__more {
  margin-top: auto;
  padding-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--sf-red);
}

.substack-feed__empty {
  padding: 32px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--sf-border);
  border-radius: 10px;
}

@media (max-width: 767px) {
  .substack-feed {
    padding-top: 20px;
  }
  .substack-card {
    flex-direction: column;
    gap: 12px;
  }
  .substack-card__media {
    flex-basis: auto;
    width: 100%;
    height: 180px;
  }
  /* A repeated logo only adds scrolling on phones; keep real images. */
  .substack-card__media--logo {
    display: none;
  }
  .substack-card__title {
    font-size: 18px;
  }
}
