/* Story readability and the Trending card. Keep the shared page composition intact. */
.social-feed > .home-story,
.story-rows > .home-story,
.home-refresh .home-story {
  align-items: flex-start;
  gap: 24px;
  padding: 28px;
  border-top: 1px solid #e2eaf3;
  background: #fff;
}
.social-feed > .home-story:first-child,
.story-rows > .home-story:first-child,
.home-refresh .home-story:first-child { border-top: 0; }
.home-story .feed-item-main { min-width: 0; }
.home-story .home-story-meta,
.home-refresh .home-story .home-story-meta {
  gap: 8px;
  margin: 0 0 10px;
  color: #5f6e86;
  font-size: 13px;
  line-height: 1.6;
}
.home-story .home-story-source,
.home-refresh .home-story .home-story-source { font-size: 13px; font-weight: 650; color: #425b7e; }
.home-story .home-story-meta .mark { width: 24px; height: 24px; font-size: 13px; border-radius: 7px; }
.home-story .home-story-meta .chip { font-size: 13px; font-weight: 500; border-radius: 6px; }
.home-story .feed-headline,
.home-refresh .home-story .feed-headline {
  max-width: 42ch;
  margin: 0;
  color: #182e51;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 0;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.home-story .home-story-summary,
.home-refresh .home-story .home-story-summary {
  max-width: 65ch;
  margin: 12px 0 0;
  color: #50617a;
  font-size: 16px;
  line-height: 1.8;
  font-weight: 400;
  -webkit-line-clamp: 3;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.home-story .home-story-shot,
.home-refresh .home-story .home-story-shot {
  flex: 0 0 124px;
  width: 124px;
  height: 100px;
  border-radius: 12px;
}
/* Existing photo repair hides failed images; release their empty frame as well. */
.home-story-shot:has(img[hidden]) { display: none; }

.sidebar > .trending-refresh,
.home-refresh .sidebar > .trending-refresh {
  flex-shrink: 0;
  overflow: hidden;
  padding: 20px 16px 0;
  border: 1px solid #dbe7f4;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 20px #234b7c06;
}
.trending-refresh .trending-heading { display: flex; align-items: center; gap: 11px; padding: 0 2px 18px; }
.trending-refresh .trending-emblem {
  display: grid; place-items: center; flex: 0 0 40px; height: 40px;
  border-radius: 13px; color: #cc573d; background: #fff0e9;
}
.trending-refresh .trending-emblem .icon { width: 23px; height: 23px; }
.trending-refresh .trending-heading h2 { color: #183151; font-size: 19px; line-height: 1.35; font-weight: 750; letter-spacing: -.2px; }
.trending-refresh .trending-heading p { margin-top: 3px; color: #5f6e86; font-size: 13px; line-height: 1.5; }
.trending-refresh .trending-list { display: grid; gap: 0; }
.trending-refresh .trending-list > li { min-width: 0; }
.trending-refresh .trending-row,
.home-refresh .trending-refresh .trending-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 17px 8px;
  border-top: 1px solid #edf1f7;
  border-radius: 0;
  transition: background-color 160ms;
}
.trending-refresh .trending-list > li:first-child .trending-row {
  margin-bottom: 4px;
  padding: 16px 12px;
  border: 1px solid #dfeafb;
  border-radius: 14px;
  background: #f0f6ff;
}
.trending-refresh .trending-list > li:nth-child(2) .trending-row { border-top: 0; }
.trending-refresh .trending-row:hover { background: #f5f9fe; }
.trending-refresh .trending-list > li:first-child .trending-row:hover { background: #e8f1ff; }
.trending-refresh .trending-visual { position: relative; display: block; flex: 0 0 28px; margin-top: 2px; }
.trending-refresh .trending-visual.has-photo { flex-basis: 62px; }
.trending-refresh .trending-shot { display: block; width: 62px; height: 64px; overflow: hidden; border-radius: 10px; background: #edf3fa; }
.trending-refresh .trending-shot img { width: 100%; height: 100%; object-fit: cover; }
.trending-refresh .trending-rank,
.home-refresh .trending-refresh .trending-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #e1eafa;
  border-radius: 9px;
  color: #43638e;
  background: #eef4fc;
  font-size: 13px;
  line-height: 1;
  font-weight: 750;
}
.trending-refresh li:first-child .trending-rank { border-color: var(--blue); background: var(--blue); color: #fff; }
.trending-refresh .has-photo .trending-rank { position: absolute; left: -5px; top: -5px; width: 24px; height: 24px; box-shadow: 0 1px 5px #18315115; }
.trending-refresh .trending-visual:has(.trending-shot[hidden]) { flex-basis: 28px; }
.trending-refresh .trending-visual:has(.trending-shot[hidden]) .trending-rank { position: static; width: 28px; height: 28px; }
.trending-refresh .trending-text { flex: 1; min-width: 0; }
.trending-refresh .trending-text strong,
.home-refresh .trending-refresh .trending-text strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #203958;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 650;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.trending-refresh .trending-list > li:first-child .trending-text strong { color: #173867; font-size: 17px; line-height: 1.5; font-weight: 750; }
.trending-refresh .trending-text .trending-source,
.home-refresh .trending-refresh .trending-text .trending-source {
  display: block; margin-top: 7px; color: #5f6e86; font-size: 13px; line-height: 1.5; font-weight: 400;
}
.trending-refresh .trending-more { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 3px; padding: 14px 8px 16px; border-top: 1px solid #e6eef7; color: var(--blue-dark); font-size: 14px; font-weight: 650; }
.trending-refresh .trending-more .icon { width: 17px; height: 17px; }
.trending-refresh .trending-more:hover { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 719px) {
  .social-feed > .home-story,
  .story-rows > .home-story,
  .home-refresh .home-story { padding: 24px 18px; gap: 16px; flex-wrap: wrap; }
  .home-story .feed-item-main { flex-basis: 100%; }
  .home-story .feed-headline,
  .home-refresh .home-story .feed-headline { font-size: 19px; line-height: 1.5; }
  .home-story .home-story-summary,
  .home-refresh .home-story .home-story-summary { font-size: 16px; line-height: 1.8; }
  .home-story .home-story-shot,
  .home-refresh .home-story .home-story-shot { flex-basis: 100%; width: 100%; height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  .trending-refresh .trending-row { transition: none; }
}

/* Every section uses the same clear heading, without decorative accent rules. */
body .page-head {
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 2px 0 0;
  border-bottom: 0;
}
body .page-head::before { content: none; }
body .page-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-width: 0;
  max-width: 100%;
}
body .page-head-actions:not(:has(a, button, .page-head-eyebrow:not(:empty))) { display: none; }
body .page-head-copy {
  flex: 1 1 280px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px 20px;
  align-items: center;
}
body .page-head-title {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: 30px;
  line-height: 1.3;
}
body .page-head-eyebrow {
  margin: 0;
  max-width: 100%;
  align-self: center;
  color: #5f6e86;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
}
body .page-head-eyebrow:empty { display: none; }
.member-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.member-identity-name { min-width: 0; overflow-wrap: anywhere; }
/* Align the pill with the visible username glyphs, below the font's line-box center. */
.member-identity > .staff-badge { position: relative; top: 3px; }
.staff-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 6px;
  border: 1px solid #cbdcff;
  border-radius: 999px;
  background: #edf4ff;
  color: #2459b7;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  vertical-align: middle;
  white-space: nowrap;
}
.staff-badge-icon { display: block; width: 20px; height: 20px; flex: 0 0 20px; }
.staff-badge-seal { fill: var(--blue); }
.staff-badge-check { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body .page-head-text {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  color: #50627d;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
}
@media (max-width: 719px) {
  body .page-head-copy { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  body .page-head-title { font-size: 27px; }
}
