/* ===========================================
   Utilities (design §D.18). Keep this list short: components own their
   layout. .text-muted, .text-subtle, .font-mono, .text-xs and .tabular live
   in base/typography.css.
   =========================================== */

/* Visibility */
.hidden {
  display: none !important;
}

/* Screen readers (.visually-hidden is in base/reset.css) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Display */
.block { display: block !important; }
.inline { display: inline !important; }
.flex { display: flex !important; }
.flex-1 { flex: 1 1 0%; min-width: 0; }

/* Layout primitives */
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-sm);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.prose-width {
  max-width: var(--prose-max-width);
}

/* Spacing */
.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

/* Thin scrollbars on scroll containers that opt in */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-hover) transparent;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  border-radius: var(--radius-full);
  background: var(--color-border-hover);
}

/* Prevents body scroll while a modal is open */
.scroll-locked {
  overflow: hidden !important;
}
