
    /* =========================================================
       FORM 1040 GENERATOR
       W-2 generator visual system
       ========================================================= */

    .form1040-page {
        --form1040-orange: #f97316;
        --form1040-orange-hover: #ea680c;
        --form1040-orange-soft: #fff7ed;
        --form1040-blue-soft: #eef9fb;
        --form1040-page-bg: #f6f8fa;
        --form1040-white: #ffffff;
        --form1040-text: #263f4b;
        --form1040-border-dark: #c7d5dc;
        --form1040-danger: #c62828;
        --form1040-success: #14804a;
        width: 100%;
        color: var(--form1040-text);
        font-family: inherit;
    }

    .form1040-page *,
    .form1040-page *::before,
    .form1040-page *::after {
        box-sizing: border-box;
    }

    .form1040-page button,
    .form1040-page input,
    .form1040-page select,
    .form1040-page textarea {
        font: inherit;
    }

    .form1040-page .container {
        width: min(1220px, calc(100% - 32px));
        max-width: 1220px;
        margin-right: auto;
        margin-left: auto;
        padding-right: 0;
        padding-left: 0;
    }

    /* Hero directly below the main site menu — matched to W-2 */

    .form1040-hero {
        position: relative;
        min-height: 354px;
        overflow: hidden;
        padding: 55px 0 46px;
        background:
            linear-gradient(
                90deg,
                #fffaf7 0%,
                #ffffff 39%,
                #eef3f5 55%,
                #c8d7dc 73%,
                #155a70 100%
            );
    }

    .form1040-hero::before,
    .form1040-hero::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
    }

    .form1040-hero::before {
        left: -72px;
        bottom: -112px;
        width: 180px;
        height: 180px;
        background: #fde7d7;
    }

    .form1040-hero::after {
        top: -106px;
        right: -58px;
        width: 188px;
        height: 188px;
        background: rgba(43, 125, 145, .48);
    }

    .form1040-hero > .container {
        width: min(1184px, calc(100% - 48px));
        max-width: 1184px;
    }

    .form1040-hero .row {
        position: relative;
        z-index: 2;
        display: grid;
        align-items: center;
        margin: 0;
    }

    .form1040-hero .col-lg-5,
    .form1040-hero .col-xl-5,
    .form1040-hero .col-lg-7,
    .form1040-hero .col-xl-7 {
        width: auto;
        max-width: none;
        padding: 0;
    }

    .form1040-hero__content {
        width: 100%;
        max-width: 560px;
    }

    .form1040-hero h1.form1040-hero__title {
        width: 100%;
        max-width: 560px;
        margin: 0 0 14px;
        color: var(--form1040-navy);
        font-size: clamp(2.15rem, 3vw, 2.36rem);
        font-weight: 800;
        line-height: 1.16;
        letter-spacing: -.025em;
        white-space: normal;
        text-wrap: balance;
    }

    .form1040-hero p.form1040-hero__description {
        width: 100%;
        max-width: 550px;
        margin: 0 0 27px;
        color: #31566a;
        font-size: 1.02rem;
        line-height: 1.9;
    }

    .form1040-hero__cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 198px;
        min-height: 53px;
        padding: 13px 24px;
        border: 2px solid var(--form1040-orange);
        border-radius: 13px;
        background: var(--form1040-orange);
        color: #06283a;
        font-size: .95rem;
        font-weight: 800;
        text-decoration: none;
        box-shadow: 0 13px 25px rgba(249, 115, 22, .22);
        transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
    }

    .form1040-hero__cta:hover,
    .form1040-hero__cta:focus {
        border-color: #ff811a;
        background: #ff811a;
        color: #06283a;
        transform: translateY(-2px);
        box-shadow: 0 16px 29px rgba(249, 115, 22, .3);
    }

    .form1040-hero__steps-card {
        position: relative;
        min-height: 249px;
        margin-left: auto;
        padding: 43px 30px 29px;
        border: 1px solid #d7e1e6;
        border-radius: 25px;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 18px 45px rgba(2, 48, 71, .11);
    }

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

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

    .form1040-hero__step {
        min-width: 0;
        text-align: center;
    }

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

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

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

    .form1040-hero__step h3 {
        margin: 0 0 6px;
        color: var(--form1040-navy);
        font-size: .98rem;
        font-weight: 800;
        line-height: 1.25;
    }

    .form1040-hero__step p {
        margin: 0;
        color: #5e7080;
        font-size: .78rem;
        line-height: 1.45;
        white-space: nowrap;
    }

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

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

    @media (max-width: 991.98px) {
        .form1040-hero .row {
            grid-template-columns: minmax(0, 1fr);
            gap: 30px;
        }

        .form1040-hero__steps-card {
            width: 100%;
        }
    }

    /* Main generator layout — same structure as the finalized 1099 pages. */

    .form1040-main {
        padding: 40px 0 64px;
        overflow: visible;
        background: #ffffff;
        scroll-margin-top: 90px;
    }

    .form1040-layout {
        overflow: visible;
    }

    .form1040-form-column,
    .form1040-preview-column {
        min-width: 0;
    }

    @media (min-width: 1200px) {
        .form1040-layout {
            display: grid;
            grid-template-columns: minmax(0, 7fr) minmax(0, 13fr);
            gap: 24px;
            align-items: start;
        }
    }

    @media (min-width: 992px) and (max-width: 1199.98px) {
        .form1040-layout {
            display: grid;
            grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
            gap: 22px;
            align-items: start;
        }
    }

    .form1040-preview-column {
        position: sticky;
        top: 96px;
        align-self: start;
        height: fit-content;
    }

    .form1040-form-intro {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 20px;
        padding: 15px 17px;
        border: 1px solid #c9e5eb;
        border-radius: 10px;
        background: var(--form1040-blue-soft);
    }

    .form1040-form-intro strong {
        display: block;
        color: var(--form1040-navy);
        font-size: .9rem;
        font-weight: 800;
    }

    .form1040-form-intro span {
        color: var(--form1040-muted);
        font-size: .82rem;
        line-height: 1.5;
        text-align: right;
    }

    /* Numbered sections */

    .form1040-card {
        margin: 0 0 22px;
    }

    .form1040-card__header {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        margin: 0 0 20px;
        padding: 0 0 15px;
    }

    .form1040-card__number {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: var(--form1040-navy);
        color: #ffffff;
        font-size: .82rem;
        font-weight: 800;
        box-shadow: 0 5px 11px rgba(2, 48, 71, .16);
    }

    .form1040-card__header h2 {
        margin: 2px 0 4px;
        color: var(--form1040-navy);
        font-weight: 800;
    }

    .form1040-card__header p {
        margin: 0;
        color: var(--form1040-muted);
        font-size: .82rem;
        line-height: 1.55;
    }

    /* Fields */

    .form1040-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .form1040-field,
    .form1040-field--full {
        min-width: 0;
    }

    .form1040-field--full {
        grid-column: 1 / -1;
    }

    .form1040-field label,
    .form1040-group-label {
        display: block;
        margin: 0 0 7px;
        color: var(--form1040-navy);
        font-size: .82rem;
        font-weight: 700;
    }

    .form1040-required::after {
        content: " *";
        color: var(--form1040-danger);
    }

    .form1040-input,
    .form1040-select,
    .form1040-textarea {
        width: 100%;
        border: 1px solid var(--form1040-border-dark);
        border-radius: 7px;
        background: var(--form1040-white);
        color: var(--form1040-text);
        font-size: .9rem;
        outline: 0;
        transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
    }

    

    .form1040-textarea {
        resize: vertical;
        line-height: 1.55;
    }

    .form1040-input::placeholder,
    .form1040-textarea::placeholder {
        color: #98a7b0;
    }

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

    .form1040-input[readonly] {
        background: #eef7f9;
        color: var(--form1040-navy);
        font-weight: 700;
        cursor: not-allowed;
    }

    .form1040-help {
        margin: 6px 0 0;
        color: var(--form1040-muted);
        font-size: .72rem;
        line-height: 1.45;
    }

    /* Choices */

    .form1040-choice-list {
        display: grid;
        gap: 11px;
    }

    

    .form1040-choice {
        display: flex;
        align-items: flex-start;
        gap: 9px;
        min-width: 0;
        padding: 11px 12px;
        border: 1px solid var(--form1040-border);
        border-radius: 8px;
        background: #fbfdfe;
        color: var(--form1040-text);
        cursor: pointer;
        transition: border-color .2s ease, background-color .2s ease;
    }

    .form1040-choice:hover {
        border-color: #9bcbd5;
        background: #f2fbfc;
    }

    .form1040-choice input {
        flex: 0 0 auto;
        width: 17px;
        height: 17px;
        margin: 2px 0 0;
        accent-color: var(--form1040-teal);
    }

    .form1040-choice > span {
        min-width: 0;
    }

    .form1040-choice strong {
        display: block;
        margin: 0;
        color: var(--form1040-navy);
        font-size: .81rem;
        font-weight: 700;
        line-height: 1.45;
    }

    .form1040-choice span span {
        display: block;
        margin-top: 3px;
        color: var(--form1040-muted);
        font-size: .75rem;
        line-height: 1.45;
    }

    /* Notes and tax line rows */

    .form1040-note {
        margin: 0 0 16px;
        padding: 13px 15px;
        border-left: 4px solid var(--form1040-orange);
        border-radius: 8px;
        background: var(--form1040-orange-soft);
        color: #75411d;
        font-size: .78rem;
        line-height: 1.6;
    }

    .form1040-line-grid {
        display: grid;
        gap: 10px;
    }

    .form1040-line-row {
        display: grid;
        padding: 11px 12px;
        border: 1px solid var(--form1040-border);
        border-radius: 8px;
        background: #fbfdfe;
    }

    .form1040-line-row strong {
        display: block;
        color: var(--form1040-navy);
        font-size: .79rem;
        font-weight: 700;
        line-height: 1.4;
    }

    .form1040-line-row small {
        display: block;
        margin-top: 3px;
        color: var(--form1040-muted);
        font-size: .68rem;
        line-height: 1.4;
    }

    

    .form1040-line-row--total {
        border-color: #b9dfe6;
        background: var(--form1040-blue-soft);
    }

    .form1040-line-row--total strong {
        font-size: .82rem;
        font-weight: 800;
    }

    /* Dependents */

    .form1040-dependent {
        position: relative;
        margin-bottom: 14px;
        padding: 16px;
        border: 1px solid var(--form1040-border);
        border-radius: 9px;
        background: #fbfdfe;
    }

    .form1040-dependent__title {
        margin: 0 0 14px;
        color: var(--form1040-navy);
        font-size: .9rem;
        font-weight: 800;
    }

    .form1040-dependent__remove {
        position: absolute;
        top: 12px;
        right: 12px;
        padding: 4px 7px;
        border: 0;
        border-radius: 5px;
        background: #fff0ef;
        color: var(--form1040-danger);
        font-size: .72rem;
        font-weight: 800;
        cursor: pointer;
    }

    /* Signatures */

    .form1040-signature-box {
        position: relative;
        overflow: hidden;
        border: 1px solid var(--form1040-border-dark);
        border-radius: 8px;
        background:
            linear-gradient(#ffffff, #ffffff),
            repeating-linear-gradient(0deg, transparent 0 29px, #edf1f3 29px 30px);
    }

    .form1040-signature-box canvas {
        display: block;
        width: 100%;
        height: 150px;
        touch-action: none;
    }

    .form1040-signature-clear {
        position: absolute;
        top: 8px;
        right: 8px;
        z-index: 2;
        padding: 6px 9px;
        border: 1px solid var(--form1040-border);
        border-radius: 6px;
        background: #ffffff;
        color: var(--form1040-danger);
        font-size: .7rem;
        font-weight: 800;
        cursor: pointer;
    }

    /* Preview */

    .form1040-preview-card {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        padding: 12px;
        border: 1px solid var(--form1040-border);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: 0 14px 36px rgba(2, 48, 71, .1);
    }

    .form1040-preview-frame {
        position: relative;
        width: 100%;
        max-width: 100%;
        height: clamp(560px, calc(100vh - 220px), 940px);
        min-height: 560px;
        max-height: 940px;
        overflow: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--form1040-border-dark);
        border-radius: 10px;
        background: #ffffff;
    }

    .form1040-preview-card__heading {
        margin: 0 0 15px;
        text-align: center;
    }

    .form1040-preview-card__heading h2 {
        margin: 0 0 5px;
        color: var(--form1040-navy);
        font-size: 1.2rem;
        font-weight: 800;
        line-height: 1.35;
    }

    .form1040-preview-card__heading p {
        margin: 0;
        color: var(--form1040-muted);
        font-size: .82rem;
        line-height: 1.5;
    }

    .form1040-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: var(--form1040-navy);
        font-size: .78rem;
        font-weight: 700;
    }

    

    .form1040-preview-frame iframe {
        display: block;
        border: 0;
        background: #ffffff;
    }

    .form1040-loader {
        position: absolute;
        inset: 0;
        z-index: 3;
        display: none;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, .84);
    }

    .form1040-loader.is-visible {
        display: flex;
    }

    .form1040-spinner {
        width: 43px;
        height: 43px;
        border: 4px solid #dce8ec;
        border-top-color: var(--form1040-teal);
        border-radius: 50%;
        animation: form1040Spin .8s linear infinite;
    }

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

    .form1040-preview-actions {
        display: grid;
    }

    .form1040-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        text-align: center;
        cursor: pointer;
        transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
    }

    .form1040-button:hover {
        transform: translateY(-1px);
    }

    .form1040-button:disabled {
        opacity: .62;
        cursor: not-allowed;
        transform: none;
    }

    .form1040-button--secondary {
        border: 1px solid var(--form1040-navy);
        background: #ffffff;
        color: var(--form1040-navy);
    }

    .form1040-button--secondary:hover,
    .form1040-button--secondary:focus {
        background: #eef5f7;
        color: var(--form1040-navy);
    }

    .form1040-button--primary {
        border: 1px solid var(--form1040-orange);
        background: var(--form1040-orange);
        color: #ffffff;
        box-shadow: 0 8px 19px rgba(249, 115, 22, .22);
    }

    .form1040-button--primary:hover,
    .form1040-button--primary:focus {
        border-color: var(--form1040-orange-hover);
        background: var(--form1040-orange-hover);
        color: #ffffff;
        box-shadow: 0 11px 23px rgba(249, 115, 22, .28);
    }

    .form1040-button--small {
        min-height: 39px;
        padding: 8px 13px;
        border: 1px solid var(--form1040-teal);
        background: var(--form1040-teal);
        color: #ffffff;
    }

    .form1040-button--small:hover,
    .form1040-button--small:focus {
        background: #007f97;
        border-color: #007f97;
        color: #ffffff;
    }

    .form1040-status {
        display: none;
        margin: 12px 0 0;
        padding: 10px 12px;
        border-radius: 7px;
        font-size: .76rem;
        line-height: 1.5;
    }

    .form1040-status.is-visible {
        display: block;
    }

    .form1040-status.is-error {
        border: 1px solid #efbbb6;
        background: #fff3f2;
        color: var(--form1040-danger);
    }

    .form1040-status.is-success {
        border: 1px solid #bce2d9;
        background: #effaf7;
        color: var(--form1040-success);
    }

    /* Full preview modal */

    .form1040-modal {
        position: fixed;
        inset: 0;
        z-index: 99999;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 20px;
        background: rgba(2, 24, 35, .84);
    }

    .form1040-modal.is-open {
        display: flex;
    }

    .form1040-modal__dialog {
        display: flex;
        flex-direction: column;
        width: min(1100px, 96vw);
        height: min(92vh, 940px);
        overflow: hidden;
        border-radius: 13px;
        background: #ffffff;
        box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
    }

    .form1040-modal__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 13px 17px;
        background: var(--form1040-navy);
        color: #ffffff;
    }

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

    .form1040-modal__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 37px;
        height: 37px;
        border: 0;
        border-radius: 7px;
        background: rgba(255, 255, 255, .12);
        color: #ffffff;
        font-size: 1.65rem;
        line-height: 1;
        cursor: pointer;
    }

    .form1040-modal__body {
        flex: 1;
        min-height: 0;
        background: #eef3f5;
    }

    .form1040-modal__body iframe {
        display: block;
        width: 100%;
        height: 100%;
        border: 0;
        background: #ffffff;
    }

    

    /* Responsive */

    @media (max-width: 991.98px) {
        .form1040-layout {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 24px;
        }

        .form1040-preview-column {
            position: static;
            top: auto;
            align-self: auto;
            height: auto;
            width: 100%;
            max-width: 100%;
        }

        .form1040-preview-card {
            width: 100%;
            max-width: 100%;
            margin: 0 auto;
        }

        .form1040-preview-frame {
            height: clamp(540px, 72dvh, 760px);
            min-height: 0;
            max-height: 760px;
        }

        .form1040-hero {
            padding: 48px 0 45px;
        }

        .form1040-hero__content {
            max-width: 720px;
            margin: 0 auto;
            text-align: center;
        }

        .form1040-hero h1.form1040-hero__title,
        .form1040-hero p.form1040-hero__description {
            max-width: 700px;
            margin-right: auto;
            margin-left: auto;
        }

        .form1040-hero__steps-card {
            max-width: 720px;
            margin: 20px auto 0;
        }
    }

    @media (max-width: 767.98px) {
        .form1040-page .container {
            width: min(100% - 24px, 1220px);
        }

        .form1040-main {
            padding: 26px 0 48px;
        }

        .form1040-form-intro {
            display: block;
        }

        .form1040-form-intro span {
            display: block;
            margin-top: 4px;
            text-align: left;
        }

        .form1040-card {
            padding: 19px;
            border-radius: 10px;
        }

        .form1040-grid,
        .form1040-choice-list--2 {
            grid-template-columns: minmax(0, 1fr);
        }

        .form1040-line-row {
            grid-template-columns: minmax(0, 1fr);
        }

        .form1040-preview-frame {
            height: clamp(460px, 70dvh, 640px);
            min-height: 0;
            max-height: 640px;
        }

    }

    @media (max-width: 575.98px) {
        .form1040-preview-frame {
            height: clamp(420px, 68dvh, 560px);
            min-height: 0;
            max-height: 560px;
        }

        .form1040-hero {
            padding: 42px 0 38px;
        }

        .form1040-hero h1.form1040-hero__title {
            font-size: 1.95rem;
        }

        .form1040-hero p.form1040-hero__description {
            font-size: .93rem;
            line-height: 1.68;
        }

        .form1040-hero__cta {
            width: 100%;
        }

        .form1040-hero__steps-card {
            min-height: 0;
            padding: 42px 18px 23px;
        }

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

        .form1040-hero__steps {
            grid-template-columns: minmax(0, 1fr);
            gap: 10px;
        }

        .form1040-hero__connector {
            min-height: 19px;
            padding: 0;
        }

        .form1040-hero__connector span {
            width: 4px;
            height: 21px;
            background: linear-gradient(180deg, var(--form1040-orange) 0 50%, var(--form1040-teal) 50% 100%);
        }

        .form1040-hero__step-icon {
            width: 58px;
            height: 58px;
            margin-bottom: 8px;
        }

        .form1040-card__header h2 {
            font-size: 1.05rem;
        }

        
    }


