/* TelegramBlaster site, part 3: the affiliate programme. The earnings calculator, the leaderboard and the
   affiliate page's own blocks. Same tokens, same grid, nothing rotated. */

/* ---- the earnings calculator: an "earnings ticket", cut the same way as the pricing ticket ---- */
.earn { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-lg); }
.earn-in { position: relative; display: grid; gap: 22px; align-content: start; padding: clamp(22px, 3vw, 40px); border-right: 2px dashed var(--line-2); }
.earn-in::before, .earn-in::after { content: ""; position: absolute; right: -15px; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); }
.earn-in::before { top: -15px; clip-path: inset(50% 0 0 0); } .earn-in::after { bottom: -15px; clip-path: inset(0 0 50% 0); }
.earn-full .earn-in::after { display: none; }
.earn-in h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); letter-spacing: -0.035em; }
.earn .slider output { padding: 2px 10px; border-radius: 8px; background: var(--lilac); font-weight: 500; }
.earn input[type="range"] { accent-color: var(--grape); }
.earn .fine { margin-top: 0; font-size: .84rem; }
.earn-out { display: grid; gap: 18px; align-content: center; padding: clamp(22px, 3vw, 40px); }
.earn-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.earn-big b { font: 700 clamp(3.2rem, 2rem + 5vw, 5.4rem)/.9 var(--display); letter-spacing: -0.06em; color: var(--coral); font-variant-numeric: tabular-nums; }
.earn-big span { font-size: .98rem; color: var(--mute); }
.earn-out dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.earn-out dl div { padding: 16px 18px; border-radius: var(--r-md); background: var(--mint); } .earn-out dl div + div { background: var(--lilac); }
.earn-out dt { font: 700 clamp(1.5rem, 1.1rem + 1.3vw, 2.1rem)/1 var(--display); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.earn-out dd { margin-top: 6px; font-size: .86rem; line-height: 1.4; color: #4A3A59; }

/* twelve months as bars: one series, one hue; the month in hand is darker and named underneath */
.earn-chart { grid-column: 1 / -1; padding: 0 clamp(22px, 3vw, 40px) clamp(20px, 2.6vw, 32px); border-top: 2px dashed var(--line-2); display: none; }
.js .earn-chart { display: block; }
.earn-bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 clamp(4px, .9vw, 12px); align-items: end; height: clamp(120px, 14vw, 170px); padding-top: 24px; border-bottom: 1px solid var(--line-2); border-radius: 4px; }
.earn-bars:focus-visible { outline-offset: 6px; }
.earn-bars span { position: relative; display: block; height: 100%; }
.earn-bars i { position: absolute; inset: auto 0 0; height: calc(var(--h, 0) * 100%); min-height: 3px; border-radius: 4px 4px 0 0; background: var(--grape); opacity: .5; transform-origin: 50% 100%; transition: height .5s var(--ease), opacity .2s; }
.earn-bars span.on i { opacity: 1; }
.earn-bars span::after { content: attr(data-m); position: absolute; left: 50%; bottom: -24px; transform: translateX(-50%); font: 500 .72rem var(--mono); color: var(--mute); }
.earn-chart figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; margin-top: 36px; font-size: .92rem; }
.earn-chart figcaption [data-earn-out] { font-weight: 600; } .earn-hint { color: var(--mute); font-size: .84rem; }

/* ---- home page: the offer beside the calculator ---- */
.aff-home { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: center; }
.aff-home-copy { display: grid; gap: 18px; justify-items: start; }
.aff-home-copy .kicker { margin-bottom: 2px; } .aff-home-copy h2 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3rem); }
.aff-home-copy .cta { margin-top: 6px; } .aff-home-copy .btn-link { min-height: 52px; }
.aff-home .earn { grid-template-columns: minmax(0, 1fr); }
.aff-home .earn-in { border-right: 0; border-bottom: 2px dashed var(--line-2); gap: 18px; }
.aff-home .earn-in::before, .aff-home .earn-in::after { top: auto; bottom: -15px; clip-path: inset(0 0 0 50%); } .aff-home .earn-in::before { left: -15px; right: auto; } .aff-home .earn-in::after { right: -15px; clip-path: inset(0 50% 0 0); }
.aff-home .earn-big b { font-size: clamp(2.8rem, 1.8rem + 3.6vw, 4.2rem); }

/* ---- affiliate page ---- */
.aff-hero .hero-stage { margin-top: clamp(32px, 4.5vw, 56px); }
.aff-hero h1 { font-size: clamp(2.3rem, 1rem + 4.6vw, 4.1rem); }
.aff-hero .figures dt { font-size: clamp(2.3rem, 1.5rem + 2.8vw, 3.8rem); }

