/**
 * NewsiumDigital 12.0 Stable Fix 1 — Readability & Text/Image Separation
 * Product by Indusian Technologies — https://indusiantech.org/
 *
 * Readability guardrails intentionally load after presets/studios.
 * They do not change content, queries, metadata or Studio settings.
 */

:root{
  --sp-readable-surface:var(--sp-surface,#fff);
  --sp-readable-text:var(--sp-text,#0f172a);
  --sp-readable-muted:var(--sp-muted,#64748b);
  --sp-readable-line:color-mix(in srgb,var(--sp-readable-text) 12%,transparent);
}
html[data-sp-theme="dark"]{
  --sp-readable-surface:#111827;
  --sp-readable-text:#f1f5f9;
  --sp-readable-muted:#b7c2d0;
  --sp-readable-line:rgba(255,255,255,.12);
}

/* Universal Sindhi card overflow safeguards. */
.sp-hero-overlay-v2,
.sp-editor-body,
.sp9-body,
.sp93-body,
.sp-category-card-body,
.sp-category-lead-body,
.sp-card-body,
.sp-cat-main-card,
.sp-cat-row-card > :not(.sp-cat-mini-thumb){
  min-width:0!important;
  max-width:100%!important;
  overflow-wrap:anywhere;
  word-break:normal;
}
.sp-hero-overlay-v2 h2,
.sp-editor-body h3,
.sp9-body h3,
.sp93-body h3,
.sp-category-card h2,
.sp-category-lead h2,
.sp-card-body h2,
.sp-card-body h3{
  max-width:100%!important;
  overflow-wrap:anywhere;
  word-break:normal;
}

/* =========================================================
   Homepage hero: image and editorial copy are separate layers.
   ========================================================= */
body.home .sp-showcase-hero .sp-hero-card-v3,
body.front-page .sp-showcase-hero .sp-hero-card-v3{
  background:var(--sp-readable-surface)!important;
  isolation:isolate;
}
body.home .sp-showcase-hero .sp-hero-card-v3:after,
body.front-page .sp-showcase-hero .sp-hero-card-v3:after{
  display:none!important;
  content:none!important;
}
body.home .sp-showcase-hero .sp-hero-link,
body.front-page .sp-showcase-hero .sp-hero-link{
  display:grid!important;
  grid-template-rows:minmax(0,1fr) auto!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  background:var(--sp-readable-surface)!important;
  color:var(--sp-readable-text)!important;
  text-decoration:none!important;
}
body.home .sp-showcase-hero .sp-hero-media,
body.front-page .sp-showcase-hero .sp-hero-media{
  position:relative!important;
  inset:auto!important;
  z-index:1!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
  background:#e7edf4!important;
}
body.home .sp-showcase-hero .sp-hero-media img,
body.front-page .sp-showcase-hero .sp-hero-media img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}
body.home .sp-showcase-hero .sp-hero-overlay-v2,
body.front-page .sp-showcase-hero .sp-hero-overlay-v2{
  position:relative!important;
  inset:auto!important;
  z-index:2!important;
  width:100%!important;
  padding:14px 16px 15px!important;
  background:var(--sp-readable-surface)!important;
  color:var(--sp-readable-text)!important;
  border-top:1px solid var(--sp-readable-line)!important;
  box-shadow:none!important;
}
body.home .sp-showcase-hero .sp-hero-large .sp-hero-overlay-v2,
body.front-page .sp-showcase-hero .sp-hero-large .sp-hero-overlay-v2{
  padding:20px 22px 22px!important;
}
body.home .sp-showcase-hero .sp-hero-overlay-v2 h2,
body.front-page .sp-showcase-hero .sp-hero-overlay-v2 h2{
  margin:8px 0 0!important;
  color:var(--sp-readable-text)!important;
  text-shadow:none!important;
  line-height:1.42!important;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
body.home .sp-showcase-hero .sp-hero-large .sp-hero-overlay-v2 h2,
body.front-page .sp-showcase-hero .sp-hero-large .sp-hero-overlay-v2 h2{
  -webkit-line-clamp:3;
}
body.home .sp-showcase-hero .sp-hero-overlay-v2 p,
body.front-page .sp-showcase-hero .sp-hero-overlay-v2 p{
  margin:8px 0 0!important;
  max-width:100%!important;
  color:var(--sp-readable-muted)!important;
  line-height:1.75!important;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
body.home .sp-showcase-hero .sp-hero-meta,
body.front-page .sp-showcase-hero .sp-hero-meta{
  margin-top:8px!important;
  color:var(--sp-readable-muted)!important;
}
body.home .sp-showcase-hero .sp-cat-badge,
body.front-page .sp-showcase-hero .sp-cat-badge{
  color:#fff!important;
  background:var(--sp-primary,#0675d8)!important;
  box-shadow:none!important;
}
/* Preserve broadcaster character without putting text on the image. */
body.sp-preset-breaking_tv .sp-showcase-hero .sp-hero-overlay-v2,
body.sp-preset-video_first .sp-showcase-hero .sp-hero-overlay-v2{
  background:#0b1220!important;
  color:#f8fafc!important;
  border-top-color:rgba(255,255,255,.12)!important;
}
body.sp-preset-breaking_tv .sp-showcase-hero .sp-hero-overlay-v2 h2,
body.sp-preset-video_first .sp-showcase-hero .sp-hero-overlay-v2 h2{color:#f8fafc!important}
body.sp-preset-breaking_tv .sp-showcase-hero .sp-hero-overlay-v2 p,
body.sp-preset-breaking_tv .sp-showcase-hero .sp-hero-meta,
body.sp-preset-video_first .sp-showcase-hero .sp-hero-overlay-v2 p,
body.sp-preset-video_first .sp-showcase-hero .sp-hero-meta{color:#cbd5e1!important}

/* =========================================================
   Homepage/editor/intelligence cards: never paint copy over media.
   ========================================================= */
.sp-editor-card,
.sp9-card,
.sp93-stream-card,
.sp-cat-row-card,
.sp-post-card{
  isolation:isolate;
}
.sp-editor-thumb,
.sp9-thumb,
.sp93-thumb,
.sp-cat-mini-thumb,
.sp-thumb{
  position:relative!important;
  inset:auto!important;
  z-index:1!important;
}
.sp-editor-body,
.sp9-body,
.sp93-body,
.sp-card-body{
  position:relative!important;
  inset:auto!important;
  z-index:2!important;
  background:var(--sp-readable-surface)!important;
  color:var(--sp-readable-text)!important;
}
.sp-editor-body h3 a,
.sp9-body h3 a,
.sp93-body h3 a,
.sp-card-body h2 a,
.sp-card-body h3 a{color:var(--sp-readable-text)!important}
.sp-editor-body p,
.sp9-body small,
.sp93-body p,
.sp93-body small,
.sp-card-body p{color:var(--sp-readable-muted)!important}

/* =========================================================
   Category / Tag / Author / Date / Search cards.
   Flex is used deliberately so RTL cannot invert track proportions.
   ========================================================= */
.sp-category-lead{
  display:flex!important;
  flex-direction:row!important;
  align-items:stretch!important;
  min-width:0!important;
  background:var(--sp-readable-surface)!important;
  color:var(--sp-readable-text)!important;
  isolation:isolate;
}
.sp-category-lead-media{
  position:relative!important;
  inset:auto!important;
  z-index:1!important;
  flex:0 0 clamp(320px,58%,720px)!important;
  width:auto!important;
  min-width:0!important;
  min-height:300px!important;
  overflow:hidden!important;
  background:#e7edf4!important;
}
.sp-category-lead-body{
  position:relative!important;
  inset:auto!important;
  z-index:2!important;
  flex:1 1 0!important;
  align-self:stretch!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  padding:24px!important;
  overflow:hidden!important;
  background:var(--sp-readable-surface)!important;
  color:var(--sp-readable-text)!important;
  border-inline-start:1px solid var(--sp-readable-line)!important;
}
.sp-category-lead-split .sp-category-lead-media{flex-basis:50%!important}
.sp-category-lead-compact .sp-category-lead-media{flex-basis:220px!important;min-height:180px!important}
.sp-category-lead h2 a{color:var(--sp-readable-text)!important}
.sp-category-lead p,.sp-category-lead .sp-category-meta{color:var(--sp-readable-muted)!important}

.sp-category-card{
  display:flex!important;
  flex-direction:row!important;
  align-items:stretch!important;
  min-width:0!important;
  position:relative!important;
  isolation:isolate;
  overflow:hidden!important;
  background:var(--sp-readable-surface)!important;
  color:var(--sp-readable-text)!important;
}
.sp-category-card-media{
  position:relative!important;
  inset:auto!important;
  z-index:1!important;
  flex:0 0 clamp(180px,36%,360px)!important;
  width:auto!important;
  min-width:0!important;
  min-height:150px!important;
  aspect-ratio:auto!important;
  overflow:hidden!important;
  background:#e7edf4!important;
}
.sp-category-card-media img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}
.sp-category-card-body{
  position:relative!important;
  inset:auto!important;
  z-index:2!important;
  flex:1 1 0!important;
  width:auto!important;
  padding:16px 18px!important;
  overflow:hidden!important;
  background:var(--sp-readable-surface)!important;
  color:var(--sp-readable-text)!important;
  border-inline-start:1px solid var(--sp-readable-line)!important;
}
.sp-category-card h2 a{color:var(--sp-readable-text)!important}
.sp-category-card p,.sp-category-card .sp-category-meta{color:var(--sp-readable-muted)!important}

.sp-category-card-compact .sp-category-card-media{
  flex-basis:120px!important;
  min-height:100px!important;
}
.sp-category-card-compact .sp-category-card-body{padding:12px 14px!important}

.sp-category-card-image_top,
.sp-category-posts-magazine .sp-category-card{
  flex-direction:column!important;
}
.sp-category-card-image_top .sp-category-card-media,
.sp-category-posts-magazine .sp-category-card .sp-category-card-media{
  flex:0 0 auto!important;
  width:100%!important;
  min-height:0!important;
  aspect-ratio:var(--sp-category-image-ratio,16/9)!important;
}
.sp-category-card-image_top .sp-category-card-body,
.sp-category-posts-magazine .sp-category-card .sp-category-card-body{
  width:100%!important;
  border-inline-start:0!important;
  border-top:1px solid var(--sp-readable-line)!important;
}
.sp-category-card-headlines{
  display:block!important;
  background:transparent!important;
}
.sp-category-card-headlines .sp-category-card-body{
  border:0!important;
  background:transparent!important;
}

/* Single article: title/meta and body remain independent of the featured image. */
body.single .sp-premium-title,
body.single .sp-premium-meta,
body.single .sp-premium-entry{
  position:relative!important;
  z-index:2!important;
}
body.single .sp-premium-featured{
  position:relative!important;
  z-index:1!important;
  overflow:hidden!important;
  background:#e7edf4!important;
}
body.single .sp-premium-featured + .sp-entry,
body.single .sp-premium-featured + .sp-video-embed{
  clear:both;
}

@media(max-width:900px){
  body.home .sp-showcase-hero .sp-hero-card-v3,
  body.front-page .sp-showcase-hero .sp-hero-card-v3{
    height:auto!important;
    min-height:0!important;
  }
  body.home .sp-showcase-hero .sp-hero-link,
  body.front-page .sp-showcase-hero .sp-hero-link{
    grid-template-rows:auto auto!important;
  }
  body.home .sp-showcase-hero .sp-hero-media,
  body.front-page .sp-showcase-hero .sp-hero-media{
    aspect-ratio:16/9!important;
  }
  .sp-category-lead{flex-direction:column!important}
  .sp-category-lead-media{flex:0 0 auto!important;width:100%!important;min-height:0!important;aspect-ratio:16/9!important}
  .sp-category-lead-body{border-inline-start:0!important;border-top:1px solid var(--sp-readable-line)!important}
}

@media(max-width:680px){
  body.home .sp-showcase-hero .sp-hero-overlay-v2,
  body.front-page .sp-showcase-hero .sp-hero-overlay-v2,
  body.home .sp-showcase-hero .sp-hero-large .sp-hero-overlay-v2,
  body.front-page .sp-showcase-hero .sp-hero-large .sp-hero-overlay-v2{
    padding:14px 15px 16px!important;
  }
  body.home .sp-showcase-hero .sp-hero-overlay-v2 h2,
  body.front-page .sp-showcase-hero .sp-hero-overlay-v2 h2{
    font-size:clamp(18px,5vw,24px)!important;
  }
  body.home .sp-showcase-hero .sp-hero-overlay-v2 p,
  body.front-page .sp-showcase-hero .sp-hero-overlay-v2 p{display:none!important}

  .sp-category-card:not(.sp-category-card-image_top):not(.sp-category-card-headlines),
  .sp-category-posts-magazine .sp-category-card:not(.sp-category-card-headlines){
    flex-direction:row!important;
  }
  .sp-category-card:not(.sp-category-card-image_top):not(.sp-category-card-headlines) .sp-category-card-media,
  .sp-category-posts-magazine .sp-category-card:not(.sp-category-card-headlines) .sp-category-card-media{
    flex:0 0 112px!important;
    width:112px!important;
    min-height:104px!important;
    aspect-ratio:auto!important;
  }
  .sp-category-card-body{padding:12px 13px!important}
  .sp-category-card h2{font-size:17px!important;line-height:1.55!important}
  .sp-category-card p{display:none!important}
  .sp-category-card-image_top{flex-direction:column!important}
  .sp-category-card-image_top .sp-category-card-media{width:100%!important;aspect-ratio:16/9!important}
}
