/*
 * CooliceHost editorial layer for Bold News.
 * Keeps the parent templates, builder columns, stored content and image positions.
 * Colours and fonts come from coolice-base.css; photo overlays retain dark tokens.
 * The main site's V4 information copy, resource cards and shared controls are
 * the visual reference. Blog-specific reading and image layouts stay intact.
 */

/* Article reading rhythm. Restrict prose rules to the actual article body. */
body.ch-blog-redesign :is(.btArticleBody, .btArticleExcerpt, .btArticleListBodyContent, .btSinglePostExcerpt) {
  color: var(--ch-text);
  font-family: var(--ch-font-sans);
  overflow-wrap: anywhere;
}
body.ch-blog-redesign .btArticleBody {
  font-size: clamp(1rem, .98rem + .1vw, 1.0625rem);
  line-height: 1.8;
}
body.ch-blog-redesign .btArticleBody :is(p, ul, ol, dl, pre, blockquote, figure, table) {
  margin-block: 0 1.2em;
}
body.ch-blog-redesign .btArticleBody :is(h1, h2, h3, h4, h5, h6):not(.bdpp-post-title, .bdp-post-title) {
  margin-block: 1.8em .65em;
  padding: 0;
  color: var(--ch-heading);
  font-family: var(--ch-font-sans);
  font-weight: 580;
  line-height: 1.35;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  scroll-margin-top: 7rem;
}
body.ch-blog-redesign .btArticleBody h1:not(.bdpp-post-title, .bdp-post-title) { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.65rem); font-weight: 560; line-height: 1.2; }
body.ch-blog-redesign .btArticleBody h2:not(.bdpp-post-title, .bdp-post-title) { font-size: clamp(1.65rem, 2.5vw, 2.35rem); font-weight: 520; line-height: 1.25; }
body.ch-blog-redesign .btArticleBody h3:not(.bdpp-post-title, .bdp-post-title) { font-size: clamp(1.2rem, 1.75vw, 1.6rem); }
body.ch-blog-redesign .btArticleBody h4:not(.bdpp-post-title, .bdp-post-title) { font-size: 1.08rem; }
body.ch-blog-redesign .btArticleBody :is(h5, h6):not(.bdpp-post-title, .bdp-post-title) { font-size: 1.0625rem; }
body.ch-blog-redesign .btArticleBody :is(ul, ol) { padding-inline-start: 1.5em; }
body.ch-blog-redesign .btArticleBody li { margin-block: .35em; }
body.ch-blog-redesign .btArticleBody li::marker { color: var(--ch-accent); }
body.ch-blog-redesign .btArticleBody li > :is(ul, ol) { margin-block: .4em .8em; }
body.ch-blog-redesign .btArticleBody dt { color: var(--ch-heading); font-weight: 650; }
body.ch-blog-redesign .btArticleBody dd { margin-inline-start: 1.25em; margin-block-end: 1em; }
body.ch-blog-redesign .btArticleBody :is(strong, b) { font-weight: 700; }
/* Prose link decoration must not leak into builder/plugin controls or cards. */
body.ch-blog-redesign .btArticleBody a:not(:where(.btBtn, .btBtn *, .wp-block-button__link, .bdpp-rdmr-btn, .bdp-readmorebtn, .btIcoHolder, .btSinglePostTemplate *, .bdpp-post-title *, .bdp-post-title *, .btArticleCategories *, .bdpp-post-cats *, .bdp-post-categories *, .page-numbers, .bdpp-load-more)) {
  color: var(--ch-link);
  text-decoration-line: underline;
  text-decoration-thickness: .07em;
  text-underline-offset: .22em;
  text-decoration-skip-ink: auto;
}
body.ch-blog-redesign .btArticleBody a:not(:where(.btBtn, .btBtn *, .wp-block-button__link, .bdpp-rdmr-btn, .bdp-readmorebtn, .btIcoHolder, .btSinglePostTemplate *, .bdpp-post-title *, .bdp-post-title *, .btArticleCategories *, .bdpp-post-cats *, .bdp-post-categories *, .page-numbers, .bdpp-load-more)):is(:hover, :focus-visible) {
  text-decoration-line: underline; /* Parent hover shorthand otherwise removes it. */
  text-decoration-thickness: .12em;
}
body.ch-blog-redesign :is(.btArticleExcerpt, .btArticleListBodyContent) {
  font-size: 1rem !important; /* Existing Customizer CSS uses !important. */
  line-height: 1.8;
}
body.ch-blog-redesign .btArticleExcerpt:empty { display: none; }
body.ch-blog-redesign .btArticleExcerpt:not(:empty) {
  margin-block-end: 1.75rem;
  padding-inline-start: 1.25rem;
  border-inline-start: 3px solid var(--ch-accent);
  font-size: 1.125rem !important;
}
body.ch-blog-redesign .btArticle > .port {
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius-card);
  background: var(--ch-surface);
  padding: clamp(1.25rem, 3.5vw, 3.5rem) !important; /* Parent fixes padding with !important. */
}
body.ch-blog-redesign :is(.btArticleContent, .btArticleBody, .btArticleContentWrap, .btSinglePostContent) { min-width: 0; }
body.ch-blog-redesign .btArticleBody .port { border: 0; border-radius: 0; background: transparent; }
body.ch-blog-redesign .btArticleBody > .bt_bb_wrapper > :first-child { margin-block-start: 0; }
body.ch-blog-redesign .btArticleBody > .bt_bb_wrapper > :last-child { margin-block-end: 0; }

