.epay-w4-generator {
    --w4-navy: #023047;
    --w4-teal: #0097b2;
    --w4-orange: #f97316;
    --w4-orange-soft: #fff7ed;
    --w4-surface: #f6f9fb;
    --w4-border: #d9e3e8;
    --w4-muted: #5f6f79;
    --w4-danger: #c62828;
    --w4-success: #14804a;
    color: var(--w4-navy);
    background: #ffffff;
    font-family: inherit;
}

.epay-w4-generator *,
.epay-w4-generator *::before,
.epay-w4-generator *::after {
    box-sizing: border-box;
}

.epay-w4-generator button,
.epay-w4-generator input,
.epay-w4-generator select,
.epay-w4-generator textarea {
    font: inherit;
}

.epay-w4-generator .epay-w4__hero {
    position: relative;
    overflow: hidden;
    padding: 56px 0 50px;
    background: linear-gradient(90deg, #fffaf6 0%, #ffffff 42%, #dfe7eb 69%, #174b62 100%);
}

.epay-w4-generator .epay-w4__hero > .container,
.epay-w4-generator .epay-w4__layout-container {
    width: 100%;
    max-width: 1220px;
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.epay-w4-generator .epay-w4__hero::before,
.epay-w4-generator .epay-w4__hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.epay-w4-generator .epay-w4__hero::before {
    left: -78px;
    bottom: -118px;
    width: 185px;
    height: 185px;
    background: rgba(249, 115, 22, 0.15);
}

.epay-w4-generator .epay-w4__hero::after {
    top: -112px;
    right: -84px;
    width: 220px;
    height: 220px;
    background: rgba(0, 151, 178, 0.18);
}

.epay-w4-generator .epay-w4-hero__content {
    position: relative;
    z-index: 2;
    max-width: 575px;
}

.epay-w4-generator .epay-w4-hero__title {
    margin: 0 0 16px;
    color: var(--w4-navy);
    font-size: clamp(2.05rem, 2.8vw, 2.35rem);
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: -0.025em;
}

.epay-w4-generator .epay-w4-hero__description {
    max-width: 545px;
    margin: 0 0 28px;
    color: #173f52;
    font-size: 1.03rem;
    line-height: 1.9;
}

.epay-w4-generator .epay-w4-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 13px 25px;
    border: 2px solid var(--w4-orange);
    border-radius: 14px;
    background: var(--w4-orange);
    color: #071f2b;
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.epay-w4-generator .epay-w4-hero__cta:hover,
.epay-w4-generator .epay-w4-hero__cta:focus {
    background: #ff861f;
    color: #071f2b;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(249, 115, 22, 0.3);
}

.epay-w4-generator .epay-w4-hero__steps-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 560px;
    min-height: 248px;
    margin-left: auto;
    padding: 43px 34px 30px;
    border: 1px solid #d8e2e7;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 20px 45px rgba(2, 48, 71, 0.11);
}

.epay-w4-generator .epay-w4-hero__steps-badge {
    position: absolute;
    top: -17px;
    left: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 17px;
    border-radius: 999px;
    background: var(--w4-navy);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(2, 48, 71, 0.16);
}

.epay-w4-generator .epay-w4-hero__steps {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr) 42px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
}

.epay-w4-generator .epay-w4-hero__step {
    min-width: 0;
    text-align: center;
}

.epay-w4-generator .epay-w4-hero__step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    margin-bottom: 11px;
    border-radius: 50%;
    background: var(--w4-navy);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
}

.epay-w4-generator .epay-w4-hero__step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 13px;
    border: 2px solid var(--w4-orange);
    border-radius: 50%;
    background: var(--w4-navy);
    box-shadow: 0 7px 14px rgba(2, 48, 71, 0.12);
}

.epay-w4-generator .epay-w4-hero__step-icon svg {
    display: block;
    width: 27px;
    height: 27px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.epay-w4-generator .epay-w4-hero__step-title {
    margin: 0 0 6px;
    color: var(--w4-navy);
    font-size: 0.98rem;
    line-height: 1.25;
    font-weight: 850;
}

.epay-w4-generator .epay-w4-hero__step-text {
    margin: 0;
    color: #526878;
    font-size: 0.79rem;
    line-height: 1.45;
}

.epay-w4-generator .epay-w4-hero__connector {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 23px;
}

.epay-w4-generator .epay-w4-hero__connector span {
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--w4-orange) 0 48%, var(--w4-teal) 48% 100%);
}

