.blog-archive-hero,
.blog-post-hero,
.blog-sidebar-box,
.blog-card,
.blog-product-ad,
.coffee-finder-cta,
.blog-empty,
.blog-seo-text {
  border: 1px solid rgba(229, 231, 235, 0.82);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
}

@supports selector(html:has(body.page-blog-post)) {
  html:has(body.page-blog-post) {
    scroll-behavior: smooth;
  }
}

.blog-archive-hero {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
}

.blog-archive-hero h1,
.blog-post-hero h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 28px;
  line-height: 1.45;
}

.blog-archive-hero p,
.blog-post-hero p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 2;
}

.blog-layout {
  display: grid;
  gap: 20px;
  align-items: start;
}

.blog-archive {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-toolbar > span {
  color: var(--text-secondary);
  font-weight: 800;
}

.blog-sort {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border-soft);
}

.blog-sort a {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.blog-sort a.is-active {
  background: var(--action-primary);
  color: #fff;
}

.blog-layout.is-loading .blog-archive {
  opacity: 0.68;
  pointer-events: none;
}

.blog-sort-feedback {
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.08);
  color: var(--error);
  font-size: 13px;
  font-weight: 800;
}

.blog-grid {
  display: grid;
  gap: 16px;
}

.blog-card {
  display: grid;
  overflow: hidden;
  border-radius: 24px;
}

.blog-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-soft);
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.035);
}

.blog-card__body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.blog-card__meta,
.blog-post-hero__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.blog-card__meta > a,
.blog-card__meta > span,
.blog-post-hero__meta > span,
.blog-post-hero__author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding-inline: 9px;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.1);
  color: var(--gold-deep);
}

.blog-post-hero__author a {
  color: inherit;
  font-weight: 900;
}

.blog-card h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.65;
}

.blog-card h2 a {
  color: inherit;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 16px;
  background: var(--action-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.blog-card__link:hover,
.blog-card__link:focus-visible {
  background: var(--action-primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.blog-card__link i {
  font-size: 18px;
  line-height: 1;
}

.blog-sidebar {
  display: grid;
  gap: 14px;
}

.blog-sidebar-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
}

.blog-sidebar-box h2 {
  margin: 0;
  font-size: 16px;
}

.coffee-finder-cta {
  display: grid;
  gap: 14px;
  align-items: center;
  margin-block: 18px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(201, 162, 39, 0.14), rgba(255, 255, 255, 0.92)),
    rgba(255, 255, 255, 0.94);
}

.coffee-finder-cta__icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 17px;
  background: var(--action-primary);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.14);
}

.coffee-finder-cta__copy {
  display: grid;
  gap: 5px;
}

.coffee-finder-cta__copy strong {
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.7;
}

.coffee-finder-cta__copy span {
  color: var(--text-secondary);
  line-height: 2;
}

.coffee-finder-cta .button {
  width: 100%;
}

.blog-sidebar-list,
.blog-sidebar-products,
.blog-sidebar-chiplist {
  display: grid;
  gap: 8px;
}

.blog-sidebar-list a,
.blog-sidebar-products a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--bg-soft);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
}

.blog-sidebar-list small,
.blog-sidebar-empty {
  color: var(--text-muted);
  font-size: 12px;
}

.blog-sidebar-chiplist {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blog-sidebar-chiplist a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding-inline: 10px;
  border-radius: 14px;
  background: var(--bg-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.blog-sidebar-products a {
  justify-content: flex-start;
}

.blog-sidebar-products img {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--bg-soft);
}

.blog-sidebar-products strong,
.blog-sidebar-products small {
  display: block;
}

.blog-sidebar-products small {
  color: var(--gold-deep);
}

.blog-post-hero {
  display: grid;
  gap: 18px;
  overflow: hidden;
  border-radius: 24px;
  max-width: 1180px;
  margin-inline: auto;
}

.blog-post-hero__copy {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.blog-google-source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 8px;
  max-width: 100%;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(66, 133, 244, 0.2);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.88));
  color: #334155;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.75;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.blog-google-source-link:hover,
.blog-google-source-link:focus-visible {
  border-color: rgba(66, 133, 244, 0.42);
  background: #fff;
  color: #1e3a5f;
  box-shadow: 0 10px 24px rgba(66, 133, 244, 0.14);
  transform: translateY(-1px);
}

.blog-google-source-link:focus-visible {
  outline: 2px solid rgba(66, 133, 244, 0.72);
  outline-offset: 2px;
}

.blog-google-source-link__logo {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.1);
}

