:root{color-scheme:light;--bg:#f7f8fb;--surface:#fff;--surface2:#f1f3f8;--stroke:#e5e9f0;--ink:#192338;--muted:#737e93;--blue:#4165d7;--blue2:#eaf0ff;--navy:#172746;--green:#2b9874;--warm:#f1aa53;--shadow:0 8px 30px rgba(30,48,77,.035);--radius:18px;font-synthesis:none}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:inherit}input:focus-visible,textarea:focus-visible,button:focus-visible{outline:3px solid #8ca9ff;outline-offset:2px}::selection{background:#cbd9ff}
.layout{display:grid;grid-template-columns:242px minmax(0,1fr);min-height:100dvh}.side{border-right:1px solid var(--stroke);background:var(--surface);height:100dvh;position:sticky;top:0;display:flex;flex-direction:column;padding:27px 17px 18px}.brand{display:flex;align-items:center;gap:11px;padding:0 11px;margin-bottom:40px;text-align:left;background:none;border:0;color:var(--ink);width:100%}.brandmark{width:38px;height:38px;border-radius:12px;background:linear-gradient(140deg,#263d6c,#182642);display:grid;place-items:center;color:white;letter-spacing:-3px;font-size:16px;font-weight:800;box-shadow:0 5px 12px #263d6c2c;padding-right:3px}.brandmark em{color:#a7baff;font-style:normal}.brand-title{font-weight:760;line-height:1.1;letter-spacing:-.3px;font-size:14px}.brand-sub{display:block;font-size:11px;color:var(--muted);font-weight:500;letter-spacing:0;margin-top:5px}
.side-label{font-size:10px;text-transform:uppercase;letter-spacing:1.5px;color:#9da6b4;font-weight:750;padding:0 14px;margin-bottom:10px}.side-nav{display:flex;flex-direction:column;gap:5px}.nav-item{border:0;background:transparent;color:#6c7688;text-align:left;border-radius:12px;display:flex;align-items:center;gap:13px;font-weight:640;font-size:13px;padding:12px 14px;transition:.17s ease}.nav-item:hover{background:var(--surface2);color:var(--ink)}.nav-item.active{background:#edf2ff;color:#2e53c9}.nav-icon{width:19px;height:19px;display:grid;place-items:center}.nav-icon svg{width:19px;height:19px;stroke-width:1.9}.side-space{flex:1}.aside-foot{background:var(--bg);border-radius:15px;padding:16px;margin:0 5px}.aside-foot-head{display:flex;justify-content:space-between;align-items:center;color:var(--ink);font-weight:700;font-size:12px;margin-bottom:8px}.aside-foot small{font-size:11px;color:var(--muted)}.progress-track{width:100%;height:7px;background:#e7ebf1;border-radius:50px;overflow:hidden}.progress-fill{height:100%;border-radius:50px;background:linear-gradient(90deg,#6086f6,#a6b9ff);transition:width .35s ease}.side-muted{margin:16px 11px 0;font-size:11px;color:#9ba5b5}
.content{min-width:0;padding:0 42px 66px;max-width:1390px;width:100%;margin:auto}.topbar{height:82px;display:flex;align-items:center;justify-content:space-between;gap:12px}.breadcrumb{font-size:12px;color:var(--muted);font-weight:600}.top-actions{display:flex;align-items:center;gap:10px}.tag{padding:6px 10px;background:white;border:1px solid var(--stroke);border-radius:100px;font-size:11px;color:#6a7793;font-weight:700;white-space:nowrap}.tag.dot::before{content:'';display:inline-block;width:7px;height:7px;background:#73b69f;border-radius:50%;margin-right:7px}.mini-button{width:35px;height:35px;display:grid;place-items:center;border-radius:10px;border:1px solid var(--stroke);background:white;color:var(--muted)}.mini-button svg{width:18px;height:18px}
.overline{font-size:11px;text-transform:uppercase;letter-spacing:1.7px;color:#6f83ab;font-weight:780}.page-title{font-size:clamp(25px,3vw,38px);line-height:1.16;letter-spacing:-1.3px;margin:8px 0 11px;font-weight:780}.lead{color:var(--muted);font-size:14px;max-width:670px;margin:0}.page-header{margin:14px 0 30px}.hero{background:linear-gradient(113deg,#1d3157,#243c6d 65%,#385790);padding:35px 38px;color:white;border-radius:23px;min-height:241px;position:relative;overflow:hidden;display:flex;justify-content:space-between;align-items:center;gap:22px}.hero:before{content:'';position:absolute;right:-90px;top:-165px;width:440px;height:440px;border:1px solid #fff2;border-radius:50%}.hero:after{content:'';position:absolute;right:0;bottom:-250px;width:480px;height:480px;border:1px solid #fff3;border-radius:50%}.hero-copy{max-width:550px;z-index:1}.hero .overline{color:#b8c8ed}.hero h1{font-size:clamp(28px,3.4vw,42px);line-height:1.12;letter-spacing:-1.4px;margin:10px 0 13px;font-weight:760}.hero p{color:#c9d3e9;font-size:13px;max-width:450px;margin:0 0 21px}.btn{border:1px solid transparent;border-radius:11px;background:var(--blue);color:white;font-weight:740;font-size:12px;padding:11px 16px;display:inline-flex;justify-content:center;align-items:center;gap:8px;transition:background .16s,transform .16s;text-decoration:none;line-height:1.45}.btn:hover{transform:translateY(-1px);background:#3153bd}.btn.light{background:#fff;color:#253b68}.btn.light:hover{background:#edf2ff}.btn.outline{border-color:var(--stroke);color:var(--ink);background:white}.btn.outline:hover{background:var(--surface2)}.btn.subtle{background:var(--blue2);color:#3158c8}.btn.subtle:hover{background:#dce6ff}.btn.danger{background:#fff1f1;color:#c14b5b}.btn.sm{padding:8px 12px;font-size:11px}.btn:disabled:hover{transform:none}.hero-ring{position:relative;z-index:1;flex:0 0 170px;width:170px;height:170px;border:13px solid #ffffff15;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#a5bcff calc(var(--pct)*1%),#ffffff17 0);box-shadow:inset 0 0 0 11px #253d6a}.ring-center{background:#243d6e;width:120px;height:120px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center}.ring-center strong{font-size:38px;letter-spacing:-1px;line-height:1.1}.ring-center span{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:#b4c3e7;font-weight:700}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:21px 0 33px}.stat{background:var(--surface);border:1px solid var(--stroke);box-shadow:var(--shadow);padding:21px 21px 18px;border-radius:17px;min-height:114px}.stat-top{display:flex;align-items:center;justify-content:space-between;font-size:11px;font-weight:640;color:var(--muted);margin-bottom:8px}.stat-icon{width:27px;height:27px;display:grid;place-items:center;color:#7287b6;background:#f1f4ff;border-radius:9px}.stat-icon svg{width:16px;height:16px}.stat strong{font-size:27px;font-weight:800;letter-spacing:-.7px;line-height:1.2}.stat small{display:block;font-size:10px;color:#99a2af;margin-top:3px}.section-header{display:flex;justify-content:space-between;align-items:center;margin:0 0 15px;gap:12px}.section-title{font-size:17px;font-weight:780;letter-spacing:-.45px;margin:0}.link-button{border:0;background:none;color:var(--blue);font-size:12px;font-weight:760}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.lesson-card{border-radius:18px;background:var(--surface);border:1px solid var(--stroke);padding:21px;display:flex;flex-direction:column;min-height:250px;box-shadow:var(--shadow);transition:transform .18s,box-shadow .18s}.lesson-card:hover{transform:translateY(-2px);box-shadow:0 12px 32px #273b5d12}.card-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.step-chip{color:#45619e;background:#edf3ff;font-size:10px;font-weight:760;padding:6px 9px;border-radius:8px}.card-score{font-size:11px;color:#566582;font-weight:750}.card-title{font-size:16px;font-weight:790;letter-spacing:-.5px;margin:17px 0 8px;line-height:1.28}.card-description{color:var(--muted);font-size:12px;line-height:1.6;flex:1;margin:0}.card-meta{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--stroke);padding-top:17px;margin-top:22px;font-size:11px;color:var(--muted)}.card-arrow{font-size:19px;color:var(--blue)}.soft-panel{background:#f0f3f9;border:1px solid #e8edf6;padding:22px;border-radius:17px}.soft-panel p{color:#738095;font-size:12px;margin:7px 0 0}.banner{display:flex;align-items:center;gap:14px;border:1px solid #d9e4fc;background:#edf3ff;padding:17px;border-radius:15px;margin-bottom:22px}.banner > .banner-icon{background:#dae5ff;width:42px;height:42px;border-radius:12px;display:grid;place-items:center;color:#3864d6;flex-shrink:0}.banner strong{font-size:13px}.banner p{margin:3px 0 0;color:#6e7d98;font-size:11px}.banner .btn{margin-left:auto;flex-shrink:0}.empty{text-align:center;background:white;border:1px solid var(--stroke);border-radius:19px;padding:55px 25px;max-width:760px;margin:55px auto}.empty .empty-symbol{font-size:33px;background:#edf2ff;width:72px;height:72px;border-radius:20px;display:grid;place-items:center;margin:0 auto 17px}.empty h2{font-size:22px;letter-spacing:-.5px;margin:0 0 9px}.empty p{margin:0 auto 21px;color:var(--muted);max-width:480px;font-size:13px}.empty .btn{margin:0 5px 8px}
.lesson-hero{display:grid;grid-template-columns:minmax(0,1fr) 175px;align-items:center;gap:20px;background:var(--surface);padding:25px 29px;border:1px solid var(--stroke);border-radius:19px;box-shadow:var(--shadow);margin-bottom:23px}.lesson-hero .page-title{font-size:clamp(22px,2.6vw,29px);margin:8px 0 9px}.script-name{font-size:11px;color:#6c7890;background:#f4f6fb;display:inline-block;padding:5px 9px;border-radius:8px;margin:0 0 10px;font-family:ui-monospace,Menlo,monospace}.lesson-scores{text-align:center;border-left:1px solid var(--stroke);padding-left:26px}.lesson-scores strong{font-size:37px;letter-spacing:-1.4px;display:block;line-height:1.18}.lesson-scores span{font-size:11px;color:var(--muted)}.tabs{display:flex;gap:4px;background:#e9edf4;padding:5px;border-radius:13px;width:max-content;max-width:100%;margin-bottom:22px}.tab{font-size:12px;padding:9px 15px;border:0;background:transparent;color:#7a8598;border-radius:10px;font-weight:730}.tab.active{background:white;color:var(--ink);box-shadow:0 2px 7px #1c27451a}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 260px;align-items:start;gap:22px}.main-panel{min-width:0}.panel{background:var(--surface);border:1px solid var(--stroke);border-radius:19px;box-shadow:var(--shadow);padding:26px;margin-bottom:19px}.panel h2{font-size:19px;letter-spacing:-.5px;margin:0 0 10px}.panel h3{font-size:14px;letter-spacing:-.2px;margin:17px 0 7px}.panel p{color:#647186;font-size:13px;line-height:1.85;margin:8px 0 15px}.panel ul{margin:10px 0 0;padding-left:19px}.panel li{margin:7px 0;color:#58677f;font-size:12px;line-height:1.7}.panel li::marker{color:#7e9bee}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:13px;margin-bottom:18px}.section-count{color:#8994a4;font-size:11px;font-weight:690}.eyebrow{color:#5773b0;font-size:10px;font-weight:760;text-transform:uppercase;letter-spacing:1.2px}.focus-note{border-left:3px solid #7da0f1;background:#f5f8ff;border-radius:0 9px 9px 0;padding:13px 17px;font-size:12px;color:#5d6c89;margin:18px 0}.formula-box{background:#f4f6fb;border:1px solid #e7ebf4;border-radius:12px;padding:18px 19px;color:#2b416f;font-size:12px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;line-height:1.95;white-space:pre-wrap;overflow:auto;margin:19px 0}.side-panel{position:sticky;top:21px}.side-panel .panel{padding:19px}.side-panel h3{margin:0 0 14px;font-size:12px;color:#43506b}.side-panel .small-link{width:100%;display:block;text-align:left;background:none;border:0;padding:10px 0;color:#7b8799;font-size:11px;border-bottom:1px solid #eff1f5}.side-panel .small-link:hover{color:var(--blue)}.side-panel .small-link.current{color:#355bd0;font-weight:750}.flowline{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:17px}.flow-node{border:1px solid #dfe7f5;padding:9px 11px;border-radius:10px;background:#f7faff;color:#4c6287;font-size:10px;font-weight:730}.flow-arrow{color:#9daecc;font-size:18px}.key-value{display:flex;flex-direction:column;gap:5px;padding:14px 0;border-bottom:1px solid var(--stroke)}.key-value:last-child{border-bottom:0}.key-value strong{font-size:12px;overflow-wrap:anywhere}.key-value .minor{font-size:10px;color:#6b86b3;font-weight:750;text-transform:uppercase}.key-value p{margin:0;font-size:12px}.step-actions{display:flex;justify-content:space-between;gap:10px;margin-top:24px}.source-details{border:1px solid #e5eaf2;border-radius:12px;margin:19px 0;overflow:hidden}.source-details summary{list-style:none;cursor:pointer;padding:12px 15px;color:#526b9a;font-weight:730;font-size:11px;display:flex;justify-content:space-between;align-items:center}.source-details summary::-webkit-details-marker{display:none}.source-details summary:after{content:'⌄';font-size:15px}.source-details[open] summary:after{content:'⌃'}.code-block{margin:0;border-top:1px solid #e5eaf2;padding:17px;background:#192742;color:#d6dff4;font:11px/1.8 ui-monospace,Menlo,Consolas,monospace;overflow:auto;white-space:pre;max-height:350px}.example{background:#f7f9fd;border:1px solid #e9eef7;border-radius:14px;padding:21px;margin:16px 0}.example strong{font-size:13px}.example p{margin:6px 0 10px}.chip{display:inline-block;padding:4px 8px;border:1px solid #e3e8f2;border-radius:7px;background:#f6f8fc;font-size:10px;color:#718097;font-weight:700}.reference-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.reference-grid .panel{margin:0}.reference-grid .key-value:first-child{padding-top:0}.all-list{display:grid;gap:12px}.all-row{width:100%;text-align:left;border:1px solid var(--stroke);background:white;padding:18px 19px;border-radius:15px;display:flex;justify-content:space-between;align-items:center;gap:17px;transition:.16s}.all-row:hover{border-color:#c5d4f7;transform:translateX(2px)}.all-row b{font-size:14px;display:block;line-height:1.3}.all-row small{color:#8290a4;font-size:11px;display:block;margin:5px 0}.all-row .pill{background:#f1f5fc;border-radius:7px;padding:7px 10px;font-size:11px;color:#637999;font-weight:730}
.quiz-question{font-size:19px;line-height:1.48;letter-spacing:-.3px;font-weight:760;margin:10px 0 22px}.qoptions{display:grid;gap:10px}.qoption{width:100%;display:flex;align-items:center;gap:12px;padding:14px 16px;border:1px solid var(--stroke);border-radius:12px;background:var(--surface2);text-align:left;color:#49576e;font-size:12px;font-weight:590}.qoption:hover:not(:disabled){border-color:#adc2fa;background:#f9fbff}.qoption.picked{border-color:#6b8df5;background:#f1f5ff}.qoption.good{border-color:#72bba1;background:#eff9f5}.qoption.bad{border-color:#e4a4ad;background:#fff5f6}.qletter{width:25px;height:25px;border:1px solid #e5eaf2;border-radius:8px;display:grid;place-items:center;font-weight:800;color:#8999b2;flex-shrink:0;background:white}.qfooter{display:flex;justify-content:space-between;align-items:center;margin-top:22px;gap:12px}.qmeta{font-size:11px;color:#8190a7}.feedback{margin-top:21px;border-radius:13px;background:#f2f7ff;border:1px solid #dfe9fa;padding:18px}.feedback.positive{background:#eff9f5;border-color:#cdebdc}.feedback.negative{background:#fff6f6;border-color:#f5dada}.feedback strong{display:block;font-size:13px}.feedback p{margin:6px 0 0;font-size:12px}.q-input{border:1px solid #dbe2ec;border-radius:11px;padding:13px 14px;min-height:45px;width:220px;max-width:100%;color:var(--ink);background:white}.q-textarea,.edit-area{width:100%;min-height:140px;resize:vertical;border:1px solid #e1e7f0;padding:15px;border-radius:13px;line-height:1.65;color:var(--ink);background:var(--surface)}.order-list{display:grid;gap:9px}.order-item{display:flex;align-items:center;gap:13px;border:1px solid #e2e8f0;border-radius:12px;padding:11px;background:#fff}.order-item span{font-size:11px;flex:1}.order-actions{display:flex;gap:5px}.order-actions button{border:1px solid #e1e5ed;background:#f6f8fb;padding:5px 10px;border-radius:7px;font-size:11px}.objective-row{margin:12px 0}.objective-header{display:flex;justify-content:space-between;font-size:11px;font-weight:660;margin-bottom:7px;gap:15px}.objective-header span:last-child{color:#5472bd}.question-indicator{display:flex;gap:6px;margin:13px 0 6px}.question-indicator span{height:4px;flex:1;border-radius:4px;background:#e6eaf2}.question-indicator span.done{background:#7192ed}.question-indicator span.now{background:#253f8c}.small-text{font-size:11px;color:var(--muted)}.short-note{margin-top:15px;color:#7a8798;font-size:11px}.divider{height:1px;background:var(--stroke);margin:22px 0}.filterrow{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:18px}.filterpill{border-radius:9px;border:1px solid #e3e8ef;background:#fff;font-weight:680;color:#788599;padding:8px 12px;font-size:11px}.filterpill.selected{background:#e9efff;color:#355ed0;border-color:#d4e0ff}.map-page{overflow:hidden}.map-canvas{display:flex;flex-direction:column;align-items:center;gap:15px;padding:25px 15px}.map-node{display:flex;align-items:center;gap:17px;text-align:left;border:1px solid #dce4f0;background:white;border-radius:15px;padding:15px 20px;width:min(500px,100%);box-shadow:var(--shadow)}.map-node.notyet{opacity:.55;border-style:dashed}.map-node .number{width:38px;height:38px;border-radius:11px;background:#eaf0ff;color:#456bca;display:grid;place-items:center;font-size:11px;font-weight:800;flex-shrink:0}.map-node b{font-size:12px;display:block}.map-node small{font-size:10px;color:var(--muted)}.map-line{height:20px;width:2px;background:#c9d7f5}.settings-list{display:grid;grid-template-columns:1fr 1fr;gap:15px}.settings-card{border:1px solid var(--stroke);background:var(--surface);border-radius:17px;padding:20px}.settings-card h3{font-size:14px;margin:0 0 6px}.settings-card p{color:var(--muted);font-size:12px;margin:0 0 15px;line-height:1.7}.settings-card .btn{margin:0 6px 7px 0}.input-label{font-size:11px;font-weight:750;display:block;margin:14px 0 7px}.edit-input{border:1px solid #dbe3ef;background:white;border-radius:10px;padding:11px;width:100%;outline:none}.editor-tabs{display:flex;gap:9px;margin-bottom:15px}.status-foot{display:flex;gap:7px;align-items:center;margin-top:20px;color:var(--muted);font-size:11px}.status-foot:before{content:'';height:7px;width:7px;background:#56b798;border-radius:50%}.toast-region{position:fixed;right:22px;bottom:22px;z-index:200;display:flex;flex-direction:column;gap:8px}.toast{background:#263750;color:white;border-radius:12px;padding:12px 17px;box-shadow:0 11px 38px #192c4770;font-size:12px;max-width:350px}.boot{min-height:100dvh;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:13px;color:#8390a5;font-size:13px;font-weight:680}.boot-icon{background:#21345b;color:white;border-radius:20px;width:70px;height:70px;display:grid;place-items:center;font-size:25px;font-weight:800;letter-spacing:-5px}.boot-icon span{color:#bdccff}
.mobile-nav{display:none}
@media(max-width:1140px){.content{padding:0 26px 55px}.workspace{grid-template-columns:minmax(0,1fr) 218px;gap:15px}.cards{gap:11px}.lesson-card{padding:17px}.hero-ring{flex-basis:142px;width:142px;height:142px}.ring-center{width:99px;height:99px}.ring-center strong{font-size:30px}.stats-grid{gap:11px}}
@media(max-width:880px){.layout{grid-template-columns:1fr}.side{display:none}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;background:#fffefbf5;backdrop-filter:blur(20px);border-top:1px solid var(--stroke);z-index:100;padding:9px 8px calc(9px + env(safe-area-inset-bottom));justify-content:space-around}.mobile-nav button{border:0;background:none;color:#8a95a6;font-size:9px;font-weight:720;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:54px}.mobile-nav button svg{width:20px;height:20px}.mobile-nav button.active{color:var(--blue)}.content{padding:0 22px 105px}.topbar{height:68px}.workspace{grid-template-columns:1fr}.side-panel{position:static;order:-1}.side-panel .panel{padding:14px}.side-panel .panel h3{display:none}.side-panel .small-link{width:auto;display:inline-block;border:1px solid #e8ecf3;border-radius:9px;padding:7px 10px;margin:4px}.hero{padding:28px}.stats-grid{grid-template-columns:repeat(2,1fr)}.cards{grid-template-columns:repeat(2,1fr)}.lesson-hero{grid-template-columns:1fr 120px}.settings-list{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.content{padding:0 17px 105px}.topbar{height:61px}.topbar .tag:nth-child(2){display:none}.hero{padding:26px 24px;min-height:0}.hero-ring{display:none}.hero h1{font-size:29px}.stats-grid{grid-template-columns:repeat(2,1fr);gap:9px;margin:13px 0 26px}.stat{padding:15px;min-height:104px}.stat strong{font-size:25px}.cards{grid-template-columns:1fr}.lesson-card{min-height:0;padding:20px}.card-meta{margin-top:16px}.page-header{margin:12px 0 24px}.page-title{font-size:27px}.lesson-hero{padding:20px;grid-template-columns:1fr 85px;gap:6px}.lesson-hero .page-title{font-size:23px}.lesson-scores{padding-left:13px}.lesson-scores strong{font-size:28px}.lesson-scores span{font-size:9px}.panel{padding:19px}.tabs{width:100%}.tab{flex:1;padding:9px 7px;font-size:11px}.reference-grid{grid-template-columns:1fr}.settings-list{grid-template-columns:1fr}.banner{padding:13px}.banner .btn{font-size:10px;padding:8px 9px}.banner-icon{display:none}.qfooter{align-items:stretch}.qfooter .btn{white-space:nowrap}.step-actions .btn{padding:9px 11px}.flowline{gap:5px}.flow-node{font-size:9px;padding:7px 9px}.soft-panel{padding:17px}.toast-region{left:18px;right:18px;bottom:90px}.toast{max-width:none}}
[data-theme="dark"]{color-scheme:dark;--bg:#101725;--surface:#192338;--surface2:#222e45;--stroke:#2c3850;--ink:#f1f4fc;--muted:#99a5ba;--blue:#809cfa;--blue2:#273b64;--shadow:0 8px 30px rgba(0,0,0,.08)}[data-theme="dark"] .nav-item.active{background:#263b61;color:#afc5ff}[data-theme="dark"] .tag,[data-theme="dark"] .mini-button,[data-theme="dark"] .mobile-nav{background:#192338;color:#ccd7e9}[data-theme="dark"] .soft-panel,[data-theme="dark"] .formula-box,[data-theme="dark"] .example,[data-theme="dark"] .focus-note,[data-theme="dark"] .aside-foot{background:#222d45;border-color:#344461;color:#c1cde1}[data-theme="dark"] .panel p,[data-theme="dark"] .panel li,[data-theme="dark"] .card-description{color:#aebbd0}[data-theme="dark"] .tab.active,[data-theme="dark"] .qoption,[data-theme="dark"] .order-item,[data-theme="dark"] .settings-card,[data-theme="dark"] .all-row,[data-theme="dark"] .filterpill{background:#192338;color:#dfebfc}[data-theme="dark"] .tabs{background:#29364e}[data-theme="dark"] .lesson-card,[data-theme="dark"] .stat,[data-theme="dark"] .banner{background:#192338}[data-theme="dark"] .qoption.picked{background:#263b61}[data-theme="dark"] .feedback{background:#223755;border-color:#385178}[data-theme="dark"] .feedback p{color:#bacbe0}[data-theme="dark"] .q-input,[data-theme="dark"] .edit-input{background:#172238;color:#f1f4fc;border-color:#40506a}[data-theme="dark"] .btn.outline{background:#26324b;color:#f1f4fc;border-color:#3a4b65}[data-theme="dark"] .script-name,[data-theme="dark"] .flow-node{background:#233149;color:#cbd8ef;border-color:#394962}[data-theme="dark"] .source-details{border-color:#37475f}[data-theme="dark"] .step-chip,[data-theme="dark"] .chip{background:#243858;color:#bdd0f4;border-color:#364c70}


/* v0.2 · Readability pass. These rules intentionally supersede the compact prototype scale. */
:root { --muted:#50617a; --blue:#2e59c3; --ui-ink-soft:#43536b; }
body {font-size:17px; line-height:1.7; text-rendering:optimizeLegibility;}
.lead {font-size:16px;line-height:1.7;color:var(--muted);max-width:760px;}
.panel h2 {font-size:22px;line-height:1.35;}
.panel h3 {font-size:17px;line-height:1.4;}
.panel p {font-size:16px;line-height:1.75;color:var(--ui-ink-soft);}
.panel li {font-size:16px;line-height:1.72;color:var(--ui-ink-soft);margin:9px 0;}
.nav-item {font-size:15px;color:#485b76;padding:13px 14px;}
.side-label,.brand-sub,.overline,.eyebrow {font-size:12px;}
.brand-title {font-size:16px;}.brand-sub{font-size:12px;}
.breadcrumb,.tag,.side-muted,.aside-foot-head,.aside-foot small {font-size:12px;}
.btn {font-size:14px;min-height:41px;}.btn.sm {font-size:13px;min-height:36px;}
.tab {font-size:14px;padding:11px 14px;}
.card-title {font-size:18px;}.card-description {font-size:15px;line-height:1.7;}
.card-meta,.card-score,.step-chip,.small-text,.short-note,.qmeta,.card-meta,.section-count,.minor,.status-foot {font-size:13px;}
.stat-top,.stat small {font-size:12px;}
.soft-panel p,.settings-card p,.empty p,.banner p {font-size:15px;line-height:1.75;color:var(--muted);}
.qoption {font-size:16px;line-height:1.5;padding:16px;}
.quiz-question {font-size:22px;line-height:1.5;}
.order-item span {font-size:15px;}.order-actions button {font-size:14px;min-width:36px;min-height:36px;}
.formula-box {font-size:14px;line-height:1.9;color:#2d466e;}
.source-details summary {font-size:13px;min-height:46px;}.code-block {font-size:12.5px;line-height:1.8;}
.key-value strong {font-size:15px;}.key-value p {font-size:15px;}.key-value .minor {font-size:12px;}
.small-link,.objective-header,.example strong,.reference-grid .panel,.settings-card h3 {font-size:14px;}
.q-input,.q-textarea,.edit-input,.edit-area {font-size:16px;line-height:1.7;}
.qletter,.feedback strong,.feedback p,.feedback li,.filterpill {font-size:14px;}
.hero p {font-size:15px;line-height:1.65;}.hero .overline {font-size:12px;}
.lesson-scores span {font-size:12px;}.script-name {font-size:13px;}
.tabs {flex-wrap:wrap;gap:5px; background:var(--surface2);}
.cheat-shortcut {display:inline-flex;gap:8px;align-items:center;background:var(--blue2);border:1px solid var(--stroke);border-radius:10px;color:var(--blue);padding:10px 13px;font-size:14px;font-weight:700;margin:3px 0 12px;}
.cheat-shortcut:hover {filter:brightness(.98);}
.cheat-sheet {max-width:980px;margin-inline:auto;padding:30px 34px;}
.cheat-header {display:flex;align-items:start;gap:20px;justify-content:space-between;padding-bottom:20px;border-bottom:1px solid var(--stroke);}
.cheat-header h2 {font-size:27px;letter-spacing:-.6px;margin:8px 0;}
.cheat-header p {max-width:690px;font-size:16px;margin:0;}
.cheat-print {white-space:nowrap;}
.cheat-compact {display:flex;flex-wrap:wrap;gap:7px;margin:18px 0 0;}
.cheat-compact span {font-size:12px;font-weight:700;background:var(--surface2);padding:6px 11px;border-radius:8px;color:var(--muted);}
.cheat-section {margin:24px 0 0;}
.cheat-section h3 {font-size:18px;letter-spacing:-.25px;margin-bottom:12px;}
.cheat-list {padding-left:25px;}
.cheat-list li {padding-left:4px;}
.cheat-equations {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.cheat-equation {background:var(--surface2);border:1px solid var(--stroke);border-radius:13px;padding:18px;}
.cheat-equation strong {display:block;font-size:15px;margin-bottom:10px;color:var(--ink);}
.cheat-math {font:14px/1.8 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ink);font-weight:600;}
.cheat-equation p {font-size:14px;margin:12px 0 0;}
.cheat-example {border-left:3px solid var(--blue);background:var(--surface2);padding:15px 20px;border-radius:0 12px 12px 0;}
.cheat-example strong {font-size:16px;}
.cheat-example ol {margin:10px 0 0;padding-left:22px;}
.cheat-watch {background:var(--surface2);padding:17px 20px;border-radius:13px;}
.cheat-watch ul {padding-left:21px;}
.cheat-footer {border-top:1px solid var(--stroke);padding-top:17px;margin-top:25px;color:var(--muted);font-size:13px;}
/* Higher contrast in dark mode, including selections and feedback states. */
[data-theme="dark"] {color-scheme:dark;--bg:#0f1725;--surface:#1c293b;--surface2:#293a51;--stroke:#42536c;--ink:#f6f8ff;--muted:#becbe0;--blue:#a9c3ff;--blue2:#293f61;--ui-ink-soft:#d8e3f3;}
[data-theme="dark"] .panel,[data-theme="dark"] .lesson-hero,[data-theme="dark"] .stat,[data-theme="dark"] .lesson-card,[data-theme="dark"] .settings-card,[data-theme="dark"] .all-row,[data-theme="dark"] .qoption,[data-theme="dark"] .order-item,[data-theme="dark"] .map-node,[data-theme="dark"] .empty {background:var(--surface);color:var(--ink);border-color:var(--stroke);}
[data-theme="dark"] .panel p,[data-theme="dark"] .panel li,[data-theme="dark"] .card-description,[data-theme="dark"] .key-value p,[data-theme="dark"] .lead,[data-theme="dark"] .small-text,[data-theme="dark"] .short-note,[data-theme="dark"] .qmeta {color:var(--ui-ink-soft);}
[data-theme="dark"] .nav-item {color:#ced9ed;}
[data-theme="dark"] .nav-item:hover {color:white;}
[data-theme="dark"] .breadcrumb,[data-theme="dark"] .overline,[data-theme="dark"] .eyebrow,[data-theme="dark"] .section-count,[data-theme="dark"] .tag,[data-theme="dark"] .side-label {color:#c1d1ee;}
[data-theme="dark"] .side,[data-theme="dark"] .mobile-nav {background:var(--surface);}
[data-theme="dark"] .stat small,[data-theme="dark"] .stat-top,[data-theme="dark"] .card-meta,[data-theme="dark"] .card-score,[data-theme="dark"] .card-meta,[data-theme="dark"] .qletter {color:var(--muted);}
[data-theme="dark"] .tab {color:#c7d4e9;}
[data-theme="dark"] .tab.active {background:#435775;color:#fff;box-shadow:none;}
[data-theme="dark"] .btn.subtle {background:#30476b;color:#e2edff;}
[data-theme="dark"] .btn.outline,[data-theme="dark"] .filterpill {background:#293a51;color:#f0f5ff;border-color:#556780;}
[data-theme="dark"] .btn.outline:hover {background:#354b66;}
[data-theme="dark"] .cheat-shortcut {background:#314765;color:#dce8ff;}
[data-theme="dark"] .cheat-equation,[data-theme="dark"] .cheat-example,[data-theme="dark"] .cheat-watch {background:#26354b;}
[data-theme="dark"] .cheat-math,[data-theme="dark"] .cheat-equation strong {color:#f5f8ff;}
[data-theme="dark"] .formula-box,[data-theme="dark"] .example,[data-theme="dark"] .soft-panel,[data-theme="dark"] .focus-note {background:#293a51;color:#e4efff;border-color:#495e7a;}
[data-theme="dark"] .source-details {background:#233147;border-color:#536681;}
[data-theme="dark"] .source-details summary {color:#cce0ff;}
[data-theme="dark"] .code-block {background:#0c1729;color:#e4ecff;border-color:#536681;}
[data-theme="dark"] .qoption:hover:not(:disabled) {background:#2b4160;border-color:#829fdb;}
[data-theme="dark"] .qoption.picked {background:#324e75;border-color:#adcaff;}
[data-theme="dark"] .qoption.good {background:#163a32;border-color:#64bb99;color:#effff9;}
[data-theme="dark"] .qoption.bad {background:#4a2631;border-color:#dc889a;color:#fff2f3;}
[data-theme="dark"] .qletter {background:#2c3d55;border-color:#526681;}
[data-theme="dark"] .feedback {background:#293f60;border-color:#4b6c95;color:#eaf3ff;}
[data-theme="dark"] .feedback.positive {background:#173c36;border-color:#4c9b81;}
[data-theme="dark"] .feedback.negative {background:#4a2932;border-color:#a76473;}
[data-theme="dark"] .feedback p,[data-theme="dark"] .feedback li {color:#e5edfd;}
[data-theme="dark"] .q-input,[data-theme="dark"] .edit-input,[data-theme="dark"] .edit-area,[data-theme="dark"] .q-textarea {background:#121e31;color:#f2f7ff;border-color:#60728c;}
[data-theme="dark"] .order-actions button {background:#364961;border-color:#5a6f8c;color:#f5f8ff;}
[data-theme="dark"] .mini-button,[data-theme="dark"] .tag {background:#263750;color:#e5edff;border-color:#536783;}
@media(max-width:880px){.cheat-sheet {padding:25px;}.cheat-equations {grid-template-columns:1fr 1fr;}}
@media(max-width:560px){
 body {font-size:16px;}
 .content {padding-inline:17px;}
 .panel p,.panel li {font-size:16px;line-height:1.75;}
 .tabs {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;padding:4px;gap:3px;}
 .tab {font-size:12px;padding:11px 4px;min-width:0;}
 .lesson-hero .lead {font-size:15px;}
 .lesson-scores span {font-size:11px;}
 .cheat-sheet {padding:20px;}
 .cheat-header {display:block;}
 .cheat-header h2 {font-size:23px;}
 .cheat-print {margin-top:15px;}
 .cheat-equations {grid-template-columns:1fr;}
 .cheat-compact span {font-size:11px;}
 .qoption {font-size:16px;}
 .nav-item {font-size:15px;}
}
@media print {
 body {background:white!important;color:black!important;}
 body * {visibility:hidden!important;}
 .cheat-sheet,.cheat-sheet * {visibility:visible!important;}
 .cheat-sheet {position:absolute;top:0;left:0;width:100%;max-width:none;border:0;box-shadow:none;background:#fff!important;color:#111!important;padding:8mm 10mm;}
 .cheat-sheet * {color:#111!important;background:transparent!important;box-shadow:none!important;}
 .cheat-print {display:none!important;}
 .cheat-equations {grid-template-columns:1fr 1fr;}
 .cheat-equation,.cheat-section {break-inside:avoid;}
}


/* v0.3 — legible, consistent light/dark theme. Shared surfaces always use shared ink.
   Explicit dark overrides ensure that quiz panels never mix light and dark palettes. */
:root {
  --action-bg:#355bc7; --action-fg:#ffffff;
  --disabled-bg:#e0e5ee; --disabled-fg:#516078;
  --option-bg:#f5f7fb; --option-border:#d5ddea; --option-ink:#253247;
}
.btn:not(.light):not(.outline):not(.subtle):not(.danger) {background:var(--action-bg);color:var(--action-fg);}
.btn:disabled, .btn:disabled:hover {
  opacity:1;transform:none;cursor:not-allowed;
  background:var(--disabled-bg) !important;
  color:var(--disabled-fg) !important;
  border-color:transparent;
}
.quiz-question{color:var(--ink);font-size:clamp(20px,2.0vw,24px);line-height:1.48;letter-spacing:-.42px;}
.qoption {background:var(--option-bg);color:var(--option-ink);border-color:var(--option-border);font-size:16px;font-weight:590;line-height:1.5;min-height:60px;}
.qoption:focus-visible {outline-offset:3px;}
.qletter{background:#fff;color:#344867;border-color:#d6e0ee;min-width:27px;min-height:27px;font-size:13px;}
.panel-header .eyebrow{font-size:12px;letter-spacing:1.3px;}
.section-count,.qmeta{color:var(--muted);font-size:13px;}
.question-indicator span {background:var(--stroke);height:5px;}
.question-indicator span.done{background:#7896dc;}
.question-indicator span.now{background:var(--action-bg);}
.tabs {background:var(--surface2);}
.tab {color:var(--muted);font-size:14px;}
.tab.active {background:var(--surface);color:var(--ink);}
.panel{background:var(--surface);color:var(--ink);}

/* Dark mode: charcoal-navy surfaces with text that maintains strong contrast. */
html[data-theme="dark"] {
  color-scheme:dark;
  --bg:#101723;
  --surface:#1a2637;
  --surface2:#26364c;
  --stroke:#41536d;
  --ink:#f7f9fe;
  --muted:#c1cee1;
  --ui-ink-soft:#e2e9f5;
  --blue:#abc7ff;
  --blue2:#263d60;
  --action-bg:#4168cf;
  --action-fg:#fff;
  --disabled-bg:#35445b;
  --disabled-fg:#c8d4e5;
  --option-bg:#233248;
  --option-border:#445777;
  --option-ink:#f1f5fd;
  --shadow:0 8px 30px rgba(0,0,0,.12);
}
html[data-theme="dark"] body {background:var(--bg);color:var(--ink);}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .lesson-hero,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .lesson-card,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .all-row,
html[data-theme="dark"] .map-page {
  background:var(--surface); color:var(--ink);border-color:var(--stroke);
}
html[data-theme="dark"] .quiz-question,
html[data-theme="dark"] .panel h2,
html[data-theme="dark"] .panel h3,
html[data-theme="dark"] .panel h4 {color:var(--ink);}
html[data-theme="dark"] .qoption,
html[data-theme="dark"] .order-item,
html[data-theme="dark"] .filterpill {
  background:var(--option-bg);color:var(--option-ink);border-color:var(--option-border);
}
html[data-theme="dark"] .qoption:hover:not(:disabled){background:#2c4262;border-color:#8daef0;}
html[data-theme="dark"] .qoption.picked{background:#344f78;color:#fff;border-color:#adc7ff;}
html[data-theme="dark"] .qoption.good{background:#173e35;color:#ecfff7;border-color:#65c9a2;}
html[data-theme="dark"] .qoption.bad{background:#522f37;color:#fff1f3;border-color:#ec93a1;}
html[data-theme="dark"] .qletter{background:#354a68;color:#eff5ff;border-color:#607999;}
html[data-theme="dark"] .qoption.good .qletter{background:#245447;color:#f5fff9;border-color:#72cbaf;}
html[data-theme="dark"] .qoption.bad .qletter{background:#673c48;color:#fff5f7;border-color:#e29aaa;}
html[data-theme="dark"] .tab{color:#d2def1;}
html[data-theme="dark"] .tab.active{background:#425975;color:#fff;}
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .section-count,
html[data-theme="dark"] .qmeta,
html[data-theme="dark"] .overline{color:#bcd0f4;}
html[data-theme="dark"] .question-indicator span{background:#3a4b65;}
html[data-theme="dark"] .question-indicator span.done{background:#779be7;}
html[data-theme="dark"] .question-indicator span.now{background:#afc5ff;}
html[data-theme="dark"] .btn:disabled,
html[data-theme="dark"] .btn:disabled:hover{
  background:var(--disabled-bg) !important;
  color:var(--disabled-fg) !important;
}
html[data-theme="dark"] .panel p,
html[data-theme="dark"] .panel li {color:var(--ui-ink-soft);}
html[data-theme="dark"] .feedback p,
html[data-theme="dark"] .feedback li {color:#eaf1fd;}
html[data-theme="dark"] .script-name,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .step-chip{color:#d6e5ff;}
html[data-theme="dark"] .side-label,
html[data-theme="dark"] .side-muted {color:#b8c8df;}
html[data-theme="dark"] .aside-foot,
html[data-theme="dark"] .soft-panel,
html[data-theme="dark"] .formula-box {background:var(--surface2);border-color:var(--stroke);}
html[data-theme="dark"] .btn.outline {background:#2c3c55;color:#f4f8ff;border-color:#526681;}
html[data-theme="dark"] .btn.subtle {background:#2b4064;color:#e7f0ff;}
html[data-theme="dark"] .nav-item.active {background:#293f64;color:#deebff;}
html[data-theme="dark"] .mobile-nav {background:rgba(26,38,55,.98);}
@media(max-width:560px){
 .quiz-question{font-size:20px;line-height:1.5;}
 .qoption{font-size:16px;padding:15px 13px;min-height:60px;}
 .tabs{grid-template-columns:repeat(2,minmax(0,1fr));}
 .tab{font-size:13px;min-height:40px;}
}

/* v0.5 — reduced interface, typography-first layouts */
:root{--bg:#f5f6f8;--surface:#fff;--surface2:#f0f2f5;--stroke:#e3e6ed;--ink:#182233;--muted:#667286;--blue:#355ac8;--blue2:#eaf0ff;--shadow:none;--radius:15px}
body{font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;font-size:16px;line-height:1.55;letter-spacing:-.01em}
.layout{grid-template-columns:228px minmax(0,1fr)}
.side{padding:28px 15px 21px;border-color:var(--stroke)}
.brand{margin-bottom:39px;padding:0 11px;gap:12px}
.brandmark{background:#29395b;box-shadow:none;border-radius:12px;letter-spacing:-1px;font-size:15px;padding:0}
.brand-title{font-size:15px;font-weight:720}.brand-sub{letter-spacing:.01em;margin-top:4px;font-size:11px;color:var(--muted)}
.side-nav{gap:4px}.nav-item{font-weight:580;font-size:14px;border-radius:11px;color:var(--muted);padding:12px 13px}.nav-item.active{background:var(--surface2);color:var(--ink)}.nav-item:hover{transform:none}.secondary-nav{border-top:1px solid var(--stroke);padding-top:14px;margin-top:15px}
.side-label,.side-muted{display:none}.aside-foot{background:none;margin:11px 3px 0;padding:14px 10px 0;border-top:1px solid var(--stroke);border-radius:0}.aside-foot-head{font-size:13px}.aside-foot small{font-size:12px}.progress-track{height:5px;background:#e5e8ef}.progress-fill{background:#7898ef}
.content{max-width:1210px;padding:0 35px 85px}.topbar{height:75px}.breadcrumb{font-size:13px}.top-actions .mini-button{background:var(--surface);border-color:var(--stroke);color:var(--ink)}
.page-header{margin:8px 0 24px}.page-title{font-size:clamp(27px,2.6vw,38px);font-weight:710;letter-spacing:-1.1px;margin:3px 0 7px}.lead{font-size:15px;line-height:1.5;color:var(--muted)}
.clean-hero{background:#263859;min-height:204px;padding:31px 35px;border-radius:19px;margin:0 0 32px;box-shadow:none}
.clean-hero:before,.clean-hero:after{display:none}
.clean-hero .overline{font-size:11px;letter-spacing:.08em;font-weight:700;color:#c0d0f4}
.clean-hero h1{font-size:clamp(28px,3.4vw,39px);font-weight:700;margin:8px 0 8px;letter-spacing:-1.2px}
.clean-hero p{font-size:14px;color:#d4def3;margin-bottom:21px}
.clean-hero .btn.light{color:#263859;font-size:13px;background:#fff}
.clean-hero .hero-ring{width:130px;height:130px;flex-basis:130px;border-width:9px;box-shadow:inset 0 0 0 8px #263859;background:conic-gradient(#aec6ff calc(var(--pct)*1%),#ffffff30 0)}
.clean-hero .ring-center{background:#263859;width:94px;height:94px}.clean-hero .ring-center strong{font-size:29px}.clean-hero .ring-center span{font-size:10px;color:#dbe4f7}
.section-header{margin:0 0 14px}.section-title{font-size:19px;letter-spacing:-.4px;font-weight:700}.link-button{font-size:13px;font-weight:650;color:var(--blue)}
.section-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:34px}
.section-tile{display:flex;flex-direction:column;gap:12px;padding:19px 17px 16px;background:var(--surface);border:1px solid var(--stroke);border-radius:15px;text-align:left;color:var(--ink);min-height:127px}.section-tile:hover,.compact-card:hover,.all-row:hover{border-color:#9fb4e7;background:var(--surface)}
.section-name{font-weight:650;font-size:14px;line-height:1.3}.section-score{font-size:21px;font-weight:730;letter-spacing:-.5px;line-height:1}.section-tile small{font-size:12px;color:var(--muted)}
.cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.compact-card{padding:19px 19px 13px;min-height:161px;text-align:left;display:flex;width:100%;box-shadow:none;border-radius:15px;color:var(--ink)}.compact-card:hover{transform:none;box-shadow:none}
.compact-card .card-title{margin:19px 0 10px;font-size:16px;font-weight:700;letter-spacing:-.25px}.compact-card .card-meta{margin-top:auto;padding-top:12px;align-items:center}.compact-card .card-meta span:first-child{display:block;max-width:91%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px}.compact-card .step-chip{background:var(--surface2);color:var(--muted);border-radius:6px;font-weight:600}.compact-card .card-score{font-size:13px;color:var(--ink);font-weight:660}
.script-section{margin-top:28px}.section-muted{font-size:13px;color:var(--muted)}
.all-list{border:1px solid var(--stroke);border-radius:15px;overflow:hidden;background:var(--surface)}.all-row{padding:16px 20px;border:0;border-bottom:1px solid var(--stroke);border-radius:0;background:var(--surface);box-shadow:none}.all-row:last-child{border-bottom:0}.all-row b{font-size:15px;font-weight:650}.all-row small{margin-top:3px;font-size:12px;color:var(--muted)}.all-row .pill{font-size:13px;border:0;background:var(--surface2);color:var(--ink);border-radius:9px}
.lesson-hero{padding:24px 25px;border-radius:15px;box-shadow:none}.lesson-hero .page-title{font-size:clamp(22px,2.3vw,30px)}.lesson-hero .lead{font-size:14px}.lesson-scores strong{font-size:31px}.script-name{background:var(--surface2);color:var(--muted);font-size:12px}
.tabs{border:1px solid var(--stroke);background:var(--surface);padding:4px;margin-bottom:20px}.tab{font-size:13px;font-weight:650;color:var(--muted)}.tab.active{background:var(--surface2);color:var(--ink);box-shadow:none}
.panel{box-shadow:none;border-radius:16px}.panel h2{letter-spacing:-.4px}.panel p,.panel li{font-size:15px;line-height:1.68}.panel ul{padding-left:21px}
.btn{font-size:14px;font-weight:650;padding:11px 15px;border-radius:11px;box-shadow:none;letter-spacing:0}.btn:hover{transform:none}.btn.sm{font-size:13px}.overline{letter-spacing:.11em;font-size:11px}.eyebrow{letter-spacing:.07em}.qoption{font-size:15px;line-height:1.45}.quiz-question{font-size:22px;line-height:1.43;letter-spacing:-.4px;font-weight:700}
.cheat-sheet{max-width:1000px}.cheat-header h2{font-size:26px}.cheat-header p{font-size:15px}.cheat-section h3{font-size:16px}.cheat-equation,.cheat-example{border-radius:12px}
.empty{background:var(--surface);box-shadow:none;margin:65px auto;padding:65px 27px}.empty h2{font-size:24px;font-weight:720}.empty p{font-size:15px}.empty-symbol{background:var(--surface2)!important;color:var(--ink)}
.flowmap{max-width:910px}.map-group{background:var(--surface);border:1px solid var(--stroke);border-radius:16px;padding:22px 23px}.map-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:15px;font-size:16px}.map-heading span{font-size:13px;color:var(--muted)}.map-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.map-script{display:flex;align-items:center;text-align:left;gap:12px;padding:12px 14px;color:var(--ink);background:var(--surface2);border:1px solid var(--stroke);border-radius:10px;min-height:56px}.map-script strong{font-size:13px;font-weight:630;flex:1}.map-script span{font-size:12px;color:var(--muted)}.map-script svg{color:var(--muted)}.map-connector{text-align:center;color:var(--muted);font-size:20px;line-height:38px}
html[data-theme="dark"]{--bg:#101827;--surface:#1d2a3d;--surface2:#25354b;--stroke:#3c4d66;--ink:#f2f6fd;--muted:#c0cee2;--blue:#adc5ff;--blue2:#263e63;--shadow:none}
html[data-theme="dark"] .section-tile,html[data-theme="dark"] .map-group,html[data-theme="dark"] .map-script,html[data-theme="dark"] .compact-card{background:var(--surface);border-color:var(--stroke);color:var(--ink)}
html[data-theme="dark"] .section-tile:hover,html[data-theme="dark"] .compact-card:hover{border-color:#8daaf0}
html[data-theme="dark"] .section-tile .progress-track,html[data-theme="dark"] .aside-foot .progress-track{background:#35445d}
html[data-theme="dark"] .all-row .pill,html[data-theme="dark"] .tab.active,html[data-theme="dark"] .compact-card .step-chip{background:var(--surface2);color:var(--ink)}
html[data-theme="dark"] .all-row small,html[data-theme="dark"] .section-tile small,html[data-theme="dark"] .section-muted,html[data-theme="dark"] .map-heading span,html[data-theme="dark"] .map-script span{color:var(--muted)}
html[data-theme="dark"] .hero{background:#283e60}html[data-theme="dark"] .clean-hero .ring-center{background:#283e60}html[data-theme="dark"] .top-actions .mini-button{color:var(--ink);background:var(--surface)}
html[data-theme="dark"] .tabs{background:var(--surface)}html[data-theme="dark"] .tab{color:#d2dfef}html[data-theme="dark"] .tab.active{background:#395273;color:white}
html[data-theme="dark"] .brand-sub,html[data-theme="dark"] .nav-item{color:var(--muted)}html[data-theme="dark"] .nav-item.active{background:var(--surface2);color:var(--ink)}
@media(max-width:1150px){.section-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.content{padding:0 16px 90px}.topbar{height:62px}.clean-hero{min-height:190px;padding:24px 20px}.clean-hero .hero-ring{width:105px;height:105px;flex-basis:105px}.clean-hero .ring-center{width:76px;height:76px}.clean-hero .ring-center strong{font-size:24px}.clean-hero h1{font-size:27px}.section-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.section-tile{min-height:120px;padding:15px}.cards,.map-steps{grid-template-columns:1fr}.compact-card{min-height:137px}.lesson-hero{padding:20px}.tabs{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.quiz-question{font-size:20px}.qoption{font-size:15px}.page-title{font-size:29px}}
@media(max-width:410px){.clean-hero .hero-ring{display:none}.clean-hero h1{font-size:27px}.section-name{font-size:13px}.section-tiles{gap:8px}.section-tile{padding:13px}.map-group{padding:15px}}
.setting-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:13px 0 5px}.settings-card .sync-key{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px;min-height:44px}.settings-card .settings-note{font-size:12px;color:var(--muted)}.sync-actions{margin-top:18px;padding-top:16px;border-top:1px solid var(--stroke)}
.small-link{font-size:14px;line-height:1.4}.settings-card p{font-size:14px;line-height:1.55}.question-indicator span{height:4px}.quiz-question{margin:19px 0 24px}.qmeta{font-size:12px;color:var(--muted)}.section-count{font-size:13px;color:var(--muted)}.panel .feedback p{font-size:14px}

/* v0.6 · touch-friendly ordering and clear per-step feedback */
.sequence-intro {margin:0 0 12px;color:var(--muted);font-size:14px;line-height:1.5;}
.sequence-intro strong {font-weight:750;letter-spacing:-2px;color:var(--ink);font-size:18px;}
.order-list {gap:10px;}
.order-item.sequence-row {min-height:74px;display:flex;align-items:center;gap:13px;padding:12px 14px;border:1.5px solid var(--stroke);background:var(--surface2);color:var(--ink);transition:border-color .14s,background .14s,transform .14s;}
.order-item .sequence-position {font-size:14px;flex:0 0 29px;width:29px;height:29px;border-radius:9px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--stroke);font-weight:750;color:var(--ink);}
.order-item .sequence-label {flex:1;font-size:15px;line-height:1.45;color:var(--ink);font-weight:570;}
.sequence-controls {display:flex;align-items:center;gap:10px;flex-shrink:0;}
.drag-handle {display:grid;place-items:center;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;border-radius:10px;width:43px;height:48px;color:var(--ink);background:var(--surface);border:1px solid var(--stroke);font-size:24px;letter-spacing:-5px;padding:0 6px 0 0;}
.drag-handle:active {cursor:grabbing;}
.order-item .order-actions {display:flex;gap:5px;}
.order-item .order-actions button {min-width:34px;min-height:42px;display:grid;place-items:center;padding:0;border:1px solid var(--stroke);background:var(--surface);color:var(--ink);font-size:18px;}
.order-item .order-actions button:disabled {opacity:.3;cursor:not-allowed;}
.order-item.is-dragging {opacity:.62;transform:scale(.993);}
.order-item.drop-target {border-color:#5b86e8!important;box-shadow:0 0 0 3px rgba(91,134,232,.14);}
.order-item.sequence-row.seq-right {background:#eaf8f1;border-color:#5bb58e;color:#19583d;}
.order-item.sequence-row.seq-wrong {background:#fff0f0;border-color:#d98287;color:#7e2e36;}
.sequence-row.seq-right .sequence-position {background:#c8ecda;border-color:#6cbe9e;color:#19583d;}
.sequence-row.seq-wrong .sequence-position {background:#f6d9dc;border-color:#da9095;color:#7e2e36;}
.sequence-status {flex:0 0 28px;font-size:21px!important;font-weight:800;text-align:center;}
.seq-right .sequence-status{color:#258055;}
.seq-wrong .sequence-status{color:#c15362;}
.correct-sequence {display:grid;gap:7px;margin:13px 0;padding:12px;border-radius:12px;background:rgba(40,130,94,.06);border:1px solid rgba(48,136,97,.2);}
.sequence-caption {font-size:13px;font-weight:750;margin:0 0 3px;}
.correct-seq-row {display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.45;color:var(--ink);}
.correct-seq-row>span {min-width:23px;height:23px;border-radius:7px;background:rgba(37,128,85,.15);display:grid;place-items:center;font-weight:750;color:#257f56;}
.review-rating {display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;}
.tap-reveal {display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-size:14px;}
.tap-reveal p{margin:0!important;}
html[data-theme="dark"] .order-item.sequence-row {background:#25354b;border-color:#506582;color:#f2f6fe;}
html[data-theme="dark"] .order-item .sequence-position,html[data-theme="dark"] .drag-handle,html[data-theme="dark"] .order-item .order-actions button{background:#1c293c;color:#f3f7ff;border-color:#546c88;}
html[data-theme="dark"] .order-item.sequence-row.seq-right{background:#173f33;border-color:#5bc69a;color:#effff8;}
html[data-theme="dark"] .order-item.sequence-row.seq-wrong{background:#522e37;border-color:#ed8998;color:#fff4f6;}
html[data-theme="dark"] .sequence-row.seq-right .sequence-position{background:#245946;color:#ecfff8;border-color:#72d2a9;}
html[data-theme="dark"] .sequence-row.seq-wrong .sequence-position{background:#673d48;color:#fff2f5;border-color:#ed9da9;}
html[data-theme="dark"] .seq-right .sequence-status{color:#7fe4b3;}
html[data-theme="dark"] .seq-wrong .sequence-status{color:#ffabb5;}
html[data-theme="dark"] .correct-sequence{background:#143b32;border-color:#367f68;}
html[data-theme="dark"] .correct-seq-row>span{background:#2a5749;color:#c3ffde;}
html[data-theme="dark"] .sequence-row .sequence-label{color:#f1f6fd;}
html[data-theme="dark"] .sequence-caption{color:#d4f4e6;}
@media(max-width:560px){
 .sequence-controls{gap:6px;}
 .order-item.sequence-row{padding:11px 9px;gap:9px;}
 .order-item .sequence-label{font-size:15px;}
 .order-item .sequence-position{flex-basis:25px;width:25px;height:25px;}
 .drag-handle{width:38px;height:48px;}
 .order-item .order-actions button{min-width:29px;min-height:40px;}
 .sequence-intro{font-size:13px;}
 .qfooter{flex-wrap:wrap;gap:11px;}
}
/* The original static-site cleanup set desktop columns after the mobile media query.
   Reassert the single column at the END, so content uses full iPhone width. */
.feedback.partial {background:#f7f9fd;border-color:#aebfd9;}
html[data-theme="dark"] .feedback.partial {background:#24354c;border-color:#7991b4;}
@media(max-width:880px){
 .layout {grid-template-columns:minmax(0,1fr);}
 .content {min-width:0;width:100%;max-width:none;margin:0 auto;}
 .side {display:none;}
 .mobile-nav {display:flex;}
 .workspace {grid-template-columns:minmax(0,1fr);}
 .main-panel {min-width:0;}
}
@media(max-width:560px){
 .lesson-hero {grid-template-columns:minmax(0,1fr) 84px;}
 .script-name {overflow-wrap:anywhere;max-width:100%;white-space:normal;}
 .sequence-row .sequence-label {min-width:0;overflow-wrap:break-word;}
 .order-item.sequence-row {min-width:0;}
 .quiz-workspace .side-panel {order:0;}
 .quiz-workspace .side-panel .panel {background:transparent;border:0;padding:0;box-shadow:none;}
 .quiz-workspace .side-panel .divider, .quiz-workspace .side-panel .panel h3 {display:none;}
 .sequence-intro {margin-bottom:14px;}
}

/* Cloud backup setup stays compact on iPhone and Mac. */
.sync-card-header{display:flex;gap:14px;justify-content:space-between;align-items:flex-start;flex-wrap:wrap}
.sync-card-header p{margin-bottom:2px}
.sync-status{background:var(--surface2,#eef3f9);border:1px solid var(--stroke);border-radius:24px;padding:7px 11px;font-size:12px;font-weight:600;max-width:100%;overflow-wrap:anywhere;color:var(--muted)}
.sync-status.busy{color:var(--accent,#296bd6)}
.sync-toggle{display:flex;gap:12px;align-items:flex-start;margin:16px 0 4px;cursor:pointer;color:var(--text);font-size:14px}
.sync-toggle input{margin-top:4px;width:18px;height:18px;accent-color:var(--accent,#296bd6);flex:0 0 18px}
.sync-toggle span{display:flex;flex-direction:column;gap:4px}
.sync-toggle small{font-size:12px;color:var(--muted);line-height:1.5}
.backup-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.backup-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 12px;border:1px solid var(--stroke);border-radius:12px}
.backup-row span{display:flex;flex-direction:column;gap:3px;font-size:13px}
.backup-row small{color:var(--muted);font-size:12px}
@media(max-width:560px){.sync-card-header{display:block}.sync-status{display:inline-block;margin:9px 0 13px}.backup-row{gap:8px}.sync-key{font-size:12px!important}}

/* v1.0 — reading-led progress and visible source by default. */
.source-details {background:var(--surface2);border-color:var(--stroke);}
.source-details summary {color:var(--ink);font-size:14px;min-height:48px;gap:12px;}
.source-details summary .source-hint {font-size:12px;letter-spacing:0;color:var(--muted);font-weight:550;margin-left:auto;}
.source-path {padding:0 15px 13px;color:var(--muted);font-size:12px;line-height:1.5;overflow-wrap:anywhere;}
.code-block {font-size:13px;line-height:1.72;max-height:460px;}
.read-hint {font-size:13px!important;color:var(--muted)!important;margin-top:14px!important;}
.completion-actions {flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:12px;}
.completion-actions .btn {min-height:44px;}
[data-theme="dark"] .source-details summary {color:#e9f0ff;}
[data-theme="dark"] .source-details summary .source-hint {color:#bfcde2;}
@media(max-width:560px){.source-details summary{font-size:13px}.source-details summary .source-hint{font-size:11px}.code-block{font-size:12px}.completion-actions .btn{flex:1;}}

/* v1.1: quiet two-step recovery key setup. */
.pair-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:17px 0 20px;}
.pair-steps>div{display:flex;flex-direction:column;gap:5px;background:var(--surface2);border:1px solid var(--stroke);border-radius:12px;padding:14px;}
.pair-steps b{font-size:13px;color:var(--ink)}
.pair-steps span{color:var(--muted);font-size:12px;line-height:1.45;}
.key-row{display:flex;align-items:stretch;gap:8px;}
.key-row .sync-key{min-width:0;flex:1;}
.key-row .btn{margin:0;flex:0 0 auto;}
.offline-check{color:var(--muted);font-size:12px;margin-left:6px;}
@media(max-width:560px){.pair-steps{grid-template-columns:1fr}.key-row{gap:6px}.settings-card .setting-actions .btn{min-height:39px}}

.sync-setup{margin-top:14px;padding:12px 14px;border:1px solid var(--stroke);border-radius:12px;font-size:13px;color:var(--muted)}
.sync-setup summary{cursor:pointer;font-weight:650;color:var(--ink)}
.sync-setup ol{padding-left:20px;margin:14px 0 2px;line-height:1.7}
.sync-setup li{margin-bottom:9px}
.sync-setup code{font-size:12px;color:var(--ink)}