.epay-w4-generator .epay-w4__layout-container {
    padding-top: 40px;
    padding-bottom: 64px;
    overflow: visible;
    width: 100%;
    max-width: 1220px;
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.epay-w4-generator .epay-w4__layout-row {
    overflow: visible;
}

.epay-w4-generator .epay-w4__form-column {
    min-width: 0;
}

/* Match the W2 page: sticky behavior belongs to the preview column. */
.epay-w4-generator .epay-w4__preview-column {
    position: sticky;
    top: 96px;
    align-self: flex-start;
    height: fit-content;
    min-width: 0;
}

.epay-w4-generator .w4-section-card {
    margin-bottom: 24px;
    padding: 26px;
    border: 1px solid var(--w4-border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(2, 48, 71, 0.07);
}

.epay-w4-generator .w4-section-heading {
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e8eef1;
}

.epay-w4-generator .w4-section-heading h2 {
    margin: 0;
    color: var(--w4-navy);
    font-size: 1.35rem;
    line-height: 1.35;
    font-weight: 800;
}

.epay-w4-generator .w4-section-heading p {
    margin: 6px 0 0;
    color: var(--w4-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.epay-w4-generator .w4-subheading {
    margin: 22px 0 14px;
    color: var(--w4-navy);
    font-size: 1.03rem;
    font-weight: 800;
}

.epay-w4-generator .w4-subheading--first {
    margin-top: 0;
}

.epay-w4-generator .w4-help--intro {
    margin: 0 0 14px;
}

.epay-w4-generator .w4-field {
    margin-bottom: 17px;
}

.epay-w4-generator .w4-field:last-child {
    margin-bottom: 0;
}

/* Keep the Apartment and City inputs aligned when one label wraps. */
.epay-w4-generator .w4-address-row .w4-field {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.epay-w4-generator .w4-address-row .w4-label {
    display: block;
    min-height: auto;
}

.epay-w4-generator .w4-label,
.epay-w4-generator .w4-question {
    display: block;
    margin: 0 0 7px;
    color: var(--w4-navy);
    font-size: 0.9rem;
    line-height: 1.45;
    font-weight: 700;
}

.epay-w4-generator .w4-required {
    color: var(--w4-danger);
}

.epay-w4-generator .w4-help {
    display: block;
    margin-top: 6px;
    color: #71808a;
    font-size: 0.76rem;
    line-height: 1.5;
}

.epay-w4-generator .w4-input,
.epay-w4-generator .w4-select,
.epay-w4-generator .w4-textarea {
    width: 100%;
    min-height: 52px;
    padding: 12px 15px;
    border: 1px solid #cfdbe1;
    border-radius: 10px;
    outline: none;
    background: var(--w4-surface);
    color: var(--w4-navy);
    font-size: 0.94rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.epay-w4-generator .w4-textarea {
    min-height: 92px;
    resize: vertical;
}

.epay-w4-generator .w4-input::placeholder,
.epay-w4-generator .w4-textarea::placeholder {
    color: #86949d;
}

.epay-w4-generator .w4-input:focus,
.epay-w4-generator .w4-select:focus,
.epay-w4-generator .w4-textarea:focus {
    border-color: var(--w4-teal);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 151, 178, 0.14);
}

.epay-w4-generator .w4-select-wrap {
    position: relative;
}

.epay-w4-generator .w4-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 48px;
    cursor: pointer;
}

.epay-w4-generator .w4-select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--w4-navy);
    border-bottom: 2px solid var(--w4-navy);
    pointer-events: none;
    transform: translateY(-68%) rotate(45deg);
}

.epay-w4-generator .w4-money {
    display: flex;
    align-items: stretch;
}

.epay-w4-generator .w4-money__symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    border: 1px solid #cfdbe1;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: #e7eef2;
    color: var(--w4-navy);
    font-weight: 800;
}

.epay-w4-generator .w4-money .w4-input {
    border-radius: 0 10px 10px 0;
}

.epay-w4-generator .w4-radio-list {
    display: grid;
    gap: 10px;
}

.epay-w4-generator .w4-radio-option,
.epay-w4-generator .w4-check-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 12px 13px;
    border: 1px solid #dce5e9;
    border-radius: 10px;
    background: #fbfdfe;
    color: #294b5b;
    font-size: 0.88rem;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.epay-w4-generator .w4-radio-option:hover,
.epay-w4-generator .w4-check-option:hover {
    border-color: #9bcbd5;
    background: #f3fbfc;
}

.epay-w4-generator .w4-radio-option input,
.epay-w4-generator .w4-check-option input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 auto;
    accent-color: var(--w4-teal);
}

