/* ==========================================================================
   Class Intercom Blog Post Template (ported from the approved v5 blog design) — scoped stylesheet
   Everything lives under .ci-blog so it cannot leak into the rest of the site.
   1 tokens · 2 header · 3 body type · 4 headings · 5 layout pieces
   6 old-post overrides · 7 after-the-post modules · 8 responsive
   Layout idea: one centered axis. Title, byline and a 760px text column are
   centered; pull quotes, columns and wide photos run wider (1080). The page is
   white. Only the title area carries a soft mint tint that fades out to white.
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
.ci-blog {
  --pine:   #074240;   /* Pine: secondary, dark sections, card titles */
  --pine-black: #05302E; /* hover state only */
  --teal:   #0E6D6B;   /* Teal: primary, links, buttons */
  --sage:   #6FA3A2;   /* Sage: mid accent */
  --mint:   #E2F0EF;   /* Mint: light tint */
  --navy:   #16243F;   /* family thread: headings */
  --gold:   #D9B86A;   /* accent only */
  --ink:    #1A1F24;
  --white:  #FFFFFF;
  --mist-0: #FAFBFC; --mist-1: #F2F4F6; --mist-2: #E5E7EA; --mist-3: #CDD1D6;
  --mist-4: #A8AEB5; --mist-5: #6A7079; --mist-6: #44494F;
  --wash: #E9F3F2;    /* soft mint tint, used only at the top of the title area */
  --font-heading: 'azo-sans-web','Azo Sans','Montserrat',sans-serif;
  --font-sub: 'Montserrat', sans-serif;
  --font-body: 'Lato', sans-serif;
  --measure: 820px;   /* reading column */
  --wide: 1080px;     /* widest element */
  --gutter: 32px;
  font-family: var(--font-body);
  color: var(--mist-6);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
