﻿/* Emailwish blog — EW Heading + Afacad (site design system) */

body.blog,
body.archive,
body.search,
body.ew-blog-single,
body.single-post {
  --ew-font-heading: "EW Heading", system-ui, sans-serif;
  --ew-font-body: Afacad, system-ui, sans-serif;
  --ew-blog-font: var(--ew-font-body);
  --ew-blog-black: #171717;
  --ew-blog-text: #303030;
  --ew-blog-muted: #666666;
  --ew-blog-meta: #666666;
  --ew-blog-light: #f7f7f7;
  --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: var(--ew-font-body);
  font-weight: 500;
  background: #fff;
  letter-spacing: var(--ew-track-body, -0.03em);
}

@media (min-width: 1024.02px) {
  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;
  align-self: flex-start;
}

/* ----- 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: 72px;
  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: 40em;
}

.ew-blog-kicker {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgb(0 0 0 / 5%);
  font-family: var(--ew-font-heading);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--ew-track-kicker, -0.01em);
  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: var(--ew-font-heading) !important;
  font-size: var(--ew-text-display, clamp(32px, 4.2vw, 48px)) !important;
  font-weight: 600 !important;
  line-height: var(--ew-leading-display, 1.12) !important;
  letter-spacing: var(--ew-track-display, -0.03em) !important;
  color: var(--ew-blog-black);
  text-align: left;
  text-wrap: balance;
}

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-family: var(--ew-font-body) !important;
  font-size: var(--ew-text-lead, 18px) !important;
  font-weight: 500 !important;
  line-height: var(--ew-leading-body, 1.4) !important;
  letter-spacing: var(--ew-track-body, -0.03em) !important;
  color: var(--ew-blog-muted) !important;
  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:var(--ew-font-heading);
  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;
}

/* ----- Author archive (Kaching-style centered hero + full-width posts) ----- */
body.author #page-header.ew-author-header {
  position: relative;
  isolation: isolate;
  padding: 72px 0 112px;
  background: var(--ew-blog-light);
  border-bottom: 1px solid var(--ew-blog-line);
  text-align: center;
  overflow: hidden;
}

body.author #page-header.ew-author-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 100%, rgb(128 133 140 / 18%), transparent 62%),
    linear-gradient(180deg, transparent 48%, rgb(194 197 202 / 22%) 100%);
  mask-image: linear-gradient(transparent 42%, #000 88%);
  z-index: 0;
}

body.author #page-header.ew-author-header .keydesign-container {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 920px;
  margin-inline: auto;
  padding-inline: 28px;
}

body.author #page-header.ew-author-header .keydesign-container::before,
body.author #page-header.ew-author-header .keydesign-container::after {
  content: "";
  position: absolute;
  top: -72px;
  bottom: -112px;
  width: 1px;
  background: var(--ew-blog-line);
  mask-image: linear-gradient(#000 46%, transparent 92%);
  pointer-events: none;
}

body.author #page-header.ew-author-header .keydesign-container::before {
  left: 0;
}

body.author #page-header.ew-author-header .keydesign-container::after {
  right: 0;
}

.ew-author-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ew-author-print {
  --print-size: 88px;
  display: block;
  width: max-content;
  margin: 0 auto 28px;
  padding: 3px;
  background: #fff;
  box-shadow:
    0 0 0 0.5px rgb(8 9 12 / 10%),
    0 1px 1.5px rgb(8 9 12 / 8%),
    0 5px 10px -5px rgb(8 9 12 / 18%);
}

.ew-author-print--taped {
  rotate: -2.4deg;
}

.ew-author-print--taped::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  z-index: 1;
  width: 34px;
  height: 11px;
  translate: -50%;
  rotate: -5deg;
  pointer-events: none;
  background: rgb(232 232 228 / 72%);
  box-shadow: 0 0 0 0.5px rgb(8 9 12 / 5%);
}

.ew-author-print {
  position: relative;
}

.ew-author-print img,
.ew-author-print .avatar {
  display: block;
  width: var(--print-size);
  height: var(--print-size);
  object-fit: cover;
  border-radius: 1px;
  background: #ecece9;
}

body.author #page-header.ew-author-header .entry-title {
  margin: 0;
  font-family: var(--ew-font-heading);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: var(--ew-track-display, -0.03em);
  color: var(--ew-blog-black);
  text-align: center;
  text-wrap: balance;
}

.ew-author-hero__name,
.ew-author-hero__role {
  display: block;
}

