/* CHERITAN SITE SYSTEM v4.5 — article readability + complete post presentation */

/* A real editorial hero that uses the full desktop width instead of leaving a
   large empty right side. The featured image lives beside the title on desktop. */
.cht-post-page .csp-hero{
  padding:34px 0 40px!important;
  background:linear-gradient(180deg,#f7f7f8 0%,#f1f2f4 100%)!important;
}
.cht-post-page .csp-hero-inner{
  width:min(1180px,92%)!important;
  max-width:1180px!important;
  margin-inline:auto!important;
}
.cht-post-page .csp-breadcrumb{margin-bottom:24px!important;}
.cht-post-page .csp-hero-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1.04fr) minmax(360px,.96fr)!important;
  align-items:center!important;
  gap:48px!important;
}
.cht-post-page .csp-hero-copy{max-width:none!important;min-width:0!important;}
.cht-post-page .csp-hero h1{
  max-width:none!important;
  margin:0 0 16px!important;
  font-size:clamp(42px,4.8vw,64px)!important;
  line-height:1.035!important;
  letter-spacing:-1.8px!important;
  text-wrap:balance!important;
}
.cht-post-page .csp-deck{
  max-width:720px!important;
  margin-bottom:18px!important;
  font-size:16px!important;
  line-height:1.68!important;
}
.cht-post-page .csp-read-start{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:42px!important;
  margin-top:20px!important;
  padding:11px 17px!important;
  border-radius:6px!important;
  background:#f4a98a!important;
  color:#202731!important;
  font-size:11px!important;
  font-weight:850!important;
  letter-spacing:.45px!important;
  text-decoration:none!important;
  touch-action:manipulation!important;
}
.cht-post-page .csp-hero-featured{
  margin:0!important;
  min-width:0!important;
  overflow:hidden!important;
  border-radius:18px!important;
  background:#e7e9ed!important;
  box-shadow:0 18px 48px rgba(48,54,64,.12)!important;
}
.cht-post-page .csp-hero-featured img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  aspect-ratio:16/11!important;
  max-height:none!important;
  object-fit:cover!important;
  object-position:center!important;
}
.cht-post-page .csp-hero-featured figcaption{
  padding:9px 12px!important;
  background:#fff!important;
  color:#747b85!important;
  font-size:11px!important;
  line-height:1.45!important;
}
/* v4.5 embeds the featured image in the hero; hide any legacy duplicate. */
.cht-post-page>.csp-featured-wrap,
.cht-post-page .csp-article>.csp-featured-wrap{display:none!important;}

/* Wider long-form area. Full content remains visible; no height clipping. */
.cht-post-page .csp-layout{
  width:min(1180px,92%)!important;
  max-width:1180px!important;
  grid-template-columns:230px minmax(0,840px)!important;
  justify-content:center!important;
  gap:58px!important;
  padding-top:48px!important;
  padding-bottom:70px!important;
  overflow:visible!important;
}
.cht-post-page .csp-main-column,
.cht-post-page .csp-article-content{
  min-width:0!important;
  width:100%!important;
  max-width:none!important;
  max-height:none!important;
  overflow:visible!important;
}
.cht-post-page .csp-article-content{
  color:#3f4551!important;
  font-size:17px!important;
  line-height:1.84!important;
}
.cht-post-page .csp-article-content>*{
  max-width:100%!important;
  box-sizing:border-box!important;
}
.cht-post-page .csp-article-content :is(p,h2,h3,h4,h5,h6,ul,ol,blockquote,section,div){
  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;}
.cht-post-page .csp-article-content>p:first-child{
  margin-bottom:26px!important;
  color:#303640!important;
  font-size:19px!important;
  line-height:1.78!important;
}
.cht-post-page .csp-article-content h2{
  margin:42px 0 15px!important;
  font-size:clamp(29px,3vw,38px)!important;
  line-height:1.16!important;
}
.cht-post-page .csp-article-content h3{
  margin:30px 0 12px!important;
  font-size:clamp(22px,2.2vw,27px)!important;
  line-height:1.22!important;
}
.cht-post-page .csp-article-content p{margin:0 0 22px!important;}
.cht-post-page .csp-article-content ul,
.cht-post-page .csp-article-content ol{margin:0 0 24px!important;padding-left:26px!important;}
.cht-post-page .csp-article-content li{margin-bottom:8px!important;}

/* WordPress/Gutenberg compatibility: prevent blocks from being cropped or pushed
   outside the reading column. */
.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;
  border-radius:12px!important;
}
.cht-post-page .csp-article-content .aligncenter img,
.cht-post-page .csp-article-content img.aligncenter{margin-inline:auto!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-columns{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:22px!important;
  align-items:flex-start!important;
}
.cht-post-page .csp-article-content .wp-block-column{
  flex:1 1 280px!important;
  min-width:0!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;
  border:0!important;
}
.cht-post-page .csp-article-content .wp-block-embed__wrapper{
  position:relative!important;
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
}
.cht-post-page .csp-article-content table{
  display:table!important;
  width:100%!important;
  max-width:100%!important;
  table-layout:auto!important;
}
.cht-post-page .csp-article-content .wp-block-table{
  display:block!important;
  width:100%!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
.cht-post-page .csp-article-content .wp-block-table table{min-width:620px!important;}

/* Sidebar remains useful, but never steals article width on tablet/mobile. */
.cht-post-page .csp-sidebar-sticky{top:20px!important;}
.cht-post-page .csp-toc-card,
.cht-post-page .csp-share-card,
.cht-post-page .csp-course-card{box-shadow:none!important;}

@media(max-width:1024px){
  .cht-post-page .csp-hero-grid{
    grid-template-columns:minmax(0,1fr) minmax(300px,.78fr)!important;
    gap:30px!important;
  }
  .cht-post-page .csp-hero h1{font-size:clamp(38px,5.3vw,52px)!important;}
  .cht-post-page .csp-layout{
    grid-template-columns:1fr!important;
    max-width:820px!important;
    gap:26px!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 30px!important;}
  .cht-post-page .csp-hero-inner{width:min(94%,680px)!important;}
  .cht-post-page .csp-breadcrumb{margin-bottom:18px!important;}
  .cht-post-page .csp-hero-grid{grid-template-columns:1fr!important;gap:24px!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-read-start{margin-top:14px!important;}
  .cht-post-page .csp-hero-featured{border-radius:12px!important;}
  .cht-post-page .csp-hero-featured img{aspect-ratio:16/10!important;}
  .cht-post-page .csp-layout{
    width:min(92%,680px)!important;
    padding-top:30px!important;
    padding-bottom:48px!important;
  }
  .cht-post-page .csp-article-content{font-size:16px!important;line-height:1.76!important;}
  .cht-post-page .csp-article-content>p:first-child{font-size:17px!important;line-height:1.72!important;}
  .cht-post-page .csp-sidebar-sticky{grid-template-columns:1fr!important;}
  .cht-post-page .csp-article-content table{display:block!important;overflow-x:auto!important;}
}