.ci-blog *, .ci-blog *::before, .ci-blog *::after { box-sizing: border-box; }
.ci-blog [hidden] { display: none !important; }
.ci-blog .ci-wrap { max-width: calc(var(--wide) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* 2. POST HEADER (theme template, not post content) ------------------------ */
.ci-blog .ci-post-head {
  padding: 48px 0 64px; text-align: center;
  background: linear-gradient(180deg, var(--wash) 0%, var(--white) 100%);   /* title area: soft Mint at the top, fading to white */
}
.ci-blog .ci-crumbs { font: 400 14px/1.4 var(--font-body); margin-bottom: 32px; }
.ci-blog .ci-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ci-blog .ci-crumbs li + li::before { content: "/"; color: var(--mist-5); margin-right: 8px; }
.ci-blog .ci-crumbs a { color: var(--teal); text-decoration: underline; text-underline-offset: 0.15em; }
.ci-blog .ci-crumbs a:hover { color: var(--pine-black); }
.ci-blog .ci-crumbs [aria-current] { color: var(--mist-6); }

.ci-blog .ci-post-head h1 {
  font: 700 clamp(34px, 4.8vw, 52px)/1.12 var(--font-heading); color: var(--pine); letter-spacing: -0.01em;
  margin: 0 auto 24px; max-width: 960px; text-wrap: balance;
}
.ci-blog .ci-byline { font: 400 15px/1.6 var(--font-body); color: var(--mist-6); margin: 0; }
.ci-blog .ci-byline a { font-weight: 700; color: var(--ink); text-decoration: none; }
.ci-blog .ci-byline a:hover { text-decoration: underline; }
.ci-blog .ci-byline .ci-dot::before { content: "·"; margin: 0 10px; color: var(--mist-5); }

.ci-blog .ci-byline::after { content: ""; display: block; width: 56px; height: 3px; border-radius: 2px; background: var(--gold); margin: 28px auto 0; }

/* Featured image: small, lives with the title, always at its own proportions, never cropped.
   Placement: centered under the byline. */
.ci-blog .ci-head-img { display: none; }
.ci-blog .ci-head-img img { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--mist-2); }
.ci-blog[data-img="under"] .ci-head-img { display: block; width: min(300px, 100%); margin: 36px auto 0; }

/* 3. BODY TYPOGRAPHY (the_content) ----------------------------------------- */
.ci-blog .ci-post {
  max-width: calc(var(--wide) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter) 64px;
  font: 400 19px/1.7 var(--font-body); color: var(--mist-6);
}
.ci-blog .ci-post :is(p, ul, ol, h1, h2, h3, h4, h5, h6, table, hr, figcaption, .wp-block-buttons) { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.ci-blog .ci-post p { margin-top: 0; margin-bottom: 24px; text-wrap: pretty; }
.ci-blog .ci-post > p:first-child:not(.ci-note),
.ci-blog .ci-post > p.ci-note:first-child ~ p:not(.ci-note ~ p ~ p),
.ci-blog .ci-post > .wp-block-group:first-child p:first-of-type:not(.ci-note),
.ci-blog .ci-post > .wp-block-group:first-child p.ci-note:first-of-type ~ p:not(.ci-note ~ p ~ p) {
  font-size: 22px; line-height: 1.6; color: var(--ink);       /* lede: first paragraph of any post */
}
/* Drop cap on the lede */
.ci-blog .ci-post > p:first-child:not(.ci-note)::first-letter,
.ci-blog .ci-post > p.ci-note:first-child ~ p:not(.ci-note ~ p ~ p)::first-letter,
.ci-blog .ci-post > .wp-block-group:first-child p:first-of-type:not(.ci-note)::first-letter,
.ci-blog .ci-post > .wp-block-group:first-child p.ci-note:first-of-type ~ p:not(.ci-note ~ p ~ p)::first-letter {
  float: left; font: 700 3.4em/0.85 var(--font-sub); color: var(--pine); padding: 4px 10px 0 0;
}
/* Opening note: a short line set entirely in italics before the post starts ("Originally posted on…", "A letter from…").
   The heading filter adds .ci-note. Centered, smaller text in a thin grey outline; the lead-in moves to the next paragraph. */
.ci-blog .ci-post p.ci-note {
  width: fit-content; max-width: var(--measure); margin: 0 auto 40px; padding: 12px 24px;
  border: 1px solid var(--mist-3); border-radius: 12px; background: none;
  font-size: 16px; line-height: 1.5; font-style: italic; text-align: center; color: var(--mist-6); text-wrap: balance;
}
.ci-blog .ci-post p.ci-note :is(em, i, strong, b) { font-weight: inherit; font-style: inherit; color: inherit; }

/* Plain Image blocks line up with the text column instead of the wide edge. "Medium" images stay small. */
.ci-blog .ci-post figure.wp-block-image:not(.alignwide):not(.alignfull) { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.ci-blog .ci-post figure.wp-block-image.size-medium img { max-width: min(100%, 300px); }
/* Sign-off: a small headshot right before the post's last paragraph, when that paragraph starts with a bold name (letters).
   The photo becomes a small round avatar beside the name and contact line. */
.ci-blog .ci-post figure.wp-block-image:is(.size-thumbnail, .size-medium):has(+ p:last-child > strong:first-child) {
  float: left; width: 72px; margin: 8px 16px 0 max(0px, calc(50% - var(--measure) / 2));
}
.ci-blog .ci-post figure.wp-block-image:is(.size-thumbnail, .size-medium):has(+ p:last-child > strong:first-child) img {
  display: block; width: 72px; height: 72px; max-width: none; object-fit: cover; border-radius: 50%;
}
.ci-blog .ci-post figure.wp-block-image:is(.size-thumbnail, .size-medium) + p:last-child:has(> strong:first-child) { padding-top: 12px; }
.ci-blog .ci-post figure.wp-block-image:is(.size-thumbnail, .size-medium) + p:last-child:has(> strong:first-child)::after { content: ""; display: block; clear: both; }
.ci-blog .ci-post a { color: var(--teal); text-decoration: underline; text-underline-offset: 0.15em; transition: color 0.15s ease; }
.ci-blog .ci-post a:hover { color: var(--pine-black); }
.ci-blog .ci-post strong, .ci-blog .ci-post b { font-weight: 700; color: var(--ink); }

.ci-blog .ci-post :is(ul, ol) { margin-top: 0; margin-bottom: 24px; padding-left: 24px; }
.ci-blog .ci-post li { margin: 0 0 8px; padding-left: 4px; text-wrap: pretty; }
.ci-blog .ci-post ul li::marker { color: var(--teal); }
.ci-blog .ci-post ol li::marker { color: var(--teal); font: 700 17px var(--font-sub); }

.ci-blog .ci-post hr { border: 0; border-top: 1px solid var(--mist-3); margin-top: 48px; margin-bottom: 48px; }
.ci-blog .ci-post table { width: 100%; border-collapse: collapse; margin-top: 0; margin-bottom: 24px; font-size: 16px; }
.ci-blog .ci-post :is(th, td) { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--mist-2); }
.ci-blog .ci-post th { font: 700 14px var(--font-sub); color: var(--pine); background: var(--mint); }

/* Images: always shown at their own proportions */
.ci-blog .ci-post img { max-width: 100%; height: auto; border-radius: 12px; background: var(--mist-2); }
.ci-blog .ci-post img.emoji { border-radius: 0; background: none; }
.ci-blog .ci-post figure { margin: 0 0 32px; }
.ci-blog .ci-post :is(figcaption, .wp-element-caption) { font: 400 14px/1.5 var(--font-body); color: var(--mist-5); margin-top: 12px; text-wrap: pretty; }

/* Social embeds (Facebook / Instagram) */
.ci-blog .ci-post iframe { display: block; max-width: 100%; margin: 32px auto; border: 0; }
.ci-blog .ci-post .instagram-media { margin: 32px auto !important; max-width: 540px !important; min-width: 0 !important; width: calc(100% - 2px) !important; }
.ci-blog .ci-post :is(.fb-post, .wp-block-embed) { margin: 32px auto; max-width: 540px; }

/* Buttons — every button in every post, new or old */
.ci-blog .ci-post .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 0; margin-bottom: 0; }
.ci-blog .ci-post .wp-block-button .wp-block-button__link,
.ci-blog .ci-post a.wp-block-button__link {
  display: inline-block; background: var(--teal) !important; color: var(--white) !important;
  border: 2px solid var(--teal); border-radius: 8px !important; padding: 12px 24px !important;
  font: 600 15px/1.4 var(--font-sub) !important; text-decoration: none; transition: background 0.15s ease, border-color 0.15s ease;
}
.ci-blog .ci-post .wp-block-button .wp-block-button__link:hover { background: var(--pine) !important; border-color: var(--pine); color: var(--white) !important; }
.ci-blog .ci-post .wp-block-button.is-style-outline .wp-block-button__link { background: transparent !important; color: var(--teal) !important; }
.ci-blog .ci-post .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--mint) !important; color: var(--pine) !important; }

