/* ===== question-bank/sub-categories ===== */
        .qb-main { overflow-x: hidden; }
        .qb-row {
            display: block;
            width: 100%;
            text-align: left;
            background: var(--surface-1);
            color: var(--text-dark);
            cursor: pointer;
            transition: background .15s;
        }
        .qb-row:hover { background: var(--hover-bg); }
        .qb-row-icon {
            display: flex;
            align-items: center;
            padding-right: 8px;
            margin-right: 12px;
            border-right: 2px solid var(--hero-blue-btn);
            flex: 0 0 auto;
        }
        .qb-row-icon .material-symbols-outlined { color: var(--hero-blue-btn); font-size: 28px; }
        .qb-row-title { line-height: 1.4; }

/* ===== question-bank/categories ===== */
        .qb-main { overflow-x: hidden; }

        .qb-tabs { position: sticky; top: 0; z-index: 9; overflow: hidden; background: var(--surface-1); }
        .qb-tab-btn {
            color: var(--text-light);
            background: var(--surface-1);
            border: none;
            border-bottom: 3px solid transparent;
            border-radius: 0;
        }
        .qb-tab-btn.active {
            color: var(--hero-blue-btn);
            background: var(--surface-3);
            border-bottom-color: var(--hero-blue-btn);
        }
        html[data-theme="dark"] .qb-tab-btn.active { color: #4db8ff; border-bottom-color: #4db8ff; }
        .qb-tab-btn:hover { background: var(--hover-bg); }

        .qb-heading { font-size: 16px; font-weight: 600; margin: 10px 4px 2px; color: var(--text-dark); }

        .qb-row {
            display: block;
            width: 100%;
            text-align: left;
            background: var(--surface-1);
            color: var(--text-dark);
            cursor: pointer;
            transition: background .15s;
        }
        .qb-row:hover { background: var(--hover-bg); }
        .qb-row-icon {
            display: flex;
            align-items: center;
            padding-right: 8px;
            margin-right: 12px;
            border-right: 2px solid var(--hero-blue-btn);
            flex: 0 0 auto;
        }
        .qb-row-icon .material-symbols-outlined { color: var(--hero-blue-btn); font-size: 28px; }
        .qb-row-title { line-height: 1.4; }
        .qb-row-sub { color: #888; font-size: 14px; }
        .qb-year-title { font-size: 18px; }

        .qb-card {
            height: 140px;
            width: 100%;
            border-radius: 10px;
            background: var(--surface-1);
            color: var(--text-dark);
            cursor: pointer;
            transition: transform .15s ease, box-shadow .15s ease;
        }
        .qb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md) !important; }
        .qb-card .material-symbols-outlined { font-size: 30px; color: var(--hero-blue-btn); margin-bottom: 10px; }
        .qb-card-label { font-weight: 500; line-height: 1.4; }

