/* ==========================================================================
   EM3 Energy - blog.css
   Single blog post (/resources/blog/<slug>/). Extends brand.css + nav.css.
   Enqueued on is_singular('post') (functions.php). Breakpoints 980 / 640 / 420.
   No em dashes anywhere. (Archive + category styles are appended in Phase 4.)

   MARKUP CONTRACT (emitted by em3_blog_render_single in theme/inc/blog-single.php)
   ------------------------------------------------------------------------------
   <article class="em3-blog-article">
     <div class="em3-blog-progress"><span class="em3-blog-progress__bar"></span></div>
     <header class="em3-blog-hero em3-bg-deep">
       <div class="em3-wrap em3-blog-hero__inner">
         <nav class="em3-blog-crumb"> Resources / Blog / Category </nav>
         <a class="em3-eyebrow tagged em3-blog-hero__cat">Category</a>
         <h1 class="em3-blog-hero__title">Title</h1>
         <ul class="em3-blog-meta"> by / date / read </ul>
       </div>
       <div class="em3-wrap em3-blog-hero__media"><figure><img .em3-blog-hero__img></figure></div>
     </header>
     <section class="em3-section em3-bg-snow on-light em3-blog-body">
       <div class="em3-wrap em3-blog-body__grid">
         <div class="em3-blog-main"> .em3-blog-prose (the_content) + footer.em3-blog-end </div>
         <aside class="em3-blog-aside"> nav.em3-blog-toc + .em3-blog-sharecard </aside>
     </section>
     <section class="em3-section em3-bg-deep em3-blog-more">
       head + ul.em3-blog-cards (li.em3-blog-card) + .em3-blog-more__cta
     </section>
   </article>
   ========================================================================== */

/* In-page anchor jumps (ToC) cleared for the fixed glass nav. */
.em3-blog-prose h2 { scroll-margin-top: 96px; }

/* --------------------------------------------------------------------------
   0. Reading-progress bar (fixed, top of viewport)
   -------------------------------------------------------------------------- */
.em3-blog-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1200; /* above the fixed nav */
  background: transparent;
  pointer-events: none;
}
.em3-blog-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--em3-accent), var(--em3-accent-hot));
  box-shadow: 0 0 12px rgba(46, 93, 255, 0.55);
  transition: width 0.1s linear;
}
@media (prefers-reduced-motion: reduce) {
  .em3-blog-progress__bar { transition: none; box-shadow: none; }
}

/* Visually hidden, still exposed to assistive tech (copy-confirmation live region + sr-only headings). */
.em3-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   1. Hero (DARK)
   -------------------------------------------------------------------------- */
.em3-blog-hero {
  position: relative;
  padding-top: 124px; /* clear the fixed glass nav + breathing room */
  padding-bottom: 56px;
  overflow: hidden;
  isolation: isolate;
  color: var(--em3-ink);
}
.em3-blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 14% 0%, rgba(46, 93, 255, 0.22), transparent 56%);
}
.em3-blog-hero__inner { position: relative; z-index: 1; max-width: var(--em3-maxw); }

.em3-blog-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--em3-ink-dim); margin-bottom: 22px; }
.em3-blog-crumb a { color: var(--em3-ink-muted); text-decoration: none; transition: color 0.18s; }
.em3-blog-crumb a:hover, .em3-blog-crumb a:focus { color: #fff; }
.em3-blog-crumb__cur { color: var(--em3-ink-dim); }

.em3-blog-hero__cat { display: inline-flex; margin-bottom: 18px; text-decoration: none; transition: color 0.18s; }
.em3-blog-hero__cat:hover, .em3-blog-hero__cat:focus { color: #fff; }

/* Wider container + smaller H1 + tighter tracking so even the longest titles
   (95-104 chars) land on 2 lines at desktop, not 3-4. The tracking (-0.03em) does
   most of the work; 46px keeps the hero strong. (Phones wrap long titles to 3-4
   lines by design - 2 lines is not achievable at a readable size on a 390px screen.) */
.em3-blog-hero__title { margin: 0; color: var(--em3-ink); text-wrap: balance; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.1; letter-spacing: -0.03em; }

.em3-blog-meta { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; color: var(--em3-ink-dim); font-size: 14px; }
.em3-blog-meta li { display: inline-flex; align-items: center; }
.em3-blog-meta li + li::before { content: "\00B7"; margin-right: 14px; color: var(--em3-ink-dim); opacity: 0.7; }
/* gap restores the space between "By" and the linked author name: the <li> is
   inline-flex, so "By " and the <a> are separate flex items and flex trims the
   trailing space (would render "ByName"). */
.em3-blog-meta__by { color: var(--em3-ink-muted); font-weight: 600; gap: 0.34em; }
.em3-blog-meta time { color: inherit; }

/* Featured image (lifted, framed, glowing on the dark hero) */
.em3-blog-hero__media { position: relative; z-index: 1; margin-top: 44px; }
.em3-blog-hero__figure {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--em3-radius-card);
  overflow: hidden;
  box-shadow: 0 50px 110px -50px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(46, 93, 255, 0.08);
  background: var(--em3-bg-elev);
}
/* 2-class selector beats Elementor's `.elementor img { height:auto }` (0,1,1). */
.em3-blog-hero__figure .em3-blog-hero__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* --------------------------------------------------------------------------
   2. Body (WHITE) - 2 columns: prose + sticky aside
   -------------------------------------------------------------------------- */
.em3-blog-body__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 72px; align-items: start; }
.em3-blog-main { min-width: 0; }

