/* CT common non-home layout: intentionally scoped to avoid homepage changes */
@media(min-width:992px){
 #thema_wrapper:has(.ct-common-head) .at-lnb,#thema_wrapper:has(.ct-common-head) .pc-header{display:none!important}
 #thema_wrapper:has(.ct-common-head) .at-body .row.at-row{display:flex;align-items:flex-start;flex-wrap:nowrap;margin-left:-10px;margin-right:-10px}
 #thema_wrapper:has(.ct-common-head) .at-body .row.at-row>.at-main{float:none!important;flex:1 1 0;max-width:calc(100% - 340px);width:auto!important;padding-left:10px;padding-right:10px;min-width:0}
 #thema_wrapper:has(.ct-common-head) .at-body .row.at-row>.at-side{float:none!important;flex:0 0 340px;width:340px!important;padding-left:10px;padding-right:10px;min-width:0}
 #thema_wrapper:has(.ct-common-head) .at-container{max-width:1490px;width:calc(100% - 28px)}
}
@media(min-width:992px) and (max-width:1200px){#thema_wrapper:has(.ct-common-head) .at-body .row.at-row>.at-side{flex-basis:300px;width:300px!important}#thema_wrapper:has(.ct-common-head) .at-body .row.at-row>.at-main{max-width:calc(100% - 300px)}}
.ct-common-topline,.ct-common-head,.ct-common-quick{box-sizing:border-box}
.ct-common-topline{display:flex;justify-content:space-between;padding:9px 0;color:#637184;font-size:12px}
.ct-common-topline a{color:#526477}
.ct-common-head{display:grid;grid-template-columns:340px minmax(260px,1fr) 325px;gap:24px;align-items:center;padding:6px 0 20px}
.ct-common-brand{color:#132039!important;font-size:40px;font-weight:900;letter-spacing:-2px;line-height:1.2;white-space:nowrap;text-decoration:none!important}
.ct-common-brand>span{color:#1758b8}.ct-common-brand small{display:block;font-size:12px;font-weight:400;letter-spacing:0;color:#798697;margin:5px 0 0 28px}
.ct-common-search{height:45px;border:2px solid #1a58bd;border-radius:6px;display:flex;overflow:hidden}.ct-common-search input{min-width:0;flex:1;border:0;padding:0 12px;outline:none}.ct-common-search button{background:#1559bd;border:0;color:#fff;font-weight:700;padding:0 19px}
.ct-common-hot{margin-top:9px;color:#68788a;font-size:12px}.ct-common-hot a{color:#254b85;font-weight:700}
.ct-common-topad{min-height:86px;padding:10px 16px;background:linear-gradient(110deg,#edf7ff,#d9f0ff,#f8fcff);border-radius:7px;display:flex;flex-direction:column;gap:3px;color:#1c4778!important;text-decoration:none!important}.ct-common-topad small{font-size:11px}.ct-common-topad strong{font-size:17px}.ct-common-topad span{font-size:11px}.ct-common-topad b{font-size:12px;text-align:right}
.ct-common-quick{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin-bottom:14px}.ct-common-quick a{display:flex;gap:7px;align-items:center;justify-content:center;text-align:center;min-height:57px;padding:7px 4px;border:1px solid #e3eaf3;border-radius:7px;background:#f8fafd;color:#172a44;font-size:13px;font-weight:800;text-decoration:none!important}.ct-common-quick a span{font-size:21px}.ct-common-quick a.active,.ct-common-quick a:hover{background:#2064c5;color:#fff}
.ct-common-rail{display:grid;gap:14px}.ct-common-card{border:1px solid #e6ecf3;border-radius:11px;box-shadow:0 3px 14px #12395a0b;background:#fff;padding:16px;min-width:0;overflow:hidden}.ct-common-card h2{font-size:23px;font-weight:850;margin:0 0 14px;color:#14243c}.ct-common-card h2 small{display:block;font-size:13px;color:#8a96a6;margin-top:3px;font-weight:500}.ct-common-more{float:right;font-size:12px;font-weight:700;color:#1255b4}
.ct-common-login{display:grid;gap:9px}.ct-common-login input{height:44px;padding:0 12px;border:1px solid #d5dce6;width:100%;border-radius:3px}.ct-common-login button{height:45px;border:0;background:#293747;color:#fff;font-size:16px;font-weight:800}.ct-common-loginlinks{display:flex;justify-content:space-between;gap:5px;margin-top:12px;font-size:12px}.ct-member-name{font-weight:800;font-size:16px}
.ct-common-ad{display:block;margin:8px 0}.ct-common-ad img{display:block;width:100%;height:auto;border-radius:6px}.ct-common-stat{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #edf0f4;padding:9px 0;font-size:15px}.ct-common-stat strong{color:#d33b42;white-space:nowrap}.ct-common-rank{display:flex;align-items:center;gap:9px;padding:8px 0;border-bottom:1px solid #edf0f4;font-size:14px}.ct-common-rank b{width:23px;height:22px;display:grid;place-items:center;background:#293747;color:#fff;font-size:12px}.ct-common-rank span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ct-common-rank strong{color:#d33b42;white-space:nowrap}
@media(max-width:1199px){.ct-common-head{grid-template-columns:300px minmax(200px,1fr)}.ct-common-topad{display:none}.ct-common-quick a{font-size:12px;flex-direction:column;gap:2px}}
@media(max-width:991px){.ct-common-topline,.ct-common-head,.ct-common-quick{display:none!important}}

/* V2: align subpage masthead to homepage proportions and enlarge homepage rail */
@media(min-width:1201px){.ct-common-head{grid-template-columns:360px minmax(360px,1fr) 330px;gap:25px}}
@media(min-width:992px) and (max-width:1200px){.ct-common-head{grid-template-columns:310px minmax(300px,1fr);gap:12px}}
.ct-common-topad{min-height:125px;padding:17px 24px;border:2px solid #8db6ea;border-radius:11px;background:linear-gradient(112deg,#e9f3ff,#cfe6ff);gap:5px;box-shadow:0 3px 12px #1554a21c}
.ct-common-topad strong{font-size:22px}.ct-common-topad span{font-size:13px}.ct-common-topad b{font-size:13px}
.ct-common-search{height:45px}.ct-common-search input{font-size:15px}
/* Posts / Comments cards shared by homepage and subpages */
.ct-recent-section{border:1px solid #e2eaf4;border-radius:11px;background:#fff;overflow:hidden;box-shadow:0 3px 14px #12395a0b;margin-top:14px}
.ct-recent-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:14px 16px;background:#f2f7ff;border-bottom:1px solid #e2eaf4}
.ct-recent-heading strong{font-size:18px;font-weight:850;color:#163b71}
.ct-recent-heading a{font-size:12px;color:#2463b4;font-weight:700}
.ct-recent-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px}
.ct-recent-nav a{display:flex;align-items:center;justify-content:center;gap:5px;min-height:46px;border:1px solid #d4e3f5;background:#f7fbff;border-radius:8px;font-size:15px;font-weight:800;color:#1d528e;text-decoration:none!important}
.ct-recent-nav a:hover,.ct-recent-nav a:focus{background:#195cbb;border-color:#195cbb;color:white}
.ct-recent-note{margin:0;padding:0 13px 13px;font-size:12px;color:#718197;line-height:1.5}
.ct-common-mobile-rail{display:none}
@media(max-width:991px){.ct-common-mobile-rail{display:block;margin:18px auto 24px;padding:0 12px;max-width:700px}.ct-common-mobile-rail .ct-common-rail{display:grid;gap:12px}.ct-common-mobile-rail .ct-common-card{padding:15px}}

/* V3: match homepage right rail with category pages, remove desktop footer duplication. */
@media (min-width:1201px) {
 #thema_wrapper:has(.ct-common-head) .at-body .row.at-row > .at-side { flex:0 0 360px!important;width:360px!important;max-width:360px!important; }
 #thema_wrapper:has(.ct-common-head) .at-body .row.at-row > .at-main { max-width:calc(100% - 360px)!important; }
 #ct-v10-home .layout {grid-template-columns:minmax(0,1fr) 360px!important;}
}
@media (min-width:992px) and (max-width:1200px) {
 #thema_wrapper:has(.ct-common-head) .at-body .row.at-row > .at-side {flex:0 0 320px!important;width:320px!important;max-width:320px!important;}
 #thema_wrapper:has(.ct-common-head) .at-body .row.at-row > .at-main {max-width:calc(100% - 320px)!important;}
 #ct-v10-home .layout {grid-template-columns:minmax(0,1fr) 320px!important;}
}
/* The footer shows only Posts/Comments on small screens, never a second full sidebar. */
.ct-common-mobile-rail {display:none!important;}
@media (max-width:991px) {
 .ct-common-mobile-rail {display:block!important;max-width:700px;margin:18px auto 24px;padding:0 12px;}
 #thema_wrapper:has(.ct-common-head) .at-body .at-side {display:none!important;}
}

/* V4: share final home masthead grid ratios and rail widths across pages. */
@media(min-width:1201px){
 .ct-common-head{grid-template-columns:330px minmax(240px,.8fr) minmax(380px,1.25fr)!important;gap:18px!important;}
 #ct-v10-home .site-head{grid-template-columns:330px minmax(240px,.8fr) minmax(380px,1.25fr)!important;gap:18px!important;}
 #ct-v10-home .layout{grid-template-columns:minmax(0,1fr) 360px!important;}
}
@media(min-width:992px) and (max-width:1200px){
 .ct-common-head{grid-template-columns:275px minmax(190px,.8fr) minmax(300px,1.2fr)!important;gap:12px!important;}
 .ct-common-topad{display:flex!important;min-height:115px;padding:12px 16px;}
 #ct-v10-home .layout{grid-template-columns:minmax(0,1fr) 320px!important;}
}
.ct-common-head .ct-common-topad{min-height:125px;}
.ct-common-head .ct-common-search{height:45px;}
.ct-recent-section{margin-top:0;min-width:0;}
.ct-recent-heading strong{display:flex;flex-direction:column;gap:3px;font-size:21px;}
.ct-recent-heading strong small{font-size:12px;color:#8290a2;font-weight:500;}
.ct-recent-list{list-style:none;margin:0;padding:6px 14px 10px;counter-reset:recent;}
.ct-recent-item{counter-increment:recent;border-bottom:1px solid #edf1f7;}
.ct-recent-item:last-child{border-bottom:0;}
.ct-recent-item a{position:relative;display:block;padding:10px 0 10px 26px;color:#1b2c42;text-decoration:none!important;}
.ct-recent-item a:before{content:counter(recent,decimal-leading-zero);position:absolute;top:11px;left:0;color:#2164b6;font-size:11px;font-weight:800;}
.ct-recent-item a:hover .ct-recent-subject{color:#1759b9;}
.ct-recent-subject{display:block;font-size:13px;font-weight:650;line-height:1.45;overflow-wrap:anywhere;}
.ct-recent-meta{display:block;font-size:11px;color:#8995a5;margin-top:4px;}
.ct-recent-empty{padding:12px 16px;color:#8a95a5;font-size:13px;}
#ct-v10-home .right-rail .ct-recent-section{margin-top:0;}
@media(max-width:991px){.ct-common-mobile-rail .ct-recent-section+.ct-recent-section{margin-top:12px;}}

/* V5: use the homepage .wrap's exact outer width and horizontal gutters on subpages.
   Home .wrap: max-width 1490px, padding 0 26px (box-sizing border-box). */
@media (min-width:992px) {
  #thema_wrapper:has(.ct-common-head) .at-container {
    box-sizing:border-box!important;
    width:100%!important;
    max-width:1490px!important;
    padding-left:26px!important;
    padding-right:26px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
}
/* Match the homepage responsive gutter at narrow sizes without changing its layout. */
@media (min-width:992px) and (max-width:1200px) {
  #thema_wrapper:has(.ct-common-head) .at-container {
    padding-left:26px!important;
    padding-right:26px!important;
  }
}

/* V6: align subpage header internals to the homepage header exactly. */
@media(min-width:992px){
  .ct-common-head{align-items:center!important;padding-top:4px!important;padding-bottom:22px!important;}
  .ct-common-search-area{min-width:0;}
  .ct-common-search{height:45px!important;border:2px solid #1a58bd!important;border-radius:6px!important;}
  .ct-common-search input{padding:0 15px!important;font-size:15px!important;}
  .ct-common-search button{flex:0 0 53px!important;width:53px!important;padding:0!important;font-size:22px!important;font-weight:400!important;cursor:pointer;}
  .ct-common-hot{margin-top:10px!important;display:flex!important;align-items:center;gap:9px 18px!important;flex-wrap:wrap;font-size:13px!important;font-weight:700!important;line-height:normal!important;color:#172a44!important;}
  .ct-common-hot span{font-weight:700;white-space:nowrap;}
  .ct-common-hot a{font-weight:700!important;color:#172a44!important;white-space:nowrap;text-decoration:none;}
  .ct-common-topad{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:5px!important;min-width:0!important;min-height:125px!important;padding:17px 24px!important;border:2px solid #8db6ea!important;border-radius:11px!important;background:linear-gradient(112deg,#e9f3ff 0%,#cfe6ff 100%)!important;color:#133f7a!important;text-decoration:none!important;box-shadow:0 3px 12px #1554a21c!important;}
  .ct-common-topad .ct27-ad-label{font-size:12px!important;font-weight:850!important;letter-spacing:.04em;color:#315d92!important;}
  .ct-common-topad strong{font-size:clamp(21px,2vw,30px)!important;font-weight:900!important;line-height:1.22!important;overflow-wrap:anywhere;}
  .ct-common-topad .ct27-ad-copy{font-size:14px!important;font-weight:650!important;line-height:1.35!important;}
  .ct-common-topad .ct27-ad-cta{font-size:14px!important;font-weight:850!important;color:#1558ae!important;}
}
@media(min-width:992px) and (max-width:1200px){.ct-common-topad{min-height:115px!important;padding:12px 16px!important;}}
