/* ── ROOT VARIABLES (Professional Academic Theme) ────────────────────────────── */
:root {
    /* Primary Colors - Deep Forest Green Theme */
    --academic-green: #1b4332;
    --dark-green: #163b2d;
    --light-green: #2d6a4f;
    --mint-green: #40916c;
    --pale-green: #d8f3dc;
    --pale-green-light: #edfbf0;
    
    /* Accent Colors */
    --gold: #d4a373;
    --gold-dark: #b5885a;
    --gold-light: #e5c79f;
    
    /* Neutral Colors */
    --white: #ffffff;
    --bg-soft: #f8faf9;
    --bg-light: #f1f4f3;
    --text: #1a1f1e;
    --text-dark: #0f1412;
    --text-muted: #5a6b67;
    --text-light: #7a8b87;
    --border: #dde5e2;
    --border-light: #e8eee9;
    
    /* Status Colors */
    --success: #15803d;
    --warning: #d97706;
    --error: #dc2626;
    --info: #0369a1;
    
    /* Typography */
    --font-primary: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --font-heading: 'Segoe UI', 'Georgia', serif, sans-serif;
    --line-height-tight: 1.4;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.8;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

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

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-soft);
    color: var(--text);
    line-height: 1.6;
}

/* ── NAVBAR ────────────────────────────────────── */
.navbar {
    background: var(--academic-green);
    padding: 12px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.logo-container {
    display: flex;
    align-items: center;
    color: white;
    gap: 0;
}

.uni-logo {
    height: 60px;
    margin-right: 14px;
    background: white;
    padding: 5px;
    border-radius: 4px;
}

.paryavaranam-nav-logo {
    height: 50px;
    border-radius: 4px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid rgba(255,255,255,0.22);
}

.logo-text {
    line-height: 1.3;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-faculty {
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    border: 2px solid rgba(255,255,255,0.55);
    transition: all 0.2s;
    display: inline-block;
}
.btn-faculty:hover { border-color: white; background: rgba(255,255,255,0.1); }

.btn-student {
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--gold);
    color: var(--academic-green);
    border: 2px solid var(--gold);
    transition: all 0.2s;
    display: inline-block;
}
.btn-student:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: white; }

/* ── HERO ──────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, rgba(10,28,20,0.93) 0%, rgba(27,67,50,0.87) 100%),
                url('https://images.unsplash.com/photo-1470115636492-6d2b56f9146d?q=80&w=2070');
    background-size: cover;
    background-position: center;
    padding: 72px 5%;
    text-align: center;
    color: white;
}

.hero-logo {
    height: 110px;
    border-radius: 18px;
    margin-bottom: 22px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.hero-content h1 {
    font-size: 2.1rem;
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.hero-content p {
    font-size: 1.05rem;
    opacity: 0.82;
    margin: 0 auto 28px;
    max-width: 580px;
}

.cta-main {
    display: inline-block;
    background: var(--gold);
    color: var(--academic-green);
    padding: 14px 36px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.25s;
    box-shadow: 0 4px 14px rgba(212,163,115,0.4);
}
.cta-main:hover {
    background: var(--gold-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212,163,115,0.5);
}

/* ── MAIN CONTENT ──────────────────────────────── */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 4%;
}

.intro-card {
    background: white;
    padding: 28px 32px;
    border-radius: 10px;
    margin-bottom: 36px;
    border-left: 6px solid var(--academic-green);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.intro-card h2, .intro-card h3 {
    color: var(--academic-green);
    margin-top: 0;
}

.section-title {
    text-align: center;
    color: var(--academic-green);
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 6px;
}

/* ── UNIT BOXES ────────────────────────────────── */
.unit-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.unit-box {
    background: white;
    padding: 22px 16px;
    border-top: 5px solid var(--academic-green);
    flex: 1;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-radius: 0 0 10px 10px;
    transition: all 0.35s ease;
    cursor: default;
    overflow: hidden;
}

.unit-box:hover {
    background: #f9fdfb;
    box-shadow: 0 8px 24px rgba(27,67,50,0.14);
    transform: translateY(-5px);
}

.unit-box h3 {
    font-size: 1rem;
    color: var(--academic-green);
    margin: 14px 0;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
}

.unit-pill, .unit-tag {
    display: inline-block;
    background: var(--academic-green);
    color: var(--gold);
    padding: 5px 26px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.88rem;
    margin-bottom: 12px;
    border: 2px solid var(--gold);
    letter-spacing: 0.5px;
}

.unit-box:has(button:disabled) .unit-pill,
.unit-box:has(button:disabled) .unit-tag {
    background: #94a3b8;
    border-color: #cbd5e1;
    color: #f1f5f9;
}

.module-list {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.45s ease, opacity 0.3s ease;
    text-align: left;
}

.unit-box:hover .module-list {
    max-height: 380px;
    opacity: 1;
    padding-top: 14px;
    border-top: 1px dashed var(--gold);
    margin-top: 10px;
}

.module-list ul {
    padding-left: 0;
    margin: 0;
    list-style-type: none;
}

.module-list li {
    margin-bottom: 8px;
    line-height: 1.4;
    color: #475569;
    font-size: 0.87rem;
    padding-left: 18px;
    position: relative;
}

.module-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--mint-green);
    font-weight: bold;
}

