/* NextWise Article Layout — all article styles are namespaced to avoid theme collisions. */
.nwa-shell {
  --nwa-accent: #fa5b13;
  --nwa-accent-dark: #d84305;
  --nwa-ink: #202634;
  --nwa-muted: #667085;
  --nwa-border: #e9ebef;
  --nwa-soft: #fff4ed;
  --nwa-sticky-top: 132px;
  box-sizing: border-box;
  /* Expand only this article, not the parent theme or global layout. */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100vw - 48px)) !important;
  max-width: none !important;
  margin: 26px 0 90px !important;
  color: var(--nwa-ink);
  font-family: inherit;
}
.nwa-shell *,
.nwa-shell *::before,
.nwa-shell *::after { box-sizing: border-box; }
.nwa-shell a { color: inherit; }
.nwa-shell a:focus-visible,
.nwa-shell summary:focus-visible {
  outline: 3px solid var(--nwa-accent);
  outline-offset: 4px;
  border-radius: 2px;
}
.admin-bar .nwa-shell { --nwa-sticky-top: 158px; }

/* Cover + article information */
/* Breadcrumb is part of the article only, above the featured cover. */
.nwa-breadcrumb { width: 100%; margin: 0 0 23px; font-size: 13px; line-height: 1.6; color: var(--nwa-muted); }
.nwa-breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 5px; list-style: none; padding: 0 !important; margin: 0 !important; }
.nwa-breadcrumb__item { display: inline-flex; align-items: center; max-width: 100%; margin: 0; min-width: 0; }
.nwa-breadcrumb__item + .nwa-breadcrumb__item::before { content: '›'; color: #a5aab3; margin-right: 10px; font-size: 18px; line-height: 1; }
.nwa-breadcrumb__item a { text-decoration: none; color: #626b7c !important; }
.nwa-breadcrumb__item a:hover { color: var(--nwa-accent-dark) !important; text-decoration: underline; }
.nwa-breadcrumb__item[aria-current="page"] { color: #353c48; }
.nwa-breadcrumb__item[aria-current="page"] span { overflow-wrap: anywhere; }

.nwa-cover { margin: 0 0 30px; overflow: hidden; border-radius: 16px; background: #f2f3f5; }
.nwa-cover__image {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2.45 / 1;
  object-fit: cover;
  max-width: none !important;
  margin: 0 !important;
}
/* 1.2.7: Soft article header, limited to the reading column (never full-page black). */
.nwa-post__header {
  margin: 0 0 28px;
  padding: clamp(20px, 2.3vw, 28px);
  color: #202634;
  background: #f8f9fb;
  border: 1px solid #e9edf2;
  border-radius: 14px;
}
.nwa-post__eyebrow { display:flex; flex-wrap:wrap; align-items:center; gap:13px; font-size:13px; line-height:1.5; }
.nwa-post__header .nwa-category {
  display:inline-flex; align-items:center; padding:5px 13px;
  background:#fff0e6; border:1px solid #ffdfc6; color:#d94d09 !important;
  border-radius:999px; font-size:12px; font-weight:750; text-decoration:none;
}
.nwa-post__header .nwa-category:hover { background:#ffe1cf; color:#b83b04 !important; }
.nwa-post__header .nwa-post__title {
  scroll-margin-top:calc(var(--nwa-sticky-top) + 28px);
  max-width:100%; font-size:clamp(30px, 3.0vw, 46px) !important;
  font-weight:800 !important; line-height:1.28 !important;
  letter-spacing:-.018em; margin:13px 0 25px !important;
  color:#202634 !important; overflow-wrap:anywhere;
}
.nwa-post__header .nwa-post__meta {
  display:flex; align-items:center; flex-wrap:wrap;
  gap:14px 18px; color:#445063; font-size:14px;
}
.nwa-post__header .nwa-byline-author {
  display:inline-flex; align-items:center; flex:1 1 190px;
  min-width:0; gap:11px; color:#202634 !important; text-decoration:none !important;
}
.nwa-post__header .nwa-byline-author__avatar {
  display:block; flex:0 0 48px; width:48px !important; height:48px !important;
  object-fit:cover; border-radius:50%; border:1px solid #dee2e8;
}
.nwa-post__header .nwa-byline-author__details { display:flex; flex-direction:column; min-width:0; gap:3px; }
.nwa-post__header .nwa-byline-author__name { color:#202634 !important; font-size:16px; line-height:1.35; font-weight:750; }
.nwa-post__header .nwa-byline-author__bio {
  color:#647087; font-size:12px; line-height:1.5; max-width:280px;
  overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
}
.nwa-post__header .nwa-byline-author:hover .nwa-byline-author__name { color:#d94d09 !important; }
.nwa-post__header .nwa-post__dates { display:flex; flex-direction:column; gap:5px; white-space:nowrap; }
.nwa-post__header .nwa-post__date-line { display:inline-flex; align-items:center; gap:8px; }
.nwa-post__header .nwa-post__date-line svg { width:17px; height:17px; flex:none; }
.nwa-post__header .nwa-published { color:#354052; font-size:13px; font-weight:650; }
.nwa-post__header .nwa-modified { padding-left:24px; font-size:11px; color:#727d90; }
.nwa-post__header .nwa-share { display:flex; flex-wrap:nowrap; gap:7px; align-items:center; margin-left:auto; }
.nwa-post__header .nwa-share__link {
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:50%; background:#fff;
  color:#354052 !important; border:1px solid #e2e5ea;
  text-decoration:none !important; transition:background .18s ease,color .18s ease;
}
.nwa-post__header .nwa-share__link svg { display:block; width:18px; height:18px; }
.nwa-post__header .nwa-share__link--line span { font:800 8px/1 system-ui,sans-serif; letter-spacing:-.04em; }
.nwa-post__header .nwa-share__link:hover { background:#fff0e6; color:#d94d09 !important; border-color:#ffcbaa; }
.nwa-post__header .nwa-post__intro {
  color:#4c586b !important; max-width:100%; margin:22px 0 0 !important;
  font-size:clamp(15px, 1.3vw, 17px) !important; line-height:1.8 !important;
}
.nwa-post__header .nwa-tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.nwa-post__header .nwa-tag {
  display:inline-block; padding:5px 11px; background:#f0f2f5;
  color:#5a6473 !important; border:1px solid #e4e8ed;
  border-radius:999px; font-size:12px; line-height:1.5; text-decoration:none;
}
.nwa-post__header .nwa-tag:hover { background:#ffeadd; color:#c14406 !important; }

/* Grid: content is the primary semantic node; aside is visually reorderable. */
.nwa-reading { display:grid; grid-template-columns:minmax(0, 1fr) 265px; grid-template-areas:'article toc'; column-gap:clamp(28px, 3.5vw, 48px); align-items:start; }
.nwa-reading--toc-left { grid-template-columns:265px minmax(0, 1fr); grid-template-areas:'toc article'; }
.nwa-reading--no-toc { grid-template-columns:minmax(0, 1fr); grid-template-areas:'article'; }
/* WordPress Twenty block themes can add an implicit "constrained" reading width.
   Override that constraint ONLY within NextWise's main article column, not the
   site header, navigation, footer, or other pages. */
.nwa-reading__article {
  grid-area: article;
  min-width: 0;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important; /* Reading wrapper holds its own header and body. */
  justify-self: stretch;
  --wp--style--global--content-size: 100%;
  --wp--style--global--wide-size: 100%;
}
/* Align Gutenberg body headings and paragraphs flush with the article H1.
   Keep image alignment classes intact (e.g., deliberately centered images). */
.nwa-shell .nwa-reading__article > :where(:not(.alignleft):not(.alignright):not(.aligncenter)) {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.nwa-shell .nwa-reading__article > :is(p, h2, h3, h4, h5, h6, ul, ol, blockquote, .wp-block-group, .wp-block-columns, .wp-block-table) {
  width: 100% !important;
}
/* When a Gutenberg Group is the immediate wrapper around the article text,
   remove its inherited narrow-reading width without altering global blocks. */
.nwa-shell .nwa-reading__article > .wp-block-group.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.aligncenter)),
.nwa-shell .nwa-reading__article > .wp-block-group > .wp-block-group__inner-container > :where(:not(.alignleft):not(.alignright):not(.aligncenter)) {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.nwa-reading__toc { grid-area:toc; min-width:0; margin-top:58px; }

/* Sticky TOC: only the table of contents appears in this side rail. */
.nwa-reading__toc {
  position: sticky !important;
  top: var(--nwa-sticky-top) !important;
  align-self: start;
  z-index: 2;
  background: #fff;
  max-height: calc(100vh - var(--nwa-sticky-top) - 22px);
  max-height: calc(100dvh - var(--nwa-sticky-top) - 22px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.nwa-toc { border-left: 1px solid var(--nwa-border); padding: 4px 0 6px 20px; }
.nwa-toc__title {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 750;
  margin: 0 0 18px;
  color: var(--nwa-ink);
  cursor: default;
}
.nwa-toc__title::-webkit-details-marker { display: none; }
.nwa-toc__chevron { display: none; }
.nwa-toc__nav { margin: 0; }
.nwa-toc__list { display: flex; flex-direction: column; gap: 0; list-style: none; padding: 0 !important; margin: 0 !important; }
.nwa-toc__item { list-style: none; margin: 0 !important; padding: 0 !important; }
.nwa-toc__item::marker { content: ''; }
.nwa-toc__link {
  position: relative;
  display: block;
  padding: 9px 3px 9px 17px;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 450;
  color: #677181 !important;
  text-decoration: none !important;
  overflow-wrap: anywhere;
  transition: color .16s ease;
}
.nwa-toc__link::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #aeb6c2;
  position: absolute;
  left: 0;
  top: 19px;
  transition: background .16s ease, transform .16s ease;
}
.nwa-toc__item--h3 .nwa-toc__link { padding-left: 27px; font-size: 13px; }
.nwa-toc__item--h3 .nwa-toc__link::before { left: 11px; width: 5px; height: 5px; }
.nwa-toc__link:hover,
.nwa-toc__link.is-active,
.nwa-toc__link[aria-current="location"] { color: var(--nwa-accent-dark) !important; }
.nwa-toc__link.is-active { font-weight: 700; }
.nwa-toc__link.is-active::before,
.nwa-toc__link[aria-current="location"]::before { background: var(--nwa-accent); transform: scale(1.2); }

/*
 * Twenty Twenty block-theme fix (1.2.2): core/post-content renders a nested
 * .wp-block-post-content.is-layout-constrained wrapper. WordPress gives EACH
 * child in that wrapper a narrow max-width and auto horizontal margins, even
 * when the outer .nwa-reading__article itself is 100% wide. Earlier releases
 * reset only direct .nwa-reading__article children, not these nested children.
 *
 * Override only the article body, keeping header/footer and sidebar untouched.
 * Preserve intentionally aligned images and full/wide alignment choices.
 */
.nwa-shell .nwa-reading__article :is(.wp-block-post-content, .entry-content) {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}
.nwa-shell .nwa-reading__article :is(.wp-block-post-content, .entry-content, .is-layout-constrained)
  > :where(:not(.alignleft):not(.alignright):not(.aligncenter):not(.alignwide):not(.alignfull)) {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.nwa-shell .nwa-reading__article :is(.wp-block-post-content, .entry-content, .is-layout-constrained)
  > :is(p, h2, h3, h4, h5, h6, ul, ol, blockquote, .wp-block-group, .wp-block-columns, .wp-block-table) {
  width: 100% !important;
}
/* Some block-theme layouts apply the constrained width without the class on
 * the immediate entry-content node. Only target direct prose, never media. */
.nwa-shell .nwa-reading__article .wp-block-post-content
  > :is(p, h2, h3, h4, h5, h6, ul, ol, blockquote) {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Long-form typography supports WordPress/Gutenberg inner blocks. */
.nwa-content { color: var(--nwa-ink); font-size: 17px; line-height: 1.95; overflow-wrap: break-word; }
.nwa-content > :first-child { margin-top: 0 !important; }
.nwa-content p, .nwa-content ul, .nwa-content ol { font-size: inherit; line-height: inherit; margin-block: 0 20px; }
.nwa-content a { color: var(--nwa-accent-dark) !important; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.nwa-content h1, .nwa-content h2, .nwa-content h3, .nwa-content h4 { scroll-margin-top: calc(var(--nwa-sticky-top) + 28px); color: var(--nwa-ink) !important; overflow-wrap: anywhere; }
.nwa-content h2 { font-size: clamp(24px, 2.1vw, 31px) !important; line-height: 1.46 !important; font-weight: 750 !important; margin: 45px 0 17px !important; }
.nwa-content h3 { font-size: clamp(20px, 1.8vw, 24px) !important; line-height: 1.5 !important; font-weight: 700 !important; margin: 32px 0 12px !important; }
.nwa-content h4 { font-size: 19px !important; margin-block: 25px 12px !important; line-height: 1.6 !important; }
.nwa-content ul, .nwa-content ol { padding-inline-start: 27px; }
.nwa-content li { margin-bottom: 8px; }
.nwa-content blockquote, .nwa-content .wp-block-quote {
  margin: 25px 0;
  padding: 22px 26px;
  border: 0;
  border-left: 4px solid var(--nwa-accent);
  border-radius: 0 10px 10px 0;
  background: var(--nwa-soft);
}
.nwa-content blockquote p { margin: 0; }
.nwa-content img { max-width: 100%; height: auto; }
.nwa-content figure { max-width: 100%; }
.nwa-content .wp-block-image, .nwa-content .wp-block-gallery, .nwa-content .wp-block-cover { margin-block: 24px; }
.nwa-content .wp-block-image img { border-radius: 10px; }
.nwa-content figcaption { font-size: 13px; line-height: 1.6; color: var(--nwa-muted); text-align: center; }
.nwa-content .alignwide, .nwa-content .alignfull { max-width: 100% !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
.nwa-content .wp-block-columns { gap: 20px; }
.nwa-content .wp-block-table, .nwa-content .wp-block-table table { max-width: 100%; }
.nwa-content .wp-block-table { overflow-x: auto; }
.nwa-content pre, .nwa-content .wp-block-code { max-width: 100%; overflow-x: auto; }
.nwa-content iframe { max-width: 100%; }
.nwa-content .wp-block-embed { max-width: 100%; }

/* End of article: tags and related cards only; no duplicate author biography. */
.nwa-post__footer { margin-top: 63px; }
.nwa-related { margin-top: 49px; }
.nwa-related__title { font-size: clamp(23px, 2.2vw, 29px) !important; font-weight: 750 !important; line-height: 1.4 !important; margin: 0 0 22px !important; color: var(--nwa-ink) !important; }
.nwa-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.nwa-card { min-width: 0; border: 1px solid #e7eaee; border-radius: 12px; overflow: hidden; background: #f6f7f9; transition: transform .2s ease, box-shadow .2s ease; }
.nwa-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(23,31,47,.08); }
.nwa-card__link { display: flex; flex-direction: column; position: relative; height: 100%; text-decoration: none !important; }
.nwa-card__image-wrap { overflow: hidden; aspect-ratio: 1.75 / 1; background: #f1f3f6; }
.nwa-card__image { width: 100% !important; height: 100% !important; display: block; object-fit: cover; margin: 0 !important; transition: transform .3s ease; }
.nwa-card:hover .nwa-card__image { transform: scale(1.035); }
.nwa-card__image-fallback { height: 100%; display: flex; justify-content: center; align-items: center; font-size: 23px; font-weight: 800; color: #383d46; }
.nwa-card__image-fallback span { color: var(--nwa-accent); }
.nwa-card__details { flex: 1; padding: 18px 54px 22px 19px; }
.nwa-card__category { color: var(--nwa-accent-dark); font-size: 12px; font-weight: 700; }
.nwa-card__title { font-size: 17px !important; font-weight: 700 !important; line-height: 1.55 !important; margin: 8px 0 13px !important; color: var(--nwa-ink) !important; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.nwa-card__date { display: block; color: #858b96; font-size: 12px; }
.nwa-card__arrow { display: grid; place-items: center; position: absolute; right: 16px; bottom: 17px; width: 33px; height: 33px; border: 1px solid #e1e5e9; border-radius: 8px; background: #ebeef1; font: 700 26px/1 system-ui, sans-serif; color: #3b424d; transition: color .18s ease, background .18s ease; }
.nwa-card:hover .nwa-card__arrow, .nwa-card__link:focus-visible .nwa-card__arrow { background: var(--nwa-accent); color: white; border-color: var(--nwa-accent); }

@media (max-width: 980px) {
  .nwa-reading, .nwa-reading--toc-left { column-gap: 30px; grid-template-columns: minmax(0, 1fr) 235px; }
  .nwa-reading--toc-left { grid-template-columns: 235px minmax(0, 1fr); }
  .nwa-toc { padding-left: 13px; }
}
@media (max-width: 760px) {
  .nwa-shell { width: min(100vw - 30px, 720px) !important; margin: 22px 0 55px !important; }
  .nwa-cover { margin-bottom: 20px; border-radius: 12px; }
  .nwa-cover__image { aspect-ratio: 1.8 / 1; }
  .nwa-post__header { margin-bottom: 30px; padding: 25px 21px; border-radius: 12px; }
  .nwa-post__header .nwa-post__meta { gap: 19px 22px; }
  .nwa-post__header .nwa-byline-author { flex: 1 1 240px; }
  .nwa-post__header .nwa-post__title { font-size: clamp(28px, 6vw, 39px) !important; }
  .nwa-breadcrumb { margin-bottom: 16px; font-size: 12px; }
  .nwa-post__title { margin: 13px 0 14px !important; font-size: clamp(28px, 6vw, 37px) !important; }
  /* Mobile reading order: article title first, TOC second, content third. */
  .nwa-reading, .nwa-reading--toc-left, .nwa-reading--no-toc {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:'head' 'toc' 'body';
    row-gap:22px;
  }
  .nwa-reading--no-toc { grid-template-areas:'head' 'body'; }
  .nwa-reading__article { display:contents; }
  .nwa-reading__article > .nwa-post__header { grid-area:head; margin-bottom:0; }
  .nwa-reading__article > .nwa-content { grid-area:body; width:100%; min-width:0; }
  .nwa-reading__toc { grid-area:toc; order:initial; position:static !important; top:auto !important; overflow:visible; width:100%; max-height:none; margin:0; }
  .nwa-toc { padding: 0; border: 1px solid var(--nwa-border); border-radius: 11px; background: #fafbfc; }
  .nwa-toc__title { cursor: pointer; padding: 15px 18px; font-size: 15px; margin: 0; }
  .nwa-toc__chevron { display: inline-block; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 3px; margin-top: -5px; transition: transform .2s ease; }
  .nwa-toc[open] .nwa-toc__chevron { transform: rotate(225deg); margin-top: 4px; }
  .nwa-toc__nav { padding: 0 17px 12px 20px; }
  .nwa-content { font-size: 16px; line-height: 1.85; }
  .nwa-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 490px) {
  .nwa-post__header .nwa-post__meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 15px 12px; align-items: center; }
  .nwa-post__header .nwa-byline-author { grid-column: 1 / -1; max-width: 100%; }
  .nwa-post__header .nwa-post__dates { grid-column: 1; white-space: normal; }
  .nwa-post__header .nwa-share { grid-column: 2; margin-left: 0; gap: 7px; }
  .nwa-post__header .nwa-share__link { width: 34px; height: 34px; }
  .nwa-post__header .nwa-share__link svg { width: 18px; height: 18px; }
  .nwa-post__header .nwa-byline-author__avatar { width: 49px !important; height: 49px !important; flex-basis: 49px; }
  .nwa-related__grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .nwa-card__image-wrap { aspect-ratio: 1.9 / 1; }
}
@media (prefers-reduced-motion: reduce) {
  .nwa-shell *, .nwa-shell *::before, .nwa-shell *::after { transition: none !important; }
}

/* 1.2.3: Hide duplicate SINGLE-POST template blocks only when enhanced
   article was successfully produced. No JavaScript; no changes to site header,
   navigation or footer. If rendering fails, all theme blocks stay visible. */
@supports selector(body:has(.nwa-shell)) {
  body.single-post:has(.nwa-shell) .wp-site-blocks main .wp-block-post-title,
  body.single-post:has(.nwa-shell) .wp-site-blocks main .wp-block-post-featured-image,
  body.single-post:has(.nwa-shell) .wp-site-blocks main .wp-block-post-date,
  body.single-post:has(.nwa-shell) .wp-site-blocks main .wp-block-post-excerpt,
  body.single-post:has(.nwa-shell) .wp-site-blocks main .wp-block-post-author,
  body.single-post:has(.nwa-shell) .wp-site-blocks main .wp-block-post-author-name,
  body.single-post:has(.nwa-shell) .wp-site-blocks main .wp-block-post-terms {
    display: none !important;
  }
}

/* 1.2.7: body spacing requested; never alters the theme menu or page header. */
.nwa-shell .nwa-reading__article > .nwa-content { padding:5px !important; }
@media (max-width:760px) {
  .nwa-shell .nwa-reading__toc { margin-top:0; }
  .nwa-shell .nwa-post__header { background:#f8f9fb; color:#202634; }
}


/* v1.2.8 — One author identity at top, using the native WP Gravatar social icon. */
.nwa-post__header .nwa-byline-group {
  display: inline-flex; align-items: center; flex: 1 1 215px;
  min-width: 0; max-width: 100%; gap: 10px;
}
.nwa-post__header .nwa-byline-group .nwa-byline-author { flex: 0 1 auto; }
.nwa-post__header .nwa-gravatar-link {
  display: inline-flex; justify-content: center; align-items: center;
  flex: 0 0 34px; width: 34px; height: 34px;
  color: #404b5c !important; background: #fff;
  border: 1px solid #dce1e8; border-radius: 50%;
  text-decoration: none !important;
  transition: color .15s, background .15s, border-color .15s;
}
.nwa-post__header .nwa-gravatar-link svg {
  display: block; width: 19px; height: 19px; fill: currentColor;
}
.nwa-post__header .nwa-gravatar-link:hover,
.nwa-post__header .nwa-gravatar-link:focus-visible {
  color: #d84305 !important; background: #fff1e8; border-color: #ffccb0;
}
.nwa-post__footer { margin-top: 38px; }
.nwa-footer-tags { margin: 0 0 25px; padding-bottom: 21px; border-bottom: 1px solid #e8ebf0; }
.nwa-footer-tags .nwa-tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 0; }
.nwa-footer-tags .nwa-tag {
  display: inline-flex; align-items: center; max-width: 100%;
  border: 1px solid #e6e9ee; border-radius: 999px;
  background: #f3f5f7; padding: 7px 13px;
  color: #5c6472 !important; font-size: 13px; font-weight: 550;
  line-height: 1.4; text-decoration: none !important;
}
.nwa-footer-tags .nwa-tag:hover,
.nwa-footer-tags .nwa-tag:focus-visible { color: #c14406 !important; background: #fff0e7; border-color: #ffddc7; }
.nwa-post__footer .nwa-related { margin-top: 0; }
@media (max-width: 760px) {
  .nwa-post__header .nwa-byline-group { flex: 1 1 100%; }
  .nwa-footer-tags { margin-bottom: 22px; }
}

/* v1.2.9: With the orphan theme group gone, keep breadcrumbs and cover
   naturally spaced immediately after the existing site navigation. */
.nwa-shell { margin-top: 22px !important; }
.nwa-shell .nwa-breadcrumb { margin-bottom: 17px; }
.nwa-shell .nwa-cover { margin-bottom: 26px; }
@media (max-width: 760px) {
  .nwa-shell { margin-top: 18px !important; }
  .nwa-shell .nwa-breadcrumb { margin-bottom: 14px; }
  .nwa-shell .nwa-cover { margin-bottom: 20px; }
}

/* v1.3.0 — Emergency fallback for the exact abandoned byline scaffold.
   Distinctive top/bottom spacing, nested stretch, direct child of main, and
   adjacent NextWise shell are all required; actual navigation/content safe. */
@supports selector(main:has(> .nwa-shell)) {
  body.single-post:has(.nwa-shell) .wp-site-blocks > main >
  .wp-block-group.has-global-padding.is-layout-constrained[style*="--wp--preset--spacing--50"][style*="--wp--preset--spacing--40"]:has(> .wp-block-group.is-content-justification-stretch > .wp-block-template-part .wp-block-group.is-content-justification-left > p.has-contrast-2-color.has-text-color.wp-block-paragraph):has(~ .nwa-shell):not(:has(a, img, svg, picture, nav, form, video, iframe, h1, h2, h3, h4, header, footer)) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* v1.3.2 — Fixed spacing approved on the live site by the owner.
   Only NextWise breadcrumbs are moved; no dynamic header-padding is added. */
.nwa-shell .nwa-breadcrumb {
  margin-top: 125px !important;
  margin-bottom: 17px !important;
}

/* Align the TOC rail with the top edge of the gray article H1 panel.
   Keep the sticky top offset while scrolling so the menu cannot cover it. */
.nwa-shell .nwa-reading__toc {
  margin-top: 0 !important;
}

/* v1.4.0 — Today's approved layout changes only. -------------------------- */
/* Cover now lives in the same reading column as H1, using the 500:261 ratio.
   The TOC still starts beside the gray H1 panel, not beside the cover. */
.nwa-cover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  grid-template-areas: 'cover empty';
  column-gap: clamp(28px, 3.5vw, 48px);
  align-items: start;
  margin: 0 0 26px;
}
.nwa-cover-row--toc-left {
  grid-template-columns: 265px minmax(0, 1fr);
  grid-template-areas: 'empty cover';
}
.nwa-cover-row--no-toc {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'cover';
}
.nwa-cover-row .nwa-cover {
  grid-area: cover;
  min-width: 0;
  width: 100%;
  margin: 0 !important;
  border-radius: 14px;
}
.nwa-cover-row .nwa-cover__image {
  width: 100% !important;
  aspect-ratio: 500 / 261 !important;
  height: auto !important;
  object-fit: cover;
}

/* Header keeps only category/date, H1 and the article description. */
.nwa-post__header .nwa-post__eyebrow {
  gap: 10px 14px;
  color: #667085;
}
.nwa-post__header .nwa-post__date-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5f697a;
}
.nwa-post__header .nwa-post__date-line svg { width: 16px; height: 16px; flex: none; }
.nwa-post__header .nwa-published { color: #4e596b; font-size: 12px; font-weight: 650; }
.nwa-post__header .nwa-modified { padding-left: 0; font-size: 11px; color: #7c8594; }
.nwa-post__header .nwa-post__title { margin-bottom: 16px !important; }
.nwa-post__header .nwa-post__intro { margin-top: 0 !important; }

/* Share utility: sticky vertical rail on wide desktop, compact horizontal row
   elsewhere. UTM values are already baked into each URL by PHP. */
.nwa-body-layout {
  min-width: 0;
  width: 100%;
}
.nwa-share-rail {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 20px;
  color: #5e6673;
}
.nwa-share-rail__label {
  flex: none;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .01em;
  color: #697386;
}
.nwa-share-rail__buttons { display: flex; align-items: center; gap: 8px; }
.nwa-share-rail__button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #dde2e8;
  background: #fff;
  color: #273142 !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}
.nwa-share-rail__button:hover,
.nwa-share-rail__button:focus-visible {
  color: var(--nwa-accent-dark) !important;
  border-color: #ffc7a5;
  background: #fff4ed;
  transform: translateY(-1px);
}
.nwa-share-rail__button svg { width: 18px; height: 18px; display: block; }
.nwa-share-rail__button--line span { font: 800 7px/1 system-ui, sans-serif; letter-spacing: -.04em; }
.nwa-share-rail__copy-icon { display: block !important; }
.nwa-share-rail__check-icon { display: none !important; }
.nwa-share-rail__copy.is-copied .nwa-share-rail__copy-icon { display: none !important; }
.nwa-share-rail__copy.is-copied .nwa-share-rail__check-icon { display: block !important; }
.nwa-share-rail__copy.is-copied { color: #16803c !important; border-color: #b9dfc5; background: #f2fbf5; }
.nwa-share-rail__status { font-size: 11px; line-height: 1.3; color: #16803c; min-height: 1em; }

@media (min-width: 1320px) {
  .nwa-reading--toc-right .nwa-body-layout,
  .nwa-reading--no-toc .nwa-body-layout {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    column-gap: 16px;
    margin-left: -62px;
    width: calc(100% + 62px);
    align-items: start;
  }
  .nwa-reading--toc-right .nwa-share-rail,
  .nwa-reading--no-toc .nwa-share-rail {
    position: sticky;
    top: calc(var(--nwa-sticky-top) + 10px);
    z-index: 1;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0;
    padding-top: 2px;
  }
  .nwa-reading--toc-right .nwa-share-rail__label,
  .nwa-reading--no-toc .nwa-share-rail__label {
    text-align: center;
    font-size: 11px;
    line-height: 1.35;
  }
  .nwa-reading--toc-right .nwa-share-rail__buttons,
  .nwa-reading--no-toc .nwa-share-rail__buttons { flex-direction: column; gap: 9px; }
  .nwa-reading--toc-right .nwa-share-rail__status,
  .nwa-reading--no-toc .nwa-share-rail__status {
    width: 58px;
    text-align: center;
  }
  .nwa-reading--toc-right .nwa-content,
  .nwa-reading--no-toc .nwa-content { grid-column: 2; min-width: 0; }
}

/* Author identity now appears once, after the article/tags and before related posts. */
.nwa-author-box {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: min(880px, 100%);
  margin: 0 0 34px;
  padding: 22px 24px;
  background: #f8f9fb;
  border: 1px solid #e8ebf0;
  border-radius: 14px;
}
.nwa-author-box__avatar-wrap { width: 78px; height: 78px; }
.nwa-author-box__avatar {
  display: block;
  width: 78px !important;
  height: 78px !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #dde2e8;
  background: #fff;
}
.nwa-author-box__content { min-width: 0; }
.nwa-author-box__eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #7a8494;
  font-size: 11px;
  font-weight: 650;
}
.nwa-author-box__name {
  margin: 0 0 5px !important;
  color: var(--nwa-ink) !important;
  font-size: 18px !important;
  line-height: 1.35 !important;
  font-weight: 760 !important;
}
.nwa-author-box__bio {
  max-width: 650px;
  margin: 0 !important;
  color: #5f6979 !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}
.nwa-author-box__gravatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #dce1e8;
  background: #fff;
  color: #414b5a !important;
  text-decoration: none !important;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.nwa-author-box__gravatar svg { width: 21px; height: 21px; display: block; fill: currentColor; }
.nwa-author-box__gravatar:hover,
.nwa-author-box__gravatar:focus-visible { color: #d84305 !important; background: #fff1e8; border-color: #ffccb0; }

@media (max-width: 980px) {
  .nwa-cover-row { grid-template-columns: minmax(0, 1fr) 235px; column-gap: 30px; }
  .nwa-cover-row--toc-left { grid-template-columns: 235px minmax(0, 1fr); }
  .nwa-cover-row--no-toc { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .nwa-cover-row,
  .nwa-cover-row--toc-left,
  .nwa-cover-row--no-toc {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'cover';
    margin-bottom: 20px;
  }
  .nwa-cover-row .nwa-cover__image { aspect-ratio: 500 / 261 !important; }
  .nwa-reading__article > .nwa-body-layout { grid-area: body; width: 100%; min-width: 0; }
  .nwa-share-rail {
    flex-wrap: wrap;
    gap: 9px 12px;
    padding: 12px 0 2px;
    margin-bottom: 14px;
  }
  .nwa-share-rail__buttons { gap: 8px; }
  .nwa-share-rail__button { width: 35px; height: 35px; }
  .nwa-author-box {
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px;
    margin-bottom: 28px;
  }
  .nwa-author-box__avatar-wrap,
  .nwa-author-box__avatar { width: 62px !important; height: 62px !important; }
}

@media (max-width: 490px) {
  .nwa-author-box {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
  }
  .nwa-author-box__avatar-wrap,
  .nwa-author-box__avatar { width: 58px !important; height: 58px !important; }
  .nwa-author-box__gravatar { grid-column: 2; width: 36px; height: 36px; }
  .nwa-author-box__gravatar svg { width: 19px; height: 19px; }
}
/* Preserve the approved 5px article-body padding after introducing the share wrapper. */
.nwa-shell .nwa-body-layout > .nwa-content { padding: 5px !important; }

/* v1.4.1 — latest posts beside cover + Rank Math TOC in the sticky right rail. */
.nwa-cover-row {
  grid-template-columns: minmax(0, 1fr) 265px;
  grid-template-areas: 'cover latest';
}
.nwa-cover-row--no-latest {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'cover';
}
.nwa-latest {
  grid-area: latest;
  min-width: 0;
  align-self: stretch;
  padding: 18px 18px 16px;
  border: 1px solid #e8ebf0;
  border-radius: 14px;
  background: #f8f9fb;
}
.nwa-latest__title {
  margin: 0 0 12px !important;
  color: var(--nwa-ink) !important;
  font-size: 17px !important;
  line-height: 1.35 !important;
  font-weight: 780 !important;
}
.nwa-latest__list { display: grid; gap: 0; }
.nwa-latest__item { margin: 0; padding: 0; border-top: 1px solid #e7eaf0; }
.nwa-latest__item:first-child { border-top: 0; }
.nwa-latest__link {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 14px;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  color: inherit !important;
  text-decoration: none !important;
}
.nwa-latest__thumb {
  display: block;
  width: 58px;
  height: 48px;
  overflow: hidden;
  border-radius: 8px;
  background: #eceff3;
}
.nwa-latest__image { display:block; width:100% !important; height:100% !important; object-fit:cover; margin:0 !important; }
.nwa-latest__fallback {
  display:flex; align-items:center; justify-content:center; width:100%; height:100%;
  color:#e34d0a; font-weight:800; font-size:14px;
}
.nwa-latest__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nwa-latest__name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #303848;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 680;
}
.nwa-latest__date { color: #8a93a1; font-size: 10.5px; line-height: 1.3; }
.nwa-latest__arrow { color:#a1a9b5; font-size:24px; line-height:1; transition:transform .15s ease,color .15s ease; }
.nwa-latest__link:hover .nwa-latest__name,
.nwa-latest__link:focus-visible .nwa-latest__name { color: var(--nwa-accent-dark); }
.nwa-latest__link:hover .nwa-latest__arrow,
.nwa-latest__link:focus-visible .nwa-latest__arrow { color: var(--nwa-accent); transform: translateX(2px); }

/* The Rank Math block remains part of Gutenberg content for editing/SEO, but is
   moved into the right rail at runtime so it appears only once to visitors. */
.nwa-reading__toc .wp-block-rank-math-toc-block {
  display: block !important;
  margin: 0 !important;
  padding: 4px 0 6px 20px !important;
  border-left: 1px solid var(--nwa-border);
  background: #fff !important;
}
.nwa-reading__toc[data-nwa-rankmath-toc-slot]:empty { display: none !important; }
.nwa-reading__toc .wp-block-rank-math-toc-block > :first-child {
  margin-top: 0 !important;
}
.nwa-reading__toc .wp-block-rank-math-toc-block h2,
.nwa-reading__toc .wp-block-rank-math-toc-block h3,
.nwa-reading__toc .wp-block-rank-math-toc-block p:first-child {
  margin: 0 0 14px !important;
  padding: 0 !important;
  background: transparent !important;
  color: var(--nwa-ink) !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  font-weight: 760 !important;
}
.nwa-reading__toc .wp-block-rank-math-toc-block nav { margin: 0 !important; padding: 0 !important; }
.nwa-reading__toc .wp-block-rank-math-toc-block ul,
.nwa-reading__toc .wp-block-rank-math-toc-block ol { margin-top: 0 !important; margin-bottom: 0 !important; padding-left: 20px !important; }
.nwa-reading__toc .wp-block-rank-math-toc-block li { margin: 0 0 7px !important; color: #7b8492; }
.nwa-reading__toc .wp-block-rank-math-toc-block a {
  color: #667181 !important;
  font-size: 13px;
  line-height: 1.6;
  text-decoration: none !important;
  overflow-wrap: anywhere;
  transition: color .15s ease;
}
.nwa-reading__toc .wp-block-rank-math-toc-block a:hover,
.nwa-reading__toc .wp-block-rank-math-toc-block a.is-active,
.nwa-reading__toc .wp-block-rank-math-toc-block a[aria-current="location"] { color: var(--nwa-accent-dark) !important; }
.nwa-reading__toc .wp-block-rank-math-toc-block a.is-active { font-weight: 700; }

@media (max-width: 980px) {
  .nwa-cover-row { grid-template-columns: minmax(0, 1fr) 235px; }
  .nwa-latest { padding: 15px 14px; }
  .nwa-latest__link { grid-template-columns: 50px minmax(0,1fr) 12px; gap: 8px; }
  .nwa-latest__thumb { width: 50px; height: 43px; }
}

@media (max-width: 760px) {
  .nwa-cover-row,
  .nwa-cover-row--no-latest {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'cover' 'latest';
    gap: 16px;
  }
  .nwa-latest { width: 100%; }
  .nwa-latest__list { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
  .nwa-latest__item { border-top: 0; }
  .nwa-latest__link { grid-template-columns: 1fr; align-items: start; gap: 7px; padding: 0; }
  .nwa-latest__thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; }
  .nwa-latest__arrow { display: none; }
  .nwa-latest__name { font-size: 12px; }
  .nwa-reading__toc .wp-block-rank-math-toc-block {
    padding: 15px 17px !important;
    border: 1px solid var(--nwa-border);
    border-radius: 11px;
    background: #fafbfc !important;
  }
}

@media (max-width: 520px) {
  .nwa-latest__list { grid-template-columns: minmax(0,1fr); }
  .nwa-latest__link { grid-template-columns: 72px minmax(0,1fr); align-items:center; }
  .nwa-latest__thumb { width:72px; height:58px; aspect-ratio:auto; }
}
