.article-related-popup {
    position: fixed;
    z-index: 1001;
    max-height: calc(100vh - 40px);
}

.article-related-popup__card {
    border: 1px solid rgba(203, 224, 248, 0.96);
    border-radius: 12px;
    background: #fff;
    padding: 16px;
    box-shadow: 0 12px 34px rgba(5, 35, 76, 0.12);
}

.article-related-popup__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.article-related-popup h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.article-related-popup__close {
    display: inline-flex;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.article-related-popup__list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-related-popup__list a {
    position: relative;
    display: block;
    border: 1px solid #dbe7f8;
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px 32px 12px 12px;
    color: #2d3748;
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
}

.article-related-popup__list a::after {
    position: absolute;
    top: 50%;
    right: 12px;
    color: #3498db;
    content: "\2192";
    font-size: 18px;
    transform: translateY(-50%);
}

.article-related-popup__list a:hover {
    border-color: #9fc8f3;
    background: #edf6ff;
}

.article-related-popup__list span {
    display: block;
    margin-bottom: 4px;
    color: #1976d2;
    font-weight: 600;
}

.table-of-contents.is-replaced-by-related-popup {
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 1023px) {
    .article-related-popup {
        display: none !important;
    }
}
