/* ============================================================
   Small utility layer — spacing, layout, type helpers.
   No Tailwind, no build step. Add sparingly.
   ============================================================ */

/* ---- Stack / cluster -------------------------------------- */
.stack > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.stack-lg > * + * { margin-top: var(--sp-5); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

.row {
  display: flex;
  gap: var(--sp-4);
  align-items: center;
}
.row-between { justify-content: space-between; }
.row-end     { justify-content: flex-end; }

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---- Type utilities --------------------------------------- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--surface-fg-muted); }
.text-soft   { color: var(--surface-fg-soft); }
.text-bold   { font-weight: 700; }

.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }

/* ---- Spacing utilities (use sparingly — prefer .stack) --- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }

/* ---- Visibility ------------------------------------------ */
.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;
}

/* ---- Pills + status chips -------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pill-pass { background: rgba(31,138,76,.12);  color: var(--st-pass); }
.pill-warn { background: rgba(199,118,0,.12);  color: var(--st-warn); }
.pill-fail { background: rgba(197,37,46,.12);  color: var(--st-fail); }
.pill-info { background: rgba(30,111,182,.12); color: var(--st-info); }
