body.testing-mode-active .container {
    padding-right: min(42px, 5vw);
}

.testing-choice-diagnostics {
    margin: 8px 0 18px 10px;
    padding: 10px 12px;
    color: #101820;
    background: #f7f0d0;
    border: 2px solid #080e18;
    border-radius: 3px;
    box-shadow: 3px 3px 0 #060c14;
    font-family: var(--font-mono);
    font-size: 9pt;
    line-height: 1.45;
    transform: rotate(-0.25deg);
}

.choice .testing-choice-diagnostics,
.choice .testing-choice-diagnostics * {
    font-family: var(--font-mono);
    letter-spacing: 0;
    text-transform: none;
}

.choice .testing-line,
.testing-line {
    margin: 4px 0;
    color: #101820;
}

.choice .testing-line strong,
.testing-line strong {
    color: #101820 !important;
}

.choice .testing-line code,
.testing-line code,
.choice .testing-choice-vars code,
.testing-choice-vars code,
.testing-vars-panel code {
    display: inline;
    color: #0d3155 !important;
    background: rgba(15, 53, 92, 0.12);
    border: 0;
    outline: 0;
    box-shadow: none;
    border-radius: 2px;
    padding: 1px 4px;
    font: inherit;
    cursor: text;
}

.choice .testing-error code,
.testing-error code {
    color: #7d1515 !important;
    background: rgba(125, 21, 21, 0.12);
}

.choice .testing-muted code,
.testing-muted code {
    color: #4b5360 !important;
}

.choice .testing-score-deltas,
.testing-score-deltas {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 6px 0;
}

.choice .testing-score-delta,
.testing-score-delta {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    color: #101820 !important;
    background: #ffffff;
    border: 1.5px solid #080e18;
    border-radius: 3px;
    box-shadow: 1px 1px 0 #080e18;
    font-size: 8.5pt;
    line-height: 1.2;
    text-transform: uppercase;
    cursor: default;
}

.choice .testing-score-delta.is-positive,
.testing-score-delta.is-positive {
    color: #0b2b1b !important;
    background: #d8f4df;
}

.choice .testing-score-delta.is-negative,
.testing-score-delta.is-negative {
    color: #681500 !important;
    background: #ffd9d2;
}

.testing-choice-vars {
    margin-top: 6px;
    color: #101820;
}

.testing-choice-vars-heading {
    margin-top: 8px;
    color: #101820;
    font-weight: 700;
}

.testing-choice-vars ul {
    margin: 6px 0 0 0;
    padding-left: 18px;
}

.testing-choice-vars li {
    margin: 3px 0;
    color: #101820;
}

.testing-vars-panel {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1800;
    width: min(420px, calc(100vw - 36px));
    max-height: min(620px, calc(100vh - 36px));
    color: #101820;
    background: #fff8df;
    border: 3px solid #080e18;
    border-radius: 4px;
    box-shadow: 5px 5px 0 #060c14;
    font-family: var(--font-mono);
    font-size: 9pt;
    overflow: auto;
}

.testing-vars-panel.is-dragging {
    user-select: none;
}

.testing-vars-panel > details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    color: #101820;
    background: #f5c84c;
    border-bottom: 2px solid #080e18;
    cursor: pointer;
    font-family: var(--font-display);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.testing-panel-drag {
    flex: 0 0 auto;
    min-height: 26px;
    padding: 3px 8px;
    color: #101820;
    background: #ffffff;
    border: 2px solid #080e18;
    border-radius: 3px;
    box-shadow: 1px 1px 0 #080e18;
    cursor: grab;
    font-family: var(--font-mono);
    font-size: 8pt;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    touch-action: none;
}

.testing-panel-drag:active,
.testing-vars-panel.is-dragging .testing-panel-drag {
    cursor: grabbing;
    transform: translate(1px, 1px);
    box-shadow: none;
}

.testing-vars-body {
    padding: 10px 12px 12px;
}

.testing-jump-controls {
    margin-bottom: 10px;
    padding: 8px;
    background: #fffef7;
    border: 2px solid #080e18;
    border-radius: 3px;
    box-shadow: 2px 2px 0 #080e18;
}

