/* ============================================================
   Atrium — v3.12
   Liquid Glass Bento home showcase for The Grove Bible Chapel
   ------------------------------------------------------------
   Was "Church Home Showcase" through v3.6. Internal selector
   prefix remains .chs- for deployment safety — do not rename
   without updating the PHP markup and JS in lockstep.

   v3.12 — Esselith Core token layer (#20, step 6)
     • --chs-orange / --chs-teal alias the suite --es-brand-*
       tokens; --chs-serif / --chs-sans alias --es-font-*. The
       pre-Core Grove hexes/stacks are the fallbacks, so a
       Core-less install renders identically. church-home-
       showcase.php prints a :root inline block (after this file)
       that sets --chs-orange/--chs-teal from the SHARED
       pulpit_suite_brand_* options, so a saved brand applies
       with or without Core. Atrium had no color UI of its own —
       nothing to retire or migrate.
     • Render-blocking @import → wp_enqueue_style('chs-fonts')
       in PHP (#29). Kept (not a Core subset: Atrium uses
       Montserrat 300 for the tagline).
     • Dark-section glow audit: the two .chs-section brand
       radials lighten-before-alpha (--chs-glow-base) so the
       wash survives a dark church brand; all other hardcoded
       brand rgba literals (cell tints, sheen, hover shadow)
       became brand-var color-mix (raw — they don't vanish), so
       every accent follows the brand. Phone breakpoint 560→600.

   v3.8 — Desktop section background lift
     • Desktop base lifted from near-black #07111A to a warmer
       slate #1F2A33 — a calibrated middle step, not all the way
       to the mobile slate. Keeps the glass bento cells crisp on
       the larger desktop grid while reading warmer / more
       inviting. New --chs-section-bg token holds the value so a
       future admin background-picker can override it on :root.
     • Desktop radial glows nudged up (orange .10 → .13, teal
       .22 → .27, ellipse 80% → 85%) so the accents stay visible
       against the lighter base.
     • Mobile (≤1023px) background unchanged — stays #2E3D48.

   v3.7 — Brand font correction
     • Display/serif: Instrument Serif → Playfair Display
     • Body/sans:     Manrope          → Montserrat
   Both flow through --chs-serif / --chs-sans below, so a future
   admin font-picker can override them on :root with no further
   refactor. Playfair Display renders heavier than Instrument
   Serif at the same weight — heading weights left at 400 but
   worth an eyeball on the live site.
   ============================================================ */

/* Fonts are loaded via wp_enqueue_style('chs-fonts', …) in
   church-home-showcase.php (the old render-blocking @import was removed under #29).
   Keeping the load — not just a var() alias — because a font name in a fallback
   chain can't LOAD the file, and Atrium uses Montserrat 300 (the tagline), which
   Core's font string omits, so it isn't a pure subset of Core. */