.blog-google-source-link__logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.blog-google-source-link__label {
  min-width: 0;
}

.blog-post-hero__media {
  width: 100%;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: #fff;
}

.blog-post-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-share-button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding-inline: 10px;
  border: 1px solid rgba(201, 162, 39, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--gold-deep);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.blog-share-button:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 162, 39, 0.34);
  background: rgba(201, 162, 39, 0.08);
  color: var(--action-primary);
}

.blog-share-button:disabled {
  cursor: progress;
  opacity: 0.72;
  transform: none;
}

.blog-post-body {
  display: grid;
  gap: 22px;
  min-width: 0;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.82);
  box-shadow: var(--shadow-md);
}

body.page-blog-post .afra-rich-content h2,
body.page-blog-post .afra-rich-content h3,
body.page-blog-post .afra-rich-content h4 {
  scroll-margin-top: var(--site-header-offset, 112px);
}

body.page-blog-post .article-toc {
  display: grid;
  gap: 12px;
  margin-block: 18px 24px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 251, 235, 0.84), rgba(255, 255, 255, 0.94)),
    #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

body.page-blog-post .article-toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.page-blog-post .article-toc__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 900;
}

body.page-blog-post .article-toc__title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--action-primary);
  box-shadow: 0 0 0 5px rgba(201, 162, 39, 0.14);
}

body.page-blog-post .article-toc__toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  padding-inline: 11px;
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--gold-deep);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

body.page-blog-post .article-toc__toggle:hover,
body.page-blog-post .article-toc__toggle:focus-visible {
  border-color: rgba(201, 162, 39, 0.42);
  background: rgba(201, 162, 39, 0.1);
  color: var(--action-primary);
  transform: translateY(-1px);
}

body.page-blog-post .article-toc__toggle i {
  font-size: 14px;
  transition: transform 180ms ease;
}

body.page-blog-post .article-toc__list,
body.page-blog-post .article-toc__list ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.page-blog-post .article-toc__list {
  max-height: 1600px;
  opacity: 1;
  transition: max-height 220ms ease, opacity 180ms ease;
}

body.page-blog-post .article-toc__list ol {
  margin-block-start: 6px;
  padding-inline-start: 13px;
  border-inline-start: 1px solid rgba(201, 162, 39, 0.2);
}

body.page-blog-post .article-toc__item {
  margin: 0;
}

body.page-blog-post .article-toc__item a {
  display: block;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.8;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

body.page-blog-post .article-toc__item--h2 > a {
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 900;
}

body.page-blog-post .article-toc__item--h4 > a {
  color: var(--text-muted);
  font-size: 12px;
}

body.page-blog-post .article-toc__item a:hover,
body.page-blog-post .article-toc__item a:focus-visible {
  background: rgba(201, 162, 39, 0.09);
  color: var(--gold-deep);
  transform: translateX(-2px);
}

body.page-blog-post .article-toc__item a.is-active {
  border-color: rgba(201, 162, 39, 0.26);
  background: rgba(201, 162, 39, 0.14);
  color: var(--action-primary);
  box-shadow: inset 3px 0 0 rgba(201, 162, 39, 0.54);
}

body.page-blog-post .article-toc.is-collapsed .article-toc__list {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

body.page-blog-post .article-toc.is-collapsed .article-toc__toggle i {
  transform: rotate(180deg);
}

body.page-blog-post .afra-rich-content h2.is-target-highlighted,
body.page-blog-post .afra-rich-content h3.is-target-highlighted,
body.page-blog-post .afra-rich-content h4.is-target-highlighted {
  animation: articleTocHeadingPulse 1300ms ease;
}

@keyframes articleTocHeadingPulse {
  0%,
  100% {
    background: transparent;
    box-shadow: none;
  }

  30% {
    background: rgba(201, 162, 39, 0.12);
    box-shadow: 0 0 0 8px rgba(201, 162, 39, 0.08);
  }
}

.blog-product-ad {
  display: grid;
  gap: 14px;
  margin-block: 22px;
  padding: 16px;
  border-radius: 24px;
  font-family: inherit;
}

.blog-product-ad * {
  font-family: inherit;
}

.blog-product-ad__head {
  display: grid;
  gap: 4px;
}

.blog-product-ad__head h2 {
  margin: 0;
  font-size: 18px;
}

.blog-product-ad__grid {
  display: grid;
  gap: 10px;
}

.blog-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: var(--bg-soft);
}

.blog-product-card__media {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}

.blog-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-product-card__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.blog-product-card__copy strong {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.7;
}

.blog-product-card__copy small {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 900;
}

.blog-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-tags a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding-inline: 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-weight: 900;
}

