/* ==========================================================================
   EXAMS — PAGE-SPECIFIC STYLES
   Shared base/reveal: /assets/css/base.css
   Shared navbar/footer/mobile shell: /assets/css/nav-footer.css
   ========================================================================== */

/* ── PAGE BACKGROUND ── */


/* ── WRAPPER ── */
.exam-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 130px 28px 120px;
    position: relative;
    z-index: 1;
}

/* dot-grid texture */
.exam-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 750px;
    background-image: radial-gradient(rgba(33, 40, 66, .22) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .11;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    pointer-events: none;
}

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.exam-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    margin-bottom: 40px;
}

/* ── Hero Left ── */
.hero-left {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(33, 40, 66, .06);
    color: #212842;
    padding: 9px 18px;
    border-radius: 100px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border: 1px solid rgba(33, 40, 66, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
    width: fit-content;
}

.hero-badge-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #212842;
    flex-shrink: 0;
}

.hero-title {
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    font-weight: 800;
    letter-spacing: -2.5px;
    line-height: 1.06;
    color: #212842;
    margin: 0;
}

.hero-title-accent {
    color: #212842;
}

.hero-desc {
    font-size: .97rem;
    color: rgba(33, 40, 66, .52);
    line-height: 1.8;
    max-width: 440px;
    margin: 0;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 28px;
    border-radius: 100px;
    background: linear-gradient(135deg, #212842 0%, #3a3f6e 100%);
    color: #fff;
    font-family: inherit;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(33, 40, 66, .3);
    transition: all .28s ease;
}

.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(33, 40, 66, .42);
}

.hero-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 100px;
    border: 1.5px solid rgba(33, 40, 66, .16);
    color: #212842;
    font-family: inherit;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(33, 40, 66, .03);
    cursor: pointer;
    transition: all .25s ease;
}

.hero-btn-ghost:hover {
    border-color: #212842;
    background: rgba(33, 40, 66, .07);
    transform: translateY(-2px);
}

/* ── Hero Right: 3D Glassmorphism Cards ── */
.hero-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    perspective: 1000px;
}

/* The base glass card */
.glass-card {
    position: relative;
    border-radius: 24px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    cursor: default;
    transition: transform .35s cubic-bezier(.22, .68, 0, 1.2), box-shadow .35s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Stagger the second card in each column downward for a cascading look */
.glass-card:nth-child(2) {
    margin-top: 22px;
}

.glass-card:nth-child(4) {
    margin-top: 22px;
}

.glass-card:hover {
    transform: translateY(-8px) rotateX(4deg) rotateY(-2deg) scale(1.02);
}

/* Reflective shine sweep overlay */
.gc-shine {
    position: absolute;
    top: -40%;
    left: -60%;
    width: 60%;
    height: 200%;
    background: linear-gradient(105deg,
            transparent 40%,
            rgba(255, 255, 255, .25) 50%,
            transparent 60%);
    transform: skewX(-15deg);
    pointer-events: none;
    transition: left .6s ease;
    z-index: 2;
}

.glass-card:hover .gc-shine {
    left: 130%;
}

/* Ambient glow blob */
.gc-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    bottom: -40px;
    right: -30px;
    filter: blur(40px);
    opacity: .45;
    pointer-events: none;
    z-index: 0;
    transition: opacity .4s;
}

.glass-card:hover .gc-glow {
    opacity: .7;
}

/* Icon */
.gc-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
}

/* Body */
.gc-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 3;
}

.gc-num {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.gc-label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .7;
}

/* ── Color Variants — Monochrome Gray ── */
.gc-indigo,
.gc-rose,
.gc-emerald,
.gc-amber {
    background: linear-gradient(145deg,
            rgba(255, 255, 255, .78) 0%,
            rgba(240, 242, 248, .65) 100%);
    border: 1.5px solid rgba(255, 255, 255, .95);
    box-shadow:
        0 8px 32px rgba(33, 40, 66, .1),
        0 1px 0 rgba(255, 255, 255, .9) inset,
        0 -1px 0 rgba(33, 40, 66, .04) inset;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Icon backgrounds — subtle gray shades for depth */
.gc-indigo .gc-icon {
    background: linear-gradient(135deg, #3d4569, #212842);
    color: rgba(255, 255, 255, .92);
    box-shadow: 0 6px 18px rgba(33, 40, 66, .3);
}

.gc-rose .gc-icon {
    background: linear-gradient(135deg, #4a5072, #2d3557);
    color: rgba(255, 255, 255, .92);
    box-shadow: 0 6px 18px rgba(33, 40, 66, .25);
}

.gc-emerald .gc-icon {
    background: linear-gradient(135deg, #5a6080, #363d5e);
    color: rgba(255, 255, 255, .92);
    box-shadow: 0 6px 18px rgba(33, 40, 66, .22);
}

.gc-amber .gc-icon {
    background: linear-gradient(135deg, #6b7296, #424966);
    color: rgba(255, 255, 255, .92);
    box-shadow: 0 6px 18px rgba(33, 40, 66, .2);
}

.gc-indigo .gc-num,
.gc-rose .gc-num,
.gc-emerald .gc-num,
.gc-amber .gc-num {
    color: #212842;
}

.gc-indigo .gc-label,
.gc-rose .gc-label,
.gc-emerald .gc-label,
.gc-amber .gc-label {
    color: rgba(33, 40, 66, .5);
}

.gc-indigo .gc-glow,
.gc-rose .gc-glow,
.gc-emerald .gc-glow,
.gc-amber .gc-glow {
    background: radial-gradient(circle, rgba(33, 40, 66, .12), transparent 70%);
}

/* ═══════════════════════════════════════
   SEARCH SECTION  (full-width, below hero)
═══════════════════════════════════════ */
.hero-search-wrap {
    margin-bottom: 36px;
}

.hero-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, .92);
    border: 1.5px solid rgba(33, 40, 66, .1);
    border-radius: 18px;
    padding: 10px 16px 10px 20px;
    box-shadow: 0 4px 24px rgba(33, 40, 66, .07), inset 0 1px 0 rgba(255, 255, 255, .9);
    transition: border-color .22s ease, box-shadow .22s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 100%;
}

.hero-search-bar:focus-within {
    border-color: #212842;
    box-shadow: 0 4px 28px rgba(33, 40, 66, .12), 0 0 0 4px rgba(33, 40, 66, .06);
}

.hs-icon {
    color: rgba(33, 40, 66, .35);
    font-size: 1rem;
    flex-shrink: 0;
    transition: color .2s;
}

.hero-search-bar:focus-within .hs-icon {
    color: #212842;
}

.hs-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 500;
    color: #212842;
    outline: none;
    padding: 6px 0;
}

.hs-input::placeholder {
    color: rgba(33, 40, 66, .35);
}

.hs-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
    transition: all .22s ease;
    box-shadow: 0 4px 14px rgba(34, 197, 94, .3);
}

.hs-create-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(34, 197, 94, .4);
}


