/*
    Public affiliate programme page (/affiliate-program).

    Written only against the shared brand variables (--primary*, --primaryGray*, --white), each with
    a fallback, so the page is themed by whichever brand stylesheet is loaded and a brand that later
    gets its own partner page needs no CSS of its own.
*/

.ap {
    --apInk: var(--primaryGray01, #1C1E21);
    --apMuted: var(--primaryGray03, #65676B);
    --apLine: color-mix(in srgb, var(--primaryGray05, #BCC0C4) 55%, var(--white, #fff));
    --apBrand: var(--primary, #0064E0);
    --apBrandDeep: var(--primaryDark05, #003270);
    --apBrandHover: var(--primaryDark01, #005ACA);
    --apTint: var(--primaryLight10, #F2F7FD);
    --apTintStrong: var(--primaryLight09, #E6F0FC);
    --apCard: var(--white, #fff);
    --apAccent: var(--brandAccent, #ECA20A);
    --apRadius: 14px;
    --apShadow: 0 1px 2px color-mix(in srgb, var(--black, #000) 6%, transparent), 0 8px 24px color-mix(in srgb, var(--black, #000) 5%, transparent);
    color: var(--apInk);
    font-size: 15px;
    line-height: 1.6;
    /* clip, not hidden: hidden makes .ap a scroll container and breaks the sticky form intro. */
    overflow-x: clip;
}

.ap *,
.ap *::before,
.ap *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.ap #apply,
.ap #how-it-works {
    scroll-margin-top: 90px;
}

.ap h1,
.ap h2,
.ap h3 {
    font-family: var(--fontFamilyHead, inherit), arial, sans-serif;
    color: var(--apInk);
    margin: 0;
}

.ap p {
    margin: 0;
}

/* ---------- Buttons ---------- */

.apBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.apBtn:hover,
.apBtn:focus {
    text-decoration: none;
}

.apBtn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--apBrand) 45%, transparent);
    outline-offset: 2px;
}

.apBtnPrimary {
    background: var(--apBrand);
    color: var(--white, #fff);
}

.apBtnPrimary:hover,
.apBtnPrimary:focus {
    background: var(--apBrandHover);
    color: var(--white, #fff);
}

.apBtnPrimary:active {
    transform: translateY(1px);
}

.apBtnPrimary[disabled] {
    opacity: .7;
    cursor: progress;
}

.apBtnGhost {
    background: var(--apCard);
    border-color: var(--apLine);
    color: var(--apInk);
}

.apBtnGhost:hover,
.apBtnGhost:focus {
    border-color: var(--apBrand);
    color: var(--apBrand);
}

.apBtnLight {
    background: var(--white, #fff);
    color: var(--apBrandDeep);
}

.apBtnLight:hover,
.apBtnLight:focus {
    background: var(--apTintStrong);
    color: var(--apBrandDeep);
}

/* ---------- Hero ---------- */

.apHero {
    padding: 56px 0 48px;
    background:
        radial-gradient(1100px 420px at 85% -10%, color-mix(in srgb, var(--apBrand) 12%, transparent), transparent 70%),
        linear-gradient(180deg, var(--apTint) 0%, var(--apCard) 100%);
}

.apHeroGrid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.apEyebrow {
    display: inline-block;
    margin-bottom: 16px;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--apTintStrong);
    border: 1px solid color-mix(in srgb, var(--apBrand) 22%, transparent);
    color: var(--apBrandDeep);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
}

.apHeroTitle {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.01em;
    text-wrap: balance;
}

.apHighlight {
    color: var(--apBrand);
    white-space: nowrap;
}

.apHeroLead {
    margin-top: 18px;
    max-width: 560px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--apMuted);
}

.apHeroActions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    margin-bottom: 6px;
}

.apHeroNote {
    margin-top: 16px;
    font-size: 13px;
    color: var(--apMuted);
}

.apHeroCard {
    background: var(--apCard);
    border: 1px solid var(--apLine);
    border-radius: 20px;
    box-shadow: var(--apShadow);
    padding: 26px 28px;
}

.apHeroCardHead {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--apMuted);
    margin-bottom: 8px;
}

.apGlance {
    margin: 0;
}

.apGlanceRow {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--apLine);
}

.apGlanceRow:first-child {
    border-top: 0;
}

.apGlance dt {
    font-size: 13px;
    font-weight: 600;
    color: var(--apMuted);
}

.apGlance dd {
    margin: 0;
    font-size: 15px;
    color: var(--apInk);
}

.apGlance dd strong {
    color: var(--apBrandDeep);
}

/* ---------- Proof strip ---------- */

.apProof {
    border-top: 1px solid var(--apLine);
    border-bottom: 1px solid var(--apLine);
    background: var(--apCard);
}

.apProofList {
    list-style: none;
    margin: 0;
    padding: 22px 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    text-align: center;
}

.apProofList li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.apProofList strong {
    font-family: var(--fontFamilyHead, inherit), arial, sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--apBrandDeep);
    font-variant-numeric: tabular-nums;
}

.apProofList span {
    font-size: 13px;
    color: var(--apMuted);
}

/* ---------- Sections ---------- */

.apSection {
    padding: 72px 0;
    background: var(--apCard);
}

.apSectionTint {
    background: var(--apTint);
}

.apSectionHead {
    max-width: 720px;
    margin: 0 auto 36px;
    text-align: center;
}

.apH2 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    text-wrap: balance;
}

.apH3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.apSectionLead {
    margin-top: 12px !important;
    font-size: 16px;
    color: var(--apMuted);
}

.apGrid {
    display: grid;
    gap: 20px;
}

.apGrid3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.apCard,
.apFit {
    background: var(--apCard);
    border: 1px solid var(--apLine);
    border-radius: var(--apRadius);
    padding: 26px;
}

.apCard p,
.apFit p {
    margin-top: 8px;
    color: var(--apMuted);
}

.apIcon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--apTintStrong);
    color: var(--apBrand);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.apIcon svg {
    width: 22px;
    height: 22px;
}

.apFit {
    border-left: 4px solid var(--apBrand);
}

/* ---------- Steps ---------- */

.apSteps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    counter-reset: none;
}

.apStep {
    position: relative;
    background: var(--apCard);
    border: 1px solid var(--apLine);
    border-radius: var(--apRadius);
    padding: 24px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: start;
    align-items: center;
    column-gap: 14px;
}

.apStep p {
    margin-top: 8px;
    color: var(--apMuted);
    grid-column: 1 / -1;
}

.apStepNo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--apBrand);
    color: var(--white, #fff);
    font-weight: 800;
}

/* ---------- Benefits ---------- */

.apBenefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.apBenefits li {
    position: relative;
    background: var(--apCard);
    border: 1px solid var(--apLine);
    border-radius: var(--apRadius);
    padding: 22px 22px 22px 56px;
}

.apBenefits li::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 25px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--apBrand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.apBenefits strong {
    display: block;
    font-size: 16px;
    color: var(--apInk);
}

.apBenefits span {
    display: block;
    margin-top: 4px;
    color: var(--apMuted);
}

/* ---------- Apply ---------- */

.apApply {
    background:
        radial-gradient(900px 380px at 0% 0%, color-mix(in srgb, var(--apBrand) 8%, transparent), transparent 70%),
        var(--apCard);
}

.apApplyGrid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 48px;
    align-items: start;
}

.apApplyIntro {
    position: sticky;
    top: 100px;
}

.apChecks {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
}

.apChecks li {
    position: relative;
    padding: 6px 0 6px 30px;
}

.apChecks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--apTintStrong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230064E0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.apEmailAlt {
    margin-top: 24px !important;
    padding-top: 20px;
    border-top: 1px solid var(--apLine);
    color: var(--apMuted);
}

.apEmailAlt a,
.apFine a {
    color: var(--apBrand);
    font-weight: 600;
}

.apFormCard {
    background: var(--apCard);
    border: 1px solid var(--apLine);
    border-radius: 20px;
    box-shadow: var(--apShadow);
    padding: 32px;
}

.apRow {
    display: grid;
    gap: 16px;
}

.apRow2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.apField {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    min-width: 0;
}

.apField label {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--apInk);
}

