.sfpa-intake,
.sfpa-stage-notice,
.sfpa-message {
    box-sizing: border-box;
    font: inherit;
}

.sfpa-intake [hidden] { display: none !important; }

.sfpa-intake {
    width: min(100%, 820px);
    margin: 0 auto;
    padding: clamp(20px, 4vw, 40px);
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    background: #fff;
}

.sfpa-intake label {
    display: block;
    margin: 0 0 8px;
    font-weight: 700;
    color: #101828;
}

.sfpa-intake > form > p,
.sfpa-review-heading span {
    margin: 0 0 16px;
    color: #667085;
}

.sfpa-intake textarea,
.sfpa-intake input[type="text"] {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #fff;
    color: #101828;
    font: inherit;
    line-height: 1.5;
}

.sfpa-intake textarea:focus,
.sfpa-intake input[type="text"]:focus {
    border-color: var(--sf-primary, #475467);
    outline: 3px solid rgba(21, 94, 239, .12);
}

.sfpa-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.sfpa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}

.sfpa-button,
.sfpa-text-button {
    appearance: none;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.sfpa-button {
    min-height: 44px;
    padding: 10px 18px;
}

.sfpa-button-primary {
    background: var(--sf-primary, #155eef);
    color: #fff;
}

.sfpa-button-secondary {
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #344054;
}

.sfpa-text-button {
    padding: 8px 2px;
    background: transparent;
    color: var(--sf-primary, #175cd3);
}

.sfpa-button:disabled,
.sfpa-text-button:disabled {
    cursor: wait;
    opacity: .65;
}

.sfpa-privacy-note {
    margin: 12px 0 0 !important;
    color: #667085;
    font-size: .82em;
    line-height: 1.45;
}

.sfpa-live {
    min-height: 22px;
    margin-top: 12px;
    font-size: .92em;
}

.sfpa-live-error { color: #b42318; }
.sfpa-live-success { color: #067647; }
.sfpa-live-working { color: #475467; }

.sfpa-review-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.sfpa-review-heading h3 {
    margin: 2px 0 0;
}

.sfpa-review > label:not(:first-child) {
    margin-top: 18px;
}

.sfpa-suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.sfpa-summary-item {
    padding: 12px;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    background: #f9fafb;
}

.sfpa-summary-item span,
.sfpa-summary-item strong {
    display: block;
}

.sfpa-summary-item span {
    margin-bottom: 3px;
    color: #667085;
    font-size: .84em;
}

.sfpa-questions,
.sfpa-warnings {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
}

.sfpa-questions { background: #eff8ff; }
.sfpa-warnings { background: #fffaeb; }
.sfpa-questions h4,
.sfpa-warnings h4 { margin: 0 0 8px; }
.sfpa-questions ul,
.sfpa-warnings ul { margin: 0; padding-left: 20px; }

.sfpa-review-options {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.sfpa-review-option {
    display: flex !important;
    gap: 9px;
    align-items: flex-start;
    margin: 0 !important;
    font-weight: 500 !important;
}

.sfpa-message,
.sfpa-auth-note {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
}

.sfpa-message-error { background: #fef3f2; color: #b42318; }
.sfpa-message-notice,
.sfpa-auth-note { background: #eff8ff; color: var(--sf-primary, #175cd3); }

.sfpa-stage-notice {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #b2ddff;
    border-radius: 10px;
    background: #eff8ff;
}

.sfpa-stage-notice strong,
.sfpa-stage-notice span {
    display: block;
}

.sfpa-stage-notice span {
    margin-top: 2px;
    color: #475467;
}

.sfpa-ai-filled {
    position: relative;
    border-radius: 8px;
    box-shadow: 0 0 0 2px rgba(21, 94, 239, .18);
}

.sfpa-field-badge {
    display: inline-flex;
    margin: 0 0 7px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eff8ff;
    color: var(--sf-primary, #175cd3);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 640px) {
    .sfpa-intake { padding: 18px; border-radius: 12px; }
    .sfpa-review-heading,
    .sfpa-stage-notice { align-items: stretch; flex-direction: column; }
    .sfpa-button { width: 100%; }
}

/* v0.3.0 — reviewed budget recommendations */
.sfpa-budget-review {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #f9fafb;
}

.sfpa-budget-review.sfpa-budget-has-assumption {
    border-color: #f5c451;
    background: #fffaeb;
}

.sfpa-budget-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.sfpa-budget-heading h4 {
    margin: 2px 0 0;
    color: #101828;
}

.sfpa-budget-kicker,
.sfpa-budget-currency {
    color: #667085;
    font-size: .82em;
    font-weight: 700;
}

.sfpa-budget-currency {
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff;
}

.sfpa-budget-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sfpa-budget-grid label {
    margin: 0 !important;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #fff;
}

.sfpa-budget-grid label > span {
    display: block;
    margin-bottom: 7px;
}

.sfpa-budget-grid label.sfpa-budget-assumed {
    border-color: #f5c451;
    background: #fff8e1;
}

.sfpa-budget-grid label.sfpa-budget-assumed::after {
    content: "Estimated — review";
    display: inline-flex;
    margin-top: 7px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #fef0c7;
    color: #93370d;
    font-size: 11px;
    font-weight: 700;
}

.sfpa-budget-grid label.sfpa-budget-confirmed {
    border-color: #abefc6;
    background: #ecfdf3;
}

.sfpa-budget-note {
    margin: 12px 0 0 !important;
    color: #475467;
    font-size: .86em;
    line-height: 1.45;
}

.sfpa-summary-item small {
    display: block;
    margin-top: 5px;
    color: #667085;
    font-size: .76em;
    font-weight: 600;
}

.sfpa-summary-item.sfpa-summary-assumed {
    border-color: #f5c451;
    background: #fffaeb;
}

.sfpa-ai-filled.sfpa-ai-assumed {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, .28);
}

.sfpa-ai-filled.sfpa-ai-assumed .sfpa-field-badge {
    background: #fef0c7;
    color: #93370d;
}

/* v0.3.0 — third card on Workreap project step one */
.sfpa-step1-column {
    flex: 0 0 100%;
    max-width: 100%;
}

.wr-newproject-list.sfpa-has-ai-card {
    flex-wrap: nowrap;
}

.wr-newproject-list.sfpa-has-ai-card > li {
    flex: 1 1 0;
    min-width: 0;
}

.sfpa-ai-start-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(26, 148, 162, .28);
    background: linear-gradient(145deg, #ffffff 0%, #f1fbfc 100%);
    box-shadow: 0 10px 28px rgba(16, 24, 40, .07);
    animation: sfpa-card-pulse 4.8s ease-in-out infinite;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.sfpa-ai-start-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 28%, rgba(255,255,255,.72) 48%, transparent 68%);
    transform: translateX(-130%);
    animation: sfpa-card-sheen 6.5s ease-in-out infinite;
}

.sfpa-ai-start-card:hover,
.sfpa-ai-start-card:focus-visible {
    border-color: rgba(26, 148, 162, .55);
    box-shadow: 0 14px 34px rgba(16, 24, 40, .12);
    transform: translateY(-2px);
}

.sfpa-ai-card-icon {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90px;
    height: 90px;
    border-radius: 60px;
    color: #168b98;
    background: rgba(22, 139, 152, .11);
}

.sfpa-ai-card-icon svg {
    width: 34px;
    height: 34px;
    fill: currentColor;
}

.sfpa-ai-card-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 14px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e8f8fa;
    color: #147985;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.sfpa-ai-start-card > span:not(.sfpa-ai-card-icon) {
    position: relative;
    z-index: 1;
    margin-top: 10px;
}

.sfpa-ai-start-card > p {
    position: relative;
    z-index: 1;
    max-width: 280px;
    text-align: center;
}

@keyframes sfpa-card-pulse {
    0%, 68%, 100% { box-shadow: 0 10px 28px rgba(16, 24, 40, .07), 0 0 0 0 rgba(22, 139, 152, 0); }
    78% { box-shadow: 0 12px 30px rgba(16, 24, 40, .09), 0 0 0 7px rgba(22, 139, 152, .08); }
}

@keyframes sfpa-card-sheen {
    0%, 58% { transform: translateX(-130%); }
    76%, 100% { transform: translateX(130%); }
}

@media (max-width: 991px) {
    .wr-newproject-list.sfpa-has-ai-card {
        flex-wrap: wrap;
    }

    .wr-newproject-list.sfpa-has-ai-card > li {
        flex: 1 1 50%;
    }
}

@media (max-width: 640px) {
    .sfpa-budget-grid {
        grid-template-columns: 1fr;
    }

    .sfpa-budget-heading {
        flex-direction: column;
    }

    .wr-newproject-list.sfpa-has-ai-card > li {
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sfpa-ai-start-card,
    .sfpa-ai-start-card::before {
        animation: none;
    }
}
