*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --primary: #A11E29;
            --primary-dark: #A11E29;
            --primary-light: #C2242F;
            --bg: #F8F9FB;
            --surface: #FFFFFF;
            --surface-alt: #F1F3F7;
            --border: #E2E5EB;
            --border-light: #ECEEF2;
            --text: #1A1D26;
            --text-secondary: #5A5F72;
            --text-tertiary: #8B90A0;
            --success: #16A34A;
            --success-bg: #DCFCE7;
            --info: #2563EB;
            --info-bg: #DBEAFE;
            --warning: #D97706;
            --warning-bg: #FEF3C7;
            --radius: 10px;
            --radius-sm: 6px;
            --radius-lg: 14px;
            --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
            --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
            --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
            --shadow-lg: 0 10px 30px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.04);
            --transition: 150ms ease;
            --badge-auditor-bg: #F3E8FF;
            --badge-auditor-text: #7C3AED;
            --badge-other-bg: #FFE4E6;
            --badge-other-text: #BE123C;
            --badge-foundation-text: #1E40AF;
            --badge-implementer-text: #15803D;
            --badge-manager-text: #92400E;
            --badge-status-available-text: #15803D;
            --badge-status-request-text: #92400E;
            --hover-bg: #FAFBFD;
            --primary-alpha-low: rgba(161, 30, 41, 0.06);
            --primary-alpha-med: rgba(161, 30, 41, 0.08);
            --primary-focus: rgba(161, 30, 41, 0.1);
            --chevron-color: %238B90A0;
        }

        [data-theme="dark"] {
            --primary: #C2242F;
            --primary-dark: #A11E29;
            --primary-light: #D94F5B;
            --bg: #0F1117;
            --surface: #1A1D27;
            --surface-alt: #22252F;
            --border: #2E313C;
            --border-light: #262930;
            --text: #E8E9ED;
            --text-secondary: #A0A4B2;
            --text-tertiary: #6B7086;
            --success: #22C55E;
            --success-bg: rgba(34, 197, 94, 0.12);
            --info: #60A5FA;
            --info-bg: rgba(96, 165, 250, 0.12);
            --warning: #FBBF24;
            --warning-bg: rgba(251, 191, 36, 0.12);
            --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
            --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.2);
            --shadow-md: 0 4px 12px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.2);
            --shadow-lg: 0 10px 30px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
            --badge-auditor-bg: rgba(124, 58, 237, 0.15);
            --badge-auditor-text: #A78BFA;
            --badge-other-bg: rgba(190, 18, 60, 0.15);
            --badge-other-text: #FB7185;
            --badge-foundation-text: #60A5FA;
            --badge-implementer-text: #4ADE80;
            --badge-manager-text: #FBBF24;
            --badge-status-available-text: #4ADE80;
            --badge-status-request-text: #FBBF24;
            --hover-bg: #1F222D;
            --primary-alpha-low: rgba(161, 30, 41, 0.1);
            --primary-alpha-med: rgba(161, 30, 41, 0.15);
            --primary-focus: rgba(161, 30, 41, 0.2);
            --chevron-color: %236B7086;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.5;
            -webkit-font-smoothing: antialiased;
        }

        /* ── Header ── */
        .header {
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-inner {
            max-width: 1600px;
            margin: 0 auto;
            padding: 0 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 64px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            color: var(--text);
        }

        .logo-mark {
            width: 36px;
            height: 36px;
            background: var(--primary);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 700;
            font-size: 14px;
            letter-spacing: -0.5px;
        }

        .logo-text {
            font-weight: 700;
            font-size: 18px;
            letter-spacing: -0.3px;
        }

        .logo-text span { color: var(--text-tertiary); font-weight: 400; margin-left: 4px; }

        .header-nav {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .header-nav a {
            text-decoration: none;
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 500;
            padding: 8px 14px;
            border-radius: var(--radius-sm);
            transition: all var(--transition);
        }

        .header-nav a:hover {
            color: var(--text);
            background: var(--surface-alt);
        }

        .header-nav a.active { color: var(--primary); background: var(--primary-alpha-low); }

        /* ── Hero ── */
        .hero {
            background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
            color: white;
            padding: 48px 24px 56px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            inset: 0;
            background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        }

        .hero-content { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }

        .breadcrumb {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 13px;
            opacity: 0.75;
            margin-bottom: 16px;
        }

        .breadcrumb a { color: white; text-decoration: none; }
        .breadcrumb a:hover { text-decoration: underline; }
        .breadcrumb svg { width: 14px; height: 14px; }

        .hero h1 {
            font-size: 32px;
            font-weight: 700;
            letter-spacing: -0.5px;
            margin-bottom: 10px;
        }

        .hero p {
            font-size: 16px;
            opacity: 0.85;
            max-width: 480px;
            margin: 0 auto;
        }

        /* ── Stats ── */
        .stats-bar {
            max-width: 1920px;
            margin: -28px auto 0;
            padding: 0 20px;
            position: relative;
            z-index: 10;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            max-width: 800px;
            margin: 0 auto;
        }

        .stat-card {
            background: var(--surface);
            border-radius: var(--radius);
            padding: 20px 24px;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border-light);
        }

        .stat-card .stat-value {
            font-size: 28px;
            font-weight: 700;
            color: var(--text);
            letter-spacing: -0.5px;
        }

        .stat-card .stat-label {
            font-size: 13px;
            color: var(--text-tertiary);
            margin-top: 2px;
        }

        /* ── Toolbar ── */
        .toolbar {
            max-width: 1920px;
            margin: 28px auto 0;
            padding: 0 20px;
        }

        .toolbar-inner {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .search-box {
            flex: 1;
            min-width: 260px;
            position: relative;
        }

        .search-box svg {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            width: 18px;
            height: 18px;
            color: var(--text-tertiary);
            pointer-events: none;
        }

        .search-box input {
            width: 100%;
            padding: 10px 14px 10px 42px;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            font-size: 14px;
            font-family: inherit;
            background: var(--surface);
            color: var(--text);
            transition: all var(--transition);
            outline: none;
        }

        .search-box input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-focus);
        }

        .search-box input::placeholder { color: var(--text-tertiary); }

        .filter-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .filter-select {
            appearance: none;
            padding: 10px 36px 10px 14px;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            font-size: 14px;
            font-family: inherit;
            background: var(--surface) url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238B90A0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center no-repeat;
            color: var(--text);
            cursor: pointer;
            outline: none;
            transition: all var(--transition);
        }

        .filter-select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-focus);
        }

        .result-count {
            font-size: 13px;
            color: var(--text-tertiary);
            white-space: nowrap;
        }

        /* ── Column Header Info Icons ── */
        .col-info-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-left: 4px;
            vertical-align: middle;
            position: relative;
            top: -1px;
            cursor: pointer;
            color: var(--text-secondary);
            opacity: 0.75;
            transition: opacity var(--transition), color var(--transition);
            font-size: 0;
            line-height: 0;
            letter-spacing: 0;
            text-transform: none;
            font-weight: normal;
            white-space: nowrap;
        }

        .col-info-icon svg {
            width: 15px;
            height: 15px;
            display: block;
            flex-shrink: 0;
        }

        .col-info-icon:hover {
            opacity: 1;
            color: var(--primary);
        }

        /* ── Table ── */
        .table-wrap {
            width: 100%;
            margin: 20px auto 40px;
            padding: 0 24px;
            max-width: 1920px;
        }

        .table-container {
            background: var(--surface);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow);
            border: 1px solid var(--border-light);
            overflow: hidden;
            width: 100%;
        }

        .table-scroll { 
            overflow-x: auto;
            width: 100%;
        }

        .table {
            width: 100%;
            min-width: 100%;
            border-collapse: collapse;
            font-size: 14px;
            table-layout: auto;
        }

        col.col-standard { width: 16%; min-width: 160px; }
        col.col-level { width: 10%; min-width: 140px; }
        col.col-lang { width: 7%; min-width: 70px; }
        col.col-version { width: 7%; min-width: 70px; }
        col.col-std { width: 10%; min-width: 95px; }
        col.col-changelog { width: 10%; min-width: 95px; }
        col.col-status { width: 10%; min-width: 100px; }
        col.col-category { width: 7%; min-width: 70px; }

        thead {
            position: sticky;
            top: 0;
            z-index: 5;
        }

        .table-container thead th {
            background: var(--surface-alt);
            padding: 12px 32px 12px 10px;
            text-align: left;
            font-weight: 600;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-secondary);
            border-bottom: 1px solid var(--border);
            white-space: normal;
            cursor: pointer;
            user-select: none;
            transition: background var(--transition);
            overflow-wrap: break-word;
            word-wrap: break-word;
            position: relative;
            min-width: 0;
        }

        .table-container thead th:nth-child(n+4) { text-align: center; }
        .table-container thead th:nth-child(1),
        .table-container thead th:nth-child(2),
        .table-container thead th:nth-child(3) { text-align: left; }

        .table-container thead th[data-sort="number_of_questions"] {
            text-align: center;
            width: 60px;
            min-width: 60px;
            max-width: 60px;
            white-space: normal;
            word-break: break-word;
        }
        .table-container tbody td:nth-child(7) {
            text-align: center;
            width: 60px;
            max-width: 60px;
        }
        .table-container thead th[data-sort="available_online"] {
            text-align: center;
            width: 50px;
            min-width: 50px;
            max-width: 50px;
            white-space: normal;
            word-break: break-word;
            overflow: hidden;
        }
        .table-container tbody td:nth-child(8) {
            text-align: center;
            width: 50px;
            max-width: 50px;
            overflow: hidden;
        }
        .table-container thead th[data-sort="available_on_paper"] {
            text-align: center;
            width: 50px;
            min-width: 50px;
            max-width: 50px;
            white-space: normal;
            word-break: break-word;
            overflow: hidden;
        }
        .table-container tbody td:nth-child(9) {
            text-align: center;
            width: 50px;
            max-width: 50px;
            overflow: hidden;
        }
        .table-container tbody td:nth-child(12) {
            text-align: center;
            overflow: hidden;
        }

        .table-container thead th:hover { background: var(--border-light); }

        thead th .sort-icon { display: none; }
        .sort-icon-below { display: none; }

        thead th:last-child { padding-right: 14px; }

        tbody tr {
            border-bottom: 1px solid var(--border-light);
            transition: background var(--transition);
            height: auto;
        }

        tbody tr:last-child { border-bottom: none; }
        tbody tr:hover { background: var(--hover-bg); }

        tbody td {
            padding: 12px 10px;
            vertical-align: middle;
            overflow-wrap: break-word;
            word-wrap: break-word;
            word-break: break-word;
            white-space: normal;
            min-width: 0;
            max-width: 100%;
            height: auto;
            line-height: 1.5;
            overflow: hidden;
            text-overflow: clip;
        }

        tbody td:nth-child(n+4) { text-align: center; }
        tbody td:nth-child(1),
        tbody td:nth-child(2) { text-align: left; }

        tbody td * {
            max-width: 100%;
            overflow-wrap: break-word;
            word-wrap: break-word;
        }

        /* ── Sortable Column Headers ── */
        thead th[data-sort] {
            cursor: pointer;
            user-select: none;
            position: relative;
            transition: background-color 0.2s ease;
        }

        thead th[data-sort]:hover { background-color: rgba(161, 30, 41, 0.05); }

        thead th.sorted-asc,
        thead th.sorted-desc { background-color: rgba(161, 30, 41, 0.1); font-weight: 600; }

        .course-standard {
            font-weight: 600;
            color: var(--text-secondary);
            white-space: normal;
            overflow-wrap: break-word;
            word-wrap: break-word;
        }

        .lang-single {
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 500;
            text-align: center;
        }

        .level-badge {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 100px;
            font-size: 12px;
            font-weight: 500;
            background: var(--surface-alt);
            color: var(--text-secondary);
            white-space: normal;
            word-break: break-word;
            overflow-wrap: break-word;
            max-width: 100%;
            line-height: 1.5;
            text-align: center;
            hyphens: auto;
            align-self: center;
        }

       /* .level-badge.foundation { background: var(--info-bg); color: var(--badge-foundation-text); }
        .level-badge.auditor { background: var(--badge-auditor-bg); color: var(--badge-auditor-text); }
        .level-badge.implementer { background: var(--success-bg); color: var(--badge-implementer-text); }
        .level-badge.manager { background: var(--warning-bg); color: var(--badge-manager-text); }
        .level-badge.other { background: var(--badge-other-bg); color: var(--badge-other-text); } 

        .level-badge[title] { cursor: help; position: relative; }
        .level-badge[title]:hover { opacity: 0.9; }
*/
        .lang-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            max-width: 220px;
        }

        .lang-tag {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 500;
            background: var(--surface-alt);
            color: var(--text-secondary);
            white-space: nowrap;
        }

        .lang-tag.primary-lang { background: var(--primary-alpha-med); color: var(--primary); }

        .lang-more {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 600;
            background: var(--surface-alt);
            color: var(--text-tertiary);
            cursor: default;
        }

        .version-num {
            font-family: 'SF Mono', 'Fira Code', monospace;
            font-size: 13px;
            color: var(--text-secondary);
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        .std-version {
            font-size: 13px;
            color: var(--text-tertiary);
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        .changelog-text {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.5;
            word-wrap: break-word;
            overflow-wrap: break-word;
            white-space: normal;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
        }

        .changelog-text a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
        .changelog-text a:hover { color: var(--primary-dark); text-decoration: underline; }

        .changelog-mobile { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
        .changelog-mobile a { color: var(--primary); text-decoration: none; }
        .changelog-mobile a:hover { text-decoration: underline; }

        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border-radius: 100px;
            font-size: 12px;
            font-weight: 500;
        }

        .status-badge.available { background: var(--success-bg); color: var(--badge-status-available-text); }
        .status-badge.request { background: var(--warning-bg); color: var(--badge-status-request-text); }

        .status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

        /* ── Pagination ── */
        .table-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 16px;
            border-top: 1px solid var(--border-light);
            font-size: 13px;
            color: var(--text-tertiary);
        }

        .pagination { display: flex; align-items: center; gap: 4px; }

        .pagination button {
            width: 34px;
            height: 34px;
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            background: var(--surface);
            color: var(--text-secondary);
            font-family: inherit;
            font-size: 13px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition);
        }

        .pagination button:hover { border-color: var(--primary); color: var(--primary); }
        .pagination button.active { background: var(--primary); border-color: var(--primary); color: white; }
        .pagination button:disabled { opacity: 0.4; cursor: default; }
        .pagination button:disabled:hover { border-color: var(--border); color: var(--text-secondary); }

        /* ── Footer ── */
        .footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 24px; margin-top: 16px; }

        .footer-inner {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 16px;
        }

        .footer-left { font-size: 13px; color: var(--text-tertiary); }
        .footer-links { display: flex; gap: 20px; }
        .footer-links a { font-size: 13px; color: var(--text-tertiary); text-decoration: none; transition: color var(--transition); }
        .footer-links a:hover { color: var(--primary); }

        .social-icons { display: flex; gap: 8px; }

        .social-icons a {
            width: 34px;
            height: 34px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-tertiary);
            text-decoration: none;
            transition: all var(--transition);
            font-size: 14px;
        }

        .social-icons a:hover { border-color: var(--primary); color: var(--primary); }

        /* ── Empty state ── */
        .empty-state { padding: 60px 24px; text-align: center; color: var(--text-tertiary); display: none; }
        .empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }
        .empty-state p { font-size: 15px; }

        /* ── Dark mode overrides ── */
        [data-theme="dark"] .filter-select {
            background: var(--surface) url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7086' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center no-repeat;
        }

        [data-theme="dark"] .hero { background: linear-gradient(135deg, #1A0A10 0%, #2D0F1A 50%, #3A1525 100%); }

        /* ── Theme Toggle ── */
        .theme-toggle {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: 1px solid var(--border);
            background: var(--surface-alt);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition);
            flex-shrink: 0;
            font-size: 16px;
            line-height: 1;
            padding: 0;
        }

        .theme-toggle:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-alpha-low); }
        .theme-toggle svg { width: 18px; height: 18px; }
        .theme-toggle .icon-sun { display: none; }
        .theme-toggle .icon-moon { display: block; }
        [data-theme="dark"] .theme-toggle .icon-sun { display: block; }
        [data-theme="dark"] .theme-toggle .icon-moon { display: none; }

        /* ── Theme Transition ── */
        body, .header, .table-container, .stat-card,
        .course-card, .footer, .search-box input, .filter-select,
        .pagination button, .social-icons a {
            transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
        }

        /* ── Mobile Cards ── */
        .mobile-cards { display: none; }

        /* ── Responsive ── */
        @media (min-width: 1800px) { .table-wrap { padding: 0 20px; } }
        @media (min-width: 2200px) { .table-wrap { padding: 0 16px; } }

        @media (min-width: 1280px) and (max-width: 1600px) {
            .table-container table { min-width: 1100px; }
            thead th { font-size: 11px; padding: 10px 26px 10px 8px; }
            tbody td { font-size: 13px; }
        }

        @media (max-width: 1024px) {
            .table-wrap { padding: 0 16px; }
            thead th { font-size: 11px; padding: 10px 28px 10px 8px; }
            tbody td { font-size: 13px; padding: 10px 8px; }
        }

        @media (max-width: 768px) {
            .stats-grid { grid-template-columns: repeat(2, 1fr); }
            .header-nav { display: none; }
            .hero h1 { font-size: 24px; }
            .hero { padding: 32px 20px 40px; }
            .toolbar-inner { flex-direction: column; align-items: stretch; }
            .filter-group { flex-wrap: wrap; }
            .table-footer { flex-direction: column; gap: 12px; text-align: center; }
            .table-scroll { display: none; }
            .mobile-cards { display: block; padding: 12px; }
            .table-wrap { padding: 0 12px; }
            .stats-bar { padding: 0 12px; }
            .toolbar { padding: 0 12px; }
            .col-info-icon { display: none; }
        }

        @media (max-width: 480px) {
            .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
            .stat-card { padding: 14px 16px; }
            .stat-card .stat-value { font-size: 22px; }
        }

        /* ── Scroll shimmer ── */
        .table-scroll::-webkit-scrollbar { height: 6px; }
        .table-scroll::-webkit-scrollbar-track { background: var(--surface-alt); }
        .table-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
        .table-scroll::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

        /* ── Column width rules ── */
        thead th[data-sort="std_version"],
        thead th[data-sort="change_log"] {
            white-space: normal !important;
            line-height: 1.3;
            height: auto;
            min-height: 44px;
            word-break: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
        }

        thead th[data-sort="std_version"] .sort-icon,
        thead th[data-sort="change_log"] .sort-icon {
            position: absolute !important;
            right: 6px !important;
            top: 50% !important;
            transform: translateY(-50%) !important;
        }

        thead th { word-break: normal; hyphens: none; }

        @media (min-width: 1024px) {
            .table-container table { min-width: 1100px; }
        }

        .table-scroll {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

/* ══════════════════════════════════════════════════════════════════════════
   PECB EXAMS MANAGER - ADDITIONAL STYLES
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Info Modal ── */
.info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    padding: 20px;
}

