/* =========================================================
   ADULLAM LEARNING — STUDENT EXPERIENCE
   Premium learning app with YouTube-style video player
   ========================================================= */

:root {
    --student-sidebar-w: 224px;
    --student-header-h: 72px;
    --student-bottom-nav-h: 68px;
}

/* ─── Shell ──────────────────────────────────────────── */
.student-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: var(--student-sidebar-w) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
}

/* ─── Sidebar ────────────────────────────────────────── */
.student-sidebar {
    position: sticky;
    z-index: 50;
    top: 0;
    align-self: start;
    width: var(--student-sidebar-w);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px 12px max(16px, var(--safe-bottom));
    color: #dce7f7;
    background:
        radial-gradient(ellipse 50% 40% at 10% -8%, rgba(99,102,241,.28), transparent),
        radial-gradient(ellipse 50% 50% at 100% 88%, rgba(6,182,212,.16), transparent),
        radial-gradient(ellipse 35% 30% at 50% 50%, rgba(124,58,237,.06), transparent),
        linear-gradient(180deg, #070f1e 0%, #091526 45%, #060e1a 100%);
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: 18px 0 48px rgba(5,12,24,.10);
}
.student-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .18;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 20px 20px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}
.student-sidebar-brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 14px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.student-brand-mark {
    position: relative;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, #7074ff, #4f46e5, #4338ca);
    background-size: 200% 200%;
    border: 1px solid rgba(255,255,255,.20);
    box-shadow: 0 8px 22px rgba(67,56,202,.32), inset 0 1px 0 rgba(255,255,255,.25);
    font-size: .85rem;
    font-weight: 900;
    animation: uiGradientShift 6s ease infinite;
}
.student-sidebar-brand > span:last-child { min-width: 0; display: grid; line-height: 1.15; }
.student-sidebar-brand strong { color: #f8fbff; font-size: .87rem; }
.student-sidebar-brand small { margin-top: 4px; color: #6d829e; font-size: .64rem; }

.student-sidebar-nav { position: relative; display: grid; gap: 4px; }
.student-sidebar-nav .nav-section-label { color: #4e6380; }
.student-sidebar-nav a {
    position: relative;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #8c9db6;
    font-size: .77rem;
    font-weight: 680;
    transition: color var(--fast), background var(--fast), transform var(--fast), border-color var(--fast), box-shadow var(--fast);
}
.student-sidebar-nav a svg { width: 17px; height: 17px; color: #6a7f9c; transition: color var(--fast), transform var(--fast); }
.student-sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,.06); transform: translateX(3px); }
.student-sidebar-nav a:hover svg { color: #a5b4fc; transform: scale(1.1); }
.student-sidebar-nav a.active {
    color: #fff;
    background: linear-gradient(100deg, rgba(99,102,241,.20), rgba(6,182,212,.08));
    border-color: rgba(129,140,248,.14);
    box-shadow: inset 3px 0 0 #818cf8, 0 4px 16px rgba(0,0,0,.10);
}
.student-sidebar-nav a.active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #818cf8, #06b6d4);
    box-shadow: 0 0 10px rgba(129,140,248,.5);
}
.student-sidebar-nav a.active svg { color: #a5b4fc; }

.student-sidebar > #student-logout-button {
    position: relative;
    margin-top: auto;
    width: 100%;
    color: #8c9db6;
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.07);
    box-shadow: none;
}
.student-sidebar > #student-logout-button:hover { color: #fda4af; background: rgba(244,63,94,.10); border-color: rgba(244,63,94,.14); }

/* ─── Header ─────────────────────────────────────────── */
.student-header {
    position: sticky;
    top: 0;
    z-index: 30;
    grid-column: 2;
    min-width: 0;
    min-height: var(--student-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px clamp(18px, 2.2vw, 32px);
    background: rgba(240,244,250,.82);
    border-bottom: 1px solid rgba(30,48,76,.06);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}
.student-header::after {
    content: "";
    position: absolute;
    left: clamp(18px, 2.2vw, 32px);
    bottom: -1px;
    width: 68px;
    height: 2.5px;
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    box-shadow: 0 0 12px rgba(99,102,241,.35);
}
.student-header-title { display: grid; line-height: 1.15; }
.student-header-title strong { color: var(--ink-950); font-size: .91rem; }
.student-header-title small { margin-top: 5px; color: var(--ink-500); font-size: .66rem; }
.student-header-actions { display: flex; align-items: center; gap: 8px; }
.student-header-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(5,150,105,.12);
    border-radius: 999px;
    color: var(--emerald-600);
    background: linear-gradient(135deg, #effcf7, #e0fbef);
    font-size: .67rem;
    font-weight: 760;
    transition: transform var(--fast);
}
.student-header-status:hover { transform: scale(1.03); }
.student-header-status svg { width: 14px; height: 14px; }

/* ─── Main ───────────────────────────────────────────── */
.student-main {
    grid-column: 2;
    min-width: 0;
    padding: 18px clamp(18px, 2.2vw, 32px) 40px;
}

/* ─── Hero ────────────────────────────────────────────── */
.student-hero {
    position: relative;
    isolation: isolate;
    min-height: 148px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    overflow: hidden;
    margin-bottom: 14px;
    padding: 24px 26px;
    border: 1px solid rgba(99,102,241,.10);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(ellipse 60% 50% at 92% -10%, rgba(99,102,241,.18), transparent),
        radial-gradient(ellipse 50% 60% at 68% 120%, rgba(6,182,212,.12), transparent),
        radial-gradient(ellipse 30% 30% at 20% 80%, rgba(124,58,237,.06), transparent),
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(243,246,255,.92));
    box-shadow: var(--shadow-sm);
    animation: uiEnter .45s var(--ease) both;
}
.student-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    right: 10%;
    top: -70%;
    width: 160px;
    aspect-ratio: 1;
    border: 1px solid rgba(99,102,241,.08);
    border-radius: 50%;
    box-shadow: 0 0 0 24px rgba(99,102,241,.02), 0 0 0 48px rgba(6,182,212,.015);
    animation: uiFloat 8s ease-in-out infinite;
}
.student-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: -5%;
    bottom: -50%;
    width: 120px;
    aspect-ratio: 1;
    border: 1px solid rgba(6,182,212,.06);
    border-radius: 50%;
    animation: uiFloat 10s ease-in-out infinite reverse;
}
.student-hero h1 { margin-bottom: 7px; max-width: 760px; }
.student-hero .student-muted { max-width: 700px; margin: 0; font-size: .78rem; line-height: 1.62; }
.student-hero-action {
    min-height: 46px;
    color: #fff;
    background: linear-gradient(135deg, #5b52f0, #4f46e5, #4338ca);
    box-shadow: var(--shadow-glow);
    animation: uiPulseGlow 3s ease-in-out infinite;
}
.student-hero-action:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-glow-lg);
    animation: none;
}
.student-course-hero-image {
    width: min(260px, 26vw);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 18px;
    border: 2px solid rgba(255,255,255,.8);
    box-shadow: var(--shadow-md);
    transition: transform .5s var(--ease), box-shadow .5s;
}
.student-hero:hover .student-course-hero-image { transform: scale(1.02); box-shadow: var(--shadow-lg); }

