/**
 * Affiliate application (/affiliate-register/). Loaded after home.css,
 * docs.css and support.css, whose hero, form card, fields and side boxes it
 * reuses; only what is new on this page lives here.
 */

/* ── Hero ─────────────────────────────────────────── */
.aff-hero .crumbs { justify-content: center; }
.aff-hero h1 { max-width: 16ch; }
.aff-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; margin: 34px auto 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.aff-facts li { display: grid; gap: 2px; padding: 18px 12px; text-align: center; }
.aff-facts li + li { border-left: 1px solid var(--line); }
.aff-facts b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.aff-facts span { font-size: 13.5px; color: var(--muted); }

/* ── Steps of the form ────────────────────────────── */
.aff-apply { padding-top: 24px; }
.aff-step { display: grid; gap: 18px; min-width: 0; margin: 0; padding: 0 0 22px; border: 0; border-bottom: 1px dashed var(--line); }
.aff-step:last-of-type { padding-bottom: 0; border-bottom: 0; }
.aff-step-head { display: flex; align-items: center; gap: 10px; padding: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.aff-num { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--brand) 15%, var(--surface)); color: var(--brand-ink); font-size: 13px; font-weight: 700; }

/* plugins, any number of them */
.aff-pick-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -6px; }
.aff-pick-bar small { font-size: 13px; color: var(--muted); }
.aff-all { flex: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 600 13px/1 var(--f); cursor: pointer; transition: border-color .2s, color .2s; }
.aff-all:hover { border-color: var(--brand); color: var(--ink); }
.aff-all[aria-pressed="true"] { border-color: var(--brand); color: var(--brand-ink); }
.aff-products { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.aff-product { align-content: start; }
.aff-product small { font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--muted); }

/* where the audience is */
.aff-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.aff-chip { position: relative; cursor: pointer; }
.aff-chip input { position: absolute; opacity: 0; pointer-events: none; }
.aff-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 500; transition: border-color .2s, background .2s, color .2s; }
.aff-chip:hover span { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.aff-chip input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 11%, var(--surface)); color: var(--brand-ink); }
.aff-chip input:checked + span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.aff-chip input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }

/* support.css styles text and email fields; the site address is a url field */
.aff-page .sup-field input[type="url"] { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); color: var(--ink); font: 400 15.5px/1.5 var(--f); transition: border-color .2s, box-shadow .2s, background .2s; }
.aff-page .sup-field input[type="url"]:focus { outline: none; background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.aff-page .sup-field input[readonly] { color: var(--muted); }
#affLinks, #affStats { min-height: 78px; }
#affPlan { min-height: 130px; }

.aff-count.is-short { color: #d93f44; }
.aff-count.is-ok { color: var(--brand-ink); }

/* payouts */
.aff-same, .aff-agree { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.aff-same { margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.aff-same input, .aff-agree input { width: 17px; height: 17px; flex: none; margin: 2px 0 0; accent-color: var(--brand); }
.aff-agree a { color: var(--brand-ink); font-weight: 600; }
.aff-agree.is-invalid span { color: #d93f44; }

.aff-side-links { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 760px) {
	.aff-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.aff-facts li:nth-child(3) { border-left: 0; }
	.aff-facts li:nth-child(n + 3) { border-top: 1px solid var(--line); }
	.aff-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.aff-product:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
	.aff-facts b { font-size: 22px; }
	.aff-pick-bar { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* ── Affiliate program page (/affiliates/) ────────── */
.afl-hero h1 { max-width: 17ch; margin-inline: auto; font-size: clamp(36px, 5vw, 60px); }
.afl-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.afl-ctas .btn { padding: 14px 24px; }

/* plugins */
.afl-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.afl-plugin { display: grid; align-content: start; gap: 8px; padding: 22px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s, border-color .2s, box-shadow .2s; }
.afl-plugin:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); box-shadow: var(--shadow); }
.afl-plugin img { width: 48px; height: 48px; margin-bottom: 6px; padding: 6px; border-radius: 13px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.afl-plugin h3 { font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.afl-plugin p { font-size: 14px; color: var(--muted); }
.afl-plugin-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13.5px; font-weight: 600; }
.afl-plugin-links a:first-child { display: inline-flex; align-items: center; gap: 5px; color: var(--brand-ink); }
.afl-plugin-links a:first-child .ico { width: 14px; height: 14px; transition: transform .2s; }
.afl-plugin-links a:first-child:hover .ico { transform: translateX(3px); }
.afl-plugin-links a + a { color: var(--muted); }
.afl-plugin-links a + a:hover { color: var(--ink); }

/* how it works: a real sequence */
.afl-steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.afl-steps::before { content: ""; position: absolute; top: 24px; left: 12%; right: 12%; border-top: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); }
.afl-steps li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; }
.afl-num { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--brand); color: var(--brand-ink); font-size: 18px; font-weight: 800; box-shadow: 0 0 0 6px var(--tint); }
.afl-steps h3 { font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.afl-steps p { max-width: 30ch; font-size: 14.5px; color: var(--muted); }

/* ways and rules */
.afl-ways { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 32px; padding: 0; list-style: none; }
.afl-ways li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.afl-ways .ico { width: 17px; height: 17px; color: var(--brand-ink); }
.afl-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 980px; margin: 0 auto; }
.afl-rule { padding: 24px 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.afl-rule h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 18px; font-weight: 700; }
.afl-rule h3 .ico { width: 30px; height: 30px; padding: 6px; border-radius: 50%; }
.afl-do h3 .ico { color: #15803d; background: color-mix(in srgb, #22c55e 15%, var(--surface)); }
.afl-dont h3 .ico { color: #d93f44; background: color-mix(in srgb, #ef4444 13%, var(--surface)); transform: rotate(45deg); }
.afl-rule ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.afl-rule li { position: relative; padding-left: 18px; font-size: 15px; color: var(--ink-2); }
.afl-rule li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; }
.afl-do li::before { background: #22c55e; }
.afl-dont li::before { background: #ef4444; }

/* FAQ side links */
.afl-side { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.afl-side-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; transition: background .2s; }
.afl-side-row:hover { background: var(--surface-2); }
.afl-side-row .tile { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 13%, var(--surface)); }
.afl-side-row .tile .ico { width: 20px; height: 20px; }
.afl-side-row > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 1px; }
.afl-side-row b { font-size: 15px; font-weight: 700; color: var(--ink); }
.afl-side-row small { font-size: 13.5px; color: var(--muted); }
.afl-side-row .go { width: 17px; height: 17px; flex: none; color: var(--brand-ink); transition: transform .2s; }
.afl-side-row:hover .go { transform: translateX(3px); }

@media (max-width: 1100px) {
	.afl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.afl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
	.afl-steps::before { display: none; }
}
@media (max-width: 760px) {
	.afl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.afl-plugin:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.afl-rules { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
	.afl-steps { grid-template-columns: 1fr; }
	.afl-ctas .btn { flex: 1 1 100%; justify-content: center; }
}

/* commission per plugin */
.aff-rate { display: inline-block; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--brand)) 13%, var(--surface)); color: color-mix(in srgb, var(--c, var(--brand)) 75%, var(--ink)); font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.afl-plugin { position: relative; }
.afl-plugin .aff-rate { position: absolute; top: 20px; right: 18px; }
.aff-product .aff-rate { margin-top: 2px; }