.info-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.info-modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.info-modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.info-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.info-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.info-modal-close:hover { background: var(--surface-alt); color: var(--text); }

.info-modal-body {
    padding: 28px;
    overflow-y: auto;
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-modal-body ul { margin: 16px 0; padding-left: 24px; }
.info-modal-body li { margin: 10px 0; }
.info-modal-body strong { color: var(--text); font-weight: 600; }

body.modal-open { overflow: hidden; }

#pecb-exams-wrapper .table-container table { table-layout: auto; }

#pecb-exams-wrapper .col-level {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    overflow: hidden;
}

#pecb-exams-wrapper .col-questions {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

/* ── Compact Table Styles for Exams ── */
.col-standard { width: 180px; min-width: 180px; }
.col-level { width: 110px; min-width: 110px; }
.col-lang { width: 100px; min-width: 100px; text-align: left; }
.col-duration { width: 80px; min-width: 80px; text-align: center; }
.col-type { width: 130px; min-width: 130px; }
.col-book { width: 100px; min-width: 100px; }
.col-questions { width: 100px; min-width: 100px; text-align: center; }
.col-online { width: 67px; min-width: 67px; text-align: center; }
.col-paper { width: 60px; min-width: 60px; text-align: center; }
.col-transition { width: 160px; min-width: 160px; }
.col-handbook { width: 80px; min-width: 80px; text-align: center; }
.col-master { width: 90px; min-width: 90px; text-align: center; }
.col-webpage { width: 80px; min-width: 80px; text-align: center; }

