/* ============================================================
   GenieCheats — Affiliates / Partner Program
   Light-first, scoped under body.mg-light so it can never leak into
   the dark pages that share styles.css.

   Load order in affiliates.html:
     styles.css  →  light-theme.css  →  memgenie-light.css  →  this
   memgenie-light.css is loaded for the shared light furniture only:
   the body.mg-light token block, the header/footer treatment and the
   .faq-item / .hack-eyebrow components. Everything below is new and
   prefixed .aff- so it cannot collide with the MemGenie page.
   ============================================================ */

body.mg-light {
  /* Program accent. The commission story is the page's whole argument,
     so it gets one colour used ONLY for money — a reader learns within
     two sections that green means "this is what you are paid". */
  --aff-money: #12a150;
  --aff-money-deep: #0a7c3c;
  --aff-money-wash: #eefaf2;
  --aff-money-line: rgba(18, 161, 80, 0.24);
}

/* ── Shared section furniture ─────────────────────────────────────── */

.aff-section {
  padding: clamp(56px, 7vw, 104px) 20px;
}

.aff-section--tint {
  background: var(--surface-2);
  border-block: 1px solid var(--hair-2);
}

.aff-inner {
  max-width: 1080px;
  margin: 0 auto;
}

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

.aff-head {
  max-width: 720px;
  margin: 0 0 clamp(30px, 4vw, 48px);
}

.aff-head--center {
  margin-inline: auto;
  text-align: center;
}

.aff-h2 {
  margin: 12px 0 14px;
  color: var(--ink);
  font-size: clamp(27px, 3.4vw, 42px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.aff-lede {
  margin: 0;
  color: var(--body);
  font-size: clamp(15.5px, 1.3vw, 17.5px);
  line-height: 1.65;
}

.aff-lede strong {
  color: var(--ink);
  font-weight: 650;
}

/* ── Hero ─────────────────────────────────────────────────────────── */

.aff-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(48px, 6vw, 84px) 20px clamp(56px, 6.5vw, 96px);
  background:
    radial-gradient(58% 78% at 78% 8%, rgba(18, 161, 80, 0.11) 0%, transparent 62%),
    radial-gradient(48% 66% at 12% 4%, rgba(139, 92, 246, 0.1) 0%, transparent 60%),
    #fff;
}

.aff-hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 4vw, 60px);
  align-items: center;
}

.aff-hero-title {
  margin: 14px 0 18px;
  color: var(--ink);
  font-size: clamp(36px, 4.9vw, 62px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

/* The one gradient on the page, spent on the number the page is about. */
.aff-hero-title em {
  font-style: normal;
  background-image: linear-gradient(100deg, var(--aff-money) 0%, #17b95c 55%, #3ecf7e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.aff-hero-sub {
  margin: 0 0 26px;
  max-width: 520px;
  color: var(--body);
  font-size: clamp(15.5px, 1.35vw, 18px);
  line-height: 1.62;
}

.aff-hero-sub strong {
  color: var(--ink);
  font-weight: 650;
}

.aff-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 20px;
}

/* Money-green primary. Deliberately NOT the site's lime: lime is the
   "install the extension" action everywhere else, and a partner applying
   is a different job. */
.aff-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 26px;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease,
    background 200ms ease, border-color 200ms ease;
}

.aff-btn svg { width: 17px; height: 17px; flex: none; }

.aff-btn--money {
  background: var(--aff-money);
  color: #fff;
  box-shadow: 0 1px 2px rgba(13, 17, 23, 0.08), 0 12px 26px -10px rgba(18, 161, 80, 0.85);
}

.aff-btn--money svg { fill: #fff; }

.aff-btn--money:hover,
.aff-btn--money:focus-visible {
  transform: translateY(-2px);
  background: var(--aff-money-deep);
  box-shadow: 0 2px 5px rgba(13, 17, 23, 0.1), 0 18px 34px -12px rgba(18, 161, 80, 0.95);
}

.aff-btn--ghost {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--hair);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(13, 17, 23, 0.05);
}

.aff-btn--ghost:hover,
.aff-btn--ghost:focus-visible {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 8px 22px -8px rgba(13, 17, 23, 0.22);
}

.aff-hero-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--soft);
  font-size: 13.5px;
}

.aff-hero-note svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: var(--aff-money);
}

/* --- Hero side: the 50% medallion --- */

.aff-medallion {
  position: relative;
  padding: clamp(26px, 3vw, 38px);
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--hair);
  box-shadow: 0 1px 2px rgba(13, 17, 23, 0.04), 0 26px 60px -30px rgba(13, 17, 23, 0.34);
  text-align: center;
}

.aff-medallion-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.aff-medallion-num {
  display: block;
  color: var(--aff-money);
  font-size: clamp(84px, 12vw, 148px);
  line-height: 0.86;
  font-weight: 900;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}