/* Technical content stays selectable and scrolls locally on narrow screens. */
body.ch-blog-redesign .btArticleBody :is(code, kbd, samp, pre) { font-family: var(--ch-font-mono); }
body.ch-blog-redesign .btArticleBody :not(pre) > code {
  padding: .15em .35em;
  border: 1px solid var(--ch-border);
  border-radius: .25rem;
  color: var(--ch-heading);
  background: var(--ch-surface-raised);
  font-size: .85em;
  overflow-wrap: anywhere;
}
body.ch-blog-redesign .btArticleBody pre {
  max-width: 100%;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--ch-border);
  border-inline-start: 3px solid var(--ch-accent);
  border-radius: .75rem;
  color: var(--ch-text);
  background: var(--ch-surface-raised);
  font-size: .85em;
  line-height: 1.75;
  white-space: pre;
  overflow: auto;
  overscroll-behavior-x: contain;
  tab-size: 2;
}
body.ch-blog-redesign .btArticleBody pre code { color: inherit; background: transparent; font-size: inherit; }
body.ch-blog-redesign .btArticleBody kbd {
  padding: .1em .4em;
  border: 1px solid var(--ch-border);
  border-bottom-width: 2px;
  border-radius: .25rem;
  background: var(--ch-surface-raised);
  font-size: .85em;
}
body.ch-blog-redesign .btArticleBody blockquote {
  padding: 1.2em 1.4em;
  border: 0;
  border-inline-start: 3px solid var(--ch-accent);
  border-radius: 0 .5rem .5rem 0;
  color: var(--ch-heading);
  background: var(--ch-surface-raised);
  font-family: var(--ch-font-sans);
  font-size: 1.12em;
  font-weight: 520;
  line-height: 1.7;
}
body.ch-blog-redesign .btArticleBody blockquote::before { content: none; }
body.ch-blog-redesign .btArticleBody blockquote p:last-child { margin-bottom: 0; }
body.ch-blog-redesign .btArticleBody :is(blockquote cite, .wp-block-pullquote cite) {
  display: block;
  margin-top: 1em;
  color: var(--ch-text-muted);
  font-family: var(--ch-font-mono);
  font-size: .75em;
  font-style: normal;
  font-weight: 500;
}
body.ch-blog-redesign .btArticleBody .wp-block-pullquote { border-color: var(--ch-border); padding: 1.5em 0; }
body.ch-blog-redesign .btArticleBody table {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--ch-border);
  border-collapse: collapse;
  border-radius: .75rem;
  color: var(--ch-text);
  background: var(--ch-surface);
  font-size: .9em;
  line-height: 1.6;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--ch-accent) var(--ch-surface-raised);
}
body.ch-blog-redesign .btArticleBody :is(th, td) {
  min-width: 6rem;
  padding: .85em 1em;
  border-color: var(--ch-border);
  vertical-align: top;
  text-align: start;
}
body.ch-blog-redesign .btArticleBody th { color: var(--ch-heading); background: var(--ch-surface-raised); font-weight: 650; }
body.ch-blog-redesign .btArticleBody table caption { padding: .75em; color: var(--ch-text-muted); text-align: start; }
body.ch-blog-redesign .btArticleBody .wp-block-table { max-width: 100%; overflow-x: auto; }
body.ch-blog-redesign .btArticleBody .wp-block-table table { display: table; }
body.ch-blog-redesign .btArticleBody .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--ch-surface-raised); }
body.ch-blog-redesign .btArticleBody :is(img, video) { max-width: 100%; height: auto; }
body.ch-blog-redesign .btArticleBody :is(iframe, embed, object) { max-width: 100%; }
body.ch-blog-redesign .btArticleBody :is(.wp-caption, .wp-block-image, .wp-block-embed) { max-width: 100%; }
body.ch-blog-redesign .btArticleBody :is(figcaption, .wp-caption-text) {
  margin-top: .75rem;
  color: var(--ch-text-muted);
  font-size: .8125rem;
  line-height: 1.65;
}
body.ch-blog-redesign .btArticleBody hr { margin-block: 2em; border: 0; border-top: 1px solid var(--ch-border); }
body.ch-blog-redesign .btArticleBody details {
  margin-block: 1.25rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--ch-border);
  border-radius: .75rem;
  background: var(--ch-surface-raised);
}
body.ch-blog-redesign .btArticleBody summary { color: var(--ch-heading); font-weight: 600; cursor: pointer; }
body.ch-blog-redesign .btArticleBody details[open] summary { margin-bottom: 1rem; }