.exam-standard { font-weight: 600; color: var(--text-secondary); display: block; }

.lang-count {
    display: inline-block;
    background: var(--info-bg);
    color: var(--text-secondary);
    font-size: 13px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: help;
}

.duration-num, .questions-num { font-size: 13px; color: var(--text-secondary); }
.exam-type { font-size: 13px; color: var(--text-secondary); }

.book-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.2;
}

.book-open { background: var(--success-bg); color: var(--success); }
.book-closed { background: var(--warning-bg); color: var(--warning); }

.availability { font-size: 18px; font-weight: 600; }
.availability.available-yes { color: var(--success); }
.availability.available-no { color: var(--text-tertiary); opacity: 0.4; }

.transition-date { font-size: 12px; color: var(--text-secondary); display: block; line-height: 1.4; }

.link-btn { display: inline-block; font-size: 20px; text-decoration: none; transition: all var(--transition); opacity: 0.7; }
.link-btn:hover { opacity: 1; transform: scale(1.1); }
.no-link { color: var(--text-tertiary); opacity: 0.3; }

.master-count {
    display: inline-block;
    background: var(--primary-alpha-low);
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: help;
}

/* ── Mobile Cards for Exams ── */
.exam-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.exam-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 10px;
    border-bottom: 1px solid var(--border-light);
}