/* ---- Long-form prose ---- */
.em3-blog-prose { max-width: 720px; }
.em3-blog-prose > *:first-child { margin-top: 0; }
.em3-blog-prose p { color: var(--em3-charcoal); font-size: 17px; line-height: 1.75; margin: 0 0 22px; }
.em3-blog-prose h2 {
  font-size: clamp(25px, 2.4vw, 33px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 52px 0 16px;
  padding-top: 6px;
  color: var(--em3-ink-navy);
}
.em3-blog-prose h2:first-child { margin-top: 0; }
.em3-blog-prose h3 { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.3; margin: 34px 0 12px; color: var(--em3-ink-navy); }
.em3-blog-prose h4 { font-size: 17px; font-weight: 700; margin: 26px 0 10px; color: var(--em3-ink-navy); }

.em3-blog-prose a:not(.em3-link):not(.em3-btn-primary):not(.em3-btn-ghost) {
  color: var(--em3-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: rgba(46, 93, 255, 0.4);
  transition: color 0.18s, text-decoration-color 0.18s;
}
.em3-blog-prose a:not(.em3-link):hover, .em3-blog-prose a:not(.em3-link):focus { color: var(--em3-ink-navy); text-decoration-color: var(--em3-ink-navy); }
.em3-blog-prose strong, .em3-blog-prose b { color: var(--em3-ink-navy); font-weight: 700; }

/* Unordered lists: brand dash bullet */
.em3-blog-prose ul { list-style: none; margin: 0 0 24px; padding: 0; }
.em3-blog-prose ul > li { position: relative; padding: 6px 0 6px 28px; color: var(--em3-charcoal); font-size: 17px; line-height: 1.65; }
.em3-blog-prose ul > li::before { content: ""; position: absolute; left: 5px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--em3-accent); }

/* Ordered lists: accent counters */
.em3-blog-prose ol { list-style: none; counter-reset: em3num; margin: 0 0 24px; padding: 0; }
.em3-blog-prose ol > li { counter-increment: em3num; position: relative; padding: 6px 0 6px 40px; color: var(--em3-charcoal); font-size: 17px; line-height: 1.65; }
.em3-blog-prose ol > li::before {
  content: counter(em3num);
  position: absolute; left: 0; top: 7px;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--em3-accent);
  background: rgba(46, 93, 255, 0.10);
  border-radius: var(--em3-radius);
}
.em3-blog-prose li > strong:first-child { display: inline; }

/* Blockquote: editorial serif pull-quote with accent rule (matches the careers
   testimonial expansion of the serif-accent rule). */
.em3-blog-prose blockquote {
  margin: 32px 0;
  padding: 6px 0 6px 28px;
  border-left: 3px solid var(--em3-accent);
  font-family: var(--em3-font-serif);
  font-style: italic;
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.4;
  color: var(--em3-ink-navy);
}
.em3-blog-prose blockquote p { font: inherit; color: inherit; margin: 0 0 10px; }
.em3-blog-prose blockquote p:last-child { margin-bottom: 0; }
.em3-blog-prose blockquote cite { display: block; margin-top: 10px; font-family: var(--em3-font-sans); font-style: normal; font-size: 14px; font-weight: 600; color: rgba(10, 24, 88, 0.72); }

/* Figures / in-body images */
.em3-blog-prose figure, .em3-blog-prose .wp-block-image { margin: 30px 0; }
.em3-blog-prose figure img, .em3-blog-prose .wp-block-image img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--em3-line-onwhite);
  border-radius: var(--em3-radius-card);
}
.em3-blog-prose figcaption { margin-top: 10px; font-size: 13.5px; line-height: 1.5; color: rgba(10, 24, 88, 0.72); text-align: center; }

.em3-blog-prose hr { border: 0; height: 1px; background: var(--em3-line-onwhite); margin: 40px 0; }

/* "Listen to this article" player (injected before the prose by em3-audio-narration) */
.em3-blog-audio {
  margin: 0 0 34px;
  padding: 18px 20px;
  border: 1px solid var(--em3-line-onwhite);
  border-left: 3px solid var(--em3-accent);
  border-radius: var(--em3-radius-card);
  background: linear-gradient(180deg, rgba(46, 93, 255, 0.05), rgba(46, 93, 255, 0.01));
}
.em3-blog-audio__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.em3-blog-audio__icon { display: inline-flex; color: var(--em3-accent); }
.em3-blog-audio__icon svg { width: 20px; height: 20px; }
.em3-blog-audio__label { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--em3-ink-navy); }
.em3-blog-audio__player { width: 100%; height: 40px; display: block; }