/* 4. HEADINGS — three personalities ---------------------------------------- */
.ci-blog .ci-post :is(h1, h2, h3, h4, h5, h6) { font-family: var(--font-sub); color: var(--pine); text-wrap: balance; margin-top: 56px; margin-bottom: 16px; }
.ci-blog .ci-post :is(h1, h2) { font-size: 32px; font-weight: 500; line-height: 1.25; }          /* section heading */
.ci-blog .ci-post h3 { font-size: 24px; font-weight: 600; line-height: 1.3; }
.ci-blog .ci-post h4 { font-size: 22px; font-weight: 600; line-height: 1.35; }
.ci-blog .ci-post :is(h5, h6) { font-size: 18px; font-weight: 700; line-height: 1.4; }
.ci-blog .ci-post h2.ci-was-h4 { font-size: 22px; font-weight: 600; line-height: 1.35; }            /* old H4s, promoted to H2 for search */
.ci-blog .ci-post h2.ci-was-h3 { font-size: 26px; font-weight: 600; line-height: 1.3; }
.ci-blog .ci-post :is(h1,h2,h3,h4,h5,h6):first-child { margin-top: 0; }

/* Numbered tip heading (starts with #1. or 1.): small, bold, teal number */
.ci-blog .ci-post .ci-tip { font-size: 19px; font-weight: 700; line-height: 1.4; margin-top: 40px; margin-bottom: 8px; }
.ci-blog .ci-post .ci-tip .ci-num { color: var(--teal); margin-right: 6px; }

/* 5. LAYOUT PIECES --------------------------------------------------------- */

/* 5a. Fallback only: if a post could not be normalized (see inc/blog-clean.php), keep old Group wrappers from spreading across the page. */
.ci-blog .ci-post .wp-block-group { display: flow-root; width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; position: static !important; transform: none !important; }
.ci-blog .ci-post :is(.wp-block-group:empty, p:empty) { display: none; }

/* 5b. Wide pieces: full 1080 width, centered */
.ci-blog .ci-post :is(.alignwide, .ci-wide) { max-width: none; width: 100%; }
.ci-blog .ci-post :is(.alignwide, .ci-wide) img { width: 100%; }

/* 5c. Pull quote — Quote block, Pullquote block, or the old hand-built grey quote box */
.ci-blog .ci-post :is(.wp-block-quote, .wp-block-pullquote, .is-style-ci-pullquote, blockquote:not(.instagram-media):not(.twitter-tweet)) {
  max-width: var(--wide); margin: 48px auto; padding: 40px 48px; background: var(--mint); border: 0; border-radius: 12px; color: var(--pine);
}
.ci-blog .ci-post :is(.wp-block-quote, .wp-block-pullquote, .is-style-ci-pullquote, blockquote:not(.instagram-media):not(.twitter-tweet)) p {
  max-width: none; font: 500 24px/1.45 var(--font-sub); color: var(--pine); margin: 0; text-wrap: balance;
}
.ci-blog .ci-post :is(.wp-block-quote, .wp-block-pullquote, blockquote) cite {
  display: block; margin-top: 24px; font: 700 15px/1.4 var(--font-body); font-style: normal; color: var(--pine);
}

/* 5d. Callout — Group block > Styles > "Callout" */
.ci-blog .ci-post .is-style-ci-callout {
  max-width: var(--measure); margin: 40px auto; padding: 32px !important; background: var(--white);
  border: 1px solid var(--mist-3); border-radius: 12px;
}
.ci-blog .ci-post .is-style-ci-callout > :last-child { margin-bottom: 0; }
.ci-blog .ci-post .is-style-ci-callout :is(h2,h3,h4,h5) { margin-top: 0 !important; font-size: 20px; }

