.phbf-wrap {
    --phbf-accent: #ffbe00;
    --phbf-accent-dark: #e3a900;
    --phbf-text: #121826;
    --phbf-muted: #737987;
    --phbf-line: #e7e9ee;
    --phbf-field: #f7f8fa;
    --phbf-white: #fff;
    width: 100%;
    box-sizing: border-box;
}

.phbf-wrap *,
.phbf-wrap *::before,
.phbf-wrap *::after { box-sizing: border-box; }

.phbf-form {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(22px, 3vw, 36px);
    background: var(--phbf-white);
    border: 1px solid rgba(18, 24, 38, .07);
    border-radius: 22px;
    box-shadow: 0 18px 55px rgba(18, 24, 38, .09);
    color: var(--phbf-text);
}

.phbf-header { text-align: center; margin-bottom: 24px; }
.phbf-eyebrow { display: inline-block; margin-bottom: 7px; font-size: 10px; font-weight: 800; letter-spacing: .15em; color: #858a95; }
.phbf-header h2 { margin: 0 0 7px; color: var(--phbf-text); font-size: clamp(27px, 4vw, 36px); line-height: 1.1; font-weight: 800; }
.phbf-header p { margin: 0; color: var(--phbf-muted); font-size: 14px; line-height: 1.55; }

.phbf-progress { display: flex; align-items: center; justify-content: center; max-width: 660px; margin: 0 auto 30px; }
.phbf-progress-item { display: flex; align-items: center; gap: 8px; color: #9a9faa; white-space: nowrap; }
.phbf-progress-item span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #d9dce2; border-radius: 50%; background: #fff; font-size: 12px; font-weight: 800; }
.phbf-progress-item b { font-size: 12px; font-weight: 800; }
.phbf-progress-item.is-active { color: var(--phbf-text); }
.phbf-progress-item.is-active span,
.phbf-progress-item.is-complete span { border-color: var(--phbf-accent); background: var(--phbf-accent); color: #171717; }
.phbf-progress-item.is-complete { color: #6a707b; }
.phbf-progress-line { width: 68px; height: 1px; margin: 0 12px; background: #e4e6ea; }

.phbf-step-heading { margin-bottom: 20px; }
.phbf-step-heading h3 { margin: 0 0 4px; color: var(--phbf-text); font-size: 20px; line-height: 1.2; font-weight: 800; }
.phbf-step-heading p { margin: 0; color: var(--phbf-muted); font-size: 13px; }

.phbf-js .phbf-step[hidden] { display: none !important; }
.phbf-step.is-active { animation: phbfFade .22s ease; }
@keyframes phbfFade { from { opacity: .55; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.phbf-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 16px; }
.phbf-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.phbf-col-full { grid-column: 1 / -1; }
.phbf-top-gap { margin-top: 16px; }
.phbf-field { min-width: 0; }
.phbf-field label,
.phbf-label { display: block; margin: 0 0 7px; color: var(--phbf-text); font-size: 13px; font-weight: 750; }
.phbf-field label b { color: #e5484d; }

.phbf-form input[type="text"],
.phbf-form input[type="email"],
.phbf-form input[type="tel"],
.phbf-form input[type="date"],
.phbf-form input[type="time"],
.phbf-form input[type="number"],
.phbf-form select,
.phbf-form textarea {
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid var(--phbf-line);
    border-radius: 11px;
    background: var(--phbf-field);
    color: var(--phbf-text);
    font: inherit;
    font-size: 14px;
    line-height: 1.35;
    outline: none;
    box-shadow: none;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.phbf-form textarea { min-height: 98px; resize: vertical; }
.phbf-form input::placeholder,
.phbf-form textarea::placeholder { color: #a2a7b0; opacity: 1; }
.phbf-form input:focus,
.phbf-form select:focus,
.phbf-form textarea:focus { border-color: var(--phbf-accent); background: #fff; box-shadow: 0 0 0 4px rgba(255, 190, 0, .12); }

.phbf-smart-toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.phbf-check-row { display: flex; align-items: center; gap: 11px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--phbf-line); border-radius: 12px; background: var(--phbf-field); cursor: pointer; transition: border-color .18s ease, background-color .18s ease; }
.phbf-check-row:hover { border-color: #d5d8de; background: #fbfbfc; }
.phbf-check-row > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.phbf-check-row b { color: var(--phbf-text); font-size: 13px; line-height: 1.2; }
.phbf-check-row small { color: #8a909b; font-size: 11px; line-height: 1.35; }
.phbf-check-row input { position: absolute; opacity: 0; pointer-events: none; }
.phbf-check-ui { width: 20px; height: 20px; flex: 0 0 20px; border: 1.5px solid #cbd0d8; border-radius: 6px; background: #fff; transition: .2s ease; }
.phbf-check-row input:checked + .phbf-check-ui { border-color: var(--phbf-accent); background: var(--phbf-accent); box-shadow: inset 0 0 0 4px var(--phbf-accent), inset 0 0 0 6px #fff; }
.phbf-check-row:focus-within .phbf-check-ui { box-shadow: 0 0 0 4px rgba(255,190,0,.14); }

.phbf-conditional { margin-top: 14px; padding: 15px; border: 1px solid #eceef2; border-radius: 12px; background: #fcfcfd; }
.phbf-conditional[hidden] { display: none !important; }

.phbf-choice-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.phbf-choice-group label { margin: 0; cursor: pointer; }
.phbf-choice-group input { position: absolute; opacity: 0; }
.phbf-choice-group span { display: flex; min-height: 50px; align-items: center; justify-content: center; padding: 8px; border: 1px solid var(--phbf-line); border-radius: 10px; background: var(--phbf-field); color: #515866; font-size: 12px; font-weight: 800; text-align: center; transition: .2s ease; }
.phbf-choice-group input:checked + span { border-color: var(--phbf-accent); background: var(--phbf-accent); color: #151515; }

.phbf-summary { padding: 15px; border: 1px solid #ece8d5; border-radius: 13px; background: #fffdf5; }
.phbf-summary-title { margin-bottom: 10px; color: #7e6d24; font-size: 11px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.phbf-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.phbf-summary-grid div { min-width: 0; }
.phbf-summary-grid small { display: block; margin-bottom: 2px; color: #99917a; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.phbf-summary-grid strong { display: block; overflow: hidden; color: var(--phbf-text); font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.phbf-consent { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 20px; color: #676d78; font-size: 12px; line-height: 1.5; cursor: pointer; }
.phbf-consent input { position: absolute; opacity: 0; pointer-events: none; }
.phbf-consent-ui { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; border: 1.5px solid #cbd0d8; border-radius: 6px; background: #fff; transition: .2s ease; }
.phbf-consent input:checked + .phbf-consent-ui { border-color: var(--phbf-accent); background: var(--phbf-accent); box-shadow: inset 0 0 0 4px var(--phbf-accent), inset 0 0 0 6px #fff; }
.phbf-consent:focus-within .phbf-consent-ui { box-shadow: 0 0 0 4px rgba(255,190,0,.14); }

.phbf-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.phbf-actions-end { justify-content: flex-end; }
.phbf-btn,
.phbf-submit { min-height: 52px; border: 0; border-radius: 12px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease; }
.phbf-btn { padding: 12px 19px; }
.phbf-btn-primary { min-width: 155px; background: var(--phbf-accent); color: #171717; box-shadow: 0 8px 20px rgba(255,190,0,.20); }
.phbf-btn-primary:hover { transform: translateY(-1px); background: var(--phbf-accent-dark); }
.phbf-btn-secondary { background: #f2f3f5; color: #4f5663; }
.phbf-btn-secondary:hover { background: #e9ebee; }
.phbf-submit { min-width: 200px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 8px 7px 18px; background: var(--phbf-accent); color: #171717; box-shadow: 0 9px 22px rgba(255,190,0,.24); }
.phbf-submit:hover { transform: translateY(-1px); background: var(--phbf-accent-dark); }
.phbf-submit-arrow { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-size: 19px; }
.phbf-note { margin: 11px 0 0; color: #969ba5; text-align: right; font-size: 10px; line-height: 1.5; }

.phbf-alert { max-width: 920px; margin: 0 auto 16px; padding: 14px 16px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.phbf-alert strong { display: block; margin-bottom: 2px; }
.phbf-alert-success { border: 1px solid #b9e4c7; background: #effaf2; color: #176b35; }
.phbf-alert-error { border: 1px solid #f0c0c2; background: #fff3f3; color: #9d2b30; }
.phbf-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px,1px,1px,1px) !important; white-space: nowrap !important; }

@media (max-width: 760px) {
    .phbf-grid-2,
    .phbf-smart-toggles { grid-template-columns: minmax(0, 1fr); }
    .phbf-col-full { grid-column: auto; }
    .phbf-progress-item b { display: none; }
    .phbf-progress-line { width: 42px; margin: 0 8px; }
    .phbf-summary-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
    .phbf-summary-grid strong { white-space: normal; }
}

@media (max-width: 520px) {
    .phbf-form { padding: 20px 15px; border-radius: 16px; }
    .phbf-header { margin-bottom: 20px; }
    .phbf-progress { margin-bottom: 24px; }
    .phbf-progress-line { width: 28px; }
    .phbf-choice-group { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .phbf-actions { align-items: stretch; }
    .phbf-actions .phbf-btn,
    .phbf-actions .phbf-submit { flex: 1 1 0; min-width: 0; }
    .phbf-actions-end .phbf-btn { flex: 1 1 100%; }
    .phbf-submit { padding-left: 14px; }
    .phbf-note { text-align: center; }
}