/* End matter: filed-under tag + back link */
.em3-blog-end { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; max-width: 720px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--em3-line-onwhite); }
.em3-blog-end__tag { display: inline-flex; flex-direction: column; gap: 3px; text-decoration: none; }
.em3-blog-end__taglabel { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(10, 24, 88, 0.72); }
.em3-blog-end__tagname { font-size: 15px; font-weight: 700; color: var(--em3-ink-navy); transition: color 0.18s; }
.em3-blog-end__tag:hover .em3-blog-end__tagname, .em3-blog-end__tag:focus .em3-blog-end__tagname { color: var(--em3-accent); }

/* --------------------------------------------------------------------------
   3. Sticky aside: ToC + share
   -------------------------------------------------------------------------- */
.em3-blog-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 26px; }

.em3-blog-toc__title { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(10, 24, 88, 0.72); margin: 0 0 14px; }
.em3-blog-toc__list { list-style: none; counter-reset: toc; margin: 0; padding: 0; border-left: 1px solid var(--em3-line-onwhite); }
.em3-blog-toc__list li { margin: 0; }
.em3-blog-toc__list a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: rgba(10, 24, 88, 0.72);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.18s, border-color 0.18s;
}
.em3-blog-toc__list a:hover, .em3-blog-toc__list a:focus { color: var(--em3-ink-navy); border-left-color: rgba(46, 93, 255, 0.4); }
.em3-blog-toc__list a.is-active { color: var(--em3-accent); border-left-color: var(--em3-accent); font-weight: 600; }

