.subject-mastery{display:block;width:min(340px,100%);margin:18px 0 28px;padding:5px 0 8px;text-decoration:none;border-radius:3px}.subject-mastery-caption{display:flex;justify-content:space-between;gap:24px;font-size:12px;line-height:1.5;color:var(--muted);margin-bottom:8px}.subject-mastery-caption>span:first-child{color:var(--text)}.subject-mastery-track{display:block;height:3px;background:#343a42;overflow:hidden;border-radius:2px}.subject-mastery-track>span{display:block;height:100%;background:var(--yellow);width:100%;transform-origin:left;transition:transform .7s cubic-bezier(.16,1,.3,1)}.subject-mastery:hover .subject-mastery-caption{color:var(--yellow)}.encouragement-slot{height:30px;margin-top:-18px;margin-bottom:12px}#encouragement{font-size:14px;line-height:24px;color:#ede2a8;opacity:0;transform:translateY(3px);transition:opacity .24s,transform .3s cubic-bezier(.16,1,.3,1);pointer-events:none}#encouragement.is-visible{opacity:1;transform:translateY(0)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.mentor-screen{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:48px;align-items:start}.mentor-conversation{min-width:0}.mentor-heading{display:flex;gap:15px;align-items:center;padding-bottom:24px;border-bottom:1px solid var(--line)}.mentor-heading>img{width:52px;height:52px;border-radius:50%;object-fit:cover;object-position:center 22%}.mentor-heading h2{font-size:24px;line-height:1.25}.mentor-heading p{margin-top:5px;color:var(--muted);font-size:13px}.mentor-heading>a{margin-left:auto;font-size:13px;white-space:nowrap}.mentor-messages{height:390px;overflow:auto;display:flex;flex-direction:column;gap:22px;padding:28px 12px 28px 0;scrollbar-gutter:stable;overscroll-behavior:contain}.mentor-welcome{margin:auto 0;max-width:450px;padding:20px 0}.mentor-welcome h3{font-size:30px;margin-bottom:14px}.mentor-welcome p{color:var(--muted);font-size:16px;line-height:1.7}.mentor-messages:has(.mentor-message) .mentor-welcome{display:none}.mentor-message{max-width:min(82%,620px);font-size:15px;line-height:1.7;border-radius:12px;padding:17px 20px;background:#1a2027;flex-shrink:0;overflow-wrap:anywhere}.mentor-message.student{align-self:flex-end;background:#333020}.mentor-message p{white-space:pre-wrap}.mentor-message-meta{display:flex;gap:24px;justify-content:space-between;font-size:11px;color:#c2c5cb;margin-bottom:9px}.mentor-message blockquote{margin:0 0 14px;padding:10px 0 12px;border-bottom:1px solid #ffffff25;font-size:12px;color:#d7d0b7;max-height:110px;overflow:auto}.mentor-message blockquote span{display:block;margin-bottom:5px;color:#fff}.mentor-attachment{display:block;max-width:100%;max-height:220px;border-radius:7px;margin-top:10px;object-fit:contain}.mentor-pending{font-size:13px;color:var(--muted)}.mentor-pending span{animation:mentor-pulse .8s ease-in-out infinite alternate}.mentor-prompts{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}.mentor-prompts>button{padding:9px 12px;border:1px solid #48515a;border-radius:8px;font-size:12px;color:#d7dbe0}.mentor-prompts>button:hover{border-color:var(--yellow);color:var(--yellow)}.mentor-composer{border:1px solid #4d555f;border-radius:12px;background:#12171d;padding:14px 16px}.mentor-composer:focus-within{border-color:var(--yellow)}.mentor-composer textarea{width:100%;min-height:65px;max-height:200px;resize:vertical;background:transparent;border:0;color:var(--text);font:16px/1.6 Onest,sans-serif;padding:3px 0;outline:none;caret-color:var(--yellow)}.mentor-composer textarea::placeholder{color:#9ca5b1}.mentor-composer-actions{display:flex;align-items:center;gap:18px;margin-top:8px}.mentor-composer-actions .primary{min-height:44px;padding:11px 17px;font-size:13px;margin-left:auto}.mentor-attach{display:flex;align-items:center;gap:6px;font-size:12px;cursor:pointer;position:relative;color:#c2c9d2}.mentor-attach input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.mentor-attach:focus-within{outline:2px solid var(--yellow);outline-offset:4px}.mentor-keyhint{color:#9fa8b5;font-size:11px}.mentor-demo-note{font-size:11px;color:#a8b1bd;line-height:1.6;margin-top:12px}.mentor-context{border-left:1px solid var(--line);padding:5px 0 15px 28px}.mentor-context h3{font-size:18px;line-height:1.4}.mentor-context-title{font-size:15px;line-height:1.6;color:#e2d7a0;margin:18px 0}.mentor-context details{font-size:13px;margin-bottom:20px}.mentor-context summary{cursor:pointer;color:#c7cdd5}.mentor-context details p{color:#b0b9c5;line-height:1.7;margin-top:12px;max-height:230px;overflow:auto}.mentor-context>a{font-size:13px}.mentor-guidance{margin-top:40px}.mentor-guidance h3{font-size:15px}.mentor-guidance p{color:#aeb8c5;font-size:13px;line-height:1.8;margin-top:12px}.mentor-composer-context,.mentor-file-preview{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding-bottom:10px;margin-bottom:10px;font-size:12px;color:#e3d9a5}.mentor-composer-context>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mentor-composer-context button,.mentor-file-preview button{margin-left:auto;min-width:30px;min-height:30px}.mentor-file-preview img{width:40px;height:40px;object-fit:cover;border-radius:5px}.task-mentor-link{font-size:13px;margin-top:24px}.learn-task-nav{flex-wrap:wrap}.learn-question{font-size:clamp(20px,1.65vw,26px);line-height:1.55;white-space:pre-line;max-width:70ch}.task-gallery[open]{padding-bottom:12px}.task-gallery button{min-height:40px}.task-order li>span:nth-child(4){flex:1}.task-content input:focus-visible,.task-content select:focus-visible,.task-content button:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}@keyframes mentor-pulse{to{opacity:.35}}@media(max-width:1000px){.mentor-screen{grid-template-columns:minmax(0,1fr) 240px;gap:25px}.mentor-keyhint{display:none}.mentor-context{padding-left:22px}}@media(max-width:700px){.mentor-screen{display:flex;flex-direction:column;gap:24px}.mentor-conversation{width:100%}.mentor-heading{gap:10px;padding-bottom:18px;flex-wrap:wrap}.mentor-heading h2{font-size:21px}.mentor-heading>img{width:42px;height:42px}.mentor-heading>a{font-size:12px}.mentor-heading p{font-size:12px}.mentor-messages{height:360px;max-height:48dvh;padding-top:20px;gap:16px}.mentor-welcome h3{font-size:25px}.mentor-message{max-width:94%;padding:14px;font-size:14px}.mentor-composer{padding:12px}.mentor-attach span{font-size:11px}.mentor-composer-actions{gap:8px}.mentor-composer-actions .primary{padding:10px 12px}.mentor-context{border-left:0;border-top:1px solid var(--line);padding:22px 0 0;width:100%}.mentor-guidance{display:none}.mentor-context details p{max-height:130px}.subject-mastery{width:100%;max-width:340px;margin-top:16px;margin-bottom:24px}.mentor-welcome p{font-size:15px}}@media(prefers-reduced-motion:reduce){.subject-mastery-track>span,#encouragement{transition:none}.mentor-pending span{animation:none}}
.mentor-main .subject-title h1{font-size:44px}.mentor-main .subject-mastery{margin-top:12px;margin-bottom:14px}.mentor-main .tabs{margin-bottom:15px}.mentor-main .encouragement-slot{height:20px;margin-top:0;margin-bottom:0}.mentor-main .mentor-heading{padding-bottom:16px}.mentor-main .mentor-messages{height:clamp(230px,calc(100dvh - 610px),390px)}@media(max-width:700px){.mentor-main .subject-title{display:flex;align-items:center;gap:12px}.mentor-main .subject-title h1{font-size:26px;overflow-wrap:anywhere}.mentor-main .subject-tools{margin:0 0 0 auto;font-size:12px}.mentor-main .mentor-heading{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px}.mentor-main .mentor-heading>img{width:38px;height:38px}.mentor-main .mentor-heading h2{font-size:18px}.mentor-main .mentor-heading>a{grid-column:2;justify-self:start;margin:0;font-size:12px}.mentor-main .mentor-messages{height:230px;max-height:none}.mentor-main .subject-mastery{margin-bottom:14px}.mentor-message blockquote{max-height:75px}.mentor-main .mentor-composer textarea{min-height:54px}}

.task-encouragement{min-height:24px;margin-top:8px;font-size:14px;line-height:24px;color:#ede2a8;opacity:0;transform:translateY(3px);transition:opacity .24s,transform .3s cubic-bezier(.16,1,.3,1)}.task-encouragement.is-visible{opacity:1;transform:translateY(0)}@media(prefers-reduced-motion:reduce){.task-encouragement{transition:none}}
/* Mentor is summoned within the current lesson grid; the main activity stays mounted. */
.learning-grid.has-mentor{grid-template-columns:minmax(0,1fr) minmax(340px,400px);gap:32px}.mentor-panel{position:sticky;top:18px;align-self:start;min-width:0;border-left:1px solid var(--line);padding-left:24px}.mentor-panel-close{position:absolute;right:0;top:0;z-index:1}.mentor-panel .mentor-screen{display:block}.mentor-panel .mentor-context,.mentor-panel .mentor-heading>a,.mentor-panel .mentor-keyhint{display:none}.mentor-panel .mentor-heading{padding:0 35px 18px 0;gap:10px;align-items:center;flex-wrap:nowrap}.mentor-panel .mentor-heading h2{font-size:18px}.mentor-panel .mentor-heading>img{width:36px;height:36px;flex-shrink:0}.mentor-panel .mentor-heading p{font-size:12px}.mentor-panel .mentor-messages{height:clamp(240px,calc(100dvh - 410px),440px);padding-right:0;gap:14px}.mentor-panel .mentor-message{max-width:94%;padding:12px 14px;font-size:13px;line-height:1.65}.mentor-panel .mentor-message-meta{gap:10px;font-size:10px}.mentor-panel .mentor-composer{padding:12px}.mentor-panel .mentor-composer textarea{min-height:72px;font-size:14px}.mentor-panel .mentor-composer-actions{gap:8px}.mentor-panel .mentor-composer-actions .primary{padding:10px 12px;font-size:12px}.mentor-panel .mentor-attach span{font-size:11px}.mentor-panel .mentor-welcome h3{font-size:23px}.mentor-panel .mentor-welcome p{font-size:14px}.mentor-panel .mentor-prompts{gap:7px}.mentor-panel .mentor-demo-note{font-size:10px}.bank-mechanics{margin:22px 0 28px;padding-bottom:23px;border-bottom:1px solid var(--line)}.bank-mechanics-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.bank-mechanics-heading h3{font-size:18px;font-family:Onest,sans-serif}.bank-mechanics-heading>span{font-size:12px;color:var(--muted);white-space:nowrap}.bank-mechanics>p{font-size:13px;color:var(--muted);margin:9px 0 15px}.bank-mechanics-list{display:flex;flex-wrap:wrap;gap:8px}.bank-mechanics-list>button{border:1px solid #48515a;border-radius:7px;padding:10px 12px;font-size:13px;min-height:40px;text-align:left}.bank-mechanics-list>button:hover{border-color:var(--yellow)}.bank-mechanics-list>button.selected{background:var(--yellow);border-color:var(--yellow);color:#101216}.bank-mechanics>.text-link{font-size:13px;margin-top:16px}.bank-missing{font-size:11px;color:var(--muted);margin-top:14px}.bank-missing summary{cursor:pointer}.bank-missing p{margin-top:9px;line-height:1.6}.mentor-panel .mentor-composer-context{max-width:100%;font-size:11px}@media(max-width:900px){.learning-grid.has-mentor{grid-template-columns:minmax(0,1fr)}.mentor-panel{position:relative;top:0;border-left:0;border-top:1px solid var(--line);padding:22px 0 0}.mentor-panel-close{top:18px}.mentor-panel .mentor-messages{height:300px}.mentor-panel .mentor-heading{display:flex}.mentor-panel .mentor-conversation{width:100%}.mentor-panel .mentor-composer textarea{font-size:16px}.bank-mechanics-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.bank-mechanics-heading h3{font-size:16px}}

@media(min-width:901px){.mentor-panel .mentor-messages{height:clamp(160px,calc(100dvh - 700px),320px)}}
@media(min-width:901px) and (max-width:1150px){.has-mentor .task-match{grid-template-columns:minmax(0,1fr)}.has-mentor .task-parts{grid-template-columns:minmax(0,1fr)}.has-mentor .learn-form-footer{flex-wrap:wrap}}
/* Quieter task surface, direct manipulation, compact inline answers. */
.learn-form-footer{justify-content:flex-end}.learn-task-bottom:empty{display:none}.task-gaps{display:block!important;font-size:17px!important;line-height:1.8!important;white-space:pre-line}.task-gaps>span{display:inline}.task-gaps .inline-gap{display:inline!important;margin:0 5px!important;white-space:normal}.inline-gap input{display:inline-block;min-width:8ch;max-width:min(24ch,90%);height:32px;vertical-align:baseline;padding:2px 5px;color:var(--yellow);background:#ffffff05;border:0;border-bottom:1px solid #b9ad62;border-radius:0;font:inherit;line-height:1.2;caret-color:var(--yellow)}.inline-gap input:focus{outline:0;border-bottom:2px solid var(--yellow);background:#fee25208}.task-file-link{display:inline-flex;align-items:center;gap:10px}.task-file-link .icon{width:20px;height:20px}.match-pairs{display:grid;grid-template-columns:1fr 1fr;gap:40px}.match-column{display:flex;flex-direction:column;gap:14px}.match-card{display:flex;align-items:center;gap:14px;min-height:82px;width:100%;padding:17px;text-align:left;border:1px solid #424b57;border-radius:10px;background:#151b23;font-size:16px;line-height:1.55;cursor:pointer;transition:border-color .16s,background .16s}.match-card:hover{border-color:#a1aab8}.match-card.is-selected{border-color:var(--yellow);background:#fee2520c}.match-card.is-linked{border-color:var(--pair-color)}.match-card small{display:block;margin-top:10px;font-size:12px;color:var(--pair-color)}.match-letter{display:grid;place-items:center;flex-shrink:0;width:26px;height:26px;font-size:12px;border-radius:50%;border:1px solid #616975;color:#d7dce3}.is-linked .match-letter{color:var(--pair-color);border-color:var(--pair-color)}.match-port{display:block;width:9px;height:9px;border-radius:50%;border:1px solid #7c8592;flex-shrink:0}.match-left .match-port{margin-left:auto}.is-linked .match-port{background:var(--pair-color);border-color:var(--pair-color)}.match-right{cursor:grab}.match-right:active{cursor:grabbing}.task-order li{cursor:grab;padding:16px;min-height:74px;gap:15px}.task-order li:active{cursor:grabbing}.task-order li>span:last-child{flex:1}.task-order .task-drag-handle{background:transparent;width:25px;height:32px;padding:0;cursor:grab;touch-action:none;color:#8b97a7}.task-order li.drag-over,.match-card.drag-over{border-color:var(--yellow);background:#fee25212;outline:1px dashed var(--yellow);outline-offset:3px}.task-order-index{color:#9da6b3}.subject-mastery{display:flex;align-items:center;justify-content:space-between;gap:22px;width:330px;padding:11px 0;max-width:100%;border-radius:0}.mastery-title{display:flex;align-items:center;gap:10px;color:#e8e9ec;font-size:14px;font-weight:500;white-space:nowrap}.mastery-title>.icon{width:14px;height:14px;color:#a3aab5;transition:transform .2s}.mastery-measure{display:grid;gap:6px;min-width:110px;flex:1}.subject-mastery-track{height:2px;background:#464c56;border-radius:0}.mastery-caption{font-size:10px;line-height:1.4;color:#a8b0bc;text-align:right}.subject-mastery:hover .mastery-title{color:var(--yellow)}.subject-mastery:hover .mastery-title>.icon{transform:translate(2px,-2px);color:var(--yellow)}.mentor-panel .mentor-heading h2{font-family:Onest,sans-serif;font-size:20px;font-weight:600}.mentor-panel .mentor-heading{min-height:50px}.mentor-panel .mentor-composer-actions{justify-content:flex-end}.mentor-panel .mentor-messages{height:clamp(230px,calc(100dvh - 640px),420px)}.mentor-intro{max-width:100%}.mentor-panel .mentor-composer textarea{min-height:75px}.mentor-demo-note{opacity:.85}@media(max-width:700px){.match-pairs{gap:12px}.match-card{font-size:13px;padding:12px 10px;gap:8px;min-height:110px;flex-wrap:wrap}.match-letter{width:22px;height:22px}.match-card small{font-size:11px}.match-port{display:none}.task-gaps{font-size:16px!important;line-height:1.9!important}.task-order li{padding:12px;gap:10px;font-size:14px}.mentor-panel .mentor-messages{height:320px}.subject-mastery{width:290px}.mastery-title{font-size:13px}.mastery-measure{min-width:90px}}@media(prefers-reduced-motion:reduce){.mastery-title>.icon,.match-card{transition:none}}

.gap-word-bank{font-size:14px;line-height:1.6;color:var(--muted);margin:18px 0 0}

.match-instruction{font-size:14px;line-height:1.6;color:#c6cad1;margin:0 0 18px;max-width:65ch}.match-edit{display:block;margin-top:7px;text-decoration:underline;text-underline-offset:3px;font-size:12px}.match-empty{color:#bcc2ca}.matching-active .match-right{border-style:dashed}.matching-active .match-right:hover{border-color:var(--yellow);background:#29291e}.gap-word-bank{margin:0 0 24px;padding:14px 0;border-block:1px solid #ffffff25;color:#e2e4e8;line-height:1.8}.order-lifted{opacity:.25}.order-drag-ghost{display:flex;align-items:center;gap:15px;list-style:none;background:#252e39;border:1px solid #fee252;border-radius:10px;padding:12px 16px;color:#f4f5f7;box-shadow:0 16px 32px #0006}.order-landed{animation:order-land .6s ease-out}@keyframes order-land{0%{background:#49442b;border-color:#fee252}35%{background:#302e22;border-color:#fee252}100%{background:#18202b}}@media(prefers-reduced-motion:reduce){.order-landed{animation:none;outline:2px solid #fee252}.order-drag-ghost{transform:none!important}}

/* One shared grid keeps every matching card equal, including linked answers. */
.match-pairs{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-flow:row dense;grid-auto-rows:1fr;row-gap:14px;align-items:stretch}
.match-column{display:contents}
.match-column:first-child>.match-card{grid-column:1}
.match-column:last-child>.match-card{grid-column:2}
.match-pairs .match-card{height:100%;min-width:0;box-sizing:border-box;overflow-wrap:anywhere}

/* Confirmed mastery ends in a gently breathing point. */
.subject-mastery{display:grid;grid-template-columns:1fr auto;gap:12px;width:340px;padding:10px 0}.mastery-measure{display:contents}.mastery-caption{grid-column:2;grid-row:1;font-size:11px}.subject-mastery-track{grid-column:1/-1;grid-row:2;width:100%;height:2px;overflow:visible;border-radius:2px}.subject-mastery-track>span{position:relative;transform:none;transition:width .7s cubic-bezier(.16,1,.3,1);border-radius:2px}.mastery-dot{position:absolute;right:0;top:50%;width:8px;height:8px;border-radius:50%;background:#ffe94f;transform:translate(50%,-50%)}.mastery-dot:after{content:'';position:absolute;inset:-4px;border:1px solid #ffe94f;border-radius:50%;animation:mastery-breathe 2.8s ease-in-out infinite}@keyframes mastery-breathe{0%,100%{transform:scale(.65);opacity:.12}50%{transform:scale(1.15);opacity:.5}}@media(prefers-reduced-motion:reduce){.mastery-dot:after{animation:none;opacity:.2}.subject-mastery-track>span{transition:none}}
/* A travelling pulse follows the earned segment; the endpoint stays still. */
.mastery-dot:after{display:none}
.subject-mastery-track>span:after{content:'';position:absolute;inset:0;transform-origin:left;background:#fff8b3;clip-path:inset(0 100% 0 0);animation:mastery-wave 3.2s ease-in-out infinite}
@keyframes mastery-wave{0%{clip-path:inset(0 100% 0 0);opacity:0}12%{opacity:1}70%{clip-path:inset(0 0 0 80%);opacity:1}86%,100%{clip-path:inset(0 0 0 100%);opacity:0}}
@media(prefers-reduced-motion:reduce){.subject-mastery-track>span:after{animation:none;display:none}}

.subject-mastery-track{height:4px}.subject-mastery-track>span:after{top:-2px;bottom:-2px;border-radius:4px;background:#fffbd0;animation:mastery-visible-wave 2.4s ease-in-out infinite;filter:drop-shadow(0 2px 4px #ffe25288)}
@keyframes mastery-visible-wave{0%,8%{clip-path:inset(0 100% 0 0);opacity:0}15%{opacity:1}58%{clip-path:inset(0 0 0 0);opacity:1}78%,100%{clip-path:inset(0 0 0 0);opacity:0}}
@media(prefers-reduced-motion:reduce){.subject-mastery-track>span:after{animation:none;display:none}}

.subject-mastery-track{height:2px}.subject-mastery-track>span:after{top:0;bottom:0;border-radius:1px;filter:none}.mastery-dot{width:8px;height:8px;z-index:1;background:#ffe94f}

.subject-mastery-track{height:3px}.subject-mastery-track>span:after{position:absolute;top:-1px;bottom:-1px;border-radius:3px;background:linear-gradient(90deg,transparent 0%,#ffd43b66 18%,#ffe94f 48%,#fffbd1 72%,#ffe94f66 90%,transparent 100%);background-size:38% 100%;background-repeat:no-repeat;clip-path:none;filter:none;animation:spectrum-wave 2.8s ease-in-out infinite}
@keyframes spectrum-wave{0%,8%{background-position:-65% 50%;opacity:0}18%{opacity:1}78%{background-position:162% 50%;opacity:1}90%,100%{background-position:162% 50%;opacity:0}}
@media(prefers-reduced-motion:reduce){.subject-mastery-track>span:after{animation:none;display:none}}

.mentor-task-actions{display:flex;flex-wrap:wrap;gap:4px 18px;padding:12px 0;border-top:1px solid #424952;margin-top:12px}.mentor-task-actions button{min-height:44px;padding:10px 0;font-size:14px;color:var(--yellow);text-align:left}.mentor-task-actions button:disabled{opacity:.55;cursor:wait}.mentor-task-actions button:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}

.mentor-task-actions button{max-width:100%;white-space:normal;line-height:1.5}

/* Read-only current task; native disclosure remains keyboard accessible. */
.mentor-task-context{border-bottom:1px solid var(--line);font-size:14px;line-height:1.55}
.mentor-task-context summary{cursor:pointer;min-height:44px;padding:11px 4px;color:var(--muted);box-sizing:border-box}
.mentor-task-context summary:focus-visible{outline:2px solid var(--yellow);outline-offset:2px}
.mentor-task-context-body{max-height:24dvh;overflow:auto;overscroll-behavior:contain;padding:0 4px 14px;overflow-wrap:anywhere}
.mentor-task-context-body strong{display:block;margin-bottom:6px;font-weight:600}
.mentor-task-context-body p{white-space:pre-wrap;margin:0}
@media(max-width:600px){
 .mentor-panel .mentor-heading{padding-bottom:12px;gap:12px}
 .mentor-panel .mentor-heading>img{width:40px;height:40px}
 .mentor-panel .mentor-heading h2{font-size:20px}
 .mentor-panel .mentor-messages{gap:16px;padding-top:16px;padding-bottom:16px}
 .mentor-panel .mentor-message{padding:14px 16px}
}
