/* CHERITAN SITE SYSTEM v4.6
   Keep the user's current blog-post format: title/intro first, one full featured image,
   then the complete article. This intentionally overrides the v4.5 side-by-side experiment. */

/* Header/intro stays exactly in the familiar single-column format. */
.cht-post-page .csp-hero{
  padding:28px 0 52px!important;
  background:#f2f2f2!important;
  border-bottom:1px solid #dfe2e7!important;
}
.cht-post-page .csp-hero-inner{
  width:min(92%,1030px)!important;
  max-width:1030px!important;
  margin-inline:auto!important;
}
.cht-post-page .csp-breadcrumb{margin-bottom:34px!important;}
.cht-post-page .csp-hero-copy{display:block!important;max-width:900px!important;}
.cht-post-page .csp-hero h1{
  max-width:900px!important;
  margin:0 0 18px!important;
  font-size:clamp(42px,5.5vw,70px)!important;
  line-height:1.04!important;
  letter-spacing:-2.3px!important;
  text-wrap:pretty!important;
}
.cht-post-page .csp-deck{
  max-width:760px!important;
  margin:0 0 22px!important;
  font-size:17px!important;
  line-height:1.68!important;
}

/* One featured image below the intro. No duplicate image, no side-by-side hero. */
.cht-post-page .csp-featured-wrap,
.cht-post-page .csp-article>.csp-featured-wrap{
  display:block!important;
  width:min(92%,1100px)!important;
  max-width:1100px!important;
  margin-inline:auto!important;
  padding-top:34px!important;
}
.cht-post-page .csp-featured{
  display:block!important;
  margin:0!important;
  overflow:hidden!important;
  border-radius:14px!important;
  background:#eceef1!important;
}
.cht-post-page .csp-featured-image{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:590px!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center!important;
}
.cht-post-page .csp-featured figcaption{
  padding:10px 14px!important;
  background:#fff!important;
  color:#727983!important;
  border:1px solid #dfe2e7!important;
  border-top:0!important;
  font-size:11px!important;
  line-height:1.55!important;
}
.cht-post-page .csp-hero-featured{display:none!important;}

/* Full article follows the image. Nothing may clip or hide WordPress content. */
.cht-post-page .csp-layout{
  display:grid!important;
  width:min(92%,1100px)!important;
  max-width:1100px!important;
  grid-template-columns:240px minmax(0,760px)!important;
  justify-content:center!important;
  gap:58px!important;
  padding-top:50px!important;
  padding-bottom:68px!important;
  max-height:none!important;
  overflow:visible!important;
}
.cht-post-page .csp-main-column,
.cht-post-page .csp-article-content{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  opacity:1!important;
  visibility:visible!important;
}
.cht-post-page .csp-article-content{
  color:#414852!important;
  font-size:17px!important;
  line-height:1.86!important;
}
.cht-post-page .csp-article-content>*{
  max-width:100%!important;
  max-height:none!important;
  box-sizing:border-box!important;
  opacity:1!important;
  visibility:visible!important;
}
.cht-post-page .csp-article-content :is(p,h2,h3,h4,h5,h6,ul,ol,blockquote,section,div,figure){
  max-height:none!important;
  overflow:visible!important;
  opacity:1!important;
  visibility:visible!important;
}
.cht-post-page .csp-article-content :is(h2,h3,h4,h5,h6):empty,
.cht-post-page .csp-article-content p:empty{display:none!important;}

/* Keep article media inside the reading column without cutting it. */
.cht-post-page .csp-article-content :is(.wp-block-image,.wp-caption,figure){
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  margin:30px 0!important;
  overflow:visible!important;
}
.cht-post-page .csp-article-content :is(.wp-block-image img,.wp-caption img,figure img,>img){
  display:block!important;
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  max-height:none!important;
  object-fit:contain!important;
}
.cht-post-page .csp-article-content :is(.alignwide,.alignfull){
  width:100%!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
}
.cht-post-page .csp-article-content .wp-block-table{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
.cht-post-page .csp-article-content :is(iframe,video){
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  aspect-ratio:16/9!important;
}

@media(max-width:1024px){
  .cht-post-page .csp-hero-inner{width:min(92%,820px)!important;}
  .cht-post-page .csp-featured-wrap{width:min(92%,900px)!important;}
  .cht-post-page .csp-featured-image{max-height:520px!important;}
  .cht-post-page .csp-layout{
    width:min(92%,820px)!important;
    max-width:820px!important;
    grid-template-columns:1fr!important;
    gap:28px!important;
  }
  .cht-post-page .csp-sidebar{order:2!important;}
  .cht-post-page .csp-sidebar-sticky{position:static!important;grid-template-columns:1fr 1fr!important;}
  .cht-post-page .csp-course-card{grid-column:1/-1!important;}
}

@media(max-width:760px){
  .cht-post-page .csp-hero{padding:22px 0 34px!important;}
  .cht-post-page .csp-hero-inner{width:min(92%,680px)!important;}
  .cht-post-page .csp-breadcrumb{margin-bottom:20px!important;}
  .cht-post-page .csp-hero h1{
    font-size:clamp(34px,10vw,44px)!important;
    line-height:1.07!important;
    letter-spacing:-1px!important;
  }
  .cht-post-page .csp-deck{font-size:15px!important;line-height:1.65!important;}
  .cht-post-page .csp-featured-wrap{
    width:min(94%,680px)!important;
    padding-top:22px!important;
  }
  .cht-post-page .csp-featured{border-radius:10px!important;}
  .cht-post-page .csp-featured-image{max-height:none!important;}
  .cht-post-page .csp-layout{
    width:min(92%,680px)!important;
    padding-top:30px!important;
    padding-bottom:48px!important;
  }
  .cht-post-page .csp-sidebar-sticky{grid-template-columns:1fr!important;}
  .cht-post-page .csp-article-content{font-size:16px!important;line-height:1.76!important;}
}