/* ─── Dashboard Stats ────────────────────────────────── */
.student-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.student-stat-card {
    --tone: #4f46e5;
    --soft: rgba(79,70,229,.07);
    --glow: rgba(79,70,229,.16);
    position: relative;
    overflow: hidden;
    min-height: 90px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255,255,255,.90);
    box-shadow: var(--shadow-xs);
    backdrop-filter: blur(10px);
    transition: transform var(--normal) var(--spring), box-shadow var(--normal), border-color var(--normal);
    animation: uiEnter .42s var(--ease) both;
}
.student-stat-card:nth-child(2) { animation-delay: .05s; }
.student-stat-card:nth-child(3) { animation-delay: .10s; }
.student-stat-card:nth-child(4) { animation-delay: .15s; }
.student-stat-card[data-tone="green"] { --tone: #059669; --soft: rgba(16,185,129,.07); --glow: rgba(16,185,129,.16); }
.student-stat-card[data-tone="amber"] { --tone: #d97706; --soft: rgba(245,158,11,.08); --glow: rgba(245,158,11,.16); }
.student-stat-card[data-tone="violet"] { --tone: #7c3aed; --soft: rgba(124,58,237,.07); --glow: rgba(124,58,237,.16); }
.student-stat-card::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 2.5px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, var(--tone), transparent);
    opacity: .6;
    box-shadow: 0 0 10px var(--glow);
}
.student-stat-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-sm);
    border-color: rgba(99,102,241,.12);
}
.student-stat-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--tone);
    background: var(--soft);
    border: 1px solid rgba(99,102,241,.06);
    transition: transform var(--fast), box-shadow var(--fast);
}
.student-stat-card:hover .student-stat-icon { transform: scale(1.08); box-shadow: 0 0 14px var(--glow); }
.student-stat-icon svg { width: 19px; height: 19px; }
.student-stat-card > span:last-child { min-width: 0; display: grid; line-height: 1.15; }
.student-stat-card small { color: var(--ink-500); font-size: .65rem; font-weight: 680; }
.student-stat-card strong { margin-top: 5px; color: var(--ink-950); font-size: 1.2rem; font-weight: 830; letter-spacing: -.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#student-batch-name { font-size: .85rem; }

/* ─── Dashboard Grid ─────────────────────────────────── */
.student-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .7fr); gap: 12px; }
.student-panel { padding: 18px; animation: uiEnter .46s var(--ease) both; }
.student-section-header { margin-bottom: 13px; }
.student-form-message { align-self: center; text-align: right; }

/* Generated assigned course */
.student-course-card {
    display: grid;
    grid-template-columns: minmax(190px, .45fr) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(150deg, rgba(255,255,255,.95), rgba(243,246,255,.9));
    box-shadow: var(--shadow-xs);
    transition: transform var(--normal) var(--spring), box-shadow var(--normal), border-color var(--normal);
}
.student-course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(99,102,241,.12); }
.student-course-image { min-height: 190px; overflow: hidden; background: linear-gradient(135deg, #e8edff, #e0f7fa); }
.student-course-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.student-course-card:hover .student-course-image img { transform: scale(1.05); }
.student-course-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; padding: 18px; }
.student-course-body h3 { margin: 0; font-size: 1.14rem; }
.student-course-description { margin: 0; color: var(--ink-500); font-size: .74rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.student-course-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.student-course-meta span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--ink-600);
    background: linear-gradient(135deg, var(--ink-50), rgba(238,242,255,.4));
    border: 1px solid var(--border);
    font-size: .63rem;
    font-weight: 680;
}
.student-course-link {
    min-height: 40px;
    padding: 8px 14px;
    margin-top: 3px;
    color: #fff;
    background: linear-gradient(135deg, var(--ink-900), #1a2d48);
    border-color: var(--ink-900);
    font-size: .7rem;
    box-shadow: 0 4px 14px rgba(10,21,37,.20);
}
.student-course-link:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--primary-700), #3730a3);
    border-color: var(--primary-700);
    box-shadow: var(--shadow-glow);
}