.exam-card .card-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    flex: 1;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.exam-card .card-details { display: grid; gap: 10px; }

.exam-card .detail-item {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.exam-card .detail-item strong { color: var(--text); font-weight: 600; min-width: 90px; }
.exam-card .detail-item a { color: var(--primary); text-decoration: none; font-weight: 500; }
.exam-card .detail-item a:hover { text-decoration: underline; }

@media (min-width: 1024px) {
    .table-container table { min-width: 1600px; }
}

/* ── Language Name Display ── */
.lang-name { font-size: 13px; color: var(--text-secondary); }

/* ── Questions Text ── */
.questions-text { font-size: 13px; color: var(--text-secondary); }

/* ── Link Buttons ── */
.master-link {
    display: inline-block;
    background: #6B7280;
    color: white !important;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all var(--transition);
}

.master-link:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(161, 30, 41, 0.3); }

.handbook-link {
    display: inline-block;
    background: #6B7280;
    color: white !important;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all var(--transition);
}

.handbook-link:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3); }

.visit-link {
    display: inline-block;
    background: #6B7280;
    color: white !important;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all var(--transition);
}

.visit-link:hover { background: #4B5563; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3); }

/* ── Scroll Hint — scoped to table container only ── */
#pecb-exams-wrapper .table-container { position: relative; }

#pecb-exams-wrapper .scroll-fade-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: calc(100% - 53px);
    background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--surface) 60%);
    pointer-events: none;
    z-index: 6;
    transition: opacity 200ms ease;
}

