/* Progress.tz v2.9.7 — Adaptive Shorts Cards + Engagement Metrics */

.progress-shorts-social{
  --ps-card:#ffffff;
  --ps-surface:#f8fafc;
  --ps-surface-2:#f2f4f7;
  --ps-text:#172033;
  --ps-copy:#344054;
  --ps-muted:#667085;
  --ps-line:#e4e9f0;
  --ps-shadow:0 8px 26px rgba(21,35,55,.07);
  --ps-blue:#17345e;
  --ps-blue-soft:#edf4ff;
  --ps-green:#83c735;
  --ps-green-soft:#f1f9e7;
  --ps-white:#fff;
}

/* Support common site dark-mode implementations. */
html[data-theme="dark"] .progress-shorts-social,
body[data-theme="dark"] .progress-shorts-social,
html.dark .progress-shorts-social,
body.dark .progress-shorts-social,
.dark-mode .progress-shorts-social,
[data-bs-theme="dark"] .progress-shorts-social{
  --ps-card:#0d1b2a;
  --ps-surface:#112338;
  --ps-surface-2:#162b43;
  --ps-text:#f7f9fc;
  --ps-copy:#d6dfeb;
  --ps-muted:#9fb0c3;
  --ps-line:#263b52;
  --ps-shadow:0 10px 28px rgba(0,0,0,.22);
  --ps-blue:#73a9ff;
  --ps-blue-soft:#142d4d;
  --ps-green:#92d43f;
  --ps-green-soft:#203517;
  --ps-white:#fff;
}

@media(prefers-color-scheme:dark){
  html:not([data-theme="light"]):not(.light) .progress-shorts-social{
    --ps-card:#0d1b2a;
    --ps-surface:#112338;
    --ps-surface-2:#162b43;
    --ps-text:#f7f9fc;
    --ps-copy:#d6dfeb;
    --ps-muted:#9fb0c3;
    --ps-line:#263b52;
    --ps-shadow:0 10px 28px rgba(0,0,0,.22);
    --ps-blue:#73a9ff;
    --ps-blue-soft:#142d4d;
    --ps-green:#92d43f;
    --ps-green-soft:#203517;
  }
}

.progress-shorts-social [data-ps-post="1"],
.progress-shorts-social .ps-post{
  background:var(--ps-card)!important;
  color:var(--ps-text)!important;
  border:1px solid var(--ps-line)!important;
  box-shadow:var(--ps-shadow)!important;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease!important;
}

/* No gradient/mask overlays in excerpt region. */
.progress-shorts-social .ps-body,
.progress-shorts-social .ps-story-text,
.progress-shorts-social .ps-caption,
.progress-shorts-social .ps-engagement,
.progress-shorts-social .ps-actions,
.progress-shorts-social .ps-comments,
.progress-shorts-social .ps-read-more-footer{
  background:var(--ps-card)!important;
  background-image:none!important;
  mask-image:none!important;
  -webkit-mask-image:none!important;
  backdrop-filter:none!important;
}

.progress-shorts-social .ps-body::before,
.progress-shorts-social .ps-body::after,
.progress-shorts-social .ps-story-text::before,
.progress-shorts-social .ps-story-text::after{
  content:none!important;
  display:none!important;
}

/* Fit the excerpt cleanly: compact but readable. */
.progress-shorts-social .ps-body{
  padding:15px 18px 11px!important;
}

.progress-shorts-social .ps-title{
  color:var(--ps-text)!important;
  font-size:18px!important;
  line-height:1.34!important;
  margin:0 0 7px!important;
}

.progress-shorts-social .ps-story-text{
  color:var(--ps-copy)!important;
  font-size:14.5px!important;
  line-height:1.52!important;
  display:-webkit-box!important;
  -webkit-line-clamp:4!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
  max-height:6.1em!important;
  text-overflow:ellipsis!important;
}

.progress-shorts-social .ps-caption{
  margin-top:8px!important;
  color:var(--ps-muted)!important;
  font-size:12.5px!important;
}

/* Remove ALL generic inline read-more controls. */
.progress-shorts-social .ps-read-more,
.progress-shorts-social button.ps-read-more,
.progress-shorts-social a.ps-read-more{
  display:none!important;
}

/* Metrics: compact social-stat rail. */
.progress-shorts-social .ps-engagement{
  padding:9px 16px!important;
  border-top:1px solid var(--ps-line)!important;
  border-bottom:0!important;
}

.progress-shorts-social .ps-metrics{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  width:100%;
}

.progress-shorts-social .ps-metric{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-width:0;
  border-radius:10px;
  padding:8px 6px;
  font-size:12px;
  line-height:1;
  font-weight:800;
  white-space:nowrap;
}

.progress-shorts-social .ps-metric-icon{
  width:15px;
  height:15px;
  display:inline-grid;
  place-items:center;
  flex:0 0 15px;
}

.progress-shorts-social .ps-metric strong{
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Progress blue/green rhythm */
.progress-shorts-social .ps-metric--views,
.progress-shorts-social .ps-metric--share{
  color:var(--ps-blue)!important;
  background:var(--ps-blue-soft)!important;
}

.progress-shorts-social .ps-metric--likes,
.progress-shorts-social .ps-metric--comments{
  color:var(--ps-green)!important;
  background:var(--ps-green-soft)!important;
}

/* Action rail */
.progress-shorts-social .ps-actions{
  border-top:1px solid var(--ps-line)!important;
  border-bottom:1px solid var(--ps-line)!important;
}

.progress-shorts-social .ps-action{
  color:var(--ps-muted)!important;
}

.progress-shorts-social .ps-action:hover,
.progress-shorts-social .ps-action:focus-visible{
  background:var(--ps-surface-2)!important;
}

.progress-shorts-social .ps-action.is-active{
  color:var(--ps-green)!important;
}

/* Comments */
.progress-shorts-social .ps-comments{
  color:var(--ps-copy)!important;
}

.progress-shorts-social .ps-comment-bubble,
.progress-shorts-social .ps-comment-compose input{
  background:var(--ps-surface-2)!important;
  border-color:var(--ps-line)!important;
  color:var(--ps-copy)!important;
}

/* Sole CTA: Read full story */
.progress-shorts-social .ps-read-more-footer{
  padding:8px 18px 16px!important;
}

.progress-shorts-social .ps-read-more-footer a{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  min-height:40px!important;
  padding:9px 13px!important;
  border-radius:10px!important;
  background:var(--ps-blue)!important;
  color:var(--ps-white)!important;
  text-decoration:none!important;
  font-size:13px!important;
  line-height:1!important;
  font-weight:800!important;
}

.progress-shorts-social .ps-read-more-footer a:hover,
.progress-shorts-social .ps-read-more-footer a:focus-visible{
  filter:brightness(1.08);
}

/* Prevent older full-story link inside body from duplicating CTA. */
.progress-shorts-social .ps-body > .ps-full-story{
  display:none!important;
}

@media(max-width:560px){
  .progress-shorts-social .ps-metrics{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .progress-shorts-social .ps-metric{
    justify-content:flex-start;
    padding-inline:10px;
  }
  .progress-shorts-social .ps-story-text{
    -webkit-line-clamp:3!important;
    max-height:4.7em!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .progress-shorts-social [data-ps-post="1"],
  .progress-shorts-social .ps-post{
    transition:none!important;
  }
}