/* ===== REFERRAL PAGE ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.referral-page {
    background: var(--bg, #ffffff);
    color: var(--text, #0f172a);
}

.referral-page .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line, rgba(17, 24, 39, 0.12));
}

.referral-page .btn,
.referral-page .nav-cta {
    border-radius: 0;
}

.referral-page .nav-referral-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #0f172a;
}

.referral-page .btn-login.nav-referral-cta:hover {
    background: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.referral-page .nav-referral-cta__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 13px;
    height: 13px;
    color: #0f172a;
}

.referral-page .nav-referral-cta__icon svg {
    display: block;
    width: 13px;
    height: 13px;
    stroke: currentColor;
}

/* Align nav/hero/body left edge with picobean logo */
.referral-page .nav-container,
.referral-page .referral-hero__inner,
.referral-page .referral-main .referral-grid {
    max-width: 1120px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 28px;
    padding-right: 28px;
    box-sizing: border-box;
}

.referral-page .nav-container {
    padding-top: 4px;
    padding-bottom: 4px;
}

.referral-hero {
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
    color: #f8fafc;
    padding: 44px 0 48px;
}

.referral-hero::before {
    display: none;
}

.referral-hero__inner {
    position: relative;
}

.referral-hero__badge {
    display: inline-block;
    padding: 5px 12px;
    margin-bottom: 12px;
    border-radius: 0;
    background: var(--gradient-hero, linear-gradient(135deg, hsl(220, 80%, 56%) 0%, hsl(250, 76%, 62%) 100%));
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.referral-hero__title {
    max-width: 720px;
    margin: 0;
    font-size: clamp(1.25rem, 2.8vw, 1.75rem);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.referral-hero__title-line {
    display: block;
}

.referral-hero__em {
    color: inherit;
    -webkit-text-fill-color: currentColor;
    background-image: var(--gradient-hero, linear-gradient(135deg, hsl(220, 80%, 56%) 0%, hsl(250, 76%, 62%) 100%));
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    padding-bottom: 2px;
}

@media (prefers-reduced-motion: no-preference) {
    .referral-hero__title .referral-hero__em {
        animation: referral-hero-underline 0.55s ease forwards;
    }

    .referral-hero__title .referral-hero__em:nth-of-type(1) {
        animation-delay: 0.15s;
    }

    .referral-hero__title .referral-hero__em:nth-of-type(2) {
        animation-delay: 0.4s;
    }

    .referral-hero__title .referral-hero__em:nth-of-type(3) {
        animation-delay: 0.65s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .referral-hero__em {
        background-size: 100% 2px;
    }
}

@keyframes referral-hero-underline {
    to {
        background-size: 100% 2px;
    }
}

.referral-hero__subtitle {
    max-width: 720px;
    margin: 12px 0 0;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.02em;
    color: #cbd5e1;
}

.referral-hero__subtitle-line {
    display: block;
}

.referral-main {
    width: 100%;
    padding: 40px 0 80px;
    background: var(--bg-soft, #f7f9ff);
}

.referral-grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
    gap: 48px;
    align-items: start;
}

.referral-info {
    min-width: 0;
    overflow-wrap: anywhere;
}

.referral-form-card {
    min-width: 0;
    width: 100%;
    padding: 28px 24px 24px;
    border-radius: 0;
    background: var(--card, #ffffff);
    border: 1px solid var(--line, rgba(17, 24, 39, 0.12));
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.referral-pain-points {
    margin-bottom: 28px;
}

.referral-section__title {
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text, #0f172a);
}

.referral-pain-points__list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.65;
    color: var(--text, #0f172a);
}

.referral-pain-points__list li {
    position: relative;
    padding-left: 28px;
}

.referral-pain-points__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='10' cy='10' r='10' fill='%232563eb'/%3E%3Cpath d='M6 10.2l2.4 2.4L14 7.2' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.referral-pain-points__list li + li {
    margin-top: 10px;
}

.referral-pain-points__hl {
    background: rgba(251, 146, 60, 0.22);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    padding: 0 3px;
}

.referral-pain-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
    margin-bottom: 36px;
}

.referral-pain-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.referral-pain-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 0;
    background: var(--text, #0f172a);
    color: #fff;
}

.referral-pain-item__icon svg {
    width: 24px;
    height: 24px;
}

.referral-pain-item__label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text, #0f172a);
}

.referral-benefit-card {
    overflow: hidden;
    width: 100%;
    max-width: none;
    border-radius: 0;
    background: var(--card, #ffffff);
    border: 1px solid var(--line, rgba(17, 24, 39, 0.12));
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.referral-benefit-card__head {
    padding: 12px 16px;
    background: var(--gradient-hero, linear-gradient(135deg, hsl(220, 80%, 56%) 0%, hsl(250, 76%, 62%) 100%));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.referral-benefit-card__body {
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    color: var(--text, #0f172a);
}

.referral-info__terms {
    margin-top: 20px;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.52);
    line-height: 1.6;
}

.referral-form-section + .referral-form-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--line, rgba(17, 24, 39, 0.12));
}

.referral-form-section--collapsible {
    padding-top: 0;
    margin-bottom: 4px;
}

.referral-form-section__toggle {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    font: inherit;
    text-align: left;
    color: inherit;
    cursor: pointer;
}

.referral-form-section__toggle:focus-visible {
    outline: 2px solid var(--brand-a, #4f46e5);
    outline-offset: 3px;
    border-radius: 0;
}

.referral-form-section__toggle-main {
    flex: 1;
    min-width: 0;
}

.referral-form-section__toggle .referral-form-section__title {
    display: block;
    margin-bottom: 6px;
}

.referral-form-section__toggle .referral-form-section__desc {
    margin-bottom: 0;
}

.referral-form-section__chevron {
    display: inline-flex;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--muted, rgba(15, 23, 42, 0.7));
    transition: transform 0.2s ease;
}

.referral-form-section__chevron svg {
    width: 18px;
    height: 18px;
}

.referral-form-section--collapsible:not(.is-collapsed) .referral-form-section__chevron {
    transform: rotate(180deg);
}

.referral-form-section__panel {
    padding-top: 18px;
}

.referral-form-section__panel[hidden] {
    display: none;
}

.referral-form-section__title {
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text, #0f172a);
}

.referral-form-section__desc {
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--muted, rgba(15, 23, 42, 0.7));
    line-height: 1.5;
}

.referral-field {
    margin-bottom: 14px;
}

.referral-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text, #0f172a);
}

.referral-field label .required {
    color: #ef4444;
}

.referral-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    font: inherit;
    font-size: 14px;
    color: var(--text, #0f172a);
    background: var(--card, #ffffff);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.referral-field input::placeholder {
    color: rgba(15, 23, 42, 0.45);
}

.referral-field input:focus {
    outline: none;
    border-color: var(--brand-a, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.referral-submit {
    width: 100%;
    margin-top: 28px;
    padding: 14px 20px;
    border: none;
    border-radius: 0;
    background: #e2e8f0;
    color: #94a3b8;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: not-allowed;
    transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.referral-submit.is-ready {
    background: var(--gradient-hero, linear-gradient(135deg, hsl(220, 80%, 56%) 0%, hsl(250, 76%, 62%) 100%));
    color: #fff;
    cursor: pointer;
}

.referral-submit.is-ready:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.24);
}

.referral-submit:focus-visible {
    outline: 2px solid var(--brand-a, #4f46e5);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .referral-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .referral-form-card {
        order: 2;
    }
}

@media (max-width: 480px) {
    .referral-page .nav-container,
    .referral-page .referral-hero__inner,
    .referral-page .referral-main .referral-grid {
        padding-left: 20px;
        padding-right: 20px;
    }

    .referral-hero {
        padding: 32px 0 36px;
    }

    .referral-main {
        padding: 28px 0 64px;
    }

    .referral-pain-grid {
        gap: 12px;
    }

    .referral-pain-item__icon {
        width: 48px;
        height: 48px;
    }
}
