/* ============================================
   C Programming Exercise Platform
   Design System: Nola Dark Theme
   ============================================ */

:root {
    /* Backgrounds */
    --bg-primary: #0a0a14;
    --bg-secondary: #0d0d1a;
    --bg-card: #111122;
    --bg-card-hover: #161630;
    --bg-input: #0d0d1a;

    /* Accent (Orange) */
    --accent: #f97316;
    --accent-light: #fb923c;
    --accent-dark: #c2410c;
    --accent-glow: rgba(249, 115, 22, 0.15);
    --accent-glow-strong: rgba(249, 115, 22, 0.3);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #666680;

    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(249, 115, 22, 0.3);

    /* Status Colors */
    --status-success: #22c55e;
    --status-warning: #eab308;
    --status-error: #ef4444;
    --status-info: #3b82f6;

    /* Sizing */
    --radius: 12px;
    --radius-lg: 20px;
    --container-max: 1000px;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }

/* ===================== NAVBAR ===================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    color: var(--text-primary) !important;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-brand span { color: var(--accent); }
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.nav-user {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.nav-role {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* ===================== CONTAINER ===================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}
.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-glow-strong);
}
.btn-primary:hover::after { left: 100%; }
.btn-success {
    background: var(--status-success);
    color: #fff;
    border-color: var(--status-success);
}
.btn-success:hover {
    background: #16a34a;
    border-color: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}
.btn-danger {
    background: transparent;
    color: var(--status-error);
    border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--status-error);
}
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.78rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ===================== FORMS ===================== */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group textarea.code-input {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    min-height: 300px;
    tab-size: 4;
    line-height: 1.6;
}

/* ===================== LOGIN ===================== */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    padding: 2rem;
}
.login-box {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.login-box h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}
.login-box .login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}
.login-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-glow);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
}

/* ===================== ALERTS ===================== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    border: 1px solid;
    animation: slideUp 0.3s ease;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.2);
}
.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.2);
}

/* ===================== CARDS ===================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow-strong), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}
.card:hover::before { opacity: 1; }
.card h2, .card h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ===================== PAGE HEADER ===================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.page-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ===================== EXERCISE LIST ===================== */
.exercise-list { list-style: none; }
.exercise-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.6rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.exercise-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}
.exercise-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateX(4px);
}
.exercise-item:hover::after { width: 100%; }
.exercise-item a {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}
.exercise-item a:hover { color: var(--accent); }
.exercise-number {
    color: var(--accent);
    font-weight: 700;
    margin-right: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

/* ===================== TOOLBAR ===================== */
.toolbar {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.toolbar-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.25rem;
}

/* ===================== BADGES ===================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid;
}
.badge-pending {
    background: rgba(234, 179, 8, 0.1);
    color: #fbbf24;
    border-color: rgba(234, 179, 8, 0.2);
}
.badge-submitted {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.2);
}
.badge-reviewed {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
}
.badge-not-started {
    background: rgba(102, 102, 128, 0.1);
    color: var(--text-muted);
    border-color: rgba(102, 102, 128, 0.2);
}
.badge-difficulty {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--status-warning);
    font-size: 0.75rem;
    letter-spacing: 1px;
}
.badge-question {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.2);
}

/* ===================== EXERCISE ITEM STATUS HIGHLIGHTS ===================== */
.exercise-item.item-reviewed {
    border-color: rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.03);
}
.exercise-item.item-reviewed::after {
    background: var(--status-success);
}
.exercise-item.item-pending {
    border-color: rgba(234, 179, 8, 0.2);
    background: rgba(234, 179, 8, 0.03);
}
.exercise-item.item-pending::after {
    background: var(--status-warning);
}

