/* post-conventions-cae.css -- Kate Shawver, "CAE -- Impact Story Conventions (All Impact Stories)", ClickUp 1amzwvgbvcg,
 * 2026-11-14 (CAE-Impact-Story-Conventions-Dev-Notes.txt, sha256 234a15e6...). Her CSS block, verbatim, with ONE adaptation:
 * every .single-post selector also gets a .single-news twin -- News posts on this site are the `news` post type, whose
 * single body class is .single-news (her .single-post selectors are kept). Enqueued only on single case_study / news / post
 * views (inc/cae-news-post-global.php, cae_post_conventions_enqueue), so the unscoped rules below never leave those pages.
 * Two further served-DOM adaptations, each marked ADAPTATION below: (1) the body H2/H3 rules skip headings inside a table
 * (:where(:not(table *))) -- her QA: "ordinary data tables must look unchanged" (a credit H3 in a legacy photo table grew 27-38px);
 * (2) the intro photo is re-centred against the postcard idiom's align-self: flex-start.
 */
/* =========================================================
   CAE — Impact Story & News post body (GLOBAL)
   Applies to .single-case_study and .single-post
   ========================================================= */
 
/* ---- 1. Body headings: uppercase, Acumin Pro Condensed Black ---- */
/* ADAPTATION: :where(:not(table *)) keeps headings inside tables as they were (QA: ordinary data tables unchanged); :where adds no specificity, so the band rules below still win as in her code */
.single-case_study .entry-content h2:not([class*=cae-website]):where(:not(table *)),
.single-post .entry-content h2:not([class*=cae-website]):where(:not(table *)),
.single-news .entry-content h2:not([class*=cae-website]):where(:not(table *)) {
  font-family: "Acumin Pro Condensed", sans-serif !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  font-size: 45px !important;
  line-height: 1.05 !important;
  color: #004F39;
}
.single-case_study .entry-content h3:not([class*=cae-website]):where(:not(table *)),
.single-post .entry-content h3:not([class*=cae-website]):where(:not(table *)),
.single-news .entry-content h3:not([class*=cae-website]):where(:not(table *)) {
  font-family: "Acumin Pro Condensed", sans-serif !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  font-size: 36px !important;
  line-height: 1.1 !important;
  color: #004F39;
  margin-top: 56px !important;
  margin-bottom: 16px !important;
}
/* Legacy <br> tags inside headings (Drupal import) add blank lines above titles */
.entry-content :is(h2, h3, h4) > br { display: none; }
/* A heading right before a grid/table starts on its own line (clears floated photos) */
.entry-content :is(h2, h3, h4):has(+ .cae-news-table-wrap, + .cae-steps) { clear: both; }
 
/* ---- 2. Intro: cream panel, lead photo left / dateline + first paragraph right (Kate 1amzwvgbvbk, "CAE -- Story Intro
   Block: Global Rules", 2026-11-15, Rules 1-4: her CSS block, values as written; replaces the 11-14 part 2). Every Impact
   Story and News single (this sheet's enqueue); no post is named. ADAPTATIONS marked below. ---- */
/* 1. Cream intro panel, image left / text right */
.entry-content .cae-story-intro {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  column-gap: 40px;
  row-gap: 0;                       /* no stray gap under the image */
  align-items: center;
  background: #F7F4E2;              /* CAE cream */
  padding: 40px;                    /* even on all four sides */
  margin: 32px 0 !important;        /* equal space above and below panel */
  max-width: none !important;
  box-sizing: border-box;
}
/* 2. BUG FIX: leftover float clearfix creates an empty 2nd grid row and adds extra space under the image. Remove it. */
.entry-content .cae-story-intro::after {
  display: none !important;
  content: none !important;
}
.entry-content .cae-story-intro > figure {
  float: none !important; margin: 0 !important; width: 100% !important; max-width: none !important;
}
/* ADAPTATION (served DOM, kept from 11-14): the sitewide photo postcard (photo-postcard-cae.css) sets align-self: flex-start */
.entry-content .cae-story-intro > figure { align-self: center !important; }
/* 3. Text column vertically centred beside the image */
.entry-content .cae-story-intro__text {
  align-self: center;
  margin: 0;
  font-size: 1.12em;
  line-height: 1.6;
}
.entry-content .cae-story-intro__text > :first-child { margin-top: 0 !important; }
.entry-content .cae-story-intro__text > :last-child  { margin-bottom: 0 !important; }
/* ADAPTATION (served DOM): a story whose opening run holds a heading (Barred Woods Maple: dateline, h3, P1, photo) keeps it in
   the column; the body H3 rule's top margin would open a 40px hole under the dateline -- the dateline's own 14 is the gap */
