/* ==========================================================================
   BJS WRITTEN EXAMS ARCHIVE & SUBJECT PAPERS DESIGN SYSTEM
   ========================================================================== */
.bjs-exam-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 !important;
    border: none !important;
    font-family: 'SolaimanLipi', 'Kalpurush', 'Segoe UI', Tahoma, sans-serif;
    color: #1e293b;
    line-height: 1.8;
}

.bjs-subject-paper {
    background: #ffffff;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px;
    padding: 24px 22px;
    margin: 25px 0 35px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    font-family: 'SolaimanLipi', 'Kalpurush', 'Segoe UI', sans-serif;
    scroll-margin-top: 70px;
}

.bjs-subject-paper hr {
    border: 0;
    border-top: 1.5px solid #0f172a;
    margin: 14px 0 18px 0;
}

.bjs-q-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    font-size: 15.5px;
    line-height: 1.8;
    color: #0f172a;
}

.bjs-q-text {
    flex: 1;
    padding-right: 18px;
}

.bjs-q-marks {
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
    min-width: 45px;
    text-align: right;
    white-space: nowrap;
    padding-top: 2px;
}

@media (max-width: 768px) {
    .bjs-subject-paper {
        padding: 16px 14px;
        margin: 18px 0;
    }
    .bjs-q-text {
        padding-right: 10px;
    }
}

/* Year navigation & Hub button */
.bar-exam-nav-box {
    margin-bottom: 20px;
}

.bar-exam-year-pill.bar-exam-hub-btn,
.bar-exam-year-pills a.bar-exam-hub-btn,
a.bar-exam-hub-btn {
    background: #1e3a8a !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-color: #1e3a8a !important;
}

.bar-exam-year-pill.bar-exam-hub-btn:hover,
.bar-exam-year-pills a.bar-exam-hub-btn:hover,
a.bar-exam-hub-btn:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   COMPACT & FOLDABLE SMART TOC (সূচিপত্র)
   ========================================================================== */
details.bjs-toc-details {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    margin: 14px 0 22px 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.2s ease;
}

details.bjs-toc-details[open] {
    background: #ffffff;
    border-color: #94a3b8;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

summary.bjs-toc-summary {
    padding: 9px 14px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14.5px;
    font-weight: 700;
    color: #1e3a8a;
    background: #f1f5f9;
    border-radius: 6px;
    transition: background 0.15s ease;
}

summary.bjs-toc-summary::-webkit-details-marker {
    display: none;
}

summary.bjs-toc-summary:hover {
    background: #e2e8f0;
}

.bjs-toc-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bjs-toc-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    background: #ffffff;
    color: #1e40af;
    border: 1px solid #cbd5e1;
    padding: 3px 9px;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    white-space: nowrap;
}

summary.bjs-toc-summary:hover .bjs-toc-toggle-pill {
    background: #1e40af;
    color: #ffffff;
    border-color: #1e40af;
}

.bjs-toc-toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 10px;
}

details.bjs-toc-details[open] .bjs-toc-toggle-icon {
    transform: rotate(180deg);
}

details.bjs-toc-details[open] summary.bjs-toc-summary {
    border-bottom: 1px solid #e2e8f0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.bjs-toc-content {
    padding: 10px 12px 12px 12px;
    background: #ffffff;
}

.bjs-toc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

@media (max-width: 640px) {
    .bjs-toc-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    summary.bjs-toc-summary {
        font-size: 13px;
        padding: 8px 10px;
    }
    .bjs-toc-toggle-pill {
        font-size: 11px;
        padding: 2px 7px;
    }
}

.bjs-toc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none !important;
    color: #1e293b !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    transition: all 0.15s ease;
}

.bjs-toc-item:hover {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    color: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.08);
}

.bjs-toc-item-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    background: #e0e7ff;
    color: #3730a3;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 5px;
    white-space: nowrap;
}

.bjs-toc-item-marks {
    font-size: 11px;
    font-weight: 600;
    color: #059669;
    white-space: nowrap;
    margin-left: 6px;
}
