/* ==========================================================================
   PROMOCORE — AUTH
   Signup, login, recovery. Depends on promocore-manager-base.css for tokens.
   Namespace: pca-
   --------------------------------------------------------------------------
   Load order:
     1. promocore-manager-base.css
     2. promocore-auth.css
   ========================================================================== */

/* ==========================================================================
   1. SHELL
   Two panes on desktop: form left, proof right. One pane on mobile —
   the proof pane is decoration and decoration does not get to push the
   form below the fold on the device most ad traffic arrives on.
   ========================================================================== */

.pca {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr;
    background: #FDFCFD;
    background: var(--pcm-canvas);
}

.pca__form {
    display: flex;
    flex-direction: column;
    padding: 24px 20px 40px;
    padding: var(--pcm-s-6) var(--pcm-s-5) var(--pcm-s-10);
    min-width: 0;
}

.pca__inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pca__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}

    .pca__head .pcm-logo svg, .pca__head .pcm-logo img {
        height: 38px;
    }

.pca__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 0 24px;
}

.pca__foot {
    text-align: center;
    font-size: 0.8125rem;
    color: #67586A;
    color: var(--pcm-text-2);
}

    .pca__foot a {
        font-weight: 500;
    }

/* --- Proof pane --- */
.pca__aside {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    padding: 48px;
    background: #F9F0FA;
    background: var(--pcm-brand-50);
    border-left: 1px solid #E5E0E6;
    border-left: 1px solid var(--pcm-line);
}

.pca__aside-lead {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: #3F1244;
    color: var(--pcm-brand-800);
    max-width: 15em;
}

.pca__proof {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 24em;
}

.pca__proof-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pca__proof-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #FFFFFF;
    background: var(--pcm-surface);
    color: #6C2574;
    color: var(--pcm-brand-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.pca__proof-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1C161D;
    color: var(--pcm-text);
}

.pca__proof-text {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-top: 2px;
    color: #67586A;
    color: var(--pcm-text-2);
}

@media (min-width: 1024px) {
    .pca {
        grid-template-columns: 1fr 1fr;
    }

    .pca__form {
        padding: 40px;
        padding: var(--pcm-s-10);
    }

    .pca__aside {
        display: flex;
    }
}

@media (min-width: 1400px) {
    .pca {
        grid-template-columns: 560px 1fr;
    }
}


/* ==========================================================================
   2. PROGRESS
   Perceived effort collapses when people can see the end. This is the
   single highest-leverage element on the page for completion rate.
   ========================================================================== */

.pca__progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.pca__track {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: #F1EEF2;
    background: var(--pcm-ink-100);
    overflow: hidden;
}

.pca__bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #81318A;
    background: var(--pcm-accent);
    transition: width 320ms cubic-bezier(0.32, 0.72, 0, 1);
}

.pca__count {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: #817184;
    color: var(--pcm-text-3);
    white-space: nowrap;
}

.pca__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: #67586A;
    color: var(--pcm-text-2);
    padding: 4px 0;
    background: none;
    border: 0;
    cursor: pointer;
    visibility: hidden;
}

    .pca__back.is-on {
        visibility: visible;
    }

    .pca__back:hover {
        color: #1C161D;
        color: var(--pcm-text);
    }


/* ==========================================================================
   3. STEPS
   One question per screen. Only the active step is in the DOM flow, so
   nothing below the fold is ever half-visible and ambiguous.
   ========================================================================== */

.pca__step {
    display: none;
}

    .pca__step.is-active {
        display: block;
        animation: pca-in 260ms cubic-bezier(0.32, 0.72, 0, 1);
    }

@keyframes pca-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.pca__q {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #1C161D;
    color: var(--pcm-text);
    margin: 0 0 6px;
}

.pca__why {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #67586A;
    color: var(--pcm-text-2);
    margin: 0 0 24px;
}

.pca__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pca__pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 419px) {
    .pca__pair {
        grid-template-columns: 1fr;
    }
}

/* Inputs on the step screens are larger than the manager default —
   fewer of them on screen, so each one carries more weight. */
.pca .pcm-input, .pca .pcm-select {
    height: 52px;
    font-size: 1rem;
    border-radius: 12px;
}

.pca__next {
    margin-top: 24px;
}

    .pca__next .pcm-btn {
        height: 52px;
        font-size: 0.9375rem;
    }

.pca__enter {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #A396A6;
    color: var(--pcm-ink-400);
    margin-top: 12px;
}

@media (max-width: 767px) {
    .pca__enter {
        display: none;
    }
}


/* ==========================================================================
   4. TYPEAHEAD
   A 20-option <select> is a scroll wheel on a phone. Type to filter.
   ========================================================================== */

.pca__ta {
    position: relative;
}

.pca__ta-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    background: #FFFFFF;
    background: var(--pcm-surface);
    border: 1px solid #E5E0E6;
    border: 1px solid var(--pcm-line);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(28,22,29,.08), 0 16px 40px -12px rgba(28,22,29,.16);
    box-shadow: var(--pcm-shadow-pop);
    z-index: 20;
    display: none;
}

    .pca__ta-list.is-open {
        display: block;
    }

.pca__ta-opt {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9375rem;
    text-align: left;
    background: none;
    color: #1C161D;
    color: var(--pcm-text);
    cursor: pointer;
}

    .pca__ta-opt:hover, .pca__ta-opt.is-cursor {
        background: #F9F0FA;
        background: var(--pcm-brand-50);
        color: #6C2574;
        color: var(--pcm-brand-600);
    }

