:root {
    --bg: #f1f5f9;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #1d4ed8;
    --primary-dark: #1e3a8a;
    --primary-soft: #eff6ff;
    --success: #15803d;
    --success-soft: #dcfce7;
    --warning: #b45309;
    --warning-soft: #fef3c7;
    --danger: #b91c1c;
    --danger-soft: #fee2e2;
    --info: #0369a1;
    --info-soft: #e0f2fe;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    flex: 1;
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

.hidden {
    display: none !important;
}

.small {
    font-size: 0.85rem;
}

.text-muted {
    color: var(--muted);
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.75rem; }
.mb-3 { margin-bottom: 1.25rem; }

/* Topbar */
.topbar {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
}
.brand:hover {
    text-decoration: none;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f59e0b;
    color: #0f172a;
    font-weight: 800;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.brand-text small {
    font-size: 0.72rem;
    color: #cbd5e1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nav-links > a:not(.btn) {
    color: #e2e8f0;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
}

.nav-links > a:not(.btn):hover,
.nav-links > a.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    text-decoration: none;
}

.nav-pill {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.5);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.inline-form {
    display: inline;
}

/* Cards & Grids */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.section {
    margin-bottom: 1.75rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.grid-admin-split {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover {
    text-decoration: none;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.83rem;
}

.btn-lg {
    padding: 0.75rem 1.35rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    background: #991b1b;
}

.btn-warning {
    background: #d97706;
    color: #fff;
}

.btn-warning-outline {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: #f59e0b;
}
.btn-warning-outline.active {
    background: #f59e0b;
    color: #fff;
}

.btn-outline {
    background: #fff;
    color: var(--text);
    border-color: #cbd5e1;
}
.btn-outline:hover {
    background: #f8fafc;
}
.topbar .btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}
.topbar .btn-outline:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
}
.btn-ghost:hover {
    background: #f1f5f9;
    color: var(--text);
}

/* Badges & Chips */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }

.chip {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
}
.chip-twk { background: #ede9fe; color: #5b21b6; }
.chip-tiu { background: #dbeafe; color: #1e40af; }
.chip-tkp { background: #dcfce7; color: #166534; }

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    margin-bottom: 1rem;
    font-size: 0.94rem;
}
.alert-success { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: #fde68a; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.alert-info { background: var(--info-soft); color: var(--info); border-color: #bae6fd; }

.active-exam-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Forms */
.stack-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--text);
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(29, 78, 216, 0.25);
    border-color: var(--primary);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
}

/* Hero & Landing */
.hero {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.1rem;
    line-height: 1.2;
    margin: 0.75rem 0;
}

.hero-subtitle {
    font-size: 1.04rem;
    color: #334155;
    margin-bottom: 1.25rem;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stat-grid-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1rem 0;
}

.stat-box {
    background: var(--bg);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
}

.rule-list, .pg-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.rule-list li {
    padding: 0.35rem 0;
    font-size: 0.9rem;
    border-top: 1px dashed var(--border);
}

.pg-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.94rem;
}

/* Auth Pages */
.auth-container {
    max-width: 480px;
    margin: 1.5rem auto;
}

.auth-card h1 {
    margin-top: 0;
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.auth-footer {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.92rem;
}

.demo-box {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    font-size: 0.84rem;
    line-height: 1.6;
}

.compact-list {
    margin: 0;
    padding-left: 1.2rem;
}

/* Page Header & Tables */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.6rem;
}

