.learner-course-head{margin-bottom:24px}
.learner-course-head>.cap{display:block;margin-bottom:12px}
.learner-course-head nav{display:flex;flex-wrap:wrap;align-items:center;gap:4px;width:fit-content;max-width:100%;padding:4px;border:1px solid var(--line);border-radius:12px;background:var(--panel2)}
.learner-course-head nav a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 14px;border-radius:9px;color:var(--muted);text-decoration:none;font-size:14px;font-weight:500;line-height:1.5;white-space:nowrap}
.learner-course-head nav a[aria-current=page]{background:var(--panel);color:var(--text);box-shadow:inset 0 0 0 1px var(--line)}
.learner-course-head nav .learner-all-lessons{margin-left:0}
.lesson-footer #nextLessonAction{margin-left:auto}
.learner-tasks{display:grid;gap:16px}
.learner-task{display:flex;align-items:center;justify-content:space-between;gap:24px;text-decoration:none;color:var(--text)}
.learner-task h2{margin:12px 0 0;font-size:20px;line-height:1.4}
.learner-task .note{margin:10px 0 0}
.learner-task-action{display:inline-flex;align-items:center;gap:10px;white-space:nowrap;color:var(--acc);font-weight:500;min-height:44px}
.learner-profile{text-decoration:none;min-height:44px}
.learner-profile small{display:block;color:var(--muted);font-size:11px}
.learner-profile:focus-visible,.learner-course-head a:focus-visible,.learner-task:focus-visible{outline:2px solid var(--acc);outline-offset:4px}
.learner-account{max-width:700px}
.learner-apps{margin-top:12px;color:var(--muted);font-size:14px}
.learner-apps>summary{width:fit-content;min-height:44px;padding:10px 0;cursor:pointer}
.learner-apps[open]{padding-bottom:12px}
.learner-apps .acts{align-items:center;gap:16px}
.learner-apps>summary:focus-visible{outline:2px solid var(--acc);outline-offset:4px}
@media(max-width:760px){
 .learner-course-head{margin-bottom:24px}
 .learner-course-head nav{gap:2px}
 .learner-course-head nav a{padding:8px 10px;font-size:13px}
 .learner-task{align-items:flex-start;flex-direction:column;gap:12px}
 .learner-task h2{font-size:18px}
 .learner-task-action{align-self:flex-end;white-space:normal}
 .sidebar .learner-profile>span:last-child{display:block;font-size:0}
 .learner-profile small{font-size:11px}
}

