/* blog — screen-specific styles. Merged into style.css once the screens settle.
 *
 * functions.php enqueues every screen sheet on every page, so everything below
 * is scoped to `.terrago-blog` (the journal listing's <main>) or `body.blog`.
 * Nothing here may leak onto Home, About, Contact or the trip screens.
 *
 * Design source: .tmp/website/Blog.png (1440 × 5578).
 */

/* ------------------------------------------------------------- tokens -- */

.terrago-blog {
  --tg-cardline: #e1e1e1;          /* card hairline, from the design */
  --tg-peach: #fff1e8;             /* read-time / chip fill */
  --tg-radius-card: 16px;
  --tg-radius-media: 12px;
}

/* Core's constrained layout centres every child with
   `margin-inline: auto !important`. Inside the flex cards below that auto
   margin shrink-wraps the child instead of stretching it, so it has to be
   cleared deliberately — specificity alone cannot beat !important. */
.terrago-blog .terrago-blogcard > *,
.terrago-blog .terrago-blogcard__body > *,
.terrago-blog .terrago-featcard > *,
.terrago-blog .terrago-storyrow__body > *,
.terrago-blog .terrago-storycard > *,
.terrago-blog .terrago-storycard__text > *,
.terrago-blog .terrago-numcard__body > *,
.terrago-blog .terrago-newsletter-card > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none;
}

/* ================================================================ hero == */

.terrago-blog .terrago-bloghero__title {
    margin-bottom: 0;
}

.terrago-blog .terrago-hero-subcopy {
    margin-top: 1rem;
    max-width: 34rem;
    line-height: 1.6;
    opacity: 0.92;
}

/* Ported from the Customizer's Additional CSS, 10 Sep 2026. The 34rem clamp
   above keeps the line length readable while the hero is a narrow column, but
   from 1024px up the hero is a single wide stack and the clamp left the subcopy
   ending well short of the title. Developed live, so it must live here or the
   deploy loses it. */
@media (min-width: 1024px) {
  .terrago-blog .terrago-hero-subcopy { max-width: none; }
}

/* Avatar stack + guest testimonial. Re-declared here (rather than relying on
   home.css) so this screen owns its own hero. */
.terrago-blog .terrago-quote-inline {
  margin-top: 2.5rem;
  max-width: 30rem;
  color: var(--wp--preset--color--contrast);
}
.terrago-blog .terrago-quote-inline p {
  margin: 0.75rem 0 0.35rem;
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.6;
}
.terrago-blog .terrago-quote-attrib {
  font-size: var(--wp--preset--font-size--caption);
  opacity: 0.85;
}
.terrago-blog .terrago-avatars { display: flex; }
.terrago-blog .terrago-avatars img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--wp--preset--color--contrast);
}
.terrago-blog .terrago-avatars img + img { margin-left: -12px; }

/* The white card on the right of the hero. */
.terrago-blog .terrago-herocard {
  border: 0;
  border-radius: var(--tg-radius-card);
  padding: 1.25rem;
  box-shadow: 0 18px 44px rgba(1, 1, 1, 0.14);
}
.terrago-blog .terrago-herocard > p { margin-top: 0; }
.terrago-blog .terrago-herocard .terrago-banner img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--tg-radius-media);
}
.terrago-blog .terrago-herocard .wp-block-buttons { margin-top: 1.1rem; }
.terrago-blog .terrago-herocard .wp-block-button__link {
  padding-inline: 2rem;
  font-weight: 500;
}

/* ============================================== browse: heading + search == */

.terrago-blog .terrago-browse__head { gap: 1.5rem 2rem; }
.terrago-blog .terrago-browse__head h2 { margin: 0; }

.terrago-blog .terrago-blogsearch { margin: 0; max-width: 100%; }
.terrago-blog .terrago-blogsearch .wp-block-search__inside-wrapper {
  max-width: 100%;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 999px;
  background: var(--wp--preset--color--surface);
  padding: 0.35rem 0.35rem 0.35rem 1.25rem;
}
.terrago-blog .terrago-blogsearch .wp-block-search__input {
  border: 0;
  background: transparent;
  padding: 0.7rem 0;
  font-size: var(--wp--preset--font-size--base);
  color: var(--wp--preset--color--base);
}
.terrago-blog .terrago-blogsearch .wp-block-search__input:focus { outline: none; }
.terrago-blog .terrago-blogsearch .wp-block-search__input::placeholder {
  color: var(--wp--preset--color--muted);
}
.terrago-blog .terrago-blogsearch .wp-block-search__button {
  background: transparent;
  border: 0;
  color: var(--wp--preset--color--muted);
  padding: 0 0.85rem;
}
.terrago-blog .terrago-blogsearch .wp-block-search__button:hover {
  color: var(--wp--preset--color--primary);
}

