.course-progress-summary{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 18px;margin:8px 0;font-size:14px;font-variant-numeric:tabular-nums}
.course-review-controls{display:flex;align-items:center;gap:6px;min-width:0;flex-shrink:0}
.course-review-controls>.ui-action:not(.ui-action--icon){max-width:180px}
.course-review-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.course-review-students{display:grid;gap:6px;min-width:0}
.course-review-student.ui-action{display:flex;flex-direction:column;align-items:flex-start;text-align:left;white-space:normal;overflow-wrap:anywhere}
.course-review-student>small{font-size:12px;font-weight:400}
@media(max-width:600px){.course-review-controls>.ui-action:not(.ui-action--icon){max-width:140px}}
.course-progress-units{display:flex;gap:16px;flex-wrap:wrap;margin:8px 0 12px;max-width:680px}.course-progress-unit{flex:1;min-width:110px}.course-progress-unit>small{display:block;margin-bottom:4px}
.course-progress-bar{display:block;width:100%;height:4px;border:0;border-radius:3px;overflow:hidden;appearance:none;background:var(--surface-muted);color:var(--success-line)}.course-progress-bar::-webkit-progress-bar{background:var(--surface-muted)}.course-progress-bar::-webkit-progress-value{background:var(--success-line)}.course-progress-bar::-moz-progress-bar{background:var(--success-line)}
.course-step-status{display:block;margin:6px 0;color:var(--muted)}.course-step-status[data-course-state=solved],.course-step-status[data-course-state=completed],.course-access-open{color:var(--success-ink)}.course-step-status[data-course-state=incorrect],.course-dialog-feedback[data-error=true]{color:var(--danger-ink)}
.course-access-tree{display:grid;gap:8px;margin:12px 0}.course-access-module{border-top:1px solid var(--line);padding-top:8px}.course-access-choice{display:flex;align-items:center;gap:8px;min-height:36px;margin:0;padding:4px 0;font-size:14px;font-weight:400}.course-access-choice>span{min-width:0;overflow-wrap:anywhere}.course-access-choice>small{margin-left:auto;flex:0 0 auto;font-size:12px}.course-access-choice>.course-access-check{flex:0 0 17px;width:17px;height:17px;min-width:17px;margin:0;padding:0}.course-access-lesson{padding-left:24px}.course-access-module>.course-access-choice:first-child{font-weight:600}
.course-authoring-grant{display:flex;align-items:center;gap:12px;justify-content:space-between;border-top:1px solid var(--line);padding:10px 0}.course-authoring-grant>div{min-width:0}.course-authoring-grant strong,.course-authoring-grant small{display:block;overflow-wrap:anywhere}.course-authoring-secret>input{width:100%;min-width:0}.course-authoring-secret>small{display:block;overflow-wrap:anywhere}.course-authoring-secret[hidden]{display:none}
.course-authoring-copy-actions{display:flex;flex-wrap:wrap;gap:8px}.course-authoring-grant>.ui-action{flex-shrink:0}.course-authoring-dialog .course-dialog-feedback{display:block;overflow-wrap:anywhere}
.course-authoring-context{overflow-wrap:anywhere}
.course-authoring-history-heading{margin-top:16px}
@media(max-width:390px){.course-authoring-grant{flex-wrap:wrap;gap:4px}.course-authoring-grant>div{flex:1 1 100%}.course-authoring-grant>.ui-action{margin-left:auto}}
@media(max-width:390px){.course-access-choice{flex-wrap:wrap}.course-access-choice>small{flex-basis:100%;margin-left:25px}.course-progress-summary{gap:4px 12px}}
/* Placement only: the shared student directory still owns the full/compact
   rows, surfaces and reveal animation. These variables do not change pupils. */