.ew-author-hero__role {
  background: linear-gradient(105deg, #80858c, #9ea3aa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

body.author #page-header.ew-author-header .entry-subtitle,
.ew-author-hero__bio {
  margin: 12px auto 0;
  max-width: 42em;
  font-family: var(--ew-font-body);
  font-size: var(--ew-text-body, 16px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: var(--ew-track-body, -0.03em);
  color: var(--ew-blog-muted);
  text-align: center;
  text-wrap: balance;
}

.ew-author-meta {
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin: 40px auto 0;
  padding: 6px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--ew-blog-line), var(--ew-blog-shadow-soft);
  text-align: left;
}

.ew-author-topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}

.ew-author-label {
  padding: 0 6px 0 12px;
  font-family: var(--ew-font-heading);
  font-size: 14px;
  font-weight: 500;
  line-height: 36px;
  letter-spacing: -0.02em;
  color: var(--ew-blog-muted);
  white-space: nowrap;
}

.ew-author-topics ul,
.ew-author-profiles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ew-author-topics a,
.ew-author-profiles a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-family: var(--ew-font-heading);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ew-blog-black);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.ew-author-topics a:hover,
.ew-author-profiles a:hover {
  background: var(--ew-blog-light);
}

.ew-author-profiles {
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px #ececec;
}

.ew-author-profiles li + li {
  box-shadow: inset 1px 0 0 #ececec;
}

.ew-author-profiles a {
  padding: 0 12px;
}

.ew-author-profiles svg {
  color: var(--ew-blog-muted);
  flex: 0 0 auto;
}

body.ew-author-archive .keydesign-sidebar,
body.author.ew-author-archive .keydesign-sidebar {
  display: none !important;
}

body.ew-author-archive .keydesign-container.with-sidebar,
body.author.ew-author-archive .keydesign-container.with-sidebar {
  display: block;
  max-width: 1180px;
  margin-inline: auto;
  padding: 8px 0 72px;
}

body.ew-author-archive .keydesign-container.with-sidebar > .content-area,
body.ew-author-archive #primary,
body.ew-author-archive .keydesign-content {
  width: 100%;
  max-width: none;
}

/* Author article grid — 3-col bordered cells like Kaching.
   Beat theme `.blog-layout-horizontal.with-sidebar .site-main { 1fr }`. */
body.ew-author-archive .blog-layout-horizontal.with-sidebar .site-main,
body.ew-author-archive .blog-layout-horizontal .site-main,
body.ew-author-archive .site-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 8px 0 0;
  background: #fff;
}

body.ew-author-archive .site-main > .keydesign-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0;
  margin: 0;
  padding: 20px 22px 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.ew-author-archive .site-main > .keydesign-card:nth-child(n + 4) {
  border-top: 1px solid var(--ew-blog-line);
}

body.ew-author-archive .site-main > .keydesign-card:not(:nth-child(3n)) {
  border-right: 1px solid var(--ew-blog-line);
}

body.ew-author-archive .blog-layout-horizontal .keydesign-card .entry-image,
body.ew-author-archive .site-main > .keydesign-card .entry-image {
  flex: none;
  max-width: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 14px;
  border-radius: 12px;
  overflow: hidden;
  background: #f2f2f2;
}

body.ew-author-archive .site-main > .keydesign-card .entry-image a,
body.ew-author-archive .site-main > .keydesign-card .entry-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

body.ew-author-archive .blog-layout-horizontal .keydesign-card .entry-wrapper,
body.ew-author-archive .site-main > .keydesign-card .entry-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "meta meta"
    "title title"
    "excerpt excerpt";
  gap: 0;
  flex: none;
  max-width: none;
  width: 100%;
  padding: 0;
  min-width: 0;
}

body.ew-author-archive .ew-author-card-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  min-width: 0;
}

body.ew-author-archive .site-main > .keydesign-card .category-meta {
  order: unset;
  margin: 0;
  min-width: 0;
}

body.ew-author-archive .site-main > .keydesign-card .blog-label,
body.ew-author-archive .site-main > .keydesign-card .blog-label a {
  font-family: var(--ew-font-heading);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ew-blog-muted);
  text-decoration: none;
}

body.ew-author-archive .ew-author-card-date,
body.ew-author-archive .site-main > .keydesign-card .entry-meta .published {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-family: var(--ew-font-heading);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  color: #777;
  white-space: nowrap;
}

body.ew-author-archive .ew-author-card-date svg,
body.ew-author-archive .site-main > .keydesign-card .entry-meta .published svg {
  color: #999;
  flex: 0 0 auto;
}

body.ew-author-archive .site-main > .keydesign-card .entry-meta {
  display: none;
}

