.test-reader {
    --ink: #143e42;
    --muted: #48656a;
    --line: #d4e3df;
    --mist: #eff6f3;
    --accent: #246b66;
    --mint: #b5efdd;
    --gutter: clamp(1.25rem, 4.5vw, 3.75rem);
    max-width: 51rem;
    margin: 0 auto 2.5rem;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.test-return {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    margin-bottom: .25rem;
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

.test-return:hover {
    color: var(--accent);
    text-decoration: underline;
}

.test-sheet {
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 35px rgb(18 54 54 / 6%);
}

.test-cover {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: 14rem;
    overflow: hidden;
    border-radius: calc(1rem - 1px) calc(1rem - 1px) 0 0;
    background: var(--ink);
    color: #fff;
}

.test-cover-image,
.test-cover-symbol {
    position: absolute;
    z-index: -2;
    inset: 0 0 0 auto;
    width: 62%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.test-cover-symbol {
    display: grid;
    place-items: center end;
    padding-right: 12%;
    background: repeating-radial-gradient(circle at 72% 130%, transparent 0 24px, rgb(181 239 221 / 16%) 25px 26px);
    color: var(--mint);
    font-size: 4rem;
}

.test-cover::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, var(--ink) 35%, rgb(20 62 66 / 94%) 45%, rgb(20 62 66 / 55%) 61%, transparent 82%);
    content: "";
}

.test-cover-copy {
    width: 64%;
    padding: 2rem 0 2rem var(--gutter);
}

.test-mode, .test-section-label, .test-step {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.test-mode {
    margin-bottom: .75rem;
    color: #f5d183;
    font-size: .92rem;
}

#testCoverTitle, #outcomeTitle {
    margin: 0;
    font: 500 clamp(2rem, 4.4vw, 3.2rem)/1.08 Georgia, "Times New Roman", serif;
    letter-spacing: -.035em;
}

.test-cover-subtitle {
    display: block;
    margin-top: .7rem;
    color: #f1f8f5;
    font: 600 1.13rem/1.35 var(--font-family);
    letter-spacing: normal;
}

.test-in-progress .test-cover {
    min-height: 6.6rem;
    align-items: center;
}
.test-in-progress .test-cover-copy {
    width: 65%;
    padding-block: 1rem;
}
.test-in-progress .test-mode {
    margin-bottom: .35rem;
}
.test-in-progress #testCoverTitle {
    font-size: clamp(1.45rem, 2.7vw, 2rem);
}
.test-in-progress .test-cover-subtitle {
    display: none;
}

.test-page {
    padding: clamp(1.5rem, 3vw, 2.25rem) var(--gutter);
}
.test-notice {
    margin: 1.25rem var(--gutter) 0;
    scroll-margin-top: 6rem;
}
.test-description, .test-outcome-body {
    font-size: 1.1rem;
    line-height: 1.65;
    color: #263e42;
}
.test-description > :last-child, .test-outcome-body > :last-child {
    margin-bottom: 0 !important;
}
.test-rule {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin: 1rem 0 0;
    color: var(--muted);
}
.test-start-controls {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--line);
}
.test-verification {
    flex: 1 1 18rem;
    min-width: 0;
}
.test-section-label {
    margin: 0 0 .7rem;
}
.test-section-label i {
    color: var(--accent);
}
.test-verification .form-label {
    margin: 0 0 .4rem;
}
.test-recaptcha-wrap {
    max-width: 100%;
    overflow-x: auto;
}
#fallbackCaptchaAnswer {
    max-width: 12rem;
}

.test-reader .form-control {
    min-height: 46px;
    border-color: #a5bab6;
    border-radius: .5rem;
    font-size: 1rem;
    color: var(--ink);
}

.test-reader .btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    border-radius: .5rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
}

.test-reader .btn-primary {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.test-reader .btn-primary:hover {
    background: var(--accent);
}
.test-action {
    gap: 1rem;
    padding: .72rem 1.55rem;
}

.test-survival-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 .85rem;
    margin: 0 0 1rem;
    border-inline-start: 3px solid var(--accent);
    padding-inline-start: .75rem;
    font-weight: 600;
}

.test-survival-summary a,
.test-survivors-pages a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--accent);
    text-underline-offset: .17em;
}

.test-survivors-title {
    margin: 0 0 .75rem;
    font: 500 clamp(1.9rem, 4vw, 3rem)/1.1 Georgia, serif;
    letter-spacing: -.035em;
}

.test-survivors-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.test-survivors-list li {
    border-top: 1px solid var(--line);
}

.test-survivors-list a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .8rem;
    min-height: 48px;
    padding: .55rem .25rem;
    color: var(--ink);
    text-decoration: none;
}

.test-survivors-list a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.test-survivors-list strong {
    display: block;
}

.test-survivors-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    border-top: 1px solid var(--line);
}

.test-step {
    gap: .45rem;
    margin-bottom: .8rem;
    color: var(--accent);
    font-size: .94rem;
}

.test-step::after {
    height: 1px;
    flex: 1;
    margin-left: .45rem;
    background: var(--line);
    content: "";
}

#questionTitle {
    margin: 0 0 1.3rem;
    color: #203b3f;
    font: 400 clamp(1.12rem, 1.8vw, 1.38rem)/1.56 Georgia, "Times New Roman", serif;
    white-space: pre-line;
}