.course-workspace{--student-directory-rail-width:64px;--student-directory-open-width:280px;--student-directory-height:clamp(320px,calc(100dvh - 180px),720px);--student-directory-left:0px;--student-directory-top:0px;display:grid;grid-template-columns:var(--student-directory-rail-width) minmax(0,1fr);gap:16px;align-items:start;position:relative;min-width:0}
.course-workspace.student-sidebar>.app-sidebar.course-outline-host{position:sticky;top:16px;display:block;width:var(--student-directory-rail-width);height:var(--student-directory-height);min-height:0;padding:0;align-self:start;overflow:visible;background:transparent;z-index:20}
.course-workspace-main,.course-workspace-body{min-width:0}
.course-step-order-tools{display:inline-flex;align-items:center;flex:none;gap:8px}
.course-workspace-steps{display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;overflow-x:auto;margin-bottom:12px;padding:2px 2px 6px;scrollbar-width:thin}
.course-focus .course-workspace-steps{position:sticky;top:0;z-index:10;background:var(--surface)}
.course-workspace-steps>[data-course-state=solved]{color:var(--on-accent);background:var(--lemon)}
.course-workspace[data-navigation-kind=course] .course-workspace-steps>[data-course-state=solved]{color:var(--success-ink);background:var(--success-soft)}
.course-workspace-steps>[data-course-state=incorrect]{color:var(--danger-ink);background:var(--danger-soft);--course-step-emergency-glow:var(--danger-surface-glow);box-shadow:var(--course-step-emergency-glow)}
.course-workspace-steps>[aria-current=step]{box-shadow:var(--course-step-emergency-glow,0 0 0 transparent),inset 0 -2px var(--ink)}
.course-workspace-steps>[data-course-step-sortable]{touch-action:pan-y;cursor:grab}
.course-workspace-steps>.sw-order-dragging{position:absolute;visibility:hidden;pointer-events:none}
.course-workspace-steps>.sw-order-placeholder{flex:0 0 auto;pointer-events:none;opacity:.65;outline:1px dashed var(--line);outline-offset:-1px}
.course-workspace-steps>.sw-order-ghost{display:none}
.course-workspace-steps.sw-order-sorting{user-select:none;cursor:grabbing}
.course-outline-row-content{display:flex;align-items:center;gap:4px;min-width:0;position:relative}
.course-outline-module,.course-outline-lesson{position:relative;flex-shrink:0}
/* Course-owned module headers form groups; shared lesson/selection rows stay
   unchanged. The same header surface follows the full-item drag preview. */
.course-outline .course-outline-module{border-radius:7px}
.course-outline .course-outline-module:not(.selected){background:var(--surface-muted)}
.course-outline .course-outline-module-trigger{font-weight:600}
.course-outline .context-list>.course-outline-module:not(:first-child){margin-top:9px}
/* Add belongs to the preceding module, at its lesson-title indentation.
   Retain the full-width end-of-module drag target and the existing row sizes. */