.header-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.section-head-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.section-head-row h2 {
    margin: 0;
    font-size: 1.2rem;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th, .table td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.table th {
    background: #f8fafc;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.highlight-row {
    background: var(--primary-soft);
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.8rem;
    line-height: 1.1;
    color: var(--primary-dark);
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

/* Packages & Filter Bars */
.package-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.package-card h3 {
    margin: 0;
}

.package-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.start-exam-form {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.package-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.filter-form-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr auto;
    gap: 0.9rem;
    align-items: end;
}

.inline-filter-form {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}
.inline-filter-form select {
    max-width: 420px;
}

.action-buttons-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.action-buttons-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.options-editor-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-editor-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.option-text-col {
    flex: 1;
}

.option-score-col {
    width: 140px;
}

.preview-thumb {
    max-width: 340px;
    max-height: 220px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
}

.user-admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.inline-reset-form {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.input-xs {
    width: 130px !important;
    padding: 0.3rem 0.5rem !important;
    font-size: 0.82rem !important;
}

/* CAT Exam Mode */
body.exam-mode {
    background: #e2e8f0;
}

.exam-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cat-topbar {
    background: var(--primary-dark);
    color: #fff;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 60;
}

.cat-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cat-meta {
    font-size: 0.82rem;
    color: #cbd5e1;
}

.cat-status-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.save-indicator {
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.14);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
}

.cat-timer {
    background: #0f172a;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cat-timer.warning {
    background: #991b1b;
    border-color: #fca5a5;
}

.timer-label {
    font-size: 0.75rem;
    color: #cbd5e1;
}

#timer-display {
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.cat-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 1rem;
    padding: 1rem;
    max-width: 1360px;
    width: 100%;
    margin: 0 auto;
    align-items: start;
}

.cat-question-pane {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 520px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.question-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.q-number-badge {
    font-weight: 800;
    color: var(--primary-dark);
    font-size: 1rem;
}

.question-body {
    flex: 1;
}

.question-text {
    font-size: 1.03rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    white-space: pre-line;
}

.question-image-wrap {
    margin: 0.9rem 0;
}

.question-image {
    max-width: 100%;
    max-height: 360px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font: inherit;
    width: 100%;
    transition: border-color 0.12s, background-color 0.12s;
}

.option-item:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.option-item.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.opt-letter {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
}

.option-item.selected .opt-letter {
    background: var(--primary);
    color: #fff;
}

.question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
}

.footer-left-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Navigasi Soal Grid */
.cat-nav-pane {
    position: sticky;
    top: 78px;
}

.nav-pane-header h3 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
}

.nav-summary {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.cat-filter-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.filter-tab {
    padding: 0.35rem 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    cursor: pointer;
}
.filter-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.45rem;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 2px;
}

.q-grid-btn {
    padding: 0.45rem 0;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text);
}

.q-grid-btn.answered {
    background: #16a34a;
    border-color: #15803d;
    color: #fff;
}

.q-grid-btn.doubtful {
    background: #f59e0b;
    border-color: #d97706;
    color: #fff;
}

.q-grid-btn.current {
    box-shadow: 0 0 0 2.5px var(--primary-dark);
}

.nav-legend {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--muted);
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 3px;
}
.dot-answered { background: #16a34a; }
.dot-doubt { background: #f59e0b; }
.dot-empty { background: #fff; border: 1.5px solid #cbd5e1; }

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 100;
}

.modal-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.modal-card h3 {
    margin-top: 0;
}

.modal-stats {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem;
    margin: 1rem 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

/* Result & Pembahasan */
.result-banner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.25rem;
    align-items: center;
}

.banner-passed {
    border-left: 6px solid var(--success);
}

.banner-failed {
    border-left: 6px solid var(--danger);
}

.result-banner-main h2 {
    margin: 0.6rem 0 0.35rem;
    font-size: 1.75rem;
}

.pg-checks-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem;
}

.pg-checks-box h4 {
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
}

.pg-check-item {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.9rem;
}
.pg-check-item:last-child { border-bottom: 0; }
.pg-check-item.ok strong { color: var(--success); }
.pg-check-item.fail strong { color: var(--danger); }

.score-card .score-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.score-big {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
}
.score-big small {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
}

.filter-bar {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.discussion-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.discussion-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-bottom: 0.75rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.review-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 1rem 0;
}

.review-option {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.review-option.is-correct {
    background: #f0fdf4;
    border-color: #86efac;
}

.review-option.is-wrong {
    background: #fef2f2;
    border-color: #fca5a5;
}

.review-option.is-partial {
    background: #fffbeb;
    border-color: #fcd34d;
}

.opt-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.opt-meta {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
}
.tag-user { background: #dbeafe; color: #1e40af; }
.tag-best { background: #dcfce7; color: #166534; }
.tag-score { background: #f1f5f9; color: #475569; }

.explanation-box {
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    padding: 0.85rem 1rem;
    border-radius: 0 8px 8px 0;
}

.explanation-box h4 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    color: var(--primary-dark);
}

.explanation-box p {
    margin: 0;
    font-size: 0.94rem;
}

/* Footer */
.footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 960px) {
    .hero,
    .result-banner,
    .grid-admin-split,
    .cat-workspace {
        grid-template-columns: 1fr;
    }
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .filter-form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .cat-nav-pane {
        position: static;
    }
}

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4, .filter-form-grid {
        grid-template-columns: 1fr;
    }
    .option-editor-row {
        flex-direction: column;
        align-items: stretch;
    }
    .option-score-col {
        width: 100%;
    }
}

