.referral-page {
    --referral-blue: #0055ff;
    --referral-text: #12213a;
    --referral-heading: #16264a;
    --referral-muted: #64728a;
    --referral-line: #e5ebf3;
    --referral-surface: #f7f8fa;
    color: var(--referral-text);
    font-family: "Alibaba PuHuiTi 3.0", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    letter-spacing: 0;
}

.referral-page * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.referral-page *::before,
.referral-page *::after {
    box-sizing: border-box;
}

.referral-container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.referral-section {
    padding: 60px 0;
    background: #fff;
}

.referral-section--muted {
    background: var(--referral-surface);
}

.referral-section__header {
    margin-bottom: 36px;
    text-align: center;
}

.referral-section__header h2,
.referral-final-cta h2 {
    color: var(--referral-heading);
    font-size: 36px;
    font-weight: 500;
    line-height: 48px;
}

.referral-section__header p {
    margin-top: 8px;
    color: var(--referral-muted);
    font-size: 16px;
    line-height: 26px;
}

.referral-hero {
    min-height: 473px;
    padding: 74px 0 60px;
    background:
        radial-gradient(circle at 50% -30%, rgba(153, 231, 255, 0.72), transparent 42%),
        radial-gradient(circle at 81% 0%, rgba(255, 245, 156, 0.24), transparent 28%),
        radial-gradient(circle at 34% 110%, rgba(255, 185, 236, 0.2), transparent 32%),
        #eef6ff;
}

.referral-hero__content {
    max-width: 780px;
    text-align: center;
}

.referral-eyebrow {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border: 1px solid var(--referral-blue);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.3);
    color: var(--referral-blue);
    font-size: 16px;
    line-height: 20px;
}

.referral-hero h1 {
    margin-top: 12px;
    color: var(--referral-heading);
    font-size: 58px;
    font-weight: 700;
    line-height: 70px;
}

.referral-hero__lead {
    margin-top: 8px;
    color: var(--referral-muted);
    font-size: 18px;
    line-height: 26px;
}

.referral-hero__benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 28px;
    margin-top: 18px;
    color: #3b7dff;
    font-size: 16px;
    line-height: 22px;
}

.referral-hero__benefits li {
    position: relative;
    padding-left: 12px;
    line-height: 22px;
}

