/* Emailwish blog — matches chat landing + homepage results kit */

body.blog,
body.archive,
body.search {
  --ew-blog-black: #000000;
  --ew-blog-text: #22281e;
  --ew-blog-muted: #5c6158;
  --ew-blog-light: #f3f2f1;
  --ew-blog-card-bg: #f9f8f7;
  --ew-blog-card: #ffffff;
  --ew-blog-line: #e7e4df;
  --ew-blog-accent: #c1b3ff;
  --ew-blog-pink: #ff8cc6;
  --ew-blog-brown: #33150e;
  --ew-blog-lilac: #f3f0ff;
  --ew-blog-radius: 10px;
  --ew-blog-radius-lg: 12px;
  --ew-blog-control-radius: 10px;
  --ew-blog-shadow: 0 8px 22px rgb(0 0 0 / 7%);
  --ew-blog-shadow-soft: 0 4px 12px rgb(0 0 0 / 5%);
  --container-max-width: 1480px;
  --sidebar-width: 300px;
  color: var(--ew-blog-text);
  font-family: Afacad, sans-serif;
  background: #fff;
}

body.blog .keydesign-container.with-sidebar.sidebar-right,
body.archive .keydesign-container.with-sidebar.sidebar-right,
body.search .keydesign-container.with-sidebar.sidebar-right {
  --grid-sidebar: minmax(0, 1fr) var(--sidebar-width);
  grid-column-gap: 40px;
}

/* Hide default title bits when custom header is present */
body.blog #page-header.ew-blog-header .keydesign-container > .entry-title,
body.blog #page-header.ew-blog-header .keydesign-container > .entry-subtitle,
body.blog #page-header.ew-blog-header .keydesign-container > .breadcrumbs {
  display: none;
}

body.blog #page-header.ew-blog-header .ew-blog-header-copy .entry-title,
body.blog #page-header.ew-blog-header .ew-blog-header-copy .entry-subtitle,
body.blog #page-header.ew-blog-header .ew-blog-header-copy .breadcrumbs {
  display: block;
}

/* ----- Header: full-bleed desk hero ----- */
body.blog #page-header.ew-blog-header,
body.archive #page-header.ew-blog-header {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 88%) 0%, rgb(255 255 255 / 72%) 34%, rgb(255 255 255 / 18%) 58%, transparent 72%),
    var(--ew-blog-hero, none) right center / cover no-repeat,
    var(--ew-blog-light);
  min-height: clamp(280px, 34vw, 440px);
  padding-top: 56px;
  padding-bottom: 56px;
  text-align: left;
  overflow: hidden;
}

body.blog #page-header.ew-blog-header .keydesign-container,
body.archive #page-header.ew-blog-header .keydesign-container {
  display: block;
  position: relative;
  z-index: 1;
  max-width: var(--container-max-width);
}

.ew-blog-header-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 34em;
}

.ew-blog-kicker {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgb(0 0 0 / 5%);
  font-family: Onest, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ew-blog-muted);
}

body.blog #page-header.ew-blog-header .entry-title,
body.archive #page-header.ew-blog-header .entry-title {
  margin: 0 0 14px;
  max-width: none;
  font-family: Onest, sans-serif;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ew-blog-black);
  text-align: left;
}

body.blog #page-header.ew-blog-header .entry-subtitle,
body.archive #page-header.ew-blog-header .entry-subtitle {
  margin: 0 0 18px;
  max-width: 32em;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ew-blog-muted);
  text-align: left;
}

body.blog #page-header.ew-blog-header .breadcrumbs,
body.archive #page-header.ew-blog-header .breadcrumbs {
  margin-top: 0;
  text-align: left;
  font-family: Onest, sans-serif;
  font-size: 13px;
  color: var(--ew-blog-muted);
}

body.blog #page-header.ew-blog-header .breadcrumbs a {
  color: inherit;
}

/* Legacy side visual — unused on full-bleed header */
.ew-blog-header-visual {
  display: none;
}

/* ----- Latest posts bar ----- */
.ew-blog-latest-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ew-blog-line);
}

.ew-blog-latest-bar h2 {
  margin: 0;
  font-family: Onest, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ew-blog-black);
}

.ew-blog-latest-bar a {
  flex-shrink: 0;
  font-family: Onest, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ew-blog-muted);
  text-decoration: none;
}

