th .table-sort-button {
    display: inline-flex; align-items: center; justify-content: inherit; gap: 5px;
    border: 0; border-radius: 3px; padding: 0; margin: 0; background: transparent;
    color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit;
    text-align: inherit; cursor: pointer; box-shadow: none;
}
th .table-sort-button::after { content: '↕'; opacity: .45; font-size: 11px; }
th[aria-sort="ascending"] .table-sort-button::after { content: '↑'; opacity: 1; }
th[aria-sort="descending"] .table-sort-button::after { content: '↓'; opacity: 1; }
th .table-sort-button:focus-visible { outline: 2px solid #0878ac; outline-offset: 4px; }

/* Text headers follow their column; actions retain centered headings. */
table thead th { text-align: left !important; vertical-align: middle !important; }
table thead th.table-actions-heading { text-align: center !important; }
table thead th .table-sort-button,
table thead th .user-sort-link { justify-content: flex-start; text-align: left; }
table thead th input[type="checkbox"] { display: block; margin-left: auto !important; margin-right: auto !important; }

/* Sorting controls must not change column widths after the initial paint. */
body.admin-body th .table-sort-button{position:relative;display:inline;vertical-align:baseline;min-height:0;min-width:0;width:auto;line-height:inherit}
body.admin-body th .table-sort-button::after{position:absolute;left:calc(100% + 5px);top:50%;transform:translateY(-50%);line-height:1;pointer-events:none}