.blog-pagination a.is-active {
  background: var(--action-primary);
  color: #fff;
}

.blog-empty {
  display: grid;
  gap: 6px;
  padding: 24px;
  border-radius: 24px;
  text-align: center;
}

.blog-empty span {
  color: var(--text-secondary);
}

.blog-seo-text {
  padding: 20px;
  border-radius: 24px;
}

.blog-home-showcase {
  overflow: hidden;
}

.blog-home-rail {
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .blog-grid,
  .blog-home-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .blog-product-ad__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coffee-finder-cta {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .coffee-finder-cta .button {
    width: auto;
    white-space: nowrap;
  }
}

@media (min-width: 1080px) {
  .blog-archive-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    padding: 28px;
  }

  .blog-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .blog-layout--post {
    grid-template-columns: minmax(0, 820px) 320px;
    justify-content: center;
  }

  .blog-post-hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
    align-items: center;
    min-height: 0;
  }

  .blog-post-hero__copy {
    align-content: center;
    padding: 34px;
  }

  .blog-post-hero__media {
    justify-self: center;
    max-width: 500px;
    max-height: 360px;
    margin: 20px;
    border-radius: 22px;
  }

  .blog-post-hero h1 {
    font-size: 34px;
  }

  .blog-post-body {
    padding: 28px;
  }

  .blog-sidebar {
    position: sticky;
    top: 112px;
  }
}