/* Existing editorial cards. Image geometry is intentionally parent-owned. */
body.ch-blog-redesign .btSinglePostTemplate {
  border-radius: var(--ch-radius-card);
  box-shadow: none;
  transition: border-color .2s ease;
}
body.ch-blog-redesign .btSinglePostTemplate:not(.backgroundImagePosition, .btSingleHighlight) {
  border-color: var(--ch-border) !important; /* Historical child CSS removes card borders. */
  color: var(--ch-text);
  background: var(--ch-surface);
}
body.ch-blog-redesign .btSinglePostTemplate:not(.backgroundImagePosition, .btSingleHighlight):is(:hover, :focus-within) {
  border-color: var(--ch-accent) !important;
  border-color: color-mix(in srgb, var(--ch-accent) 60%, var(--ch-border)) !important;
  box-shadow: none;
}
body.ch-blog-redesign .btSinglePostTemplate .btSinglePostContent :is(h1, h2, h3, h4, h5, h6) {
  display: block;
  max-height: none;
  margin-block: 0;
  padding-bottom: 0;
  color: var(--ch-heading);
  font-family: var(--ch-font-sans);
  font-size: clamp(1.125rem, 1rem + .35vw, 1.375rem);
  font-weight: 580;
  line-height: 1.4;
  letter-spacing: -.025em;
  overflow: visible;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
}
body.ch-blog-redesign .btSinglePostTemplate.largeTemplate .btSinglePostContent :is(h1, h2, h3, h4) {
  font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.2rem);
  font-weight: 520;
  line-height: 1.3;
}
body.ch-blog-redesign .btSinglePostTemplate.smallTemplate .btSinglePostContent :is(h1, h2, h3, h4) { font-size: 1.125rem; }
body.ch-blog-redesign .btSinglePostTemplate .btSinglePostContent :is(h1, h2, h3, h4, h5, h6) a {
  color: inherit;
  text-decoration: none;
  opacity: 1;
}
body.ch-blog-redesign .btSinglePostTemplate .btSinglePostContent :is(h1, h2, h3, h4, h5, h6) a:is(:hover, :focus-visible) {
  color: var(--ch-link) !important; /* Overrides the old child hover blue. */
  opacity: 1; /* Parent opacity:.7 reduces contrast, especially on photography. */
  text-decoration: underline;
  text-decoration-thickness: .06em;
  text-underline-offset: .17em;
}
body.ch-blog-redesign .btSinglePostTemplate .btSinglePostContent .btSinglePostExcerpt {
  font-size: 1rem !important;
  line-height: 1.75;
  max-height: 5.25em;
  margin-top: .85rem;
}
body.ch-blog-redesign .btSinglePostTemplate .btSinglePostContent :is(.btSinglePostTopData, .btSinglePostBottomData) {
  color: var(--ch-text-muted);
  border-color: var(--ch-border);
  font-family: var(--ch-font-mono);
  font-size: .75rem !important;
  font-weight: 450;
  line-height: 1.7;
}
body.ch-blog-redesign .btSinglePostTemplate .btSinglePostContent .btSinglePostTopData { margin-bottom: .7rem; }
body.ch-blog-redesign .btSinglePostTemplate .btSinglePostContent .btSinglePostTopData :is(.btArticleDate, .btArticleAuthor) {
  max-width: 100%;
  overflow-wrap: anywhere;
}
body.ch-blog-redesign .btSinglePostTemplate .btSinglePostContent .btSinglePostTopData .btArticleDate { margin-inline-end: .6rem; }
body.ch-blog-redesign .btSinglePostTemplate .btSinglePostContent .btArticleAuthor { color: inherit; }
body.ch-blog-redesign .btSinglePostTemplate.topImagePosition .btSinglePostImage { border-radius: var(--ch-radius-card) var(--ch-radius-card) 0 0; }
body.ch-blog-redesign .btSinglePostTemplate.leftImagePosition .btSinglePostLeftImage { border-radius: var(--ch-radius-card) 0 0 var(--ch-radius-card); }
body.ch-blog-redesign .btSinglePostTemplate.rightImagePosition .btSinglePostLeftImage { border-radius: 0 var(--ch-radius-card) var(--ch-radius-card) 0; }
body.ch-blog-redesign .btSinglePostTemplate.home-main-slider .btSinglePostContent { justify-content: center !important; gap: .25rem; }
body.ch-blog-redesign .btSinglePostTemplate.home-main-slider .btSinglePostContent .btSinglePostExcerpt { max-height: 7em; -webkit-line-clamp: 4; }

/* Cards over photography need a stable dark palette in either page theme. */
body.ch-blog-redesign .btSinglePostTemplate:is(.backgroundImagePosition, .btSingleHighlight) {
  --ch-heading: #f4faff;
  --ch-text: #e2ebf1;
  --ch-text-muted: #c4d6e1;
  --ch-link: #8ddcff;
  --ch-accent: #7fcdf5;
  --ch-focus: #80d9ff;
  --ch-surface: #07131b;
  --ch-surface-raised: #0c1c27;
  --ch-border: #426375;
  background-color: #071b27 !important;
}
body.ch-blog-redesign .btSinglePostTemplate.backgroundImagePosition .btSinglePostBackgroundImage::after {
  opacity: 1;
  background: linear-gradient(180deg, rgb(3 9 12 / 28%) 0%, rgb(3 9 12 / 65%) 45%, rgb(3 9 12 / 94%) 100%);
}
body.ch-blog-redesign .btSinglePostTemplate.backgroundImagePosition .btSinglePostContent { padding-top: 2rem; }
body.ch-blog-redesign .btSinglePostTemplate.backgroundImagePosition .btSinglePostContent .btSinglePostTopData { color: var(--ch-text-muted); }