/* ========================================================= filter chips == */

.terrago-blog .terrago-filterbar { gap: 0.75rem; align-items: center; }

.terrago-blog .terrago-catchips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.terrago-blog .terrago-catchips li { margin: 0; }

.terrago-blog .terrago-chip,
.terrago-blog .terrago-catchips li > a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 999px;
  background: var(--wp--preset--color--contrast);
  color: var(--wp--preset--color--base);
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.terrago-blog .terrago-catchips li > a:hover {
  border-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--primary);
}
.terrago-blog .terrago-chip.is-active {
  background: var(--wp--preset--color--primary);
  border-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
  font-weight: 500;
}

/* Leading glyphs. Masked SVG so the icon simply follows the chip's colour.
   Category chips cycle three marks — the design gives each topic its own. */
.terrago-blog .terrago-chip__icon,
.terrago-blog .terrago-catchips li > a::before {
  content: "";
  flex: none;
  display: inline-block;
  width: 15px;
  height: 15px;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat var(--tg-icon);
  mask: center / contain no-repeat var(--tg-icon);
}
.terrago-blog .terrago-chip__icon--grid {
  --tg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 3h8v8H3zM13 3h8v8h-8zM3 13h8v8H3zM13 13h8v8h-8z'/%3E%3C/svg%3E");
}
.terrago-blog .terrago-catchips li:nth-child(3n + 1) > a::before {
  --tg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M2 20h20L14 6l-4 7-2-3z'/%3E%3C/svg%3E");
}
.terrago-blog .terrago-catchips li:nth-child(3n + 2) > a::before {
  --tg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 12a4 4 0 100-8 4 4 0 000 8zm0 2c-4.4 0-8 2.2-8 5v1h16v-1c0-2.8-3.6-5-8-5z'/%3E%3C/svg%3E");
}
.terrago-blog .terrago-catchips li:nth-child(3n + 3) > a::before {
  --tg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6 2h12v20l-6-4.4L6 22z'/%3E%3C/svg%3E");
}

/* ============================================================ post cards == */

.terrago-blog .terrago-blogcards {
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}
.terrago-blog .terrago-blogcards > li {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.terrago-blog .terrago-blogcard {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--wp--preset--color--contrast);
  border: 1px solid var(--tg-cardline);
  border-radius: var(--tg-radius-card);
  padding: 0.75rem;
}

/* 370 × 275 in the design (≈4/3), inset inside the card padding — not the
   flush 3/2 crop style.css gives the generic .terrago-postgrid. */
.terrago-blog .terrago-blogcard .terrago-blogcard__media { margin: 0; }
.terrago-blog .terrago-blogcard .terrago-blogcard__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--tg-radius-media);
}

.terrago-blog .terrago-blogcard__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.1rem 0.75rem 0.4rem;
}

/* Navy category with a leading bullet. */
.terrago-blog .terrago-blogcard__cat,
.terrago-blog .terrago-numcard__cat {
  margin: 0 0 0.6rem;
  color: var(--wp--preset--color--primary);
  font-weight: 500;
  line-height: 1.2;
}
.terrago-blog .terrago-blogcard__cat::before {
  content: "•";
  margin-right: 0.45rem;
}
.terrago-blog .terrago-blogcard__cat a,
.terrago-blog .terrago-numcard__cat a {
  color: inherit;
  text-decoration: none;
}
.terrago-blog .terrago-blogcard__cat a:hover,
.terrago-blog .terrago-numcard__cat a:hover { text-decoration: underline; }

