.page-heading{gap:14px}.page-heading>div{min-width:0;flex:1}.beginner-badge{white-space:nowrap;flex-shrink:0}
.lesson-title-text{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.lesson-title-text small{font-size:.6875rem;white-space:nowrap;background:#f0f4eb;color:#7c906c;border-radius:3px;padding:1px 4px}
.semester-notice{display:flex;align-items:flex-start;gap:13px;background:#fff;border:1px solid #dce7d5;border-radius:10px;padding:20px 22px;margin:-9px 0 30px}.semester-notice>span{color:#688b52;margin-top:3px}.semester-notice strong{font-size:.875rem;font-weight:600;color:#405b36}.semester-notice p{font-size:.8125rem;color:#6f7f64;line-height:1.9;margin-top:6px}.semester-notice .text-button{flex:none;align-self:center;font-size:.8125rem}.stage-description{line-height:1.9;min-height:49px}.stage-title{line-height:1.7}.lesson-college-support{background:#f3f7ef;border:1px solid #dce8d2;border-radius:9px;padding:18px;margin:22px 0}.lesson-college-support>div{display:flex;align-items:center;flex-wrap:wrap;gap:9px}.lesson-college-support strong{font-size:.875rem}.lesson-priority{color:#506d3f;background:#e3edd9;padding:3px 8px;border-radius:4px;font-size:.75rem}.lesson-college-support p{margin:12px 0!important}.lesson-college-support small{display:block;margin-top:9px;color:#6e825f;font-size:.75rem;line-height:1.9}.video-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #cfdfc2;background:#f7faf3;color:#486b35;border-radius:6px;font-size:.875rem;padding:9px 13px;line-height:1.6;transition:background .2s}.video-link:hover{background:#e8f1df;border-color:#adc595}.video-link svg{height:15px;width:15px}.external-label{font-size:.6875rem;color:#7e916c;border-left:1px solid #dbe5d1;padding-left:8px}.video-intro{background:#eaf2e2;border:1px solid #dce8d0;padding:25px 27px;display:flex;align-items:center;gap:18px;border-radius:12px;margin-bottom:25px}.video-intro>span{height:49px;width:49px;background:#dce9ce;color:#658b49;border-radius:11px;flex:none}.video-intro>span svg{height:26px;width:26px}.video-intro h2{font-size:1.25rem;font-weight:600}.video-intro p{font-size:.9375rem;color:#657b56;line-height:1.9;margin-top:7px}.video-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.video-card{border:1px solid #e0e8da;border-radius:11px;overflow:hidden;background:#fff;display:flex;flex-direction:column}.video-cover{position:relative;min-height:147px;background-color:#dce9cf;background-image:linear-gradient(#7d966610 1px,transparent 1px),linear-gradient(90deg,#7d966610 1px,transparent 1px);background-size:24px 24px;display:grid;place-items:center;overflow:hidden}.cover-1{background-color:#e3e8f2}.cover-2{background-color:#ece5f2}.video-play{height:44px;width:44px;background:#ffffffd9;border:1px solid #ffffff;border-radius:50%;color:#526e3f;box-shadow:0 3px 13px #526e3f12;z-index:1}.video-play svg{height:21px;width:21px;margin-left:3px}.video-cover-code{position:absolute;left:17px;top:25px;font:14px var(--mono);color:#70875b;opacity:.6}.cover-1 .video-cover-code{color:#6c7ca1}.cover-2 .video-cover-code{color:#8c77a0}.video-platform{position:absolute;right:12px;bottom:10px;font-size:12px;font-weight:600;letter-spacing:1px;color:#698452;opacity:.7}.video-card-body{padding:23px;display:flex;flex-direction:column;flex:1;align-items:flex-start}.video-tag{font-size:.75rem;color:#6a8555;background:#edf4e6;border-radius:5px;padding:3px 8px;margin-bottom:13px}.video-card h2{font-size:1.0625rem;font-weight:600;margin-bottom:9px}.video-source{font-size:.75rem;color:#7a886f;line-height:1.9}.video-card p{font-size:.9375rem;color:#667a58;line-height:1.95;margin-top:13px}.video-card details{font-size:.8125rem;margin:16px 0;color:#6d855b}.video-card details p{font-size:.875rem}.video-card summary{cursor:pointer}.video-card .video-link{width:100%;margin-top:auto;flex-wrap:wrap}.video-source-note{font-size:.75rem;color:#7c8972;line-height:1.9;margin:19px 0 25px}.video-topic-panel{padding:26px}.video-topic{display:flex;align-items:center;gap:17px;border-top:1px solid #e6eddf;padding:20px 0}.video-topic:last-child{padding-bottom:0}.topic-icon{height:40px;width:40px;border-radius:10px;background:var(--stage-bg);color:var(--stage-fg);flex:none}.video-topic>div{flex:1}.video-topic h3{font-size:1rem;font-weight:600}.video-topic p{font-size:.875rem;line-height:1.9;color:#6b815b;margin-top:3px}.video-topic small{font-size:.75rem;color:#7e8c72;line-height:1.9;display:block;margin-top:4px}.video-topic .video-link{flex:none;font-size:.8125rem}.video-topic .external-label{display:none}
.exam-banner{display:flex;align-items:center;gap:30px;justify-content:space-between;background:#eaf1e2;border:1px solid #dfe8d5;border-radius:12px;padding:29px 31px;margin-bottom:24px}.exam-banner>div:first-child{max-width:66%}.exam-banner h2{font-size:1.625rem;line-height:1.6;letter-spacing:-.5px;color:#324b28}.exam-banner p{font-size:.9375rem;line-height:1.95;color:#617855;margin-top:12px}.exam-stats{display:flex;gap:28px;flex:none;text-align:center}.exam-stats>div{display:flex;flex-direction:column;gap:9px}.exam-stats strong{font-size:2rem;font-weight:600;color:#577541;white-space:nowrap}.exam-stats strong>span{font-size:1rem;color:#81956f;font-weight:400}.exam-stats>div>span{font-size:.75rem;color:#6d835f}.semester-check-panel{margin-bottom:30px;padding:25px 28px}.semester-check-panel .section-heading>span{color:#89a16e}.semester-check{display:flex;align-items:center;gap:10px;font-size:.9375rem;color:#657b58;padding:10px 0;cursor:pointer}.semester-check input,.plan-item input,.grade-checkbox input{accent-color:#6f9555;width:17px;height:17px;flex:none;margin:0}.semester-check:has(input:checked)>span{color:#7f9272;text-decoration:line-through}.exam-practice-section>.section-heading{gap:15px;align-items:center}.exam-practice-section .section-heading h2{font-size:1.25rem}.exam-practice-section .section-heading p{font-size:.8125rem;line-height:1.9}.exam-practice-section .section-heading .button{flex:none;font-size:.8125rem}.exam-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:22px}.exam-filter{background:#fff;border:1px solid #e0e8d9;border-radius:7px;padding:8px 15px;color:#728666;font-size:.8125rem}.exam-filter.active{background:#e7efde;border-color:#c8dbb6;color:#4f703d}.exam-filter>span{font-size:.6875rem;margin-left:4px;background:#f1f6ec;border-radius:4px;padding:1px 5px}.exam-question-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.exam-question-card{padding:21px;border:1px solid #e1e9da;background:#fff;border-radius:10px;display:flex;flex-direction:column}.exam-question-card>div{display:flex;justify-content:space-between;gap:8px}.question-type{font-size:.75rem;color:#719059;background:#f0f5e9;padding:2px 7px;border-radius:4px}.question-state{font-size:.75rem;color:#789365}.question-state.needs-review{color:#ad8359}.exam-question-card h3{font-size:.9375rem;line-height:1.9;font-weight:500;margin:15px 0 9px}.exam-question-card p{font-size:.75rem;color:#7d8d71;margin-bottom:20px}.question-open{font-size:.8125rem;background:#f7faf2;border:1px solid #dce7d2;border-radius:6px;padding:8px 10px;color:#5f7f48;margin-top:auto;text-align:center}.question-open:hover{background:#eaf3e0}.exam-bottom-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:24px;margin-top:30px}.study-plan-panel,.grade-panel{padding:25px}.study-plan-panel .section-heading h2,.grade-panel .section-heading h2{font-size:1.125rem}.study-plan-panel .section-heading p,.grade-panel .section-heading p{font-size:.8125rem;line-height:1.9}.plan-switch{display:flex;gap:6px;background:#f0f4eb;border-radius:7px;padding:4px;margin-bottom:17px}.plan-switch button{flex:1;background:none;font-size:.8125rem;padding:8px;color:#789065;border-radius:5px}.plan-switch button.active{background:#fff;color:#4e6e3c;box-shadow:0 1px 3px #4d6e3410}.plan-item{display:flex;align-items:flex-start;gap:11px;padding:17px 0;border-bottom:1px solid #edf2e7;cursor:pointer}.plan-item:last-child{border:0;padding-bottom:0}.plan-item input{margin-top:6px}.plan-item>span>small{font-size:.75rem;color:#799265;display:block;margin-bottom:3px}.plan-item strong{font-size:.9375rem;line-height:1.9;font-weight:500;display:block;color:#4f6a3e}.plan-item>span>span{display:block;font-size:.8125rem;line-height:1.9;color:#748767;margin-top:5px}.plan-item:has(input:checked) strong{text-decoration:line-through;color:#839b71}.grade-panel form{display:grid;gap:16px}.grade-panel form>label{display:grid;gap:7px;font-size:.875rem;color:#647d55}.grade-panel input[type=number],.exam-text-answer{width:100%;background:#fafcf7;border:1px solid #d6e2ca;border-radius:7px;color:#425d32;font-size:1rem;padding:10px 12px;min-height:44px}.grade-panel form>.grade-checkbox{display:flex;gap:9px;align-items:center;font-size:.8125rem;margin:4px 0;line-height:1.8}.grade-panel .button{font-size:.875rem}.grade-result{padding:16px;background:#edf4e5;border:1px solid #d4e4c5;border-radius:8px;color:#526f40;font-size:.9375rem;line-height:2}.grade-disclaimer{font-size:.75rem;color:#7c8d6f;line-height:1.9;margin-top:20px}.exam-answer-label{font-size:.875rem;color:#647c55;display:block;margin:20px 0 10px}.exam-text-answer{margin-bottom:13px;font-family:var(--mono)}.answer-matching-note{font-size:.75rem!important;color:#7e906f!important;margin-top:10px!important}.program-self-check .button{margin:4px 7px 5px 0;font-size:.8125rem}.exam-needs-review{background:#faf4e9;border-color:#e8d5bb}.lesson-meta{flex-wrap:wrap}.video-topic .topic-icon svg{height:20px;width:20px}
@media(max-width:1200px){.video-grid,.exam-question-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.video-card:last-child{grid-column:1/-1}.video-card:last-child .video-cover{min-height:125px}.exam-stats{gap:18px}.exam-banner{padding:25px;gap:20px}.exam-banner h2{font-size:1.375rem}.exam-banner>div:first-child{max-width:65%}.exam-bottom-grid{grid-template-columns:1fr}.semester-notice{flex-wrap:wrap}.semester-notice>div{flex:1}.semester-notice .text-button{margin-left:33px}.video-topic .video-link{font-size:.75rem;padding:8px}.exam-practice-section>.section-heading{align-items:flex-start;flex-wrap:wrap}}
@media(max-width:780px){.sidebar-label{margin-top:28px}.primary-nav{gap:5px}.nav-item{padding-top:11px;padding-bottom:11px}.video-topic{flex-wrap:wrap;gap:12px}.video-topic>div{flex-basis:calc(100% - 55px)}.video-topic>.video-link{margin-left:52px}.video-intro{align-items:flex-start}.exam-banner{align-items:flex-start}.exam-banner>div:first-child{max-width:none}.exam-stats{flex-direction:column;gap:18px}.semester-notice{padding:19px}.semester-notice strong{line-height:1.9}.video-card-body{padding:21px}}
@media(max-width:600px){.semester-notice{margin-top:-8px;margin-bottom:27px;gap:10px}.semester-notice>div{flex-basis:calc(100% - 32px)}.semester-notice p{font-size:.8125rem}.semester-notice .text-button{margin-left:30px}.stage-description{font-size:.875rem;min-height:0}.video-grid,.exam-question-grid{grid-template-columns:1fr}.video-card:last-child{grid-column:auto}.video-card .video-cover{min-height:155px}.video-intro{padding:21px;gap:12px}.video-intro>span{width:33px;height:33px;border-radius:8px}.video-intro>span svg{width:21px;height:21px}.video-intro h2{font-size:1.0625rem;line-height:1.8}.video-intro p,.video-card p{font-size:.875rem}.video-topic-panel{padding:22px}.video-topic{padding:18px 0}.video-topic h3{font-size:.9375rem}.video-topic p{font-size:.8125rem}.video-topic .video-link{font-size:.8125rem}.video-source-note{font-size:.75rem}.exam-banner{padding:24px;display:block}.exam-banner h2{font-size:1.375rem}.exam-banner p{font-size:.875rem}.exam-stats{flex-direction:row;justify-content:flex-start;gap:45px;margin-top:22px;text-align:left}.exam-stats strong{font-size:1.75rem}.exam-stats>div{gap:2px}.semester-check-panel,.study-plan-panel,.grade-panel{padding:22px}.semester-check-panel .section-heading h2{font-size:1.0625rem}.semester-check{font-size:.875rem;line-height:1.9;align-items:flex-start;gap:9px}.semester-check input{margin-top:6px}.exam-practice-section .section-heading h2{font-size:1.125rem}.exam-practice-section .section-heading p{font-size:.75rem}.exam-filter{font-size:.75rem;padding:8px 11px}.exam-filters{gap:7px}.exam-question-card h3{font-size:1rem}.exam-question-card p{font-size:.8125rem}.question-open{font-size:.875rem}.exam-bottom-grid{gap:21px}.lesson-college-support{padding:16px}.lesson-college-support strong{font-size:.8125rem}.lesson-college-support .video-link{font-size:.8125rem;flex-wrap:wrap}.external-label{font-size:.6875rem}.lesson-college-support small{font-size:.75rem}.semester-notice>span svg{width:19px;height:19px}}

/* ===== 2026-11-22 增强层：语法高亮 / 热力图 / 快捷键 / 报告 ===== */
.tok-kw{color:#8a5fa8}
.tok-type{color:#4a7ba6}
.tok-fn{color:#3f7a86}
.tok-str{color:#6d8f3f}
.tok-chr{color:#9a7a33}
.tok-num{color:#b06a3b}
.tok-pre{color:#8a6aa0}
.tok-comment{color:#9aa79a;font-style:italic}
.tok-const{color:#a4568a}

[data-theme="dark"] .tok-kw{color:#c9a1e6}
[data-theme="dark"] .tok-type{color:#8fbde0}
[data-theme="dark"] .tok-fn{color:#7fc6cd}
[data-theme="dark"] .tok-str{color:#a8cd7c}
[data-theme="dark"] .tok-chr{color:#dcc589}
[data-theme="dark"] .tok-num{color:#e0a077}
[data-theme="dark"] .tok-pre{color:#c3a5d6}
[data-theme="dark"] .tok-comment{color:#7d8f86}
[data-theme="dark"] .tok-const{color:#e2a0c8}

.heatmap-panel{padding:19px 20px 16px}
.heatmap-panel .panel-heading h2{gap:6px}
.heatmap-panel .panel-heading>span{font-size:.75rem;color:#7f9173}
.heatmap-total{font-family:var(--mono);letter-spacing:.2px}
.heatmap-hint{font-size:.75rem;color:#7c8d70;line-height:1.9;margin:9px 0 13px}
.heatmap-grid{display:grid;grid-template-rows:repeat(7,1fr);grid-auto-flow:column;grid-auto-columns:1fr;gap:3px}
.heat-cell{display:block;aspect-ratio:1;border-radius:2.5px;background:#eef2ea;border:1px solid #e7ede1}
.heat-cell.lv-1{background:#d6e6c6;border-color:#cfe0bd}
.heat-cell.lv-2{background:#a9c98c;border-color:#9fbf80}
.heat-cell.lv-3{background:#7ba05e;border-color:#719556}
.heat-cell.is-future{background:transparent;border-color:transparent}
.heat-cell:not(.is-future):hover{outline:2px solid #8aa870;outline-offset:1px}
.heatmap-legend{display:flex;align-items:center;justify-content:flex-end;gap:5px;margin-top:11px;font-size:.6875rem;color:#83937a}
.heatmap-legend .heat-cell{width:11px;height:11px;aspect-ratio:auto}
[data-theme="dark"] .heat-cell{background:#232c34;border-color:#2b343d}
[data-theme="dark"] .heat-cell.lv-1{background:#3c5238;border-color:#455c40}
[data-theme="dark"] .heat-cell.lv-2{background:#587b46;border-color:#628753}
[data-theme="dark"] .heat-cell.lv-3{background:#79a35c;border-color:#84b065}
[data-theme="dark"] .heat-cell.is-future{background:transparent;border-color:transparent}
[data-theme="dark"] .heatmap-hint,[data-theme="dark"] .heatmap-legend,[data-theme="dark"] .heatmap-panel .panel-heading>span{color:#9dabb1}

.toggle-chip{font-size:.75rem;padding:7px 13px;border-radius:20px;background:#fff;border:1px solid #e2e9db;color:#77886b;white-space:nowrap;transition:background .2s,border-color .2s,color .2s}
.toggle-chip:hover{border-color:#c3d7ae;color:#52753c}
.toggle-chip.active{background:#e7f0dc;border-color:#c2d8ab;color:#456b31;font-weight:500}
.toggle-chip.active:after{content:' ✓';font-size:.6875rem}
[data-theme="dark"] .toggle-chip{background:#1f272f;border-color:#2d3740;color:#a4b3a8}
[data-theme="dark"] .toggle-chip.active{background:#2b3d2c;border-color:#3d533c;color:#bcd6a8}

.lesson-position{font-family:var(--mono);color:#8b9a7e}
.lesson-actions{flex-wrap:wrap;align-items:center;gap:10px}
.lesson-share{margin-left:auto;font-size:.75rem!important}

.shortcut-list{display:grid;gap:10px;margin:18px 0}
.shortcut-list>div{display:flex;align-items:center;gap:13px;font-size:.9375rem;color:#687c59}
kbd{font-family:var(--mono);font-size:.8125rem;min-width:34px;text-align:center;padding:5px 9px;border-radius:6px;background:#f1f6ec;border:1px solid #dde7d3;border-bottom-width:2px;color:#4f6a3e}
[data-theme="dark"] kbd{background:#242e37;border-color:#334049;color:#c2d6b2}
#report-actions .settings-actions{margin-top:14px}
@media(max-width:600px){.toggle-chip{font-size:.8125rem;padding:8px 14px}.heatmap-panel{padding:18px 18px 15px}.heatmap-hint{font-size:.8125rem}.shortcut-list>div{font-size:.9375rem}.lesson-share{margin-left:0;width:100%;justify-content:flex-start}}

/* ============ 零基础友好层：逐字拆解 + 人话词典 ============ */
.syntax-section{margin:20px 0 24px;padding:18px 20px;border-radius:16px;background:#f6faf2;border:1px solid #e0ebd6}
[data-theme="dark"] .syntax-section{background:#1a2620;border-color:#2b3a30}
.syntax-head{display:flex;align-items:center;gap:9px;font-weight:700;font-size:.9375rem;color:#2f5233;margin-bottom:14px}
[data-theme="dark"] .syntax-head{color:#b9d8a6}
.syntax-head svg{width:18px;height:18px;flex:none}
.syntax-head span{font-weight:400;color:#7b8f70;font-size:.8125rem;margin-left:2px}
[data-theme="dark"] .syntax-head span{color:#8ba396}

.syntax-card{background:#fff;border:1px solid #e6eee0;border-radius:13px;padding:15px 17px;margin-bottom:12px}
[data-theme="dark"] .syntax-card{background:#121a16;border-color:#26332c}
.syntax-card:last-child{margin-bottom:0}
.syntax-code{font-family:var(--mono,ui-monospace,SFMono-Regular,Menlo,monospace);font-size:.9375rem;background:#193e34;color:#d4f7bb;border-radius:9px;padding:11px 14px;overflow-x:auto;white-space:pre}
.syntax-say{margin:12px 0 14px;padding-left:11px;border-left:3px solid #a8cf8a;color:#33482f;font-size:.9375rem;line-height:1.75}
[data-theme="dark"] .syntax-say{color:#c8dcc0;border-left-color:#5d8a4e}

.syntax-pieces{list-style:none;margin:0;padding:0;display:grid;gap:9px}
.syntax-pieces li{display:grid;grid-template-columns:minmax(74px,auto) 1fr;gap:12px;align-items:start}
.syntax-pieces code{font-family:var(--mono,ui-monospace,SFMono-Regular,Menlo,monospace);font-size:.8125rem;background:#eef4e8;color:#3c5c33;border:1px solid #dde8d4;border-radius:6px;padding:3px 8px;text-align:center;white-space:nowrap}
[data-theme="dark"] .syntax-pieces code{background:#22301f;color:#c3e0ae;border-color:#33452c}
.syntax-pieces span{font-size:.9375rem;line-height:1.75;color:#54685a}
[data-theme="dark"] .syntax-pieces span{color:#a9bcb0}

.syntax-qa{margin-top:14px;border-top:1px dashed #dbe6d3;padding-top:12px}
.syntax-qa summary{cursor:pointer;font-size:.875rem;font-weight:600;color:#4a6b3c;list-style:none;display:flex;align-items:center;gap:7px}
.syntax-qa summary::-webkit-details-marker{display:none}
.syntax-qa summary::before{content:"+";display:inline-grid;place-items:center;width:17px;height:17px;border-radius:5px;background:#e6f0dd;color:#4a6b3c;font-weight:700;font-size:.8125rem}
.syntax-qa[open] summary::before{content:"−"}
.syntax-qa>div{margin-top:11px;padding-left:24px}
.syntax-qa strong{display:block;font-size:.875rem;color:#2f4a33;margin-bottom:4px}
[data-theme="dark"] .syntax-qa strong{color:#b9d8a6}
.syntax-qa p{margin:0 0 11px;font-size:.875rem;line-height:1.8;color:#5c7266}
[data-theme="dark"] .syntax-qa p{color:#9db2a6}

/* 人话词典 */
.plain-terms-panel{margin-top:26px}
.plain-terms-panel .section-heading h2 span{font-weight:400;font-size:.75rem;letter-spacing:.1em;color:#9aad9f;margin-left:8px}
#plain-terms{display:grid;gap:8px}
.plain-term{border:1px solid #e6eee0;border-radius:12px;background:#fff;overflow:hidden}
[data-theme="dark"] .plain-term{background:#121a16;border-color:#26332c}
.plain-term summary{cursor:pointer;list-style:none;display:grid;grid-template-columns:auto auto 1fr;align-items:center;gap:11px;padding:13px 16px;font-size:.9375rem}
.plain-term summary::-webkit-details-marker{display:none}
.plain-term summary code{font-family:var(--mono,ui-monospace,SFMono-Regular,Menlo,monospace);font-size:.875rem;font-weight:700;color:#193e34;background:#edf3e5;border-radius:6px;padding:3px 9px;white-space:nowrap}
[data-theme="dark"] .plain-term summary code{color:#cfeeb8;background:#22301f}
.plain-term summary small{font-size:.75rem;color:#a3b3a6;letter-spacing:.02em}
.plain-term summary>span{color:#56695c;font-size:.875rem;text-align:right}
[data-theme="dark"] .plain-term summary>span{color:#a0b4a8}
.plain-term summary::after{content:"+";grid-column:4;justify-self:end;color:#9ab08f;font-weight:700}
.plain-term[open] summary::after{content:"−"}
.plain-term summary{grid-template-columns:auto auto 1fr auto}
.plain-term-body{padding:0 16px 15px;border-top:1px dashed #e6eee0;margin-top:0}
[data-theme="dark"] .plain-term-body{border-top-color:#26332c}
.plain-like{display:flex;gap:8px;align-items:flex-start;margin:13px 0 9px!important;padding:10px 12px;border-radius:9px;background:#f7faf3;font-size:.875rem;color:#4a6b3c!important;line-height:1.7}
[data-theme="dark"] .plain-like{background:#1a2620;color:#b9d8a6!important}
.plain-like svg{width:15px;height:15px;flex:none;margin-top:3px}
.plain-term-body>p:last-child{margin:0;font-size:.875rem;line-height:1.85;color:#5c7266}
[data-theme="dark"] .plain-term-body>p:last-child{color:#9db2a6}

@media(max-width:640px){
  .syntax-pieces li{grid-template-columns:1fr;gap:5px}
  .syntax-pieces code{justify-self:start}
  .plain-term summary{grid-template-columns:auto 1fr;gap:8px}
  .plain-term summary small{display:none}
  .plain-term summary>span{text-align:left;grid-column:1/-1;font-size:.8125rem}
  .plain-term summary::after{grid-column:2;grid-row:1}
}

/* ============ 报错急救 ============ */
.error-howto{margin-bottom:22px}
.error-howto-list{display:grid;gap:14px;margin-top:16px}
.error-howto-item{display:grid;grid-template-columns:30px 1fr;gap:13px;align-items:start}
.error-howto-num{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#edf3e5;color:#4a6b3c;font-weight:700;font-size:.8125rem}
[data-theme="dark"] .error-howto-num{background:#22301f;color:#c3e0ae}
.error-howto-item strong{display:block;font-size:.9375rem;color:#2f4a33;margin-bottom:4px}
[data-theme="dark"] .error-howto-item strong{color:#b9d8a6}
.error-howto-item p{margin:0;font-size:.875rem;line-height:1.8;color:#5c7266}
[data-theme="dark"] .error-howto-item p{color:#9db2a6}

.error-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:20px}
.error-search{flex:1;min-width:240px}
.error-count-hint{font-size:.8125rem;color:#8b9a90;white-space:nowrap}
[data-theme="dark"] .error-count-hint{color:#7e9389}

.error-group{margin-bottom:26px}
.error-group:last-of-type{margin-bottom:0}
.error-group-head{margin-bottom:12px}
.error-group-head h2{font-size:1.0625rem;color:#2f4a33;margin:0 0 5px}
[data-theme="dark"] .error-group-head h2{color:#b9d8a6}
.error-group-head p{margin:0;font-size:.8125rem;line-height:1.75;color:#7b8f80}
[data-theme="dark"] .error-group-head p{color:#8ba396}

.error-case{border:1px solid #e6eee0;border-left:3px solid #e0b9a4;border-radius:11px;background:#fff;margin-bottom:9px;overflow:hidden}
[data-theme="dark"] .error-case{background:#121a16;border-color:#26332c;border-left-color:#7a4a33}
.error-case[hidden]{display:none}
.error-case summary{cursor:pointer;list-style:none;padding:12px 15px;display:grid;gap:5px}
.error-case summary::-webkit-details-marker{display:none}
.error-title{font-size:.9375rem;font-weight:600;color:#3d332c;display:flex;align-items:center;gap:8px}
[data-theme="dark"] .error-title{color:#e2d5c8}
.error-title::before{content:"✕";display:inline-grid;place-items:center;width:17px;height:17px;border-radius:5px;background:#fbeee6;color:#b4552f;font-size:.6875rem;font-weight:700;flex:none}
.error-case[open] .error-title::before{content:"!";background:#fde3d5}
.error-raw{font-family:var(--mono,ui-monospace,SFMono-Regular,Menlo,monospace);font-size:.8125rem;color:#a0644a;background:#fdf6f2;border-radius:6px;padding:4px 9px;overflow-x:auto;white-space:pre-wrap;word-break:break-word}
[data-theme="dark"] .error-raw{color:#e0a887;background:#241a15}

.error-body{padding:2px 15px 15px;border-top:1px dashed #e6eee0}
[data-theme="dark"] .error-body{border-top-color:#26332c}
.error-plain{margin:13px 0 12px!important;padding:10px 12px;border-radius:9px;background:#f7faf3;font-size:.9375rem;line-height:1.75;color:#3f5b4a!important}
[data-theme="dark"] .error-plain{background:#1a2620;color:#c8dcc0!important}
.error-body p{margin:0 0 11px;font-size:.875rem;line-height:1.85;color:#5c7266}
[data-theme="dark"] .error-body p{color:#9db2a6}
.error-body strong{display:block;font-size:.75rem;letter-spacing:.06em;color:#93a698;font-weight:600;margin-bottom:3px;text-transform:uppercase}
[data-theme="dark"] .error-body strong{color:#7e9389}
.error-body .text-button{margin-top:4px}
.error-empty{text-align:center;color:#8b9a90;font-size:.875rem;line-height:1.85;padding:26px 10px}

@media(max-width:640px){
  .error-toolbar{flex-direction:column;align-items:stretch}
  .error-count-hint{text-align:center}
  .error-howto-item{grid-template-columns:26px 1fr;gap:10px}
  .error-howto-num{width:26px;height:26px}
}

/* ============ 掌握检验（答题通过才计入进度） ============ */
.check-lead{font-size:.875rem;color:#687c59;margin:0 0 16px;line-height:1.8}
[data-theme="dark"] .check-lead{color:#9db2a6}
.check-progress{display:flex;justify-content:space-between;align-items:center;font-size:.8125rem;color:#8b9a90;margin-bottom:14px;gap:12px}
.check-dots{display:flex;gap:6px}
.check-dot{width:9px;height:9px;border-radius:50%;background:#e2e9dd;transition:transform .2s}
.check-dot.is-now{background:#8fb96a;transform:scale(1.2)}
.check-dot.is-ok{background:#5b8c3e}
.check-dot.is-bad{background:#c9774f}
.check-card{background:#fbfdf9;border:1px solid #e6eee0;border-radius:14px;padding:18px}
[data-theme="dark"] .check-card{background:#121a16;border-color:#26332c}
.check-ask{margin:0 0 12px;font-size:.9375rem;font-weight:600;color:#2f4a33;line-height:1.7}
[data-theme="dark"] .check-ask{color:#b9d8a6}
.check-code{margin:0 0 14px;padding:12px 14px;border-radius:9px;background:#193e34;color:#d4f7bb;font-family:var(--mono,ui-monospace,Menlo,monospace);font-size:.8125rem;line-height:1.7;overflow-x:auto}
.check-code pre{margin:0;white-space:pre;font-family:inherit}
.check-code code{font-family:inherit}
.check-input{width:100%;box-sizing:border-box;border:1px solid #dde7d3;border-radius:10px;padding:11px 13px;font-family:var(--mono,ui-monospace,Menlo,monospace);font-size:.875rem;line-height:1.7;resize:vertical;background:#fff;color:#20402f}
[data-theme="dark"] .check-input{background:#0f1a15;border-color:#2b3a30;color:#cfeeb8}
.check-input:focus{outline:2px solid #a8cf8a;outline-offset:1px}
.check-hint-row{display:flex;align-items:center;gap:14px;margin-top:10px;flex-wrap:wrap}
.check-ai-state{font-size:.8125rem;color:#8b9a90}
.check-tip{margin-top:14px;padding:11px 14px;border-radius:10px;background:#fdf7e8;border:1px solid #f0e3c2;font-size:.875rem;line-height:1.8;color:#7a6438}
[data-theme="dark"] .check-tip{background:#241f12;border-color:#4a3f22;color:#d8c48c}
.check-tip strong{display:block;font-size:.75rem;letter-spacing:.06em;color:#a89158;margin-bottom:4px}
.check-tip p{margin:0}
.check-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:20px}
.check-result-list{list-style:none;margin:0 0 8px;padding:0;display:grid;gap:12px}
.check-result-list li{display:grid;grid-template-columns:auto 1fr;gap:11px;align-items:start;padding:12px 14px;border:1px solid #e6eee0;border-radius:11px;background:#fff}
[data-theme="dark"] .check-result-list li{background:#121a16;border-color:#26332c}
.check-res{font-size:.75rem;font-weight:700;border-radius:6px;padding:3px 8px;white-space:nowrap}
.check-res.ok{background:#e8f3dd;color:#4d7a2e}
.check-res.bad{background:#fbeee6;color:#b4552f}
.check-res-ask{font-size:.875rem;color:#5c7266;line-height:1.7}
[data-theme="dark"] .check-res-ask{color:#9db2a6}
.check-explain{grid-column:2;margin:6px 0 0;font-size:.875rem;line-height:1.8;color:#3f5b4a;background:#f7faf3;border-radius:8px;padding:9px 11px}
[data-theme="dark"] .check-explain{background:#1a2620;color:#c8dcc0}

/* ============ 网页内视频播放器 ============ */
.player-panel{margin-bottom:24px}
.player-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}
.player-head h2{margin:0 0 6px;font-size:1.0625rem;color:#2f4a33}
[data-theme="dark"] .player-head h2{color:#b9d8a6}
.player-head p{margin:0;font-size:.8125rem;line-height:1.75;color:#7b8f80}
.player-head svg{width:20px;height:20px;color:#9aad9f;flex:none}
.player-frame{position:relative;width:100%;aspect-ratio:16/9;background:#0f1a15;border-radius:14px;overflow:hidden;display:grid;place-items:center}
.player-iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
.player-placeholder{text-align:center;color:#7e9389;font-size:.875rem;padding:20px;line-height:1.8}
.player-placeholder svg{width:30px;height:30px;margin-bottom:8px;opacity:.55}
.player-placeholder p{margin:0}
.player-foot{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-top:12px;font-size:.8125rem;color:#7b8f80}
.player-foot select{border:1px solid #dde7d3;border-radius:7px;padding:4px 7px;font-size:.8125rem;background:#fff;color:#3f5b4a;font-family:inherit}
[data-theme="dark"] .player-foot select{background:#121a16;border-color:#2b3a30;color:#c3d6c9}
.player-note{color:#9aad9f}
.lesson-video-row{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:12px 0}
.video-outside{font-size:.8125rem;color:#8b9a90;text-decoration:underline}
.lesson-video-slot:empty{display:none}
.inline-player{margin-top:14px}
.inline-player .player-iframe{position:relative;inset:auto;width:100%;aspect-ratio:16/9;border-radius:12px;background:#0f1a15}
.inline-player-foot{display:flex;justify-content:space-between;gap:12px;font-size:.8125rem;color:#8b9a90;margin-top:8px;flex-wrap:wrap}
button.video-link{border:0;background:none;font:inherit;cursor:pointer;padding:0}

@media(max-width:640px){
  .check-card{padding:15px}
  .player-foot{gap:10px;font-size:.75rem}
  .player-note{display:none}
}

/* ============ 打印样式：速查手册 / 知识点页可以直接按 Ctrl+P 印成纸 ============ */
@media print{
  @page{margin:12mm}
  html{color-scheme:light}
  html,body{background:#fff!important;color:#111!important}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}

  /* 屏幕上能点的东西，纸上没有意义，全部不印 */
  .sidebar,.topbar,.footer,.menu-overlay,.toast,.skip-link,
  .filter-bar,.hero-actions,.hero-code-wrap,.learning-aside,
  .icon-button,.text-button,.guide-button,.theme-toggle,.nav-item,
  .exam-filters,.plan-switch,.video-topic-panel,.resource-intro,
  .quiz-card,.semester-notice,.continue-card,#dialog-close{display:none!important}

  /* 侧栏让出来的位置收回，正文占满整页 */
  .app-shell,.main-shell,main{display:block!important;margin:0!important;padding:0!important;max-width:none!important;width:auto!important}
  .page-heading h1{font-size:22pt}
  .page-heading p{color:#444!important}

  /* 卡片不要被切断在两页之间 */
  .panel,.stage-card,.handbook-card,.exam-question-card,.lesson-card,.project-card{
    break-inside:avoid;page-break-inside:avoid;
    box-shadow:none!important;border:1px solid #c9d3cc!important;background:#fff!important}

  /* 链接把网址印出来，纸上才知道去哪儿 */
  a{color:#111!important;text-decoration:underline}
  a[href^="http"]::after{content:" (" attr(href) ")";font-size:8pt;color:#555;word-break:break-all}

  /* 代码块保持浅底，别把深色主题印成一片黑 */
  pre,.code-block,.code-window{background:#f6f8f5!important;border:1px solid #dde5d8!important;color:#1b2b22!important}
  pre code,.code-block code{color:#1b2b22!important}

  /* 纸上是折叠不了的：把逐字拆解和词典内容全部展开 */
  details.syntax-qa>div,.plain-term-body,.error-body{display:block!important}
  .syntax-qa summary::before,.plain-term summary::after{content:none}
  .error-title::before{content:none}
  /* 播放器和答题交互在纸上没有意义 */
  .player-panel,.inline-player,.check-hint-row,.check-actions,.check-ai-state{display:none!important}
  .syntax-code{background:#193e34!important;color:#d4f7bb!important}
  .syntax-section{border:1px solid #c9d3cc!important;background:#fff!important}
}

/* ============ 全站搜索 ============ */
.topbar-search{display:inline-flex;align-items:center;gap:8px;border:1px solid #e3e8e4;background:#f7f9f9;color:#6b7f74;border-radius:999px;padding:6px 13px 6px 11px;font:inherit;font-size:.8125rem;cursor:pointer;transition:border-color .16s,background .16s}
.topbar-search:hover{border-color:#c7d6c0;background:#f1f6ec}
.topbar-search svg{width:15px;height:15px;flex:none}
.topbar-search kbd{font-family:var(--mono,ui-monospace,Menlo,monospace);font-size:.6875rem;background:#fff;border:1px solid #dfe6da;border-radius:5px;padding:1px 5px;color:#8b9a90}
[data-theme="dark"] .topbar-search{background:#161f1a;border-color:#27332c;color:#9db2a6}
[data-theme="dark"] .topbar-search:hover{background:#1c2721;border-color:#37473d}
[data-theme="dark"] .topbar-search kbd{background:#0f1a15;border-color:#2b3a30;color:#7e9389}

.search-lead{margin:0 0 14px;font-size:.875rem;line-height:1.8;color:#687c59}
[data-theme="dark"] .search-lead{color:#9db2a6}
.search-lead kbd{font-family:var(--mono,ui-monospace,Menlo,monospace);font-size:.75rem;background:#f1f6ec;border:1px solid #dde7d3;border-radius:5px;padding:1px 6px;color:#4f6a3e}
[data-theme="dark"] .search-lead kbd{background:#22301f;border-color:#33452c;color:#c3e0ae}

.search-box{display:flex;align-items:center;gap:10px;border:1px solid #dde7d3;border-radius:12px;padding:11px 15px;background:#fff;margin-bottom:16px}
.search-box:focus-within{border-color:#a8cf8a;box-shadow:0 0 0 3px rgba(168,207,138,.18)}
.search-box svg{width:17px;height:17px;color:#9aad9f;flex:none}
.search-box input{border:0;outline:0;background:transparent;font:inherit;font-size:1rem;width:100%;color:#20402f}
[data-theme="dark"] .search-box{background:#121a16;border-color:#2b3a30}
[data-theme="dark"] .search-box input{color:#cfeeb8}

.search-results{min-height:60px}
.search-hint,.search-empty{font-size:.875rem;line-height:1.85;color:#8b9a90;margin:8px 0}
.search-empty code{background:#f2f5f1;border-radius:5px;padding:1px 6px;font-size:.9em;color:#3f5b4a}
.search-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.search-hit{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center;width:100%;text-align:left;border:1px solid #e9efe4;background:#fff;border-radius:10px;padding:10px 13px;font:inherit;cursor:pointer;transition:border-color .14s,background .14s}
.search-hit:hover{border-color:#bcd7ab;background:#f8fbf5}
[data-theme="dark"] .search-hit{background:#121a16;border-color:#26332c}
[data-theme="dark"] .search-hit:hover{background:#1a2620;border-color:#3a5244}
.search-kind{font-size:.6875rem;font-weight:700;border-radius:6px;padding:3px 8px;white-space:nowrap;letter-spacing:.03em}
.search-kind.kind-lesson{background:#edf3e5;color:#4d7a2e}
.search-kind.kind-exam{background:#e8eef8;color:#3f5c92}
.search-kind.kind-error{background:#fbeee6;color:#b4552f}
.search-kind.kind-term{background:#f1edf8;color:#6b57a0}
[data-theme="dark"] .search-kind.kind-lesson{background:#22301f;color:#c3e0ae}
[data-theme="dark"] .search-kind.kind-exam{background:#1c2431;color:#a8c0e8}
[data-theme="dark"] .search-kind.kind-error{background:#241a15;color:#e0a887}
[data-theme="dark"] .search-kind.kind-term{background:#221d2e;color:#c3b6e8}
.search-hit-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.search-hit-main strong{font-size:.9375rem;color:#2f4a33;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
[data-theme="dark"] .search-hit-main strong{color:#b9d8a6}
.search-hit-main small{font-size:.75rem;color:#8b9a90;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 从搜索跳过去时闪一下，方便眼睛定位 */
@keyframes searchFlash{0%{box-shadow:0 0 0 0 rgba(143,185,106,.55)}70%{box-shadow:0 0 0 8px rgba(143,185,106,0)}100%{box-shadow:0 0 0 0 rgba(143,185,106,0)}}
.is-flash{animation:searchFlash 1.4s ease-out 1}

@media(max-width:900px){
  .topbar-search span:not([data-icon]){display:none}
  .topbar-search kbd{display:none}
  .topbar-search{padding:7px 10px}
}
@media(max-width:640px){
  .topbar-motto,.topbar-divider{display:none}
  .search-hit{grid-template-columns:1fr;gap:6px}
  .search-kind{justify-self:start}
}