.pca__ta-none {
    padding: 12px;
    font-size: 0.8125rem;
    color: #817184;
    color: var(--pcm-text-3);
}


/* ==========================================================================
   5. PASSWORD STRENGTH
   ========================================================================== */

.pca__meter {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.pca__meter-seg {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: #F1EEF2;
    background: var(--pcm-ink-100);
    transition: background 200ms cubic-bezier(0.32, 0.72, 0, 1);
}

.pca__meter[data-score="1"] .pca__meter-seg:nth-child(1) {
    background: #B3352C;
    background: var(--pcm-danger-600);
}

.pca__meter[data-score="2"] .pca__meter-seg:nth-child(-n+2) {
    background: #9A6608;
    background: var(--pcm-warn-600);
}

.pca__meter[data-score="3"] .pca__meter-seg:nth-child(-n+3) {
    background: #568C1D;
    background: var(--pcm-leaf-600);
}

.pca__meter[data-score="4"] .pca__meter-seg {
    background: #416C13;
    background: var(--pcm-leaf-700);
}

.pca__meter-label {
    font-size: 0.75rem;
    margin-top: 8px;
    color: #67586A;
    color: var(--pcm-text-2);
}


/* ==========================================================================
   6. CAPTCHA
   Last step by design. Sunk cost works in our favour — almost nobody
   abandons at step 6 of 6, and almost everybody abandons a captcha at
   step 1 of 6.
   ========================================================================== */

.pca__captcha {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pca__captcha-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-family: var(--pcm-font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    padding: 0 16px;
    height: 52px;
    display: flex;
    align-items: center;
    border-radius: 12px;
    background: #F1EEF2;
    background: var(--pcm-ink-100);
    color: #1C161D;
    color: var(--pcm-text);
    user-select: none;
    white-space: nowrap;
}

.pca__captcha .pcm-input {
    max-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.pca__refresh {
    width: 44px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: none;
    color: #67586A;
    color: var(--pcm-text-2);
    font-size: 17px;
    cursor: pointer;
}

    .pca__refresh:hover {
        background: #F8F6F9;
        background: var(--pcm-ink-50);
    }


/* ==========================================================================
   7. REVIEW + TERMS
   ========================================================================== */

.pca__review {
    border: 1px solid #E5E0E6;
    border: 1px solid var(--pcm-line);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.pca__review-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
    font-size: 0.8125rem;
}

    .pca__review-row + .pca__review-row {
        border-top: 1px solid #F1EEF2;
        border-top: 1px solid var(--pcm-ink-100);
    }

.pca__review-k {
    color: #817184;
    color: var(--pcm-text-3);
    flex-shrink: 0;
}

.pca__review-v {
    color: #1C161D;
    color: var(--pcm-text);
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ==========================================================================
   8. ESCAPE HATCH
   Some people hate wizards. Same markup, one class toggle, all steps
   visible at once. Give them the door rather than losing the signup.
   ========================================================================== */

.pca__toggle {
    display: block;
    margin: 20px auto 0;
    font-size: 0.75rem;
    color: #817184;
    color: var(--pcm-text-3);
    background: none;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

    .pca__toggle:hover {
        color: #1C161D;
        color: var(--pcm-text);
    }

.pca--all .pca__step {
    display: block;
    margin-bottom: 28px;
    animation: none;
}

.pca--all .pca__q {
    font-size: 0.9375rem;
    margin-bottom: 12px;
}

.pca--all .pca__why {
    display: none;
}

.pca--all .pca__progress {
    display: none;
}

.pca--all .pca__next {
    display: none;
}

.pca--all .pca__step[data-step="review"] .pca__next {
    display: block;
}

.pca--all .pca__review {
    display: none;
}


/* ==========================================================================
   9. HONEYPOT
   Off-screen rather than display:none — some bots skip hidden fields but
   fill positioned ones. aria-hidden and tabindex keep it away from
   screen readers and the keyboard path.
   ========================================================================== */

.pca__hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}


/* ==========================================================================
   10. SINGLE-SCREEN AUTH (login, recovery, password change)
   Same shell as signup, no step machine. Returning users already know
   their credentials — pacing them would be friction, not relief, and it
   breaks password-manager autofill.
   ========================================================================== */

.pca__lead {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.2;
    color: #1C161D;
    color: var(--pcm-text);
    margin: 0 0 6px;
}

.pca__lead-sub {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #67586A;
    color: var(--pcm-text-2);
    margin: 0 0 28px;
}

.pca__aid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -4px;
}

    .pca__aid a {
        font-size: 0.8125rem;
        font-weight: 500;
    }

    .pca__aid .pcm-check__text {
        font-size: 0.8125rem;
    }

    .pca__aid .pcm-check input {
        width: 18px;
        height: 18px;
    }

.pca__submit {
    margin-top: 8px;
}

    .pca__submit .pcm-btn {
        height: 52px;
        font-size: 0.9375rem;
    }

/* Server-returned errors sit above the button, not below it — people
   look at what they are about to press, not past it. */
.pca__alert {
    margin-bottom: 4px;
}

/* Divider for future SSO. Hidden until there is something to divide. */
.pca__or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    font-size: 0.75rem;
    color: #A396A6;
    color: var(--pcm-ink-400);
}

    .pca__or::before, .pca__or::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #E5E0E6;
        background: var(--pcm-line);
    }
