/* ── Container ── */
.container {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--space-lg);
}

/* ── Prose (readable width) ── */
.prose {
    max-width: var(--content-width);
}

.prose p,
.prose ul,
.prose ol,
.prose pre,
.prose blockquote {
    margin-top: var(--space-md);
}

.prose h2 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
}

.prose h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

/* ── Grid ── */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

/* ── Flex utilities ── */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-col {
    flex-direction: column;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* ── Section spacing ── */
.section {
    padding-block: var(--space-3xl);
}

.section-sm {
    padding-block: var(--space-2xl);
}

/* ── Text alignment ── */
.text-center { text-align: center; }
.text-left { text-align: left; }

/* ── Margin utilities ── */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ── Auto center ── */
.mx-auto {
    margin-inline: auto;
}