/* ===== question-bank/year ===== */
        .qb-main { overflow-x: hidden; }
        .qb-row {
            display: block;
            width: 100%;
            text-align: left;
            background: var(--surface-1);
            color: var(--text-dark);
            cursor: pointer;
            transition: background .15s;
        }
        .qb-row:hover { background: var(--hover-bg); }
        .qb-row-icon {
            display: flex;
            align-items: center;
            padding-right: 8px;
            margin-right: 12px;
            border-right: 2px solid var(--hero-blue-btn);
            flex: 0 0 auto;
        }
        .qb-row-icon .material-symbols-outlined { color: var(--hero-blue-btn); font-size: 28px; }
        .qb-row-title { line-height: 1.4; }
        .qb-row-sub { color: #888; font-size: 14px; }

/* ===== question-bank/categories: redesign (scoped to the tabbed page) ===== */
        #qbTab ~ .tab-content .qb-tone-0 { --tone: #2563eb; --tone-2: #60a5fa; }
        #qbTab ~ .tab-content .qb-tone-1 { --tone: #7c3aed; --tone-2: #a78bfa; }
        #qbTab ~ .tab-content .qb-tone-2 { --tone: #059669; --tone-2: #34d399; }
        #qbTab ~ .tab-content .qb-tone-3 { --tone: #ea580c; --tone-2: #fb923c; }
        #qbTab ~ .tab-content .qb-tone-4 { --tone: #db2777; --tone-2: #f472b6; }
        #qbTab ~ .tab-content .qb-tone-5 { --tone: #0891b2; --tone-2: #22d3ee; }
        #qbTab ~ .tab-content .qb-tone-locked { --tone: #64748b; --tone-2: #94a3b8; }

        /* tabs: segmented control */
        .qb-main #qbTab {
            flex-wrap: nowrap;
            gap: 4px;
            margin: 10px 8px 4px;
            padding: 4px;
            border: 1px solid var(--border-color) !important;
            border-radius: 14px;
            background: var(--surface-1) !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
        }
        .qb-main #qbTab .qb-tab-btn {
            width: 100%;
            padding: 10px 6px !important;
            border: 0;
            border-radius: 11px;
            color: var(--text-light);
            background: transparent;
            transition: background .2s, color .2s, box-shadow .2s;
        }
        .qb-main #qbTab .qb-tab-btn:not(.active):hover { background: var(--hover-bg); }
        .qb-main #qbTab .qb-tab-btn.active {
            color: #fff;
            background: linear-gradient(135deg, #129ae8, #7c3aed);
            box-shadow: 0 6px 14px rgba(18, 154, 232, .3);
        }
        html[data-theme="dark"] .qb-main #qbTab .qb-tab-btn.active { color: #fff; }

        /* headings */
        #qbTab ~ .tab-content .qb-heading {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 14px 2px 4px;
            font-size: 16px;
            font-weight: 700;
        }
        #qbTab ~ .tab-content .qb-heading::before {
            content: "";
            width: 5px;
            height: 22px;
            border-radius: 4px;
            background: linear-gradient(180deg, #129ae8, #7c3aed);
        }

        /* rows + cards */
        #qbTab ~ .tab-content .qb-row,
        #qbTab ~ .tab-content .qb-card {
            position: relative;
            overflow: hidden;
            width: 100%;
            background: var(--surface-1);
            color: var(--text-dark);
            border: 1px solid rgba(0, 0, 0, .05) !important;
            border-radius: 16px !important;
            cursor: pointer;
            transition: transform .18s ease, box-shadow .18s ease;
        }
        #qbTab ~ .tab-content .qb-row::before,
        #qbTab ~ .tab-content .qb-card::before {
            content: "";
            position: absolute;
            background: linear-gradient(180deg, var(--tone), var(--tone-2));
        }
        #qbTab ~ .tab-content .qb-row::before { inset: 0 auto 0 0; width: 4px; }
        #qbTab ~ .tab-content .qb-row:hover,
        #qbTab ~ .tab-content .qb-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .15) !important; background: var(--surface-1); }

        #qbTab ~ .tab-content .qb-row .card-body { align-items: center; gap: 12px; padding: 12px 14px 12px 18px !important; }
        #qbTab ~ .tab-content .qb-row-icon,
        #qbTab ~ .tab-content .qb-card-icon {
            flex: 0 0 auto;
            width: 46px;
            height: 46px;
            display: grid;
            place-items: center;
            padding: 0;
            margin: 0;
            border: 0;
            border-radius: 13px;
            background: linear-gradient(135deg, var(--tone), var(--tone-2));
            box-shadow: 0 6px 14px color-mix(in srgb, var(--tone) 35%, transparent);
        }
        #qbTab ~ .tab-content .qb-row-icon .material-symbols-outlined,
        #qbTab ~ .tab-content .qb-card-icon .material-symbols-outlined {
            font-size: 26px;
            line-height: 1;
            color: #fff;
            margin: 0;
            font-variation-settings: 'FILL' 1;
        }
        #qbTab ~ .tab-content .qb-row-title { flex: 1 1 auto; font-weight: 700; line-height: 1.4; }
        #qbTab ~ .tab-content .qb-row-sub { font-weight: 400; font-size: 13px; color: var(--text-light); }

        #qbTab ~ .tab-content .qb-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
            height: auto;
            min-height: 140px;
            padding: 18px 10px 14px;
            text-align: center;
        }
        #qbTab ~ .tab-content .qb-card::before { inset: 0 0 auto 0; height: 4px; }
        #qbTab ~ .tab-content .qb-card-label { font-weight: 700; line-height: 1.4; font-size: 14px; }

        #qbTab ~ .tab-content .qb-arrow {
            flex: 0 0 auto;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: color-mix(in srgb, var(--tone) 12%, transparent);
            color: var(--tone);
            transition: background .18s, color .18s, transform .18s;
        }
        #qbTab ~ .tab-content .qb-arrow .material-symbols-outlined { font-size: 18px; color: inherit; }
        #qbTab ~ .tab-content .qb-row:hover .qb-arrow,
        #qbTab ~ .tab-content .qb-card:hover .qb-arrow { background: var(--tone); color: #fff; transform: translateX(3px); }
        #qbTab ~ .tab-content .qb-card .qb-arrow { display: none; }