.apReq {
    color: var(--apBrand);
}

.apField input,
.apField select,
.apField textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid color-mix(in srgb, var(--primaryGray04, #8A8D91) 70%, var(--white, #fff));
    border-radius: 10px;
    background: var(--white, #fff);
    color: var(--apInk);
    font: inherit;
    font-size: 16px; /* 16px stops iOS zooming into the field on focus. */
    transition: border-color .15s ease, box-shadow .15s ease;
}

.apField textarea {
    resize: vertical;
    min-height: 92px;
}

.apField input:hover,
.apField select:hover,
.apField textarea:hover {
    border-color: var(--primaryGray03, #65676B);
}

.apField input:focus,
.apField select:focus,
.apField textarea:focus {
    outline: none;
    border-color: var(--apBrand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--apBrand) 20%, transparent);
}

.apField [aria-invalid="true"] {
    border-color: #C62828;
}

.apFieldError {
    margin-top: 5px;
    font-size: 13px;
    color: #C62828;
}

.apFieldError:empty {
    display: none;
}

.apFormError {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #FDECEA;
    border: 1px solid #F0B3AC;
    color: #8B1D14;
    font-size: 14px;
}

.apOptional {
    margin: 6px 0 8px;
    padding-top: 18px;
    border-top: 1px dashed var(--apLine);
}

.apOptionalHead {
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--apMuted);
}

.apSubmit {
    width: 100%;
    margin-top: 4px;
}

.apFine {
    margin-top: 14px !important;
    font-size: 13px;
    color: var(--apMuted);
    text-align: center;
}

/* Honeypot: present for bots, invisible and unreachable for people. */
.apTrap {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.apSuccess {
    text-align: center;
    padding: 24px 8px;
}

.apSuccess:focus {
    outline: none;
}

.apSuccess p {
    margin: 10px auto 22px;
    max-width: 420px;
    color: var(--apMuted);
}

.apSuccessIcon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #E8F6ED;
    color: #1B5E32;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apSuccessIcon svg {
    width: 28px;
    height: 28px;
}

/* ---------- FAQ ---------- */

.apFaq {
    max-width: 820px;
    margin: 0 auto;
}

.apFaqItem {
    background: var(--apCard);
    border: 1px solid var(--apLine);
    border-radius: 12px;
    margin-bottom: 12px;
}

.apFaqItem summary {
    position: relative;
    list-style: none;
    padding: 18px 52px 18px 22px;
    font-weight: 700;
    cursor: pointer;
}

.apFaqItem summary::-webkit-details-marker {
    display: none;
}

.apFaqItem summary::after {
    content: "+";
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    font-weight: 400;
    color: var(--apBrand);
}

.apFaqItem[open] summary::after {
    content: "\2212";
}

.apFaqItem summary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--apBrand) 45%, transparent);
    outline-offset: 2px;
    border-radius: 12px;
}

