/* ==========================================================================
   Single article — block-editor articles built to the "Article.dc.html"
   design (Claude Design project 66a781bc).

   Loaded site-wide but only bites inside the "Article (new design)" template,
   so the 79 legacy ACF-bodied posts are untouched.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600&family=Lato:wght@400;600;700&display=swap');

.slm-article-hero,
.slm-article-body,
.slm-related {
  --slm-gold: #BA9804;
  --slm-gold-dark: #9A7D03;
  --slm-green: #537253;
  --slm-green-dark: #3F5740;
  --slm-wash: #F1F4ED;
  --slm-ink: #1c1b1f;
  --slm-strong: #25292F;
  --slm-body: #3D434D;
  --slm-muted: #5E636B;
  /* --slm-light and --slm-line are consumed by the shared .slm-card styles in
     news-blocks.css; without them here the card date resolves to white-on-white. */
  --slm-light: #8E9298;
  --slm-line: #D6D6D7;
  --slm-line-soft: #ECECED;
  --slm-container: 1280px;
  --slm-gutter: 56px;
  --slm-measure: 880px;

  font-family: 'Lato', sans-serif;
}

/* ---- Hero ---------------------------------------------------------------- */
.wp-site-blocks > .slm-article-hero { margin-top: 0; }

.slm-article-hero {
  position: relative;
  height: 560px;
  overflow: hidden;
}
.slm-article-hero > * { margin-top: 0; margin-bottom: 0; }

.slm-article-hero .wp-block-post-featured-image {
  position: absolute;
  inset: 0;
  margin: 0;
  height: 100%;
}
.slm-article-hero .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.slm-article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 24, 18, .15) 0%, rgba(20, 24, 18, .72) 100%);
  pointer-events: none;
}

.slm-article-hero-inner {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  max-width: var(--slm-container);
  margin: 0 auto;
  padding: 0 var(--slm-gutter) 52px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.slm-article-hero-inner > * { margin: 0; }

.slm-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, .82);
}
.slm-crumbs p { margin: 0; }
/* style.css has `.wp-block-group p a { text-decoration: underline }` (0,2,2)
   and loads after this file, so the crumbs need a heavier selector. */
.slm-article-hero .slm-article-hero-inner .slm-crumbs a {
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
}
.slm-crumbs a:hover { color: #fff; text-decoration: underline; }
.slm-crumbs .slm-crumb-cat {
  color: #fff;
  font-weight: 600;
}
.slm-crumbs .slm-crumb-cat a { color: #fff; }
/* Posts sit in several categories — the crumb shows the first */
.slm-crumbs .slm-crumb-cat a:not(:first-of-type),
.slm-crumbs .slm-crumb-cat .wp-block-post-terms__separator { display: none; }

.slm-article-date {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, .9);
}
.slm-article-title {
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 1.2;
  color: #fff;
  max-width: 820px;
  text-wrap: balance;
  padding: 0;
  margin: 0;
}

/* ---- Body ---------------------------------------------------------------- */
.slm-article-body {
  padding: 52px var(--slm-gutter) 0;
}
.slm-article-body > .entry-content,
.slm-article-body > .wp-block-post-content {
  max-width: var(--slm-measure);
  margin: 0 auto;
}

/* ---- Prose --------------------------------------------------------------- */
.slm-prose p {
  margin: 0 0 20px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--slm-body);
}
.slm-prose > p:first-child,
.slm-prose p.slm-lede {
  font-size: 24px;
  line-height: 1.6;
  color: var(--slm-strong);
}
.slm-prose a {
  color: var(--slm-gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.slm-prose a:hover { color: var(--slm-gold); }

.slm-prose h2 {
  margin: 44px 0 16px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1.2;
  color: var(--slm-ink);
  padding: 0;
  scroll-margin-top: 24px;
}
.slm-prose h3 {
  margin: 34px 0 12px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  color: var(--slm-ink);
  padding: 0;
  scroll-margin-top: 24px;
}
.slm-prose h4 {
  margin: 28px 0 10px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  color: var(--slm-ink);
}

.slm-prose ul,
.slm-prose ol {
  margin: 0 0 22px;
  padding-left: 24px;
}
.slm-prose li {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--slm-body);
}
.slm-prose li::marker { color: var(--slm-gold-dark); }

.slm-prose figure { margin: 34px 0; }
.slm-prose figure img { border-radius: 12px; display: block; }
.slm-prose figcaption {
  margin-top: 10px;
  font-size: 16px;
  color: var(--slm-muted);
  text-align: center;
}
.slm-prose hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--slm-line-soft);
}

/* Media & text and columns keep the measure but sit a little wider */
.slm-prose .wp-block-media-text,
.slm-prose .wp-block-columns { margin: 34px 0; }

/* ---- Block style: quote (is-style-slm-quote on core/quote) ---------------- */
.slm-prose .wp-block-quote.is-style-slm-quote {
  margin: 40px 0;
  padding: 24px 32px;
  border: 0;
  border-left: 4px solid var(--slm-gold);
  background: var(--slm-wash);
  border-radius: 0 12px 12px 0;
}
.slm-prose .wp-block-quote.is-style-slm-quote p {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.5;
  color: var(--slm-ink);
  font-style: italic;
}
.slm-prose .wp-block-quote.is-style-slm-quote cite {
  display: block;
  margin-top: 14px;
  font-style: normal;
  font-size: 16px;
  color: var(--slm-muted);
}