.terrago-blog .terrago-blogcard__title {
  margin: 0 0 0.6rem;
  line-height: 1.25;
  font-weight: 600;
}
.terrago-blog .terrago-blogcard__title a { color: inherit; text-decoration: none; }
.terrago-blog .terrago-blogcard__title a:hover { color: var(--wp--preset--color--primary); }

.terrago-blog .terrago-blogcard__excerpt {
  margin: 0;
  color: var(--wp--preset--color--muted);
  line-height: 1.6;
}
/* The design has no "Read more" tail under the excerpt. */
.terrago-blog .wp-block-post-excerpt__more-text,
.terrago-blog .wp-block-post-excerpt__more-link { display: none; }

/* Divider + footer row: author on the left, read-time pill on the right. */
.terrago-blog .terrago-blogcard__foot {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--tg-cardline);
  gap: 0.75rem;
}
.terrago-blog .terrago-cardby { gap: 0.6rem; align-items: center; }
.terrago-blog .terrago-cardby > * { margin: 0; }
.terrago-blog .terrago-cardby .wp-block-avatar { line-height: 0; }
.terrago-blog .terrago-cardby .wp-block-avatar img {
  border-radius: 50%;
  display: block;
  background: var(--wp--preset--color--surface);
}
.terrago-blog .terrago-cardby .wp-block-post-author-name {
  font-weight: 500;
  color: var(--wp--preset--color--base);
  overflow-wrap: anywhere;
}

/* core/post-time-to-read prints a range ("2–3 minutes") in WP 7.0 and exposes
   no format attribute, so the design's "6 Min Read" becomes "2–3 Minutes Read":
   real per-post data rather than a hardcoded number. */
.terrago-blog .terrago-readpill {
  flex: none;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: var(--tg-peach);
  color: var(--wp--preset--color--accent);
  font-weight: 500;
  white-space: nowrap;
  text-transform: capitalize;
}
.terrago-blog .terrago-readpill::after { content: " Read"; }

/* ============================================================ pagination == */

.terrago-blog .terrago-pagination {
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}
.terrago-blog .terrago-pagination .wp-block-query-pagination-numbers {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.terrago-blog .terrago-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  color: var(--wp--preset--color--muted);
  text-decoration: none;
  font-size: var(--wp--preset--font-size--small);
}
.terrago-blog .terrago-pagination .page-numbers.current {
  background: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--primary);
  font-weight: 600;
}
.terrago-blog .terrago-pagination .wp-block-query-pagination-next,
.terrago-blog .terrago-pagination .wp-block-query-pagination-previous {
  padding: 0.95rem 2rem;
  border-radius: 999px;
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
  text-decoration: none;
  font-weight: 500;
}
.terrago-blog .terrago-pagination .wp-block-query-pagination-previous {
  background: transparent;
  color: var(--wp--preset--color--primary);
  border: 1px solid var(--wp--preset--color--border);
}

/* ======================================================= latest stories == */

/* Narrowed with padding, not max-width: this is a direct child of a constrained
   group, whose `margin-inline: auto` is also what positions the content column —
   capping the width would centre the paragraph inside it. */
.terrago-blog .terrago-latest__intro {
  margin-top: 1rem;
  padding-right: 42%;
}
.terrago-blog .terrago-latest .wp-block-query { margin: 0; }
.terrago-blog .terrago-storyrows { list-style: none; margin: 0; padding: 0; }
.terrago-blog .terrago-storyrows > li + li { margin-top: 1.5rem; }
.terrago-blog .terrago-featwrap { list-style: none; margin: 0; padding: 0; height: 100%; }
.terrago-blog .terrago-featwrap > li { height: 100%; }

.terrago-blog .terrago-featcard,
.terrago-blog .terrago-storyrow,
.terrago-blog .terrago-storycard {
  background: var(--wp--preset--color--contrast);
  border-radius: var(--tg-radius-card);
  box-shadow: 0 10px 30px rgba(1, 1, 1, 0.05);
}

.terrago-blog .terrago-featcard {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
}
.terrago-blog .terrago-featcard__title { margin: 0 0 0.5rem; line-height: 1.3; font-weight: 600; }
.terrago-blog .terrago-featcard__title a { color: inherit; text-decoration: none; }
.terrago-blog .terrago-featcard__excerpt { margin: 0; color: var(--wp--preset--color--muted); }
/* The feature card is as tall as the story stack beside it, so the image takes
   whatever height is left rather than holding a fixed ratio and leaving a gap. */