/* Taxonomy labels, including stored category colours, share the site accent. */
body.ch-blog-redesign .btContent :is(.btArticleCategories a, .bdpp-post-cats a, .bdp-post-categories a) {
  display: inline-block;
  max-width: 100%;
  padding: .32rem .6rem;
  border: 1px solid var(--ch-border);
  border-radius: .28rem;
  color: var(--ch-link);
  background: var(--ch-surface-raised);
  font-family: var(--ch-font-mono);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: .025em;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.ch-blog-redesign .btContent .btPostImageHolder .btArticleCategories a {
  border-color: rgb(184 222 240 / 45%);
  color: #eaf8ff;
  background: #083044;
}
body.ch-blog-redesign .btContent :is(.btArticleCategories a, .bdpp-post-cats a, .bdp-post-categories a):is(:hover, :focus-visible) {
  border-color: var(--ch-accent);
  color: #fff;
  background: #0877b5;
}
body.ch-blog-redesign :is(.btContent, .btSidebar) :is(.btTags ul a, .tagcloud a, .wp-block-tag-cloud a) {
  display: inline-block;
  max-width: 100%;
  margin: 0 .35rem .5rem 0;
  padding: .35rem .65rem;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius-control);
  color: var(--ch-text-muted);
  background: var(--ch-surface);
  box-shadow: none;
  font: 500 .75rem/1.65 var(--ch-font-mono);
  text-decoration: none;
  overflow-wrap: anywhere;
}
body.ch-blog-redesign :is(.btContent, .btSidebar) :is(.btTags ul a, .tagcloud a, .wp-block-tag-cloud a):is(:hover, :focus-visible) {
  color: var(--ch-link);
  border-color: var(--ch-accent);
  background: var(--ch-surface-raised);
  box-shadow: none;
}

/* Archive layouts and post metadata keep all existing content and links. */
body.ch-blog-redesign .btArticleListItem { margin-bottom: 2.5rem; border-bottom: 1px solid var(--ch-border); }
body.ch-blog-redesign .btArticleListItem .btMediaBox { border-radius: var(--ch-radius-card); }
body.ch-blog-redesign .btArticleListItem .header :is(h1, h2, h3, h4) {
  color: var(--ch-heading);
  font-family: var(--ch-font-sans);
  font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem);
  font-weight: 580;
  line-height: 1.35;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
body.ch-blog-redesign .btArticleListItem .header .headline a { color: var(--ch-heading); }
body.ch-blog-redesign .btArticleListItem .header .headline a:is(:hover, :focus-visible) { color: var(--ch-link); }
body.ch-blog-redesign :is(.btArticleMeta, .btArticleSideMeta, .articleSideGutter, .simpleArticleSideGutter) {
  color: var(--ch-text-muted);
  font-family: var(--ch-font-mono);
  font-size: .75rem;
  line-height: 1.7;
}
body.ch-blog-redesign :is(.btArticleMeta, .btArticleSideMeta, .btArticleListItem) .header .btSubTitle {
  display: block;
  color: var(--ch-text-muted);
  font-family: var(--ch-font-mono);
  font-size: .75rem !important;
  font-weight: 450;
  line-height: 1.8;
}
body.ch-blog-redesign :is(.btArticleMeta, .btArticleSideMeta, .btArticleListItem) :is(.btArticleAuthor, .btArticleDate, .btArticleComments, .btArticleReadingTime, .btArticleViewsCount) {
  color: var(--ch-text-muted);
  line-height: 1.8;
}
body.ch-blog-redesign :is(.btArticleMeta, .btArticleSideMeta, .btArticleListItem) a.btArticleAuthor:is(:hover, :focus-visible) { color: var(--ch-link); }
body.ch-blog-redesign :is(.boldShare, .btHasAuthorInfo .btArticleListBody, .btRelatedPosts::before, .btArticleSideinfo) { border-color: var(--ch-border); }
body.ch-blog-redesign :is(.btRelatedPosts > h3, .btCommentsBox > h4, .btCommentsBox .comment-reply-title) {
  color: var(--ch-heading);
  font-family: var(--ch-font-sans);
  font-size: clamp(1.35rem, 1.15rem + .65vw, 1.75rem);
  font-weight: 520;
  line-height: 1.4;
  letter-spacing: -.02em;
}
body.ch-blog-redesign :is(.btRelatedPosts > h3, .btCommentsBox > h4, .btCommentsBox .comment-reply-title)::before { color: var(--ch-accent); }
body.ch-blog-redesign .btAboutAuthor { border: 1px solid var(--ch-border); border-radius: var(--ch-radius-card); background: var(--ch-surface); }
body.ch-blog-redesign .btAboutAuthor .aaTxt { color: var(--ch-text); }
body.ch-blog-redesign .btAboutAuthor .aaTxt h4 { color: var(--ch-heading); font-family: var(--ch-font-sans); font-size: 1.35rem; font-weight: 580; }

