/* Layout System */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--kp-space-md);
}

.container--narrow {
    max-width: 800px;
}

.container--wide {
    max-width: 1400px;
}

/* Main site layout */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

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

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

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

.section--blush {
    background: var(--kp-bg-mid);
}

.section--dark {
    background: var(--kp-surface);
}

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--kp-space-sm); }
.gap-md { gap: var(--kp-space-md); }
.gap-lg { gap: var(--kp-space-lg); }

/* Text utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Spacing utilities */
.mb-sm { margin-bottom: var(--kp-space-sm); }
.mb-md { margin-bottom: var(--kp-space-md); }
.mb-lg { margin-bottom: var(--kp-space-lg); }
.mb-xl { margin-bottom: var(--kp-space-xl); }
.mb-2xl { margin-bottom: var(--kp-space-2xl); }

.mt-md { margin-top: var(--kp-space-md); }
.mt-lg { margin-top: var(--kp-space-lg); }

/* Planner layout (sidebar + content) */
.planner-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--kp-space-xl);
    min-height: calc(100vh - 80px);
}

.planner-sidebar {
    background: var(--kp-surface);
    border-right: 1px solid var(--kp-border);
    padding: var(--kp-space-lg);
}

.planner-content {
    padding: var(--kp-space-xl);
    max-width: 100%;
    overflow-x: hidden;
}

/* Responsive */
@media (max-width: 1023px) {
    .planner-layout {
        grid-template-columns: 1fr;
    }

    .planner-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--kp-border);
        padding: var(--kp-space-md);
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 var(--kp-space-md);
    }

    .section {
        padding: var(--kp-space-2xl) 0;
    }

    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 599px) {
    .grid--2 {
        grid-template-columns: 1fr;
    }
}
