/* ============================================================
 * utilities.css — single-purpose helpers
 * Use sparingly; prefer component classes for repeated patterns.
 * ============================================================ */

.hidden     { display: none !important; }
.invisible  { visibility: hidden; }
.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 helpers */
.flex      { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col  { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.justify-center  { justify-content: center; }
.flex-1   { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }

/* spacing — scale matches --space-* tokens (4-pt) */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.ml-3 { margin-left: 12px; }
.p-0  { padding: 0; }
.p-3  { padding: 12px; }
.p-4  { padding: 16px; }
.p-5  { padding: 20px; }
.p-6  { padding: 24px; }
.py-12 { padding-top: 48px; padding-bottom: 48px; }
.min-w-0 { min-width: 0; }

/* text */
.text-xs   { font-size: var(--fs-xs); }
.text-sm   { font-size: var(--fs-sm); }
.text-md   { font-size: var(--fs-md); }
.text-base { font-size: var(--fs-base); }
.text-lg   { font-size: var(--fs-lg); }
.text-xl   { font-size: var(--fs-xl); }
.text-2xl  { font-size: var(--fs-2xl); }
.text-3xl  { font-size: var(--fs-3xl); }

.text-muted   { color: var(--text-3); }
.text-faint   { color: var(--text-4); }
.text-strong  { color: var(--text); font-weight: 600; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }

.text-mono { font-family: var(--font-mono); }
.tabular   { font-variant-numeric: tabular-nums; }
.truncate  { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Prose readability cap — keeps long-text columns around 72ch even
   when the parent .page is fluid (1600+ on wide monitors). Apply to
   markdown-rendered article bodies, release notes, internal docs. */
.prose-narrow { max-width: 72ch; margin-inline: auto; }