/* Learning Snapshot */
.student-dashboard-lessons { display: grid; gap: 7px; }
.student-dashboard-lesson {
    display: grid;
    grid-template-columns: 60px 32px minmax(0,1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 64px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,.95);
    transition: transform var(--fast), border-color var(--fast), box-shadow var(--fast);
}
.student-dashboard-lesson:hover { transform: translateX(3px); border-color: rgba(99,102,241,.14); box-shadow: var(--shadow-xs); }
.student-dashboard-lesson-thumbnail { width: 60px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: var(--ink-100); }
.student-dashboard-lesson-number {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--primary-700);
    background: linear-gradient(135deg, var(--primary-50), rgba(207,250,254,.3));
    border: 1px solid rgba(99,102,241,.08);
    font-size: .65rem;
    font-weight: 820;
}
.student-dashboard-lesson > span:nth-of-type(2) { min-width: 0; display: grid; }
.student-dashboard-lesson strong { color: var(--ink-800); font-size: .71rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-dashboard-lesson small { margin-top: 3px; color: var(--ink-500); font-size: .61rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-dashboard-lesson-action { color: var(--primary-600); font-size: .63rem; font-weight: 760; transition: transform var(--fast); }
.student-dashboard-lesson-action:hover { transform: translateX(2px); }
.student-panel-link {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    margin-top: 11px;
    padding: 8px 11px;
    border-radius: 12px;
    color: var(--primary-700);
    background: linear-gradient(135deg, var(--primary-50), rgba(207,250,254,.2));
    font-size: .68rem;
    font-weight: 760;
    border: 1px solid rgba(99,102,241,.06);
    transition: background var(--fast), border-color var(--fast), transform var(--fast);
}
.student-panel-link:hover { background: var(--primary-100); border-color: rgba(99,102,241,.12); transform: translateX(2px); }
.student-empty-icon { width: 44px; height: 44px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 14px; color: var(--primary-600); background: var(--primary-50); }

/* ─── Course Workspace ───────────────────────────────── */
.student-course-layout { display: grid; grid-template-columns: minmax(260px, .34fr) minmax(0, .66fr); gap: 14px; align-items: start; }
.student-course-layout > .student-panel:first-child { position: sticky; top: calc(var(--student-header-h) + 14px); }

/* Lesson Playlist (YouTube-style) */
.student-lesson-list {
    display: grid;
    gap: 6px;
    max-height: calc(100dvh - 200px);
    overflow: auto;
    padding-right: 3px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99,102,241,.2) transparent;
}
.student-lesson-button {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px;
    color: var(--ink-700);
    background: rgba(255,255,255,.95);
    text-align: left;
    transition: transform var(--fast), border-color var(--fast), box-shadow var(--fast), background var(--fast);
}
.student-lesson-button:hover {
    transform: translateX(3px);
    border-color: rgba(99,102,241,.14);
    box-shadow: var(--shadow-xs);
}
.student-lesson-button.active {
    color: var(--primary-700);
    border-color: rgba(99,102,241,.22);
    background: linear-gradient(135deg, var(--primary-50), #eefbff);
    box-shadow: inset 3px 0 0 var(--primary-500), 0 2px 8px rgba(99,102,241,.08);
}
.student-lesson-button.active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #6366f1, #06b6d4);
    box-shadow: 0 0 8px rgba(99,102,241,.40);
}
.student-lesson-thumbnail {
    width: 76px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
    background: var(--ink-100);
    position: relative;
}
.student-lesson-copy { min-width: 0; display: grid; gap: 4px; }
.student-lesson-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .71rem; }
.student-lesson-copy span { color: var(--ink-500); font-size: .62rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ─── YouTube-Style Video Player ─────────────────────── */
.student-video-player {
    min-width: 0;
    overflow: hidden;
    margin-top: 14px;
    border-radius: 20px;
    background: #060e1a;
    box-shadow: 0 12px 40px rgba(5,10,20,.25), 0 0 0 1px rgba(255,255,255,.04);
    transition: box-shadow .4s;
}
.student-video-player:hover { box-shadow: 0 16px 50px rgba(5,10,20,.32), 0 0 0 1px rgba(99,102,241,.08); }
.student-video-player:empty {
    min-height: 260px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(99,102,241,.06), transparent),
        linear-gradient(145deg, #070f1e, #0c1828);
}
.student-video-player:empty::before {
    content: "▶";
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(99,102,241,.12);
    border: 2px solid rgba(99,102,241,.20);
    color: rgba(99,102,241,.5);
    font-size: 1.2rem;
    margin-bottom: 8px;
    animation: uiPulseGlow 3s ease-in-out infinite;
}
.student-video-player:empty::after {
    content: "Choose a lesson to begin";
    color: #5e7494;
    font-size: .73rem;
    font-weight: 660;
}
.student-video-player > video {
    display: block;
    width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto !important;
    background: #000;
}

/* Video Player Shell (generated by video-player.js) */
.video-player-shell {
    overflow: hidden;
    border-radius: inherit;
    background: #060e1a;
}
.video-player-stage {
    position: relative;
    display: grid;
    place-items: center;
    background: #000;
}
.responsive-video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; border-radius: 0; }
.video-player-stage video { width: 100%; aspect-ratio: 16 / 9; height: auto; display: block; }