/* Share card (mirrors the single-job share widget, light context) */
.em3-blog-sharecard { padding-top: 22px; border-top: 1px solid var(--em3-line-onwhite); }
.em3-blog-sharecard__label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(10, 24, 88, 0.72); margin-bottom: 12px; }
.em3-blog-share__links { display: flex; gap: 10px; align-items: center; }
.em3-blog-share__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--em3-line-onwhite); border-radius: var(--em3-radius);
  background: #fff; color: var(--em3-ink-navy); cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  position: relative;
}
.em3-blog-share__btn svg { width: 18px; height: 18px; }
/* >= (0,2,0): beats reset.css `a:active`/`button:focus` pink + Elementor link reset. */
.em3-blog-share__btn:hover,
.em3-blog-share__btn:focus,
.em3-blog-share__btn:focus-visible,
.em3-blog-share__btn:active { background: var(--em3-accent); border-color: var(--em3-accent); color: #fff; }

/* Hover / focus tooltip (custom, not native title=; copy button reuses it for
   the "Link copied!" confirmation via .is-copied, set by blog.js). */
.em3-blog-share__btn::after,
.em3-blog-share__btn::before {
  position: absolute; left: 50%; bottom: calc(100% + 9px);
  opacity: 0; pointer-events: none; z-index: 6;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.em3-blog-share__btn::after {
  content: attr(data-tip);
  padding: 5px 9px; border-radius: 3px;
  background: var(--em3-ink-navy); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em; line-height: 1.2;
  white-space: nowrap; box-shadow: 0 6px 16px -6px rgba(10, 24, 88, 0.5);
}
.em3-blog-share__btn::before {
  content: ""; bottom: calc(100% + 3px);
  border: 5px solid transparent; border-top-color: var(--em3-ink-navy);
}
.em3-blog-share__btn:hover::after, .em3-blog-share__btn:hover::before,
.em3-blog-share__btn:focus-visible::after, .em3-blog-share__btn:focus-visible::before,
.em3-blog-copy.is-copied::after, .em3-blog-copy.is-copied::before {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .em3-blog-share__btn::after, .em3-blog-share__btn::before { transition: opacity 0.16s ease; transform: translateX(-50%); }
  .em3-blog-share__btn:hover::after, .em3-blog-share__btn:hover::before,
  .em3-blog-share__btn:focus-visible::after, .em3-blog-share__btn:focus-visible::before,
  .em3-blog-copy.is-copied::after, .em3-blog-copy.is-copied::before { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   4. More from the blog + CTA (DARK) - card grid
   -------------------------------------------------------------------------- */
.em3-blog-more__head { max-width: 720px; margin: 0 0 36px; }
.em3-blog-more__head .em3-eyebrow { margin-bottom: 14px; }
.em3-blog-more__head h2 { margin: 0; }

.em3-blog-cards { list-style: none; margin: 0 0 44px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.em3-blog-card {
  border: 1px solid var(--em3-line-soft);
  border-radius: var(--em3-radius-card);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.em3-blog-card:hover, .em3-blog-card:focus-within { transform: translateY(-4px); border-color: rgba(106, 138, 255, 0.4); box-shadow: 0 30px 60px -28px rgba(46, 93, 255, 0.22); }
.em3-blog-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.em3-blog-card__media { margin: 0; overflow: hidden; background: var(--em3-bg-elev); aspect-ratio: 4 / 3; }
/* 2-class selector beats Elementor `.elementor img { height:auto }`. */
.em3-blog-card__media .em3-blog-card__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.em3-blog-card:hover .em3-blog-card__img { transform: scale(1.04); }
.em3-blog-card__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 22px; flex: 1 1 auto; }
.em3-blog-card__cat { margin: 0; }
.em3-blog-card__title { font-size: 18px; line-height: 1.3; font-weight: 600; color: #fff; margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.em3-blog-card__excerpt { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--em3-ink-dim); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.em3-blog-card__foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.em3-blog-card__date { font-size: 13px; color: var(--em3-ink-dim); }
.em3-blog-card__cta { flex-shrink: 0; font-size: 14px; }
/* Nudge the CTA arrow when the whole card is hovered/focused (.em3-link uses gap for the arrow). */
.em3-blog-card:hover .em3-blog-card__cta, .em3-blog-card:focus-within .em3-blog-card__cta { gap: 12px; }

.em3-blog-more__cta { border-top: 1px solid var(--em3-line-soft); padding-top: 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.em3-blog-more__cta p { color: var(--em3-ink-muted); font-size: 16px; line-height: 1.55; margin: 0; max-width: 48ch; }
.em3-blog-more__ctabtns { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* Keep the primary (is-lg) and ghost CTA the same height so they read as one bar. */
.em3-blog-more__ctabtns .em3-btn-primary, .em3-blog-more__ctabtns .em3-btn-ghost { min-height: 58px; }

/* --------------------------------------------------------------------------
   5. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .em3-blog-body__grid { grid-template-columns: 1fr; gap: 40px; }
  .em3-blog-aside { position: static; }
  /* The ToC would land at the END of the article when the aside stacks, which is
     redundant after reading. Hide it on narrow screens; the desktop sticky ToC
     is the reading aid. The share card stays (a natural end-of-article action). */
  .em3-blog-toc { display: none; }
  .em3-blog-prose { max-width: none; }
  .em3-blog-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .em3-blog-hero { padding-top: 104px; padding-bottom: 40px; }
  .em3-blog-hero__media { margin-top: 32px; }
  .em3-blog-prose p, .em3-blog-prose ul > li, .em3-blog-prose ol > li { font-size: 16px; }
  .em3-blog-cards { grid-template-columns: 1fr; }
  .em3-blog-more__cta { flex-direction: column; align-items: flex-start; }
  .em3-blog-end { flex-direction: column; align-items: flex-start; gap: 16px; }
}
@media (max-width: 420px) {
  /* Smaller cap so long titles wrap to ~5 lines, not 6, while typical titles stay 2-3. */
  .em3-blog-hero__title { font-size: clamp(26px, 7.5vw, 30px); }
  .em3-blog-share__links { flex-wrap: wrap; }
}
/* Short viewports: un-stick the aside so the share row stays reachable. */
@media (max-height: 680px) {
  .em3-blog-aside { position: static; }
}

/* ==========================================================================
   6. ARCHIVE - index (/resources/blog/) + category (/resources/blog/topic/<slug>/)
   ------------------------------------------------------------------------------
   MARKUP CONTRACT (em3_blog_render_index / em3_blog_render_category in
   theme/inc/blog-archive.php)
   <div class="em3-blog-index">
     <header> the index hero = .em3-bloghero slider (section 7); category/paged = .em3-blog-ahero </header>
     <section class="em3-section em3-bg-snow on-light em3-blog-list"><div class="em3-wrap">
       <nav class="em3-blog-chips"> a.em3-blog-chip[.is-active] </nav>
       <ul class="em3-blog-cards em3-blog-cards--grid"> li.em3-blog-card </ul>
       <nav class="em3-blog-pagination"> ul > li > .page-numbers </nav>
   ========================================================================== */

/* Archive hero (DARK) */
.em3-blog-ahero { position: relative; padding-top: 124px; padding-bottom: 56px; overflow: hidden; isolation: isolate; color: var(--em3-ink); }
.em3-blog-ahero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(circle at 16% 0%, rgba(46, 93, 255, 0.22), transparent 58%); }
.em3-blog-ahero__inner { position: relative; z-index: 1; max-width: var(--em3-maxw); } /* match the article hero width (was 760px - felt too tight) */
.em3-blog-ahero .em3-eyebrow { margin-bottom: 18px; }
.em3-blog-ahero__title { margin: 0; color: var(--em3-ink); text-wrap: balance; }
.em3-blog-ahero__sub { margin: 20px 0 0; max-width: 60ch; color: var(--em3-ink-muted); font-size: 18px; line-height: 1.6; }

/* Category hero with a background image (per-category em3_cat_hero_image_id).
   The image sits behind a left-heavy dark gradient so the white hero text stays
   readable while the image still reads on the right. */
.em3-blog-ahero--image { padding-top: 150px; padding-bottom: 64px; }
/* The image + scrim fully cover the base radial glow on this variant - skip the wasted paint layer. */
.em3-blog-ahero--image::before { content: none; }
.em3-blog-ahero__bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; }
.em3-blog-ahero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(5, 13, 51, 0.96) 0%, rgba(5, 13, 51, 0.86) 42%, rgba(5, 13, 51, 0.60) 100%);
}
.em3-blog-ahero--image .em3-blog-ahero__inner { z-index: 2; }

/* Filter chips (on the light list section). 1px radius = brand signal. */
.em3-blog-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 44px; }
.em3-blog-chip {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--em3-line-onwhite); border-radius: var(--em3-radius);
  background: #fff; color: var(--em3-ink-navy);
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.em3-blog-chip:hover, .em3-blog-chip:focus-visible { border-color: var(--em3-accent); color: var(--em3-accent); }
.em3-blog-chip.is-active { background: linear-gradient(135deg, var(--em3-accent) 0%, var(--em3-accent-mid) 100%); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -8px rgba(46, 93, 255, 0.5); }
.em3-blog-chip.is-active:hover, .em3-blog-chip.is-active:focus-visible { color: #fff; }

/* Grid + light card variant (base .em3-blog-card is dark; section 4) */
.em3-blog-cards--grid { margin: 0 0 48px; }
.on-light .em3-blog-card { background: #fff; border-color: var(--em3-line-onwhite); }
.on-light .em3-blog-card:hover, .on-light .em3-blog-card:focus-within { border-color: rgba(46, 93, 255, 0.4); box-shadow: 0 30px 60px -30px rgba(10, 24, 88, 0.22); }
.on-light .em3-blog-card__media { background: var(--em3-snow); }
.on-light .em3-blog-card__title { color: var(--em3-ink-navy); }
.on-light .em3-blog-card__cat { color: var(--em3-accent); }
.on-light .em3-blog-card__excerpt { color: var(--em3-charcoal); }
.on-light .em3-blog-card__date { color: rgba(10, 24, 88, 0.72); }

/* Pagination */
.em3-blog-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; justify-content: center; }
.em3-blog-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 14px;
  border: 1px solid var(--em3-line-onwhite); border-radius: var(--em3-radius);
  background: #fff; color: var(--em3-ink-navy);
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.em3-blog-pagination a.page-numbers:hover, .em3-blog-pagination a.page-numbers:focus-visible { border-color: var(--em3-accent); color: var(--em3-accent); }
.em3-blog-pagination .page-numbers.current { background: var(--em3-ink-navy); border-color: var(--em3-ink-navy); color: #fff; }
.em3-blog-pagination .page-numbers.dots { border-color: transparent; background: transparent; min-width: 24px; }

/* Empty state */
.em3-blog-empty { color: var(--em3-charcoal); font-size: 17px; }

/* Archive responsive */
@media (max-width: 640px) {
  .em3-blog-ahero { padding-top: 104px; padding-bottom: 40px; }
  .em3-blog-ahero__sub { font-size: 16px; }
}

/* ==========================================================================
   7. INDEX HERO - category-post slider (em3_blog_hero_slider, inc/blog-archive.php)
   ------------------------------------------------------------------------------
   header.em3-bloghero.em3-bg-deep > .em3-wrap.em3-bloghero__grid
     .em3-bloghero__intro  (eyebrow + h1.em3-bloghero__title + p.sub)
     .em3-bloghero__stage  (.em3-bloghero__live + .em3-bloghero__track
                            > article.em3-bloghero__slide (a.slidelink > figure.media>img + .slidebody)
                            + .em3-bloghero__controls ( .em3-bloghero__tabs[role=tablist]
                                (button.em3-bloghero__tab > .em3-bloghero__tabprog>.em3-bloghero__tabfill)
                              + a.em3-bloghero__all )
                            + button.em3-bloghero__arrow--prev/--next)
   The control row (segmented bars + "View all") sits BELOW the slide track, one
   line, at every breakpoint. Bars have no visible name (aria-label/title only).
   Behaviour in assets/js/blog.js; auto-advance disabled under reduced-motion.
   ========================================================================== */
.em3-bloghero { position: relative; padding-top: 124px; padding-bottom: 72px; overflow: hidden; isolation: isolate; color: var(--em3-ink); }
.em3-bloghero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(circle at 18% 6%, rgba(46, 93, 255, 0.22), transparent 56%); }
/* Stacked: full-width title block on top, slider stage moved below it. */
.em3-bloghero__grid { position: relative; z-index: 1; }

/* Intro (full-width, on top) */
.em3-bloghero__intro { min-width: 0; }
.em3-bloghero__intro .em3-eyebrow { margin-bottom: 16px; }
.em3-bloghero__title { margin: 0; font-size: clamp(40px, 5.2vw, 72px); line-height: 1.0; letter-spacing: -0.035em; color: var(--em3-ink); }
.em3-bloghero__sub { margin: 20px 0 0; max-width: 60ch; color: var(--em3-ink-muted); font-size: 18px; line-height: 1.6; }

/* Stage (full-width, below the title) */
.em3-bloghero__stage { position: relative; min-width: 0; margin-top: 44px; }

/* Control row beneath the track: segmented category bars (left) + "View all" (right), one line. */
.em3-bloghero__controls { margin-top: 18px; display: flex; align-items: center; gap: 24px; }
.em3-bloghero__tabs { flex: 1 1 auto; min-width: 0; margin: 0; display: flex; flex-direction: row; gap: 8px; }
/* 44px tap target (WCAG 2.5.5) at every size: the 3px strip is centred in a full-height button. */
.em3-bloghero__tab { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0; display: flex; flex-direction: column; justify-content: center; background: none; border: 0; cursor: pointer; color: inherit; font-family: inherit; }
/* Neutralise the reset.css button:hover/:focus { background:#cc3366 } leak (>=0,2,0). */
.em3-bloghero__tab:hover, .em3-bloghero__tab:focus, .em3-bloghero__tab:focus-visible, .em3-bloghero__tab:active { background: none; }
.em3-bloghero__tab:focus-visible { outline: 2px solid var(--em3-accent-hot); outline-offset: 2px; border-radius: var(--em3-radius); }
/* Resting bars lifted to 0.25 alpha (from the soft token) so the inactive segments
   read as a discrete, selectable channel now that they carry no visible name. */
.em3-bloghero__tabprog { display: block; height: 3px; width: 100%; background: rgba(255, 255, 255, 0.25); border-radius: var(--em3-radius); overflow: hidden; transition: background 0.2s; }
.em3-bloghero__tab:hover .em3-bloghero__tabprog { background: rgba(255, 255, 255, 0.4); }
.em3-bloghero__tab.is-active .em3-bloghero__tabprog { background: rgba(255, 255, 255, 0.34); }
.em3-bloghero__tabfill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--em3-accent), var(--em3-accent-hot)); }
.em3-bloghero__all { flex-shrink: 0; margin: 0; display: inline-flex; }
/* Responsive label: only one span shows; display:none keeps the hidden one out of
   the accessible name too. Compact "View all" frees row width for the bars <=480px. */