/* 5e. Key Takeaways — Group block > Styles > "Key Takeaways" (answer-first box at the top of a post; same look as the webinar page's Key Takeaways) */
.ci-blog .ci-post .is-style-ci-summary {
  max-width: var(--measure); margin: 0 auto 40px; padding: 28px !important; background: var(--white);
  border: 1px solid var(--mist-2); border-radius: 12px; box-shadow: 0 4px 16px rgba(5,48,46,0.08);
}
.ci-blog .ci-post .is-style-ci-summary > :last-child { margin-bottom: 0; }
.ci-blog .ci-post .is-style-ci-summary :is(h2,h3,h4,h5) { margin: 0 0 20px !important; font-size: 20px; }
.ci-blog .ci-post .is-style-ci-summary :is(p, li) { font-size: 17px; line-height: 1.55; color: var(--ink); }
.ci-blog .ci-post .is-style-ci-summary ul { list-style: none; margin: 0; padding: 0; max-width: none; display: flex; flex-direction: column; gap: 20px; }
.ci-blog .ci-post .is-style-ci-summary li { position: relative; margin: 0; padding: 0 0 0 28px; }
.ci-blog .ci-post .is-style-ci-summary li::marker { content: none; }
.ci-blog .ci-post .is-style-ci-summary li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E6D6B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 5g. Signature — Paragraph block > Styles > "Signature" (letters: the handwritten sign-off, followed by the name in print and an email) */
.ci-blog .ci-post p.is-style-ci-signature { font: 500 52px/1.1 'Caveat', cursive; color: var(--navy); margin-top: -8px; margin-bottom: 12px; transform: rotate(-2deg); transform-origin: left center; letter-spacing: 0.01em; }

/* 5f. Fallback only: Columns that were not rebuilt stack and stay inside the page */
.ci-blog .ci-post .wp-block-columns { display: flex; flex-wrap: wrap; gap: 32px; margin: 40px auto; max-width: none; }
.ci-blog .ci-post .wp-block-columns > .wp-block-column { flex: 1 1 280px; min-width: 0; margin: 0; }
.ci-blog .ci-post .wp-caption { width: 100% !important; max-width: 100% !important; margin: 0 0 24px; }
.ci-blog .ci-post .wp-caption img { display: block; width: 100%; height: auto; }
.ci-blog .ci-post .wp-caption-text { font: 400 14px/1.5 var(--font-body); color: var(--mist-5); margin: 12px 0 0; max-width: none; text-wrap: pretty; }

/* 5g. Pull quotes are centered: the Mint panel runs wider than the text column, so a centered quote reads as a deliberate break. */
.ci-blog .ci-post :is(.wp-block-quote, .wp-block-pullquote, .is-style-ci-pullquote, blockquote:not(.instagram-media):not(.twitter-tweet)) { text-align: center; }
.ci-blog .ci-post :is(.wp-block-quote, .wp-block-pullquote, .is-style-ci-pullquote, blockquote:not(.instagram-media):not(.twitter-tweet)) :is(p, cite) { max-width: var(--measure); margin-left: auto; margin-right: auto; }

/* 7. AFTER-THE-POST MODULES (theme template) ------------------------------- */
.ci-blog .ci-after { padding-bottom: 96px; }
.ci-blog .ci-topics { max-width: var(--measure); margin: 0 auto 40px; padding-top: 24px; border-top: 1px solid var(--mist-3); font: 400 15px/1.8 var(--font-body); }
.ci-blog .ci-topics strong { font: 700 13px var(--font-sub); color: var(--pine); margin-right: 12px; }
.ci-blog .ci-topics ul { display: inline; list-style: none; margin: 0; padding: 0; }
.ci-blog .ci-topics li { display: inline-block; white-space: nowrap; }
.ci-blog .ci-topics li + li::before { content: "·"; margin: 0 10px; color: var(--mist-5); }
.ci-blog .ci-topics a { color: var(--teal); text-decoration: underline; text-underline-offset: 0.15em; }
.ci-blog .ci-topics a:hover { color: var(--pine-black); }

.ci-blog .ci-author { max-width: var(--measure); margin: 0 auto; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 24px; padding: 32px 0; border-top: 1px solid var(--mist-3); border-bottom: 1px solid var(--mist-3); }
.ci-blog .ci-author .ci-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--pine); color: var(--white); display: grid; place-items: center; font: 700 20px/1 var(--font-sub); overflow: hidden; }
.ci-blog .ci-author .ci-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-blog .ci-author-label { font: 600 13px/1.3 var(--font-sub); color: var(--mist-5); margin: 0 0 4px; }
.ci-blog .ci-author-name { font: 700 20px/1.3 var(--font-sub); color: var(--pine); margin: 0; }
.ci-blog .ci-author-role { font: 400 15px/1.5 var(--font-body); color: var(--mist-6); margin: 2px 0 12px; }
.ci-blog .ci-author-bio { font: 400 16px/1.65 var(--font-body); color: var(--mist-6); margin: 0 0 16px; text-wrap: pretty; }