/* Sidebar widgets: scoped so headers, cookie dialogs and plugin UIs are untouched. */
body.ch-blog-redesign .btSidebar .btBox:not(.widget_bt_banner_widget) {
  padding: 1.4rem;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius-card);
  color: var(--ch-text);
  background: var(--ch-surface);
  box-shadow: none;
}
body.ch-blog-redesign .btSidebar :is(.btBox, .btCustomMenu, .btTopBox) > :is(h2, h3, h4) {
  margin-bottom: 1.2rem;
  color: var(--ch-heading);
  font-family: var(--ch-font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -.02em;
}
body.ch-blog-redesign .btSidebar :is(.btBox, .btCustomMenu, .btTopBox) > h4::after { border-color: var(--ch-accent); }
body.ch-blog-redesign .btSidebar .btBox :is(p, li) { color: var(--ch-text); font-size: .9375rem; line-height: 1.7; }
body.ch-blog-redesign .btSidebar .btBox li a { color: var(--ch-heading); }
body.ch-blog-redesign .btSidebar .btBox li a:is(:hover, :focus-visible) { color: var(--ch-link); }
body.ch-blog-redesign .btSidebar .btBox li a::before { border-color: var(--ch-accent); }
body.ch-blog-redesign .btSidebar .btBox :is(.posted, time, .post-date, .wp-block-latest-posts__post-date) { color: var(--ch-text-muted); font: 450 .75rem/1.7 var(--ch-font-mono); }
body.ch-blog-redesign .btSidebar .btBox.widget_categories li a > span {
  color: var(--ch-link);
  background: var(--ch-surface-raised);
  box-shadow: 0 0 0 1px var(--ch-border) inset;
}
body.ch-blog-redesign .btSidebar .btBox.widget_categories li a:is(:hover, :focus-visible) > span { color: #fff; background: #0877b5; box-shadow: none; }
body.ch-blog-redesign .btSidebar .tagcloud a { color: var(--ch-link); border: 1px solid var(--ch-border); background: var(--ch-surface-raised); box-shadow: none; }
body.ch-blog-redesign .btSidebar .widget_calendar :is(table, th, td) { border-color: var(--ch-border); color: var(--ch-text); background: var(--ch-surface); }
body.ch-blog-redesign .btSidebar .widget_calendar :is(caption, thead th) { color: var(--ch-heading); background: var(--ch-surface-raised); font-family: var(--ch-font-sans); }
body.ch-blog-redesign .btSidebar .widget_calendar a { color: var(--ch-link); }

/* Search, comment and article forms. Checkbox/radio/hidden controls retain semantics. */
body.ch-blog-redesign :is(.btSidebar, .btCommentsBox, .btArticleBody, .post-password-form) :is(input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], input[type="number"], input[type="tel"], textarea, select),
body.ch-blog-redesign .btContent .wp-block-search__input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2.875rem;
  padding: .7rem .85rem;
  border: 1px solid var(--ch-border);
  border-color: color-mix(in srgb, var(--ch-text-muted) 80%, var(--ch-surface));
  border-radius: .5rem;
  color: var(--ch-text);
  background: var(--ch-surface-raised);
  box-shadow: none;
  font: 400 1rem/1.5 var(--ch-font-sans);
  transition: border-color .2s ease, background-color .2s ease;
}
body.ch-blog-redesign :is(.btSidebar, .btCommentsBox, .btArticleBody, .post-password-form) :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="submit"]), textarea, select):focus,
body.ch-blog-redesign .btContent .wp-block-search__input:focus {
  border-color: var(--ch-accent);
  background: var(--ch-surface);
}
body.ch-blog-redesign :is(.btSidebar, .btCommentsBox, .btArticleBody) textarea { min-height: 10rem; resize: vertical; }
body.ch-blog-redesign :is(.btSidebar, .btCommentsBox, .btArticleBody) :is(input, textarea)::placeholder { color: var(--ch-text-muted); opacity: 1; }
body.ch-blog-redesign .btSidebar .btBox label:not(.screen-reader-text) { display: block; margin-bottom: .5rem; color: var(--ch-heading); font-size: .875rem; }
body.ch-blog-redesign .btSidebar .btSearch { padding-inline-end: 3.4rem; }
body.ch-blog-redesign .btSidebar .btSearch :is(button, input[type="submit"]) {
  width: 2.875rem;
  height: 2.875rem;
  border: 1px solid #0877b5;
  border-radius: .5rem;
  color: #fff;
  background: #0877b5;
  box-shadow: none;
}
body.ch-blog-redesign .btSidebar .btSearch button::before { color: #fff; }
body.ch-blog-redesign .btSidebar .btSearch :is(button, input[type="submit"]):is(:hover, :focus-visible) { border-color: #066493; background: #066493; }
body.ch-blog-redesign :is(.btCommentsBox, .post-password-form) :is(button[type="submit"], input[type="submit"]),
body.ch-blog-redesign .btContent :is(.wp-block-search__button, .wp-block-button__link:not(.has-background), .bdpp-rdmr-btn, .bdp-readmorebtn) {
  min-height: 3.25rem;
  max-width: 100%;
  padding: .85rem 1.35rem;
  border: 2px solid #0877b5;
  border-radius: var(--ch-radius-control);
  color: #fff !important;
  background: #0877b5;
  box-shadow: none;
  font-family: var(--ch-font-sans);
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
body.ch-blog-redesign :is(.btCommentsBox, .post-password-form) :is(button[type="submit"], input[type="submit"]):is(:hover, :focus-visible),
body.ch-blog-redesign .btContent :is(.wp-block-search__button, .wp-block-button__link:not(.has-background), .bdpp-rdmr-btn, .bdp-readmorebtn):is(:hover, :focus-visible) {
  border-color: #066493;
  color: #fff;
  background: #066493;
}
body.ch-blog-redesign .btCommentsBox { color: var(--ch-text); }
body.ch-blog-redesign .btCommentsBox :is(.comment-notes, .logged-in-as, .no-comments) { color: var(--ch-text-muted); font-size: .875rem; line-height: 1.75; }
body.ch-blog-redesign .btCommentsBox .pcItem label { color: var(--ch-heading); font-family: var(--ch-font-sans); font-size: .875rem; font-weight: 650; }
body.ch-blog-redesign .btCommentsBox .pcItem label .required { color: var(--ch-link); }
body.ch-blog-redesign .btCommentsBox button[type="submit"] .btnInnerText { font-size: inherit !important; }
body.ch-blog-redesign .btCommentsBox ul.comments,
body.ch-blog-redesign .btCommentsBox ul.comments > li,
body.ch-blog-redesign .btCommentsBox ul.comments > li.comment > ul.children > li.comment { border-color: var(--ch-border); }
body.ch-blog-redesign .btCommentsBox .commentTxt { min-width: 0; color: var(--ch-text); overflow-wrap: anywhere; }
body.ch-blog-redesign .btCommentsBox .commentTxt .vcard { color: var(--ch-heading); }
body.ch-blog-redesign .btCommentsBox :is(.posted, .reply, .edit-link) { font-family: var(--ch-font-mono); font-size: .75rem; }
body.ch-blog-redesign .btCommentsBox #cancel-comment-reply-link { color: var(--ch-link); background: transparent; font-family: var(--ch-font-sans); font-size: .875rem; }
body.ch-blog-redesign .btCommentsBox .comment-form-cookies-consent { clear: both; display: flex; align-items: flex-start; gap: .7rem; font-size: .875rem; }
body.ch-blog-redesign .btCommentsBox .comment-form-cookies-consent input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: #0877b5; }

/* Pagination and sibling navigation. Leave the parent arrow glyphs intact. */
body.ch-blog-redesign :is(.btPagination, .bdpp-paging, .bdp-post-pagination, .navigation.pagination, .btLinkPages) {
  color: var(--ch-text-muted);
  font-family: var(--ch-font-sans);
  font-size: .9375rem;
  line-height: 1.7;
}
body.ch-blog-redesign .btPagination .paging a { min-height: 2.875rem; color: var(--ch-heading); }
body.ch-blog-redesign .btPagination .paging a::after { border: 1px solid var(--ch-border); border-radius: var(--ch-radius-control); color: var(--ch-link); background: var(--ch-surface); }
body.ch-blog-redesign .btPagination .paging a:is(:hover, :focus-visible)::after { color: #fff; border-color: #0877b5; background: #0877b5; opacity: 1; }
body.ch-blog-redesign .btContent :is(.page-numbers, .bdpp-load-more, .btLinkPages ul a) {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  margin: .2rem;
  padding: .5rem .8rem;
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius-control);
  color: var(--ch-heading) !important;
  background: var(--ch-surface);
  font-family: var(--ch-font-sans);
  font-size: .875rem;
  line-height: 1.5;
  text-decoration: none;
}
body.ch-blog-redesign .btContent :is(.page-numbers.current, a.page-numbers:is(:hover, :focus-visible), .bdpp-load-more:is(:hover, :focus-visible), .btLinkPages ul a:is(:hover, :focus-visible)) { border-color: #0877b5; color: #fff !important; background: #0877b5; }
body.ch-blog-redesign .btContent .page-numbers.dots { border-color: transparent; background: transparent; }
body.ch-blog-redesign .btContent ul.page-numbers { display: flex; flex-wrap: wrap; padding: 0; border: 0; background: transparent; list-style: none; }
body.ch-blog-redesign .btContent ul.page-numbers li { list-style: none; }

/* Blog Designer Pack (current bdpp and older bdp shortcode output). No grid reset. */
body.ch-blog-redesign .btContent :is(.bdpp-post-grid-content, .bdpp-post-carousel-content, .bdpp-post-list-content, .bdp-post-grid-content) {
  color: var(--ch-text);
  border-color: var(--ch-border);
  border-radius: var(--ch-radius-card);
  background-color: var(--ch-surface);
}
body.ch-blog-redesign .btContent :is(.bdpp-post-margin-content, .bdpp-post-slider-wrap.bdpp-design-2 .bdpp-col-right, .bdpp-post-slider-wrap.bdpp-design-1 .bdpp-featured-meta, .bdpp-post-slider-wrap.bdpp-design-2 .bdpp-featured-meta) { color: var(--ch-text); background: var(--ch-surface); }
body.ch-blog-redesign .btContent :is(.bdpp-post-title, .bdp-post-title) { font-family: var(--ch-font-sans); font-weight: 580; line-height: 1.4; letter-spacing: -.025em; overflow-wrap: anywhere; }
body.ch-blog-redesign .btContent :is(.bdpp-post-title a, .bdp-post-title a) { color: var(--ch-heading); }
body.ch-blog-redesign .btContent :is(.bdpp-post-title a, .bdp-post-title a):is(:hover, :focus-visible) { color: var(--ch-link); }
/* Legacy bdp output has Customizer !important colours and a fixed link size. */
body.ch-blog-redesign .btContent .bdp-post-title a { color: var(--ch-heading) !important; font-size: inherit; }
body.ch-blog-redesign .btContent .bdp-post-title a:is(:hover, :focus-visible) { color: var(--ch-link) !important; }
body.ch-blog-redesign .btContent :is(.bdpp-post-meta, .bdpp-post-meta a, .bdp-post-date, .bdp-post-meta) { color: var(--ch-text-muted); font-family: var(--ch-font-mono); font-size: .75rem; line-height: 1.75; }
body.ch-blog-redesign .btContent :is(.bdpp-post-meta span, .bdpp-post-meta .bdpp-post-meta-data) { font-size: inherit; }
body.ch-blog-redesign .btContent :is(.bdpp-post-desc, .bdp-post-short-content) { color: var(--ch-text); font: 400 1rem/1.75 var(--ch-font-sans) !important; }
body.ch-blog-redesign .btContent .bdp-post-image-bg > a > img { max-width: 100%; object-fit: cover; }
body.ch-blog-redesign .btContent .bdpp-post-gridbox-main .bdpp-post-content-overlay {
  --ch-heading: #f4faff;
  --ch-text: #e2ebf1;
  --ch-text-muted: #c4d6e1;
  --ch-link: #8ddcff;
  --ch-accent: #7fcdf5;
  --ch-focus: #80d9ff;
}
body.ch-blog-redesign .btContent .bdpp-post-gridbox-main .bdpp-post-img-bg::before { background: rgb(3 9 12 / 72%); }
body.ch-blog-redesign .btContent .bdpp-ticker-wrp.inf-news-ticker { border-color: var(--ch-border); color: var(--ch-text); background: var(--ch-surface); }
body.ch-blog-redesign .btContent .bdpp-ticker-wrp .inf-label { color: #fff; background: #0877b5; }
body.ch-blog-redesign .btContent .bdpp-ticker-wrp .inf-ticker ul li a { color: var(--ch-heading); }
body.ch-blog-redesign .btContent .bdpp-ticker-wrp .inf-controls span.inf-ctrl-btn { border-color: var(--ch-border); background: var(--ch-surface-raised); }
body.ch-blog-redesign .btContent .bdpp-ticker-wrp .inf-arrow { color: var(--ch-link); }

/* Authored hosting boxes keep their content, icons, links and builder columns. */
body.ch-blog-redesign .btContent .product-boxes {
  border: 1px solid var(--ch-border) !important; /* Builder stores presentation inline. */
  border-radius: var(--ch-radius-card) !important;
  color: var(--ch-text);
  background: var(--ch-surface) !important;
  box-shadow: none;
  transition: border-color .18s ease;
}
body.ch-blog-redesign .btContent .product-boxes:is(:hover, :focus-within) {
  border-color: var(--ch-accent) !important;
  border-color: color-mix(in srgb, var(--ch-accent) 60%, var(--ch-border)) !important;
}
body.ch-blog-redesign .btContent .product-boxes .header :is(h2, h3, h4) {
  color: var(--ch-heading);
  font-family: var(--ch-font-sans);
  font-size: 1.25rem;
  font-weight: 580;
  line-height: 1.4;
  letter-spacing: -.025em;
}
body.ch-blog-redesign .btContent .product-boxes .header .btSubTitle { color: var(--ch-text-muted); font: 400 1rem/1.7 var(--ch-font-sans); }
body.ch-blog-redesign .btContent .product-boxes .header .dash::after { border-color: var(--ch-accent); }
body.ch-blog-redesign .btContent .product-boxes a.boxes {
  display: inline-block;
  max-width: 100%;
  min-height: 2.75rem;
  padding-block: .65rem;
  color: var(--ch-link);
  font: 650 .9375rem/1.65 var(--ch-font-sans);
  text-decoration: none;
  overflow-wrap: anywhere;
}
body.ch-blog-redesign .btContent .product-boxes a.boxes::before { height: 2px; background: var(--ch-accent); }
body.ch-blog-redesign .btContent .product-boxes a.boxes:focus-visible::before { transform: scaleX(1); }

/* Visible focus also overrules Blog Designer Pack's outline:none !important. */
body.ch-blog-redesign :is(.btContent, .btSidebar) :is(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--ch-focus) !important;
  outline-offset: 3px;
}
body.ch-blog-redesign .btContent :is(.btSinglePostImage, .btSinglePostLeftContainer, .btSinglePostBackgroundImage) > a:focus-visible { outline-offset: -5px; }

/* Parent layout is preserved; only cramped side cards and comment columns stack. */
@media (max-width: 767px) {
  body.ch-blog-redesign .btArticle > .port { padding: 1.2rem !important; }
  body.ch-blog-redesign .btArticleBody { font-size: 1rem; line-height: 1.8; }
  body.ch-blog-redesign .btArticleBody :is(.alignleft, .alignright) { float: none; max-width: 100%; margin-inline: 0; }
  body.ch-blog-redesign .btArticleListItem { margin-bottom: 1.75rem; }
  body.ch-blog-redesign .btAboutAuthor { padding: 1.25rem; }
  body.ch-blog-redesign .btAboutAuthor .aaAvatar { width: 4.5rem; }
  body.ch-blog-redesign .btAboutAuthor .aaTxt { padding-inline-start: 1rem; }
  body.ch-blog-redesign .btCommentsBox .comment-form .pcItem.btComment,
  body.ch-blog-redesign .btCommentsBox .comment-form > .row { float: none; width: 100%; padding-inline: 0; }
  body.ch-blog-redesign .btCommentsBox ul.comments ul.children { margin-inline-start: 1rem; }
}
@media (max-width: 660px) {
  body.ch-blog-redesign .btSinglePostTemplate.home-main-slider { flex-direction: column; }
  body.ch-blog-redesign .btSinglePostTemplate.home-main-slider > .btPostImageHolder { width: 100%; min-height: 13rem; }
  body.ch-blog-redesign .btSinglePostTemplate.home-main-slider > .btSinglePostContent { display: flex; width: 100%; padding: 1.25rem; }
  body.ch-blog-redesign .btSinglePostTemplate.home-main-slider .btSinglePostLeftImage { border-radius: var(--ch-radius-card) var(--ch-radius-card) 0 0; }
  body.ch-blog-redesign .btSinglePostTemplate.home-main-slider .btSinglePostContent .btSinglePostExcerpt { display: -webkit-box; max-height: 5.25em; -webkit-line-clamp: 3; }
}
@media (max-width: 479px) {
  body.ch-blog-redesign .btArticle > .port { padding: 1rem !important; }
  body.ch-blog-redesign .btSinglePostTemplate:is(.leftImagePosition, .rightImagePosition, .sideImagePosition):not(.smallTemplate) { flex-direction: column; }
  body.ch-blog-redesign .btSinglePostTemplate:is(.leftImagePosition, .rightImagePosition, .sideImagePosition):not(.smallTemplate) > .btPostImageHolder { width: 100%; min-height: 12rem; }
  body.ch-blog-redesign .btSinglePostTemplate:is(.leftImagePosition, .rightImagePosition, .sideImagePosition):not(.smallTemplate) > .btSinglePostContent { width: 100%; padding: 1.2rem; }
  body.ch-blog-redesign .btSinglePostTemplate:is(.leftImagePosition, .rightImagePosition, .sideImagePosition):not(.smallTemplate) .btSinglePostLeftImage { border-radius: var(--ch-radius-card) var(--ch-radius-card) 0 0; }
  body.ch-blog-redesign .btSinglePostTemplate .btSinglePostContent .btSinglePostTopData :is(.btArticleAuthor, .btArticleDate) { float: none; display: block; text-align: start; margin-inline: 0; }
  body.ch-blog-redesign .btSinglePostTemplate .btSinglePostContent .btSinglePostTopData .btArticleAuthor img { float: none; margin: 0 .35rem 0 0; vertical-align: middle; }
  body.ch-blog-redesign .btSinglePostTemplate.backgroundImagePosition { min-height: 19rem; }
  body.ch-blog-redesign .btSidebar .btBox:not(.widget_bt_banner_widget) { padding: 1rem; }
  body.ch-blog-redesign .btArticleBody blockquote { padding: 1rem; }
  body.ch-blog-redesign .btAboutAuthor { display: block; }
  body.ch-blog-redesign .btAboutAuthor :is(.aaAvatar, .aaTxt) { display: block; padding: 0; }
  body.ch-blog-redesign .btAboutAuthor .aaAvatar { margin-bottom: 1rem; }
  body.ch-blog-redesign .btCommentsBox ul.comments li > article { display: flex; padding-inline: 0; }
  body.ch-blog-redesign .btCommentsBox ul.comments li > article .commentAvatar { display: block; flex: 0 0 3.25rem; width: 3.25rem; padding: 1rem .75rem 1rem 0; }
  body.ch-blog-redesign.rtl .btCommentsBox ul.comments li > article .commentAvatar { padding: 1rem 0 1rem .75rem; }
  body.ch-blog-redesign .btCommentsBox ul.comments li > article .commentTxt { display: block; flex: 1 1 auto; width: 0; padding-block: 1rem; }
  body.ch-blog-redesign .btCommentsBox ul.comments ul.children { margin-inline-start: .65rem; }
  body.ch-blog-redesign .btContent .wp-block-search__inside-wrapper { flex-wrap: wrap; gap: .5rem; }
  body.ch-blog-redesign .btContent .wp-block-search__button { margin-inline-start: 0; }
  body.ch-blog-redesign .btPagination .paging { max-width: 100%; float: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.ch-blog-redesign :is(.btSinglePostTemplate, .btSinglePostImage img, .btSinglePostLeftContainer, .btSinglePostBackgroundImage, .btArticleListItem.animate, .bdpp-post-img-bg img, .bdpp-post-gridbox-main .bdpp-post-img-bg) { animation: none !important; transition: none !important; transform: none !important; }
  body.ch-blog-redesign .btArticleListItem.animate { opacity: 1 !important; }
  body.ch-blog-redesign .btSinglePostTemplate :is(.btSinglePostImage, .btSinglePostLeftImage)::before,
  body.ch-blog-redesign .btSinglePostTemplate :is(.btSinglePostImage, .btSinglePostLeftImage)::after { transition: none !important; }
}
@media print {
  body.ch-blog-redesign .btArticle > .port { padding: 0 !important; border: 0; box-shadow: none; }
  body.ch-blog-redesign .btArticleBody { color: #000; font-size: 11pt; }
  body.ch-blog-redesign .btArticleBody :is(h1, h2, h3, h4, h5, h6) { color: #000; break-after: avoid; }
  body.ch-blog-redesign .btArticleBody :is(pre, blockquote) { color: #000; background: #fff; border-color: #888; }
  body.ch-blog-redesign .btArticleBody pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  body.ch-blog-redesign .btArticleBody table { display: table; }
}