.em3-bloghero__all-min { display: none; }
.em3-bloghero__track {
  position: relative;
  /* Taller than the old 16/6: the slide is now image ON TOP + a solid text
     panel BELOW (no text over the photo, Sam 2026-06-12). */
  aspect-ratio: 16 / 8.4;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--em3-radius-card);
  overflow: hidden;
  background: var(--em3-bg-elev);
  box-shadow: 0 50px 110px -50px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(46, 93, 255, 0.06);
}
.em3-bloghero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.5s ease; }
.em3-bloghero__slide.is-active { opacity: 1; visibility: visible; }
.em3-bloghero__slidelink { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.em3-bloghero__slidelink:focus-visible { outline: 2px solid var(--em3-accent-hot); outline-offset: -3px; }
/* The image fills whatever the fixed text panel below leaves over, so the
   cross-fade never jumps between slides. */
.em3-bloghero__media { margin: 0; flex: 1 1 auto; min-height: 0; overflow: hidden; }
/* 2-class selector beats Elementor `.elementor img { height:auto }`. */
.em3-bloghero__media .em3-bloghero__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.em3-bloghero__slidelink:hover .em3-bloghero__img, .em3-bloghero__slidelink:focus-visible .em3-bloghero__img { transform: scale(1.03); }
/* Solid text panel BELOW the image: clean photo, readable copy, no scrim. */
.em3-bloghero__slidebody {
  flex: 0 0 auto;
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 26px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}
.em3-bloghero__slidecat { margin-bottom: 8px; }
.em3-bloghero__slidetitle {
  margin: 0; color: #fff; font-size: clamp(18px, 1.8vw, 24px); line-height: 1.22; letter-spacing: -0.015em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.em3-bloghero__slidefoot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.em3-bloghero__slidemeta { font-size: 13px; color: var(--em3-ink-muted); }
.em3-bloghero__slidecta { flex-shrink: 0; } /* "Read article ->" sits on the right */

/* Arrows (top-right of the stage) */
.em3-bloghero__arrow {
  position: absolute; top: 16px; z-index: 3;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: var(--em3-radius);
  background: rgba(5, 13, 51, 0.55); color: #fff; cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
@supports (backdrop-filter: blur(6px)) { .em3-bloghero__arrow { background: rgba(5, 13, 51, 0.4); backdrop-filter: blur(6px); } }
.em3-bloghero__arrow svg { width: 18px; height: 18px; }
.em3-bloghero__arrow--prev { right: 68px; }
.em3-bloghero__arrow--next { right: 16px; }
.em3-bloghero__arrow:hover, .em3-bloghero__arrow:focus, .em3-bloghero__arrow:focus-visible, .em3-bloghero__arrow:active { background: var(--em3-accent); border-color: var(--em3-accent); }
/* Distinct keyboard-focus ring (WCAG 2.4.7) so focus != hover on the dark stage. */
.em3-bloghero__arrow:focus-visible { outline: 2px solid var(--em3-accent-hot); outline-offset: 3px; }
.em3-bloghero.is-single .em3-bloghero__arrow { display: none; }

@media (prefers-reduced-motion: reduce) {
  .em3-bloghero__slide { transition: none; }
  .em3-bloghero__media .em3-bloghero__img { transition: none; }
}

/* Hero responsive */
@media (max-width: 980px) {
  .em3-bloghero { padding-top: 108px; padding-bottom: 48px; }
  .em3-bloghero__sub { max-width: none; }
  .em3-bloghero__stage { margin-top: 32px; }
  /* Image-above-text card: taller than the old image-only 16/9 stage. */
  .em3-bloghero__track { aspect-ratio: 16 / 11; }
}
@media (max-width: 640px) {
  /* Square-ish card: roughly a 4/3 photo + the text panel beneath it. */
  .em3-bloghero__track { aspect-ratio: 5 / 5.4; }
  .em3-bloghero__slidebody { padding: 16px 18px 18px; min-height: 124px; }
  .em3-bloghero__slidetitle { -webkit-line-clamp: 2; }
  /* Tighter control-row gap so the bars + "View all" stay on one line on phones. */
  .em3-bloghero__controls { margin-top: 14px; gap: 16px; }
}
@media (max-width: 480px) {
  /* Compact link frees ~75px so the four bars keep a >=44px-wide tap target. */
  .em3-bloghero__all-full { display: none; }
  .em3-bloghero__all-min { display: inline; }
}

/* ==========================================================================
   8. Author: byline link, the article author card (aside), the author page
   ========================================================================== */

/* Byline link on the dark hero. >=(0,2,0) on hover to beat reset.css a:hover. */
.em3-blog-meta__by .em3-blog-meta__bylink { color: inherit; text-decoration: none; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.28); transition: color 0.18s, box-shadow 0.18s; }
.em3-blog-meta__by .em3-blog-meta__bylink:hover,
.em3-blog-meta__by .em3-blog-meta__bylink:focus-visible { color: var(--em3-accent-hot); box-shadow: inset 0 -1px 0 var(--em3-accent-hot); }
/* Distinct keyboard-focus ring (WCAG 2.4.7 - not identical to hover). */
.em3-blog-meta__by .em3-blog-meta__bylink:focus-visible { outline: 2px solid var(--em3-accent-hot); outline-offset: 3px; border-radius: var(--em3-radius); }

/* ---- Author card in the single-article aside (on-light) ---- */
/* A white card matching the case-study "At a glance" panel (.em3-cs-glance). */
.em3-blog-authorcard { background: #fff; border: 1px solid var(--em3-line-onwhite); border-radius: var(--em3-radius-card); padding: 24px 22px; }
.em3-blog-authorcard__eyebrow { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(10, 24, 88, 0.72); margin-bottom: 12px; }
.em3-blog-authorcard__head { display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit; }
/* The circular avatar is the ONE sanctioned rounded element (like the footer seals). */
.em3-blog-authorcard__avatar { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--em3-line-onwhite); }
.em3-blog-authorcard__avatar .em3-blog-authorcard__avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.em3-blog-authorcard__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.em3-blog-authorcard__name { font-weight: 700; font-size: 16px; color: var(--em3-ink-navy); line-height: 1.2; }
.em3-blog-authorcard__head:hover .em3-blog-authorcard__name,
.em3-blog-authorcard__head:focus-visible .em3-blog-authorcard__name { color: var(--em3-accent); }
.em3-blog-authorcard__role { font-size: 12.5px; color: rgba(10, 24, 88, 0.72); line-height: 1.3; }
.em3-blog-authorcard__bio { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--em3-charcoal); }
.em3-blog-authorcard__socials { margin-top: 14px; gap: 8px; }
.em3-blog-authorcard__socials .em3-blog-share__btn { width: 38px; height: 38px; }
.em3-blog-authorcard__socials .em3-blog-share__btn svg { width: 16px; height: 16px; }
.em3-blog-authorcard__more { list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--em3-line-onwhite); display: flex; flex-direction: column; gap: 10px; }
.em3-blog-authorcard__more li { font-size: 13.5px; line-height: 1.35; }
.em3-blog-authorcard__more a { color: var(--em3-ink-navy); text-decoration: none; font-weight: 600; display: block; }
.em3-blog-authorcard__more a:hover,
.em3-blog-authorcard__more a:focus-visible { color: var(--em3-accent); }
.em3-blog-authorcard__all { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; font-weight: 700; letter-spacing: 0.01em; color: var(--em3-accent); text-decoration: none; }
.em3-blog-authorcard__all:hover,
.em3-blog-authorcard__all:focus-visible { color: var(--em3-accent-mid); }
.em3-blog-authorcard__all span { transition: transform 0.18s; }
.em3-blog-authorcard__all:hover span { transform: translateX(3px); }

