/* EZP article system
 * Scope every rule to article pages so legacy commerce/member layouts are untouched.
 */
.article-system {
  --article-ink: #17374d;
  --article-muted: #526b7c;
  --article-line: #d7e3eb;
  --article-soft: #eef6fb;
  --article-accent: #b03b57;
}
.article-system .article-reading-shell {
  width: min(100% - 32px, 920px);
  margin-inline: auto;
}

.article-system .article-reading-card {
  overflow: hidden;
  border: 1px solid var(--article-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 55, 77, .08);
}

.article-system .article-reading-head {
  padding: clamp(24px, 4vw, 44px) clamp(20px, 5vw, 52px) 20px;
  background: linear-gradient(180deg, var(--article-soft), #fff);
}

.article-system .article-reading-head h1 {
  max-width: 820px;
  margin: 8px 0 12px;
  color: var(--article-ink);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 850;
  line-height: 1.22;
  letter-spacing: -.025em;
}

.article-system .article-reading-body {
  padding: 8px clamp(20px, 5vw, 52px) clamp(30px, 5vw, 52px);
}

.article-system .article-publish-meta,
.article-system .eg-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--article-muted);
  font-size: 14px;
  line-height: 1.6;
}

.article-system .article-publish-meta span,
.article-system .eg-article-meta > span {
  display: inline-flex;
  align-items: center;
}

.article-system .rating-input .form-check-input {
  width: 24px;
  height: 24px;
  margin-top: 0;
}

.article-system .article-content,
.article-system .eg-prose {
  color: #263f50;
  font-size: 17px;
  line-height: 1.82;
  overflow-wrap: anywhere;
}

.article-system .article-content > :first-child,
.article-system .eg-prose > :first-child { margin-top: 0; }
.article-system .article-content > :last-child,
.article-system .eg-prose > :last-child { margin-bottom: 0; }

.article-system .article-content h2,
.article-system .article-content h3,
.article-system .article-content h4,
.article-system .eg-prose h2,
.article-system .eg-prose h3,
.article-system .eg-prose h4 {
  scroll-margin-top: 96px;
  color: var(--article-ink);
  line-height: 1.38;
}

.article-system .article-content h2,
.article-system .eg-prose h2 {
  margin: 2.3em 0 .75em;
  font-size: clamp(24px, 3vw, 30px);
}

.article-system .article-content h3,
.article-system .eg-prose h3 {
  margin: 1.8em 0 .65em;
  font-size: clamp(20px, 2.4vw, 24px);
}

.article-system .article-content p,
.article-system .article-content li,
.article-system .eg-prose p,
.article-system .eg-prose li { margin-bottom: .8em; }

.article-system .article-content a,
.article-system .eg-prose a {
  color: #276b99;
  font-weight: 700;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.article-system .article-content img,
.article-system .eg-prose img,
.article-system .article-hero-clean-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
  border-radius: 14px;
}

.article-system .article-image-fallback {
  display: grid;
  min-height: 180px;
  place-items: center;
  gap: 8px;
  margin: 24px 0;
  padding: 28px;
  border: 1px dashed #9ab5c6;
  border-radius: 14px;
  background: var(--article-soft);
  color: var(--article-muted);
  text-align: center;
}

.article-system .article-image-fallback i {
  color: #39729d;
  font-size: 32px;
}

.article-system .article-image-fallback small {
  display: block;
  max-width: 520px;
  font-size: 14px;
}

.article-system .article-toc {
  margin: 24px 0 32px;
  padding: 18px 20px;
  border: 1px solid var(--article-line);
  border-left: 4px solid #39729d;
  border-radius: 0 14px 14px 0;
  background: #f8fbfd;
}

.article-system .article-toc[hidden] { display: none !important; }
.article-system .article-toc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--article-ink);
  font-size: 17px;
  font-weight: 850;
}
.article-system .article-toc ol { margin: 0; padding-left: 1.35rem; }
.article-system .article-toc li + li { margin-top: 7px; }
.article-system .article-toc li.is-sub { margin-left: 18px; }
.article-system .article-toc a { color: #335d78; text-decoration: none; }
.article-system .article-toc a:hover,
.article-system .article-toc a:focus-visible { color: #b03b57; text-decoration: underline; }

.article-system .article-related-products { padding: 44px 0; }
.article-system .article-related-products__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.article-system .article-related-products__head h2 {
  margin: 0;
  color: var(--article-ink);
  font-size: clamp(24px, 3vw, 30px);
}
.article-system .article-related-products__head p { margin: 5px 0 0; color: var(--article-muted); }
.article-system .article-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.article-system .article-product-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--article-line);
  border-radius: 16px;
  background: #fff;
  color: var(--article-ink);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.article-system .article-product-card:hover,
.article-system .article-product-card:focus-visible {
  border-color: #89cee9;
  color: var(--article-ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23, 55, 77, .12);
}
.article-system .article-product-card__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f8fa;
}
.article-system .article-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.article-system .article-product-card__body { display: flex; flex: 1; flex-direction: column; padding: 14px; }
.article-system .article-product-card__title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.article-system .article-product-card__price {
  margin-top: auto;
  color: var(--article-accent);
  font-size: 17px;
  font-weight: 850;
}

.article-system .article-data-note {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f7fafc;
  color: var(--article-muted);
  font-size: 14px;
  line-height: 1.65;
}

.article-system .article-table-scroll {
  width: 100%;
  margin: 1.25rem 0;
  overflow-x: auto;
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}
.article-system .article-table-scroll table { margin: 0; }
.article-system .article-table-scroll.is-wide table { min-width: 640px; }

@media (max-width: 991.98px) {
  .article-system .article-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .article-system .article-reading-shell { width: min(100% - 24px, 920px); }
  .article-system .article-reading-card { border-radius: 16px; }
  .article-system .article-reading-head { padding: 24px 20px 16px; }
  .article-system .article-reading-body { padding: 6px 20px 30px; }
  .article-system .article-content,
  .article-system .eg-prose {
    font-size: 16px !important;
    line-height: 1.78;
  }
  .article-system .article-content p,
  .article-system .article-content li,
  .article-system .article-content td,
  .article-system .article-content th,
  .article-system .eg-prose p,
  .article-system .eg-prose li,
  .article-system .eg-prose td,
  .article-system .eg-prose th { font-size: 16px !important; }
  .article-system .article-related-products { padding: 34px 0; }
  .article-system .article-related-products__head { align-items: start; flex-direction: column; }
  .article-system .article-product-grid { gap: 12px; }
  .article-system .article-product-card__body { padding: 12px; }
  .article-system .article-product-card__title { font-size: 15px; }
  .article-system .article-toc { margin: 20px 0 26px; padding: 16px; }
  .article-system .article-toc a { display: inline-flex; min-height: 44px; align-items: center; }
}

@media (max-width: 420px) {
  .article-system .article-product-grid { grid-template-columns: 1fr 1fr; }
}