.ci-blog .link-arrow { display: inline-flex; align-items: center; gap: 8px; font: 700 15px/1.4 var(--font-sub); color: var(--teal); text-decoration: none; }
.ci-blog .link-arrow:hover { text-decoration: underline; color: var(--pine-black); }
.ci-blog .link-arrow svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.15s ease; }
.ci-blog .link-arrow:hover svg.arrow-fwd { transform: translateX(4px); }
.ci-blog .link-arrow:hover svg.arrow-back { transform: translateX(-4px); }

.ci-blog .ci-more { padding-top: 64px; text-align: center; }
.ci-blog .ci-more h2 { font: 500 28px/1.25 var(--font-sub); color: var(--pine); margin: 0 0 32px; }
.ci-blog .ci-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 32px; text-align: left; }
.ci-blog .ci-card { display: flex; flex-direction: column; border: 1px solid var(--mist-2); border-radius: 12px; overflow: hidden; background: var(--white); color: inherit; text-decoration: none; transition: box-shadow 0.15s ease; }
.ci-blog .ci-card:hover { box-shadow: 0 8px 24px rgba(22, 36, 63, 0.10); }
.ci-blog .ci-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 628; object-fit: cover; background: var(--mist-2); }
.ci-blog .ci-card-body { padding: 20px 24px 24px; }
.ci-blog .ci-card-title { font: 700 17px/1.35 var(--font-sub); color: var(--pine); margin: 0 0 12px; text-wrap: balance; }
.ci-blog .ci-card:hover .ci-card-title { text-decoration: underline; }
.ci-blog .ci-card-meta { font: 400 14px/1.4 var(--font-body); color: var(--mist-6); margin: 0; }

.ci-blog .ci-explore { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 64px; }
.ci-blog .ci-tile { background: var(--mist-1); border-radius: 12px; padding: 32px; }
.ci-blog .ci-tile h2 { font: 700 18px/1.35 var(--font-sub); color: var(--pine); margin: 0 0 8px; }
.ci-blog .ci-tile p { font: 400 16px/1.6 var(--font-body); color: var(--mist-6); margin: 0 0 16px; }

