/*
 * Test catalogue design.
 *
 * Shared by the designation tests page and the live mock tests page so the
 * two stay visually identical. Colours come from the themed --b-* tokens in
 * modern-design-system.css, each with a light-value fallback, so the sheet
 * works in both themes and degrades safely if those tokens are missing.
 */

.desig-page {
    --b-accent-hover: #142c43;
}

[data-theme='dark'] .desig-page {
    --b-accent-hover: #8fb6da;
}

.desig-page {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--b-page, #fbfbfd);
    min-height: 100vh;
    padding: 15px 16px 60px;
}

/* Full-width layout; gutters widen on desktop to match the rest of the app. */
@media (min-width: 992px) {
    .desig-page {
        padding: 15px 3rem 60px;
    }
}

.desig-wrap {
    width: 100%;
    margin: 0 auto;
}

/* Top Bar */
.desig-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--b-muted, #64748b);
    text-decoration: none;
    padding: 8px 16px;
    background: var(--b-card, #ffffff);
    border-radius: 10px;
    border: 1px solid var(--b-line-2, #dce4ee);
    transition: all 0.2s;
}

.back-btn:hover {
    color: var(--b-title, #0B1320);
    border-color: var(--b-line-2, #dce4ee);
}

.back-btn svg {
    width: 14px;
    height: 14px;
}

.credit-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    font-weight: 700;
    color: #d97706;
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    padding: 6px 12px;
    border-radius: 8px;
}

.credit-badge svg {
    width: 14px;
    height: 14px;
}

/* Redesigned Header */
.desig-header-premium {
    /* Deliberately literal: the hero is a dark navy panel with white text in
       both themes, so it must not follow the accent when that lifts in dark. */
    background: linear-gradient(135deg, #0B1320, #1D4061);
    padding: 30px 40px;
    border-radius: 24px;
    border: none;
    box-shadow: 0 10px 30px rgba(11, 19, 32, 0.22);
}

.header-bg-shape {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 50%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    transform: rotate(-15deg);
    pointer-events: none;
    border-radius: 100px;
}

.border-white-50 {
    border-right-color: rgba(255, 255, 255, 0.2) !important;
}

.glass-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: var(--b-card, #ffffff) !important;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.desig-title-v2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.desig-title-v2 .accent {
    color: var(--b-accent, #1D4061);
}

.desig-sub-v2 {
    color: var(--b-muted, #64748b);
    font-weight: 500;
    margin: 5px 0 0;
}

.total-tests-stat {
    text-align: right;
    border-right: 2px solid var(--b-line-2, #dce4ee);
    padding-right: 15px;
}

.total-tests-stat .count {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--b-accent, #1D4061);
    line-height: 1;
}

.total-tests-stat .count.count-large {
    font-size: 2.5rem;
}

.total-tests-stat .label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--b-faint, #94a3b8);
    text-transform: uppercase;
}

.info-btn-v2 {
    width: 45px;
    height: 45px;
    background: var(--b-page, #fbfbfd);
    border: 1px solid var(--b-line-2, #dce4ee);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--b-accent, #1D4061);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.info-btn-v2:hover {
    background: var(--b-accent, #1D4061);
    color: var(--b-card, #ffffff);
    transform: scale(1.05);
}

.header-left-col {
    flex: 0 0 80%;
    max-width: 80%;
}

.header-right-col {
    flex: 0 0 20%;
    max-width: 20%;
}

/* Two-Panel Layout */
.desig-main-layout {
    display: flex;
    gap: 30px;
}

.desig-left-panel {
    flex: 0 0 65%;
    min-width: 0;
}

.desig-right-panel {
    flex: 0 0 35%;
}

/* Inline search bar */
.inline-search-bar {
    position: relative;
}

.inline-search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--b-faint, #94a3b8);
    font-size: 0.85rem;
}

.inline-search-bar input {
    width: 100%;
    padding: 11px 16px 11px 40px;
    border: 1.5px solid var(--b-line-2, #dce4ee);
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    outline: none;
    background: var(--b-card, #ffffff);
    transition: border-color 0.2s;
}

.inline-search-bar input:focus {
    border-color: var(--b-accent, #1D4061);
}

/* Tabs */
.test-type-tabs-wrapper {
    overflow-x: auto;
    padding-bottom: 5px;
}

.test-type-tabs {
    display: flex;
    gap: 10px;
    padding: 5px;
    background: var(--b-card, #ffffff);
    border-radius: 14px;
    border: 1px solid var(--b-line-2, #dce4ee);
    width: fit-content;
}

.type-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--b-muted, #64748b);
    white-space: nowrap;
    transition: all 0.2s;
    cursor: pointer;
}

.type-tab.active {
    background: var(--b-accent, #1D4061);
    color: var(--b-card, #ffffff);
    box-shadow: 0 4px 12px rgba(29, 64, 97, 0.25);
}

/* Horizontal Card */
.test-horizontal-card {
    background: var(--b-card, #ffffff);
    border: 1px solid var(--b-line-2, #dce4ee);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s;
}

.test-horizontal-card:hover {
    border-color: var(--b-accent, #1D4061);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
    background-color: var(--b-card, #ffffff);
}

.card-row-one {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.badges-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-v2 {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-v2.neg {
    background: #fff1f2;
    color: #f43f5e;
}

.badge-v2.free {
    background: #f0fdf4;
    color: #16a34a;
}

.badge-v2.credits {
    background: #fefce8;
    color: #ca8a04;
}

.badge-v2.pro {
    background: var(--b-tint, #F3F6FA);
    color: var(--b-accent, #1D4061);
}

.badge-v2.type {
    background: var(--b-tint, #F3F6FA);
    color: var(--b-accent, #1D4061);
}

/* Price sits with the difficulty tag on the right of the badge row. */
.card-row-one-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.difficulty-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--b-faint, #94a3b8);
    padding-left: 10px;
    border-left: 2px solid var(--b-line-2, #dce4ee);
}

.difficulty-tag.easy {
    color: #16a34a;
}

.difficulty-tag.medium {
    color: #ca8a04;
}

.difficulty-tag.hard {
    color: #dc2626;
}

.card-row-two {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.test-identity {
    flex: 1;
}

.test-name-v2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--b-title, #0B1320);
    margin: 0;
    line-height: 1.3;
}


.test-specs-action {
    display: flex;
    align-items: center;
    gap: 25px;
}

.specs-grid {
    display: flex;
    gap: 20px;
}

.spec-item {
    text-align: center;
}

.spec-item .val {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--b-text, #334155);
    line-height: 1.1;
}

.spec-item .lbl {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--b-faint, #94a3b8);
    text-transform: uppercase;
}

.btn-start-v2 {
    background: var(--b-accent, #1D4061);
    color: var(--b-card, #ffffff);
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn-start-v2:hover {
    background: var(--b-accent-hover, #142c43);
    color: var(--b-card, #ffffff);
    transform: translateY(-2px);
}

.btn-start-v2.btn-review {
    background: #10b981;
}

.btn-start-v2.btn-unlock {
    background: #f59e0b;
}

.btn-start-v2.btn-login {
    background: var(--b-soft, #f7f9fc);
    color: var(--b-text, #334155);
}

.btn-start-v2.btn-disabled {
    background: var(--b-soft, #f7f9fc);
    color: var(--b-faint, #94a3b8);
    cursor: not-allowed;
}

.card-row-three {
    padding-top: 12px;
    border-top: 1px solid var(--b-soft, #f7f9fc);
}

.meta-info-v2 {
    display: flex;
    gap: 20px;
}

.info-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--b-faint, #94a3b8);
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-tag i {
    font-size: 0.7rem;
}

.info-tag.rating {
    color: #ca8a04;
}

/* Right Panel Widgets */
.sticky-sidebar-v2 {
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: var(--b-card, #ffffff);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--b-line-2, #dce4ee);
}

.widget-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--b-title, #0B1320);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-box-v2 {
    position: relative;
}

.search-box-v2 i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--b-faint, #94a3b8);
}

.search-box-v2 input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1.5px solid var(--b-line-2, #dce4ee);
    border-radius: 12px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.search-box-v2 input:focus {
    border-color: var(--b-accent, #1D4061);
}

.filter-opt {
    margin-bottom: 10px;
}

.custom-check-v2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--b-text, #334155);
    cursor: pointer;
    user-select: none;
}

.custom-check-v2 input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--b-line-2, #dce4ee);
    border-radius: 5px;
    display: block;
    position: relative;
}

.custom-check-v2 input:checked+.checkmark {
    background: var(--b-accent, #1D4061);
    border-color: var(--b-accent, #1D4061);
}

.custom-check-v2 input:checked+.checkmark::after {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: white;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.promo-widget {
    background: linear-gradient(135deg, var(--b-accent, #1D4061), var(--b-accent, #1D4061));
    border: none;
    color: var(--b-card, #ffffff);
    overflow: hidden;
    position: relative;
}

.promo-card {
    position: relative;
    z-index: 1;
}

.promo-card h5 {
    font-weight: 800;
    margin-bottom: 8px;
}

.promo-card p {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.btn-promo {
    background: var(--b-card, #ffffff);
    color: var(--b-accent, #1D4061);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    display: inline-block;
}

.promo-icon {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 5rem;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.mini-exam-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-exam-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--b-page, #fbfbfd);
    border: 1px solid var(--b-line-2, #dce4ee);
    border-radius: 10px;
    text-decoration: none;
    color: var(--b-text, #334155);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.mini-exam-item:hover {
    background: var(--b-card, #ffffff);
    border-color: var(--b-accent, #1D4061);
    color: var(--b-accent, #1D4061);
    transform: translateX(4px);
}

.view-all-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--b-accent, #1D4061);
    text-decoration: none;
}

/* Modal Premium */
.b-modal {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.b-modal-hd {
    background: var(--b-card, #ffffff);
    padding: 20px;
    border-bottom: 1px solid var(--b-soft, #f7f9fc);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.b-modal-bd {
    padding: 24px;
}

.b-modal-ft {
    padding: 0 24px 24px;
}

.inst-list {
    padding: 0;
    margin: 0 0 20px;
    list-style: none;
}

.inst-list li {
    position: relative;
    padding-left: 20px;
    font-size: 0.85rem;
    color: var(--b-text, #334155);
    margin-bottom: 8px;
}

.inst-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--b-accent, #1D4061);
    font-weight: 800;
}

.b-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--b-title, #0B1320);
    cursor: pointer;
    background: var(--b-page, #fbfbfd);
    padding: 12px;
    border-radius: 12px;
}

/* Category Headers */
.category-title-v2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--b-title, #0B1320);
    margin: 0;
    padding-bottom: 8px;
}

.title-line {
    width: 40px;
    height: 4px;
    background: var(--b-accent, #1D4061);
    border-radius: 10px;
}

.exam-info-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--b-accent, #1D4061);
    text-decoration: none;
    padding: 6px 14px;
    background: var(--b-tint, #F3F6FA);
    border: 1px solid var(--b-tint, #F3F6FA);
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.exam-info-link:hover {
    background: var(--b-accent, #1D4061);
    color: var(--b-card, #ffffff);
    border-color: var(--b-accent, #1D4061);
}

.exam-info-link i {
    font-size: 0.7rem;
}

.info-btn-v2 {
    text-decoration: none;
}

/* Empty State */
.empty-state-v2 {
    text-align: center;
    padding: 60px;
    background: var(--b-card, #ffffff);
    border-radius: 20px;
    color: var(--b-faint, #94a3b8);
}

.empty-state-v2 i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--b-line-2, #dce4ee);
}

.desig-empty {
    text-align: center;
    padding: 60px;
    color: var(--b-faint, #94a3b8);
}

.desig-empty i {
    font-size: 2.5rem;
    margin-bottom: 15px;
}


/* ── DARK THEME ───────────────────────────────────
   Structural colours already flip through the --b-* tokens.
   What is left are the semantic hues: the tinted badge fills are
   too bright on a dark card, so each becomes a translucent wash
   with lifted ink. */
[data-theme='dark'] .badge-v2.free {
    background: rgba(52, 211, 153, .14);
    color: #34d399;
}

[data-theme='dark'] .badge-v2.credits {
    background: rgba(250, 204, 21, .14);
    color: #facc15;
}

[data-theme='dark'] .badge-v2.neg {
    background: rgba(251, 113, 133, .14);
    color: #fb7185;
}

[data-theme='dark'] .badge-v2.pro,
[data-theme='dark'] .badge-v2.type {
    background: rgba(111, 157, 203, .16);
    color: #8fb6da;
}

[data-theme='dark'] .difficulty-tag.easy {
    color: #34d399;
}

[data-theme='dark'] .difficulty-tag.medium {
    color: #facc15;
}

[data-theme='dark'] .difficulty-tag.hard {
    color: #f87171;
}

/* Solid accent buttons need dark ink once the accent lifts. */
[data-theme='dark'] .btn-start-v2 {
    color: var(--b-accent-ink, #ffffff);
}

@media (max-width: 991px) {
    .desig-main-layout {
        flex-direction: column;
    }

    .desig-left-panel,
    .desig-right-panel {
        flex: 0 0 100%;
    }

    .sticky-sidebar-v2 {
        position: static;
    }

    .card-row-two {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .test-specs-action {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 576px) {

    /* Page-level: no background, tighter padding, prevent overflow */
    .desig-page {
        padding: 5px 8px 20px;
        background: transparent;
        overflow-x: hidden;
    }

    .desig-wrap {
        overflow-x: hidden;
    }

    /* Top bar compact */
    .desig-top-row {
        margin-bottom: 10px;
        gap: 6px;
    }

    .back-btn {
        font-size: 0.7rem;
        padding: 5px 10px;
        border-radius: 8px;
    }

    .credit-badge {
        font-size: 0.65rem;
        padding: 4px 8px;
        gap: 3px;
    }

    .credit-badge svg {
        width: 11px;
        height: 11px;
    }

    /* Header: keep premium background, compact */
    .desig-header-premium {
        padding: 20px;
        border-radius: 16px;
        margin-bottom: 15px !important;
    }

    .desig-title-v2 {
        font-size: 1.3rem;
        letter-spacing: -0.01em;
    }

    .desig-sub-v2 {
        font-size: 0.7rem;
        margin-top: 2px;
    }

    .total-tests-stat {
        padding-right: 10px;
    }

    .total-tests-stat .count {
        font-size: 1.1rem;
    }

    .total-tests-stat .count.count-large {
        font-size: 1.8rem;
    }

    .header-left-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .header-right-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        justify-content: flex-start !important;
        margin-top: 15px;
    }

    .total-tests-stat {
        text-align: left !important;
        padding-right: 0 !important;
    }

    .total-tests-stat .label {
        font-size: 0.6rem;
    }

    .info-btn-v2 {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    /* Inline search compact */
    .inline-search-bar input {
        padding: 8px 12px 8px 34px;
        font-size: 0.8rem;
        border-radius: 10px;
    }

    .inline-search-bar i {
        left: 11px;
        font-size: 0.75rem;
    }

    /* Tabs: smaller, scrollable, no background */
    .test-type-tabs-wrapper {
        margin-bottom: 10px !important;
    }

    .test-type-tabs {
        gap: 5px;
        padding: 3px;
        background: transparent;
        border: none;
    }

    .type-tab {
        padding: 6px 12px;
        font-size: 0.7rem;
        border-radius: 8px;
        background: var(--b-card, #ffffff);
        border: 1px solid var(--b-line-2, #dce4ee);
    }

    .type-tab.active {
        border-color: var(--b-accent, #1D4061);
    }

    /* Category titles compact */
    .category-section {
        margin-bottom: 15px !important;
    }

    .category-title-v2 {
        font-size: 0.95rem;
        padding-bottom: 4px;
    }

    .title-line {
        width: 25px;
        height: 3px;
    }

    .exam-info-link {
        font-size: 0.65rem;
        padding: 4px 8px;
        gap: 4px;
        border-radius: 6px;
    }

    .exam-info-link i {
        font-size: 0.6rem;
    }

    /* Horizontal Card: remove bg, compact, prevent overflow */
    .test-horizontal-card {
        background: var(--b-card, #ffffff);
        border: 1px solid var(--b-line-2, #dce4ee);
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 10px;
        overflow: hidden;
    }

    .test-horizontal-card:hover {
        background-color: var(--b-card, #ffffff);
    }

    /* Row 1 compact */
    .card-row-one {
        margin-bottom: 8px;
    }

    .badge-v2 {
        font-size: 0.55rem;
        padding: 2px 6px;
        border-radius: 4px;
    }

    .badges-group {
        gap: 4px;
    }

    .difficulty-tag {
        font-size: 0.6rem;
        padding-left: 6px;
    }

    /* Row 2: stack vertically, compact */
    .card-row-two {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 10px;
    }

    .test-name-v2 {
        font-size: 0.85rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .test-specs-action {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .specs-grid {
        gap: 12px;
    }

    .spec-item .val {
        font-size: 0.8rem;
    }

    .spec-item .lbl {
        font-size: 0.55rem;
    }

    .btn-start-v2 {
        padding: 7px 14px;
        font-size: 0.72rem;
        border-radius: 8px;
    }

    /* Row 3 compact */
    .card-row-three {
        padding-top: 8px;
    }

    .meta-info-v2 {
        gap: 10px;
        flex-wrap: wrap;
    }

    .info-tag {
        font-size: 0.6rem;
        gap: 3px;
    }

    .info-tag i {
        font-size: 0.55rem;
    }

    /* Sidebar widgets: remove bg, compact */
    .sidebar-widget {
        background: transparent;
        border: 1px solid var(--b-line-2, #dce4ee);
        padding: 12px;
        border-radius: 12px;
        margin-bottom: 10px !important;
    }

    .widget-title {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }

    .search-box-v2 input {
        padding: 8px 8px 8px 30px;
        font-size: 0.78rem;
        border-radius: 8px;
    }

    .search-box-v2 i {
        left: 10px;
        font-size: 0.75rem;
    }

    .custom-check-v2 {
        font-size: 0.75rem;
        gap: 8px;
    }

    .checkmark {
        width: 15px;
        height: 15px;
    }

    .filter-opt {
        margin-bottom: 6px;
    }

    /* Promo widget compact */
    .promo-widget {
        padding: 14px !important;
        border-radius: 12px;
    }

    .promo-card h5 {
        font-size: 0.9rem;
    }

    .promo-card p {
        font-size: 0.7rem;
        margin-bottom: 10px;
    }

    .btn-promo {
        padding: 6px 12px;
        font-size: 0.7rem;
        border-radius: 6px;
    }

    .promo-icon {
        font-size: 3.5rem;
    }

    /* Other exams compact */
    .mini-exam-item {
        padding: 8px 10px;
        font-size: 0.75rem;
        border-radius: 8px;
    }

    .view-all-link {
        font-size: 0.7rem;
    }

    /* Modal compact on mobile */
    .b-modal-hd {
        padding: 14px;
    }

    .b-modal-hd h6 {
        font-size: 0.85rem;
    }

    .b-modal-bd {
        padding: 14px;
    }

    .b-modal-ft {
        padding: 0 14px 14px;
    }

    .inst-list li {
        font-size: 0.75rem;
        padding-left: 14px;
        margin-bottom: 5px;
    }

    .b-check {
        font-size: 0.75rem;
        padding: 8px;
        border-radius: 8px;
        gap: 8px;
    }

    /* Empty states */
    .empty-state-v2 {
        padding: 30px 15px;
        border-radius: 12px;
    }

    .empty-state-v2 i {
        font-size: 2rem;
    }

    .desig-empty {
        padding: 30px 15px;
    }

    .desig-empty i {
        font-size: 1.8rem;
    }
}

/* ==========================================================================
   START-TEST DIALOG
   A candidate is about to spend credits, so the dialog says what the paper is
   before they commit: its structure, how it is marked, and - the part it used
   to omit - whether its sections lock behind them.
   ========================================================================== */
.st-hd { align-items: flex-start; gap: 12px; }
.st-hd-text { min-width: 0; }
.st-hd-text h6 { line-height: 1.35; }
.st-hd-sub {
    margin-top: 3px; font-size: .74rem; font-weight: 600;
    color: var(--b-dim, #64748b);
}

/* Four figures, evenly weighted */
.st-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    margin-bottom: 18px;
}
.st-stat {
    text-align: center; padding: 10px 4px; border-radius: 12px;
    background: var(--b-soft, #f7f9fc); border: 1px solid var(--b-line, #ecedf2);
}
.st-stat b { display: block; font-size: 1.15rem; font-weight: 800; line-height: 1.2; }
.st-stat small {
    display: block; margin-top: 2px; font-size: .62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em; color: var(--b-dim, #64748b);
}

.st-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.st-col { min-width: 0; }

.st-h {
    font-size: .64rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .07em; color: var(--b-dim, #94a3b8);
    margin: 0 0 8px; padding-bottom: 6px;
    border-bottom: 1px solid var(--b-line, #ecedf2);
}
.st-col .st-h:not(:first-child) { margin-top: 18px; }

.st-p { font-size: .8rem; line-height: 1.55; color: var(--b-text, #334155); margin: 0; }

/* The section rule reads as a warning when it is one */
.st-sec-rule {
    display: flex; gap: 9px; align-items: flex-start;
    padding: 10px 12px; border-radius: 10px;
    font-size: .77rem; line-height: 1.5; margin-bottom: 10px;
}
.st-sec-rule i { margin-top: 3px; font-size: .72rem; flex: none; }
.st-sec-rule.is-strict { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.st-sec-rule.is-free   { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

.st-sections { list-style: none; padding: 0; margin: 0; counter-reset: st-sec; }
.st-sections li {
    counter-increment: st-sec;
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    padding: 8px 0; border-bottom: 1px dashed var(--b-line, #ecedf2);
}
.st-sections li:last-child { border-bottom: 0; }
.st-sections li::before {
    content: counter(st-sec); flex: none;
    width: 20px; height: 20px; border-radius: 6px;
    background: var(--b-soft, #f1f5f9); color: var(--b-dim, #64748b);
    font-size: .62rem; font-weight: 800;
    display: grid; place-items: center;
}
.st-sec-name { flex: 1; font-size: .8rem; font-weight: 700; color: var(--b-title, #0f172a); }
.st-sec-meta { font-size: .7rem; font-weight: 600; color: var(--b-dim, #64748b); flex: none; }

.st-list { list-style: none; padding: 0; margin: 0; }
.st-list li {
    display: flex; gap: 9px; align-items: flex-start;
    font-size: .78rem; line-height: 1.5; color: var(--b-text, #334155);
    padding: 5px 0;
}
.st-list i { margin-top: 3px; font-size: .68rem; flex: none; }
.st-ok  { color: #10b981; }
.st-bad { color: #ef4444; }
.st-dim { color: #94a3b8; }

.st-notes {
    margin-top: 16px; padding: 12px 14px; border-radius: 10px;
    background: var(--b-soft, #f8fafc); border: 1px solid var(--b-line, #ecedf2);
    font-size: .78rem; line-height: 1.55; color: var(--b-text, #334155);
}

.st-history, .st-warn {
    display: flex; gap: 9px; align-items: flex-start;
    margin-top: 14px; padding: 10px 12px; border-radius: 10px;
    font-size: .78rem; line-height: 1.5;
}
.st-history { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.st-warn    { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.st-history i, .st-warn i { margin-top: 2px; flex: none; }

.st-accept { margin-top: 18px; }

.st-ft { display: flex; gap: 10px; align-items: center; }
.st-ft .btn-start-v2 { flex: 1; padding: 12px; }
.st-cancel {
    flex: none; padding: 12px 18px; border-radius: 12px;
    border: 1px solid var(--b-line, #e2e8f0); background: transparent;
    font-size: .82rem; font-weight: 700; color: var(--b-dim, #64748b);
    cursor: pointer;
}
.st-cancel:hover { background: var(--b-soft, #f8fafc); color: var(--b-text, #334155); }

/* One column on a phone: two 50% columns make both unreadable. */
@media (max-width: 640px) {
    .st-cols { grid-template-columns: 1fr; gap: 16px; }
    .st-stats { grid-template-columns: repeat(2, 1fr); }
    .st-ft { flex-direction: column-reverse; }
    .st-cancel, .st-ft .btn-start-v2 { width: 100%; }
}