.terrago-blog .terrago-featcard__media {
  margin: 1.25rem 0 0;
  flex: 1 1 auto;
  min-height: 260px;
}
.terrago-blog .terrago-featcard__media,
.terrago-blog .terrago-featcard__media a { display: block; height: 100%; }
.terrago-blog .terrago-featcard__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: var(--tg-radius-media);
}
.terrago-blog .terrago-featcard .terrago-blogcard__foot { border-top: 0; margin-top: 1rem; }

/* Compact rows: thumbnail · chips + title · arrow. */
.terrago-blog .terrago-storyrow { gap: 1.25rem; padding: 1rem; }
.terrago-blog .terrago-storyrow__media { margin: 0; flex: none; }
.terrago-blog .terrago-storyrow__media img {
  width: 120px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--tg-radius-media);
}
.terrago-blog .terrago-storyrow__body { flex: 1; min-width: 0; }
.terrago-blog .terrago-storyrow__title {
  margin: 0.6rem 0 0;
  line-height: 1.3;
  font-weight: 600;
}
.terrago-blog .terrago-storyrow__title a { color: inherit; text-decoration: none; }
.terrago-blog .terrago-storyrow__title a:hover { color: var(--wp--preset--color--primary); }

.terrago-blog .terrago-metachips { gap: 0.5rem; }
.terrago-blog .terrago-chip-soft {
  margin: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--tg-peach);
  color: var(--wp--preset--color--accent);
  line-height: 1.2;
  white-space: nowrap;
}
.terrago-blog .terrago-chip-soft a { color: inherit; text-decoration: none; }
.terrago-blog .terrago-chip-read::after { content: " read"; }

/* Navy circular "open this story" button. */
.terrago-blog .terrago-arrowlink {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.terrago-blog .terrago-arrowlink:hover { transform: translateX(2px); }

/* Expanded row. */
.terrago-blog .terrago-storycard { padding: 1rem; }
.terrago-blog .terrago-storycard__media { margin: 0 0 1rem; }
.terrago-blog .terrago-storycard__media img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--tg-radius-media);
}
.terrago-blog .terrago-storycard__foot { gap: 1.25rem; margin-top: 0.75rem; }
.terrago-blog .terrago-storycard__text { min-width: 0; flex: 1; }
.terrago-blog .terrago-storycard__excerpt {
  margin: 0.4rem 0 0;
  color: var(--wp--preset--color--muted);
  line-height: 1.6;
}

/* =================================================== craft retreats grid == */

.terrago-blog .terrago-rooted__head { margin-bottom: 3rem; }
.terrago-blog .terrago-rooted__head h2 { margin: 0; }

.terrago-blog .terrago-numgrid {
  gap: 2rem;
  margin: 0;
  padding: 0;
  counter-reset: tg-num;
}
.terrago-blog .terrago-numgrid > li {
  counter-increment: tg-num;
  position: relative;
  margin: 0;
}
/* Orange numeric badge, pinned to the corner of the thumbnail. */
.terrago-blog .terrago-numgrid > li::before {
  content: counter(tg-num);
  position: absolute;
  top: -10px;
  left: 130px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--contrast);
  font-size: var(--wp--preset--font-size--caption);
  font-weight: 600;
}
.terrago-blog .terrago-numcard { gap: 1.25rem; align-items: flex-start; }
.terrago-blog .terrago-numcard__media { margin: 0; flex: none; }
.terrago-blog .terrago-numcard__media img {
  width: 145px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--tg-radius-media);
}
.terrago-blog .terrago-numcard__body { flex: 1; min-width: 0; }
.terrago-blog .terrago-numcard__title { margin: 0 0 0.75rem; line-height: 1.3; font-weight: 600; }
.terrago-blog .terrago-numcard__title a { color: inherit; text-decoration: none; }
.terrago-blog .terrago-numcard__title a:hover { color: var(--wp--preset--color--primary); }

