:root{--ink:#202638;--muted:#7d879c;--thin:#a9b0c0;--accent:#645cf4;--accent-dark:#4c45d9;--bg:#f6f7fc;--white:#fff;--line:#e9ebf3;--card:#fff;--side:#fff;--soft:#f3f1ff;--shadow:0 12px 38px rgba(30,34,75,.045);--radius:18px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--bg);font-size:16px;line-height:1.65}button,input,select,textarea{font:inherit}button,a{outline-offset:3px}button{cursor:pointer}a{color:inherit;text-decoration:none}input,select,textarea{color:var(--ink)}h1,h2,h3,h4,p{margin-top:0}h1{font-size:36px;line-height:1.35;letter-spacing:-.9px}h2{font-size:24px;line-height:1.35;letter-spacing:-.35px}h3{font-size:18px;margin:0}small{font-size:13.5px}.app{display:flex;min-height:100vh}.sidebar{width:244px;flex-shrink:0;position:fixed;inset:0 auto 0 0;background:var(--side);border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:30;padding:32px 16px 18px;overflow-y:auto}.identity{display:flex;align-items:center;gap:12px;padding:0 13px 44px}.identity strong{display:block;font-size:25px;line-height:1.2;font-weight:810;letter-spacing:-1.05px}.identity small{display:block;font-size:12px;color:#a2a9ba;letter-spacing:1.2px;margin-top:4px;font-weight:700}.brand-dot{color:var(--accent)}.brand-logo{width:34px;height:34px;background:var(--accent);border-radius:11px;display:flex;align-items:end;gap:3px;padding:8px;box-shadow:0 8px 20px #645cf438}.brand-logo i{display:block;width:4px;background:#fff;border-radius:3px}.brand-logo i:nth-child(1){height:10px;opacity:.55}.brand-logo i:nth-child(2){height:18px}.brand-logo i:nth-child(3){height:13px;opacity:.85}.brand-logo i:nth-child(4){height:8px;opacity:.55}.side-label{color:#afb5c3;letter-spacing:1.9px;font-size:12.5px;font-weight:850;margin:0 13px 12px}.side-nav{display:flex;flex-direction:column;gap:6px}.side-nav a{padding:11px 13px;border-radius:11px;display:flex;align-items:center;gap:12px;font-weight:650;color:#68738a;transition:.18s}.side-nav a:hover{background:#f6f5ff;color:var(--accent)}.side-nav a.active{background:#eeecff;color:#514bd5}.nav-ico{font-size:21px;width:24px;text-align:center;line-height:1}.nav-pill{margin-left:auto;background:#eeecff;padding:1px 7px;color:#645cf4;border-radius:7px;font-size:12.5px}.label-second{margin-top:37px}.mode-container{display:flex;gap:4px;background:#f3f4f9;border:1px solid #eef0f6;border-radius:11px;padding:5px;margin:0 5px}.mode-choice{flex:1;padding:7px 2px;border:0;background:transparent;border-radius:7px;color:#8b95a8;font-size:15px;font-weight:750}.mode-choice.active{background:var(--white);color:var(--accent);box-shadow:0 2px 10px #292b4312}.sidebar-bottom{margin-top:auto;padding:28px 14px 9px}.slogan-mark{font-family:Georgia,serif;font-size:59px;line-height:35px;color:#d7d2ff}.sidebar-bottom p{font-size:15px;color:#8f98aa;line-height:2;margin:8px 0 15px}.sidebar-bottom span{font-size:12px;letter-spacing:1.3px;color:#bdc1ce}.workspace{margin-left:244px;width:calc(100% - 244px);min-height:100vh;display:flex;flex-direction:column}.topbar{height:75px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.7);display:flex;align-items:center;justify-content:space-between;padding:0 43px;position:sticky;top:0;z-index:12;backdrop-filter:blur(18px)}.top-left,.top-right{display:flex;align-items:center;gap:14px}.crumb-base{font-size:13.5px;letter-spacing:2px;color:#aeb5c4;font-weight:850}.crumb-sep{color:#cbd0dd}.crumb-here{font-weight:750;color:#5b6479;font-size:15px}.offline-badge{color:#609c7a;background:#e9f7ee;padding:6px 12px;border-radius:30px;font-size:13.5px;font-weight:700}.offline-badge b{display:inline-block;background:#40b879;height:6px;width:6px;border-radius:50%;vertical-align:middle;margin-right:5px}.top-divider{height:19px;background:#e5e6ee;width:1px}.top-mode{color:#8b91a2;font-size:13.5px;font-weight:700}.mini-avatar{width:31px;height:31px;border-radius:50%;background:#ece9ff;color:#665cf0;display:grid;place-items:center;font-weight:900}.icon-button{background:transparent;border:none;color:#596175;font-size:22px;padding:2px}.mobile-toggle{display:none}main{width:100%;max-width:1510px;margin:0 auto;padding:36px 43px 70px;flex:1}.footer{max-width:1510px;width:100%;margin:0 auto;display:flex;justify-content:space-between;color:#b5bbc9;font-size:12.5px;padding:18px 43px 24px;gap:15px}.kicker{display:flex;align-items:center;gap:8px;letter-spacing:1.7px;font-size:13.5px;font-weight:820;color:#746ce9;margin-bottom:10px}.kicker:before{content:'';width:6px;height:6px;background:var(--accent);border-radius:50%}.page-head{display:flex;justify-content:space-between;gap:15px;align-items:flex-end;margin-bottom:26px}.page-head h1{margin-bottom:9px}.page-sub{color:var(--muted);margin:0;font-size:15.5px;max-width:750px}.btn{border:0;background:var(--accent);color:#fff;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 17px;font-size:15px;font-weight:800;transition:.2s;white-space:nowrap}.btn:hover{background:var(--accent-dark);transform:translateY(-1px)}.btn:disabled{opacity:.4;cursor:not-allowed;transform:none}.btn.secondary{background:var(--white);color:#5d5bd3;border:1px solid #e8e7ff}.btn.secondary:hover{background:var(--soft)}.btn.ghost{background:transparent;color:#716ce2;border:1px solid #dedcf7}.btn.ghost:hover{background:var(--soft)}.btn.sm{padding:8px 11px;font-size:13.5px;border-radius:8px}.btn.danger{background:#fff1f2;color:#b03e56}.btn.danger:hover{background:#ffe1e6}.link{color:var(--accent);font-weight:800;cursor:pointer}.link:hover{text-decoration:underline}.muted{color:var(--muted)}.eyebrow{letter-spacing:1.3px;font-size:12.5px;font-weight:800;color:#9ca5b6;text-transform:uppercase}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.pad{padding:23px}.hero{min-height:273px;border-radius:22px;background:#242d59;color:#fff;position:relative;overflow:hidden;padding:35px 42px;display:flex;align-items:center;justify-content:space-between;gap:30px}.hero:before{content:'';position:absolute;border:1px solid #ffffff16;border-radius:50%;width:445px;height:445px;right:-72px;top:-75px}.hero:after{content:'';position:absolute;border:1px solid #ffffff1c;border-radius:50%;width:310px;height:310px;right:-5px;top:-8px}.hero-copy{position:relative;z-index:2;max-width:545px}.hero .kicker{color:#aaa5ff}.hero .kicker:before{background:#bbb6ff}.hero h1{font-size:39px;color:white;line-height:1.45;margin:0 0 12px}.hero h1 em{font-style:normal;color:#aaa4ff}.hero p{color:#b6bcda;font-size:15.5px;line-height:1.95;margin-bottom:20px}.hero .btn{background:#fff;color:#4e47d3}.hero .btn:hover{background:#efedff}.hero-art{flex-shrink:0;width:260px;height:195px;position:relative;z-index:2}.glass-card{position:absolute;background:#ffffff12;border:1px solid #ffffff29;backdrop-filter:blur(8px);border-radius:16px;box-shadow:0 10px 35px #00000012}.art-one{top:0;right:13px;width:225px;height:143px;padding:18px}.art-two{bottom:-2px;left:-12px;width:156px;height:77px;padding:12px}.art-caption{font-size:12.5px;color:#a9b0d7;letter-spacing:.6px}.art-bars{display:flex;align-items:end;justify-content:space-around;height:70px;padding:8px 0 0}.art-bars span{background:#8e86ff;width:16px;border-radius:4px 4px 0 0;opacity:.92}.art-line{display:flex;align-items:center;gap:7px;margin:12px 0 2px}.dot{width:8px;height:8px;background:#4fdea9;border-radius:50%}.big-val{font-size:25px;line-height:1.3;font-weight:800}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:21px 0 30px}.metric{padding:21px 23px}.metric .metric-top{display:flex;justify-content:space-between;gap:10px;font-size:13.5px;font-weight:700;color:#8b95a7}.metric-top .tile-icon{width:29px;height:29px;background:#f1efff;color:#7167ed;border-radius:9px;display:grid;place-items:center;font-size:19px}.metric strong{font-size:32px;display:block;margin:5px 0 4px;letter-spacing:-1px;line-height:1.25}.metric small{color:#a5adbc;font-size:12.5px}.section-row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:28px 0 15px}.section-row h2{margin:0}.split{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(265px,1fr);gap:18px}.learning-card{padding:24px}.progress-track{height:8px;background:#edf0f8;border-radius:30px;overflow:hidden}.progress-track i{display:block;height:100%;background:linear-gradient(90deg,#7a73fc,#a5a0ff);border-radius:30px;transition:width .3s}.progress-meta{display:flex;justify-content:space-between;margin-bottom:12px;align-items:center}.phase-row{display:flex;align-items:center;gap:13px;padding:13px 0;border-bottom:1px solid #f1f1f6}.phase-row:last-child{border-bottom:0}.phase-num{width:36px;height:36px;background:#f4f4ff;color:var(--accent);border-radius:10px;display:grid;place-items:center;font-weight:800;font-size:15px;flex-shrink:0}.phase-description{flex:1;min-width:0}.phase-description strong{display:block;font-size:15px}.phase-description span{font-size:13.5px;color:#a2a9b9}.phase-count{font-size:13.5px;color:#929bb0;font-weight:700}.note-card{background:linear-gradient(140deg,#fffcf3,#fff);padding:26px;display:flex;flex-direction:column;align-items:flex-start}.note-mark{background:#fff1c8;border-radius:13px;width:47px;height:47px;display:grid;place-items:center;font-size:25px;margin-bottom:22px}.note-card h3{font-size:21px;margin-bottom:10px}.note-card p{font-size:15px;color:#8d90a4;line-height:1.9;margin-bottom:25px}.bottom-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.action-card{padding:22px;transition:.18s;cursor:pointer}.action-card:hover{border-color:#d1ccff;transform:translateY(-2px)}.action-icon{background:#f1efff;width:40px;height:40px;display:grid;place-items:center;border-radius:11px;color:var(--accent);font-size:22px;margin-bottom:15px}.action-card h3{font-size:15px;margin-bottom:6px}.action-card p{font-size:13.5px;color:#97a0b1;margin:0;line-height:1.75}.pill{font-size:12.5px;font-weight:750;letter-spacing:.2px;color:#7169e5;background:#f0eeff;border-radius:7px;padding:4px 8px;white-space:nowrap}.pill.green{background:#e9f8ee;color:#379a65}.pill.yellow{background:#fff7e5;color:#bb813b}.pill.gray{background:#f2f3f7;color:#959dae}.toolbar{display:flex;gap:10px;justify-content:space-between;align-items:center;flex-wrap:wrap;margin-bottom:20px}.input,.select,.textarea{background:var(--white);border:1px solid #e4e7f0;border-radius:10px;padding:11px 13px;outline:none;font-size:15px;transition:.2s;max-width:100%}.input:focus,.select:focus,.textarea:focus{border-color:#948bfa;box-shadow:0 0 0 3px #bcb6ff3a}.searchbox{display:flex;align-items:center;gap:8px;border:1px solid #e4e7f0;border-radius:10px;background:var(--white);padding:0 13px;width:290px;max-width:100%;color:#a2aabd}.searchbox input{border:0;background:transparent;outline:0;width:100%;padding:12px 0;font-size:15px}.filter-tabs{display:flex;flex-wrap:wrap;gap:7px}.tab{background:var(--white);color:#8490a3;border:1px solid #e8eaf1;padding:8px 12px;border-radius:8px;font-size:13.5px;font-weight:800}.tab.active{background:var(--accent);color:#fff;border-color:var(--accent)}.course-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.course-card{padding:21px;display:flex;flex-direction:column;min-height:207px;cursor:pointer;transition:.18s}.course-card:hover{border-color:#bdb7fc;transform:translateY(-2px);box-shadow:0 14px 28px #3d327810}.course-top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:18px}.course-no{font-size:13.5px;color:#abb2c2;font-weight:900;letter-spacing:1px}.course-card h3{font-size:18px;line-height:1.45;margin:0 0 8px}.course-card p{font-size:13.5px;color:#969eb0;line-height:1.8;margin:0 0 13px;flex:1}.course-end{display:flex;align-items:center;justify-content:space-between;color:#9aa2b1;font-size:12.5px;border-top:1px solid #f1f2f7;padding-top:13px}.course-end strong{color:var(--accent);font-size:13.5px}.empty{padding:55px 20px;text-align:center;color:#98a0b0}.lesson-wrap{max-width:990px;margin:0 auto}.back-button{background:none;border:0;color:#7d83a4;font-size:15px;font-weight:780;padding:5px 0;margin-bottom:17px}.lesson-hero{background:linear-gradient(125deg,#252e61,#414386);color:white;padding:29px 35px;border-radius:20px;margin-bottom:19px}.lesson-hero h1{color:white;font-size:32px;margin:13px 0 8px}.lesson-hero p{color:#c9cbed;margin:0 0 20px}.lesson-meta{display:flex;align-items:center;gap:11px;flex-wrap:wrap;color:#d0d2ef;font-size:13.5px}.lesson-meta .pill{background:#ffffff27;color:#fff}.lesson-layout{display:grid;grid-template-columns:minmax(0,1fr) 228px;gap:17px;align-items:start}.lesson-main{display:flex;flex-direction:column;gap:16px;min-width:0}.lesson-block{padding:23px 27px}.lesson-block h2{font-size:19px;margin-bottom:18px}.lesson-block h2 .circle-index{font-size:12.5px;background:#eeeaff;color:#6860eb;padding:5px 8px;border-radius:7px;margin-right:8px;vertical-align:middle}.context-block{background:#fbfaff;border:1px solid #e9e6ff;border-radius:11px;padding:16px 18px;color:#555c7c;font-size:15px;line-height:1.9}.steps{list-style:none;padding:0;margin:0;counter-reset:steps}.steps li{position:relative;padding:0 0 17px 38px;font-size:15px;color:#5e687b;line-height:1.95;counter-increment:steps}.steps li:last-child{padding-bottom:0}.steps li:before{content:counter(steps);position:absolute;left:0;top:0;width:24px;height:24px;border-radius:8px;background:#f1efff;color:#655fe0;display:grid;place-items:center;font-size:13.5px;font-weight:800}.bullets{padding-left:19px;color:#5c6678;font-size:15px;line-height:2.1;margin:0}.warning{padding:14px 16px;background:#fffbf0;border:1px solid #fff0c8;color:#936b2c;border-radius:10px;font-size:15px;line-height:1.8}.lesson-side{position:sticky;top:93px;display:flex;flex-direction:column;gap:14px}.lesson-side .card{padding:20px}.lesson-side h3{font-size:15.5px;margin-bottom:12px}.status-pill{display:inline-flex;padding:5px 8px;font-size:12.5px;background:#f2f4f9;color:#929bb0;border-radius:7px;font-weight:800}.side-buttons{display:flex;flex-direction:column;gap:9px;margin-top:15px}.side-buttons .btn{width:100%;font-size:13.5px}.small-muted{font-size:13.5px;color:#969eb0;line-height:1.9}.quiz-choices{display:flex;flex-direction:column;gap:9px}.quiz-option{display:flex;gap:10px;text-align:left;align-items:center;border:1px solid #e9ebf3;background:#fff;border-radius:9px;padding:11px 13px;font-size:15px;color:#647086}.quiz-option b{width:23px;height:23px;flex-shrink:0;background:#f2f3f8;color:#828da5;display:grid;place-items:center;border-radius:7px}.quiz-option:hover{border-color:#bcb6f5}.quiz-option.picked{border-color:#7e75f0;background:#f5f3ff}.quiz-option.correct{border-color:#7acfa1;background:#f1fff5}.quiz-feedback{font-size:15px;border-radius:9px;padding:11px 14px;background:#f4f3ff;margin-top:13px;color:#5c60a6}.textarea{width:100%;min-height:118px;resize:vertical;line-height:1.8}.code-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}.codebox{background:#202846;border-radius:10px;padding:18px;color:#cdd9ff;font-size:13.5px;line-height:1.8;overflow:auto;white-space:pre;font-family:Consolas,Monaco,monospace}.method-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,1fr);gap:17px;align-items:start}.method-form,.method-result{padding:26px}.field{margin-bottom:19px}.field label{display:block;color:#667086;font-size:15px;font-weight:750;margin-bottom:9px}.field select{width:100%}.form-tip{color:#9aa2b1;font-size:13.5px;line-height:1.8}.result-heading{font-size:12.5px;letter-spacing:1px;color:#a3a9bb;font-weight:850;margin-bottom:8px}.result-method{font-size:25px;font-weight:820;line-height:1.4;margin-bottom:10px}.result-description{color:#737d93;font-size:15px;line-height:1.9}.method-extras{border-top:1px solid #f0f0f7;padding-top:15px;margin-top:20px}.method-extras strong{display:block;font-size:13.5px;color:#7b849b;margin-bottom:5px}.method-extras p{font-size:15px;color:#697389}.lab-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.dataset{padding:23px;display:flex;flex-direction:column;gap:14px}.dataset-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#f0efff;font-size:22px;color:#665cec}.dataset h3{font-size:19px}.dataset p{font-size:15px;color:#929bad;line-height:1.8;margin:6px 0 0}.dataset-actions{display:flex;gap:7px;flex-wrap:wrap}.data-preview{overflow:auto;border:1px solid var(--line);border-radius:11px;max-width:100%}.data-preview table{border-collapse:collapse;font-size:12.5px;width:100%;white-space:nowrap}.data-preview th{background:#f6f6fc;color:#667089;text-align:left}.data-preview th,.data-preview td{padding:8px 11px;border-bottom:1px solid #eceef5}.data-preview tr:last-child td{border-bottom:0}.task{border-top:1px solid #edf0f6;padding:15px 0}.task:last-child{padding-bottom:0}.task strong{font-size:15px}.task p{font-size:13.5px;color:#949bad;line-height:1.9;margin:4px 0}.task-answer{padding:12px;background:#f6f5ff;border-radius:10px;color:#5b5d9b;font-size:13.5px;line-height:1.9;margin-top:9px}.task details summary{cursor:pointer;color:#6a65db;font-size:13.5px;font-weight:750;margin-top:8px}.glossary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.glossary-item{padding:18px 20px}.glossary-item strong{font-size:15.5px;display:block}.glossary-item em{font-style:normal;font-size:13.5px;color:var(--accent);margin-left:5px}.glossary-item p{font-size:13.5px;color:#8e97a7;margin:6px 0 0;line-height:1.85}.tool-switch{display:flex;gap:7px;margin-bottom:19px;flex-wrap:wrap}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.setting{padding:25px}.setting h3{font-size:19px;margin-bottom:9px}.setting p{font-size:15px;color:#99a1b0;line-height:1.9}.setting .btn{margin-top:10px}.file-input{display:none}.notes-list{display:flex;flex-direction:column;gap:9px}.note-row{padding:13px 16px;border:1px solid #ebedf6;border-radius:10px;cursor:pointer;display:flex;gap:10px;justify-content:space-between;align-items:center}.note-row:hover{border-color:#bbb5fa}.note-row b{font-size:15px}.note-row small{color:#9fa8b6}.separator{height:1px;background:var(--line);margin:17px 0}.source-list a{display:block;padding:13px 15px;border:1px solid var(--line);border-radius:9px;margin-top:8px}.source-list a:hover{border-color:#b5adf2}.source-list strong{font-size:15px;color:#6560d1}.source-list p{font-size:12.5px;color:#9ba4b4;margin:3px 0 0}.section-inset{padding:23px}.feature-list{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.feature{padding:17px}.feature b{display:block;font-size:15.5px;margin-bottom:7px}.feature p{font-size:13.5px;color:#929cae;margin:0;line-height:1.85}.lesson-switches{display:flex;justify-content:space-between;gap:15px;margin-top:16px}.lesson-switches .btn{max-width:50%}#toast{position:fixed;bottom:27px;right:27px;background:#26304e;color:#fff;border-radius:11px;padding:11px 16px;font-size:15px;box-shadow:0 12px 35px #111a3c40;z-index:100;opacity:0;transform:translateY(12px);pointer-events:none;transition:.2s}#toast.show{opacity:1;transform:none}.shade{display:none}::selection{background:#ddd8ff;color:#292253}
@media(max-width:1240px){.course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-art{width:195px}.glass-card.art-one{width:190px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:950px){.sidebar{width:215px}.workspace{margin-left:215px;width:calc(100% - 215px)}main{padding:27px 27px 65px}.topbar{padding:0 27px}.footer{padding:18px 27px}.hero{padding:28px}.hero h1{font-size:32px}.hero-art{display:none}.split,.method-grid{grid-template-columns:1fr}.lesson-layout{grid-template-columns:1fr}.lesson-side{position:static}.bottom-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:740px){.sidebar{width:260px;transform:translateX(-105%);transition:transform .22s;box-shadow:0 12px 60px #13152b20}.sidebar.open{transform:none}.shade{display:none}.shade.open{display:block;position:fixed;inset:0;background:#17182d72;z-index:25}.workspace{margin:0;width:100%}.mobile-toggle{display:block}.topbar{padding:0 19px;height:60px}.top-right .top-mode,.top-divider{display:none}.top-left{gap:10px}main{padding:22px 16px 55px}.footer{padding:16px 16px 23px;flex-direction:column;gap:2px}.hero{padding:30px 25px;min-height:240px}.hero h1{font-size:30px}.metrics{gap:10px;margin:14px 0 22px}.metric{padding:17px}.metric strong{font-size:27px}.bottom-grid,.course-grid,.lab-grid,.glossary-grid,.settings-grid,.feature-list{grid-template-columns:1fr}.toolbar{align-items:stretch}.searchbox{width:100%}.filter-tabs{gap:5px}.tab{padding:7px 9px}.page-head{align-items:flex-start;flex-direction:column}.page-head h1{font-size:30px}.lesson-hero{padding:24px}.lesson-hero h1{font-size:27px}.lesson-block{padding:20px}.lesson-side .card{padding:20px}.method-form,.method-result{padding:20px}}


/* StatLab V1.1 — comfortable reading, accessible controls, dual theme */
:root {
  color-scheme: light;
  --text-secondary:#606d84;
  --text-tertiary:#7a879d;
  --panel-tint:#f5f3ff;
  --table-line:#e8ecf4;
  --nav-hover:#f3f0ff;
  --nav-active:#eeeaff;
  --focus-ring:rgba(100,92,244,.35);
}
body {font-size:16px; line-height:1.75; -webkit-font-smoothing:antialiased;}
button,input,select,textarea {line-height:1.5;}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid var(--focus-ring); outline-offset:2px;
}
.sidebar{width:268px;padding-top:29px;}
.workspace{margin-left:268px;width:calc(100% - 268px);}
.identity{padding-bottom:39px;}
.side-nav a{padding:12px 13px;}
.topbar{min-height:77px;height:auto;padding-top:10px;padding-bottom:10px;}
.top-left{min-width:0;}
.crumb-here{max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.top-right{gap:12px;flex-shrink:0;}
.nav-ico{font-size:21px;}
main{padding-top:40px;}
.page-sub{line-height:1.8;}
.hero p{font-size:16px;}
.btn{min-height:42px;font-size:14px;padding:10px 17px;}
.btn.sm{min-height:37px;font-size:13px;padding:8px 13px;}
.metric .metric-top{font-size:14px;}
.metric small{font-size:13px;}
.phase-description strong{font-size:15px;}
.phase-description span,.phase-count{font-size:13px;}
.course-card{min-height:224px;}
.course-card p{font-size:14.5px;line-height:1.8;}
.course-end{font-size:13px;}
.lesson-layout{grid-template-columns:minmax(0,1fr) 252px;gap:19px;}
.lesson-wrap{max-width:1120px;}
.lesson-block{padding:27px 30px;}
.lesson-block h2{font-size:21px;}
.context-block,.steps li,.bullets,.warning{font-size:16px;}
.steps li{padding-bottom:18px;padding-left:42px;}
.steps li:before{width:27px;height:27px;font-size:13px;}
.quiz-option{font-size:15px;padding:13px 15px;}
.quiz-feedback{font-size:15px;}
.lesson-side h3{font-size:16px;}
.lesson-side .btn{font-size:14px;}
.small-muted,.form-tip{font-size:14px;}
.codebox{font-size:13.5px;line-height:1.85;}
.field label{font-size:15px;}
.result-description,.method-extras p{font-size:15px;}
.dataset p,.task p,.glossary-item p,.setting p,.feature p{font-size:14.5px;}
.data-preview table{font-size:13.5px;line-height:1.5;}
.data-preview th,.data-preview td{padding:11px 13px;}
.searchbox input,.input,.select,.textarea{font-size:15px;}
.textarea{line-height:1.85;}
.pill{font-size:12px;padding:5px 9px;}
.status-pill{font-size:12px;}
.top-mode{font-size:13px;}
.crumb-base{font-size:12px;}
.crumb-here{font-size:13px;}
/* All visitors can toggle theme from the fixed header on desktop and mobile. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:9px;
  border:1px solid var(--line);border-radius:12px;padding:9px 13px;min-height:40px;
  background:var(--card);color:var(--ink);font-weight:750;font-size:13.5px;
  box-shadow:var(--shadow);white-space:nowrap;transition:background .2s,border-color .2s,color .2s;
}
.theme-toggle:hover{border-color:var(--accent);background:var(--soft);}
.theme-icon{font-size:18px;line-height:1;width:20px;display:inline-grid;place-items:center;}
.theme-toggle .theme-text{display:inline-block;}
/* Keep text readable on narrow screens without forcing horizontal scrolling. */
@media(max-width:1240px){
  .sidebar{width:238px;}.workspace{margin-left:238px;width:calc(100% - 238px);}
  .topbar{padding-left:25px;padding-right:25px;}
  main{padding-left:26px;padding-right:26px;}
}
@media(max-width:1060px){
  .offline-badge,.mini-avatar{display:none;}
  .crumb-here{max-width:220px;}
}
@media(max-width:950px){
  .sidebar{width:226px;}.workspace{margin-left:226px;width:calc(100% - 226px);}
  .lesson-layout{grid-template-columns:1fr;}
  .topbar{padding-left:23px;padding-right:23px;}
  .hero h1{font-size:33px;}
}
@media(max-width:740px){
  .sidebar{width:min(290px,85vw);}
  .workspace{margin:0;width:100%;}
  .topbar{padding:10px 15px;min-height:64px;}
  .top-right{gap:6px;}
  .crumb-base{display:none;}.crumb-sep{display:none;}
  .crumb-here{max-width:145px;font-size:13px;}
  .theme-toggle{padding:8px 10px;min-height:38px;gap:4px;}
  .theme-toggle .theme-text{font-size:12px;}
  main{padding:22px 15px 55px;}
  .hero{padding:27px 23px;}
  .hero h1{font-size:29px;}
  .hero p{font-size:15px;}
  .lesson-block{padding:22px 20px;}
  .course-card p{font-size:14px;}
  .context-block,.steps li,.bullets,.warning{font-size:15.5px;}
  .data-preview table{font-size:13px;}
}
@media(max-width:360px){
  .crumb-here{max-width:105px;}
  .theme-toggle .theme-text{display:none;}
  .theme-toggle{width:39px;padding:7px;}
}

/* Night theme: tuned for reading statistics long-term, not just inverted colors. */
html[data-theme="dark"]{
  color-scheme:dark;
  --ink:#edf1fc;
  --muted:#b0bed5;
  --thin:#8697b3;
  --accent:#aca2ff;
  --accent-dark:#887ef5;
  --bg:#0d1321;
  --white:#202b43;
  --line:#2b3850;
  --card:#192339;
  --side:#121b2e;
  --soft:#282746;
  --shadow:0 12px 35px rgba(0,0,0,.17);
  --text-secondary:#bcc8dd;
  --text-tertiary:#a0afca;
  --panel-tint:#242942;
  --table-line:#2b3850;
  --nav-hover:#212b42;
  --nav-active:#302d56;
  --focus-ring:rgba(172,162,255,.55);
}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink);}
html[data-theme="dark"] .sidebar{background:var(--side);border-right-color:var(--line);}
html[data-theme="dark"] .topbar{background:rgba(18,27,46,.9);border-bottom-color:var(--line);}
html[data-theme="dark"] .card{background:var(--card);border-color:var(--line);}
html[data-theme="dark"] .side-nav a{color:#bac6dd;}
html[data-theme="dark"] .side-nav a:hover{background:var(--nav-hover);color:#e1dcff;}
html[data-theme="dark"] .side-nav a.active{background:var(--nav-active);color:#d1caff;}
html[data-theme="dark"] .nav-pill{background:#42386e;color:#d9d2ff;}
html[data-theme="dark"] .side-label,html[data-theme="dark"] .sidebar-bottom span,
html[data-theme="dark"] .crumb-base,html[data-theme="dark"] .crumb-sep{color:#96a5be;}
html[data-theme="dark"] .identity small{color:#a5b3ca;}
html[data-theme="dark"] .sidebar-bottom p,html[data-theme="dark"] .top-mode,
html[data-theme="dark"] .crumb-here,html[data-theme="dark"] .icon-button{color:#c0cbe0;}
html[data-theme="dark"] .slogan-mark{color:#8e7ef0;}
html[data-theme="dark"] .mode-container{background:#0e1728;border-color:var(--line);}
html[data-theme="dark"] .mode-choice{color:#bbc6df;}
html[data-theme="dark"] .mode-choice.active{background:#343250;color:#d7ceff;box-shadow:none;}
html[data-theme="dark"] .offline-badge{background:#1a3c37;color:#9ce8c3;}
html[data-theme="dark"] .top-divider{background:var(--line);}
html[data-theme="dark"] .mini-avatar{background:#38325a;color:#d7ceff;}
html[data-theme="dark"] .footer{color:#9ba9c3;}
html[data-theme="dark"] .kicker{color:#b5adff;}
html[data-theme="dark"] .btn:not(.secondary):not(.ghost):not(.danger){background:#7770e8;color:#fff;}
html[data-theme="dark"] .btn:not(.secondary):not(.ghost):not(.danger):hover{background:#8e85ff;}
html[data-theme="dark"] .btn.secondary{background:#252f49;border-color:#435072;color:#dad5ff;}
html[data-theme="dark"] .btn.secondary:hover{background:#303455;}
html[data-theme="dark"] .btn.ghost{color:#c9c1ff;border-color:#534c7b;}
html[data-theme="dark"] .btn.ghost:hover{background:#302c51;}
html[data-theme="dark"] .btn.danger{background:#49293d;color:#ffc0cb;}
html[data-theme="dark"] .btn.danger:hover{background:#633047;}
html[data-theme="dark"] .hero{background:linear-gradient(115deg,#24264e 0%,#1d345b 64%,#2c2a55 100%);}
html[data-theme="dark"] .hero .btn{background:#fff;color:#4e47d3;}
html[data-theme="dark"] .hero .btn:hover{background:#eeebff;}
html[data-theme="dark"] .metric .metric-top,html[data-theme="dark"] .metric small,
html[data-theme="dark"] .phase-description span,html[data-theme="dark"] .phase-count,
html[data-theme="dark"] .course-no,html[data-theme="dark"] .course-card p,
html[data-theme="dark"] .course-end,html[data-theme="dark"] .dataset p,
html[data-theme="dark"] .task p,html[data-theme="dark"] .glossary-item p,
html[data-theme="dark"] .setting p,html[data-theme="dark"] .feature p,
html[data-theme="dark"] .source-list p,html[data-theme="dark"] .small-muted,
html[data-theme="dark"] .form-tip,html[data-theme="dark"] .result-heading,
html[data-theme="dark"] .result-description,html[data-theme="dark"] .method-extras strong,
html[data-theme="dark"] .method-extras p,html[data-theme="dark"] .field label,
html[data-theme="dark"] .action-card p,html[data-theme="dark"] .note-card p,
html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .empty,
html[data-theme="dark"] .note-row small,html[data-theme="dark"] .back-button{
  color:var(--text-secondary);
}
html[data-theme="dark"] .metric-top .tile-icon,html[data-theme="dark"] .action-icon,
html[data-theme="dark"] .phase-num,html[data-theme="dark"] .dataset-icon,
html[data-theme="dark"] .steps li:before,
html[data-theme="dark"] .lesson-block h2 .circle-index{
  background:#343153;color:#c6beff;
}
html[data-theme="dark"] .progress-track{background:#303a52;}
html[data-theme="dark"] .phase-row,html[data-theme="dark"] .course-end,
html[data-theme="dark"] .method-extras,html[data-theme="dark"] .task{
  border-color:var(--line);
}
html[data-theme="dark"] .note-card{background:linear-gradient(145deg,#242e3b,#1b263d);}
html[data-theme="dark"] .note-mark{background:#55482c;}
html[data-theme="dark"] .pill{background:#37325b;color:#d9d2ff;}
html[data-theme="dark"] .pill.green{background:#1f483e;color:#a9efcd;}
html[data-theme="dark"] .pill.yellow{background:#4d3b2d;color:#f0c886;}
html[data-theme="dark"] .pill.gray,html[data-theme="dark"] .status-pill{
  background:#2f3a50;color:#cad4e6;
}
html[data-theme="dark"] .searchbox,html[data-theme="dark"] .input,
html[data-theme="dark"] .select,html[data-theme="dark"] .textarea,
html[data-theme="dark"] .tab{background:#131d32;border-color:#39475f;color:#e7edf9;}
html[data-theme="dark"] .searchbox input{color:#e7edf9;}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#99a9c1;opacity:1;}
html[data-theme="dark"] .tab.active{background:#7770e8;color:white;border-color:#7770e8;}
html[data-theme="dark"] .course-card:hover,html[data-theme="dark"] .action-card:hover,
html[data-theme="dark"] .note-row:hover,html[data-theme="dark"] .source-list a:hover{border-color:#8e82f9;}
html[data-theme="dark"] .context-block{background:#252b46;border-color:#444370;color:#dce3f6;}
html[data-theme="dark"] .steps li,html[data-theme="dark"] .bullets{color:#d8e0f1;}
html[data-theme="dark"] .warning{background:#4b3c29;border-color:#6b5330;color:#ffe1a6;}
html[data-theme="dark"] .quiz-option{background:#192741;color:#d8e3f8;border-color:#344666;}
html[data-theme="dark"] .quiz-option b{background:#303d56;color:#d4e0f5;}
html[data-theme="dark"] .quiz-option.picked{background:#343156;border-color:#a79bff;}
html[data-theme="dark"] .quiz-option.correct{background:#1b4a40;border-color:#4fb990;}
html[data-theme="dark"] .quiz-feedback{background:#2b3152;color:#dcd9ff;}
html[data-theme="dark"] .codebox{background:#10192e;color:#d1defe;border:1px solid #344363;}
html[data-theme="dark"] .data-preview{border-color:var(--line);}
html[data-theme="dark"] .data-preview th{background:#293653;color:#e1e8fa;}
html[data-theme="dark"] .data-preview td,html[data-theme="dark"] .data-preview th{border-bottom-color:#37445e;}
html[data-theme="dark"] .task-answer{background:#302d52;color:#e5ddff;}
html[data-theme="dark"] .task details summary,html[data-theme="dark"] .source-list strong{color:#c3b9ff;}
html[data-theme="dark"] .note-row,html[data-theme="dark"] .source-list a{border-color:var(--line);}
html[data-theme="dark"] .separator{background:var(--line);}
html[data-theme="dark"] #toast{background:#d9d5ff;color:#17182d;}
html[data-theme="dark"] ::selection{background:#736bd7;color:#fff;}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition-duration:0.01ms!important;animation-duration:0.01ms!important;}
}

/* V1.1 mobile dataset fix: wide variable tables scroll inside their own panel. */
.lab-grid,.dataset{min-width:0;}
.data-preview{display:block;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;}
@media(max-width:740px){
  .lab-grid{grid-template-columns:minmax(0,1fr);}
  .dataset{width:100%;}
}

/* Contact and feedback entry */
.sidebar-contact{width:100%;display:flex;align-items:center;gap:10px;border:1px solid #e5e3fb;background:#f7f6ff;color:#505878;border-radius:12px;padding:11px 12px;margin:0 0 25px;text-align:left;transition:.18s;box-shadow:0 7px 20px rgba(73,66,163,.06)}.sidebar-contact span{letter-spacing:normal}
.sidebar-contact:hover{border-color:#bdb7fc;background:#efedff;transform:translateY(-1px)}
.contact-entry-icon{width:33px;height:33px;border-radius:9px;display:grid;place-items:center;background:#e8e5ff;color:#5f57dd;font-size:16px;flex-shrink:0}
.contact-entry-copy{min-width:0;flex:1}.contact-entry-copy strong{display:block;color:var(--ink);font-size:14px;line-height:1.35}.contact-entry-copy small{display:block;color:#929caf;font-size:11.5px;line-height:1.45;margin-top:2px}.contact-entry-arrow{color:#8c94a8;font-size:22px;line-height:1}
body.modal-open{overflow:hidden}.contact-layer[hidden]{display:none}.contact-layer{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:22px}.contact-backdrop{position:absolute;inset:0;border:0;background:rgba(20,23,45,.55);backdrop-filter:blur(4px)}
.contact-card{position:relative;width:min(500px,100%);background:var(--card);border:1px solid var(--line);border-radius:20px;box-shadow:0 24px 80px rgba(16,20,48,.25);padding:27px;color:var(--ink)}
.contact-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.contact-card-head h2{margin:4px 0 0;font-size:24px}.contact-close{width:38px;height:38px;border-radius:10px;border:1px solid var(--line);background:var(--white);color:var(--muted);font-size:25px;line-height:1;display:grid;place-items:center}.contact-close:hover{background:var(--soft);color:var(--ink)}
.contact-intro{color:var(--muted);font-size:14.5px;line-height:1.8;margin:14px 0 19px}.contact-item{border:1px solid var(--line);background:var(--white);border-radius:13px;padding:14px;margin-top:11px}.contact-item-label{font-size:12px;color:var(--text-tertiary);font-weight:800;letter-spacing:.5px;margin-bottom:7px}.contact-item-actions{display:flex;align-items:center;gap:8px}.contact-copy{min-width:0;flex:1;display:flex;align-items:center;justify-content:space-between;gap:12px;border:0;background:transparent;color:var(--ink);padding:4px 2px;text-align:left}.contact-copy span{font-size:14.5px;overflow-wrap:anywhere}.contact-copy b{color:var(--accent);font-size:12px;white-space:nowrap}.contact-copy:hover span{color:var(--accent)}.contact-mail{font-size:12px;font-weight:800;color:var(--accent);white-space:nowrap;padding:6px 8px;border-left:1px solid var(--line)}.contact-note{font-size:12px;color:var(--text-tertiary);line-height:1.7;margin:15px 2px 0}
html[data-theme="dark"] .sidebar-contact{background:#1b2740;border-color:#34415c;color:#c6d0e2;box-shadow:none}html[data-theme="dark"] .sidebar-contact:hover{background:#252d4b;border-color:#766ced}html[data-theme="dark"] .contact-entry-icon{background:#353058;color:#cec7ff}html[data-theme="dark"] .contact-entry-copy small{color:#a3b0c8}html[data-theme="dark"] .contact-backdrop{background:rgba(3,7,17,.7)}html[data-theme="dark"] .contact-item{background:#131d32}html[data-theme="dark"] .contact-close{background:#131d32}
@media(max-width:740px){.sidebar-contact{margin-bottom:22px}.contact-layer{place-items:end center;padding:12px}.contact-card{width:100%;max-height:calc(100vh - 24px);overflow:auto;border-radius:18px;padding:23px 19px}.contact-item-actions{align-items:stretch}.contact-copy span{font-size:14px}.contact-mail{display:flex;align-items:center}}
