/* Unified Piero Lesson Title opening & Gemini P-Lab Two-Tier Ink-Vessel Progress Dock.
   Matches Gemini P-Lab 1:1: sunlit cotton paper (#FCFBF8), stacked rising ink-fill vessels,
   interactive skill tabs with claret active underline, colorful hand-inked Lumi icon tiles,
   teacher's red-pen loop on positive XP, slim 1-row standalone XP slip, header mini-pips
   and 2px architectural progress line — while preserving Track 5A's open chalkboard intro. */
.lesson-moment {
    --moment-paper:#FCFBF8;
    --moment-surface:#FFFFFF;
    --moment-tint:#F4F0E7;
    --moment-ink:#172B24;
    --moment-ink-2:#4D5E56;
    --moment-ink-3:#7A8981;
    --moment-line:#E2DACB;
    --moment-line-strong:#C9BFAE;
    --moment-gold:#C6902A;
    --moment-gold-deep:#966716;
    --moment-claret:#8C2633;
    --moment-chalk:#F6F3EB;
    --ill-ink:#182923;
    --ill-paper:#FCF9F3;
    --ill-coral:#E27A5E;
    --ill-periwinkle:#8D8DE6;
    --ill-sage:#7E9263;
    --ill-clay:#D6A881;
    --ill-sand:#ECE0C5;
    --ill-tile-sand:#ECE0C5;
    --ill-tile-sage:#7E9263;
    --ill-tile-blush:#E27A5E;
    --ill-tile-sky:#8D8DE6;
    --ill-tile-clay:#D6A881;
    --moment-spring:linear(0, 0.06 4%, 0.2 8%, 0.42 14%, 0.64 20%, 0.82 26%, 0.94 32%, 1.02 38%, 1.05 44%, 1.045 51%, 1.025 60%, 1.008 71%, 0.999 82%, 1);
    color:var(--moment-chalk);text-align:center;
    font-family:var(--font-ui,'IBM Plex Sans',sans-serif);
}