.terrago-blog .terrago-datemeta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--wp--preset--color--muted);
}
.terrago-blog .terrago-datemeta::before {
  content: "";
  flex: none;
  width: 15px;
  height: 15px;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat var(--tg-cal);
  mask: center / contain no-repeat var(--tg-cal);
  --tg-cal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 2v2H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2h-2V2h-2v2H9V2H7zM5 9h14v11H5V9z'/%3E%3C/svg%3E");
}
.terrago-blog .terrago-datemeta time { color: inherit; }

/* ============================================================== CTA band == */

.terrago-blog .terrago-blogcta h2 { line-height: 1.2; margin-bottom: 0.75rem; }
.terrago-blog .terrago-blogcta .wp-block-button__link {
  padding: 1rem 2.25rem;
  font-weight: 500;
}

/* ============================================================ newsletter == */

/* The card sits over the navy footer. The pull is applied to the footer, not
   as a negative bottom margin on this wrapper — that one collapses through
   <main> and lands somewhere unpredictable. */
.terrago-blog .terrago-newsletter-wrap {
  position: relative;
  z-index: 2;
}
.terrago-blog .terrago-newsletter-card {
  background: var(--wp--preset--color--contrast);
  border-radius: var(--tg-radius-card);
  box-shadow: 0 24px 60px rgba(1, 1, 1, 0.12);
  padding: 3.5rem 4rem;
}
.terrago-blog .terrago-newsletter-card__title { margin: 0 0 1rem; line-height: 1.2; }
.terrago-blog .terrago-newsletter-card p { margin: 0; }

.terrago-blog .terrago-newsletter-note { margin-top: 0.85rem !important; }

/* Fluent Forms markup, restyled to the design's input + navy Subscribe pill.
 *
 * The form is terrago/newsletter → the Fluent Forms form titled
 * "TerraGo Newsletter". setup.sh seeds that from Fluent Forms' stock
 * `newsletter_form` template, which also carries a section-break heading and
 * first/last-name fields the design does not show — so those are suppressed
 * here too, and the sheet renders correctly against either shape.
 *
 * Fluent Forms prints its own per-form <style> for the submit button and puts
 * `flex-basis` inline on the column cells, hence the !important flags. */
.terrago-blog .terrago-newsletter-form .ff-el-section-break,
.terrago-blog .terrago-newsletter-form .ff-name-field-wrapper,
.terrago-blog .terrago-newsletter-form .ff-el-input--label,
.terrago-blog .terrago-newsletter-form .ff-el-tooltip { display: none !important; }

.terrago-blog .terrago-newsletter-form,
.terrago-blog .terrago-newsletter-form .fluentform,
.terrago-blog .terrago-newsletter-form form,
.terrago-blog .terrago-newsletter-form fieldset {
  width: 100%;
  max-width: 100%;
  min-inline-size: 0;
}
/* Fluent Forms puts `flex-basis: 50%` inline on both cells, which wraps the
   button onto its own line at this width — hence nowrap + explicit bases. */
.terrago-blog .terrago-newsletter-form .ff-t-container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}
/* Fluent Forms also sets `width: 100%` on the cells, which becomes the second
   cell's flex base and starves the first — hence `width: auto`. */
.terrago-blog .terrago-newsletter-form .ff-t-cell {
  flex: 1 1 0% !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0;
}
.terrago-blog .terrago-newsletter-form .ff-t-cell:last-child { flex: 0 0 auto !important; }
.terrago-blog .terrago-newsletter-form .ff-el-group { margin: 0; }
.terrago-blog .terrago-newsletter-form .ff_submit_btn_wrapper { display: block; }
.terrago-blog .terrago-newsletter-form .ff-btn-submit { margin-bottom: 0 !important; }
.terrago-blog .terrago-newsletter-form input[type="email"],
.terrago-blog .terrago-newsletter-form input[type="text"] {
  width: 100%;
  height: 56px;
  padding: 0 1.35rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 999px;
  background: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--base);
  font-size: var(--wp--preset--font-size--base);
  box-shadow: none;
}
.terrago-blog .terrago-newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--wp--preset--color--primary);
}
.terrago-blog .terrago-newsletter-form .ff-btn,
.terrago-blog .terrago-newsletter-form .ff-btn-submit {
  min-width: 10rem !important;
  height: 56px;
  padding: 0 2rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--wp--preset--color--primary) !important;
  background-color: var(--wp--preset--color--primary) !important;
  color: var(--wp--preset--color--contrast) !important;
  font-weight: 600;
  font-size: var(--wp--preset--font-size--base);
  cursor: pointer;
}
.terrago-blog .terrago-newsletter-form .ff-btn-submit:hover {
  filter: brightness(1.12);
}
.terrago-blog .terrago-newsletter-form .ff-el-is-error .text-danger,
.terrago-blog .terrago-newsletter-form .error-text {
  font-size: var(--wp--preset--font-size--caption);
}

