.dw-form-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 28px;
    background: #fff;
    border: 1px solid #e3ded7;
    border-radius: 12px;
    color: #29252a;
}

.dw-form-wrap h2 {
    margin-top: 0;
}

.dw-form-wrap fieldset {
    border: 0;
    border-top: 1px solid #e7e1d9;
    margin: 26px 0 0;
    padding: 22px 0 0;
    min-width: 0;
}

.dw-form-wrap legend {
    font-size: 1.25rem;
    font-weight: 700;
    padding-right: 12px;
}

.dw-form-wrap label {
    display: block;
    font-weight: 600;
    margin: 14px 0 6px;
}

.dw-form-wrap input:not([type=checkbox]):not([type=file]),
.dw-form-wrap select,
.dw-form-wrap textarea {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 12px;
    border: 1px solid #aaa;
    border-radius: 6px;
    background: #fff;
    color: #242424;
    font: inherit;
}

.dw-form-wrap input[type=file] {
    display: block;
    max-width: 100%;
    margin: 10px 0;
}

.dw-form-wrap small {
    display: block;
    color: #5d5d5d;
    margin: 5px 0 10px;
    line-height: 1.5;
}

.dw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 22px;
}

.dw-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 18px;
}

.dw-checks label {
    font-weight: 400 !important;
}

/* Application acknowledgment checkbox */
.dw-form-wrap label.dw-agree {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    font-weight: 400 !important;
    text-align: left;
}

.dw-form-wrap label.dw-agree input[type=checkbox] {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 3px 0 0;
    padding: 0;
    float: none;
    position: static;
}

.dw-form-wrap button {
    background: #2f2734;
    color: white;
    border: 0;
    border-radius: 6px;
    padding: 14px 22px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    margin-top: 20px;
}

.dw-form-wrap button:hover {
    background: #514157;
}

.dw-notice {
    background: #e8f5e9;
    padding: 14px;
}

.dw-error {
    background: #fff0ed;
    padding: 14px;
}

.dw-trap {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
}

.dw-form-wrap :focus-visible {
    outline: 3px solid #b08a4a;
    outline-offset: 2px;
}

/* Consistent field layout */
.dw-form-wrap .dw-field {
    min-width: 0;
    display: block;
    margin: 0 0 12px;
}

.dw-form-wrap .dw-field label:not(.dw-agree) {
    display: block;
    width: 100%;
    float: none;
    position: static;
    margin: 14px 0 6px;
    text-align: left;
}

.dw-form-wrap .dw-field input,
.dw-form-wrap .dw-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    float: none;
    margin: 0;
}

.dw-form-wrap input::placeholder,
.dw-form-wrap textarea::placeholder {
    color: #777;
    opacity: 1;
}

.dw-form-wrap #dw-amazon-field[hidden] {
    display: none !important;
}

/* Mobile layout */
@media (max-width: 650px) {
    .dw-grid,
    .dw-checks {
        grid-template-columns: 1fr;
    }

    .dw-form-wrap {
        padding: 18px;
    }
}