/* YouTube-style Controls Bar */
.video-player-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    padding: 8px 10px;
    background: linear-gradient(180deg, #0a1525, #060e1a);
    border-top: 1px solid rgba(255,255,255,.04);
    scrollbar-width: none;
}
.video-player-toolbar::-webkit-scrollbar { display: none; }
.video-control-button, .video-control-link {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 10px;
    color: #b8c8dc;
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.06);
    box-shadow: none;
    font-size: .64rem;
    transition: color var(--fast), background var(--fast), transform var(--fast), box-shadow var(--fast);
}
.video-control-button:hover, .video-control-link:hover {
    color: #fff;
    background: rgba(99,102,241,.22);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,.15);
}
.video-speed-select {
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    padding: 5px 28px 5px 9px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    color: #b8c8dc;
    background: #0e1a2c;
    box-shadow: none;
    font-size: .64rem;
}
.video-error-message {
    padding: 18px;
    color: #fecdd3;
    background: linear-gradient(135deg, #2a1019, #1e0a12);
    font-size: .72rem;
    border-top: 1px solid rgba(244,63,94,.15);
}

/* ─── Materials ──────────────────────────────────────── */
.student-materials-panel { margin-top: 14px; }
.student-materials-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.student-material-card {
    min-width: 0;
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(150deg, rgba(255,255,255,.95), rgba(243,246,255,.88));
    box-shadow: var(--shadow-xs);
    transition: transform var(--fast) var(--spring), box-shadow var(--fast), border-color var(--fast);
}
.student-material-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99,102,241,.14);
    box-shadow: var(--shadow-sm);
}
.student-material-card strong { color: var(--ink-800); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-material-card .muted { margin: 0; font-size: .65rem; line-height: 1.45; }
.student-material-link {
    justify-self: start;
    min-height: 38px;
    padding: 8px 12px;
    color: var(--primary-700);
    background: linear-gradient(135deg, var(--primary-50), rgba(207,250,254,.2));
    border-color: rgba(99,102,241,.10);
    font-size: .66rem;
    transition: background var(--fast), transform var(--fast), box-shadow var(--fast);
}
.student-material-link:hover {
    background: var(--primary-100);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,.10);
}

/* ─── Student Login ──────────────────────────────────── */
.student-login-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(420px, .75fr);
    overflow: hidden;
    background: #060e1a;
}
.student-login-visual {
    position: relative;
    min-width: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 6vw;
    background:
        radial-gradient(ellipse 50% 40% at 25% 18%, rgba(99,102,241,.38), transparent),
        radial-gradient(ellipse 40% 40% at 75% 80%, rgba(6,182,212,.22), transparent),
        radial-gradient(ellipse 30% 25% at 50% 50%, rgba(124,58,237,.10), transparent),
        linear-gradient(145deg, #060e1a, #0a1830 55%, #0e1a30);
}
.student-login-visual::before,
.student-login-visual::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.06); border-radius: 50%; }
.student-login-visual::before { width: 48vw; max-width: 680px; aspect-ratio: 1; left: -20vw; top: -20vw; animation: uiFloat 10s ease-in-out infinite; }
.student-login-visual::after { width: 34vw; max-width: 480px; aspect-ratio: 1; right: -14vw; bottom: -15vw; animation: uiFloat 12s ease-in-out infinite reverse; }
.student-login-visual img {
    position: relative;
    z-index: 1;
    width: min(620px, 88%);
    max-height: 76dvh;
    object-fit: contain;
    filter: drop-shadow(0 28px 50px rgba(0,0,0,.28));
    animation: uiFloat 7s ease-in-out infinite;
}
.student-login-workspace {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: max(30px, calc(var(--safe-top) + 22px)) max(28px, calc(var(--safe-right) + 22px)) max(24px, calc(var(--safe-bottom) + 22px)) max(28px, calc(var(--safe-left) + 22px));
    background:
        radial-gradient(ellipse 50% 40% at 100% -5%, rgba(99,102,241,.08), transparent),
        radial-gradient(ellipse 40% 30% at 0% 100%, rgba(6,182,212,.05), transparent),
        #f3f6fc;
}
.student-login-card {
    width: min(420px, 100%);
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    animation: uiScaleIn .5s var(--spring) both;
}
.student-login-heading { margin-bottom: 22px; text-align: center; }
.student-login-mobile-brand {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(145deg, #6d70ff, #4f46e5, #4338ca);
    background-size: 200% 200%;
    box-shadow: var(--shadow-glow);
    font-weight: 900;
    animation: uiGradientShift 6s ease infinite;
}
.student-login-heading h1 { margin-bottom: 7px; font-size: 1.5rem; }
.student-login-heading p { margin: 0; color: var(--ink-500); font-size: .76rem; }
#student-login-form { display: grid; gap: 15px; }
#student-login-form button[type="submit"] {
    min-height: 48px;
    border: 1.5px solid rgba(67,56,202,.65);
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #5b52f0, #4f46e5, #4338ca);
    box-shadow: var(--shadow-glow);
    font-weight: 760;
    font-size: .88rem;
    transition: transform var(--fast) var(--spring), box-shadow var(--normal), filter var(--fast);
}
#student-login-form button[type="submit"]:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-glow-lg);
    filter: brightness(1.06);
}
.student-login-footer { margin: 20px 0 0; color: var(--ink-400); font-size: .63rem; }

