*{box-sizing:border-box}html,body{margin:0;height:100%;min-height:460px;background:#f7f9fc;color:#19334f;font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #4485d0;outline-offset:2px}[hidden]{display:none!important}.shell{display:flex;flex-direction:column;height:100dvh;min-height:480px}.header{height:68px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #e4eaf1;padding:0 25px;gap:16px;box-shadow:0 1px 7px #17365408;z-index:10}.brand{display:flex;gap:11px;align-items:center;min-width:190px}.brand-symbol{height:39px;width:39px;background:#193d62;color:white;border-radius:12px;display:grid;place-items:center;font-size:23px;font-weight:800;font-family:Georgia,serif}.brand strong{display:block;font-size:15px;letter-spacing:.04em}.brand small{display:block;color:#8a99ab;font-size:10px;margin-top:3px}.version{color:#397db6;margin-left:5px}.header-subtitle{color:#8194a8;font-size:12px;letter-spacing:.02em}.header-actions{display:flex;align-items:center;gap:11px;white-space:nowrap}.saved-label{color:#96a6b4;font-size:11px}.soft-button,.primary-light{border-radius:9px;padding:9px 12px;background:#fff;color:#546c84;border:1px solid #dce5ee;font-size:12px;font-weight:600}.soft-button:hover,.primary-light:hover{background:#f4f8fb}.primary-light{background:#183c62;border-color:#183c62;color:white}.primary-light:hover{background:#255477;color:white}.workspace{flex:1;min-height:0;display:flex}.editor-panel{width:358px;max-width:47vw;flex:0 0 358px;overflow-y:auto;background:#fff;border-right:1px solid #e1e9f0;scrollbar-width:thin;display:flex;flex-direction:column;padding-bottom:18px;z-index:3}.editor-head{padding:23px 21px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.editor-head h1{font-size:20px;line-height:1;margin:0;color:#193a5c}.editor-head p{font-size:11px;color:#8293a4;line-height:1.65;margin:9px 0 0}.count-pill{border-radius:40px;padding:6px 10px;background:#eaf2fb;color:#3474a8;font-size:10px;white-space:nowrap}.add-section{padding:0 21px 21px;border-bottom:1px solid #ecf0f5}.section-row,.group-title{display:flex;align-items:center;justify-content:space-between;gap:9px}.section-row strong,.group-title span:first-child{font-size:12px;color:#304d6a}.section-row span,.group-title span:last-child{font-size:10px;color:#97a6b4}.preset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:11px}.preset-grid button{min-height:37px;padding:7px 4px;border-radius:8px;border:1px solid #dce7f1;background:#f8fafc;color:#456580;font-size:11px}.preset-grid button:hover{border-color:#7db3db;background:#eff7ff;color:#1d5d90}.add-custom{width:100%;height:38px;margin-top:9px;border-radius:9px;border:1px dashed #9cbad5;background:#f4f9fc;color:#245c89;text-align:center;font-size:12px;font-weight:700}.add-custom span{font-size:17px;margin-right:5px}.group-title{padding:17px 21px 9px}.curve-list{padding:0 14px;display:flex;flex-direction:column;gap:10px}.curve-card{border:1px solid #dfe7ef;background:#fff;border-radius:13px;box-shadow:0 2px 9px #142e4410;overflow:hidden}.curve-card.selected{border-color:#a8c8e4;box-shadow:0 3px 14px #356da419}.curve-top{display:flex;align-items:center;gap:9px;padding:13px 12px 8px}.curve-dot{width:12px;height:12px;display:block;flex-shrink:0;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #cedce8}.curve-title{font-size:12px;font-weight:800;color:#304c65;min-width:0;flex:1}.curve-action{height:28px;min-width:28px;padding:0 6px;background:#fff;color:#8194a7;border:1px solid #e5ebf1;border-radius:7px;font-size:13px}.curve-action:hover{color:#215d91;background:#f4f8fc}.curve-action.delete:hover{color:#b34c4c}.curve-action.muted{opacity:.4}.curve-field{display:flex;align-items:center;gap:8px;margin:2px 12px 8px}.curve-field label{font-size:12px;font-weight:700;color:#628099;white-space:nowrap}.curve-field input{min-width:0;flex:1;height:39px;padding:8px 10px;border-radius:8px;border:1px solid #dce6f0;background:#f8fbfe;color:#173b5f;font-size:16px;font-family:"Cambria Math","Times New Roman",monospace}.curve-field input:focus{background:white}.curve-error{color:#c14d4d;font-size:10px;margin:0 12px 8px;line-height:1.5}.curve-edit{padding:2px 12px 12px}.curve-params{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:5px 0 10px}.curve-params label{font-size:11px;color:#718498;display:grid;gap:5px}.curve-params input{width:100%;height:33px;border-radius:7px;border:1px solid #dce6ed;background:#fff;padding:5px 7px;color:#263f57;font-variant-numeric:tabular-nums;font-size:12px}.curve-range-panel{padding:9px 10px;background:#f6f9fc;border-radius:9px;border:1px solid #e8eef4}.curve-range-panel .curve-check{display:flex;align-items:center;gap:7px;font-size:11px;color:#557189;font-weight:650}.curve-interval-fields{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}.curve-interval-fields label{font-size:10px;color:#73879a;display:grid;gap:4px}.curve-interval-fields input{min-width:0;width:100%;height:32px;border:1px solid #d6e2ec;border-radius:7px;background:white;padding:4px 7px}.curve-features{padding:9px 0 0;display:flex;gap:5px;flex-wrap:wrap}.feature-pill{padding:5px 7px;font-size:10px;background:#f4f7fa;color:#567086;border-radius:6px}.feature-pill strong{color:#254863}.curve-help{line-height:1.55;font-size:10px;color:#93a1ae;margin:8px 0 0}.curve-card:not(.selected) .curve-edit{display:none}.import-area{padding:16px 20px;margin-top:2px}.import-toggle{border:1px solid #dde8f1;border-radius:9px;background:#f8fbfe;color:#356583;width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:11px 12px;font-size:11px;font-weight:700}#import-content{padding:10px 0}#question-search{height:34px;border:1px solid #dae5f0;border-radius:8px;padding:6px 9px;width:100%;font-size:11px}.question-list{max-height:240px;overflow:auto;margin-top:7px}.question-item{display:block;text-align:left;width:100%;padding:9px;border-radius:7px;border:0;background:white;color:#506b84;font-size:11px;line-height:1.6}.question-item:hover{background:#eef6fd}.question-item b{color:#256899}.sidebar-hint{font-size:10px;line-height:1.8;color:#93a3b4;margin:auto 22px 0;padding:17px 0 0}.sidebar-hint code{color:#557da5}.graph-area{min-width:0;min-height:0;flex:1;display:flex;flex-direction:column;position:relative;background:#f8fafc}.graph-toolbar{min-height:64px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border-bottom:1px solid #e4eaf0;padding:0 20px}.view-menu{display:flex;align-items:center;gap:15px}.tool-title{font-size:14px;font-weight:800;color:#254563;white-space:nowrap}#view-status{font-size:10px;color:#9aabba}.graph-actions{display:flex;gap:7px;align-items:center}.graph-actions button{height:34px;min-width:35px;padding:0 11px;background:#fff;color:#496782;border:1px solid #dde7ef;border-radius:8px;font-weight:650;font-size:11px;white-space:nowrap}.graph-actions button:hover{background:#edf5fa}.graph-actions .toolbar-strong{background:#eef5fb;color:#276392;border-color:#cee1ef}.plot-wrap{flex:1;position:relative;overflow:hidden;min-height:240px;background:#fff}.plot-wrap canvas{width:100%;height:100%;display:block;touch-action:none;cursor:grab}.plot-wrap canvas:active{cursor:grabbing}.plot-hint{position:absolute;left:20px;top:17px;color:#a6b5c4;font-size:11px;pointer-events:none}.plot-legend{position:absolute;left:20px;bottom:55px;display:flex;flex-wrap:wrap;gap:10px;pointer-events:none;max-width:calc(100% - 30px)}.legend-item{font-size:11px;display:flex;align-items:center;gap:6px;color:#52677b;background:#ffffffd9;border:1px solid #e7ecf2;padding:5px 8px;border-radius:7px}.legend-line{width:18px;border-top:3px solid var(--c)}.plot-bottom{position:absolute;bottom:10px;left:18px;right:18px;display:flex;align-items:center;gap:12px;color:#607d96;justify-content:flex-end;pointer-events:none}.cursor-coordinate{font-size:11px;margin-right:auto;font-variant-numeric:tabular-nums;color:#68839c;background:#ffffffce;border-radius:6px;padding:5px 9px}.toggle-chip{background:#ffffffdd;border:1px solid #e5ebf1;border-radius:7px;padding:5px 8px;font-size:10px;pointer-events:auto;white-space:nowrap}.toggle-chip input{accent-color:#2467a3;vertical-align:-2px}.statusline{height:39px;flex-shrink:0;border-top:1px solid #e9eef2;padding:12px 20px;color:#8aa0b2;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#fcfdff}.bounds-panel{position:absolute;right:19px;top:76px;width:min(435px,calc(100% - 28px));z-index:20;background:#fff;border:1px solid #d7e4ef;border-radius:12px;padding:16px;box-shadow:0 18px 50px #112c4566}.bounds-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.bounds-title strong{font-size:13px}.bounds-title button{border:0;background:transparent;font-size:24px;color:#8596a5}.bounds-inputs{display:grid;grid-template-columns:1fr 1fr;gap:10px}.bounds-inputs label{display:grid;gap:5px;font-size:11px;color:#6f8396}.bounds-inputs input{min-width:0;height:36px;border:1px solid #d5e2ef;border-radius:7px;padding:7px 9px;color:#29455f}.bounds-footer{margin-top:13px;display:flex;align-items:center;justify-content:space-between}.bounds-footer label{font-size:11px;color:#687f93}.apply-button{border:0;background:#1b577e;color:#fff;border-radius:7px;padding:9px 13px;font-size:11px;font-weight:700}#bounds-error{margin:9px 0 0;color:#b4504b;font-size:11px}.point-tooltip{position:absolute;pointer-events:none;z-index:7;background:#173b5de9;color:white;border-radius:8px;padding:8px 11px;font-size:11px;white-space:nowrap;box-shadow:0 6px 15px #19334940}@media(min-width:1440px){.editor-panel{width:380px;flex-basis:380px}.graph-toolbar{min-height:69px}.curve-list{gap:12px}}@media(max-width:850px){.header{height:60px;padding:0 15px}.header-subtitle,.saved-label{display:none}.editor-panel{width:300px;flex-basis:300px}.editor-head{padding:19px 13px 16px}.add-section{padding:0 13px 15px}.curve-list{padding:0 9px}.group-title{padding-left:13px;padding-right:13px}.preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.graph-toolbar{padding:0 10px}.view-menu #view-status{display:none}}@media(max-width:650px){.header{height:57px;padding:0 12px}.brand{min-width:0}.brand strong{font-size:12px}.brand small{font-size:9px}.brand-symbol{height:34px;width:34px}.soft-button{display:none}.header-actions{gap:6px}.primary-light{font-size:10px;padding:8px}.workspace{position:relative}.editor-panel{position:absolute;left:0;top:0;bottom:0;width:min(87vw,340px);max-width:none;flex-basis:auto;z-index:9;box-shadow:8px 0 28px #243e5d26}.shell.panel-hidden .editor-panel{transform:translateX(-110%);pointer-events:none}.graph-area{width:100%}.graph-toolbar{min-height:58px;flex-wrap:wrap;padding:9px 10px;gap:4px}.tool-title{font-size:12px}.graph-actions{gap:4px}.graph-actions button{padding:0 7px;font-size:10px;min-width:28px;height:32px}.plot-hint{font-size:10px;left:10px;top:12px}.plot-legend{left:10px;bottom:51px;gap:4px}.legend-item{font-size:10px;padding:3px 5px}.statusline{font-size:10px;padding:12px}.toggle-chip{font-size:9px;padding:4px 6px}.plot-bottom{left:8px;right:8px;gap:4px}}
.shell.panel-hidden .editor-panel{display:none}

/* V0.6 compact in-workspace teaching drawer; no extra windows */
#study-compact-toggle{background:#e9f5ef;border-color:#b5dcc8;color:#216d55}
.study-drawer{position:absolute;right:14px;top:75px;bottom:50px;width:min(405px,calc(100% - 28px));z-index:18;border:1px solid #d2e2ed;border-radius:13px;background:#fff;box-shadow:0 15px 45px #1a3a5870;display:flex;flex-direction:column;overflow:hidden}
.study-header{padding:17px 18px 13px;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #edf1f5;background:#fafcfe}
.study-header strong{font-size:16px;color:#1e4466}
.study-header p{margin:4px 0 0;font-size:11px;color:#8a9caf}
.study-header button{border:0;background:transparent;font-size:24px;color:#8b9fb0}
.study-tabs{display:flex;gap:7px;padding:10px 14px;border-bottom:1px solid #e8eff5}
.study-tabs button{flex:1;border:1px solid #e1eaf1;background:#f7fafc;color:#668095;padding:9px 4px;border-radius:8px;font-size:12px}
.study-tabs button.active{background:#215b86;border-color:#215b86;color:#fff;font-weight:700}
.study-content{padding:15px 16px;overflow:auto;min-height:0;flex:1;scrollbar-width:thin}
.study-toolbar{display:flex;justify-content:space-between;gap:8px;align-items:center;color:#8293a4;font-size:11px;margin-bottom:12px}
.study-toolbar button{padding:6px 9px;background:#f2f8fc;border:1px solid #deebf4;color:#2d6188;border-radius:7px;font-size:11px}
#study-question-select,.intersection-selectors select{height:40px;width:100%;border-radius:8px;border:1px solid #d5e4ee;padding:7px;background:white;color:#244967;font-size:12px}
.study-question-heading{display:flex;justify-content:space-between;gap:8px;padding:15px 0 5px;font-size:11px;color:#517493}
.study-question-heading strong{color:#1d5a87}
.study-question-text{font-size:15px;font-weight:750;line-height:1.85;color:#1e425f;margin:7px 0 14px}
.question-options{display:grid;gap:9px}
.question-options label{display:flex;align-items:flex-start;gap:9px;padding:10px;border:1px solid #e0e9f0;border-radius:8px;color:#385877;font-size:12px;line-height:1.65;cursor:pointer}
.question-options label:has(input:checked){border-color:#81b3d2;background:#f1f8ff}
.question-options input{accent-color:#2766a2;margin-top:4px}
.study-question-actions{display:flex;gap:8px;margin-top:15px}
.study-question-actions button{flex:1}
.study-guidance{font-size:11px;color:#91a0ae;line-height:1.8;margin:13px 0 0}
.study-feedback{margin-top:12px;border-radius:9px;padding:11px;font-size:12px;line-height:1.8}
.study-feedback p{margin:5px 0 0}
.study-feedback.correct{background:#e8f6ee;color:#2c7253}
.study-feedback.incorrect{background:#fff3ea;color:#98613a}
#study-free-answer{width:100%;height:38px;border:1px solid #d4e0ed;border-radius:7px;padding:8px}
.study-formula-series{display:flex;flex-direction:column;gap:8px;margin-bottom:13px;padding:13px;border:1px solid #dceaf4;border-radius:9px;background:#f7fbfe;overflow-wrap:anywhere}
.study-formula-series strong{font-size:13px;color:#2c5478}
.study-formula-series span{font-size:13px;font-family:"Times New Roman",serif;color:#415f7d}
.formula-detail{border:1px solid #e2eaf1;border-radius:9px;margin:8px 0;background:white;overflow:hidden}
.formula-detail summary{padding:12px;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:#2b5376}
.formula-detail summary b{font-weight:750;text-align:right;color:#1c6890;overflow-wrap:anywhere}
.formula-detail[open] summary{background:#f5f9fc}
.formula-detail ol{padding:7px 15px 11px 34px;margin:0;color:#627e94;line-height:2;font-size:12px;overflow-wrap:anywhere}
.study-intersection{border-top:1px solid #e3edf5;margin-top:18px;padding-top:15px}
.study-intersection h3{font-size:13px;color:#1e4664;margin:0 0 13px}
.intersection-selectors{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.intersection-selectors select{min-width:0}
.intersection-toggle{margin:13px 0;display:flex;gap:8px;align-items:center;font-size:12px;color:#526f86}
.intersection-toggle input{accent-color:#9951b6}
.intersection-points{padding:10px;background:#f7f1fc;color:#7b4093;font-size:12px;line-height:1.85;border-radius:8px;overflow-wrap:anywhere}
#intersection-result{font-size:12px;color:#698397}
#study-compact-toggle{display:block}
@media(max-width:850px){#study-toggle{display:none}}
@media(max-width:650px){.study-drawer{top:59px;bottom:42px;right:6px;width:calc(100% - 12px)}.study-header{padding:13px 14px}.study-content{padding:12px}.graph-actions button#study-compact-toggle{font-size:10px;padding:0 6px}}
