* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 2.5rem 1rem;
    background: #f2f2ef;
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
    line-height: 1.4;
}

.application-form {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 2.5rem 3rem 3rem;
    box-shadow: 0 0 0 1px #ddd;
}

/* --- Letterhead --- */

.letterhead {
    margin-bottom: 1.5rem;
}

.wordmark {
    display: inline-block;
    font-size: 2rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    transform: skewX(-6deg);
    margin-bottom: 0.75rem;
}

.offices {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.office-name {
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 0.15rem;
}

.eeo-statement {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0.75rem 0 1.25rem;
}

.section-title {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1.15rem;
    border-bottom: 2px solid #000;
    padding-bottom: 0.4rem;
    margin: 0 0 1.25rem;
}

/* --- Sections --- */

.pdf-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ccc;
}

.pdf-section:last-of-type {
    border-bottom: none;
}

.pdf-section > .section-title:first-child {
    margin-top: 0;
}

/* --- Row grids --- */

.row {
    display: grid;
    gap: 0.5rem 1.5rem;
}

.row-2col {
    grid-template-columns: repeat(2, 1fr);
}

.row-3col {
    grid-template-columns: repeat(3, 1fr);
}

.row-4col {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 640px) {
    .row-2col,
    .row-3col,
    .row-4col {
        grid-template-columns: 1fr;
    }
    .application-form {
        padding: 1.5rem 1.25rem 2rem;
    }
}

/* --- Fields --- */

.field {
    margin-bottom: 1rem;
}

.field > label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
    width: 100%;
    padding: 0.45rem 0.5rem;
    font: inherit;
    background: #fff;
    border: 1px solid #333;
    border-radius: 2px;
}

.field textarea {
    min-height: 5rem;
    resize: vertical;
}

.req {
    color: #b00020;
    margin-left: 0.2rem;
}

.help-text {
    font-size: 0.8rem;
    color: #555;
    margin: 0.25rem 0 0;
}

.errorlist {
    list-style: none;
    margin: 0.3rem 0 0;
    padding: 0;
    color: #b00020;
    font-size: 0.85rem;
}

.field--error input:not([type="radio"]):not([type="checkbox"]),
.field--error select,
.field--error textarea {
    border-color: #b00020;
}

/* Underlined "blank line" fields, only on the Northwest-branded pages */

.pdf-section--lines .field input:not([type="radio"]):not([type="checkbox"]),
.pdf-section--lines .field select,
.pdf-section--lines .field textarea {
    border: none;
    border-bottom: 1.5px solid #000;
    border-radius: 0;
    background: transparent;
    padding: 0.3rem 0.1rem;
}

.pdf-section--lines .field--error input:not([type="radio"]):not([type="checkbox"]),
.pdf-section--lines .field--error select,
.pdf-section--lines .field--error textarea {
    border-bottom-color: #b00020;
}

/* --- Checkbox fields (single BooleanField) --- */

.field--checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.field--checkbox input[type="checkbox"] {
    width: auto;
    accent-color: #000;
}

/* --- Radio / checkbox-multiple groups --- */

input[type="radio"],
input[type="checkbox"] {
    width: auto;
    accent-color: #000;
}

.radio-options > div,
.checkbox-options > div {
    margin-top: 0.4rem;
}

.radio-options > div > div,
.checkbox-options > div > div {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.radio-options > div {
    display: flex;
    flex-direction: column;
}

.checkbox-options > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.2rem 0.75rem;
}

/* --- Yes/No "(Circle One)" questions --- */

.yesno-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #ddd;
}

.field--yesno:last-child .yesno-row {
    border-bottom: none;
}

.yesno-label {
    font-weight: 600;
    flex: 1 1 320px;
    margin: 0;
}

.circle-one {
    font-weight: 400;
    font-size: 0.85em;
    text-transform: none;
    opacity: 0.75;
}

.yesno-options {
    flex: 0 0 auto;
}

.yesno-options > div {
    display: flex;
    gap: 1.5rem;
}

.yesno-options > div > div {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.yesno-options label {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
}

.yesno-followup {
    margin: 0.5rem 0 0.75rem 0;
    padding-left: 1rem;
    border-left: 2px solid #ccc;
}

.yesno-followup .field {
    margin-bottom: 0;
}

.yesno-followup .field > label {
    font-weight: 500;
    color: #444;
    font-size: 0.9rem;
}

/* --- I-9 preparer/translator formset --- */

.preparer-fieldset {
    border: 1px solid #000;
    padding: 1rem 1.5rem 0.5rem;
    margin-top: 1.5rem;
}

.preparer-fieldset legend {
    font-weight: 700;
    padding: 0 0.5rem;
}

.preparer-entry {
    padding: 1rem 0;
    border-bottom: 1px dashed #ccc;
}

.preparer-entry:last-child {
    border-bottom: none;
}

/* --- Submit --- */

button[type="submit"] {
    margin-top: 1.5rem;
    padding: 0.85rem 2.25rem;
    font-size: 1rem;
    font-weight: 700;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

button[type="submit"]:hover {
    background: #222;
}
