.page-tool--line-sorter .tool-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-tool--line-sorter .tool-controls__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.page-tool--line-sorter .tool-controls__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.page-tool--line-sorter .tool-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0;
    padding: 0;
    border: 0;
}

.page-tool--line-sorter .tool-options .label {
    flex: 1 1 100%;
    margin: 0;
}

.page-tool--line-sorter .tool-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
    font-size: 0.86rem;
    cursor: pointer;
}

.page-tool--line-sorter .tool-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}

.page-tool--line-sorter .tool-actions,
.page-tool--line-sorter .tool-output__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-tool--line-sorter .tool-output__actions {
    padding: 11px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.page-tool--line-sorter .tool-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.page-tool--line-sorter .tool-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.page-tool--line-sorter .tool-pane__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.page-tool--line-sorter .tool-textarea {
    display: block;
    flex: 1 1 auto;
    min-height: 24rem;
    padding: 14px 16px;
    border: 0;
    border-radius: 0;
    background: var(--surface);
}

.page-tool--line-sorter .tool-textarea:focus {
    box-shadow: none;
}

.page-tool--line-sorter .tool-textarea--output {
    background: var(--surface-2);
}

.page-tool--line-sorter .tool-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.page-tool--line-sorter .tool-hint--note {
    padding: 11px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.page-tool--line-sorter .tool-status {
    min-height: 0;
    margin: 0;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
}

.page-tool--line-sorter .tool-status.status {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.page-tool--line-sorter .tool-status.status--error {
    background: var(--danger-soft);
    color: var(--danger);
}

.page-tool--line-sorter .tool-status.status--success {
    background: var(--success-soft);
    color: var(--success);
}

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

.page-tool--line-sorter .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 (max-width: 860px) {
    .page-tool--line-sorter .tool-controls__grid,
    .page-tool--line-sorter .tool-workspace {
        grid-template-columns: 1fr;
    }

    .page-tool--line-sorter .tool-textarea {
        min-height: 16rem;
    }
}