/* Room for the overlapping card. Scoped to the journal listing only.
   `footer.wp-block-template-part` is the transparent wrapper the template-part
   block emits; the navy lives on the group inside it, so the wrapper has to
   carry the brand colour or its padding would render as a white gap. */
body.blog .wp-site-blocks > footer.wp-block-template-part {
  margin-top: -10rem;
  padding-top: 12rem;
  background-color: var(--wp--preset--color--primary);
}

/* ============================================================ responsive == */

@media (max-width: 1099px) {
  .terrago-blog .terrago-blogcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .terrago-blog .terrago-numgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .terrago-blog .terrago-newsletter-card { padding: 2.5rem; }
}

@media (max-width: 781px) {
  .terrago-blog .terrago-blogcards,
  .terrago-blog .terrago-numgrid { grid-template-columns: minmax(0, 1fr); }

  .terrago-blog .terrago-bloghero__title { max-width: none; }
  .terrago-blog .terrago-latest__intro { padding-right: 0; }
  .terrago-blog .terrago-quote-inline { max-width: none; }
  .terrago-blog .terrago-herocard { margin-top: 2.5rem; }

  .terrago-blog .terrago-browse__head { display: block; }
  .terrago-blog .terrago-browse__head h2 { margin-bottom: 1.25rem; }
  .terrago-blog .terrago-blogsearch .wp-block-search__inside-wrapper { width: 100% !important; }

  /* Chips wrap on small screens. A horizontal scroll strip reads better but
     leaves children measurably outside the viewport, which the responsive
     audit flags — wrapping keeps that check unambiguous. */
  .terrago-blog .terrago-filterbar { gap: 0.5rem; }
  .terrago-blog .terrago-catchips { gap: 0.5rem; }
  .terrago-blog .terrago-chip,
  .terrago-blog .terrago-catchips li > a {
    padding: 0.6rem 1rem;
    font-size: var(--wp--preset--font-size--caption);
  }

  .terrago-blog .terrago-storyrow { flex-wrap: wrap; }
  .terrago-blog .terrago-storyrow__body { flex-basis: 100%; order: 3; }

  .terrago-blog .terrago-numgrid > li::before { left: 130px; }

  /* No overlap on small screens — the card would swamp the footer. */
  body.blog .wp-site-blocks > footer.wp-block-template-part {
    margin-top: 0;
    padding-top: 0;
  }
  .terrago-blog .terrago-newsletter-card { padding: 2rem 1.5rem; }
  .terrago-blog .terrago-newsletter-form .ff-t-container { flex-wrap: wrap; }
  .terrago-blog .terrago-newsletter-form .ff-t-cell,
  .terrago-blog .terrago-newsletter-form .ff-t-cell:last-child {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  .terrago-blog .terrago-newsletter-form .ff-btn-submit {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* ══════════════════════════════════════════════════ single post (Blog Detail)
   Built to the design frame (Blog Detail.png). The page opens with a
   full-bleed photograph, the header overlaid on it, and a white card
   straddling the bottom edge of the image. */

.terrago-post-hero {
  /* No dim: the design shows the photograph at full strength, and the card
     below carries the text rather than overlaying it. */
  margin-bottom: 0;
}
.terrago-post-hero .wp-block-cover__inner-container { display: none; }

/* The card is a sibling of the cover, pulled up over it. Nesting it inside the
   cover would trap it in the image's box; this way its lower half sits on the
   white page and only the top overlaps. */
.terrago-post-headwrap { position: relative; z-index: 2; margin-top: -230px; }
.terrago-post-head {
  background: var(--wp--preset--color--contrast);
  border-radius: var(--terrago-radius);
  padding: 3rem 3.25rem 2.5rem;
  box-shadow: 0 18px 40px rgba(1, 1, 1, 0.07);
}
.terrago-post-head .wp-block-post-title { line-height: 1.08; }

/* Byline: avatar + author/date on the left, reading-time pill on the right. */
.terrago-byline { width: 100%; }
.terrago-byline-who .wp-block-avatar img { border-radius: 999px; display: block; }
.terrago-byline .wp-block-post-author-name a { text-decoration: none; }
.terrago-byline-date { color: var(--wp--preset--color--base); font-weight: 600; }

/* Reading time is a mint pill on the byline, plain text everywhere else — the
   pill styling is scoped to the class the template adds, not to the block. */
.terrago-readtime-pill .terrago-readtime,
.terrago-readtime-pill.terrago-readtime {
  display: inline-block;
  background: var(--wp--preset--color--mint);
  color: var(--wp--preset--color--primary);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
}

/* Sticky TOC, now on the left as in the design. */
.terrago-post .terrago-article-aside { position: sticky; top: 7rem; align-self: start; }

/* Article FAQ — native <details>, so it works without JS. */
.terrago-post-faq { margin-top: 2.5rem; }
.terrago-post-faq details {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--terrago-radius-sm);
  margin-bottom: 0.75rem;
  background: var(--wp--preset--color--contrast);
}
.terrago-post-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 1.35rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.terrago-post-faq summary::-webkit-details-marker { display: none; }
/* Chevron drawn in CSS so it needs no icon asset, and rotates on open. */
.terrago-post-faq summary::after {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--wp--preset--color--base);
  border-bottom: 2px solid var(--wp--preset--color--base);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}
.terrago-post-faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.terrago-post-faq details > div { padding: 0 1.35rem 1.25rem; }
.terrago-post-faq details > div p {
  margin: 0;
  color: var(--wp--preset--color--muted);
  font-size: var(--wp--preset--font-size--small);
}

/* Author card: avatar beside the text, coral arrow link. */
.terrago-authorcard { gap: 1.5rem; align-items: flex-start; }
.terrago-authorcard .wp-block-avatar img { border-radius: 999px; display: block; }
.terrago-eyebrow-plain {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--wp--preset--color--muted);
  margin: 0;
}
.terrago-arrowlink a {
  color: var(--wp--preset--color--accent);
  text-decoration: none;
  font-weight: 600;
}
.terrago-arrowlink a:hover { text-decoration: underline; }