.testing-history-controls {
    margin-bottom: 10px;
    padding: 8px;
    background: #eef7ff;
    border: 2px solid #080e18;
    border-radius: 3px;
    box-shadow: 2px 2px 0 #080e18;
}

.testing-history-controls button {
    min-height: 34px;
    width: 100%;
    color: #101820;
    background: #9ed0ff;
    border: 2px solid #080e18;
    border-radius: 3px;
    box-shadow: 2px 2px 0 #080e18;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 9pt;
    font-weight: 900;
    text-transform: uppercase;
}

.testing-history-controls button:disabled {
    color: #5f6874;
    background: #d9e0e8;
    box-shadow: none;
    cursor: not-allowed;
}

.testing-history-controls button:not(:disabled):hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #080e18;
}

.testing-history-note {
    margin-top: 7px;
    color: #4b5360;
    font-size: 8pt;
    line-height: 1.35;
}

.testing-jump-controls label {
    display: block;
    margin-bottom: 6px;
    color: #101820;
    font-weight: 900;
    text-transform: uppercase;
}

.testing-jump-row {
    display: flex;
    gap: 6px;
}

.testing-jump-row select,
.testing-jump-row button {
    min-height: 34px;
    color: #101820;
    background: #ffffff;
    border: 2px solid #080e18;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 9pt;
}

.testing-jump-row select {
    min-width: 0;
    flex: 1;
    padding: 4px 6px;
}

.testing-jump-row button {
    flex: 0 0 auto;
    padding: 4px 10px;
    background: #f5c84c;
    box-shadow: 2px 2px 0 #080e18;
    cursor: pointer;
    font-weight: 900;
    text-transform: uppercase;
}

.testing-jump-row button:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #080e18;
}

.testing-jump-note {
    margin-top: 7px;
    color: #4b5360;
    font-size: 8pt;
    line-height: 1.35;
}

.testing-score-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.testing-game-time-item {
    grid-column: 1 / -1;
    text-align: left;
}

.testing-game-time-section {
    margin-bottom: 4px;
}

.testing-game-time-item span {
    min-height: 0;
}

.testing-game-time-item strong {
    font-size: 11pt;
    line-height: 1.25;
    word-break: normal;
    overflow-wrap: anywhere;
}

.testing-score-sections {
    display: grid;
    gap: 10px;
}

.testing-score-section h4,
.testing-competence-column h5 {
    margin: 0 0 6px;
    color: #101820;
    font-family: var(--font-display);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.testing-score-section h4 {
    font-size: 10pt;
}

.testing-competence-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.testing-competence-column {
    display: grid;
    gap: 6px;
}

.testing-competence-column h5 {
    min-height: 18px;
    font-size: 8pt;
    text-align: center;
}

.testing-score-item {
    padding: 6px 5px;
    background: #ffffff;
    border: 1.5px solid #080e18;
    border-radius: 3px;
    box-shadow: 1px 1px 0 #080e18;
    text-align: center;
}

.testing-score-item span,
.testing-score-item strong {
    display: block;
}

.testing-vars-panel .testing-score-item span,
.testing-score-item span {
    min-height: 28px;
    color: #303845 !important;
    font-size: 7.5pt;
    line-height: 1.2;
    text-transform: uppercase;
}

.testing-vars-panel .testing-score-item strong,
.testing-score-item strong {
    color: #101820 !important;
    font-size: 13pt;
    line-height: 1.1;
}

.testing-variable-details {
    margin-top: 10px;
}

.testing-variable-details summary {
    cursor: pointer;
    font-weight: 700;
}

.testing-variable-details table {
    width: 100%;
    margin-top: 8px;
    border-collapse: collapse;
}

.testing-variable-details th,
.testing-variable-details td {
    padding: 4px 5px;
    border-top: 1px solid rgba(8, 14, 24, 0.18);
    text-align: left;
    vertical-align: top;
}

.testing-variable-details th {
    width: 42%;
    color: #0f355c;
    font-weight: 700;
}

@media (max-width: 720px) {
    .testing-vars-panel {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
    }

    .testing-score-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .testing-competence-grid {
        grid-template-columns: 1fr;
    }
}