/* ═══════════════════════════════════════
   EXAMS SECTION  (sidebar + grid)
═══════════════════════════════════════ */
.exams-section {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}

/* ── CATEGORY SIDEBAR (folder style) ── */
.cat-sidebar {
    position: sticky;
    top: 100px;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1.5px solid rgba(255, 255, 255, .95);
    border-radius: 20px;
    padding: 16px 12px;
    box-shadow: 0 4px 20px rgba(33, 40, 66, .07);
    overflow: hidden;
}

.cat-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .72rem;
    font-weight: 800;
    color: rgba(33, 40, 66, .45);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 8px 12px;
    border-bottom: 1px solid rgba(33, 40, 66, .06);
    margin-bottom: 8px;
}

.cat-sidebar-title i {
    font-size: .9rem;
}

.cat-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ── Individual folder item ── */
.cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: 100%;
    transition: background .18s ease, transform .18s ease;
    position: relative;
}

.cat-item:hover {
    background: rgba(33, 40, 66, .05);
    transform: translateX(3px);
}

.cat-item.active {
    background: rgba(33, 40, 66, .08);
}

.cat-item.active .cat-label {
    color: #212842;
    font-weight: 700;
}

/* ── Folder icon (Google Drive style) ── */
.cat-folder {
    width: 36px;
    height: 30px;
    position: relative;
    flex-shrink: 0;
    transition: transform .2s ease;
}

.cat-item:hover .cat-folder {
    transform: scale(1.08) translateY(-1px);
}

.cat-item.active .cat-folder {
    transform: scale(1.05);
}

/* Folder tab (top left ear) */
.cat-folder-tab {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 9px;
    border-radius: 3px 3px 0 0;
    background: var(--folder-color, #212842);
    opacity: .85;
    filter: brightness(.85);
}

/* Folder body */
.cat-folder-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 5px);
    border-radius: 0 4px 5px 5px;
    background: var(--folder-color, #212842);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    color: rgba(255, 255, 255, .9);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .15);
    transition: filter .2s ease;
}

.cat-item:hover .cat-folder-body {
    filter: brightness(1.08);
}

/* All-category folder uses brand color */
.cat-folder-all {
    --folder-color: #212842;
}

.cat-folder-all .cat-folder-tab {
    background: #3a4565;
}

.cat-label {
    font-size: .82rem;
    font-weight: 600;
    color: rgba(33, 40, 66, .65);
    flex: 1;
    line-height: 1.2;
    transition: color .18s;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cat-count {
    font-size: .68rem;
    font-weight: 700;
    color: rgba(33, 40, 66, .38);
    background: rgba(33, 40, 66, .06);
    padding: 2px 7px;
    border-radius: 100px;
    flex-shrink: 0;
}

.cat-item.active .cat-count {
    background: rgba(33, 40, 66, .12);
    color: rgba(33, 40, 66, .6);
}

/* ═══════════════════════════════════════
   EXAM GRID  (4 columns)
═══════════════════════════════════════ */
.exam-grid-wrap {
    min-width: 0;
}

.exam-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    align-items: start;
}

/* ═══════════════════════════════════════
   EXAM CARD  (compact xcard style)
═══════════════════════════════════════ */
.xcard {
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid rgba(255, 255, 255, .9);
    box-shadow: 0 4px 20px rgba(33, 40, 66, .07), inset 0 1px 0 rgba(255, 255, 255, .95);
    transition: transform .3s cubic-bezier(.22, .68, 0, 1.2), box-shadow .3s ease;
}

.xcard:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 16px 48px rgba(33, 40, 66, .13), inset 0 1px 0 rgba(255, 255, 255, .95);
}

/* Ambient glow blob */
.xcard-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    top: -50px;
    right: -50px;
    background: radial-gradient(circle, rgba(33, 40, 66, .1), transparent 70%);
    filter: blur(28px);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity .4s;
}

.xglow-amber {
    background: radial-gradient(circle, rgba(245, 158, 11, .15), transparent 70%);
}

.xglow-teal {
    background: radial-gradient(circle, rgba(20, 184, 166, .15), transparent 70%);
}

.xcard:hover .xcard-glow {
    opacity: 1;
}

/* ── Panel (compact header) ── */
.xcard-panel {
    position: relative;
    overflow: hidden;
    padding: 18px 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 130px;
    justify-content: center;
}

.xpanel-navy {
    background: linear-gradient(145deg, #212842 0%, #1a2038 60%, #0f1628 100%);
}

.xpanel-amber {
    background: linear-gradient(145deg, #78400a 0%, #5c3008 60%, #3d1e03 100%);
}

.xpanel-teal {
    background: linear-gradient(145deg, #0c4a45 0%, #093936 60%, #062b29 100%);
}

.xcard-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            rgba(255, 255, 255, .015) 0px,
            rgba(255, 255, 255, .015) 1px,
            transparent 1px,
            transparent 4px);
    pointer-events: none;
    z-index: 1;
}

.xcard-scan::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .04), transparent);
    animation: scanBeam 3.5s ease-in-out infinite;
}

@keyframes scanBeam {
    0% {
        top: -50px;
    }

    100% {
        top: 110%;
    }
}

.xcard-circuit {
    position: absolute;
    inset: 0;
    opacity: .05;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .6) 1px, transparent 1px);
    background-size: 28px 28px;
}

.xcard-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    z-index: 2;
}

.xicon-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .18);
    animation: spinRing 8s linear infinite;
}

.xcard-icon-wrap .xicon-ring:first-child {
    width: 52px;
    height: 52px;
}

.xring-amber {
    border-color: rgba(251, 191, 36, .3);
}

.xring-teal {
    border-color: rgba(45, 212, 191, .3);
}