.epay-w4-generator .w4-radio-option strong {
    color: var(--w4-navy);
}

.epay-w4-generator .w4-note {
    display: block;
    margin-top: 3px;
    color: #6f7f88;
    font-size: 0.77rem;
}

.epay-w4-generator .w4-conditional {
    display: none;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #f2d1b5;
    border-radius: 12px;
    background: var(--w4-orange-soft);
}

.epay-w4-generator .w4-conditional.is-visible {
    display: block;
}

.epay-w4-generator .w4-signature-wrap {
    position: relative;
    width: 100%;
}

.epay-w4-generator #signaturePad {
    display: block;
    width: 100%;
    height: 170px;
    border: 1px solid #cfdbe1;
    border-radius: 12px;
    background: #ffffff;
    cursor: crosshair;
    touch-action: none;
}

.epay-w4-generator .w4-signature-clear {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 7px;
    border: 1px solid #d8e2e7;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--w4-danger);
    cursor: pointer;
}

.epay-w4-generator .w4-signature-clear:hover,
.epay-w4-generator .w4-signature-clear:focus {
    border-color: #efb3b3;
    background: #fff7f7;
}

.epay-w4-generator .w4-signature-status {
    min-height: 20px;
    margin: 7px 0 0;
    color: #71808a;
    font-size: 0.78rem;
    text-align: center;
}

.epay-w4-generator .w4-signature-status.is-error {
    color: var(--w4-danger);
    font-weight: 700;
}

.epay-w4-generator .w4-preview-card {
    position: relative;
    top: auto;
    width: 100%;
    padding: 22px;
    border: 1px solid var(--w4-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(2, 48, 71, 0.1);
}

.epay-w4-generator .w4-preview-card__heading {
    margin-bottom: 16px;
    text-align: center;
}

.epay-w4-generator .w4-preview-card__heading h2 {
    margin: 0 0 5px;
    color: var(--w4-navy);
    font-size: 1.2rem;
    font-weight: 800;
}

.epay-w4-generator .w4-preview-card__heading p {
    margin: 0;
    color: var(--w4-muted);
    font-size: 0.82rem;
}

.epay-w4-generator .w4-preview-shell {
    position: relative;
    width: 100%;
    height: clamp(520px, calc(100vh - 250px), 920px);
    min-height: 520px;
    max-height: 920px;
    overflow: hidden;
    border: 1px solid #cfdbe1;
    border-radius: 12px;
    background: #edf2f5;
}

.epay-w4-generator .w4-preview-shell iframe {
    display: none;
    width: 100%;
    height: 100%;
    border: 0;
    background: #ffffff;
}

.epay-w4-generator .w4-preview-shell iframe.is-visible {
    display: block;
}

.epay-w4-generator .w4-preview-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px;
    background: #e9eef1;
    scrollbar-width: thin;
}

.epay-w4-generator .w4-preview-fallback.is-hidden {
    display: none;
}

.epay-w4-generator .w4-preview-fallback__page {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 816px;
    margin: 0 auto 14px;
    background: #ffffff;
    box-shadow: 0 2px 9px rgba(2, 48, 71, 0.16);
}

.epay-w4-generator .w4-preview-year-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 5px 10px;
    border: 1px solid #c9dbe3;
    border-radius: 999px;
    background: #eef8fa;
    color: #023047;
    font-size: 0.78rem;
    font-weight: 700;
}

.epay-w4-generator .w4-preview-fallback__page:last-child {
    margin-bottom: 0;
}

.epay-w4-generator .w4-preview-fallback__page img {
    display: block;
    width: 100%;
    height: auto;
}

.epay-w4-generator .w4-preview-loader {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.82);
}

.epay-w4-generator .w4-preview-loader.is-visible {
    display: flex;
}

.epay-w4-generator .w4-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #d9e6eb;
    border-top-color: var(--w4-teal);
    border-radius: 50%;
    animation: w4Spin 0.85s linear infinite;
}

