.chapter {
    display: none;
    padding: 24px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.chapter.active {
    display: block;
    animation: slideIn 0.5s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chapter-content {
    background-color: transparent; /* Let body background show through */
    border-radius: 8px;
    padding: 0; /* Remove padding, handled by chapter */
    box-shadow: none; /* Remove shadow, content is not a card itself */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chapter-content h1 {
    font-size: 2.125rem; /* 34px */
    font-weight: 400;
    letter-spacing: 0.00735em;
    margin-bottom: 16px;
    color: var(--primary-color);
    text-align: center;
}

.chapter-content h2 {
    font-size: 1.5rem; /* 24px */
    font-weight: 400;
    letter-spacing: 0em;
    margin-bottom: 16px;
    text-align: center;
}

.chapter-content h3 {
    font-size: 1.25rem; /* 20px */
    font-weight: 500;
    letter-spacing: 0.0075em;
    margin: 16px 0 8px;
}

.chapter-content p {
    font-size: 1rem; /* 16px */
    font-weight: 400;
    letter-spacing: 0.03125em;
    line-height: 1.75;
    margin-bottom: 16px;
}

/* Make demo area scrollable */
.demo-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px; /* for scrollbar */
}

/* Responsive */
@media (max-width: 768px) {
    .chapter {
        padding: 16px;
    }
}