/*
 * Utility classes — small, single-purpose helpers for layout and type in the
 * views (they replaced ~450 inline style attributes). Loaded last and marked
 * !important so they behave like the inline styles they replaced.
 * Spacing scale: 1 = 0.25rem, 2 = 0.5rem, 3 = 0.75rem, 4 = 1rem,
 * 5 = 1.25rem, 6 = 1.5rem, 7 = 2rem. Colours only via tokens.
 */

/* layout */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex-col { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-1 { flex: 1 !important; }
.shrink-0 { flex-shrink: 0 !important; }
.min-w-0 { min-width: 0 !important; }
.items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.items-end { align-items: flex-end !important; }
.items-baseline { align-items: baseline !important; }
.items-stretch { align-items: stretch !important; }
.justify-between { justify-content: space-between !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-start { justify-content: flex-start !important; }
.relative { position: relative !important; }
.overflow-hidden { overflow: hidden !important; }
.w-full { width: 100% !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.list-none { list-style: none !important; }
.cursor-pointer { cursor: pointer !important; }
.nowrap { white-space: nowrap !important; }

/* spacing */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-5 { gap: 1.25rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-7 { gap: 2rem !important; }
.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.25rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-7 { margin-bottom: 2rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-5 { margin-top: 1.25rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mt-7 { margin-top: 2rem !important; }
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-7 { padding: 2rem !important; }

/* type */
.font-display { font-family: var(--font-display) !important; font-weight: var(--weight-display) !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.italic { font-style: italic !important; }
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.84rem !important; }
.text-md { font-size: 0.92rem !important; }
.text-base { font-size: 1rem !important; }
.text-lg { font-size: 1.1rem !important; }
.text-xl { font-size: 1.3rem !important; }
.text-2xl { font-size: 1.7rem !important; }
.text-3xl { font-size: 2.2rem !important; }
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.leading-none { line-height: 1 !important; }
.leading-tight { line-height: 1.2 !important; }
.leading-snug { line-height: 1.33 !important; }
.leading-normal { line-height: 1.42 !important; }
.leading-relaxed { line-height: 1.5 !important; }
.no-underline { text-decoration: none !important; }

/* colour (tokens only) */
.text-ink { color: var(--ink) !important; }
.text-soft { color: var(--ink-soft) !important; }
.text-faint { color: var(--ink-faint) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.bg-raised { background: var(--surface-raised) !important; }
.bg-paper { background: var(--paper) !important; }

/* shape */
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-full { border-radius: 50% !important; }
.rounded-pill { border-radius: var(--radius-pill) !important; }

/* Visually hidden, still read by screen readers. */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.not-italic { font-style: normal !important; }
