/* Public affiliate program landing — extends how-it-works + global styles. */

html.aff-html,
body.aff-page {
  max-width: 100%;
}

body.aff-page {
  overflow-x: hidden;
}

.aff-page .aff-hero__title,
.aff-page .hiw-section__title,
.aff-page h3,
.aff-page p,
.aff-page li,
.aff-page dd,
.aff-page dt,
.aff-page code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.aff-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.aff-crumbs a {
  color: var(--purple-dark);
  font-weight: 600;
}

.aff-hero__title {
  max-width: 22rem;
}

.aff-hero__lead {
  margin: 0 0 22px;
  max-width: 42rem;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.aff-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.aff-btn {
  white-space: normal;
  text-align: center;
  max-width: 100%;
}

.aff-hero__note {
  margin: 16px 0 0;
  max-width: 40rem;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--purple-tint);
  border: 1px solid rgba(79, 70, 229, 0.16);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.aff-narrow {
  max-width: 800px;
}

.aff-prose {
  margin: 0 0 14px;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.aff-subhead {
  margin: 28px 0 10px;
  font-size: 1.15rem;
}

.aff-trio,
.aff-split,
.aff-audience {
  display: grid;
  gap: 14px;
  margin: 20px 0 18px;
}

.aff-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.aff-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.aff-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.aff-card__label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple-dark);
}

.aff-highlight {
  margin-bottom: 22px;
}

.aff-steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.aff-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
}

.aff-steps h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.aff-steps p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.aff-steps code {
  font-size: 0.92em;
}

.aff-steps__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--purple-light);
  color: var(--purple-dark);
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.aff-example {
  margin: 18px 0;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-muted);
  min-width: 0;
}

.aff-example h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.aff-example__intro,
.aff-example__follow,
.aff-example__note {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.aff-example__note {
  margin-bottom: 0;
}

.aff-dl {
  margin: 0 0 14px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
}

.aff-dl > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  min-width: 0;
}

.aff-dl > div:first-child {
  border-top: 0;
}

.aff-dl dt {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.aff-dl dd {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}

.aff-dl__accent {
  background: var(--purple-tint);
}

.aff-dl__accent dt,
.aff-dl__accent dd {
  color: var(--text);
}

.aff-callout {
  margin: 18px 0 0;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid #fde68a;
  background: #fffbeb;
}

.aff-callout p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.aff-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.aff-chips li {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.3;
}

.aff-page .hiw-bullets {
  list-style: disc;
  padding-left: 1.2rem;
}

.aff-cta-legal {
  margin: 18px 0 0;
  font-size: 13px;
  opacity: 0.92;
}

.aff-cta-legal a {
  color: #fff;
  text-decoration: underline;
}

@media (min-width: 800px) {
  .aff-trio,
  .aff-split {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .aff-audience {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aff-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .aff-hero__actions,
  .hiw-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .aff-hero__actions .btn,
  .hiw-cta__actions .btn {
    width: 100%;
  }

  .aff-dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .aff-dl dd {
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 430px) {
  .aff-hero__title {
    max-width: none;
  }
}
