/* ============================================================
   RESET E BASE - Otimizado para TDAH
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #FAF8F5;
    color: #1A1A18;
    min-height: 100vh;
    font-size: 17px;
    line-height: 1.85;
    letter-spacing: 0.015em;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
    width: 300px;
    height: 100vh;
    background: #FFFFFF;
    border-right: 1px solid #E0DCD2;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 32px 24px 20px;
    border-bottom: 1px solid #E0DCD2;
}

.book-label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #B38B6D;
    margin-bottom: 8px;
    display: block;
}

.book-title {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #1A1A18;
}

.nav-list {
    padding: 12px 0 32px;
    list-style: none;
    flex: 1;
}

.nav-part {
    padding: 18px 24px 6px;
}

.nav-part-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7A7870;
}

.nav-chapter {
    display: block;
    padding: 10px 24px;
    font-size: 14.5px;
    color: #7A7870;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.15s, background 0.15s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'Inter', sans-serif;
}

.nav-chapter .num {
    display: inline-block;
    width: 24px;
    font-weight: 500;
    color: #B38B6D;
}

.nav-chapter:hover {
    color: #1A1A18;
    background: #F5F0EB;
}

.nav-chapter.active {
    color: #B38B6D;
    font-weight: 500;
    background: #F5F0EB;
    border-left: 3px solid #B38B6D;
}

.nav-chapter.annex {
    font-style: italic;
}

.nav-chapter.annex .num {
    color: #7A7870;
}

/* ============================================================
   MAIN
   ============================================================ */
#main {
    margin-left: 300px;
    min-height: 100vh;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
    padding: 80px 64px 56px;
    max-width: 760px;
    border-bottom: 1px solid #E0DCD2;
    background: #FFFFFF;
}

.hero-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #B38B6D;
    margin-bottom: 16px;
    display: block;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600;
    line-height: 1.2;
    color: #1A1A18;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 17px;
    color: #7A7870;
    line-height: 1.7;
    max-width: 520px;
}

/* ============================================================
   CONTENT
   ============================================================ */
#content {
    padding: 0 64px 96px;
    max-width: 760px;
    background: #FFFFFF;
}

.chapter-section {
    display: none;
    padding: 48px 0 32px;
}

.chapter-section.visible {
    display: block;
}

.chapter-meta {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #B38B6D;
    margin-bottom: 12px;
}

.chapter-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 600;
    line-height: 1.25;
    color: #1A1A18;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #F0ECE6;
}

.chapter-body {
    font-size: 17px;
    line-height: 1.9;
    letter-spacing: 0.012em;
    color: #2C2C2A;
}

.chapter-body p {
    margin-bottom: 24px;
}

.chapter-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 600;
    margin: 40px 0 14px;
    color: #1A1A18;
}

.chapter-body h4 {
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7A7870;
    margin: 28px 0 10px;
}

.chapter-body ul,
.chapter-body ol {
    padding-left: 24px;
    margin-bottom: 24px;
}

.chapter-body li {
    margin-bottom: 9px;
}

.chapter-body blockquote {
    border-left: 3px solid #B38B6D;
    padding: 20px 28px;
    margin: 32px 0;
    background: #F5F0EB;
    border-radius: 0 4px 4px 0;
    line-height: 1.8;
}

.chapter-body blockquote p {
    margin: 0;
    font-style: italic;
    color: #1A1A18;
}

.chapter-body strong {
    font-weight: 600;
}

/* ============================================================
   NAVEGAÇÃO ENTRE CAPÍTULOS
   ============================================================ */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #E0DCD2;
    gap: 16px;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: 1px solid #E0DCD2;
    border-radius: 6px;
    padding: 14px 20px;
    transition: border-color 0.15s, background 0.15s;
    max-width: 220px;
}

.nav-btn:hover {
    border-color: #B38B6D;
    background: #F5F0EB;
}

.nav-btn-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7A7870;
}

.nav-btn-title {
    font-size: 13.5px;
    font-weight: 500;
    color: #1A1A18;
    line-height: 1.4;
}

/* ============================================================
   ÍNDICE
   ============================================================ */
.chapter-section#indice h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 2px solid #F0ECE6;
    color: #1A1A18;
}

.indice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 40px;
}

.indice-grid a {
    font-size: 15px;
    line-height: 1.6;
    display: flex;
    align-items: baseline;
    padding: 6px 0;
    color: #1A1A18;
    border-bottom: 1px solid #F0ECE6;
    transition: color 0.15s;
    text-decoration: none;
    gap: 8px;
}

/* ============================================================
   MOBILE & TABLET
   ============================================================ */
@media (max-width: 1024px) {
    body {
        font-size: 18px;
    }
    .chapter-body {
        font-size: 18px;
        line-height: 1.95;
    }
    #hero, #content {
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    #sidebar.open {
        transform: translateX(0);
    }
    #main {
        margin-left: 0;
    }
    #hero, #content {
        padding: 40px 24px;
        padding-top: 70px;
    }

    .hero-title {
        font-size: 28px;
    }
    .chapter-title {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 18.5px;
    }
    #hero, #content {
        padding: 32px 18px;
        padding-top: 62px;
    }

    .hero-title {
        font-size: 26px;
    }
    .chapter-title {
        font-size: 24px;
    }
    .chapter-body {
        font-size: 18.5px;
        line-height: 2.0;
    }
}