/* 02 what you earn: the rate, the bonuses, the discount */
.aff-earn { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 4fr); gap: clamp(12px, 1.6vw, 20px); }
.aff-earn article { display: grid; gap: 12px; align-content: start; padding: clamp(22px, 2.6vw, 34px); border-radius: var(--r-xl); background: var(--white); border: 1px solid var(--line); }
.aff-earn article p { font-size: .97rem; color: var(--mute); }
.aff-earn h3 { font-size: 1.28rem; }
.aff-rate { box-shadow: var(--sh-md); }
.aff-earn .aff-num { font: 700 clamp(4rem, 2.6rem + 5vw, 6.4rem)/.86 var(--display); letter-spacing: -0.06em; color: var(--coral); font-variant-numeric: tabular-nums; }
.aff-earn .aff-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg); color: var(--ink); font-size: .93rem; }
.aff-sum i { flex: 1 1 24px; min-width: 24px; border-top: 2px dotted var(--line-2); } .aff-sum b { font-family: var(--display); }
.aff-stones { display: grid; gap: 8px; margin-top: 4px; }
.aff-stones li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--mint); font-size: .92rem; color: #2F4A44; }
.aff-stones li:nth-child(2) { background: var(--peach); color: #5A3A26; } .aff-stones li:nth-child(3) { background: var(--sun); color: #4A3A10; }
.aff-stones b { font: 700 1.25rem var(--display); letter-spacing: -0.03em; color: var(--ink); }
.aff-earn .aff-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; padding: 8px 8px 8px 18px; border-radius: 999px; border: 2px dashed var(--line-2); color: var(--ink); }
.aff-code span { font: 500 .95rem var(--mono); letter-spacing: .04em; } .aff-code b { padding: 6px 14px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 .86rem var(--display); white-space: nowrap; } .aff-code b span { font: inherit; letter-spacing: 0; }

/* 03 leaderboard */
.board { display: grid; gap: 20px; padding: clamp(18px, 2.6vw, 34px); }
.board-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.board .ptabs { margin-bottom: 0; } .board-when { font: 500 .84rem var(--mono); color: var(--mute); }
.board-contest { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 14px 18px; border-radius: var(--r-md); background: var(--sun); font-size: .95rem; }
.board-contest[hidden] { display: none; } .board-contest b { font-family: var(--display); }
/* ranks read down the first column, then down the second */
.board-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(5, auto); grid-auto-flow: column; gap: 0 var(--gap); }
.board-list:empty { display: none; }
.board-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 60px; padding: 8px 0; border-top: 1px solid var(--line); }
.board-list li:first-child, .board-list li:nth-child(6) { border-top: 0; }
.board-rank { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--wash); font: 500 .9rem var(--mono); }
.board-list li[data-rank="1"] .board-rank { background: var(--sun); font-weight: 700; } .board-list li[data-rank="2"] .board-rank { background: var(--lilac); } .board-list li[data-rank="3"] .board-rank { background: var(--peach); }
.board-name { font: 600 1.05rem var(--display); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-score { font-size: .9rem; color: var(--mute); white-space: nowrap; } .board-score b { font: 700 1.15rem var(--display); color: var(--ink); margin-right: 5px; font-variant-numeric: tabular-nums; }
.board-empty { padding: clamp(22px, 3vw, 40px) 20px; border-radius: var(--r-lg); background: var(--bg); text-align: center; color: var(--mute); }
.board-empty[hidden] { display: none; }
.board-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 18px; border-top: 1px solid var(--line); font: 600 1.02rem var(--display); letter-spacing: -0.02em; }

/* 04 getting paid: what is true about payouts, beside what the dashboard gives you */
.aff-two { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap); align-items: start; }
.aff-yes .ic { background: rgba(12, 127, 119, .16); color: var(--teal-d); }
.aff-kit { display: grid; gap: 16px; justify-items: start; } .aff-kit > p { color: var(--mute); font-size: .97rem; } .aff-kit .btn-link { min-height: 44px; }
/* 05 the rules: four across two columns */
.aff-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }

@media (max-width: 1000px) {
  .earn, .aff-home, .aff-two { grid-template-columns: minmax(0, 1fr); }
  .earn-in { border-right: 0; border-bottom: 2px dashed var(--line-2); }
  .earn-in::before, .earn-in::after, .earn-full .earn-in::after { display: block; top: auto; bottom: -15px; clip-path: inset(0 0 0 50%); } .earn-in::before { left: -15px; right: auto; } .earn-in::after { right: -15px; clip-path: inset(0 50% 0 0); }
  .aff-earn { grid-template-columns: repeat(2, minmax(0, 1fr)); } .aff-rate { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .aff-earn, .aff-rules { grid-template-columns: minmax(0, 1fr); }
  .board-list { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; } .board-list li:nth-child(6) { border-top: 1px solid var(--line); }
  .earn-out dl { grid-template-columns: minmax(0, 1fr); }
  .earn-bars span:nth-child(even)::after { content: ""; }
  .earn-hint { display: none; }
  .board-foot .btn { flex: 1 1 100%; }
}