.ew-blog-latest-bar a:hover {
  color: var(--ew-blog-black);
}

/* ----- Post rows ----- */
.blog-layout-horizontal .keydesign-card {
  align-items: stretch;
  gap: 0;
  margin-bottom: 8px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ew-blog-line);
}

.blog-layout-horizontal .keydesign-card .entry-image {
  flex: 0 0 42%;
  max-width: 42%;
  aspect-ratio: 4 / 3;
  border-radius: var(--ew-blog-radius);
  overflow: hidden;
}

.blog-layout-horizontal .keydesign-card .entry-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--ew-blog-radius);
}

.blog-layout-horizontal .keydesign-card .entry-wrapper {
  flex: 1 1 58%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 32px;
  padding-right: 4px;
}

.blog-layout-horizontal .keydesign-card .entry-wrapper .category-meta {
  order: 1;
  margin-bottom: 8px;
}

.blog-layout-horizontal .keydesign-card .entry-wrapper .post-title {
  order: 2;
  margin: 0 0 10px;
  font-family: Onest, sans-serif;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--ew-blog-black);
}

.blog-layout-horizontal .keydesign-card .entry-wrapper .post-title a {
  color: inherit;
  text-decoration: none;
}

.blog-layout-horizontal .keydesign-card .entry-wrapper .post-title a:hover {
  color: var(--ew-blog-brown);
}

.blog-layout-horizontal .keydesign-card .entry-wrapper .entry-content-card {
  display: block;
  order: 3;
  margin-top: 0;
  margin-bottom: 14px;
}

.blog-layout-horizontal .keydesign-card .entry-wrapper .entry-meta {
  order: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  font-family: Onest, sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ew-blog-muted);
}

.blog-layout-horizontal .keydesign-card .entry-meta > span:not(:last-child)::after {
  content: "|";
  margin: 0 10px;
  color: #c5c2bb;
  font-weight: 400;
}

.blog-layout-horizontal .keydesign-card .entry-meta a {
  color: inherit;
}

.blog-layout-horizontal .keydesign-card .post-content {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ew-blog-muted);
}

.blog-layout-horizontal .keydesign-card .blog-label,
.blog-layout-horizontal .keydesign-card .blog-label a {
  font-family: Onest, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ew-blog-muted);
  text-decoration: none;
}

/* ----- Sidebar: separate sand cards ----- */
body.blog .keydesign-container.with-sidebar,
body.archive .keydesign-container.with-sidebar,
body.search .keydesign-container.with-sidebar {
  align-items: start;
}

body.blog .keydesign-sidebar,
body.archive .keydesign-sidebar,
body.search .keydesign-sidebar {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

body.blog .keydesign-sidebar .widget,
body.archive .keydesign-sidebar .widget,
body.search .keydesign-sidebar .widget {
  background: var(--ew-blog-card-bg);
  border-radius: var(--ew-blog-radius-lg);
  padding: 30px 26px 28px;
  margin: 0 0 18px;
  box-shadow: none;
}

body.blog .keydesign-sidebar .widget:last-child,
body.archive .keydesign-sidebar .widget:last-child {
  margin-bottom: 0;
}

/* Search sits alone */
body.blog .keydesign-sidebar .widget_search,
body.archive .keydesign-sidebar .widget_search,
body.search .keydesign-sidebar .widget_search {
  background: transparent;
  padding: 0;
  margin-bottom: 18px;
}

body.blog .keydesign-sidebar .widget-title,
body.archive .keydesign-sidebar .widget-title {
  margin: 0 0 14px;
  font-family: Onest, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ew-blog-black);
}

body.blog .widget_search .widget-title {
  display: none;
}

body.blog .widget_search .search-form,
body.archive .widget_search .search-form {
  position: relative;
  margin: 0;
}

body.blog .widget_search .search-form label {
  display: block;
  margin: 0;
  font-size: 0;
}

body.blog .widget_search .search-field {
  width: 100%;
  height: 46px;
  padding: 0 48px 0 16px;
  border: 0;
  border-radius: var(--ew-blog-control-radius);
  background: var(--ew-blog-card-bg);
  font-family: Afacad, sans-serif;
  font-size: 15px;
  color: var(--ew-blog-text);
  box-shadow: none;
}

