/*!
 * Blog index (spec A §4) and blog articles. Loaded by get_header( 'sl', array( 'page' => 'blog' ) ).
 * Parts: page-blog.php, template-parts/sl/blog-card.php, blog-article.php. Behaviour: sl-blog.js.
 */

.sl-blog-h2 {
  margin: 0 0 clamp(14px, 1.6vw, 22px); font-family: var(--sl-font-display); font-weight: 700;
  font-size: clamp(28px, 3.2vw, 42px); line-height: 1.04; letter-spacing: -.025em; color: var(--sl-ink);
}
.sl-bkicker { display: block; margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5A6B6E; }   /* grey, as in the design (Oct 2026) */

/* -------------------------------------------------- featured carousel */
.sl-bhero { position: relative; isolation: isolate; overflow: hidden; background: var(--sl-ink); color: var(--sl-white); }
.sl-bhero__bgs { position: absolute; inset: 0; z-index: -2; background: #1A505B; }
.sl-bhero__bg { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.sl-bhero__bg.is-active { opacity: 1; }
.sl-bhero .sl-bhero__bg img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.sl-bhero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(16, 25, 33, .92) 0%, rgba(16, 25, 33, .78) 34%, rgba(16, 25, 33, .25) 66%, rgba(16, 25, 33, .05) 100%),
    linear-gradient(0deg, rgba(16, 25, 33, .55) 0%, rgba(16, 25, 33, 0) 40%);
}
.sl-bhero__inner {
  position: relative; max-width: var(--sl-max); margin: 0 auto; min-height: clamp(460px, 40vw, 600px);
  padding: clamp(48px, 6vw, 96px) var(--sl-gutter) clamp(36px, 4vw, 56px);
  display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(28px, 3.6vw, 48px);
}
/* The page's H1 sits just above the story's title (design, Round 3): 14px over the stage. */
.sl-bhero__label {
  margin: 0 0 calc(14px - clamp(28px, 3.6vw, 48px)); font-family: var(--sl-font-body); font-size: var(--sl-fs-2xs); font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase; color: var(--sl-lime);
}
.sl-bhero__stage { display: grid; max-width: 640px; }
.sl-bhero__slide {
  grid-area: 1 / 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0;
  opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s;
}
.sl-bhero__slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.sl-bhero__kicker { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sl-white); }
.sl-bhero__kicker i { font-style: normal; }
.sl-root .sl-bhero__kicker a { color: var(--sl-white); }
.sl-root .sl-bhero__kicker a:hover { color: var(--sl-white); text-decoration: underline; text-underline-offset: 3px; }
.sl-bhero__title {
  margin: 0; font-family: var(--sl-font-display); font-weight: 700; font-size: clamp(32px, 4vw, 56px);
  line-height: 1.03; letter-spacing: -.025em; color: var(--sl-white); text-wrap: balance;
}
.sl-bhero__ex {
  margin: 0; max-width: 56ch; font-size: 17px; line-height: 1.6; color: #E9ECEA;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sl-bhero .sl-bhero__cta { margin-top: 8px; font-size: 18px; font-weight: 700; }
.sl-bhero__controls { display: flex; align-items: center; gap: 16px; }
.sl-bhero__count { font-size: var(--sl-fs-sm); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sl-bhero__count b { font-weight: 700; color: var(--sl-lime); }
.sl-bhero__dots { display: flex; gap: 8px; }
.sl-bhero__dot {
  position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--sl-r-pill);
  background: rgba(255, 255, 255, .55); cursor: pointer; transition: width .3s ease, background .3s ease;
}
.sl-bhero__dot::before { content: ""; position: absolute; inset: -18px -4px; }   /* 44px tall hit area */
.sl-bhero__dot.is-active { width: 32px; background: var(--sl-lime); }
.sl-bhero__arrows { display: flex; gap: 8px; margin-left: auto; }
.sl-bhero__arrow {
  width: 44px; height: 44px; padding: 0; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: var(--sl-r-pill);
  display: grid; place-items: center; background: transparent; color: var(--sl-white); cursor: pointer;
  transition: background var(--sl-t) ease, border-color var(--sl-t) ease;
}
.sl-bhero__arrow:hover { background: rgba(255, 255, 255, .12); border-color: var(--sl-white); }
.sl-bhero__arrow svg { stroke-width: 2.2; }
.sl-bhero__ico-play { display: none; }
.sl-bhero.is-paused .sl-bhero__ico-play { display: block; }
.sl-bhero.is-paused .sl-bhero__ico-pause { display: none; }
@media (max-width: 760px) {
  /* Design 22 Oct: navy 135deg wash with a lime glow bottom right; lime label just above
     the title; the story's categories as white eyebrows under it; no excerpt. Phones don't
     auto-advance (sl-blog.js), so the pause button goes too. */
  .sl-bhero::before {
    background:
      radial-gradient(ellipse 85% 60% at 100% 100%, rgba(217, 253, 111, .5) 0%, rgba(29, 90, 102, .2) 50%, rgba(29, 90, 102, 0) 78%),
      linear-gradient(135deg, rgba(16, 25, 33, .94) 0%, rgba(16, 25, 33, .78) 45%, rgba(16, 25, 33, .5) 100%);
  }
  .sl-bhero__label { margin: 0 0 -14px; font-size: 12px; color: var(--sl-lime); }
  .sl-bhero__kicker { order: 1; font-size: 11px; letter-spacing: .08em; color: var(--sl-white); }
  .sl-bhero__kicker i { margin: 0 4px; }
  .sl-bhero__ex { display: none; }
  .sl-bhero .sl-bhero__cta { order: 2; font-weight: 700; }
  .sl-bhero [data-sl-car-pause] { display: none; }
}
@media (max-width: 420px) {
  .sl-bhero__controls { gap: 12px; }
}
@media (max-width: 380px) {
  .sl-bhero__count { display: none; }   /* no room beside the dots and three buttons */
}

/* -------------------------------------------------- latest + popular */
.sl-bspot { background: var(--sl-sand); }
.sl-bspot__grid {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(28px, 3.4vw, 56px); align-items: stretch;
  padding-top: clamp(40px, 4.6vw, 72px); padding-bottom: clamp(16px, 2vw, 28px);
}
.sl-bspot__latest, .sl-bspot__pop { display: flex; flex-direction: column; min-width: 0; }
.sl-poplist { flex: 1; display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--sl-line); }
.sl-poplist li { flex: 1; display: flex; border-top: 1px solid var(--sl-line); }
.sl-root .sl-poplist a { flex: 1; display: flex; align-items: center; gap: 18px; padding: 16px 0; color: var(--sl-ink); }
.sl-poplist__thumb { flex: 0 0 auto; width: clamp(120px, 11vw, 168px); aspect-ratio: 3 / 2; overflow: hidden; border-radius: 14px; background: var(--sl-line); }
.sl-poplist .sl-poplist__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--sl-ease); }
.sl-poplist a:hover img { transform: scale(1.06); }
.sl-poplist__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sl-poplist__title {
  font-family: var(--sl-font-display); font-weight: 700; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.25;
  letter-spacing: -.015em; color: var(--sl-ink); text-wrap: pretty;
}
.sl-poplist a:hover .sl-poplist__title { text-decoration: underline; }
@media (max-width: 900px) { .sl-bspot__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .sl-poplist__thumb { width: 116px; } }