.entry-content .cae-story-intro__text > .cae-story-dateline + :is(h2, h3, h4) { margin-top: 0 !important; }
/* 4. Small brick intro title (optional field: post meta intro_title, inc/cae-story-intro-title.php).
   ADAPTATION: !important on the type too -- the body H3 rule above (.single-case_study .entry-content h3..., 0,3,1, with
   !important size/family/weight/margin) otherwise wins her 0,3,0 selector (measured: 36px, 56px above); body + h3 lift it to 0,3,2.
   The second selector is the no-panel case (a post with no lead photo: the title sits above the dateline). */
body .entry-content .cae-story-intro h3.cae-story-intro__title,
body .entry-content > h3.cae-story-intro__title.cae-story-intro__title {
  font-family: "Acumin Pro Condensed", sans-serif !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  font-size: 22px !important;
  line-height: 1.15 !important;
  color: var(--wp--preset--color--primary-brick, #B15533) !important;
  margin: 0 0 10px !important;
}
/* 5. Text TALLER than the photo (class set by the intro script, section B2): top-align both columns; the 6px figure offset puts
   the postcard frame top at the first text line's top. Two-column layout only (stacked is untouched). */
@media (min-width: 761px) {
  .entry-content .cae-story-intro.is-text-taller { align-items: start; }
  .entry-content .cae-story-intro.is-text-taller > figure { align-self: start !important; margin-top: 6px !important; }
  .entry-content .cae-story-intro.is-text-taller .cae-story-intro__text { align-self: start; }
  .entry-content .cae-story-intro.is-text-taller .cae-story-intro__text > :first-child { margin-top: 0 !important; }
}
/* Mobile: stack image over text */
@media (max-width: 760px) {
  .entry-content .cae-story-intro {
    grid-template-columns: 1fr;
    row-gap: 28px;
    padding: 28px;
  }
}
 
/* ---- 3. "Learn more" holder: full content width, white, yellow left line ----
   Same visual language as the photo caption pop-up (.cae-photo__cap) */
.entry-content .cae-story-learnmore {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  background: #fff;
  border-left: 6px solid var(--wp--preset--color--primary-butter-yellow, #F2A518);
  box-shadow: rgba(0,0,0,.22) 0 6px 24px 0;
  padding: 28px 32px !important;
  margin: 40px 0 0 !important;
  max-width: none !important;
}
.entry-content .cae-story-learnmore .cae-story-learnmore__label {
  font-family: "Acumin Pro Condensed", sans-serif;
  font-weight: 900 !important;
  text-transform: uppercase;
  font-size: 24px !important;
  color: #004F39;
  margin: 0 !important;
}
.entry-content .cae-story-learnmore .wp-block-buttons { margin: 0 !important; }
@media (max-width: 560px) { .entry-content .cae-story-learnmore { padding: 22px 20px !important; } }
/* seat 11-14: "its own full-content-width holder" (Kate s.3): clear a floated body photo, else the holder squeezes beside it (Mighty Mudita: 669 vs 960 px at 1440) */
.entry-content .cae-story-learnmore { clear: both; }
 
/* ---- 4. In-text links are bold ---- */
.entry-content p a.cae-inline-link { font-weight: 700; }
 
/* ---- 5. Process steps: full-width light green band ---- */
.entry-content .cae-steps-band {
  clear: both;
  position: relative;
  background: var(--wp--preset--color--green, #C5E3BF);
  /* full-bleed without horizontal scrollbar */
  box-shadow: 0 0 0 100vmax var(--wp--preset--color--green, #C5E3BF);
  clip-path: inset(0 -100vmax);
  padding: 64px 0 72px;
  margin: 56px 0 48px !important;
  max-width: none !important;
}
.single-case_study .entry-content .cae-steps-band h3.cae-steps-band__title,
.single-post .entry-content .cae-steps-band h3.cae-steps-band__title,
.single-news .entry-content .cae-steps-band h3.cae-steps-band__title,
.entry-content .cae-steps-band .cae-steps-band__title {
  font-family: "Acumin Pro Condensed", sans-serif !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  font-size: 45px !important;
  line-height: 1.05 !important;
  color: #004F39;
  margin: 0 0 32px !important;
  clear: none;
}
/* Heading right after the band: band margin provides the space */
.single-case_study .entry-content .cae-steps-band + :is(h2, h3, h4),
.single-post .entry-content .cae-steps-band + :is(h2, h3, h4),
.single-news .entry-content .cae-steps-band + :is(h2, h3, h4),
.entry-content .cae-steps-band + :is(h2, h3, h4) { margin-top: 0 !important; }
@media (max-width: 560px) {
  .entry-content .cae-steps-band { padding: 44px 0 52px; }
  /* seat 11-14: Kate's 34px mobile title lost to the 0,4,1 desktop rule above; same selectors here so her stated 34px applies */
  .single-case_study .entry-content .cae-steps-band h3.cae-steps-band__title,
  .single-post .entry-content .cae-steps-band h3.cae-steps-band__title,
  .single-news .entry-content .cae-steps-band h3.cae-steps-band__title,
  .entry-content .cae-steps-band .cae-steps-band__title { font-size: 34px !important; }
}
 
/* ---- 6. Process steps grid + step postcards ---- */
.entry-content ol.cae-steps {
  clear: both !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  max-width: none !important;
}
@media (max-width: 900px) { .entry-content ol.cae-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (max-width: 560px) { .entry-content ol.cae-steps { grid-template-columns: 1fr; } }
 
.entry-content ol.cae-steps > li.cae-step {
  display: flex; flex-direction: column; list-style: none; margin: 0;
  background: #fff; padding: 16px 16px 24px;
}
.cae-step__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; margin: 0 0 20px; }
.cae-step__media figure { margin: 0 !important; width: 100% !important; height: 100%; position: relative; }
.cae-step__media .embedded-entity,
.cae-step__media .field-image { height: 100%; width: 100%; margin: 0; }
.cae-step__media img {
  display: block; width: 100% !important; height: 100% !important; max-width: none;
  object-fit: cover; object-position: 50% 35%;
}
.cae-step__body { display: flex; gap: 14px; align-items: flex-start; }
.cae-step__num {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
  background: #0d4f3c; color: #fff; font-weight: 700; font-size: 17px;
  line-height: 36px; text-align: center;
}
.entry-content .cae-step__text { margin: 0 !important; font-size: 17px; line-height: 1.55; padding-top: 5px; }
 
/* ---- 7. More space above "More Impact Stories" / related posts ---- */
.cae-website-redesign-record-related { margin-top: 96px !important; }

/* ---- Wrapped photos: top-aligned + height = text height (Kate 1amzwvgbvc2, "Story Layout & Balance: Global Conventions",
   2026-11-15, part 1; her CSS block, values as written). Sized by post-conventions-cae.js part D, which replaces the 11-12
   auto-size script. Every Impact Story and News single; no post is named.
   ADAPTATION (served DOM): .is-fit doubled -- cae-news-post-global.css's portrait width (34%, :has(img.is-portrait), 0,4,2)
   otherwise wins her 0,4,1 selector (measured: portrait at 34%). ---- */
.entry-content > figure.cae-postcard--float.is-fit.is-fit             { width: 40% !important; max-width: 40% !important; }
/* Portrait cap (Kate 1amzwvgd1qv, ClickUp 2026-11-23 00:20Z: "Cap portrait floats at about 240px wide (instead of about 307px),
   so they need less text beside them"): 300 css px = 240 screen px at the site's 0.8 zoom; 32% still applies on narrower
   columns. assets/js/post-conventions-cae.js part D2 uses the same min(32%, 300px) for a portrait card in a pair. */
.entry-content > figure.cae-postcard--float.is-fit.is-fit.is-portrait { width: min(32%, 300px) !important; max-width: min(32%, 300px) !important; }
.entry-content > figure.cae-postcard--float.is-fit.is-fit img {
  width: 100% !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;        /* crop (trim) instead of shrinking to a tiny photo */
  object-position: 50% 35% !important; /* keep faces in frame */
}
/* !important on the crop: photo-postcard-cae.css draws every .cae-postcard--float.cae-jcf-pc photo with object-fit: contain
   at 0,4,3, which beat the 0,4,2 rule above, so a fitted photo was letterboxed small inside its frame (measured 15:52Z on
   VFF $4M News: img box 358x144, picture 190 wide, contain). Her rule says crop, so the crop wins on fitted photos only. */
@media (max-width: 760px) {
  .entry-content > figure.cae-postcard--float.is-fit.is-fit,
  .entry-content > figure.cae-postcard--float.is-fit.is-fit.is-portrait { width: 100% !important; max-width: 100% !important; }
  .entry-content > figure.cae-postcard--float.is-fit.is-fit img { height: auto !important; }
}

/* ---- Long intro wraps under the image (Kate 1amzwvgbvc2, "Story Layout & Balance: Global Conventions", 2026-11-15, part 2;
   her CSS block, values as written). .is-text-much-taller is set by post-conventions-cae.js B2 when the text column is more
   than 1.5x the photo's height: the photo floats left inside the cream panel, the text wraps beside it then runs full width
   under it, the panel contains the float. The panel's own padding / 32px outer margins are untouched. ---- */
.entry-content .cae-story-intro.is-text-much-taller { display: block !important; }
.entry-content .cae-story-intro.is-text-much-taller > figure {
  float: left !important;
  width: 46% !important;
  margin: 6px 40px 16px 0 !important;      /* 6px = frame top lines up with first text line */
}
.entry-content .cae-story-intro.is-text-much-taller .cae-story-intro__text > :first-child { margin-top: 0 !important; }
.entry-content .cae-story-intro.is-text-much-taller::after {   /* wrap mode only: contain the float */
  content: "" !important; display: table !important; clear: both;
}
@media (max-width: 760px) {
  .entry-content .cae-story-intro.is-text-much-taller > figure { float: none !important; width: 100% !important; margin: 0 0 28px !important; }
}