body.ew-author-archive .site-main > .keydesign-card .entry-meta .author,
body.ew-author-archive .site-main > .keydesign-card .entry-meta .comment-count,
body.ew-author-archive .site-main > .keydesign-card .entry-meta .comments-link {
  display: none;
}

body.ew-author-archive .site-main > .keydesign-card .entry-meta > span:not(:last-child)::after {
  content: none;
  margin: 0;
}

body.ew-author-archive .site-main > .keydesign-card .post-title {
  grid-area: title;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  order: unset;
  margin: 0 0 10px;
  font-family: var(--ew-font-heading);
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ew-blog-black);
}

body.ew-author-archive .site-main > .keydesign-card .post-title a {
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

body.ew-author-archive .site-main > .keydesign-card .post-title a:hover {
  color: var(--ew-blog-black);
}

body.ew-author-archive .site-main > .keydesign-card .post-title .ew-title-sub {
  display: inline;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

body.ew-author-archive .site-main > .keydesign-card .post-title .ew-title-sub::before {
  content: " ";
}

body.ew-author-archive .ew-author-card-arrow {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--ew-blog-black);
}

body.ew-author-archive .site-main > .keydesign-card .entry-content-card {
  grid-area: excerpt;
  display: block;
  order: unset;
  margin: 0;
}

body.ew-author-archive .site-main > .keydesign-card .post-content {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-family: var(--ew-font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: var(--ew-track-body, -0.03em);
  color: var(--ew-blog-muted);
}

body.ew-author-archive .site-main > nav.navigation,
body.ew-author-archive .site-main > .navigation,
body.ew-author-archive .site-main > .pagination,
body.ew-author-archive .site-main > nav[aria-label] {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 22px 8px;
  border-top: 1px solid var(--ew-blog-line);
}

@media (max-width: 1050px) {
  body.ew-author-archive .blog-layout-horizontal.with-sidebar .site-main,
  body.ew-author-archive .blog-layout-horizontal .site-main,
  body.ew-author-archive .site-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ew-author-archive .site-main > .keydesign-card:nth-child(n + 4) {
    border-top: 0;
  }

  body.ew-author-archive .site-main > .keydesign-card:not(:nth-child(3n)) {
    border-right: 0;
  }

  body.ew-author-archive .site-main > .keydesign-card:nth-child(n + 3) {
    border-top: 1px solid var(--ew-blog-line);
  }

  body.ew-author-archive .site-main > .keydesign-card:not(:nth-child(2n)) {
    border-right: 1px solid var(--ew-blog-line);
  }
}

@media (max-width: 720px) {
  body.author #page-header.ew-author-header {
    padding: 56px 0 72px;
  }

  body.author #page-header.ew-author-header .keydesign-container::before,
  body.author #page-header.ew-author-header .keydesign-container::after {
    display: none;
  }

  .ew-author-meta {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .ew-author-topics,
  .ew-author-profiles {
    width: 100%;
    justify-content: center;
  }

  .ew-author-profiles {
    justify-content: stretch;
  }

  .ew-author-profiles li {
    flex: 1 1 auto;
  }

  .ew-author-profiles a {
    width: 100%;
    justify-content: center;
  }

  body.ew-author-archive .blog-layout-horizontal.with-sidebar .site-main,
  body.ew-author-archive .blog-layout-horizontal .site-main,
  body.ew-author-archive .site-main {
    grid-template-columns: minmax(0, 1fr);
  }

  body.ew-author-archive .site-main > .keydesign-card:not(:nth-child(2n)),
  body.ew-author-archive .site-main > .keydesign-card:not(:nth-child(3n)) {
    border-right: 0;
  }

  body.ew-author-archive .site-main > .keydesign-card:nth-child(n + 2) {
    border-top: 1px solid var(--ew-blog-line);
  }

  body.ew-author-archive .site-main > .keydesign-card {
    padding: 20px 18px 24px;
  }
}

/* ----- 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: var(--ew-font-heading);
  font-size: var(--ew-text-subtitle, clamp(22px, 2vw, 26px));
  font-weight: 600;
  line-height: var(--ew-leading-subtitle, 1.2);
  letter-spacing: var(--ew-track-display, -0.03em);
  color: var(--ew-blog-black);
}

.ew-blog-latest-bar a {
  flex-shrink: 0;
  font-family: var(--ew-font-heading);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: var(--ew-track-body, -0.03em);
  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:var(--ew-font-heading);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 600;
  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);
}

.keydesign-card .post-title .ew-title-sub {
  display: block;
  margin-top: 0.12em;
  font-family: inherit;
  font-size: 0.88em;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: inherit;
  color: inherit;
}

.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:var(--ew-font-heading);
  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-family: var(--ew-font-body);
  font-size: var(--ew-text-body, 16px);
  font-weight: 500;
  line-height: var(--ew-leading-body, 1.4);
  letter-spacing: var(--ew-track-body, -0.03em);
  color: var(--ew-blog-muted);
}

.blog-layout-horizontal .keydesign-card .blog-label,
.blog-layout-horizontal .keydesign-card .blog-label a {
  font-family:var(--ew-font-heading);
  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:var(--ew-font-heading);
  font-size: 18px;
  font-weight: 600;
  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: var(--ew-blog-font);
  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:var(--ew-font-heading);
  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:var(--ew-font-heading);
  font-size: 22px;
  font-weight: 600;
  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: var(--ew-blog-font);
  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:var(--ew-font-heading);
  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:var(--ew-font-heading);
}

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: 56px;
    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: 40px;
    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,
  body.archive .keydesign-sidebar,
  body.search .keydesign-sidebar,
  body.ew-blog-single .keydesign-sidebar {
    position: static;
    margin-top: 8px;
  }

  body.ew-blog-single .keydesign-container.with-sidebar {
    grid-row-gap: 32px;
  }

  .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-font-heading: "EW Heading", system-ui, sans-serif;
  --ew-font-body: Afacad, system-ui, sans-serif;
  --ew-blog-font: var(--ew-font-body);
  --ew-blog-black: #171717;
  --ew-blog-text: #303030;
  --ew-blog-muted: #666666;
  --ew-blog-meta: #666666;
  --ew-blog-line: #e5e5e5;
  --ew-blog-light: #f7f7f7;
  --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: var(--ew-font-body);
  font-weight: 500;
  background: #fff;
  letter-spacing: var(--ew-track-body, -0.03em);
}

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

body.ew-blog-single .keydesign-container.with-sidebar.sidebar-right {
  align-items: start;
}

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

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:var(--ew-font-heading);
  font-size: 18px;
  font-weight: 600;
  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: var(--ew-blog-font);
  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: 8px;
}

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

body.ew-blog-single .ew-article-header {
  margin: 0;
  padding-top: 0;
  max-width: 880px;
  width: 100%;
}

/* Match blog listing air under the floating pill (~clear + 56px) */
body.single-post.ew-blog-single #content.site-content,
body.ew-blog-single #content.site-content {
  padding-top: calc(var(--ew-float-header-clear, 96px) + 56px) !important;
}