@keyframes w4Spin {
    to { transform: rotate(360deg); }
}

.epay-w4-generator .w4-preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.epay-w4-generator .w4-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 18px;
    border-radius: 11px;
    font-size: 0.91rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.epay-w4-generator .w4-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.epay-w4-generator .w4-btn--secondary {
    border: 1px solid var(--w4-navy);
    background: #ffffff;
    color: var(--w4-navy);
}

.epay-w4-generator .w4-btn--secondary:hover,
.epay-w4-generator .w4-btn--secondary:focus {
    background: #eef5f7;
    color: var(--w4-navy);
}

/* Primary action: matches the W-2 page */
.epay-w4-generator .w4-preview-actions .w4-btn--primary {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    background: #1a9ba8;
    color: #ffffff;
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
    transform: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.epay-w4-generator .w4-preview-actions .w4-btn--primary:hover:not(:disabled),
.epay-w4-generator .w4-preview-actions .w4-btn--primary:focus-visible:not(:disabled) {
    background: #158793;
    color: #ffffff;
    transform: translateY(-1px);
}

.epay-w4-generator .w4-preview-link {
    display: block;
    margin-top: 12px;
    color: #0c6a75;
    font-size: 0.84rem;
    font-weight: 700;
    text-align: center;
}

.epay-w4-generator .w4-modal__dialog:focus {
    outline: 0;
}

.epay-w4-generator .w4-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 24, 34, 0.78);
}

.epay-w4-generator .w4-modal.is-open {
    display: flex;
}

.epay-w4-generator .w4-modal__dialog {
    display: flex;
    flex-direction: column;
    width: min(1100px, 96vw);
    height: min(88vh, 900px);
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

.epay-w4-generator .w4-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: var(--w4-navy);
    color: #ffffff;
}

.epay-w4-generator .w4-modal__header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
}

.epay-w4-generator .w4-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
}

.epay-w4-generator .w4-modal__body {
    flex: 1;
    min-height: 0;
}

.epay-w4-generator .w4-modal__body iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.epay-w4-generator .w4-form-message {
    display: none;
    margin-top: 12px;
    padding: 11px 13px;
    border-radius: 9px;
    font-size: 0.84rem;
    line-height: 1.5;
}

.epay-w4-generator .w4-form-message.is-visible {
    display: block;
}

.epay-w4-generator .w4-form-message.is-error {
    color: #8d1d1d;
    background: #fff1f1;
    border: 1px solid #f0bcbc;
}

.epay-w4-generator .w4-form-message.is-success {
    color: #0f633b;
    background: #eefaf3;
    border: 1px solid #b8e3cb;
}

@media (min-width: 1200px) {
    .epay-w4-generator .epay-w4-hero__title {
        white-space: nowrap;
    }
}

@media (max-width: 1199.98px) {
    .epay-w4-generator .epay-w4-hero__steps-card {
        padding-right: 24px;
        padding-left: 24px;
    }

    .epay-w4-generator .w4-preview-shell {
        height: clamp(500px, calc(100vh - 230px), 820px);
        min-height: 500px;
        max-height: 820px;
    }
}

