/* Shared presentation for ACH worked exercises. */
.exercise-wizard { padding: 28px 0 36px; font-size: 16px; line-height: 1.5; color: #25374a; }
.exercise-header { margin-bottom: 24px; }
.exercise-header h1 { margin: 0 0 12px; color: #003366; }
.exercise-wizard h2, .exercise-wizard h3 { margin: 0 0 12px; color: #003366; font-size: 23px; line-height: 1.3; }
.exercise-wizard a:focus-visible { outline: 3px solid #006bb3; outline-offset: 3px; }
/* Exercise sections share the overview's navy accents, pale headings and fine rules. */
.exercise-intro {
    padding: 20px 24px;
    margin-bottom: 24px;
    border-left: 4px solid #003366;
    border-radius: 6px;
    background: #edf4fa;
}
.exercise-wizard .exercise-intro h2 { margin: 0 0 10px; color: #003366; }
.exercise-intro a { display: inline-block; padding: 4px 0; color: #003366; }
.exercise-wizard .sectionpanel {
    margin: 0 0 16px;
    border: 1px solid #ccd5de;
    border-radius: 6px;
    box-shadow: none;
    scroll-margin-top: 20px;
}
.exercise-wizard .sectionpanel > .panel-heading {
    padding: 14px 18px;
    border-bottom: 1px solid #ccd5de;
    border-left: 4px solid #003366;
    border-radius: 5px 5px 0 0;
    background: #edf4fa;
    color: #003366;
}
.exercise-wizard .sectionpanel .panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 18px;
    line-height: 1.4;
}
.exercise-wizard .sectionpanel .panel-title > a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: #003366;
    font-weight: 600;
}
.exercise-wizard .sectionpanel .section-number {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #003366;
    color: #fff;
    font-size: 15px;
}
.exercise-wizard .sectionpanel .panel-title > .pull-right {
    float: none !important;
    flex-shrink: 0;
    max-width: 45%;
    overflow-wrap: anywhere;
    padding: 4px 10px;
    border: 1px solid #ccd5de;
    border-radius: 4px;
    background: #fff;
    color: #25374a;
    font-size: 14px;
    font-weight: 400;
}
.exercise-wizard .sectionpanel .panel-body { padding: 18px; }
/* Keep hint controls on the right in every current and future wizard section. */
.exercise-wizard .hintlink {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    align-items: center;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid #ccd5de;
    border-radius: 4px;
    color: #003366;
    background: #f3f7fb;
    font-size: 14px;
}
.exercise-wizard .hint {
    margin-top: 12px;
    padding: 14px;
    border-left: 3px solid #b7c9db;
    border-radius: 4px;
    background: #f3f7fb;
}
.exercise-wizard .disabledsection { opacity: 1; }
.exercise-wizard .sectionpanel.is-complete > .panel-heading { background: #f3f7fb; }
@media (max-width: 767px) {
    .exercise-intro { padding: 16px; }
    .exercise-wizard .sectionpanel > .panel-heading { padding: 12px; }
    .exercise-wizard .sectionpanel .panel-title { flex-direction: column; align-items: flex-start; gap: 8px; }
    .exercise-wizard .sectionpanel .panel-title > .pull-right { margin-left: 42px; max-width: calc(100% - 42px); }
    .exercise-wizard .sectionpanel .panel-body { padding: 16px; }
}

/* Clickable answers shared by the electron and reaction wizards. */
.wizard-choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.wizard-choice {
    min-width: 0;
    min-height: 48px;
    padding: 8px 6px;
    border: 1px solid #b7c9db;
    border-radius: 6px;
    background: #fff;
    color: #003366;
    font-size: 20px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.wizard-select-choices { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); margin: 12px 0; }
.wizard-select-choices .wizard-choice { padding: 12px; font-size: 16px; }
.wizard-choice:hover { border-color: #003366; background: #edf4fa; }
.wizard-choice:focus-visible { outline: 3px solid #006bb3; outline-offset: 3px; }
.wizard-choice.is-selected { background: #003366; border-color: #003366; color: #fff; }
.wizard-choice.is-incorrect { background: #fff0ee; border-color: #a12622; color: #a12622; }
.wizard-choice:disabled { cursor: default; }
@media (max-width: 767px) {
    .wizard-choices { gap: 6px; }
    .wizard-choice { font-size: 18px; }
    .wizard-choices:not(.wizard-select-choices) .wizard-choice { padding: 8px 3px; }
}

/* Step feedback stays with its question; saved-answer status belongs to the intro. */
.exercise-wizard .wizard-feedback { margin: 0 18px 18px; overflow-wrap: anywhere; }
.exercise-wizard .wizard-feedback.alert-success { background: #edf6ef; border-color: #cfe2d3; color: #285736; }
.exercise-wizard .wizard-feedback.alert-danger { background: #fff0ee; border-color: #e4b6b4; color: #a12622; }
.wizard-feedback-message + .wizard-feedback-message { margin-top: 8px; }
.wizard-feedback-message pre { max-height: 300px; margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.exercise-storage-status, .wizard-intro-feedback { margin: 12px 0 0; overflow-wrap: anywhere; }
.exercise-wizard .exercise-storage-status { background: #f3f7fb; border-color: #ccd5de; color: #52677a; }
.exercise-storage-message { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.exercise-storage-message .clearstorage { min-height: 40px; padding: 6px 8px; color: #003366; white-space: normal; text-align: left; }
.exercise-wizard .wizard-feedback[hidden], .exercise-storage-status[hidden], .wizard-intro-feedback[hidden] { display: none; }
@media (max-width: 767px) {
    .exercise-wizard .wizard-feedback { margin: 0 16px 16px; }
}