.course-outline .course-outline-add-lesson{padding-left:16px}
.course-outline:has(.course-outline-order-grip) .course-outline-add-lesson{padding-left:36px}
.course-outline .course-outline-lesson:has(+.course-outline-add-lesson){border-bottom-color:transparent}
@media(min-width:901px){
  /* The desktop directory already uses surface-muted: keep headers distinct. */
  .course-outline .course-outline-module:not(.selected){background:var(--surface-hover)}
}
.course-workspace .course-outline .student-directory-preview-list{scrollbar-width:none}
.course-workspace .course-outline .student-directory-preview-list::-webkit-scrollbar{display:none}
.course-workspace .course-outline .student-directory-heading{flex:0 0 auto}
/* Author rows put the canonical grip before the number; actions stay right. */
.course-workspace .course-outline-order-grip{display:grid;place-items:center;flex:0 0 20px;width:20px;min-width:0;height:32px;min-height:0;padding:2px;border:0;background:transparent;color:var(--muted);cursor:grab;touch-action:none}
.course-outline-order-grip>svg{width:18px;height:20px;fill:currentColor;pointer-events:none}
.course-outline-order-grip:hover{color:var(--ink)}
.course-outline-order-grip:active{cursor:grabbing}
/* Move the same 20px grip slot left without narrowing the text or shifting arrows. */
.course-outline-row-content:has(>.course-outline-order-grip){gap:0}
.course-outline-row-content:has(>.course-outline-order-grip)>.course-outline-navigation{margin-right:4px}
.course-outline-row-actions{display:flex;align-items:center;flex:0 0 42px;width:42px;gap:0}
.course-outline-order-arrows{display:flex;flex-direction:column;flex:0 0 18px;width:18px;height:32px}
.course-workspace .course-outline-order-arrows>.course-outline-order-arrow{display:grid;place-items:center;width:18px;min-width:0;height:16px;min-height:0;padding:0;border:0;background:transparent;color:var(--muted)}
.course-workspace .course-outline-order-arrows>.course-outline-order-arrow:hover:not(:disabled){background:var(--surface-hover);color:var(--ink)}
.course-workspace .course-outline-row-actions>.course-outline-settings{flex:0 0 18px;width:18px;min-width:0;padding:0}
.course-outline .sw-order-dragging{position:absolute;visibility:hidden;pointer-events:none}
.course-outline .sw-order-placeholder{flex:0 0 auto;pointer-events:none;opacity:.65;background:var(--surface-hover);outline:1px dashed var(--line);outline-offset:-1px}
.course-outline .sw-order-ghost{display:none}
.course-outline-order-bundle{display:flex;flex-direction:column;gap:4px;min-width:0}
.course-outline .sw-order-sorting{user-select:none;cursor:grabbing}
.course-outline-navigation{flex:1;min-width:0}
.course-outline-lesson>.course-outline-row-content{padding-left:8px}
.course-outline-compact-lesson{padding-left:4px}
.course-outline-number{position:relative;display:grid;place-items:center;width:100%;height:100%}
.course-outline-number-ring{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.course-outline-number-ring rect{fill:none;stroke:var(--lemon);stroke-width:4.4;stroke-dasharray:var(--course-progress-percent) 100;filter:drop-shadow(0 0 .5px color-mix(in srgb,var(--on-accent) 60%,transparent))}
.course-outline-number-ring[data-complete=true] rect{stroke-dasharray:none}
.course-outline-number-ring[hidden]{display:none}
.course-outline-row-progress{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);pointer-events:none}
.course-outline-row-progress[hidden]{display:none}
.course-focus .course-workspace{--student-directory-height:calc(100dvh - 60px)}
.course-focus:has(.course-settings-trigger) .course-focus-header{padding-right:112px}
.course-settings-trigger{position:absolute;top:max(8px,env(safe-area-inset-top));right:max(60px,calc(env(safe-area-inset-right) + 48px))}
.course-outline-preview-group{display:none}
.course-workspace .course-outline-toggle{display:none}
@media(max-width:900px){
  /* Module and lesson controls use the same shared row geometry. */
  .course-outline-lesson>.course-outline-row-content{padding-left:8px}
  .course-workspace{display:block;--student-directory-open-width:min(280px,calc(100vw - 40px))}
  .course-workspace.student-sidebar>.app-sidebar.course-outline-host{display:none}
  .course-workspace .course-outline-toggle{display:inline-flex;margin-bottom:8px}
  .course-workspace .course-outline{min-width:0;padding:0}
  .course-workspace .course-outline>.student-directory-content{max-height:none}
  .course-workspace .course-outline .student-directory-preview{display:none}
  .course-workspace .course-outline .student-directory-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
  .course-workspace .course-outline .student-directory-heading>h2{min-width:0;margin:0;font-size:17px;line-height:1.2;letter-spacing:-.02em}
  /* The SVG replaces the former text plus without shrinking its 31px row. */
  .course-workspace .course-outline .student-directory-heading>.directory-add{min-height:31px}
  .course-workspace .course-outline .context-list{display:flex;flex-direction:column;align-items:stretch;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:0;max-height:none;min-height:0;flex:1 1 auto}
  /* The shared dialog owns its header/close/focus; only this mobile frame
     fills the viewport. Desktop directory placement remains untouched. */
  .course-outline-mobile-dialog[open]{--schedule-dialog-pad:12px;width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;inset:0;border:0;border-radius:0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}
  .course-outline-dialog-body{display:flex;min-height:0}
  .course-outline-mobile-dialog .course-outline{display:flex;flex:1;flex-direction:column;width:100%;min-height:0}
  .course-outline-mobile-dialog .student-directory-heading>h2{display:none}
  .course-outline-mobile-dialog .student-directory-heading:not(:has(.directory-add)){display:none}
  .course-outline-mobile-dialog .directory-add{margin-left:auto}
  /* Course-owned controls: larger touch slots, unchanged canonical SVGs. */
  .course-outline-mobile-dialog .course-outline-row-content:has(>.course-outline-order-grip)>.course-outline-navigation{margin-right:8px}
  .course-outline-mobile-dialog .course-outline-row-actions{flex-basis:76px;width:76px;gap:4px}
  .course-outline-mobile-dialog .course-outline-order-arrows{flex-basis:36px;width:36px;height:66px;gap:2px}
  .course-workspace .course-outline-mobile-dialog .course-outline-order-arrows>.course-outline-order-arrow{width:36px;height:32px}
  .course-workspace .course-outline-mobile-dialog .course-outline-row-actions>.course-outline-settings{flex-basis:36px;width:36px}
}
@media(max-width:900px){
 .course-review-entry{position:absolute;top:max(8px,env(safe-area-inset-top));right:max(60px,calc(env(safe-area-inset-right) + 48px))}
}