/* Breadcrumbs */
.ew-article-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  font-family: var(--ew-blog-font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
  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: #b0b0b0;
  font-size: 13px;
}

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

/* Title — Kaching-like display (48px cap) */
.ew-article-title {
  margin: 0;
  max-width: 880px;
  font-family: var(--ew-font-heading);
  font-size: clamp(34px, 4.2vw, 48px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: var(--ew-track-display, -0.03em);
  color: var(--ew-blog-black);
  text-wrap: balance;
}

/* After ": " / "; " / "? " — own line, slightly smaller + lighter */
.ew-article-title .ew-title-sub {
  display: block;
  margin-top: 0.08em;
  font-family: inherit;
  font-size: 0.82em;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: inherit;
  color: inherit;
}

/* Dek / lead under the title */
.ew-article-lead {
  margin: 16px 0 0;
  max-width: 42em;
  font-family: var(--ew-font-body);
  font-size: var(--ew-text-lead, 18px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: var(--ew-track-body, -0.03em);
  color: var(--ew-blog-muted, #666);
}

/* Credits: By Name, Role + social */
.ew-article-credits {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.ew-article-avatar,
.ew-article-credits img.ew-article-avatar,
.ew-article-credits img.avatar {
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.ew-article-credits-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-family: var(--ew-blog-font);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ew-blog-black);
}

.ew-article-credits-by {
  color: var(--ew-blog-muted);
  font-weight: 400;
}

.ew-article-credits-name {
  color: var(--ew-blog-black);
  font-weight: 600;
  text-decoration: none;
}

a.ew-article-credits-name:hover,
a.ew-article-credits-name:focus-visible {
  color: var(--ew-blog-black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Post-footer stack matches article measure (880px) */
body.ew-blog-single .author-box-wrapper,
body.ew-blog-single .ew-updates,
body.ew-blog-single .ew-trust-line,
body.ew-blog-single .ew-related,
body.ew-blog-single .ew-author-card {
  max-width: 880px;
  width: 100%;
}

.ew-article-credits-sep {
  color: var(--ew-blog-muted);
}

.ew-article-credits-role {
  color: var(--ew-blog-muted);
  font-weight: 400;
}

.ew-article-profile-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

/* Meta chips: category · read time · date */
.ew-article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  margin-top: 20px;
  font-family: var(--ew-blog-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ew-blog-meta);
}

.ew-article-byline > span,
.ew-article-byline > time,
.ew-article-byline > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.ew-article-byline svg {
  flex-shrink: 0;
  opacity: 0.85;
}

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

.ew-see-updates {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #6500ff;
  text-decoration: none;
}

.ew-see-updates:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Legacy meta grid (kept harmless if old markup cached) */
.ew-article-meta {
  display: none;
}

/* Article hero — Kaching-like centered column, soft wash, fading side rails */
body.ew-blog-single .keydesign-container.with-sidebar > .ew-article-top {
  position: relative;
  isolation: isolate;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 12px 0 72px;
  margin-bottom: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
}

body.ew-blog-single .keydesign-container.with-sidebar > .ew-article-top::before {
  content: "";
  position: absolute;
  z-index: -1;
  /* Pull wash up behind the floating header only — page stays white below */
  top: calc(-1 * (var(--ew-float-header-clear, 96px) + 72px));
  right: -100vmax;
  bottom: -48px;
  left: -100vmax;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 58% at 12% 92%, rgba(122, 145, 208, 0.34) 0%, transparent 58%),
    radial-gradient(ellipse 64% 52% at 88% 96%, rgba(172, 167, 230, 0.36) 0%, transparent 55%),
    radial-gradient(ellipse 90% 48% at 50% 100%, rgba(231, 216, 245, 0.5) 0%, transparent 62%),
    linear-gradient(180deg, #f7f7f7 0%, #f3f2f8 42%, #fff 100%);
}

/* Extra white air before the reading column (no grey page / white-card chrome) */
body.ew-blog-single #primary.content-area,
body.ew-blog-single .article-single {
  padding-top: 36px;
}

/* Kaching landing-rail: 1px side borders that fade out down the hero */
body.ew-blog-single .keydesign-container.with-sidebar > .ew-article-top::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(1200px, 100%);
  transform: translateX(-50%);
  pointer-events: none;
  border-left: 1px solid #e3e3e3;
  border-right: 1px solid #e3e3e3;
  -webkit-mask-image: linear-gradient(#000 28%, transparent 72%);
  mask-image: linear-gradient(#000 28%, transparent 72%);
}

body.ew-blog-single .ew-article-top > .ew-article-header,
body.ew-blog-single .ew-article-top > .entry-image {
  position: relative;
  z-index: 1;
}

body.ew-blog-single .ew-article-top > .entry-image {
  margin: 0;
  max-width: 880px;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
}

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

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 — Afacad body + EW Heading display */
body.ew-blog-single .entry-content {
  font-family: var(--ew-font-body);
  font-size: var(--ew-text-body, 16px);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: var(--ew-track-body, -0.03em);
  color: var(--ew-blog-text);
}

body.ew-blog-single .entry-content h2 {
  margin: 2.2em 0 0.7em;
  font-family: var(--ew-font-heading);
  font-size: var(--ew-text-title, clamp(28px, 3vw, 36px));
  font-weight: 600;
  line-height: var(--ew-leading-title, 1.2);
  letter-spacing: var(--ew-track-display, -0.03em);
  color: var(--ew-blog-black);
}

body.ew-blog-single .entry-content h3 {
  margin: 1.8em 0 0.55em;
  font-family: var(--ew-font-heading);
  font-size: var(--ew-text-subtitle, clamp(22px, 2vw, 26px));
  font-weight: 600;
  line-height: var(--ew-leading-subtitle, 1.2);
  letter-spacing: var(--ew-track-display, -0.03em);
  color: var(--ew-blog-black);
}

body.ew-blog-single .entry-content p,
body.ew-blog-single .entry-content li {
  margin: 0 0 1.15em;
  font-family: var(--ew-font-body) !important;
  font-size: var(--ew-text-body, 16px) !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
  letter-spacing: var(--ew-track-body, -0.03em) !important;
  color: var(--ew-blog-text) !important;
}

body.ew-blog-single .entry-content li {
  margin-bottom: 0.55em;
}

body.ew-blog-single .entry-content a,
body.ew-blog-single.single-post article.article-single > .entry-content a:not(.wp-block-button__link) {
  color: #1a7fd6;
}

/* !important: the theme's hover rule on .entry-content links is more specific */
body.ew-blog-single .entry-content a:not(.wp-block-button__link):hover,
body.ew-blog-single .entry-content a:not(.wp-block-button__link):focus-visible {
  color: #125ea8 !important;
}

body.ew-blog-single .entry-content a.wp-block-button__link {
  color: #fff;
  background-color: #000;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.ew-blog-single .entry-content a.wp-block-button__link:hover,
body.ew-blog-single .entry-content a.wp-block-button__link:focus-visible {
  color: #000;
  background-color: var(--e-global-color-secondary);
}

body.ew-blog-single .entry-content a.wp-block-button__link::before,
body.ew-blog-single .entry-content a.wp-block-button__link::after,
body.ew-blog-single .entry-content a:has(img)::before {
  content: none !important;
  display: none !important;
}

/* In-article resource banner (.ew-banner) and app CTA box (.ew-cta) */
body.ew-blog-single .entry-content .ew-banner,
body.ew-blog-single .entry-content .ew-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  margin: 8px 0 32px;
  padding: 26px 28px;
  border-radius: 16px;
}

body.ew-blog-single .entry-content .ew-banner {
  background: var(--ew-blog-lilac);
  border: 1px solid #e4ddff;
}

body.ew-blog-single .entry-content .ew-cta {
  --ew-ink: #fff;
  --ew-ink-strong: #fff;
  --ew-muted: rgba(255, 255, 255, 0.82);
  background: var(--ew-blog-brown);
  color: #fff;
}

body.ew-blog-single .entry-content .ew-banner p,
body.ew-blog-single .entry-content .ew-cta p {
  margin: 0;
}

body.ew-blog-single .entry-content .ew-banner__eyebrow {
  margin-bottom: 4px !important;
  color: var(--ew-blog-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.ew-blog-single .entry-content .ew-banner__title,
body.ew-blog-single .entry-content .ew-cta__title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}

body.ew-blog-single .entry-content .ew-banner__text,
body.ew-blog-single .entry-content .ew-cta__text {
  margin-top: 6px !important;
  font-size: 16px;
  line-height: 1.5;
}

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

body.ew-blog-single .entry-content .ew-cta__title {
  color: #fff !important;
}

body.ew-blog-single .entry-content .ew-cta__text,
body.ew-blog-single .entry-content .ew-cta p.ew-cta__text {
  color: rgba(255, 255, 255, 0.82) !important;
}

body.ew-blog-single .entry-content a.ew-banner__btn,
body.ew-blog-single .entry-content a.ew-cta__btn {
  flex-shrink: 0;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

body.ew-blog-single .entry-content a.ew-banner__btn {
  background: var(--ew-blog-black);
  color: #fff !important;
}

body.ew-blog-single .entry-content a.ew-cta__btn {
  background: #fff;
  color: var(--ew-blog-black) !important;
}

body.ew-blog-single .entry-content a.ew-banner__btn:hover,
body.ew-blog-single .entry-content a.ew-cta__btn:hover {
  background: var(--e-global-color-secondary, var(--ew-blog-accent));
  color: var(--ew-blog-black) !important;
}

body.ew-blog-single .entry-content a.ew-banner__btn::before,
body.ew-blog-single .entry-content a.ew-cta__btn::before {
  content: none !important;
  display: none !important;
}

@media (max-width: 767px) {
  body.ew-blog-single .entry-content .ew-banner,
  body.ew-blog-single .entry-content .ew-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 20px;
  }
}

/* Email sequence timeline (.ew-seq): one card per email in a flow, joined by a vertical line */
body.ew-blog-single .entry-content ol.ew-seq {
  margin: 8px 0 32px;
  padding: 0;
  list-style: none;
}

body.ew-blog-single .entry-content ol.ew-seq > li.ew-seq__step {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0 0 14px;
}

body.ew-blog-single .entry-content ol.ew-seq > li.ew-seq__step::marker {
  content: none;
}

body.ew-blog-single .entry-content ol.ew-seq > li.ew-seq__step::before {
  content: none;
}

body.ew-blog-single .entry-content ol.ew-seq > li.ew-seq__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 4px;
  left: 21px;
  width: 2px;
  border-radius: 2px;
  background: #e4ddff;
}

body.ew-blog-single .entry-content .ew-seq__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #e4ddff;
  border-radius: 50%;
  background: var(--ew-blog-lilac, #f3f0ff);
  color: var(--ew-blog-brown);
}

body.ew-blog-single .entry-content .ew-seq__card {
  padding: 16px 20px;
  border: 1px solid var(--ew-blog-line);
  border-radius: 14px;
  background: var(--ew-blog-card-bg);
}

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

body.ew-blog-single .entry-content .ew-seq__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 6px !important;
}

body.ew-blog-single .entry-content .ew-seq__label {
  color: var(--ew-blog-black);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

body.ew-blog-single .entry-content .ew-seq__when {
  padding: 3px 11px;
  border: 1px solid #e4ddff;
  border-radius: 999px;
  background: #fff;
  color: #4b2fbf;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

body.ew-blog-single .entry-content .ew-seq__note {
  color: var(--ew-blog-muted);
  font-size: 14px;
  line-height: 1.4;
}

body.ew-blog-single .entry-content .ew-seq__text {
  color: var(--ew-blog-text);
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 767px) {
  body.ew-blog-single .entry-content ol.ew-seq > li.ew-seq__step {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }

  body.ew-blog-single .entry-content ol.ew-seq > li.ew-seq__step:not(:last-child)::after {
    top: 40px;
    left: 17px;
  }

  body.ew-blog-single .entry-content .ew-seq__icon {
    width: 36px;
    height: 36px;
  }

  body.ew-blog-single .entry-content .ew-seq__card {
    padding: 14px 16px;
  }
}

/* Small (3-column) article tables don't need the wide scroll minimum */
body.ew-blog-single .entry-content .ew-table-scroll.is-compact table {
  min-width: 0;
}

/* Comparison table (listicles): logos, yes/no badges, prices, checklists, star ratings */
body.ew-blog-single .ew-compare {
  margin: 8px 0 20px;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

body.ew-blog-single .ew-compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.ew-blog-single .ew-compare table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
  color: #3b3b3b;
}

body.ew-blog-single .ew-compare th,
body.ew-blog-single .ew-compare td {
  padding: 16px 12px;
  font-size: 14px;
  line-height: 1.5;
  border: 0;
  border-bottom: 1px solid #ececec;
  border-right: 1px solid #f1f1f1;
  text-align: left;
  vertical-align: top;
  background: #fff;
}

body.ew-blog-single .ew-compare tr > :last-child {
  border-right: 0;
}

body.ew-blog-single .ew-compare thead th:nth-child(1) { width: 17%; }
body.ew-blog-single .ew-compare thead th:nth-child(2) { width: 17%; }
body.ew-blog-single .ew-compare thead th:nth-child(3) { width: 13%; }
body.ew-blog-single .ew-compare thead th:nth-child(4) { width: 13%; }
body.ew-blog-single .ew-compare thead th:nth-child(5) { width: 12%; }
body.ew-blog-single .ew-compare thead th:nth-child(6) { width: 15%; }
body.ew-blog-single .ew-compare thead th:nth-child(7) { width: 13%; }

body.ew-blog-single .ew-compare tbody tr:last-child > * {
  border-bottom: 0;
}

body.ew-blog-single .ew-compare thead th {
  padding: 14px;
  background: #f7f7f8;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: #444;
  vertical-align: middle;
}

body.ew-blog-single .ew-compare thead th > svg {
  float: left;
  margin: 1px 7px 0 0;
  color: #555;
}

body.ew-blog-single .ew-compare thead th > span {
  display: block;
  overflow: hidden;
}

body.ew-blog-single .ew-compare tbody tr.is-featured > * {
  background: #f5f3ff;
}

body.ew-blog-single .ew-compare tbody th {
  vertical-align: middle;
  font-weight: 600;
}

body.ew-blog-single .ew-compare a.ew-c-app,
body.ew-blog-single.single-post article.article-single > .entry-content .ew-compare a.ew-c-app {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #111;
  font-family: var(--ew-font-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

body.ew-blog-single .entry-content .ew-compare a.ew-c-app:hover {
  color: #1a7fd6 !important;
}

body.ew-blog-single .entry-content .ew-compare a.ew-c-app::before {
  content: none !important;
  display: none !important;
}

body.ew-blog-single .ew-compare a.ew-c-app img {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: 0;
  border-radius: 8px;
}

body.ew-blog-single .ew-compare .ew-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

body.ew-blog-single .ew-compare .ew-badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.ew-blog-single .ew-compare .ew-badge.is-yes {
  background: #e8f6ec;
  color: #1f7a3d;
}

body.ew-blog-single .ew-compare .ew-badge.is-no {
  background: #fdecec;
  color: #c0392b;
}

body.ew-blog-single .ew-compare .ew-sub {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #6b6b6b;
}

body.ew-blog-single .ew-compare .ew-sub strong {
  color: #222;
}

body.ew-blog-single .ew-compare .ew-price {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

body.ew-blog-single .ew-compare .ew-limit {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

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

body.ew-blog-single .ew-compare .ew-checks li {
  position: relative;
  margin: 0 0 4px;
  padding-left: 24px;
  font-size: 13.5px;
  line-height: 1.45;
}

body.ew-blog-single .ew-compare .ew-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: #e8f6ec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%231f7a3d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}

body.ew-blog-single .ew-compare .ew-rating {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

body.ew-blog-single .ew-compare .ew-stars {
  display: inline-block;
  margin-top: 2px;
  font-size: 15px;
  letter-spacing: 1px;
  line-height: 1;
  background: linear-gradient(90deg, #f5a524 calc(var(--r, 0) / 5 * 100%), #d9d9d9 0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 1100px) {
  body.ew-blog-single .ew-compare table {
    min-width: 800px;
  }
}

@media (max-width: 767px) {
  body.ew-blog-single .ew-compare tbody th,
  body.ew-blog-single .ew-compare thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 112px;
    box-shadow: 1px 0 0 #ececec;
  }

  body.ew-blog-single .ew-compare a.ew-c-app,
  body.ew-blog-single.single-post article.article-single > .entry-content .ew-compare a.ew-c-app {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 14px;
  }

  body.ew-blog-single .ew-compare a.ew-c-app img {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
}

/* FAQ section — same look as the homepage FAQ (.ewh-faq in home.css) */
body.ew-blog-single .ew-faq-section {
  background: #f7f7f7;
  border-radius: 16px;
  padding: 40px 36px 44px;
  margin: 48px 0;
}

body.ew-blog-single .ew-faq-section > h2 {
  margin-top: 0;
}

body.ew-blog-single .ew-faq {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

body.ew-blog-single .ew-faq-item {
  background: transparent;
}

body.ew-blog-single .ew-faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  list-style: none;
  font-family: var(--ew-blog-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #22281e;
}

body.ew-blog-single .ew-faq-item summary::-webkit-details-marker {
  display: none;
}

body.ew-blog-single .ew-faq-item summary svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
}

body.ew-blog-single .ew-faq-item[open] summary svg {
  transform: rotate(180deg);
}

body.ew-blog-single .ew-faq-answer {
  padding: 18px 22px 8px;
  font-size: 16px;
}

body.ew-blog-single .ew-faq-answer > :last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  body.ew-blog-single .ew-faq-section {
    padding: 28px 18px 32px;
    margin: 36px 0;
  }
}

/* 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:var(--ew-font-heading);
  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:var(--ew-font-heading);
  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:var(--ew-font-heading);
  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;
  }
}

/* Author card — phone only; desktop keeps the theme author box */
.ew-author-card {
  display: none;
}

body.ew-blog-single .author-box-wrapper .author-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 10px;
}

body.ew-blog-single .author-box-wrapper .author-name h5 {
  margin: 0;
}

.ew-about-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border: 1px solid var(--ew-blog-black);
  border-radius: 999px;
  font-family: var(--ew-font-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ew-blog-black);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.ew-about-btn:hover {
  background: var(--ew-blog-black);
  color: #fff;
}

.ew-author-card .ew-about-btn {
  margin-top: 18px;
}

@media (max-width: 767px) {
  body.ew-blog-single .author-box-wrapper {
    display: none;
  }

  body.ew-blog-single .ew-author-card {
    display: block;
    margin: 40px 0 8px;
    padding: 24px 20px 26px;
    border: 1px solid #e7e7e7;
    border-radius: 18px;
    background: #fff;
  }

  .ew-author-card__head {
    display: flex;
    align-items: center;
    gap: 18px;
  }

  .ew-author-card__avatar,
  .ew-author-card img.avatar {
    width: 92px !important;
    height: 92px !important;
    flex-shrink: 0;
    border-radius: 16px;
    object-fit: cover;
  }

  .ew-author-card__id {
    min-width: 0;
  }

  .ew-author-card__name {
    display: block;
    font-family:var(--ew-font-heading);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ew-blog-black);
    text-decoration: none;
  }

  .ew-author-card__role {
    margin-top: 4px;
    font-family: var(--ew-blog-font);
    font-size: 16px;
    line-height: 1.3;
    color: #5f6b7a;
  }

  .ew-author-card__social {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 10px;
  }

  .ew-author-card__social:empty {
    display: none;
  }

  .ew-author-card__social a {
    display: inline-flex;
    color: #3f4650;
    line-height: 0;
  }

  .ew-author-card__bio {
    margin: 20px 0 0;
    font-family: var(--ew-blog-font);
    font-size: 17px;
    line-height: 1.6;
    color: #4a4f57;
  }
}
