/*
 * Utilities (WP9; UI-Design-Principles Sec. 11.2). Spacing/layout helpers only —
 * NOT a utility framework. Loaded LAST so they can adjust component spacing.
 * Prefix: u-*. Spacing steps map to the --gtx-s* scale (1..8).
 */

/* Screen-reader-only (accessible labels for icon-only controls, Sec. 9). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Flex / grid */
.u-flex { display: flex; }
.u-inline-flex { display: inline-flex; }
.u-grid { display: grid; }
.u-flex-col { flex-direction: column; }
.u-items-center { align-items: center; }
.u-items-start { align-items: flex-start; }
.u-justify-between { justify-content: space-between; }
.u-justify-center { justify-content: center; }
.u-justify-end { justify-content: flex-end; }
.u-flex-wrap { flex-wrap: wrap; }
.u-flex-1 { flex: 1 1 auto; }

/* Responsive auto-fit card grid. */
.u-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--gtx-s4);
}

/* Gap */
.u-gap-1 { gap: var(--gtx-s1); }
.u-gap-2 { gap: var(--gtx-s2); }
.u-gap-3 { gap: var(--gtx-s3); }
.u-gap-4 { gap: var(--gtx-s4); }
.u-gap-5 { gap: var(--gtx-s5); }

/* Margin-top */
.u-mt-0 { margin-top: 0; }
.u-mt-1 { margin-top: var(--gtx-s1); }
.u-mt-2 { margin-top: var(--gtx-s2); }
.u-mt-3 { margin-top: var(--gtx-s3); }
.u-mt-4 { margin-top: var(--gtx-s4); }
.u-mt-5 { margin-top: var(--gtx-s5); }
.u-mt-6 { margin-top: var(--gtx-s6); }

/* Margin-bottom */
.u-mb-1 { margin-bottom: var(--gtx-s1); }
.u-mb-2 { margin-bottom: var(--gtx-s2); }
.u-mb-3 { margin-bottom: var(--gtx-s3); }
.u-mb-4 { margin-bottom: var(--gtx-s4); }
.u-mb-5 { margin-bottom: var(--gtx-s5); }
.u-mb-6 { margin-bottom: var(--gtx-s6); }

/* Text helpers */
.u-text-dim { color: var(--gtx-text-dim); }
.u-text-center { text-align: center; }
.u-text-meta { font-size: var(--gtx-fs-meta); }
.u-mono { font-family: var(--gtx-font-mono); }
.u-num { font-variant-numeric: tabular-nums; }

/* Width helpers */
.u-w-full { width: 100%; }
.u-maxw-readable { max-width: 60ch; }