@keyframes spinRing {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.xbig-icon {
    position: relative;
    z-index: 2;
    font-size: 1.6rem;
    color: rgba(255, 255, 255, .92);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, .25));
}

.xpanel-amber .xbig-icon {
    color: rgba(253, 224, 110, .95);
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, .4));
}

.xpanel-teal .xbig-icon {
    color: rgba(110, 245, 230, .95);
    filter: drop-shadow(0 0 8px rgba(45, 212, 191, .4));
}

.xcard-meta-strip {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 2;
}

.xcard-meta-strip>span {
    font-size: .62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .6);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.xdot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
}

.xdiff {
    padding: 2px 7px;
    border-radius: 100px;
    font-size: .58rem !important;
    font-weight: 700 !important;
    letter-spacing: .4px;
}

.xdiff-easy {
    background: rgba(34, 197, 94, .2);
    color: rgba(134, 239, 172, .9) !important;
}

.xdiff-mid {
    background: rgba(251, 191, 36, .2);
    color: rgba(253, 224, 110, .9) !important;
}

.xdiff-hard {
    background: rgba(239, 68, 68, .2);
    color: rgba(252, 165, 165, .9) !important;
}

/* ── Card Body ── */
.xcard-body {
    padding: 14px 14px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xtags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.xtag {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 100px;
    background: rgba(33, 40, 66, .06);
    color: rgba(33, 40, 66, .5);
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.xcard-title {
    font-size: .88rem;
    font-weight: 800;
    color: #212842;
    line-height: 1.3;
    margin: 0;
    letter-spacing: -.2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.xcard-desc {
    font-size: .74rem;
    color: rgba(33, 40, 66, .46);
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.xprogress-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.xprogress-track {
    height: 4px;
    background: rgba(33, 40, 66, .07);
    border-radius: 100px;
    overflow: hidden;
}

.xprogress-fill {
    height: 100%;
    border-radius: 100px;
}

.xfill-navy {
    background: linear-gradient(90deg, #212842, #3a4a7a);
}

.xfill-amber {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.xfill-teal {
    background: linear-gradient(90deg, #14b8a6, #0891b2);
}

.xprogress-label {
    font-size: .65rem;
    font-weight: 600;
    color: rgba(33, 40, 66, .4);
}

/* ── Card Footer ── */
.xcard-footer {
    padding: 10px 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid rgba(33, 40, 66, .05);
}

.xauthor-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.xavatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .6rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.xav-navy {
    background: linear-gradient(135deg, #212842, #2f3d60);
}

.xav-amber {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.xav-teal {
    background: linear-gradient(135deg, #14b8a6, #2dd4bf);
}

.xauthor-name {
    font-size: .72rem;
    font-weight: 700;
    color: #212842;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.xbtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    height: 32px;
    border-radius: 100px;
    font-family: inherit;
    font-size: .76rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.xbtn-navy {
    background: linear-gradient(135deg, #212842, #3a4a7a);
    color: #fff;
    box-shadow: 0 3px 10px rgba(33, 40, 66, .3);
}

.xbtn-amber {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 3px 10px rgba(245, 158, 11, .35);
}

.xbtn-teal {
    background: linear-gradient(135deg, #14b8a6, #0891b2);
    color: #fff;
    box-shadow: 0 3px 10px rgba(20, 184, 166, .35);
}

.xbtn-navy:hover,
.xbtn-amber:hover,
.xbtn-teal:hover {
    transform: translateY(-2px) scale(1.04);
    filter: brightness(1.08);
}

/* ── No Results ── */
.exam-no-results {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 60px 20px;
    text-align: center;
    background: rgba(255, 255, 255, .6);
    border-radius: 20px;
    border: 2px dashed rgba(33, 40, 66, .1);
}

.exam-no-results i {
    font-size: 2.4rem;
    color: rgba(33, 40, 66, .18);
}

.exam-no-results p {
    font-size: .9rem;
    font-weight: 600;
    color: rgba(33, 40, 66, .36);
}

/* ── Load More ── */
.load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 24px 0 0;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 100px;
    border: 1.5px solid rgba(33, 40, 66, .14);
    background: rgba(255, 255, 255, .85);
    color: rgba(33, 40, 66, .6);
    font-family: inherit;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .22s ease;
    box-shadow: 0 2px 10px rgba(33, 40, 66, .06);
    backdrop-filter: blur(12px);
}

.load-more-btn:hover {
    border-color: #212842;
    color: #212842;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(33, 40, 66, .12);
}

#loadMoreCount {
    color: rgba(33, 40, 66, .38);
    font-weight: 600;
}

/* ══════════════════════════════════════
   LOGIN / PAID MODALS
══════════════════════════════════════ */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 13, 28, .5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all .3s ease;
}

.login-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    background: #fff;
    border-radius: 26px;
    padding: 44px 38px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    transform: translateY(20px) scale(.96);
    transition: transform .35s cubic-bezier(.22, .68, 0, 1.2);
    box-shadow: 0 32px 80px rgba(10, 13, 28, .22);
}

.login-modal-overlay.open .login-modal {
    transform: translateY(0) scale(1);
}

.modal-icon-wrap {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, #212842, #3a4a7a);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: rgba(255, 255, 255, .9);
    margin: 0 auto 22px;
    box-shadow: 0 10px 28px rgba(33, 40, 66, .28);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    background: rgba(33, 40, 66, .06);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(33, 40, 66, .4);
    font-size: .95rem;
    transition: all .2s ease;
}

.modal-close-btn:hover {
    background: rgba(33, 40, 66, .1);
    color: #212842;
}

.login-modal h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #212842;
    margin: 0 0 10px;
    letter-spacing: -.4px;
}

.login-modal p {
    font-size: .88rem;
    color: rgba(33, 40, 66, .5);
    line-height: 1.65;
    margin: 0 0 26px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.modal-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 100px;
    background: linear-gradient(135deg, #212842, #3a4a7a);
    color: #fff;
    font-family: inherit;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .25s ease;
    box-shadow: 0 6px 18px rgba(33, 40, 66, .26);
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(33, 40, 66, .36);
}

.modal-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 100px;
    border: 1.5px solid rgba(33, 40, 66, .12);
    background: transparent;
    color: rgba(33, 40, 66, .55);
    font-family: inherit;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .22s ease;
}

.modal-btn-secondary:hover {
    border-color: rgba(33, 40, 66, .25);
    color: #212842;
    background: rgba(33, 40, 66, .03);
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
/* 3 columns on medium screens */
@media (max-width: 1200px) {
    .exam-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .exams-section {
        grid-template-columns: 200px 1fr;
    }
}

/* 2 columns on tablet */
@media (max-width: 960px) {
    .exam-hero {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .exam-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .exams-section {
        grid-template-columns: 1fr;
    }

    .cat-sidebar {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0;
        padding: 12px 14px;
        overflow-x: auto;
        border-radius: 16px;
    }

    .cat-sidebar-title {
        display: none;
    }

    .cat-nav {
        flex-direction: row;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .cat-item {
        flex-direction: column;
        gap: 4px;
        padding: 8px 10px;
        min-width: 60px;
        align-items: center;
    }

    .cat-item:hover {
        transform: translateY(-2px);
    }

    .cat-count {
        display: none;
    }

    .cat-label {
        font-size: .65rem;
        text-align: center;
    }

    .cat-folder {
        width: 30px;
        height: 25px;
    }
}

/* 1 column on mobile */
@media (max-width: 600px) {
    .exam-wrapper {
        padding: 110px 14px 80px;
    }

    .exam-hero {
        gap: 28px;
    }

    .hero-right {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .glass-card {
        padding: 16px 14px;
    }

    .gc-num {
        font-size: 1.3rem;
    }

    .exam-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .hero-btn-primary,
    .hero-actions .hero-btn-ghost {
        width: 100%;
        justify-content: center;
    }

    .login-modal {
        padding: 32px 20px;
    }
}

@media (max-width: 400px) {
    .exam-grid {
        grid-template-columns: 1fr;
    }

    .hero-right {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   ADMIN DRAFTS
   ============================================================ */

.hs-draft-btn {
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid rgba(33, 40, 66, .12);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    color: #212842;
    background: rgba(33, 40, 66, .045);
    font-family: inherit;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform .2s ease,
        background .2s ease,
        border-color .2s ease;
}

.hs-draft-btn:hover {
    transform: translateY(-1px);
    background: rgba(33, 40, 66, .08);
    border-color: rgba(33, 40, 66, .20);
}

.hs-draft-btn span {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #212842;
    font-size: .62rem;
}

.draft-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    background: rgba(10, 13, 28, .52);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.draft-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.draft-modal {
    width: min(760px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: #f8f9fc;
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: 0 30px 90px rgba(10, 13, 28, .26);
    transform: translateY(18px) scale(.97);
    transition: transform .3s cubic-bezier(.22, .68, 0, 1.2);
}

.draft-modal-overlay.open .draft-modal {
    transform: translateY(0) scale(1);
}

.draft-modal-head {
    padding: 3px 3px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(33, 40, 66, .07);
}

.draft-modal-kicker {
    display: block;
    color: rgba(33, 40, 66, .38);
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.draft-modal-head h2 {
    margin: 3px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #212842;
    font-size: 1.18rem;
    letter-spacing: -.03em;
}

.draft-modal-head p {
    margin: 5px 0 0;
    color: rgba(33, 40, 66, .48);
    font-size: .72rem;
}

.draft-modal-close {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: none;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(33, 40, 66, .48);
    background: rgba(33, 40, 66, .055);
    cursor: pointer;
}

.draft-modal-close:hover {
    color: #fff;
    background: #212842;
}

.draft-list {
    min-height: 150px;
    padding: 14px 2px 2px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.draft-item {
    padding: 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    border-radius: 15px;
    background: #fff;
    border: 1px solid rgba(33, 40, 66, .075);
    box-shadow: 0 4px 16px rgba(33, 40, 66, .045);
}

.draft-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #5967e8;
    background: rgba(89, 103, 232, .09);
    font-size: .88rem;
}

.draft-item-content {
    min-width: 0;
}

.draft-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.draft-item-title-row h3 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #212842;
    font-size: .82rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.draft-status {
    min-height: 22px;
    padding: 4px 7px;
    border-radius: 7px;
    color: #a26710;
    background: rgba(216, 146, 32, .10);
    font-size: .53rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.draft-meta {
    margin-top: 5px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.draft-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(33, 40, 66, .43);
    font-size: .58rem;
    font-weight: 600;
}

.draft-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.draft-continue-btn {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    background: linear-gradient(135deg, #212842, #3a4565);
    font-size: .62rem;
    font-weight: 700;
    text-decoration: none;
}

.draft-delete-btn {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(223, 75, 95, .13);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cf4256;
    background: rgba(223, 75, 95, .07);
    cursor: pointer;
}

.draft-delete-btn:hover {
    color: #fff;
    background: #df4b5f;
}

.draft-empty {
    min-height: 210px;
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.draft-empty > span {
    width: 54px;
    height: 54px;
    margin-bottom: 11px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(33, 40, 66, .38);
    background: rgba(33, 40, 66, .055);
}

.draft-empty h3 {
    margin: 0;
    color: #212842;
    font-size: .86rem;
}

.draft-empty p {
    margin: 4px 0 0;
    color: rgba(33, 40, 66, .43);
    font-size: .66rem;
}

@media (max-width: 700px) {
    .hero-search-bar {
        flex-wrap: wrap;
    }

    .hs-input {
        min-width: 180px;
    }

    .hs-draft-btn,
    .hs-create-btn {
        flex: 1;
        justify-content: center;
    }

    .draft-modal {
        padding: 15px;
        border-radius: 19px;
    }

    .draft-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .draft-item-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}


/* ==========================================================================
   EXAMS MOBILE EXPERIENCE V1
   Desktop styles remain unchanged.
   ========================================================================== */

@media (max-width: 768px) {

    /* ----------------------------------------------------------------------
       PAGE / WRAPPER
       ---------------------------------------------------------------------- */

    

    .exam-wrapper {
        width: 100%;
        max-width: none;
        padding:
            96px
            12px
            calc(56px + env(safe-area-inset-bottom));
    }

    .exam-wrapper::before {
        height: 520px;
        background-size: 22px 22px;
        opacity: .075;
    }

    /* ----------------------------------------------------------------------
       HERO
       ---------------------------------------------------------------------- */

    .exam-hero {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }

    .hero-left {
        gap: 13px;
        text-align: left;
    }

    .hero-badge {
        padding: 6px 11px;
        gap: 7px;
        font-size: .54rem;
        letter-spacing: 1.6px;
    }

    .hero-title {
        font-size: clamp(2rem, 11vw, 3rem);
        line-height: .98;
        letter-spacing: -1.8px;
    }

    .hero-desc {
        max-width: 100%;
        font-size: .82rem;
        line-height: 1.58;
    }

    .hero-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .hero-actions .hero-btn-primary,
    .hero-actions .hero-btn-ghost {
        width: 100%;
        min-height: 44px;
        padding: 10px 11px;
        justify-content: center;
        border-radius: 13px;
        font-size: .72rem;
    }

    /* ----------------------------------------------------------------------
       HERO STATS — balanced 2x2
       ---------------------------------------------------------------------- */

    .hero-right {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        perspective: none;
    }

    .glass-card,
    .glass-card:nth-child(2),
    .glass-card:nth-child(4) {
        min-width: 0;
        min-height: 92px;
        margin-top: 0;
        padding: 12px;
        gap: 8px;
        border-radius: 15px;
        transform: none;
    }

    .glass-card:hover {
        transform: none;
    }

    .gc-shine {
        display: none;
    }

    .gc-glow {
        width: 90px;
        height: 90px;
        filter: blur(26px);
    }

    .gc-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: .87rem;
    }

    .gc-body {
        gap: 2px;
    }

    .gc-num {
        font-size: 1.15rem;
        letter-spacing: -.5px;
    }

    .gc-label {
        font-size: .53rem;
        letter-spacing: .55px;
    }

    /* ----------------------------------------------------------------------
       SEARCH / ADMIN ACTIONS
       ---------------------------------------------------------------------- */

    .hero-search-wrap {
        margin-bottom: 16px;
    }

    .hero-search-bar {
        padding: 8px;
        gap: 7px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        border-radius: 14px;
    }

    .hs-icon {
        margin-left: 3px;
        font-size: .82rem;
    }

    .hs-input {
        width: 100%;
        min-width: 0;
        padding: 7px 2px;
        font-size: .82rem;
    }

    .hs-draft-btn,
    .hs-create-btn {
        min-width: 0;
        min-height: 39px;
        padding: 8px 10px;
        justify-content: center;
        border-radius: 10px;
        font-size: .67rem;
    }

    .hs-draft-btn {
        grid-column: 1;
        width: 100%;
    }

    .hs-create-btn {
        grid-column: 2;
        width: 100%;
    }

    .hs-draft-btn span {
        min-width: 18px;
        height: 18px;
        padding-inline: 5px;
        font-size: .53rem;
    }

    /* ----------------------------------------------------------------------
       EXAMS SECTION
       ---------------------------------------------------------------------- */

    .exams-section {
        display: block;
    }

    /* ----------------------------------------------------------------------
       CATEGORY STRIP
       ---------------------------------------------------------------------- */

    .cat-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 12px;
        padding: 8px;
        overflow: hidden;
        border-radius: 14px;
        background: rgba(255, 255, 255, .90);
    }

    .cat-sidebar-title {
        display: none;
    }

    .cat-nav {
        width: 100%;
        padding-bottom: 2px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .cat-nav::-webkit-scrollbar {
        display: none;
    }

    .cat-item {
        flex: 0 0 auto;
        min-width: 72px;
        min-height: 58px;
        padding: 7px 8px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        scroll-snap-align: start;
        border-radius: 11px;
    }

    .cat-item:hover {
        transform: none;
    }

    .cat-folder {
        width: 27px;
        height: 23px;
    }

    .cat-label {
        max-width: 86px;
        font-size: .56rem;
        text-align: center;
        line-height: 1.15;
    }

    .cat-count {
        display: none;
    }

    /* ----------------------------------------------------------------------
       EXAM GRID — one readable card per row on phones
       ---------------------------------------------------------------------- */

    .exam-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .xcard {
        width: 100%;
        min-width: 0;
        border-radius: 15px;
        box-shadow:
            0 5px 18px rgba(33, 40, 66, .065),
            inset 0 1px 0 rgba(255, 255, 255, .95);
    }

    .xcard:hover {
        transform: none;
    }

    .xcard-panel {
        min-height: 100px;
        padding: 14px 12px 10px;
        gap: 8px;
    }

    .xcard-icon-wrap {
        width: 46px;
        height: 46px;
    }

    .xcard-icon-wrap .xicon-ring:first-child {
        width: 44px;
        height: 44px;
    }

    .xbig-icon {
        font-size: 1.28rem;
    }

    .xcard-meta-strip {
        gap: 5px;
    }

    .xcard-meta-strip > span {
        font-size: .55rem;
    }

    .xdiff {
        padding: 2px 5px;
        font-size: .51rem !important;
    }

    .xtype-badge {
        top: 9px !important;
        right: 9px !important;
        padding: 3px 7px !important;
        font-size: .53rem !important;
    }

    .xcard-body {
        padding: 11px 12px 9px;
        gap: 6px;
    }

    .xtags {
        gap: 3px;
    }

    .xtag {
        padding: 2px 6px;
        font-size: .51rem;
        letter-spacing: .35px;
    }

    .xcard-title {
        font-size: .83rem;
        line-height: 1.28;
    }

    .xcard-desc {
        font-size: .67rem;
        line-height: 1.48;
        -webkit-line-clamp: 2;
    }

    .xprogress-row {
        gap: 4px;
    }

    .xprogress-label {
        font-size: .57rem;
    }

    .xcard-footer {
        min-width: 0;
        padding: 9px 11px 11px;
        gap: 6px;
    }

    .xauthor-row {
        min-width: 0;
        gap: 6px;
    }

    .xavatar {
        width: 27px;
        height: 27px;
        border-radius: 7px;
    }

    .xauthor-name {
        max-width: 96px;
        font-size: .63rem;
    }

    .xcard-footer > div:last-child {
        flex-shrink: 0;
        gap: 5px !important;
    }

    .xbtn {
        height: 32px;
        padding-inline: 10px !important;
        border-radius: 9px !important;
        font-size: .65rem !important;
    }

    .xcard-footer a.xbtn[style*="width:34px"] {
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
    }

    /* ----------------------------------------------------------------------
       LOAD MORE / EMPTY
       ---------------------------------------------------------------------- */

    .load-more-wrap {
        padding-top: 15px;
    }

    .load-more-btn {
        min-height: 42px;
        padding: 9px 16px;
        border-radius: 11px;
        font-size: .70rem;
    }

    .exam-no-results {
        padding: 35px 14px;
        border-radius: 14px;
    }

    .exam-no-results i {
        font-size: 1.65rem;
    }

    .exam-no-results p {
        font-size: .75rem;
    }

    /* ----------------------------------------------------------------------
       LOGIN / PAID MODAL — bottom sheet
       ---------------------------------------------------------------------- */

    .login-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .login-modal {
        width: 100%;
        max-width: none;
        max-height: 88dvh;
        overflow-y: auto;
        padding:
            26px
            17px
            calc(17px + env(safe-area-inset-bottom));
        border-radius: 22px 22px 0 0;
        transform: translateY(28px);
    }

    .login-modal-overlay.open .login-modal {
        transform: translateY(0);
    }

    .modal-icon-wrap {
        width: 50px;
        height: 50px;
        margin-bottom: 14px;
        border-radius: 14px;
        font-size: 1.15rem;
    }

    .modal-close-btn {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .login-modal h2 {
        font-size: 1.15rem;
    }

    .login-modal p {
        margin-bottom: 18px;
        font-size: .76rem;
    }

    .modal-actions {
        gap: 7px;
    }

    .modal-btn-primary,
    .modal-btn-secondary {
        min-height: 44px;
        padding: 10px 12px;
        border-radius: 11px;
        font-size: .72rem;
    }

    /* ----------------------------------------------------------------------
       DRAFT MODAL — mobile bottom sheet
       ---------------------------------------------------------------------- */

    .draft-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .draft-modal {
        width: 100%;
        max-height: 88dvh;
        padding:
            15px
            12px
            calc(12px + env(safe-area-inset-bottom));
        border-radius: 22px 22px 0 0;
        transform: translateY(28px);
    }

    .draft-modal-overlay.open .draft-modal {
        transform: translateY(0);
    }

    .draft-modal-head {
        padding-bottom: 11px;
    }

    .draft-modal-kicker {
        font-size: .49rem;
    }

    .draft-modal-head h2 {
        font-size: .96rem;
    }

    .draft-modal-head p {
        font-size: .62rem;
    }

    .draft-modal-close {
        width: 34px;
        height: 34px;
    }

    .draft-list {
        padding-top: 9px;
        gap: 7px;
    }

    .draft-item {
        padding: 9px;
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 8px;
        border-radius: 12px;
    }

    .draft-item-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: .72rem;
    }

    .draft-item-title-row {
        gap: 5px;
    }

    .draft-item-title-row h3 {
        font-size: .70rem;
    }

    .draft-status {
        min-height: 19px;
        padding: 3px 5px;
        font-size: .45rem;
    }

    .draft-meta {
        margin-top: 4px;
        gap: 5px;
    }

    .draft-meta span {
        font-size: .49rem;
    }

    .draft-item-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        gap: 5px;
    }

    .draft-continue-btn {
        min-height: 32px;
        padding: 6px 9px;
        border-radius: 9px;
        font-size: .56rem;
    }

    .draft-delete-btn {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .draft-empty {
        min-height: 170px;
        padding: 22px 12px;
    }
}


/* ==========================================================================
   SMALL PHONES
   ========================================================================== */

@media (max-width: 430px) {

    .exam-wrapper {
        padding-inline: 9px;
    }

    .hero-title {
        font-size: clamp(1.85rem, 12vw, 2.55rem);
    }

    .hero-actions {
        grid-template-columns: 1fr;
    }

    .hero-right {
        gap: 7px;
    }

    .glass-card {
        min-height: 86px;
        padding: 10px;
    }

    .gc-icon {
        width: 32px;
        height: 32px;
    }

    .gc-num {
        font-size: 1.05rem;
    }

    .gc-label {
        font-size: .49rem;
    }

    .cat-item {
        min-width: 66px;
    }

    .xcard-footer {
        align-items: flex-end;
    }

    .xauthor-name {
        max-width: 76px;
    }
}


/* ==========================================================================
   VERY SMALL PHONES
   ========================================================================== */

@media (max-width: 360px) {

    .hero-right {
        grid-template-columns: 1fr;
    }

    .glass-card {
        min-height: 74px;
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        align-items: center;
    }

    .gc-body {
        justify-content: center;
    }

    .hero-search-bar {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .hs-draft-btn,
    .hs-create-btn {
        grid-column: 1 / -1;
    }

    .xcard-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .xauthor-row {
        width: 100%;
    }

    .xcard-footer > div:last-child {
        width: 100%;
    }

    .xcard-footer > div:last-child .xbtn {
        flex: 1;
        justify-content: center;
    }
}


/* ==========================================================================
   LANDSCAPE PHONES
   ========================================================================== */

@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {

    .exam-wrapper {
        padding-top: 82px;
    }

    .exam-hero {
        grid-template-columns: 1.1fr .9fr;
        gap: 14px;
    }

    .hero-right {
        grid-template-columns: repeat(2, 1fr);
    }

    .glass-card {
        min-height: 76px;
    }

    .exam-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ==========================================================================
   EXAMS MOBILE V2 — PAGE CONTENT
   Shared mobile navigation is intentionally defined in nav-footer.css.
   ========================================================================== */


@media (max-width: 768px) {

    :root {
        --exam-mobile-pad: 12px;
        --exam-mobile-surface: rgba(255, 255, 255, .95);
        --exam-mobile-border: rgba(33, 40, 66, .08);
        --exam-mobile-shadow: 0 8px 24px rgba(33, 40, 66, .075);
    }

    

    body {
        
        
        
        
        
        background:
            radial-gradient(circle at 100% 0%, rgba(89, 103, 232, .07), transparent 26%),
            linear-gradient(180deg, #f8f9fc 0%, #f1f3f8 56%, #eceff5 100%);
    }

    

    /* ------------------------------------------------------------------
       MOBILE TOP BAR
       ------------------------------------------------------------------ */

    

    

    

    

    

    

    

    /* ------------------------------------------------------------------
       BOTTOM NAV
       ------------------------------------------------------------------ */

    

    

    

    

    /* ------------------------------------------------------------------
       PROFILE SHEET
       ------------------------------------------------------------------ */

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    /* ------------------------------------------------------------------
       PAGE SHELL
       ------------------------------------------------------------------ */

    .exam-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding:
            calc(80px + env(safe-area-inset-top))
            var(--exam-mobile-pad)
            28px;
        overflow: hidden;
    }

    .exam-wrapper::before {
        height: 470px;
        background-size: 22px 22px;
        opacity: .065;
    }

    /* ------------------------------------------------------------------
       HERO
       ------------------------------------------------------------------ */

    .exam-hero {
        width: 100%;
        margin-bottom: 17px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .hero-left {
        width: 100%;
        min-width: 0;
        gap: 11px;
    }

    .hero-badge {
        padding: 5px 9px;
        gap: 6px;
        border-radius: 9px;
        font-size: .49rem;
        letter-spacing: 1.2px;
    }

    .hero-title {
        max-width: 100%;
        font-size: clamp(2rem, 10.5vw, 2.9rem);
        line-height: .98;
        letter-spacing: -1.7px;
        overflow-wrap: anywhere;
    }

    .hero-desc {
        max-width: 100%;
        font-size: .76rem;
        line-height: 1.53;
    }

    .hero-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .hero-actions .hero-btn-primary,
    .hero-actions .hero-btn-ghost {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 9px 8px;
        justify-content: center;
        border-radius: 11px;
        font-size: .65rem;
        white-space: nowrap;
    }

    /* Stats become compact 2x2 information tiles */
    .hero-right {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        perspective: none;
    }

    .glass-card,
    .glass-card:nth-child(2),
    .glass-card:nth-child(4) {
        min-width: 0;
        min-height: 78px;
        margin: 0;
        padding: 10px;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        border-radius: 13px;
        transform: none;
        box-shadow: 0 5px 16px rgba(33, 40, 66, .055);
    }

    .glass-card:hover {
        transform: none;
    }

    .gc-shine {
        display: none;
    }

    .gc-glow {
        width: 76px;
        height: 76px;
        filter: blur(22px);
    }

    .gc-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: .78rem;
    }

    .gc-body {
        min-width: 0;
        gap: 1px;
    }

    .gc-num {
        font-size: 1rem;
        letter-spacing: -.4px;
    }

    .gc-label {
        font-size: .48rem;
        letter-spacing: .45px;
        line-height: 1.2;
    }

    /* ------------------------------------------------------------------
       SEARCH / ADMIN ACTIONS
       ------------------------------------------------------------------ */

    .hero-search-wrap {
        margin-bottom: 11px;
    }

    .hero-search-bar {
        width: 100%;
        padding: 7px;
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 4px;
        border-radius: 13px;
    }

    .hs-icon {
        width: 30px;
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: .72rem;
    }

    .hs-input {
        width: 100%;
        min-width: 0 !important;
        padding: 7px 1px;
        font-size: .76rem;
    }

    .hs-draft-btn,
    .hs-create-btn {
        width: 100%;
        min-width: 0;
        min-height: 38px;
        padding: 8px 9px;
        justify-content: center;
        border-radius: 10px;
        font-size: .62rem;
    }

    .hs-draft-btn {
        grid-column: 1 / 2;
    }

    .hs-create-btn {
        grid-column: 2 / 3;
    }

    .hs-draft-btn span {
        min-width: 18px;
        height: 18px;
        font-size: .49rem;
    }

    /* ------------------------------------------------------------------
       CATEGORIES
       ------------------------------------------------------------------ */

    .exams-section {
        width: 100%;
        display: block;
    }

    .cat-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 9px;
        padding: 7px;
        overflow: hidden;
        border-radius: 13px;
        background: rgba(255, 255, 255, .91);
        box-shadow: 0 5px 16px rgba(33, 40, 66, .045);
    }

    .cat-sidebar-title {
        display: none;
    }

    .cat-nav {
        width: 100%;
        padding: 0 0 2px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 5px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .cat-nav::-webkit-scrollbar {
        display: none;
    }

    .cat-item {
        flex: 0 0 auto;
        width: auto;
        min-width: 64px;
        min-height: 54px;
        padding: 6px 7px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3px;
        scroll-snap-align: start;
        border-radius: 10px;
    }

    .cat-item:hover {
        transform: none;
    }

    .cat-folder {
        width: 25px;
        height: 21px;
    }

    .cat-folder-tab {
        height: 7px;
    }

    .cat-folder-body {
        font-size: .55rem;
    }

    .cat-label {
        max-width: 78px;
        font-size: .51rem;
        text-align: center;
        line-height: 1.1;
    }

    .cat-count {
        display: none;
    }

    /* ------------------------------------------------------------------
       EXAM CARDS
       ------------------------------------------------------------------ */

    .exam-grid-wrap,
    .exam-grid {
        width: 100%;
        min-width: 0;
    }

    .exam-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .xcard {
        width: 100%;
        min-width: 0;
        display: grid !important;
        grid-template-columns: 104px minmax(0, 1fr);
        grid-template-rows: auto auto;
        grid-template-areas:
            "panel body"
            "footer footer";
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 5px 16px rgba(33, 40, 66, .055);
    }

    .xcard:hover {
        transform: none;
    }

    .xcard-panel {
        grid-area: panel;
        min-height: 142px;
        height: 100%;
        padding: 14px 8px;
        gap: 8px;
        justify-content: center;
    }

    .xcard-scan::after {
        animation: none;
    }

    .xcard-icon-wrap {
        width: 43px;
        height: 43px;
    }

    .xcard-icon-wrap .xicon-ring:first-child {
        width: 41px;
        height: 41px;
    }

    .xicon-ring {
        animation: none;
    }

    .xbig-icon {
        font-size: 1.15rem;
    }

    .xcard-meta-strip {
        flex-direction: column;
        gap: 3px;
    }

    .xcard-meta-strip > span {
        font-size: .49rem;
    }

    .xcard-meta-strip .xdot {
        display: none;
    }

    .xdiff {
        padding: 2px 5px;
        font-size: .46rem !important;
    }

    .xtype-badge {
        top: 7px !important;
        right: 7px !important;
        padding: 3px 6px !important;
        border-radius: 7px !important;
        font-size: .47rem !important;
    }

    .xcard-body {
        grid-area: body;
        min-width: 0;
        padding: 12px 10px 9px;
        gap: 5px;
    }

    .xtags {
        gap: 3px;
    }

    .xtag {
        max-width: 100%;
        padding: 2px 5px;
        overflow: hidden;
        border-radius: 6px;
        font-size: .46rem;
        letter-spacing: .2px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .xcard-title {
        font-size: .78rem;
        line-height: 1.24;
        -webkit-line-clamp: 2;
    }

    .xcard-desc {
        font-size: .59rem;
        line-height: 1.42;
        -webkit-line-clamp: 3;
    }

    .xprogress-row {
        margin-top: auto;
        gap: 3px;
    }

    .xprogress-track {
        height: 3px;
    }

    .xprogress-label {
        font-size: .51rem;
    }

    .xcard-footer {
        grid-area: footer;
        width: 100%;
        min-width: 0;
        padding: 8px 9px 9px;
        gap: 6px;
    }

    .xauthor-row {
        min-width: 0;
        gap: 5px;
    }

    .xavatar {
        width: 25px;
        height: 25px;
        border-radius: 7px;
        font-size: .52rem;
    }

    .xauthor-name {
        max-width: 92px;
        font-size: .58rem;
    }

    .xcard-footer > div:last-child {
        min-width: 0;
        flex-shrink: 0;
        gap: 5px !important;
    }

    .xbtn {
        min-width: 0;
        height: 31px;
        padding-inline: 9px !important;
        border-radius: 8px !important;
        font-size: .58rem !important;
    }

    .xcard-footer a.xbtn[style*="width:34px"] {
        width: 31px !important;
        height: 31px !important;
        padding: 0 !important;
    }

    /* ------------------------------------------------------------------
       LOAD MORE / EMPTY
       ------------------------------------------------------------------ */

    .load-more-wrap {
        padding-top: 12px;
    }

    .load-more-btn {
        width: 100%;
        min-height: 40px;
        padding: 9px 12px;
        justify-content: center;
        border-radius: 10px;
        font-size: .64rem;
    }

    .exam-no-results {
        padding: 30px 12px;
        gap: 8px;
        border-radius: 13px;
    }

    .exam-no-results i {
        font-size: 1.45rem;
    }

    .exam-no-results p {
        font-size: .67rem;
    }

    /* ------------------------------------------------------------------
       LOGIN / PAID MODALS — bottom sheets
       ------------------------------------------------------------------ */

    .login-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .login-modal {
        width: 100%;
        max-width: none;
        max-height: 88dvh;
        overflow-y: auto;
        padding:
            25px
            16px
            calc(16px + env(safe-area-inset-bottom));
        border-radius: 22px 22px 0 0;
        transform: translateY(30px);
    }

    .login-modal-overlay.open .login-modal {
        transform: translateY(0);
    }

    .modal-icon-wrap {
        width: 48px;
        height: 48px;
        margin-bottom: 13px;
        border-radius: 14px;
        font-size: 1.05rem;
    }

    .modal-close-btn {
        top: 11px;
        right: 11px;
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .login-modal h2 {
        font-size: 1.08rem;
    }

    .login-modal p {
        margin-bottom: 17px;
        font-size: .70rem;
    }

    .modal-actions {
        gap: 6px;
    }

    .modal-btn-primary,
    .modal-btn-secondary {
        min-height: 43px;
        padding: 9px 11px;
        border-radius: 10px;
        font-size: .67rem;
    }

    /* ------------------------------------------------------------------
       DRAFT MODAL — bottom sheet
       ------------------------------------------------------------------ */

    .draft-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .draft-modal {
        width: 100%;
        max-height: 88dvh;
        padding:
            14px
            11px
            calc(12px + env(safe-area-inset-bottom));
        border-radius: 22px 22px 0 0;
        transform: translateY(30px);
    }

    .draft-modal-overlay.open .draft-modal {
        transform: translateY(0);
    }

    .draft-modal-head {
        padding-bottom: 10px;
    }

    .draft-modal-kicker {
        font-size: .46rem;
    }

    .draft-modal-head h2 {
        font-size: .92rem;
    }

    .draft-modal-head p {
        font-size: .58rem;
    }

    .draft-list {
        padding-top: 8px;
        gap: 6px;
    }

    .draft-item {
        padding: 8px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 7px;
        border-radius: 11px;
    }

    .draft-item-icon {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        font-size: .68rem;
    }

    .draft-item-title-row {
        gap: 4px;
    }

    .draft-item-title-row h3 {
        font-size: .66rem;
    }

    .draft-status {
        min-height: 18px;
        padding: 3px 5px;
        font-size: .42rem;
    }

    .draft-meta {
        margin-top: 3px;
        gap: 4px;
    }

    .draft-meta span {
        font-size: .46rem;
    }

    .draft-item-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        gap: 5px;
    }

    .draft-continue-btn {
        min-height: 31px;
        padding: 6px 8px;
        border-radius: 8px;
        font-size: .52rem;
    }

    .draft-delete-btn {
        width: 31px;
        height: 31px;
        border-radius: 8px;
    }

    .draft-empty {
        min-height: 165px;
        padding: 20px 10px;
    }

    /* Footer */
    

    

    
}


@media (max-width: 420px) {

    :root {
        --exam-mobile-pad: 9px;
    }

    

    .hero-title {
        font-size: clamp(1.82rem, 10vw, 2.45rem);
    }

    .hero-actions {
        grid-template-columns: 1fr;
    }

    .xcard {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .xcard-panel {
        min-height: 136px;
        padding-inline: 6px;
    }

    .xcard-desc {
        -webkit-line-clamp: 2;
    }

    .xauthor-name {
        max-width: 74px;
    }
}


@media (max-width: 350px) {

    .hero-right {
        grid-template-columns: 1fr;
    }

    .glass-card {
        min-height: 64px;
    }

    .hero-search-bar {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .hs-draft-btn,
    .hs-create-btn {
        grid-column: 1 / -1;
    }

    .xcard {
        grid-template-columns: 1fr;
        grid-template-areas:
            "panel"
            "body"
            "footer";
    }

    .xcard-panel {
        min-height: 92px;
    }

    .xcard-meta-strip {
        flex-direction: row;
    }

    .xcard-meta-strip .xdot {
        display: inline-block;
    }

    .xcard-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .xauthor-row {
        width: 100%;
    }

    .xcard-footer > div:last-child {
        width: 100%;
    }

    .xcard-footer > div:last-child .xbtn {
        flex: 1;
        justify-content: center;
    }
}
