.insight-library {
    --il-paper: #ffffff;
    --il-ink: #171128;
    --il-muted: #6d6680;
    --il-line: rgba(68, 42, 105, 0.13);
    --il-accent: #6d3bc2;
    --il-accent-dark: #4c238e;
    min-width: 0;
    overflow-wrap: anywhere;
    border-radius: var(--radius-card);
    background:
        radial-gradient(circle at 9% 3%, rgba(224, 205, 255, 0.72), transparent 29rem),
        radial-gradient(circle at 92% 15%, rgba(196, 245, 232, 0.52), transparent 25rem),
        #f9f7fc;
    color: var(--il-ink);
    font-family: inherit;
    word-break: keep-all;
}

.insight-library * {
    box-sizing: border-box;
}

.insight-library .insight-library__frame {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 34px 30px 28px;
}

.insight-library a {
    color: inherit;
    text-decoration: none;
}

.insight-library a:focus-visible,
.insight-library button:focus-visible,
.insight-library input:focus-visible {
    outline: 3px solid rgba(109, 59, 194, 0.65);
    outline-offset: 4px;
}

.insight-library__visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.insight-library__hero {
    margin-bottom: 22px;
}

.insight-library__hero-art {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    background: #2a1765;
    box-shadow:
        0 28px 65px rgba(57, 30, 112, 0.2),
        0 4px 14px rgba(30, 18, 55, 0.13);
}

.insight-library__hero-art::after {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

.insight-library__hero-art img {
    display: block;
    width: 100%;
    height: auto;
}

.insight-library__hero-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 8px 0;
}

.insight-library__intro {
    margin: 0;
    color: #453d57;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.7;
}

.insight-library__hero-caption > span {
    flex: 0 0 auto;
    color: var(--il-muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.02em;
}

.insight-library__categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.insight-library__category {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    min-width: 0;
    min-height: 88px;
    padding: 15px 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 30px rgba(46, 31, 73, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.insight-library__category:nth-child(1) {
    background: linear-gradient(135deg, rgba(242, 233, 255, 0.96), rgba(255, 255, 255, 0.94));
}

.insight-library__category:nth-child(2) {
    background: linear-gradient(135deg, rgba(255, 241, 228, 0.92), rgba(255, 255, 255, 0.94));
}

.insight-library__category:nth-child(3) {
    background: linear-gradient(135deg, rgba(224, 249, 243, 0.92), rgba(255, 255, 255, 0.94));
}

.insight-library__category:hover,
.insight-library__category.is-active {
    border-color: rgba(109, 59, 194, 0.35);
    box-shadow: 0 16px 36px rgba(68, 35, 123, 0.14);
    transform: translateY(-2px);
}

.insight-library__category.is-active {
    box-shadow: inset 0 0 0 2px rgba(109, 59, 194, 0.12), 0 16px 36px rgba(68, 35, 123, 0.14);
}

.insight-library__category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--il-accent);
    font-size: 17px;
    box-shadow: inset 0 0 0 1px rgba(75, 42, 123, 0.08);
}

.insight-library__category-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.insight-library__category strong {
    font-size: 16px;
    line-height: 1.35;
}

.insight-library__category-description {
    color: var(--il-muted);
    font-size: 11px;
    line-height: 1.5;
}

.insight-library__category-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: var(--il-accent);
    font-size: 11px;
    transition: transform 0.18s ease;
}

.insight-library__category:hover .insight-library__category-arrow {
    transform: translateX(3px);
}

.insight-library__search {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 720px;
    margin: 18px auto 42px;
}

.insight-library__search label {
    flex: 0 0 auto;
    color: #41364f;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.insight-library__search-field {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    padding: 4px 4px 4px 14px;
    border: 1px solid rgba(81, 51, 117, 0.15);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 28px rgba(47, 28, 77, 0.08);
}

.insight-library__search-field > i {
    color: #8b7b9f;
    font-size: 13px;
}

.insight-library__search input[type="search"] {
    width: 100%;
    min-width: 0;
    padding: 10px 11px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--il-ink);
    font: inherit;
    font-size: 14px;
}

.insight-library__search button {
    min-height: 42px;
    padding: 8px 19px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #7750cb, #56309e);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(86, 48, 158, 0.22);
}

.insight-library__search button:hover {
    background: linear-gradient(135deg, #6841bd, #482486);
}

.insight-library__filter-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: -16px 4px 24px;
    font-size: 14px;
}

.insight-library__filter-status p {
    margin: 0;
    font-weight: 750;
}

.insight-library__filter-status a {
    flex-shrink: 0;
    min-height: 44px;
    padding: 12px 0;
    color: var(--il-accent-dark);
    font-weight: 750;
}

.insight-library__filter-status a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.insight-library__shelf {
    margin-bottom: 26px;
    padding: 26px;
    border: 1px solid rgba(69, 47, 96, 0.1);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 55px rgba(49, 31, 74, 0.07);
    backdrop-filter: blur(8px);
}

.insight-library__shelf-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.insight-library__shelf-header h2 {
    margin: 0 0 5px;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -0.025em;
}