@media (max-width: 759px) {
  .blog-archive-hero,
  .blog-post-hero,
  .blog-card,
  .blog-sidebar-box,
  .blog-post-body,
  .blog-product-ad {
    border-radius: 22px;
  }

  .blog-grid,
  .blog-home-rail {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }

  .blog-grid > .blog-card,
  .blog-home-rail > .blog-card {
    min-width: min(86vw, 340px);
    scroll-snap-align: start;
  }

  .blog-layout .blog-grid {
    display: grid;
    overflow: visible;
  }

  .blog-layout .blog-grid > .blog-card {
    min-width: 0;
  }

  .blog-post-hero h1 {
    font-size: 26px;
  }

  .blog-post-hero {
    gap: 0;
  }

  .blog-post-hero__media {
    order: -1;
  }

  .blog-post-hero__copy h1 {
    order: -2;
  }

  .blog-post-hero__copy {
    gap: 11px;
  }

  .blog-post-hero .blog-card__meta,
  .blog-post-hero__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  .blog-post-hero .blog-card__meta > a,
  .blog-post-hero .blog-card__meta > span,
  .blog-post-hero__meta > span,
  .blog-post-hero__meta > .blog-share-button {
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding-inline: 7px;
    overflow: hidden;
    font-size: 10.5px;
    line-height: 1.55;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .blog-post-hero__author > span {
    display: none;
  }

  .blog-post-hero__author a {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .blog-google-source-link {
    order: -1;
    gap: 6px;
    padding-inline: 10px;
    font-size: clamp(10px, 3.15vw, 12px);
  }

  .blog-google-source-link__logo {
    width: 22px;
    height: 22px;
  }

  body.page-blog-post .article-toc {
    margin-block: 14px 20px;
    padding: 13px;
    border-radius: 20px;
  }

  body.page-blog-post .article-toc__header {
    align-items: flex-start;
  }

  body.page-blog-post .article-toc__toggle {
    min-height: 32px;
    padding-inline: 10px;
    font-size: 11px;
  }

  body.page-blog-post .article-toc__item a {
    padding: 7px 9px;
    border-radius: 12px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  @supports selector(html:has(body.page-blog-post)) {
    html:has(body.page-blog-post) {
      scroll-behavior: auto;
    }
  }

  body.page-blog-post .article-toc__list,
  body.page-blog-post .article-toc__toggle,
  body.page-blog-post .article-toc__toggle i,
  body.page-blog-post .article-toc__item a {
    transition: none;
  }

  body.page-blog-post .afra-rich-content h2.is-target-highlighted,
  body.page-blog-post .afra-rich-content h3.is-target-highlighted,
  body.page-blog-post .afra-rich-content h4.is-target-highlighted {
    animation: none;
  }
}

@media (max-width: 1023.98px), (display-mode: standalone) {
  body.page-home .blog-home-showcase {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(229, 231, 235, 0.86);
    box-shadow: var(--shadow-md);
    overflow: hidden;
  }

  body.page-home .blog-home-showcase .section-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  body.page-home .blog-home-showcase .section-head > div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  body.page-home .blog-home-showcase .eyebrow {
    min-height: 20px;
    font-size: 10px;
  }

  body.page-home .blog-home-showcase .section-head h2 {
    max-width: 22ch;
    font-size: 16px;
    line-height: 1.55;
  }

  body.page-home .blog-home-showcase .section-head .button {
    flex: 0 0 auto;
    min-height: 34px;
    padding-inline: 11px;
    border-radius: 999px;
    font-size: 11px;
  }

  body.page-home .blog-home-rail {
    display: grid;
    gap: 10px;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  body.page-home .blog-home-rail > .blog-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: var(--bg-soft);
    border: 1px solid rgba(229, 231, 235, 0.78);
    box-shadow: none;
    scroll-snap-align: unset;
  }

  body.page-home .blog-home-rail > .blog-card:nth-child(n+5) {
    display: none;
  }

  body.page-home .blog-home-rail .blog-card__media {
    height: 100%;
    min-height: 94px;
    aspect-ratio: auto;
    border-radius: 0;
  }

  body.page-home .blog-home-rail .blog-card__body {
    align-content: center;
    gap: 6px;
    min-width: 0;
    padding: 10px 11px;
  }

  body.page-home .blog-home-rail .blog-card__meta {
    gap: 5px;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
  }

  body.page-home .blog-home-rail .blog-card__meta a,
  body.page-home .blog-home-rail .blog-card__meta span {
    min-height: 22px;
    max-width: 100%;
    padding-inline: 7px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  body.page-home .blog-home-rail .blog-card h2 {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.75;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  body.page-home .blog-home-rail .blog-card__link {
    justify-content: flex-start;
    width: fit-content;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--action-primary);
    box-shadow: none;
    font-size: 11px;
  }

  body.page-home .blog-home-rail .blog-card__link i {
    font-size: 16px;
  }
}

/* ==========================================================================
   خلاصه صوتی مقاله (audio summary)
   - هیچ کنترل بومی مرورگری رندر نمی‌شود؛ کل ظاهر از همین فایل می‌آید تا سافاری/فایرفاکس/کروم
     دقیقاً یک چیز نشان بدهند.
   - موج صوتی دو لایه است: لایهٔ پایه (خاکستری) و لایهٔ پخش‌شده (تیره) که با clip-path بریده می‌شود؛
     یعنی به‌روزرسانی پیشرفت فقط یک نوشتن روی CSS variable است، نه دست‌کاری DOM.
   ========================================================================== */

.afra-rich-content .audio-summary {
  margin-block: 22px 26px;
}

.audio-summary {
  position: relative;
  display: block;
  max-width: 100%;
  padding: 20px 16px 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  contain: layout style;
  --audio-progress: 0;
}

.audio-summary__legend {
  position: absolute;
  top: 0;
  inset-inline-start: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 40px);
  padding-inline: 8px;
  overflow: hidden;
  background: #fff;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
  transform: translateY(-50%);
}

.audio-summary__legend::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--gold-primary);
}

.audio-summary__panel {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* دکمه پخش/توقف */
.audio-summary__play {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--action-primary);
  color: #fff;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.audio-summary__play:hover {
  background: var(--action-primary-hover);
  transform: scale(1.04);
}

.audio-summary__play:active {
  transform: scale(0.97);
}

.audio-summary__play:focus-visible,
.audio-summary__wave:focus-visible,
.audio-summary__rate:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}

.audio-summary__glyph {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
  pointer-events: none;
}

.audio-summary__glyph-pause {
  display: none;
}

.audio-summary.is-playing .audio-summary__glyph-play {
  display: none;
}

.audio-summary.is-playing .audio-summary__glyph-pause {
  display: block;
}

/* حلقهٔ بارگذاری: همان قاب دکمه، بدون تغییر چیدمان */
.audio-summary__ring {
  position: absolute;
  inset: -3px;
  border: 2px solid transparent;
  border-top-color: var(--gold-primary);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
}

.audio-summary.is-loading .audio-summary__ring {
  opacity: 1;
  animation: audio-summary-spin 760ms linear infinite;
}

@keyframes audio-summary-spin {
  to { transform: rotate(360deg); }
}

/* موج صوتی */
.audio-summary__wave {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.audio-summary__bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: clamp(1.5px, 0.34vw, 3.5px);
  overflow: hidden;
  pointer-events: none;
}

.audio-summary__bars > i {
  flex: 1 1 0;
  min-width: 1px;
  height: 30%;
  border-radius: 2px;
  background: rgba(15, 23, 42, 0.32);
}

.audio-summary__bars--played > i {
  background: var(--action-primary);
}