[data-theme="dark"] #pecb-exams-wrapper .scroll-fade-right {
    background: linear-gradient(to right, rgba(26, 29, 39, 0), var(--surface) 60%);
}

#pecb-exams-wrapper .scroll-fade-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    height: calc(100% - 53px);
    background: linear-gradient(to left, rgba(255, 255, 255, 0), var(--surface) 60%);
    pointer-events: none;
    z-index: 6;
    opacity: 0;
    transition: opacity 200ms ease;
}

[data-theme="dark"] #pecb-exams-wrapper .scroll-fade-left {
    background: linear-gradient(to left, rgba(26, 29, 39, 0), var(--surface) 60%);
}

#pecb-exams-wrapper .scroll-fade-right.hidden { opacity: 0; }
#pecb-exams-wrapper .scroll-fade-left.visible { opacity: 1; }

#pecb-exams-wrapper .scroll-pill {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 7;
    box-shadow: 0 2px 10px rgba(161, 30, 41, 0.35);
    cursor: pointer;
    user-select: none;
    transition: opacity 200ms ease, background 150ms ease, right 200ms ease;
    animation: pecb-pill-bounce 1.8s ease-in-out infinite;
}

#pecb-exams-wrapper .scroll-pill:hover { background: var(--primary-light); }
#pecb-exams-wrapper .scroll-pill.hidden { opacity: 0; pointer-events: none; animation: none; }