/* ================= FULL-BOARD OPENING INTRO (PRESERVES TRACK 5A: NO WHITE BOX) ================= */
.lesson-moment.structured-title-flash {
    position:absolute;inset:0;z-index:15;
    display:grid;place-items:center;padding:12px clamp(20px,4vw,56px);margin:0;
    container-type:size;
    pointer-events:none;
    background:var(--presentation-green,#1E3D32) url(assets/green-tile.png) repeat 0 0 / 512px 512px;
    opacity:0;transition:opacity 360ms ease;
}
.lesson-moment.structured-title-flash.is-visible {opacity:1;}
.lesson-moment.structured-title-flash.is-leaving {opacity:0;}
.lesson-moment-inline {position:relative;display:grid;justify-items:center;width:100%;}
.lesson-moment-content {width:min(100%,640px);opacity:0;transition:opacity 240ms cubic-bezier(0.2,0,0,1), transform 240ms cubic-bezier(0.2,0,0,1);}
.lesson-moment.is-visible .lesson-moment-content {opacity:1;}
.lesson-moment.is-leaving .lesson-moment-content {opacity:0;transform:translateY(-6px) scale(0.985);}

.lesson-moment-title {
    margin:0 auto 30px;max-width:22ch;
    font:500 clamp(32px,4.2vw,52px)/1.12 var(--font-serif,'STIX Two Text',Georgia,serif);
    color:var(--moment-chalk);text-wrap:balance;letter-spacing:-0.02em;
}

.lesson-moment-track {
    display:flex;flex-wrap:wrap;justify-content:center;gap:14px 0;
    list-style:none;margin:0 auto;padding:18px 26px 14px;max-width:100%;
    background:var(--moment-paper);color:var(--moment-ink);
    border:1px solid var(--moment-line);border-radius:10px;
    box-shadow:0 14px 36px -14px rgba(7,20,15,0.42);
}
.lesson-moment-step {
    position:relative;display:flex;flex-direction:column;align-items:center;
    gap:7px;width:118px;flex:0 1 118px;min-width:86px;color:var(--moment-ink-3);
}
.lesson-moment-step:not(:last-child)::after {
    content:'';position:absolute;top:19px;left:calc(50% + 26px);width:calc(100% - 44px);
    height:1.5px;background:var(--moment-line);pointer-events:none;
    transition:background-color 320ms cubic-bezier(0.2,0,0,1);
}
.lesson-moment-step[data-state=complete]:not(:last-child)::after {background:var(--moment-ink);}

/* Rising liquid ink-fill skill vessel */
.lesson-moment-mark {
    position:relative;display:grid;place-items:center;width:38px;height:38px;
    border:2px solid var(--moment-line);border-radius:50%;background:var(--moment-surface);
    color:var(--moment-ink-2);font:500 14.5px/1 var(--font-serif,'STIX Two Text',Georgia,serif);
    overflow:hidden;
    transition:border-color 280ms cubic-bezier(0.2,0,0,1), background-color 280ms cubic-bezier(0.2,0,0,1), color 280ms cubic-bezier(0.2,0,0,1), box-shadow 320ms cubic-bezier(0.2,0,0,1), transform 340ms var(--moment-spring);
}
.lesson-moment-step[data-kind=foundation] .lesson-moment-mark {border-radius:9px;}
.lesson-moment-fill {
    --liquid-color: rgba(136, 139, 232, 0.54);
    --liquid-back: rgba(136, 139, 232, 0.28);
    --wave-h: 6px;
    --wave-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0,7 C20,1.4 40,1.4 60,7 C80,12.6 100,12.6 120,7 L120,14 L0,14 Z' fill='%23000'/%3E%3C/svg%3E");
    position:absolute;left:0;right:0;bottom:0;height:var(--fill,0%);
    background:var(--liquid-color);
    border-radius:0;
    overflow:visible;
    pointer-events:none;
    transition:height 920ms cubic-bezier(0.22,1,0.36,1), background-color 300ms, opacity 260ms ease;
}
.lesson-moment-fill::before,
.lesson-moment-fill::after {
    content:'';
    position:absolute;
    left:0;
    bottom:calc(100% - 1px);
    width:200%;
    height:var(--wave-h);
    background:var(--liquid-color);
    -webkit-mask-image:var(--wave-mask);
    mask-image:var(--wave-mask);
    -webkit-mask-repeat:repeat-x;
    mask-repeat:repeat-x;
    -webkit-mask-size:50% 100%;
    mask-size:50% 100%;
    animation:lesson-liquid-wave 2.4s linear infinite;
    will-change:transform;
}
.lesson-moment-fill::after {
    left:-28%;
    bottom:calc(100% - 0.5px);
    height:calc(var(--wave-h) + 1px);
    background:var(--liquid-back);
    animation:lesson-liquid-wave-back 3.6s linear infinite;
}
.lesson-moment-fill[data-empty="true"] {opacity:0;}
.lesson-moment-step[data-direction=drop] .lesson-moment-fill,
.lesson-moment-xp[data-direction=drop] .lesson-xp-slip-vessel .lesson-moment-fill {
    --liquid-color: rgba(218, 112, 86, 0.50);
    --liquid-back: rgba(218, 112, 86, 0.26);
}
.lesson-moment-glyph {position:relative;z-index:1;}
.lesson-moment-step[data-state=current] .lesson-moment-mark {border-color:var(--ill-ink);}
.lesson-moment-step[data-state=current] .lesson-moment-glyph {color:var(--moment-ink);font-weight:600;}
.lesson-moment-step[data-state=complete] .lesson-moment-mark {
    border-color:var(--ill-ink);background:var(--ill-ink);color:var(--moment-paper);
}
.lesson-moment-step[data-state=complete] .lesson-moment-fill {opacity:0;transition:opacity 220ms ease;}
.lesson-moment-step[data-state=complete] .lesson-moment-glyph {display:none;}
.lesson-moment-step[data-state=current],
.lesson-moment-step[data-state=complete] {color:var(--moment-ink);}

.lesson-moment-check {
    display:none;position:relative;z-index:1;width:16px;height:16px;
    color:currentColor;fill:none;stroke:currentColor;stroke-width:2.3;
    stroke-linecap:round;stroke-linejoin:round;
}
.lesson-moment-step[data-state=complete] .lesson-moment-check {display:block;}
.lesson-moment-step.is-finishing .lesson-moment-mark {animation:lesson-pop-in 460ms var(--moment-spring) both;}
.lesson-moment-step.is-starting .lesson-moment-mark {animation:lesson-start-pop 420ms var(--moment-spring) both;}
.lesson-moment-step.is-finishing .lesson-moment-check path {
    stroke-dasharray:1;animation:lesson-ink-draw 440ms cubic-bezier(0.32,0.72,0,1) both;
}

.lesson-moment-label {
    position:relative;font:600 12.5px/1.3 var(--font-ui,'IBM Plex Sans',sans-serif);
    letter-spacing:-0.005em;white-space:nowrap;
}

/* Interactive clickable vessel button inside the top dropdown */
.lesson-moment-node-btn {
    display:flex;flex-direction:column;align-items:center;gap:7px;
    padding:0 6px 4px;margin:0;border:0;background:none;color:inherit;
    cursor:pointer;font:inherit;
    transition:color 130ms cubic-bezier(0.2,0,0,1), transform 130ms cubic-bezier(0.34,1.4,0.64,1);
}
.lesson-moment-node-btn:hover {color:var(--moment-ink);}
.lesson-moment-node-btn:active {transform:scale(0.95);}
.lesson-moment-node-btn[aria-selected=true] {color:var(--moment-ink);}
.lesson-moment-node-btn[aria-selected=true] .lesson-moment-label::after {
    content:'';position:absolute;left:0;right:0;bottom:-4px;height:1.5px;
    background:var(--moment-claret);
}
.lesson-moment-node-btn:focus-visible {
    outline:2px solid var(--moment-claret);outline-offset:4px;border-radius:6px;
}

/* Center-screen opening intro & inline demo mastery track (Track 5A: open badges floating cleanly on chalkboard, no white box) */
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-content {width:min(100%,760px);}
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-track {
    gap:18px 0;padding:0;
    background:transparent;color:var(--moment-chalk);
    border:0;border-radius:0;box-shadow:none;
}
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-step {
    gap:9px;width:124px;flex:0 1 124px;color:rgba(246,243,235,0.68);
}
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-step:not(:last-child)::after {
    top:23px;left:calc(50% + 29px);width:calc(100% - 58px);
    height:1.5px;background:rgba(246,243,235,0.24);
}
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-step[data-state=complete]:not(:last-child)::after {
    background:rgba(246,243,235,0.72);
}
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-mark {
    width:46px;height:46px;font-size:18px;
    border:1.5px solid rgba(246,243,235,0.34);
    background:rgba(14,33,26,0.44);
    color:rgba(246,243,235,0.82);
}
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-fill {
    --liquid-color: rgba(136, 139, 232, 0.54);
    --liquid-back: rgba(136, 139, 232, 0.28);
    --wave-h: 7.5px;
}
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-step[data-state=current],
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-step[data-state=complete] {color:var(--moment-chalk);}
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-step[data-state=current] .lesson-moment-mark {
    color:var(--moment-ink);border-color:var(--moment-paper);
    background:var(--moment-paper);
    box-shadow:0 0 0 4px rgba(141,141,230,0.28);
    font-weight:600;
}
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-step[data-state=current] .lesson-moment-glyph {color:var(--moment-ink);}
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-step[data-state=complete] .lesson-moment-mark {
    color:var(--moment-paper);background:var(--ill-ink);border-color:rgba(246,243,235,0.78);
}
.lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-check {color:var(--moment-paper);width:20px;height:20px;}

/* ================= TOP BAR TRIGGER, MINI SKILL PIPS & 2PX PROGRESS LINE ================= */
.topbar-progress-line {
    position:absolute;left:0;right:0;bottom:-1px;height:2px;pointer-events:none;z-index:2;
}
.topbar-progress-line > span {
    display:block;height:100%;width:0%;background:var(--presentation-green,#1E3D32);
    transition:width 600ms cubic-bezier(0.32,0.72,0,1);
}

.lesson-progress-trigger {
    appearance:none;position:relative;display:inline-flex;align-items:center;gap:11px;
    height:36px;max-width:100%;margin:0;padding:0 10px;
    border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;
    letter-spacing:inherit;text-align:inherit;cursor:pointer;
    transition:background-color 130ms cubic-bezier(0.2,0,0,1), opacity 240ms ease;
}
body.session-presentation .board-lesson-title .lesson-progress-trigger {font:inherit;}
body.session-presentation .session-player-header .lesson-progress-trigger {position:relative;}
.lesson-progress-trigger:not(:disabled):hover,
.lesson-progress-trigger[aria-expanded=true] {background:rgba(23,43,36,0.055);}
.lesson-progress-trigger:not(.lesson-trigger-enhanced):not(:disabled) {padding-right:22px;}
.lesson-progress-trigger:not(.lesson-trigger-enhanced):not(:disabled)::after {
    content:'';position:absolute;right:5px;top:calc(50% - 4px);width:6px;height:6px;
    border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
    transform:rotate(45deg);opacity:.65;
}
.lesson-progress-trigger:not(.lesson-trigger-enhanced)[aria-expanded=true]::after {
    transform:rotate(225deg);top:calc(50% - 1px);
}
.lesson-trigger-title {
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;
}
.lesson-trigger-pips {
    display:inline-flex;align-items:center;gap:4px;flex:none;
}
.lesson-trigger-pips i {
    display:block;width:6px;height:6px;border-radius:50%;
    border:1px solid var(--presentation-line-strong,#C9BFAE);background:transparent;
    transition:background-color 220ms ease, border-color 220ms ease;
}
.lesson-trigger-pips i[data-pip=complete] {background:#172B24;border-color:#172B24;}
.lesson-trigger-pips i[data-pip=current] {background:#8C2633;border-color:#8C2633;}
.lesson-trigger-chev {
    width:14px;height:14px;flex:none;opacity:.6;
    transition:transform 220ms cubic-bezier(0.2,0,0,1), opacity 220ms ease;
}
.lesson-progress-trigger[aria-expanded=true] .lesson-trigger-chev {transform:rotate(180deg);opacity:1;}
body.session-presentation .lesson-progress-trigger:disabled {opacity:1;cursor:default;}
body.session-presentation .lesson-progress-trigger:focus-visible {
    outline:2px solid var(--presentation-claret,#8C2633);outline-offset:2px;
}
.structured-lesson-player:not(.structured-title-settled) .board-lesson-title,
.player-body:not(.structured-lesson-player) .board-lesson-title:not(.header-title-shown),
.structured-lesson-player:not(.structured-title-settled) .topbar-progress-line {visibility:hidden;}

/* ================= TOP-OF-BOARD TWO-TIER PROGRESS DOCK ================= */
.lesson-progress-dock {
    position:absolute;top:10px;left:0;right:0;z-index:35;min-width:0;padding:0 24px;pointer-events:none;
}
.lesson-progress-dock[hidden] {display:none;}
.lesson-progress-dock .lesson-moment-content {pointer-events:auto;}

/* Smooth chapter-handoff softening on the board behind automatic progress transitions */
.lesson-transition-host > :not(.lesson-progress-dock):not(.lesson-moment) {
    transition:opacity 320ms cubic-bezier(0.22,1,0.36,1);
}
.lesson-transition-host.lesson-transition-active > :not(.lesson-progress-dock):not(.lesson-moment) {
    opacity:0.22;
}

.lesson-progress-dock .lesson-moment-compact .lesson-moment-content {
    width:min(calc(100% - 8px), clamp(340px, calc(var(--step-count,4) * 140px + 80px), 840px));max-width:100%;
    border:1px solid var(--moment-line);border-radius:10px;
    background:var(--moment-paper);color:var(--moment-ink);
    box-shadow:0 14px 36px -14px rgba(7,20,15,0.42);
    overflow:hidden;
    transform-origin:top center;
    opacity:0;
    transform:translateY(-10px) scale(0.985);
    transition:opacity 260ms cubic-bezier(0.22,1,0.36,1), transform 300ms cubic-bezier(0.22,1,0.36,1);
}
.lesson-progress-dock .lesson-moment-compact.is-visible .lesson-moment-content {
    opacity:1;
    transform:translateY(0) scale(1);
}
.lesson-progress-dock .lesson-moment-compact.is-leaving .lesson-moment-content {
    opacity:0;
    transform:translateY(-8px) scale(0.985);
    transition:opacity 320ms cubic-bezier(0.4,0,0.2,1), transform 320ms cubic-bezier(0.4,0,0.2,1);
}
.lesson-progress-dock .lesson-moment-compact[data-xp-only="true"] .lesson-moment-content {
    width:min(620px,calc(100% - 8px));
}
.presentation-lab .lesson-moment-host {overflow:hidden!important;}
.presentation-lab .lesson-moment-host > :not(.lesson-moment) {visibility:hidden;}

/* Stacked ink-fill skill nodes row inside compact top dock (matches Gemini P-Lab 1:1!) */
.lesson-moment-compact .lesson-moment-track {
    display:grid;grid-template-columns:repeat(var(--step-count,4),minmax(0,1fr));
    gap:8px;margin:0;padding:18px 26px 14px;
    background:transparent;border:0;border-radius:0;box-shadow:none;
}
.lesson-moment-compact .lesson-moment-step {
    width:auto;min-width:0;flex:none;
}
.lesson-moment-compact .lesson-moment-step:not(:last-child)::after {
    top:19px;left:calc(50% + 26px);width:calc(100% - 44px);
}

/* Slim 1-row standalone XP slip hides the top vessel row */
.lesson-moment[data-xp-only="true"] .lesson-moment-track {display:none;}
.lesson-moment[data-xp-only="true"] .lesson-moment-xp {
    border-top:0;background:var(--moment-paper);padding:10px 18px 12px;
}

/* ================= BOTTOM DETAIL & SKILL XP STRIP (GEMINI P-LAB) ================= */
.lesson-moment-xp {
    position:relative;
    padding:12px 20px 14px;border-top:1px solid var(--moment-line);
    background:var(--moment-tint);color:var(--moment-ink);
    text-align:left;
}
.lesson-moment-xp-head {
    display:flex;align-items:center;gap:13px;
    font:500 13px/1.35 var(--font-ui,'IBM Plex Sans',sans-serif);
}

/* Compact inline ink-fill vessel inside standalone mid-skill XP slip */
.lesson-xp-slip-vessel {
    position:relative;display:grid;place-items:center;flex:none;
    width:34px;height:34px;border-radius:50%;
    border:2px solid var(--ill-ink);background:var(--moment-surface);
    overflow:hidden;font:600 14.5px/1 var(--font-serif,'STIX Two Text',Georgia,serif);
    color:var(--moment-ink);
}

/* Colorful hand-inked Lumi icon tile */
.lesson-xp-tile {
    display:grid;flex:none;place-items:center;width:36px;height:36px;border-radius:8px;
    background:var(--tile-bg,var(--ill-tile-sky));
}
.lesson-xp-tile .ink {overflow:visible;flex:none;display:block;}
.lesson-xp-tile .ink .ink-line {stroke-dasharray:1;stroke-dashoffset:0;}
.lesson-xp-tile .ink .ink-wash {transform-box:fill-box;transform-origin:center;}
.lesson-xp-tile .ink[data-draw] .ink-line {
    animation:lesson-ink-draw 0.62s cubic-bezier(0.32,0.72,0,1) both;
    animation-delay:calc(var(--i,0) * 70ms);
}
.lesson-xp-tile .ink[data-draw] .ink-wash {
    animation:lesson-ink-wash 0.46s cubic-bezier(0.34,1.4,0.64,1) both;
}

.lesson-moment-xp-title {
    flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;
}
.lesson-moment-xp-skill {
    font-size:13.5px;font-weight:700;color:var(--moment-ink);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.lesson-moment-xp-cue {font-size:12.5px;font-weight:400;color:var(--moment-ink-2);}
.lesson-moment-xp[data-mastered=true] .lesson-moment-xp-cue {color:var(--moment-gold-deep);font-weight:600;}
.lesson-moment-xp[data-direction=drop] .lesson-moment-xp-cue {color:var(--moment-claret);}

.lesson-moment-xp-numbers {
    display:inline-flex;align-items:center;gap:12px;flex:0 0 auto;
    font:600 12px/1.3 var(--font-mono,'Geist Mono',monospace);
    font-variant-numeric:tabular-nums;white-space:nowrap;
}
.lesson-moment-xp-value {color:var(--moment-ink);}

/* Teacher's red-pen loop around positive +XX XP on warm paper */
.lesson-moment-xp-delta {
    position:relative;isolation:isolate;display:inline-flex;align-items:center;justify-content:center;
    padding:2px 10px;font-size:11.5px;font-weight:600;color:var(--moment-claret);
    opacity:0;transform:translateY(2px);
}
.lesson-moment-xp[data-mastered=true] .lesson-moment-xp-delta {color:var(--moment-gold-deep);}
.lesson-moment-xp[data-direction=drop] .lesson-moment-xp-delta {color:var(--moment-claret);}
.lesson-moment-xp[data-direction=flat] .lesson-moment-xp-delta {color:var(--moment-ink-2);}
.lesson-moment-xp.is-updating .lesson-moment-xp-delta {
    animation:lesson-xp-delta 360ms cubic-bezier(0.22,1,0.36,1) both;
}
.lesson-xp-ring {
    position:absolute;z-index:-1;left:-4px;top:-4px;
    width:calc(100% + 8px);height:calc(100% + 8px);
    overflow:visible;pointer-events:none;
}
.lesson-xp-ring path {
    fill:none;stroke:var(--moment-claret);stroke-width:2;stroke-linecap:round;
    vector-effect:non-scaling-stroke;stroke-dasharray:1;
    animation:lesson-ink-draw 480ms cubic-bezier(0.32,0.72,0,1) both;
}
.lesson-moment-xp[data-mastered=true] .lesson-xp-ring path {stroke:var(--moment-gold);}

/* Whisper-thin 3px bottom hairline bar along the card edge */
.lesson-moment-xp-bar {
    position:absolute;left:0;right:0;bottom:0;height:3px;
    background:var(--moment-line);overflow:hidden;
}
.lesson-moment-xp-fill {
    position:relative;height:100%;background:var(--moment-ink);
    transition:width 760ms cubic-bezier(0.22,1,0.36,1), background-color 300ms;
}
.lesson-moment-xp[data-mastered=true] .lesson-moment-xp-fill {background:var(--moment-gold);}
.lesson-moment-xp[data-direction=drop] .lesson-moment-xp-fill {background:var(--moment-claret);}
.lesson-moment-xp.is-updating .lesson-moment-xp-fill {
    animation:lesson-xp-fill 820ms cubic-bezier(0.22,1,0.36,1) both;
}
.lesson-moment-xp-cap {
    position:absolute;top:0;bottom:0;width:1.5px;background:rgba(23,43,36,0.28);pointer-events:none;
}

@container(max-height:240px) {
    .lesson-moment-title {max-width:none;font-size:clamp(24px,3.2cqw,34px);margin-bottom:14px;}
    .lesson-moment-track {padding:14px 18px;}
    .lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-track {padding:0;}
    .lesson-moment-step {gap:4px;}
    .lesson-moment-mark,
    .lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-mark {width:34px;height:34px;font-size:15px;}
    .lesson-moment-step:not(:last-child)::after,
    .lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-step:not(:last-child)::after {top:17px;}
    .lesson-moment:is(.structured-title-flash, .lesson-moment-inline:not(.lesson-moment-compact)) .lesson-moment-step:not(:last-child)::after {left:calc(50% + 23px);width:calc(100% - 46px);}
}

@keyframes lesson-liquid-wave {from{transform:translateX(0)}to{transform:translateX(-50%)}}
@keyframes lesson-liquid-wave-back {from{transform:translateX(-50%)}to{transform:translateX(0)}}
@keyframes lesson-dock-in {from{opacity:0;transform:translateY(-10px) scale(0.985)}}
@keyframes lesson-pop-in {0%{transform:scale(0.92)}50%{transform:scale(1.06)}100%{transform:scale(1)}}
@keyframes lesson-start-pop {0%{transform:scale(0.92)}55%{transform:scale(1.06)}100%{transform:scale(1)}}
@keyframes lesson-ink-draw {from{stroke-dashoffset:1}}
@keyframes lesson-ink-wash {from{opacity:0;transform:scale(0.6) rotate(-8deg)}}
@keyframes lesson-xp-fill {0%{width:var(--xp-from,0%)}100%{width:var(--xp-to,0%)}}
@keyframes lesson-xp-delta {0%{opacity:0;transform:translateY(3px)}100%{opacity:1;transform:translateY(0)}}

@media(max-width:720px) {
    .lesson-trigger-pips {display:none;}
    .lesson-progress-dock {top:6px;padding:0 10px;}
    .lesson-moment-compact .lesson-moment-track {padding:14px 12px 12px;gap:4px;}
    .lesson-moment-compact .lesson-moment-step:not(:last-child)::after {left:calc(50% + 22px);width:calc(100% - 36px);}
    .lesson-moment-xp {padding:10px 14px 12px;}
    .lesson-moment-xp-head {gap:9px;}
    .lesson-moment-label {font-size:11.5px;}
}
@media(max-width:540px) {
    .lesson-moment.structured-title-flash .lesson-moment-step {width:92px;flex-basis:92px;}
}
@media(prefers-reduced-motion:reduce) {
    .lesson-transition-host > :not(.lesson-progress-dock):not(.lesson-moment),
    .lesson-progress-dock .lesson-moment-compact .lesson-moment-content,
    .lesson-moment.structured-title-flash,
    .lesson-moment-content,
    .lesson-moment-fill,
    .topbar-progress-line > span {transition:none;}
    .lesson-progress-dock .lesson-moment-compact .lesson-moment-content,
    .lesson-moment-step.is-starting .lesson-moment-mark,
    .lesson-moment-step.is-finishing .lesson-moment-mark,
    .lesson-moment-step.is-finishing .lesson-moment-check path,
    .lesson-xp-tile .ink[data-draw] .ink-line,
    .lesson-xp-tile .ink[data-draw] .ink-wash,
    .lesson-xp-ring path,
    .lesson-moment-xp.is-updating .lesson-moment-xp-fill,
    .lesson-moment-xp.is-updating .lesson-moment-xp-delta,
    .lesson-moment-fill::before,
    .lesson-moment-fill::after {animation:none;}
    .lesson-moment-xp.is-updating .lesson-moment-xp-delta {opacity:1;transform:none;}
}
