:root{--blue:#2855e8;--blue-dark:#2045c4;--ink:#202b45;--muted:#748097;--line:#e9edf5;--wash:#f5f7fc;--soft:#eef2ff}*{box-sizing:border-box}html,body{margin:0;height:100%}body{background:var(--wash);color:var(--ink);font:16px/1.5 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;-webkit-font-smoothing:antialiased}button,textarea{font:inherit}button{border:0;cursor:pointer;min-height:44px;touch-action:manipulation}button,a{-webkit-tap-highlight-color:transparent}button:disabled{cursor:default}button:focus-visible,a:focus-visible,textarea:focus-visible{outline:3px solid #95adff;outline-offset:3px}[hidden]{display:none!important}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}.app-bar{height:92px;max-width:1224px;margin:auto;padding:0 32px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:#1e2943;font-size:25px;font-weight:750;letter-spacing:-1.2px}.brand-mark{width:34px;height:34px;background:var(--blue);color:white;display:grid;place-items:center;border-radius:11px;transform:rotate(-7deg)}.brand-mark svg{width:23px;height:23px;stroke-width:1.8}.brand-dot{color:var(--blue)}.app-tools{display:flex;align-items:center;gap:18px}.roles{display:flex;padding:4px;background:#e9edf6;border-radius:13px}.roles button{background:transparent;color:#68758e;min-height:38px;border-radius:10px;padding:5px 22px;font-size:14px;font-weight:550;display:flex;align-items:center;gap:7px}.roles button.selected{color:var(--blue);background:white;box-shadow:0 2px 5px #233d6a0a}.roles span{background:var(--blue);color:white;font-size:10px;width:17px;height:17px;display:grid;place-items:center;border-radius:50%}.icon-button{width:44px;height:44px;background:transparent;display:grid;place-items:center;color:#7a849a;border-radius:12px}.icon-button:hover{background:#e9edf8;color:var(--blue)}.settings-button svg{width:20px;height:20px;fill:var(--wash)}.messenger{max-width:1160px;height:calc(100dvh - 134px);min-height:550px;max-height:1080px;margin:auto;display:grid;grid-template-columns:288px minmax(0,1fr);background:white;border:1px solid #e2e7f2;border-radius:24px;overflow:hidden;box-shadow:0 16px 55px -35px #374d7d35}.messenger.student-view{max-width:960px;grid-template-columns:minmax(0,1fr)}.thread{min-width:0;min-height:0;display:flex;flex-direction:column}.thread-header{display:flex;align-items:center;gap:16px;padding:26px 36px 23px;border-bottom:1px solid var(--line)}.heading-group{min-width:0;flex:1}.course-line{display:flex;align-items:center;gap:9px;color:#7d89a0;font-size:12px;font-weight:500}.course-separator{color:#bbc3d3}.heading-group h2{font-size:27px;letter-spacing:-.9px;line-height:1.25;font-weight:650;margin:7px 0 9px}.contact-status{display:flex;align-items:center;gap:7px}.contact-status p{margin:0;font-size:12px;color:#7b88a0}.presence-mark{display:block;width:6px;height:6px;background:#4b75ed;border-radius:50%;font-size:0;flex-shrink:0}.thread-actions{display:flex;align-items:center;gap:8px}.source-action{display:flex;gap:8px;align-items:center;font-size:12px;font-weight:550;color:#647493;background:transparent;padding:8px 12px;border:1px solid var(--line);border-radius:11px;white-space:nowrap}.source-action svg{width:17px;height:17px}.source-action:hover{color:var(--blue);background:var(--wash)}.finish-action{display:flex;align-items:center;gap:5px;padding:8px 12px;background:var(--soft);color:var(--blue);border-radius:10px;font-size:13px}.finish-action svg{width:17px}.message-stream{flex:1;min-height:0;overflow:auto;padding:23px 48px 26px;display:flex;flex-direction:column;gap:25px;scrollbar-width:thin;scrollbar-color:#dee5f2 transparent}.day-marker{align-self:center;display:flex;align-items:center;gap:12px;color:#98a3b7;font-size:11px;letter-spacing:.2px;margin:0 0 1px}.day-marker:before,.day-marker:after{content:'';width:24px;height:1px;background:var(--line)}.message{align-self:flex-start;max-width:min(84%,570px);flex-shrink:0;min-width:0}.sender{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;color:#627391;margin:0 0 9px}.assistant .sender:before{content:'✦';width:22px;height:22px;display:grid;place-items:center;color:var(--blue);background:var(--soft);border-radius:7px;font-size:16px}.teacher .sender:before{content:'T';width:22px;height:22px;display:grid;place-items:center;color:var(--blue);background:var(--soft);border-radius:50%;font-size:10px}.bubble{font-size:17px;line-height:1.7;overflow-wrap:anywhere;letter-spacing:-.15px}.bubble p{white-space:pre-line;margin:0}.message.outgoing{align-self:flex-end;max-width:78%}.outgoing .sender{display:none}.outgoing .bubble{padding:14px 20px;background:var(--blue);color:#fff;border-radius:19px 19px 5px 19px;line-height:1.55;box-shadow:0 4px 10px #2855e80a}.message.student:not(.outgoing) .bubble{background:var(--wash);padding:14px 20px;border-radius:5px 19px 19px 19px}.message.system{align-self:center;max-width:90%;text-align:center;font-size:12px;color:#7c89a2;padding:5px 12px;border-radius:20px;background:var(--wash);line-height:1.6}.source-link{display:flex;align-items:center;gap:10px;border:1px solid #e2e8f6;background:#fcfdff;color:#5e739b;border-radius:11px;padding:9px 13px;margin-top:16px;font-size:12px;min-height:44px;line-height:1.5;text-align:left}.source-link svg{width:18px;height:18px;color:#7089c0}.source-link:after{content:'↗';color:#879bbb;margin-left:14px;font-size:17px}.source-link:hover{background:var(--soft);color:var(--blue)}.compose-area{padding:0 36px 15px}.handoff-bar{border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 2px}.handoff-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.handoff-copy>span:first-child{font-size:13px;font-weight:600;color:#53627d}.handoff-copy>span:last-child{font-size:12px;color:#8a96ac;line-height:1.5}.action-toolbar{display:flex;align-items:center;gap:8px;flex-shrink:0}.toolbar-action{display:flex;align-items:center;gap:8px;background:var(--soft);color:var(--blue);border-radius:11px;padding:9px 14px;font-size:13px;font-weight:550;white-space:nowrap}.toolbar-action svg{width:17px;height:17px}.toolbar-action:hover:not(:disabled){background:#e4ebff}.toolbar-action:disabled{background:#f3f5fa;color:#8996ad}.action{display:flex;align-items:center;justify-content:center;gap:8px;background:var(--blue);color:white;padding:9px 16px;border-radius:11px;font-size:13px;font-weight:550}.action svg{width:17px}.action:disabled{opacity:.45}.composer{background:#f7f9fd;border:1px solid #e5eaf4;border-radius:17px;padding:13px 13px 10px 19px;transition:border-color .2s,box-shadow .2s}.composer:focus-within{border-color:#9fb7ff;box-shadow:0 0 0 3px #2855e808}.composer textarea{width:100%;min-width:0;display:block;resize:none;border:0;outline:0;background:transparent;min-height:32px;max-height:125px;padding:0;color:var(--ink);font-size:16px;line-height:1.6}.composer textarea:focus-visible{outline:0}.composer textarea::placeholder{color:#8e9ab0}.composer-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:8px}.composer-bottom>span{font-size:11px;color:#a0aabd;display:flex;align-items:center;gap:6px}.editor-dot{width:4px;height:4px;background:#a4b3d3;border-radius:50%}.send-button{display:flex;align-items:center;gap:10px;min-height:40px;padding:8px 15px;background:var(--blue);color:white;border-radius:10px;font-size:13px;font-weight:550}.send-button svg{width:16px;height:16px;stroke-width:2}.send-button:disabled{background:#e7edf9;color:#9bacca}.send-button:hover:not(:disabled),.action:hover:not(:disabled){background:var(--blue-dark)}.composer-hint{text-align:center;color:#a4aec0;font-size:10px;margin:10px 0 0;letter-spacing:.05px}.demo-footer{height:42px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:10px;color:#99a4b9;letter-spacing:.1px}.demo-dot{width:4px;height:4px;border-radius:50%;background:#b0bbd0}.sidebar{display:flex;flex-direction:column;min-height:0;background:#fafbfe;border-right:1px solid var(--line)}.sidebar-top{padding:31px 24px 20px}.eyebrow{color:#96a1b6;font-size:9px;font-weight:650;letter-spacing:1.5px}.sidebar h1{font-size:28px;line-height:1.3;letter-spacing:-1px;margin:8px 0}.sidebar-top p{font-size:12px;color:#8b97ad;margin:0}.chat-list{overflow:auto;padding:0 12px}.chat-row{display:flex;gap:10px;text-align:left;width:100%;padding:16px 13px;border:1px solid transparent;border-radius:13px;background:transparent}.chat-row.selected{background:white;border-color:#e1e8f8;box-shadow:0 4px 12px #29457004}.chat-row:hover{background:#f0f4fd}.avatar{width:37px;height:37px;flex-shrink:0;display:grid;place-items:center;border-radius:13px;background:#e9effe;color:#5375bd;font-size:14px;font-weight:600}.row-body{min-width:0;flex:1}.row-title{display:flex;justify-content:space-between;gap:8px;align-items:center}.row-title strong{font-size:13px;font-weight:600}.row-state{font-size:9px;color:var(--blue);background:var(--soft);border-radius:6px;padding:2px 5px}.row-body p{font-size:11px;color:#8e9ab1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:5px 0 0}.sidebar-bottom{display:flex;align-items:center;gap:10px;margin-top:auto;border-top:1px solid var(--line);padding:20px 24px}.sidebar-bottom strong{display:block;font-size:12px;font-weight:600}.sidebar-bottom div>span{display:block;font-size:10px;color:#8e9ab0;margin-top:2px}.avatar.small{width:33px;height:33px;font-size:12px;border-radius:50%}.status-dot{display:inline-block;width:6px;height:6px;background:#527bea;border-radius:50%;flex-shrink:0}.sidebar-bottom>.status-dot{margin-left:auto}.status-dot.offline{background:#b3bbc9}.empty-list{padding:25px;color:#93a0b5;font-size:12px;line-height:1.8}.empty-list strong{font-size:13px;font-weight:500;display:block;color:#76849e}.empty-list p{margin:5px 0}.tiny-ring{display:block;width:22px;height:22px;border:1px solid #d2dcef;border-radius:50%;margin-bottom:15px}.no-conversation{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px}.empty-symbol{width:64px;height:64px;background:var(--soft);color:#6889e3;display:grid;place-items:center;border-radius:22px;margin-bottom:27px;transform:rotate(-8deg)}.empty-symbol svg{width:28px;height:28px}.no-conversation h2{font-size:26px;font-weight:550;letter-spacing:-.8px;margin:12px 0}.no-conversation p{font-size:14px;line-height:1.8;color:#8996ac;margin:0}.empty-footnote{font-size:11px;color:#b0b9c8;margin-top:45px}.mobile-back{display:none}.student-view .sidebar,.student-view .mobile-back{display:none!important}dialog{width:calc(100% - 32px);max-width:510px;border:1px solid var(--line);border-radius:23px;padding:27px;color:var(--ink);max-height:90dvh;overflow:auto;box-shadow:0 35px 100px #1f315c25}dialog::backdrop{background:#24335242;backdrop-filter:blur(6px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px}dialog h2{font-size:28px;font-weight:600;letter-spacing:-.9px;margin:12px 0}.dialog-copy{font-size:14px;line-height:1.8;color:#7f8da5;margin:0 0 22px}.scenario-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}.scenario-options button{padding:15px;background:var(--wash);border:1px solid var(--line);border-radius:13px;text-align:left;color:var(--ink)}.scenario-options button.selected{background:var(--soft);border-color:#b3c5ff}.scenario-options strong{font-size:14px;font-weight:600;display:flex;align-items:center;gap:8px}.scenario-options button>span{font-size:11px;line-height:1.7;color:#8492aa;display:block;margin-top:5px}.dialog-note{font-size:11px;line-height:1.8;color:#97a3b8;margin:19px 0 0}.reset-button{color:var(--blue);background:transparent;font-size:13px;padding:12px 0;margin-top:5px}.source-course{display:block;margin-top:20px;font-size:12px;color:#8b98af}.lesson-board{display:flex;flex-direction:column;gap:8px}.lesson-board>div{background:var(--wash);padding:13px;border-radius:12px;display:flex;align-items:center;gap:14px;font-size:12px}.lesson-board strong{font-size:11px;font-weight:500;width:98px;display:flex;gap:7px;align-items:center;color:#7f8ba3}.lesson-board i{width:6px;height:6px;border:1px solid #b7c3da;border-radius:50%}.lesson-board>div:nth-child(2) i{background:#afc1ff;border:0}.lesson-board>div:nth-child(3) i{background:var(--blue);border:0}.lesson-board>div>span{padding:10px;background:white;border:1px solid var(--line);border-radius:7px;flex:1}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(min-width:1400px){.app-bar{height:100px}.messenger{height:calc(100dvh - 150px)}.demo-footer{height:50px}}
@media(max-width:1200px) and (min-width:761px){.messenger{margin:0 28px}.messenger.student-view{margin-left:auto;margin-right:auto;width:calc(100% - 56px)}.thread-header{padding:24px}.message-stream{padding-left:30px;padding-right:30px}.compose-area{padding-left:24px;padding-right:24px}.messenger:not(.student-view){grid-template-columns:246px minmax(0,1fr)}.messenger:not(.student-view) .heading-group h2{font-size:23px}.messenger:not(.student-view) .thread-header{flex-wrap:wrap}.messenger:not(.student-view) .handoff-bar{align-items:flex-start;flex-direction:column}}
@media(max-width:760px){html,body{height:100%;overflow:hidden;background:white}.app-bar{height:70px;padding:0 18px;border-bottom:1px solid var(--line)}.brand{font-size:22px;gap:8px;letter-spacing:-1px}.brand-mark{width:29px;height:29px;border-radius:9px}.brand-mark svg{width:21px;height:21px}.app-tools{gap:5px}.roles{padding:3px;border-radius:11px;background:#f0f3fa}.roles button{padding:4px 12px;min-height:38px;font-size:12px}.roles span{width:14px;height:14px;font-size:9px}.settings-button{width:34px}.settings-button svg{width:18px;height:18px}.messenger,.messenger.student-view{display:block;height:calc(100dvh - 94px - env(safe-area-inset-bottom));min-height:0;max-height:none;width:100%;border:0;margin:0;border-radius:0;box-shadow:none}.thread{height:100%}.thread-header{padding:20px 22px 17px;gap:10px;align-items:flex-start;position:relative}.course-line{font-size:10px;gap:7px}.heading-group h2{font-size:24px;letter-spacing:-.7px;margin:6px 0 9px;max-width:100%;line-height:1.3}.contact-status p{font-size:11px}.thread-actions{position:absolute;right:17px;top:10px;gap:3px}.source-action{font-size:10px;gap:5px;border:0;min-height:35px;padding:4px}.source-action svg{width:14px;height:14px}.thread-actions .finish-action{font-size:11px;min-height:35px;padding:6px 8px}.finish-action svg{width:13px}.course-line{padding-right:112px;min-height:18px}.message-stream{padding:19px 23px 23px;gap:22px}.message{max-width:94%}.message.outgoing{max-width:87%}.bubble{font-size:17px;line-height:1.65}.outgoing .bubble{padding:12px 16px;border-radius:17px 17px 4px 17px;font-size:16px}.sender{font-size:11px;margin-bottom:8px}.source-link{font-size:11px;padding:8px 11px;margin-top:14px;min-height:42px}.source-link svg{width:16px;height:16px}.message.system{font-size:11px;max-width:100%;padding:6px 10px}.day-marker{font-size:10px}.compose-area{padding:0 17px 10px}.handoff-bar{padding:13px 2px;gap:9px}.handoff-copy>span:first-child{font-size:12px}.handoff-copy>span:last-child{font-size:10px;line-height:1.5}.toolbar-action{font-size:12px;min-height:42px;padding:8px 11px;gap:6px}.toolbar-action svg{width:15px;height:15px}.action{font-size:12px;min-height:42px;padding:8px 12px}.composer{padding:12px 11px 9px 15px;border-radius:15px}.composer textarea{font-size:16px;min-height:28px;max-height:105px}.composer-bottom{padding-top:6px}.composer-bottom>span{font-size:10px}.send-button{min-height:36px;padding:6px 13px;font-size:12px;gap:8px}.composer-hint{display:none}.demo-footer{height:24px;font-size:9px;padding-bottom:env(safe-area-inset-bottom);box-sizing:content-box}.sidebar{display:none;height:100%}.messenger.show-list .sidebar{display:flex}.messenger.show-list .thread{display:none}.student-view.show-list .thread{display:flex}.sidebar-top{padding:30px 24px 24px}.sidebar-top .eyebrow{font-size:10px}.sidebar h1{font-size:32px}.sidebar-top p{font-size:14px}.chat-list{padding:0 16px}.chat-row{padding:17px 14px}.row-title strong{font-size:15px}.row-state{font-size:11px}.row-body p{font-size:13px;margin-top:6px}.sidebar-bottom strong{font-size:14px}.sidebar-bottom div>span{font-size:12px}.empty-list{font-size:14px}.empty-list strong{font-size:15px}.mobile-back{display:grid;width:29px;margin-left:-11px;margin-top:21px}.messenger:not(.student-view) .thread-header{padding-top:23px}.messenger:not(.student-view) .course-line{padding-right:155px;font-size:9px;gap:4px;min-height:25px;flex-wrap:wrap}.messenger:not(.student-view) .heading-group h2{font-size:23px}.messenger:not(.student-view) .handoff-bar{gap:8px}.messenger:not(.student-view) .handoff-copy{max-width:55%}.no-conversation{padding:20px}.no-conversation h2{font-size:23px}.no-conversation p{font-size:14px}dialog{padding:21px;border-radius:20px}dialog h2{font-size:26px}.dialog-copy{font-size:14px}.scenario-options button{padding:13px}.scenario-options strong{font-size:14px}.scenario-options button>span{font-size:12px}}
@media(max-width:390px){.app-bar{padding:0 13px}.brand{font-size:20px;gap:6px}.brand-mark{width:26px;height:26px}.roles button{padding:4px 9px}.app-tools{gap:2px}.roles{padding:2px}.settings-button{width:30px}.heading-group h2{font-size:22px}.thread-header{padding-left:19px;padding-right:19px}.message-stream{padding-left:20px;padding-right:20px}.course-line{font-size:9px;gap:4px}.handoff-copy>span:last-child{font-size:10px}.toolbar-action{padding:8px 10px;font-size:11px}.toolbar-action svg{width:14px}.composer-bottom>span{font-size:9px}}
@media(max-height:700px) and (max-width:760px){.app-bar{height:60px}.messenger,.messenger.student-view{height:calc(100dvh - 84px - env(safe-area-inset-bottom))}.thread-header{padding-top:14px;padding-bottom:12px}.heading-group h2{margin-top:5px;margin-bottom:6px}.handoff-bar{padding-top:10px;padding-bottom:10px}.message-stream{padding-top:13px;gap:18px}.composer-bottom{padding-top:2px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
/* Clear touch targets and quiet, readable secondary type. */
.roles button,.settings-button,.source-action,.finish-action,.toolbar-action,.source-link,.send-button,.action{min-height:44px}.settings-button{min-width:44px}.course-line,.contact-status p,.handoff-copy>span:last-child,.composer-hint,.demo-footer,.sidebar-top p,.row-body p,.dialog-note,.composer-bottom>span{color:#718099}.source-action{color:#657591}.demo-footer{font-size:10px}.student-view .heading-group h2{padding-right:0}
@media(max-width:760px){.roles button{min-height:44px}.settings-button{width:36px;min-width:36px}.source-action,.finish-action{min-height:44px}.thread-actions{top:3px}.course-line{min-height:23px}.heading-group h2{margin-top:3px}.send-button{min-height:44px}.toolbar-action{min-height:44px}.composer-bottom>span{color:#7989a3}.app-bar{padding-left:16px;padding-right:10px}.roles button{padding-left:10px;padding-right:10px}.composer textarea{max-height:100px}.mobile-back{min-width:32px}.sidebar-top p,.row-body p{color:#75839a}}
@media(max-width:390px){.brand{font-size:19px;gap:5px}.roles button{padding-left:8px;padding-right:8px}.roles{padding:2px}.app-bar{padding-left:12px;padding-right:7px}.app-tools{gap:2px}.settings-button{width:34px;min-width:34px}}
@media(max-width:760px){.settings-button{width:44px;min-width:44px}.mobile-back{width:44px;min-width:44px}.messenger,.messenger.student-view{height:calc(var(--viewport-height,100dvh) - 94px - env(safe-area-inset-bottom))}}
@media(max-height:700px) and (max-width:760px){.messenger,.messenger.student-view{height:calc(var(--viewport-height,100dvh) - 84px - env(safe-area-inset-bottom))}}

/* When Teacher is unavailable, the reason replaces the handoff actions. */
.handoff-bar.unavailable .action-toolbar{display:none}
.handoff-bar.unavailable .handoff-copy{max-width:100%;width:100%}
.handoff-bar.unavailable .handoff-copy>span:last-child{font-size:14px;line-height:1.6;max-width:650px;margin-top:5px;color:#657591}
@media(max-width:760px){.handoff-bar.unavailable .handoff-copy>span:first-child{font-size:15px}.handoff-bar.unavailable .handoff-copy>span:last-child{font-size:14px}}
