@charset "UTF-8";
:root{color-scheme:light;--bg:#f6f7fb;--paper:#fff;--ink:#202738;--muted:#687387;--line:#e4e7ef;--brand:#3449bd;--tint:#eef0ff;--green:#16765c;--green-bg:#edf8f3;--red:#b74444;--red-bg:#fff1f0;--amber:#91602d;--amber-bg:#fff6e8;--shadow:0 10px 35px rgba(36,46,82,.04)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.8 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{ -webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:10px;padding:10px 17px;line-height:1.5}button:hover{border-color:#aab3da;background:#fafaff}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #a6b5ff;outline-offset:3px}a{color:var(--brand);text-underline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:27px;line-height:1.5;letter-spacing:-.5px}h2{font-size:19px;line-height:1.6}h3{font-size:17px}input,select,textarea{border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);padding:11px 13px;max-width:100%}textarea{width:100%;resize:vertical;line-height:1.9;min-height:180px}input[type=password]{width:100%}[hidden]{display:none!important}.app-header{max-width:1080px;margin:auto;padding:26px 30px 20px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:inline-flex;align-items:center;gap:11px;font-weight:750;font-size:18px;color:var(--ink);text-decoration:none}.brand svg{width:34px;height:34px}.header-actions{display:flex;gap:8px}.text-button{border:0;background:transparent;padding:8px;color:var(--muted);font-size:14px}.text-button:hover{background:var(--tint);color:var(--brand)}.icon-button{width:36px;height:36px;display:inline-grid;place-items:center;border:0;padding:0;font-size:24px;background:transparent;color:var(--muted)}.shell{max-width:1000px;margin:8px auto 105px;padding:0 30px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px 0 25px}.page-heading .muted{margin-top:4px}.muted{color:var(--muted);font-size:13px}.primary{background:var(--brand);color:#fff;border-color:var(--brand);font-weight:600}.primary:hover{background:#293da9;color:white;border-color:#293da9}.secondary{background:var(--tint);color:var(--brand);border-color:transparent}.danger{color:var(--red)}.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:20px 0}.toolbar input{flex:1;min-width:200px}.toolbar select{min-width:115px}.panel{border:1px solid var(--line);border-radius:17px;background:var(--paper);box-shadow:var(--shadow);padding:28px}.start-panel{display:grid;grid-template-columns:1fr auto;gap:22px;align-items:center}.start-panel h1{margin-bottom:7px}.start-panel .primary{min-width:126px}.start-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:18px 0 32px}.stat{background:var(--paper);border:1px solid var(--line);border-radius:13px;padding:18px 22px}.stat strong{display:block;font-size:27px;line-height:1.35;font-variant-numeric:tabular-nums;margin-bottom:3px}.stat span{font-size:13px;color:var(--muted)}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:30px 0 14px}.chapter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.chapter{padding:21px 22px;border:1px solid var(--line);border-radius:13px;background:var(--paper)}.chapter-top{display:flex;align-items:flex-start;gap:13px}.chapter-num{color:var(--brand);background:var(--tint);border-radius:8px;min-width:35px;height:35px;text-align:center;line-height:35px;font-size:13px;font-weight:650;font-variant-numeric:tabular-nums}.chapter h3{margin-bottom:4px}.chapter-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:15px;padding-top:12px;border-top:1px solid #f0f1f5}.chapter-bottom button{padding:5px 0;border:0;font-size:13px;color:var(--brand);background:transparent}.chapter-bottom button+button{margin-left:15px}progress{display:block;width:100%;height:5px;border:0;background:#eef0f5;border-radius:9px;overflow:hidden;margin-top:16px}progress::-webkit-progress-bar{background:#eef0f5}progress::-webkit-progress-value{background:#8794d8;border-radius:9px}progress::-moz-progress-bar{background:#8794d8}.bottom-nav{position:fixed;z-index:20;bottom:0;left:0;right:0;padding:10px max(20px,calc((100vw - 940px)/2)) max(10px,env(safe-area-inset-bottom));display:flex;justify-content:space-between;gap:10px;background:rgba(255,255,255,.97);border-top:1px solid var(--line)}.bottom-nav button{flex:1;border:0;padding:8px 10px;color:var(--muted);background:transparent;font-size:13px;display:flex;gap:7px;align-items:center;justify-content:center;border-radius:9px}.bottom-nav button.active{background:var(--tint);color:var(--brand)}.bottom-nav svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.7}.segmented{display:flex;gap:5px;padding:4px;background:#e9ecf4;border-radius:11px;width:fit-content;max-width:100%;overflow:auto;white-space:nowrap}.segmented button{border:0;background:transparent;color:var(--muted);padding:8px 18px;font-size:14px}.segmented button.active{background:white;color:var(--brand);box-shadow:0 1px 5px #25375a0a}.question-list{display:grid;gap:12px}.question-row{display:flex;align-items:center;gap:15px;width:100%;text-align:left;padding:20px;background:white;border:1px solid var(--line);border-radius:12px}.question-row:hover{border-color:#b6bfdf;background:#fefeff}.q-index{color:var(--muted);font-size:13px;min-width:30px;font-variant-numeric:tabular-nums}.question-row .row-content{flex:1;min-width:0}.question-row strong{display:block;font-size:15px;line-height:1.65;font-weight:600}.row-meta{display:flex;flex-wrap:wrap;gap:10px;font-size:12px;color:var(--muted);margin-top:5px}.row-status{font-size:12px;white-space:nowrap;color:var(--muted)}.row-status.good{color:var(--green)}.row-status.bad{color:var(--red)}.q-top{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:10px 0 22px}.q-top-actions{display:flex;gap:7px;align-items:center}.q-top-actions button{padding:7px 12px;font-size:13px}.q-top-actions .is-favorite{color:var(--amber);background:var(--amber-bg);border-color:#ead9bc}.back-link{color:var(--muted);background:transparent;border:0;padding:6px 0;font-size:14px;text-decoration:none}.practice{max-width:790px;margin:auto}.practice .question-card{padding:34px 36px}.question-meta{display:flex;gap:10px;flex-wrap:wrap;align-items:center;color:var(--muted);font-size:13px;margin-bottom:17px}.pill{font-size:12px;padding:2px 9px;border-radius:5px;background:var(--tint);color:var(--brand)}.question-title{font-size:23px;line-height:1.65;margin-bottom:19px}.stem{font-size:16px;line-height:2;white-space:pre-line}.option-list{display:grid;gap:11px;margin:27px 0}.option{display:flex;align-items:flex-start;gap:13px;padding:16px 17px;border:1px solid var(--line);border-radius:10px;background:white;cursor:pointer;line-height:1.8}.option input{margin:6px 0 0;accent-color:var(--brand);width:16px;height:16px;flex-shrink:0}.option-letter{font-size:13px;color:var(--muted);min-width:15px;margin-top:1px}.option.selected{border-color:#7383d7;background:#f4f5ff}.option.correct{border-color:#7ebfa8;background:var(--green-bg)}.option.wrong{border-color:#d69797;background:var(--red-bg)}.option:has(input:disabled){cursor:default}.submit-row{display:flex;gap:10px;align-items:center;margin-top:22px;flex-wrap:wrap}.submit-row .primary{min-width:120px}.answer-result{margin-top:27px;border-top:1px solid var(--line);padding-top:23px}.result-line{display:flex;align-items:center;gap:10px;font-weight:650;margin-bottom:14px}.result-line.good{color:var(--green)}.result-line.bad{color:var(--red)}.result-answer{background:#f6f7fb;border-radius:9px;padding:14px 17px;line-height:1.9;margin-bottom:18px;white-space:pre-line}.analysis{line-height:2;white-space:pre-line}.sources{display:flex;gap:7px;flex-wrap:wrap;margin-top:19px}.sources button{font-size:12px;color:var(--brand);padding:6px 10px;border-radius:7px;background:#f8f9ff}.practice-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:18px 0}.practice-footer button{font-size:14px}.practice-footer .counter{font-size:13px;color:var(--muted)}.self-grade{display:flex;gap:10px;flex-wrap:wrap;margin-top:19px}.self-grade button{font-size:14px}.empty{padding:70px 20px;text-align:center;color:var(--muted)}.empty h2{color:var(--ink);margin-bottom:10px}.empty button{margin-top:18px}.lesson-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:25px;align-items:start}.lesson-nav{position:sticky;top:15px;max-height:calc(100vh - 125px);overflow:auto;padding:4px}.lesson-nav button{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:8px;font-size:13px;line-height:1.7;margin-bottom:4px;padding:10px 12px;color:var(--muted)}.lesson-nav button.active{background:var(--tint);color:var(--brand)}.lesson-content{padding:30px}.lesson-content h1{font-size:24px;margin-bottom:23px}.lesson-content p{margin:17px 0;line-height:2}.lesson-content p strong{font-weight:650}.lesson-content .lesson-actions{margin-top:27px;padding-top:22px;border-top:1px solid var(--line);display:flex;gap:10px;flex-wrap:wrap}.table-wrap{overflow:auto}.reference-table{width:100%;border-collapse:collapse;margin:18px 0 28px;font-size:14px;min-width:580px}.reference-table th,.reference-table td{padding:14px;border:1px solid var(--line);vertical-align:top;text-align:left;line-height:1.9}.reference-table th{background:#f2f4fa;font-weight:600}.reference-table td:first-child{font-weight:600;min-width:140px}.review-original{white-space:pre-wrap;padding:16px 20px;background:#f7f8fb;border-radius:9px;line-height:1.9;font-size:14px;margin-top:13px}.audit-card{background:white;border:1px solid var(--line);border-radius:13px;padding:23px;margin-bottom:14px}.audit-card h3{font-size:17px}.audit-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.status-tag{font-size:12px;padding:3px 9px;background:var(--green-bg);color:var(--green);border-radius:5px}.status-tag.issue{color:var(--amber);background:var(--amber-bg)}.audit-card p{margin:10px 0;font-size:14px;line-height:1.95}.audit-card details{margin-top:15px}.audit-card summary{cursor:pointer;color:var(--muted);font-size:13px}.review-actions{display:flex;gap:12px;margin:20px 0}.review-actions button{font-size:14px}.notice{font-size:13px;color:var(--muted);line-height:1.9;margin:24px 0}.settings{max-width:700px;margin:0 auto}.settings p{margin:13px 0}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:19px 0;border-bottom:1px solid var(--line)}.settings-row:last-child{border-bottom:0}.settings-row strong{display:block;font-size:15px}.settings-row span{display:block;font-size:13px;color:var(--muted);margin-top:3px}.settings-actions{display:flex;gap:8px;flex-wrap:wrap}.source-dialog{border:1px solid var(--line);padding:0;border-radius:16px;width:min(780px,calc(100% - 30px));max-height:85vh;box-shadow:0 25px 90px #17244a26}.source-dialog::backdrop{background:#15203e55}.dialog-header{position:sticky;top:0;background:white;z-index:2;padding:19px 24px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px}.dialog-header h2{font-size:17px}.dialog-body{padding:14px 25px 27px}.dialog-body p{margin:18px 0;font-size:14px;line-height:2}.pid{display:block;font-size:12px;color:var(--muted);margin-bottom:2px}.dialog-body .quote{border-bottom:1px solid #f0f1f4;padding-bottom:16px}.source-page{max-width:1000px;margin:30px auto;padding:30px;background:white;overflow-wrap:anywhere}.source-page nav{display:none}.source-page h1{margin:15px 0}.source-page h2{margin:30px 0 12px}.source-page h3{margin:20px 0 10px}.source-page p{margin:12px 0}.source-page table{border-collapse:collapse;width:100%;display:block;overflow:auto;font-size:13px;margin:15px 0}.source-page td,.source-page th{border:1px solid var(--line);padding:8px;min-width:60px;max-width:600px}.source-page .toc{display:grid;gap:9px;grid-template-columns:1fr 1fr}.source-page .pid{display:inline;margin-right:5px}.source-page section{scroll-margin-top:25px}.scratch{position:fixed;right:18px;top:85px;bottom:88px;width:350px;z-index:35;border:1px solid #cbd2e7;box-shadow:0 16px 60px #28396520;border-radius:15px;background:white;display:flex;flex-direction:column;overflow:hidden}.scratch-head{display:flex;align-items:center;justify-content:space-between;padding:17px 18px 10px}.scratch-head strong{font-size:16px}.scratch-head p{font-size:12px;margin-top:2px}.scratch-tabs{display:flex;border-bottom:1px solid var(--line);padding:0 18px;gap:19px}.scratch-tabs button{border:0;border-radius:0;font-size:13px;color:var(--muted);padding:8px 3px;background:transparent}.scratch-tabs button[aria-selected=true]{border-bottom:2px solid var(--brand);color:var(--brand)}#scratch-text-panel{flex:1;min-height:0;padding:12px}#scratch-text{height:100%;min-height:150px;border:0;resize:none;padding:8px;font-size:15px;outline-offset:-3px}#scratch-draw-panel{flex:1;min-height:0;display:flex;flex-direction:column}.draw-tools{display:flex;gap:6px;padding:10px 13px}.draw-tools button{font-size:12px;padding:6px 10px}.draw-tools button.active{background:var(--tint);color:var(--brand);border-color:#cad0f4}#scratch-canvas{width:100%;flex:1;min-height:200px;touch-action:none;cursor:crosshair;background:#fff}.scratch-foot{padding:9px 15px;color:var(--muted);font-size:11px;border-top:1px solid var(--line)}.login-wrap{min-height:100dvh;display:grid;place-items:center;padding:24px}.login{width:360px;max-width:100%}.login .brand{margin-bottom:27px}.login label{font-size:14px;display:block;margin:24px 0 7px}.login .primary{width:100%;margin-top:14px}.login-error{color:var(--red);font-size:13px;min-height:24px;margin-top:9px}.loading{padding:100px 25px;text-align:center;color:var(--muted)}#toast{position:fixed;bottom:94px;left:50%;transform:translateX(-50%);background:#273349;color:white;padding:10px 20px;border-radius:10px;font-size:13px;z-index:100;max-width:90%;opacity:0;pointer-events:none;transition:opacity .15s}#toast.show{opacity:1}.storage-alert{border:1px solid #ead8b4;background:var(--amber-bg);color:var(--amber);border-radius:9px;padding:10px 15px;margin-bottom:18px;font-size:13px}.completion{text-align:center;padding:40px 25px}.completion h1{font-size:25px;margin-bottom:18px}.completion .stats{text-align:left;margin:25px 0}.completion .toolbar{justify-content:center}.mobile-lesson-select{display:none}
.start-options{display:flex;flex-direction:column;gap:7px}.start-options select{width:100%;max-width:320px}.knowledge-body{margin-top:24px}.knowledge-body>.panel+.panel{margin-top:20px}#bank-count{margin-bottom:13px}.scratch-head-actions{display:flex;align-items:center;gap:5px}.scratch-expand{display:none}
@media(min-width:1050px){body.scratch-open .shell{margin-left:max(16px,calc((100vw - 1380px)/2));margin-right:395px}}
@media(max-width:760px){.app-header{padding:19px 19px 13px}.brand{font-size:16px;gap:8px}.brand svg{width:30px;height:30px}.shell{padding:0 17px;margin-top:2px;margin-bottom:100px}.page-heading{margin:17px 0 20px}h1{font-size:24px}.panel{padding:23px 21px;border-radius:13px}.start-panel{grid-template-columns:1fr;gap:17px}.start-panel .start-actions{margin-top:8px}.stats{gap:9px;margin:14px 0 26px}.stat{padding:15px 13px}.stat strong{font-size:23px}.stat span{font-size:12px}.chapter-grid{grid-template-columns:1fr}.chapter{padding:18px}.chapter h3{font-size:16px}.bottom-nav{gap:5px;padding:8px 12px max(9px,env(safe-area-inset-bottom))}.bottom-nav button{flex-direction:column;gap:3px;padding:5px 8px;font-size:11px}.bottom-nav svg{width:20px;height:20px}.q-top{margin:5px 0 15px}.practice .question-card{padding:23px 21px}.question-title{font-size:20px;margin-bottom:15px}.stem{font-size:15px;line-height:2}.option{padding:14px 12px;gap:10px;font-size:14px}.option-list{gap:10px;margin:23px 0}.practice-footer{gap:7px}.practice-footer button{padding:9px 13px}.q-top-actions button{padding:7px 9px;font-size:12px}.question-row{padding:17px 15px;gap:11px}.row-status{font-size:11px}.question-row strong{font-size:14px}.q-index{min-width:23px}.toolbar{gap:8px}.toolbar select{flex:1;min-width:100px}.toolbar input{flex-basis:100%}.segmented{width:100%;margin-bottom:4px}.segmented button{flex:1;padding:8px 12px;font-size:13px}.lesson-layout{grid-template-columns:1fr;gap:15px}.lesson-nav{display:none}.mobile-lesson-select{display:block;width:100%;margin-bottom:17px}.lesson-content{padding:24px 21px}.lesson-content h1{font-size:22px}.lesson-content p{font-size:14px}.scratch{left:12px;right:12px;top:auto;bottom:79px;width:auto;height:min(65dvh,560px)}.scratch-head{padding:12px 15px 5px}.scratch-tabs{padding-left:15px}.scratch-foot{padding:7px 13px}.source-dialog{width:calc(100% - 22px);max-height:88dvh}.dialog-header{padding:15px 18px}.dialog-body{padding:10px 19px 22px}.audit-card{padding:19px}.audit-top{flex-wrap:wrap}.settings-row{align-items:flex-start;flex-direction:column;gap:11px}.source-page{padding:20px 17px;margin:0}.source-page .toc{grid-template-columns:1fr}.completion{padding:25px 0}.header-actions{gap:3px}.text-button{font-size:12px}}
@media(max-width:760px){.scratch{height:min(42dvh,380px);min-height:300px}.scratch.expanded{height:min(65dvh,560px)}.scratch-expand{display:block;font-size:12px;padding:5px 8px;color:var(--brand);border:0;background:transparent}#scratch-canvas{min-height:120px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}@media print{.app-header,.bottom-nav,.toolbar,.scratch,.header-actions,.q-top,.practice-footer,button{display:none!important}body{background:white}.shell{padding:0;margin:0}.panel{box-shadow:none;border:0}.source-page{max-width:none;margin:0}.reference-table{min-width:0}.source-dialog{position:static;max-height:none;border:0}.source-page td{max-width:none}@page{margin:18mm}}
