.affiliate-card {
  background: #ffffff;
  border: 1px solid #cfe4ec;
  border-radius: 18px;
  padding: clamp(18px, 4vw, 28px);
  box-shadow: 0 10px 26px rgba(23, 43, 77, 0.08);
}

.affiliate-card h2,
.affiliate-card h3 {
  margin-top: 0;
}

.affiliate-button,
.compare-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #00889a;
  color: #ffffff !important;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.affiliate-button.secondary,
.compare-button.secondary {
  background: #ff8a00;
}

.compare-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d8e8ef;
  border-radius: 16px;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.compare-table caption {
  text-align: left;
  padding: 14px 16px;
  color: #526b7a;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 14px;
  border-bottom: 1px solid #e6edf3;
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  background: #eef8fb;
  color: #244556;
  font-weight: 900;
  white-space: nowrap;
}

.compare-table tr:last-child td {
  border-bottom: 0;
}

.context-link-panel {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid #bfeaf2;
  border-radius: 18px;
  background: #eefcff;
}

.context-link-panel h2,
.context-link-panel h3 {
  margin: 0 0 8px;
  color: #007c91;
}

.context-link-panel p {
  margin: 0 0 12px;
  color: #526b7a;
}

.context-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.context-link-grid a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #cfe4ec;
  color: #007c91;
  font-weight: 800;
}

.trainer-view-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.trainer-view-list li {
  border: 1px solid #d8e8ef;
  border-radius: 14px;
  background: #f8fbfd;
  padding: 14px;
}

.trainer-view-list strong {
  display: block;
  color: #007c91;
  margin-bottom: 4px;
}

@media (max-width: 760px) {
  .affiliate-button,
  .compare-button {
    width: 100%;
  }

  .context-link-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .trainer-view-list {
    grid-template-columns: 1fr;
  }
}

/* ASP / affiliate banner placement
   Keep text readable, but center official banner creatives consistently. */
.affiliate-box a[href*="af.moshimo.com"]:has(img),
.affiliate-box a[href*="px.a8.net"]:has(img),
.affiliate-card a[href*="af.moshimo.com"]:has(img),
.affiliate-card a[href*="px.a8.net"]:has(img),
main a[href*="af.moshimo.com"]:has(img),
main a[href*="px.a8.net"]:has(img) {
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 26px auto 0;
}

.affiliate-box a[href*="af.moshimo.com"] img:not([width="1"]),
.affiliate-box a[href*="px.a8.net"] img:not([width="1"]),
.affiliate-card a[href*="af.moshimo.com"] img:not([width="1"]),
.affiliate-card a[href*="px.a8.net"] img:not([width="1"]),
main a[href*="af.moshimo.com"] img:not([width="1"]),
main a[href*="px.a8.net"] img:not([width="1"]) {
  display: block;
  max-width: min(100%, 360px);
  height: auto !important;
  border: 0 !important;
}

.affiliate-pixel,
main img[src*="i.moshimo.com"][width="1"],
main img[src*="a8.net/0.gif"][width="1"] {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 480px) {
  .affiliate-box a[href*="af.moshimo.com"]:has(img),
  .affiliate-box a[href*="px.a8.net"]:has(img),
  .affiliate-card a[href*="af.moshimo.com"]:has(img),
  .affiliate-card a[href*="px.a8.net"]:has(img),
  main a[href*="af.moshimo.com"]:has(img),
  main a[href*="px.a8.net"]:has(img) {
    width: 100%;
    margin-top: 22px;
  }

  .affiliate-box a[href*="af.moshimo.com"] img:not([width="1"]),
  .affiliate-box a[href*="px.a8.net"] img:not([width="1"]),
  .affiliate-card a[href*="af.moshimo.com"] img:not([width="1"]),
  .affiliate-card a[href*="px.a8.net"] img:not([width="1"]),
  main a[href*="af.moshimo.com"] img:not([width="1"]),
  main a[href*="px.a8.net"] img:not([width="1"]) {
    max-width: 100%;
  }
}