/* 8. RESPONSIVE ------------------------------------------------------------ */
@media (max-width: 767px) {
  .ci-blog { --gutter: 16px; }
    .ci-blog .ci-post-head { padding: 32px 0 48px; }
  .ci-blog .ci-post-head h1 { font-size: 29px; }
  .ci-blog .ci-crumbs { margin-bottom: 24px; }
  .ci-blog[data-img="under"] .ci-head-img { margin-top: 28px; }
  .ci-blog .ci-post { font-size: 17px; }
  .ci-blog .ci-post > p:first-child:not(.ci-note), .ci-blog .ci-post > p.ci-note:first-child ~ p:not(.ci-note ~ p ~ p), .ci-blog .ci-post > .wp-block-group:first-child p:first-of-type:not(.ci-note), .ci-blog .ci-post > .wp-block-group:first-child p.ci-note:first-of-type ~ p:not(.ci-note ~ p ~ p) { font-size: 20px; }
  .ci-blog .ci-post :is(h1, h2) { font-size: 28px; }
  .ci-blog .ci-post h3, .ci-blog .ci-post h2.ci-was-h3 { font-size: 22px; }
  .ci-blog .ci-post h4, .ci-blog .ci-post h2.ci-was-h4 { font-size: 20px; }
  .ci-blog .ci-post .ci-tip { font-size: 18px; }
  .ci-blog .ci-post .wp-block-columns { flex-direction: column; align-items: stretch; gap: 24px; }
  .ci-blog .ci-post :is(.wp-block-quote, .wp-block-pullquote, .is-style-ci-pullquote, blockquote:not(.instagram-media):not(.twitter-tweet)) { padding: 24px; }
  .ci-blog .ci-post :is(.wp-block-quote, .wp-block-pullquote, blockquote:not(.instagram-media):not(.twitter-tweet)) p { font-size: 20px; }
  .ci-blog .ci-post .wp-block-buttons .wp-block-button, .ci-blog .ci-post .wp-block-buttons .wp-block-button__link { width: 100%; text-align: center; }
  .ci-blog .ci-cards, .ci-blog .ci-explore { grid-template-columns: minmax(0, 1fr); }
  .ci-blog .ci-author { grid-template-columns: 48px minmax(0, 1fr); gap: 16px; }
  .ci-blog .ci-author .ci-avatar { width: 48px; height: 48px; font-size: 16px; }
  .ci-blog .ci-more { padding-top: 48px; }
  .ci-blog .ci-explore { margin-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .ci-blog * { transition: none !important; }
  .ci-blog .link-arrow:hover svg { transform: none !important; }
}




/* ════════ DESIGN REVIEW + HANDOFF UPDATES ════════ */
/* The post area runs full width inside the site's theme (title tint edge to edge) */
.ci-blog { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
html, body { overflow-x: hidden; }
.ci-blog .ci-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Subheading: optional second line under a long title (Q&A, series name, "how to" clause), a <p> after the H1 */
.ci-blog .ci-post-head h1:has(+ .ci-subhead) { margin-bottom: 16px; }
.ci-blog .ci-subhead { font: 500 clamp(19px, 2.3vw, 25px)/1.4 var(--font-sub); color: var(--mist-6); margin: 0 auto 24px; max-width: 760px; text-wrap: balance; }

/* Key Takeaways box at the top of a post (answer-first summary), in the reading column */
.ci-blog .ci-post-summary { max-width: calc(var(--measure) + var(--gutter) * 2); margin: 0 auto 48px; padding: 0 var(--gutter); }
.ci-blog .ci-post-summary .ci-takeaways li { font-size: 18px; }

/* Letter sign-off: closing line, cursive signature, printed name, email */
.ci-blog .ci-post .ci-signoff { max-width: var(--measure); margin: 8px auto 0; }
.ci-blog .ci-post .ci-signoff p { margin: 0; }
.ci-blog .ci-post .ci-signoff-closing { margin-bottom: 4px !important; }
.ci-blog .ci-post .ci-signoff-signature {
  font: 500 52px/1.1 'Caveat', cursive; color: var(--navy); margin: 4px 0 12px !important;
  transform: rotate(-2deg); transform-origin: left center; letter-spacing: 0.01em;
}
.ci-blog .ci-post .ci-signoff-name { font: 700 17px/1.4 var(--font-sub); color: var(--ink); }
.ci-blog .ci-post .ci-signoff-email { font-size: 16px; }

/* Links on Mint / Mist backgrounds use Pine (Teal also passes AA; Pine reads stronger) */
.ci-blog .ci-crumbs a, .ci-blog .ci-tile .link-arrow { color: var(--pine); }
.ci-blog .ci-crumbs a:hover, .ci-blog .ci-tile .link-arrow:hover { color: var(--teal); }

/* About the Author: headshot or initials */
.ci-blog .ci-author .ci-avatar { background: var(--pine); }
.ci-blog .ci-author .ci-avatar img { border-radius: 50%; }
.ci-blog .ci-card { position: relative; }
.ci-blog .ci-card > .dl-img-empty { position: relative; aspect-ratio: 1200 / 628; }
@media (max-width: 767px) {
  .ci-blog .ci-post .ci-signoff-signature { font-size: 44px; }
}

/* Key Takeaways box (same component on blog posts and webinars) */
.ci-blog .ci-takeaways {
  background: var(--white); border: 1px solid var(--mist-2); border-radius: 12px; padding: 28px;
  box-shadow: 0 4px 16px rgba(7,66,64,0.08); color: var(--ink);
}
.ci-blog .ci-takeaways-title { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 22px; line-height: 1.3; color: var(--navy); margin: 0 0 20px; letter-spacing: normal; }
.ci-blog .ci-takeaways ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; max-width: none; }
.ci-blog .ci-takeaways li { position: relative; margin: 0; padding: 0 0 0 28px; font: 400 17px/1.55 'Lato', sans-serif; color: var(--ink); }
.ci-blog .ci-takeaways li::marker { content: none; }
.ci-blog .ci-takeaways li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E6D6B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* No featured image: an on-brand placeholder fills the same frame */
.ci-blog .dl-img-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--mint); color: var(--teal);
}
.ci-blog .dl-img-empty svg { width: 32px; height: 32px; }
.ci-rl-editor-note { display: block; padding: 16px; border: 1.5px dashed currentColor; border-radius: 8px; font: 400 14px/1.5 'Lato', sans-serif; }