/* Pre-submission diagnostics and unavailable attachments. */
.form1040-diagnostics {
    margin: 0 0 18px;
    padding: 15px 16px;
    border: 1px solid #c9dce4;
    border-radius: 10px;
    background: #f4fafc;
}

.form1040-diagnostics h3 {
    margin: 0 0 9px;
    color: var(--form1040-navy);
    font-size: .92rem;
    font-weight: 800;
}

.form1040-diagnostics ul {
    margin: 0;
    padding-left: 20px;
}

.form1040-diagnostics li {
    margin: 6px 0;
    color: #45616f;
    font-size: .77rem;
    line-height: 1.5;
}

.form1040-diagnostics li.is-error {
    color: var(--form1040-danger);
}

.form1040-diagnostics li.is-warning {
    color: #8a4a11;
}

.form1040-diagnostics li.is-success {
    color: var(--form1040-success);
}

/* Align the longer review copy evenly while leaving headings and other fields unchanged. */
.form1040-page .form1040-review-card .form1040-card__header p,
.form1040-page .form1040-review-card .form1040-diagnostics li,
.form1040-page .form1040-review-card .form1040-choice > span {
    text-align: justify;
    text-justify: inter-word;
}

.form1040-choice.is-disabled {
    opacity: .68;
    cursor: not-allowed;
    background: #f3f5f6;
}