/* Keep the contents above the reader; tables use the whole lesson width. */
.lesson-layout{display:flex;flex-direction:column;align-items:stretch;gap:16px}
.lesson-layout .lesson-aside{position:static;order:-1;width:100%;max-height:none;overflow:visible}
.lesson-layout .lesson-toc{margin:0;padding:14px 20px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.lesson-layout .lesson-toc>summary{display:list-item;margin:0;min-height:32px;align-content:center;color:var(--text);font-size:13px;letter-spacing:0}
.lesson-layout .lesson-toc[open]>summary{margin-bottom:12px}
.lesson-layout .lesson-toc nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 16px;border:0}
.lesson-layout .toc-link{min-height:40px;margin:0;border-left:2px solid transparent;padding:8px 10px;font-size:12px;line-height:1.5}
.lesson-layout .toc-sub{padding-left:20px}
.lesson-layout .reading{width:100%;max-width:none}
@media(max-width:1000px){.lesson-layout .lesson-toc nav{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.lesson-layout .lesson-toc{padding:12px 16px}.lesson-layout .lesson-toc nav{grid-template-columns:minmax(0,1fr)}}

/* Mentor learning overview: study marks and reviewed work stay separate. */
.mentor-section-nav{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 28px;padding:0 0 12px;border-bottom:1px solid var(--line)}
.mentor-section-nav a{display:inline-flex;align-items:center;min-height:44px;padding:10px 16px;border-radius:10px;color:var(--muted);font-size:14px;font-weight:500;text-decoration:none;line-height:1.4}
.mentor-section-nav a:hover{background:var(--panel);color:var(--text)}
.mentor-section-nav a[aria-current=page]{background:var(--blue-soft);color:var(--acc);box-shadow:inset 0 0 0 1px var(--blue-line)}
.mentor-section-nav a:focus-visible,.mentor-settings:focus-visible{outline:2px solid var(--acc);outline-offset:3px}
.sidebar .mentor-settings{white-space:normal;line-height:1.4;text-decoration:none}
.sidebar .mentor-settings[aria-current=page]{color:var(--acc)}
@media(max-width:760px){.sidebar .mentor-primary-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;gap:4px}.sidebar .mentor-primary-nav .tab{white-space:normal;text-align:left;justify-content:flex-start}.mentor-section-nav{gap:4px;margin-bottom:22px}.mentor-section-nav a{font-size:12px;padding:9px 11px}.sidebar-bottom:has(.mentor-settings){flex-wrap:wrap;justify-content:flex-end;max-width:180px}.sidebar .mentor-settings{font-size:11px}}
.mentor-student-tools{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:12px}
.mentor-activity-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.mentor-activity-head h2{font-size:22px;margin:0}
.mentor-activity-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:20px 0}
.mentor-activity-summary p{font-size:12px;color:var(--muted);margin:0}
.mentor-activity-summary strong{display:block;font-size:16px;line-height:1.6;color:var(--text);margin-top:6px}
.mentor-activity .note{font-size:12px;line-height:1.7}
.mentor-activity-history{margin-top:18px}
.mentor-activity-history>summary{cursor:pointer;min-height:44px;align-content:center;font-weight:500}
.mentor-activity-history ol{list-style:none;padding:0;margin:12px 0}
.mentor-activity-history li{display:flex;align-items:start;justify-content:space-between;gap:24px;padding:14px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.6}
.mentor-activity-history li p{margin:4px 0}
.mentor-activity-history small,.mentor-activity-history time{font-size:11px;color:var(--muted)}
.mentor-activity-history small{display:block;margin-top:4px}
.mentor-activity-history time{flex:none}
@media(max-width:600px){.mentor-activity-summary{grid-template-columns:minmax(0,1fr);gap:14px}.mentor-activity-history li{flex-direction:column;gap:6px}.mentor-activity-head h2{font-size:19px}}
.mentor-student-tools .field{width:min(100%,420px)}
.mentor-student-list{display:grid;gap:16px;margin-top:18px}
.mentor-student-card{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(240px,1.5fr) minmax(180px,.9fr);gap:24px;align-items:start;text-decoration:none;color:var(--text)}
.mentor-student-card[hidden]{display:none}
.mentor-student-card:hover{border-color:var(--acc)}
.mentor-student-card h2{font-size:19px;line-height:1.4;margin:0 0 4px}
.mentor-student-card h3{font-size:17px;line-height:1.5;margin:8px 0}
.mentor-student-card .note{margin:8px 0;font-size:12px;line-height:1.6}
.mentor-progress-counts{display:grid;gap:8px;font-size:12px;line-height:1.6;margin:12px 0}
.mentor-progress-counts b{font-size:17px;color:var(--text)}
.mentor-student-card progress,.mentor-learning progress{display:block;width:100%;height:8px;accent-color:var(--acc);margin:14px 0 18px}
.mentor-open{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--acc)}
.mentor-attention{gap:6px;margin-top:12px}
.mentor-attention:empty{display:none}
.mentor-attention .pill{font-size:11px;white-space:normal}
.mentor-learning{margin-bottom:20px}
.mentor-learning h2{margin:10px 0 16px;font-size:25px}
.mentor-learning h3{font-size:21px;line-height:1.5;margin:8px 0 18px}
.mentor-current-stage{color:var(--muted);margin-bottom:8px}
.mentor-learning .note{font-size:12px;line-height:1.7;margin:10px 0 0}
.mentor-learning>summary{cursor:pointer;font-weight:600;min-height:36px;align-content:center}
.mentor-lesson-list{list-style:none;padding:0;margin:18px 0 0}
.mentor-lesson{display:flex;align-items:center;gap:16px;padding:14px 4px;border-bottom:1px solid var(--line)}
.mentor-lesson:last-child{border-bottom:0}
.mentor-lesson a{font-weight:500;text-decoration:none;line-height:1.5}
.mentor-lesson small{display:block;margin-top:5px;font-size:11px;color:var(--muted)}
.mentor-lesson.current{background:var(--blue-soft);padding-inline:12px;border-radius:10px}
.mentor-lesson.completed .material-number{color:var(--acc)}
.mentor-lesson.later a{color:var(--muted)}
.mentor-work-list{margin-top:16px}
.mentor-work{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 0;border-bottom:1px solid var(--line);font-size:14px}
.mentor-work:last-child{border-bottom:0}
@media(max-width:1100px){.mentor-student-card{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr)}.mentor-student-card>div:last-child{grid-column:1/-1}.mentor-student-card .mentor-progress-counts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.mentor-student-card{grid-template-columns:minmax(0,1fr);gap:14px}.mentor-student-card .mentor-progress-counts{grid-template-columns:minmax(0,1fr)}.mentor-student-tools{align-items:stretch;flex-direction:column;gap:8px}.mentor-work{align-items:start;flex-direction:column;gap:8px}.mentor-learning h3{font-size:18px}}