/* Pages end flush with the site footer. Themes can add a gap above the footer that shows the page background as a band. These selectors cover the common footer wrappers; confirm on staging and adjust the one rule if the theme differs. */
body:has(.ci-dl, .ci-dlp, .ci-bh-full, .ci-blog, .ci-wb, .ci-wbp) :is(#footer-outer, .site-footer, #colophon, footer.footer) { margin-top: 0 !important; }
body:has(.ci-dl, .ci-dlp, .ci-bh-full, .ci-blog, .ci-wb, .ci-wbp) :is(#ajax-content-wrap > .container-wrap, .container-wrap, #main, main.site-main) { padding-bottom: 0 !important; margin-bottom: 0 !important; }

/* ════════ 1.1.4 SHARED: forms ════════ */
/* reCAPTCHA: the badge is hidden (it keeps working) and Google's required notice sits under the privacy line instead */
:is(.ci-dl, .ci-dlp, .ci-bh-full, .ci-blog, .ci-wb, .ci-wbp) .hs-recaptcha {
  position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important;
  margin: 0 !important; padding: 0 !important; clip-path: inset(50%); white-space: nowrap;
}
body:has(.ci-dl, .ci-dlp, .ci-bh-full, .ci-blog, .ci-wb, .ci-wbp) .grecaptcha-badge { visibility: hidden !important; }
.ci-recaptcha-note { display: block; margin-top: 6px; font-size: 12px !important; line-height: 1.5; font-weight: 400; letter-spacing: normal; text-transform: none; }
.ci-recaptcha-note a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.ci-recaptcha-note a:hover { opacity: 0.85; }
/* Form buttons: same case on every form (HubSpot / the theme may set all caps) */
:is(.ci-dl, .ci-dlp, .ci-bh-full, .ci-blog, .ci-wb, .ci-wbp) .hs-form :is(.hs-button, input[type="submit"]) { text-transform: none !important; letter-spacing: normal !important; }


/* 9. NORMALIZED POSTS (1.3.1) ------------------------------------------------ */
/* inc/blog-clean.php rebuilds every post into the same small set of pieces. This is all the layout CSS they need:
   text column (820), wide pieces (1080), and these classes: .ci-split .ci-gallery .ci-embed .ci-float .ci-sized .ci-fig
   .ci-label .ci-btn .ci-btn-row .ci-closing .ci-table-wrap .ci-pullquote */
.ci-blog .ci-post { display: flow-root; overflow-wrap: anywhere; }
.ci-blog .ci-post :is(h1, h2, h3, h4, h5, h6, hr, .ci-split, .ci-gallery, .ci-embed, .ci-pullquote, .ci-closing) { clear: both; }
.ci-blog .ci-post :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) { margin-top: 12px; }
.ci-blog .ci-post .ci-center { text-align: center; }

/* Bold-only line = subhead (old posts used a bold line instead of a heading) */
.ci-blog .ci-post p.ci-label { font: 700 20px/1.4 var(--font-sub); color: var(--pine); margin-top: 36px; margin-bottom: 8px; text-wrap: balance; }
.ci-blog .ci-post p.ci-label strong, .ci-blog .ci-post p.ci-label b { font: inherit; color: inherit; }

/* Photo or embed beside text: side by side on wide screens, stacked on phones */
.ci-blog .ci-post .ci-split { display: grid; grid-template-columns: minmax(0, min(var(--ci-m, 40%), 340px)) minmax(0, 1fr); gap: 40px; align-items: start; max-width: var(--measure); margin: 40px auto; }
.ci-blog .ci-post .ci-split--text-first { grid-template-columns: minmax(0, 1fr) minmax(0, min(var(--ci-m, 40%), 340px)); }
.ci-blog .ci-post .ci-split--small { align-items: center; gap: 24px; margin: 16px auto; grid-template-columns: minmax(0, min(var(--ci-m, 25%), 120px)) minmax(0, 1fr); }
.ci-blog .ci-post .ci-split :is(p, ul, ol, h1, h2, h3, h4, h5, h6, figure, table) { max-width: none; margin-left: 0; margin-right: 0; }
.ci-blog .ci-post .ci-split__text > :first-child, .ci-blog .ci-post .ci-split__media > :first-child { margin-top: 0; }
.ci-blog .ci-post .ci-split__text > :last-child, .ci-blog .ci-post .ci-split__media > :last-child { margin-bottom: 0; }
.ci-blog .ci-post .ci-split__media figure { margin-top: 0; margin-bottom: 0; }
.ci-blog .ci-post .ci-split--small .ci-split__text :is(h1, h2, h3, h4, h5, h6) { margin-top: 0; }
.ci-blog .ci-post .ci-split__media img { display: block; width: 100%; height: auto; }
.ci-blog .ci-post .ci-split .ci-split { margin: 16px 0 0; max-width: none; }

/* A row of photos */
.ci-blog .ci-post .ci-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; max-width: var(--wide); margin: 40px auto; align-items: start; }
.ci-blog .ci-post .ci-gallery figure { margin: 0; max-width: none; }
.ci-blog .ci-post .ci-gallery img { display: block; width: 100%; height: auto; }

/* Photos: centered, at the width the author gave them (a quarter, a third, two thirds of the text column) */
.ci-blog .ci-post figure.ci-sized { width: min(100%, calc(var(--measure) * var(--ci-w) / 100)); max-width: 100%; margin-left: auto; margin-right: auto; }
.ci-blog .ci-post figure.ci-sized img { display: block; width: 100%; height: auto; }
.ci-blog .ci-post figure.ci-fig { max-width: var(--measure); margin: 0 auto 32px; }
.ci-blog .ci-post figure.ci-fig img { display: block; width: 100%; height: auto; }
.ci-blog .ci-post figure.ci-fig:is(.ci-sized) img { width: 100%; }
.ci-blog .ci-post figure img { display: block; }