body.blog .widget_search .search-field::placeholder {
  color: #9a9790;
}

body.blog .widget_search .search-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  text-indent: -999px;
  overflow: hidden;
  cursor: pointer;
}

body.blog .widget_search .search-submit::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid var(--ew-blog-brown);
  border-radius: 50%;
  width: 12px;
  height: 12px;
  box-sizing: border-box;
}

body.blog .widget_search .search-submit::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 7px;
  height: 2px;
  background: var(--ew-blog-brown);
  transform: rotate(45deg);
  transform-origin: left center;
}

body.blog .widget_categories ul,
body.archive .widget_categories ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.blog .widget_categories li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgb(0 0 0 / 6%);
  font-size: 15px;
  color: var(--ew-blog-text);
}

body.blog .widget_categories li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

body.blog .widget_categories li:first-child {
  padding-top: 0;
}

body.blog .widget_categories a {
  color: inherit;
  text-decoration: none;
}

body.blog .widget_categories a:hover {
  color: var(--ew-blog-brown);
}

body.blog .widget_categories .count,
body.blog .widget_categories li {
  color: inherit;
}

/* Hide noisy widgets — newsletter replaces recent posts */
body.blog .widget_recent_entries,
body.blog .widget_tag_cloud,
body.archive.category .widget_recent_entries,
body.archive.category .widget_tag_cloud {
  display: none !important;
}

/* Newsletter — sand card; dark CTA like chat / results */
.ew-blog-newsletter.widget {
  background: var(--ew-blog-card-bg);
  border-radius: var(--ew-blog-radius-lg);
  padding: 30px 26px 28px;
}

.ew-blog-newsletter-kicker {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgb(0 0 0 / 5%);
  font-family: Onest, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ew-blog-muted);
}

.ew-blog-newsletter h3 {
  margin: 0 0 8px;
  font-family: Onest, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ew-blog-black);
}

.ew-blog-newsletter p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ew-blog-muted);
}

.ew-blog-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ew-blog-newsletter-form input[type="email"] {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--ew-blog-line);
  border-radius: var(--ew-blog-control-radius) !important;
  font-family: Afacad, sans-serif;
  font-size: 15px;
  background: #fff;
  color: var(--ew-blog-text);
}

.ew-blog-newsletter-form button {
  height: 46px;
  border: 0;
  border-radius: var(--ew-blog-control-radius) !important;
  background: var(--ew-blog-brown);
  color: #fff;
  font-family: Onest, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ew-blog-newsletter-form button:hover {
  background: var(--ew-blog-black);
}

/* Pagination */
body.blog .navigation.pagination .nav-links a,
body.blog .navigation.pagination .nav-links span {
  border-radius: 999px;
  font-family: Onest, sans-serif;
}

body.blog .navigation.pagination .nav-links .current {
  background: var(--ew-blog-brown);
  border-color: var(--ew-blog-brown);
  color: #fff;
}

@media (max-width: 1024px) {
  body.blog #page-header.ew-blog-header,
  body.archive #page-header.ew-blog-header {
    background-position: 70% center;
    min-height: clamp(260px, 48vw, 380px);
    padding-top: 40px;
    padding-bottom: 40px;
  }

  body.blog #page-header.ew-blog-header .keydesign-container,
  body.archive #page-header.ew-blog-header .keydesign-container {
    display: block;
  }

  .ew-blog-header-copy {
    max-width: 28em;
  }

  .blog-layout-horizontal .keydesign-card .entry-image {
    flex-basis: 36%;
    max-width: 36%;
  }
}

