:root{--bg:#f6f6f0;--paper:#fff;--ink:#213d34;--muted:#738078;--green:#204d42;--line:#dfe5dd;--accent:#dcebbf;--orange:#c26b38;--soft:#edf1e8;--radius:20px}*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:100px}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:16px;line-height:1.75}body.large{font-size:18px}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,.button{cursor:pointer;min-height:46px;border:0;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;padding:10px 18px;gap:8px;line-height:1.5;touch-action:manipulation}button:disabled{opacity:.5;cursor:default}button:hover,.button:hover{filter:brightness(.96)}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #cb8a50;outline-offset:3px}h1,h2,h3,p{margin:0 0 14px}h1{font-size:clamp(30px,4.3vw,48px);line-height:1.3;letter-spacing:-1.5px}h2{font-size:23px;line-height:1.5}h3{font-size:18px;line-height:1.5}small,.muted{color:var(--muted)}.top{max-width:1180px;margin:auto;padding:24px 32px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:12px;font-weight:650;font-size:20px;line-height:1.35}.brand small{display:block;font-size:11px;font-weight:400;letter-spacing:2px;margin-top:4px}.logo{background:var(--green);color:#eff5df;border-radius:12px;width:45px;height:45px;display:grid;place-items:center;font-family:serif;font-size:25px}.top-actions{display:flex;align-items:center;gap:18px}.local-label{font-size:12px;color:var(--muted)}.icon-btn{font-size:24px;padding:5px 13px;background:transparent}.nav{position:fixed;top:104px;left:max(24px,calc((100vw - 1116px)/2));width:176px;display:grid;gap:9px;z-index:10}.nav a{display:flex;gap:12px;padding:13px 16px;border-radius:13px;font-size:14px}.nav a span{width:22px;font-size:21px;line-height:1}.nav a.active{background:var(--green);color:white}.nav a:not(.active):hover{background:var(--soft)}main{max-width:1180px;margin:0 auto;padding:12px 32px 90px 242px;min-height:85vh}.eyebrow{color:#6b7c60;letter-spacing:2px;font-size:11px;font-weight:650;margin-bottom:12px}.hero{background:var(--green);color:white;border-radius:26px;padding:32px;position:relative;overflow:hidden}.hero .eyebrow{color:#c8d8b8}.hero p{color:#d4dfd4;max-width:460px;font-size:14px}.hero h1{max-width:480px}.hero-art{position:absolute;right:22px;top:24px;width:150px;height:150px;opacity:.22;transform:rotate(-12deg);pointer-events:none}.hero-art svg{width:100%;height:100%}.hero-content{position:relative;z-index:1}.primary{background:var(--green);color:white}.hero .primary{background:var(--accent);color:#234234}.secondary{background:var(--soft);color:var(--ink)}.ghost{background:transparent;border:1px solid var(--line)}.hero .ghost{border-color:#6f8b76;color:white}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:20px 0 30px}.stat{padding:16px 20px;background:var(--paper);border:1px solid var(--line);border-radius:16px}.stat strong{font-size:27px;font-weight:600;display:block;line-height:1.3}.stat span{font-size:12px;color:var(--muted)}.section-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:27px 0 15px}.section-line h2{margin:0}.text-link{font-size:13px;color:#56744e}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:22px;min-width:0}.module{display:block;position:relative;padding:23px;transition:transform .15s}.module:hover{transform:translateY(-2px)}.module-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.number{font:italic 24px Georgia,serif;color:#95a78f}.tag{font-size:11px;border:1px solid var(--line);border-radius:20px;padding:3px 9px;color:#76826f}.module h3{margin-bottom:7px}.module p{color:var(--muted);font-size:13px;margin-bottom:16px}.meter{height:5px;border-radius:5px;background:#edf0e7;overflow:hidden}.meter>i{display:block;background:#7d9f61;height:100%;border-radius:5px}.module-footer{display:flex;justify-content:space-between;color:#87917f;font-size:11px;margin-top:8px}.hint{background:#eaf0df;padding:17px 20px;border-radius:14px;font-size:14px;margin:18px 0}.hint strong{color:#4c693f}.footer-note{font-size:12px;color:var(--muted);margin-top:27px}.page-head{margin:14px 0 24px}.page-head h1{font-size:32px}.page-head p{color:var(--muted);font-size:14px}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.search{width:100%;padding:13px 16px;border:1px solid var(--line);background:white;border-radius:13px;min-height:48px;color:var(--ink)}.chip{padding:8px 14px;min-height:40px;border-radius:25px;font-size:13px;background:white;border:1px solid var(--line)}.chip.selected{background:var(--green);color:white;border-color:var(--green)}.lesson{margin:14px 0;scroll-margin-top:20px}.lesson>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:12px;min-height:48px}.lesson>summary::-webkit-details-marker{display:none}.lesson>summary::after{content:'＋';margin-left:auto;font-size:21px;color:#8b9b84}.lesson[open]>summary::after{content:'−'}.lesson>summary h2{font-size:19px;margin:0}.lesson .lesson-body{padding-top:20px;border-top:1px solid var(--line);margin-top:18px}.lesson ul{padding-left:20px}.lesson li{margin:10px 0}.check-dot{flex:none;width:25px;height:25px;display:grid;place-items:center;background:#edf1e6;border-radius:50%;font-size:12px;color:#75896b}.check-dot.done{background:var(--green);color:white}.code-wrap{position:relative;margin:15px 0}.code-label{display:flex;justify-content:space-between;align-items:center;background:#e9ede5;border-radius:12px 12px 0 0;padding:6px 14px;font-size:11px;color:#63745e}.code-label button{font-size:12px;min-height:32px;padding:3px 10px;background:transparent}pre{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;line-height:1.8;white-space:pre;overflow-x:auto;padding:18px;margin:0;background:#f0f3eb;border-radius:0 0 12px 12px;color:#284633;tab-size:4;max-width:100%;-webkit-overflow-scrolling:touch}.output{border-left:3px solid #a4b98e;background:#f7f8f3;padding:12px 15px;margin:12px 0}.output pre{padding:0;white-space:pre-wrap;background:none}.trap{border-left:3px solid #d0a26c;background:#faf5e9;padding:12px 15px;font-size:14px;margin:17px 0}.recall{padding:15px;background:#f3f4ef;border-radius:12px;font-size:14px;margin:15px 0}.quiz-config{display:grid;gap:17px}.field-label{font-size:14px;display:grid;gap:8px}.field-label select{width:100%;padding:12px;border:1px solid var(--line);border-radius:12px;background:white;color:var(--ink);min-height:48px}.quiz-top{display:flex;align-items:center;justify-content:space-between;font-size:13px;margin:20px 0 12px}.question-title{font-size:21px;margin:18px 0 24px;overflow-wrap:anywhere}.options{display:grid;gap:11px}.option{width:100%;text-align:left;justify-content:flex-start;align-items:flex-start;background:white;border:1px solid var(--line);border-radius:13px;padding:15px}.option b{width:25px;flex:none;font-weight:500;color:#8b967f}.option.chosen{border-color:var(--green);background:#eef3e7}.option.correct{border-color:#6c9457;background:#ebf3df;opacity:1}.option.wrong{border-color:#ca8c6f;background:#f9eee7;opacity:1}.answer-box{padding:18px;border-radius:14px;background:#edf3e4;margin-top:20px;overflow-wrap:anywhere}.answer-box.bad{background:#faf0e8}.answer-box p{font-size:14px;margin:7px 0}.quiz-actions{margin-top:22px;display:flex;justify-content:space-between;gap:10px}.fill-answer,textarea{width:100%;padding:13px;border:1px solid #b8c7ad;border-radius:12px;background:white;color:var(--ink)}textarea{resize:vertical;min-height:230px;font:13px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:4}.result-score{font-size:64px;color:var(--green);font-weight:600;line-height:1.2}.center{text-align:center}.empty{padding:38px 24px;text-align:center}.empty p{color:var(--muted)}.quick-item{padding:20px;border-bottom:1px solid var(--line)}.quick-item:last-child{border:0}.quick-item h3{font-size:15px;margin-bottom:9px}.quick-item code{font:13px/1.8 ui-monospace,monospace;overflow-wrap:anywhere;color:#53723d}.program-tabs{margin:18px 0}.checklist{display:grid;gap:10px;margin:15px 0}.checklist label{display:flex;align-items:flex-start;gap:10px;padding:9px 0;cursor:pointer}.checklist input{width:20px;height:20px;margin-top:4px;accent-color:var(--green);flex:none}.source-view p{white-space:pre-wrap;margin:18px 0;overflow-wrap:anywhere}.source-table{overflow:auto;margin:18px 0}.source-table table{border-collapse:collapse;min-width:450px;width:100%;font-size:14px}.source-table td{border:1px solid var(--line);padding:12px;white-space:pre-wrap}.source-table tr:first-child{background:#edf1e5;font-weight:600}dialog{border:1px solid var(--line);border-radius:22px;max-width:480px;width:calc(100% - 28px);padding:25px;color:var(--ink);max-height:85dvh;overflow:auto;background:var(--bg)}dialog::backdrop{background:#14302888;backdrop-filter:blur(3px)}.settings-actions{display:grid;gap:12px;margin:20px 0}#toast{position:fixed;left:50%;bottom:105px;transform:translateX(-50%);background:#213d34;color:white;border-radius:12px;padding:12px 20px;z-index:50;max-width:90vw;font-size:14px;opacity:0;pointer-events:none;transition:opacity .2s}#toast.show{opacity:1}.skip{position:fixed;top:-100px}.skip:focus{top:0;background:white;padding:10px;z-index:100}.pill{font-size:12px;color:#7c8c6d}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.plain-list{padding-left:20px}.plain-list li{margin:8px 0}.practice-header{display:flex;gap:10px;align-items:center;justify-content:space-between}.notice{font-size:13px;color:#7c856f;margin:10px 0}.backup-warning{background:#f7e3cb;color:#704321;padding:12px 20px}
@media(min-width:1150px){.hero p{max-width:490px}.hero-art{right:32px;width:190px;height:190px}}
@media(max-width:850px){.top{padding:20px 22px}.nav{top:auto;bottom:0;left:0;width:100%;display:flex;justify-content:center;gap:0;background:#fffffff5;border-top:1px solid var(--line);padding:7px 12px calc(7px + env(safe-area-inset-bottom));backdrop-filter:blur(16px)}.nav a{flex:1;max-width:125px;flex-direction:column;gap:5px;align-items:center;font-size:10px;padding:8px 2px;border-radius:12px;line-height:1.3}.nav a span{font-size:21px;width:auto}.nav a.active{background:#e8efdd;color:var(--green);font-weight:650}main{padding:5px 22px calc(110px + env(safe-area-inset-bottom));max-width:740px}.hero{padding:28px}.hero h1{font-size:35px}.hero-art{width:145px;top:25px;right:15px}.hero p{max-width:390px}.local-label{font-size:11px}.lesson{scroll-margin-top:10px}}
@media(max-width:480px){.top{padding:18px 18px}.brand{font-size:18px;gap:10px}.brand small{font-size:10px}.logo{width:40px;height:40px}.local-label{display:none}main{padding-left:16px;padding-right:16px}.hero{padding:25px 23px;border-radius:22px}.hero h1{font-size:32px;letter-spacing:-1px}.hero p{font-size:13px;max-width:270px}.hero-art{width:115px;top:25px;right:10px;opacity:.16}.hero .row{gap:8px}.hero button,.hero .button{font-size:13px;padding:11px 15px}.stats{gap:8px;margin:14px 0 24px}.stat{padding:15px 12px;border-radius:14px}.stat strong{font-size:24px}.stat span{font-size:11px}.grid{gap:10px}.module{padding:17px 15px}.module-top{margin-bottom:17px}.module h3{font-size:17px}.module p{font-size:12px;min-height:42px}.number{font-size:23px}.tag{font-size:10px;padding:2px 7px}.section-line h2{font-size:21px}.card{padding:19px}.lesson>summary h2{font-size:17px}.lesson ul{padding-left:18px}.page-head h1{font-size:29px}.question-title{font-size:19px}.quiz-actions button{font-size:14px}.source-table table{min-width:400px}.toolbar{gap:7px}.chip{font-size:12px;padding:8px 12px}.program-tabs{gap:6px}.hint{font-size:13px;padding:15px}.lesson-body .row button{flex:1}.large .grid{grid-template-columns:1fr}.large .module p{min-height:0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}
main:focus{outline:none}.hero p{max-width:100%}
.chapter-card>summary .eyebrow{display:block;margin-bottom:5px;font-size:10px;letter-spacing:1px}.chapter-card>summary h2{font-size:20px}.chapter-goals{background:#eef2e8;padding:17px 20px;border-radius:14px;margin:20px 0}.chapter-goals ul{margin-bottom:0}.chapter-toc{background:#f3f5ee;border-radius:13px;padding:14px 18px}.chapter-toc>summary{font-size:14px}.chapter-toc a{display:block;padding:8px 0;color:#527448;font-size:14px;border-bottom:1px solid #e4e9dc}.chapter-section{margin-top:32px;padding-top:24px;border-top:1px solid var(--line);scroll-margin-top:24px}.chapter-section>h3{font-size:20px}.chapter-section>h3>span{font:italic 21px Georgia,serif;color:#8ea27f;margin-right:7px}.chapter-section>p{font-size:14px;color:#6e7e66}.chapter-section li{font-size:14px;line-height:1.9}.chapter-question{padding:20px 0;border-bottom:1px dashed #dce3d4}.chapter-question:last-child{border-bottom:0}.chapter-question h3{font-size:16px;margin-top:12px}.drill-draft{min-height:100px}.chapter-actions{padding-top:25px;border-top:1px solid var(--line);margin-top:30px}.chapter-pagination{justify-content:space-between;margin-top:20px}.read-options{font-size:14px;display:grid;gap:6px;margin:14px 0}.chapter-section .quick-item code{white-space:pre-wrap}.chapter-section .output p{font-size:14px;margin:10px 0}.module h3{font-size:17px}.chapter-card{padding:24px}@media(max-width:480px){.chapter-card{padding:18px}.chapter-card>summary h2{font-size:18px}.chapter-section>h3{font-size:18px}.chapter-goals{padding:14px}.chapter-toc{padding:12px 14px}.chapter-card>summary{align-items:flex-start}.chapter-card>summary .check-dot{margin-top:4px}.chapter-section{margin-top:25px;padding-top:21px}.chapter-actions{flex-direction:column;align-items:stretch}.chapter-actions .button{flex:1}.module p{min-height:42px}.module h3{min-height:26px}.chapter-card pre{font-size:12px;padding:15px}}
.module-footer{align-items:center;gap:7px}.module-footer span{white-space:nowrap}@media(max-width:480px){.module-footer span:last-child{font-size:0}.module-footer span:last-child::after{content:'↗';font-size:14px}.module-footer span:first-child{font-size:10px}}
