/* ==========================================================================
   AUTHIFY — Affiliates
   Hero stat row, commission comparison cards, and the payout calculator.
   Perk cards, FAQ, and the bottom CTA reuse .card-grid / .faq-item / .cta
   as-is.
   ========================================================================== */

.page-hero__cta{
  margin-top: var(--space-md);
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.affiliate-stats{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: 700px;
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}
.affiliate-stat{ text-align: center; }
.affiliate-stat__value{
  display: block;
  font-size: var(--text-2xl);
  font-weight: 200;
  letter-spacing: var(--tracking-tight);
  color: var(--gold-400);
}
.affiliate-stat__label{ font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---- How it works — 4 steps, kept off the site-wide 3-col .card-grid so
   it never wraps into an unbalanced 3-then-1 row ------------------------- */
.card-grid--steps{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px){
  .card-grid--steps{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px){
  .card-grid--steps{ grid-template-columns: 1fr; }
}

/* ---- Corner badge — taken out of flow so a badge on only one card in a
   pair (e.g. "Best Long-Term", "Popular") never pushes that card's own
   title/price down relative to its non-badged sibling. Overrides
   cards.css's in-flow .card--pricing .badge for this page only, and adds
   the same treatment for .milestone-card, which isn't a .card--pricing. --- */
.card--pricing .badge,
.milestone-card .badge{
  position: absolute;
  top: 0;
  right: 0;
  align-self: unset;
}
.milestone-card .badge{
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--gold-contrast);
  background: linear-gradient(160deg, var(--gold-200), var(--gold-400));
  padding: 0.25em 0.8em;
  border-radius: var(--radius-full);
}

/* ---- Commission comparison cards (reuses .card--pricing) --------------- */
.commission-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  max-width: 760px;
  margin-inline: auto;
}
@media (max-width: 700px){
  .commission-grid{ grid-template-columns: 1fr; }
}

/* ---- Calculator ---------------------------------------------------------- */
.calc-panel{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-lg);
  max-width: 980px;
  margin: 0 auto;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
}

.calc-controls{ display: flex; flex-direction: column; gap: var(--space-md); }

.calc-group{ display: flex; flex-direction: column; gap: var(--space-2xs); }
.calc-group__label{ font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted); }
.calc-group__label strong{ color: var(--gold-400); font-weight: 700; }

.calc-pill-row{ display: flex; gap: var(--space-2xs); flex-wrap: wrap; }
.calc-pill{
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  color: var(--color-text);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-smooth), background var(--dur-fast) var(--ease-smooth), color var(--dur-fast) var(--ease-smooth);
}
.calc-pill small{ font-weight: 500; opacity: 0.75; margin-left: 0.35em; }
.calc-pill:hover{ border-color: var(--gold-400); }
.calc-pill.is-active{ background: var(--gold-400); border-color: var(--gold-400); color: #1a1a1a; }

.calc-note{ font-size: calc(var(--text-xs) * 0.85); color: var(--color-text-subtle); }
.calc-note a{ color: var(--gold-500); }

.calc-slider{
  width: 100%;
  accent-color: var(--gold-400);
}

.calc-result{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
}
.calc-result__label{ font-size: var(--text-xs); color: var(--color-text-muted); }
.calc-result__value{
  font-size: var(--text-3xl);
  font-weight: 200;
  letter-spacing: var(--tracking-tight);
  color: var(--gold-400);
  margin: 0.15em 0;
}
.calc-result__sub{ font-size: calc(var(--text-xs) * 0.9); color: var(--color-text-subtle); min-height: 1.2em; }

.calc-result__breakdown{
  width: 100%;
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}
.calc-result__row{
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.calc-result__row strong{ color: var(--color-text); font-weight: 700; }

.calc-disclaimer{
  text-align: center;
  font-size: calc(var(--text-xs) * 0.85);
  color: var(--color-text-subtle);
  max-width: 760px;
  margin: var(--space-sm) auto 0;
}

/* ---- Milestone incentive cards (reuses .card) --------------------------- */
.milestone-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: 900px;
  margin-inline: auto;
}
.milestone-card{ align-items: flex-start; text-align: left; }
.milestone-card__tier{
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide, 0.05em);
  color: var(--gold-500);
}
.milestone-card__threshold{
  font-size: var(--text-2xl);
  font-weight: 200;
  letter-spacing: var(--tracking-tight);
  margin: 0.2em 0 0;
}
.milestone-card__threshold small{
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: normal;
  margin-top: 0.2em;
}
.milestone-card__bonus{
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gold-400);
  margin-top: var(--space-xs);
}

/* ---- Milestone progress banner inside the calculator result ------------- */
.calc-result__milestone{
  width: 100%;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
  font-size: calc(var(--text-xs) * 0.95);
  color: var(--color-text-muted);
  min-height: 1.4em;
}
.calc-result__milestone strong{ color: var(--gold-400); font-weight: 700; }
.calc-result__milestone.is-unlocked{ color: var(--gold-400); }

@media (max-width: 700px){
  .calc-panel{ grid-template-columns: 1fr; }
  .affiliate-stats{ grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); }
  .affiliate-stat__value{ font-size: var(--text-lg); }
  .milestone-grid{ grid-template-columns: 1fr; }
}