.form1040-inline-warning {
    margin-top: 10px;
    color: #8a4a11;
    font-size: .75rem;
    line-height: 1.5;
}

/* ===== Consolidated 1040 layout continuation ===== */


/* Exact create-form parity with the finalized 1099 pages. */
.form1040-page{--form1040-navy:#023047;--form1040-teal:#1a9ba8;--form1040-border:#d9e3e8;--form1040-surface:#f6f9fb;--form1040-muted:#627783}
.form1040-page .form1040-hero{min-height:0;margin:0;padding:30px 0 24px;overflow:visible;border:0;background:#f4fbfc;box-shadow:none}.form1040-page .form1040-hero::before,.form1040-page .form1040-hero::after{display:none;content:none}
.form1040-page .form1040-hero__content{width:100%;max-width:820px;margin:0 auto;padding:0;text-align:center}.form1040-page .form1040-hero h1.form1040-hero__title{max-width:none;margin:0 0 10px;padding:0;color:#062b45;font-family:"Open Sans",sans-serif;font-size:clamp(28px,3.5vw,40px);font-weight:700;line-height:1.2;letter-spacing:-.8px;text-align:center}.form1040-page .form1040-hero__description{max-width:760px;margin:0 auto 20px;padding:0;color:#17384d;font-family:"Open Sans",sans-serif;font-size:17px;font-weight:400;line-height:1.65;text-align:center}.form1040-page .form1040-hero__cta{display:inline-flex;align-items:center;justify-content:center;min-width:260px;min-height:54px;margin:0 auto;padding:14px 26px;border:0;border-radius:8px;background:#1a9ba8;color:#fff;font-size:16px;font-weight:700;line-height:1.2;text-decoration:none;box-shadow:none}.form1040-page .form1040-hero__cta:hover,.form1040-page .form1040-hero__cta:focus{background:#158793;color:#fff}.form1040-page .form1040-hero__note{margin:16px 0 20px;color:#31566a;font-size:.88rem;line-height:1.55}.form1040-page .form1040-hero__instructions{max-width:720px;margin:0 auto;color:#244b60;text-align:left}.form1040-page .form1040-hero__instructions h2{margin:0 0 8px;color:#173f55;font-size:1.25rem;font-weight:500;line-height:1.35}.form1040-page .form1040-hero__instructions ol{margin:0 0 12px;padding-left:22px;font-size:.88rem;line-height:1.55}.form1040-page .form1040-hero__instructions p{margin:0;font-size:.88rem;line-height:1.55}
.form1040-page .form1040-main{margin:0}.form1040-page .form1040-card{margin:0 0 14px;padding:24px 26px;border:1px solid var(--form1040-border);border-radius:16px;background:#fff;box-shadow:0 10px 30px rgba(2,48,71,.07)}.form1040-page .form1040-card__header{align-items:flex-start;margin:0 0 14px;padding:0 0 14px;border-bottom:2px solid #e8eef1}.form1040-page .form1040-card__number{display:inline;flex:0 0 auto;width:auto;height:auto;margin:1px 3px 0 0;border-radius:0;background:none;color:var(--form1040-navy);font-size:1.35rem;font-weight:800;line-height:1.35;box-shadow:none}.form1040-page .form1040-card__number::after{content:"."}.form1040-page .form1040-card__header h2{margin:0 0 3px;color:var(--form1040-navy);font-size:1.35rem;font-weight:800;line-height:1.35}.form1040-page .form1040-card__header p{margin:0;color:var(--form1040-muted);font-size:.8rem;line-height:1.5}
.form1040-page .form1040-grid {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:18px;
    align-items:stretch;
}

.form1040-page .form1040-grid > .form1040-field {
    grid-column:auto;
    display:flex;
    min-width:0;
    width:100%;
    height:100%;
    flex-direction:column;
    align-self:stretch;
}

.form1040-page .form1040-grid > .form1040-field--full,
.form1040-page .form1040-field--full {
    grid-column:1 / -1;
    width:100%;
    min-width:0;
}

.form1040-page .form1040-field > label,
.form1040-page .form1040-group-label {
    display:block;
    margin:0 0 7px;
    color:var(--form1040-navy);
    font-size:.84rem;
    font-weight:600;
    line-height:1.4;
}

.form1040-page .form1040-optional {
    color:#6b7f8b;
    font-size:.76rem;
    font-weight:500;
    white-space:nowrap;
}

.form1040-page .form1040-grid > .form1040-field:not(.form1040-field--full) > .form1040-input,
.form1040-page .form1040-grid > .form1040-field:not(.form1040-field--full) > .form1040-select,
.form1040-page .form1040-grid > .form1040-field:not(.form1040-field--full) > .form1040-textarea {
    margin-top:auto;
}

.form1040-page .form1040-input,
.form1040-page .form1040-select {
    box-sizing:border-box;
    display:block;
    width:100%;
    min-width:0;
    height:44px;
    min-height:44px;
    padding:9px 12px;
    border:1px solid #cfdbe1;
    border-radius:9px;
    background:#f6f9fb;
    color:var(--form1040-navy);
    font-family:inherit;
    font-size:.9rem;
    font-weight:500;
    line-height:1.35;
    box-shadow:none;
}

.form1040-page .form1040-textarea {
    box-sizing:border-box;
    display:block;
    width:100%;
    min-width:0;
    min-height:96px;
    padding:10px 12px;
    border:1px solid #cfdbe1;
    border-radius:9px;
    background:#f6f9fb;
    color:var(--form1040-navy);
    font-family:inherit;
    font-size:.9rem;
    font-weight:500;
    line-height:1.45;
    resize:vertical;
    box-shadow:none;
}

.form1040-page .form1040-input:focus,
.form1040-page .form1040-select:focus,
.form1040-page .form1040-textarea:focus {
    border-color:var(--form1040-teal);
    background:#fff;
    outline:0;
    box-shadow:0 0 0 3px rgba(26,155,168,.14);
}

.form1040-page .form1040-input[readonly] {
    background:#eef3f5;
    color:var(--form1040-navy);
    font-weight:600;
}

.form1040-page .form1040-help,
.form1040-page .form1040-grid-help {
    color:var(--form1040-muted);
    font-size:.78rem;
    font-weight:400;
    line-height:1.55;
    text-align:justify;
    text-justify:inter-word;
}

.form1040-page .form1040-help {
    margin:7px 0 0;
}

.form1040-page .form1040-grid-help {
    margin:8px 0 0;
}

.form1040-page .form1040-choice-list--2 {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:18px;
    align-items:stretch;
}

.form1040-page .form1040-choice-list--2 > .form1040-choice:last-child:nth-child(odd) {
    grid-column:1 / -1;
}

.form1040-page .form1040-choice {
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    min-width:0;
    min-height:46px;
    padding:12px 13px;
    border:1px solid #dce5e9;
    border-radius:10px;
    background:#fbfdfe;
}

.form1040-page .form1040-choice input[type="checkbox"],
.form1040-page .form1040-choice input[type="radio"] {
    flex:0 0 auto;
    width:18px;
    height:18px;
    margin:0;
    accent-color:var(--form1040-teal);
}

.form1040-page .form1040-choice > span {
    min-width:0;
}

.form1040-page .form1040-choice strong {
    color:var(--form1040-navy);
    font-size:.84rem;
    font-weight:600;
    line-height:1.45;
}

.form1040-page .form1040-choice span span {
    margin-top:3px;
    color:var(--form1040-muted);
    font-size:.76rem;
    font-weight:400;
    line-height:1.5;
}

.form1040-page .form1040-line-grid {
    display:grid;
    gap:18px;
}

.form1040-page .form1040-line-row {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
    align-items:stretch;
    min-height:58px;
    padding:10px 12px;
    border:1px solid var(--form1040-border);
    border-radius:9px;
    background:#fbfdfe;
}

.form1040-page .form1040-line-row > div {
    min-width:0;
    line-height:1.48;
    text-align:left;
}

.form1040-page .form1040-line-row strong {
    color:var(--form1040-navy);
    font-size:.82rem;
    font-weight:600;
    line-height:1.42;
}

.form1040-page .form1040-line-row small {
    margin-top:3px;
    color:var(--form1040-muted);
    font-size:.72rem;
    line-height:1.45;
}

.form1040-page .form1040-line-row .form1040-input {
    width:100%;
    height:44px;
    min-height:44px;
    padding:9px 12px;
    text-align:right;
    font-size:.9rem;
    font-weight:600;
    font-variant-numeric:tabular-nums;
}

.form1040-page .form1040-dependent .form1040-grid {
    grid-template-columns:minmax(0,1fr);
}

.form1040-page .form1040-dependent__remove {
    top:13px;
    right:13px;
    padding:5px 9px;
    border:1px solid var(--form1040-navy);
    border-radius:7px;
    background:#fff;
    color:var(--form1040-navy);
    font-size:.72rem;
    font-weight:700;
    line-height:1.25;
    box-shadow:none;
}

.form1040-page .form1040-dependent__remove:hover,
.form1040-page .form1040-dependent__remove:focus {
    border-color:#1a9ba8;
    background:#f1fbfc;
    color:#087f96;
}

.form1040-page .form1040-preview-card{padding:12px;border:1px solid var(--form1040-border);border-radius:18px}.form1040-page .form1040-preview-frame{border-color:#cfdbe1}.form1040-page .form1040-preview-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;width:100%;max-width:580px;margin:30px auto 8px}.form1040-page #form1040FullPreview,.form1040-page #form1040Submit{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:100%;height:44px;min-height:44px;margin:0;padding:8px 12px;border-radius:10px;font-family:inherit;font-size:.88rem;font-weight:800;line-height:1.25;white-space:nowrap}.form1040-page #form1040FullPreview{border:1px solid #7895a8;background:#eaf2f6;color:var(--form1040-navy);box-shadow:0 1px 3px rgba(15,50,71,.14)}.form1040-page #form1040FullPreview:hover,.form1040-page #form1040FullPreview:focus{border-color:var(--form1040-navy);background:#dceaf1;color:var(--form1040-navy);transform:translateY(-1px)}.form1040-page #form1040FullPreview:disabled{border-color:#a8bac6;background:#edf2f5;color:#5e7483;cursor:not-allowed;opacity:1;box-shadow:inset 0 0 0 1px rgba(255,255,255,.55);transform:none}.form1040-page #form1040Submit{border:1px solid #168894;background:#1a9ba8;color:#fff;box-shadow:0 1px 3px rgba(15,50,71,.18)}.form1040-page #form1040Submit:hover,.form1040-page #form1040Submit:focus{background:#158793;color:#fff;transform:none;box-shadow:none}
html.form1040-modal-open,body.form1040-modal-open{overflow:hidden}.form1040-page .form1040-modal{position:fixed;inset:0;z-index:2147483647;display:none;align-items:center;justify-content:center;padding:clamp(12px,3vw,28px);margin:0;overflow:auto;isolation:isolate;background:rgba(6,43,69,.42)}.form1040-page .form1040-modal.is-open{display:flex}.form1040-page .form1040-modal__dialog{position:relative;z-index:1;display:block;width:min(850px,75vw);max-width:100%;height:min(94dvh,1000px);max-height:94dvh;aspect-ratio:auto;margin:auto;padding:0;overflow:hidden;border:1px solid #d6e1e6;border-radius:8px;background:#fff;box-shadow:0 8px 24px rgba(0,18,27,.16)}.form1040-page .form1040-modal__header{position:static;height:0;padding:0;background:transparent}.form1040-page .form1040-modal__header h2{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.form1040-page .form1040-modal__close{position:absolute;top:8px;right:8px;z-index:10;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;padding:0;border:1px solid #d6e1e6;border-radius:7px;background:#fff;color:#17384d;font-size:24px;line-height:1;cursor:pointer;box-shadow:0 2px 8px rgba(0,18,27,.14)}.form1040-page .form1040-modal__close:hover,.form1040-page .form1040-modal__close:focus-visible{border-color:#9fb5c1;background:#f4f8fa;color:#062b45;outline:2px solid rgba(0,155,181,.22);outline-offset:1px}.form1040-page .form1040-modal__body{display:block;width:100%;height:100%;min-height:0;overflow:hidden;border:0;border-radius:8px;background:#fff}.form1040-page .form1040-modal__body iframe{display:block;width:100%;height:100%;border:0;border-radius:8px;background:#fff}.form1040-page .form1040-modal__body>.epay-1099-pdf-pages{width:100%;height:100%}
@media(max-width:991.98px){.form1040-page .form1040-modal{padding:16px}.form1040-page .form1040-modal__dialog{width:min(720px,calc(100vw - 32px));height:calc(100dvh - 32px);max-height:900px}.form1040-page .form1040-modal__close{top:8px;right:8px}}
@media(max-width:767.98px){.form1040-page .form1040-hero{padding:24px 0 18px}.form1040-page .form1040-hero__description{margin-bottom:18px;font-size:16px}.form1040-page .form1040-hero__cta{width:100%;min-width:0}.form1040-page .form1040-main{padding-top:24px}.form1040-page .form1040-card{padding:18px}.form1040-page .form1040-grid,.form1040-page .form1040-choice-list--2,.form1040-page .form1040-dependent .form1040-grid{grid-template-columns:minmax(0,1fr)}.form1040-page .form1040-grid>.form1040-field:not(.form1040-field--full)>.form1040-input,.form1040-page .form1040-grid>.form1040-field:not(.form1040-field--full)>.form1040-select,.form1040-page .form1040-grid>.form1040-field:not(.form1040-field--full)>.form1040-textarea{margin-top:0}.form1040-page .form1040-line-row{grid-template-columns:minmax(0,1fr);gap:7px;align-items:stretch}.form1040-page .form1040-line-row .form1040-input{text-align:left}.form1040-page .form1040-modal{padding:12px;align-items:stretch}.form1040-page .form1040-modal__dialog{width:100%;height:calc(100dvh - 24px);max-width:100%;max-height:none;margin:auto;padding:4px;border-radius:10px}.form1040-page .form1040-modal__body,.form1040-page .form1040-modal__body iframe{border-radius:7px}.form1040-page .form1040-modal__close{top:8px;right:8px;width:38px;height:38px;font-size:24px}}
@media(max-width:575.98px){.form1040-page .container,.form1040-page .form1040-hero>.container{width:calc(100% - 24px)}.form1040-page .form1040-card{padding:16px}.form1040-page .form1040-hero__instructions{padding:0 2px}}
@media(max-width:479.98px){.form1040-page .form1040-preview-actions{grid-template-columns:minmax(0,1fr);max-width:100%}.form1040-page #form1040FullPreview,.form1040-page #form1040Submit{white-space:normal}}

    .form1040-mt-14 { margin-top:14px; }
    .form1040-mt-16 { margin-top:16px; }
    .form1040-mt-18 { margin-top:18px; }
    .form1040-mt-20 { margin-top:20px; }
    .form1040-mb-14 { margin-bottom:14px; }

.form1040-hero .tax1040-w2-intro ol,
.form1040-hero .tax1040-w2-intro li {
    font-size:14px;
    text-align:left;
}

/* Shared 1099-standard responsive PDF renderer for the 1040 blob preview. */
.form1040-preview-frame {
    overflow-x:hidden;
    overflow-y:hidden;
}
.epay-1099-pdf-pages {
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    height:100%;
    padding:8px;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    background:#eef3f5;
}
.epay-1099-pdf-pages--modal {
    height:100%;
    padding:10px;
    border-radius:8px;
}
.epay-1099-pdf-page {
    position:relative;
    box-sizing:border-box;
    width:100%;
    max-width:100%;
    margin:0 auto 10px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 2px 10px rgba(2,48,71,.10);
}
.epay-1099-pdf-page:last-child { margin-bottom:0; }
.epay-1099-pdf-page::before {
    content:"ePaystubs";
    position:absolute;
    left:50%;
    z-index:2;
    width:max-content;
    max-width:90%;
    transform:translate(-50%,-50%) rotate(-28deg);
    color:rgba(2,48,71,.16);
    font-family:"Open Sans",sans-serif;
    font-size:clamp(24px,4.2vw,52px);
    font-weight:800;
    line-height:1;
    letter-spacing:.03em;
    text-align:center;
    white-space:nowrap;
    pointer-events:none;
    user-select:none;
    -webkit-user-select:none;
}
.epay-1099-pdf-page::before { top:50%; }
.epay-1099-pdf-page canvas {
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
    margin:0;
}
#form1040Preview.epay-1099-pdfjs-active,
#form1040ModalPreview.epay-1099-pdfjs-active {
    display:none;
}
#form1040Preview.form1040-preview-hidden { display:none; }
@media(max-width:575.98px){
    .epay-1099-pdf-pages,
    .epay-1099-pdf-pages--modal{padding:5px}
    .epay-1099-pdf-page{margin-bottom:7px}
    .epay-1099-pdf-page::before {font-size:clamp(22px,8vw,36px)}
}

/* Form 941 create-page design alignment; scoped to Form 1040 only. */
.form1040-page .form1040-main > .container {
    box-sizing:border-box;
    width:100%;
    max-width:1220px;
    margin-inline:auto;
    padding-inline:12px;
}
.form1040-page #form-1040 .form1040-card__header h2,
.form1040-page .form1040-preview-card__heading h2 {
    font-family:"Poppins",sans-serif !important;
}
@media(max-width:991.98px) {
    .form1040-page .form1040-preview-card { padding:10px; border-radius:14px; }
}
@media(max-width:767.98px) {
    .form1040-page .form1040-preview-card { padding:8px; }
}

/* Form 1040 amount fields use the Form 941 currency-prefix treatment. */

.form1040-page #form-1040 .form1040-line-row .form1040-input {
    box-sizing:border-box;
    height:46px;
    min-height:46px;
    padding-left:56px;
    border-color:#cfdbe1;
    border-radius:9px;
    background-color:#f6f9fb;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='46' viewBox='0 0 44 46'%3E%3Ctext x='22' y='28' text-anchor='middle' fill='%23023047' font-family='Poppins,Arial,sans-serif' font-size='14'%3E%24%3C/text%3E%3C/svg%3E"),
        linear-gradient(to right,#eef3f5 0 43px,#cfdbe1 43px 44px,transparent 44px);
    background-repeat:no-repeat;
    background-position:left center;
    background-size:44px 46px,100% 100%;
    color:#023047;
    font-family:"Poppins",sans-serif;
    font-size:12.5px;
    font-weight:400;
    line-height:1.35;
}

/* Keep every 1040 label exactly 8px above its control at all widths. */
#form-1040 .form1040-grid > .form1040-field > .form1040-input,
#form-1040 .form1040-grid > .form1040-field > .form1040-select,
#form-1040 .form1040-grid > .form1040-field > .form1040-textarea { margin-top:0; }