.apFaqItem p {
    padding: 0 22px 20px;
    color: var(--apMuted);
}

/* ---------- Closing CTA ---------- */

.apClose {
    padding: 64px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--apBrandDeep) 0%, var(--apBrand) 100%);
    color: var(--white, #fff);
}

.apClose .apCloseTitle {
    max-width: 720px;
    margin: 0 auto;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--white, #fff);
    text-wrap: balance;
}

.apClose p {
    margin: 12px 0 26px;
    font-size: 16px;
    color: color-mix(in srgb, var(--white, #fff) 85%, transparent);
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .apHeroGrid,
    .apApplyGrid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .apApplyIntro {
        position: static;
    }

    .apGrid3,
    .apBenefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apSteps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apHeroTitle {
        font-size: 38px;
    }
}

@media (max-width: 767px) {
    .ap {
        font-size: 15px;
    }

    .apHero {
        padding: 36px 10px 32px;
    }

    .apHeroTitle {
        font-size: 30px;
    }

    .apHeroLead {
        font-size: 16px;
    }

    .apHeroActions .apBtn {
        flex: 1 1 100%;
    }

    .apHeroCard {
        padding: 20px;
    }

    .apGlanceRow {
        grid-template-columns: 92px 1fr;
    }

    .apProofList {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 20px;
    }

    .apProofList strong {
        font-size: 22px;
    }

    .apSection {
        padding: 48px 10px;
    }

    .apSectionHead {
        margin-bottom: 26px;
    }

    .apH2 {
        font-size: 25px;
    }

    .apGrid3,
    .apBenefits,
    .apSteps,
    .apRow2 {
        grid-template-columns: 1fr;
    }

    .apRow2 {
        gap: 0;
    }

    .apCard,
    .apFit,
    .apStep {
        padding: 20px;
    }

    .apFormCard {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .apClose {
        padding: 48px 10px;
    }

    .apClose .apCloseTitle {
        font-size: 24px;
    }
}