/* ── DASHBOARD ─────────────────────────────────── */
.dashboard-header { padding: 10px 3%; }
.dashboard-grid   { flex-wrap: wrap; }

/* Course-name banner — sits above the Mastery Learning Policy card on every
   student dashboard, naming the specific course for that programme. */
.dashboard-course-banner {
    background: var(--academic-green);
    border-radius: 10px;
    padding: 16px 28px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
}
.dashboard-course-banner .course-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold-light);
    font-weight: 700;
    margin-bottom: 4px;
}
.dashboard-course-banner .course-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: white;
}

/* Curriculum Structure section on a dashboard — same look as the informational
   unit-box cards, without the progress-tracking behaviour of .dash-box. */
.curriculum-structure { margin-top: 8px; margin-bottom: 36px; }

.student-info-header {
    text-align: right;
    color: white;
    line-height: 1.7;
    font-size: 0.9rem;
}

.student-main-line { font-size: 0.95rem; }
.student-sub-line  { font-size: 0.82rem; opacity: 0.85; }

.header-right-group {
    display: flex;
    align-items: center;
    gap: 22px;
}

.mastery-policy {
    border-left-color: var(--gold);
    background: #fffdf7;
}

.mastery-policy ul { padding-left: 20px; }
.mastery-policy li { margin-bottom: 8px; }

.dash-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 300px;
    justify-content: flex-start;
}

.dash-unit-title {
    font-size: 0.95rem !important;
    min-height: 64px !important;
    margin-bottom: 16px !important;
}

.progress-container       { margin: 12px 0; text-align: left; width: 100%; }
.progress-container label { font-size: 0.84rem; font-weight: 600; color: var(--text-muted); }

.progress-bar-bg {
    background: #e2e8f0;
    height: 8px;
    border-radius: 20px;
    margin-top: 6px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--light-green), var(--mint-green));
    height: 100%;
    border-radius: 20px;
    transition: width 0.8s ease;
}

.avg-score { font-size: 0.9rem; margin-bottom: 16px; color: var(--text-muted); }
.avg-score strong { color: var(--academic-green); }