/* ─── Tablet ─────────────────────────────────────────── */
@media (max-width: 1040px) {
    :root { --student-sidebar-w: 200px; }
    .student-stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .student-dashboard-grid { grid-template-columns: 1fr; }
    .student-materials-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .student-course-layout { grid-template-columns: minmax(220px, .38fr) minmax(0,.62fr); }
}

@media (min-width: 721px) and (max-width: 980px) {
    :root { --student-sidebar-w: 76px; }

    .student-main {
        padding: 16px clamp(14px, 2.4vw, 22px) 32px;
    }

    .student-sidebar {
        align-items: center;
        gap: 14px;
        padding: 14px 10px max(14px, var(--safe-bottom));
        overflow-x: hidden;
    }

    .student-sidebar-brand {
        justify-content: center;
        width: 100%;
        padding: 8px 0 14px;
    }

    .student-brand-mark {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
        border-radius: 15px;
    }

    .student-sidebar-brand > span:last-child,
    .student-sidebar-nav .nav-section-label,
    .student-sidebar-nav a span,
    .student-sidebar > #student-logout-button span {
        display: none;
    }

    .student-sidebar-nav {
        width: 100%;
        gap: 8px;
    }

    .student-sidebar-nav a {
        justify-content: center;
        min-height: 48px;
        padding: 0;
        border-radius: 16px;
    }

    .student-sidebar-nav a:hover {
        transform: translateY(-1px);
    }

    .student-sidebar-nav a.active {
        box-shadow: inset 0 0 0 1px rgba(129,140,248,.16), 0 8px 22px rgba(5,12,24,.16);
    }

    .student-sidebar-nav a.active::before {
        left: -10px;
        height: 24px;
    }

    .student-sidebar-nav a svg {
        width: 20px;
        height: 20px;
    }

    .student-sidebar > #student-logout-button {
        width: 48px;
        min-height: 48px;
        padding: 0;
        justify-content: center;
        border-radius: 16px;
    }

    .student-header {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px;
        padding-inline: clamp(14px, 2.4vw, 22px);
    }

    .student-header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        margin-left: auto;
    }

    .student-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding: 20px;
    }

    .student-hero-action {
        justify-self: start;
    }

    .student-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }

    .student-dashboard-grid,
    .student-course-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-course-layout {
        grid-template-areas:
            "player"
            "description"
            "lessons";
    }

    .student-course-layout > .student-panel:first-child {
        position: static;
    }

    .student-lesson-list {
        max-height: none;
    }

    .student-course-card {
        grid-template-columns: minmax(190px, .38fr) minmax(0, 1fr);
    }

    .student-panel,
    .student-selected-description-block {
        border-radius: 18px;
    }

    .student-dashboard-lesson {
        grid-template-columns: 60px 32px minmax(0, 1fr);
    }

    .student-dashboard-lesson-action {
        display: none;
    }

    .student-materials-list {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    }
}

@media (max-width: 820px) {
    .student-hero { grid-template-columns: 1fr; }
    .student-course-hero-image { width: 100%; max-width: 440px; }
    .student-course-layout { grid-template-columns: 1fr; }
    .student-course-layout > .student-panel:first-child { position: static; }
    .student-lesson-list { max-height: none; }
    .student-course-card { grid-template-columns: minmax(160px, .42fr) 1fr; }
    .student-login-page { grid-template-columns: 1fr; }
    .student-login-visual { display: none; }
}

