/* Gutenberg: inherit theme design tokens and respect block alignment. */
.wp-block-image img{height:auto}.wp-block-button__link{background:var(--solstice-accent,#286b43);color:#fff;border-radius:8px}.wp-block-button__link:hover{background:var(--solstice-accent-hover,#17482d);color:#fff}.wp-block-quote{border-left:4px solid var(--solstice-accent,#286b43);padding-left:1.2rem}.wp-block-separator{border-color:#d9e6d9}.alignwide{max-width:var(--solstice-width,1200px);margin-inline:auto}.alignfull{width:100vw;max-width:none;position:relative;left:50%;margin-left:-50vw}.wp-block-columns{gap:1.5rem}.wp-block-post-title a{color:var(--solstice-accent,#286b43);text-decoration:none}.wp-block-post-title a:hover{color:var(--solstice-accent-hover,#17482d)}.wp-block-query .wp-block-post-template{list-style:none;padding:0}.wp-block-post-featured-image{overflow:hidden;border-radius:9px}.wp-block-post-featured-image img{object-fit:cover}.wp-block-group.jrg-story>*:first-child{margin-block-start:0}.wp-block-group.jrg-story{margin-block-start:0}

/* Solstice 0.4 editorial patterns. Query styling is opt-in via a pattern class. */
.solstice-pattern-hero{background:var(--solstice-hero-bg,#e7f2e5);border-radius:16px;padding:clamp(2rem,5vw,4.5rem);margin-block:0 3rem}
.solstice-pattern-hero h1{font-size:clamp(2.2rem,4.5vw,4.25rem);line-height:1.1;letter-spacing:-.035em}
.solstice-pattern-hero p:last-child{max-width:65ch}
.solstice-pattern-eyebrow{font-size:.8rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--solstice-accent,#286b43)}
.solstice-pattern-section{margin-block:3rem}
.solstice-pattern-section>h2{margin-bottom:.5rem}
.solstice-query-cards .wp-block-post-template.is-layout-grid{align-items:stretch;gap:1.5rem}
.solstice-query-cards .wp-block-post-template>li{display:flex;flex-direction:column;min-width:0;overflow:hidden;background:var(--solstice-card,#fff);border:1px solid #dce6db;border-radius:12px;box-shadow:0 5px 24px rgba(27,58,35,.035);margin:0;padding:0 0 1.2rem}
.solstice-query-cards .wp-block-post-template>li>.wp-block-post-featured-image{margin:0 0 1rem;border-radius:0;aspect-ratio:16/9;background:var(--solstice-hero-bg,#e7f2e5)}
.solstice-query-cards .wp-block-post-featured-image img{width:100%;height:100%;aspect-ratio:16/9;object-fit:cover}
.solstice-query-cards .wp-block-post-template>li>.wp-block-post-title,
.solstice-query-cards .wp-block-post-template>li>.wp-block-post-excerpt,
.solstice-query-cards .wp-block-post-template>li>.wp-block-post-date,
.solstice-query-cards .wp-block-post-template>li>.wp-block-post-terms{margin:.45rem 1.2rem 0}
.solstice-query-cards .wp-block-post-template>li>.wp-block-post-title{font-size:clamp(1.1rem,1.7vw,1.35rem);line-height:1.35}
.solstice-query-cards .wp-block-post-template>li>.wp-block-post-excerpt{line-height:1.55}
.solstice-query-cards .wp-block-post-template>li>.wp-block-post-date{font-size:.8rem;margin-top:auto;padding-top:1rem}
.solstice-query-cards .wp-block-post-template>li>.wp-block-post-terms{font-size:.8rem}
.solstice-query-cards .wp-block-post-template>li>.wp-block-post-terms a{color:var(--solstice-accent,#286b43)}
.solstice-query-cards .wp-block-post-template>li>.wp-block-post-excerpt p{margin:0}
.solstice-topic-columns .wp-block-column>p{border:1px solid #dce6db;border-radius:8px;background:var(--solstice-card,#fff);padding:.85rem 1rem;margin:0}
.solstice-topic-columns .wp-block-column>p a{text-decoration:none;font-weight:650}
@media(max-width:780px){.solstice-query-cards .wp-block-post-template.is-layout-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.solstice-query-cards .wp-block-post-template.is-layout-grid{grid-template-columns:minmax(0,1fr)}}

/* 0.5: auto-fit uses the number of rendered items, not an empty 3rd track.
   Only the opt-in Solstice article pattern is affected. */
.solstice-query-cards .wp-block-post-template.is-layout-grid{
 display:grid;
 grid-template-columns:repeat(auto-fit,minmax(min(100%,19rem),1fr));
 align-items:stretch;
}
@media(max-width:780px){.solstice-query-cards .wp-block-post-template.is-layout-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr))}}
@media(max-width:540px){.solstice-query-cards .wp-block-post-template.is-layout-grid{grid-template-columns:minmax(0,1fr)}}

/* Solstice 0.7.0: media alignment and gallery resilience.
   Override the generic article figure margins for explicit Gutenberg alignment. */
.entry-content > .alignfull,
.entry-content > figure.alignfull {
  position:relative;
  left:auto;
  width:100vw;
  max-width:none;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
}
.entry-content > .alignwide,
.entry-content > figure.alignwide {
  width:min(var(--solstice-width,1200px),calc(100vw - 2rem));
  max-width:none;
  margin-left:50%;
  margin-right:0;
  transform:translateX(-50%);
}
/* Do not combine viewport-wide alignment with the translateX wide rule. */
.entry-content > .alignfull {transform:none}
.entry-content .wp-block-gallery {
  box-sizing:border-box;
  min-width:0;
  gap:clamp(.5rem,1.2vw,1rem);
}
.entry-content .wp-block-gallery .wp-block-image {
  min-width:0;
  max-width:100%;
  margin:0;
}
.entry-content .wp-block-gallery .wp-block-image img {
  display:block;
  max-width:100%;
}
/* WordPress uses overlay captions for gallery items. Keep the overlay, but
   prevent captions from becoming tiny independently scrolling windows. */
.entry-content .wp-block-gallery .wp-block-image figcaption {
  box-sizing:border-box;
  overflow:hidden;
  overflow-wrap:anywhere;
  word-break:normal;
  max-height:none;
  scrollbar-width:none;
  font-size:clamp(.65rem,.85vw,.85rem);
  line-height:1.35;
  padding:.75rem .45rem .4rem;
}
.entry-content .wp-block-gallery .wp-block-image figcaption::-webkit-scrollbar {display:none}
.entry-content .wp-block-gallery > figcaption {
  position:static;
  width:100%;
  max-height:none;
  overflow:visible;
  text-align:center;
}
/* Many columns are a legitimate author choice on desktop, but mobile
   needs enough room for images and captions to remain usable. */
@media(max-width:760px) {
  .entry-content .wp-block-gallery.has-nested-images {
    --wp--style--gallery-gap: .6rem;
  }
  .entry-content .wp-block-gallery.has-nested-images > figure.wp-block-image {
    flex-basis:calc(50% - .6rem) !important;
    width:calc(50% - .6rem) !important;
  }
}
@media(max-width:440px) {
  .entry-content .wp-block-gallery.has-nested-images > figure.wp-block-image {
    flex-basis:100% !important;
    width:100% !important;
  }
}

/* Solstice 0.7.1 — gallery fixes verified against legacy Gutenberg selectors.
   100vw includes the classic browser scrollbar on some systems. A small
   viewport inset prevents horizontal page overflow without clipping content. */
.entry-content > .alignfull,
.entry-content > figure.alignfull {
  width:calc(100vw - 2rem);
  max-width:none;
  position:relative;
  left:auto;
  right:auto;
  margin-left:50%;
  margin-right:0;
  transform:translateX(-50%);
}
/* Legacy galleries use an UL and LI > figure, not nested image blocks.
   Place captions in document flow so they are readable at any column count. */
.entry-content .wp-block-gallery .blocks-gallery-grid:not(.has-nested-images),
.entry-content .blocks-gallery-grid:not(.has-nested-images) {
  max-width:100%;
  min-width:0;
}
.entry-content .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item {
  min-width:0;
}
.entry-content .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item > figure {
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  min-width:0;
  height:100%;
  margin:0;
}
.entry-content .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item > figure > img {
  display:block;
  max-width:100%;
  min-width:0;
  flex:0 0 auto;
}
.entry-content .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item > figure > figcaption,
.entry-content .wp-block-gallery .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption {
  position:static;
  inset:auto;
  display:block;
  flex:0 0 auto;
  width:100%;
  height:auto;
  max-height:none;
  min-height:0;
  overflow:visible;
  overflow-wrap:anywhere;
  margin:0;
  padding:.45rem .35rem .65rem;
  background:none;
  color:var(--solstice-text,#26352b);
  text-align:center;
  font-size:clamp(.7rem,.85vw,.85rem);
  line-height:1.4;
}
@media(max-width:760px) {
  .entry-content .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item {
    width:calc(50% - .5rem);
    flex-basis:calc(50% - .5rem);
  }
}
@media(max-width:440px) {
  .entry-content .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item {
    width:100%;
    flex-basis:100%;
  }
}

/* Solstice 0.7.2 — legacy (pre-nested) Gutenberg gallery repair.
   WordPress's legacy figure and cropped-image rules stretch images to the
   available row height. Once captions are put in flow, that creates a sizing
   feedback loop: enormous images and captions overlapping later rows.
   Use intrinsic image sizing, and reserve actual space for captions. */
.entry-content .wp-block-gallery:not(.has-nested-images) .blocks-gallery-grid,
.entry-content .blocks-gallery-grid:not(.has-nested-images) {
  align-items:flex-start;
  align-content:flex-start;
}
.entry-content .wp-block-gallery:not(.has-nested-images) .blocks-gallery-item,
.entry-content .blocks-gallery-grid:not(.has-nested-images) > .blocks-gallery-item {
  align-self:flex-start;
  height:auto;
  min-height:0;
  overflow:visible;
}
.entry-content .wp-block-gallery:not(.has-nested-images) .blocks-gallery-item > figure,
.entry-content .blocks-gallery-grid:not(.has-nested-images) > .blocks-gallery-item > figure {
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  align-items:stretch;
  height:auto;
  min-height:0;
  overflow:visible;
  margin:0;
}
.entry-content .wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure > a,
.entry-content .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure > a {
  display:block;
  flex:0 0 auto;
  min-height:0;
}
.entry-content .wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure img,
.entry-content .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure img {
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  min-height:0;
  flex:none;
  object-fit:contain;
}
/* Cropped galleries may crop intentionally, but must not grow with caption height. */
.entry-content .wp-block-gallery.is-cropped:not(.has-nested-images) .blocks-gallery-item figure img,
.entry-content .is-cropped .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure img {
  aspect-ratio:4 / 3;
  object-fit:cover;
}
.entry-content .wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure figcaption,
.entry-content .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure figcaption {
  position:static;
  inset:auto;
  display:block;
  flex:none;
  box-sizing:border-box;
  height:auto;
  min-height:0;
  max-height:none;
  overflow:visible;
  margin:0;
  padding:.45rem .3rem .6rem;
  background:none;
  color:var(--solstice-text,#26352b);
  text-align:center;
  overflow-wrap:anywhere;
  line-height:1.4;
}

/* 0.7.3 — captions below legacy gallery images need room to breathe. */
.entry-content .wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure figcaption,
.entry-content .blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure figcaption{padding-block:.6rem .8rem;line-height:1.5}

/* 0.8.20: compact heading icons stay beside their text, including at wider widths. */
body.home .entry-content .wp-block-column > h2:has(img),
body.home .entry-content .wp-block-column > h3:has(img),
body.home .entry-content .wp-block-column > h4:has(img),
body.home .entry-content .wp-block-column > p:has(> img:first-child),
body.home .entry-content .wp-block-column > p:has(> a:first-child img) {
 display:flex;align-items:center;flex-wrap:nowrap;gap:.4rem;
}
body.home .entry-content .wp-block-column > :is(h2,h3,h4,p) img:first-child {display:inline-block;flex:none;vertical-align:middle;max-width:1.65rem;height:auto;margin:0}
/* Inline images and labels within Gutenberg headings must not be block elements. */
body.home .entry-content .wp-block-column > :is(h2,h3,h4) > a {display:inline-flex;align-items:center;gap:.4rem}
