/* ============================================================
   UTILITIES — loaded last so these beat component classes at
   equal specificity (see docs/templates.md). Single-purpose,
   non-composable declarations only; anything needing >3 of
   these stacked on one element should be a component class
   instead (components.css / layout.css).
   ============================================================ */

/* ── Text ─────────────────────────────────────────────────── */
.text-center     { text-align: center; }
.text-left       { text-align: left; }
.text-right      { text-align: right; }
.text-uppercase  { text-transform: uppercase; }
.text-muted      { color: var(--color-text-muted); }
.text-primary    { color: var(--color-primary-text); }
.text-accent     { color: var(--color-accent); }
.text-error      { color: var(--color-error); }
.text-success    { color: var(--color-success); }
.border-error    { border-color: var(--color-error); }
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }
.text-4xl  { font-size: var(--text-4xl); }
.font-normal    { font-weight: 400; }
.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.leading-loose  { line-height: 1.8; }
.no-underline { text-decoration: none; }
.truncate  { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowrap    { white-space: nowrap; }
.normal-whitespace { white-space: normal; }

/* ── Display / flex ───────────────────────────────────────── */
.inline       { display: inline; }
.inline-block { display: inline-block; }
.flex         { display: flex; }
.flex-wrap    { flex-wrap: wrap; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* ── Spacing ──────────────────────────────────────────────── */
.m-0  { margin: 0; }
.p-0  { padding: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }

.mt-2  { margin-top: var(--space-2); }
.mt-3  { margin-top: var(--space-3); }
.mt-4  { margin-top: var(--space-4); }
.mt-5  { margin-top: var(--space-5); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-2px { margin-top: 2px; }

.ml-3    { margin-left: var(--space-3); }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ── Layout one-offs ──────────────────────────────────────── */
.flex-1 { flex: 1; min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.transition-shadow { transition: box-shadow 150ms; }
.p-16 { padding: var(--space-16); }
.gap-8  { gap: var(--space-8); }
.opacity-85 { opacity: 0.85; }
.bg-surface-alt { background: var(--color-surface-alt); }
.font-mono { font-family: monospace; }

/* ── One-off max-widths (each used once in the templates) ─── */
.max-w-160 { max-width: 160px; }
.max-w-180 { max-width: 180px; }
.max-w-200 { max-width: 200px; }
.max-w-320 { max-width: 320px; }
.max-w-520 { max-width: 520px; }
.max-w-700 { max-width: 700px; }
.max-w-760 { max-width: 760px; }
.max-w-900 { max-width: 900px; }

.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;
}