#questionTitle:focus, #outcomeTitle:focus {
    outline: none;
}

.test-help {
    margin: 0 0 1.6rem;
    border-inline-start: 3px solid #569b91;
    border-radius: 0 .55rem .55rem 0;
    padding: .85rem 1.05rem;
    background: var(--mist);
    color: #294b49;
    font-size: 1rem;
    line-height: 1.55;
}

.test-help:has(> .alert-warning:only-child) {
    border-color: #c59336;
    background: #fcf4df;
    color: #624c24;
}

.test-help > .alert {
    margin: .55rem 0 !important;
    padding: 0 !important;
    border: 0;
    background: transparent;
    color: inherit;
}

.test-help .bi {
    flex-shrink: 0;
}
.test-help .alert-warning .bi {
    color: #916211;
}
.test-help > :first-child {
    margin-top: 0 !important;
}
.test-help > :last-child {
    margin-bottom: 0 !important;
}

.test-options {
    display: grid;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: choice;
}

.test-options li {
    counter-increment: choice;
}
.test-option-btn, .test-multi-label {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1rem;
    border: 1px solid #bccfca;
    border-radius: .6rem;
    background: #fff;
    color: #233e41;
    text-align: start;
    font: 600 1.03rem/1.45 var(--font-family);
    touch-action: manipulation;
    cursor: pointer;
}

.test-answer-text {
    flex: 1;
    min-width: 0;
}
.test-option-btn > i {
    flex: none;
    color: var(--accent);
    font-size: .88rem;
}
.test-option-key {
    display: grid;
    place-items: center;
    flex: 0 0 2rem;
    height: 2rem;
    border-radius: .45rem;
    background: var(--mist);
    color: var(--accent);
    font: 600 1rem/1 var(--font-family);
}

.test-option-key::before {
    content: counter(choice, lower-alpha);
}
.test-option-btn.was-selected, .test-multi-label:has(:checked) {
    border-color: var(--accent);
    background: #eaf5f0;
}
.test-option-btn.was-selected .test-option-key {
    background: var(--accent);
    color: white;
}
.test-multi-label .form-check-input {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
}
.test-multi-label .form-check-input:checked {
    border-color: var(--accent);
    background-color: var(--accent);
}
.test-reader :is(a, button, input, textarea):focus-visible, .test-multi-label:focus-within {
    outline: 3px solid #297f79;
    outline-offset: 2px;
}
.test-option-btn:disabled {
    cursor: wait;
}

@media (hover: hover) {
    .test-option-btn:hover:enabled, .test-multi-label:hover {
        border-color: var(--accent);
        background: var(--mist);
    }
    .test-option-btn:hover:enabled .test-option-key {
        background: var(--accent);
        color: #fff;
    }
}

.test-step-actions, .test-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
}
.test-step-actions > :not(:empty):not(.d-none) {
    margin-top: 1rem;
}
#outcomeTitle {
    margin-bottom: 1rem;
    font-size: clamp(1.7rem, 3.8vw, 2.4rem);
}
#outcomeStatusHeader i {
    color: inherit;
}
.test-progress-box, .test-revive-box {
    margin: 1.25rem 0;
    padding: 1.05rem 1.2rem;
    border-radius: .65rem;
    background: var(--mist);
}
.test-progress-box .progress {
    height: .45rem;
    margin-top: .7rem;
    background: #cfdfd8;
}
.test-progress-box .progress-bar {
    transition: none;
}
.test-share, .test-outcome-actions {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}
.test-outcome-body h5 {
    color: var(--ink);
}

@media (max-width: 575.98px) {
    .test-reader {
        --gutter: 1rem;
        margin: -.4rem -.75rem 2rem;
    }
    .test-cover {
        min-height: 13rem;
    }
    .test-cover-image, .test-cover-symbol {
        width: 100%;
    }
    .test-cover::after {
        background: linear-gradient(0deg, rgb(13 43 47 / 99%), rgb(13 43 47 / 86%) 34%, rgb(13 43 47 / 30%) 85%);
    }
    .test-cover-copy {
        width: 100%;
        padding: 3.8rem 1rem 1.15rem;
    }
    .test-cover-subtitle {
        font-size: 1rem;
    }
    .test-in-progress .test-cover {
        min-height: 5rem;
    }
    .test-in-progress .test-cover-copy {
        width: 78%;
        padding: .85rem 1rem;
    }
    .test-in-progress .test-cover::after {
        background: linear-gradient(90deg, rgb(13 43 47 / 98%) 5%, rgb(13 43 47 / 88%) 52%, rgb(13 43 47 / 20%));
    }
    .test-page {
        padding-block: 1.2rem;
    }
    .test-start-controls {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }
    #fallbackCaptchaAnswer {
        max-width: none;
    }
    #questionInputArea .btn-primary {
        width: 100%;
    }
    .test-option-btn, .test-multi-label {
        gap: .65rem;
        padding: .75rem;
        font-size: 1rem;
    }
    .test-option-btn {
        align-items: flex-start;
    }
    .test-option-btn .bi-chevron-right {
        display: none;
    }
    .test-option-key {
        flex-basis: 1.65rem;
        height: 1.65rem;
    }
    .test-help {
        padding: .75rem;
    }
}
