/* Single-purpose helpers. */
@layer utilities {
    /*
     * In stacks and clusters, the gap alone spaces the children: their own margins
     * (alerts, fields, lists…) are dropped. Dialogs keep the margin that centres them.
     */
    :where(.stack, .cluster) > :not(dialog) {
        margin-block: 0;
    }

    .visually-hidden:not(:focus):not(:active) {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .text-muted { color: var(--color-text-muted); }
    .text-subtle { color: var(--color-text-subtle); }
    .text-success { color: var(--color-success); }
    .text-warning { color: var(--color-warning); }
    .text-danger { color: var(--color-danger); }
    .text-small { font-size: var(--font-size-sm); }
    .text-center { text-align: center; }
    .text-end { text-align: end; }
    .font-medium { font-weight: var(--font-weight-medium); }
    .font-semibold { font-weight: var(--font-weight-semibold); }
    .nowrap { white-space: nowrap; }
    .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tabular-nums { font-variant-numeric: tabular-nums; }

    .mt-0 { margin-top: 0; }
    .mb-0 { margin-bottom: 0; }
    .ms-auto { margin-inline-start: auto; }
    .w-full { width: 100%; }
}