/* ─── Mobile App ─────────────────────────────────────── */
@media (max-width: 720px) {
    :root {
        --student-header-h: calc(58px + var(--safe-top));
        --student-bottom-nav-h: 66px;
    }

    body.student-dashboard-page,
    body.student-course-page,
    body:has(.student-shell) {
        padding-top: var(--app-top-bar);
        padding-bottom: calc(var(--student-bottom-nav-h) + var(--safe-bottom) + 14px);
    }

    .student-shell { display: block; min-height: 100dvh; }
    .student-main { padding: 10px 10px 18px; }

    .student-sidebar {
        position: fixed;
        inset: auto 0 0 0;
        top: auto;
        align-self: auto;
        width: auto;
        height: calc(var(--student-bottom-nav-h) + var(--safe-bottom));
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 2px;
        padding: 5px max(7px, var(--safe-right)) max(5px, var(--safe-bottom)) max(7px, var(--safe-left));
        overflow: visible;
        border: 0;
        border-top: 1px solid rgba(255,255,255,.08);
        background: rgba(6,14,26,.97);
        box-shadow: 0 -10px 32px rgba(5,10,20,.28);
        backdrop-filter: blur(22px) saturate(125%);
    }
    .student-sidebar::before, .student-sidebar-brand, .student-sidebar-nav .nav-section-label { display: none; }
    .student-sidebar-nav { flex: 2; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 2px; }
    .student-sidebar-nav a,
    .student-sidebar > #student-logout-button {
        min-width: 0;
        min-height: 54px;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 5px 4px;
        border-radius: 12px;
        font-size: .56rem;
        line-height: 1.05;
    }
    .student-sidebar-nav a svg, .student-sidebar > #student-logout-button svg { width: 19px; height: 19px; }
    .student-sidebar-nav a:hover { transform: none; }
    .student-sidebar-nav a.active {
        box-shadow: inset 0 0 0 1px rgba(129,140,248,.14);
        background: rgba(99,102,241,.18);
    }
    .student-sidebar-nav a.active::before { display: none; }
    .student-sidebar-nav a.active::after {
        content: "";
        display: block;
        width: 16px;
        height: 2.5px;
        margin: 2px auto 0;
        border-radius: 999px;
        background: linear-gradient(90deg, #818cf8, #22d3ee);
        box-shadow: 0 0 8px rgba(129,140,248,.45);
    }
    .student-sidebar > #student-logout-button { flex: 1; margin: 0; width: auto; color: #fda4af; background: transparent; border-color: transparent; box-shadow: none; }

    .student-header {
        top: 0;
        min-height: var(--student-header-h);
        padding: calc(var(--safe-top) + 9px) 12px 9px;
        background: rgba(240,244,250,.94);
    }
    .student-header::after { left: 12px; width: 46px; }
    .student-header-title strong { font-size: .82rem; }
    .student-header-title small { display: none; }
    .student-header-status { min-height: 30px; padding: 5px 8px; font-size: .58rem; }
    .student-secondary-link { min-height: 36px; padding: 7px 9px; border-radius: 11px; font-size: .62rem; }
    .student-secondary-link span { display: none; }

    .student-hero {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 13px;
        margin-bottom: 8px;
        padding: 16px;
        border-radius: 20px;
    }
    .student-hero::before { width: 100px; right: -8%; }
    .student-hero::after { display: none; }
    .student-hero h1 { margin-bottom: 5px; font-size: 1.26rem; }
    .student-hero .eyebrow { font-size: .55rem; }
    .student-hero .student-muted { font-size: .67rem; line-height: 1.5; }
    .student-hero-action { min-height: 42px; justify-self: start; padding: 8px 12px; border-radius: 12px; font-size: .66rem; animation: none; }
    .student-course-hero-image { width: 100%; max-width: none; aspect-ratio: 16 / 7.6; border-radius: 14px; }

    .student-stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; margin-bottom: 8px; }
    .student-stat-card { min-height: 78px; gap: 9px; padding: 11px; border-radius: 15px; }
    .student-stat-card::after { left: 11px; right: 11px; }
    .student-stat-icon { flex-basis: 36px; width: 36px; height: 36px; border-radius: 11px; }
    .student-stat-icon svg { width: 16px; height: 16px; }
    .student-stat-card small { font-size: .55rem; }
    .student-stat-card strong { margin-top: 4px; font-size: 1rem; }
    #student-batch-name { font-size: .68rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

    .student-dashboard-grid { gap: 8px; }
    .student-panel { padding: 12px; border-radius: 18px; }
    .student-section-header { margin-bottom: 9px; gap: 8px; }
    .student-section-header h2 { font-size: .97rem; }
    .student-form-message { max-width: 42%; font-size: .56rem; text-align: right; }

    .student-course-card { grid-template-columns: 1fr; border-radius: 15px; }
    .student-course-image { min-height: 0; aspect-ratio: 16 / 7.2; }
    .student-course-body { gap: 8px; padding: 12px; }
    .student-course-body h3 { font-size: 1rem; }
    .student-course-description { font-size: .65rem; -webkit-line-clamp: 2; }
    .student-course-meta span { min-height: 24px; padding: 4px 7px; font-size: .55rem; }
    .student-course-link { min-height: 38px; padding: 7px 11px; font-size: .62rem; }

    .student-dashboard-lesson { grid-template-columns: 52px 28px minmax(0,1fr); gap: 7px; min-height: 58px; padding: 6px; }
    .student-dashboard-lesson-thumbnail { width: 52px; }
    .student-dashboard-lesson-number { width: 28px; height: 28px; border-radius: 9px; font-size: .58rem; }
    .student-dashboard-lesson strong { font-size: .65rem; }
    .student-dashboard-lesson small { font-size: .55rem; }
    .student-dashboard-lesson-action { display: none; }
    .student-panel-link { min-height: 38px; margin-top: 8px; font-size: .61rem; }

    .student-course-layout { gap: 8px; }
    .student-course-layout > .student-panel:first-child { position: static; }
    .student-lesson-list {
        display: flex;
        gap: 7px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        margin: 0 -12px;
        padding: 1px 12px 5px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .student-lesson-list::-webkit-scrollbar { display: none; }
    .student-lesson-button { flex: 0 0 min(78vw, 285px); grid-template-columns: 64px minmax(0,1fr); gap: 8px; scroll-snap-align: start; padding: 7px; border-radius: 13px; }
    .student-lesson-thumbnail { width: 64px; }
    .student-lesson-copy strong { font-size: .64rem; }
    .student-lesson-copy span { font-size: .55rem; }

    /* Mobile Video Player */
    .student-video-player { margin-top: 9px; border-radius: 16px; }
    .student-video-player:empty { min-height: 195px; }
    .student-video-player:empty::before { width: 44px; height: 44px; font-size: .95rem; }
    .video-player-toolbar { padding: 6px 8px; gap: 4px; }
    .video-control-button, .video-control-link, .video-speed-select { min-height: 33px; font-size: .57rem; border-radius: 9px; }

    .student-materials-panel { margin-top: 8px; }
    .student-materials-list { grid-template-columns: 1fr; gap: 7px; }
    .student-material-card { grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px 8px; padding: 11px; border-radius: 14px; }
    .student-material-card strong, .student-material-card .muted { grid-column: 1; }
    .student-material-link { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-height: 36px; font-size: .58rem; }

    .ui-menu-toggle, .admin-sidebar-backdrop { display: none !important; }

    .student-login-page { min-height: 100dvh; display: block; background: #f3f6fc; }
    .student-login-workspace {
        min-height: 100dvh;
        justify-content: center;
        padding: calc(var(--safe-top) + 20px) max(14px, var(--safe-right)) calc(var(--safe-bottom) + 20px) max(14px, var(--safe-left));
        background: radial-gradient(ellipse 50% 40% at 50% -10%, rgba(99,102,241,.12), transparent), #f3f6fc;
    }
    .student-login-card { width: 100%; max-width: 420px; padding: 22px 18px; border-radius: 24px; box-shadow: 0 16px 44px rgba(19,33,56,.12); }
    .student-login-mobile-brand { width: 48px; height: 48px; margin-bottom: 14px; border-radius: 14px; }
    .student-login-heading { margin-bottom: 18px; }
    .student-login-heading h1 { font-size: 1.28rem; }
    .student-login-heading p { font-size: .68rem; }
    #student-login-form { gap: 13px; }
    #student-login-form button[type="submit"] { min-height: 48px; font-size: .82rem; }
    .student-login-footer { margin-top: 14px; font-size: .57rem; }
}

@media (max-width: 380px) {
    .student-sidebar-nav a, .student-sidebar > #student-logout-button { font-size: .51rem; }
    .student-stat-card { padding: 9px; }
    .student-stat-icon { flex-basis: 32px; width: 32px; height: 32px; }
    .student-course-meta { gap: 4px; }
}

/* Generated material copy */
.student-material-card > h3 { margin: 0; }
.student-material-card > p:not(.muted) { margin: 0; color: var(--ink-500); font-size: .66rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }


/* =========================================================
   COMPACT STUDENT UI — SEPTEMBER 2026 REFINEMENT
   UI-only overrides. Keeps auth, Supabase and secure R2 flow intact.
   ========================================================= */

/* Dark navigation surfaces use white text for consistent contrast. */
.student-sidebar-nav a,
.student-sidebar-nav a svg,
.student-sidebar > #student-logout-button {
    color: #fff;
}

