.article-promo-wrap {
  margin-block: 2.25rem;
}

.article-promo {
  --promo-accent: #4cae50;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(21, 35, 29, 0.22);
  border-left: 0.4rem solid var(--promo-accent);
  border-radius: 0.55rem;
  background: #f4f6ef;
}

.article-promo--course {
  --promo-accent: #5370ff;
}

.article-promo--tool {
  --promo-accent: #e1493f;
}

.article-promo__layout {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 3rem 1rem 1rem;
}

.article-promo__icon {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  flex: none;
  place-items: center;
  border-radius: 0.4rem;
  background: #15231d;
  color: #fffef9;
}

.article-promo__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.article-promo__content {
  min-width: 0;
  flex: 1;
}

.article-promo__badge {
  color: var(--promo-accent);
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-promo h4 {
  overflow: hidden;
  margin-top: 0.25rem;
  color: #15231d;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-promo__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  margin-top: 0.35rem;
  color: #667068;
  font-size: 0.75rem;
}

.article-promo__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.article-promo__meta svg {
  width: 0.8rem;
  height: 0.8rem;
}

.article-promo__meta strong {
  color: #15231d;
}

.article-promo__meta del {
  margin-right: 0.35rem;
  color: #818a83;
}

.article-promo__action {
  flex: none;
  border-color: #15231d;
  border-radius: 0.4rem;
  background: #15231d;
  color: #fffef9;
  font-weight: 800;
}

.article-promo__action:hover {
  background: var(--promo-accent);
  color: #fff;
}

.article-promo__close {
  position: absolute;
  z-index: 2;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.3rem;
  color: #768078;
}

.article-promo__close:hover {
  color: #15231d;
}

.article-promo__close svg {
  width: 0.9rem;
  height: 0.9rem;
}

@media (max-width: 767px) {
  .article-promo__layout {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .article-promo__action {
    width: 100%;
  }
}

/* Article product cards keep their own typography outside the article prose. */
.article-promo--featured {
  border-left-width: 1px;
  border-top: 4px solid var(--promo-accent);
  border-radius: 0.8rem;
  background: #fffef9;
}

.article-promo--featured .article-promo__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
}

.article-promo__media {
  display: grid;
  min-width: 0;
  aspect-ratio: 16 / 9;
  align-items: center;
  overflow: hidden;
  background: #15231d;
}

.article-promo__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.article-promo--featured .article-promo__content {
  padding: 1.75rem 2rem;
}

.article-promo--featured .article-promo__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #526257;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}

.article-promo__badge svg {
  width: 1rem;
  height: 1rem;
}

.article-promo--featured h4 {
  margin: 0.65rem 0 0;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.article-promo--featured h4 a {
  color: inherit;
  text-decoration: none;
  word-break: normal;
}

.article-promo--featured h4 a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.article-promo__content .article-promo__description {
  margin: 0.85rem 0 0;
  color: #526257;
  font-size: 0.95rem;
  line-height: 1.6;
}

.article-promo--featured .article-promo__meta {
  gap: 0.65rem 1rem;
  align-items: center;
  margin: 0;
  font-size: 0.85rem;
}

.article-promo--featured .article-promo__meta:empty {
  display: none;
}

.article-promo--featured .article-promo__meta strong {
  font-size: 1.25rem;
  font-weight: 800;
}

.article-promo--featured .article-promo__meta del {
  font-size: 0.85rem;
  font-weight: 400;
}

.article-promo__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}

.article-promo--featured .article-promo__action {
  display: inline-flex;
  width: auto;
  height: auto;
  min-height: 2.9rem;
  margin: 0;
  padding: 0.8rem 1rem;
  gap: 0.65rem;
  color: #fffef9;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  word-break: normal;
}

.article-promo--featured .article-promo__action:hover {
  background: #2e493a;
  color: #fffef9;
  text-decoration: none;
}

.article-promo--featured .article-promo__close {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  top: 0.65rem;
  right: 0.65rem;
  place-items: center;
  border-radius: 50%;
  background: #fffef9;
  color: #526257;
  cursor: pointer;
}

.article-promo--featured .article-promo__close:hover {
  background: #e9eee5;
  color: #15231d;
}

.article-promo--featured :is(a, button):focus-visible {
  outline: 3px solid var(--promo-accent);
  outline-offset: -3px;
}

@media (max-width: 639px) {
  .article-promo--featured .article-promo__content {
    padding: 1.25rem;
  }

  .article-promo--featured .article-promo__action {
    width: 100%;
  }
}
