.chapters-page {
    width: 100%;
    min-height: 100vh;
    padding-top: 84px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #f3f6f9 100%);
}

.chapters-header {
    padding: 44px 0 36px;
    border-bottom: 1px solid rgba(13, 40, 89, 0.12);
    background: linear-gradient(135deg, rgba(225, 180, 81, 0.16), transparent 38%);
}

.chapters-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
    gap: 30px;
    align-items: end;
}

.chapters-kicker {
    margin: 0 0 12px;
    color: var(--accent-strong);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.18em;    
}

.chapters-header h1 {
    margin: 0;
    color: var(--color3);
    font-size: clamp(2.6rem, 6vw, 5.3rem);
    font-weight: 850;
    line-height: 0.96;
}

.chapters-intro {
    margin: 0;
    padding: 15px 0 0 18px;
    border-left: 4px solid var(--accent-strong);
    color: #465f73;
    line-height: 1.65;
}

.chapters-section {
    padding: 30px 0 72px;
}

.chapters-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 26px;
    align-items: start;
    margin-bottom: 28px;
}

.chapters-toolbar h2 {
    margin: 0;
    color: var(--color3);
    font-size: clamp(1.5rem, 3vw, 2.35rem);
}

.chapters-toolbar p {
    margin: 8px 0 0;
    color: #526d78;
    line-height: 1.6;
}

.chapters-search {
    width: min(380px, 100%);
}

.chapters-search-label {
    display: block;
    margin-bottom: 10px;
    color: var(--accent-strong);
    font-size: 0.76rem;
    font-weight: 800;
}

.chapters-search-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid rgba(13, 40, 89, 0.12);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(13, 40, 89, 0.05);
}

.chapters-search-shell input {
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color3);
    font-size: 0.94rem;
}

.chapters-search-shell input::placeholder {
    color: #7589a3;
}

.chapters-search-shell button {
    padding: 0 18px;
    border: 0;
    background: var(--color3);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.chapters-state {
    padding: 24px;
    border: 1px solid rgba(13, 40, 89, 0.12);
    background: #ffffff;
    color: #526d78;
    text-align: center;
}

.chapters-list {
    border-top: 2px solid var(--color3);
}

.chapter-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    gap: 24px;
    align-items: start;
    padding: 26px 0;
    border-bottom: 1px solid rgba(13, 40, 89, 0.14);
    transition: background-color 0.2s ease;
}

.chapter-row:hover {
    background: rgba(225, 180, 81, 0.06);
}

.chapter-index {
    display: grid;
    gap: 6px;
    padding-left: 12px;
    border-left: 4px solid var(--accent);
}

.chapter-index span {
    color: rgba(13, 40, 89, 0.42);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.chapter-index strong {
    color: var(--color4);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

.chapter-main {
    min-width: 0;
}

.chapter-main h3 {
    margin: 0;
    color: var(--color3);
    font-size: clamp(1.25rem, 2.2vw, 2rem);
    font-weight: 850;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.chapter-authors {
    margin: 9px 0 0;
    color: #385273;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.chapter-data {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 20px;
    margin: 18px 0 0;
}

.chapter-data-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    min-width: 0;
}

.chapter-data-row dt {
    color: var(--color4);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
}

.chapter-data-row dd {
    margin: 0;
    color: var(--color3);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.chapter-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    width: min(220px, 100%);
}

.chapter-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.chapter-link:hover {
    transform: translateY(-1px);
}

.chapter-link-primary {
    border: 1px solid var(--color3);
    background: var(--color3);
    color: #ffffff;
}

.chapter-link-secondary {
    border: 1px solid var(--accent-strong);
    background: transparent;
    color: var(--accent-strong);
}

@media (max-width: 980px) {
    .chapters-header-inner,
    .chapters-toolbar {
        grid-template-columns: 1fr;
    }

    .chapter-row {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .chapter-actions {
        grid-column: 2;
        justify-content: flex-start;
        width: 100%;
    }

    .chapter-data {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .chapters-header {
        padding: 60px 0 34px;
    }

    .chapter-row {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 22px 0;
    }

    .chapter-index {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .chapter-actions {
        grid-column: 1;
    }

    .chapter-data {
        grid-template-columns: 1fr;
    }

    .chapters-search-shell {
        grid-template-columns: minmax(0, 1fr) 98px;
    }

    .chapters-search-shell input {
        padding: 14px 12px;
        font-size: 0.86rem;
    }

    .chapters-search-shell button {
        padding: 0 12px;
        font-size: 0.84rem;
    }
}

@media (max-width: 420px) {
    .chapters-search-shell {
        grid-template-columns: minmax(0, 1fr) 86px;
    }

    .chapters-search-shell input {
        font-size: 0.8rem;
    }
}