.student-sidebar-brand small {
    color: rgba(255,255,255,.72);
}

/* Show the complete course artwork instead of cropping/zooming it. */
.student-course-image img,
.student-course-hero-image,
.student-dashboard-lesson-thumbnail,
.student-lesson-thumbnail {
    object-fit: contain;
}

.student-course-image img,
.student-course-card:hover .student-course-image img,
.student-hero:hover .student-course-hero-image {
    transform: none;
}

.student-course-image,
.student-course-hero-image,
.student-dashboard-lesson-thumbnail,
.student-lesson-thumbnail {
    background: #eef2f7;
}

/* Course workspace: lesson list on the left, selected lesson player on the right. */
.student-course-layout {
    grid-template-columns: minmax(250px, .34fr) minmax(0, .66fr);
    grid-template-areas:
        "lessons player"
        "lessons description";
}

.student-lessons-panel {
    grid-area: lessons;
}

.student-player-panel {
    grid-area: player;
    min-width: 0;
}

.student-selected-description {
    grid-area: description;
    margin: -4px 0 0;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow-xs);
    font-size: .72rem;
    line-height: 1.58;
}

.student-player-panel .student-video-player {
    margin-top: 0;
}

/* Dark video surfaces always use readable white text. */
.student-video-player,
.student-video-player:empty::after,
.video-player-shell,
.video-player-stage,
.video-player-toolbar,
.video-control-button,
.video-control-link,
.video-speed-select,
.video-error-message {
    color: #fff;
}

.student-video-player:empty::after {
    color: #fff;
}

.video-control-button,
.video-control-link,
.video-speed-select {
    color: #fff;
}

.student-materials-toggle.active,
.student-materials-toggle[aria-expanded="true"] {
    color: var(--primary-700);
    border-color: rgba(99,102,241,.18);
    background: var(--primary-50);
}

.student-materials-panel[hidden] {
    display: none !important;
}

/* Desktop course hero keeps text + complete thumbnail without crop. */
.student-course-hero {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 30%);
    grid-template-areas: "course-copy course-image";
}

.student-course-hero-copy {
    grid-area: course-copy;
    min-width: 0;
}

.student-course-hero .student-course-hero-image {
    grid-area: course-image;
    width: 100%;
    max-width: 320px;
    justify-self: end;
    object-fit: contain;
}

