.page-tool--array-transformation-playground .tool-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-tool--array-transformation-playground .atp-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.page-tool--array-transformation-playground .atp-col--controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.page-tool--array-transformation-playground .atp-data__preset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.page-tool--array-transformation-playground .atp-data__preset-label {
    color: var(--muted);
    font-size: 0.78rem;
}

.page-tool--array-transformation-playground .atp-data__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-tool--array-transformation-playground .atp-data__textarea {
    min-height: 12rem;
}

.page-tool--array-transformation-playground .atp-data__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.page-tool--array-transformation-playground .atp-data__status.status,
.page-tool--array-transformation-playground .atp-result__status.status {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.page-tool--array-transformation-playground .atp-data__status.status--error,
.page-tool--array-transformation-playground .atp-result__status.status--error {
    color: var(--danger);
}

.page-tool--array-transformation-playground .atp-result__status.status--success {
    color: var(--success);
}

.page-tool--array-transformation-playground .atp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-tool--array-transformation-playground .atp-pipeline__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-tool--array-transformation-playground .atp-pipeline__hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.page-tool--array-transformation-playground .atp-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-tool--array-transformation-playground .atp-step {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    overflow: hidden;
}

.page-tool--array-transformation-playground .atp-step__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.page-tool--array-transformation-playground .atp-step__num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
}

.page-tool--array-transformation-playground .atp-step__type {
    flex: 0 0 auto;
}

.page-tool--array-transformation-playground .atp-step__summary {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--ink-2);
    font-size: 0.84rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-tool--array-transformation-playground .atp-step__count {
    flex: 0 0 auto;
    color: var(--faint);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.page-tool--array-transformation-playground .atp-step__remove {
    flex: 0 0 auto;
}

.page-tool--array-transformation-playground .atp-step__params {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 12px;
}

.page-tool--array-transformation-playground .atp-step__field[hidden] {
    display: none;
}

.page-tool--array-transformation-playground .atp-step__field .input,
.page-tool--array-transformation-playground .atp-step__field .select {
    min-height: 38px;
}

.page-tool--array-transformation-playground .atp-step__error {
    margin: 0;
    padding: 0 12px 10px;
    font-size: 0.78rem;
}

.page-tool--array-transformation-playground .atp-step__error:empty {
    display: none;
}

.page-tool--array-transformation-playground .atp-step__error--warn {
    color: var(--warning);
}

.page-tool--array-transformation-playground .atp-step__error--error {
    color: var(--danger);
}

.page-tool--array-transformation-playground .atp-steps__empty.empty-state {
    padding: 2rem 1.5rem;
    border-style: dashed;
}

.page-tool--array-transformation-playground .atp-result__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-tool--array-transformation-playground .atp-result__body {
    display: flex;
    flex-direction: column;
}

.page-tool--array-transformation-playground .atp-result__summary {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.page-tool--array-transformation-playground .atp-result__stat {
    margin: 0;
    color: var(--ink);
    font-size: 1.55rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.page-tool--array-transformation-playground .atp-result__note {
    margin: 0;
    padding: 0 16px;
}

.page-tool--array-transformation-playground .atp-result__note--warn {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--warning-soft);
    color: var(--warning);
    font-size: 0.8rem;
}

.page-tool--array-transformation-playground .atp-result__output {
    flex: 1 1 auto;
    min-height: 14rem;
    max-height: 60vh;
    margin: 0;
    padding: 16px;
    overflow: auto;
    background: var(--surface);
    color: var(--ink-2);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.6;
    white-space: pre;
    tab-size: 2;
}

.page-tool--array-transformation-playground .atp-result__output:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.page-tool--array-transformation-playground .atp-result__output:empty::before {
    content: 'Nothing to show yet.';
    color: var(--faint);
}

.page-tool--array-transformation-playground .tool-about__text {
    max-width: 80ch;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.page-tool--array-transformation-playground .tool-about__text code {
    padding: 0.05rem 0.3rem;
    border-radius: var(--radius-xs);
    background: var(--surface-3);
    color: var(--ink-2);
    font-family: var(--font-mono);
}

@media (min-width: 901px) {
    .page-tool--array-transformation-playground .atp-result {
        position: sticky;
        top: 16px;
    }
}

@media (max-width: 900px) {
    .page-tool--array-transformation-playground .atp-workspace {
        grid-template-columns: 1fr;
    }

    .page-tool--array-transformation-playground .atp-result__output {
        max-height: 32rem;
    }
}

@media (max-width: 640px) {
    .page-tool--array-transformation-playground .atp-step__head {
        flex-wrap: wrap;
    }

    .page-tool--array-transformation-playground .atp-step__summary {
        flex: 1 1 100%;
        order: 5;
        white-space: normal;
    }

    .page-tool--array-transformation-playground .atp-result__summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