#pecb-exams-wrapper .scroll-pill svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: white;
    fill: none;
}

#pecb-exams-wrapper .back-pill {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 7;
    cursor: pointer;
    user-select: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, background 150ms ease;
}

#pecb-exams-wrapper .back-pill:hover { background: var(--surface-alt); }
#pecb-exams-wrapper .back-pill.visible { opacity: 1; pointer-events: auto; }

#pecb-exams-wrapper .back-pill svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}

@keyframes pecb-pill-bounce {
    0%, 100% { right: 24px; }
    50% { right: 20px; }
}

@media (max-width: 768px) {
    #pecb-exams-wrapper .scroll-fade-right,
    #pecb-exams-wrapper .scroll-fade-left,
    #pecb-exams-wrapper .scroll-pill,
    #pecb-exams-wrapper .back-pill { display: none; }
}

/* ── Info Pop-up Icons & Modal ── */

/* Base Icon in table header */
.col-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    cursor: pointer;
    transition: all var(--transition);
    vertical-align: middle;
    opacity: 0.6;
}

.col-info-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.col-info-icon svg {
    width: 15px;
    height: 15px;
    display: block;
}

/* Grey Icon (Standard) */
.col-info-icon-grey {
    color: var(--text-tertiary);
}

.col-info-icon-grey:hover {
    color: var(--text-secondary);
}