/* Floated photo: sits beside the text and lines up with the edge of the text column */
.ci-blog .ci-post .ci-float { width: calc(var(--measure) * 0.42); max-width: 46%; margin-top: 6px; margin-bottom: 24px; }
.ci-blog .ci-post .ci-float--right { float: right; margin-left: 36px; margin-right: max(0px, calc((100% - var(--measure)) / 2)); }
.ci-blog .ci-post .ci-float--left { float: left; margin-right: 36px; margin-left: max(0px, calc((100% - var(--measure)) / 2)); }
.ci-blog .ci-post .ci-float img { display: block; width: 100%; height: auto; }

/* Social embeds and video: always fit the screen, never wider than their own size */
.ci-blog .ci-post .ci-embed { margin: 32px auto; width: 100%; max-width: 540px; min-width: 0; }
.ci-blog .ci-post .ci-embed--tw { max-width: 550px; }
.ci-blog .ci-post .ci-embed--tt { max-width: 605px; }
.ci-blog .ci-post .ci-embed--video { max-width: var(--measure); aspect-ratio: 16 / 9; position: relative; }
.ci-blog .ci-post .ci-embed--video iframe { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
.ci-blog .ci-post .ci-embed--frame iframe, .ci-blog .ci-post .ci-embed iframe { display: block; width: 100%; max-width: 100%; margin: 0; border: 0; }
.ci-blog .ci-post .ci-embed blockquote { min-width: 0 !important; max-width: 100% !important; width: 100% !important; margin: 0 !important; }
.ci-blog .ci-post .ci-embed--tw blockquote { padding: 16px 20px; border: 1px solid var(--mist-3); border-radius: 12px; background: var(--white); font: 400 16px/1.5 var(--font-body); color: var(--mist-6); text-align: left; }
.ci-blog .ci-post .ci-embed--tw blockquote p { margin: 0 0 8px; max-width: none; }
.ci-blog .ci-post .ci-embed--ig blockquote > p { margin: 8px 0 0; max-width: none; text-align: center; }

/* Buttons from pasted HTML look like the Button block */
.ci-blog .ci-post .ci-btn-row { text-align: center; margin: 32px auto; }
.ci-blog .ci-post a.ci-btn {
  display: inline-block; background: var(--teal); color: var(--white) !important; border: 2px solid var(--teal); border-radius: 8px;
  padding: 12px 24px; font: 600 15px/1.4 var(--font-sub); text-decoration: none; transition: background 0.15s ease, border-color 0.15s ease;
}
.ci-blog .ci-post a.ci-btn:hover { background: var(--pine); border-color: var(--pine); color: var(--white) !important; }
.ci-blog .ci-post .wp-block-buttons { justify-content: center; margin: 32px auto; }

/* Closing card: the last heading, its text and the button */
.ci-blog .ci-post .ci-closing { max-width: var(--measure); margin: 64px auto 0; padding: 40px; background: var(--mist-1); border-radius: 12px; }
.ci-blog .ci-post .ci-closing > :first-child { margin-top: 0; }
.ci-blog .ci-post .ci-closing > :last-child { margin-bottom: 0; }
.ci-blog .ci-post .ci-closing :is(p, ul, ol, h1, h2, h3, h4, h5, h6) { max-width: none; margin-left: 0; margin-right: 0; }
.ci-blog .ci-post .ci-closing .wp-block-buttons { justify-content: flex-start; margin: 24px 0 0; }

/* Wide tables scroll inside their own box */
.ci-blog .ci-post .ci-table-wrap { max-width: var(--measure); margin: 0 auto 24px; overflow-x: auto; }
.ci-blog .ci-post .ci-table-wrap table { margin: 0; min-width: 480px; }

@media (max-width: 767px) {
  .ci-blog .ci-post .ci-split { grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 32px auto; }
  .ci-blog .ci-post .ci-split--text-first { grid-template-columns: minmax(0, 1fr); }
  .ci-blog .ci-post .ci-split--small, .ci-blog .ci-post .ci-split--small.ci-split--text-first { grid-template-columns: minmax(0, min(var(--ci-m, 30%), 96px)) minmax(0, 1fr); gap: 16px; margin: 12px auto; }
  .ci-blog .ci-post .ci-split--small.ci-split--text-first { grid-template-columns: minmax(0, 1fr) minmax(0, min(var(--ci-m, 30%), 96px)); }
  .ci-blog .ci-post .ci-float { float: none; width: 100%; max-width: 420px; margin: 0 auto 24px; }
  .ci-blog .ci-post .ci-closing { padding: 24px; }
  .ci-blog .ci-post p.ci-label { font-size: 18px; margin-top: 28px; }
  .ci-blog .ci-post .ci-gallery { grid-template-columns: minmax(0, 1fr); }
}