@media (max-width: 991.98px) {
    .epay-w4-generator .epay-w4__hero {
        padding: 48px 0;
    }

    .epay-w4-generator .epay-w4-hero__content {
        max-width: 100%;
        text-align: center;
    }

    .epay-w4-generator .epay-w4-hero__description {
        margin-right: auto;
        margin-left: auto;
    }

    .epay-w4-generator .epay-w4-hero__steps-card {
        max-width: 720px;
        margin: 18px auto 0;
    }

    .epay-w4-generator .epay-w4__preview-column {
        position: static;
        top: auto;
        align-self: auto;
        height: auto;
    }

    .epay-w4-generator .w4-preview-card {
        position: relative;
        top: auto;
    }

    .epay-w4-generator .w4-preview-shell {
        height: 680px;
        min-height: 560px;
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    .epay-w4-generator .w4-address-row .w4-label {
        min-height: auto;
    }
    .epay-w4-generator .epay-w4__layout-container {
        padding-top: 28px;
        padding-bottom: 44px;
        width: 100%;
        max-width: 1220px;
        min-width: 0;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
        margin-left: auto;
        margin-right: auto;
    }

    .epay-w4-generator .w4-section-card {
        padding: 20px;
        border-radius: 14px;
    }

    .epay-w4-generator .w4-section-heading h2 {
        font-size: 1.18rem;
    }

    .epay-w4-generator .w4-preview-shell {
        height: 620px;
        min-height: 500px;
    }

    .epay-w4-generator .w4-preview-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .epay-w4-generator .epay-w4__hero {
        padding: 42px 0 38px;
    }

    .epay-w4-generator .epay-w4-hero__title {
        font-size: 2rem;
    }

    .epay-w4-generator .epay-w4-hero__description {
        font-size: 0.96rem;
        line-height: 1.7;
    }

    .epay-w4-generator .epay-w4-hero__cta {
        width: 100%;
    }

    .epay-w4-generator .epay-w4-hero__steps-card {
        min-height: 0;
        padding: 42px 20px 24px;
    }

    .epay-w4-generator .epay-w4-hero__steps-badge {
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
    }

    .epay-w4-generator .epay-w4-hero__steps {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .epay-w4-generator .epay-w4-hero__connector {
        min-height: 20px;
        padding: 0;
    }

    .epay-w4-generator .epay-w4-hero__connector span {
        width: 4px;
        height: 22px;
        background: linear-gradient(180deg, var(--w4-orange) 0 48%, var(--w4-teal) 48% 100%);
    }

    .epay-w4-generator .epay-w4-hero__step-number {
        margin-bottom: 8px;
    }

    .epay-w4-generator .epay-w4-hero__step-icon {
        width: 58px;
        height: 58px;
        margin-bottom: 9px;
    }

    .epay-w4-generator .w4-section-card,
    .epay-w4-generator .w4-preview-card {
        padding: 16px;
    }

    .epay-w4-generator .w4-conditional {
        padding: 14px;
    }

    .epay-w4-generator .w4-preview-shell {
        height: 560px;
        min-height: 460px;
    }

    .epay-w4-generator .w4-modal {
        padding: 10px;
    }

    .epay-w4-generator .w4-modal__dialog {
        width: 100%;
        height: 92vh;
        border-radius: 12px;
    }
}

/* 2026 Form W-4 exemption control */
.epay-w4-generator .w4-exempt-panel {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid #b8dfe6;
    border-radius: 12px;
    background: #f0fbfd;
}

.epay-w4-generator [hidden] {
    display: none !important;
}

.epay-w4-generator .w4-exempt-option {
    margin: 0;
    border-color: #9bcbd5;
    background: #ffffff;
}

.epay-w4-generator .w4-exempt-option strong {
    display: block;
    margin-bottom: 3px;
    color: var(--w4-navy);
    font-size: 0.92rem;
}

.epay-w4-generator .w4-exempt-guidance {
    margin-top: 11px;
    padding: 11px 13px;
    border-left: 4px solid var(--w4-orange);
    border-radius: 8px;
    background: #fff7ed;
    color: #6b4a31;
    font-size: 0.8rem;
    line-height: 1.55;
}

.epay-w4-generator .w4-section-card.is-exempt-disabled > :not(.w4-exempt-panel) {
    opacity: 0.58;
}

.epay-w4-generator .w4-section-card.is-exempt-disabled > :not(.w4-exempt-panel) :is(input, select, textarea, label) {
    cursor: not-allowed;
}
/* W-4 introduction guide */
.epay-w4-generator .w4-intro-guide-text-only {
    width: 100%;
    max-width: 545px;
    margin: 18px auto 0;
    color: #173f52;
    font-size: 1.03rem;
    line-height: 1.75;
    text-align: left;
}

.epay-w4-generator .w4-intro-guide-text-only > p {
    margin: 0 0 16px;
}

.epay-w4-generator .w4-intro-guide-text-only h2 {
    margin: 0 0 8px;
    color: var(--w4-navy);
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 800;
}

.epay-w4-generator .w4-intro-guide-text-only ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.epay-w4-generator .w4-intro-guide-text-only li {
    margin: 0 0 4px;
    padding-left: 3px;
}

.epay-w4-generator .w4-intro-guide-text-only .w4-intro-guide__needs {
    margin-bottom: 0;
}


/* ================================================================
   W-4 CREATE ??? 1099-MISC design parity | 2026-10-22
   Visual only. Keep form fields, conditional panels, signature pad,
   document previews, validation, data mapping and actions unchanged.
   All form controls remain enabled and submitted as before.
   ================================================================ */
.epay-w4-generator {
    --w4-navy: #062b45;
    --w4-teal: #1a9ba8;
    --w4-surface: #f6f9fb;
    --w4-border: #d9e3e8;
}

.epay-w4-generator .w4-section-card {
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #d9e3e8;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(2, 48, 71, .055);
}

.epay-w4-generator .w4-section-heading {
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8eef1;
}
.epay-w4-generator .w4-section-heading h2 {
    color: #062b45;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.35;
}
.epay-w4-generator .w4-section-heading p {
    color: #5f6f79;
    font-size: 13px;
    line-height: 1.55;
    margin-top: 6px;
}
.epay-w4-generator .w4-subheading {
    color: #062b45;
    font-size: 15px;
    font-weight: 700;
    margin: 20px 0 12px;
}
.epay-w4-generator .w4-subheading--first {
    margin-top: 0;
}
.epay-w4-generator .w4-field {
    margin-bottom: 16px;
}
.epay-w4-generator .w4-label,
.epay-w4-generator .w4-question {
    margin-bottom: 7px;
    color: #023047;
    font-size: 15px;
    line-height: 18px;
    font-weight: 500;
}
.epay-w4-generator .w4-help {
    color: #71808a;
    font-size: 12px;
    line-height: 1.5;
}
.epay-w4-generator .w4-input,
.epay-w4-generator .w4-select {
    min-height: 46px;
    height: 46px;
    padding: 10px 12px;
    border: 1px solid #cfdbe1;
    border-radius: 9px;
    background: #f6f9fb;
    color: #023047;
    font-size: 15px;
    font-weight: 400;
    line-height: 20px;
}
.epay-w4-generator .w4-select {
    padding-right: 40px;
}
.epay-w4-generator .w4-select-wrap::after {
    right: 15px;
}
.epay-w4-generator .w4-textarea {
    min-height: 92px;
    padding: 10px 12px;
    border: 1px solid #cfdbe1;
    border-radius: 9px;
    background: #f6f9fb;
    color: #023047;
    font-size: 15px;
    font-weight: 400;
    line-height: 20px;
}
.epay-w4-generator .w4-input:focus,
.epay-w4-generator .w4-select:focus,
.epay-w4-generator .w4-textarea:focus {
    border-color: #1a9ba8;
    box-shadow: 0 0 0 3px rgba(26, 155, 168, .14);
}
.epay-w4-generator .w4-money__symbol {
    min-width: 42px;
    border-radius: 9px 0 0 9px;
    background: #eaf2f6;
    font-size: 14px;
    font-weight: 700;
}
.epay-w4-generator .w4-money .w4-input {
    border-radius: 0 9px 9px 0;
}
.epay-w4-generator .w4-radio-list {
    gap: 9px;
}
.epay-w4-generator .w4-radio-option,
.epay-w4-generator .w4-check-option {
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fbfdfe;
    font-size: 13px;
    line-height: 1.5;
}
.epay-w4-generator .w4-radio-option input,
.epay-w4-generator .w4-check-option input {
    accent-color: #1a9ba8;
}
.epay-w4-generator .w4-conditional {
    padding: 16px;
    border-radius: 12px;
}
.epay-w4-generator .w4-preview-card {
    padding: 12px;
    border-radius: 18px;
    border: 1px solid #d9e3e8;
    box-shadow: 0 14px 36px rgba(2,48,71,.1);
}
.epay-w4-generator .w4-preview-card__heading {
    margin-bottom: 14px;
}
.epay-w4-generator .w4-preview-card__heading h2 {
    color: #062b45;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
}
.epay-w4-generator .w4-preview-card__heading p {
    font-size: 13px;
    line-height: 1.5;
}
.epay-w4-generator .w4-preview-shell {
    height: 680px;
    min-height: 0;
    max-height: none;
    border-radius: 10px;
    background: #ffffff;
}
.epay-w4-generator .w4-preview-fallback {
    padding: 0;
    background: #ffffff;
}
.epay-w4-generator .w4-preview-fallback__page {
    margin-bottom: 12px;
    box-shadow: none;
}
.epay-w4-generator .w4-preview-actions.epay-create-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100%;
    margin-top: 16px;
}
.epay-w4-generator .w4-preview-actions.epay-create-actions #previewBtn.epay-create-action,
.epay-w4-generator .w4-preview-actions.epay-create-actions #w4FormButton.epay-create-action {
    min-height: 44px !important;
    height: 44px !important;
    padding: 8px 12px !important;
    border-radius: 10px !important;
    font-family: "Poppins", sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    transform: none;
}
.epay-w4-generator .w4-preview-actions.epay-create-actions #previewBtn.epay-create-action {
    border: 1px solid #7895a8 !important;
    background: #eaf2f6 !important;
    color: #062b45 !important;
    box-shadow: 0 1px 3px rgba(15,50,71,.14) !important;
}
.epay-w4-generator .w4-preview-actions.epay-create-actions #previewBtn.epay-create-action:hover:not(:disabled),
.epay-w4-generator .w4-preview-actions.epay-create-actions #previewBtn.epay-create-action:focus-visible {
    border-color: #062b45 !important;
    background: #dceaf1 !important;
}
.epay-w4-generator .w4-preview-actions.epay-create-actions #w4FormButton.epay-create-action {
    border: 1px solid #168894 !important;
    background: #1a9ba8 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(15,50,71,.18) !important;
}
.epay-w4-generator .w4-preview-actions.epay-create-actions #w4FormButton.epay-create-action:hover:not(:disabled),
.epay-w4-generator .w4-preview-actions.epay-create-actions #w4FormButton.epay-create-action:focus-visible {
    border-color: #137782 !important;
    background: #158793 !important;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .epay-w4-generator .w4-preview-shell { height: 670px; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
    .epay-w4-generator .w4-preview-shell { height: 648px; }
}
@media (max-width: 767.98px) {
    .epay-w4-generator .w4-section-card { padding: 20px; }
    .epay-w4-generator .w4-section-heading h2 { font-size: 1.18rem; }
}
@media (max-width: 575.98px) {
    .epay-w4-generator .w4-section-card { padding: 16px; }
    .epay-w4-generator .w4-preview-card { padding: 12px; }
    .epay-w4-generator .w4-preview-shell { height: 560px; }
    .epay-w4-generator .w4-preview-actions.epay-create-actions {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}


/* W-4 blank IRS template display: all 2020-2026 sample image first pages
   have 5.8-6% white borders on each side. Clip only those display gutters.
   Original image files and generated PDF previews are not modified. */
body.epay-create-preview-standard .epay-w4-generator
.w4-preview-fallback .w4-preview-fallback__page img.w4-year-template-image {
    display: block !important;
    width: 112% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 0 0 -6% !important;
    object-fit: fill !important;
}
body.epay-create-preview-standard .epay-w4-generator
.w4-preview-fallback__page {
    overflow: hidden !important;
}


/* Accessible W-4 preview zoom. Actual IRS PDF generation is unchanged. */
.epay-w4-generator .w4-zoom-bar {
 display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;
 min-height:44px;margin:8px 0;padding:5px 8px;
 border:1px solid #d7e4ea;border-radius:9px;background:#f5f9fb;
 color:#062b45;font:600 13px/1.25 "Open Sans",sans-serif;
}
.epay-w4-generator .w4-zoom-bar button {
 height:40px;min-width:40px;padding:0 9px;cursor:pointer;
 border:1px solid #b9cfd9;border-radius:8px;background:white;color:#062b45;font:inherit;
}
.epay-w4-generator .w4-zoom-val {min-width:48px;text-align:center;font-variant-numeric:tabular-nums;}
.epay-w4-generator .w4-zoom-bar button:focus-visible {outline:2px solid #0097b2;outline-offset:2px;}
.epay-w4-generator .w4-preview-fallback {overflow-x:auto;}
.epay-w4-generator .w4-preview-fallback__page.w4-zoomed-page {max-width:none;margin-left:0;margin-right:0;}
.epay-w4-generator .w4-modal__dialog > .w4-zoom-bar {flex:0 0 auto;margin:0;border:0;border-bottom:1px solid #d7e4ea;border-radius:0;}
@media(max-width:575px) {
 .epay-w4-generator .w4-zoom-bar {gap:3px;padding:4px;}
 .epay-w4-generator .w4-zoom-bar button {min-width:36px;padding:0 5px;}
}

/* Approved create-form visual tokens. W-4 behavior and field structure stay intact. */
.epay-w4-generator,
.epay-w4-generator :is(input,select,textarea,button){font-family:"Poppins",sans-serif}
.epay-w4-generator .w4-hero h1{font-size:32px;line-height:40px;font-weight:700;letter-spacing:-.8px}
.epay-w4-generator .w4-section-card{margin-bottom:24px;padding:24px 26px;border:1px solid #d9e3e8;border-radius:16px;box-shadow:0 10px 30px rgba(2,48,71,.07)}
.epay-w4-generator .w4-section-heading{padding-bottom:14px;border-bottom:2px solid #e8eef1}
.epay-w4-generator .w4-section-heading h2{font-size:21.6px;font-weight:800;line-height:29.16px}
.epay-w4-generator .w4-field{margin-bottom:18px}
.epay-w4-generator .w4-label{margin-bottom:8px;font-size:14px;font-weight:400;line-height:14px}
.epay-w4-generator .w4-question{margin-bottom:8px;font-size:14px;font-weight:400;line-height:20px}
.epay-w4-generator :is(.w4-input,.w4-select){box-sizing:border-box;width:100%;height:46px;min-height:46px;padding:9px 12px;border:1px solid #cfdbe1;border-radius:9px;background:#f6f9fb;color:#023047;font-size:12.5px;font-weight:400;line-height:1.35}
.epay-w4-generator .w4-select{padding-right:36px}
.epay-w4-generator .w4-textarea{padding:9px 12px;border:1px solid #cfdbe1;border-radius:9px;background:#f6f9fb;color:#023047;font-size:12.5px;font-weight:400;line-height:1.55}
.epay-w4-generator :is(.w4-input,.w4-textarea)::placeholder{color:#86949d;font-size:12.5px;font-weight:400;opacity:1}
.epay-w4-generator .w4-money__symbol{height:46px;min-height:46px;background:#eef3f5;font-size:12.5px}
.epay-w4-generator :is(.w4-radio-option,.w4-check-option){gap:10px;padding:12px 13px;border:1px solid #dce5e9;border-radius:10px;background:#fbfdfe;font-size:14px;font-weight:400;line-height:20px}
.epay-w4-generator :is(.w4-radio-option,.w4-check-option) input{width:18px;height:18px;margin:1px 0 0}
.epay-w4-generator .w4-preview-actions.epay-create-actions :is(#previewBtn,#w4FormButton).epay-create-action{font-size:14px!important;font-weight:800!important;line-height:20px!important}
@media(min-width:768px) and (max-width:1023.98px){.epay-w4-generator .w4-hero h1{font-size:30.72px;line-height:38.4px}}
@media(max-width:767.98px){.epay-w4-generator .w4-hero h1{font-size:28px;line-height:35px}.epay-w4-generator .w4-section-card{padding:24px 26px}}
@media(max-width:575.98px){.epay-w4-generator .w4-section-card{padding:24px 26px}}
.epay-w4-generator .w-create-hero-standard[data-w-create-standard="1"] #w4HeroTitle{font-family:"Poppins",sans-serif!important;font-size:32px!important;line-height:40px!important}
@media(min-width:768px) and (max-width:1023.98px){.epay-w4-generator .w-create-hero-standard[data-w-create-standard="1"] #w4HeroTitle{font-size:30.72px!important;line-height:38.4px!important}}
@media(max-width:767.98px){.epay-w4-generator .w-create-hero-standard[data-w-create-standard="1"] #w4HeroTitle{font-size:28px!important;line-height:35px!important}}
.epay-w4-generator #pdfForm .w4-section-heading h2{font-size:21.6px!important;font-weight:800!important;line-height:29.16px!important}
/* Container layout verified against Form 941; page-scoped, 2026-11-01. */
div.row.g-4.align-items-start.epay-w4__layout-row{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,13fr);gap:24px;margin:0;width:100%;min-width:0;align-items:start;box-sizing:border-box}
div.row.g-4.align-items-start.epay-w4__layout-row > *{width:100%;max-width:none;min-width:0;padding-left:0;padding-right:0;margin:0;box-sizing:border-box}
@media(min-width:992px) and (max-width:1199.98px){div.row.g-4.align-items-start.epay-w4__layout-row{grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:22px}}
@media(max-width:991.98px){div.row.g-4.align-items-start.epay-w4__layout-row{grid-template-columns:minmax(0,1fr);gap:24px}}