.aff-medallion-num sup {
  font-size: 0.4em;
  font-weight: 800;
  top: -0.55em;
  margin-left: 2px;
  letter-spacing: -0.02em;
}

.aff-medallion-cap {
  display: block;
  margin-top: 14px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.aff-medallion-sub {
  display: block;
  margin-top: 6px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.55;
}

.aff-medallion-rule {
  height: 1px;
  margin: 20px 0 16px;
  background: var(--hair);
  border: 0;
}

.aff-medallion-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  text-align: left;
}

.aff-medallion-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.5;
}

.aff-medallion-list svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  fill: var(--aff-money);
}

.aff-medallion-list b {
  color: var(--ink);
  font-weight: 650;
}

/* ── The "what 50% means" stat band ───────────────────────────────── */

.aff-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 18px;
  overflow: hidden;
}

.aff-band-cell {
  padding: clamp(24px, 3vw, 34px) clamp(20px, 2.4vw, 30px);
  background: #fff;
}

.aff-band-num {
  display: block;
  color: var(--aff-money);
  font-size: clamp(32px, 3.8vw, 46px);
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.aff-band-label {
  display: block;
  margin: 12px 0 7px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.aff-band-text {
  margin: 0;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.58;
}

/* ── Recurring vs one-time comparison ─────────────────────────────── */

.aff-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.aff-compare-card {
  padding: clamp(22px, 2.6vw, 30px);
  border-radius: 16px;
  border: 1px solid var(--hair);
  background: #fff;
}

.aff-compare-card--win {
  border-color: var(--aff-money-line);
  background: var(--aff-money-wash);
  box-shadow: 0 14px 34px -20px rgba(18, 161, 80, 0.55);
}

.aff-compare-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(13, 17, 23, 0.06);
  color: var(--ink-2);
}

.aff-compare-card--win .aff-compare-tag {
  background: var(--aff-money);
  color: #fff;
}

.aff-compare-total {
  display: block;
  color: var(--ink);
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.aff-compare-card--win .aff-compare-total { color: var(--aff-money-deep); }

.aff-compare-cap {
  margin: 8px 0 18px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.5;
}

/* 12 stacked month bars. Height is set inline per bar so the shape of the
   argument (flat vs. accumulating) is visible before a word is read. */
.aff-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 96px;
  margin-bottom: 10px;
}

.aff-bar {
  flex: 1;
  min-height: 3px;
  border-radius: 3px 3px 0 0;
  background: rgba(13, 17, 23, 0.16);
}

.aff-compare-card--win .aff-bar {
  background: linear-gradient(180deg, #3ecf7e 0%, var(--aff-money) 100%);
}

.aff-bars-axis {
  display: flex;
  justify-content: space-between;
  color: var(--soft);
  font-size: 11.5px;
  font-weight: 600;
}

/* ── Earnings calculator ──────────────────────────────────────────── */

.aff-calc {
  border-radius: 20px;
  border: 1px solid var(--hair);
  background: #fff;
  box-shadow: 0 1px 2px rgba(13, 17, 23, 0.04), 0 24px 56px -34px rgba(13, 17, 23, 0.3);
  overflow: hidden;
}

.aff-calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
}

.aff-calc-controls {
  padding: clamp(24px, 3vw, 36px);
}

.aff-calc-field + .aff-calc-field { margin-top: 26px; }

.aff-calc-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.aff-calc-value {
  color: var(--aff-money);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Range input, restyled in both engines so the thumb matches the accent. */
.aff-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(13, 17, 23, 0.1);
  outline: none;
  cursor: pointer;
}

.aff-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--aff-money);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(18, 161, 80, 0.5);
  cursor: pointer;
  transition: transform 150ms ease;
}

.aff-range::-webkit-slider-thumb:hover { transform: scale(1.12); }

.aff-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--aff-money);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(18, 161, 80, 0.5);
  cursor: pointer;
}

.aff-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.aff-plan {
  position: relative;
  display: block;
  cursor: pointer;
}