/* ---------------------------------------------------------- post card */
.sl-root .sl-bcard {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 18px;
  background: var(--sl-white); color: var(--sl-ink);
  box-shadow: 0 1px 2px rgba(16, 25, 33, .06), 0 0 0 1px var(--sl-line);
  transition: box-shadow var(--sl-t) ease, transform var(--sl-t) ease;
}
.sl-root .sl-bcard:hover { color: var(--sl-ink); box-shadow: 0 14px 30px rgba(16, 25, 33, .12), 0 0 0 1px var(--sl-line); transform: translateY(-2px); }
.sl-bcard__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sl-line); }
.sl-bcard .sl-bcard__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--sl-ease); }
.sl-bcard:hover .sl-bcard__media img { transform: scale(1.06); }
.sl-bcard__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: clamp(18px, 1.8vw, 24px); }
.sl-bcard__title {
  margin: 0; font-family: var(--sl-font-display); font-weight: 700; font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.22; letter-spacing: -.015em; color: var(--sl-ink); text-wrap: pretty;
}
.sl-bcard__ex {
  font-size: 15px; line-height: 1.55; color: var(--sl-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sl-bcard__date { margin-top: auto; padding-top: 8px; font-size: var(--sl-fs-xs); font-weight: 500; color: var(--sl-muted); }
.sl-bcard--lg { flex: 1; }
.sl-bcard--lg .sl-bcard__media { position: relative; flex: 1 1 0; aspect-ratio: auto; min-height: clamp(220px, 22vw, 320px); }
.sl-bcard--lg .sl-bcard__media img { position: absolute; inset: 0; }
.sl-bcard--lg .sl-bcard__body { flex: 0 0 auto; padding: clamp(20px, 2vw, 30px); }
.sl-bcard--lg .sl-bcard__title { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.12; letter-spacing: -.025em; }
.sl-bcard--lg .sl-bcard__ex { font-size: 16px; }
.sl-bcard--lg .sl-bcard__date { margin-top: 0; padding-top: 4px; }

/* ------------------------------------------------- all articles: tools */
.sl-bgrid { scroll-margin-top: 72px; background: var(--sl-sand); padding: clamp(40px, 4.6vw, 72px) 0 clamp(48px, 5.6vw, 88px); }
.sl-bgrid__head { display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 20px); padding-bottom: clamp(20px, 2.2vw, 28px); }
.sl-bgrid__head .sl-blog-h2 { margin: 0; }
.sl-bgrid__tools { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.sl-btopic { display: none; }
.sl-bchips { flex: 0 1 auto; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.sl-bchips::-webkit-scrollbar { display: none; }
.sl-root .sl-bchip {
  flex: 0 0 auto; display: inline-flex; align-items: center; height: 40px; padding: 0 18px;
  border: 1px solid var(--sl-line); border-radius: var(--sl-r-pill); background: var(--sl-white);
  font-size: 15px; font-weight: 700; color: var(--sl-ink); white-space: nowrap;
  transition: background var(--sl-t) ease, border-color var(--sl-t) ease;
}
.sl-root .sl-bchip:hover { border-color: var(--sl-ink); color: var(--sl-ink); }
.sl-root .sl-bchip[aria-current] { border-color: var(--sl-lime); background: var(--sl-lime); }
.sl-bsearch { flex: 1 1 320px; min-width: 240px; max-width: 440px; margin: 0; }
.sl-bsearch__box {
  display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 20px; cursor: text;
  border: 1.5px solid var(--sl-ink); border-radius: var(--sl-r-pill); background: var(--sl-white); color: var(--sl-ink);
  box-shadow: 0 4px 14px rgba(16, 25, 33, .08); transition: box-shadow var(--sl-t) ease;
}
.sl-bsearch__box:hover { box-shadow: 0 6px 18px rgba(16, 25, 33, .14); }
.sl-bsearch__box:focus-within { box-shadow: 0 0 0 3px rgba(29, 90, 102, .22); }
.sl-bsearch__box svg { flex: 0 0 auto; }
.sl-bsearch input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent;
  font: 600 17px/1.2 var(--sl-font-body); color: var(--sl-ink); -webkit-appearance: none; appearance: none;
}
.sl-bsearch input::placeholder { color: #5A6B6E; opacity: 1; }
@media (max-width: 760px) {
  .sl-bgrid__tools { flex-direction: column-reverse; flex-wrap: nowrap; align-items: stretch; }   /* nowrap: a wrapping column line would size to the chips' full width */
  .sl-bsearch { flex-basis: auto; min-width: 0; max-width: none; }
  .sl-bchips { display: none; }
  .sl-bsearch input { font-size: 16px; }
  .sl-btopic { position: relative; display: block; }
  .sl-btopic select {
    -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 100%; height: 56px; margin: 0;
    padding: 20px 48px 4px 20px; border: 1px solid var(--sl-line-soft-2, #D6DBD8); border-radius: 16px; background: var(--sl-white);
    color: var(--sl-ink); font: 700 16px/1.2 var(--sl-font-body); cursor: pointer;
  }
  .sl-btopic select:focus { outline: 2px solid var(--sl-teal); outline-offset: 2px; }
  .sl-btopic__label { position: absolute; left: 20px; top: 8px; z-index: 1; font-size: 12px; font-weight: 600; color: var(--sl-muted); pointer-events: none; }
  .sl-btopic__chev { position: absolute; right: 18px; top: 19px; color: var(--sl-ink); pointer-events: none; }
}

/* ------------------------------------------------- all articles: grid */
.sl-bgrid__results { padding-top: clamp(8px, 1.4vw, 24px); transition: opacity var(--sl-t) ease; }
.sl-bgrid__results.is-loading { opacity: .45; }
.sl-bgrid__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(14px, 1.8vw, 24px); }

.sl-bpages { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: clamp(28px, 3.4vw, 48px); }
.sl-root .sl-bpages__arrow {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1.5px solid #D6DBD8; border-radius: var(--sl-r-pill); background: var(--sl-white); color: var(--sl-ink);
}
.sl-root a.sl-bpages__arrow:hover { border-color: var(--sl-ink); color: var(--sl-ink); }
.sl-bpages__arrow svg { stroke-width: 2.2; }
.sl-bpages__arrow.is-off { opacity: .4; }
.sl-root .sl-bpages__n {
  min-width: 44px; height: 44px; padding: 0 6px; display: grid; place-items: center; border-radius: var(--sl-r-pill);
  font-size: 15px; font-weight: 700; color: var(--sl-ink); font-variant-numeric: tabular-nums;
}
.sl-root a.sl-bpages__n:hover { background: #EEF1F0; color: var(--sl-ink); }
.sl-bpages__n.is-current { background: var(--sl-white); box-shadow: inset 0 0 0 1.5px var(--sl-ink); }
.sl-bpages__gap { min-width: 24px; text-align: center; font-weight: 700; color: var(--sl-muted); }

.sl-bempty {
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  padding: clamp(40px, 5vw, 72px) 24px; border: 1.5px dashed #C9D0CD; border-radius: 22px;
}
.sl-bempty__msg { margin: 0; font-family: var(--sl-font-display); font-weight: 700; font-size: 24px; letter-spacing: -.025em; color: var(--sl-ink); overflow-wrap: anywhere; }
.sl-root .sl-bempty__btn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 22px;
  border: 1.5px solid var(--sl-ink); border-radius: var(--sl-r-pill); font-size: 15px; font-weight: 700; color: var(--sl-ink);
}
.sl-root .sl-bempty__btn:hover { background: var(--sl-ink); color: var(--sl-white); }

/* --------------------------------------------------------------- article */
.sl-article { background: var(--sl-white); }
.sl-article__head { padding-top: clamp(28px, 3.4vw, 56px); }
.sl-article__wrap { max-width: 880px; margin: 0 auto; padding-inline: var(--sl-gutter); }
.sl-bcrumbs ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0 0 clamp(18px, 2vw, 28px); padding: 0;
  list-style: none; font-size: var(--sl-fs-xs); font-weight: 600;
}
.sl-bcrumbs li { display: inline-flex; align-items: center; }
.sl-bcrumbs li + li::before { content: "\203A"; margin: 0 8px; color: var(--sl-subtle); }
.sl-root .sl-bcrumbs a { color: var(--sl-muted); }
.sl-root .sl-bcrumbs a:hover { color: var(--sl-teal); text-decoration: underline; }
.sl-article__cats { margin-bottom: 14px; }
.sl-article__title {
  margin: 0; font-family: var(--sl-font-display); font-weight: 700; font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.04; letter-spacing: -.03em; color: var(--sl-ink); text-wrap: balance; overflow-wrap: break-word;
}
.sl-article__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; font-size: 15px; font-weight: 600; color: var(--sl-muted); }
.sl-article__hero { max-width: 1180px; margin: clamp(28px, 3.4vw, 48px) auto 0; padding-inline: var(--sl-gutter); }
.sl-article .sl-article__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: clamp(16px, 2vw, 24px); background: var(--sl-line); }
.sl-article__body { max-width: 760px; margin: 0 auto; padding: clamp(32px, 4vw, 56px) var(--sl-gutter) clamp(56px, 6vw, 96px); }