/* Mentor student card: learning first, occasional controls on demand. */
.mentor-student-management>summary{font-size:18px;font-weight:600;cursor:pointer}
.mentor-management-group{border-top:1px solid var(--line);margin-top:18px;padding-top:18px}
.mentor-management-group>summary,.mentor-work-history>summary,.study-breakdown>summary{cursor:pointer;font-weight:500;line-height:1.6}
.mentor-management-body{padding-top:18px;min-width:0}
.mentor-management-body .form{max-width:760px}
.mentor-student-management .panel{box-shadow:none}
.mentor-work-history{margin-top:18px}
.mentor-next-step{margin-top:18px}
.mentor-learning .mentor-attention:empty{display:none}
.mentor-study-time .study-summary{margin-bottom:18px}
.mentor-study-time .btn-line{background:var(--panel);color:var(--text);border-color:var(--control-line,var(--line))}
.study-breakdown{border-top:1px solid var(--line);padding-top:16px}
.study-breakdown .sec{margin-top:16px}
.mentor-student-heading h1{overflow-wrap:anywhere}
@media(max-width:600px){.mentor-student-management>summary{font-size:17px}.mentor-management-group>summary{font-size:15px}.mentor-management-body .input,.mentor-management-body .textarea{min-width:0;width:100%}}

.reading .course-diagram{margin:24px auto}.reading .course-diagram img{display:block;width:100%;max-width:640px;height:auto;margin:auto;border:1px solid var(--line);border-radius:18px}
.reading .course-lifecycle{container-type:inline-size;margin:28px 0;line-height:1.5}
.reading .course-lifecycle figcaption{margin:0 0 14px;color:var(--muted);font-size:12px;font-weight:500;letter-spacing:.02em}
.reading .lifecycle-stages{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;list-style:none;padding:0;margin:0}
.reading .lifecycle-stage{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr);gap:12px;min-width:0;margin:0;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.reading .lifecycle-number{display:grid;place-items:center;align-self:start;width:28px;height:28px;border:1px solid var(--blue-line);border-radius:50%;background:var(--blue-soft);color:var(--acc);font-size:11px;font-weight:600}
.reading .lifecycle-title{display:block;margin:2px 0 0;font-size:16px;line-height:1.5;color:var(--text)}
.reading .lifecycle-content p{margin:8px 0 0;font-size:14px;line-height:1.55;color:var(--muted)}
.reading .lifecycle-content small{display:block;margin-top:2px;color:var(--acc);font-size:11px;line-height:1.5}
@container(min-width:520px){.reading .lifecycle-stages{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container(min-width:760px){
 .reading .lifecycle-stages{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
 .reading .lifecycle-stage{display:flex;flex-direction:column;gap:12px;padding:18px 16px}
 .reading .lifecycle-title{margin:0}
 .reading .lifecycle-stage:not(:last-child)::after{content:'→';position:absolute;right:-14px;top:22px;width:12px;text-align:center;color:var(--muted);font-size:12px;line-height:1}
}
.lesson-selfcheck{border:1px solid var(--line);border-radius:16px;padding:0 18px;background:var(--panel)}.lesson-selfcheck-item{border-bottom:1px solid var(--line)}.lesson-selfcheck-item:last-child{border-bottom:0}.lesson-selfcheck-item summary{padding:18px 0;cursor:pointer;font-weight:600;line-height:1.6;color:var(--text)}.lesson-selfcheck-item summary:focus-visible{outline:2px solid var(--acc);outline-offset:4px;border-radius:4px}.lesson-selfcheck-answer{padding-bottom:10px}.lesson-selfcheck-answer p{margin-top:0}