/* Keep Reading cards gain a meta row and a divider + arrow foot. */
.terrago-cardmeta { gap: 0.5rem; font-size: var(--wp--preset--font-size--caption); }
.terrago-cardmeta-time::before { content: "• "; color: var(--wp--preset--color--muted); }
.terrago-cardfoot {
  margin-top: 1.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--wp--preset--color--border);
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--muted);
}
.terrago-cardfoot .terrago-cardarrow a { text-decoration: none; font-size: 1.1rem; }

/* Newsletter overlaps the footer, exactly as on Home. */
.terrago-post ~ footer.wp-block-template-part {
  padding-top: 0;
  margin-top: calc(var(--terrago-nl-overlap, 55px) * -1) !important;
}
.terrago-post ~ footer.wp-block-template-part > .wp-block-group.has-primary-background-color {
  padding-top: calc(var(--terrago-nl-overlap, 55px) + 5rem) !important;
}

@media (max-width: 781px) {
  /* The card can no longer straddle a short hero without swallowing it. */
  .terrago-post-headwrap { margin-top: -90px; }
  .terrago-post-head { padding: 2rem 1.5rem 1.75rem; }
  .terrago-post .terrago-article-aside { position: static; }
}

/* The design's article eyebrow is a bullet + dark bold label, not the coral
   letterspaced caps used on the listing cards. Scoped to the head card so the
   Keep Reading cards keep their own treatment. */
.terrago-post-head .terrago-postmeta a {
  color: var(--wp--preset--color--base);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.terrago-post-head .terrago-postmeta::before {
  content: "•";
  margin-right: 0.5rem;
  color: var(--wp--preset--color--base);
}

/* style.css dot-separates byline children — right for the old inline
   "author · read time · date", wrong now that the byline is two flex groups
   with the reading time as a pill on the far right. */
.terrago-post-head .terrago-byline > * + *::before { content: none; }