/* ---- Public author page (/resources/authors/<slug>/) ---- */
.em3-author-hero { position: relative; padding: clamp(110px, 14vh, 170px) 0 clamp(48px, 7vh, 82px); overflow: hidden; }
.em3-author-hero__inner { position: relative; z-index: 1; }
.em3-author-hero__id { display: flex; align-items: flex-start; gap: clamp(20px, 3vw, 40px); margin-top: 28px; }
.em3-author-hero__avatar { flex: 0 0 auto; width: clamp(96px, 12vw, 140px); height: clamp(96px, 12vw, 140px); border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 20px 50px -20px rgba(0, 0, 0, 0.6); }
.em3-author-hero__avatar .em3-author-hero__avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.em3-author-hero__text { min-width: 0; max-width: 760px; }
.em3-author-hero__role { color: var(--em3-accent-hot); }
.em3-author-hero__name { margin: 8px 0 0; color: var(--em3-ink); font-size: clamp(34px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -0.025em; }
.em3-author-hero__bio { margin: 18px 0 0; color: var(--em3-ink-dim); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.6; max-width: 62ch; }
.em3-author-hero__text .em3-blog-share__links { margin-top: 22px; }

.em3-author-articles { padding-top: clamp(48px, 7vh, 84px); padding-bottom: clamp(56px, 9vh, 110px); }
.em3-author-articles__title { margin: 0 0 32px; font-size: clamp(22px, 2.2vw, 30px); color: var(--em3-ink-navy); }
.em3-author-articles__empty { color: var(--em3-charcoal); }
.em3-author-articles__back { margin: 36px 0 0; }

@media (max-width: 640px) {
  .em3-author-hero__id { flex-direction: column; align-items: flex-start; gap: 18px; }
}

/* ==========================================================================
   9. Rate this article ("Was this helpful?", end of the prose, on-light)
   ========================================================================== */
.em3-blog-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin: 44px 0 4px; padding: 22px 0 0; border-top: 1px solid var(--em3-line-onwhite); }
.em3-blog-rate__label { font-size: 15px; font-weight: 600; color: var(--em3-ink-navy); }
.em3-blog-rate.is-done .em3-blog-rate__label { color: var(--em3-accent); }
.em3-blog-rate__btns { display: inline-flex; gap: 10px; }
.em3-blog-rate__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--em3-line-onwhite); border-radius: var(--em3-radius); background: #fff; color: var(--em3-ink-navy); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s; }
.em3-blog-rate__btn svg { width: 18px; height: 18px; }
/* Red-proof: every interactive state declares its own background (>=0,2,0). */
.em3-blog-rate__btn:hover,
.em3-blog-rate__btn:focus,
.em3-blog-rate__btn:focus-visible,
.em3-blog-rate__btn:active { background: #fff; border-color: var(--em3-accent); color: var(--em3-accent); transform: translateY(-1px); }
.em3-blog-rate__btn:disabled { cursor: default; transform: none; opacity: 0.85; }
.em3-blog-rate__btn:disabled:hover { background: #fff; border-color: var(--em3-line-onwhite); color: var(--em3-ink-navy); transform: none; }
.em3-blog-rate__btn.is-voted,
.em3-blog-rate__btn.is-voted:hover { background: var(--em3-accent); border-color: var(--em3-accent); color: #fff; opacity: 1; }
.em3-blog-rate__count { font-variant-numeric: tabular-nums; opacity: 0.85; }
@media (prefers-reduced-motion: reduce) {
  .em3-blog-rate__btn { transition: background 0.18s, color 0.18s, border-color 0.18s; }
  .em3-blog-rate__btn:hover, .em3-blog-rate__btn:focus, .em3-blog-rate__btn:focus-visible, .em3-blog-rate__btn:active { transform: none; }
}

/* ==========================================================================
   10. Article tables - premium dark "comparison" card (Manrope, accent headers)
   ========================================================================== */
.em3-blog-prose .wp-block-table { margin: 40px 0; overflow-x: auto; }
.em3-blog-prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--em3-bg-deep);
  border-radius: var(--em3-radius-card);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--em3-font-sans);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 26px 60px -30px rgba(5, 13, 51, 0.55);
}
.em3-blog-prose table th,
.em3-blog-prose table td {
  text-align: center;
  vertical-align: middle;
  padding: 18px clamp(16px, 2.6vw, 34px);
}
.em3-blog-prose table th {
  color: var(--em3-accent-hot);
  font-weight: 700;
  font-size: clamp(18px, 1.9vw, 23px);
  letter-spacing: -0.01em;
  padding-top: 30px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--em3-accent);
}
.em3-blog-prose table td { border-top: 1px solid rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.82); }
.em3-blog-prose table tbody tr:first-child td { border-top: 0; padding-top: 24px; }
.em3-blog-prose table tbody tr:last-child td { padding-bottom: 28px; }
.em3-blog-prose .wp-block-table figcaption { margin-top: 12px; text-align: center; font-size: 13px; color: rgba(10, 24, 88, 0.6); }
@media (max-width: 640px) {
  .em3-blog-prose table { font-size: 14px; }
  .em3-blog-prose table th, .em3-blog-prose table td { padding: 14px 14px; }
  .em3-blog-prose table th { font-size: 17px; padding-top: 22px; }
}

/* ==========================================================================
   11. Sector backlink band (article -> its industry page; rendered after the
   article content via the em3_blog_after_content hook by inc/industries.php).
   Duplicated from resources.css (shared chrome per CSS family, same precedent
   as .em3-sr-only).
   ========================================================================== */
.em3-ind-sectorband {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--em3-line-onwhite);
  border-radius: var(--em3-radius-card);
}
.em3-ind-sectorband__label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(10, 24, 88, 0.6);
}
.em3-ind-sectorband .em3-ind-sectorband__link {
  color: var(--em3-accent);
  font-weight: 600;
}
.em3-ind-sectorband .em3-ind-sectorband__link:hover,
.em3-ind-sectorband .em3-ind-sectorband__link:focus {
  color: var(--em3-ink-navy);
}