@media (max-width: 767px) {
  body.blog #page-header.ew-blog-header,
  body.archive #page-header.ew-blog-header {
    background:
      linear-gradient(180deg, rgb(255 255 255 / 92%) 0%, rgb(255 255 255 / 78%) 46%, rgb(255 255 255 / 35%) 70%, transparent 100%),
      var(--ew-blog-hero, none) 78% center / cover no-repeat,
      var(--ew-blog-light);
    min-height: 320px;
    padding-top: 28px;
    padding-bottom: 120px;
  }

  .ew-blog-header-copy {
    max-width: none;
  }

  .blog-layout-horizontal .keydesign-card {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-layout-horizontal .keydesign-card .entry-image {
    flex: none;
    max-width: none;
    width: 100%;
    aspect-ratio: 16 / 10;
    margin-bottom: 16px;
  }

  .blog-layout-horizontal .keydesign-card .entry-wrapper {
    padding-left: 0;
    padding-right: 0;
  }

  body.blog .keydesign-sidebar {
    margin-top: 24px;
  }

  .ew-blog-latest-bar {
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   Single article — Mageloyalty-style header + On this page TOC in sidebar
   ========================================================================== */

body.single-post.ew-blog-single,
body.ew-blog-single {
  --ew-blog-black: #000000;
  --ew-blog-text: #22281e;
  --ew-blog-muted: #5c6158;
  --ew-blog-meta: #8a8880;
  --ew-blog-line: #e5e5e5;
  --ew-blog-light: #f3f2f1;
  --ew-blog-card-bg: #f9f8f7;
  --ew-blog-brown: #33150e;
  --ew-blog-radius: 10px;
  --ew-blog-radius-lg: 12px;
  --ew-blog-control-radius: 10px;
  --container-max-width: 1480px;
  --sidebar-width: 300px;
  color: var(--ew-blog-text);
  font-family: Afacad, sans-serif;
  background: #fff;
}

body.ew-blog-single .keydesign-container {
  max-width: var(--container-max-width);
}

body.ew-blog-single .keydesign-container.with-sidebar.sidebar-right {
  --grid-sidebar: minmax(0, 1fr) var(--sidebar-width);
  grid-column-gap: 40px;
  align-items: start;
}

body.ew-blog-single .keydesign-sidebar {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

body.ew-blog-single .keydesign-sidebar .widget {
  background: var(--ew-blog-card-bg);
  border-radius: var(--ew-blog-radius-lg);
  padding: 30px 26px 28px;
  margin: 0 0 18px;
  box-shadow: none;
}

body.ew-blog-single .keydesign-sidebar .widget:last-child {
  margin-bottom: 0;
}

body.ew-blog-single .keydesign-sidebar .widget_search {
  background: transparent;
  padding: 0;
  margin-bottom: 18px;
}

body.ew-blog-single .keydesign-sidebar .widget-title {
  margin: 0 0 14px;
  font-family: Onest, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ew-blog-black);
}

body.ew-blog-single .widget_search .widget-title {
  display: none;
}

body.ew-blog-single .widget_search .search-form {
  position: relative;
  margin: 0;
}

body.ew-blog-single .widget_search .search-form label {
  display: block;
  margin: 0;
  font-size: 0;
}

body.ew-blog-single .widget_search .search-field {
  width: 100%;
  height: 46px;
  padding: 0 48px 0 16px;
  border: 0;
  border-radius: var(--ew-blog-control-radius);
  background: var(--ew-blog-card-bg);
  font-family: Afacad, sans-serif;
  font-size: 15px;
  color: var(--ew-blog-text);
  box-shadow: none;
}

body.ew-blog-single .widget_search .search-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  text-indent: -999px;
  overflow: hidden;
  cursor: pointer;
}

body.ew-blog-single .widget_categories ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.ew-blog-single .widget_categories li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgb(0 0 0 / 6%);
  font-size: 15px;
  color: var(--ew-blog-text);
}

body.ew-blog-single .widget_categories li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

body.ew-blog-single .widget_categories li:first-child {
  padding-top: 0;
}

body.ew-blog-single .widget_categories a {
  color: inherit;
  text-decoration: none;
}

body.ew-blog-single .widget_categories a:hover {
  color: var(--ew-blog-brown);
}

body.ew-blog-single .widget_recent_entries,
body.ew-blog-single .widget_tag_cloud {
  display: none !important;
}

body.ew-blog-single .article-single {
  padding-top: 0;
  padding-bottom: 48px;
  margin-top: 0;
}

body.ew-blog-single #primary,
body.ew-blog-single .content-area,
body.ew-blog-single .keydesign-content {
  padding-top: 0;
}

body.ew-blog-single .keydesign-container.with-sidebar {
  padding-top: 28px;
}

body.ew-blog-single .article-single > .post-share {
  display: none;
}

body.ew-blog-single .ew-article-header {
  margin: 0 0 28px;
  padding-top: 8px;
}

/* Breadcrumbs */
.ew-article-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  font-family: Onest, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ew-blog-meta);
}

