:root{--ink:#17233b;--muted:#76819a;--brand:#7561d9;--brand2:#604ac7;--lav:#f1eeff;--mint:#e4f9ef;--green:#188d63;--bg:#f6f8fc;--white:#fff;--line:#e7ebf3;--shadow:0 10px 28px rgba(29,39,76,.045);font-family:Arial,"Noto Sans Hebrew",-apple-system,BlinkMacSystemFont,sans-serif;color:var(--ink);font-size:15px}*{box-sizing:border-box}body{margin:0;background:var(--bg);-webkit-tap-highlight-color:transparent}button,input,textarea,select{font:inherit}button{cursor:pointer;border:0}a{color:inherit;text-decoration:none}h1,h2,h3,h4,p{margin:0}h1{font-size:31px;letter-spacing:-1px;line-height:1.28}h2{font-size:21px;letter-spacing:-.5px}h3{font-size:17px}.muted{color:var(--muted)}.small{font-size:13px}.tiny{font-size:11px}.strong{font-weight:700}.line-height{line-height:1.85}.layout{display:flex;min-height:100vh}.sidebar{background:#121b2f;color:#a7b3cb;width:246px;min-width:246px;padding:25px 17px 19px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:13px;padding:4px 7px 28px;color:#fff}.brand-logo{width:40px;height:40px;border-radius:13px;background:linear-gradient(135deg,#8778ee,#5d56c6);display:flex;align-items:center;justify-content:center;font-size:23px;box-shadow:0 6px 18px #5442c84d}.brand strong{display:block;font-size:21px;letter-spacing:-.4px}.brand span{font-size:11px;color:#8c9bb9}.nav-label{font-size:11px;color:#61728e;font-weight:700;margin:9px 15px 12px}.nav-btn{display:flex;gap:12px;align-items:center;padding:12px 14px;width:100%;background:transparent;text-align:right;border-radius:12px;color:#9fabbe;margin-bottom:4px;font-weight:600;font-size:14px;transition:background .15s}.nav-btn:hover{background:#27304a;color:#fff}.nav-btn.active{color:#fff;background:#313456}.nav-btn .ico{width:21px;font-size:18px;text-align:center}.sidebar-spacer{flex:1}.sidebar-footer{background:#222d46;border:1px solid #344057;padding:13px;border-radius:14px;font-size:12px;line-height:1.8}.sidebar-footer .dot{display:inline-block;width:7px;height:7px;background:#f3bb61;border-radius:50%;margin-left:6px}.workspace{flex:1;min-width:0;max-width:1700px;margin:0 auto;padding:0 42px 45px}.topbar{height:84px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line);margin-bottom:29px}.eyebrow{font-size:12px;color:var(--muted)}.topbar-title{font-size:16px;font-weight:700}.top-actions{display:flex;gap:12px;align-items:center}.avatar{width:39px;height:39px;background:#e8e4ff;color:#6450c7;display:grid;place-items:center;border-radius:13px;font-weight:800}.btn{padding:11px 17px;border-radius:11px;background:#fff;border:1px solid var(--line);color:var(--ink);font-weight:700;display:inline-flex;justify-content:center;align-items:center;gap:9px;min-height:41px}.btn:hover{background:#f9f8ff}.btn.primary{background:var(--brand);color:#fff;border-color:var(--brand);box-shadow:0 4px 12px #7561d933}.btn.primary:hover{background:var(--brand2)}.btn.dark{background:#18253f;color:#fff;border-color:#18253f}.btn.outline-brand{color:var(--brand2);border-color:#d5cefd;background:#fff}.btn.ghost{border:0;background:transparent;color:var(--muted)}.btn.danger{color:#bd4a5f;background:#fff3f4;border-color:#ffe2e5}.btn:disabled{opacity:.53;cursor:not-allowed}.btn.sm{padding:8px 11px;font-size:12px;min-height:34px}.btn.wide{width:100%}.iconbtn{display:inline-grid;place-items:center;width:35px;height:35px;background:#f4f5f9;border:1px solid var(--line);border-radius:10px}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:24px}.page-heading p{margin-top:8px;color:var(--muted);font-size:14px}.hero{border-radius:20px;background:linear-gradient(113deg,#1e2b4a 0%,#363269 68%,#514590 100%);padding:30px 33px;color:#fff;position:relative;overflow:hidden;min-height:202px;display:flex;align-items:center;margin-bottom:24px}.hero::after{content:"✦";font-size:175px;color:#ffffff0d;position:absolute;left:47px;top:-14px;transform:rotate(-14deg)}.hero-content{position:relative;z-index:1;max-width:680px}.hero-kicker{font-size:12px;color:#d6cbff;font-weight:700;letter-spacing:.2px;margin-bottom:12px}.hero h1{font-size:27px;line-height:1.45;margin-bottom:10px}.hero p{font-size:13px;color:#dce0f1;line-height:1.8}.hero-actions{margin-top:20px;display:flex;gap:9px;flex-wrap:wrap}.hero .btn{background:#fff;color:#453690;border-color:#fff}.hero .btn.quiet{background:#ffffff1c;color:#fff;border-color:#ffffff3b}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:24px}.stat{background:var(--white);border:1px solid var(--line);padding:18px;border-radius:15px;box-shadow:var(--shadow)}.stat-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px}.stat-top .chip-icon{width:35px;height:35px;border-radius:10px;display:grid;place-items:center;background:var(--lav);color:var(--brand2);font-size:18px}.stat-value{font-size:26px;font-weight:800;letter-spacing:-1px}.stat-label{font-size:12px;color:var(--muted);margin-top:3px}.main-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(270px,.8fr);gap:20px;align-items:start}.panel{border:1px solid var(--line);background:var(--white);border-radius:17px;box-shadow:var(--shadow);padding:21px;margin-bottom:18px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:18px}.panel-head .muted{font-size:12px}.link{font-size:12px;font-weight:700;color:var(--brand2);background:transparent;padding:4px}.course-list{display:grid;gap:10px}.course-row{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid #edf0f6;border-radius:13px;background:#fff;width:100%;text-align:right;transition:transform .1s,border-color .1s}.course-row:hover,.course-card:hover{border-color:#c6bbfa;transform:translateY(-1px)}.course-symbol{width:46px;height:46px;flex-shrink:0;border-radius:13px;display:grid;place-items:center;font-weight:800;font-size:19px}.course-meta{flex:1;min-width:0}.course-meta strong{font-size:14px;display:block;margin-bottom:6px}.course-meta span{font-size:12px;color:var(--muted)}.progress{width:100%;height:6px;border-radius:10px;background:#eef0f5;overflow:hidden}.progress-fill{height:100%;border-radius:10px;background:var(--brand)}.right-chevron{color:#aab2c4;font-size:21px}.action-card{padding:17px;background:#f6f4ff;border:1px solid #ece7ff;border-radius:15px;margin-bottom:11px}.action-icon{font-size:21px;color:var(--brand)}.action-card h3{font-size:14px;margin:10px 0 5px}.action-card p{font-size:12px;color:#777f9b;line-height:1.8;margin-bottom:13px}.lesson-list{display:grid;gap:11px}.lesson-row{display:flex;justify-content:space-between;align-items:center;gap:16px;background:#fff;border:1px solid var(--line);padding:17px;border-radius:14px;text-align:right;cursor:pointer}.lesson-row:hover{border-color:#c6bbfa}.lesson-row .left{display:flex;align-items:center;gap:13px;min-width:0}.lesson-icon{width:43px;height:43px;display:grid;place-items:center;background:#f0edff;color:var(--brand2);font-size:20px;border-radius:12px;flex-shrink:0}.lesson-row h3{font-size:14px;margin-bottom:6px}.lesson-row p{font-size:12px;color:var(--muted)}.tag{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;font-size:11px;font-weight:700;border-radius:30px;white-space:nowrap;background:#edf1f6;color:#536178}.tag.ready{background:#e7f8ef;color:#16895e}.tag.processing{background:#f0ebff;color:#6953cb}.tag.pending{background:#fff4df;color:#9d7328}.tag.error{background:#ffe9e9;color:#b04d5d}.course-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.course-card{background:#fff;border:1px solid var(--line);padding:23px;border-radius:17px;cursor:pointer;text-align:right;min-height:190px}.course-card .course-symbol{margin-bottom:17px}.course-card h3{margin-bottom:8px}.course-card p{font-size:12px;color:var(--muted);margin-bottom:22px}.course-card .footer{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);gap:8px}.empty{border:1px dashed #cfd5e4;border-radius:17px;background:#fff;text-align:center;padding:38px 22px;color:var(--muted);line-height:1.85}.empty .big{font-size:43px;margin-bottom:10px;display:block}.empty strong{display:block;color:var(--ink);font-size:17px;margin-bottom:8px}.empty p{font-size:13px;margin-bottom:17px}.breadcrumbs{display:flex;gap:9px;align-items:center;font-size:12px;color:var(--muted);margin-bottom:20px;flex-wrap:wrap}.breadcrumbs button{background:none;padding:0;color:var(--brand2);font-weight:700}.lesson-header{margin-bottom:23px}.lesson-header .badge-line{display:flex;gap:9px;margin-top:11px;align-items:center}.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:21px;overflow:auto}.tab{background:transparent;color:var(--muted);padding:13px 15px;border-bottom:3px solid transparent;font-weight:700;white-space:nowrap}.tab.active{color:var(--brand2);border-bottom-color:var(--brand)}.section-content{line-height:2;white-space:pre-wrap;font-size:14px;color:#374360;overflow-wrap:anywhere}.summary-banner{background:#f4f1ff;border-radius:14px;padding:18px 20px;margin-bottom:20px;line-height:1.95}.summary-banner h3{color:#5c49bc;margin-bottom:8px}.summary-section{padding:19px 0;border-bottom:1px solid var(--line)}.summary-section h3{margin-bottom:10px}.formula-list{display:grid;gap:10px;margin-top:12px}.formula-row{border:1px solid var(--line);border-radius:12px;padding:14px 17px;display:grid;gap:6px}.formula-expr{direction:ltr;text-align:left;background:#fafbfe;color:#1e3050;font-family:Georgia,"Times New Roman",serif;font-size:16px;padding:12px;border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere}.ordered-steps{counter-reset:steps;display:grid;gap:12px;margin-top:13px}.ordered-step{display:flex;gap:12px;align-items:flex-start}.ordered-step::before{counter-increment:steps;content:counter(steps);background:#e8e3ff;color:#5742bb;min-width:27px;height:27px;border-radius:9px;display:grid;place-items:center;font-size:12px;font-weight:800}.exercise-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:18px}.exercise-picker{display:grid;gap:10px;align-content:start}.exercise-option{background:#fff;border:1px solid var(--line);padding:15px;border-radius:13px;text-align:right}.exercise-option.active{border-color:#8775eb;background:#f7f5ff}.exercise-option strong{display:block;margin-bottom:6px}.question{font-size:16px;line-height:2;white-space:pre-wrap;margin:17px 0}.answer-input,.input,.select{border:1px solid #dfe4ef;background:#fff;color:var(--ink);padding:12px 13px;border-radius:11px;width:100%;outline:none}.answer-input{resize:vertical;min-height:122px;line-height:1.7}.input:focus,.select:focus,.answer-input:focus{border-color:#8b79e6;box-shadow:0 0 0 3px #ded7ff55}.field{margin-bottom:16px}.field label{display:block;font-size:13px;font-weight:700;margin-bottom:8px}.hintbox{padding:15px 18px;background:#fff8e9;border-radius:11px;color:#79562f;line-height:1.8;margin:13px 0}.feedback{padding:17px;background:#f4f7ff;border:1px solid #dae1ff;border-radius:12px;line-height:1.85;margin-top:17px}.feedback.success{background:#eefaef;border-color:#c8efdb}.feedback h4{margin-bottom:8px}.teacher-shell{display:grid;grid-template-columns:255px minmax(0,1fr);gap:18px;min-height:600px}.teacher-side{background:#fff;border:1px solid var(--line);border-radius:16px;padding:17px}.teacher-side h3{margin-bottom:14px}.teacher-chat{background:#fff;border:1px solid var(--line);border-radius:16px;display:flex;flex-direction:column;min-height:570px;max-height:calc(100vh - 220px);overflow:hidden}.teacher-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:17px 20px;gap:12px}.bot-avatar{width:39px;height:39px;border-radius:13px;background:#e9e5ff;color:var(--brand2);display:grid;place-items:center;font-size:22px}.chat-messages{padding:21px;flex:1;overflow:auto;display:flex;flex-direction:column;gap:16px;min-height:270px}.bubble{max-width:85%;padding:15px 17px;border-radius:15px;font-size:14px;line-height:1.95;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.ai{background:#f2f4fa;align-self:flex-start;border-top-right-radius:3px}.bubble.mine{background:#ede8ff;color:#382e71;align-self:flex-end;border-top-left-radius:3px}.chat-tools{padding:9px 18px;display:flex;gap:7px;flex-wrap:wrap;border-top:1px solid var(--line)}.pill{background:#f6f4ff;color:#6556b8;padding:8px 12px;border-radius:40px;font-size:12px;font-weight:700}.pill.active{background:var(--brand);color:#fff}.chat-compose{padding:11px 17px 17px;display:flex;gap:9px;align-items:flex-end}.chat-compose textarea{min-height:47px;max-height:130px;resize:vertical}.chat-send{width:45px;height:45px;flex-shrink:0;display:grid;place-items:center;border-radius:12px;background:var(--brand);color:#fff;font-size:22px}.settings-layout{max-width:750px}.info{padding:13px 15px;background:#f3f5ff;color:#536085;border-radius:12px;font-size:13px;line-height:1.8}.warning{background:#fff6e8;color:#8f641d}.settings-block{padding:20px 0;border-bottom:1px solid var(--line)}.settings-block h3{margin-bottom:10px}.file-drop{border:1.5px dashed #bfc1e8;border-radius:15px;background:#faf9ff;padding:23px;text-align:center;cursor:pointer;display:block}.file-drop input{display:none}.file-drop strong{display:block;margin-top:7px}.file-drop p{font-size:12px;color:var(--muted);margin-top:8px}.file-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.file-chip{background:#f0f2fa;border-radius:8px;padding:8px 10px;font-size:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis}.files-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}.files-list button{background:#f5f4ff;color:#6254b0;padding:8px 10px;border-radius:9px;font-size:12px}.review-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.review-card{border:1px solid var(--line);border-radius:13px;padding:18px}.review-card strong{font-size:25px;display:block;margin:11px 0}.modal-overlay{position:fixed;inset:0;background:#142036a8;z-index:30;display:flex;align-items:center;justify-content:center;padding:18px}.modal{background:#fff;border-radius:20px;width:100%;max-width:540px;max-height:min(92vh,850px);overflow:auto;padding:24px;box-shadow:0 25px 70px #121b2f40}.modal h2{margin-bottom:7px}.modal .subtitle{font-size:12px;color:var(--muted);margin-bottom:22px;line-height:1.7}.modal-footer{display:flex;gap:10px;justify-content:flex-start;margin-top:21px}.color-swatches{display:flex;gap:8px}.swatch{width:31px;height:31px;border-radius:10px;border:3px solid #fff;box-shadow:0 0 0 1px var(--line)}.swatch.selected{box-shadow:0 0 0 3px var(--brand)}#toast{position:fixed;bottom:20px;left:22px;z-index:100;background:#1d2b43;color:#fff;padding:13px 18px;border-radius:12px;box-shadow:0 8px 30px #1a264040;display:none;font-size:13px;max-width:calc(100% - 44px);line-height:1.6}.loading-screen{height:100vh;display:grid;place-content:center;justify-items:center;gap:12px;color:var(--muted)}.spinner{border:3px solid #e6e3ff;border-top-color:var(--brand);border-radius:100%;width:28px;height:28px;animation:spin .65s linear infinite}.spinner.inline{width:14px;height:14px;border-width:2px;display:inline-block;vertical-align:middle;margin:0 3px}@keyframes spin{to{transform:rotate(360deg)}}.mobile-nav{display:none}.stack{display:grid;gap:16px}.split{display:flex;justify-content:space-between;gap:12px;align-items:center}.buttons{display:flex;gap:9px;flex-wrap:wrap}.divider{height:1px;background:var(--line);margin:17px 0}.label-label{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase}.no-wrap{white-space:nowrap}.num{font-variant-numeric:tabular-nums}.clickable{cursor:pointer}.mb16{margin-bottom:16px}.mt16{margin-top:16px}.mlauto{margin-left:auto}.review-list{display:grid;gap:11px}.review-list >div{border:1px solid var(--line);border-radius:12px;padding:14px}.text-danger{color:#ad4358}.visible-mobile{display:none}
@media(max-width:1150px){.workspace{padding:0 25px 45px}.sidebar{width:205px;min-width:205px}.course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.main-grid{grid-template-columns:minmax(0,1fr) 300px}}
@media(max-width:850px){.sidebar{display:none}.workspace{padding:0 16px 92px;width:100%}.topbar{height:66px;margin-bottom:21px}.stat-grid{gap:9px}.main-grid{display:block}.course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.teacher-shell{display:block}.teacher-side{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.teacher-side h3{width:100%}.teacher-chat{min-height:560px;max-height:75vh}.mobile-nav{display:flex;position:fixed;bottom:0;right:0;left:0;padding:7px 5px max(8px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);z-index:20;box-shadow:0 -2px 16px #1a254511}.mobile-nav button{display:grid;justify-items:center;gap:4px;flex:1;background:transparent;color:#8991a6;font-size:10px;font-weight:700;padding:6px 2px}.mobile-nav button i{font-style:normal;font-size:21px}.mobile-nav button.active{color:var(--brand2)}.visible-mobile{display:block}}
@media(max-width:530px){h1{font-size:25px}.hero{padding:23px;min-height:175px}.hero h1{font-size:21px}.page-heading{align-items:flex-start}.page-heading .btn{font-size:12px;padding:9px;min-width:110px}.stat{padding:14px}.stat-value{font-size:23px}.stat-top .chip-icon{width:31px;height:31px}.stat-label{font-size:11px}.course-grid{grid-template-columns:1fr}.course-card{min-height:150px}.panel{padding:17px}.exercise-layout{grid-template-columns:1fr}.exercise-picker{display:flex;overflow:auto}.exercise-option{min-width:130px}.bubble{max-width:95%}.top-actions .btn{font-size:11px;padding:7px 9px;min-height:34px}.avatar{width:32px;height:32px}.lesson-row{padding:12px}.lesson-row h3{font-size:13px}.tag{font-size:10px}.modal{padding:20px}.modal-footer .btn{flex:1}}

/* StudyFlow 1.1 — polished, tablet-first learning interface */
:root{
  --ink:#202b48;--muted:#66758d;--brand:#6553d3;--brand2:#5140b9;
  --bg:#f5f7fb;--line:#e5eaf3;--lav:#f0edff;
  --shadow:0 12px 36px rgba(33,45,83,.052);
  font-family:"Noto Sans Hebrew","Segoe UI",Arial,sans-serif;
  font-size:15px;
}
html{scroll-behavior:smooth}
body{font-feature-settings:"kern";min-width:320px}
button,input,select,textarea{font-family:inherit}
button{transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{
  outline:3px solid #a59afa;outline-offset:3px;
}
button:active:not(:disabled){transform:scale(.985)}
.ui-icon{flex-shrink:0;vertical-align:middle}
.sidebar{background:linear-gradient(180deg,#141b34 0%,#111b32 100%);box-shadow:-4px 0 30px rgba(16,25,49,.08)}
.brand{padding-bottom:34px;align-items:center}
.brand-logo{width:44px;height:44px;border-radius:15px;background:linear-gradient(135deg,#a68bf9,#6156d6);box-shadow:0 7px 22px rgba(111,79,233,.33)}
.brand strong{font-size:21px}
.brand>div:last-child>span{display:block;margin-top:1px}
.nav-label{color:#8593b1;letter-spacing:.15px}
.nav-btn{min-height:47px;border-radius:13px;padding:12px 13px;color:#aebbd2}
.nav-btn .ico{display:flex;align-items:center;justify-content:center;width:24px}
.nav-btn.active{background:linear-gradient(95deg,#403c73,#2b3157);box-shadow:inset 3px 0 0 #a996ff}
.nav-btn:hover{background:#2a3556}
.sidebar-footer{border:1px solid #3c4563;background:rgba(255,255,255,.055)}
.workspace{padding-left:37px;padding-right:37px}
.topbar{height:80px;margin-bottom:26px}
.topbar-title{font-size:17px;letter-spacing:-.3px}
.top-actions .btn{min-height:40px}
.top-create{border-color:#dfe1f1;color:#403874}
.top-create .ui-icon{color:var(--brand)}
.avatar{border-radius:50%;background:linear-gradient(140deg,#eae5ff,#f3f0ff);border:1px solid #ded7fb;font-size:12px;letter-spacing:.8px}
.btn{border-radius:12px;min-height:44px;padding:11px 17px;line-height:1.3}
.btn.primary{box-shadow:0 8px 18px rgba(101,83,211,.17)}
.btn.primary:hover{box-shadow:0 11px 24px rgba(101,83,211,.23)}
.btn.sm{min-height:37px;padding:9px 12px}
.page-heading{margin-bottom:25px}
.page-heading h1{font-size:29px}
.page-heading p{line-height:1.7}
.panel{border-radius:20px;padding:24px;margin-bottom:17px}
.panel-head h2{font-size:19px}
.link{display:inline-flex;gap:6px;align-items:center;padding:7px 5px}
.hero{min-height:282px;border-radius:24px;padding:37px 43px;margin-bottom:20px;
 background:radial-gradient(circle at 0 80%,rgba(160,140,255,.2),transparent 27%),
 linear-gradient(112deg,#182541 0%,#313264 54%,#5949a4 100%);
 box-shadow:0 20px 40px rgba(48,49,101,.12);
}
.hero::after{content:none}
.hero-content{max-width:65%;position:relative;z-index:3}
.hero-kicker{display:inline-flex;align-items:center;gap:7px;color:#dcd5ff;font-size:12px;letter-spacing:0;margin-bottom:12px}
.hero h1{font-size:34px;line-height:1.35;letter-spacing:-.8px;margin-bottom:12px}
.hero h1 span{color:#e4deff}
.hero p{max-width:530px;font-size:14px;line-height:1.9;color:#eceafd}
.hero-actions{margin-top:23px;gap:11px}
.hero-actions .btn{min-height:46px;padding:11px 20px}
.hero .btn.quiet:hover{background:#ffffff32}
.hero-mesh{position:absolute;inset:0;pointer-events:none;z-index:1}
.hero-mesh span{position:absolute;display:block;width:170px;height:170px;border-radius:50%;background:rgba(255,255,255,.027)}
.hero-mesh span:first-child{left:-65px;bottom:-90px}
.hero-mesh span:nth-child(2){top:-110px;right:10%;width:240px;height:240px}
.hero-mesh span:last-child{right:55%;bottom:-160px;width:270px;height:270px}
.hero-art{position:absolute;left:5%;top:50%;transform:translateY(-50%);height:210px;width:240px;display:grid;place-items:center;color:#fff;opacity:.94;pointer-events:none}
.hero-orbit{position:absolute;border:1px solid rgba(238,235,255,.26);border-radius:50%;transform:rotate(-19deg)}
.orbit-one{height:168px;width:212px}
.orbit-two{height:207px;width:251px;border-style:dashed;opacity:.55}
.hero-art-center{width:113px;height:113px;display:grid;place-items:center;border-radius:32px;transform:rotate(-8deg);background:linear-gradient(145deg,#8d80f2,#584ab1);box-shadow:0 20px 45px rgba(12,16,43,.25),inset 0 1px rgba(255,255,255,.32)}
.hero-art-center svg{transform:rotate(8deg)}
.hero-float{position:absolute;display:grid;place-items:center;border-radius:14px;background:#ffffffed;color:#5448a9;height:48px;width:48px;box-shadow:0 12px 24px rgba(16,18,47,.22)}
.hero-float-a{right:5px;top:20px;transform:rotate(9deg)}
.hero-float-b{left:1px;bottom:20px;color:#0b946c;transform:rotate(-8deg)}
.welcome-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:22px}
.welcome-step{position:relative;display:grid;align-content:start;gap:6px;padding:17px 18px;background:#fff;border:1px solid var(--line);border-radius:17px;min-height:136px}
.step-number{position:absolute;top:18px;left:17px;color:#bec5d5;font-size:13px;font-weight:750;letter-spacing:1px}
.step-ico{display:grid;place-items:center;width:36px;height:36px;color:var(--brand);background:#f0edff;border-radius:11px;margin-bottom:4px}
.welcome-step strong{font-size:14px}
.welcome-step p{font-size:12px;line-height:1.65;color:var(--muted)}
.continue-card{display:flex;gap:17px;align-items:center;margin:0 0 22px;background:linear-gradient(97deg,#f7f5ff,#fff);border:1px solid #ddd9fb;padding:18px 20px;border-radius:19px}
.continue-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:15px;background:#ebe6ff;color:var(--brand)}
.continue-copy{flex:1;min-width:0}
.overline{font-size:11px;font-weight:750;color:var(--brand2);letter-spacing:.1px}
.continue-copy h2{font-size:18px;margin:3px 0}
.continue-copy p{color:var(--muted);font-size:12px;line-height:1.7}
.stat-grid{gap:13px;margin-bottom:21px}
.stat{border-radius:18px;padding:19px 20px;box-shadow:0 7px 21px rgba(40,50,88,.036)}
.stat-top .chip-icon{width:38px;height:38px;border-radius:12px}
.stat-top{margin-bottom:7px}
.stat-value{font-size:30px;font-weight:800}
.stat-label{margin-top:2px;font-size:11px}
.main-grid{grid-template-columns:minmax(0,1.55fr) minmax(270px,.8fr);gap:18px}
.course-row{border:1px solid #e9edf6;padding:15px;border-radius:14px}
.course-row:hover,.lesson-row:hover{background:#fcfbff;box-shadow:0 8px 20px rgba(72,62,142,.055)}
.course-row:focus-visible,.course-card:focus-visible{outline-offset:1px}
.course-symbol,.lesson-icon{border-radius:14px}
.course-grid{gap:16px}
.course-card{border-radius:20px;padding:23px;box-shadow:var(--shadow)}
.course-card:hover{box-shadow:0 14px 32px rgba(42,43,85,.08)}
.lesson-row{border-radius:15px;min-height:75px}
.lesson-row .left>div{min-width:0}
.lesson-row h3,.lesson-row p{overflow-wrap:anywhere}
.tag{font-size:11px;letter-spacing:0}
.action-card{padding:20px;border-radius:17px;background:#f5f2ff;border-color:#e9e3ff}
.action-card .action-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#e7e0ff;color:var(--brand2)}
.action-card h3{font-size:15px;margin:11px 0 5px}
.action-card p{font-size:12px;min-height:36px}
.action-card.mint-action{background:#edf9f3;border-color:#dceee4}
.mint-action .action-icon{background:#d9f4e7;color:#168b66}
.dashboard-info{display:flex;gap:11px;align-items:flex-start;padding:15px 16px;background:#eff2fb}
.dashboard-info svg{color:#6470a3;margin-top:4px}
.empty{min-height:225px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:29px 20px;border:1px dashed #d6dcec;background:linear-gradient(180deg,#fff,#fcfdff)}
.empty .big{display:grid;place-items:center;width:66px;height:66px;border-radius:20px;background:#f0edff;color:var(--brand2);margin-bottom:16px}
.empty strong{margin-bottom:6px}
.empty p{max-width:340px;line-height:1.8;margin-bottom:15px}
.lesson-header{margin-bottom:22px}
.lesson-header h1{margin:5px 0 0}
.lesson-header .overline{color:var(--muted)}
.lesson-header .badge-line{flex-wrap:wrap}
.tabs{gap:7px;padding:5px;border:1px solid var(--line);border-radius:14px;background:#fff;margin-bottom:19px;scrollbar-width:thin}
.tab{border:0;border-radius:10px;padding:12px 19px;min-height:42px}
.tab.active{background:#f0edff;color:var(--brand2);box-shadow:inset 0 0 0 1px #e0d9ff}
.tab:hover:not(.active){background:#f8f7fd}
.summary-banner{position:relative;padding:22px 24px 22px 76px;background:linear-gradient(115deg,#f2efff,#faf9ff);border:1px solid #e1daff;border-radius:19px}
.summary-spot{position:absolute;left:21px;top:22px;display:grid;place-items:center;width:41px;height:41px;border-radius:12px;background:#ded7ff;color:var(--brand2)}
.summary-banner h3{font-size:17px}
.summary-section{padding:21px 0}
.summary-section h3,.panel>h2{color:#242f4d}
.section-content{font-size:14px;line-height:2.05;color:#354460}
.formula-row{border-radius:13px;gap:9px}
.formula-expr{background:#f5f7fc;border:1px solid #eaedf5;font-size:18px;line-height:1.7;padding:15px;font-family:Georgia,serif;direction:ltr;unicode-bidi:plaintext}
.ordered-step::before{border-radius:10px}
.exercise-kicker{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:15px;font-size:13px;color:var(--muted)}
.exercise-kicker>span:first-child{display:flex;align-items:center;gap:7px;color:var(--brand2);font-weight:750}
.exercise-layout{grid-template-columns:220px minmax(0,1fr);gap:20px}
.exercise-option{border-radius:14px;padding:17px;min-height:79px}
.exercise-option:hover{border-color:#c9c2ff}
.exercise-option.active{border-color:#b2a4ff;background:#f5f2ff;box-shadow:inset 3px 0 0 #7b69db}
.question{font-size:16px;line-height:2.1;background:#f9faff;border:1px solid #e9ecf6;border-radius:15px;padding:19px 22px;margin:20px 0}
.question-label{display:flex;align-items:center;gap:7px;color:#66718c;font-size:12px;font-weight:750;margin-bottom:8px}
.exercise-layout .panel>h3{display:flex;align-items:center;gap:8px}
.answer-input{min-height:152px;line-height:1.9}
.feedback{border-radius:14px}
.hintbox{border:1px solid #ffebbf;border-radius:14px}
.teacher-shell{grid-template-columns:235px minmax(0,1fr);min-height:640px;gap:16px}
.teacher-side{border-radius:18px;padding:17px;background:#fff}
.teacher-side h3{display:flex;align-items:center;gap:9px;font-size:15px}
.teacher-chat{border-radius:18px;min-height:640px;max-height:calc(100vh - 175px);box-shadow:var(--shadow)}
.teacher-head{padding:16px 21px}
.bot-avatar{border-radius:13px;color:var(--brand2);background:#eeeaff}
.chat-messages{padding:24px 22px;gap:17px}
.bubble{font-size:14px;line-height:1.95;padding:16px 19px;max-width:83%}
.bubble.ai{background:#f4f5fa;color:#2b3854}
.bubble.mine{background:#ebe6ff;color:#372e78}
.teacher-welcome{width:min(100%,530px);max-width:100%;margin:auto;align-self:center;display:flex;flex-direction:column;align-items:center;text-align:center;gap:9px;padding:28px 18px}
.welcome-bot{display:grid;place-items:center;width:64px;height:64px;border-radius:22px;background:#efeaff;color:var(--brand2);margin-bottom:5px;box-shadow:0 8px 20px rgba(92,71,206,.12)}
.teacher-welcome h3{font-size:21px}
.teacher-welcome p{font-size:13px;color:#65728a;line-height:1.85;max-width:420px}
.teacher-prompts{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;width:100%;margin-top:13px}
.teacher-prompts button{border:1px solid #dfdef2;background:#fff;border-radius:13px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:105px;padding:10px 8px;color:#564aad;font-size:12px;font-weight:750}
.teacher-prompts button:hover{border-color:#9886ee;background:#f7f4ff}
.chat-tools{gap:7px;padding:12px 17px;background:#fcfcfe}
.pill{border:1px solid transparent;white-space:nowrap}
.pill:hover{background:#eae5ff}
.pill.active{background:#6b55ce}
.chat-compose{padding:12px 17px 18px;gap:10px;background:#fff}
.chat-compose textarea{border-color:#dce2ef;background:#fafbfe;border-radius:14px;min-height:48px;line-height:1.7}
.chat-send{border-radius:13px;min-height:48px;height:48px;width:48px}
.modal{border-radius:24px;box-shadow:0 30px 90px #1420393d}
.file-drop{border:2px dashed #c4bbef;border-radius:16px;background:#faf9ff;padding:26px 15px}
.file-drop:hover{background:#f5f2ff;border-color:#9b8ce9}
.file-chips{line-height:1.5}
.file-chip{border:1px solid #e2e7f2}
.info{border-radius:13px;line-height:1.8}
#toast{font-weight:600;border-radius:13px}
@media(max-width:1210px){
 .workspace{padding-left:27px;padding-right:27px}
 .hero-art{width:170px;opacity:.7;left:2%}
 .hero-content{max-width:70%}
 .main-grid{grid-template-columns:minmax(0,1.4fr) minmax(260px,.75fr)}
}
@media(max-width:1024px){
 .sidebar{display:none}
 .workspace{width:100%;max-width:1000px;padding:0 25px 112px}
 .topbar{height:72px;margin-bottom:21px}
 .mobile-nav{display:flex;position:fixed;right:0;left:0;bottom:0;padding:8px 8px max(11px,env(safe-area-inset-bottom));background:rgba(255,255,255,.97);border-top:1px solid #e7eaf3;z-index:20;box-shadow:0 -9px 30px rgba(25,37,66,.09);backdrop-filter:blur(14px)}
 .mobile-nav button{display:grid;justify-items:center;align-content:center;flex:1;gap:4px;min-height:50px;background:transparent;color:#78859e;font-size:11px;font-weight:700;border-radius:12px}
 .mobile-nav button i{display:grid;place-items:center;font-style:normal;height:24px}
 .mobile-nav button.active{color:var(--brand2);background:#f1eeff}
 .hero{min-height:265px}
 .hero-art{left:5%;width:210px}
 .main-grid{grid-template-columns:minmax(0,1.4fr) minmax(230px,.8fr)}
 .teacher-shell{grid-template-columns:205px minmax(0,1fr);min-height:600px}
 .teacher-chat{min-height:600px;max-height:calc(100dvh - 235px)}
}
@media(max-width:750px){
 .workspace{padding:0 18px 111px}
 .topbar{height:69px}
 .main-grid{display:grid;grid-template-columns:1fr}
 .dashboard-aside{display:grid;grid-template-columns:1fr;gap:0}
 .today-panel .action-card{width:calc(50% - 6px);display:inline-flex;flex-direction:column;vertical-align:top;min-height:216px}
 .today-panel .action-card:first-of-type{margin-left:8px}
 .today-panel .action-card p{flex:1}
 .hero-content{max-width:74%}
 .hero-art{left:0;width:165px;opacity:.5}
 .teacher-shell{display:block}
 .teacher-side{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:13px}
 .teacher-side h3{width:100%}
 .teacher-side .exercise-option{width:auto!important;min-width:150px;flex:1;margin-bottom:0!important;min-height:68px}
 .teacher-side .info{width:100%}
 .teacher-chat{min-height:570px;max-height:calc(100dvh - 255px)}
}
@media(max-width:530px){
 :root{font-size:14px}
 .workspace{padding:0 14px 104px}
 .topbar{height:64px;margin-bottom:16px;gap:8px}
 .eyebrow{font-size:10px}
 .topbar-title{font-size:14px}
 .top-actions{gap:8px}
 .top-create{font-size:12px;min-height:36px!important;padding:7px 10px!important}
 .avatar{width:35px;height:35px}
 .hero{min-height:0;border-radius:20px;padding:27px 22px 28px;margin-bottom:14px;box-shadow:0 12px 24px rgba(48,49,101,.09)}
 .hero-content{max-width:100%}
 .hero-art{opacity:.12;transform:scale(.78) translateY(-48%);left:-57px}
 .hero-kicker{font-size:11px;margin-bottom:9px}
 .hero h1{font-size:25px;line-height:1.35;margin-bottom:11px}
 .hero p{font-size:12px;max-width:315px;line-height:1.85}
 .hero-actions{gap:7px;margin-top:17px}
 .hero-actions .btn{min-height:43px;padding:10px 12px;font-size:12px;gap:6px}
 .welcome-steps{gap:6px;margin-bottom:14px}
 .welcome-step{min-height:133px;padding:12px 10px;gap:5px;border-radius:13px}
 .step-number{font-size:10px;left:9px;top:13px}
 .step-ico{width:29px;height:29px;border-radius:9px}
 .step-ico svg{width:17px;height:17px}
 .welcome-step strong{font-size:11px}
 .welcome-step p{font-size:10px;line-height:1.6}
 .continue-card{align-items:flex-start;gap:11px;padding:15px;flex-wrap:wrap}
 .continue-icon{height:42px;width:42px}
 .continue-card .btn{width:100%}
 .stat-grid{gap:9px;margin-bottom:14px}
 .stat{padding:14px;border-radius:15px}
 .stat-top{gap:5px;margin-bottom:7px}
 .stat-top>.small{font-size:11px}
 .stat-value{font-size:25px}
 .stat-top .chip-icon{width:30px;height:30px;border-radius:10px}
 .stat-top .chip-icon svg{height:17px;width:17px}
 .stat-label{font-size:10px}
 .panel{padding:16px;border-radius:18px;margin-bottom:14px}
 .panel-head h2{font-size:17px}
 .panel-head{margin-bottom:13px}
 .empty{min-height:193px;padding:22px 14px}
 .empty .big{height:55px;width:55px;margin-bottom:11px}
 .empty .big svg{height:30px;width:30px}
 .empty strong{font-size:15px}
 .empty p{font-size:12px}
 .today-panel .action-card{width:100%;min-height:0;display:block;margin-left:0!important;padding:16px}
 .today-panel .action-card p{min-height:0}
 .course-grid{grid-template-columns:1fr}
 .course-card{min-height:0}
 .page-heading h1{font-size:24px}
 .page-heading .btn{min-width:0}
 .page-heading p{font-size:12px}
 .lesson-row{align-items:flex-start;flex-wrap:wrap;gap:9px}
 .lesson-row .tag{margin-right:auto}
 .lesson-header .split{align-items:flex-start}
 .lesson-header h1{font-size:24px}
 .tabs{position:relative;padding:4px;gap:3px}
 .tab{font-size:12px;padding:10px 11px;min-height:40px}
 .summary-banner{padding:18px;border-radius:15px}
 .summary-spot{position:static;margin-bottom:9px;width:36px;height:36px}
 .summary-banner h3{font-size:15px}
 .exercise-layout{display:block}
 .exercise-picker{display:flex;gap:8px;overflow-x:auto;margin-bottom:13px;scroll-snap-type:x mandatory;padding:1px}
 .exercise-option{min-width:160px;min-height:75px;scroll-snap-align:start}
 .exercise-kicker{margin-bottom:10px}
 .question{padding:14px 15px;font-size:15px;margin:17px 0}
 .answer-input{min-height:153px}
 .teacher-side{padding:12px}
 .teacher-side .info{display:none}
 .teacher-chat{max-height:calc(100dvh - 232px);min-height:470px;border-radius:17px}
 .teacher-head{padding:12px 13px}
 .teacher-head .tag{font-size:10px}
 .chat-messages{padding:15px;gap:13px}
 .bubble{max-width:94%;padding:13px 14px}
 .chat-tools{padding:9px 10px;flex-wrap:nowrap;overflow-x:auto}
 .pill{font-size:11px;padding:9px 10px}
 .chat-compose{padding:9px 10px 11px;gap:7px}
 .chat-send{height:44px;width:44px;min-height:44px}
 .teacher-welcome{padding:18px 4px}
 .teacher-welcome h3{font-size:18px}
 .teacher-prompts{gap:6px}
 .teacher-prompts button{font-size:10px;min-height:90px;padding:8px 5px}
 .mobile-nav{padding:7px 5px max(7px,env(safe-area-inset-bottom))}
 .mobile-nav button{font-size:10px;min-height:49px}
 .modal{padding:18px;border-radius:18px}
 .modal-overlay{align-items:flex-end;padding:0}
 .modal{max-height:92dvh;border-radius:22px 22px 0 0;padding:23px 19px max(24px,env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){
 html{scroll-behavior:auto}
 *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}

/* iOS standalone app & restricted-storage diagnostics */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-bottom:110px}
body{min-height:100vh;min-height:100svh;overscroll-behavior-y:contain}
input,select,textarea{max-width:100%}
button{touch-action:manipulation}
.storage-warning{display:flex;gap:13px;align-items:center;background:#fff8e8;border:1px solid #f7daa4;padding:13px 16px;border-radius:15px;margin:0 0 17px;color:#795728}
.storage-warning>svg{flex:none}
.storage-warning>div{flex:1;min-width:0}
.storage-warning strong,.storage-warning span{display:block}
.storage-warning strong{font-size:13px;margin-bottom:4px}
.storage-warning span{font-size:12px;line-height:1.7}
.startup-help{margin:clamp(45px,18vh,170px) auto;text-align:center;background:#fff;border:1px solid #e7ebf3;border-radius:18px;padding:32px 18px;max-width:440px;line-height:1.8;box-shadow:0 12px 35px #18233813}
.startup-help h2{margin-bottom:10px}
.startup-help p{color:var(--muted);margin-bottom:20px}
@media(max-width:530px){
 input,textarea,select{font-size:16px!important} /* Prevent Safari auto-zoom on focus */
 .storage-warning{align-items:flex-start;flex-wrap:wrap;padding:12px}
 .storage-warning .btn{width:100%}
 .workspace{padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))}
 .teacher-chat{max-height:calc(100svh - 220px);max-height:calc(100dvh - 220px)}
 .chat-compose{padding-bottom:max(11px,env(safe-area-inset-bottom))}
}