/* ===== question-bank/sub-categories: redesign ===== */
        .qb-sub-row {
            --tone: #2563eb;
            --tone-2: #60a5fa;
            position: relative;
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 14px;
            width: 100%;
            min-height: 80px;
            padding: 14px 14px 14px 20px;
            overflow: hidden;
            text-align: left;
            background: var(--surface-1);
            color: var(--text-dark);
            border: 1px solid rgba(0, 0, 0, .05) !important;
            border-radius: 16px;
            cursor: pointer;
            transition: transform .18s ease, box-shadow .18s ease;
        }
        .qb-sub-row.qb-tone-0 { --tone: #2563eb; --tone-2: #60a5fa; }
        .qb-sub-row.qb-tone-1 { --tone: #7c3aed; --tone-2: #a78bfa; }
        .qb-sub-row.qb-tone-2 { --tone: #059669; --tone-2: #34d399; }
        .qb-sub-row.qb-tone-3 { --tone: #ea580c; --tone-2: #fb923c; }
        .qb-sub-row.qb-tone-4 { --tone: #db2777; --tone-2: #f472b6; }
        .qb-sub-row.qb-tone-5 { --tone: #0891b2; --tone-2: #22d3ee; }
        .qb-sub-row.qb-tone-locked { --tone: #64748b; --tone-2: #94a3b8; }
        .qb-sub-row::before {
            content: "";
            position: absolute;
            inset: 0 auto 0 0;
            width: 4px;
            background: linear-gradient(180deg, var(--tone), var(--tone-2));
        }
        .qb-sub-row:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .15) !important; }
        .qb-sub-icon {
            flex: 0 0 auto;
            width: 48px;
            height: 48px;
            display: grid;
            place-items: center;
            border-radius: 14px;
            background: linear-gradient(135deg, var(--tone), var(--tone-2));
            box-shadow: 0 6px 14px color-mix(in srgb, var(--tone) 35%, transparent);
        }
        .qb-sub-icon .material-symbols-outlined { font-size: 26px; line-height: 1; color: #fff; font-variation-settings: 'FILL' 1; }
        .qb-sub-title { flex: 1 1 auto; min-width: 0; font-weight: 700; line-height: 1.4; }
        .qb-sub-arrow {
            flex: 0 0 auto;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: color-mix(in srgb, var(--tone) 12%, transparent);
            color: var(--tone);
            transition: background .18s, color .18s, transform .18s;
        }
        .qb-sub-arrow .material-symbols-outlined { font-size: 18px; }
        .qb-sub-row:hover .qb-sub-arrow { background: var(--tone); color: #fff; transform: translateX(3px); }

/* ---- question-bank/year: title + exam date inside a sub-row ---- */
        .qb-sub-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
        .qb-sub-body .qb-sub-title { flex: none; }
        .qb-sub-sub {
            display: inline-flex;
            align-items: center;
            align-self: flex-start;
            padding: 1px 10px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            color: var(--tone);
            background: color-mix(in srgb, var(--tone) 12%, transparent);
        }