/* ---- Block style: callout (is-style-slm-callout on core/group) ------------ */
.slm-prose .wp-block-group.is-style-slm-callout {
  margin: 34px 0;
  padding: 22px 24px;
  border: 1px solid var(--slm-line-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,.08), 0 1px 2px -1px rgba(0,0,0,.06);
  border-left: 4px solid var(--slm-gold);
}
.slm-prose .wp-block-group.is-style-slm-callout > * { margin-top: 0; }
.slm-prose .wp-block-group.is-style-slm-callout > p:first-child {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--slm-strong);
  margin-bottom: 6px;
}
.slm-prose .wp-block-group.is-style-slm-callout > p:last-child {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--slm-muted);
}

/* ---- Rank Math table of contents ----------------------------------------- */
.slm-prose .wp-block-rank-math-toc-block {
  margin: 32px 0 40px;
  padding: 22px 26px;
  background: var(--slm-wash);
  border: 1px solid var(--slm-line-soft);
  border-radius: 12px;
}
.slm-prose .wp-block-rank-math-toc-block h2,
.slm-prose .wp-block-rank-math-toc-block h3 {
  margin: 0 0 12px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--slm-green-dark);
}
.slm-prose .wp-block-rank-math-toc-block ul,
.slm-prose .wp-block-rank-math-toc-block ol {
  margin: 0;
  padding-left: 20px;
}
.slm-prose .wp-block-rank-math-toc-block li { margin-bottom: 9px; font-size: 18px; }
.slm-prose .wp-block-rank-math-toc-block a {
  color: var(--slm-body);
  text-decoration: none;
}
.slm-prose .wp-block-rank-math-toc-block a:hover { color: var(--slm-gold-dark); }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .slm-article-hero { height: 440px; }
  .slm-article-title { font-size: 32px; }
  .slm-prose h2 { font-size: 27px; margin-top: 36px; }
  .slm-prose h3 { font-size: 21px; }
}
@media (max-width: 680px) {
  .slm-article-hero { --slm-gutter: 24px; height: 380px; }
  .slm-article-body { --slm-gutter: 24px; padding-top: 36px; }
  .slm-article-hero-inner { padding-bottom: 34px; gap: 12px; }
  .slm-article-title { font-size: 27px; }
  .slm-prose > p:first-child,
  .slm-prose p.slm-lede { font-size: 20px; }
  .slm-prose p,
  .slm-prose li { font-size: 17px; }
  .slm-prose .wp-block-quote.is-style-slm-quote { padding: 20px 22px; }
  .slm-prose .wp-block-quote.is-style-slm-quote p { font-size: 20px; }
}

/* ==========================================================================
   Article footer — taxonomy chips + sharing
   ========================================================================== */
.slm-article-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  /* sibling of the post content, so it needs the measure applied to it too */
  max-width: var(--slm-measure);
  margin: 44px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--slm-line-soft);
}

.slm-af-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* style.css underlines links inside groups and paragraphs — out-specify it */
.slm-article-body .slm-article-footer .slm-af-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 100px;
  background: var(--slm-wash);
  color: var(--slm-green-dark);
  font: 600 14px/1 'Lato', sans-serif;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.slm-article-body .slm-article-footer .slm-af-chip:hover {
  background: #E4EBDD;
  color: var(--slm-green);
}

.slm-af-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.slm-af-share-label {
  font: 600 14px/1 'Lato', sans-serif;
  color: var(--slm-muted);
}
.slm-article-body .slm-article-footer .slm-share-btn {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--slm-line-soft);
  color: var(--slm-muted);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.slm-article-body .slm-article-footer .slm-share-btn:hover,
.slm-article-body .slm-article-footer .slm-share-btn:focus-visible {
  background: var(--slm-wash);
  color: var(--slm-green-dark);
}
.slm-share-toast {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--slm-ink);
  color: #fff;
  font: 600 12px/1 'Lato', sans-serif;
  white-space: nowrap;
}
.slm-share-toast[hidden] { display: none; }

/* ==========================================================================
   More to read
   ========================================================================== */
.slm-related {
  background: var(--slm-wash);
  margin-top: 64px;
}
.wp-site-blocks > .slm-related { margin-top: 64px; }
/* Whatever follows the band (the footer part) is a top-level block and would
   pick up WordPress's global block gap, leaving a white strip above the footer.
   The footer element also carries its own ~30px of top padding site-wide, so
   that is dropped here too — scoped to "directly after the band", which only
   happens on an article, leaving every other page's footer as it is. */
.wp-site-blocks > .slm-related + * {
  margin-top: 0;
  padding-top: 0;
}

.slm-related-wrap {
  max-width: var(--slm-container);
  margin: 0 auto;
  padding: 56px var(--slm-gutter);
}
.slm-related-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.slm-related-heading {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1.2;
  color: var(--slm-ink);
}
.slm-related .slm-related-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 16px/1 'Lato', sans-serif;
  color: var(--slm-gold-dark);
  text-decoration: none;
  white-space: nowrap;
  transition: gap .15s ease;
}
.slm-related .slm-related-all:hover { gap: 10px; }

.slm-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
/* .slm-card and its children are styled in css/news-blocks.css — shared with
   the archive so the two card sets can't drift apart. */
.slm-related-grid .slm-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.slm-related-grid .slm-card-media a { display: block; height: 100%; }
.slm-related-grid .slm-card-title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

@media (max-width: 1100px) {
  .slm-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .slm-related { margin-top: 44px; }
  .slm-related-wrap { --slm-gutter: 24px; padding: 40px var(--slm-gutter); }
  .slm-related-heading { font-size: 26px; }
  .slm-related-grid { grid-template-columns: 1fr; }
  .slm-article-footer { gap: 18px; }
  .slm-af-share { gap: 8px; }
  .slm-af-share-label { flex: 0 0 100%; }
  .slm-article-body .slm-article-footer .slm-share-btn { width: 38px; height: 38px; }
}
