/* ============================================================================
   Layout utilities — docs/design-system.md §6.1, §8.3

   A deliberately small set, named after the Tailwind utilities the spec quotes
   so a recipe in §9 can be read straight across. This is not a Tailwind clone:
   only the intervals the system actually uses are here.
   ========================================================================= */

/* ── Display and flow ────────────────────────────────────────────────────── */
.block        { display: block; }
.inline-block { display: inline-block; }
.flex         { display: flex; }
.inline-flex  { display: inline-flex; }
.grid         { display: grid; }
.hidden       { display: none; }

.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1 1 0%; }
.shrink-0     { flex-shrink: 0; }
.grow         { flex-grow: 1; }
.min-w-0      { min-width: 0; }
.min-h-0      { min-height: 0; }

.items-start    { align-items: flex-start; }
.items-center   { align-items: center; }
.items-end      { align-items: flex-end; }
.items-baseline { align-items: baseline; }

.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mt-auto { margin-top: auto; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.whitespace-nowrap { white-space: nowrap; }
.pointer-events-none { pointer-events: none; }

/* ── The spacing rhythm (§6.1) ───────────────────────────────────────────── */
.gap-1    { gap: 4px; }
.gap-1\.5 { gap: 6px; }   /* icon-to-label in a small control, badge internals */
.gap-2    { gap: 8px; }   /* button clusters, badge rows */
.gap-2\.5 { gap: 10px; }
.gap-3    { gap: 12px; }  /* avatar-to-text, list-row internals */
.gap-4    { gap: 16px; }  /* panel grid at small sizes, header to rule */
.gap-5    { gap: 20px; }  /* panels inside a section grid */
.gap-6    { gap: 24px; }  /* two-column page grids */
.gap-7    { gap: 28px; }  /* page sections on a list page */
.gap-8    { gap: 32px; }  /* page sections on the dashboard */

.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-7 { margin-top: 28px; }   /* between sections on a list or form page */
.mt-8 { margin-top: 32px; }
.pt-5 { padding-top: 20px; }
.border-t { border-top: 1px solid var(--rule); }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

/* ── Grids (§8.3) ────────────────────────────────────────────────────────── */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:hidden      { display: none; }
}
@media (min-width: 1280px) {
  .xl\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Card roster: grid gap-4 sm:grid-cols-2 lg:grid-cols-3 */
.roster {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

/* ── Icons ───────────────────────────────────────────────────────────────── */
.icon { flex-shrink: 0; display: inline-block; vertical-align: middle; }