/* Mobile app layout. */
@media (max-width: 720px) {
    body.student-dashboard-page,
    body.student-course-page {
        padding-top: var(--app-top-bar);
        padding-bottom: calc(var(--student-bottom-nav-h) + var(--safe-bottom) + 18px);
    }

    .student-header {
        top: var(--app-top-bar);
    }

    /* Cleaner bottom navigation with bright icons/text on its dark surface. */
    .student-sidebar-nav a,
    .student-sidebar > #student-logout-button,
    .student-sidebar-nav a svg,
    .student-sidebar > #student-logout-button svg {
        color: #fff;
    }

    .student-sidebar-nav a.active svg {
        color: #c7d2fe;
    }

    /* Dashboard assigned course button: full card width and shorter label. */
    .student-course-body {
        align-items: stretch;
    }

    .student-course-link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Mobile My Course hero: full-width banner first, copy/description below. */
    .student-course-hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "course-image"
            "course-copy";
        gap: 11px;
        padding: 12px;
    }

    .student-course-hero .student-course-hero-image {
        width: 100%;
        max-width: none;
        aspect-ratio: 16 / 9;
        justify-self: stretch;
        border-radius: 14px;
        object-fit: contain;
        background: #eef2f7;
    }

    .student-course-hero-copy {
        padding: 1px 2px 2px;
    }

    .student-course-hero-copy #course-page-description {
        margin-top: 6px;
    }

    /* YouTube-like order: selected title/player, description, then lesson list. */
    .student-course-layout {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "player"
            "description"
            "lessons";
        gap: 8px;
        position: relative;
    }

    .student-course-layout > .student-panel:first-child {
        position: static;
        top: auto;
    }

    .student-player-panel {
        position: sticky;
        top: calc(var(--app-top-bar) + var(--student-header-h) + 4px);
        z-index: 24;
        padding: 10px;
        border-radius: 16px;
        background: rgba(255,255,255,.98);
        box-shadow: 0 8px 24px rgba(19,33,56,.12);
    }

    .student-player-heading {
        margin-bottom: 7px;
    }

    .student-player-heading .eyebrow {
        display: none;
    }

    .student-player-heading h2 {
        margin: 0;
        font-size: .86rem;
        line-height: 1.3;
    }

    .student-video-player {
        margin-top: 0;
        border-radius: 13px;
    }

    .student-selected-description {
        margin: 0;
        padding: 10px 12px;
        border-radius: 14px;
        font-size: .64rem;
        line-height: 1.55;
        background: #fff;
    }

    .student-lessons-panel {
        padding: 12px;
    }

    .student-lesson-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
        max-height: none;
        overflow: visible;
        margin: 0;
        padding: 0;
    }

    .student-lesson-button {
        width: 100%;
        flex: none;
        grid-template-columns: 68px minmax(0, 1fr);
        scroll-snap-align: unset;
    }

    .student-lesson-thumbnail {
        width: 68px;
        height: 44px;
        object-fit: contain;
    }

    /* Materials are opened only from the Materials button. */
    .student-materials-panel {
        scroll-margin-top: calc(var(--app-top-bar) + var(--student-header-h) + 12px);
        margin-top: 8px;
    }
}


/* =========================================================
   MOBILE DESCRIPTION + BANNER REFINEMENT — SEPTEMBER 2026
   ========================================================= */

.student-form-message:empty {
    display: none;
}

.student-description-block {
    min-width: 0;
}

.student-read-more-button {
    appearance: none;
    width: fit-content;
    min-height: 30px;
    margin-top: 5px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--primary-700);
    font: inherit;
    font-size: .62rem;
    font-weight: 800;
    cursor: pointer;
}

.student-read-more-button:hover {
    text-decoration: underline;
}

.student-read-more-button[hidden] {
    display: none !important;
}

.student-selected-description-block {
    grid-area: description;
    margin: -4px 0 0;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow-xs);
}

.student-selected-description-block .student-selected-description {
    grid-area: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 720px) {
    /* Dashboard course banner fills the entire card width without cropping. */
    .student-course-image {
        aspect-ratio: auto;
        width: 100%;
    }

    .student-course-image img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: auto;
        object-fit: contain;
    }

    /* My Course banner reaches the left/right edges of the hero container. */
    .student-course-hero {
        overflow: hidden;
        padding: 0 12px 12px;
    }

    .student-course-hero .student-course-hero-image {
        display: block;
        width: calc(100% + 24px);
        max-width: none;
        height: auto;
        aspect-ratio: auto;
        margin: 0 -12px;
        border-width: 0;
        border-radius: 18px 18px 0 0;
        object-fit: contain;
    }

    .student-course-hero-copy {
        width: 100%;
        padding: 0;
    }

    /* Course and lesson descriptions show four lines until Read more is pressed. */
    .expandable-description.is-collapsed {
        display: -webkit-box !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4 !important;
        overflow: hidden !important;
    }

    .student-course-description.expandable-description.is-collapsed,
    .student-course-hero-copy #course-page-description.expandable-description.is-collapsed,
    .student-selected-description.expandable-description.is-collapsed {
        -webkit-line-clamp: 4 !important;
    }

    .student-read-more-button {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        margin-top: 3px;
        padding: 2px 0;
        font-size: .60rem;
    }

    .student-selected-description-block {
        margin: 0;
        padding: 10px 12px;
        border-radius: 14px;
        background: #fff;
    }

    .student-selected-description-block .student-selected-description {
        font-size: .64rem;
        line-height: 1.55;
    }
}