.referral-hero__benefits li::before {
    position: absolute;
    top: 9px;
    left: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.referral-actions {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 50px;
}

.referral-button {
    display: inline-flex;
    min-width: 150px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 25px;
    border-radius: 36px;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.referral-button:hover {
    transform: translateY(-1px);
}

.referral-button:active {
    transform: scale(0.97);
}

.referral-button--primary {
    background: linear-gradient(90deg, #4784ff 12%, #f15bff 100%);
    box-shadow: 0 8px 18px rgba(71, 132, 255, 0.18);
    color: #fff;
}

.referral-button--secondary {
    border: 1px solid var(--referral-blue);
    background: rgba(255, 255, 255, 0.42);
    color: var(--referral-blue);
}

.referral-button--large {
    min-width: 230px;
    min-height: 52px;
    border-radius: 8px;
    font-size: 24px;
}

.referral-hero__note {
    margin-top: 40px;
    color: var(--referral-muted);
    font-size: 12px;
    line-height: 18px;
}

.referral-pain-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.referral-pain-card {
    min-height: 135px;
    padding: 26px 25px;
    border: 1px solid var(--referral-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 17px rgba(31, 49, 91, 0.05);
}

.referral-pain-card h3 {
    color: var(--referral-blue);
    font-size: 18px;
    font-weight: 500;
    line-height: 26px;
}

.referral-pain-card p {
    margin-top: 9px;
    color: var(--referral-muted);
    font-size: 14px;
    line-height: 24px;
}

.referral-fit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.referral-fit-panel {
    min-height: 335px;
    padding: 30px;
    border: 1px solid var(--referral-line);
    border-radius: 8px;
    background: #fff;
}

.referral-fit-panel h3 {
    color: var(--referral-blue);
    font-size: 24px;
    font-weight: 500;
    line-height: 34px;
}

.referral-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.referral-chips span {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 8px 13px;
    border-radius: 6px;
    background: #f2f6ff;
    color: #536078;
    font-size: 14px;
    line-height: 24px;
}

.referral-fit-panel__note {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 6px;
    background: #f3f5ff;
    color: var(--referral-blue);
    font-size: 14px;
    line-height: 24px;
}

.referral-reward-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.referral-reward-card {
    position: relative;
    min-height: 174px;
    padding: 38px 20px 26px;
    border: 1px solid #dbe5ff;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.referral-reward-card--featured {
    border-color: #e773ff;
    box-shadow: 0 8px 24px rgba(150, 73, 255, 0.08);
}

.referral-reward-card__flag {
    position: absolute;
    top: -1px;
    left: 50%;
    min-width: 98px;
    padding: 4px 12px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(90deg, #4784ff, #f15bff);
    color: #fff;
    font-size: 12px;
    line-height: 16px;
    transform: translateX(-50%);
}

.referral-reward-card h3,
.referral-reward-card > p:last-child {
    color: var(--referral-muted);
    font-size: 14px;
    line-height: 24px;
}

.referral-reward-card__amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    color: var(--referral-blue);
}

.referral-reward-card__amount strong {
    font-size: 42px;
    font-weight: 700;
    line-height: 54px;
}

.referral-reward-card__amount span {
    margin-left: 3px;
    font-size: 18px;
}

.referral-extra-reward {
    display: flex;
    min-height: 94px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 20px;
    padding: 20px 28px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0f5ff 0%, #fbf0ff 100%);
}

.referral-extra-reward h3 {
    color: var(--referral-heading);
    font-size: 20px;
    font-weight: 500;
    line-height: 30px;
}

.referral-extra-reward p {
    color: var(--referral-muted);
    font-size: 14px;
    line-height: 24px;
}

.referral-criteria {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
    color: var(--referral-muted);
    font-size: 13px;
    text-align: center;
}

.referral-criteria li {
    position: relative;
    line-height: 24px;
}

.referral-criteria li:not(:last-child)::after {
    position: absolute;
    top: 7px;
    right: 0;
    width: 1px;
    height: 10px;
    background: #d8dff0;
    content: "";
}

.referral-process-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.referral-process-card {
    position: relative;
    min-height: 190px;
    padding: 25px;
    border: 1px solid var(--referral-line);
    border-radius: 8px;
    background: #fff;
}

.referral-process-card:not(:last-child)::after {
    position: absolute;
    top: 92px;
    right: -20px;
    z-index: 2;
    width: 22px;
    height: 6px;
    background: url("../../images/referral-officer/flow-arrow.svg") center / 22px 6px no-repeat;
    content: "";
}

.referral-process-card > span {
    display: block;
    color: #d8dff0;
    font-size: 32px;
    font-weight: 700;
    line-height: 34px;
}

.referral-process-card h3 {
    margin-top: 20px;
    color: var(--referral-blue);
    font-size: 24px;
    font-weight: 500;
    line-height: 31px;
}

.referral-process-card p {
    margin-top: 8px;
    color: var(--referral-muted);
    font-size: 14px;
    line-height: 24px;
}

.referral-value-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.referral-value-card {
    min-height: 146px;
    padding: 30px;
    border-radius: 8px;
}

.referral-value-card--voice {
    background: linear-gradient(180deg, #c4ebff 0%, #f3feff 100%);
}

.referral-value-card--discovery {
    background: linear-gradient(180deg, #ffe8c6 0%, #fffff5 100%);
}

.referral-value-card--decision {
    background: linear-gradient(180deg, #f0dcff 0%, #f4f4ff 100%);
}

.referral-value-card h3 {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 24px;
    font-weight: 500;
    line-height: 35px;
}

.referral-value-card--voice h3 { color: var(--referral-blue); }
.referral-value-card--discovery h3 { color: #ff7c18; }
.referral-value-card--decision h3 { color: #7c30ff; }

.referral-value-card h3 img {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    object-fit: contain;
}

.referral-value-card p {
    margin-top: 14px;
    color: var(--referral-muted);
    font-size: 14px;
    line-height: 23px;
}

.referral-value__note {
    margin-top: 24px;
    color: var(--referral-muted);
    font-size: 12px;
    line-height: 26px;
    text-align: center;
}

.referral-join {
    scroll-margin-top: 80px;
}

.referral-join__grid {
    display: grid;
    grid-template-columns: 428px minmax(0, 1fr);
    gap: 30px;
}

.referral-join__intro,
.referral-application-form {
    min-height: 436px;
    border-radius: 8px;
}

.referral-join__intro {
    padding: 44px 32px;
    background: linear-gradient(145deg, #2966ef 0%, #71a8ff 100%);
    color: #fff;
}

.referral-join__intro h2 {
    font-size: 32px;
    font-weight: 500;
    line-height: 48px;
}

.referral-join__intro > p {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 24px;
}

.referral-join__intro ul {
    display: grid;
    gap: 24px;
    margin-top: 42px;
}

.referral-join__intro li {
    position: relative;
    padding-left: 12px;
}

.referral-join__intro li::before {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    width: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.62);
    content: "";
}

.referral-join__intro li strong,
.referral-join__intro li span {
    display: block;
}

.referral-join__intro li strong {
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.referral-join__intro li span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 22px;
}

.referral-application-form {
    display: flex;
    flex-direction: column;
    padding: 27px 37px 37px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(27, 52, 105, 0.06);
}

.referral-form__title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.referral-form__title h2 {
    color: var(--referral-heading);
    font-size: 30px;
    font-weight: 500;
    line-height: 48px;
}

.referral-form__title p {
    color: var(--referral-muted);
    font-size: 14px;
    line-height: 22px;
}

.referral-form__subheading {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 26px;
}

.referral-form__subheading strong {
    color: var(--referral-heading);
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
}

.referral-form__subheading span {
    color: #8a95a8;
    font-size: 12px;
    line-height: 20px;
}

.referral-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 30px;
    margin-top: 22px;
}

.referral-form__grid label > span {
    display: block;
    margin-bottom: 4px;
    color: var(--referral-heading);
    font-size: 14px;
    line-height: 22px;
}

.referral-form__grid input {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #dfe5ee;
    border-radius: 5px;
    background: #fff;
    color: var(--referral-heading);
    font-size: 14px;
    line-height: 36px;
}

.referral-form__grid input::placeholder {
    color: #a6afbd;
}

.referral-form__grid input:focus {
    border: 1px solid var(--referral-blue);
    box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.1);
}

.referral-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    color: var(--referral-muted);
    font-size: 12px;
    line-height: 20px;
}

.referral-consent input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
    border: 1px solid #b7c0ce;
    border-radius: 3px;
    appearance: auto;
    -webkit-appearance: checkbox;
}

.referral-consent a,
.referral-privacy-trigger {
    display: inline;
    padding: 0;
    background: transparent;
    color: var(--referral-blue);
    font: inherit;
    line-height: inherit;
}

.referral-form__submit {
    width: 100%;
    height: 52px;
    margin-top: auto;
    border-radius: 8px;
    background: linear-gradient(90deg, #4784ff 12%, #f15bff 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    transition: transform 160ms ease, opacity 160ms ease;
}

.referral-form__submit:active {
    transform: scale(0.985);
}

.referral-form__submit:disabled {
    cursor: wait;
    opacity: 0.68;
}

.referral-form__honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

.referral-faq {
    scroll-margin-top: 80px;
}

.referral-faq__list details {
    border-bottom: 1px solid #ebeef5;
}

.referral-faq__list summary {
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 12px;
    padding: 20px;
    color: var(--referral-text);
    font-size: 18px;
    font-weight: 500;
    line-height: 32px;
    cursor: pointer;
    list-style: none;
}

.referral-faq__list summary::-webkit-details-marker {
    display: none;
}

.referral-faq__list summary img {
    width: 7px;
    height: 12px;
    flex: 0 0 7px;
    margin-left: auto;
    object-fit: contain;
    transform: rotate(-90deg);
}

.referral-faq__list details[open] summary {
    color: var(--referral-blue);
}

.referral-faq__list details[open] summary img {
    transform: rotate(90deg);
}

.referral-faq__list details > p {
    padding: 0 52px 20px 20px;
    color: var(--referral-muted);
    font-size: 16px;
    line-height: 24px;
}

.referral-final-cta {
    padding: 60px 0;
    background:
        radial-gradient(circle at 50% 110%, rgba(221, 188, 255, 0.28), transparent 40%),
        linear-gradient(90deg, #d8f7ff 0%, #e8ebff 50%, #e8f1ff 100%);
    text-align: center;
}

.referral-final-cta p {
    margin-top: 12px;
    color: var(--referral-muted);
    font-size: 16px;
    line-height: 24px;
}

.referral-final-cta .referral-button {
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .referral-pain-grid,
    .referral-reward-grid,
    .referral-value-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .referral-process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .referral-process-card:nth-child(2)::after {
        display: none;
    }

    .referral-join__grid {
        grid-template-columns: 36% minmax(0, 1fr);
    }

    .referral-form__title {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}

@media (max-width: 768px) {
    .referral-container {
        width: min(560px, calc(100% - 32px));
    }

    .referral-section {
        padding: 44px 0;
    }

    .referral-section__header {
        margin-bottom: 28px;
        text-align: left;
    }

    .referral-section__header h2,
    .referral-final-cta h2 {
        font-size: 28px;
        line-height: 38px;
    }

    .referral-section__header p {
        margin-top: 10px;
        font-size: 15px;
        line-height: 24px;
    }

    .referral-hero {
        min-height: 0;
        padding: 48px 0 38px;
    }

    .referral-hero h1 {
        margin-top: 16px;
        font-size: 38px;
        line-height: 48px;
    }

    .referral-hero__lead {
        margin-top: 12px;
        font-size: 16px;
        line-height: 26px;
    }

    .referral-hero__benefits {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        width: max-content;
        max-width: 100%;
        margin: 22px auto 0;
        text-align: left;
    }

    .referral-actions {
        gap: 12px;
        margin-top: 32px;
    }

    .referral-button {
        min-width: 0;
        flex: 1;
        padding: 9px 16px;
    }

    .referral-hero__note {
        margin-top: 28px;
    }

    .referral-pain-grid,
    .referral-fit-grid,
    .referral-reward-grid,
    .referral-value-grid,
    .referral-join__grid {
        grid-template-columns: 1fr;
    }

    .referral-pain-card,
    .referral-fit-panel {
        min-height: 0;
    }

    .referral-fit-panel {
        padding: 24px;
    }

    .referral-extra-reward {
        align-items: flex-start;
        flex-direction: column;
    }

    .referral-extra-reward .referral-button {
        width: 100%;
    }

    .referral-process-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .referral-process-card {
        min-height: 0;
    }

    .referral-process-card:not(:last-child)::after,
    .referral-process-card:nth-child(2)::after {
        display: block;
        top: auto;
        right: 50%;
        bottom: -11px;
        transform: rotate(90deg) translateY(-50%);
        transform-origin: center;
    }

    .referral-value-card {
        min-height: 0;
    }

    .referral-join__grid {
        gap: 16px;
    }

    .referral-join__intro,
    .referral-application-form {
        min-height: 0;
    }

    .referral-join__intro {
        padding: 32px 24px;
    }

    .referral-join__intro ul {
        margin-top: 30px;
    }

    .referral-application-form {
        padding: 26px 22px;
    }

    .referral-form__title h2 {
        font-size: 27px;
        line-height: 38px;
    }

    .referral-form__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .referral-form__grid input {
        height: 44px;
        font-size: 16px;
        line-height: 42px;
    }

    .referral-consent {
        margin-top: 16px;
    }

    .referral-form__submit {
        margin-top: 16px;
    }

    .referral-faq__list summary {
        min-height: 64px;
        padding: 16px 4px;
        font-size: 16px;
        line-height: 26px;
    }

    .referral-faq__list details > p {
        padding: 0 28px 18px 4px;
        font-size: 14px;
        line-height: 24px;
    }

    .referral-final-cta {
        padding: 48px 0;
    }

    .referral-final-cta .referral-button {
        width: min(230px, 100%);
    }
}

@media (max-width: 480px) {
    .referral-hero h1 {
        font-size: 34px;
        line-height: 44px;
    }

    .referral-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .referral-button {
        width: 100%;
        flex: none;
    }

    .referral-pain-card {
        padding: 22px 20px;
    }

    .referral-chips {
        gap: 8px;
    }

    .referral-chips span {
        min-height: 38px;
        padding: 7px 10px;
    }

    .referral-reward-card {
        min-height: 162px;
    }

    .referral-criteria {
        grid-template-columns: 1fr;
        gap: 4px;
        text-align: left;
    }

    .referral-criteria li {
        padding-left: 14px;
    }

    .referral-criteria li::before {
        position: absolute;
        top: 10px;
        left: 0;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: var(--referral-blue);
        content: "";
    }

    .referral-criteria li:not(:last-child)::after {
        display: none;
    }

    .referral-value-card {
        padding: 24px 20px;
    }

    .referral-value-card h3 {
        align-items: flex-start;
        font-size: 21px;
        line-height: 30px;
    }

    .referral-form__subheading {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .referral-page *,
    .referral-page *::before,
    .referral-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
