:root{color-scheme:dark;--bg:#101513;--surface:#18201d;--surface2:#202b25;--text:#e9f1eb;--muted:#96aa9e;--line:#2c3b32;--accent:#a8efb9;--ink:#112317;--bad:#ffc1a8;--shadow:0 20px 70px #0005}html.light{color-scheme:light;--bg:#f4f7f3;--surface:#fff;--surface2:#e8f0e9;--text:#1b2c21;--muted:#58695f;--line:#d6e0d8;--accent:#b1ebbb;--ink:#123b21;--bad:#a64224;--shadow:0 20px 70px #38543b20}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.6 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100vh}button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit;background:var(--surface2);border:1px solid var(--line);border-radius:12px;padding:10px 15px;transition:background .18s,transform .18s,border .18s}button:hover{border-color:var(--muted);transform:translateY(-1px)}button:active{transform:scale(.97)}button:disabled{opacity:.5;cursor:wait}a{color:var(--accent);text-decoration:none}.light a{color:#246f3c}header{height:74px;padding:0 max(22px,env(safe-area-inset-left));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--bg);z-index:5}#brand{display:flex;align-items:center;gap:12px;color:var(--text);font-weight:750;font-size:19px}.brandicon{width:37px;height:37px;border-radius:12px;display:grid;place-items:center;background:var(--accent);color:var(--ink);font-size:23px}.headright{display:flex;gap:8px}.quiet{background:transparent;padding:7px 11px}.hidden{display:none!important}main{max-width:1000px;margin:0 auto;padding:42px 25px 120px}.view{animation:appear .32s ease both}@keyframes appear{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}h1,h2,h3,p{margin:0}h1{font-size:clamp(29px,5vw,47px);letter-spacing:-.045em;line-height:1.13;font-weight:720}h2{font-size:25px;line-height:1.3;letter-spacing:-.025em}h3{font-size:18px;line-height:1.4}p{margin-top:10px}.muted,small{color:var(--muted)}small{font-size:13px}.eyebrow{letter-spacing:.13em;text-transform:uppercase;font-size:11px;font-weight:800;color:var(--muted);margin-bottom:13px}.hero{padding:10px 0 26px}.hero p{max-width:620px}.card{background:var(--surface);border:1px solid var(--line);border-radius:19px;padding:23px;margin-top:15px}.progresscard{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 30px}.big{font-size:36px;font-weight:750;line-height:1.1;letter-spacing:-.05em}.bar{height:7px;width:100%;border-radius:8px;background:var(--line);overflow:hidden;margin:12px 0 4px}.bar span{display:block;height:100%;background:#76c58d;border-radius:8px;transition:width .5s ease}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:15px 0}.topic{text-align:left;display:flex;flex-direction:column;justify-content:space-between;min-height:164px;margin:0;padding:20px;border-radius:18px;background:var(--surface);width:100%;gap:16px}.topic:hover{background:var(--surface2)}.topicline{display:flex;align-items:center;justify-content:space-between;gap:12px}.num{font-size:14px;color:var(--muted);font-weight:700;letter-spacing:.08em}.primary{background:var(--accent);color:var(--ink);border-color:transparent;font-weight:720}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.spread{justify-content:space-between}.sectionhead{margin:26px 0 12px}.lessonrow{display:flex;align-items:center;justify-content:space-between;text-align:left;width:100%;padding:17px 18px;margin:9px 0;background:var(--surface)}.lessonrow span:first-child{display:flex;gap:10px;align-items:center}.badge{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;border-radius:8px;background:var(--surface2);font-size:12px;color:var(--muted)}.good{color:#76c58d}.bad{color:var(--bad)}.crumb{color:var(--muted);font-size:14px;margin-bottom:20px;display:inline-block}.theory{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85}.formula{font-size:clamp(18px,3vw,23px);line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;font-variant-numeric:lining-nums;margin:12px 0}.example{background:var(--surface2);border-radius:12px;padding:16px;margin-top:10px;white-space:pre-wrap}.task .formula{margin:14px 0}.field{width:100%;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:13px;outline:none}.field:focus,textarea:focus{border-color:#76c58d}.symbols{display:flex;gap:5px;flex-wrap:wrap;margin:8px 0 14px}.symbols button{padding:4px 11px;min-width:34px}.result{margin-top:12px;padding:12px;border-radius:10px;background:var(--surface2);overflow-wrap:anywhere}.checkrow{display:flex;gap:12px;align-items:flex-start;margin:11px 0}.checkrow input{accent-color:#76c58d;width:20px;height:20px;flex-shrink:0}.fab{position:fixed;right:max(22px,env(safe-area-inset-right));bottom:max(24px,env(safe-area-inset-bottom));width:76px;height:76px;border-radius:25px;display:grid;place-items:center;background:var(--accent);color:var(--ink);box-shadow:var(--shadow);border:0;z-index:10;animation:appear .4s ease}.fab svg{width:35px;height:35px}.chat{position:fixed;bottom:112px;right:22px;width:min(420px,calc(100vw - 44px));height:min(590px,calc(100dvh - 135px));border:1px solid var(--line);border-radius:22px;background:var(--surface);box-shadow:var(--shadow);display:flex;flex-direction:column;z-index:20;overflow:hidden;animation:appear .25s ease}.chathead{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:16px;border-bottom:1px solid var(--line)}.chathead small{display:block}.messages{overflow:auto;flex:1;padding:15px;display:flex;flex-direction:column;gap:10px}.bubble{max-width:90%;padding:12px 14px;border-radius:15px;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--surface2);font-size:14px;animation:appear .2s ease}.bubble.user{align-self:flex-end;background:var(--accent);color:var(--ink)}#chatForm{display:flex;padding:12px;gap:8px;border-top:1px solid var(--line)}#chatInput{flex:1;min-width:0;resize:none;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:10px;outline:none}#toast{position:fixed;bottom:22px;left:22px;background:var(--surface2);border-radius:12px;padding:12px;max-width:70vw;z-index:30;opacity:0;pointer-events:none;transition:opacity .2s}#toast.show{opacity:1}.login{max-width:520px;margin:8vh auto;text-align:center;padding:35px}.login .brandicon{margin:0 auto 23px;width:62px;height:62px;font-size:36px}.loginbox{display:grid;place-items:center;min-height:75px;margin:20px 0}.loading{text-align:center;color:var(--muted);padding:40px}.adminrow{display:grid;grid-template-columns:1fr auto;gap:10px}.numberline{margin:20px 0;padding:14px;background:var(--surface2);border-radius:12px}.numberline svg{width:100%;height:auto}.numberline input{width:100%;accent-color:#76c58d}.video{display:block;padding:10px 0;color:var(--text)}@media(max-width:600px){header{height:64px;padding:0 15px}main{padding:28px 16px 110px}.grid{grid-template-columns:1fr}.topic{min-height:124px}.card{padding:17px}.fab{right:15px;bottom:18px;width:70px;height:70px}.chat{right:10px;bottom:100px;width:calc(100vw - 20px);height:min(570px,calc(100dvh - 115px))}.progresscard{align-items:flex-start}.login{padding:22px;margin-top:7vh}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
