/* =========================================================
   JAMB CBT Simulator — Stylesheet
   Extracted verbatim from the original single-file build.
   No visual/behavioral changes — same design tokens, layout,
   and responsive rules as before.
   ========================================================= */

        /* ===== DESIGN TOKENS ===== */
        :root {
            --primary: #008751;
            --primary-dark: #005e38;
            --glass: rgba(255,255,255,0.88);
            --shadow: 0 8px 32px 0 rgba(0,135,81,0.16);
            --text: #2d3436;
            --danger: #d63031;
            --warning: #ff7675;
            --muted: #6b7280;
            --panel: rgba(255,255,255,0.94);
            --overlay: rgba(0,70,40,0.95);
            --good: #27ae60;
            --bad: #eb4d4b;
            --flag: #f1c40f;
        }
        body.dark {
            --glass: rgba(13,20,18,0.90);
            --panel: rgba(18,26,24,0.96);
            --text: #f1f5f9;
            --muted: #cbd5e1;
            background: linear-gradient(135deg,#052e1c 0%,#0f172a 100%);
            color: var(--text);
        }

        /* ===== RESET & BASE ===== */
        *, *::before, *::after { box-sizing: border-box; }
        /* NOTE: transition only on targeted elements, NOT * — avoids layout jank */
        body {
            margin: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg,#008751 0%,#e0f2e9 100%);
            background-attachment: fixed;
            color: var(--text);
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* ===== UTILITIES ===== */
        .hidden { display: none !important; }
        .screen-fade { animation: fadeIn .25s ease; }
        @keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
        @keyframes pulse { 50%{opacity:0.65;transform:scale(1.03)} }
        @keyframes slideIn { from{transform:translateX(-100%)} to{transform:translateX(0)} }

        /* ===== FLIP CARD INTRO ===== */
        #intro-screen {
            position: fixed;
            inset: 0;
            background: var(--overlay);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 5000;
            padding: 20px;
            overflow-y: auto;
        }
        .flip-wrapper {
            width: 100%;
            max-width: 680px;
            min-height: 460px;
            perspective: 1200px;
        }
        .flip-inner {
            position: relative;
            width: 100%;
            min-height: 460px;
            transform-style: preserve-3d;
            transition: transform 0.65s cubic-bezier(.4,0,.2,1);
        }
        .flip-inner.flipped { transform: rotateY(180deg); }
        .flip-front, .flip-back {
            position: absolute;
            inset: 0;
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
            background: var(--glass);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255,255,255,0.4);
            border-radius: 22px;
            box-shadow: var(--shadow);
            padding: 36px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .flip-back {
            transform: rotateY(180deg);
            overflow-y: auto;
            text-align: left;
            justify-content: flex-start;
        }
        .flip-logo {
            font-size: 3.2rem;
            margin-bottom: 8px;
        }
        .flip-front h1 { color: var(--primary); margin: 0 0 6px; font-size: 1.8rem; }
        .flip-front p  { color: var(--primary-dark); font-weight: 600; margin: 0 0 18px; }

        /* Dot navigation */
        .flip-dots {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin: 20px 0 0;
        }
        .flip-dot {
            width: 10px; height: 10px;
            border-radius: 50%;
            background: rgba(0,135,81,0.25);
            cursor: pointer;
            transition: background .3s;
        }
        .flip-dot.active { background: var(--primary); }

        /* Card slide container */
        .card-slides {
            width: 100%;
            overflow: hidden;
        }
        .card-slides-track {
            display: flex;
            transition: transform 0.5s cubic-bezier(.4,0,.2,1);
        }
        .card-slide {
            min-width: 100%;
            padding: 0 4px;
        }
        .slide-icon { font-size: 2rem; margin-bottom: 8px; display:block; }
        .slide-title { font-size: 1.1rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 8px; }
        .slide-body  { font-size: 0.95rem; line-height: 1.65; color: var(--text); }

        .flip-nav-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 22px;
            gap: 10px;
            width: 100%;
        }
        .flip-btn {
            padding: 11px 22px;
            border: none;
            border-radius: 12px;
            font-weight: 700;
            cursor: pointer;
            font-size: 0.95rem;
            transition: transform .2s, background .2s;
        }
        .flip-btn:hover { transform: translateY(-1px); }
        .flip-btn-outline {
            background: rgba(0,135,81,0.12);
            color: var(--primary-dark);
            border: 2px solid var(--primary);
        }
        .flip-btn-solid {
            background: var(--primary);
            color: white;
        }
        .flip-btn-solid:hover { background: var(--primary-dark); }
        .flip-btn-skip {
            background: transparent;
            color: var(--muted);
            font-size: 0.88rem;
            padding: 8px 12px;
            border: none;
            cursor: pointer;
        }

        /* ===== OVERLAYS & GLASS CARDS ===== */
        .overlay-screen {
            position: fixed;
            inset: 0;
            background: var(--overlay);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 3000;
            padding: 20px;
            overflow-y: auto;
        }
        .glass-card {
            background: var(--glass);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            border: 1px solid rgba(255,255,255,0.35);
            border-radius: 20px;
            box-shadow: var(--shadow);
            padding: 34px;
            max-width: 720px;
            width: 100%;
            text-align: center;
        }
        .modal-body {
            background: var(--glass);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            border-radius: 20px;
            padding: 24px;
            max-width: 680px;
            width: 100%;
            box-shadow: var(--shadow);
            border: 1px solid rgba(255,255,255,0.35);
        }

        /* ===== LOGIN / START SCREEN ===== */
        .login-input {
            width: 100%;
            padding: 15px;
            margin: 12px 0;
            border: 2px solid #e0e0e0;
            border-radius: 12px;
            font-size: 1.05rem;
            outline: none;
            background: white;
            transition: border-color .2s, box-shadow .2s;
        }
        body.dark .login-input { background: #0f172a; color: white; border-color: #334155; }
        .login-input:focus { border-color: var(--primary); box-shadow: 0 0 8px rgba(0,135,81,0.25); }

        .instruction-wrapper { margin: 16px 0; }
        .btn-instruction {
            width: 100%;
            background: #e0f2e9;
            color: var(--primary-dark);
            border: 2px solid var(--primary);
            text-align: left;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 12px;
            padding: 15px;
            font-size: 1rem;
            cursor: pointer;
            transition: background .2s;
        }
        .btn-instruction:hover { background: #d1ebd9; }
        .instruction-panel {
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            transition: max-height .4s ease, opacity .4s ease;
        }
        .instruction-panel.open { opacity: 1; }
        .instruction-box {
            text-align: left;
            background: rgba(240,253,244,0.92);
            padding: 18px;
            border-radius: 12px;
            border-left: 5px solid var(--primary);
            margin-top: 10px;
            font-size: 0.95rem;
        }
        body.dark .instruction-box { background: rgba(15,23,42,0.86); color: white; }

        /* ===== HEADER ===== */
        header {
            background: var(--primary);
            color: white;
            padding: 12px 4%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 1200;
            box-shadow: 0 4px 10px rgba(0,0,0,0.12);
            gap: 10px;
        }
        .header-left, .header-right {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }
        .icon-btn {
            border: none;
            border-radius: 12px;
            padding: 10px 14px;
            font-weight: 700;
            cursor: pointer;
            background: rgba(255,255,255,0.18);
            color: white;
            transition: transform .2s, background .2s;
        }
        .icon-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.28); }
        .menu-btn { font-size: 1.1rem; min-width: 46px; }
        .pause-chip { background: rgba(0,0,0,0.18); }
        .user-greeting { font-weight: bold; font-size: 1rem; }
        .timer-box {
            font-family: monospace;
            font-size: 1.45rem;
            font-weight: bold;
            background: rgba(0,0,0,0.2);
            padding: 6px 14px;
            border-radius: 10px;
            white-space: nowrap;
        }
        .timer-low { color: var(--warning); animation: pulse 1s infinite; }

        /* ===== EXAM AREA ===== */
        .main-container {
            max-width: 980px;
            margin: 24px auto 40px;
            padding: 0 18px;
        }
        .exam-area {
            background: var(--glass);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            border-radius: 22px;
            padding: 24px;
            box-shadow: var(--shadow);
            border: 1px solid rgba(255,255,255,0.38);
        }

        /* Stats row */
        .stats-row {
            display: grid;
            grid-template-columns: repeat(4,minmax(0,1fr));
            gap: 10px;
            margin-bottom: 16px;
        }
        .stat-card {
            background: var(--panel);
            border: 1px solid rgba(148,163,184,0.15);
            border-radius: 16px;
            padding: 12px;
            text-align: center;
        }
        .stat-card span {
            display: block;
            font-size: 1.25rem;
            font-weight: 800;
            color: var(--primary-dark);
            margin-top: 4px;
        }

        /* Palette */
        .palette-card {
            background: var(--panel);
            padding: 15px;
            border-radius: 16px;
            margin-bottom: 18px;
            border: 1px solid rgba(0,0,0,0.05);
        }
        .palette-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }
        .palette-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill,minmax(42px,1fr));
            gap: 8px;
            max-height: 150px;
            overflow-y: auto;
            padding: 4px;
        }
        .pal-item {
            aspect-ratio: 1;
            border: none;
            border-radius: 8px;
            background: #e5e7eb;
            font-weight: bold;
            cursor: pointer;
            font-size: 0.85rem;
            transition: transform .15s, background .15s;
        }
        .pal-item:hover { background: #d1d5db; transform: translateY(-1px); }
        .pal-item.current { outline: 3px solid #111827; transform: scale(1.08); z-index: 1; }
        .pal-item.answered { background: var(--primary); color: white; }
        .pal-item.flagged  { background: var(--flag); color: #111827; }
        .pal-item.correct  { background: var(--good); color: white; }
        .pal-item.wrong    { background: var(--bad);  color: white; }

        /* Progress bar */
        .progress-wrapper {
            width: 100%;
            height: 10px;
            background: #e5e7eb;
            border-radius: 999px;
            margin: 16px 0 18px;
            overflow: hidden;
        }
        #progress-fill { height: 100%; background: var(--primary); width: 0%; border-radius: 999px; transition: width .3s ease; }

        /* Passage box */
        .passage-box {
            background: var(--panel);
            padding: 18px;
            border-radius: 14px;
            border: 1px solid rgba(0,0,0,0.06);
            border-left: 5px solid var(--primary);
            margin-bottom: 18px;
            max-height: 280px;
            overflow-y: auto;
            line-height: 1.65;
            font-size: 0.95rem;
        }

        /* Question & Options */
        .question-text {
            font-size: 1.15rem;
            font-weight: 700;
            margin-bottom: 16px;
            color: var(--primary-dark);
            line-height: 1.5;
        }
        .options-grid { display: flex; flex-direction: column; gap: 12px; }
        .opt-btn {
            background: var(--panel);
            border: 2px solid #e0e0e0;
            padding: 14px 18px;
            border-radius: 14px;
            cursor: pointer;
            text-align: left;
            font-size: 1rem;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            transition: border-color .2s, background .2s, transform .15s;
        }
        body.dark .opt-btn { border-color: #334155; color: white; }
        .opt-btn:hover:not(:disabled) { border-color: var(--primary); background: #f0fdf4; transform: translateX(4px); }
        body.dark .opt-btn:hover:not(:disabled) { background: rgba(2,44,29,0.9); }
        .opt-btn.selected { background: var(--primary); color: white; border-color: var(--primary-dark); }
        .opt-btn.correct  { background: var(--good) !important; color: white; border-color: #1e8449; }
        .opt-btn.wrong    { background: var(--bad)  !important; color: white; border-color: #c0392b; }

        /* Review explanation box */
        .review-explanation {
            margin-top: 16px;
            padding: 16px;
            border-radius: 14px;
            background: rgba(255,255,255,0.62);
            border: 1px solid rgba(0,0,0,0.06);
        }
        body.dark .review-explanation { background: rgba(15,23,42,0.9); border-color: #334155; }
        .review-explanation strong { color: var(--primary-dark); }

        /* Buttons */
        .btn {
            padding: 12px 18px;
            border: none;
            border-radius: 12px;
            font-weight: 800;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            transition: transform .2s, background .2s;
        }
        .btn:hover { transform: translateY(-1px); }
        .btn-start { background: var(--primary); color: white; padding: 15px 40px; font-size: 1.05rem; width: 100%; }
        .btn-start:hover { background: var(--primary-dark); }
        .btn-nav { min-width: 120px; flex: 1; max-width: 200px; }
        #prev-btn:disabled { background: #cbd5e1; color: #64748b; cursor: not-allowed; opacity: 0.8; }
        #prev-btn:not(:disabled) { background: var(--primary); color: white; }
        #next-btn { background: var(--primary-dark); color: white; }
        .btn-flag   { background: var(--flag); color: #111827; }
        .btn-submit { background: var(--danger); color: white; width: 100%; margin-top: 16px; }
        .btn-submit:hover { background: #c0392b; }
        .nav-controls { display: flex; justify-content: space-between; margin-top: 18px; gap: 10px; flex-wrap: wrap; }

        /* Leaderboard */
        .leaderboard-box {
            background: var(--panel);
            border-radius: 16px;
            padding: 18px;
            margin-top: 18px;
            max-height: 250px;
            overflow-y: auto;
        }
        .leaderboard-list { list-style: none; padding: 0; margin: 0; text-align: left; }
        .leaderboard-item {
            display: flex;
            justify-content: space-between;
            padding: 10px;
            border-bottom: 1px solid rgba(0,0,0,0.08);
            font-size: 1rem;
        }
        .leaderboard-item:last-child { border-bottom: none; }
        .rank-1 { font-weight: bold; color: #f39c12; }
        .rank-2 { font-weight: bold; color: #9ca3af; }
        .rank-3 { font-weight: bold; color: #d35400; }

        /* ===== DRAWER (SIDE MENU) ===== */
        .drawer {
            position: fixed;
            top: 0; left: 0;
            width: 320px;
            max-width: 88vw;
            height: 100vh;
            background: rgba(255,255,255,0.94);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            box-shadow: 10px 0 30px rgba(0,0,0,0.15);
            z-index: 3500;
            transform: translateX(-100%);
            padding: 18px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 0;
        }
        body.dark .drawer { background: rgba(2,6,23,0.96); color: white; }
        .drawer.open { animation: slideIn .25s ease forwards; }
        .drawer h3 { margin-top: 8px; margin-bottom: 4px; }
        .drawer .menu-item {
            display: block;
            width: 100%;
            text-align: left;
            margin: 6px 0;
            padding: 13px 14px;
            border-radius: 14px;
            border: 1px solid rgba(0,0,0,0.08);
            background: rgba(0,135,81,0.08);
            color: inherit;
            cursor: pointer;
            font-weight: 700;
            font-size: 0.97rem;
            transition: transform .2s, background .2s;
            flex-shrink: 0; /* fix: prevent flex squashing */
        }
        .drawer .menu-item:hover { transform: translateX(3px); background: rgba(0,135,81,0.16); }
        .drawer-instructions, .drawer-jamb-guide {
            flex-shrink: 0; /* fix: prevent squashing */
            margin: 0 0 6px 0;
            background: rgba(0,135,81,0.06);
            border: 1px solid transparent;
            border-radius: 14px;
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            padding: 0 14px;
            transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.3s ease;
        }
        body.dark .drawer-instructions.open,
        body.dark .drawer-jamb-guide.open { background: rgba(15,23,42,0.9); border-color: #334155; }
        .drawer-instructions.open, .drawer-jamb-guide.open {
            max-height: 2000px;
            opacity: 1;
            padding: 14px;
            border-color: rgba(0,0,0,0.08);
        }
        .drawer-instructions h4, .drawer-jamb-guide h4 { margin: 0 0 8px; }
        .drawer-instructions ol, .drawer-jamb-guide ul { margin: 4px 0 0; padding-left: 18px; line-height: 1.7; font-size: 0.92rem; }
        .drawer-backdrop {
            position: fixed; inset: 0;
            background: rgba(0,0,0,0.35);
            z-index: 3400;
        }

        /* ===== PAUSE OVERLAY ===== */
        .pause-overlay {
            position: fixed; inset: 0;
            z-index: 3200;
            background: rgba(0,0,0,0.55);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .pause-box {
            background: var(--glass);
            border-radius: 18px;
            padding: 30px 24px;
            width: 100%;
            max-width: 420px;
            text-align: center;
            box-shadow: var(--shadow);
        }

        /* ===== MISC COMPONENTS ===== */
        .compact-note { color: var(--muted); font-size: 0.94rem; line-height: 1.5; }
        .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
        .chip {
            padding: 9px 12px;
            border-radius: 999px;
            border: 1px solid rgba(0,0,0,0.08);
            cursor: pointer;
            background: rgba(0,135,81,0.08);
            font-weight: 700;
            color: var(--text);
            transition: background .2s;
        }
        .chip:hover { background: rgba(0,135,81,0.16); }
        .toast {
            position: fixed;
            right: 16px; bottom: 16px;
            z-index: 4000;
            background: rgba(17,24,39,0.92);
            color: white;
            padding: 12px 16px;
            border-radius: 14px;
            box-shadow: 0 10px 24px rgba(0,0,0,0.16);
            transform: translateY(20px);
            opacity: 0;
            pointer-events: none;
            transition: transform .25s ease, opacity .25s ease;
            max-width: 320px;
            font-size: 0.95rem;
        }
        .toast.show { transform: translateY(0); opacity: 1; }
        body.focus-mode .stats-row,
        body.focus-mode .palette-card,
        body.focus-mode #passage-container { display: none !important; }

        /* Dashboard grid */
        .premium-grid {
            display: grid;
            grid-template-columns: repeat(2,minmax(0,1fr));
            gap: 12px;
            margin-top: 12px;
        }
        .premium-tile {
            background: rgba(0,135,81,0.08);
            border: 1px solid rgba(0,0,0,0.06);
            border-radius: 16px;
            padding: 16px;
            font-size: 0.92rem;
        }
        body.dark .premium-tile { background: rgba(15,23,42,0.9); border-color: #334155; }
        .finder-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
        .finder-row input {
            flex:1; min-width:160px;
            padding: 12px 14px;
            border-radius: 12px;
            border: 1px solid rgba(0,0,0,0.12);
            font-size: 1rem;
        }
        body.dark .finder-row input { background:#0f172a; color:#fff; border-color:#334155; }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 700px) {
            .stats-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
            header { flex-direction: column; align-items: stretch; }
            .header-left, .header-right { justify-content: space-between; }
            .exam-area { padding: 16px; }
            .nav-controls { flex-direction: column; }
            .btn-nav { max-width: 100%; width: 100%; }
            .drawer { width: 88vw; }
            .flip-front, .flip-back { padding: 24px; }
            .flip-wrapper { min-height: 400px; }
            .flip-inner { min-height: 400px; }
        }

/* =========================================================
   PHASE 1.1 — SUBJECT SELECTION (start screen)
   Added for the multi-subject registration flow. Reuses the
   existing color tokens and card language so nothing here
   feels like a redesign — just new components in the same style.
   ========================================================= */
.form-section {
    text-align: left;
    margin: 18px 0;
    padding: 16px;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
}
body.dark .form-section { background: rgba(15,23,42,0.55); border-color: #334155; }
.form-section-title { font-weight: 800; color: var(--primary-dark); margin-bottom: 10px; font-size: 0.98rem; }
body.dark .form-section-title { color: #6ee7b7; }

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.subject-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,0.08);
    background: var(--panel, #fff);
    cursor: pointer;
    text-align: left;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    transition: border-color .18s ease, background .18s ease, transform .12s ease;
}
.subject-card:hover  { border-color: var(--primary); transform: translateY(-1px); }
.subject-card.checked { background: rgba(0,135,81,0.12); border-color: var(--primary); color: var(--primary-dark); }
.subject-card.locked  { cursor: default; background: rgba(0,135,81,0.16); border-color: var(--primary); color: var(--primary-dark); margin-bottom: 10px; }
.subject-card.locked:hover { transform: none; }
body.dark .subject-card { background: #0f172a; border-color: #334155; color: #e2e8f0; }
body.dark .subject-card.checked,
body.dark .subject-card.locked { background: rgba(0,135,81,0.28); border-color: var(--primary); color: #d1fae5; }
.subject-check { font-size: 1.1rem; line-height: 1; }
.subject-name em { font-weight: 400; opacity: 0.75; font-size: 0.85em; }

.selected-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    min-height: 1.4em;
}
.selected-summary-list li {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.92rem;
}
body.dark .selected-summary-list li { color: #6ee7b7; }

.validation-msg { margin: 10px 0 0; font-weight: 700; font-size: 0.9rem; }
.validation-msg.valid   { color: var(--good); }
.validation-msg.invalid { color: var(--danger); }

.btn-start:disabled {
    background: #a3b8ae;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Subject transition banner shown mid-exam at Mode-A subject boundaries */
.subject-banner {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 800;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(0,135,81,0.3);
    animation: subjectBannerIn .35s ease;
}
@keyframes subjectBannerIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Per-subject score breakdown on the result screen */
.subject-breakdown-box {
    text-align: left;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
}
body.dark .subject-breakdown-box { background: rgba(15,23,42,0.55); border-color: #334155; }
.subject-score-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
}
.subject-score-row:last-child { border-bottom: none; }
body.dark .subject-score-row { border-color: #334155; }

/* =========================================================
   UI POLISH — smoother transitions, better focus states,
   more "professional" buttons. Additive only, no redesign.
   ========================================================= */
.btn, .subject-card, .opt-btn, .pal-item, .chip, .menu-item, .btn-instruction {
    transition-timing-function: cubic-bezier(.4,0,.2,1);
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn:focus-visible,
.subject-card:focus-visible,
.opt-btn:focus-visible,
.login-input:focus-visible,
.chip:focus-visible {
    outline: 3px solid rgba(0,135,81,0.45);
    outline-offset: 2px;
}
.btn-start:not(:disabled) { box-shadow: 0 4px 14px rgba(0,135,81,0.28); }
.btn-start:not(:disabled):hover { box-shadow: 0 6px 18px rgba(0,135,81,0.35); }

/* Slightly richer progress bar (still same primary color language) */
#progress-fill {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

@media (max-width: 480px) {
    .subject-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .form-section { padding: 12px; }
}