.insight-library__shelf-header p {
    margin: 0;
    color: var(--il-muted);
    font-size: 13px;
    line-height: 1.6;
}

.insight-library__all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    color: var(--il-accent-dark);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.insight-library__all:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.insight-library__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.insight-library__card {
    min-width: 0;
}

.insight-library__card-link {
    display: grid;
    grid-template-columns: 42% minmax(0, 1fr);
    height: 100%;
    min-height: 218px;
    overflow: hidden;
    border: 1px solid rgba(77, 50, 108, 0.12);
    border-radius: 20px;
    background: var(--il-paper);
    box-shadow: 0 10px 30px rgba(41, 26, 61, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.insight-library__card-link:hover {
    border-color: rgba(109, 59, 194, 0.36);
    box-shadow: 0 18px 38px rgba(58, 34, 91, 0.14);
    transform: translateY(-3px);
}

.insight-library__media {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.95), transparent 56%),
        #eee8f6;
}

.insight-library__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.insight-library__image-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--il-muted);
    font-size: 12px;
    text-align: center;
}

.insight-library__media.is-unavailable img {
    display: none;
}

.insight-library__card[data-kind="youtube"] .insight-library__media {
    background: #e8e3f1;
}

.insight-library__card[data-kind="youtube"] img {
    object-fit: cover;
}

.insight-library__card[data-kind="books"] .insight-library__media img {
    padding: 13px;
    object-fit: contain;
}

.insight-library__card-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 18px;
}

.insight-library__label {
    margin: 0 0 7px;
    color: var(--il-accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.035em;
}

.insight-library__card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.48;
}

.insight-library__description {
    display: -webkit-box;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--il-muted);
    font-size: 12px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.insight-library__read {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 11px;
    color: var(--il-accent-dark);
    font-size: 11px;
    font-weight: 850;
}

.insight-library__card-link:hover h3 {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.insight-library__empty {
    grid-column: 1 / -1;
    padding: 42px 24px;
    border: 1px dashed rgba(98, 68, 128, 0.22);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.insight-library__empty h2,
.insight-library__empty h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.insight-library__empty p {
    margin: 0;
    color: var(--il-muted);
    font-size: 14px;
    line-height: 1.7;
}

.insight-library__material-preview {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    background: linear-gradient(145deg, rgba(237, 224, 255, 0.96), rgba(217, 244, 237, 0.88));
    color: var(--il-ink);
}

.insight-library__material-preview span {
    color: var(--il-muted);
    font-size: 10px;
    font-weight: 800;
}

.insight-library__material-preview strong {
    font-size: 15px;
    line-height: 1.5;
}

.insight-library__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    font-size: 13px;
}

.insight-library__pagination a {
    padding: 12px 8px;
    color: var(--il-accent-dark);
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.insight-library__footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 38px;
    padding: 20px 4px 0;
    border-top: 1px solid var(--il-line);
    color: var(--il-muted);
    font-size: 11px;
}

.insight-library__footer span {
    color: #493b5c;
    font-size: 14px;
    font-weight: 850;
}

.insight-library__footer p {
    margin: 0;
}

@media (max-width: 780px) {
    .insight-library .insight-library__frame {
        padding: 24px 18px;
    }

    .insight-library__hero-art {
        border-radius: 20px;
    }

    .insight-library__hero-caption {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
        padding: 14px 4px 0;
    }

    .insight-library__categories {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .insight-library__category {
        min-height: 72px;
        padding: 12px 13px;
    }

    .insight-library__search {
        margin-bottom: 32px;
    }

    .insight-library__search label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .insight-library__shelf {
        padding: 20px;
        border-radius: 22px;
    }

    .insight-library__shelf-header h2 {
        font-size: 21px;
    }

    .insight-library__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .insight-library__card-link {
        min-height: 210px;
    }
}

@media (max-width: 480px) {
    .insight-library .insight-library__frame {
        padding-right: 12px;
        padding-left: 12px;
    }

    .insight-library__intro {
        font-size: 13px;
    }

    .insight-library__hero-caption > span {
        font-size: 11px;
    }

    .insight-library__search {
        margin-top: 14px;
    }

    .insight-library__search-field {
        padding-left: 12px;
    }

    .insight-library__search button {
        padding-right: 15px;
        padding-left: 15px;
    }

    .insight-library__shelf {
        padding: 17px 12px;
        background: rgba(255, 255, 255, 0.62);
    }

    .insight-library__shelf-header {
        align-items: flex-start;
    }

    .insight-library__shelf-header p {
        font-size: 12px;
    }

    .insight-library__card-link {
        grid-template-columns: 40% minmax(0, 1fr);
        min-height: 190px;
    }

    .insight-library__card-body {
        padding: 14px;
    }

    .insight-library__card h3 {
        font-size: 15px;
    }

    .insight-library__description {
        -webkit-line-clamp: 2;
    }

    .insight-library__footer {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .insight-library__category,
    .insight-library__category-arrow,
    .insight-library__card-link {
        transition: none;
    }
}
