body {
    font-family: Arial, sans-serif;
    background: #f7f7f7;
    color: #222;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

label {
    display: block;
    margin-top: 16px;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    max-width: 420px;
    padding: 10px;
    margin-top: 6px;
}

.checkbox,
.option {
    font-weight: 400;
}

button,
.button {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 18px;
    background: #1f5fbf;
    color: white;
    border: 0;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
}

.question,
.answer {
    border-top: 1px solid #ddd;
    padding-top: 20px;
    margin-top: 24px;
}

.alert,
.field-error {
    color: #b00020;
    margin-top: 10px;
}

.ok {
    color: #0a7a1f;
    font-weight: 700;
}

.bad {
    color: #b00020;
    font-weight: 700;
}

.question-prompt {
    font-weight: 600;
    margin-top: 12px;
}

.readonly-options {
    margin: 14px 0 18px 0;
}

.readonly-option {
    padding: 10px 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
}

.option-key {
    font-weight: 700;
    margin-right: 6px;
}

.correct-option {
    border-color: #0a7a1f;
    background: #eef8f0;
}

.selected-wrong-option {
    border-color: #b00020;
    background: #fff0f0;
}

.badge {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.selected-badge {
    background: #e8eefc;
    color: #1f5fbf;
}

.correct-badge {
    background: #dff3e3;
    color: #0a7a1f;
}

.explanation {
    margin-top: 12px;
    padding: 12px;
    background: #f3f6fb;
    border-left: 4px solid #1f5fbf;
}

/* Friendly application error page */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.error-container {
    max-width: 680px;
    margin: 0;
    text-align: center;
}

.error-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff3cd;
    color: #7a5200;
    font-size: 42px;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px #f0d98b;
}

.error-code {
    margin: 0 0 8px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.error-message {
    margin: 18px auto 0;
    max-width: 560px;
    font-size: 18px;
    line-height: 1.6;
}

.error-hint {
    margin: 12px auto 0;
    max-width: 560px;
    color: #555;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.error-actions .button {
    margin-top: 20px;
}

.button-secondary {
    background: #eef2f7;
    color: #1f2937;
    border: 1px solid #d5dbe5;
}

.button:hover,
.button:focus-visible {
    filter: brightness(0.94);
}

.button:focus-visible,
.error-details summary:focus-visible {
    outline: 3px solid rgba(31, 95, 191, 0.28);
    outline-offset: 3px;
}

.error-details {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    color: #666;
    text-align: left;
}

.error-details summary {
    cursor: pointer;
    font-weight: 600;
}

.error-details code {
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .error-page {
        align-items: flex-start;
        padding: 12px;
    }

    .error-container {
        width: 100%;
        padding: 24px 18px;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-actions .button {
        width: 100%;
        box-sizing: border-box;
    }
}