/* Red Icon (Important) */
.col-info-icon-red {
    color: #dc2626;
}

.col-info-icon-red:hover {
    color: #b91c1c;
}

[data-theme="dark"] .col-info-icon-red {
    color: #ef4444;
}

[data-theme="dark"] .col-info-icon-red:hover {
    color: #f87171;
}

/* Modal Overlay */
.info-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.info-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Content */
.info-modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
}

.info-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

/* Close Button */
.info-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    margin: -4px -4px -4px 0;
}

.info-modal-close:hover {
    background: var(--surface-alt);
    color: var(--text);
}

/* Modal Body */
.info-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.info-modal-body p {
    margin: 0 0 16px 0;
}

.info-modal-body p:last-child {
    margin-bottom: 0;
}

.info-modal-body strong {
    color: var(--text);
    font-weight: 600;
}

.info-modal-body ul,
.info-modal-body ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.info-modal-body li {
    margin-bottom: 8px;
}

.info-modal-body a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.info-modal-body a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .info-modal-content {
        max-width: 95%;
        max-height: 90vh;
    }
    
    .info-modal-header {
        padding: 20px 20px;
    }
    
    .info-modal-header h3 {
        font-size: 18px;
    }
    
    .info-modal-body {
        padding: 20px 20px;
        font-size: 14px;
    }
}