/* The sorting apps (Science > Sorting Algorithms: /bubble-sort, /selection-sort ...): the bar board, the step slider
   and the playback row. Tiles, the callout, the legend, the buttons and the fields come from the app kit.
   Loaded only on their pages (Views/SeoLanding/_SortingApp.cshtml). */

.sort-app .sort-board {
    border-radius: var(--ak-radius-sm);
}

.sort-app .sort-board:focus-visible {
    outline: 2px solid var(--ak-accent);
    outline-offset: 3px;
}

.sort-app .sort-chart {
    height: clamp(220px, 34vw, 340px);
}

/* Sort match: eight lanes, one per sort, and the results table. */
.sort-app.sort-app--match .sort-chart {
    height: clamp(520px, 90vw, 760px);
}

.sort-app .sort-match-table tr.sort-match-running {
    color: var(--ak-muted);
}

/* Merge sort: the list and the buffer row under it. */
.sort-app.sort-app--rows .sort-chart {
    height: clamp(320px, 46vw, 460px);
}

.sort-app .sort-legend {
    margin-bottom: var(--ak-space-2);
}

.sort-app .sort-timeline {
    display: flex;
    align-items: center;
    gap: var(--ak-space-3, 0.75rem);
    margin-top: var(--ak-space-2);
}

.sort-app .sort-scrub {
    flex: 1 1 auto;
    min-width: 0;
}

.sort-app .sort-step-of {
    flex: none;
    min-width: 7.5rem;
    color: var(--ak-muted);
    font-size: var(--ak-fs-sm);
    font-variant-numeric: tabular-nums;
    text-align: end;
}

.sort-app .sort-actions {
    margin-top: var(--ak-space-2);
}

.sort-app .sort-say {
    min-height: 3.1rem;
}

@media (max-width: 560px) {
    .sort-app .sort-step-of {
        min-width: 0;
    }
}
