html {
    scroll-behavior: smooth;
}

/* 1. Main Container: Grid layout stretches cells to match height */
.mrb-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 32px;
    padding: 24px 28px;
    background: #ffffff;
    box-sizing: border-box;
    position: relative;
    align-items: stretch;
    margin-left: 12%;
    margin-right: 12%;
}

/* 2. Left Section: Stretches cell height, centers author info vertically */
.mrb-card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    padding-right: 32px;
    position: relative;
    height: 100%;
}

/* 3. Center Vertical Divider Line: Full height of the card content area */
.mrb-card-left::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #cd9b63;
}

/* 4. Avatar Styles */
.mrb-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.mrb-avatar-wrap img {
    object-fit: cover;
    display: block;
}

.mrb-avatar-wrap img.mrb-shape-circle {
    border-radius: 50%;
}

.mrb-avatar-wrap img.mrb-shape-square {
    border-radius: 6px;
}

/* Author Details Meta */
.mrb-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mrb-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.mrb-name {
    display: block;
    font-weight: 700;
    margin: 0 0 3px 0;
    line-height: 1.2;
}

.mrb-title {
    line-height: 1.3;
}

/* 5. Right Section */
.mrb-card-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.mrb-bio {
    line-height: 1.55;
    margin: 0 0 16px 0;
}

/* Accordions */
.mrb-accordions-wrap {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mrb-accordion-item {
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mrb-accordion-header {
    font-size: 14px;
    font-weight: 600;
    color: #444444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    user-select: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.mrb-accordion-item.active .mrb-accordion-header {
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
}

.mrb-accordion-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mrb-accordion-icon {
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
}

.mrb-accordion-content-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mrb-accordion-content {
    padding: 10px;
    font-size: 13px;
    line-height: 1.6;
    color: #444444;
    background: #ffffff;
}

/* Dynamic TOC List */
.mrb-toc-list {
    padding: 0 !important;
    margin: 0 !important;
    padding-left: 0;
    list-style-type: none;
}

.mrb-toc-list li {
    margin-bottom: 8px;
    line-height: 1.4;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.mrb-toc-list li:last-child {
    margin-bottom: 0;
}

.mrb-toc-number {
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.mrb-toc-list a {
    color: #444444;
    text-decoration: none;
    transition: color 0.15s ease;
}

.mrb-toc-h2 { margin-left: 0px; }
.mrb-toc-h3 { margin-left: 16px; }
.mrb-toc-h4 { margin-left: 32px; }
.mrb-toc-h5 { margin-left: 48px; }
.mrb-toc-h6 { margin-left: 64px; }

/* Dynamic Sources List */
.mrb-sources-list {
    padding: 0 !important;
    margin: 0 !important;
    list-style-type: none !important;
}

.mrb-sources-list li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: break-word;
}

.mrb-sources-list li:last-child {
    margin-bottom: 0;
}

.mrb-sources-list li::before {
    content: "•";
    font-weight: 600;
    font-size: 20px;
    position: absolute;
    left: 0;
    top: -5px;
}

.mrb-sources-list a {
    color: #444444;
    text-decoration: none;
    transition: color 0.15s ease;
}

/* 6. Card Footer */
.mrb-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 10px;
    border-top: 1px dashed #e8e8e8;
}

.mrb-footer-col {
    white-space: nowrap;
}

.mrb-footer-col strong {
    font-weight: 700;
}

/* 7. Mobile Responsive Breakdown */
@media (max-width: 1440px) {
    .mrb-card {
        margin-left: 10px;
        margin-right: 10px;
    }
}

@media (max-width: 1023px) {
    .mrb-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .mrb-card-left {
        flex-direction: row;
        width: 100%;
        padding-right: 0;
        padding-bottom: 18px;
        height: auto;
    }

    .mrb-card-left::after {
        display: block;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 2px;
    }

    .mrb-card .mrb-avatar-wrap img {
        width: 110px !important;
        height: 110px !important;
    }

    .mrb-meta {
        align-items: flex-start;
    }

    .mrb-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
