body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f3f7fb;
    color: #111827;
}

[hidden] {
    display: none !important;
}

.participant-shell {
    box-sizing: border-box;
    max-width: 980px;
    margin: 0 auto;
    padding: 32px 20px;
}

.test-heading {
    width: min(100%, 430px);
    margin: 0 auto;
    color: #111827;
}

.test-heading p {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
}

.test-heading h1 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
}

.test-heading span {
    display: block;
    color: #475569;
    font-size: 16px;
}

.participant-form {
    width: min(100%, 430px);
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.participant-form.is-question-step {
    width: min(100%, 980px);
}

.participant-form label {
    font-weight: 700;
}

.participant-card {
    display: grid;
    gap: 12px;
    padding: 28px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.22);
}

.participant-card .participant-submit {
    width: 100%;
    margin-top: 14px;
    border-radius: 12px;
}

.participant-card-heading {
    margin-bottom: 12px;
}

.participant-card-heading h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
}

.participant-card-heading p {
    margin: 0 0 8px;
    color: #7f1d36;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.participant-card-heading span {
    display: block;
    color: #475569;
    font-size: 15px;
}

.question-panel {
    width: 100%;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.participant-card input,
.participant-lookup > input {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #d6d6d6;
    border-radius: 0;
    background: #ffffff;
    font: inherit;
}

.test-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    padding: 12px 14px;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    background: #f0f9ff;
}

.test-progress strong {
    color: #7f1d36;
}

.test-progress span {
    color: #475569;
    font-weight: 700;
}

.question-list {
    display: grid;
    gap: 14px;
}

.participant-question {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #ffffff;
}

.participant-question h2 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.5;
}

.participant-question label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    font-weight: 400;
}

.participant-question label:has(input:checked) {
    border-color: #7f1d36;
    background: #fff7ed;
}

.participant-question input {
    margin-top: 3px;
    accent-color: #7f1d36;
}

.participant-empty {
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
}

.participant-empty p {
    margin: 6px 0 0;
}

.participant-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(135deg, #7f1d36 0%, #b91c4b 62%, #facc15 160%);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
    box-shadow: 0 12px 26px rgba(127, 29, 54, 0.2);
}

.participant-submit:hover {
    background: linear-gradient(135deg, #641528 0%, #9f1743 70%, #eab308 160%);
    box-shadow: 0 16px 34px rgba(127, 29, 54, 0.28);
    transform: translateY(-1px);
}

.participant-submit:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(127, 29, 54, 0.22);
}

.participant-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #d6d6d6;
    border-radius: 0;
    background: #ffffff;
    color: #111827;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.participant-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #767676;
    border-radius: 8px;
    background: #f0f0f0;
    box-shadow: none;
    color: #000000;
    font: 18px Arial, sans-serif;
    font-weight: 400;
    line-height: normal;
    gap: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.participant-nav-button span {
    display: inline;
    min-width: 0;
    height: auto;
    border-radius: 0;
    background: transparent;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.participant-nav-button:hover {
    background: #e5e5e5;
    border-color: #4f4f4f;
    color: #000000;
    transform: none;
    box-shadow: none;
}

.participant-nav-button:active {
    background: #dcdcdc;
}

.participant-nav-button:focus-visible {
    outline: 1px solid #000000;
    outline-offset: 2px;
}

.participant-secondary.participant-nav-button span {
    background: transparent;
    color: inherit;
}

.participant-final-submit {
    border-radius: 12px;
    min-height: 38px;
    padding: 0 14px;
    font-size: 18px;
}

.participant-lookup-submit {
    border-radius: 12px;
    padding: 0 24px;
}

.test-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 4px;
}

.participant-form input[readonly] {
    background: #eef2f7;
    color: #475569;
}

.form-error {
    margin: 0;
    color: #b91c1c;
    font-size: 13px;
}

.submit-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.58);
}

.submit-modal {
    position: relative;
    box-sizing: border-box;
    width: min(100%, 420px);
    display: grid;
    gap: 12px;
    padding: 30px 28px 28px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.34);
    text-align: center;
}

.submit-modal p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.submit-modal h2 {
    margin: 0;
    color: #111827;
    font-size: 26px;
    line-height: 1.22;
}

.submit-modal strong {
    display: block;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
}

.submit-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #111827;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.submit-modal-close:hover {
    background: #e2e8f0;
}

.submit-modal-action {
    width: 100%;
    margin-top: 8px;
    border-radius: 8px;
}

@media (max-width: 640px) {
    .participant-shell {
        padding: 28px 16px;
    }

    .test-heading,
    .participant-form {
        width: 100%;
    }

    .participant-card {
        padding: 22px;
    }

    .question-panel {
        width: 100%;
        margin: 0;
    }

    .test-progress,
    .test-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .participant-submit,
    .participant-secondary {
        width: 100%;
    }

    .participant-nav-button {
        width: fit-content;
    }

    .submit-modal {
        padding: 28px 20px 22px;
    }

    .submit-modal h2 {
        font-size: 22px;
    }
}

/* Corporate black gradient theme */
body {
    background:
        linear-gradient(135deg, #f8fafc 0%, #eef2f7 48%, #e5e7eb 100%);
    color: #111827;
}

.participant-card-heading p,
.test-progress strong {
    color: #111827;
}

.participant-card {
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2);
}

.test-progress {
    border-color: #a5f3fc;
    background: #ecfeff;
}

.participant-question label:has(input:checked) {
    border-color: #111827;
    background: #f4f4f5;
}

.participant-question input {
    accent-color: #111827;
}

.participant-submit {
    background: linear-gradient(135deg, #020617 0%, #18181b 58%, #3f3f46 100%);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22);
}

.participant-submit:hover {
    background: linear-gradient(135deg, #18181b 0%, #27272a 58%, #52525b 100%);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.28);
}

.participant-nav-button:hover {
    color: #000000;
}
