:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#183047;background:#f2f5f7;line-height:1.5;font-synthesis:none;--ink:#122c43;--teal:#08766d;--line:#dce5eb}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;min-height:42px}button:focus-visible,input:focus-visible{outline:3px solid #e6a747;outline-offset:3px}button:disabled{opacity:.5;cursor:default}[hidden]{display:none!important}.top{background:var(--ink);color:white;padding:13px max(22px,calc((100vw - 1180px)/2));display:flex;justify-content:space-between;align-items:center;gap:12px}.brand{display:flex;align-items:center;gap:12px}.brand img{border-radius:12px}.brand strong{font-size:19px;display:block;letter-spacing:-.4px}.brand span{font-size:10px;letter-spacing:1.4px;color:#a6c9d2;display:block}.install{color:white;border:1px solid #7892a3;background:transparent;border-radius:8px;padding:7px 15px;font-size:13px;font-weight:600}.shell{max-width:1224px;margin:0 auto;padding:25px 22px 35px}.hero{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:29px 32px;background:#fff;border:1px solid var(--line);border-radius:17px;margin-bottom:24px;box-shadow:0 3px 14px #16304606}.eyebrow,.section-label{font-size:11px;font-weight:750;letter-spacing:1.35px;color:var(--teal)}h1,h2,h3,h4,p{margin:0}h1{font-size:clamp(26px,3vw,40px);letter-spacing:-1.5px;line-height:1.13;margin:9px 0 8px}.hero p,.chapter-heading p{color:#607586}.hero-stats{display:flex;gap:20px;flex-shrink:0}.hero-stats div{min-width:66px;border-left:1px solid var(--line);padding-left:15px}.hero-stats b{font-size:24px;display:block;line-height:1.25;font-variant-numeric:tabular-nums}.hero-stats span{display:block;font-size:11px;color:#607586;white-space:nowrap}.workspace{display:grid;grid-template-columns:255px minmax(0,1fr);gap:24px;align-items:start}.sidebar,.content{min-width:0}.sidebar{background:white;border:1px solid var(--line);padding:18px 13px;border-radius:14px}.section-label{padding:0 10px 12px;color:#607586}.chapter{width:100%;display:flex;text-align:left;align-items:center;gap:11px;padding:11px 9px;background:white;border:1px solid transparent;border-radius:9px;color:var(--ink);margin:3px 0}.chapter.active{background:#e6f3ef;border-color:#c2e2d9;color:#075f57}.chapter .symbol{width:33px;height:33px;display:grid;place-items:center;flex-shrink:0;background:#edf2f5;border-radius:7px;font-size:19px;font-weight:700}.chapter.active .symbol{background:#cce6dd}.chapter b{display:block;font-size:13px;line-height:1.3}.chapter small{font-size:11px;color:#627885;display:block;margin-top:3px}.aside-note{border-top:1px solid var(--line);padding:17px 10px 0;margin-top:18px;font-size:12px;color:#607586}.aside-note b{color:var(--ink)}.aside-note p{margin-top:5px}.chapter-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 16px}.chapter-heading h2{font-size:27px;letter-spacing:-.7px;margin:3px 0}.chapter-heading p{font-size:14px}.gravity{font-size:12px;text-align:right;white-space:nowrap;color:#607586}.gravity small{font-size:10px}.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.filters button{border:1px solid var(--line);background:white;color:#40596b;border-radius:7px;padding:7px 12px;font-size:13px;font-weight:600}.filters button.active{background:var(--ink);color:white;border-color:var(--ink)}.exercise-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:8px;margin-bottom:16px}.exercise{border:1px solid var(--line);background:white;color:var(--ink);text-align:left;border-radius:9px;padding:10px;min-height:75px}.exercise.active{border-color:var(--teal);box-shadow:inset 0 0 0 1px var(--teal);background:#f0faf6}.exercise small{display:block;color:#607586;font-size:10px;letter-spacing:.4px}.exercise b{display:block;font-size:12px;line-height:1.3;margin-top:5px}.question-card{background:white;border:1px solid var(--line);border-radius:15px;padding:25px;box-shadow:0 4px 20px #16304609}.question-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.level{border-radius:6px;background:#edf2f5;color:#506777;padding:4px 8px;font-size:11px;font-weight:650}.question-card h3{font-size:23px;letter-spacing:-.5px;margin:12px 0 9px}.prompt{font-size:17px;line-height:1.65;margin-bottom:20px}.field-label{display:block;font-size:13px;font-weight:700;margin-bottom:6px}.numeric-row{display:flex;align-items:center;gap:12px;max-width:390px}.numeric-row input{width:100%;min-width:0;border:1px solid #9eb3bf;border-radius:8px;padding:12px;color:var(--ink);background:#fcfdfe;font-size:17px}.unit{white-space:nowrap;font-weight:600;color:#526b7b}.choices{display:grid;gap:8px}.choice{display:flex;gap:10px;align-items:center;border:1px solid var(--line);border-radius:8px;padding:11px 12px;cursor:pointer}.choice:has(input:checked){border-color:var(--teal);background:#eef9f4}.choice input{accent-color:var(--teal);flex-shrink:0;width:17px;height:17px}.action-row,.question-footer{display:flex;gap:9px;flex-wrap:wrap;margin-top:18px}.primary,.secondary,.next{border-radius:8px;font-weight:650;padding:10px 15px;border:1px solid transparent;font-size:14px}.primary{background:var(--teal);color:white}.primary:hover{background:#075e57}.secondary{background:white;border-color:#c8d5dc;color:#29475a}.secondary:hover{background:#f0f5f7}.next{background:transparent;color:var(--teal);margin-left:auto}.question-footer{border-top:1px solid var(--line);padding-top:16px;margin-top:23px;justify-content:space-between}.reveal,#feedback{border-radius:8px;padding:14px 16px;margin-top:14px;background:#f1f6f9;border-left:3px solid #8baabc}.reveal h4{font-size:14px;margin-bottom:7px}.reveal p{font-size:14px}.solution ol{margin:0;padding-left:24px}.solution li{padding:6px 0;font-family:ui-monospace,"SFMono-Regular",Consolas,monospace;font-size:15px;overflow-wrap:anywhere}.solution li:last-child{font-weight:700;color:#075f57}#feedback.good{background:#e9f6ee;color:#17623e;border-color:#258453}#feedback.bad{background:#fff2eb;color:#9c3e24;border-color:#c96e48}.fineprint{font-size:12px;color:#657b89;margin:13px 3px}footer{max-width:1224px;padding:0 22px 22px;margin:auto;display:flex;justify-content:space-between;gap:10px;color:#657b89;font-size:11px}dialog{max-width:420px;width:calc(100% - 32px);border:1px solid var(--line);border-radius:15px;padding:24px;color:var(--ink)}dialog p{margin:12px 0}dialog::backdrop{background:#102b4380}@media(max-width:850px){.hero{flex-wrap:wrap;gap:18px}.workspace{grid-template-columns:200px minmax(0,1fr);gap:15px}.shell{padding:18px 15px}.question-card{padding:19px}}@media(max-width:620px){.top{padding:10px 15px}.hero{padding:19px;margin-bottom:15px}.hero-stats{gap:12px;width:100%;justify-content:space-between}.hero-stats div{padding-left:9px}.hero-stats b{font-size:21px}.workspace{display:block}.sidebar{padding:12px;margin-bottom:18px}.sidebar nav{display:grid;grid-template-columns:1fr 1fr;gap:5px}.chapter{margin:0;padding:7px 5px;gap:6px}.chapter .symbol{width:28px;height:28px;font-size:15px}.chapter b{font-size:12px}.chapter small{display:none}.aside-note{display:none}.chapter-heading h2{font-size:23px}.gravity{font-size:10px}.exercise-list{grid-template-columns:repeat(2,minmax(0,1fr))}.exercise{min-height:60px}.question-card{padding:16px}.prompt{font-size:16px}.question-card h3{font-size:21px}.action-row{gap:7px}.primary,.secondary,.next{padding:9px 11px;font-size:13px}.question-footer{gap:5px}footer{flex-direction:column;padding:0 15px 20px}}@media(prefers-reduced-motion:no-preference){button{transition:background .15s,border-color .15s}}
/* V2: database-powered course and private editor */
.top-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.top-actions a{text-decoration:none;display:inline-flex;align-items:center;min-height:42px}.preserve{white-space:pre-wrap;overflow-wrap:anywhere}.diagram{display:block;max-width:100%;max-height:380px;object-fit:contain;margin:0 auto 20px}.notice{padding:12px 16px;border:1px solid #dce5eb;background:white;border-radius:9px;color:#526b7b;margin-bottom:14px}.notice.ok{color:#08675b;background:#edf9f2}.notice.error{color:#a5292b;background:#fff1f1}.login-panel{max-width:500px;margin:auto}.editor{display:grid;gap:14px;margin-top:16px}.editor label{font-size:13px;font-weight:650;display:grid;gap:5px;min-width:0}.editor input,.editor textarea,.editor select{font:inherit;font-weight:400;color:var(--ink);width:100%;border:1px solid #a8bbc6;background:#fcfdfe;border-radius:7px;padding:10px;min-width:0}.editor textarea{resize:vertical}.editor input:focus,.editor select:focus,.editor textarea:focus{outline:2px solid #08766d;outline-offset:1px}.admin-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:20px;align-items:start}.admin-grid .question-card{min-width:0}.editor-card{margin-top:22px}.fields-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.record-list{display:grid;gap:8px;margin-top:15px}.record{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding:10px 0}.record-text{min-width:0;overflow-wrap:anywhere}.record-text small{display:block;color:#607586}.record-actions{display:flex;gap:4px;flex-wrap:wrap}.record-actions button{font-size:12px;padding:5px 9px;min-height:34px}.param-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:8px;align-items:end}.param-row button{font-size:12px}.editor pre{font:inherit}.admin-summary h2{margin-bottom:4px}#refresh{margin-bottom:16px}#mc-fields,#random-fields{display:grid;gap:12px;padding:13px;border:1px solid var(--line);border-radius:8px}#preview-text{font:inherit}.editor-card h2{overflow-wrap:anywhere}@media(max-width:700px){.admin-grid,.fields-two{grid-template-columns:1fr}.param-row{grid-template-columns:repeat(2,minmax(0,1fr))}.top-actions .install{font-size:11px;padding:6px 9px}.admin-summary{align-items:flex-start}.record-actions{width:100%}}

/* V2.3 mathematical authoring */
.math-help{background:#e8f5f3;color:#153c41;padding:12px 14px;border-radius:8px;font-size:.9rem;line-height:1.6}.math-help code{overflow-wrap:anywhere}.math-editor{display:grid;gap:8px;margin-top:-7px;margin-bottom:6px}.math-toolbar{display:flex;flex-wrap:wrap;gap:5px}.math-toolbar button.secondary{font-size:.75rem;padding:6px 9px;min-height:30px}.math-live{border:1px solid #d4e0e6;border-radius:8px;background:#f7fafb;padding:8px 12px}.math-live summary{cursor:pointer;font-weight:650;font-size:.8rem;color:#476474}.math-live-body{min-height:26px;margin-top:8px;line-height:1.65;overflow-x:auto;color:#16364b;font-size:.95rem}.math-content{white-space:pre-wrap;overflow-wrap:anywhere}.math-display{display:block;overflow-x:auto;max-width:100%;padding:3px 0;white-space:normal}.math-inline{display:inline;white-space:normal}.math-content mjx-container{max-width:100%;}.math-content mjx-container svg{max-width:none}.math-invalid{color:#a23125}.math-content[data-math-error]::after{content:attr(data-math-error);display:block;color:#a23125;font-size:.8rem;margin-top:4px}.choice .math-content{min-width:0}.math-display mjx-container[display="true"]{margin:.5em 0!important}.math-content svg{vertical-align:middle}

/* Keep MathJax's accessible MathML available to assistive technology, but visually hidden. */
.math-content mjx-assistive-mml { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; clip-path:inset(50%) !important; white-space:nowrap !important; border:0 !important; }
