:root{--ink:#163937;--muted:#667f7b;--teal:#207f70;--teal-dark:#146b60;--mint:#d8eee4;--paper:#f8faf7;--line:#e1eae4;--white:#fff;--shadow:0 14px 42px rgba(29,69,56,.075);--radius:20px;font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--ink)}
*{box-sizing:border-box}html{min-height:100%;scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-size:15px;line-height:1.5}a{text-decoration:none;color:inherit}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #e0b85d;outline-offset:3px}.site{min-height:100vh;display:flex;flex-direction:column}main{flex:1}.page-shell{max-width:1190px;margin:0 auto;padding-left:28px;padding-right:28px}.site-header{height:78px;display:flex;align-items:center;justify-content:space-between;max-width:1246px;padding:0 28px;width:100%;margin:auto;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;font-weight:830;font-size:21px;letter-spacing:-1.1px}.brand-mark{display:grid;place-items:center;background:#1b796c;color:white;width:37px;height:37px;border-radius:12px;font-size:25px;line-height:1;letter-spacing:-3px;padding-right:4px}.brand-dot{color:#b6efce}.head-right{display:flex;align-items:center;gap:22px}.status-pill{font-size:10px;font-weight:800;letter-spacing:.11em;background:#e2f3e9;color:#247c60;padding:7px 12px;border-radius:25px}.text-link{border:0;background:transparent;color:#315e55;font-weight:700;font-size:13px;white-space:nowrap}.text-link:hover{color:var(--teal)}.inline{display:inline}.site-footer{border-top:1px solid var(--line);color:#768e85;text-align:center;padding:19px 20px;font-size:11px}.hero{display:grid;grid-template-columns:1.1fr .9fr;align-items:center;gap:70px;padding-top:89px;padding-bottom:110px}.eyebrow{font-size:11px;letter-spacing:.16em;color:#438577;font-weight:800;text-transform:uppercase;display:inline-flex;align-items:center;gap:9px}.ping{width:7px;height:7px;border-radius:50%;background:#49b389;display:inline-block}.hero h1{font-size:clamp(39px,4.4vw,65px);line-height:1.11;letter-spacing:-.055em;margin:21px 0 23px;font-weight:850;max-width:700px}.hero h1 em{font-style:normal;color:var(--teal)}.lead{max-width:580px;font-size:17px;line-height:1.77;color:#637c73}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:30px}.btn{border-radius:12px;display:inline-flex;align-items:center;justify-content:center;gap:14px;padding:12px 20px;font-size:13px;font-weight:800;min-height:46px;border:1px solid transparent;transition:transform .15s ease,background .15s}.btn:hover{transform:translateY(-1px)}.primary{background:#1f8070;color:white}.primary:hover{background:#16685c}.secondary{background:white;color:#285d52;border-color:#d5e6dd}.secondary:hover{background:#eff8f4}.full{width:100%}.small-btn{min-height:35px;padding:7px 14px}.preview-note{color:#82948e;max-width:505px;font-size:12px;margin-top:28px;display:flex;align-items:flex-start;gap:10px}.lock-icon{font-size:18px;color:#92a99b}.hero-panel{background:white;border:1px solid #e3ebe8;border-radius:25px;box-shadow:0 26px 70px rgba(22,79,60,.10);padding:22px;transform:rotate(1deg);max-width:470px;width:100%}.panel-head{display:flex;align-items:center;gap:12px;padding-bottom:20px;border-bottom:1px solid #eef1ef}.panel-head span:nth-child(2){display:flex;flex-direction:column}.panel-head b{font-size:13px}.panel-head small{font-size:11px;color:#82968f;margin-top:2px}.mini-icon,.coach-avatar,.auth-icon{display:grid;place-items:center;border-radius:13px;background:#d8eee6;color:#137361;width:41px;height:41px;font-size:23px}.dots{margin-left:auto;color:#b6c7be;letter-spacing:1px}.bubble{width:fit-content;max-width:88%;padding:13px 16px;border-radius:17px;font-size:13px;margin:16px 0;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.bot{background:#edf6f1;border-radius:7px 17px 17px 17px;margin-right:auto}.bubble.mine{background:#dcefee;margin-left:auto;border-radius:17px 7px 17px 17px}.bubble .soft{display:block;margin-top:8px}.suggestions{display:flex;gap:7px;flex-wrap:wrap}.suggestions span{font-size:11px;padding:8px 11px;border:1px solid #d9ebe2;border-radius:22px;color:#487c6d}.mock-input{margin-top:21px;border:1px solid #dbe6e0;color:#9aaba4;border-radius:13px;padding:14px 17px;display:flex;justify-content:space-between;font-size:12px}.mock-input span{border-radius:8px;background:#1f8070;color:white;padding:0 6px}.feature-area{padding-top:45px;padding-bottom:90px}.section-intro{text-align:center;max-width:600px;margin:0 auto 36px}.section-intro h2{font-size:32px;letter-spacing:-.04em;line-height:1.2;margin:13px 0}.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.feature{background:white;border:1px solid var(--line);border-radius:19px;padding:29px}.feature h3{margin:13px 0 8px;font-size:17px}.feature p{color:var(--muted);margin:0;font-size:13px;line-height:1.7}.feature-icon{width:42px;height:42px;display:grid;place-items:center;background:#e7f3ec;border-radius:12px;font-size:25px;color:#167666}.notice-card{border-radius:20px;border:1px solid #c5e6d4;background:#eaf7ee;padding:28px 32px;display:flex;justify-content:space-between;align-items:center;gap:25px;margin-bottom:80px}.notice-card b{font-size:16px}.notice-card p{color:#58766b;margin:5px 0 0;font-size:13px}.notice-card.small{margin:25px 0 40px;padding:18px 25px}.auth-shell{min-height:60vh;display:grid;place-items:center;padding:50px 18px}.auth-card{width:100%;max-width:440px;border:1px solid var(--line);box-shadow:var(--shadow);background:white;border-radius:22px;padding:35px}.auth-icon{width:45px;height:45px;margin-bottom:20px}.auth-card h1{font-size:27px;letter-spacing:-.045em;margin:0 0 11px}.auth-card p{color:var(--muted);font-size:13px;line-height:1.7;margin:0 0 24px}.auth-foot{text-align:center;margin:24px 0 0!important}.auth-foot a{color:var(--teal)}.stack{display:flex;flex-direction:column;gap:14px;margin:16px 0}.stack label:not(.check){display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#446e63}.stack input:not([type=checkbox]),.stack select,.select{width:100%;min-height:44px;background:#fbfdfa;border:1px solid #cfdfd5;border-radius:10px;padding:10px 12px;color:var(--ink)}.check{display:flex;align-items:flex-start;gap:9px;color:#5b786e;font-size:12px;line-height:1.6}.check input{margin-top:4px;accent-color:var(--teal)}.flash-stack{max-width:900px;padding:15px 25px;margin:auto}.flash{background:#fff2df;color:#74532d;border:1px solid #f3deb8;padding:12px 16px;border-radius:10px}.dashboard{padding-top:52px;padding-bottom:80px}.page-title{display:flex;justify-content:space-between;gap:25px;align-items:center;margin-bottom:30px}.page-title h1{font-size:35px;letter-spacing:-.04em;margin:8px 0}.page-title p{margin:0;color:var(--muted)}.dashboard-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:18px}.white-card{background:white;border:1px solid var(--line);border-radius:19px;padding:25px;box-shadow:0 9px 24px rgba(19,69,52,.028)}.card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;gap:8px}.card-head h2{font-size:17px;margin:0}.quiet{font-size:11px;color:var(--muted)}.student-row{display:flex;align-items:center;gap:12px;border-top:1px solid var(--line);padding:15px 0}.student-initial{width:40px;height:40px;background:#e1f4eb;color:var(--teal);border-radius:13px;display:grid;place-items:center;font-weight:800}.student-meta{display:flex;flex-direction:column;flex:1}.student-meta span{font-size:12px;color:var(--muted)}.empty-state{text-align:center;padding:28px 15px;color:var(--muted);font-size:13px}.empty-state div{font-size:30px}.big-number{font-size:42px;font-weight:850;color:var(--teal)}.chat-body .site-header{height:65px}.chat-shell{max-width:1230px;margin:24px auto 35px;padding:0 20px;display:grid;grid-template-columns:280px minmax(0,1fr);gap:17px;min-height:min(760px,calc(100vh - 155px))}.chat-side{border:1px solid var(--line);background:#eef7f0;border-radius:21px;padding:26px;display:flex;flex-direction:column;gap:13px}.back-link{font-size:12px;color:var(--teal);font-weight:750;margin-bottom:18px}.coach-avatar{width:66px;height:66px;border-radius:21px;font-size:39px;background:#cdebdc}.chat-side h2{font-size:25px;line-height:1.2;letter-spacing:-.04em;margin:8px 0 0}.chat-side p{font-size:13px;line-height:1.75;color:#59796c;margin:0}.field-label{font-size:11px;font-weight:800;color:#59796c;margin-top:8px}.preview-info{background:white;border:1px solid #dbeae1;padding:15px;border-radius:14px;margin-top:auto}.preview-info b{font-size:12px}.preview-info p{font-size:11px;margin:5px 0 0}.chat-main{background:white;border:1px solid var(--line);border-radius:21px;display:flex;flex-direction:column;min-height:650px;overflow:hidden;box-shadow:var(--shadow)}.chat-top{display:flex;justify-content:space-between;align-items:center;padding:19px 23px;border-bottom:1px solid var(--line);gap:12px}.chat-top>div{display:flex;flex-direction:column}.chat-top b{font-size:14px}.chat-top small{font-size:11px;color:var(--muted)}.chat-state{font-size:11px;font-weight:750;color:#44806d;white-space:nowrap}.thread{padding:22px 25px;flex:1;min-height:340px;overflow:auto;max-height:570px}.thread .bubble{font-size:14px;max-width:78%;margin-top:12px;margin-bottom:12px}.chat-name{display:block;font-size:10px;letter-spacing:.04em;font-weight:800;color:#448570;margin-bottom:6px}.date-mark{text-align:center;color:#9aada3;font-size:11px;margin:0 0 22px}.compose-wrap{border-top:1px solid var(--line);padding:15px 20px 17px;background:white}.quick-choices{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.quick-choices button{border:1px solid #d8e7df;border-radius:20px;padding:7px 11px;background:white;color:#386859;font-size:11px;font-weight:750}.quick-choices button:hover{background:#edf8f2}.composer{display:flex;align-items:center;border:1px solid #cedfd5;padding:6px;border-radius:15px;gap:9px;min-height:52px}.composer:focus-within{border-color:#78baa3}.composer input{flex:1;border:0;outline:0;padding:8px 12px;min-width:0;font-size:14px}.send-btn{width:37px;height:37px;border-radius:11px;background:#207f70;border:0;color:white;font-size:16px}.compose-hint{color:#91a39b;text-align:center;font-size:10px;margin:9px 0 0}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:900px){.hero{grid-template-columns:1fr;gap:38px;padding-top:65px;padding-bottom:70px}.hero-panel{max-width:540px;transform:none;margin:auto}.dashboard-grid{grid-template-columns:1fr}.chat-shell{grid-template-columns:220px minmax(0,1fr)}.chat-side{padding:20px}.notice-card{margin-bottom:60px}}
@media(max-width:650px){.site-header{padding:0 16px;height:66px}.brand{font-size:19px}.head-right{gap:9px}.status-pill{font-size:8px;padding:6px 8px}.text-link{font-size:11px}.page-shell{padding-left:18px;padding-right:18px}.hero{padding-top:43px}.hero h1{font-size:41px}.lead{font-size:15px}.feature-grid{grid-template-columns:1fr}.feature-area{padding-bottom:42px}.notice-card{display:block;padding:23px}.notice-card .btn{margin-top:20px}.section-intro h2{font-size:26px}.page-title{display:block}.page-title .btn{margin-top:15px}.chat-shell{padding:0;display:flex;flex-direction:column;margin:0;gap:0;min-height:calc(100dvh - 66px)}.chat-side{display:none}.chat-main{border:0;border-radius:0;box-shadow:none;flex:1;min-height:calc(100dvh - 66px)}.chat-top{padding:14px 18px}.thread{padding:19px 16px;max-height:none;min-height:200px}.thread .bubble{max-width:92%}.compose-wrap{position:sticky;bottom:0;padding:10px 13px 16px}.site-footer{font-size:10px}.chat-body .site-footer{display:none}.auth-card{padding:27px 23px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Reviewed educational media operations. Mobile controls stack naturally. */
.knowledge-library{margin-top:20px;margin-bottom:25px}
.knowledge-result{padding:11px 2px;border-bottom:1px solid var(--line);font-size:12px}
.knowledge-result p{font-size:12px;white-space:pre-line;overflow-wrap:anywhere;color:var(--muted);line-height:1.6}
.media-row{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;border-top:1px solid var(--line);padding:15px 0}
.media-title{min-width:100px;overflow-wrap:anywhere}.media-title b{font-size:13px}.media-title p{margin:4px 0 0}
.media-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.row-form{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.row-form select{border:1px solid var(--line);border-radius:8px;padding:7px;max-width:140px;background:white;font-size:12px}
.knowledge-library code{font-size:12px}
@media(max-width:750px){.media-row{display:block}.media-actions{margin-top:12px}.row-form select{max-width:130px}}

/* Adult guardian pilot registration and policy screens */
.auth-card .eyebrow{margin-bottom:12px}
.auth-preview{background:#f0f9f4;margin:14px 0 22px}
.auth-preview p{margin:5px 0 0;font-size:12px}
.field-error,.field-error-summary{color:#9f3c31;font-size:12px;font-weight:600;line-height:1.4}
.field-error-summary{padding:10px;background:#fff0ed;border:1px solid #f4cfcb;border-radius:9px}
.check a{color:var(--teal);text-decoration:underline;font-weight:700}
.resend-form{text-align:center;margin:10px auto 20px}
.legal-shell{max-width:790px;padding-top:58px;padding-bottom:72px}
.legal-shell h1{font-size:36px;letter-spacing:-.04em;line-height:1.2}
.legal-shell h2{font-size:19px;margin-top:25px}
.legal-shell p{color:var(--muted);line-height:1.75}


/* Compact guardian registration only; login and OTP screens keep their layout. */
.auth-shell--signup{min-height:calc(100dvh - 130px);padding:20px 18px 28px}
.auth-card--signup{max-width:620px;border-radius:17px;padding:22px 27px;box-shadow:0 12px 34px rgba(29,69,56,.06)}
.auth-card--signup .auth-icon{display:none}
.auth-card--signup .eyebrow{font-size:10px;letter-spacing:.13em;margin-bottom:5px}
.auth-card--signup h1{font-size:25px;line-height:1.2;margin:0 0 5px}
.auth-card--signup .auth-signup-lead{font-size:12px;line-height:1.5;margin:0 0 10px}
.auth-card--signup .auth-preview--compact{display:flex;gap:10px;align-items:flex-start;margin:0 0 11px;padding:8px 11px;border-radius:9px}
.auth-preview--compact strong{font-size:10px;letter-spacing:.06em;line-height:1.7;white-space:nowrap;color:#267359}
.auth-preview--compact span{font-size:11px;line-height:1.55;color:#52756b}
.auth-card--signup .field-error-summary{margin-bottom:10px;padding:8px 10px}
.auth-signup-form{display:block;margin:10px 0 0}
.auth-signup-form .auth-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px;row-gap:9px}
.auth-signup-form .auth-fields label{display:flex;flex-direction:column;min-width:0;gap:4px;font-size:12px;font-weight:700;color:#446e63}
.auth-signup-form .auth-fields .auth-field-wide{grid-column:1/-1}
.auth-signup-form .auth-fields input:not([type=checkbox]){min-height:40px;padding:8px 11px;border-radius:9px}
.auth-signup-form .auth-consents{display:grid;gap:7px;margin:12px 0}
.auth-signup-form .auth-consent{font-size:11.5px;line-height:1.55;gap:8px;color:#4b6e62}
.auth-signup-form .auth-consent input{flex:0 0 auto;width:15px;height:15px;margin-top:2px}
.auth-signup-form .field-error{font-size:11px}
.auth-signup-form .btn{min-height:42px;padding:9px 16px}
.auth-card--signup .auth-signup-foot{margin:10px 0 0!important;font-size:11px;line-height:1.5}
.auth-signup-foot span{padding:0 5px;color:#9bb3a9}
@media(max-width:580px){
  .auth-shell--signup{padding:14px 12px 24px;place-items:start center;min-height:0}
  .auth-card--signup{max-width:440px;padding:19px 18px;border-radius:15px}
  .auth-card--signup h1{font-size:23px}
  .auth-signup-form .auth-fields{column-gap:9px;row-gap:10px}
  .auth-signup-form .auth-fields label:nth-last-child(-n+2){grid-column:1/-1}
  .auth-signup-form .auth-fields input:not([type=checkbox]){min-height:44px}
}
@media(max-width:365px){
  .auth-signup-form .auth-fields{grid-template-columns:1fr}
  .auth-signup-form .auth-fields label{grid-column:1/-1}
  .auth-card--signup .auth-preview--compact{display:block}
  .auth-preview--compact strong{display:block;margin-bottom:1px}
}


/* Learning room and public demo: dock the composer while ONLY messages scroll.
   Keep the header, desktop sidebar and footer within the available viewport. */
.chat-body{overflow:hidden}
.chat-body .site{
  height:100vh;
  height:100dvh;
  height:var(--chat-viewport-height, 100dvh);
  min-height:0;
  overflow:hidden;
}
.chat-body .site-header{flex:0 0 65px;margin:0 auto}
.chat-body main{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
.chat-body .chat-shell{
  flex:1 1 auto;
  width:100%;
  min-height:0;
  grid-template-rows:minmax(0,1fr);
  margin:16px auto;
}
.chat-body .chat-side{min-height:0;overflow-y:auto}
.chat-body .chat-main{min-width:0;min-height:0;overflow:hidden}
.chat-body .chat-top{flex:0 0 auto}
.chat-body .thread{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow-y:auto;
  overscroll-behavior:contain;
}
.chat-body .compose-wrap{
  position:relative;
  bottom:auto;
  z-index:1;
  flex:0 0 auto;
  background:var(--white);
}
.chat-body .site-footer{flex-shrink:0}
@media(max-width:650px){
  .chat-body .chat-shell{min-height:0;margin:0}
  .chat-body .chat-main{min-height:0}
  .chat-body .thread{min-height:0}
  .chat-body .compose-wrap{padding:10px 13px calc(12px + env(safe-area-inset-bottom, 0px))}
  .chat-body .composer input{font-size:16px}
}


/* Full-width learning workspace: narrow icon rail + independent conversation list. */
.learner-workspace .site-header,.learner-workspace .site-footer{display:none!important}
.learner-workspace .site{height:var(--chat-viewport-height,100dvh);min-height:0}
.learner-workspace main{flex:1 1 auto;min-height:0;display:flex}
.learner-workspace .tutor-shell{
  max-width:none;width:100%;margin:0;padding:0;gap:0;min-height:0;min-width:0;
  grid-template-columns:72px 258px minmax(0,1fr);
  grid-template-rows:minmax(0,1fr);background:#fff;
}
.tutor-svg-sprite{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.ui-icon{width:19px;height:19px;display:block;stroke:currentColor;stroke-width:1.8;fill:none;
  stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.learner-workspace .tutor-rail{
  grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:center;gap:9px;
  padding:17px 9px 14px;min-height:0;z-index:3;
  background:#f5f9f6;border-right:1px solid #e4eee8;
}
.rail-logo{display:grid;place-items:center;width:43px;height:43px;background:#217d70;
  color:white;border-radius:14px;margin-bottom:18px}
.rail-logo .ui-icon{width:24px;height:24px}
.rail-action{display:grid;place-items:center;width:43px;height:43px;flex:0 0 auto;
  border:1px solid transparent;border-radius:12px;color:#466f66;background:transparent}
.rail-action:hover,.rail-action:focus-visible{background:#e3f3e9;color:#156f61}
.rail-action.is-current{background:#deefe6;color:#116b5c}
.rail-new-form{margin:0}
.rail-grow{flex:1}
.learner-workspace .tutor-history{grid-column:2;grid-row:1;display:flex;flex-direction:column;
  min-width:0;min-height:0;background:#f9fbf9;border-right:1px solid #e8eeea;overflow:hidden}
.history-header{display:flex;justify-content:space-between;align-items:center;gap:8px;
  padding:24px 15px 15px 19px}
.history-header>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.history-header strong{font-size:14px;letter-spacing:-.02em}
.history-header small{font-size:11px;color:#719086;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.icon-action{display:grid;place-items:center;width:32px;height:32px;flex:0 0 auto;
  background:transparent;border:0;border-radius:9px;color:#698a7d}
.icon-action:hover{background:#e8f2eb}
.history-new-chat{margin:0 13px 22px}
.history-new-button{display:flex;align-items:center;gap:10px;border:1px solid #d5e7dc;
  background:white;color:#1c6d5d;font-size:12px;font-weight:750;border-radius:11px;padding:10px 12px;width:100%}
.history-new-button:hover{background:#edf8f2}
.history-new-button .ui-icon{width:16px;height:16px}
.history-section-title{display:flex;align-items:center;gap:9px;padding:0 18px 12px;
  font-size:10px;font-weight:800;letter-spacing:.025em;color:#729085}
.history-section-title .ui-icon{width:14px;height:14px}
.history-items{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 10px 18px}
.history-item{display:flex;align-items:center;gap:8px;border-radius:10px;min-height:41px;
  font-size:12px;color:#45675f;padding:9px 9px;margin-bottom:2px}
.history-item:hover{background:#eef4f0}
.history-item.is-selected{background:#e4f1e8;color:#166a5b;font-weight:700}
.history-item .ui-icon{width:15px;height:15px;opacity:.68}
.history-item-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-date{font-size:10px;color:#89a095;white-space:nowrap}
.history-empty{padding:16px 17px;color:#789088;font-size:12px;line-height:1.65}
.history-footer{padding:14px 16px;display:flex;align-items:center;gap:9px;
  font-size:10px;color:#7e998e;border-top:1px solid #e8eeea}
.history-footer .ui-icon{width:15px;height:15px}
.learner-workspace .tutor-main{grid-column:3;grid-row:1;border:0;border-radius:0;box-shadow:none;
  min-width:0;min-height:0;overflow:hidden;background:#fff}
.learner-workspace .tutor-top{border-bottom:1px solid #eef1ee;padding:15px clamp(18px,3vw,44px);
  min-height:73px;flex:0 0 auto}
.tutor-heading{display:flex!important;flex-direction:row!important;align-items:center;gap:11px}
.tutor-heading>span:last-child{display:flex;flex-direction:column}
.tutor-heading-mark{width:35px;height:35px;border-radius:11px;background:#e6f4eb;color:#1a7869;display:grid;place-items:center}
.tutor-heading-mark .ui-icon{width:19px;height:19px}
.learner-workspace .tutor-thread{
  width:100%;flex:1 1 auto;min-height:0;min-width:0;max-height:none;
  overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
  scrollbar-gutter:stable;scrollbar-color:#c6dcd1 transparent;padding:0;
}
.learner-workspace .thread-inner{max-width:900px;width:calc(100% - 72px);margin:0 auto;padding:32px 0 30px;min-height:100%}
.learner-workspace .thread .bubble{font-size:14px;line-height:1.7;max-width:82%;margin-top:13px;margin-bottom:13px}
.learner-workspace .tutor-compose{display:flex;justify-content:center;padding:15px 28px 13px;
  background:#fff;border-top:1px solid #eff3ef}
.compose-inner{width:100%;max-width:900px}
.learner-workspace .composer{background:#fff;border-radius:14px;box-shadow:0 2px 12px rgba(20,67,49,.04)}
.learner-workspace .send-btn{display:grid;place-items:center}
.learner-workspace .send-btn .ui-icon{width:19px;height:19px}
.learner-workspace .compose-hint{margin:8px 0 0}
.tutor-history-backdrop{display:none}
@media(min-width:861px){
  .learner-workspace.history-collapsed .tutor-shell{grid-template-columns:72px minmax(0,1fr)}
  .learner-workspace.history-collapsed .tutor-history{display:none}
  .learner-workspace.history-collapsed .tutor-main{grid-column:2}
}
@media(max-width:860px){
  .learner-workspace .tutor-shell{grid-template-columns:56px minmax(0,1fr)}
  .learner-workspace .tutor-rail{padding:12px 5px;gap:8px}
  .learner-workspace .rail-action{width:42px;height:42px}
  .learner-workspace .rail-logo{width:42px;height:42px;margin-bottom:9px}
  .learner-workspace .tutor-main{grid-column:2}
  .learner-workspace .tutor-history{position:fixed;top:0;bottom:0;left:56px;
    width:min(302px,calc(100vw - 56px));z-index:20;
    box-shadow:10px 0 25px rgba(16,56,43,.10);transform:translateX(-115%);
    visibility:hidden;transition:transform .2s ease,visibility .2s ease}
  .learner-workspace.history-is-open .tutor-history{transform:translateX(0);visibility:visible}
  .learner-workspace.history-is-open .tutor-history-backdrop{
    display:block;position:fixed;inset:0 0 0 56px;z-index:19;
    border:0;border-radius:0;background:rgba(15,45,35,.25)
  }
  .learner-workspace .tutor-top{padding:12px 16px;min-height:64px}
  .learner-workspace .thread-inner{width:calc(100% - 30px);padding:22px 0}
  .learner-workspace .tutor-compose{padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))}
  .learner-workspace .thread .bubble{max-width:94%}
  .learner-workspace .chat-state{font-size:10px}
}
@media(max-width:400px){
  .learner-workspace .tutor-top{gap:6px}
  .learner-workspace .tutor-heading-mark{display:none}
  .learner-workspace .compose-hint{font-size:9px}
}
@media(prefers-reduced-motion:reduce){
  .learner-workspace .tutor-history{transition:none}
}


/* Safe rich Markdown and mathematical typography inside AI replies. */
.learner-workspace .thread .bubble.bot { min-width:0; overflow-wrap:anywhere; }
.tutor-response { min-width:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.tutor-response.is-rich { white-space:normal; line-height:1.75; }
.tutor-response.is-rich > :first-child { margin-top:0; }
.tutor-response.is-rich > :last-child { margin-bottom:0; }
.tutor-response.is-rich p { margin:0 0 12px; }
.tutor-response.is-rich strong { font-weight:750; color:#143f35; }
.tutor-response.is-rich em { font-style:italic; }
.tutor-response.is-rich h1,
.tutor-response.is-rich h2,
.tutor-response.is-rich h3,
.tutor-response.is-rich h4 { color:#143d34;line-height:1.35;margin:18px 0 9px;letter-spacing:-.02em; }
.tutor-response.is-rich h1 { font-size:19px; }
.tutor-response.is-rich h2 { font-size:17px; }
.tutor-response.is-rich h3,.tutor-response.is-rich h4 { font-size:15px; }
.tutor-response.is-rich ul,.tutor-response.is-rich ol { margin:8px 0 14px;padding-left:24px; }
.tutor-response.is-rich li { margin:4px 0; }
.tutor-response.is-rich li > p { margin:0 0 6px; }
.tutor-response.is-rich blockquote { border-left:3px solid #9ac8b3;margin:12px 0;padding:8px 13px;color:#3c6657;background:#f6faf7; }
.tutor-response.is-rich a { color:#0c7164;text-decoration:underline;text-underline-offset:2px; }
.tutor-response.is-rich :not(pre)>code,
.tutor-math-unavailable { font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em;background:#d9ebe1;padding:2px 5px;border-radius:5px; }
.tutor-response.is-rich .tutor-equation { display:inline-block;max-width:100%;vertical-align:middle; }
.tutor-response.is-rich .tutor-equation.is-display { display:block;overflow-x:auto;overflow-y:hidden;padding:12px 2px;margin:8px auto;text-align:center; }
.tutor-response.is-rich .katex-display { margin:0;max-width:100%;overflow-x:auto;overflow-y:hidden; }
.tutor-response.is-rich .katex { font-size:1.06em; }
.tutor-response.is-rich .tutor-code { max-width:100%;overflow:hidden;margin:14px 0;border:1px solid #dbe8df;background:#142520;border-radius:12px;color:#e0f5e9; }
.tutor-code-header { display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;background:#243e33;border-bottom:1px solid #365446;font-size:11px;color:#c5decf; }
.tutor-code-language { font-weight:700;letter-spacing:.025em; }
.tutor-code-copy { display:flex;align-items:center;gap:5px;font:inherit;border:1px solid #4b6d5d;background:transparent;color:#e2f4e8;padding:4px 9px;border-radius:7px;cursor:pointer; }
.tutor-code-copy:hover,.tutor-code-copy:focus-visible { background:#365946; }
.tutor-code-copy svg { width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.tutor-response.is-rich .tutor-code pre { overflow-x:auto;max-width:100%;margin:0;padding:14px;tab-size:2;line-height:1.55;white-space:pre; }
.tutor-response.is-rich .tutor-code pre code { color:#d8ece3;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12.5px;background:none;overflow-wrap:normal; }
.tutor-code .hljs-keyword,.tutor-code .hljs-selector-tag { color:#b4baff; }
.tutor-code .hljs-string,.tutor-code .hljs-attr { color:#a5d6a0; }
.tutor-code .hljs-number,.tutor-code .hljs-literal { color:#ffc891; }
.tutor-code .hljs-comment { color:#98b3a3;font-style:italic; }
.tutor-code .hljs-title,.tutor-code .hljs-function { color:#95d8f0; }
.tutor-response.is-rich .tutor-table-scroll { max-width:100%;overflow-x:auto;margin:14px 0;border:1px solid #d7e6dc;border-radius:10px; }
.tutor-response.is-rich table { width:100%;min-width:max-content;border-collapse:collapse;font-size:12px; }
.tutor-response.is-rich th,.tutor-response.is-rich td { border-bottom:1px solid #dae9df;padding:8px 11px;text-align:left; }
.tutor-response.is-rich th { background:#e0efe6;font-weight:700; }
.learner-workspace .send-btn { display:grid;place-items:center;transition:background .15s ease; }
.learner-workspace .send-btn .send-arrow,
.learner-workspace .send-btn .send-spinner { width:20px;height:20px;stroke-width:2.1; }
.learner-workspace .send-btn .send-spinner { display:none; }
.learner-workspace .send-btn.is-loading .send-arrow { display:none; }
.learner-workspace .send-btn.is-loading .send-spinner { display:block;animation:tutor-spin .85s linear infinite; }
.learner-workspace .send-btn:disabled { background:#397c6c;cursor:progress;opacity:1; }
@keyframes tutor-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) {
  .learner-workspace .send-btn.is-loading .send-spinner { animation:none; }
}


/* Single-page tutor navigation: only sidebar and transcript refresh, never the shell. */
.learner-workspace .chat-navigation-status:not(:empty){
  display:inline-block;max-width:280px;color:#98642a;font-size:11px;
  white-space:normal;text-align:right;line-height:1.35;
}
.learner-workspace .history-items.is-switching{opacity:.72;pointer-events:none}
.learner-workspace .history-item.is-pending{background:#eaf4ee;color:#427b6c;opacity:.8;animation:tutor-chat-pulse 1.3s ease-in-out infinite}
@keyframes tutor-chat-pulse{50%{opacity:.45}}
.learner-workspace #chat-messages{position:relative}
.learner-workspace #chat-messages.is-switching{opacity:.66;pointer-events:none}
.learner-workspace #chat-messages.is-switching:after{
  content:"";position:absolute;top:84px;left:0;width:min(360px,70%);height:18px;
  border-radius:9999px;
  background:linear-gradient(100deg,#e3ede7 0%,#f9fbfa 50%,#e3ede7 100%);
  background-size:220% 100%;
  animation:tutor-chat-shimmer 1.4s linear infinite;
}
@keyframes tutor-chat-shimmer{to{background-position-x:-220%}}
.learner-workspace .tutor-waiting{display:inline-flex;align-items:center;gap:11px;min-height:22px}
.learner-workspace .tutor-waiting-text{color:#466c5b;font-size:12px;font-weight:650}
.learner-workspace .tutor-wait-dots{display:inline-flex;gap:4px;align-items:center}
.learner-workspace .tutor-wait-dots span{width:5px;height:5px;border-radius:50%;
  background:#4f9d82;animation:tutor-chat-dot 1.1s ease-in-out infinite}
.learner-workspace .tutor-wait-dots span:nth-child(2){animation-delay:.15s}
.learner-workspace .tutor-wait-dots span:nth-child(3){animation-delay:.3s}
@keyframes tutor-chat-dot{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-4px);opacity:1}}
.learner-workspace .chat-inline-error{background:#fff0e5;color:#8d4f2e;border:1px solid #f1d5c6}

/* Rounded, sticky chat composer and truly circular, accessible send control. */
.learner-workspace .composer{
  border-radius:9999px;min-height:56px;padding:6px 7px 6px 14px;
  box-shadow:0 3px 18px rgba(20,67,49,.06);
  transition:border-color .16s ease,box-shadow .16s ease;
}
.learner-workspace .composer:focus-within{
  border-color:#64ab92;box-shadow:0 0 0 3px rgba(63,149,120,.11);
}
.learner-workspace .composer input{
  border:0;min-width:0;outline:0;border-radius:9999px;
  background:transparent;line-height:1.4;padding:9px 11px;
}
.learner-workspace .send-btn{
  width:42px;height:42px;min-width:42px;min-height:42px;flex:0 0 42px;
  aspect-ratio:1;border-radius:50%;padding:0;
  display:grid;place-items:center;
  transition:background .14s ease,transform .14s ease;
}
.learner-workspace .send-btn:hover:not(:disabled){background:#156e60;transform:scale(1.04)}
.learner-workspace .send-btn:focus-visible{outline:3px solid #d5a74e;outline-offset:2px}
@media(max-width:860px){
  .learner-workspace .chat-navigation-status:not(:empty){max-width:140px;font-size:10px}
  .learner-workspace .composer{min-height:52px;padding:5px 6px 5px 10px}
  .learner-workspace .send-btn{width:40px;height:40px;min-width:40px;min-height:40px;flex-basis:40px}
}
@media(prefers-reduced-motion:reduce){
  .learner-workspace #chat-messages.is-switching:after,
  .learner-workspace .tutor-wait-dots span,
  .learner-workspace .history-item.is-pending{animation:none}
}

/* Reviewed source provenance is separate from model-generated prose. */
.learner-workspace .tutor-curriculum-references{
  margin-top:9px;border-top:1px solid #cce4d9;padding:8px 1px 2px;
  font-size:11px;line-height:1.5;color:#416d5d;max-width:100%;
}
.learner-workspace .tutor-curriculum-references span{
  display:block;font-weight:750;margin-bottom:5px;
}
.learner-workspace .tutor-curriculum-references p{
  font-size:11px;line-height:1.45;margin:3px 0;overflow-wrap:anywhere;
}

/* Progressive tutor streaming: stable Markdown steps stay mounted while the
   current paragraph is updated. Unclosed math is never shown as raw TeX. */
.tutor-response.is-streaming{white-space:normal}
.tutor-response.is-streaming .tutor-stream-stable,
.tutor-response.is-streaming .tutor-stream-tail{min-width:0}
.tutor-response.is-streaming .tutor-stream-block,
.tutor-response.is-streaming .tutor-stream-text{min-width:0}
.tutor-response.is-streaming .tutor-stream-block > :first-child,
.tutor-response.is-streaming .tutor-stream-text > :first-child{margin-top:0}
.tutor-response.is-streaming .tutor-stream-block > :last-child{margin-bottom:12px}
.tutor-response.is-streaming .tutor-stream-tail > :last-child{margin-bottom:0}
.tutor-response.is-streaming .tutor-math-pending{
  display:inline-flex;align-items:center;margin:5px 0 10px;
  padding:5px 10px;border-radius:8px;background:#e4f0e9;color:#4f7469;
  font-size:12px;font-weight:600
}

/* One-screen guardian email OTP entry. One accessible input supports paste and
   platform autofill, without six independent focus traps. */
.auth-code-form .auth-otp-input{font-variant-numeric:tabular-nums;letter-spacing:.48em;text-align:center;font-size:24px;font-weight:650;max-width:100%;min-height:55px}
.auth-code-form .auth-otp-input:focus-visible{outline:3px solid rgba(32,127,112,.27);outline-offset:2px}
.resend-form [data-otp-resend]:disabled{opacity:.55;cursor:not-allowed;text-decoration:none}
.resend-form [data-otp-countdown]{font-variant-numeric:tabular-nums;margin-left:4px}

/* Guardian-owned sign-out: visible in both platform and family navigation.
   Learner mode uses the guarded exit OTP screen instead. */
.header-signout-form{margin:0}
.header-signout{display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:36px;padding:7px 10px;border:1px solid #d5e6dd;border-radius:10px;
  background:#fff;color:#285d52;font-size:13px;font-weight:750;white-space:nowrap}
.header-signout:hover{background:#eff8f4;color:#146b60}
.header-signout-icon{width:17px;height:17px;flex:none}
.signed-out-card .signed-out-icon{width:47px;height:47px;border-radius:15px;
  background:#d8eee4;color:#207f70;margin-bottom:15px}
.signed-out-icon svg{width:27px;height:27px}
.signed-out-card h1{margin-bottom:8px}
.signed-out-card .btn{margin-top:17px}
.exit-verify-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.exit-verify-actions .btn{font-size:12px;padding-left:10px;padding-right:10px;white-space:normal}
@media(max-width:650px){
 .site-header .head-right{gap:7px}
 .site-header .header-signout{width:37px;height:37px;min-height:37px;padding:0}
 .site-header .header-signout span{display:none}
 .exit-verify-actions{grid-template-columns:1fr}
 .exit-verify-actions .btn{font-size:13px}
}