/* Post content: Gutenberg paragraphs, headings, lists, tables, buttons. */
.sl-prose { font-size: 18px; line-height: 1.75; color: #2B3B3F; overflow-wrap: break-word; }
.sl-prose > :first-child { margin-top: 0; }
.sl-prose > :last-child { margin-bottom: 0; }
.sl-prose p { margin: 0 0 1.15em; }
.sl-prose h2 {
  margin: 1.9em 0 .55em; font-family: var(--sl-font-display); font-weight: 700; font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.12; letter-spacing: -.025em; color: var(--sl-ink); scroll-margin-top: 90px;
}
.sl-prose h3 {
  margin: 1.6em 0 .5em; font-family: var(--sl-font-display); font-weight: 700; font-size: clamp(21px, 2vw, 25px);
  line-height: 1.2; letter-spacing: -.02em; color: var(--sl-ink); scroll-margin-top: 90px;
}
.sl-prose h4 { margin: 1.4em 0 .45em; font: 700 19px/1.3 var(--sl-font-body); color: var(--sl-ink); }
.sl-prose h5, .sl-prose h6 { margin: 1.3em 0 .4em; font: 800 16px/1.35 var(--sl-font-body); color: var(--sl-ink); }
.sl-prose ul, .sl-prose ol { margin: 0 0 1.2em; padding-left: 1.35em; }
.sl-prose li { margin: .4em 0; padding-left: .2em; }
.sl-prose li::marker { color: var(--sl-teal); }
.sl-prose li > ul, .sl-prose li > ol { margin: .4em 0 0; }
.sl-prose strong, .sl-prose b { font-weight: 700; color: var(--sl-ink); }
.sl-root .sl-prose a { color: var(--sl-teal); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sl-root .sl-prose a:hover { color: var(--sl-teal-hover); text-decoration-thickness: 2px; }
.sl-prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--sl-lime); font-size: 20px; color: var(--sl-ink); }
.sl-prose figure { margin: 1.6em 0; }
.sl-prose img { max-width: 100%; height: auto; border-radius: 16px; }
.sl-prose hr { height: 1px; margin: 2em 0; border: 0; background: var(--sl-line); }
.sl-prose .wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sl-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.sl-prose th, .sl-prose td { padding: 12px 14px; border: 1px solid var(--sl-line); text-align: left; vertical-align: top; }
.sl-prose th, .sl-prose thead td { background: var(--sl-sand); font-weight: 700; color: var(--sl-ink); }
.sl-prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0; }
.sl-root .sl-prose .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 12px 30px;
  border-radius: var(--sl-r-pill); background: var(--sl-lime); color: var(--sl-ink);
  font: 700 17px/1.2 var(--sl-font-body); text-align: center; text-decoration: none;
}
.sl-root .sl-prose .wp-block-button__link:hover { background: var(--sl-lime-hover); color: var(--sl-ink); }
@media (max-width: 560px) {
  .sl-prose { font-size: 17px; }
}

/* ------------------------------------------------------------- related */
.sl-related { background: var(--sl-sand); padding-block: clamp(48px, 6vw, 88px); }
.sl-related__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: clamp(16px, 2vw, 24px); }
.sl-related__head .sl-blog-h2 { margin: 0; }
.sl-related__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
@media (max-width: 900px) { .sl-related__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sl-related__cards { grid-template-columns: minmax(0, 1fr); } }
