/* Single-post and archive polish — deliberately scoped away from the homepage. */

/* Archive/category/tag/author/search grids */
.cs-archive-premium{max-width:1240px;padding-top:38px!important;padding-bottom:84px!important}
.cs-archive-head{max-width:900px;margin-bottom:26px!important}
.cs-archive-head .cs-kicker{display:inline-flex;align-items:center;gap:8px}
.cs-archive-head h1{max-width:850px;font-size:clamp(2.25rem,4vw,3.45rem)!important;line-height:1.08!important;letter-spacing:-.055em!important;margin:12px 0 14px!important;text-wrap:balance}
.cs-archive-head p,.cs-archive-intro{max-width:760px;font-size:17px;line-height:1.75;color:#5b6b7d}
.cs-archive-toolbar{margin:22px 0 24px!important;padding:16px 0!important;border-top:1px solid #e3eaf1;border-bottom:1px solid #e3eaf1}
.cs-archive-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;align-items:stretch}
.cs-archive-grid>.cs-card{display:flex;flex-direction:column;min-width:0;height:100%;border:1px solid #e1e9f0;border-radius:16px;overflow:hidden;background:#fff;box-shadow:0 8px 26px rgba(27,54,83,.055)}
.cs-archive-grid .cs-card-img{display:block!important;position:relative;aspect-ratio:16/9!important;width:100%;height:auto;padding:0!important;overflow:hidden;background:#eaf2f8!important}
.cs-archive-grid .cs-card-img img{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;object-position:center!important;transform:none!important;transition:transform .35s ease!important}
.cs-archive-grid .cs-card:hover .cs-card-img img{transform:scale(1.035)!important}
.cs-archive-grid .cs-card-content{display:flex;flex:1;flex-direction:column;gap:8px;height:auto;padding:22px}
.cs-archive-grid .cs-card-content .cs-kicker{font-size:10px;letter-spacing:.09em}
.cs-archive-grid .cs-card h3{font-size:clamp(1.05rem,1.5vw,1.28rem);line-height:1.38;margin:0}
.cs-archive-grid .cs-card h3 a{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;text-wrap:pretty}
.cs-archive-grid .cs-card .cs-meta{margin-top:2px;font-size:12px}
.cs-archive-grid .cs-card-content p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;font-size:14px;line-height:1.65;color:#5c6c7d;margin:0}
.cs-archive-grid .cs-hero-placeholder{display:grid!important;width:100%;height:100%;min-height:0!important;aspect-ratio:16/9;place-items:center;font-size:3rem!important}
.cs-pagination{margin-top:34px!important;display:flex;justify-content:center;flex-wrap:wrap;gap:6px}
.cs-pagination .page-numbers{min-width:40px;text-align:center;text-decoration:none;font-size:13px;font-weight:750;border-radius:9px}
.cs-pagination .page-numbers.current{background:#245fad;color:#fff;border-color:#245fad}
.cs-pagination .page-numbers:hover:not(.current){background:#eef5fb;border-color:#b9cddd}

/* Single article: comfortable reading measure and predictable responsive layout */
.cs-single-page{padding-top:20px;padding-bottom:76px}
.cs-single-page>.cs-wrap{max-width:1240px}
.cs-breadcrumbs{line-height:1.6}
.cs-post-hero{max-width:960px;margin-bottom:28px}
.cs-post-hero h1{max-width:930px;text-wrap:balance}
.cs-post-cover{width:100%;max-width:1120px;margin:0 auto 32px;aspect-ratio:16/9;max-height:630px}
.cs-post-cover img{display:block;width:100%;height:100%;max-height:630px;object-fit:cover;object-position:center}
.cs-post-layout{grid-template-columns:minmax(0,780px) minmax(260px,300px);gap:36px;align-items:start}
.cs-post-article{min-width:0;background:#fff;border:1px solid #e3eaf1;border-radius:16px;padding:clamp(22px,3.4vw,38px);box-shadow:0 8px 28px rgba(27,54,83,.035)}
.cs-article-body{min-width:0}
.cs-article-body p,.cs-article-body li{line-height:1.82}
.cs-article-body img{max-width:100%;height:auto}
.cs-article-body h2,.cs-article-body h3{scroll-margin-top:105px;text-wrap:pretty}
.cs-article-body iframe,.cs-article-body video,.cs-article-body embed{max-width:100%}
.cs-inline-ad-wrap{clear:both}
.cs-sidebar-sticky{gap:16px}
.cs-sidebar-card,.cs-sidebar-ad,.cs-sidebar-note{border-radius:14px}
.cs-auto-toc ol{padding-left:18px}
.cs-auto-toc a{overflow-wrap:anywhere}
.cs-related-grid .cs-card{display:flex;flex-direction:column;height:100%;min-width:0}
.cs-related-grid .cs-card-img{display:block;aspect-ratio:16/9!important;padding:0!important;overflow:hidden}
.cs-related-grid .cs-card-img img{width:100%!important;height:100%!important;object-fit:cover!important}
.cs-related-grid .cs-card-content{flex:1}
.cs-related-grid .cs-card-content p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.cs-post-navigation .nav-links{gap:14px}
.cs-post-navigation .nav-previous,.cs-post-navigation .nav-next{background:#f8fafc}
.cs-post-navigation a:focus-visible,.cs-archive-grid a:focus-visible{outline:3px solid #176d73;outline-offset:3px}

@media(max-width:1000px){
 .cs-archive-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
 .cs-post-layout{grid-template-columns:minmax(0,1fr) 270px;gap:24px}
 .cs-post-article{padding:25px}
}
@media(max-width:760px){
 .cs-archive-premium{padding-top:25px!important;padding-bottom:48px!important}
 .cs-archive-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .cs-archive-grid .cs-card-content{padding:15px}
 .cs-archive-grid .cs-card h3{font-size:15px}
 .cs-archive-grid .cs-card-content p{font-size:13px;-webkit-line-clamp:3}
 .cs-archive-head h1{font-size:clamp(2rem,8vw,2.8rem)!important}
 .cs-single-page{padding-top:12px;padding-bottom:48px}
 .cs-post-hero{margin-bottom:20px}
 .cs-post-hero h1{font-size:clamp(2rem,8vw,3rem)}
 .cs-post-cover{aspect-ratio:16/9;margin-bottom:22px;border-radius:13px}
 .cs-post-layout{display:flex;flex-direction:column;gap:22px}
 .cs-post-article{width:100%;padding:20px 17px}
 .cs-post-sidebar{width:100%;order:0}
 .cs-sidebar-sticky{position:static;grid-template-columns:1fr 1fr}
 .cs-toc-card{grid-column:1/-1}
 .cs-sidebar-ad,.cs-sidebar-note{padding:15px}
}
@media(max-width:480px){
 .cs-archive-grid{grid-template-columns:minmax(0,1fr)}
 .cs-archive-grid .cs-card-content{padding:18px}
 .cs-archive-grid .cs-card h3{font-size:18px}
 .cs-archive-grid .cs-card-content p{-webkit-line-clamp:4;font-size:14px}
 .cs-sidebar-sticky{grid-template-columns:1fr}
 .cs-toc-card{grid-column:auto}
}
@media(prefers-reduced-motion:reduce){.cs-archive-grid .cs-card-img img{transition:none!important}}

/* Fix: keep the single-post sidebar beside the article on desktop. */
@media(min-width:761px){
 .cs-single-page .cs-post-layout{display:grid!important;grid-template-columns:minmax(0, min(780px, 1fr)) minmax(260px, 300px)!important;align-items:start!important;gap:32px!important}
 .cs-single-page .cs-post-layout>.cs-post-article{grid-column:1!important;grid-row:1!important;width:100%;min-width:0}
 .cs-single-page .cs-post-layout>.cs-post-sidebar{display:block!important;grid-column:2!important;grid-row:1!important;width:100%!important;min-width:0;align-self:start!important}
 .cs-single-page .cs-post-sidebar{align-self:stretch!important;position:relative!important;height:100%!important;min-height:100%}
 .cs-single-page .cs-sidebar-sticky{position:sticky!important;top:24px!important;display:grid;gap:16px;max-height:calc(100vh - 48px);overflow-y:auto;overscroll-behavior:contain}
 .cs-single-page .cs-sidebar-sticky::-webkit-scrollbar{width:5px}
 .cs-single-page .cs-sidebar-sticky::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:10px}
}
@media(min-width:761px) and (max-width:1050px){
 .cs-single-page .cs-post-layout{grid-template-columns:minmax(0,1fr) 270px!important;gap:22px!important}
}
@media(max-width:760px){
 .cs-single-page .cs-post-layout{display:flex!important;flex-direction:column!important}
 .cs-single-page .cs-post-layout>.cs-post-article,.cs-single-page .cs-post-layout>.cs-post-sidebar{width:100%!important;grid-column:auto!important;grid-row:auto!important}
 .cs-single-page .cs-post-layout>.cs-post-sidebar{order:2!important}
}