/* ===================== STUDENT QUESTION BLOCK ===================== */
.student-question-block {
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.student-question-block h3 {
    font-weight: 600;
    color: #c084fc;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.student-question-text {
    white-space: pre-wrap;
    line-height: 1.7;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-left: 3px solid #a855f7;
    padding-left: 0.85rem;
}

/* ===================== CODE REVIEW ===================== */
.code-review {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.code-review-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}
.code-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}
.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #eab308; }
.code-dot.green { background: #22c55e; }
.code-review-header .filename {
    margin-left: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.code-line {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.82rem;
    line-height: 1.65;
    transition: background var(--transition);
}
.code-line:last-child { border-bottom: none; }
.code-line:hover { background: rgba(255, 255, 255, 0.02); }
.code-line.has-comment { background: rgba(249, 115, 22, 0.05); }
.code-line.has-comment:hover { background: rgba(249, 115, 22, 0.08); }

.line-number {
    width: 55px;
    min-width: 55px;
    text-align: right;
    padding: 0 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid var(--border);
    user-select: none;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.78rem;
}
.line-number:hover {
    color: var(--accent);
    background: var(--accent-glow);
}
.line-content {
    flex: 1;
    padding: 0 1rem;
    white-space: pre;
    overflow-x: auto;
}

/* Syntax highlight colors for code review */
.line-content .hljs-keyword,
.line-content .hljs-type { color: #c678dd; }
.line-content .hljs-built_in { color: #e5c07b; }
.line-content .hljs-string { color: #98c379; }
.line-content .hljs-number { color: #d19a66; }
.line-content .hljs-comment { color: #5c6370; font-style: italic; }
.line-content .hljs-title { color: #61afef; }
.line-content .hljs-meta { color: #e06c75; }

/* ===================== LINE COMMENTS ===================== */
.line-comment-block {
    padding: 0.6rem 1rem 0.6rem 68px;
    background: rgba(249, 115, 22, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    animation: slideUp 0.2s ease;
}
.line-comment-block .comment-text {
    background: rgba(249, 115, 22, 0.08);
    border-left: 3px solid var(--accent);
    padding: 0.5rem 0.85rem;
    border-radius: 0 6px 6px 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.83rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}
.line-comment-form {
    padding: 0.6rem 1rem 0.6rem 68px;
    background: rgba(59, 130, 246, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: none;
    animation: slideUp 0.2s ease;
}
.line-comment-form textarea {
    width: 100%;
    padding: 0.5rem 0.7rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.83rem;
    resize: vertical;
    min-height: 60px;
    transition: border-color var(--transition);
}
.line-comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.line-comment-form .form-actions {
    margin-top: 0.4rem;
    display: flex;
    gap: 0.5rem;
}

/* ===================== REVIEW SECTION ===================== */
.review-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.review-section h3 {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* ===================== DESCRIPTION ===================== */
.description {
    white-space: pre-wrap;
    line-height: 1.75;
    color: var(--text-secondary);
}

/* ===================== ACTIONS ===================== */
.actions { display: flex; gap: 0.5rem; align-items: center; }

/* ===================== CODEMIRROR OVERRIDES ===================== */
.CodeMirror {
    height: auto !important;
    min-height: 300px;
    max-height: 600px;
    background: var(--bg-input) !important;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
    padding: 0.5rem 0;
    color: var(--text-primary) !important;
    transition: border-color var(--transition);
}
.CodeMirror-focused {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.CodeMirror-gutters {
    background: rgba(255, 255, 255, 0.02) !important;
    border-right: 1px solid var(--border) !important;
}
.CodeMirror-linenumber {
    color: var(--text-muted) !important;
    font-size: 0.78rem !important;
}
.CodeMirror-cursor {
    border-left-color: var(--accent) !important;
}
.CodeMirror-selected { background: rgba(249, 115, 22, 0.15) !important; }
.CodeMirror-activeline-background { background: rgba(255, 255, 255, 0.03) !important; }
.CodeMirror-scroll { max-height: 600px; }

/* ===================== CODE EDITOR WRAPPER ===================== */
.code-editor-wrapper {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}
.code-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
}
.code-editor-header .dots {
    display: flex;
    gap: 6px;
}
.code-editor-header .lang-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
}
.code-editor-wrapper .CodeMirror {
    border-radius: 0 0 8px 8px;
    border-top: none;
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}
.empty-state p {
    color: var(--text-muted);
}
.empty-state-icon {
    width: 56px; height: 56px;
    background: var(--accent-glow);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

/* ===================== ANIMATIONS ===================== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-slow);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.stagger > *:nth-child(3) { transition-delay: 0.15s; }
.stagger > *:nth-child(4) { transition-delay: 0.2s; }
.stagger > *:nth-child(5) { transition-delay: 0.25s; }
.stagger > *:nth-child(6) { transition-delay: 0.3s; }
.stagger > *:nth-child(7) { transition-delay: 0.35s; }
.stagger > *:nth-child(8) { transition-delay: 0.4s; }
.stagger > *:nth-child(9) { transition-delay: 0.45s; }
.stagger > *:nth-child(10) { transition-delay: 0.5s; }

/* ===================== UTILITIES ===================== */
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }
.text-secondary { color: var(--text-secondary); }

/* ===================== CHAPTER GROUPS ===================== */
.chapter-group {
    margin-bottom: 2.5rem;
}
.chapter-header {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
    position: relative;
}
.chapter-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
}
.chapter-header-row .chapter-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Collapsible chapters */
.chapter-toggle {
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s ease;
}
.chapter-toggle:hover {
    opacity: 0.85;
}
.chapter-caret {
    display: inline-block;
    margin-right: 0.5rem;
    color: var(--accent);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9em;
}
.chapter-group.collapsed .chapter-caret {
    transform: rotate(-90deg);
}
.chapter-body {
    overflow: hidden;
    max-height: 20000px;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 1;
}
.chapter-group.collapsed .chapter-body {
    max-height: 0;
    opacity: 0;
}

/* ===================== SECTION GROUPS ===================== */
.section-group {
    margin-bottom: 1.5rem;
    margin-left: 0.5rem;
}
.section-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.01em;
    border-left: 3px solid var(--accent);
    padding-left: 0.75rem;
    margin-bottom: 0.75rem;
}
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

/* ===================== PROGRESS BAR ===================== */
.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent));
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
}
.progress-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    font-family: 'JetBrains Mono', monospace;
}
.progress-bar-sm .progress-bar {
    height: 6px;
    max-width: 150px;
}

/* ===================== BREADCRUMB ===================== */
.chapter-breadcrumb {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}
.section-breadcrumb {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
}
.breadcrumb-sep {
    color: var(--text-muted);
    margin: 0 0.4rem;
    font-weight: 300;
}

/* ===================== READ-ONLY CODEMIRROR ===================== */
#best-code-display + .CodeMirror .CodeMirror-cursor {
    display: none !important;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .container { padding: 1.25rem 1rem; }
    .page-header { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    .exercise-item { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    .login-box { padding: 1.75rem; }
    .line-comment-block,
    .line-comment-form { padding-left: 1rem; }
    .navbar { padding: 0 1rem; }
    .nav-user { display: none; }
    .chapter-header-row,
    .section-header-row { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
    .progress-bar-sm .progress-bar { max-width: 100%; }
    .toolbar { flex-direction: column; gap: 0.75rem; }
    .section-group { margin-left: 0; }
}