:root {
  /* ── Brand colors (Esselith Core token layer, #20, step 6) ──
     Alias the suite --es-brand-* tokens with Atrium's pre-Core Grove hexes as the
     fallback, so with Core deactivated Atrium renders exactly as before (Core is an
     enhancer, never a dependency). church-home-showcase.php ALSO prints a :root inline
     block via wp_add_inline_style AFTER this file that sets --chs-orange / --chs-teal
     from the SHARED pulpit_suite_brand_* options, so a church's saved brand applies
     with OR without Core — that inline block, printed last, wins the cascade. Atrium
     never had its own color UI, so there was nothing to retire or migrate; it simply
     joins the shared source of truth. (Mirrors Nave / Credo / Pulpit Live.) */
  --chs-orange: var(--es-brand-primary,   #ED8B00);   /* Grove orange */
  --chs-teal:   var(--es-brand-secondary, #004F71);   /* Grove deep teal */

  /* ── Dark-section glow bases (checklist item (d)) ──
     The brand lightened toward white BEFORE a glow's own transparency is applied. A
     faint brand wash at low alpha over the dark .chs-section slate is visible for a
     bright brand (Grove orange/teal) but composites to the dark fill's luminance — and
     vanishes — for a dark brand (burgundy/navy/forest, common church palettes).
     Lightening first keeps every brand's section wash visible; bright brands just read
     a touch paler. Used ONLY for the two pure-brand .chs-section radials over the dark
     slate — NOT the per-cell photo tints (multiply, dense enough to survive), the
     cursor sheen (anchored by a neutral cream core that never vanishes), borders, or
     the hover shadow. (Mirrors Credo's --cs-glow-base / Nave's --ces-glow-base.) */
  --chs-glow-base:           color-mix(in srgb, var(--chs-orange) 65%, white);
  --chs-glow-base-secondary: color-mix(in srgb, var(--chs-teal)   65%, white);

  --chs-sage:   #C3C6A8;
  --chs-cream:  var(--es-surface, #F7F3EC);
  --chs-ink:    var(--es-ink, #071120);
  --chs-section-bg: var(--es-deep-b, #04293A);   /* suite deep-teal section base (was slate #1F2A33) — unified dark tone */

  /* ── Typography (Grove brand) ──
     Alias the suite --es-font-* tokens; the pre-Core stacks are the fallback so a
     Core-less install renders identically. The faces are still loaded by the chs-fonts
     enqueue (a var() alias can name but not load a font). */
  --chs-serif:  var(--es-font-display, 'Playfair Display', Georgia, serif);
  --chs-sans:   var(--es-font-body, 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

/* ─────────────────────────────────────
   SECTION WRAPPER + INTRO
───────────────────────────────────── */

.chs-section {
  position: relative;
  padding: var(--es-space-band, clamp(3.5rem, 7vw, 6rem)) 24px; /* 3.24.0: the suite band rhythm (was 64/80) */
  background: var(--chs-section-bg);
  font-family: var(--chs-sans);
  color: var(--es-text-on-dark, #E8ECF5);
  /* Clip the brand glows. Use `clip` (not `hidden`) on iOS 16+: `overflow:hidden`
     is a NON-scrollable clip context that breaks a descendant filmstrip's CSS
     scroll-snap on iOS Safari (the .chs-fs rail "lands halfway / hangs" on the
     home page but works on Credo, whose wrapper is a real overflow-y:auto
     scroller). `overflow:clip` clips the same glows without creating that
     context. `hidden` first = the fallback for iOS <16. */
  overflow: hidden;
  overflow: clip;
  /* Lighten-before-alpha (--chs-glow-base): pure-brand washes over the dark slate,
     so they'd vanish for a dark church brand if applied raw. (#20 item (d).) */
  background-image:
    radial-gradient(ellipse 85% 60% at 15% 0%,   color-mix(in srgb, var(--chs-glow-base)           13%, transparent), transparent 60%),
    radial-gradient(ellipse 85% 60% at 85% 100%, color-mix(in srgb, var(--chs-glow-base-secondary) 27%, transparent), transparent 60%);
  isolation: isolate;
}

.chs-section-header {
  max-width: 1280px;
  margin: 0 auto 2.5rem;
  /* Stacked: subtitle sits UNDER the title (like mobile always did). The old
     side-by-side row put the lede in a 320px right rail — fine at the tiny old
     sub size, but at --es-lead (21px) it wrapped to 6 lines and towered over
     the title. A lede reads best under its heading at a full measure. */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(232,236,245,0.10);
}

.chs-section-eyebrow {
  margin: 0 0 0.85rem;
  color: #fff;
  font-size: var(--es-eyebrow, 0.8125rem);
  font-weight: 700;
  letter-spacing: var(--es-eyebrow-tracking, 0.14em);
  text-transform: uppercase;
}

.chs-section-title {
  font-family: var(--chs-serif);
  font-size: var(--es-h2, clamp(1.625rem, 1.42rem + 0.88vw, 2.375rem));
  font-weight: 400;
  color: var(--es-text-on-dark, #E8ECF5);
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.chs-section-title em { font-style: italic; color: var(--chs-orange); }

.chs-section-subtitle {
  max-width: 60ch;
  font-size: var(--es-lead, 1.3125rem);
  color: rgba(232,236,245,0.65);
  margin: 0;
  text-align: left;
}

/* ─────────────────────────────────────
   BENTO GRID
───────────────────────────────────── */

.chs-bento {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  gap: 14px;
}

/* Extras grid (ministries 9+): same look as the bento, but cells are sized by
   the admin's per-card Size choice. Dense auto-flow backfills gaps so mixed
   sizes stay tidy. Sits directly under the curated 8. */
.chs-bento--extras {
  margin-top: 14px;
  grid-auto-flow: dense;
}

/* ─────────────────────────────────────
   BALANCED SMALL-COUNT BOARDS
   The curated 8-position bento packs perfectly at 4, 7 and 8
   ministries, but 1/2/3/5/6 leave dead holes. The PHP emits
   .chs-bento-count-N (same pattern as Nave's bento); these
   rules reshape those counts into fully-packed boards.
───────────────────────────────────── */
@media (min-width: 1024px) {
  /* 1 ministry → single full-width hero */
  .chs-bento.chs-bento-count-1 .chs-cell[data-pos="1"] { grid-column: span 4; }

  /* 2 → two equal hero halves */
  .chs-bento.chs-bento-count-2 .chs-cell[data-pos="2"] { grid-column: span 2; grid-row: span 2; }

  /* 3 → hero left, two stacked wides right */
  .chs-bento.chs-bento-count-3 .chs-cell[data-pos="2"],
  .chs-bento.chs-bento-count-3 .chs-cell[data-pos="3"] { grid-column: span 2; }

  /* 5 → hero + stacked wides + a full pair row */
  .chs-bento.chs-bento-count-5 .chs-cell[data-pos="2"],
  .chs-bento.chs-bento-count-5 .chs-cell[data-pos="3"],
  .chs-bento.chs-bento-count-5 .chs-cell[data-pos="5"] { grid-column: span 2; }

  /* 6 → standard top, full pair bottom row */
  .chs-bento.chs-bento-count-6 .chs-cell[data-pos="5"],
  .chs-bento.chs-bento-count-6 .chs-cell[data-pos="6"] { grid-column: span 2; }
}

/* Tablet/mobile boards are 2 columns — only two counts leave orphans there */
@media (max-width: 1023px) {
  .chs-bento.chs-bento-count-2 .chs-cell[data-pos="2"] { grid-column: span 2; }
  .chs-bento.chs-bento-count-5 .chs-cell[data-pos="5"] { grid-column: span 2; }
}

/* ─────────────────────────────────────
   CELL BASE
───────────────────────────────────── */

.chs-cell {
  /* per-cell vars — set via inline style */
  --fx: 50%;
  --fy: 50%;
  --shx: 0%;
  --shy: 0%;
  --mx: -200%;
  --my: -200%;
  /* --photo set inline */

  position: relative;
  border-radius: var(--es-radius-feature, 24px);
  overflow: hidden;
  isolation: isolate;
  background: #000;

  /* iOS / mobile rendering hardening */
  -webkit-tap-highlight-color: transparent;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  transform: translateZ(0);
  will-change: transform;

  box-shadow:
    inset 0 1px 0 0  rgba(255,255,255,0.20),
    inset 0 -1px 0 0 rgba(255,255,255,0.04),
    inset 0 0 0 1px  rgba(255,255,255,0.07),
    0 8px 24px       rgba(0,0,0,0.40);

  transition:
    transform 0.55s cubic-bezier(0.2,0.8,0.2,1),
    box-shadow 0.55s ease;
}

.chs-cell-link {
  display: block;
  position: absolute;
  inset: 0;
  text-decoration: none;
  color: inherit;
  border-radius: var(--es-radius-feature, 24px);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
.chs-cell-link:focus-visible {
  /* 3.24.0: the suite focus ring (teal over a white halo), was orange */
  outline: 2px solid var(--es-brand-secondary, #004F71);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px #fff;
}

.chs-cell:hover {
  transform: translateY(-6px);
  /* The colored drop shadow follows the brand secondary (raw — a depth shadow, not a
     faint halo; lightening would invert its purpose, and under a dark brand it simply
     reads as a normal dark shadow). #20 item (d). */
  box-shadow:
    inset 0 1px 0 0  rgba(255,255,255,0.32),
    inset 0 -1px 0 0 rgba(255,255,255,0.08),
    inset 0 0 0 1px  rgba(255,255,255,0.18),
    0 30px 60px      color-mix(in srgb, var(--chs-teal) 45%, transparent);
}

/* hero gets a slightly bigger lift */
.chs-cell[data-pos="1"]:hover { transform: translateY(-8px); }

/* ─────────────────────────────────────
   LAYERS
───────────────────────────────────── */

.chs-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--photo);
  background-size: cover;
  background-position:
    calc(var(--fx) + var(--shx))
    calc(var(--fy) + var(--shy));
  filter: saturate(1.05) brightness(0.88);
  transition:
    transform 0.9s cubic-bezier(0.2,0.8,0.2,1),
    filter 0.6s ease,
    background-position 0.45s ease;
}
.chs-cell:hover .chs-bg {
  transform: scale(1.06);
  filter: saturate(1.18) brightness(1);
}

/* placeholder when no featured image (Core 0.33.0 — board option 3, "growth
   rings"): the brand's deep teal with a soft light at one corner and fine
   rings from the opposite corner. Replaces the big faded initial, which sat
   behind or over the title. Brand-tracking: every stop is mixed from teal. */
.chs-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  /* Stronger than the board's 13%: the cell's tint (multiply) and the title
     scrim both sit above the rings. */
  color: rgba(232, 236, 245, 0.24);
  background:
    radial-gradient(120% 90% at 12% 0%, color-mix(in srgb, color-mix(in srgb, var(--chs-teal) 45%, #fff) 28%, transparent) 0%, transparent 60%),
    linear-gradient(150deg,
      color-mix(in srgb, var(--chs-teal) 88%, #fff) 0%,
      color-mix(in srgb, var(--chs-teal) 80%, #000) 45%,
      color-mix(in srgb, var(--chs-teal) 52%, #000) 100%);
}
.chs-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* color tint */
.chs-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: multiply;
  transition: opacity 0.6s ease;
  opacity: 1;
}
.chs-cell:hover .chs-tint { opacity: 0.55; }

/* Hero cell (position 1) — brighten the photo since dark imagery
   compounds with the tint+scrim. Softer scrim, lifted exposure. */
.chs-cell[data-pos="1"] .chs-bg {
  filter: saturate(1.10) brightness(1.05);
}
.chs-cell[data-pos="1"]:hover .chs-bg {
  filter: saturate(1.22) brightness(1.18);
}
.chs-cell[data-pos="1"] .chs-tint {
  background: linear-gradient(135deg, color-mix(in srgb, var(--chs-teal) 55%, transparent) 0%, color-mix(in srgb, var(--chs-orange) 22%, transparent) 100%);
}
/* (Core 0.33.0) The hero shares the title band below — its title also sits at
   the top. */

/* per-position tints — brand cohesion regardless of which ministry sits in the slot.
   Raw brand-var color-mix (NOT lightened): these are mix-blend:multiply tints painted
   over the cell photo, so they read as deliberate brand color on imagery and darken
   (rather than vanish) under a dark brand — the lighten-before-alpha rule is for faint
   washes over dark fills, not opaque-ish photo tints. #20 item (d). */
.chs-cell[data-pos="2"] .chs-tint { background: linear-gradient(135deg, color-mix(in srgb, var(--chs-teal) 65%, transparent) 0%,   color-mix(in srgb, var(--chs-teal) 30%, transparent) 100%); }
.chs-cell[data-pos="3"] .chs-tint { background: linear-gradient(135deg, color-mix(in srgb, var(--chs-teal) 50%, transparent) 0%,   color-mix(in srgb, var(--chs-orange) 35%, transparent) 100%); }
.chs-cell[data-pos="4"] .chs-tint { background: linear-gradient(160deg, color-mix(in srgb, var(--chs-orange) 50%, transparent) 0%, color-mix(in srgb, var(--chs-teal) 35%, transparent) 100%); }
.chs-cell[data-pos="5"] .chs-tint { background: linear-gradient(135deg, color-mix(in srgb, var(--chs-orange) 50%, transparent) 0%, color-mix(in srgb, var(--chs-teal) 40%, transparent) 100%); }
.chs-cell[data-pos="6"] .chs-tint { background: linear-gradient(160deg, color-mix(in srgb, var(--chs-sage) 55%, transparent) 0%,   color-mix(in srgb, var(--chs-orange) 20%, transparent) 100%); }
.chs-cell[data-pos="7"] .chs-tint { background: linear-gradient(150deg, color-mix(in srgb, var(--chs-orange) 45%, transparent) 0%, color-mix(in srgb, var(--chs-teal) 40%, transparent) 100%); }
.chs-cell[data-pos="8"] .chs-tint { background: linear-gradient(90deg,  color-mix(in srgb, var(--chs-teal) 75%, transparent) 0%,   color-mix(in srgb, var(--chs-teal) 30%, transparent) 100%); }

/* dark scrim — text legibility. (Core 0.33.0) The eyebrow and title sit at
   the TOP of the card and the link at the bottom, so the scrim is dark at both
   ends: a title band at the top, the old dark foot at the bottom, the photo
   clearest in between. Measured on The Grove's own photos with white titles:
   with the bento's default 30% overlay the worst title pixel is 6.7:1 and the
   worst eyebrow 8.3:1 (AAA); without the band, bright photos dropped to 2.6. */
.chs-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(7,17,32,0.62) 0%,
    rgba(7,17,32,0.34) 38%,
    rgba(7,17,32,0.16) 58%,
    rgba(7,17,32,0.70) 100%);
}
/* No photo: the brand gradient is already dark and even, so it skips the
   photo darkening (title band + overlay) and keeps a light foot only. */
.chs-cell-placeholder .chs-scrim,
.chs-cell-placeholder[data-pos="8"] .chs-scrim {
  background: linear-gradient(180deg, transparent 55%, rgba(7,17,32,0.35) 100%);
}
.chs-cell-placeholder .chs-scrim::after { display: none; }
/* The full-width banner lays its words out in one row across the middle. */
.chs-cell[data-pos="8"] .chs-scrim {
  background: linear-gradient(90deg, rgba(7,17,32,0.62) 0%, rgba(7,17,32,0.40) 55%, rgba(7,17,32,0.55) 100%);
}

/* ADJUSTABLE dark overlay over the photos — BOTH the bento (.chs-scrim, incl.
   the hero cell's own scrim, since this only adds a layer) and the filmstrip
   (.chs-fs-grad). Driven by [atrium_ministries overlay="0..90"] via
   --chs-photo-dark on .chs-section (default 0 = no extra darkening → byte-
   identical). A FLAT layer over the whole card so busy imagery stops fighting
   the overlaid copy; painted above the existing bottom-scrim, below the text. */
.chs-scrim::after,
.chs-fs-grad::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, var(--chs-photo-dark, 0));
}

/* cursor-tracking sheen */
.chs-sheen {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  /* The cream center is a neutral light reflection (brand-independent); the warm stop
     follows the brand (raw — the cream core means the sheen never fully vanishes, so it
     needs no lighten, and screen-blend lightening would over-brighten it). #20 (d). */
  background: radial-gradient(
    420px circle at var(--mx) var(--my),
    rgba(232,236,245,0.22)                                  0%,
    color-mix(in srgb, var(--chs-orange) 10%, transparent) 30%,
    transparent                                            55%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  mix-blend-mode: screen;
}
.chs-cell:hover .chs-sheen { opacity: 1; }

/* glass refractive edge highlight */
.chs-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--es-radius-feature, 24px);
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.14) 0%,
    rgba(255,255,255,0)   28%,
    rgba(255,255,255,0)   72%,
    rgba(255,255,255,0.05) 100%);
}

/* ─────────────────────────────────────
   CONTENT
───────────────────────────────────── */

.chs-content {
  position: relative;
  z-index: 5;
  padding: 1.85rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--es-text-on-dark, #E8ECF5);
  text-shadow: 0 1px 16px rgba(0,0,0,0.45);
}

.chs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #FFFFFF;
  font-style: italic;
  font-family: var(--chs-serif);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  font-weight: 400;
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
}
.chs-eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
}

.chs-title {
  font-family: var(--chs-serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 2.6vw, 2.7rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0.4rem 0 0;
  /* (Core 0.33.0) White, not orange: the canon keeps orange for buttons and
     one large accent word in a page heading (orange titles measured 2.8:1 on
     some photos; white is 6.7:1 or better). */
  color: #FFFFFF;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.45);
}

/* The bento tagline was removed (it lost legibility over the photo cells) — the
   short description now shows only on the filmstrip (.chs-fs-meta) and the
   single-ministry hero (.chs-ms-lede). No .chs-tagline rules remain here. */

/* hero gets a much bigger title */
.chs-cell[data-pos="1"] .chs-title {
  font-size: clamp(3rem, 5.2vw, 4.8rem);
  line-height: 0.95;
}

.chs-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--es-text-min, 0.75rem);
  font-weight: 700;
  letter-spacing: var(--es-eyebrow-tracking, 0.14em);
  text-transform: uppercase;
  margin-top: auto;
  color: var(--es-text-on-dark, #E8ECF5);
  transition: gap 0.3s ease, color 0.3s ease;
}
/* (3.23.3) Hover only where there IS hover: on a phone a tap left the link
   stuck orange. And the link stays white (canon: no small orange text) — the
   arrow sliding out is the cue. */
.chs-arrow svg { width: 14px; height: 14px; transition: transform 0.3s ease; }
@media (hover: hover) {
  .chs-cell:hover .chs-arrow { gap: 1.05rem; }
  .chs-cell:hover .chs-arrow svg { transform: translateX(2px); }
}

/* ─────────────────────────────────────
   POSITION-BASED SIZING (the bento)
───────────────────────────────────── */

.chs-cell[data-pos="1"] { grid-column: span 2; grid-row: span 2; }   /* Hero */
.chs-cell[data-pos="2"] { grid-column: span 1; }                      /* Top Right Upper */
.chs-cell[data-pos="3"] { grid-column: span 1; }                      /* Top Right Lower */
.chs-cell[data-pos="4"] { grid-column: span 2; }                      /* Middle Wide */
.chs-cell[data-pos="5"] { grid-column: span 1; }                      /* Bottom Left */
.chs-cell[data-pos="6"] { grid-column: span 1; }                      /* Bottom Center */
.chs-cell[data-pos="7"] { grid-column: span 2; }                      /* Bottom Right Wide */
.chs-cell[data-pos="8"] { grid-column: span 4; }                      /* Full-Width Banner */

/* banner — horizontal content layout */
.chs-cell[data-pos="8"] .chs-content {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 2rem 2.75rem;
}
.chs-cell[data-pos="8"] .chs-arrow { margin-top: 0; }
.chs-cell[data-pos="8"] .chs-title-block {
  display: contents; /* let .chs-title lay out inline in the banner row, opposite the arrow */
}

/* ─────────────────────────────────────
   ENTRANCE ANIMATIONS
───────────────────────────────────── */

/* Pre-animation hide is applied by JS (.chs-anim) right before observing —
   if JS never runs, errors out, or the observer never fires, cells simply
   stay visible. Content is never stranded invisible. */
.chs-cell.chs-anim {
  opacity: 0;
  transform: translateY(28px);
}
.chs-cell.chs-in-view {
  animation: chs-rise 0.85s cubic-bezier(0.2,0.8,0.2,1) forwards;
}
/* Stagger is set by JS per reveal batch (style.animationDelay) so cards
   scrolled into view later animate immediately — the old fixed per-position
   delays (0.05s–0.75s) made below-the-fold cards feel laggy on scroll. */

@keyframes chs-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* If JS / IntersectionObserver isn't available, just show them */
@media (prefers-reduced-motion: reduce) {
  .chs-cell { opacity: 1; transform: none; animation: none; }
  .chs-cell:hover { transform: none; }
  .chs-cell:hover .chs-bg { transform: none; }
}

/* ─────────────────────────────────────
   RESPONSIVE
───────────────────────────────────── */

@media (max-width: 1023px) {
  .chs-section {
    background: #2E3D48;
    /* Lighten-before-alpha, same as the desktop radials — over the dark mobile slate. */
    background-image:
      radial-gradient(ellipse 90% 60% at 15% 0%,   color-mix(in srgb, var(--chs-glow-base)           16%, transparent), transparent 60%),
      radial-gradient(ellipse 90% 60% at 85% 100%, color-mix(in srgb, var(--chs-glow-base-secondary) 32%, transparent), transparent 60%);
  }
  .chs-bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .chs-cell[data-pos="1"] { grid-column: span 2; grid-row: span 2; }
  .chs-cell[data-pos="4"],
  .chs-cell[data-pos="7"] { grid-column: span 2; }
  .chs-cell[data-pos="8"] { grid-column: span 2; }
  .chs-cell[data-pos="8"] .chs-content {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.85rem;
  }
  .chs-cell[data-pos="8"] .chs-title-block { display: block; }
  .chs-section-header { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .chs-section-subtitle { text-align: left; max-width: 60ch; }
}

/* Phone — preserve layout variety, don't collapse to identical squares.
   600px = the suite-standard phone breakpoint (#20; was 560). 601–1023px keeps the
   tablet board above; both are 2-col, so the shift only trades row height / padding —
   no orphaned cells. (1024 / 1023 desktop boundary already on-standard.) */
@media (max-width: 600px) {
  .chs-section { padding: var(--es-space-band, 3.5rem) 16px; }
  .chs-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 170px;
    gap: 12px;
  }
  /* Hero stays double-tall, full-width across the 2 cols */
  .chs-cell[data-pos="1"] { grid-column: span 2; grid-row: span 2; }
  /* Squares pair up side-by-side */
  .chs-cell[data-pos="2"],
  .chs-cell[data-pos="3"],
  .chs-cell[data-pos="5"],
  .chs-cell[data-pos="6"] { grid-column: span 1; }
  /* Wide cells span full width but at standard height */
  .chs-cell[data-pos="4"],
  .chs-cell[data-pos="7"] { grid-column: span 2; }
  /* Banner stays banner — full-width, slightly shorter */
  .chs-cell[data-pos="8"] {
    grid-column: span 2;
    grid-row: span 1;
  }
  /* Tighter content padding on small cells */
  .chs-content { padding: 1.35rem; }
  .chs-cell[data-pos="1"] .chs-content { padding: 1.85rem; }
  /* Eyebrow shrinks slightly */
  .chs-eyebrow { font-size: 0.95rem; }

  /* (3.23.3) Half-width tiles (two to a row) — on a phone the eyebrow, title
     and link each wrapped to two lines and covered the whole photo (Roger's
     iPhone screenshots). Taller rows; a smaller eyebrow without its dash; a smaller title; the
     link shows as an arrow in a ring (the tile's own label already names it
     for screen readers). Full-width tiles keep the words as they were. */
  .chs-bento { grid-auto-rows: 190px; }
  .chs-cell:is([data-pos="2"], [data-pos="3"], [data-pos="5"], [data-pos="6"]):not(.chs-bento-count-2 > [data-pos="2"]):not(.chs-bento-count-5 > [data-pos="5"]) .chs-content {
    padding: 1.1rem 1.1rem 1rem;
  }
  .chs-cell:is([data-pos="2"], [data-pos="3"], [data-pos="5"], [data-pos="6"]):not(.chs-bento-count-2 > [data-pos="2"]):not(.chs-bento-count-5 > [data-pos="5"]) .chs-eyebrow {
    display: block;
    font-size: 0.85rem;
    line-height: 1.25;
    text-wrap: balance;
  }
  .chs-cell:is([data-pos="2"], [data-pos="3"], [data-pos="5"], [data-pos="6"]):not(.chs-bento-count-2 > [data-pos="2"]):not(.chs-bento-count-5 > [data-pos="5"]) .chs-eyebrow::before {
    display: none;
  }
  .chs-cell:is([data-pos="2"], [data-pos="3"], [data-pos="5"], [data-pos="6"]):not(.chs-bento-count-2 > [data-pos="2"]):not(.chs-bento-count-5 > [data-pos="5"]) .chs-title {
    font-size: clamp(1.35rem, 6.2vw, 1.6rem);
    line-height: 1.05;
  }
  .chs-cell:is([data-pos="2"], [data-pos="3"], [data-pos="5"], [data-pos="6"]):not(.chs-bento-count-2 > [data-pos="2"]):not(.chs-bento-count-5 > [data-pos="5"]) .chs-arrow {
    font-size: 0;
    gap: 0;
    width: 34px;
    height: 34px;
    justify-content: center;
    border: 1.5px solid rgba(232, 236, 245, 0.55);
    border-radius: 999px;
  }
  .chs-cell:is([data-pos="2"], [data-pos="3"], [data-pos="5"], [data-pos="6"]):not(.chs-bento-count-2 > [data-pos="2"]):not(.chs-bento-count-5 > [data-pos="5"]) .chs-arrow svg {
    width: 15px;
    height: 15px;
  }
}

/* Touch devices — disable hover-only effects */
@media (hover: none) {
  .chs-cell:hover { transform: none; }
  .chs-cell:hover .chs-bg { transform: none; }
  .chs-cell:hover .chs-tint { opacity: 0.85; }
}


/* ════════════════════════════════════════════════════════════════════════
   FULL-BLEED THEME COMPATIBILITY (v3.9)
   ════════════════════════════════════════════════════════════════════════
   .chs-section is a dark immersive band meant to reach the viewport edges; the
   inner .chs-bento grid + header already cap at 1280px + margin:auto, so content
   stays centered. These rules run under body.chs-fullbleed (added by
   chs_body_class on any page containing [atrium_ministries]/[grove_ministries])
   so the section bleeds full width with no sidebar regardless of the page's
   Astra Content Layout — no per-page setup. Scoped to the body class; harmless
   when a selector is absent. */
body.chs-fullbleed #secondary,
body.chs-fullbleed .widget-area,
body.chs-fullbleed .ast-sidebar,
body.chs-fullbleed #left-sidebar,
body.chs-fullbleed #right-sidebar,
body.chs-fullbleed .sidebar {
  display: none !important;
}
body.chs-fullbleed .ast-container,
body.chs-fullbleed .ast-container-fluid,
body.chs-fullbleed #primary,
body.chs-fullbleed .content-area,
body.chs-fullbleed .site-content,
body.chs-fullbleed .entry-content,
body.chs-fullbleed .wp-block-post-content {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.chs-fullbleed .ast-separate-container .ast-article-single,
body.chs-fullbleed .ast-separate-container .ast-article-post,
body.chs-fullbleed .ast-article-single {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
}
/* Even without the body class, stretch the dark section to the full viewport
   inside a constrained/boxed container. Inner content keeps its 1280px cap. */
html body .entry-content .chs-section,
html body .post-content .chs-section,
html body article .chs-section,
.entry-content > .chs-section,
.post-content > .chs-section,
html body .entry-content .chs-opener,
html body .post-content .chs-opener,
html body article .chs-opener {
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  width: 100vw !important;
  max-width: 100vw !important;
}


/* ── Card links: strip the theme's inherited underline (Astra underlines all
   link text; these cards are wrapped in <a>). Titles/eyebrows/taglines should
   read clean. The CTA keeps its own styling via .chs-arrow. ───────────────── */
body .chs-cell .chs-cell-link,
body .chs-cell .chs-cell-link:hover,
body .chs-cell .chs-cell-link:focus,
body .chs-cell .chs-title,
body .chs-cell .chs-eyebrow {
  text-decoration: none !important;
}


/* ─────────────────────────────────────────────────────────────────────────
 * SINGLE MINISTRY DETAIL — theme compatibility (full-width / no-sidebar /
 * footer-flush). MOVED here from the inline <style> in single-chs_ministry.php
 * (Atrium 3.16.6) so it ships as a filemtime-VERSIONED asset that cache-busts on
 * every upload — it can never go stale on an OPcache miss the way the inline copy
 * could (that was the recurring "sidebar leaks back / hero off-center / footer
 * gap" symptom on ministry detail pages). Same delivery as Pulpit Studio's
 * class-ps-theme-compat. Scoped to body.chs-ministry-page (added in PHP) +
 * body.single-chs_ministry (WP core), so it only touches the ministry detail view.
 * The astra_page_layout filter can lose the priority race on live Astra/Astra Pro,
 * so these scoped !important rules are the backstop that actually wins.
 * ───────────────────────────────────────────────────────────────────────── */
body.chs-ministry-page #content,
body.chs-ministry-page .site-content,
body.chs-ministry-page .content-area,
body.chs-ministry-page .ast-container,
body.chs-ministry-page .ast-container-fluid,
body.chs-ministry-page #primary,
body.chs-ministry-page main#main,
body.chs-ministry-page main.site-main,
body.chs-ministry-page .es-container,
body.single-chs_ministry .ast-container,
body.single-chs_ministry .es-container,
body.single-chs_ministry #primary {
  /* .es-container = the standalone Esselith parent theme's content column
     (max-width:1200 + side padding). Without nulling it here the full-bleed
     ministry hero renders ~1200px wide with gutters instead of edge-to-edge. */
  max-width: 100% !important; width: 100% !important;
  padding: 0 !important;
  margin-left: auto !important; margin-right: auto !important;
}
/* Collapse Astra's two-column flex so the content spans full width even if a
   sidebar slot is still emitted. */
body.chs-ministry-page .ast-container,
body.single-chs_ministry .ast-container { display: block !important; }
body.chs-ministry-page #primary,
body.single-chs_ministry #primary { flex: 1 1 100% !important; }
/* Hide any sidebar widget area the theme renders. */
body.chs-ministry-page #secondary,
body.chs-ministry-page .widget-area,
body.chs-ministry-page .ast-sidebar,
body.chs-ministry-page .sidebar,
body.chs-ministry-page .left-sidebar,
body.chs-ministry-page .right-sidebar,
body.single-chs_ministry #secondary { display: none !important; }
/* Strip the boxed "post card" wrapper + any theme-injected title/meta — the
   template renders its own hero. */
body.chs-ministry-page .ast-article-single,
body.chs-ministry-page article.post,
body.chs-ministry-page .ast-article-post {
  background: transparent !important; border: 0 !important;
  box-shadow: none !important; padding: 0 !important; margin: 0 !important;
}
body.chs-ministry-page .entry-title,
body.chs-ministry-page header.entry-header,
body.chs-ministry-page .ast-breadcrumbs-wrapper,
body.chs-ministry-page .entry-meta { display: none !important; }
body.chs-ministry-page .chs-ms { width: 100% !important; max-width: 100% !important; }
/* Content meets the dark footer flush — removes the body-background sliver below
   the last full-bleed section. */
body.chs-ministry-page #content,
body.chs-ministry-page .site-content,
body.chs-ministry-page .ast-container,
body.chs-ministry-page .es-container,
body.chs-ministry-page #primary,
body.chs-ministry-page main#main { margin-bottom: 0 !important; padding-bottom: 0 !important; }
body.chs-ministry-page .es-site-footer,
body.chs-ministry-page .site-footer,
body.chs-ministry-page footer.site-footer { margin-top: 0 !important; }
/* A Lumen video grid embedded via shortcode renders BARE (no .ams-sec wrapper) as a direct
   child of .chs-ms, so it sat on Astra's pale blue-grey site background (#F0F5FA, an Astra
   customizer default) while the surrounding page-builder sections sit on cream. Give the
   ministry page a brand-cream base so the bare grid matches the rest of the page, and let the
   grid breathe vertically. Scoped to ministry pages — the Lumen ARCHIVE keeps its own page bg.
   (Sections set their own backgrounds, so this only shows through where the page is otherwise
   transparent — i.e. behind the bare grid.) */
body.chs-ministry-page .chs-ms { background: var(--es-surface, #F7F3EC); }
body.chs-ministry-page .lmn-grid { padding-block: clamp(40px, 5vw, 72px); }

/* ===================================================================
   SINGLE MINISTRY (#19) — hero / reading body / CTA.
   MOVED here 2026-06-29 from single-chs_ministry.php inline <style> so it
   ships as a filemtime-VERSIONED asset that cache-busts on every upload —
   never stale on an OPcache miss (the recurring hero off-center/centered
   regression). Scoped to .chs-ms so it only applies on ministry pages.
   =================================================================== */
	/* ── Single Ministry (#19) — scoped to .chs-ms; aliases suite tokens ───── */
	.chs-ms{
		--ms-orange:      var(--chs-orange, var(--es-brand-primary, #ED8B00));
		--ms-orange-deep: var(--es-brand-primary-dark, #BE6F00);
		--ms-teal:        var(--chs-teal, var(--es-brand-secondary, #004F71));
		--ms-ink:         var(--es-ink, #071120);
		--ms-slate:       var(--es-text, #2E3D48);
		--ms-cream:       var(--chs-cream, var(--es-surface, #F7F3EC));
		--ms-stage:       var(--chs-section-bg, #04293A);
		--ms-serif:       var(--chs-serif, var(--es-font-display, 'Playfair Display', Georgia, serif));
		--ms-sans:        var(--chs-sans, var(--es-font-body, 'Montserrat', system-ui, -apple-system, sans-serif));
	}

	/* Dark "stage" hero — same recipe as .chs-section (glow-base lightened 65%
	   toward white, then orange @13% top-left / teal @27% bottom-right). */
	.chs-ms-hero{
		position:relative; overflow:hidden; isolation:isolate; text-align:left;
		background:var(--ms-stage);
		background-image:
			radial-gradient(ellipse 85% 60% at 15% 0%,   color-mix(in srgb, color-mix(in srgb, var(--ms-orange) 65%, white) 13%, transparent), transparent 60%),
			radial-gradient(ellipse 85% 60% at 85% 100%, color-mix(in srgb, color-mix(in srgb, var(--ms-teal)   65%, white) 27%, transparent), transparent 60%);
		color:var(--es-text-on-dark, #E8ECF5);
		padding:clamp(40px,7vw,84px) clamp(20px,5vw,48px) clamp(44px,6vw,72px);
	}
	/* width:100% is REQUIRED, not redundant. On the IMAGE hero, .chs-ms-hero--media is
	   display:grid, and on a grid item the auto inline margins (margin:0 auto) override the
	   default justify-self:stretch and trigger SHRINK-TO-FIT — the box collapses to its text
	   width (~640px) and centers THAT, so the content sits mid-hero instead of left-of-center.
	   max-width:1320 is never reached because the content is already narrower. Forcing
	   width:100% makes the width DEFINITE (fills the column → capped at max-width:1320), so the
	   auto margins then center a full 1320 block — identical to the no-image BLOCK path. This,
	   NOT text-align (3.16.9) or grid-template-columns:1fr (3.16.10), was the real cause of the
	   long-running ministry-hero mis-position; reproduced + verified in dev on the grid path
	   (3.16.11). DO NOT remove width:100%. */
	.chs-ms-hero-inner{ width:100%; max-width:1320px; margin:0 auto; }

	.chs-ms-back{
		display:inline-flex; align-items:center; gap:.5rem; margin:0 0 1.6rem;
		font-family:var(--ms-sans); font-size:var(--es-text-min, .75rem); font-weight:700;
		letter-spacing:var(--es-eyebrow-tracking, .14em); text-transform:uppercase; opacity:.9;
		color:var(--es-text-on-dark, #E8ECF5) !important; text-decoration:none !important;
		transition:opacity .25s ease, color .25s ease, gap .25s ease;
	}
	.chs-ms-back:hover{ color:var(--ms-orange) !important; opacity:1; gap:.8rem; }
	.chs-ms-back svg{ width:14px; height:14px; }

	.chs-ms-eyebrow{
		margin:0 0 .85rem; font-family:var(--ms-sans); color:#fff;
		font-size:var(--es-eyebrow, 0.8125rem); font-weight:700; letter-spacing:.14em; text-transform:uppercase;
	}
	.chs-ms-title{
		margin:0; font-family:var(--ms-serif); font-weight:400;
		font-size:var(--es-h1-hero, clamp(2.5rem, 2.11rem + 1.66vw, 3.875rem)); line-height:1.05; letter-spacing:0;
		color:var(--es-text-on-dark, #E8ECF5);
	}
	.chs-ms-title em{ font-style:italic; color:var(--ms-orange); }
	.chs-ms-lede{
		margin:1.15rem 0 0; max-width:60ch; font-family:var(--ms-sans);
		font-size:var(--es-lead, 1.3125rem); line-height:1.5; font-weight:300;
		color:rgba(232,236,245,.82);
	}

	/* Showcase hero media — large, featured, focal-aware. The photo is the star:
	   a full-bleed immersive banner — the photo fills the hero edge-to-edge with the
	   title overlaid (no contained frame); a left-weighted scrim + text-shadow keep it
	   legible over any photo (AA-over-media). Only when a featured image exists. */
	.chs-ms-hero--media{
		display:grid; align-items:center;
		grid-template-columns:1fr; min-height:clamp(440px,60vh,760px);
		padding-top:clamp(72px,9vw,120px); padding-bottom:clamp(56px,8vw,104px);
	}
	.chs-ms-hero-bg{
		position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; z-index:-2;
	}
	.chs-ms-hero-scrim{
		position:absolute; inset:0; z-index:-1;
		background:
			linear-gradient(90deg, rgba(7,17,32,.82) 0%, rgba(7,17,32,.55) 45%, rgba(7,17,32,.26) 100%),
			linear-gradient(0deg, rgba(7,17,32,.46), transparent 62%);
	}
	.chs-ms-hero--media .chs-ms-title{ text-shadow:0 2px 22px rgba(0,0,0,.55); }
	.chs-ms-hero--media .chs-ms-eyebrow{ text-shadow:0 1px 8px rgba(0,0,0,.6); }
	.chs-ms-hero--media .chs-ms-lede{ color:rgba(232,236,245,.92); text-shadow:0 1px 10px rgba(0,0,0,.5); }
	.chs-ms-hero--media .chs-ms-back{ text-shadow:0 1px 8px rgba(0,0,0,.5); }

	/* Cream reading body */
	.chs-ms-body{
		background:var(--ms-cream);
		padding:clamp(44px,6vw,86px) clamp(20px,5vw,48px) clamp(56px,7vw,104px);
	}
	/* Constrained-flow container (WordPress block-theme model). The prose box
	   fills the body's inner width; normal blocks + plain prose are capped to
	   the reading measure by `.chs-ms-prose > *` below, while alignwide/alignfull
	   designed bands break out. Without this, a ministry body built from the
	   Esselith full-width block patterns (alignfull cover/group bands) was
	   trapped at 720px and rendered as a narrow centred card. */
	.chs-ms-prose{
		max-width:none; margin:0 auto; font-family:var(--ms-sans);
		color:var(--ms-slate); font-size:1.06rem; line-height:1.75;
	}
	.chs-ms-prose > *{ max-width:720px; margin-left:auto; margin-right:auto; }
	.chs-ms-prose > .alignwide{ max-width:1120px; }

	/* Designed ministry (3.21.0) — the content opens with its own hero, so the
	   page is the church's own block design (single-chs_ministry.php skips the
	   built-in hero / reading body / button row). LAYOUT ONLY, no typography:
	   theme.json + the blocks style the text, exactly as on a normal page. Normal
	   blocks keep the 720px reading measure (with a side gutter on phones), Wide
	   1120px, Full edge-to-edge. */
	.chs-ms-designed > *{
		max-width:min(720px, calc(100% - 2 * clamp(20px,5vw,48px)));
		margin-left:auto; margin-right:auto;
	}
	.chs-ms-designed > .alignwide{ max-width:min(1120px, calc(100% - 2 * clamp(20px,5vw,48px))); }
	.chs-ms-designed > .alignfull{ max-width:none; margin-left:0; margin-right:0; }
	.chs-ms-designed > :first-child{ margin-top:0; }
	.chs-ms-prose > .alignfull{
		max-width:none;
		/* Escape the body's horizontal reading gutter to reach the viewport edge,
		   matching the hero band. Uses the exact gutter value (not 100vw), so it
		   adds no scrollbar overflow. */
		margin-left:calc(-1 * clamp(20px,5vw,48px));
		margin-right:calc(-1 * clamp(20px,5vw,48px));
	}
	/* When the ministry body OPENS or CLOSES with a full-bleed designed band,
	   drop the reading-body's vertical gutter on that side so the band meets the
	   hero (top) / footer (bottom) flush — the bands bring their own vertical
	   padding, so the cream gutter just read as an empty gap. The gutter is kept
	   when the body starts/ends with plain reading prose, or (bottom) when a CTA
	   row follows the prose. */
	.chs-ms-body:has(> .chs-ms-prose:first-child > .alignfull:first-child){ padding-top: 0; }
	.chs-ms-body:has(> .chs-ms-prose:last-child > .alignfull:last-child){ padding-bottom: 0; }
	.chs-ms-prose > :first-child{ margin-top:0; }
	.chs-ms-prose h2, .chs-ms-prose h3{
		font-family:var(--ms-serif); color:var(--ms-ink); line-height:1.18; letter-spacing:-.01em;
	}
	.chs-ms-prose h2{ font-size:clamp(1.6rem,2.6vw,2.1rem); margin:2.2rem 0 .7rem; }
	.chs-ms-prose h3{ font-size:1.32rem; margin:1.8rem 0 .5rem; }
	.chs-ms-prose p{ margin:0 0 1.15rem; }
	.chs-ms-prose a:not(.wp-element-button){ color:var(--ms-teal) !important; text-decoration:underline; text-underline-offset:2px; }
	.chs-ms-prose a:not(.wp-element-button):hover{ color:var(--es-brand-secondary-dark, #003F5A) !important; }
	.chs-ms-prose img{ max-width:100%; height:auto; border-radius:var(--es-radius-card, 16px); }
	.chs-ms-prose ul, .chs-ms-prose ol{ margin:0 0 1.15rem; padding-left:1.3rem; }
	.chs-ms-prose li{ margin:.4rem 0; }
	.chs-ms-prose blockquote{
		margin:1.6rem 0; padding:.4rem 0 .4rem 1.3rem; border-left:3px solid var(--ms-teal);
		font-family:var(--ms-serif); font-style:italic; font-size:1.25rem; color:var(--ms-ink);
	}

	/* ── Designed-band colour hand-off ──────────────────────────────────────
	   The reading-prose rules above force headings/quotes to ink — correct for
	   plain prose on cream, but when a ministry body is built from the Esselith
	   full-width block patterns those bands carry their OWN surface colour, and
	   the forced ink made every heading vanish on the dark bands (paragraphs
	   were fine because they have no forced colour and just inherit the band).
	   Inside a designed band, let headings/quotes inherit the band's own text
	   colour — light on the dark bands, ink on the cream bands. */
	.chs-ms-prose :is(.alignfull,.alignwide) :is(h1,h2,h3,h4,h5,h6,blockquote){
		color:inherit;
	}
	/* White cards nested in a dark band get their white background from a preset
	   class but no ink text of their own on this (non-Esselith) theme, so their
	   contents would inherit the band's LIGHT colour and disappear. Give the card
	   ink text; its heading (now inheriting) and body then read dark on white.
	   Elements with their own colour class (e.g. the teal eyebrow) are unaffected. */
	.chs-ms-prose .has-white-background-color{ color:var(--ms-ink); }

	/* CTA — pinned to defend against Astra hover recolor */
	.chs-ms-cta-wrap{ max-width:720px; margin:2.4rem auto 0; }
	.chs-ms-cta-heading{
		margin:0 0 1.1rem; font-family:var(--ms-serif); font-style:italic;
		font-size:clamp(1.4rem,2.2vw,1.75rem); line-height:1.2; color:var(--ms-ink);
		text-align:center;
	}
	.chs-ms-cta-row{ display:flex; flex-wrap:wrap; gap:14px; justify-content:center; }
	.chs-ms-cta{
		display:inline-flex; align-items:center; gap:.6rem; padding:14px 26px;
		font-family:var(--ms-sans); font-size:1rem; font-weight:600;
		letter-spacing:0; border-radius:999px;
		background:var(--ms-orange) !important; color:var(--ms-ink) !important;
		border:2px solid var(--ms-orange) !important; text-decoration:none !important;
		box-shadow:none;
		transition:background .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
	}
	.chs-ms-cta:hover{
		background:var(--ms-orange-deep) !important; border-color:var(--ms-orange-deep) !important;
		color:var(--ms-ink) !important; transform:translateY(-2px);
	}
	.chs-ms-cta svg{ width:15px; height:15px; }

	/* Secondary (outline) button */
	.chs-ms-cta--ghost{
		background:transparent !important; color:var(--ms-teal) !important;
		border:2px solid var(--ms-teal) !important; box-shadow:none;
	}
	.chs-ms-cta--ghost:hover{
		background:var(--ms-teal) !important; border-color:var(--ms-teal) !important; color:#fff !important;
	}

	@media (max-width:1023px){ .chs-ms-hero{ background-color:#2E3D48; } .chs-ms-hero--media{ min-height:clamp(380px,66vw,560px); } }
	@media (max-width:600px){ .chs-ms-hero--media{ min-height:clamp(340px,82vw,480px); padding-top:clamp(56px,14vw,90px); } }

	/* Ministry-detail theme-compat (full-width / no-sidebar / footer-flush) MOVED to
	   church-home-showcase.css so it ships as a filemtime-VERSIONED asset that cache-
	   busts on every upload — never stale on an OPcache miss (the prior recurring
	   "sidebar leaks back / hero off-center / footer gap" symptom). See that file. */

/* (Core 0.38.0) LIGHT BAND — [atrium_ministries tone="light"] / the Ministries
   block's Background: Light. Cream band, ink heading, teal accent (canon: no
   orange text on light). The photo cards keep their own white-on-photo words;
   only the band, its heading and the filmstrip's foot controls change. */
.chs-section.chs-section--light {
  background: var(--chs-cream);
  color: var(--chs-ink);
}
.chs-section--light .chs-section-header { border-bottom-color: rgba(7, 17, 32, 0.12); }
.chs-section--light .chs-section-eyebrow { color: var(--es-brand-secondary, #004F71); }
.chs-section--light .chs-section-title { color: var(--chs-ink); }
.chs-section--light .chs-section-title em { color: var(--es-brand-secondary, #004F71); }
.chs-section--light .chs-section-subtitle { color: var(--es-text-muted, #394751); }
.chs-section--light .chs-fs-progress span { background: rgba(7, 17, 32, 0.14); }
.chs-section--light .chs-fs-count { color: var(--es-text-muted, #394751); }
.chs-section--light .chs-fs-count b { color: var(--chs-ink); }
.chs-section--light .chs-fs-arrow { border-color: rgba(7, 17, 32, 0.28); background: #fff; color: var(--chs-ink); }
.chs-section--light .chs-fs-panel { box-shadow: 0 16px 40px rgba(7, 17, 32, 0.18); }

/* ===================================================================== *
 *  MINISTRIES FILMSTRIP  —  [atrium_ministries layout="filmstrip"]
 *  Self-contained (chs-fs-*), ported from the suite ams-* rail. Each panel
 *  is an <a> link to its ministry (NO modal). Styled for the dark
 *  .chs-section. The bento already owns .chs-arrow — hence the chs-fs- prefix.
 * ===================================================================== */
.chs-fs-wrap { position: relative; max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.chs-fs { display: flex; gap: 18px; padding: 6px 2px 10px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding-left: 2px; }
.chs-fs::-webkit-scrollbar { display: none; }

.chs-fs-panel { position: relative; flex: 0 0 auto; width: clamp(260px, 24vw, 330px);
  scroll-snap-align: start; scroll-snap-stop: always; aspect-ratio: 21 / 40; border-radius: var(--es-radius-card, 16px); overflow: hidden;
  text-decoration: none; border: 1px solid rgba(232, 236, 245, 0.16);
  background: linear-gradient(165deg, var(--es-deep-a, #064058), var(--es-deep-b, #04293A)); box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.45s;
  -webkit-tap-highlight-color: transparent; }
.chs-fs-panel:focus-visible { outline: 2px solid var(--es-brand-secondary, #004F71); outline-offset: 3px; box-shadow: 0 0 0 5px #fff; }
@media (max-width: 600px) { .chs-fs-panel { width: clamp(240px, 72vw, 300px); } }
@media (hover: hover) {
  .chs-fs-panel:hover { transform: translateY(-8px); box-shadow: 0 32px 58px rgba(0, 0, 0, 0.42); }
  .chs-fs-panel:hover .chs-fs-dot { background: var(--chs-orange); border-color: var(--chs-orange); color: var(--chs-ink); }
}
.chs-fs-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.chs-fs-grad { position: absolute; inset: 0; background: linear-gradient(to top,
  rgba(4, 20, 28, 0.95) 0%, rgba(4, 20, 28, 0.66) 30%, rgba(4, 20, 28, 0.12) 58%, transparent 78%); }
.chs-fs-panel.chs-fs-noimg { background: radial-gradient(120% 80% at 80% 0%,
  color-mix(in srgb, var(--chs-glow-base) 16%, transparent), transparent 55%),
  linear-gradient(165deg, var(--es-deep-a, #064058), var(--es-deep-b, #04293A)); }
/* (Core 0.33.0) No-photo panel: growth rings (same art as the bento), not a letter. */
.chs-fs-ghost { position: absolute; inset: 0; overflow: hidden; color: rgba(232, 236, 245, 0.13); }
.chs-fs-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column;
  gap: 6px; padding: 22px 22px 20px; color: var(--es-text-on-dark, #E8ECF5); }
.chs-fs-tag { font-family: var(--chs-sans); font-size: var(--es-eyebrow, 0.8125rem); font-weight: 700; letter-spacing: var(--es-eyebrow-tracking, 0.14em);
  text-transform: uppercase; color: var(--es-text-on-dark, #E8ECF5); } /* 3.23.2: white, not orange (canon: no small orange text) */
.chs-fs-title { margin: 0; font-family: var(--chs-serif); font-weight: 600; font-size: 1.5rem; line-height: 1.1; color: var(--es-text-on-dark, #E8ECF5); }
.chs-fs-meta { font-family: var(--chs-sans); font-size: 0.8rem; color: rgba(232, 236, 245, 0.72); }
.chs-fs-go { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-family: var(--chs-sans);
  font-size: var(--es-text-min, 0.75rem); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--es-text-on-dark, #E8ECF5); opacity: 0.85; }
.chs-fs-dot { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(232, 236, 245, 0.5);
  display: grid; place-items: center; font-size: 0.8rem; transition: all 0.3s; }

/* Foot controls (dark-section styling — .chs-section is the suite deep-teal). */
.chs-fs-foot { display: flex; align-items: center; justify-content: flex-end; gap: 18px; max-width: 760px; margin: 26px auto 0; }
.chs-fs-progress { display: flex; gap: 8px; flex: 1; }
.chs-fs-progress span { height: 3px; flex: 1; background: rgba(232, 236, 245, 0.18); border-radius: 2px; overflow: hidden; position: relative; }
.chs-fs-progress span::after { content: ''; position: absolute; inset: 0; background: var(--chs-orange);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s; }
.chs-fs-progress span.chs-fs-on::after { transform: scaleX(1); }
.chs-fs-count { font-family: var(--chs-serif); font-style: italic; font-size: 1rem; color: rgba(232, 236, 245, 0.6); min-width: 64px; text-align: right; }
.chs-fs-count b { color: var(--es-text-on-dark, #E8ECF5); }
.chs-fs-arrows { display: flex; gap: 10px; }
/* 44px circle pinned against any theme's bare-<button> padding/min-width. */
.chs-fs-arrow { width: 44px !important; height: 44px !important; min-width: 44px !important; max-width: 44px !important;
  flex: 0 0 44px; padding: 0 !important; border-radius: 50% !important; border: 1px solid rgba(232, 236, 245, 0.28);
  background: rgba(232, 236, 245, 0.06); cursor: pointer; display: grid !important; place-items: center !important;
  color: var(--es-text-on-dark, #E8ECF5); transition: all 0.25s; line-height: 0; box-shadow: none !important; }
.chs-fs-arrow svg { width: 20px; height: 20px; display: block; margin: 0; }
.chs-fs-arrow:hover { background: var(--chs-orange); color: var(--chs-ink); border-color: var(--chs-orange); }
.chs-fs-arrow:disabled { opacity: 0.3; cursor: default; }
.chs-fs-arrow:focus-visible { outline: 2px solid var(--es-brand-secondary, #004F71); outline-offset: 2px; box-shadow: 0 0 0 4px #fff; }
@media (max-width: 600px) { .chs-fs-foot { display: none; } }
@media (min-width: 601px) { .chs-fs-progress { display: none; } .chs-fs-foot { justify-content: flex-end; gap: 18px; } }
@media (prefers-reduced-motion: reduce) { .chs-fs-panel { transition: none; } .chs-fs-panel:hover { transform: none; } }