.btn-enter {
    background: var(--academic-green);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.25s;
    margin-top: auto;
}
.btn-enter:hover:not(:disabled) {
    background: var(--light-green);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27,67,50,0.22);
}
.btn-enter:disabled { background: #cbd5e1; color: #94a3b8; cursor: not-allowed; }

/* ── LOGOUT & SHARED HEADER BUTTONS ────────────── */
.btn-logout {
    background: #550f14;
    color: white;
    border: 1.2px solid white;
    padding: 4px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
}
.btn-logout:hover { background: white; color: #c1121f; }

/* ── CREDITS ───────────────────────────────────── */
.credits {
    background: white;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-top: 48px;
}

.credit-item {
    padding: 32px 28px;
    text-align: center;
    border-right: 1px solid var(--border);
    font-size: 0.9rem;
    line-height: 1.8;
}

.credit-item:last-child { border-right: none; }

.credit-item > strong {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.credit-item p {
    margin: 2px 0;
    color: var(--academic-green);
    font-weight: 600;
}

/* ── FOOTER ────────────────────────────────────── */
.footer {
    background: var(--academic-green);
    color: white;
    text-align: center;
    padding: 28px 5%;
    border-top: 4px solid var(--gold);
    font-size: 0.88rem;
    line-height: 1.9;
}

/* ── AUTH / LOGIN PAGE ─────────────────────────── */
.login-page-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: white;
    width: 100%;
    max-width: 480px;
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-top: 6px solid var(--academic-green);
}

.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 11px;
    background: none;
    border: none;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.tab-btn.active {
    color: var(--academic-green);
    border-bottom: 3px solid var(--academic-green);
}

.form-row { display: flex; gap: 12px; }

.input-group { margin-bottom: 14px; flex: 1; text-align: left; }

.input-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--academic-green);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.input-group input:focus, .input-group select:focus { border-color: var(--light-green); }

.google-btn {
    background: white;
    color: #3c4043;
    border: 1px solid #dadce0;
    padding: 11px;
    border-radius: 6px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 14px;
    transition: all 0.2s;
    font-family: inherit;
}
.google-btn:hover { background: #f8f9fa; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

.google-btn-reg { background: var(--academic-green); color: white; border: none; }
.google-btn-reg:hover { background: var(--light-green); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

.google-icon-svg { width: 18px; height: 18px; margin-right: 12px; flex-shrink: 0; }

.error-msg {
    display: none;
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 6px;
    margin-top: 14px;
    font-size: 0.85rem;
    border-left: 4px solid #f87171;
}

.back-link { margin-top: 20px; text-align: center; font-size: 0.85rem; }
.back-link a { color: var(--gold); text-decoration: none; font-weight: 700; }
.back-link a:hover { color: var(--gold-dark); }

/* ── HEADINGS - PROFESSIONAL ACADEMIC TYPOGRAPHY ──── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--academic-green);
    line-height: var(--line-height-tight);
    margin-bottom: 0.8rem;
}

h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.3px; }
h2 { font-size: 1.8rem; font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 700; }
h5 { font-size: 1rem; font-weight: 700; }
h6 { font-size: 0.95rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

p { color: var(--text); line-height: var(--line-height-normal); margin: 0 0 1rem 0; }

strong { font-weight: 700; color: var(--academic-green); }

a { color: var(--light-green); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--mint-green); text-decoration: underline; }

/* ── TEXT VISIBILITY ON DARK BACKGROUNDS ─────────── */
/* Global heading/p/strong rules override inherited color; restore white explicitly */
.navbar strong,
.navbar p,
.navbar .logo-text { color: white; }

.hero h1, .hero h2, .hero h3,
.hero h4, .hero h5, .hero h6 { color: white; }
.hero p, .hero strong { color: rgba(255, 255, 255, 0.88); }

.footer p, .footer strong { color: white; }

/* ── CARD ENHANCEMENTS ─────────────────────────── */
.card, .intro-card, .unit-box, .auth-card {
    transition: all var(--transition-normal);
}

/* ── BUTTONS - PROFESSIONAL ACADEMIC STYLES ──────── */
button, .btn-faculty, .btn-student, .btn-enter, .cta-main {
    font-family: var(--font-primary);
    letter-spacing: 0.2px;
}

/* Primary Button Style */
.btn-primary {
    background: var(--academic-green);
    color: white;
    border: none;
    padding: 11px 24px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-primary:hover { background: var(--light-green); box-shadow: var(--shadow-md); }

/* Secondary Button Style */
.btn-secondary {
    background: var(--white);
    color: var(--academic-green);
    border: 2px solid var(--academic-green);
    padding: 9px 22px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-secondary:hover { background: var(--pale-green-light); border-color: var(--light-green); }

/* ── TABLES & LISTS ────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

table thead {
    background: var(--academic-green);
    color: white;
}

table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

table tbody tr:hover {
    background: var(--bg-light);
}

/* ── BADGES ────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-success { background: #d1fae5; color: var(--success); }
.badge-warning { background: #fef3c7; color: var(--warning); }
.badge-error { background: #fee2e2; color: var(--error); }
.badge-info { background: #cffafe; color: var(--info); }
.badge-green { background: var(--pale-green); color: var(--academic-green); border: 1px solid var(--mint-green); }

/* ── ALERTS ────────────────────────────────────── */
.alert {
    padding: 14px 16px;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    font-size: 0.95rem;
    line-height: var(--line-height-normal);
}

.alert-success { background: #d1fae5; border-left-color: var(--success); color: var(--success); }
.alert-warning { background: #fef3c7; border-left-color: var(--warning); color: var(--warning); }
.alert-error { background: #fee2e2; border-left-color: var(--error); color: var(--error); }
.alert-info { background: #cffafe; border-left-color: var(--info); color: var(--info); }

/* ── PAGE SECTIONS ─────────────────────────────── */
.page-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.section-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

/* ── FORM ENHANCEMENTS ───────────────────────── */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--academic-green);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-control {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--light-green);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.form-control:disabled {
    background: var(--bg-light);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 900px) {
    .unit-row { flex-wrap: wrap; }
    .unit-box  { min-width: 45%; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
}

@media (max-width: 600px) {
    .unit-row      { flex-direction: column; }
    .unit-box      { min-width: 100%; }
    .hero-content h1 { font-size: 1.5rem; }
    .credits       { grid-template-columns: 1fr; }
    .credit-item   { border-right: none; border-bottom: 1px solid var(--border); }
    .credit-item:last-child { border-bottom: none; }
    .page-head { flex-direction: column; align-items: flex-start; }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }

    /* Navbar: hide Paryavaranam logo, shrink SCSVMV logo, compact buttons */
    .navbar { padding: 8px 3%; }
    .paryavaranam-nav-logo { display: none; }
    .uni-logo { height: 42px; margin-right: 10px; }
    .logo-text { font-size: 0.78rem; }
    .btn-faculty, .btn-student { padding: 6px 12px; font-size: 0.82rem; }
    .header-right-group { gap: 10px; }
    .student-info-header { font-size: 0.8rem; }

    /* Hero: more breathing room on narrow screens */
    .hero { padding: 48px 4%; }
    .hero-logo { height: 80px; }
    .hero-content p { font-size: 0.95rem; }
    .cta-main { padding: 12px 24px; font-size: 0.88rem; }

    /* Auth card: tighter padding */
    .auth-card { padding: 24px 18px; }
    .form-row { flex-direction: column; gap: 0; }
}

/* ── Unit Topics Modal (mobile / tablet tap-to-see) ────────── */
.unit-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.52);
  z-index: 300;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
}
.unit-modal-overlay.active { display: flex; }

.unit-modal-sheet {
  background: white;
  border-radius: 18px 18px 0 0;
  padding: 22px 20px 36px;
  width: 100%;
  max-height: 72vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideUpSheet 0.26s ease;
}
@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.unit-modal-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.unit-modal-pill-sm {
  display: inline-block;
  background: var(--academic-green);
  color: var(--gold);
  padding: 4px 14px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.8rem;
  border: 1.5px solid var(--gold);
  letter-spacing: 0.5px;
}
.unit-modal-close-btn {
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  border-radius: 7px;
  padding: 6px 13px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.unit-modal-close-btn:hover { background: var(--border); }
.unit-modal-heading {
  font-size: 1rem;
  font-weight: 800;
  color: var(--academic-green);
  margin: 0 0 16px;
  line-height: 1.38;
}
.unit-modal-list {
  list-style: none;
  padding: 14px 0 0;
  margin: 0;
  border-top: 1px dashed var(--gold);
}
.unit-modal-list li {
  padding: 9px 0 9px 20px;
  position: relative;
  color: #334155;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.45;
  margin: 0;
}
.unit-modal-list li:last-child { border-bottom: none; }
.unit-modal-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--mint-green);
  font-weight: bold;
}

/* Hint text — switched by media query */
.unit-hint-mobile  { display: none; }
.unit-hint-desktop { display: block; }

@media (max-width: 768px) {
  /* Make unit boxes with topics tappable */
  .unit-box { cursor: pointer; }

  /* Disable the CSS hover expansion on touch screens */
  .unit-box:hover .module-list {
    max-height: 0 !important;
    opacity: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    margin-top: 0 !important;
  }

  /* Switch hint text */
  .unit-hint-mobile  { display: block; }
  .unit-hint-desktop { display: none; }
}

/* Very small phones */
@media (max-width: 400px) {
    .logo-text { display: none; }
    .navbar { padding: 7px 3%; }
    h1 { font-size: 1.3rem; }
}