.aff-plan input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.aff-plan-box {
  display: block;
  padding: 13px 14px;
  border-radius: 11px;
  border: 1px solid var(--hair);
  background: #fff;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.aff-plan-name {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.aff-plan-price {
  display: block;
  margin-top: 3px;
  color: var(--soft);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.aff-plan input:checked + .aff-plan-box {
  border-color: var(--aff-money);
  background: var(--aff-money-wash);
  box-shadow: 0 0 0 3px rgba(18, 161, 80, 0.12);
}

.aff-plan input:focus-visible + .aff-plan-box {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.aff-plan input:checked + .aff-plan-box .aff-plan-price { color: var(--aff-money-deep); }

/* Readout panel */
.aff-calc-out {
  padding: clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, #0f1720 0%, #0b1118 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.aff-out-row + .aff-out-row {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.aff-out-label {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.aff-out-num {
  display: block;
  color: #fff;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.aff-out-num--hero { color: #4ade80; }

.aff-out-sub {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.5;
}

.aff-calc-foot {
  padding: 15px clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--hair);
  background: var(--surface-2);
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}

/* ── Numbered steps ───────────────────────────────────────────────── */

.aff-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
  counter-reset: aff-step;
}

.aff-step {
  position: relative;
  padding: clamp(22px, 2.4vw, 28px);
  border-radius: 16px;
  border: 1px solid var(--hair);
  background: #fff;
}

.aff-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 15px;
  border-radius: 10px;
  background: var(--aff-money-wash);
  border: 1px solid var(--aff-money-line);
  color: var(--aff-money-deep);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.aff-step h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 750;
  letter-spacing: -0.018em;
}

.aff-step p {
  margin: 0;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.58;
}

.aff-step code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(13, 17, 23, 0.06);
  color: var(--ink);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

/* ── Generic feature cards ────────────────────────────────────────── */

.aff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}

.aff-card {
  padding: clamp(22px, 2.4vw, 28px);
  border-radius: 16px;
  border: 1px solid var(--hair);
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.aff-card:hover {
  transform: translateY(-2px);
  border-color: var(--aff-money-line);
  box-shadow: 0 14px 32px -20px rgba(13, 17, 23, 0.34);
}

.aff-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 15px;
  border-radius: 11px;
  background: var(--aff-money-wash);
  border: 1px solid var(--aff-money-line);
}

.aff-card-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--aff-money-deep);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aff-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 750;
  letter-spacing: -0.018em;
}

.aff-card p {
  margin: 0;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.58;
}

.aff-card p + p { margin-top: 10px; }

.aff-card strong { color: var(--ink); font-weight: 650; }

/* ── Payout terms table ───────────────────────────────────────────── */

.aff-terms {
  border: 1px solid var(--hair);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.aff-term {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(16px, 2vw, 28px);
  padding: clamp(18px, 2vw, 22px) clamp(20px, 2.2vw, 26px);
}

.aff-term + .aff-term { border-top: 1px solid var(--hair-2); }

.aff-term dt {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.aff-term dd {
  margin: 0;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.6;
}

.aff-term dd strong { color: var(--ink); font-weight: 650; }

.aff-term dd .aff-money-txt { color: var(--aff-money-deep); font-weight: 700; }

/* ── Closing CTA ──────────────────────────────────────────────────── */

.aff-close {
  padding: clamp(44px, 5vw, 68px) clamp(24px, 3.4vw, 56px);
  border-radius: 22px;
  text-align: center;
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(18, 161, 80, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, #0f1720 0%, #0b1118 100%);
  color: #fff;
}

/* Deliberately scoped through body.mg-light. light-theme.css ships
   `body.mg-light h1, body.mg-light h2, …` at dark ink, which outranks a plain
   `.aff-close h2` — inheriting white from .aff-close is not enough and the
   heading renders near-black on near-black. Match its specificity to win. */
body.mg-light .aff-close h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.aff-close h2 em {
  font-style: normal;
  color: #4ade80;
}

.aff-close p {
  margin: 0 auto 26px;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.62;
}

.aff-close-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 13px;
}

.aff-close .aff-btn--ghost {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.aff-close .aff-btn--ghost:hover,
.aff-close .aff-btn--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.13);
}

/* ── Small print ──────────────────────────────────────────────────── */

.aff-fineprint {
  margin: clamp(26px, 3vw, 38px) auto 0;
  max-width: 760px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.62;
  text-align: center;
}

.aff-fineprint a { color: var(--violet); text-decoration: underline; text-underline-offset: 2px; }

/* ── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .aff-hero-inner { grid-template-columns: 1fr; }
  .aff-medallion { max-width: 460px; margin-inline: auto; }
  .aff-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aff-calc-grid { grid-template-columns: 1fr; }
  .aff-band { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .aff-compare { grid-template-columns: 1fr; }
  .aff-term { grid-template-columns: 1fr; gap: 6px; }
  .aff-hero-cta,
  .aff-close-cta { flex-direction: column; align-items: stretch; }
  .aff-btn { justify-content: center; }
}

@media (max-width: 520px) {
  .aff-steps { grid-template-columns: 1fr; }
  .aff-plans { grid-template-columns: 1fr; }
  .aff-medallion-num { font-size: 96px; }
}

/* Respect users who have asked for less motion. */
@media (prefers-reduced-motion: reduce) {
  .aff-btn,
  .aff-card,
  .aff-range::-webkit-slider-thumb {
    transition: none;
  }
  .aff-btn:hover,
  .aff-card:hover { transform: none; }
}
