/* Stage 2: reproducibility */
.rd-stage2-import-actions,
.rd-stage2-load-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.rd-stage2-import-fieldset {
    min-width: 0;
}

.rd-stage2-import-status {
    font-size: 12px;
    font-weight: 400;
    color: #173f45;
}

.rd-stage2-instructions {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-line;
}

.rd-stage2-summary {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    white-space: pre-wrap;
}

.rd-stage2-summary:empty {
    display: none;
}

.rd-stage2-color-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
}

.rd-stage2-color-controls label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto;
}

.rd-stage2-results-wrap,
.rd-stage2-input-table-wrap {
    margin-top: 10px;
    overflow: auto;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
}

.rd-stage2-results-table,
.rd-stage2-input-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.rd-stage2-results-table th,
.rd-stage2-results-table td,
.rd-stage2-input-table th,
.rd-stage2-input-table td {
    border: 1px solid rgba(122, 142, 172, 0.32);
    padding: 6px 8px;
    vertical-align: top;
    background: rgba(255, 255, 255, 0.94);
}

.rd-stage2-results-table th,
.rd-stage2-input-table th {
    background: rgba(0, 58, 64, 0.08);
    color: #003a40;
    font-weight: 700;
    white-space: nowrap;
}

.rd-stage2-results-table tbody tr {
    cursor: pointer;
}

.rd-stage2-results-table tbody tr:hover td {
    background: rgba(0, 58, 64, 0.07);
}

.rd-stage2-results-table tbody tr.is-selected td {
    background: rgba(0, 58, 64, 0.12);
}

.rd-stage2-results-table td:nth-child(10) {
    white-space: nowrap;
}

.rd-stage2-results-table td:nth-child(10),
.rd-stage2-details,
.rd-stage2-load-hint {
    line-height: 1.4;
}

.rd-stage2-layout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.rd-stage2-main {
    flex: 1 1 auto;
    min-width: 0;
}

.rd-stage2-process-summary {
    flex: 0 0 270px;
    position: sticky;
    top: 8px;
}

.rd-stage2-process-summary .rd-stage2-results-table tbody tr {
    cursor: default;
}

.rd-stage2-scope-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.rd-stage2-scope-row select {
    min-width: 240px;
}

.rd-stage2-details {
    margin-top: 8px;
    font-size: 12px;
    color: #30363d;
    white-space: pre-wrap;
}

.rd-stage2-import-plot {
    margin-top: 10px;
}

.rd-stage2-intro-note {
    margin-top: 6px;
}

.rd-stage2-setup-row input,
#entry_repro_count,
#entry_repro_pmp_count,
#entry_repro_pct,
#entry_repro_pct2 {
    max-width: 110px;
}

.variability-help-text {
    font-size: 11px;
    color: #555;
    margin: -4px 0 10px;
}

.rd-stage2-pmp-names {
    display: grid;
    gap: 8px;
    margin: 4px 0 8px;
}

.rd-stage2-pmp-row {
    display: grid;
    grid-template-columns: minmax(110px, auto) minmax(180px, 1fr) minmax(45px, auto) minmax(90px, 140px);
    gap: 8px;
    align-items: center;
}

.rd-stage2-inputs-row,
.rd-stage2-plots-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rd-stage2-input-fieldset,
.rd-stage2-plot-block {
    flex: 1 1 420px;
}

.rd-stage2-input-table td:first-child,
.rd-stage2-input-table th:first-child {
    white-space: nowrap;
}

.rd-stage2-input-table input {
    width: 100%;
    min-width: 90px;
    box-sizing: border-box;
}

.rd-stage2-input-table .rd-stage2-metric-input {
    min-width: 130px;
}

.rd-stage2-stats {
    margin-bottom: 5px;
    font-size: 12px;
    line-height: 1.35;
    white-space: pre-line;
}

.rd-stage2-status {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.35;
}

.repro-import-canvas-container,
.repro-correlation-canvas-container,
.repro-canvas-container {
    min-width: 100%;
}

#repro_import_canvas,
#repro_canvas,
#repro_canvas2,
#repro_correlation_canvas {
    width: 100%;
    display: block;
}

#repro_variability_help {
    display: none;
    margin-top: 15px;
}

#repro_inputs_container2_wrap,
#repro_canvas2_wrap {
    display: none;
}

.rd-stage2-help-list {
    margin: 6px 0 0 18px;
    padding: 0;
}

.rd-stage2-help-list li {
    margin-bottom: 4px;
}

@media (max-width: 860px) {
    .rd-stage2-layout {
        flex-direction: column;
    }

    .rd-stage2-process-summary {
        position: static;
        flex-basis: auto;
        width: 100%;
    }

    .rd-stage2-pmp-row {
        grid-template-columns: 1fr;
    }
}