.ew-article-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.ew-article-breadcrumbs a:hover {
  color: var(--ew-blog-black);
}

.ew-article-bc-sep {
  color: #c5c2bb;
  font-size: 12px;
}

.ew-article-bc-current {
  max-width: 42ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ew-blog-muted);
}

/* Title */
.ew-article-title {
  margin: 0;
  max-width: 860px;
  font-family: Onest, sans-serif;
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ew-blog-black);
}

/* Meta row */
.ew-article-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px 40px;
  margin-top: 28px;
  max-width: 920px;
}

.ew-article-meta-label {
  margin: 0 0 12px;
  font-family: Onest, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ew-blog-meta);
}

.ew-article-meta-body {
  padding-top: 14px;
  border-top: 1px solid var(--ew-blog-line);
  font-family: Onest, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ew-blog-black);
}

.ew-article-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ew-article-avatar,
.ew-article-author img.ew-article-avatar,
.ew-article-author img.avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ew-article-author-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ew-blog-black);
}

.ew-article-linkedin {
  display: inline-flex;
  color: var(--ew-blog-meta);
  line-height: 0;
}

.ew-article-linkedin:hover {
  color: var(--ew-blog-black);
}

.ew-article-author-role {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ew-blog-muted);
}

/* Featured image */
body.ew-blog-single .article-single > .entry-image {
  margin: 0 0 36px;
  border-radius: 0;
  overflow: hidden;
}

body.ew-blog-single .article-single > .entry-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

/* Content type */
body.ew-blog-single .entry-content {
  font-size: 18px;
  line-height: 1.7;
  color: #3d3c38;
}

body.ew-blog-single .entry-content h2 {
  margin: 2.2em 0 0.7em;
  font-family: Onest, sans-serif;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ew-blog-black);
}

body.ew-blog-single .entry-content h3 {
  margin: 1.8em 0 0.55em;
  font-family: Onest, sans-serif;
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ew-blog-black);
}

body.ew-blog-single .entry-content p {
  margin: 0 0 1.15em;
}

body.ew-blog-single .entry-content a {
  color: var(--ew-blog-brown);
}

/* On this page TOC — top of right sidebar, normal flow (sidebar itself is sticky) */
body.ew-blog-single .ew-article-toc.widget {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 0 0 28px;
  position: relative;
  top: auto;
  z-index: 1;
}

/* Guard against duplicate newsletter injections */
body.ew-blog-single .ew-blog-newsletter ~ .ew-blog-newsletter {
  display: none !important;
}

.ew-article-toc-label {
  margin: 0 0 12px;
  font-family: Onest, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ew-blog-meta);
}

.ew-article-toc-mobile {
  display: none;
  margin: 0;
  border-top: 1px solid var(--ew-blog-line);
  border-bottom: 1px solid var(--ew-blog-line);
}

.ew-article-toc-mobile > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  list-style: none;
  cursor: pointer;
  font-family: Onest, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ew-blog-meta);
}

.ew-article-toc-mobile > summary::-webkit-details-marker {
  display: none;
}

.ew-article-toc-mobile[open] > summary svg {
  transform: rotate(180deg);
}

.ew-article-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--ew-blog-line);
}

.ew-article-toc-item a {
  display: block;
  margin-left: -2px;
  padding: 10px 0 10px 16px;
  border-left: 2px solid transparent;
  font-family: Onest, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  color: #6b6a66;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.ew-article-toc-item.is-h3 a {
  padding-left: 28px;
  font-size: 13px;
}

.ew-article-toc-item a:hover {
  color: var(--ew-blog-black);
}

.ew-article-toc-item a.is-active {
  border-left-color: var(--ew-blog-black);
  color: var(--ew-blog-black);
  font-weight: 600;
}

@media (max-width: 1100px) {
  body.ew-blog-single .ew-article-toc.widget {
    position: relative;
    margin-bottom: 18px;
  }

  .ew-article-toc-desktop {
    display: none;
  }

  .ew-article-toc-mobile {
    display: block;
  }

  .ew-article-title {
    max-width: none;
  }

  .ew-article-meta {
    grid-template-columns: 1fr;
    gap: 22px;
    max-width: none;
  }
}

@media (max-width: 767px) {
  .ew-article-bc-current {
    max-width: 28ch;
  }

  .ew-article-meta {
    margin-top: 22px;
  }
}