.audio-summary__bars--played {
  clip-path: inset(0 0 0 calc(100% - (var(--audio-progress) * 100%)));
  -webkit-clip-path: inset(0 0 0 calc(100% - (var(--audio-progress) * 100%)));
  transition: -webkit-clip-path 90ms linear, clip-path 90ms linear;
}

[dir="ltr"] .audio-summary__bars--played {
  clip-path: inset(0 calc(100% - (var(--audio-progress) * 100%)) 0 0);
  -webkit-clip-path: inset(0 calc(100% - (var(--audio-progress) * 100%)) 0 0);
}

.audio-summary__bars > i[data-b="0"]  { height: 22%; }
.audio-summary__bars > i[data-b="1"]  { height: 28%; }
.audio-summary__bars > i[data-b="2"]  { height: 34%; }
.audio-summary__bars > i[data-b="3"]  { height: 40%; }
.audio-summary__bars > i[data-b="4"]  { height: 46%; }
.audio-summary__bars > i[data-b="5"]  { height: 52%; }
.audio-summary__bars > i[data-b="6"]  { height: 58%; }
.audio-summary__bars > i[data-b="7"]  { height: 64%; }
.audio-summary__bars > i[data-b="8"]  { height: 70%; }
.audio-summary__bars > i[data-b="9"]  { height: 76%; }
.audio-summary__bars > i[data-b="10"] { height: 82%; }
.audio-summary__bars > i[data-b="11"] { height: 88%; }
.audio-summary__bars > i[data-b="12"] { height: 94%; }
.audio-summary__bars > i[data-b="13"] { height: 100%; }

/*
 * زیر ~۵۲۰px عرض موج آن‌قدر کم می‌شود که ۷۲ میله زیر ۲px برسند و موج به یک لکهٔ خاکستری تبدیل شود.
 * پس آن‌جا تراکم نصف می‌شود، نه ضخامت. چون بریدن پیشرفت با clip-path هندسی است (درصدی از خود
 * ظرف، نه شمارش میله)، پنهان‌کردن میله‌ها نگاشت زمان را جابه‌جا نمی‌کند.
 */
@media (max-width: 519px) {
  .audio-summary__bars {
    gap: 1.4px;
  }

  .audio-summary__bars > i:nth-child(even) {
    display: none;
  }
}

.audio-summary.is-loading .audio-summary__wave {
  animation: audio-summary-pulse 1.2s ease-in-out infinite;
}

@keyframes audio-summary-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* مدت زمان */
.audio-summary__time {
  flex: 0 0 auto;
  min-width: 42px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  unicode-bidi: plaintext;
}

/* سرعت پخش */
.audio-summary__rate {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.03);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
  /* بدون ایزوله، علامت × کنار عدد فارسی در متن RTL جابه‌جا رندر می‌شود. */
  direction: ltr;
  unicode-bidi: isolate;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.audio-summary__rate:hover {
  border-color: rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-deep);
}

.audio-summary__rate.is-boosted {
  border-color: rgba(201, 162, 39, 0.5);
  background: rgba(201, 162, 39, 0.16);
  color: var(--gold-deep);
}

/* عنصر صوتی هرگز دیده نمی‌شود؛ این بلاک استایل بومی هر مرورگری را هم خنثی می‌کند. */
.afra-rich-content .audio-summary__media,
.audio-summary__media {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  visibility: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.audio-summary__media::-webkit-media-controls,
.audio-summary__media::-webkit-media-controls-enclosure,
.audio-summary__media::-webkit-media-controls-panel,
.audio-summary__media::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.audio-summary__fallback {
  display: inline-block;
  margin-block-start: 8px;
  color: var(--gold-deep);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 479px) {
  .audio-summary {
    padding: 18px 12px 14px;
  }

  .audio-summary__panel {
    gap: 9px;
  }

  .audio-summary__play {
    width: 42px;
    height: 42px;
  }

  .audio-summary__wave {
    height: 34px;
  }

  .audio-summary__rate {
    min-width: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .audio-summary__play,
  .audio-summary__bars--played,
  .audio-summary__rate {
    transition: none;
  }

  .audio-summary.is-loading .audio-summary__ring,
  .audio-summary.is-loading .audio-summary__wave {
    animation: none;
  }

  .audio-summary.is-loading .audio-summary__ring {
    opacity: 0.6;
  }
}

@media (forced-colors: active) {
  .audio-summary {
    border-color: CanvasText;
  }

  .audio-summary__bars > i {
    background: GrayText;
  }

  .audio-summary__bars--played > i {
    background: Highlight;
  }
}
