/* 暖纸学院：主题只在这里定义，课程文档不携带页面样式。 */
:root {
  color-scheme: light;
  --paper: var(--lesson-color-fbf6ed,#fbf6ed);
  --paper-raised: var(--lesson-color-fffaf2,#fffaf2);
  --ink: var(--lesson-color-492b19,#492b19);
  --ink-soft: var(--lesson-color-795b45,#795b45);
  --muted: var(--lesson-color-84674f,#84674f);
  --line: var(--lesson-color-e7d2bd,#e7d2bd);
  --line-soft: var(--lesson-color-efdfce,#efdfce);
  --accent: var(--lesson-color-b15317,#b15317);
  --accent-hover: var(--lesson-color-a7460d,#a7460d);
  --accent-soft: var(--lesson-color-fce6c9,#fce6c9);
  --honey: var(--lesson-color-edb44f,#edb44f);
  --coral: var(--lesson-color-e87a4e,#e87a4e);
  --sage: var(--lesson-color-738746,#738746);
  --comment: var(--lesson-color-426244,#426244);
  --code-background: var(--lesson-color-f5eddf,#f5eddf);
  --radius: 12px;
  --sans: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button svg, a svg, summary svg { vertical-align: middle; flex: 0 0 auto; }
a { color: var(--accent-hover); text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, [data-handle]:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-150%); background: var(--paper-raised); padding: 12px; }
.skip-link:focus { transform: none; }
/* 页眉覆盖整个窗口；内侧内容与分割线仍按原1480px版心居中。 */
.site-header { min-height: 76px; padding: 12px max(42px, calc((100% - 1396px) / 2)); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; }
.site-header::after { content: ''; position: absolute; bottom: 0; left: max(32px, calc((100% - 1416px) / 2)); right: max(32px, calc((100% - 1416px) / 2)); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); display: inline-flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.brand img { object-fit: contain; width: 43px; height: 34px; }
.brand:has(.brand-wordmark) img{width:44px;height:44px;}
.brand-wordmark{display:flex;flex-direction:column;gap:3px;line-height:1.25;}
.brand-wordmark>span{font-size:12px;letter-spacing:2px;color:var(--accent);font-weight:650;}
.brand .brand-wordmark strong{font-size:19px;letter-spacing:.5px;}
.home-header-links{display:flex;gap:30px;align-items:center;}
.home-header-links a{font-size:14px;color:var(--ink-soft);text-decoration:none;}
.home-header-links a:hover{color:var(--accent);text-decoration:underline;}
@media(max-width:1050px){.home-header-links{display:none;}.brand:has(.brand-wordmark){gap:9px;}.brand .brand-wordmark strong{font-size:17px;}.brand-wordmark>span{font-size:11px;}}
@media(max-width:600px){.brand:has(.brand-wordmark) img{width:36px;height:36px;}.brand .brand-wordmark strong{font-size:15px;letter-spacing:0;}.brand-wordmark>span{font-size:10px;letter-spacing:1px;}}
.brand strong { font-weight: 750; font-size: 24px; letter-spacing: 1px; }
.brand-tagline { border-left: 1px solid var(--lesson-color-c8a98a,#c8a98a); margin-left: 3px; padding-left: 16px; color: var(--lesson-color-8d581f,#8d581f); font-size: 13px; letter-spacing: 1px; }
.header-lesson { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 650; font-size: 16px; letter-spacing: 1px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.utility-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border: 1px solid transparent; border-radius: 20px; background: var(--lesson-color-fae9ce,#fae9ce); font-size: 14px; font-weight: 550; }
.utility-button:hover, .utility-button[aria-pressed=true] { background: var(--lesson-color-f5d7ac,#f5d7ac); border-color: var(--lesson-color-edc692,#edc692); }
.step-navigation { display: flex; align-items: center; gap: 30px; max-width: 1280px; margin: 0 auto; padding: 0 28px; min-height: 82px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-padding-inline: 20px; scrollbar-width: thin; scrollbar-color: var(--lesson-color-bc8a58,#bc8a58) var(--lesson-color-f1e4d3,#f1e4d3); background: linear-gradient(to right, var(--paper) 35%, transparent) left / 24px 100% no-repeat local, linear-gradient(to left, var(--paper) 35%, transparent) right / 24px 100% no-repeat local, linear-gradient(to right, #a77c4f24, transparent) left / 12px 100% no-repeat scroll, linear-gradient(to left, #a77c4f24, transparent) right / 12px 100% no-repeat scroll; }
.has-course-header { padding-top: var(--lesson-header-height, 76px); }
.has-course-header > .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 70; background: var(--paper); }
.has-lesson-navigation .step-navigation { position: sticky; top: var(--lesson-header-height, 76px); z-index: 60; background-color: var(--paper); }
.has-course-header :is(.lesson-step, .step-title, .lesson-main) { scroll-margin-top: calc(var(--lesson-header-height, 76px) + var(--lesson-navigation-height, 0px) + 24px); }
.step-tab { display: flex; justify-content: center; align-items: center; flex: 1; position: relative; gap: 10px; padding: 20px 0; background: transparent; border: 0; font-size: 16px; letter-spacing: .5px; white-space: nowrap; color: var(--ink-soft); }
.step-tab:not(:last-child)::after { content: ''; position: absolute; top: 50%; width: 24%; left: calc(100% - 20px); height: 1px; background: var(--line); }
.step-number { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink); background: var(--lesson-color-bca083,#bca083); font-family: Georgia, serif; font-size: 20px; }
.step-tab.is-active { color: var(--lesson-color-a94a11,#a94a11); font-weight: 650; }
.step-tab.is-active .step-number { background: var(--accent); color: var(--paper-raised); }
.step-tab.is-active::before { content: ''; position: absolute; bottom: -2px; left: 23%; right: 23%; height: 3px; border-radius: 50%; background: var(--accent); transform: rotate(-1deg); }
.step-tab.is-completed .step-number { background: #a78f75; color: var(--lesson-color-3f2514,#3f2514); }
.step-navigation.is-long { min-height:88px; gap:18px; padding-bottom:7px; }
.step-navigation.is-long .step-tab { flex: 1 0 auto; min-width:112px; }
@supports selector(::-webkit-scrollbar) {
  .step-navigation { scrollbar-width:auto; scrollbar-color:auto; }
  .step-navigation::-webkit-scrollbar { height:7px; }
  .step-navigation::-webkit-scrollbar-track { background:var(--lesson-color-f1e4d3,#f1e4d3); border-radius:8px; margin-inline:14px; }
  .step-navigation::-webkit-scrollbar-thumb { background:var(--lesson-color-bc8a58,#bc8a58); border:1px solid var(--paper); border-radius:8px; }
  .step-navigation::-webkit-scrollbar-thumb:hover { background:var(--lesson-color-a96a32,#a96a32); }
  .step-navigation::-webkit-scrollbar-corner { background:var(--paper); }
}
.lesson-main { max-width: 1360px; margin: 0 auto; padding: 0 35px 20px; }
.step-heading { padding: 44px 0 30px; text-align: center; }
.step-kicker { display: block; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 1px; margin-bottom: 10px; }
.step-kicker span { color: var(--line); margin: 0 7px; }
h1 { margin: 0; font-size: clamp(24px, 2.55vw, 36px); font-weight: 720; letter-spacing: 1.5px; line-height: 1.5; }
.step-heading .step-title { text-wrap: balance; }
.heading-underline { display: block; width: 210px; max-width: 40%; margin: 9px auto 0; border-top: 3px solid var(--honey); border-radius: 50%; transform: rotate(-1deg); }
.learning-workspace { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 30px; }
.visual-slot, .code-slot, .guide-slot, .lesson-aside { min-width: 0; }
.scene { width: 100%; }
.scene-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 12px; gap: 12px; }
.scene-eyebrow { font-size: 12px; color: var(--muted); letter-spacing: .6px; }
.text-button { padding: 4px 0; background: transparent; border: none; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 13px; }
.text-button:hover { color: var(--accent-hover); }
.scene-stage { display: flex; gap: 24px; align-items: center; }
.plot-region { flex: 1; min-width: 0; }
.plot-labels { display: grid; grid-template-columns: 1fr; text-align: center; gap: 38px; }
.scene[data-mode=compare] .plot-labels { grid-template-columns: 1fr 1fr; }
.plot-labels span { justify-self: center; padding: 6px 20px; background: var(--lesson-color-fbe5bf,#fbe5bf); border-radius: 24px; font-weight: 650; font-size: 16px; letter-spacing: 1px; }
.scene-svg { width: 100%; }
.plot-pair { display: grid; grid-template-columns: minmax(0,1fr) 26px minmax(0,1fr); gap: 10px; align-items: center; }
.math-plot { min-width: 0; width: 100%; }
.math-plot > svg { display: block; width: 100%; overflow: visible; }
.plot-transition { color: var(--lesson-color-d79540,#d79540); font-family: Georgia, serif; font-size: 35px; align-self: center; }
.scene-aside { flex: 0 0 230px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 30px; }
.matrix-control { border: 1px solid var(--lesson-color-d8b48e,#d8b48e); background: rgba(255,250,242,.6); border-radius: var(--radius); padding: 14px 16px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; }
.matrix-control > span { font-size: 13px; white-space: nowrap; }
.matrix-inputs { display: grid; grid-template-columns: repeat(2, 42px); gap: 5px; border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); padding: 3px 7px; }
.matrix-inputs input { width: 42px; min-width: 0; text-align: center; padding: 3px 0; border: 0; border-radius: 3px; color: var(--ink); background: transparent; appearance: textfield; font-family: Georgia, serif; font-size: 19px; }
.matrix-inputs input::-webkit-inner-spin-button { opacity: 0; }
.matrix-inputs:hover input { background: var(--paper-raised); }
.matrix-inputs input:focus { background: white; }
.scene-identity { font-size: 14px; max-width: 100%; }
.scene-identity .katex-display { margin: 0; }
.scene-legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); }
.scene-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.legend-line { display: inline-block; width: 15px; border-top: 2px solid var(--accent); }
.legend-line.original { border-color: #9b8d7c; border-top-style: dashed; }
.animation-controls { display: flex; align-items: center; gap: 28px; padding: 12px 16px 17px; }
.play-button { display: inline-flex; justify-content: center; align-items: center; width: 43px; height: 37px; flex-shrink: 0; border: 1px solid var(--lesson-color-d79640,#d79640); border-radius: 10px; color: var(--ink); background: var(--lesson-color-f8d28d,#f8d28d); }
.play-button[aria-pressed=true] { background: #edbc67; }
.animation-track { flex: 1; min-width: 0; padding-top: 20px; }
input[type=range] { accent-color: var(--accent); }
.animation-track > input { display: block; width: 100%; height: 5px; margin: 0; cursor: pointer; }
.animation-milestones { display: flex; justify-content: space-between; margin: 10px 4% 0 5%; }
.animation-milestones button { border: 0; border-radius: 18px; padding: 4px 13px; background: transparent; color: var(--muted); font-size: 12px; }
.animation-milestones button.is-reached { color: var(--lesson-color-98501d,#98501d); background: var(--lesson-color-fae8cd,#fae8cd); }
.time-label { font-family: var(--mono); font-size: 12px; white-space: nowrap; color: var(--ink-soft); }
.guide-slot { display: flex; align-items: baseline; gap: 30px; padding: 30px 7px 24px; border-top: 1px solid var(--line); margin-top: 6px; }
.guide-label { display: inline-flex; align-items: center; white-space: nowrap; gap: 8px; font-size: 14px; font-weight: 650; padding: 8px 15px; background: var(--lesson-color-fbe8c8,#fbe8c8); border-radius: 25px; }
.guide-label > span:last-child { color: var(--lesson-color-77583c,#77583c); font-weight: 400; font-size: 13px; margin-left: 4px; }
.guide-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.guide-content { flex: 1; font-size: 17px; line-height: 1.85; }
.guide-content p { margin: 0 0 18px; }
.guide-content p:last-child { margin-bottom: 0; }
.guide-content strong { font-weight: 650; }
.guide-content ul, .guide-content ol { padding-left: 22px; margin: 16px 0 24px; }
.guide-content li + li { margin-top: 9px; }
.guide-content .inline-code { font-size: .9em; }
.lesson-actions { padding: 24px 5px 40px; display: flex; align-items: center; position: relative; gap: 14px; flex-wrap: wrap; }
.lesson-actions > [data-prev] { position: absolute; left: 5px; }
.discovery-actions { display: flex; gap: 13px; align-items: center; justify-content: center; flex: 1; flex-wrap: wrap; padding-left: 95px; padding-right: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 43px; padding: 9px 22px; border-radius: 24px; border: 1px solid var(--lesson-color-d2a77a,#d2a77a); background: transparent; color: var(--ink); font-size: 14px; font-weight: 550; text-decoration: none; white-space: nowrap; transition: background .16s, border-color .16s, transform .16s; }
.button:hover:not(:disabled) { background: var(--lesson-color-f7e7d1,#f7e7d1); border-color: var(--lesson-color-c68f55,#c68f55); }
.button-primary, .header-actions .utility-button, .account-control > .utility-button { color: var(--lesson-color-fffaf0,#fffaf0); background: var(--accent); border-color: var(--accent); }
.button-primary { padding-left: 27px; padding-right: 27px; }
.header-actions .utility-button, .account-control > .utility-button { min-width: 44px; border-radius: 999px; }
.button-primary:hover:not(:disabled), .header-actions .utility-button:hover:not(:disabled), .header-actions .utility-button[aria-pressed=true], .account-control > .utility-button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-small { min-height: 36px; padding: 5px 13px; font-size: 13px; }
.button-small:not(.button-primary) { background: var(--lesson-color-f8e4c4,#f8e4c4); }
.button-quiet:disabled { visibility: hidden; }
.completion-message { flex-basis: 100%; text-align: center; font-size: 12px; color: var(--ink-soft); margin: 0; }
.inline-disclosure summary::-webkit-details-marker { display: none; }
.template-split .learning-workspace, .template-practice .learning-workspace { grid-template-columns: minmax(0,var(--visual-ratio)) minmax(260px,var(--text-ratio)); gap: 26px; align-items: center; }
.template-split .guide-slot, .template-practice .guide-slot { display: block; border: 0; border-left: 1px solid var(--line); padding: 12px 0 12px 26px; margin: 0; }
.template-split .guide-content, .template-practice .guide-content { font-size: 16px; margin-top: 18px; }
.template-split .scene-stage, .template-practice .scene-stage, .template-demo-code .scene-stage { flex-direction: column; gap: 4px; }
.template-split .plot-region, .template-practice .plot-region, .template-demo-code .plot-region { width: 100%; }
.template-split .scene-aside, .template-practice .scene-aside, .template-demo-code .scene-aside { flex: initial; flex-direction: row; width: 100%; justify-content: center; gap: 15px; }
.template-split .matrix-control, .template-practice .matrix-control, .template-demo-code .matrix-control { width: auto; padding: 8px 12px; }
.template-split .scene-legend, .template-practice .scene-legend, .template-demo-code .scene-legend { display: none; }
.template-demo-code .learning-workspace { grid-template-columns: minmax(0,var(--visual-ratio)) minmax(0,var(--text-ratio)); gap: 20px 30px; align-items: center; }
.template-demo-code .guide-slot { grid-column: 1 / -1; }
.code-slot .code-block { margin: 0; }
.code-block { background: var(--code-background); border: 1px solid var(--lesson-color-e4d2bb,#e4d2bb); border-radius: var(--radius); overflow: hidden; margin: 16px 0; }
.code-block figcaption { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--lesson-color-e4d2bb,#e4d2bb); background: rgba(255,250,242,.55); font-size: 13px; }
.code-title { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.code-language { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; padding: 6px; border: 0; border-radius: 6px; background: transparent; }
.icon-button:hover { background: var(--lesson-color-efdbbd,#efdbbd); }
.code-block pre { margin: 0; overflow-x: auto; padding: 14px 0; line-height: 1.9; tab-size: 4; }
.code-block code { font-family: var(--mono); font-size: 13px; }
.code-line { display: flex; min-width: max-content; padding: 1px 14px 1px 0; border-left: 3px solid transparent; }
.code-line.is-focused { background: var(--lesson-color-f4dcae,#f4dcae); border-left-color: var(--accent); }
.line-number { width: 38px; flex: 0 0 38px; padding-right: 11px; text-align: right; color: var(--muted); user-select: none; font-size: 11px; }
.line-content { display: block; padding-right: 8px; white-space: pre; }
.hljs-comment { color: var(--comment); font-family: var(--sans); font-weight: 600; }
.has-comment { background: rgba(106,130,72,.045); }
.hljs-keyword, .hljs-built_in { color: var(--lesson-color-925588,#925588); }
.hljs-number, .hljs-literal { color: var(--lesson-color-a55024,#a55024); }
.hljs-string { color: var(--lesson-color-657b34,#657b34); }
.hljs-title, .hljs-property, .hljs-attr { color: var(--lesson-color-2c6c7a,#2c6c7a); }
.code-caption { padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); }
.formula-block { text-align: center; padding: 10px 0; overflow-x: auto; }
.formula-block .katex-display { margin: 5px 0; }
.inline-code { padding: 2px 5px; border-radius: 4px; background: var(--lesson-color-f5e8d6,#f5e8d6); font-family: var(--mono); }
.inline-disclosure { margin-top: 22px; font-size: 14px; }
.inline-disclosure summary { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); cursor: pointer; list-style: none; }
.inline-disclosure > div { padding: 18px 0 14px; font-size: 14px; }
/* 这些小节的按需说明承担主要学习入口，保留原生折叠并扩大触点。 */
:is(#conv-parameters,#network-code,#pet-data,#pet-predict) .inline-disclosure > summary { min-height: 44px; font-size: 18px; line-height: 1.65; }
#pet-training .lesson-photo figcaption { font-size: 18px; }
#pet-training .lesson-photo figcaption strong { display: inline; font-size: inherit; }
.download-link { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; margin-top: 8px; }
.lesson-image, .lesson-video video { max-width: 100%; height: auto; border-radius: 8px; }
.lesson-video { margin: 12px 0; }
.lesson-video figcaption { font-size: 12px; color: var(--muted); }
.lesson-aside { font-size: 14px; line-height: 1.8; }
.task { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 15px; }
.task-label { display: flex; align-items: center; gap: 7px; color: var(--lesson-color-a45c22,#a45c22); font-size: 13px; font-weight: 600; }
.task-instruction { font-size: 13px; color: var(--ink-soft); margin-top: 9px !important; }
.answer-form { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.answer-form label { display: flex; align-items: center; gap: 6px; font-family: Georgia, serif; }
.answer-form input { width: 66px; padding: 7px; color: var(--ink); background: var(--paper-raised); border: 1px solid var(--lesson-color-d8b48e,#d8b48e); border-radius: 7px; font-size: 14px; }
.task-feedback { margin-top: 9px !important; font-size: 13px; color: var(--accent); }
.task-feedback:empty { display: none; }
.task-feedback.is-success { color: var(--lesson-color-486b38,#486b38); }
.task-hint { font-size: 12px; margin-top: 8px; color: var(--ink-soft); }
.task-hint summary { cursor: pointer; }
.home-main { max-width: 1120px; margin: 0 auto; padding: 68px 32px 25px; }
.eyebrow { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 1.8px; color: var(--muted); }
.home-intro { padding-bottom: 52px; border-bottom: 1px solid var(--line); }
.home-intro h1 { margin-top: 22px; font-size: clamp(28px, 4vw, 48px); line-height: 1.5; letter-spacing: 1px; }
.home-intro h1 em { color: var(--lesson-color-ab611f,#ab611f); font-style: normal; }
.home-intro p { color: var(--ink-soft); line-height: 1.9; font-size: 16px; max-width: 590px; margin: 20px 0 25px; }
.home-meta { margin-left: 18px; font-size: 12px; color: var(--muted); }
.home-courses { padding-top: 30px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 16px; }
.section-title h2 { margin: 0; font-size: 19px; font-weight: 650; }
.map-lesson { display: flex; align-items: center; gap: 22px; text-decoration: none; color: var(--ink); padding: 22px 5px; border-bottom: 1px solid var(--line-soft); }
.map-lesson:hover { color: var(--accent-hover); }
.map-lesson > span:nth-child(2) { display: grid; grid-template-columns: 1fr auto; flex: 1; gap: 7px 20px; }
.map-lesson small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.map-lesson strong { font-size: 18px; font-weight: 600; }
.map-lesson > span > span { font-size: 12px; color: var(--muted); align-self: center; }
.map-number { font-size: 25px; color: var(--lesson-color-9b6f3e,#9b6f3e); font-family: Georgia, serif; }
.home-footer { margin-top: 60px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
dialog { background: var(--paper-raised); color: var(--ink); padding: 28px; border: 1px solid var(--lesson-color-d9ba99,#d9ba99); border-radius: 16px; width: min(600px, calc(100% - 32px)); max-height: 85dvh; }
dialog::backdrop { background: rgba(56,36,18,.28); backdrop-filter: blur(3px); }
dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 10px; }
dialog h2 { font-size: 22px; margin: 10px 0 0; }
.region-switch { width: min(454px, calc(100% - 32px)); }
.region-switch p { margin: 14px 0 24px; line-height: 1.7; }
.region-switch-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.course-map-list { margin-top: 10px; }
.dialog-footnote { font-size: 12px; color: var(--muted); margin-top: 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--paper-raised); font-size: 13px; padding: 12px 20px; border-radius: 8px; max-width: calc(100% - 30px); text-align: center; transition: opacity .18s, transform .18s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1450px) {
  .scene-stage { gap: 30px; }
  .math-plot > svg { min-height: 340px; }
}
@media (max-width: 1150px) {
  .brand-tagline { display: none; }
  .header-lesson { position: static; transform: none; margin-left: auto; font-size: 14px; }
  .site-header { padding-left: 24px; padding-right: 24px; }
  .scene-aside { flex-basis: 195px; }
  .scene-identity { font-size: 12px; }
  .scene-stage { gap: 16px; }
  .matrix-control { flex-direction: column; gap: 7px; }
  .guide-content { font-size: 16px; }
  .template-demo-code .scene-aside { flex-wrap: wrap; }
  .template-demo-code .matrix-control { flex-direction: row; }
  .discovery-actions { padding-left: 105px; padding-right: 0; }
  .button { padding-left: 15px; padding-right: 15px; }
}
@media (max-width: 850px) {
  .header-lesson { display: none; }
  .header-actions { flex-shrink: 0; }
  .header-actions .utility-button { white-space: nowrap; }
  .lesson-main { padding: 0 22px 22px; }
  .scene-stage { flex-direction: column; gap: 4px; }
  .plot-region { width: 100%; }
  .scene-aside { flex-direction: row; width: 100%; flex: initial; justify-content: center; gap: 24px; padding: 4px 0; }
  .matrix-control { width: auto; flex-direction: row; padding: 7px 12px; }
  .scene-legend { display: none; }
  .animation-controls { gap: 18px; }
  .guide-slot { gap: 18px; }
  .guide-label { font-size: 12px; padding: 6px 10px; }
  .guide-content { font-size: 15px; }
  .template-split .learning-workspace, .template-practice .learning-workspace, .template-demo-code .learning-workspace { grid-template-columns: 1fr; gap: 18px; }
  .template-split .guide-slot, .template-practice .guide-slot { border: 0; border-top: 1px solid var(--line); padding: 18px 0 10px; }
  .template-demo-code .guide-slot { grid-column: auto; }
  .template-split .scene-aside, .template-practice .scene-aside { justify-content: center; }
  .lesson-actions > [data-prev] { position: static; }
  .discovery-actions { padding: 0; justify-content: flex-end; gap: 8px; }
  .discovery-actions .button { font-size: 12px; padding: 8px 12px; }
  .code-block code { font-size: 13px; }
  .code-block { max-width: 100%; }
}
@media (max-width: 600px) {
  .site-header { padding: 12px 16px; min-height: 65px; gap: 12px; }
  .site-header::after { left: 16px; right: 16px; }
  .brand { gap: 6px; }
  .brand img { width: 30px; height: 26px; }
  .brand strong { font-size: 19px; letter-spacing: 0; }
  .header-lesson { display: none; }
  .header-actions { gap: 5px; }
  .utility-button { min-height: 36px; padding: 6px 9px; }
  .utility-button > span { display: none; }
  .utility-button { min-width: 36px; }
  .step-navigation { min-height: 65px; gap: 6px; padding: 0 13px; }
  .step-navigation.is-long { min-height:72px; gap:8px; padding-bottom:6px; }
  .step-navigation.is-long .step-tab { min-width:104px; }
  .step-tab { font-size: 12px; gap: 5px; padding: 18px 0; }
  .step-number { width: 21px; height: 21px; font-size: 15px; }
  .step-tab:not(:last-child)::after { display: none; }
  .step-tab.is-active::before { left: 12%; right: 12%; }
  .lesson-main { padding: 0 14px 18px; }
  .step-heading { padding: 30px 7px 24px; }
  .step-kicker { font-size: 10px; margin-bottom: 6px; letter-spacing: .5px; }
  h1 { font-size: 24px; line-height: 1.6; letter-spacing: .5px; }
  .heading-underline { margin-top: 5px; width: 110px; border-top-width: 2px; }
  .scene-top { padding: 0 3px 13px; }
  .scene-eyebrow { font-size: 10px; letter-spacing: 0; }
  .text-button { font-size: 12px; }
  .plot-labels { display: none !important; }
  .plot-pair { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .plot-pair .math-plot::before { display: block; content: '变换前'; font-size: 13px; color: var(--ink-soft); text-align: center; padding: 5px 0 0; }
  .plot-pair .math-plot[data-after]::before { content: '变换后'; }
  .plot-transition { display: none; }
  .scene-aside { gap: 15px; padding: 10px 0; flex-wrap: wrap; }
  .scene-identity { font-size: 11px; }
  .matrix-control { padding: 6px 10px; }
  .matrix-control > span { font-size: 12px; }
  .matrix-inputs { grid-template-columns: repeat(2, 33px); padding: 0 5px; }
  .matrix-inputs input { width: 33px; font-size: 17px; }
  .animation-controls { padding: 13px 1px 17px; gap: 12px; }
  .time-label { font-size: 10px; }
  .animation-milestones { margin-left: 0; margin-right: 0; }
  .animation-milestones button { padding: 3px 7px; font-size: 10px; }
  .guide-slot { display: block; padding: 18px 4px 14px; }
  .guide-label { margin-bottom: 12px; }
  .guide-content { font-size: 15px; line-height: 1.9; }
  .lesson-actions { gap: 12px; padding-top: 0; }
  .lesson-actions > [data-prev] { font-size: 11px; min-height: 36px; padding: 7px 10px; }
  .discovery-actions { display: grid; grid-template-columns: auto auto; flex: 1; justify-content: end; }
  .discovery-actions [data-next] { grid-column: 1 / -1; }
  .discovery-actions .button { min-height: 38px; font-size: 12px; }
  .code-block code { font-size: 11px; }
  .line-number { width: 28px; flex-basis: 28px; padding-right: 7px; }
  .template-demo-code .scene-aside { gap: 10px; }
  .home-main { padding: 40px 22px 22px; }
  .home-intro h1 { font-size: 29px; letter-spacing: .3px; }
  .home-intro p { font-size: 14px; }
  .home-meta { display: block; margin: 15px 0 0; }
  .section-title { display: block; }
  .section-title h2 { margin-top: 12px; }
  .map-lesson { gap: 14px; padding: 19px 0; }
  .map-lesson strong { font-size: 16px; }
  .map-lesson > span:nth-child(2) { display: flex; flex-direction: column; gap: 6px; }
  .map-lesson > span > span { align-self: flex-start; }
  .home-footer { display: block; line-height: 2; }
  .home-footer span { display: block; }
  dialog { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* 圆润手写体负责标题和操作，正文与数学/代码继续使用各自清晰的字体。 */
:root{--sans:'Lesson Rounded','PingFang SC','Microsoft YaHei','Noto Sans SC',system-ui,sans-serif;--display:var(--sans);font-size:17px;}
h1,h2,h3,.brand .brand-wordmark strong,.step-tab,.button,.utility-button,.home-header-links a{font-family:var(--display);font-weight:700;font-synthesis:none;}
h1,h2,h3{letter-spacing:.02em;}
.utility-button{color:var(--ink);text-decoration:none;}
.site-footer{max-width:1320px;margin:50px auto 0;border-top:1px solid var(--line);padding:30px 34px;display:flex;justify-content:space-between;align-items:center;gap:24px;color:var(--ink-soft);}
.footer-brand{color:var(--ink);font-family:var(--display);font-size:16px;text-decoration:none;}
.site-footer p{font-size:12px;margin:9px 0 0;line-height:1.8;}
.site-footer nav{display:flex;gap:6px 22px;flex-wrap:wrap;justify-content:flex-end;}
.site-footer nav>a{display:inline-flex;align-items:center;min-height:36px;font-size:13px;text-decoration:none;color:var(--ink-soft);}.site-footer nav>a:hover{color:var(--accent);text-decoration:underline;}
.catalog-main,.site-info-main{max-width:1060px;margin:0 auto;padding:54px 30px 30px;}
.catalog-intro,.site-info-heading{text-align:center;max-width:780px;margin:0 auto 45px;}.catalog-intro>.home-section-icon,.site-info-heading>.home-section-icon{margin:0 auto 22px;}
.catalog-intro h1,.site-info-heading h1{font-family:var(--display);font-weight:700;}
.catalog-intro p,.site-info-heading p{font-size:16px;line-height:1.95;color:var(--ink-soft);max-width:52ch;margin:20px auto 0;}
.catalog-count{display:block;margin-top:18px;font-size:13px;color:var(--ink-soft);line-height:1.8;}
.course-catalog{max-width:880px;margin:0 auto;}.course-catalog .map-section{font-family:var(--display);font-size:20px;margin-top:45px;padding:18px 0;border-bottom:1px solid var(--line);}.course-catalog .map-lesson{padding:17px 10px;min-height:75px;}.course-catalog .map-lesson strong{font-size:16px;line-height:1.7;}
.catalog-back{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:40px;min-height:44px;text-decoration:none;}
.site-info-main{max-width:900px;}.site-info-content{font-size:16px;line-height:1.95;}.site-info-content>section{padding:26px 0;border-top:1px solid var(--line);}.site-info-content h2{font-size:23px;font-weight:400;margin:0 0 16px;}.site-info-content p{color:var(--ink-soft);margin:12px 0;}.site-info-back{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:20px;}.site-info-back>a{display:flex;align-items:center;gap:8px;min-height:44px;text-decoration:none;}
@media(max-width:650px){.site-footer{display:block;padding:25px 18px;margin-top:30px;}.site-footer nav{justify-content:flex-start;margin-top:18px;gap:4px 18px;}.catalog-main,.site-info-main{padding:36px 18px 22px;}.catalog-intro h1,.site-info-heading h1{font-size:28px;}.catalog-intro p,.site-info-heading p{font-size:15px;}.course-catalog .map-lesson{padding:17px 0;gap:10px;}.course-catalog .map-lesson strong{font-size:15px;}.course-catalog .map-number{min-width:28px;}.site-info-content h2{font-size:21px;}}

/* 以清晰阅读为优先的整体字号。 */
:root{font-size:20px;}
.button,.utility-button{font-size:18px;min-height:46px;}.home-header-links a{font-size:18px;}
.brand .brand-wordmark strong{font-size:21px;}.brand-wordmark>span{font-size:14px;}
.footer-brand{font-size:18px;}.site-footer p,.site-footer nav>a{font-size:16px;}
.catalog-intro h1,.site-info-heading h1{font-size:40px;}.catalog-intro p,.site-info-heading p,.site-info-content{font-size:20px;line-height:1.95;}.catalog-count{font-size:16px;}
.course-catalog .map-section{font-size:27px;}.course-catalog .map-lesson strong{font-size:20px;}.course-catalog .map-lesson>span:nth-child(2)>span{font-size:16px;}.course-catalog .map-number{font-size:18px;}.site-info-content h2{font-size:29px;}
.guide-content{font-size:19px;line-height:1.95;}
@media(max-width:650px){.button,.utility-button{font-size:17px;}.brand .brand-wordmark strong{font-size:17px;}.brand-wordmark>span{font-size:12px;}.catalog-intro h1,.site-info-heading h1{font-size:33px;}.catalog-intro p,.site-info-heading p,.site-info-content{font-size:18px;}.course-catalog .map-lesson strong{font-size:18px;}.site-info-content h2{font-size:25px;}.footer-brand{font-size:17px;}.site-footer p,.site-footer nav>a{font-size:15px;}}

.vip-badge{display:inline-flex;align-items:center;vertical-align:middle;margin-left:10px;padding:2px 8px;border:1px solid var(--lesson-color-d5ad75,#d5ad75);border-radius:6px;color:var(--accent-hover);background:var(--accent-soft);font-size:13px;font-weight:700;line-height:1.6;}

.access-preview{max-width:900px;margin:36px auto 20px;padding:0 24px;text-align:center}.access-preview p{color:var(--ink-soft);line-height:1.8;margin:16px 0 24px}.access-preview .button{text-decoration:none}.header-actions [data-account-link]{text-decoration:none}
@media(max-width:600px){.header-actions{gap:4px}.header-actions .utility-button{padding:8px;font-size:12px}.header-actions .utility-button svg{width:16px}.site-header{gap:8px;padding-inline:12px}}
@media(max-width:380px){.site-header{flex-wrap:wrap;row-gap:10px}.header-actions{margin-left:auto}}
.free-badge{display:inline-block;margin-left:9px;padding:1px 7px;border:1px solid var(--lesson-color-8c9b70,#8c9b70);border-radius:6px;color:var(--lesson-color-48602c,#48602c);font-size:12px;font-weight:700;line-height:1.6;vertical-align:middle;}

/* 轻微隆起的实体按钮：高光与柔和落影，按下时回到纸面。 */
.button, .utility-button {
  box-shadow: inset 0 1px 1px #ffffff70, inset 0 -1px 1px #492b1924, 0 2px 3px #492b1924;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background-color 120ms ease-out;
}
.button:hover:not(:disabled), .utility-button:hover:not(:disabled) {
  box-shadow: inset 0 1px 1px #ffffff80, inset 0 -1px 1px #492b1924, 0 3px 5px #492b1929;
  transform: translateY(-1px);
}
.button:active:not(:disabled), .utility-button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px #492b1924, 0 1px 2px #492b1914;
}
.button:disabled, .utility-button:disabled { box-shadow: inset 0 1px 1px #ffffff40; }
@media(prefers-reduced-motion:reduce) {
 .button, .utility-button { transition: none; }
}

.public-lesson-outcomes { max-width:650px; margin:22px auto; padding-left:24px; text-align:left; font-size:18px; line-height:1.9; }
.public-lesson-outcomes li+li { margin-top:8px; }

/* 全站返回顶部：沿用焦糖橙立体按钮，固定在屏幕右下角。 */
.back-to-top { position:fixed; right:max(24px,env(safe-area-inset-right)); bottom:calc(24px + env(safe-area-inset-bottom)); z-index:65; display:flex; align-items:center; justify-content:center; gap:7px; min-width:136px; min-height:48px; padding:11px 18px; border:1px solid var(--accent); border-radius:28px; color:var(--paper-raised); background:var(--accent); box-shadow:inset 0 1px 1px #fffaf280,inset 0 -2px 2px #492b1926,0 3px 5px #492b1920,0 8px 16px #492b1912; font:inherit; font-size:16px; line-height:1.5; cursor:pointer; transition:background .18s ease-out,transform .18s ease-out,box-shadow .18s ease-out; }
.back-to-top[hidden] { display:none; }
.back-to-top:hover { background:var(--accent-hover); transform:translateY(-2px); }
.back-to-top:active { transform:translateY(1px); box-shadow:inset 0 2px 4px #492b1933,0 1px 3px #492b191a; }
.back-to-top:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
.back-to-top svg { flex:none; }
@media(max-width:600px) { .back-to-top { right:max(12px,env(safe-area-inset-right)); min-width:120px; min-height:46px; padding:10px 14px; font-size:14px; } }
@media(prefers-reduced-motion:reduce) { .back-to-top { transition:none; } }
@media print { .back-to-top { display:none; } }

/* 回顶固定在最下面；已有浮层为它留出一行。 */
.page-home .home-floating-nav { bottom:calc(84px + env(safe-area-inset-bottom)); }
.page-lesson .achievement-dock { bottom:calc(84px + env(safe-area-inset-bottom)); }

/* 学习设置：图标入口与两个独立开关。 */
.site-settings { position:relative; }
.header-actions .settings-trigger { display:flex; align-items:center; justify-content:center; width:46px; height:46px; min-width:46px; padding:0; list-style:none; cursor:pointer; }
.settings-trigger::-webkit-details-marker { display:none; }
.settings-trigger::marker { content:''; }
.settings-trigger:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.settings-dropdown { position:absolute; right:0; top:calc(100% + 12px); z-index:90; width:272px; max-width:calc(100vw - 24px); padding:18px; background:var(--paper-raised); color:var(--ink); border-radius:16px; box-shadow:0 8px 28px #492b1929; font-size:16px; line-height:1.5; text-align:left; }
.settings-dropdown>strong { display:block; margin-bottom:12px; font-size:17px; }
.settings-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; min-height:56px; padding-block:8px; cursor:pointer; }
.settings-row+.settings-row { border-top:1px solid var(--line-soft); }
.settings-name,.settings-choice { display:flex; align-items:center; gap:8px; }
.settings-name { min-width:0; gap:10px; font-size:16px; line-height:24px; white-space:normal; overflow-wrap:anywhere; }
.settings-icon { display:grid; place-items:center; flex:0 0 24px; width:24px; height:24px; }
.settings-icon>svg { display:block; width:20px; height:20px; color:var(--accent); }
/* 猫脸轮廓更饱满，缩小10%以匹配扬声器的视觉大小；占位不变。 */
.settings-icon--pet>svg { width:18px; height:18px; }
.settings-choice { position:relative; flex-shrink:0; white-space:nowrap; font-size:13px; color:var(--ink-soft); }
.settings-choice input { position:absolute; right:0; width:44px; height:44px; margin:0; opacity:0; cursor:pointer; }
.settings-switch { flex:0 0 42px; width:42px; height:26px; padding:3px; border-radius:16px; background:var(--ink-soft); pointer-events:none; }
.settings-switch::after { content:''; display:block; width:20px; height:20px; border-radius:50%; background:var(--paper-raised); box-shadow:0 1px 3px #492b1926; transition:transform .16s ease-out; }
.settings-choice input:checked+.settings-switch { background:var(--accent); }
.settings-choice input:checked+.settings-switch::after { transform:translateX(16px); }
.settings-choice input:focus-visible+.settings-switch { outline:2px solid var(--accent); outline-offset:3px; }
.settings-choice input:disabled+.settings-switch { opacity:.45; }
.settings-dropdown>p { margin:12px 0 0; font-size:13px; color:var(--ink-soft); line-height:1.6; }
html[data-pet-enabled="false"] :is(.home-perched-cat,[data-lesson-cat]) { display:none!important; }
@media(max-width:600px) { .settings-dropdown { right:-40px; width:260px; } .header-actions .settings-trigger svg { width:20px; height:20px; } }
@media(prefers-reduced-motion:reduce) { .settings-switch::after { transition:none; } }

/* 每个小节只圈一处知识重点；文字颜色、自然换行和原有语义保持。 */
.lesson-keypoint {
  font-weight:700;
  padding-bottom:.58em;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2096%2012%22%20fill%3D%22none%22%20stroke-width%3D%223.2%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M0%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%23327564%22%2F%3E%3Cpath%20d%3D%22M24%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%237959a3%22%2F%3E%3Cpath%20d%3D%22M48%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%23a14762%22%2F%3E%3Cpath%20d%3D%22M72%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%239e5033%22%2F%3E%3C%2Fsvg%3E");
  background-repeat:repeat-x;
  background-position:left bottom;
  background-size:4.8em .55em;
  -webkit-box-decoration-break:clone;
  box-decoration-break:clone;
}
:root[data-theme="dark"] .lesson-keypoint { background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2096%2012%22%20fill%3D%22none%22%20stroke-width%3D%223.2%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M0%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%2387d3b6%22%2F%3E%3Cpath%20d%3D%22M24%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%23cbb7e8%22%2F%3E%3Cpath%20d%3D%22M48%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%23ecabc2%22%2F%3E%3Cpath%20d%3D%22M72%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%23f0b194%22%2F%3E%3C%2Fsvg%3E"); }
@media(forced-colors:active) {
 .lesson-keypoint { background-image:none; text-decoration:underline wavy; text-decoration-color:currentColor; text-underline-offset:.2em; }
}
@media print {
 .lesson-keypoint { background-image:none; text-decoration:underline; text-underline-offset:.16em; }
}

/* 短词像课堂上被圈过；圈画是装饰，原词及其语义不变。 */
.lesson-keypoint-term {
  padding:.08em .3em .58em;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20120%2042%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M109%207C85%202%2030%203%2012%207C1%2012%201%2029%2011%2035C30%2039%2092%2040%20109%2034C121%2028%20122%2011%20109%207C106%205%20102%204%2098%204%22%20stroke%3D%22%239e5033%22%20stroke-width%3D%222%22%20vector-effect%3D%22non-scaling-stroke%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E"),url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2096%2012%22%20fill%3D%22none%22%20stroke-width%3D%223.2%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M0%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%23327564%22%2F%3E%3Cpath%20d%3D%22M24%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%237959a3%22%2F%3E%3Cpath%20d%3D%22M48%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%23a14762%22%2F%3E%3Cpath%20d%3D%22M72%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%239e5033%22%2F%3E%3C%2Fsvg%3E");
  background-position:center top,left bottom;
  background-repeat:no-repeat,repeat-x;
  background-size:100% calc(100% - .25em),4.8em .55em;
}
:root[data-theme="dark"] .lesson-keypoint-term { background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20120%2042%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M109%207C85%202%2030%203%2012%207C1%2012%201%2029%2011%2035C30%2039%2092%2040%20109%2034C121%2028%20122%2011%20109%207C106%205%20102%204%2098%204%22%20stroke%3D%22%23f0b194%22%20stroke-width%3D%222%22%20vector-effect%3D%22non-scaling-stroke%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E"),url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2096%2012%22%20fill%3D%22none%22%20stroke-width%3D%223.2%22%20stroke-linecap%3D%22round%22%3E%3Cpath%20d%3D%22M0%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%2387d3b6%22%2F%3E%3Cpath%20d%3D%22M24%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%23cbb7e8%22%2F%3E%3Cpath%20d%3D%22M48%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%23ecabc2%22%2F%3E%3Cpath%20d%3D%22M72%206c2-3%204-3%206%200s4%203%206%200s4-3%206%200s4%203%206%200%22%20stroke%3D%22%23f0b194%22%2F%3E%3C%2Fsvg%3E"); }
/* 手写感只落在可展开的补充批注标题，正文、公式与代码继续沿用原字体。 */
.lesson-main .inline-disclosure {
  padding:12px 0;
  border-block:1px dashed var(--line);
  border-radius:12px;
  margin-block:28px;
}
.lesson-main .inline-disclosure>summary,.lesson-main .lstm-full-diagram>summary {
  font-family:'Lesson Notebook',var(--sans);
  font-size:22px;
  font-weight:400;
  line-height:1.8;
  gap:10px;
}
.lesson-main .inline-disclosure>summary>svg:first-child { color:var(--accent); }
.lesson-main .inline-disclosure>div { padding:18px 12px 10px; }
@media(max-width:650px) { .lesson-main .inline-disclosure>summary,.lesson-main .lstm-full-diagram>summary { font-size:20px; } }
@media(forced-colors:active),print { .lesson-keypoint-term { background-image:none; } }

/* 课程地图：册 → 部分 → 章 → 小节，直接复用课程元数据和权益配置。 */
.catalog-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:40px;max-width:1440px;margin:0 auto;padding:54px 30px 30px;align-items:start;}
.catalog-layout .catalog-main{min-width:0;max-width:none;margin:0;padding:0;}
.catalog-shortcuts{position:sticky;top:24px;align-self:start;max-height:calc(100dvh - 48px);overflow-y:auto;padding:18px 10px;background:var(--paper-raised);border-radius:16px;box-shadow:0 10px 30px #492b191a;scrollbar-width:thin;scrollbar-color:var(--line) var(--paper-raised);}
.catalog-shortcuts h2{font-size:20px;line-height:1.6;margin:0 10px 14px;font-family:var(--display);}
.catalog-shortcuts nav{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;}
.catalog-shortcut-group{min-width:0;}
.catalog-shortcuts a{display:block;min-width:0;min-height:70px;padding:11px 12px;border-radius:var(--radius);color:var(--ink);text-decoration:none;overflow-wrap:break-word;}
.catalog-shortcut-name{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 10px;line-height:1.7;}
.catalog-shortcut-name strong{min-width:0;max-width:100%;font-family:var(--display);font-size:18px;overflow-wrap:anywhere;}
.catalog-shortcut-name>span{font-size:13px;color:var(--ink-soft);white-space:nowrap;}
.catalog-shortcut-title{display:block;margin-top:4px;font-size:14px;line-height:1.7;color:var(--ink-soft);}
.catalog-shortcuts a:hover,.catalog-shortcuts a[aria-current="location"]{background:var(--accent-soft);}
.catalog-shortcut-parts{display:grid;gap:3px;margin:2px 0 8px 12px;}
.catalog-shortcuts .catalog-part-shortcut{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 10px;min-height:42px;padding:8px 12px;font-size:15px;line-height:1.6;}
.catalog-part-shortcut>span:last-child{color:var(--ink-soft);font-size:12px;white-space:nowrap;}
.catalog-lower-parts{display:flex;flex-wrap:wrap;gap:14px 28px;margin:28px 0;}
.catalog-lower-parts a{display:inline-flex;align-items:center;gap:8px;min-height:44px;text-underline-offset:5px;}
.catalog-subvolume{margin-top:56px;scroll-margin-top:28px;}
.catalog-subvolume>header{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 18px;padding-block:16px;border-block:1px solid var(--line);}
.catalog-subvolume>header h3{margin:0;font:700 25px/1.6 var(--display);}
.catalog-subvolume>header>span{color:var(--ink-soft);font-size:15px;}
.catalog-subvolume>header p{flex-basis:100%;margin:0;color:var(--ink-soft);font-size:17px;line-height:1.8;}
.catalog-topic{margin:0 0 10px;color:var(--ink-soft);font-size:18px;line-height:1.8;}
@media(max-width:1100px){.catalog-shortcut-group{display:contents;}.catalog-shortcut-parts{display:none;}.catalog-layout :is(.catalog-subvolume,.catalog-volume){scroll-margin-top:var(--catalog-anchor-offset,210px);}}
.catalog-shortcuts a[aria-current="location"] strong{color:var(--accent);text-decoration:underline;text-underline-offset:4px;}
.catalog-volume-teaser{min-width:0;}
.catalog-volume-name{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 16px;}
.catalog-volume-teaser p{font-size:18px;line-height:1.85;color:var(--ink-soft);margin:10px 0 0;text-wrap:pretty;}
@media(max-width:1100px){.catalog-layout{display:block;padding:36px 24px 26px;}.catalog-shortcuts{top:12px;z-index:40;margin:0 0 32px;padding:10px;overflow:visible;}.catalog-shortcuts h2{font-size:17px;margin:0 6px 8px;}.catalog-shortcuts nav{display:flex;gap:6px;overflow-x:auto;padding:2px 4px 6px;scrollbar-width:thin;scrollbar-color:var(--line) var(--paper-raised);}.catalog-shortcuts a{flex:0 0 160px;min-height:72px;padding:9px 10px;}.catalog-layout .catalog-volume{scroll-margin-top:var(--catalog-anchor-offset,210px);}}
@media(max-width:650px){.catalog-layout{padding:24px 18px;}.catalog-shortcuts{top:8px;margin-bottom:28px;}.catalog-shortcut-name strong{font-size:17px;}.catalog-shortcuts a{flex-basis:148px;}.catalog-volume-teaser p{font-size:16px;}.catalog-volume-name{gap:4px 12px;}}
.catalog-volume-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; max-width: 1100px; margin: 0 auto; border-block: 1px solid var(--line); }
.catalog-volume-nav > a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 102px; padding: 18px 8px; color: var(--ink); text-decoration: none; }
.catalog-volume-nav > a[href="#volume-preparatory"], .catalog-volume-nav > a[href="#volume-practical"] { grid-column: 1 / -1; }
.catalog-volume-nav > a[href="#volume-preparatory"] { border-bottom: 1px solid var(--line); }
.catalog-volume-nav > a[href="#volume-practical"] { border-top: 1px solid var(--line); }
.catalog-volume-nav > a[href="#volume-appendix"], .catalog-volume-nav > a[href="#volume-thanks"] { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.catalog-volume-nav > a > span:first-child { display: flex; align-items: baseline; gap: 16px; }
.catalog-volume-nav strong { font-family: var(--display); font-size: 25px; }
.catalog-volume-nav > a > span:last-child { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); white-space: nowrap; font-size: 16px; }
.catalog-volume-nav a:hover, .catalog-chapter h4 a:hover { color: var(--accent); }
.catalog-access-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 22px 0 0; font-size: 15px; line-height: 1.8; color: var(--ink-soft); }
.catalog-access-note a { margin-inline-start: 10px; text-underline-offset: 4px; }
.catalog-vip { display: inline-flex; align-items: center; gap: 3px; flex: none; padding: 1px 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--accent); font: 700 11px/1.5 var(--sans); vertical-align: middle; white-space: nowrap; }
.catalog-vip svg { flex: none; }
.catalog-volume { margin-top: 80px; scroll-margin-top: 28px; }
.catalog-volume-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 26px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.catalog-volume-heading h2 { margin: 0; font-family: var(--display); font-size: 30px; line-height: 1.5; text-wrap: balance; }
.catalog-volume-heading p { margin: 12px 0 0; font-size: 17px; line-height: 1.9; color: var(--ink-soft); max-width: 44ch; }
.catalog-volume-price { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; flex: none; color: var(--accent); font-size: 16px; text-underline-offset: 5px; }
.catalog-part { margin-top: 38px; }
.catalog-part > h3 { margin: 0 0 10px; color: var(--ink-soft); font-size: 18px; font-weight: 500; line-height: 1.8; }
.catalog-chapter { padding: 26px 0 30px; border-bottom: 1px solid var(--line-soft); }
.catalog-chapter-header { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 16px; }
.catalog-chapter-number { padding-top: 5px; font-size: 17px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.catalog-chapter h4 { margin: 0; font-size: 22px; line-height: 1.7; }
.catalog-chapter h4 a { color: var(--ink); text-decoration: none; }
.catalog-chapter h4 .catalog-vip { margin-inline-end: 8px; }
.catalog-chapter-header p { margin: 7px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.8; }
.catalog-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; row-gap: 8px; list-style: none; padding: 0; margin: 20px 0 0 78px; }
.catalog-steps > li { min-width: 0; }
.catalog-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; align-content: start; padding: 10px 0; min-height: 78px; color: var(--ink); text-decoration: none; border-radius: 5px; }
.catalog-step:hover { background: var(--accent-soft); }
.catalog-step-label { color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.catalog-step-heading { display: block; grid-column: 1 / -1; grid-row: 2; font-size: 17px; line-height: 1.85; overflow-wrap: anywhere; }
.catalog-step-heading .catalog-vip { margin-inline-end: 7px; }
.catalog-free { grid-column: 2; grid-row: 1; color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.catalog-source-language { display:inline-block;margin-inline-start:12px;font-size:14px;text-decoration:underline dotted;text-underline-offset:4px; }
.catalog-intro .catalog-count { display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:4px 8px; }
.catalog-count>span { white-space:nowrap; }
html[data-content-language]:lang(ko) .catalog-main { word-break:keep-all;overflow-wrap:anywhere; }
html[data-content-language]:lang(ja) .catalog-main { line-break:strict; }
@media (max-width: 760px) {
  .catalog-volume-nav { grid-template-columns: 1fr; gap: 16px; }
  .catalog-volume-nav > a { align-items: flex-start; padding-inline: 0; }
  .catalog-volume-nav > a > span:first-child { display: grid; gap: 5px; }
  .catalog-volume-nav > a > span:last-child { font-size: 14px; padding-top: 7px; }
  .catalog-volume-nav > a > span:first-child > span { font-size: 15px; }
  .catalog-volume-heading { display: block; }
  .catalog-volume-heading h2 { font-size: 27px; }
  .catalog-volume-price { margin-top: 10px; }
  .catalog-chapter h4 { font-size: 20px; }
  .catalog-chapter-header { grid-template-columns: 50px minmax(0, 1fr); gap: 10px; }
  .catalog-steps { margin-inline-start: 60px; grid-template-columns: 1fr; gap: 0; }
  .catalog-step { min-height: 0; padding-block: 12px; }
}
@media (max-width: 420px) {
  .catalog-volume-nav > a { display: grid; gap: 5px; }
  .catalog-volume-nav > a > span:last-child { padding: 0; }
  .catalog-access-note { justify-content: flex-start; }
  .catalog-access-note a { margin-inline-start: 0; }
  .catalog-volume { margin-top: 56px; }
  .catalog-chapter-header { grid-template-columns: 1fr; gap: 5px; }
  .catalog-steps { margin-inline-start: 0; }
}

.community-join{display:grid;grid-template-columns:minmax(0,1fr) 256px;align-items:center;gap:42px;padding:36px;margin:0 0 44px;background:var(--accent-soft);border-radius:16px}
.community-join-copy{min-width:0}
.community-join-copy h2{font-family:var(--display);font-size:30px;line-height:1.6;margin:0 0 16px;text-wrap:balance}
.community-join-copy>p{font-size:18px;line-height:1.9;color:var(--ink-soft);margin:0 0 18px}
.community-join-copy .community-join-status{display:flex;align-items:center;gap:9px;font-size:17px;font-weight:650;color:var(--accent);margin:22px 0 10px}
.community-join-status svg{flex:none}
.community-join-copy .community-join-note{font-size:15px;margin:0}
.community-qr{margin:0;min-width:0}
.community-qr-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;aspect-ratio:1;padding:22px;background:var(--paper-raised);border:2px dashed var(--line);border-radius:12px;text-align:center}
.community-qr-placeholder>svg{color:var(--accent);flex:none}
.community-qr-placeholder strong{font-size:18px;line-height:1.6}
.community-qr-placeholder>span{font-size:14px;color:var(--ink-soft)}
.community-qr figcaption{text-align:center;margin-top:12px;color:var(--ink-soft);font-size:14px;line-height:1.8}
.community-inline-link{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:18px;text-underline-offset:5px;margin-top:8px}
.community-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;}
.community-groups .community-group{grid-template-columns:minmax(0,1fr);grid-template-rows:1fr auto;align-items:start;gap:24px;padding:28px;margin:0;background:var(--paper-raised);border:1px solid var(--line);}
.community-groups .community-group-vip{background:var(--accent-soft);border-color:transparent;}
.community-group .community-join-copy h2{display:flex;align-items:center;gap:10px;font-size:27px;margin-bottom:10px;}
.community-group h2>svg{color:var(--accent);flex-shrink:0;}
.community-group .community-join-copy .community-group-audience{font-size:17px;font-weight:700;color:var(--accent);margin-bottom:12px;}
.community-group .community-join-copy>p:last-child{font-size:17px;margin-bottom:0;}
.community-group .community-qr{width:100%;max-width:210px;justify-self:center;align-self:end;}
.community-group .community-qr-placeholder{gap:12px;padding:18px;}
.community-pending{padding:22px 0 0;margin-bottom:36px;color:var(--ink-soft);font-size:15px;line-height:1.9;}
.community-pending>p{margin:0;}
.community-pending>p:first-child{display:flex;align-items:center;gap:8px;color:var(--accent);font-weight:700;margin-bottom:5px;}
.community-pending svg{flex-shrink:0;}
@media(max-width:700px){.community-groups{grid-template-columns:minmax(0,1fr);gap:20px;}.community-groups .community-group{padding:24px 20px;}.community-group .community-join-copy h2{font-size:25px;}.community-group .community-join-copy>p:last-child{font-size:16px;}}
@media(max-width:700px){.community-join{grid-template-columns:1fr;gap:28px;padding:24px;margin-bottom:32px}.community-join-copy h2{font-size:25px}.community-join-copy>p{font-size:17px}.community-qr{width:100%;max-width:256px;justify-self:center}.community-join-copy .community-join-status{font-size:16px}}

/* 通用数学坐标组件：配色继承 warm-paper 主题，图形按数据实时生成。 */
.math-grid line { stroke: var(--lesson-color-e8d1b8,#e8d1b8); stroke-width: 1; }
.transformed-grid line { stroke: var(--lesson-color-daaa72,#daaa72); stroke-width: .8; opacity: .44; }
.math-ticks { fill: var(--ink); font-family: Georgia, serif; font-size: 17px; }
.axis-label { font-size: 21px; font-style: italic; }
.axis-line { stroke: var(--ink); stroke-width: 1.6; }
.axis-tip { stroke: var(--ink); stroke-width: 1.5; }
.original-shape { fill: transparent; stroke: #a3917d; stroke-width: 1.5; stroke-dasharray: 5 4; }
.transformed-shape { fill: rgba(237,180,79,.13); stroke: var(--lesson-color-dc8530,#dc8530); stroke-width: 1.6; }
.basis-coral { stroke: var(--coral); stroke-width: 3; }
.basis-sage { stroke: var(--sage); stroke-width: 3; }
.coral-fill { fill: var(--coral); }
.sage-fill { fill: var(--sage); }
.coral-text { fill: var(--lesson-color-a94e2e,#a94e2e); }
.sage-text { fill: var(--lesson-color-566b2c,#566b2c); }
.vector-label { font-family: Georgia, serif; font-size: 16px; font-style: italic; }
.coordinate-label { font-size: 13px; }
.decomposition-line { stroke: #a9957f; stroke-width: 1.2; stroke-dasharray: 4 4; }
.point-dot { fill: var(--lesson-color-b96b16,#b96b16); }
.point-callout rect { fill: var(--lesson-color-fff0d5,#fff0d5); stroke: var(--lesson-color-d9a45a,#d9a45a); stroke-width: .8; }
.point-callout text { fill: var(--ink); font-size: 15px; font-family: Georgia, serif; }
.drag-handle { fill: var(--paper); stroke-width: 2; cursor: grab; touch-action: none; }
.drag-handle:hover, .drag-handle:focus { fill: #fff; stroke-width: 3; }
.coral-stroke { stroke: var(--coral); }
.sage-stroke { stroke: var(--sage); }
.point-stroke { stroke: var(--accent); }

/* 通用矩阵组件，所有模板共享。两列与坐标图中的 e₁ / e₂ 使用相同颜色。 */
.matrix-editor { width: 100%; max-width: 260px; border: 1px solid var(--lesson-color-dec1a1,#dec1a1); border-radius: 14px; padding: 13px 15px 10px; background: var(--lesson-color-fff9ef,#fff9ef); }
.matrix-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-soft); }
.matrix-editor-heading i { font-family: Georgia, serif; font-size: 16px; color: var(--ink); }
.matrix-restore { display: inline-flex; align-items: center; gap: 4px; border: 0; padding: 3px 0; background: transparent; color: var(--muted); font-size: 11px; }
.matrix-restore:hover { color: var(--accent); }
.matrix-readonly { font-size: 10px; color: var(--muted); }
.matrix-editor-body { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 0 8px; }
.matrix-symbol { font-family: Georgia, serif; font-size: 25px; font-style: italic; white-space: nowrap; }
.matrix-brackets { padding: 3px 7px; border-left: 2px solid var(--lesson-color-755238,#755238); border-right: 2px solid var(--lesson-color-755238,#755238); border-radius: 2px; }
.matrix-grid { display: grid; grid-template-columns: repeat(var(--matrix-cols, 2), var(--cell-width, 48px)); gap: 6px 9px; }
.matrix-value { width: 100%; min-width: 0; height: 38px; text-align: center; padding: 4px 1px; border: 1px solid transparent; border-radius: 6px; appearance: textfield; font-family: Georgia, serif; font-size: 23px; color: var(--ink); background: transparent; }
.matrix-shape { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 10px; white-space: nowrap; }
.matrix-copy { border: 0; background: transparent; color: var(--ink-soft); padding: 3px 0; font-size: 10px; }
.matrix-copy:hover { color: var(--accent); }
.matrix-numbered { flex: 0 0 auto; }
.matrix-numbered-body { display: flex; align-items: flex-start; }
.matrix-row-index { display: grid; grid-auto-rows: 38px; gap: 6px; padding-top: 3px; margin-right: 5px; color: var(--muted); font-size: 10px; min-width: 13px; text-align: center; }
.matrix-row-index span { align-self: center; }
.matrix-column-index { display: grid; grid-template-columns: repeat(var(--matrix-cols, 2), var(--cell-width, 48px)); gap: 9px; margin-left: 26px; text-align: center; color: var(--muted); font-size: 10px; padding-bottom: 5px; }
.matrix-value.is-highlighted { background: var(--lesson-color-f8dfb4,#f8dfb4); border-color: var(--lesson-color-d3a263,#d3a263); }
.matrix-standalone { --cell-width: 68px; width: fit-content; max-width: 100%; margin: 20px auto 26px; padding: 20px 24px; }
.matrix-standalone .matrix-editor-body { overflow-x: auto; justify-content: flex-start; padding: 18px 0; max-width: 100%; }
.matrix-standalone .matrix-symbol { flex: 0 0 auto; }
.matrix-standalone .matrix-help { font-size: 12px; }
.matrix-window { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.matrix-window > span { font-size: 14px; color: var(--ink-soft); }
.matrix-window > div { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.matrix-window button { background: var(--lesson-color-fae9cf,#fae9cf); border: 1px solid var(--lesson-color-dec1a1,#dec1a1); border-radius: 5px; min-width: 44px; min-height: 44px; height: auto; padding: 6px 10px; font-size: 14px; line-height: 1.4; white-space: nowrap; }
.matrix-value::-webkit-inner-spin-button, .matrix-value::-webkit-outer-spin-button { appearance: none; margin: 0; }
.matrix-column-0 { background: var(--lesson-color-f9e8df,#f9e8df); }
.matrix-column-1 { background: var(--lesson-color-edf0e1,#edf0e1); }
.matrix-value:not([readonly]):hover { border-color: var(--lesson-color-bd9570,#bd9570); }
.matrix-value:not([readonly]):focus { border-color: var(--accent); background: var(--lesson-color-fffdf8,#fffdf8); outline: 2px solid var(--lesson-color-d89358,#d89358); outline-offset: 1px; }
.matrix-value[aria-invalid=true] { border-color: var(--lesson-color-ac4427,#ac4427); }
.matrix-column-labels { display: flex; justify-content: flex-end; gap: 17px; padding-right: 3px; font-size: 10px; }
.matrix-first-column { color: var(--lesson-color-a34c2d,#a34c2d); }
.matrix-second-column { color: var(--lesson-color-597236,#597236); }
.matrix-presets { display: flex; gap: 5px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.matrix-presets button { flex: 1; border: 1px solid transparent; padding: 5px 8px; border-radius: 6px; font-size: 11px; background: transparent; color: var(--ink-soft); }
.matrix-presets button:hover { background: var(--lesson-color-f5e6d2,#f5e6d2); }
.matrix-presets button[aria-pressed=true] { background: var(--lesson-color-f7dfbc,#f7dfbc); color: var(--lesson-color-9d4d16,#9d4d16); }
.matrix-help { font-size: 10px; line-height: 1.6; color: var(--muted); text-align: center; margin: 9px 0 0; min-height: 16px; }
.matrix-help.is-error { color: var(--lesson-color-ac4427,#ac4427); }
.template-split .scene-aside .matrix-editor, .template-practice .scene-aside .matrix-editor, .template-demo-code .scene-aside .matrix-editor { max-width: 240px; }
@media (max-width: 850px) { .scene-aside { align-items: center; } .scene-aside .matrix-editor { max-width: 240px; } }
@media (max-width: 600px) {
  .matrix-editor { padding: 11px 13px; }
  .scene-aside { align-items: center; }
  .scene-identity { font-size: 12px; }
  .matrix-value { font-size: 22px; }
  .matrix-standalone { width: 100%; padding: 15px; }
  .matrix-window { flex-wrap: wrap; }
  .matrix-window > div { flex-basis: 100%; }
}

/* 所有只读矩阵与运行结果沿用同一数学排版；括号采用明确的方括号端点。 */
.matrix-editor-heading{align-items:baseline;flex-wrap:wrap;row-gap:8px;font-size:13px;line-height:1.7;}
.matrix-editor-heading>span:first-child{flex:1;min-width:110px;}
.matrix-editor-heading i{display:none;}
.matrix-shape{font-size:12px;color:var(--ink-soft);}
.matrix-copy,.matrix-restore{font-size:12px;min-height:30px;padding:3px 4px;}
.python-tensor-results :is(.matrix-copy,.matrix-restore){font-size:16px;min-height:44px;}
.python-tensor-results .matrix-editor .matrix-help{font-size:16px;}
.python-tensor-results .matrix-editor-heading{font-size:16px;}
.python-tensor-results .matrix-shape{font-size:14px;}
.python-tensor-results .matrix-window{flex-wrap:wrap;}
.python-tensor-results .matrix-window>div{flex-wrap:wrap;}
.python-tensor-results .matrix-window>span{font-size:14px;}
.python-tensor-results .matrix-window button{height:auto;min-height:44px;font-size:16px;padding:6px 10px;}
.matrix-readonly{display:none;}
.matrix-brackets{position:relative;border:0;border-radius:0;padding:7px 12px;}
.matrix-brackets::before,.matrix-brackets::after{content:'';position:absolute;top:0;bottom:0;width:8px;border-block:2px solid currentColor;pointer-events:none;color:var(--lesson-color-755238,#755238);}
.matrix-brackets::before{left:0;border-left:2px solid currentColor;}
.matrix-brackets::after{right:0;border-right:2px solid currentColor;}
.matrix-value{display:flex;justify-content:center;align-items:center;font-family:'KaTeX_Main',Georgia,serif;font-variant-numeric:tabular-nums;font-size:25px;line-height:1.2;}
button.matrix-value{cursor:pointer;min-height:38px;}
button.matrix-value:hover{background:var(--lesson-color-f7ead7,#f7ead7);border-color:var(--line);}
.matrix-standalone{--matrix-cell-min:58px;--matrix-number-size:29px;--cell-width:var(--matrix-cell-min);border:0;background:transparent;padding:20px 22px;margin:28px auto 38px;}
.matrix-standalone .matrix-editor-body{padding:24px 0 22px;justify-content:flex-start;justify-content:safe center;gap:18px;}
.matrix-standalone .matrix-symbol{font-size:31px;}
.matrix-standalone .matrix-value{font-size:var(--matrix-number-size);}
.matrix-standalone .matrix-help{font-size:11px;margin-top:12px;}
.matrix-column-index{margin-left:31px;}
.matrix-row-index{padding-top:7px;}
@media(max-width:600px){.matrix-standalone{--matrix-cell-min:44px;--matrix-number-size:25px;padding:15px 4px;margin:20px auto 30px;}.matrix-standalone .matrix-editor-body{gap:12px;}.matrix-editor-heading>span:first-child{min-width:90px;}.matrix-grid{gap:6px;}.matrix-column-index{gap:6px;}}

.matrix-kind-vector .matrix-row-index{display:none;}
.matrix-kind-vector .matrix-column-index{margin-left:12px;}
.matrix-kind-scalar .matrix-row-index,.matrix-kind-scalar .matrix-column-index{display:none;}
.matrix-kind-scalar .matrix-brackets::before,.matrix-kind-scalar .matrix-brackets::after{display:none;}

/* FormulaDisplay：容器沿用暖纸，马卡龙配色只用于数学符号与图例文字。 */
.formula-card, .formula-inline {
  --formula-surface: var(--paper);
  --formula-line: var(--line);
  --formula-ink: var(--ink);
  --formula-secondary: var(--ink-soft);
  --formula-accent: var(--ink-soft);
}
.formula-card { margin: 18px 0; border: 1px solid var(--formula-line); border-radius: 16px; padding: 19px 23px; background: transparent; color: var(--formula-ink); min-width: 0; max-width: 100%; }
.formula-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.formula-title { flex: 1 1 12ch; min-width: 0; margin: 0; color: var(--formula-accent); font-family: var(--sans); font-size: 16px; line-height: 1.6; font-weight: 600; overflow-wrap: anywhere; }
.formula-copy { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 44px; gap: 5px; border: 1px solid transparent; border-radius: 7px; padding: 8px 10px; background: transparent; color: var(--formula-accent); font-family: var(--sans); font-size: 16px; line-height: 1.5; white-space: nowrap; cursor: pointer; }
.formula-copy:hover { border-color: var(--formula-line); background: var(--paper-raised); }
.formula-copy:disabled { opacity: .65; cursor: progress; }
.formula-copy:focus-visible, .formula-math:focus-visible { outline: 2px solid var(--formula-accent); outline-offset: 3px; }
.formula-card ::selection, .formula-inline ::selection { background: var(--formula-line); color: var(--formula-ink); }
.formula-math { display: flex; align-items: center; overflow-x: auto; overflow-y: hidden; min-width: 0; padding: 18px 8px; min-height: 84px; scrollbar-width: thin; scrollbar-color: var(--formula-accent) var(--formula-surface); }
.formula-math > .katex-display { flex: 0 0 auto; margin: 0 auto; }
.formula-math .katex { color: var(--formula-ink); font-size: 1.32em; }
.formula-card .formula-legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 5px 0 17px; padding: 0; list-style: none; }
.formula-legend li { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; margin: 0; padding: 5px 10px; color: var(--symbol-ink); background: transparent; font-family: var(--sans); font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.formula-legend-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--symbol-ink); }
.formula-legend-label { min-width: 0; }
.formula-caption { margin: 9px 0 0 !important; padding-top: 12px; border-top: 1px solid var(--formula-line); color: var(--formula-secondary); font-family: var(--sans); font-size: 16px; line-height: 1.85; }
.formula-feedback:not(.sr-only) { display: block; margin-top: 12px; color: var(--formula-ink); font: 16px/1.8 var(--sans); overflow-wrap: anywhere; }
.formula-card[data-formula-locale="ko"] { word-break: keep-all; overflow-wrap: anywhere; }
.formula-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; vertical-align: baseline; padding: 0 2px; background: transparent; color: var(--formula-ink); max-width: 100%; }
.formula-inline .formula-copy { padding: 2px 4px; }
.formula-inline .formula-feedback:not(.sr-only) { flex-basis: 100%; }
.visual-slot > .formula-card { max-width: 800px; margin: 20px auto 32px; padding: 24px 30px; }
.visual-slot > .formula-card .formula-math { min-height: 126px; }
.visual-slot > .formula-card .formula-math .katex { font-size: 1.7em; }
@media (max-width: 600px) {
  .formula-card, .visual-slot > .formula-card { padding: 16px; margin: 14px 0 22px; }
  .formula-header { gap: 10px; }
  .formula-copy { padding: 8px; }
  .formula-math, .visual-slot > .formula-card .formula-math { min-height: 96px; padding: 16px 3px; }
  .formula-math .katex, .visual-slot > .formula-card .formula-math .katex { font-size: 1.17em; }
}

/* 计算步骤直接排在暖纸上。着色强调当前参与计算的数据。 */
.accumulation-demo{max-width:850px;}
.accumulation-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:24px 0;}
.accumulation-heading h3{font-size:23px;line-height:1.65;margin:0;}
.accumulation-heading p{display:flex;align-items:baseline;gap:8px;margin:0;color:var(--ink-soft);font-size:16px;white-space:nowrap;}
.accumulation-heading p strong{font-size:42px;line-height:1.2;color:var(--accent);font-variant-numeric:tabular-nums;}
.accumulation-heading p code{font-size:14px;}
.accumulation-items{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;}
.accumulation-items>div{display:grid;grid-template-columns:auto auto;align-items:baseline;gap:5px 20px;min-width:160px;padding:13px 18px;border:1px solid var(--line);border-radius:var(--radius);color:var(--ink-soft);}
.accumulation-items>div.is-current{background:var(--accent-soft);border-color:var(--accent);color:var(--ink);}
.accumulation-items>div.is-added:not(.is-current){border-color:var(--ink-soft);}
.accumulation-items strong{font-size:25px;color:var(--ink);font-variant-numeric:tabular-nums;}
.accumulation-items small{font-size:14px;font-weight:400;margin-left:5px;}
.accumulation-item-state{grid-column:1/-1;font-size:13px;}
.accumulation-chart{display:block;width:100%;max-width:720px;margin:10px auto 0;overflow:visible;}
.accumulation-axis line{stroke:var(--line);stroke-width:1.5;}
.accumulation-axis text{font:18px var(--mono);fill:var(--ink-soft);}
.accumulation-axis .is-boundary text{fill:var(--ink);font-weight:700;}
.accumulation-hop path{fill:none;stroke:var(--accent);stroke-width:3;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;}
.accumulation-hop text{fill:var(--ink);font:700 27px var(--display);}
.accumulation-hop.is-future{opacity:.25;}
.accumulation-total-dot{fill:var(--accent);stroke:var(--paper);stroke-width:3;}
.accumulation-moving-dot{fill:var(--honey);stroke:var(--ink);stroke-width:2;}
.accumulation-axis-title{fill:var(--ink-soft);font:16px var(--sans);}
.accumulation-equation{display:flex;align-items:center;justify-content:center;gap:14px 28px;flex-wrap:wrap;padding:18px 0;}
.accumulation-equation code{font-size:15px;color:var(--ink-soft);}
.accumulation-equation strong{font-size:29px;line-height:1.6;color:var(--accent);font-variant-numeric:tabular-nums;}
.accumulation-explanation{font-size:18px;line-height:1.9;min-height:3.8em;margin:12px 0 24px;color:var(--ink-soft);}
.accumulation-demo .demo-controls .button{min-height:44px;font-size:14px;}
.accumulation-note{font-size:14px;line-height:1.8;margin:16px 0 0;color:var(--ink-soft);}
@media(max-width:650px){.accumulation-heading{display:block;}.accumulation-heading h3{font-size:20px;}.accumulation-heading p{justify-content:center;margin-top:16px;}.accumulation-heading p strong{font-size:36px;}.accumulation-items{gap:10px;}.accumulation-items>div{min-width:0;flex:1 1 120px;padding:12px;gap:5px 10px;}.accumulation-items>div>span:first-child{font-size:16px;}.accumulation-axis .is-intermediate text{display:none;}.accumulation-axis text{font-size:30px;}.accumulation-hop text{font-size:34px;}.accumulation-axis-title{font-size:27px;}.accumulation-equation{display:grid;justify-items:center;gap:8px;}.accumulation-equation strong{font-size:26px;}.accumulation-explanation{font-size:17px;}.accumulation-demo .demo-controls{gap:7px;}.accumulation-demo .demo-controls .button{font-size:13px;padding-inline:10px;}}
.calculation-demo { margin: 18px auto 28px; max-width: 850px; min-width: 0; }
.calculation-demo > figcaption { font-size: 14px; color: var(--ink-soft); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.demo-stage { padding: 20px 0; min-height: 250px; }
.demo-stage h3 { font-size: 20px; font-weight: 600; margin: 0 0 20px; }
.demo-rows { display: grid; gap: 16px; }
.demo-row { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 16px; align-items: center; }
.demo-row-label { font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.demo-values-scroll { overflow-x: auto; min-width: 0; padding: 3px; scrollbar-width: thin; scrollbar-color: var(--accent) var(--paper); }
.demo-cells { display: grid; grid-template-columns: repeat(var(--demo-cols), minmax(48px,1fr)); gap: 6px; min-width: min-content; }
.demo-value { border: 1px solid var(--line); border-radius: 6px; min-height: 40px; padding: 8px; text-align: center; font-variant-numeric: tabular-nums; font-size: 15px; overflow-wrap: anywhere; }
.demo-value.is-active { border-color: var(--accent); color: var(--accent); font-weight: 650; outline: 1px solid var(--accent); }
/* Short numeric rows can be read at teaching size; dense rows keep their scale. */
.demo-cells:has(> .demo-value:nth-child(-n+4):last-child:not(:only-child)) > .demo-value { font-size:22px; min-height:48px; }
.demo-row:has(.demo-value:nth-child(-n+4):last-child) .demo-row-label { font-size:16px; }
/* A single scalar is a number card, not a bar stretched across the page. */
.demo-cells:has(> .demo-value:only-child) { grid-template-columns: minmax(64px,100px); }
.demo-value:only-child { font-size: 24px; min-height: 48px; }
.demo-row:has(.demo-value:only-child) .demo-row-label { font-size: 16px; }
.demo-explanation { font-size: 16px; line-height: 1.85; color: var(--ink-soft); margin: 20px 0 0; }
.demo-equation { overflow-x: auto; padding: 12px 0; }
.demo-controls { border-top: 1px solid var(--line); padding-top: 15px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.demo-controls output { margin-left: auto; color: var(--ink-soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.demo-controls button:disabled { opacity: .5; cursor: default; }
.calculation-demo[data-demo-locale] > .demo-controls .button { min-height:44px; font-size:16px; max-width:100%; white-space:normal; }
.calculation-demo[data-demo-locale="ko"] { word-break:keep-all; }
.demo-plot { display: block; width: min(100%,520px); margin: 0 auto 22px; overflow: visible; }
.demo-plot text { fill: var(--ink); font: 12px Georgia, serif; }
.demo-grid line { stroke: var(--line); stroke-width: .8; }
.demo-axis { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.demo-curve { fill: none; stroke: var(--lesson-color-327564,#327564); stroke-width: 2.4; }
.demo-marker { fill: var(--accent); stroke: var(--paper); stroke-width: 2; }
.demo-plot-equal-units text { font-size: 22px; }
.demo-plot-equal-units .demo-coordinate-name { font-family: var(--sans); }
.demo-plot-equal-units .demo-radius { stroke: var(--accent); stroke-width: 2; }
.demo-plot-equal-units .demo-origin { fill: var(--ink); }
/* 章节导入：目标与学习顺序在左，具体成果预览在右。 */
.lesson-intro { max-width: 1000px; margin: 8px auto 48px; padding: 32px; background: var(--accent-soft); border-radius: var(--radius); display: grid; gap: 28px 48px; }
.lesson-intro-with-preview { grid-template-columns: minmax(0, 1fr) 280px; align-items: center; }
.lesson-intro-body { min-width: 0; }
.lesson-intro-title { display: flex; align-items: flex-start; gap: 16px; }
.lesson-intro-mark { display: inline-flex; color: var(--accent); margin-top: 6px; flex: 0 0 auto; }
.lesson-intro-title h2 { margin: 0; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.6; text-wrap: balance; }
.lesson-outcomes-heading { margin: 24px 0 12px; font-size: 18px; color: var(--ink-soft); font-weight: 400; }
.lesson-outcomes { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.lesson-outcomes li { display: flex; gap: 12px; align-items: baseline; font-size: 18px; line-height: 1.8; }
.lesson-outcome-number { flex: 0 0 24px; color: var(--accent); font-size: 14px; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line); text-align: center; }
.lesson-intro-time { display: flex; gap: 8px; align-items: flex-start; margin: 24px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.lesson-intro-time svg { flex: 0 0 auto; margin-top: 3px; }
.lesson-intro-time strong { font-weight: 700; margin-right: 8px; }
.lesson-intro-preview { margin: 0; min-width: 0; position: relative; padding: 8px 0 12px; }
.lesson-receipt { margin: 0; position: relative; padding: 24px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 4px 4px 0 0; transform: rotate(2deg); }
.lesson-receipt figcaption { display: flex; align-items: center; gap: 8px; padding-bottom: 20px; color: var(--accent); font-size: 18px; line-height: 1.6; }
.lesson-preview-rows { margin: 0; display: grid; gap: 16px; }
.lesson-preview-rows > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.lesson-preview-rows dt { font-size: 14px; color: var(--ink-soft); line-height: 1.8; }
.lesson-preview-rows dd { font-size: 18px; margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lesson-preview-result { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 18px; }
.lesson-preview-result strong { font-size: 30px; line-height: 1.5; color: var(--accent); font-variant-numeric: tabular-nums; }
.lesson-receipt > code { display: block; margin-top: 12px; font: 12px/1.8 var(--mono); overflow-wrap: anywhere; color: var(--ink-soft); }
.lesson-receipt > p { margin: 8px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.lesson-intro .lesson-confidence { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; margin: 0; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: 18px; line-height: 1.85; color: var(--ink-soft); }
.lesson-confidence svg { flex: 0 0 auto; color: var(--accent); margin-top: 4px; }
@media(max-width:800px) {
 .lesson-intro-with-preview { grid-template-columns: minmax(0, 1fr) 240px; column-gap: 28px; }
 .lesson-receipt { padding: 20px; }
}
@media(max-width:650px) {
 .lesson-intro { margin-bottom: 32px; padding: 24px 20px; gap: 24px; }
 .lesson-intro-with-preview { grid-template-columns: minmax(0, 1fr); }
 .lesson-intro-title { gap: 12px; }
 .lesson-intro-title h2 { font-size: 24px; }
 .lesson-intro-mark svg { width: 26px; height: 26px; }
 .lesson-outcomes-heading { margin-top: 20px; }
 .lesson-outcomes li { font-size: 18px; gap: 8px; }
 .lesson-intro-preview { width: min(100%, 320px); justify-self: center; padding-inline: 8px; }
 .lesson-receipt { transform: rotate(1deg); }
 .lesson-intro .lesson-confidence { font-size: 18px; }
}
.map-section { margin: 24px 0 5px; color: var(--ink-soft); font-size: 15px; font-weight: 600; }
.guide-content { min-width: 0; }
@media(max-width:600px) {
 .demo-row { grid-template-columns: minmax(0,1fr); gap: 5px; }
 .demo-stage h3 { font-size: 17px; }
 .demo-controls { gap: 7px; }
 .demo-controls .button { font-size: 12px; padding: 6px 10px; }
 .demo-value { font-size: 13px; }
}

/* 操作说明按顺序阅读：每步独立一行，动作与结果保持相邻。 */
.guide-flow-title { margin: 0 0 20px; font-size: 23px; line-height: 1.65; }
.guide-copy > ol { list-style: none; counter-reset: learning-flow; padding: 0; margin: 0 0 28px; }
.guide-copy > ol > li { counter-increment: learning-flow; position: relative; padding: 4px 0 20px 48px; margin: 0; min-height: 52px; }
.guide-copy > ol > li::before { content: counter(learning-flow); position: absolute; left: 0; top: 5px; width: 30px; height: 30px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hover); border-radius: 50%; font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; }
.guide-copy > ol > li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 42px; bottom: 6px; width: 1px; background: var(--line); }
.guide-copy > ol > li + li { margin-top: 0; }
.guide-copy > ol > li:last-child { padding-bottom: 0; }
.guide-copy > ol > li > p { margin: 0; }
.guide-copy > ol > li > strong:first-child, .guide-copy > ol > li > p:first-child > strong:first-child { display: block; margin-bottom: 4px; }
@media(max-width:650px) {
 .guide-flow-title { font-size: 21px; }
 .guide-copy > ol > li { padding-left: 42px; font-size: 18px; line-height: 1.9; }
}

/* 独立知识小节直接阅读，代码与说明严格沿用作者顺序。 */
.article-content { max-width: 900px; margin: 0 auto 32px; }
.article-content > h2 { margin: 40px 0 16px; font-size: 30px; line-height: 1.6; }
.article-content > h3 { margin: 32px 0 12px; font-size: 23px; line-height: 1.7; }
.article-subtitle { max-width: 42ch; margin: 16px auto 0; font-size: 20px; line-height: 1.8; color: var(--ink-soft); }
.article-duration { margin: 16px 0 0; font-size: 16px; line-height: 1.8; color: var(--ink-soft); }
.article-duration svg { vertical-align: middle; }
.article-intro { max-width:900px; margin:0 auto 32px; padding:28px 32px; background:var(--accent-soft); border-radius:var(--radius); }
.article-intro>h2 { margin:0 0 14px; font-size:20px; line-height:1.6; }
.article-intro-outcomes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 28px; padding:0; margin:0; list-style:none; }
.article-intro-outcomes li { display:flex; align-items:flex-start; gap:10px; min-width:0; font-size:18px; line-height:1.8; overflow-wrap:anywhere; }
.article-intro-outcomes svg { flex:0 0 auto; margin-top:7px; color:var(--sage-label); }
.article-intro-confidence { display:flex; align-items:flex-start; gap:10px; margin:20px 0 0; font-size:18px; line-height:1.85; color:var(--ink-soft); overflow-wrap:anywhere; }
.article-intro-confidence:first-child { margin-top:0; }
.article-intro-confidence svg { flex:0 0 auto; margin-top:6px; color:var(--accent); }
@media(max-width:650px) {
 .article-intro { padding:22px 20px; margin-bottom:28px; }
 .article-intro-outcomes { grid-template-columns:minmax(0,1fr); gap:8px; }
}
.lesson-main-article [data-prev] { display: none; }
@media(max-width:650px) {
 .article-content > h2 { font-size: 24px; }
 .article-subtitle { font-size: 18px; }
}

/* 章末总结与上面的问答分开，保留清楚的阅读收尾。 */
.lesson-summary { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.lesson-summary > h2 { margin: 0 0 20px; font-size: 30px; line-height: 1.6; color: var(--ink); }
.guide-content .lesson-summary > p { margin: 0 0 16px; }
.guide-content .lesson-summary > p:last-child { margin-bottom: 0; color: var(--ink-soft); }
@media(max-width:650px) {
 .lesson-summary { margin-top: 40px; padding-top: 24px; }
 .lesson-summary > h2 { font-size: 24px; margin-bottom: 16px; }
}

/* 先定义本章工具，再交代价值与学习目标；只在提供导入文案的章节显示。 */
.lesson-intro-lead { max-width: 65ch; margin: 20px 0 0; font-size: 20px; line-height: 1.85; }
.lesson-intro-highlights { display: grid; gap: 12px; margin: 20px 0 28px; padding-left: 22px; font-size: 18px; line-height: 1.85; color: var(--ink-soft); }
.lesson-intro-highlights strong { color: var(--ink); }
.lesson-intro-highlights li::marker { color: var(--accent); }
@media(max-width:650px) { .lesson-intro-lead { font-size: 18px; } }

/* 每次展示一层的真实张量；值与括号沿用通用矩阵，不另造数字卡片。 */
.demo-matrices { display:flex; flex-wrap:wrap; justify-content:center; align-items:flex-start; gap:28px; margin:24px 0; min-width:0; }
.demo-matrices .matrix-editor { flex:0 1 auto; max-width:100%; margin:0; }

/* A consistent chapter-end discussion, separate from exercises and answer keys. */
.lesson-discussion{margin-top:56px;padding-top:32px;border-top:1px solid var(--line)}
.lesson-discussion-heading{display:flex;align-items:flex-start;gap:16px;margin-bottom:22px}
.discussion-symbol{display:grid;place-items:center;flex:none;width:52px;height:52px;color:var(--accent);background:var(--accent-soft);border-radius:12px}
.lesson-discussion-heading>div{min-width:0}
.lesson-discussion-heading h3{margin:0;font-family:var(--display);font-size:27px;font-weight:700;line-height:1.5;text-wrap:balance}
.guide-content .lesson-discussion-heading p{margin:8px 0 0;font-size:16px;line-height:1.8;color:var(--ink-soft)}
.guide-content .lesson-discussion-questions{list-style:none;margin:0;padding:0}
.lesson-discussion-questions li{display:flex;align-items:flex-start;gap:12px;padding:18px 0;border-bottom:1px solid var(--line);font-size:18px;line-height:1.85;color:var(--ink)}
.lesson-discussion-questions li>svg{flex:none;margin-top:7px;color:var(--accent)}
.lesson-discussion-invite{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-top:28px;padding:26px;background:var(--accent-soft);border-radius:12px}
.lesson-discussion-invite>div{min-width:0}
.lesson-discussion-invite h4{margin:0;font-family:var(--display);font-size:23px;font-weight:700;line-height:1.6;color:var(--ink)}
.guide-content .lesson-discussion-invite p{margin:8px 0 0;max-width:44ch;font-size:16px;line-height:1.85;color:var(--ink-soft)}
.guide-content .lesson-discussion-invite .discussion-group-note{font-size:14px;margin-top:12px}
.lesson-discussion-invite .discussion-group-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex-shrink:0;min-height:48px;white-space:nowrap;text-decoration:none}
.guide-content .lesson-discussion>.discussion-question-tip{margin:16px 0 0;font-size:14px;line-height:1.8;color:var(--ink-soft)}
.discussion-group-pending{color:var(--ink-soft);font-size:16px}
@media(max-width:700px){
 .lesson-discussion{margin-top:40px;padding-top:24px}
 .lesson-discussion-heading{gap:12px}
 .discussion-symbol{width:42px;height:42px;border-radius:10px}
 .discussion-symbol svg{width:25px;height:25px}
 .lesson-discussion-heading>div{min-width:0}
.lesson-discussion-heading h3{font-size:23px}
 .lesson-discussion-questions li{font-size:17px;padding:16px 0}
 .lesson-discussion-invite{flex-direction:column;align-items:stretch;gap:20px;padding:20px}
 .lesson-discussion-invite h4{font-size:21px}
 .lesson-discussion-invite .discussion-group-link{align-self:flex-start;white-space:normal}
}

.lesson-discussion-questions li+li{margin-top:0}
.lesson-discussion-questions li>span{min-width:0;overflow-wrap:anywhere}

/* 梯度下山选读：同一平方函数贯穿曲线、曲面与真实更新。 */
#curve-and-derivative .article-content>blockquote,#network-overview .article-content>blockquote{display:grid;place-items:center;min-height:180px;margin:40px 0;padding:24px 12px;text-align:center;}
#curve-and-derivative .article-content>blockquote p,#network-overview .article-content>blockquote p{margin:0;color:var(--accent);font-size:clamp(24px,2.6vw,34px);font-weight:700;line-height:1.9;text-wrap:balance;}
.lesson-table-scroll{max-width:100%;overflow-x:auto;margin:28px 0 32px;scrollbar-width:thin;scrollbar-color:var(--accent) var(--paper);}
.lesson-table{width:100%;border-collapse:collapse;font-size:18px;line-height:1.7;font-variant-numeric:tabular-nums;}
.lesson-table th,.lesson-table td{padding:16px 14px;text-align:center;border-bottom:1px solid var(--line);}
.lesson-table th{background:var(--accent-soft);color:var(--ink);font-weight:700;}
#curve-and-derivative .lesson-table tbody tr:has(strong){background:var(--accent-soft);color:var(--accent);}
@media(max-width:650px){.lesson-table{font-size:16px;}.lesson-table th,.lesson-table td{padding:13px 8px;}}
.gradient-lab{margin:32px 0 48px;padding:24px 0;border-block:1px solid var(--line);min-width:0;}
.gradient-lab figcaption{font-size:23px;line-height:1.6;font-weight:700;margin-bottom:22px;}
.gradient-settings{display:flex;gap:20px 32px;flex-wrap:wrap;}
.gradient-settings label{display:grid;gap:8px;color:var(--ink-soft);font-size:16px;}
.gradient-settings select{width:100%;max-width:100%;}
.gradient-choice{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;margin:16px 0;}
.gradient-choice>span{font-size:16px;color:var(--ink-soft);}
.gradient-choice>div{display:flex;gap:8px;flex-wrap:wrap;}
.gradient-choice .button{min-height:44px;font-variant-numeric:tabular-nums;}
.gradient-choice .button[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft);color:var(--accent);}
.gradient-lab .gradient-slope{margin:10px 0 0;text-align:center;font-variant-numeric:tabular-nums;color:var(--accent);}
.gradient-slice{fill:none;stroke:var(--accent);stroke-width:2.25;vector-effect:non-scaling-stroke;}
.gradient-lab .gradient-fixed,.gradient-lab .gradient-caption{font-size:15px;line-height:1.8;color:var(--ink-soft);margin:18px 0;}
.gradient-plot{max-width:660px;margin:12px auto;}
.gradient-plot svg{display:block;width:100%;height:auto;overflow:visible;}
.gradient-plot text{fill:var(--ink);font:22px var(--sans);}
.gradient-axis{fill:none;stroke:var(--ink-soft);stroke-width:1.2;}
.gradient-land{fill:none;stroke:var(--comment);stroke-width:3;}
.gradient-mesh{stroke-width:1.1;opacity:.72;}
.gradient-trail{fill:none;stroke:var(--accent);stroke-width:2.5;stroke-dasharray:5 4;}
.gradient-past{fill:var(--accent);}
.gradient-current{fill:var(--honey);stroke:var(--ink);stroke-width:2.5;}
.gradient-lab .gradient-position{font-size:21px;line-height:1.8;text-align:center;font-variant-numeric:tabular-nums;margin:12px 0 24px;}
.gradient-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.gradient-controls .button{min-height:44px;}
.gradient-controls .button-primary{background:var(--accent);color:var(--paper-raised);}
.gradient-controls .button-primary:hover{background:var(--accent-hover);}
.gradient-controls output{margin-left:auto;font-size:15px;color:var(--ink-soft);}
.gradient-lab .gradient-update{font-size:18px;line-height:1.9;min-height:5.7em;margin:24px 0 12px;font-variant-numeric:tabular-nums;}
@media(max-width:650px){.gradient-lab figcaption{font-size:21px;}.gradient-settings{gap:18px;}.gradient-settings label{flex:1 1 135px;min-width:0;}.gradient-plot text{font-size:25px;}.gradient-controls{gap:8px;}.gradient-controls .button{padding-inline:12px;font-size:15px;}.gradient-controls output{width:100%;margin:6px 0 0;}.gradient-lab .gradient-position{font-size:18px;}.gradient-lab .gradient-update{font-size:17px;}}

/* 概念交互沿用同一图形语言：割线/切线、凸性连线与参数行。 */
.gradient-concept svg{display:block;width:100%;max-width:660px;height:auto;margin:20px auto;}
.gradient-concept svg text{fill:var(--ink);font:22px var(--sans);}
.gradient-concept .concept-slider{flex:1 1 240px;max-width:600px;}
.concept-slider input{width:100%;min-width:0;height:44px;accent-color:var(--accent);cursor:pointer;}
.concept-tangent{fill:none;stroke:var(--ink-soft);stroke-width:2.5;stroke-dasharray:7 5;}
.concept-secant{fill:none;stroke:var(--accent);stroke-width:3;}
.concept-gap{stroke:var(--accent);stroke-width:2;}
.concept-hollow{fill:var(--paper);stroke:var(--ink);stroke-width:2;}
.gradient-concept .concept-legend{font-size:15px;color:var(--ink-soft);line-height:1.8;}
.concept-result{display:flex;flex-wrap:wrap;gap:12px 28px;margin:24px 0;font-size:18px;line-height:1.8;font-variant-numeric:tabular-nums;}
.concept-result strong{color:var(--accent);}
.gradient-concept .concept-equation{font-size:23px;line-height:1.9;font-variant-numeric:tabular-nums;color:var(--accent);text-align:center;margin:24px 0;}
.gradient-concept .concept-status{font-size:15px;color:var(--ink-soft);line-height:1.9;}
.concept-vector-stages{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px 24px;margin:28px 0 20px;padding-left:24px;color:var(--ink-soft);font-size:16px;}
.gradient-concept .concept-vector-stages>li{margin:0;padding-right:8px;}
.concept-vector-stages [aria-current=step]{color:var(--accent);font-weight:700;}
.concept-vector-current{min-width:0;}
.concept-vector-current .matrix-standalone{margin:12px auto 20px;padding:12px 0;}
[data-gradient-concept=vector] .gradient-controls{margin-top:20px;}
@media(max-width:650px){.gradient-concept svg text{font-size:24px;}.concept-result{font-size:17px;gap:10px 18px;}.gradient-concept .concept-equation{font-size:21px;}.concept-vector-stages{gap:10px 20px;}}

/* A brief celebration between building a network and learning to train it. */
.lesson-milestone {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 32px;
  margin: 24px 0 48px;
  border-radius: 16px;
  background: var(--accent-soft);
}
.milestone-trophy {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  color: var(--accent);
  transform-origin: 50% 80%;
}
.milestone-trophy > svg:last-child {
  position: absolute;
  top: 0;
  right: 0;
}
.milestone-message { min-width: 0; }
.article-content .milestone-message h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.45;
  text-wrap: balance;
  color: var(--accent);
}
.article-content .milestone-message p { margin: 0 0 14px; }
.article-content .milestone-message p:last-child { margin-bottom: 0; }
#first-mlp .article-content > ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
}
#first-mlp .article-content > ul > li {
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
#first-mlp .article-content > ul a { font-weight: 700; }
#first-mlp:not([hidden]) .milestone-trophy {
  animation: milestone-cheer 900ms cubic-bezier(.16, 1, .3, 1) 1;
}
@keyframes milestone-cheer {
  0% { transform: rotate(-8deg) scale(.94); }
  45% { transform: rotate(5deg) scale(1.07); }
  100% { transform: rotate(0) scale(1); }
}
@media (max-width: 700px) {
  .lesson-milestone {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 24px;
    margin-bottom: 36px;
  }
  .milestone-trophy { width: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  #first-mlp:not([hidden]) .milestone-trophy { animation: none; }
}

/* Keep short column comparisons in one view; the matrix component owns the data. */
@media(max-width:600px){
 .demo-matrices-short-columns{display:grid;grid-template-columns:repeat(var(--demo-matrix-columns),minmax(0,1fr));gap:12px;align-items:start;}
 .demo-matrices-short-columns .matrix-editor{width:100%;min-width:0;padding:0;position:relative;}
 .demo-matrices-short-columns .matrix-editor-heading{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(28px,auto) 22px 44px;gap:4px;text-align:center;font-size:16px;}
 .demo-matrices-short-columns .matrix-editor-heading>span:first-child{min-width:0;overflow-wrap:break-word;}
 .demo-matrices-short-columns .matrix-shape{margin:0;}
 .demo-matrices-short-columns .matrix-copy{font-size:14px;min-height:44px;justify-self:center;}
 .demo-matrices-short-columns .matrix-editor-body{padding:12px 0;gap:0;overflow:visible;}
 .demo-matrices-short-columns :is(.matrix-symbol,.matrix-column-index,.matrix-row-index){display:none;}
 .demo-matrices-short-columns .matrix-value{height:44px;font-size:26px;}
 .demo-matrices-short-columns .matrix-help{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
}

/* Data-split roles are short phrases, rather than single numeric cells. */
[data-step="train-model"] .calculation-demo .demo-cells { grid-template-columns:minmax(0,1fr); min-width:0; max-width:28rem; }
[data-step="train-model"] .calculation-demo .demo-value:only-child { font-size:20px; overflow-wrap:break-word; word-break:normal; }

/* Keep each hypothetical glossary token intact; the native region can pan if needed. */
#attention-types .demo-cells { grid-template-columns:repeat(var(--demo-cols),minmax(max-content,1fr)); }
#attention-types .demo-value { white-space:nowrap; overflow-wrap:normal; }

/* Method explanations are sentences; give them the available reading width. */
#phase-preference .calculation-demo .demo-cells:has(> .demo-value:only-child) {
 grid-template-columns:minmax(0,1fr);
 min-width:0;
}
#phase-preference .calculation-demo .demo-value:only-child {
 padding:12px;
 font-size:20px;
 line-height:1.65;
 text-align:start;
 overflow-wrap:break-word;
 word-break:normal;
}
#phase-preference .calculation-demo[data-demo-locale="ko"] .demo-value:only-child {
 word-break:keep-all;
}

/* Exact image geometry shares the paper, type and native matrices of the classroom. */
.box-lab { padding: 24px 0 12px; border-top: 1px solid var(--line); margin: 12px 0 24px; }
.box-lab h2 { margin: 0 0 24px; font-size: 21px; font-weight: 650; }
.box-lab-layout, .box-prediction-layout { display: grid; grid-template-columns: minmax(240px,1fr) minmax(280px,1fr); gap: 36px; align-items: center; }
.box-plot { display: block; width: 100%; max-width: 420px; margin: 0 auto; overflow: visible; }
.box-plot .box-paper { fill: var(--paper-raised); }
.box-grid path { fill:none; stroke:var(--line); stroke-width:.8; }
.box-grid text, .box-plot>text { fill:var(--ink-soft); font:15px var(--sans); }
.box-outline { fill:none; stroke:var(--accent); stroke-width:2.5; vector-effect:non-scaling-stroke; transition: opacity .25s ease-out,stroke-width .25s ease-out; }
.box-color-0 { --box-color:var(--accent); }
.box-color-1 { --box-color:var(--formula-mint-ink,var(--lesson-color-327564,#327564)); }
.box-color-2 { --box-color:var(--formula-lavender-ink,var(--lesson-color-7c62a3,#7c62a3)); }
.box-outline { stroke:var(--box-color,var(--accent)); }
.box-outline.is-active { stroke-width:4; }
.box-outline.is-removed { opacity:.18; stroke-dasharray:4 4; }
.box-id { fill:var(--box-color,var(--ink)); font:600 17px var(--sans); paint-order:stroke; stroke:var(--paper-raised); stroke-width:3; pointer-events:none; }
.box-prediction-id { pointer-events:none; }
.box-id-leader { fill:none; stroke:var(--box-color); stroke-width:1.25; }
.box-id-plate { fill:var(--paper-raised); stroke:var(--box-color); stroke-width:1; }
.box-prediction-id .box-id { font-size:16px; stroke:none; }
.box-object { fill:var(--honey); fill-opacity:.4; }
.box-center { fill:var(--ink); }
.box-cell { fill:var(--honey); fill-opacity:.2; stroke:var(--ink-soft); stroke-width:1; }
.box-coverage { fill:var(--box-color); fill-opacity:.13; }
.box-intersection { fill:var(--honey); fill-opacity:.65; }
.box-lab [data-box-plot] { touch-action:pan-y; }
.box-lab [data-box-drag] { pointer-events:all; cursor:grab; touch-action:none; }
.box-lab [data-box-drag]:active { cursor:grabbing; }
.box-lab-readout { min-width:0; }
.box-move-controls { display:grid; gap:12px; margin-bottom:28px; }
.box-move-controls label { display:grid; grid-template-columns:6.5em minmax(60px,1fr) 3ch; gap:12px; align-items:center; color:var(--ink-soft); font-size:16px; }
.box-lab input[type=range] { width:100%; min-height:44px; margin:0; accent-color:var(--accent); }
.box-lab output { font-variant-numeric:tabular-nums; }
.box-presets { display:flex; gap:12px; flex-wrap:wrap; margin:0 0 26px; }
.box-explanation { border-top:1px solid var(--line); margin:28px 0 0; padding:24px 0 8px; font-size:19px; line-height:1.8; min-height:90px; }
.box-drag-hint { font-size:14px; color:var(--ink-soft); margin:8px 0 0; }
.box-candidates { list-style:none; margin:0 0 24px; padding:0; }
.box-candidates li { display:grid; grid-template-columns:1fr auto; gap:8px 20px; padding:14px 12px; border-bottom:1px solid var(--line); font-size:16px; transition:opacity .25s ease-out; }
.box-candidates li strong { color:var(--box-color); font-weight:650; }
.box-candidates li [data-box-state] { grid-column:2; color:var(--ink-soft); font-size:14px; }
.box-candidates li.is-current { background:var(--accent-soft); }
.box-candidates li.is-current strong { color:var(--ink); }
.box-threshold { display:grid; grid-template-columns:6.5em minmax(60px,1fr) 3ch; gap:12px; align-items:center; font-size:16px; }
.box-steps { display:flex; gap:12px; flex-wrap:wrap; align-items:center; padding:16px 0; }
.box-steps output { margin-left:auto; font-size:14px; color:var(--ink-soft); }
.box-lab[data-box-lab=nms] .box-steps { padding-top:0; }
.box-lab[data-box-lab=nms] .box-explanation { margin:0 0 18px; padding:12px 0; min-height:3.6em; font-size:18px; }
.box-prediction { width:100%; padding:24px 0 32px; border-bottom:1px solid var(--line); }
.box-prediction h3 { font-size:21px; margin:0 0 24px; }
.box-prediction p { color:var(--ink-soft); font-size:15px; line-height:1.8; }
.box-result-list { list-style:none; margin:0 0 24px; padding:0; }
.box-result-list li { display:flex; flex-wrap:wrap; gap:12px 24px; padding:12px 0; border-bottom:1px solid var(--line); font-size:17px; }
.box-result-list strong { color:var(--box-color); }
.box-result-error { width:100%; padding:20px; color:var(--ink); background:var(--paper-raised); }
@media(max-width:850px) {
  .box-lab-layout,.box-prediction-layout { grid-template-columns:minmax(0,1fr); gap:24px; }
  .box-lab h2,.box-prediction h3 { font-size:20px; }
  .box-lab [data-box-matrix] { max-width:100%; }
}
@media(prefers-reduced-motion:reduce) { .box-outline,.box-candidates li { transition:none; } }

.python-detection-result { grid-column:1 / -1; width:100%; min-width:0; }

.sequence-lab { border-top:1px solid var(--line); margin:12px 0 28px; padding:26px 0 0; }
.rnn-story { margin:32px 0 40px; padding:28px 0; border-block:1px solid var(--line); }
.rnn-story h2 { font-size:24px; margin:0 0 30px; }
.rnn-temperature-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:36px; }
.rnn-temperature { margin:0; min-width:0; }
.rnn-temperature figcaption { font-size:18px; font-weight:700; }
.rnn-temperature svg { display:block; width:100%; overflow:visible; }
.rnn-temperature svg text { fill:var(--ink-soft); font:18px var(--sans); }
.rnn-temperature svg circle { fill:var(--accent); }
.rnn-temperature-line { fill:none; stroke:var(--accent); stroke-width:3; }
.rnn-axis { fill:none; stroke:var(--line); stroke-width:1.5; }
.rnn-temperature [data-rnn-day] { opacity:0; transition:opacity .4s ease-out; }
.rnn-temperature [data-rnn-day].is-visible { opacity:1; }
.rnn-temperature [data-rnn-day].is-current text { fill:var(--accent); font-weight:700; }
.rnn-temperature p { font-size:17px; min-height:32px; margin:0; }
.rnn-story-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:28px 0 20px; }
.rnn-story-status { min-height:3.8em; font-size:18px; line-height:1.9; }
.rnn-day-strip { list-style:none; display:flex; justify-content:center; gap:24px; padding:0; margin:0 0 20px; }
.rnn-story .rnn-day-strip li { margin:0; padding:12px 20px; border-radius:12px; text-align:center; }
.rnn-day-strip span,.rnn-day-strip strong,.rnn-day-strip small { display:block; }
.rnn-day-strip strong { font-size:24px; margin:6px 0; }
.rnn-day-strip span,.rnn-day-strip small { font-size:15px; color:var(--ink-soft); }
.rnn-day-strip .is-current { background:var(--accent-soft); outline:2px solid var(--accent); outline-offset:2px; }
.rnn-memory-diagram { display:block; width:100%; }
.rnn-memory-diagram text { fill:var(--ink); font:22px var(--sans); }
.rnn-memory-diagram .rnn-small { font-size:18px; fill:var(--ink-soft); }
.rnn-memory-diagram rect { fill:var(--paper-raised); stroke:var(--line); stroke-width:1.5; }
.rnn-memory-diagram .rnn-cell rect { fill:var(--accent-soft); stroke:var(--accent); }
.rnn-memory-diagram [data-rnn-current],.rnn-memory-diagram [data-rnn-previous] { font-variant-numeric:tabular-nums; }
.rnn-flow-arrows path { stroke:var(--accent); stroke-width:2; fill:none; }
.rnn-memory-diagram marker path { fill:none; stroke:var(--accent); stroke-width:1.5; }
.rnn-memory-diagram .rnn-memory-rule { font-size:20px; font-weight:700; }
.rnn-portrait { display:none; }
.rnn-state-trail { display:flex; justify-content:center; flex-wrap:wrap; gap:14px; font-size:17px; font-variant-numeric:tabular-nums; }
.rnn-state-trail [data-rnn-state] { color:var(--ink-soft); }
.rnn-state-trail .is-visible { color:var(--ink); font-weight:700; }
[data-rnn-window-plot] { max-width:650px; margin:auto; }
[data-rnn-window-matrix] { max-width:100%; margin:24px 0; }
.rnn-story-actions output { margin-left:auto; font-size:15px; color:var(--ink-soft); }
.rnn-plain-calculations { display:grid; grid-template-columns:1fr; gap:0; list-style:none; padding:0; margin:12px 0 28px; }
.rnn-plain .rnn-plain-calculations li { display:grid; grid-template-columns:minmax(140px,.8fr) minmax(0,1.2fr); align-items:center; gap:8px 18px; margin:0; padding:14px 16px; border-radius:0; border:0; border-bottom:1px solid var(--line); }
.rnn-plain-calculations li span,.rnn-plain-calculations li strong { display:block; }
.rnn-plain-calculations li span { font-size:16px; color:var(--ink-soft); margin-bottom:0; }
.rnn-plain-calculations li strong { font-size:20px; font-variant-numeric:tabular-nums; }
.rnn-plain-calculations .is-current { background:var(--accent-soft); border-radius:12px; outline:2px solid var(--accent); outline-offset:-2px; }
.rnn-plain-contrast { margin:28px 0; padding:22px 0; border-block:1px solid var(--line); }
.rnn-plain-contrast p { font-size:17px; line-height:1.8; }
.rnn-plain-contrast strong { white-space:nowrap; font-variant-numeric:tabular-nums; }
.rnn-plain-contrast [data-plain-impact] { min-height:3.6em; }
.rnn-plain .rnn-day-strip li { padding:0; }
.rnn-day-strip button { display:block; width:100%; min-height:100px; padding:10px 4px; border:0; border-radius:12px; box-shadow:none; background:transparent; color:var(--ink); font:inherit; cursor:pointer; }
.rnn-day-strip button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.rnn-day-strip button:hover { background:var(--accent-soft); }
.rnn-plain .rnn-day-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.rnn-relay-track { position:relative; min-height:154px; margin:16px 0 4px; }
.rnn-relay-track>svg { display:block; width:100%; height:24px; }
.rnn-relay-track>svg path { fill:none; stroke:var(--accent); stroke-width:2; }
.rnn-shared-note { box-sizing:border-box; line-height:1.35; position:relative; left:0; top:2px; width:clamp(112px,calc((100% - 48px)/3),100%); padding:15px 6px; border-radius:12px; border:2px solid var(--accent); background:var(--paper-raised); text-align:center; transition:transform .55s cubic-bezier(.16,1,.3,1),background-color .2s; }
.rnn-shared-note.is-written { background:var(--accent-soft); }
.rnn-shared-note span,.rnn-shared-note strong,.rnn-shared-note small { display:block; }
.rnn-shared-note span { font-size:16px; }
.rnn-shared-note strong { font-size:29px; margin:8px 0; font-variant-numeric:tabular-nums; white-space:nowrap; }
.rnn-shared-note small { font-size:14px; color:var(--ink-soft); }
.rnn-relay-explanation { margin:12px 0 24px; font-size:17px; line-height:1.7; }
.rnn-plain-operation-heading { font-size:20px; margin:24px 0 18px; }
.rnn-snapshot-label { font-size:16px; color:var(--ink-soft); margin-top:24px; }
.rnn-dependency-grid { display:grid; gap:30px; margin:24px 0; }
.rnn-dependency-row { display:grid; grid-template-columns:80px minmax(0,1fr); align-items:center; gap:20px; }
.rnn-dependency-row>strong { font-size:18px; }
.rnn-dependency-row ol { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px; list-style:none; padding:0; margin:0; }
.rnn-story .rnn-dependency-row li { position:relative; margin:0; padding:18px 12px; border:1px solid var(--line); border-radius:12px; text-align:center; }
.rnn-dependency-row li+li::before { content:""; position:absolute; left:-24px; top:50%; width:17px; height:10px; background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12' fill='none' stroke='%23b15317' stroke-width='1.8'%3E%3Cpath d='M1 6h16M12 1l6 5-6 5'/%3E%3C/svg%3E"); }
.rnn-dependency-row li span,.rnn-dependency-row li strong,.rnn-dependency-row li small { display:block; }
.rnn-dependency-row li strong { font-size:25px; margin:12px 0; }
.rnn-dependency-row li span,.rnn-dependency-row li small { font-size:15px; color:var(--ink-soft); }
.rnn-dependency-row .is-done { background:var(--accent-soft); }
.rnn-dependency-row .is-current { outline:2px solid var(--accent); outline-offset:2px; }
.rnn-classifier-diagram { margin:30px 0; padding:26px 0; border-block:1px solid var(--line); }
.rnn-classifier-diagram figcaption { font-size:23px; font-weight:700; margin-bottom:26px; }
.rnn-network-flow { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px; list-style:none; padding:0; }
.guide-content .rnn-network-flow li { position:relative; margin:0; padding:22px 14px; border:1px solid var(--line); border-radius:12px; text-align:center; }
.rnn-network-flow li+li::before { content:""; position:absolute; left:-22px; top:50%; width:18px; height:12px; background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12' fill='none' stroke='%23b15317' stroke-width='1.8'%3E%3Cpath d='M1 6h16M12 1l6 5-6 5'/%3E%3C/svg%3E"); }
.rnn-network-flow li strong,.rnn-network-flow li code,.rnn-network-flow li span { display:block; }
.rnn-network-flow li strong { font-size:17px; }
.rnn-network-flow li code { margin:14px 0; font-size:17px; white-space:nowrap; }
.rnn-network-flow li span { font-size:16px; color:var(--ink-soft); line-height:1.8; }
.rnn-network-flow li .rnn-score-term { display:inline-block; white-space:nowrap; }
.rnn-training-rows { display:grid; gap:30px; }
.rnn-training-rows h3 { font-size:20px; margin:16px 0; }
.rnn-training-rows ol { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; list-style:none; padding:0; }
.rnn-story .rnn-training-rows li { margin:0; padding:18px 8px; border:1px solid var(--line); border-radius:12px; text-align:center; }
.rnn-training-rows li span,.rnn-training-rows li strong,.rnn-training-rows li small { display:block; }
.rnn-training-rows li span,.rnn-training-rows li small { font-size:14px; color:var(--ink-soft); }
.rnn-training-rows li strong { font-size:20px; margin:14px 0; }
.rnn-training-rows .is-done { background:var(--accent-soft); }
.rnn-training-rows .is-current { outline:2px solid var(--accent); outline-offset:2px; }
.rnn-causal-table { width:100%; table-layout:fixed; border-collapse:collapse; margin:20px 0; text-align:center; }
.rnn-causal-table caption { text-align:left; font-size:16px; color:var(--ink-soft); margin-bottom:20px; }
.rnn-causal-table th,.rnn-causal-table td { padding:16px 8px; border:1px solid var(--line); font-size:18px; }
.rnn-causal-table .is-allowed { background:var(--accent-soft); }
.rnn-causal-table .is-blocked { color:var(--ink-soft); }
.rnn-causal-table .is-selected { outline:2px solid var(--accent); outline-offset:1px; }
.rnn-mask-choices [aria-pressed=true] { background:var(--accent); border-color:var(--accent); color:var(--lesson-color-fffaf0,#fffaf0); }
.rnn-forgetting-readout { display:flex; flex-wrap:wrap; align-items:baseline; gap:10px 22px; margin:24px 0; }
.rnn-forgetting-readout span { font-size:18px; }
.rnn-forgetting-readout strong { font-size:32px; color:var(--accent); font-variant-numeric:tabular-nums; }
.rnn-forgetting-readout small { font-size:16px; color:var(--ink-soft); }
.rnn-forgetting-plot { display:block; width:100%; }
.rnn-forgetting-plot rect { fill:var(--accent); visibility:hidden; }
.rnn-forgetting-plot .is-read rect { visibility:visible; }
.rnn-forgetting-plot text { fill:var(--ink-soft); font:17px var(--sans); }
.rnn-forgetting-plot .is-current text { fill:var(--accent); font-weight:700; }
.lstm-compare-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:32px; margin:30px 0; }
.lstm-compare-grid figure { min-width:0; margin:0; padding:22px 0; border-block:1px solid var(--line); }
.lstm-compare-grid figcaption { font-size:21px; font-weight:700; line-height:1.6; }
.lstm-compare-grid svg { display:block; width:100%; }
.lstm-compare-grid p { font-size:17px; line-height:1.8; }
.lstm-compare-grid svg text,.lstm-cell-diagram text { font:20px var(--sans); fill:var(--ink); }
.lstm-compare-grid svg rect,.lstm-cell-diagram rect { fill:var(--paper-raised); stroke:var(--line); stroke-width:1.6; }
.lstm-memory-node rect { fill:var(--lesson-color-edf0e3,#edf0e3); stroke:var(--lesson-color-426244,#426244); }
.lstm-compare-arrow,.lstm-route { fill:none; stroke:var(--ink-soft); stroke-width:1.8; }
.lstm-compare-grid marker path,.lstm-cell-diagram marker path { fill:none; stroke:var(--accent); stroke-width:1.6; }
.lstm-compare-arrow { stroke:var(--accent); }
.lstm-diagram-pair { margin:24px 0 32px; }
.lstm-cell-diagram { display:block; width:100%; overflow:visible; }
.lstm-cell-diagram .lstm-small { font-size:18px; fill:var(--ink-soft); }
.lstm-operator circle { fill:var(--accent-soft); stroke:var(--accent); stroke-width:1.6; }
.lstm-route.is-active { stroke:var(--accent); stroke-width:3.4; }
.lstm-portrait { display:none; }
.lstm-text-flow { grid-template-columns:repeat(5,minmax(0,1fr)); }
@media(max-width:650px) {
 .rnn-story { margin:24px 0 32px; padding:24px 0; }
 .rnn-story h2 { font-size:21px; }
 .rnn-temperature-pair { grid-template-columns:1fr; gap:30px; }
 .rnn-temperature svg { max-width:400px; margin:auto; }
 .rnn-temperature svg text { font-size:20px; }
 .rnn-day-strip { gap:8px; }
 .rnn-story[data-rnn-story] .rnn-day-strip li { padding:10px 12px; }
 .rnn-day-strip strong { font-size:22px; }
 .rnn-day-strip span,.rnn-day-strip small { font-size:14px; }
 .rnn-landscape { display:none; }
 .rnn-portrait { display:block; max-width:400px; margin:auto; }
 .rnn-portrait .rnn-small { font-size:20px; }
 .rnn-state-trail { gap:9px; font-size:14px; }
 .rnn-plain-calculations { grid-template-columns:1fr; gap:0; }
 .rnn-plain-calculations li strong { font-size:18px; }
 .rnn-story-actions output { margin-left:0; width:100%; }
 .rnn-dependency-row { grid-template-columns:1fr; gap:12px; }
 .rnn-dependency-row ol { gap:22px; }
 .rnn-story .rnn-dependency-row li { padding:14px 6px; }
 .rnn-dependency-row li+li::before { left:-20px; width:16px; }
 .rnn-dependency-row li span,.rnn-dependency-row li small { font-size:14px; }
 .rnn-plain-contrast strong { display:block; font-size:17px; }
 .rnn-shared-note span { font-size:14px; }
 .rnn-shared-note strong { font-size:24px; }
 .rnn-shared-note small { font-size:14px; }
 .rnn-plain .rnn-day-strip li { padding-inline:4px; }
 .rnn-plain .rnn-day-strip small { white-space:normal; font-size:14px; }
 .rnn-plain .rnn-plain-calculations li { grid-template-columns:1fr; padding:12px 16px; }
 .rnn-plain-calculations li span { margin-bottom:0; }
 .rnn-network-flow { grid-template-columns:1fr; gap:24px; }
 .rnn-network-flow li+li::before { left:50%; top:-19px; transform:translateX(-50%) rotate(90deg); }
 .guide-content .rnn-network-flow li { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px 12px; padding:14px 16px; text-align:left; }
 .rnn-network-flow li span { grid-column:1/-1; line-height:1.5; }
 .rnn-classifier-diagram figcaption { font-size:21px; }
 .rnn-network-flow li code { margin:0; }
 .rnn-training-rows ol { gap:8px; }
 .rnn-story .rnn-training-rows li { padding:14px 2px; }
 .rnn-training-rows li span,.rnn-training-rows li small { font-size:12px; }
 .rnn-training-rows li small { min-height:3em; line-height:1.5; }
 .rnn-training-rows li strong { font-size:16px; }
 .rnn-causal-table th,.rnn-causal-table td { padding:14px 3px; font-size:14px; }
 .rnn-forgetting-plot text { font-size:28px; }
 .lstm-compare-grid { grid-template-columns:1fr; gap:20px; }
 .lstm-compare-grid figcaption { font-size:20px; }
 .lstm-landscape { display:none; }
 .lstm-portrait { display:block; max-width:400px; margin:auto; }
 .lstm-text-flow { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce) { .rnn-temperature [data-rnn-day],.rnn-shared-note { transition:none; } }
.sequence-lab h2 { margin:0 0 28px; font-size:22px; }
.memory-settings { display:flex; flex-wrap:wrap; justify-content:center; gap:28px 48px; align-items:center; }
.memory-settings>div { min-width:0; max-width:100%; }
.sequence-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:24px 0; }
.sequence-actions output { margin-left:auto; color:var(--ink-soft); font-size:14px; font-variant-numeric:tabular-nums; }
.sequence-actions .text-button { margin-left:12px; }
[data-memory-equation] { text-align:center; padding:28px 12px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); overflow-x:auto; }
.memory-equation { font-size:26px; margin-bottom:24px; }
.memory-result { font-size:30px; }
[data-memory-states] { margin:28px auto; max-width:100%; }
.sequence-caption { color:var(--ink); font-size:18px; line-height:1.9; margin:24px 0 18px; }
.sequence-source { color:var(--ink-soft); font-size:14px; line-height:1.9; }
.sequence-window-plot { max-width:700px; margin:0 auto; }
.price-plot { width:100%; display:block; overflow:visible; }
.price-grid path { stroke:var(--line); fill:none; }
.price-grid text,.price-labels { fill:var(--ink-soft); font:18px var(--sans); }
.price-history { fill:none; stroke:var(--ink-soft); stroke-width:1.5; }
.price-window-line { fill:none; stroke:var(--accent); stroke-width:3; }
.price-history-point { fill:var(--accent); }
.price-projection { stroke-width:2; fill:none; }
.price-prediction { color:var(--lesson-color-327564,#327564); fill:var(--lesson-color-327564,#327564); stroke:var(--lesson-color-327564,#327564); }
.price-baseline { color:var(--lesson-color-a14762,#a14762); fill:var(--paper); stroke:var(--lesson-color-a14762,#a14762); }
.price-baseline .price-projection { stroke-dasharray:5 4; }
.price-actual { color:var(--ink); fill:var(--ink); stroke:var(--ink); }
.price-actual .price-projection { opacity:.35; }
.price-future { stroke:var(--ink-soft); stroke-dasharray:4 5; }
.price-unknown { font:28px var(--sans); fill:var(--ink-soft); }
.window-controls { margin:18px 0; }
.window-controls>label { display:flex; align-items:center; gap:20px; font-size:16px; }
.window-controls input[type=range] { flex:1; min-width:0; min-height:44px; accent-color:var(--accent); }
.python-forecast-result { grid-column:1/-1; width:100%; min-width:0; }
.executed-forecast { padding:24px 0 28px; border-bottom:1px solid var(--line); }
.executed-forecast h3 { font-size:22px; margin:0 0 24px; }
.executed-forecast .price-plot { max-width:650px; margin:auto; }
.forecast-readout { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; list-style:none; margin:24px 0; padding:0; }
.forecast-readout li { border-top:1px solid var(--line); padding-top:18px; font-size:18px; }
.forecast-readout strong,.forecast-readout span,.forecast-readout small { display:block; margin-bottom:10px; }
.forecast-readout small { font-size:14px; line-height:1.6; color:var(--ink-soft); }
.sequence-result-error { color:var(--ink); background:var(--paper-raised); padding:20px; }
@media(max-width:650px) {
  .memory-settings { gap:16px; flex-direction:column; }
  .memory-equation { font-size:21px; }
  .memory-result { font-size:25px; }
  .sequence-actions { gap:10px; }
  .sequence-actions .text-button { margin-left:0; }
  .sequence-lab h2,.executed-forecast h3 { font-size:20px; }
  .executed-forecast .price-grid text,.executed-forecast .price-labels,
  [data-rnn-window] .price-grid text,[data-rnn-window] .price-labels { font-size:26px; }
  .executed-forecast .price-labels>text:last-child,
  [data-rnn-window] .price-labels>text:last-child { transform:translateY(-10px); }
  .forecast-readout { grid-template-columns:1fr; gap:4px; }
  .forecast-readout li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 18px; padding-top:14px; }
  .forecast-readout small { grid-column:1/-1; }
}

.forecast-numbers { grid-column:1/-1; width:100%; border-top:1px solid var(--line); padding-top:18px; }
.forecast-numbers summary { cursor:pointer; font-size:16px; color:var(--ink-soft); min-height:44px; }
.forecast-tensor-values { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:24px; padding-top:24px; }
.forecast-tensor-values>section { min-width:0; }

.lstm-cell-lab h3 { font-size:22px; margin:28px 0 24px; }
.lstm-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; max-width:620px; margin:0 auto; }
.lstm-fields:empty { display:none; }
.lstm-fields>div { min-width:0; }
.lstm-fields .matrix-editor-heading { flex-wrap:wrap; justify-content:center; gap:8px; }
.lstm-fields .matrix-copy,.lstm-fields .matrix-restore,.lstm-fields .matrix-shape { display:none; }
.lstm-fields .matrix-help { min-height:48px; line-height:1.65; }
.lstm-equation { text-align:center; font-size:26px; padding:32px 8px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); overflow-x:auto; }
.lstm-results:empty { display:none; }
.lstm-results { margin:24px auto; max-width:100%; }
@media(max-width:650px) {
 .lstm-fields { gap:12px; }
 .lstm-fields .matrix-help { font-size:14px; }
 .lstm-fields .matrix-editor-body { margin:16px 0; }
 .lstm-cell-lab h3 { font-size:20px; }
 .lstm-equation { font-size:21px; }
}

.price-reference { color:var(--lesson-color-7959a3,#7959a3); fill:var(--paper); stroke:var(--lesson-color-7959a3,#7959a3); }
.price-reference .price-projection { stroke-dasharray:3 3; }
@media(min-width:651px) {
 .forecast-readout { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
}

.lstm-cell-lab [data-cell-next] { background:var(--accent); }
.lstm-cell-lab [data-cell-next]:hover:not(:disabled) { background:var(--accent-hover); }
.lstm-fields>div:only-child { grid-column:1/-1; max-width:300px; width:100%; margin:auto; }
.lstm-fields .matrix-standalone { --matrix-cell-min:80px; --cell-width:80px; padding-inline:0; }

.window-input-dates { text-align:center; font-size:16px; line-height:1.8; color:var(--ink-soft); }
@media(max-width:380px){
 .sequence-window-plot .price-grid text,.sequence-window-plot .price-labels { font-size:22px; }
 [data-window-values] .matrix-symbol { display:none; }
 [data-window-values] .matrix-editor-body { gap:0; }
}
.rnn-forgetting-states { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; max-width:620px; margin:24px auto; }
.rnn-forgetting-states .matrix-editor { width:100%; min-width:0; padding:8px 0; margin:0; --matrix-number-size:26px; }
.rnn-forgetting-states .matrix-editor-heading { justify-content:center; font-size:17px; }
.rnn-forgetting-states .matrix-editor-body { padding:16px 0; }
.rnn-forgetting-states .matrix-shape,.rnn-forgetting-states .matrix-readonly,.rnn-forgetting-states .matrix-copy,.rnn-forgetting-states .matrix-help,.rnn-forgetting-states .matrix-symbol { display:none; }
.rnn-step-range { display:flex; align-items:center; gap:16px; margin:20px 0; font-size:16px; color:var(--ink-soft); }
.rnn-step-range input { flex:1; min-width:80px; min-height:44px; accent-color:var(--accent); }
.rnn-forgetting-ticks text { font-size:20px; }
.rnn-story [data-parallel-row="0"] { position:relative; }
.rnn-training-rows [data-parallel-row="0"]+[data-parallel-row="0"]::before { content:""; position:absolute; left:-20px; top:50%; width:16px; height:12px; background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12' fill='none' stroke='%23b15317' stroke-width='1.8'%3E%3Cpath d='M1 6h16M12 1l6 5-6 5'/%3E%3C/svg%3E"); }
.rnn-training-rows ol { gap:24px; }
#phase-network .calculation-demo[aria-label="三周价格 → 4项记忆 → 下一周预测"] .matrix-standalone { --matrix-number-size:24px; --matrix-cell-min:44px; padding-inline:0; }
@media(max-width:650px) {
 .rnn-forgetting-states { gap:16px; }
 .rnn-forgetting-states .matrix-editor-heading { font-size:16px; }
 .rnn-forgetting-plot text { font-size:36px; }
 .rnn-story .rnn-training-rows li { padding:14px 2px; }
 .rnn-training-rows ol { gap:16px; }
 .rnn-training-rows li span,.rnn-training-rows li small { font-size:14px; }
 .rnn-training-rows [data-parallel-row="0"]+[data-parallel-row="0"]::before { left:-14px; width:12px; }
 #phase-network .calculation-demo[aria-label="三周价格 → 4项记忆 → 下一周预测"] .matrix-symbol { display:none; }
}

/* 四个状态先完整读一行，再乘下方的输出权重。 */
#prediction-head .operation-equation { grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr); gap:12px; }
#prediction-head .operation-operand[data-operation-role=left] { grid-column:1/-1; }
#prediction-head .operation-operand[data-operation-role=right],
#prediction-head .operation-operand[data-operation-role=result] { grid-column:auto; }
@media(max-width:650px) {
 #prediction-head [data-operation-role=left] .matrix-grid,
 #prediction-head [data-operation-role=left] .matrix-column-index { --cell-width:60px; }
}

/* LSTM先操作本步数字，完整通路留在同一个可展开图中。 */
.lstm-stage-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:24px 0; }
.lstm-stage-tabs button { min-height:44px; padding:10px 8px; border:1px solid var(--line); border-radius:12px; background:var(--paper-raised); color:var(--ink-soft); font:inherit; }
.lstm-stage-tabs button[aria-pressed=true] { color:var(--accent); border-color:var(--accent); background:var(--accent-soft); font-weight:700; }
.lstm-stage-tabs button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.lstm-presets { display:flex; flex-wrap:wrap; justify-content:center; gap:16px; margin:16px 0 28px; }
.lstm-presets:empty { display:none; }
.lstm-results { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; max-width:620px; }
.lstm-results>.matrix-editor { grid-column:1/-1; }
.lstm-results .matrix-editor-heading { justify-content:center; font-size:18px; }
.lstm-results .matrix-editor-body { padding:16px 0; }
.lstm-results .matrix-shape,.lstm-results .matrix-copy,.lstm-results .matrix-help,.lstm-results .matrix-symbol { display:none; }
.lstm-fields .matrix-help:not(.is-error) { display:none; }
.lstm-fields .matrix-editor-heading { font-size:18px; }
.lstm-fields .matrix-standalone,.lstm-results .matrix-standalone { margin:8px 0 12px; padding:8px 0; }
.lstm-fields .matrix-editor-body,.lstm-results .matrix-editor-body { margin:8px 0; padding:12px 0; }
.lstm-full-diagram { margin:32px 0; }
.lstm-cell-lab .lstm-equation { margin:24px 0; padding:24px 4px; }
#lstm-states [data-python-tensors] .matrix-standalone { --matrix-number-size:24px; --matrix-cell-min:44px; padding-inline:0; }
#lstm-states [data-python-tensors] .matrix-symbol { display:none; }
#lstm-classifier-training [data-python-tensors] { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
#lstm-classifier-training [data-python-tensors] .matrix-standalone { margin:12px 0; padding:8px 0; }
#lstm-classifier-training [data-python-tensors] .matrix-editor-body { padding:12px 0; }
#lstm-classifier-training [data-python-tensors] .matrix-symbol,
#lstm-classifier-training [data-python-tensors] .matrix-help { display:none; }
@media(max-width:650px) {
 .lstm-stage-tabs { gap:8px; }
 .lstm-stage-tabs button { font-size:16px; padding-inline:4px; }
 .lstm-presets { gap:12px; }
 .lstm-results { gap:12px; }
 #lstm-states [data-python-tensors] .matrix-standalone { --matrix-number-size:20px; }
 #lstm-states [data-python-tensors] .matrix-row-index { display:none; }
 #lstm-states [data-python-tensors] .matrix-column-index { margin-left:12px; }
 #lstm-classifier-training [data-python-tensors] { grid-template-columns:minmax(0,1fr); gap:8px; }
}

/* 英文四词小表：数字仍由原生矩阵展示，当前词与亮格一起观察。 */
#one-hot .calculation-demo .matrix-standalone { --matrix-number-size:26px; --matrix-cell-min:44px; margin:12px auto; padding:8px 0; }
#one-hot .calculation-demo .matrix-symbol { display:none; }
#one-hot .calculation-demo .matrix-value { background:var(--paper-raised); color:var(--ink-soft); }
#one-hot [data-demo-frame="0"] [data-matrix="0"],
#one-hot [data-demo-frame="1"] [data-matrix="1"],
#one-hot [data-demo-frame="2"] [data-matrix="0"],
#one-hot [data-demo-frame="2"] [data-matrix="5"],
#one-hot [data-demo-frame="2"] [data-matrix="10"],
#one-hot [data-demo-frame="3"] [data-matrix="0"],
#one-hot [data-demo-frame="3"] [data-matrix="5"],
#one-hot [data-demo-frame="3"] [data-matrix="11"] { background:var(--accent-soft); color:var(--ink); border-color:var(--accent); font-weight:700; }
#sentiment-training [data-python-tensors] { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
#sentiment-training [data-python-tensors] .matrix-standalone { margin:12px 0; padding:8px 0; }
#sentiment-training [data-python-tensors] .matrix-editor-body { padding:12px 0; }
#sentiment-training [data-python-tensors] .matrix-symbol,#sentiment-training [data-python-tensors] .matrix-help { display:none; }
@media(max-width:650px) {
 #one-hot .calculation-demo .matrix-standalone { --matrix-number-size:24px; }
 #sentiment-training [data-python-tensors] { grid-template-columns:minmax(0,1fr); gap:8px; }
}

/* 同一句话从词到编号：文字按真实宽度排，数字仍交给原生矩阵。 */
:is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .calculation-demo > figcaption { font-size:16px; }
:is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .demo-cells { grid-template-columns:repeat(var(--demo-cols),minmax(0,1fr)); min-width:0; }
:is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .demo-value { font-size:20px; min-height:44px; padding:8px 4px; }
:is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .demo-row-label { font-size:16px; }
:is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .demo-explanation { font-size:18px; }
:is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .demo-controls { border-top:0; border-bottom:1px solid var(--line); padding:16px 0; }
:is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .demo-controls .button { min-height:44px; font-size:14px; }
:is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .demo-controls output { font-size:14px; }
:is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .demo-matrices { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:24px; }
:is(#word-identity,#embedding-table,#learn-embedding) .calculation-demo .matrix-standalone { --matrix-number-size:26px; --matrix-cell-min:44px; margin:12px auto; padding:8px 0; flex:1 1 280px; max-width:420px; }
:is(#word-identity,#embedding-table,#learn-embedding) .calculation-demo .matrix-symbol { display:none; }
#word-embedding-training [data-python-tensors] { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
#word-embedding-training [data-python-tensors] .matrix-standalone { margin:12px 0; padding:8px 0; }
:is(#word-embedding-lookup,#word-embedding-training,#word2vec-training,#tokenizer-batch,#token-embedding-lookup) [data-python-tensors] .matrix-standalone { --matrix-number-size:24px; --matrix-cell-min:44px; padding:8px 0; margin:12px auto; }
:is(#word-embedding-lookup,#word-embedding-training,#word2vec-training,#tokenizer-batch,#token-embedding-lookup) [data-python-tensors] .matrix-symbol { display:none; }
:is(#word-embedding-lookup,#word-embedding-training,#word2vec-training,#tokenizer-batch,#token-embedding-lookup) [data-python-tensors] .matrix-editor-body { padding:12px 0; }
:is(#word-embedding-lookup,#word-embedding-training,#word2vec-training,#tokenizer-batch,#token-embedding-lookup) .matrix-window button { min-width:44px; min-height:44px; }
#openai-tiktoken .matrix-standalone { --matrix-number-size:24px; --matrix-cell-min:44px; padding:8px 0; }
#openai-tiktoken .matrix-symbol { display:none; }
@media(max-width:650px) {
 :is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .demo-row { grid-template-columns:minmax(0,1fr); gap:8px; }
 :is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .demo-cells { gap:4px; }
 :is(#word-identity,#embedding-table,#learn-embedding,#word-context,#tokenizer-pipeline,#learn-bpe) .demo-value { font-size:18px; }
 :is(#word-identity,#embedding-table,#learn-embedding) .calculation-demo .matrix-standalone { --matrix-number-size:24px; }
 #word-embedding-training [data-python-tensors] { grid-template-columns:minmax(0,1fr); gap:12px; }
 :is(#word-embedding-lookup,#word-embedding-training,#word2vec-training,#tokenizer-batch,#token-embedding-lookup) [data-python-tensors] .matrix-standalone { --matrix-number-size:20px; }
 :is(#word-embedding-lookup,#word-embedding-training,#word2vec-training,#tokenizer-batch,#token-embedding-lookup) [data-python-tensors] .matrix-brackets { padding-inline:8px; }
 :is(#word-embedding-lookup,#word-embedding-training,#word2vec-training,#tokenizer-batch,#token-embedding-lookup) [data-python-tensors] .matrix-column-index { margin-left:26px; }
 #openai-tiktoken .matrix-standalone { --matrix-number-size:18px; }
}

/* A merged token stays one readable unit on the narrowest phones. */
@media(max-width:360px){
 #learn-bpe .demo-cells:has(.demo-value:nth-child(5)){grid-template-columns:repeat(4,minmax(0,1fr));}
 #learn-bpe .demo-cells:has(.demo-value:nth-child(5)) .demo-value{white-space:nowrap;}
}

/* Keep the twelve-step comparison readable in a narrow lesson column. */
@media (max-width:620px) {
 .rnn-story[data-rnn-forgetting] .rnn-forgetting-plot text { font-size:38px; }
}

/* Keep each teaching word intact beneath its input/prediction label. */
.rnn-training-rows [data-training-token] { display:block; white-space:nowrap; font-weight:inherit; }

/* Phone scalar controls need space for both a symbol and a complete number. */
@media(max-width:650px){.lstm-fields,.lstm-results{grid-template-columns:1fr;}.lstm-fields>div{width:100%;max-width:300px;margin-inline:auto;}}

/* Keep the four teaching words intact, aligned with their one-hot columns. */
@media(max-width:650px){[data-step="one-hot"] .demo-value{font-size:18px;padding-inline:4px;white-space:nowrap;overflow-wrap:normal;}}

.gru-compare { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:32px; margin-block:32px; }
.gru-compare section { min-width:0; padding-block:20px; border-block:1px solid var(--line); }
.gru-compare h3,.gru-models h3 { margin-top:0; }
.gru-compare p { color:var(--ink-soft); }
.gru-route { list-style:none; padding:0; display:grid; gap:32px; }
.guide-content .gru-route li { position:relative; margin:0; padding:16px; border:1px solid var(--line); border-radius:12px; text-align:center; }
.gru-route li+li::before,.gru-flow li+li::before { content:""; position:absolute; width:22px; height:16px; background:var(--accent); mask:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8h19m-6-6 6 6-6 6'/%3E%3C/svg%3E"); }
.gru-route li+li::before { left:calc(50% - 11px); top:-25px; transform:rotate(90deg); }
.gru-inputs,.gru-gates,.gru-results { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.gru-inputs { margin-block:24px 32px; }
.gru-lab .matrix-standalone { width:100%; margin:0; padding:8px 0; }
.gru-lab .matrix-editor-body { padding:12px 0; }
.gru-lab :is(.matrix-shape,.matrix-readonly,.matrix-copy,.matrix-help) { display:none; }
.gru-lab .matrix-editor-heading { flex-wrap:wrap; }
.gru-lab .matrix-editor-heading>span:first-child { min-width:0; }
.gru-lab .sequence-actions { position:sticky; top:calc(var(--lesson-header-height,76px) + var(--lesson-navigation-height,0px)); z-index:10; background:var(--paper); padding-block:12px; border-bottom:1px solid var(--line); }
.gru-inputs>div,.gru-results>div { min-width:0; }
.gru-gates label { display:grid; gap:10px; min-width:0; }
.gru-gates strong { display:flex; justify-content:space-between; gap:12px; }
.gru-gates output { font-variant-numeric:tabular-nums; color:var(--accent); }
.gru-gates input { width:100%; min-width:0; height:44px; accent-color:var(--accent); cursor:pointer; }
.gru-gates span { color:var(--ink-soft); }
.gru-gates input:focus-visible,.gru-lab button:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
.gru-presets { display:flex; flex-wrap:wrap; gap:12px 24px; margin-bottom:32px; }
.gru-presets button { min-height:44px; }
.gru-flow { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:32px; list-style:none; padding:0; margin-block:32px; }
.guide-content .gru-flow li { position:relative; margin:0; min-width:0; padding:16px 12px; border:1px solid var(--line); border-radius:12px; }
.gru-flow li+li::before { left:-28px; top:calc(50% - 8px); }
.gru-flow strong,.gru-flow span { display:block; }
.gru-flow span { margin-top:12px; color:var(--ink-soft); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.guide-content .gru-flow .is-current { background:var(--accent-soft); border-color:var(--accent); }
.gru-equation { margin-block:24px; text-align:center; font-size:1.15em; overflow-x:auto; }
.gru-results { margin-block:24px; }
.gru-models { margin-block:28px; }
.gru-models section { display:grid; grid-template-columns:minmax(110px,.3fr) 1fr; gap:24px; padding-block:20px; border-bottom:1px solid var(--line); }
.gru-models p { margin:0; }
#gru-cell .python-tensor-results .python-tensor-matrix { flex:1 1 180px; }
#gru-cell .matrix-standalone { padding:12px 0; }
#gru-cell .matrix-editor-body { padding:12px 0; }
@media(max-width:1000px) {
  .gru-flow { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 32px; }
  .gru-flow li:nth-child(3)::before { display:none; }
}
@media(max-width:600px) {
  .gru-compare,.gru-gates,.gru-results { grid-template-columns:1fr; }
  .gru-compare { gap:24px; }
  .gru-flow { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .gru-flow span,.gru-flow li+li::before { display:none; }
  .gru-flow strong { font-size:16px; }
  .gru-inputs,.gru-results { gap:16px; }
  .gru-results .matrix-help { display:none; }
  #gru-cell .python-tensor-results .python-tensor-matrix { flex-basis:100%; }
  .gru-models section { grid-template-columns:1fr; gap:8px; }
  .gru-models h3 { margin-bottom:0; }
}

.attention-lab h3 { font-size:22px; margin:32px 0 24px; }
.attention-queries,.attention-key-tabs { display:flex; flex-wrap:wrap; gap:12px; }
.attention-queries [aria-pressed=true],.attention-key-tabs [aria-pressed=true] { background:var(--accent-soft); color:var(--ink); border-color:var(--accent); }
.attention-causal { display:flex; align-items:center; gap:10px; min-height:44px; margin:20px 0 28px; font-size:16px; }
.attention-causal input { width:20px; height:20px; accent-color:var(--accent); }
.attention-fields,.attention-output-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; align-items:center; margin:24px auto; max-width:820px; }
.attention-fields>div,.attention-output-pair>div { min-width:0; }
.attention-lab .matrix-standalone { margin:10px auto; padding:8px 0; }
.attention-lab .matrix-standalone .matrix-editor-body { padding:12px 0; }
.attention-lab .matrix-standalone .matrix-help { margin-top:6px; }
.attention-fields:empty { display:none; }
.attention-fields>div:only-child { grid-column:1/-1; max-width:420px; width:100%; margin:auto; }
.attention-lab .matrix-editor-heading { flex-wrap:wrap; gap:8px; }
.attention-lab .matrix-help { font-size:14px; line-height:1.8; }
.attention-fields .matrix-standalone { --matrix-cell-min:64px; --cell-width:64px; padding-inline:0; }
.attention-equation { overflow-x:auto; text-align:center; font-size:26px; padding:32px 8px; margin:28px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.attention-shares { max-width:620px; margin:32px auto 40px; }
.attention-share { display:grid; grid-template-columns:70px minmax(0,1fr) 68px; align-items:center; gap:12px; padding:14px 0; }
.attention-share>div { height:12px; background:var(--line-soft); border-radius:6px; overflow:hidden; }
.attention-share i { display:block; width:100%; height:100%; background:var(--accent); border-radius:6px; transform-origin:left; }
.attention-share strong { text-align:right; font-size:18px; font-variant-numeric:tabular-nums; }
.attention-share small { grid-column:2/-1; color:var(--ink-soft); font-size:14px; }
.attention-share.is-blocked>span { text-decoration:line-through; text-decoration-color:var(--ink-soft); }
.attention-lab [data-attention-next] { background:var(--accent); }
.attention-lab [data-attention-next]:hover:not(:disabled) { background:var(--accent-hover); }
@media(max-width:650px) {
 .attention-lab h3 { font-size:20px; }
 .attention-fields,.attention-output-pair { grid-template-columns:1fr; gap:20px; }
 .attention-source-pair { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 .attention-source-pair .matrix-standalone { --matrix-cell-min:34px; --matrix-number-size:25px; }
 .attention-source-pair .matrix-symbol { font-size:25px; }
 .attention-source-pair .matrix-editor-body { gap:8px; }
 .attention-source-pair .matrix-copy { display:none; }
 .attention-equation { font-size:21px; }
 .attention-share { grid-template-columns:46px minmax(0,1fr) 64px; }
}

/* Q/K/V复用原生矩阵、数对卡片及计算连线。 */
.qkv-lab,.qkv-overview{position:relative;margin:32px 0 40px;padding:28px 0;border-block:1px solid var(--line);}
.qkv-role-tabs,.qkv-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 28px;}
.qkv-role-tabs [aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--ink);}
.qkv-actions [data-qkv-status]{font-size:15px;color:var(--ink-soft);}
.qkv-row-key{font-size:15px;color:var(--ink-soft);text-align:center;margin:24px 0;}
.qkv-operation.operation-equation{display:grid;grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr) 24px minmax(0,1fr);gap:8px;align-items:center;margin:30px 0;}
.qkv-operation.is-softmax{grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr);max-width:820px;margin-inline:auto;}
.qkv-matrix{margin:0;min-width:0;text-align:center;--qkv-color:var(--ink);--qkv-tint:var(--accent-soft);}
.qkv-q{--qkv-color:var(--lesson-color-31665a,#31665a);--qkv-tint:var(--lesson-color-e5efe8,#e5efe8);}
.qkv-k{--qkv-color:var(--lesson-color-42617e,#42617e);--qkv-tint:var(--lesson-color-e8eef4,#e8eef4);}
.qkv-v{--qkv-color:var(--lesson-color-a7490f,#a7490f);--qkv-tint:var(--lesson-color-f9e6ce,#f9e6ce);}
.qkv-matrix .matrix-standalone{--matrix-cell-min:44px;--matrix-number-size:26px;width:fit-content;max-width:100%;padding:0;margin:0 auto;}
.qkv-matrix .matrix-editor-heading{min-height:52px;gap:6px;font-size:15px;text-align:left;color:var(--qkv-color);}
.qkv-matrix .matrix-editor-heading>span:first-child{min-width:80px;}
.qkv-matrix .matrix-shape{font-size:13px;}
.qkv-matrix .matrix-editor-body{padding:18px 0 12px;gap:8px;}
.qkv-matrix .matrix-symbol{font-size:26px;}
.qkv-matrix .matrix-grid,.qkv-matrix .matrix-column-index{column-gap:6px;}
.qkv-matrix .matrix-grid,.qkv-matrix .matrix-row-index{row-gap:18px;}
.qkv-matrix .is-highlighted{background:var(--qkv-tint);border-color:transparent;color:var(--ink);}
.qkv-matrix .matrix-value[aria-pressed=true]{border-color:var(--qkv-color);outline:1px solid var(--qkv-color);}
.qkv-matrix[data-operation-role=left] .is-qkv-term{background:var(--lesson-color-f9e8df,#f9e8df);border-color:var(--lesson-color-a95b31,#a95b31);outline:1px solid var(--lesson-color-a95b31,#a95b31);color:var(--lesson-color-a95b31,#a95b31);}
.qkv-matrix[data-operation-role=right] .is-qkv-term{background:var(--lesson-color-e1ebda,#e1ebda);border-color:var(--lesson-color-4f7558,#4f7558);outline:1px solid var(--lesson-color-4f7558,#4f7558);color:var(--lesson-color-4f7558,#4f7558);}
.qkv-operator,.qkv-equals{text-align:center;font-size:26px;color:var(--ink-soft);}
.qkv-cell-hint,.qkv-rounding{font-size:14px;color:var(--ink-soft);line-height:1.8;text-align:center;margin:24px 0;}
.qkv-explanation{font-size:18px;line-height:1.8;margin:24px 0;text-align:center;}
.qkv-focus{padding:12px 20px 28px;border-block:1px solid var(--line);}
.qkv-arithmetic.operation-expression{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:16px 24px;margin:28px 0;}
.qkv-arithmetic .operation-term{padding:12px;}
.qkv-total{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:16px;font-size:18px;margin:28px 0 0;}
.qkv-total .operation-sum-card{font-size:32px;}
.qkv-total>span:last-child{flex-basis:100%;text-align:center;font-size:15px;color:var(--ink-soft);}
.qkv-share-list{max-width:520px;margin:24px auto;display:grid;gap:18px;}
.qkv-share-list>div{display:grid;grid-template-columns:58px minmax(0,1fr) 96px;gap:14px;align-items:center;font-size:17px;}
.qkv-share-track{height:12px;border-radius:6px;background:var(--line-soft);overflow:hidden;}
.qkv-share-track i{display:block;height:100%;border-radius:6px;background:var(--accent);}
.qkv-share-list strong{text-align:right;font-size:17px;font-variant-numeric:tabular-nums;}
.qkv-lab .qkv-softmax-equation{max-width:100%;overflow-x:auto;text-align:center;font-size:26px;margin:24px auto;}
.qkv-overview-input{max-width:350px;margin:auto;text-align:center;}
.qkv-overview-input>p{font-size:15px;color:var(--ink-soft);}
.qkv-branches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;margin-top:32px;}
.qkv-branch{min-width:0;}
.qkv-branch-label{font-size:16px;text-align:center;color:var(--qkv-color);margin:0 0 20px;}
:is(#attention-overview,#multi-head-flow,#multi-head-summary,#reuse-past-kv,#words-to-vectors,#attention-in-plain-words,#attention-types,#transformer-checkpoint) .demo-matrices{gap:32px;margin:32px 0;}
:is(#multi-head-flow,#reuse-past-kv,#words-to-vectors) .demo-matrices .matrix-standalone{--matrix-cell-min:44px;--matrix-number-size:26px;padding:16px 8px;}
:is(#multi-head-flow,#reuse-past-kv,#words-to-vectors) .demo-matrices .matrix-editor-body{gap:8px;}
:is(#multi-head-flow,#reuse-past-kv,#words-to-vectors) .demo-matrices .matrix-symbol{font-size:26px;}
@media(max-width:700px){
 .qkv-operation.operation-equation,.qkv-operation.is-softmax{grid-template-columns:minmax(0,1fr);gap:16px;}
 .qkv-operation>.qkv-matrix,.qkv-operation>.qkv-equals{grid-column:auto;width:100%;max-width:100%;}
 .qkv-operation .matrix-standalone{--matrix-number-size:25px;}
 .qkv-operator,.qkv-equals{font-size:22px;}
 .qkv-softmax-arrow{transform:rotate(90deg);}
 .qkv-role-tabs,.qkv-actions{gap:10px;margin-bottom:24px;}
 .qkv-role-tabs .button,.qkv-actions .button{font-size:14px;}
 .qkv-row-key{font-size:14px;}
 .qkv-lab .qkv-cell-hint{padding-inline:32px;}
 .qkv-branches{grid-template-columns:1fr;gap:32px;}
 .qkv-branch{padding:0;}
 .qkv-branch-label{margin-bottom:12px;}
 .qkv-focus{padding-inline:16px;}
 .qkv-share-list>div{grid-template-columns:42px minmax(0,1fr) 82px;gap:10px;font-size:16px;}
 .qkv-share-list strong{font-size:15px;}
 .qkv-lab .operation-connector-left,.qkv-lab .operation-connector-right{display:none;}
 .qkv-total{font-size:16px;}
 :is(#multi-head-flow,#reuse-past-kv,#words-to-vectors) .demo-matrices .matrix-standalone{--matrix-number-size:24px;padding-inline:0;}
}

.sampling-lab h3{font-size:22px;margin:36px 0 24px;}
.sampling-prefix{display:flex;gap:20px;align-items:baseline;margin:28px 0;color:var(--ink-soft);}
.sampling-prefix strong{font-size:28px;color:var(--ink);letter-spacing:.08em;}
.sampling-lab .matrix-standalone{max-width:620px;margin:16px auto;padding:8px 0;}
.sampling-lab .matrix-editor-body{padding:14px 0;}
.sampling-token-key{text-align:center;font-size:15px;color:var(--ink-soft);margin:12px 0 32px;}
.sampling-settings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;margin:32px 0;}
.sampling-settings label,.sampling-draw label{display:grid;grid-template-columns:1fr auto;gap:16px;font-size:16px;line-height:1.7;}
.sampling-settings input,.sampling-draw input{grid-column:1/-1;accent-color:var(--accent);width:100%;min-height:32px;cursor:pointer;}
.sampling-settings output,.sampling-draw output{font-variant-numeric:tabular-nums;color:var(--accent);}
.sampling-candidates{list-style:none;padding:0;margin:32px auto 40px;max-width:620px;}
.sampling-color-0{--sampling-ink:var(--lesson-color-4d765a,#4d765a);--sampling-surface:var(--lesson-color-e2ecdc,#e2ecdc);}
.sampling-color-1{--sampling-ink:var(--lesson-color-b46643,#b46643);--sampling-surface:var(--lesson-color-fae4d6,#fae4d6);}
.sampling-color-2{--sampling-ink:var(--lesson-color-8064a1,#8064a1);--sampling-surface:var(--lesson-color-eee6f5,#eee6f5);}
.sampling-candidate{display:grid;grid-template-columns:90px minmax(0,1fr) 68px;align-items:center;gap:12px;padding:14px 0;}
.sampling-candidate>div{height:12px;background:var(--line-soft);border-radius:6px;overflow:hidden;}
.sampling-candidate i{display:block;height:100%;width:100%;background:var(--sampling-ink);transform-origin:left;}
.sampling-candidate strong{font-size:18px;text-align:right;font-variant-numeric:tabular-nums;}
.sampling-candidate small{grid-column:2/-1;font-size:14px;color:var(--ink-soft);}
.sampling-candidate.is-filtered>span{text-decoration:line-through;}
.sampling-draw{max-width:620px;margin:40px auto;}
.sampling-tape{position:relative;display:flex;height:52px;margin-top:36px;border-radius:12px;}
.sampling-tape>span{display:flex;align-items:center;justify-content:center;background:var(--sampling-surface);color:var(--sampling-ink);font-size:19px;min-width:0;overflow:hidden;}
.sampling-tape>span:first-child{border-radius:12px 0 0 12px;}.sampling-tape>span:last-of-type{border-radius:0 12px 12px 0;}
.sampling-pointer{position:absolute;width:18px;height:16px;top:-22px;transform:translateX(-50%);overflow:visible;fill:var(--ink);}
.sampling-tape-ends{display:flex;justify-content:space-between;font-size:14px;color:var(--ink-soft);margin:8px 0 24px;}
.sampling-draw p{font-variant-numeric:tabular-nums;line-height:1.8;}
.sampling-completion{display:flex;justify-content:center;align-items:baseline;flex-wrap:wrap;font-size:32px;letter-spacing:.08em;margin:40px 0;padding:28px 0;border-block:1px solid var(--line);}
.sampling-completion strong{background:var(--lesson-color-e2ecdc,#e2ecdc);color:var(--lesson-color-4d765a,#4d765a);padding:2px 8px;border-radius:8px;}
.sampling-setting-summary{font-size:15px;color:var(--ink-soft);line-height:1.8;margin:24px 0;}
.sampling-error{color:var(--lesson-color-9a3e2b,#9a3e2b);line-height:1.8;margin:24px 0;}
@media(max-width:650px){.sampling-settings{grid-template-columns:1fr;gap:24px;}.sampling-candidate{grid-template-columns:76px minmax(0,1fr) 62px;gap:10px;}.sampling-lab h3{font-size:20px;}.sampling-completion{font-size:28px;}.sampling-lab .matrix-editor-heading{flex-wrap:wrap;}.sampling-token-key{line-height:2;}}

/* 一次聚焦一组乘加；数字、索引和括号都来自内置矩阵组件。 */
.operation-demo{position:relative;max-width:1120px;margin:22px auto 40px;padding:22px 30px 22px;border:1px solid var(--line);border-radius:16px;min-width:0;background:var(--paper-raised);}
.operation-demo>figcaption{display:flex;align-items:baseline;justify-content:space-between;gap:20px;padding-bottom:16px;border-bottom:1px solid var(--line-soft);}
.operation-demo>figcaption strong{font-size:19px;font-weight:650;line-height:1.6;}
.operation-demo>figcaption>span{font-size:12px;color:var(--ink-soft);white-space:nowrap;}
.operation-equation{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,.8fr) auto minmax(0,1fr);align-items:center;gap:18px;padding:24px 0;}
.operation-operand{min-width:0;overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent;}
.operation-demo .matrix-editor{width:fit-content;min-width:100%;max-width:none;border:0;background:transparent;padding:0;}
.operation-demo .matrix-editor-heading>span:first-child{min-width:0;}
.operation-demo .matrix-editor-heading{gap:10px;flex-wrap:nowrap;justify-content:center;}
.operation-demo .matrix-shape{margin-left:0;font-size:11px;}
.operation-demo .matrix-editor-body{padding:12px 0 5px;gap:10px;}
.operation-demo .matrix-copy,.operation-demo .matrix-readonly,.operation-demo .matrix-help{display:none;}
.operation-sign{font-family:Georgia,serif;font-size:29px;color:var(--ink-soft);}
.operation-focus{text-align:center;border-block:1px solid var(--line-soft);padding:17px 0 18px;}
.operation-focus-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;text-align:left;}
.operation-position{font-size:15px;line-height:1.6;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
.operation-focus-heading .text-button{font-size:12px;min-height:36px;text-decoration:underline;text-underline-offset:4px;}
.operation-instruction{font-size:14px;line-height:1.8;color:var(--ink-soft);margin:8px 0 14px;min-height:26px;}
.operation-expression{display:flex;align-items:flex-start;justify-content:center;flex-wrap:wrap;gap:16px 14px;min-height:102px;margin:0 0 13px;}
.operation-term-group{display:inline-flex;align-items:center;gap:14px;max-width:100%;}
.operation-term-plus{font-family:'KaTeX_Main',Georgia,serif;font-size:27px;color:var(--lesson-color-a5617a,#a5617a);align-self:flex-start;margin-top:17px;}
.operation-term{display:flex;flex-direction:column;align-items:center;gap:11px;padding:7px 8px 9px;border:1px solid transparent;border-radius:10px;background:transparent;max-width:100%;}
.operation-term:hover{background:var(--lesson-color-f8eddd,#f8eddd);border-color:var(--line);}
.operation-term.is-current{border-color:var(--lesson-color-d6b386,#d6b386);background:var(--lesson-color-fcf4e7,#fcf4e7);}
.operation-term-pair{display:inline-flex;align-items:center;gap:9px;}
.operation-number{display:inline-flex;justify-content:center;align-items:center;min-width:43px;min-height:46px;padding:5px 10px;background:var(--paper-raised);border:1px solid var(--lesson-color-d6b995,#d6b995);border-radius:8px;font-family:'KaTeX_Main',Georgia,serif;font-size:30px;line-height:1.1;font-variant-numeric:tabular-nums;}
.operation-number-left{color:var(--lesson-color-a95b31,#a95b31);border-color:var(--lesson-color-d9b08c,#d9b08c);}
.operation-number-right{color:var(--lesson-color-4f7558,#4f7558);border-color:#a8bca3;}
.operation-number-result{color:var(--accent);border-color:var(--lesson-color-c89054,#c89054);}
.operation-multiply{font-family:'KaTeX_Main',Georgia,serif;font-size:24px;color:var(--lesson-color-a5617a,#a5617a);}
.operation-term-product{font-family:'KaTeX_Main',Georgia,serif;font-size:23px;line-height:1.3;color:var(--lesson-color-796096,#796096);min-height:30px;}
.operation-term.is-future .operation-number,.operation-term.is-future .operation-term-product{color:var(--lesson-color-8d775d,#8d775d);border-color:var(--line-soft);background:transparent;}
.operation-total{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;width:min(100%,430px);margin:8px auto 12px;}
.operation-total-work{display:grid;grid-template-columns:minmax(0,1fr);text-align:right;line-height:1.4;font-size:16px;color:var(--ink-soft);}
.operation-total-work > span{grid-area:1 / 1;min-width:0;}
.operation-products{grid-row:2;overflow:auto hidden;scrollbar-width:thin;block-size:calc(1lh + 8px);font-family:'KaTeX_Main',Georgia,serif;font-size:23px;color:var(--lesson-color-796096,#796096);white-space:nowrap;}
.operation-products > span{display:inline-block;min-inline-size:100%;}
.operation-sum-card{display:inline-flex;align-items:center;justify-content:center;min-width:52px;min-height:43px;padding:5px 13px;border:1px solid var(--lesson-color-ce9d63,#ce9d63);border-radius:8px;font-family:'KaTeX_Main',Georgia,serif;font-size:25px;font-weight:400;color:var(--accent);font-variant-numeric:tabular-nums;}
.operation-flying-number{position:absolute;z-index:30;pointer-events:none;box-shadow:0 8px 20px #492b1926;will-change:transform;}
.operation-demo .is-in-transit{opacity:0;}
.operation-partial{font-size:14px;line-height:1.8;color:var(--ink-soft);margin:0;min-height:25px;}
.operation-controls{display:flex;align-items:center;gap:12px;padding-top:17px;flex-wrap:wrap;}
.operation-controls>input{min-width:100px;flex:1;accent-color:var(--accent);}
.operation-controls>output{font-size:12px;font-family:var(--mono);color:var(--ink-soft);}
.operation-speed{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--ink-soft);}
.operation-speed select{font:inherit;color:var(--ink);background:var(--paper-raised);border:1px solid var(--lesson-color-d2b48e,#d2b48e);border-radius:7px;min-height:36px;padding:4px 7px;}
.operation-controls .button-primary{background:var(--accent);border-color:var(--accent);color:var(--paper-raised);}
.operation-controls .button-primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);}
.operation-adjust{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:23px;font-size:13px;color:var(--ink-soft);}
.operation-adjust input{max-width:270px;min-width:90px;flex:1;accent-color:var(--accent);}
.operation-adjust output{min-width:24px;font-family:var(--mono);color:var(--accent);}
.operation-tip{font-size:12px;line-height:1.85;color:var(--ink-soft);margin:18px 0 0;}
.operation-demo .matrix-value{transition:background .2s,border-color .2s,color .2s;}
.operation-demo .is-operation-context{background:var(--lesson-color-f8eddd,#f8eddd);}
.operation-demo .is-operation-active{background:var(--lesson-color-f8dfb4,#f8dfb4);border-color:#bd8b4b;color:var(--lesson-color-783e19,#783e19);outline:1px solid #bd8b4b;outline-offset:0;}
.operation-demo [data-operation-role=right] .is-operation-context{background:var(--lesson-color-eef1e7,#eef1e7);}
.operation-demo [data-operation-role=right] .is-operation-active{background:var(--lesson-color-e1ebda,#e1ebda);border-color:var(--lesson-color-7b956d,#7b956d);color:var(--lesson-color-46673d,#46673d);outline-color:var(--lesson-color-7b956d,#7b956d);}
.operation-demo .matrix-help.is-error{display:block;}
.operation-demo[data-operation-wide=true] .matrix-grid,.operation-demo[data-operation-wide=true] .matrix-column-index{--cell-width:var(--operation-cell-width,48px);}
.operation-wide-note{margin:0 0 18px;font-size:12px;line-height:1.8;text-align:center;color:var(--ink-soft);}
.operation-demo[data-operation-type=pool2d] .operation-equation{grid-template-columns:minmax(0,1.5fr) auto auto minmax(0,1fr);}
.operation-pool-rule{text-align:center;padding:15px 8px;color:var(--ink-soft);font-size:13px;line-height:1.8;}
.operation-pool-rule label{display:flex;flex-direction:column;gap:9px;align-items:center;}
.operation-pool-rule select{font:inherit;font-weight:600;color:var(--ink);background:var(--paper-raised);border:1px solid var(--lesson-color-d2b48e,#d2b48e);border-radius:7px;min-height:40px;padding:5px 10px;}
.operation-pool-rule>span{display:block;margin-top:10px;font-size:12px;}
.operation-demo .is-operation-winner{background:var(--lesson-color-e1ebda,#e1ebda);border-color:var(--lesson-color-7b956d,#7b956d);color:var(--lesson-color-46673d,#46673d);}
.operation-demo[data-operation-type=pool2d] .operation-term-product{font-family:var(--sans);font-size:12px;line-height:1.8;}
.operation-demo .is-operation-pending{color:#a39582;}
.operation-demo .is-operation-written{animation:operation-write .45s cubic-bezier(.16,1,.3,1);}
@keyframes operation-write{from{box-shadow:inset 0 0 0 2px currentColor;}to{box-shadow:inset 0 0 0 2px transparent;}}
@media(max-width:900px){.operation-demo{padding:23px 20px;}.operation-equation{gap:10px;}.operation-demo .matrix-grid{--cell-width:40px;gap:6px;}.operation-demo .matrix-column-index{--cell-width:40px;gap:6px;}.operation-demo .matrix-symbol{font-size:23px;}}
@media(max-width:650px){
 .operation-demo{margin:20px auto 34px;padding:20px 13px;}
 .operation-demo>figcaption{display:block;padding-bottom:20px;}.operation-demo>figcaption strong{font-size:17px;}.operation-demo>figcaption>span{display:block;margin-top:7px;}
 .operation-equation{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:20px 9px;padding:26px 0;}
 .operation-operand[data-operation-role=left]{grid-column:1/-1;}
 .operation-sign:nth-child(2){display:none;}
 .operation-demo .matrix-symbol{display:none;}
 .operation-demo .matrix-grid{--cell-width:32px;gap:6px;}
 .operation-demo .matrix-column-index{--cell-width:32px;gap:6px;}
 .operation-demo .matrix-value{font-size:21px;}
 .operation-operand:not([data-operation-role=left]) .matrix-grid{--cell-width:28px;gap:6px 4px;}
 .operation-operand:not([data-operation-role=left]) .matrix-column-index{--cell-width:28px;gap:4px;margin-left:21px;}
 .operation-operand:not([data-operation-role=left]) .matrix-brackets{padding:7px 8px;}
 .operation-operand:not([data-operation-role=left]) .matrix-row-index{min-width:10px;margin-right:3px;}
 .operation-focus{padding:18px 0 20px;}
 .operation-focus-heading{gap:12px;}.operation-position{font-size:14px;}
 .operation-instruction{font-size:13px;margin:9px 0 15px;min-height:46px;}
 .operation-expression{gap:10px 8px;min-height:99px;}
 .operation-term-group{gap:8px;}.operation-term{gap:8px;padding:6px 5px;}
 .operation-term-pair{gap:5px;}.operation-number{min-width:35px;min-height:40px;padding:5px 7px;font-size:26px;}
 .operation-term-plus{font-size:22px;margin-top:15px;}.operation-multiply{font-size:20px;}.operation-term-product{font-size:21px;}
 .operation-total{gap:9px;}.operation-products{font-size:21px;}
 .operation-sum-card{font-size:23px;min-height:39px;min-width:44px;}
 .operation-controls{gap:9px;}.operation-controls>input{flex-basis:65%;}.operation-controls .button{font-size:12px;padding:6px 12px;min-height:42px;}
 .operation-speed{margin-left:auto;}.operation-speed>span{display:none;}.operation-speed select{min-height:42px;max-width:75px;}
 .operation-demo[data-operation-compact=true] .operation-equation{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);gap:5px;padding:22px 0;}
 .operation-demo[data-operation-compact=true] .operation-operand[data-operation-role=left]{grid-column:auto;}
 .operation-demo[data-operation-compact=true] .operation-sign:nth-child(2){display:block;}
 .operation-demo[data-operation-compact=true] .operation-sign{font-size:20px;}
 .operation-demo[data-operation-compact=true] .matrix-grid,.operation-demo[data-operation-compact=true] .matrix-column-index{--cell-width:28px;gap:6px 4px;}
 .operation-demo[data-operation-compact=true] .matrix-brackets{padding:7px 6px;}
 .operation-demo[data-operation-compact=true] .matrix-row-index{min-width:9px;margin-right:2px;}
 .operation-demo[data-operation-compact=true] .matrix-column-index{margin-left:18px;}
 .operation-demo[data-operation-compact=true] .matrix-editor-heading{flex-wrap:wrap;gap:3px;min-height:46px;}
 .operation-demo[data-operation-compact=true] .matrix-editor-heading>span:first-child{flex-basis:100%;min-width:0;font-size:11px;text-align:center;}
 .operation-demo[data-operation-compact=true] .matrix-restore{display:none;}
 .operation-demo[data-operation-type=pool2d] .matrix-restore{display:inline-flex;align-items:center;min-height:44px;padding:6px 8px;font-size:14px;line-height:1.3;}
 .operation-demo[data-operation-compact=true][data-operation-type=conv2d] .operation-equation{grid-template-columns:minmax(0,1.3fr) auto minmax(0,.8fr) auto minmax(0,1fr);gap:3px;}
 .operation-demo[data-operation-compact=true][data-operation-type=conv2d] .matrix-grid,.operation-demo[data-operation-compact=true][data-operation-type=conv2d] .matrix-column-index{--cell-width:22px;gap:6px 2px;}
 .operation-demo[data-operation-compact=true][data-operation-type=conv2d] .matrix-value{font-size:19px;height:34px;min-height:34px;}
 .operation-demo[data-operation-compact=true][data-operation-type=conv2d] .matrix-row-index{grid-auto-rows:34px;min-width:8px;}
 .operation-demo[data-operation-compact=true][data-operation-type=conv2d] .matrix-brackets{padding-inline:5px;}
 .operation-demo[data-operation-compact=true][data-operation-type=conv2d] .matrix-column-index{margin-left:15px;}
 .operation-demo[data-operation-compact=true][data-operation-type=conv2d] .operation-sign{font-size:15px;}
 .operation-demo[data-operation-wide=true] .operation-equation{grid-template-columns:minmax(0,1fr);gap:12px;padding:24px 0;}
 .operation-demo[data-operation-wide=true] .operation-operand{grid-column:1/-1;}
 .operation-demo[data-operation-wide=true] .operation-sign{display:block!important;text-align:center;font-size:24px;}
 .operation-demo[data-operation-wide=true] .matrix-grid,.operation-demo[data-operation-wide=true] .matrix-column-index{--cell-width:var(--operation-cell-width,48px);gap:6px 9px;}
 .operation-demo[data-operation-wide=true] .matrix-column-index{margin-left:31px;}
 .operation-demo[data-operation-wide=true] .matrix-brackets{padding:7px 12px;}
 .operation-demo[data-operation-wide=true] .matrix-row-index{min-width:13px;margin-right:5px;}
 .operation-demo[data-operation-type=pool2d] .operation-equation{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:9px;}
 .operation-demo[data-operation-type=pool2d] .operation-operand[data-operation-role=left]{grid-column:1/-1;}
 .operation-demo[data-operation-type=pool2d] .operation-pool-rule{font-size:12px;padding:8px 0;}
 .operation-demo[data-operation-type=pool2d] .operation-pool-rule>span{display:none;}
 .operation-demo[data-operation-type=pool2d][data-operation-wide=true] .operation-equation{grid-template-columns:minmax(0,100px) 16px minmax(0,1fr);gap:12px 6px;}
 .operation-demo[data-operation-type=pool2d][data-operation-wide=true] .operation-pool-rule{grid-column:1;max-width:100px;}
 .operation-demo[data-operation-type=pool2d][data-operation-wide=true] .operation-pool-rule label{font-size:12px;}
 .operation-demo[data-operation-type=pool2d][data-operation-wide=true] .operation-sign{grid-column:2;}
 .operation-demo[data-operation-type=pool2d][data-operation-wide=true] .operation-operand[data-operation-role=result]{grid-column:3;}
 .operation-demo[data-operation-type=pool2d][data-operation-very-wide=true] .operation-equation{grid-template-columns:minmax(0,1fr);}
 .operation-demo[data-operation-type=pool2d][data-operation-very-wide=true] .operation-pool-rule,.operation-demo[data-operation-type=pool2d][data-operation-very-wide=true] .operation-sign,.operation-demo[data-operation-type=pool2d][data-operation-very-wide=true] .operation-operand[data-operation-role=result]{grid-column:1;justify-self:stretch;max-width:none;}
}
@media(prefers-reduced-motion:reduce){.operation-demo .matrix-value{transition:none;}.operation-demo .is-operation-written{animation:none;}}


/* 同色箭头把矩阵来源与公式中的数字对应起来，始终保留文字和操作的可读性。 */
.operation-connectors{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:40;}
.operation-connector{fill:none;stroke-width:1.7;stroke-linecap:round;opacity:.38;vector-effect:non-scaling-stroke;}
.operation-connector-left{stroke:var(--lesson-color-a95b31,#a95b31);}.operation-connector-right{stroke:var(--lesson-color-4f7558,#4f7558);}
.operation-connector.is-current{opacity:.76;stroke-width:2;}
.operation-connector-result{stroke:var(--lesson-color-b45112,#b45112);stroke-width:3.5;opacity:1;}
.operation-demo>figcaption,.operation-equation,.operation-focus,.operation-controls,.operation-tip,.operation-wide-note{position:relative;z-index:2;}

.operation-instruction{padding-inline:6px;}

/* A 4-column input needs real room; the lesson sidebar also consumes width. */
.operation-demo[data-operation-type=conv2d]{container:convolution / inline-size;}
@container convolution (max-width:850px){
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-equation{grid-template-columns:minmax(0,1.4fr) 24px minmax(0,1fr);gap:20px 16px;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-operand[data-operation-role=left]{grid-column:1;grid-row:1;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-sign:nth-child(2){display:block;grid-column:2;grid-row:1;text-align:center;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-operand[data-operation-role=right]{grid-column:3;grid-row:1;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-sign:nth-child(4){grid-column:1/-1;grid-row:2;text-align:center;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-operand[data-operation-role=result]{grid-column:1/-1;grid-row:3;justify-self:center;max-width:100%;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .matrix-editor-heading>span:first-child{font-size:16px;}
}
@container convolution (max-width:520px){
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-equation{grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr);gap:22px 8px;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-operand[data-operation-role=left]{grid-column:1/-1;grid-row:1;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-sign:nth-child(2){display:none;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-operand[data-operation-role=right]{grid-column:1;grid-row:2;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-sign:nth-child(4){grid-column:2;grid-row:2;font-size:23px;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .operation-operand[data-operation-role=result]{grid-column:3;grid-row:2;justify-self:stretch;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .matrix-symbol{display:none;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .matrix-grid,.operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .matrix-column-index{--cell-width:32px;gap:6px 4px;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) [data-operation-role=left] .matrix-grid,.operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) [data-operation-role=left] .matrix-column-index{--cell-width:42px;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .matrix-value{font-size:24px;height:40px;min-height:40px;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .matrix-row-index{grid-auto-rows:40px;min-width:10px;margin-right:3px;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .matrix-brackets{padding-inline:7px;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .matrix-column-index{margin-left:20px;}
 .operation-demo[data-operation-type=conv2d]:not([data-operation-wide=true]) .matrix-shape{font-size:12px;}
}

/* Pooling keeps the complete input readable; long-number layouts retain their own widths. */
.operation-demo[data-operation-type=pool2d]{container:pooling / inline-size;}
@container pooling (max-width:520px){
 .operation-demo[data-operation-type=pool2d] .matrix-value{font-size:24px;height:40px;min-height:40px;}
 .operation-demo[data-operation-type=pool2d] .matrix-row-index{grid-auto-rows:40px;}
 .operation-demo[data-operation-type=pool2d]:not([data-operation-wide=true]) .matrix-grid,.operation-demo[data-operation-type=pool2d]:not([data-operation-wide=true]) .matrix-column-index{--cell-width:36px;}
 .operation-demo[data-operation-type=pool2d]:not([data-operation-wide=true]) [data-operation-role=left] .matrix-grid,.operation-demo[data-operation-type=pool2d]:not([data-operation-wide=true]) [data-operation-role=left] .matrix-column-index{--cell-width:42px;}
}
@container pooling (max-width:280px){
 .operation-demo[data-operation-type=pool2d][data-operation-compact] .operation-equation{grid-template-columns:minmax(0,1fr);gap:16px;}
 .operation-demo[data-operation-type=pool2d][data-operation-compact] :is(.operation-pool-rule,.operation-sign,.operation-operand[data-operation-role=result]){grid-column:1;justify-self:stretch;max-width:none;text-align:center;}
}

/* 操作与过程解释保持可读字号；译文加长时自然换行。 */
.operation-controls .button,.operation-position,
.operation-focus-heading .text-button,.operation-instruction,.operation-partial,
.operation-tip,.operation-total>[data-operation-partial-label] { font-size:16px; }
.operation-controls .button,.operation-focus-heading .text-button { min-height:44px; }
.operation-focus-heading { flex-wrap:wrap; }
.operation-demo>figcaption>span { font-size:14px; white-space:normal; }
.operation-speed select { min-height:44px; min-inline-size:8rem; max-width:none; }

/* Reserve the real localized copy so style changes never move the formula or its targets. */
.operation-copy-slot{display:grid;grid-template-columns:minmax(0,1fr);}
.operation-copy-slot > *{grid-area:1 / 1;align-self:start;}
.operation-copy-measure{visibility:hidden;pointer-events:none;user-select:none;}
.operation-position-slot{max-inline-size:100%;}
.operation-controls [data-operation-play]{display:inline-grid;place-items:center;}
[data-operation-play-label]{grid-area:1 / 1;visibility:hidden;}
[data-operation-play="play"] [data-operation-play-label="play"],
[data-operation-play="pause"] [data-operation-play-label="pause"],
[data-operation-play="resume"] [data-operation-play-label="resume"]{visibility:visible;}
[data-operation-count]{min-inline-size:var(--operation-count-ch,5ch);text-align:end;}
.operation-term-pair .operation-number{min-inline-size:max(43px,calc(var(--operation-value-ch,2ch) + 18px));}
.operation-term-product{display:grid;place-items:center;min-inline-size:var(--operation-product-ch,3ch);font-variant-numeric:tabular-nums;white-space:nowrap;}
.operation-term-product > span{grid-area:1 / 1;}
.operation-sum-card{inline-size:max(52px,calc(var(--operation-sum-ch,2ch) + 26px));white-space:nowrap;}
@media(max-width:650px){
 .operation-term-pair .operation-number{min-inline-size:max(35px,calc(var(--operation-value-ch,2ch) + 12px));}
 .operation-sum-card{inline-size:max(44px,calc(var(--operation-sum-ch,2ch) + 20px));}
}

/* 一次只看一条输入连接，计算仍由同一个数字卡片组件完成。 */
.channel-demo{max-width:1120px;margin:24px auto 40px;min-width:0;}
.channel-controls{display:flex;align-items:center;justify-content:space-between;gap:22px;flex-wrap:wrap;}
.channel-controls h2{font-size:20px;font-weight:650;line-height:1.6;margin:0;}
.channel-controls label{font-size:13px;color:var(--ink-soft);display:flex;align-items:center;gap:9px;}
.channel-controls select{font:inherit;color:var(--ink);background:var(--paper-raised);border:1px solid var(--lesson-color-d2b48e,#d2b48e);border-radius:7px;padding:7px 10px;min-height:40px;}
.channel-inputs{display:flex;gap:12px;margin:19px 0 0;flex-wrap:wrap;}
.channel-inputs .button[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent);}
.channel-demo .operation-demo{margin:18px 0 28px;}
.channel-combine{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,260px);gap:30px;align-items:center;padding:0 8px 25px;border-bottom:1px solid var(--line-soft);}
.channel-combine h3{font-size:17px;line-height:1.7;margin:0 0 13px;font-weight:600;}
.channel-equation{font-family:'KaTeX_Main',Georgia,serif;font-size:29px;line-height:1.8;margin:12px 0;overflow-wrap:anywhere;}
.channel-contribution{color:var(--lesson-color-796096,#796096);}.channel-operator{color:var(--lesson-color-a5617a,#a5617a);}.channel-bias-value{color:var(--lesson-color-a95b31,#a95b31);}.channel-output-value{color:var(--accent);}
.channel-parameters{font-size:13px;line-height:1.9;color:var(--ink-soft);margin:0;max-width:65ch;}
.channel-combine .matrix-editor,.channel-outputs .matrix-editor{border:0;background:transparent;width:fit-content;min-width:100%;max-width:none;}
.channel-combine [data-channel-bias]{min-width:0;overflow-x:auto;}
.channel-outputs{max-width:100%;overflow-x:auto;padding:22px 0 0;}
.channel-outputs .matrix-editor-heading>span:first-child{flex:initial;}
.channel-outputs .matrix-editor-heading{justify-content:center;column-gap:18px;}
.channel-outputs .matrix-editor-body{padding-top:24px;}
.channel-outputs .matrix-value{font-size:28px;}
.channel-position{font-size:15px;color:var(--ink-soft);line-height:1.8;margin:0 0 8px;}
.channel-feature{max-width:650px;margin:30px auto 0;}
.channel-volume-entry{display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;margin:22px 0 14px;}
.channel-volume-entry>p{font-size:15px;line-height:1.8;color:var(--ink-soft);margin:0;}
.channel-volume{margin:0 0 30px;border-block:1px solid var(--line);padding:20px 0;}
.volume-toolbar{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px;}
.volume-toolbar .button[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);}
.volume-stage{width:100%;height:420px;overflow:hidden;border-radius:12px;background:var(--paper-raised);}
.volume-stage canvas{display:block;width:100%;height:100%;cursor:grab;}
.volume-stage canvas:active{cursor:grabbing;}
.volume-status{font-size:17px;line-height:1.9;color:var(--ink);margin:18px 0 9px;}
.volume-hint{font-size:14px;line-height:1.85;color:var(--ink-soft);margin:0;}
@media(max-width:650px){.volume-stage{height:300px;}.volume-toolbar .button{font-size:14px;min-height:42px;padding:8px 12px;}.volume-status{font-size:16px;}.channel-volume-entry>p{font-size:14px;}}
@media(max-width:650px){.channel-demo{margin:18px 0 30px;}.channel-controls{gap:13px;}.channel-controls h2{font-size:18px;}.channel-controls label{font-size:12px;}.channel-inputs{gap:10px;}.channel-inputs .button{padding:8px 15px;}.channel-combine{grid-template-columns:minmax(0,1fr);gap:18px;padding-inline:3px;}.channel-equation{font-size:26px;}.channel-combine [data-channel-bias]{max-width:250px;justify-self:center;width:100%;}.channel-outputs .matrix-editor-heading{justify-content:flex-start;}.channel-outputs .matrix-editor-heading>span:first-child{flex-basis:100%;}}

/* 首页以可操作的课堂切片作主视觉，沿用暖纸、棕墨与焦糖重点。 */
.page-home > .site-header{position:sticky;top:0;z-index:70;background:var(--paper);}
.page-home .home-main [id]{scroll-margin-top:calc(var(--lesson-header-height,76px) + 24px);}
/* 公开观点以原生多栏呈现高低错落的阅读顺序，手机回到单列。 */
.home-perspective{padding:64px 0 72px;border-block:1px solid var(--line);}
.home-perspective>.home-section-heading{margin-bottom:40px;}
.home-perspective-masonry{columns:2;column-gap:24px;max-width:1100px;margin-inline:auto;}
.home-perspective-card{display:flow-root;break-inside:avoid;margin:0 0 24px;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:var(--paper-raised);}
.home-perspective-card-copy{padding:28px 30px;}
.home-perspective-card h3{font-family:var(--display);font-size:24px;line-height:1.55;margin:0;}
.home-perspective-role{font-size:14px;line-height:1.8;color:var(--ink-soft);margin:4px 0 23px;}
.home-perspective-card blockquote{border:0;padding:0;margin:0;}
.home-perspective-card blockquote p,.home-perspective-statement{font-family:var(--display);font-size:27px;font-weight:700;line-height:1.7;text-wrap:pretty;margin:0 0 20px;}
.home-perspective-card strong{color:var(--accent);}
.home-perspective-note{font-size:14px;color:var(--ink-soft);line-height:1.8;margin:0 0 16px;}
.home-perspective-source{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:13px;line-height:1.7;min-height:44px;border-top:1px solid var(--line-soft);padding-top:13px;text-decoration:none;}
.home-perspective-source time{margin-left:auto;font-variant-numeric:tabular-nums;color:var(--ink-soft);}
.home-perspective-source:hover{text-decoration:underline;text-underline-offset:4px;}
.home-perspective-watch{display:block;position:relative;aspect-ratio:16/9;background:var(--ink);}
.home-perspective-watch img{display:block;width:100%;height:100%;object-fit:cover;}
.home-perspective-image-note{position:absolute;bottom:10px;right:10px;padding:5px 9px;border-radius:4px;background:#18150fe6;color:#fff;font-size:12px;line-height:1.6;}
.home-perspective a:focus-visible{outline:3px solid var(--accent);outline-offset:4px;}
.home-perspective-watch:focus-visible{outline-offset:-4px;}
.home-perspective-ilya{background:var(--accent-soft);border-color:transparent;}
.home-perspective-ilya .home-perspective-card-copy{padding-block:38px;}
.home-perspective-takeaway{text-align:center;padding-top:24px;}
.home-perspective-takeaway h3{font-family:var(--display);font-size:30px;line-height:1.65;margin:0;}
.home-perspective-takeaway h3 strong{color:var(--accent);}
.home-perspective-takeaway p{font-size:19px;line-height:1.8;color:var(--ink-soft);margin:14px 0 24px;}
.home-perspective-takeaway>.button{font-size:18px;text-align:center;}
.home-perspective-context{font-size:12px;color:var(--ink-soft);line-height:1.8;text-align:center;margin:24px 0 0;}
@media(max-width:700px){.home-perspective{padding:44px 0 48px;}.home-perspective>.home-section-heading{margin-bottom:26px;}.home-perspective-masonry{columns:1;}.home-perspective-card{margin-bottom:18px;}.home-perspective-card-copy{padding:24px;}.home-perspective-card h3{font-size:23px;}.home-perspective-card blockquote p,.home-perspective-statement{font-size:24px;}.home-perspective-ilya .home-perspective-card-copy{padding-block:28px;}.home-perspective-takeaway{padding-top:18px;}.home-perspective-takeaway h3{font-size:26px;}.home-perspective-takeaway p{font-size:17px;}.home-perspective-takeaway>.button{font-size:16px;width:100%;justify-content:center;}.home-perspective-context{font-size:12px;}}
.home-floating-nav{position:static;display:grid;grid-template-columns:1fr 1fr;gap:14px;width:min(680px,calc(100% - 48px));margin:40px auto;padding:20px;background:var(--ink);border:0;border-radius:16px;}
.home-floating-nav .button{justify-content:center;gap:9px;min-height:48px;padding:10px 12px;font-size:17px;line-height:1.5;white-space:nowrap;}
.home-floating-nav .button-quiet{background:transparent;color:var(--paper-raised);border-color:var(--ink-soft);box-shadow:none;}
.home-floating-nav .button-quiet:hover{background:var(--ink-soft);color:var(--paper-raised);border-color:var(--ink-soft);}
.home-floating-nav .button-primary{min-height:60px;font-size:18px;color:var(--ink);background:var(--honey);border-color:var(--honey);box-shadow:none;}
.home-floating-nav .button-primary:hover{color:var(--ink);background:var(--accent-soft);border-color:var(--accent-soft);}
.home-floating-nav .button:focus-visible{outline-color:var(--paper-raised);outline-offset:3px;}
.home-floating-nav svg{flex-shrink:0;}
@media(max-width:600px){.home-floating-nav{width:calc(100% - 28px);gap:10px;padding:12px;grid-template-columns:1fr;border-radius:14px;}.home-floating-nav .button{font-size:16px;gap:8px;padding:10px;}.home-floating-nav .button-primary{min-height:52px;}.home-floating-nav svg{width:18px;height:18px;}}

.home-main.home-course{max-width:1320px;padding:64px 34px 28px;}
.home-study-community{display:flex;align-items:center;gap:16px 22px;padding:22px 24px;margin:0 0 38px;border-block:1px solid var(--line);background:var(--paper-raised);}
.home-study-community-icon{display:flex;color:var(--accent);flex-shrink:0;}
.home-study-community>div{min-width:0;flex:1;}
.home-study-community strong{display:block;font-family:var(--display);font-size:22px;line-height:1.65;color:var(--ink);}
.home-study-community strong>span{display:inline-block;}
@media(max-width:700px){.home-study-community strong>span{display:block;}}
.home-study-community p{display:flex;flex-wrap:wrap;gap:2px 18px;font-size:16px;line-height:1.85;color:var(--ink-soft);margin:6px 0 0;}
.home-study-community b{font-weight:700;color:var(--accent-hover);}
.home-study-community>a{display:inline-flex;align-items:center;gap:7px;flex-shrink:0;min-height:44px;color:var(--accent-hover);font-size:16px;text-underline-offset:5px;}
.home-study-community>a:hover{color:var(--ink);}
.home-study-community>a:focus-visible{outline:2px solid var(--accent);outline-offset:5px;border-radius:3px;}
@media(max-width:700px){.home-study-community{display:grid;grid-template-columns:26px minmax(0,1fr);align-items:start;gap:10px 12px;padding:18px 14px;margin-bottom:28px;}.home-study-community-icon{margin-top:5px;}.home-study-community strong{font-size:19px;}.home-study-community p{display:block;font-size:15px;}.home-study-community p>span{display:block;}.home-study-community>a{grid-column:2;font-size:15px;justify-self:start;}}
.home-hero{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:48px;align-items:center;padding-bottom:72px;}
.home-hero-copy h1{font-size:clamp(32px,3.3vw,48px);line-height:1.45;letter-spacing:-.02em;font-weight:740;text-align:left;}
.home-hero-copy h1 span{color:var(--accent);}
.home-lead{font-size:17px;line-height:1.95;color:var(--ink-soft);margin:26px 0 24px;max-width:31em;}
.home-start-points{list-style:none;padding:0;margin:0 0 28px;display:grid;gap:13px;}
.home-start-points li{display:flex;align-items:center;gap:10px;font-size:15px;line-height:1.7;}
.home-start-points svg{color:var(--sage);}
.home-course-update{display:flex;align-items:flex-start;gap:12px;padding:15px 17px;margin:0 0 26px;background:var(--accent-soft);border-radius:12px;}
.home-course-update>span{display:flex;flex-shrink:0;color:var(--accent-hover);margin-top:5px;}
.home-course-update>div{min-width:0;}
.home-course-update strong{display:block;font-size:17px;line-height:1.8;font-weight:700;}
.home-course-update em{font-style:normal;color:var(--accent-hover);white-space:nowrap;}
.home-course-update p{font-size:15px;line-height:1.9;margin:5px 0 0;color:var(--ink-soft);}
@media(max-width:600px){.home-course-update{padding:14px 15px;margin:0 0 22px;gap:10px;}.home-course-update strong{font-size:16px;}.home-course-update p{font-size:14px;}}
.home-hero-actions{display:flex;align-items:center;gap:18px 22px;flex-wrap:wrap;}
.home-text-link{font-size:13px;line-height:1.8;text-decoration:none;display:inline-flex;align-items:center;gap:7px;}
.home-text-link:hover{text-decoration:underline;}
.home-hero-footnote{font-size:12px;line-height:1.8;color:var(--ink-soft);margin:20px 0 0;}
.home-live-demo{min-width:0;}
.home-demo-caption{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:12px;color:var(--ink-soft);line-height:1.8;padding:0 4px;}
.home-demo-caption>span:first-child{display:inline-flex;align-items:center;gap:7px;}
.home-demo-caption>span:last-child{white-space:nowrap;}
.home-live-demo .operation-demo{margin:12px 0 15px;padding:19px;}
.home-live-demo .operation-demo>figcaption{gap:15px;}.home-live-demo .operation-demo>figcaption strong{font-size:17px;}
.home-live-demo .operation-controls{gap:8px;}.home-live-demo .operation-controls .button{padding:5px 11px;font-size:12px;}
.home-live-demo .operation-controls>input{flex-basis:65%;}
.home-live-demo .operation-equation{gap:9px;padding:20px 0;}
.home-live-demo .matrix-grid,.home-live-demo .matrix-column-index{--cell-width:31px;gap:6px;}
.home-live-demo .operation-demo[data-operation-wide=true] .matrix-grid,.home-live-demo .operation-demo[data-operation-wide=true] .matrix-column-index{--cell-width:var(--operation-cell-width,48px);}
.home-live-demo .matrix-value{font-size:22px;}.home-live-demo .matrix-symbol{display:none;}
.home-live-demo .matrix-editor-heading{flex-wrap:wrap;gap:3px;justify-content:center;min-height:40px;}
.home-live-demo .matrix-editor-heading>span:first-child{flex-basis:100%;min-width:0;font-size:11px;text-align:center;}
.home-live-demo .matrix-restore{display:none;}.home-live-demo .matrix-brackets{padding-inline:8px;}
.home-live-demo .matrix-row-index{min-width:10px;margin-right:3px;}.home-live-demo .matrix-column-index{margin-left:23px;}
.home-live-demo .operation-instruction{font-size:12px;}.home-live-demo .operation-focus-heading>strong{font-size:13px;}
.home-live-demo .operation-tip{display:none;}.home-demo-note{font-size:12px;line-height:1.85;color:var(--ink-soft);margin:0 4px;}
.home-audience{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:48px;padding:45px 0;border-block:1px solid var(--line);}
.home-audience h2,.home-section-heading h2,.home-faq h2,.home-closing h2{font-size:clamp(24px,2.5vw,32px);line-height:1.55;letter-spacing:.2px;font-weight:700;margin:0;}
.home-audience p,.home-section-heading>p{font-size:15px;line-height:1.95;color:var(--ink-soft);margin:0;max-width:64ch;}
.home-audience p+p{margin-top:14px;}
.home-foundation,.home-method,.home-projects,.home-courses,.home-faq{padding-top:76px;}
.home-section-heading{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:48px;align-items:start;margin-bottom:34px;}
.home-knowledge-path{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;list-style:none;margin:0;padding:0;}
.home-knowledge-path li{position:relative;border-top:2px solid var(--line);padding:24px 22px 0 0;}
.home-knowledge-path li::before{content:"";position:absolute;top:-5px;left:0;width:8px;height:8px;border-radius:50%;background:var(--accent);}
.home-knowledge-path a{display:block;text-decoration:none;line-height:1.8;}
.home-knowledge-path a:hover strong{text-decoration:underline;text-underline-offset:5px;}
.home-knowledge-path strong{display:block;font-size:16px;font-weight:650;}
.home-knowledge-path span{display:block;font-size:13px;color:var(--ink-soft);margin-top:7px;}
.home-learning-flow{list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px;margin:0;padding:0;}
.home-learning-flow li{display:flex;gap:12px;border-top:1px solid var(--line);padding-top:21px;align-items:flex-start;}
.home-learning-flow li>span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 auto;font-family:Georgia,serif;font-size:20px;color:var(--accent-hover);border:1px solid var(--line);border-radius:50%;}
.home-learning-flow h3{font-size:16px;line-height:1.7;margin:0 0 10px;font-weight:650;}
.home-learning-flow p{font-size:13px;line-height:1.9;color:var(--ink-soft);margin:0;}
.home-project-row{display:grid;grid-template-columns:42px minmax(0,1fr) minmax(0,.85fr);gap:24px;align-items:center;padding:32px 0;border-top:1px solid var(--line);}
.home-project-number{font-family:Georgia,serif;font-size:25px;color:var(--accent);align-self:start;}
.home-journey-path{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px;list-style:none;margin:0;padding:0;}
.home-journey-path li{border-top:1px solid var(--line);padding-top:22px;min-width:0;}
.home-journey-path li>span{font-size:16px;line-height:1.7;color:var(--accent-hover);font-variant-numeric:tabular-nums;}
.home-journey-path h3{font-family:var(--display);font-size:23px;line-height:1.6;margin:12px 0 10px;}
.home-journey-path p{font-size:17px;line-height:1.9;margin:0;color:var(--ink-soft);}
.home-journey-learning{display:flex;align-items:flex-start;justify-content:center;gap:10px;font-size:17px;line-height:1.9;margin:32px 0 0;color:var(--ink-soft);text-align:center;}
.home-journey-learning>svg{flex-shrink:0;margin-top:6px;color:var(--accent);}
.home-journey-learning strong{color:var(--ink);}
.home-journey-project-heading{margin:56px 0 24px;}
.home-journey-project-heading h3{font-family:var(--display);font-size:28px;line-height:1.6;margin:0 0 10px;text-wrap:balance;}
.home-journey-project-heading p{font-size:18px;line-height:1.9;margin:0;color:var(--ink-soft);}
.home-journey-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:20px 28px;margin-top:34px;}
.home-journey-actions .button{font-size:18px;}
.home-course-journey>.home-free-note{text-align:center;max-width:78ch;margin:22px auto 0;}
@media(max-width:1000px){.home-journey-path{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 32px;}}
@media(max-width:600px){.home-journey-path{grid-template-columns:1fr;gap:24px;}.home-journey-path li{padding-top:18px;}.home-journey-path h3{font-size:22px;margin:8px 0;}.home-journey-path p,.home-journey-learning{font-size:16px;}.home-journey-learning{text-align:left;margin-top:26px;}.home-journey-project-heading{margin-top:40px;}.home-journey-project-heading h3{font-size:24px;}.home-journey-project-heading p{font-size:17px;}.home-journey-actions{align-items:stretch;flex-direction:column;gap:20px;}.home-journey-actions .button{justify-content:center;}.home-journey-actions .home-text-link{justify-content:center;}.home-course-journey>.home-free-note{text-align:left;}}
.home-project-row h3{font-size:21px;line-height:1.6;font-weight:650;margin:0 0 7px;}
.home-project-row p{font-size:14px;line-height:1.85;color:var(--ink-soft);margin:7px 0;max-width:46ch;}
.home-project-row p:first-of-type{font-size:12px;color:var(--accent);}
.home-project-row a{display:inline-flex;align-items:center;gap:8px;font-size:13px;margin-top:9px;text-decoration:none;}
.home-project-row a:hover{text-decoration:underline;}
.home-project-process{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap;padding:24px 16px;background:var(--paper-raised);border:1px solid var(--line-soft);border-radius:12px;line-height:1.7;}
.home-project-process span,.home-project-process strong{font-size:13px;font-weight:500;}
.home-project-process strong{color:var(--accent);font-weight:650;}.home-project-process svg{color:var(--ink-soft);}
.home-course-map{border-block:1px solid var(--line);}
.home-course-map>summary{display:flex;justify-content:space-between;align-items:center;gap:16px;list-style:none;cursor:pointer;padding:20px 3px;font-size:16px;font-weight:600;}
.home-course-map>summary::-webkit-details-marker{display:none;}.home-course-map[open]>summary svg{transform:rotate(180deg);}
.home-course-map>div{padding:0 4px 22px;}
.home-free-note{font-size:13px;color:var(--ink-soft);line-height:1.85;margin:20px 0 0;}
.home-faq{display:block;max-width:880px;margin-inline:auto;}.home-faq>h2{text-align:center;margin-bottom:32px;}
.home-faq details{border-top:1px solid var(--line);}.home-faq details:last-child{border-bottom:1px solid var(--line);}
.home-faq summary{display:flex;align-items:center;justify-content:space-between;gap:18px;list-style:none;cursor:pointer;padding:20px 0;font-size:15px;line-height:1.8;}
.home-faq summary>span{min-width:0;overflow-wrap:anywhere;}.home-faq summary::-webkit-details-marker{display:none;}.home-faq summary>svg{color:var(--accent);transition:transform .18s;}.home-faq details[open]>summary>svg{transform:rotate(45deg);}
.home-faq details>p{font-size:14px;line-height:1.95;color:var(--ink-soft);margin:0 0 24px;max-width:64ch;}
.home-closing{text-align:center;padding:80px 0 64px;}.home-closing .button{margin-top:27px;}
.home-course .home-footer{border-top:1px solid var(--line);padding-top:23px;font-size:12px;}
@media(max-width:1050px){.home-main.home-course{padding:44px 26px 24px;}.home-hero{grid-template-columns:minmax(0,1fr);gap:35px;}.home-hero-copy{max-width:760px;}.home-hero-copy h1{font-size:38px;}.home-live-demo{max-width:720px;width:100%;justify-self:center;}.home-audience,.home-section-heading{gap:30px;}.home-learning-flow{grid-template-columns:repeat(2,minmax(0,1fr));gap:25px;}.home-project-row{grid-template-columns:34px minmax(0,1fr);gap:18px;}.home-project-process{grid-column:2;justify-content:flex-start;padding:18px;}.home-faq{grid-template-columns:minmax(0,1fr);gap:28px;}}
@media(max-width:600px){.home-main.home-course{padding:32px 16px 22px;}.home-hero{gap:30px;padding-bottom:42px;}.home-hero-copy h1{font-size:30px;line-height:1.5;}.home-lead{font-size:15px;margin:19px 0;line-height:1.9;}.home-start-points{gap:10px;margin-bottom:23px;}.home-start-points li{font-size:14px;}.home-hero-actions{gap:15px;}.home-hero-footnote{font-size:11px;}.home-demo-caption{font-size:11px;gap:10px;}.home-live-demo .operation-demo{padding:16px 12px;}.home-live-demo .operation-controls>input{flex-basis:65%;}.home-live-demo .operation-speed{margin-left:auto;}.home-live-demo .operation-demo>figcaption strong{font-size:16px;}.home-audience,.home-section-heading{grid-template-columns:minmax(0,1fr);gap:18px;}.home-audience{padding:31px 0;}.home-audience p,.home-section-heading>p{font-size:14px;}.home-method,.home-projects,.home-courses,.home-faq{padding-top:47px;}.home-learning-flow{grid-template-columns:minmax(0,1fr);gap:18px;}.home-learning-flow li{padding-top:18px;}.home-learning-flow p{font-size:14px;}.home-project-row{grid-template-columns:28px minmax(0,1fr);gap:13px;padding:26px 0;}.home-project-number{font-size:21px;}.home-project-row h3{font-size:19px;}.home-project-process{padding:15px 11px;gap:7px;}.home-project-process span,.home-project-process strong{font-size:11px;}.home-project-process svg{width:14px;}.home-faq summary{font-size:14px;padding:18px 0;}.home-closing{padding:53px 0 42px;}.home-course .home-footer{gap:12px;line-height:1.8;}}
@media(prefers-reduced-motion:reduce){.home-faq summary>svg{transition:none;}}
@media(max-width:600px){.home-foundation{padding-top:47px;}.home-knowledge-path{grid-template-columns:minmax(0,1fr);}.home-knowledge-path li{border-top:0;border-left:2px solid var(--line);padding:0 0 27px 23px;}.home-knowledge-path li:last-child{padding-bottom:0;border-left-color:transparent;}.home-knowledge-path li::before{top:9px;left:-5px;}.home-knowledge-path span{margin-top:3px;}}

/* 首屏保留电影推荐的数字动画；语言预测作为可展开的补充实验。 */
.home-hero{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:68px;padding-bottom:64px;}
.home-hero-experiment{min-width:0;}
.home-model-demo{margin:0;padding:26px 28px 22px;background:var(--paper-raised);border:1px solid var(--line);border-radius:16px;}
.home-model-demo figcaption{display:flex;justify-content:space-between;align-items:center;gap:16px;}
.home-model-demo figcaption strong{font-size:20px;line-height:1.6;font-weight:650;}
.home-model-reset{display:grid;place-items:center;flex:0 0 auto;width:36px;height:36px;border:0;border-radius:50%;background:transparent;color:var(--ink-soft);}
.home-model-reset:hover{background:var(--accent-soft);}
.home-model-switch{display:flex;gap:8px;margin-top:20px;}
.home-model-switch button{border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--ink-soft);font-size:12px;padding:7px 13px;min-height:36px;}
.home-model-switch button[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-hover);}
.home-model-sentence{display:flex;gap:13px;align-items:center;justify-content:center;padding:25px 0 27px;font-size:32px;letter-spacing:5px;}
.home-model-sentence>strong{display:grid;place-items:center;width:51px;height:57px;font-weight:550;letter-spacing:0;border:1px dashed #c69565;border-radius:9px;color:var(--accent);background:var(--accent-soft);}
.home-model-sentence>strong.is-generated{border-style:solid;}
.home-model-table-title{display:flex;justify-content:space-between;gap:10px;color:var(--ink-soft);font-size:12px;line-height:1.8;padding-bottom:10px;border-bottom:1px solid var(--line-soft);}
.home-model-table-title>span:last-child{white-space:nowrap;}
.home-probabilities{display:grid;gap:6px;margin:13px 0 20px;}
.home-probability{--token-color:var(--lesson-color-a95b31,#a95b31);--token-fill:#eebd9a;display:grid;grid-template-columns:24px minmax(0,1fr) 43px 39px;gap:12px;align-items:center;min-height:36px;border-radius:6px;padding:4px 7px;}
.home-token-tone-1{--token-color:var(--lesson-color-4f7558,#4f7558);--token-fill:#b8ceb3;}.home-token-tone-2{--token-color:var(--lesson-color-796096,#796096);--token-fill:#c8b9df;}
.home-probability>strong{font-size:18px;font-weight:600;color:var(--token-color);}
.home-probability-track{height:12px;background:var(--lesson-color-f0e8dc,#f0e8dc);border-radius:3px;overflow:hidden;}
.home-probability-track>span{display:block;height:100%;background:var(--token-fill);border-radius:3px;}
.home-probability-count,.home-probability-percent{font-size:12px;text-align:right;font-variant-numeric:tabular-nums;}
.home-probability-count{color:var(--ink-soft);}.home-probability-percent{color:var(--token-color);font-weight:650;}
.home-probability.is-chosen{background:var(--accent-soft);}
.home-model-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.home-model-actions .button{font-size:13px;padding:10px 17px;}.home-model-actions .text-button{font-size:12px;min-height:40px;text-underline-offset:4px;}
.home-model-status{font-size:13px;color:var(--ink-soft);line-height:1.8;min-height:24px;margin:17px 0 13px;}
.home-model-footnote{font-size:11px;line-height:1.85;color:var(--ink-soft);margin:0;padding-top:13px;border-top:1px solid var(--line-soft);}
.home-outcomes{padding-top:68px;}.home-outcomes-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 52px;}
.home-outcomes-grid>a{position:relative;display:block;text-decoration:none;color:var(--ink);border-top:1px solid var(--line);padding:23px 38px 3px 0;}
.home-outcomes-grid>a>span{font-size:12px;color:var(--accent-hover);display:block;margin-bottom:9px;}
.home-outcomes-grid h3{font-size:20px;line-height:1.65;margin:0 0 10px;font-weight:650;}.home-outcomes-grid p{font-size:14px;line-height:1.9;color:var(--ink-soft);margin:0;max-width:39ch;}
.home-outcomes-grid>a>svg{position:absolute;right:0;top:27px;color:var(--accent);transition:transform .2s;}.home-outcomes-grid>a:hover>svg{transform:translate(3px,-3px);}.home-outcomes-grid>a:hover h3{text-decoration:underline;text-underline-offset:5px;}
.home-math-preview{margin-top:30px;border-block:1px solid var(--line);}.home-math-preview>summary{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:18px 2px;cursor:pointer;font-size:14px;color:var(--accent);list-style:none;line-height:1.8;}.home-math-preview>summary::-webkit-details-marker{display:none;}.home-math-preview[open]>summary>svg{transform:rotate(180deg);}.home-math-preview .home-live-demo{max-width:780px;margin:auto;}
@media(max-width:1050px){.home-hero{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px;}.home-hero-copy h1{font-size:clamp(29px,3.6vw,38px);}.home-model-demo{padding:22px 20px;}.home-model-demo figcaption strong{font-size:18px;}.home-model-actions{gap:7px;}.home-outcomes-grid{gap:26px 30px;}}
@media(max-width:800px){.home-hero{grid-template-columns:minmax(0,1fr);gap:32px;}.home-hero-copy h1{font-size:36px;}.home-hero-experiment{width:100%;max-width:600px;margin:auto;}.home-model-actions{gap:14px;}.home-model-demo{padding:24px;}}
@media(max-width:600px){.home-hero{padding-bottom:42px;}.home-hero-copy h1{font-size:30px;}.home-model-demo{padding:20px 17px;}.home-model-demo figcaption strong{font-size:17px;}.home-model-sentence{font-size:29px;padding:22px 0;}.home-probability{gap:8px;grid-template-columns:22px minmax(0,1fr) 39px 34px;}.home-model-actions .button{font-size:12px;padding:9px 13px;}.home-model-actions .text-button{font-size:11px;}.home-outcomes{padding-top:46px;}.home-outcomes-grid{grid-template-columns:minmax(0,1fr);gap:23px;}.home-outcomes-grid h3{font-size:18px;}.home-outcomes-grid>a{padding-top:20px;}.home-faq>h2{margin-bottom:24px;}.home-model-status{min-height:47px;}.home-model-switch button{min-height:40px;}}
@media(prefers-reduced-motion:reduce){.home-probability-track>span,.home-outcomes-grid>a>svg{transition:none;}}

.home-model-preview .home-model-demo{max-width:600px;margin:12px auto 26px;}

/* 大段落通过独立标题区、图标和留白建立阅读节奏。 */
.home-audience,.home-outcomes,.home-method,.home-projects,.home-courses,.home-faq{display:block;margin-top:72px;padding-top:38px;border-top:1px solid var(--line);}
.home-audience{padding-bottom:8px;border-bottom:0;margin-top:0;}
.home-section-heading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:17px;min-height:180px;padding:25px 0;margin:0 0 38px;text-align:center;}
.home-section-icon{display:grid;place-items:center;flex:0 0 auto;width:56px;height:56px;border-radius:16px;background:var(--accent-soft);color:var(--accent);}
.home-section-heading h2{margin:0;text-wrap:balance;}
.home-section-heading>p{max-width:54ch;margin:0;font-size:15px;line-height:1.95;}
.home-audience-copy{max-width:820px;margin:0 auto;text-align:center;}.home-audience-copy p{max-width:none;}.home-audience-copy p+p{margin-top:12px;}
.home-faq{max-width:880px;}.home-faq>.home-section-heading{margin-bottom:28px;}
.home-closing>.home-section-icon{margin:0 auto 22px;}.home-closing{margin-top:70px;border-top:1px solid var(--line);padding-top:60px;}
@media(max-width:600px){.home-start-points{display:none;}.home-hero-actions{margin-top:23px;}.home-audience,.home-outcomes,.home-method,.home-projects,.home-courses,.home-faq{margin-top:48px;padding-top:24px;}.home-audience{margin-top:0;}.home-section-heading{min-height:160px;padding:18px 0;gap:14px;margin-bottom:28px;}.home-section-heading h2{font-size:26px;line-height:1.65;}.home-section-heading>p{font-size:14px;}.home-section-icon{width:50px;height:50px;}.home-section-icon>svg{width:29px;height:29px;}.home-audience-copy{text-align:left;}.home-closing{margin-top:45px;padding-top:42px;}}

.home-hero-copy h1,.home-audience h2,.home-section-heading h2,.home-faq h2,.home-closing h2,.home-outcomes-grid h3,.home-learning-flow h3,.home-project-row h3{font-family:var(--display);font-weight:700;font-synthesis:none;}
.home-hero-copy h1{letter-spacing:.02em;}
.home-hero-footnote{font-size:14px;line-height:1.85;color:var(--accent);}
.home-browser-promise{display:flex;align-items:center;gap:12px;border-block:1px solid var(--line);padding:16px 0;margin:0 0 24px;}
.home-browser-icon{display:grid;place-items:center;width:35px;flex:0 0 auto;color:var(--accent);}
.home-browser-promise strong{font-family:var(--display);font-weight:700;font-size:18px;line-height:1.7;}
.home-browser-promise p{font-size:12px;line-height:1.8;color:var(--ink-soft);margin:4px 0 0;}.home-device-icons{display:flex;gap:8px;color:var(--ink-soft);margin-left:auto;align-items:center;}
@media(max-width:600px){.home-browser-promise{padding:12px 0;margin:0 0 17px;gap:8px;}.home-browser-promise strong{font-size:15px;}.home-browser-icon{width:26px;}.home-device-icons{gap:4px;}.home-device-icons>svg{width:15px;}.home-browser-promise p{font-size:11px;}.home-hero-actions{margin-top:0;}.home-hero-footnote{font-size:12px;margin-top:15px;}.home-lead{margin:16px 0;}.home-hero{gap:22px;}}

@media(max-width:600px){.home-hero{gap:16px;}.home-browser-promise{padding:10px 0;margin-bottom:14px;}.home-hero-footnote{margin-top:12px;}}

/* 更饱满的漫画圆体，配合适度放大的阅读字号。 */
.home-hero-copy h1{font-size:clamp(34px,3.5vw,52px);line-height:1.5;}
.home-lead{font-size:18px;line-height:1.95;}
.home-audience-copy p,.home-section-heading>p{font-size:17px;line-height:1.95;}
.home-learning-flow h3{font-size:19px;}.home-learning-flow p,.home-outcomes-grid p,.home-project-row p,.home-faq details>p{font-size:16px;line-height:1.95;}
.home-outcomes-grid h3{font-size:23px;}.home-project-row h3{font-size:24px;}.home-project-row p:first-of-type{font-size:14px;}.home-project-row a{font-size:15px;}
.home-faq summary{font-size:17px;line-height:1.9;}.home-course-map>summary{font-size:18px;}.home-free-note{font-size:15px;}
.home-project-process span,.home-project-process strong{font-size:15px;}
.home-live-demo .operation-demo>figcaption strong,.home-model-demo figcaption strong{font-family:var(--display);font-weight:700;font-size:20px;}
.home-live-demo .operation-controls .button{font-size:14px;}.home-live-demo .operation-instruction,.home-live-demo .operation-partial{font-size:15px;line-height:1.9;}.home-live-demo .matrix-editor-heading>span:first-child{font-size:13px;}.home-demo-note{font-size:14px;line-height:1.9;}
.home-browser-promise strong{font-size:19px;}.home-browser-promise p{font-size:14px;}.home-hero-actions .button{font-size:16px;}.home-text-link{font-size:15px;}
@media(max-width:600px){.home-main.home-course{padding-top:24px;}.home-hero-copy h1{font-size:31px;line-height:1.5;}.home-lead{font-size:16px;line-height:1.9;}.home-audience-copy p,.home-section-heading>p{font-size:16px;}.home-section-heading h2{font-size:28px;}.home-learning-flow h3{font-size:19px;}.home-learning-flow p,.home-outcomes-grid p,.home-project-row p,.home-faq details>p{font-size:16px;}.home-faq summary{font-size:16px;}.home-outcomes-grid h3,.home-project-row h3{font-size:21px;}.home-project-process span,.home-project-process strong{font-size:13px;}.home-browser-promise strong{font-size:16px;}.home-browser-promise p{font-size:12px;}.home-hero-actions .button{font-size:15px;}.home-text-link{font-size:13px;}.home-live-demo .operation-controls .button{font-size:13px;}.home-live-demo .operation-demo>figcaption strong{font-size:18px;}.home-live-demo .operation-instruction{font-size:14px;}.home-hero-footnote{font-size:13px;}.home-demo-note{font-size:14px;}}

.home-hero-copy h1{font-size:clamp(38px,4vw,60px);line-height:1.45;}
.home-lead{font-size:20px;line-height:1.9;}
.home-pedagogy{font-family:var(--display);font-size:21px;font-weight:700;color:var(--accent);line-height:1.9;margin:20px 0 24px;text-wrap:balance;}
.home-pedagogy>span{display:inline-block;white-space:nowrap;}
@media(max-width:600px){.home-pedagogy>span{display:block;}}
.home-audience h2,.home-section-heading h2,.home-faq h2,.home-closing h2{font-size:38px;line-height:1.6;}
.home-audience-copy p,.home-section-heading>p,.home-learning-flow p,.home-outcomes-grid p,.home-project-row p,.home-faq details>p{font-size:20px;line-height:1.95;}
.home-outcomes-grid h3,.home-project-row h3{font-size:27px;}.home-learning-flow h3{font-size:23px;}.home-faq summary{font-size:20px;}.home-project-row p:first-of-type,.home-project-row a,.home-free-note{font-size:18px;}
.home-browser-promise strong{font-size:22px;}.home-browser-promise p{font-size:17px;}.home-hero-actions .button{font-size:19px;}.home-text-link{font-size:18px;}.home-hero-footnote{font-size:17px;}
.home-demo-caption{font-size:17px;margin-bottom:10px;}.home-live-demo .operation-demo>figcaption strong{font-size:24px;}.home-live-demo .matrix-editor-heading>span:first-child{font-size:15px;}.home-live-demo .operation-instruction,.home-live-demo .operation-partial,.home-demo-note{font-size:17px;}.home-live-demo .matrix-value{font-size:26px;}
.home-live-demo .operation-controls .button{font-size:16px;}.home-live-demo .operation-demo>figcaption>span{font-size:15px;}
@media(max-width:600px){.home-main.home-course{padding-top:20px;}.home-hero-copy h1{font-size:34px;line-height:1.4;}.home-lead{font-size:18px;line-height:1.8;}.home-pedagogy{font-size:18px;line-height:1.8;margin:16px 0;}.home-section-heading h2,.home-audience h2,.home-faq h2,.home-closing h2{font-size:32px;}.home-audience-copy p,.home-section-heading>p,.home-learning-flow p,.home-outcomes-grid p,.home-project-row p,.home-faq details>p{font-size:18px;}.home-learning-flow h3{font-size:22px;}.home-outcomes-grid h3,.home-project-row h3{font-size:24px;}.home-faq summary{font-size:19px;}.home-free-note,.home-project-row p:first-of-type,.home-project-row a{font-size:17px;}.home-browser-promise strong{font-size:18px;}.home-browser-promise p{font-size:14px;}.home-device-icons{display:none;}.home-hero-actions .button{font-size:18px;}.home-text-link{font-size:16px;}.home-hero-footnote{font-size:15px;}.home-demo-caption{font-size:15px;}.home-live-demo .operation-demo>figcaption>span{display:none;}.home-live-demo .operation-demo>figcaption strong{font-size:20px;}.home-live-demo .operation-speed{display:none;}.home-live-demo .operation-controls .button{font-size:15px;}.home-live-demo .operation-equation{padding:14px 0;}.home-live-demo .operation-instruction,.home-live-demo .operation-partial,.home-demo-note{font-size:16px;}}

@media(max-width:600px){.home-hero-copy h1{font-size:33px;}}

.home-start-points li{font-size:20px;line-height:1.9;}
.home-browser-promise .home-install-title{font-size:21px;line-height:1.8;color:var(--ink);margin:0;}
.home-browser-promise .home-install-title>strong{font-size:inherit;font-weight:700;color:var(--accent);}
@media(max-width:600px){.home-browser-promise .home-install-title{font-size:18px;}.home-browser-promise .home-install-title>strong{display:block;}}
.home-catalog-link{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:26px 4px;border-block:1px solid var(--line);text-decoration:none;font-family:var(--display);font-size:22px;font-weight:700;line-height:1.8;}.home-catalog-link>span{display:flex;align-items:center;gap:13px;}.home-catalog-link svg{flex-shrink:0;}.home-catalog-link:hover{color:var(--accent);background:var(--paper-deep,var(--lesson-color-f8eddb,#f8eddb));}
@media(max-width:600px){.home-catalog-link{font-size:19px;padding-block:22px;gap:14px;}.home-catalog-link>span{gap:9px;}}
.home-hero-copy h1>.home-title-intro{display:block;color:var(--ink);font-size:.76em;line-height:1.6;margin-bottom:13px;}.home-hero-copy h1>.home-title-goal{display:block;color:var(--accent);font-size:clamp(33px,3.9vw,58px);}
@media(max-width:600px){.home-hero-copy h1>.home-title-intro{font-size:29px;line-height:1.55;margin-bottom:10px;}.home-hero-copy h1>.home-title-goal{font-size:clamp(26px,8.4vw,33px);}}
@media(max-width:600px){.home-main h2,.home-main h3{text-wrap:balance;}}
.home-courses .home-section-heading>p{text-wrap:balance;}
@media(max-width:600px){.home-course-title-tail{display:block;}}

/* 轻松学习主张位于首屏与产业报之间；白话术语用原生展开交互直接示范。 */
.home-start-tip{display:flex;align-items:flex-start;gap:9px;width:100%;margin:0 0 36px;padding:11px 16px;border-radius:6px;background:repeating-linear-gradient(135deg,rgba(177,83,23,.035) 0 4px,transparent 4px 10px),var(--lesson-color-faf4e9,#faf4e9);color:var(--ink-soft);text-align:left;}
.home-start-tip-icon{display:flex;flex-shrink:0;margin-top:5px;color:var(--ink-soft);}
.home-start-tip p{margin:0;font-size:16px;line-height:1.8;text-wrap:pretty;}
.home-start-tip strong{font-weight:700;color:var(--ink);}
@media(max-width:600px){.home-start-tip{gap:8px;padding:10px 12px;margin-bottom:28px;}.home-start-tip p{font-size:14px;}.home-start-tip-icon{margin-top:4px;}}
.home-ease{padding:0 0 80px;border-top:1px solid var(--line);text-align:center;}.home-ease>.home-section-heading{margin-bottom:33px;}.home-ease>.home-section-heading>p{max-width:38em;}.home-ease-promises{display:flex;justify-content:center;flex-wrap:wrap;gap:18px 48px;list-style:none;padding:0;margin:0;}.home-ease-promises>li{display:flex;align-items:center;gap:10px;font-family:var(--display);font-size:22px;font-weight:700;line-height:1.8;}.home-ease-promises svg{color:var(--accent);flex-shrink:0;}
.home-ease-terms{max-width:910px;margin:35px auto 0;padding-top:27px;border-top:1px solid var(--line);}.home-ease-terms>p{font-size:16px;color:var(--ink-soft);line-height:1.8;margin:0 0 18px;}.home-ease-terms>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;align-items:start;}.home-ease-terms details{min-width:0;}.home-ease-terms summary{display:flex;align-items:center;justify-content:center;gap:8px;list-style:none;cursor:pointer;font-size:18px;font-weight:700;line-height:1.9;text-decoration:underline;text-decoration-style:dashed;text-decoration-color:var(--lesson-color-c4a27e,#c4a27e);text-underline-offset:7px;}.home-ease-terms summary::-webkit-details-marker{display:none;}.home-ease-terms details[open] summary>svg{transform:rotate(180deg);}.home-ease-terms details>p{font-size:17px;color:var(--ink-soft);line-height:1.95;margin:18px 0 0;text-align:left;text-wrap:pretty;}
.home-ease-delight{font-size:20px;line-height:1.95;color:var(--ink-soft);margin:35px 0 0;text-wrap:balance;}.home-ease-delight>strong{font-family:var(--display);font-weight:700;color:var(--accent);}
.home-ease-action{display:flex;justify-content:center;margin-top:32px;}
.home-belief{padding:80px 0;border-top:1px solid var(--line);}
.home-belief-reading{max-width:1000px;margin-inline:auto;}
.home-belief-reading p{font-size:20px;line-height:1.9;color:var(--ink-soft);margin:0;text-wrap:pretty;}
.home-belief-reading strong{color:var(--ink);font-weight:700;}
.home-belief-compare{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:19px;line-height:1.8;}
.home-belief-compare caption{text-align:left;font-size:15px;color:var(--ink-soft);margin-bottom:18px;}
.home-belief-topic{width:13%;}
.home-belief-compare th,.home-belief-compare td{padding:22px 24px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line);overflow-wrap:anywhere;}
.home-belief-compare thead th{font-size:23px;padding-top:24px;padding-bottom:24px;}
.home-belief-compare tbody th{padding-left:0;font-size:20px;font-weight:700;}
.home-belief-compare td{color:var(--ink-soft);}
.home-belief-compare tr>:last-child{background:var(--accent-soft);}
.home-belief-compare thead th:last-child{color:var(--accent-hover);border-radius:var(--radius) var(--radius) 0 0;}
.home-belief-compare tbody tr:last-child>:last-child{border-radius:0 0 var(--radius) var(--radius);}
.home-belief-quote{margin:36px 0 0;padding:28px 0 0;border-top:1px solid var(--line);}
.home-belief-quote blockquote{padding:0;margin:0;}
.home-belief-quote blockquote p{font-size:19px;color:var(--ink);}
.home-belief-quote figcaption{font-size:14px;line-height:1.8;color:var(--ink-soft);margin-top:10px;}
.home-belief-quote figcaption a{text-underline-offset:4px;}
.home-belief-quote figcaption svg{vertical-align:middle;}
.home-belief-quote>p{font-size:19px;margin-top:20px;}
.home-belief-quote>p>strong{color:var(--accent);}
.home-belief-author{margin-top:24px;}
.home-belief-author p{font-size:17px;}
.home-belief-close{margin-top:36px;padding-top:30px;border-top:1px solid var(--line);text-align:center;}
.home-belief-close h3{font-size:23px;line-height:1.7;color:var(--accent);margin:0 0 12px;text-wrap:balance;}
.home-belief-close .button{margin-top:25px;}
@media(max-width:600px){.home-belief{padding:58px 0 64px;}.home-belief-topic{width:20%;}.home-belief>.home-section-heading h2{font-size:26px;}.home-belief-compare{font-size:16px;line-height:1.85;}.home-belief-compare th,.home-belief-compare td{padding:18px 10px;}.home-belief-compare thead th{font-size:18px;}.home-belief-compare tbody th{font-size:17px;}.home-belief-compare caption{font-size:14px;}.home-belief-quote blockquote p,.home-belief-quote>p{font-size:17px;}.home-belief-quote figcaption{font-size:14px;}.home-belief-author p{font-size:16px;}.home-belief-close h3{font-size:21px;}.home-belief-close p{font-size:18px;}.home-belief-close .button{max-width:100%;}}
@media(max-width:600px){.home-ease{padding:0 0 64px;}.home-ease-promises{display:grid;gap:13px;justify-content:center;text-align:left;}.home-ease-promises>li{font-size:20px;}.home-ease-terms{margin-top:27px;padding-top:23px;}.home-ease-terms>div{grid-template-columns:1fr;gap:21px;}.home-ease-terms details>p{text-align:center;font-size:16px;max-width:26em;margin-inline:auto;}.home-ease-delight{font-size:18px;}.home-ease-delight>strong{display:block;}}

/* 先说明工具普及后的能力积累，再以明确的零基础入口降低起步负担。 */
.home-audience{padding-top:72px;padding-bottom:8px;}
.home-audience>.home-section-heading{margin-bottom:26px;}
.home-audience>.home-section-heading>p{color:var(--accent);font-size:21px;font-weight:700;}
.home-audience-entry{display:flex;justify-content:center;flex-wrap:wrap;gap:14px 30px;list-style:none;padding:0;margin:0 auto 36px;}
.home-audience-entry li{display:flex;align-items:center;gap:8px;font-size:18px;line-height:1.8;}
.home-audience-entry svg{color:var(--accent);flex-shrink:0;}
.home-audience .home-audience-copy{max-width:900px;text-align:center;}
.home-audience .home-audience-copy p{font-size:20px;line-height:1.95;text-wrap:pretty;}
.home-audience .home-audience-copy strong{color:var(--ink);font-weight:700;}
.home-audience .home-audience-copy .home-audience-tools{font-size:18px;max-width:44em;margin-inline:auto;}
.home-audience-tools strong{display:block;margin-top:9px;}
.home-audience .home-audience-copy .home-audience-shift{margin-top:30px;}
.home-audience .home-audience-copy .home-audience-value{margin-top:18px;}
.home-audience-value strong{display:block;margin-top:6px;}
.home-fit{padding:64px 0 72px;border-bottom:1px solid var(--line);}
.home-fit-comparison{display:grid;grid-template-columns:1fr 1.1fr;gap:36px;align-items:start;}
.home-fit-comparison>div{min-width:0;padding:28px 30px;}
.home-fit-comparison .home-fit-tools{padding-left:0;}
.home-fit-algorithms{background:var(--accent-soft);border-radius:16px;}
.home-fit h3{font-family:var(--display);font-size:25px;line-height:1.6;margin:0 0 18px;text-wrap:balance;}
.home-fit-comparison ul{list-style:none;margin:0 0 20px;padding:0;display:grid;gap:13px;}
.home-fit-comparison li{font-size:19px;line-height:1.8;}
.home-fit-tools s{text-decoration-thickness:1px;text-decoration-color:var(--ink-soft);}
.home-fit-tools li{padding-bottom:12px;border-bottom:1px solid var(--line);color:var(--ink-soft);}
.home-fit-algorithms li{display:flex;align-items:flex-start;gap:10px;}
.home-fit-algorithms li>svg{flex:0 0 auto;color:var(--accent);margin-top:7px;}
.home-fit-comparison p{font-size:17px;line-height:1.9;color:var(--ink-soft);margin:0;max-width:45ch;}
.home-fit-comparison strong{color:var(--ink);}
.home-fit-backgrounds{margin-top:48px;}
.home-fit-methods{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px 24px;list-style:none;margin:30px 0 0;padding:22px 0;border-block:1px solid var(--line);}
.home-fit-methods li{display:flex;align-items:flex-start;gap:8px;font-size:17px;line-height:1.8;}
.home-fit-methods svg{flex-shrink:0;margin-top:6px;color:var(--accent);}
.home-fit-context .home-belief-quote{border-top:0;margin-top:0;padding-top:0;}
.home-fit-context>div{padding-bottom:24px;}
@media(max-width:600px){.home-fit-methods{flex-direction:column;gap:12px;}.home-fit-methods li{font-size:16px;}}
.home-fit-backgrounds>h3{margin-bottom:8px;}
.home-fit-backgrounds>p{font-size:18px;line-height:1.9;color:var(--ink-soft);margin:0 0 22px;}
.home-fit-backgrounds dl{margin:0;}
.home-fit-backgrounds dl>div{display:grid;grid-template-columns:minmax(0,.72fr) minmax(0,1.5fr);gap:32px;padding:20px 0;border-top:1px solid var(--line);align-items:baseline;}
.home-fit-backgrounds dt{font-size:20px;font-weight:700;line-height:1.8;}
.home-fit-backgrounds dd{margin:0;font-size:18px;line-height:1.9;color:var(--ink-soft);}
.home-fit-start{margin-top:32px;padding-top:30px;border-top:1px solid var(--line);text-align:center;}
.home-fit-start>p{font-size:19px;line-height:1.9;margin:0 auto;max-width:64ch;text-wrap:balance;}
.home-fit-start>p>strong{display:block;font-family:var(--display);font-size:25px;line-height:1.8;color:var(--accent-hover);}
.home-fit-start>p>strong>span{display:inline-block;}
.home-fit-start>p>span{display:block;font-size:17px;color:var(--ink-soft);margin-top:8px;}
.home-fit-start>.button{margin-top:24px;font-size:18px;max-width:100%;}
.home-fit-start>p.home-fit-free{font-size:15px;color:var(--ink-soft);margin-top:16px;}
@media(max-width:800px){.home-fit-comparison{grid-template-columns:1fr;gap:22px;}.home-fit-comparison>div{padding:26px;}.home-fit-comparison .home-fit-tools{padding:0;}.home-fit-comparison p{max-width:65ch;}}
@media(max-width:600px){.home-fit{padding:48px 0;}.home-fit h3{font-size:23px;}.home-fit-comparison li{font-size:17px;}.home-fit-comparison p{font-size:16px;}.home-fit-comparison>div{padding:24px 20px;}.home-fit-backgrounds{margin-top:36px;}.home-fit-backgrounds>p{font-size:17px;}.home-fit-backgrounds dl>div{grid-template-columns:1fr;gap:6px;padding:18px 0;}.home-fit-backgrounds dt{font-size:19px;}.home-fit-backgrounds dd{font-size:16px;}.home-fit-start>p{font-size:18px;}.home-fit-start>p>strong{font-size:23px;}.home-fit-start>p>span{font-size:16px;}.home-fit-start>.button{font-size:17px;}}
.home-audience-start{max-width:900px;margin:36px auto 0;padding-top:30px;border-top:1px solid var(--line);text-align:center;}
.home-audience-start h3{font-size:24px;line-height:1.7;color:var(--accent);margin:0 0 14px;text-wrap:balance;}
.home-audience .home-audience-start p{font-size:18px;line-height:1.95;margin-inline:auto;max-width:none;}
.home-audience-start .button{margin-top:25px;}
.home-audience .home-audience-start .home-audience-free{font-size:15px;margin-top:18px;}
@media(max-width:600px){.home-audience{padding-top:48px;}.home-audience>.home-section-heading h2{font-size:28px;}.home-audience>.home-section-heading>p{font-size:18px;}.home-audience-entry{display:grid;justify-content:center;gap:10px;margin-bottom:28px;}.home-audience-entry li{font-size:17px;}.home-audience .home-audience-copy p{font-size:18px;}.home-audience .home-audience-copy .home-audience-tools{font-size:17px;}.home-audience-start h3{font-size:22px;}.home-audience .home-audience-start p{font-size:17px;}.home-audience .home-audience-start .home-audience-free{font-size:14px;}.home-audience-value br,.home-audience-start br{display:none;}}

/* Emphasize the eight-project learning promise without competing with the title. */
.home-projects .home-section-heading>p.home-projects-promise{max-width:760px;margin-top:30px}
.home-projects-promise strong{display:block;color:var(--accent);font-family:var(--display);font-size:clamp(24px,3.2vw,32px);font-weight:700;line-height:1.6;text-wrap:balance}
.home-projects-promise>span{display:block;margin-top:12px;font-size:17px;line-height:1.9;color:var(--ink-soft);text-wrap:pretty}
@media(max-width:600px){.home-projects .home-section-heading>p.home-projects-promise{margin-top:24px}.home-projects-promise>span{font-size:16px}}

.home-projects-more{display:grid;justify-items:center;gap:16px;margin:32px 0 0;padding-top:32px;border-top:1px solid var(--line);}
.home-projects-more>.button-primary{background:var(--accent);color:var(--paper-raised);min-height:48px;}
.home-projects-more>.button-primary:hover{background:var(--accent-hover);}
.home-projects-more>p{margin:0;color:var(--ink-soft);font-size:14px;line-height:1.9;text-align:center;}

/* 讲演原话与课程主张分开展示，来源直接可见。 */
.home-method-quote{max-width:1000px;margin:0 auto;padding:38px 32px 30px;background:var(--accent-soft);border-radius:16px;text-align:center;}
.home-method-quote blockquote{margin:0;padding:0;}
.home-method-quote blockquote p{font-family:var(--display);font-size:clamp(23px,2.4vw,30px);font-weight:700;line-height:1.85;color:var(--ink);margin:0;text-wrap:balance;}
.home-method-quote figcaption{margin-top:26px;color:var(--ink-soft);font-size:14px;line-height:1.85;}
.home-method-quote figcaption p{margin:0;}
.home-method-quote figcaption p:first-child{display:flex;justify-content:center;align-items:baseline;gap:12px;margin-bottom:10px;}
.home-method-quote figcaption strong{font-family:var(--display);font-size:23px;color:var(--ink);}
.home-method-quote figcaption a{display:inline-flex;align-items:center;gap:5px;color:var(--accent-hover);margin-top:12px;text-underline-offset:4px;}
.home-method-quote figcaption a:hover{color:var(--ink);}
.home-method-quote figcaption a:focus-visible{outline:2px solid var(--accent);outline-offset:5px;border-radius:3px;}
.home-method-bridge{text-align:center;margin:32px 0 40px;line-height:1.9;}
.home-method-bridge strong{display:block;font-family:var(--display);font-size:25px;color:var(--accent);}
.home-method-bridge span{display:block;font-size:18px;color:var(--ink-soft);margin-top:6px;}
@media(max-width:600px){#home-method-title{font-size:clamp(24px,7vw,28px);}}
@media(max-width:600px){.home-method-quote{padding:28px 18px 24px;}.home-method-quote blockquote p{font-size:21px;line-height:1.9;}.home-method-quote figcaption{font-size:13px;margin-top:22px;}.home-method-quote figcaption strong{font-size:21px;}.home-method-bridge{margin:26px 0 32px;}.home-method-bridge strong{font-size:22px;}.home-method-bridge span{font-size:16px;}}

/* 最后一屏以长短不一的阅读片段收尾；示例属性在标题下直接可见。 */
.home-reviews { margin-top:24px; padding:56px 0 24px; border-top:1px solid var(--line); }
.home-reviews-heading { max-width:760px; margin:0 auto 36px; text-align:center; }
.home-reviews-heading h2 { font-size:clamp(27px,3vw,38px); line-height:1.6; margin:0; text-wrap:balance; }
.home-reviews-heading p { margin:14px 0 0; font-size:15px; line-height:1.85; color:var(--ink-soft); }
.home-reviews-masonry { columns:3; column-gap:20px; }
.home-reviews-masonry.is-masonry { position:relative; columns:auto; }
.home-reviews-masonry.is-masonry .home-review { position:absolute; margin:0; }
.home-review { display:inline-block; vertical-align:top; width:100%; break-inside:avoid; margin:0 0 20px; padding:26px; border:1px solid var(--line); border-radius:14px; background:var(--paper-raised); }
.home-review blockquote { margin:0; }
.home-review blockquote p { font-size:18px; line-height:1.95; margin:0; color:var(--ink); text-wrap:pretty; }
.home-review figcaption { display:flex; align-items:center; gap:12px; margin-top:24px; }
.home-review-avatar { display:block; width:48px; height:48px; border-radius:50%; object-fit:cover; flex:0 0 48px; background:var(--line-soft); }
.home-review figcaption>div { min-width:0; }
.home-review figcaption strong { display:block; font-size:17px; line-height:1.6; color:var(--ink); }
.home-review figcaption span { display:block; font-size:13px; line-height:1.8; color:var(--ink-soft); overflow-wrap:anywhere; }
@media(min-width:601px) and (max-width:900px) { .home-reviews-masonry { columns:2; } }
@media(max-width:600px) {
 .home-reviews { padding-top:36px; margin-top:8px; }
 .home-reviews-heading { text-align:left; margin-bottom:26px; }
 .home-reviews-heading p { font-size:14px; }
 .home-reviews-masonry { columns:1; }
 .home-review { padding:22px; margin-bottom:16px; }
 .home-review blockquote p { font-size:17px; }
}

/* Tiny layered kitten; the tail and pupils move without shifting the lesson. */
.home-demo-perch{position:relative;display:flow-root;margin-top:12px;}
.home-demo-perch>.operation-demo{margin-top:0;}
.home-perched-cat{position:absolute;width:129px;height:129px;right:-43px;top:-86px;z-index:2;pointer-events:none;user-select:none;}
.home-perched-cat>img{position:absolute;inset:0;width:100%;height:100%;max-width:none;}
.home-cat-body{z-index:2;clip-path:polygon(0 45%,66% 45%,68% 65%,61% 69%,0 69%);}
.home-cat-head{position:absolute;inset:0;z-index:3;transform-origin:38% 49%;animation:home-cat-tilt 8s ease-in-out infinite;}
.home-cat-head>img{position:absolute;inset:0;width:100%;height:100%;max-width:none;clip-path:polygon(0 0,100% 0,100% 43%,58% 49%,43% 54%,21% 51%,0 44%);}
.home-cat-tail{z-index:1;clip-path:polygon(62% 58%,100% 58%,100% 100%,62% 100%);transform-origin:65% 64%;animation:home-cat-swish 4.8s ease-in-out infinite;}
.home-cat-head>.home-cat-eye-base{z-index:3;clip-path:none;mask-image:radial-gradient(ellipse 4.8% 4.2% at 31.4% 33.7%,#000 98%,transparent 100%),radial-gradient(ellipse 5.2% 5% at 44.6% 26%,#000 98%,transparent 100%);}
.home-cat-head>.home-cat-iris{z-index:4;animation:home-cat-look 8s ease-in-out infinite;}
.home-cat-head>.home-cat-iris-left{clip-path:ellipse(2.7% 3.1% at 32.9% 35.2%);}
.home-cat-head>.home-cat-iris-right{clip-path:ellipse(2.7% 3.1% at 43.4% 28.7%);}
.home-cat-head>.home-cat-blink{z-index:5;clip-path:polygon(23% 19%,55% 19%,55% 41%,23% 43%);opacity:0;animation:home-cat-blink 8s linear infinite;}
.home-hero-experiment>.home-demo-caption{padding-right:80px;}
.page-home .home-main{overflow-x:clip;}
@keyframes home-cat-tilt{0%,18%,100%{transform:rotate(0deg);}40%,54%{transform:rotate(-1.8deg);}76%,86%{transform:rotate(1.2deg);}}
@keyframes home-cat-swish{0%,18%,100%{transform:rotate(-2deg);}32%{transform:rotate(8deg);}46%{transform:rotate(-6deg);}62%{transform:rotate(5deg);}78%{transform:rotate(-2deg);}}
@keyframes home-cat-blink{0%,19%,22%,68%,72%,100%{opacity:0;}19.4%,21.2%,68.4%,70%{opacity:1;}}
@keyframes home-cat-look{0%,16%,100%{transform:translate(0,0);}30%,47%{transform:translate(-.65%,.35%);}64%,82%{transform:translate(.5%,-.25%);}}
@media(max-width:600px){.home-perched-cat{width:90px;height:90px;right:-24px;top:-60px;}.home-hero-experiment>.home-demo-caption{padding-right:64px;}.home-demo-perch{margin-top:18px;}}
@media(prefers-reduced-motion:reduce){.home-cat-head,.home-cat-tail,.home-cat-head>.home-cat-iris,.home-cat-head>.home-cat-blink{animation:none;}}

.home-study-community{position:relative;}
.home-study-community>a.home-audience-entry{position:absolute;top:-34px;right:24px;display:flex;align-items:center;gap:12px;padding:12px 16px;min-height:68px;background:var(--accent-soft);border:1px solid var(--accent);border-radius:14px;text-decoration:none;color:var(--ink);transition:transform .18s ease-out;}
.home-audience-entry>.home-audience-symbol{display:flex;color:var(--accent);}
.home-audience-entry .home-audience-entry-copy{display:block;}
.home-audience-entry .home-audience-entry-copy strong{font-size:18px;line-height:1.5;}
.home-audience-entry .home-audience-entry-copy small{display:block;font-size:13px;color:var(--ink-soft);line-height:1.6;}
.home-study-community>a.home-audience-entry>svg{color:var(--accent);}
.home-study-community>a.home-audience-entry:hover{transform:translateY(-3px);color:var(--ink);}
.home-study-community>a.home-audience-entry:focus-visible{outline:3px solid var(--accent);outline-offset:4px;}
.audience-page{max-width:1100px;padding:64px 32px 40px;margin:auto;}
.audience-heading h1{font-size:22px;color:var(--ink-soft);margin:0 0 24px;}
.audience-promise{font-family:var(--display);font-weight:700;font-size:clamp(32px,4vw,48px);line-height:1.5;margin:0 0 24px;}
.audience-promise strong{color:var(--accent);}
.audience-heading>p:last-of-type{font-size:19px;line-height:1.9;color:var(--ink-soft);max-width:39em;}
.audience-start-actions{display:flex;align-items:center;gap:18px 24px;flex-wrap:wrap;margin-top:28px;}
.audience-start-actions>a{display:inline-flex;align-items:center;gap:8px;min-height:44px;}
.audience-reassurance{display:flex;gap:18px 32px;flex-wrap:wrap;list-style:none;padding:24px 0;margin:40px 0 56px;border-block:1px solid var(--line);font-size:16px;}
.audience-reassurance li{display:flex;align-items:center;gap:9px;}
.audience-reassurance svg{color:var(--sage);flex-shrink:0;}
.audience-backgrounds{scroll-margin-top:32px;}
.audience-backgrounds>h2{font-size:28px;line-height:1.6;margin:0 0 12px;}
.audience-persona{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,1.6fr);gap:48px;padding:32px 0;border-bottom:1px solid var(--line);}
.audience-persona h3{font-size:25px;line-height:1.6;margin:0 0 8px;}
.audience-persona>div:first-child>p{color:var(--accent);font-size:17px;line-height:1.8;margin:0;}
.audience-persona>div:last-child>p{color:var(--ink-soft);font-size:17px;line-height:1.9;margin:0 0 12px;}
.audience-persona a{display:inline-flex;align-items:center;gap:8px;min-height:44px;color:var(--accent);text-underline-offset:5px;}
.audience-keyword{font-weight:700;color:var(--ink);text-decoration-line:underline;text-decoration-style:wavy;text-decoration-color:var(--accent);text-decoration-thickness:1.25px;text-underline-offset:6px;}
.audience-invitation{padding:48px 0 20px;}
.audience-invitation h2{font-size:clamp(28px,3vw,36px);line-height:1.6;margin:0 0 24px;}
.audience-invitation>p{font-size:18px;line-height:1.9;color:var(--ink-soft);max-width:40em;}
@media(max-width:700px){.home-study-community>a.home-audience-entry{position:static;grid-column:1/-1;justify-content:space-between;margin-bottom:12px;gap:10px;}.home-audience-entry .home-audience-entry-copy{flex:1;}.audience-page{padding:36px 20px 24px;}.audience-persona{grid-template-columns:1fr;gap:16px;padding:28px 0;}.audience-persona h3{font-size:23px;}.audience-backgrounds>h2{font-size:25px;}.audience-reassurance{display:grid;gap:14px;margin:28px 0 36px;}.audience-heading h1{font-size:19px;}.audience-invitation{padding-top:36px;}}
@media(prefers-reduced-motion:reduce){.home-study-community>a.home-audience-entry{transition:none;}.home-study-community>a.home-audience-entry:hover{transform:none;}}
@media(max-width:600px){.page-home>.site-header{flex-wrap:wrap;row-gap:10px;}.page-home>.site-header>.header-actions{margin-left:auto;}}

.update-history{max-width:1040px;margin:auto;padding:64px 32px 40px;}
.update-history-heading h1{font-size:22px;color:var(--ink-soft);margin:0 0 24px;}
.update-history-promise{font-family:var(--display);font-size:clamp(32px,4vw,48px);font-weight:700;line-height:1.5;margin:0 0 24px;}
.update-history-promise strong{color:var(--accent);}
.update-history-heading>p:last-child{font-size:18px;line-height:1.9;color:var(--ink-soft);max-width:38em;}
.update-history-heading>p:not(.update-history-promise){font-size:18px;line-height:1.9;color:var(--ink-soft);max-width:38em;}
.update-history-feedback{margin-top:12px;max-width:100%;white-space:normal;}
.update-history-note{display:flex;gap:12px;align-items:flex-start;padding:18px 0;margin:36px 0 48px;border-block:1px solid var(--line);color:var(--ink-soft);}
.update-history-note svg{flex-shrink:0;margin-top:5px;color:var(--accent);}
.update-history-note p{margin:0;font-size:15px;line-height:1.9;}
.update-timeline{list-style:none;padding:0;margin:0;}
.update-timeline-entry{display:grid;grid-template-columns:168px minmax(0,1fr);gap:48px;position:relative;padding:0 0 52px;}
.update-timeline-entry::before{content:"";position:absolute;left:183px;top:10px;bottom:-10px;width:1px;background:var(--line);}
.update-timeline-entry:last-child::before{display:none;}
.update-timeline-entry::after{content:"";position:absolute;top:8px;left:178px;width:11px;height:11px;border-radius:50%;background:var(--paper);border:2px solid var(--ink-soft);}
.update-timeline-entry[data-status=current]::after{background:var(--accent);border-color:var(--accent);}
.update-timeline-date time{display:block;font-family:var(--display);font-weight:700;font-size:21px;line-height:1.5;}
.update-timeline-date>span{display:inline-block;margin-top:10px;font-size:13px;line-height:1.8;color:var(--ink-soft);}
.update-timeline-entry[data-status=current] .update-timeline-date>span{color:var(--accent);font-weight:700;}
.update-timeline-entry h2{font-size:26px;line-height:1.5;margin:0 0 8px;}
.update-timeline-subtitle{font-size:18px;line-height:1.8;color:var(--accent);margin:0 0 16px;}
.update-timeline-entry article>ul{padding-left:20px;margin:0;color:var(--ink-soft);font-size:16px;line-height:1.9;}
.update-timeline-entry article li+li{margin-top:8px;}
.update-history-next{border-top:1px solid var(--line);padding:36px 0;margin-top:4px;}
.update-history-next h2{font-size:28px;line-height:1.6;margin:0 0 12px;}
.update-history-next p{color:var(--ink-soft);font-size:17px;line-height:1.9;}
.update-history-next>div{display:flex;align-items:center;flex-wrap:wrap;gap:20px;margin-top:24px;}
.update-history-next>div>a:last-child{display:inline-flex;align-items:center;gap:8px;min-height:44px;}
.history-mobile-link{display:none;}
@media(max-width:1200px){.page-home .home-header-links{display:none;}.header-actions .history-mobile-link{display:inline-flex;}}
@media(max-width:600px){.update-history{padding:36px 20px 24px;}.update-history-heading h1{font-size:19px;margin-bottom:20px;}.update-history-note{margin:28px 0 36px;}.update-timeline-entry{grid-template-columns:minmax(0,1fr);gap:16px;padding:0 0 40px 30px;}.update-timeline-entry::before{left:6px;}.update-timeline-entry::after{left:1px;}.update-timeline-date{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}.update-timeline-date time{font-size:18px;}.update-timeline-date>span{margin-top:0;}.update-timeline-entry h2{font-size:24px;}.update-timeline-subtitle{font-size:17px;}.update-history-next h2{font-size:25px;}}

/* cici walks on the existing patterned tip; no new panel, title, or separators. */
.home-course .home-hero{padding-bottom:14px;}
.home-ease:has(.home-cici){border-top:0;}
.home-cici{margin:20px 0 0;padding:0;border:0;scroll-margin-top:110px;}
.cici-companion{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:end;height:124px;}
.cici-track{position:relative;height:124px;min-width:0;}
.cici-identity{position:absolute;left:0;top:0;display:flex;align-items:baseline;gap:9px;max-width:100%;padding:6px 12px;border:1px dashed var(--accent);border-radius:12px;background:var(--paper-raised);color:var(--ink);font-size:18px;line-height:1.5;}
.cici-identity strong{color:var(--accent);font-size:22px;}
.cici-character{position:absolute;left:0;bottom:0;display:block;width:80px;height:80px;margin:0;padding:0;border:0;background:transparent;border-radius:12px;cursor:pointer;touch-action:manipulation;}
.cici-character:focus-visible{outline:3px solid var(--accent);outline-offset:2px;}
.cici-sprite{display:block;width:100%;height:100%;background-size:400% 400%;background-position:0 0;background-repeat:no-repeat;}
.cici-interactions{position:relative;min-width:0;padding-bottom:14px;}
.cici-actions{display:flex;gap:9px;}
.cici-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:24px;background:var(--paper-raised);color:var(--ink);font:inherit;font-size:16px;line-height:1.6;white-space:nowrap;cursor:pointer;touch-action:manipulation;transition:background .16s ease-out,border-color .16s ease-out;}
.cici-action svg{flex-shrink:0;color:var(--accent);}
.cici-action:hover{background:var(--accent-soft);border-color:var(--accent);}
.cici-action:active{background:var(--honey);}
.cici-action:focus-visible{outline:3px solid var(--accent);outline-offset:3px;}
.cici-action.cici-adopt,.cici-action.cici-adopt[aria-pressed="true"],.cici-action.cici-adopt:hover{color:var(--cici-adopt-ink,var(--paper-raised));background:var(--accent);border-color:var(--accent);}
.cici-adopt svg{color:inherit;}
.cici-speech{position:absolute;right:0;bottom:calc(100% + 3px);max-width:360px;margin:0!important;font-size:14px;line-height:1.7;color:var(--ink);background:var(--paper-raised);padding:5px 11px;border-radius:10px;opacity:0;pointer-events:none;text-align:left;}
.home-cici[data-cici-speaking="true"] .cici-speech{opacity:1;}
[data-theme="dark"] .cici-adopt{--cici-adopt-ink:var(--paper);}
/* A frame is one silhouette; never blend two sets of limbs. */
.lesson-cat-previous{display:none!important;}
@media(max-width:700px){
  .cici-companion{grid-template-columns:minmax(70px,1fr) auto;gap:9px;height:146px;}
  .cici-track{height:146px;}
  .cici-identity{display:block;font-size:13px;line-height:1.5;padding:5px 7px;}
  .cici-identity strong{display:block;font-size:18px;}
  .cici-character{width:76px;height:76px;}
  .cici-interactions{padding-bottom:10px;}
  .cici-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;}
  .cici-action{font-size:14px;padding:7px 9px;gap:5px;min-height:44px;}
  .cici-action svg{width:16px;height:16px;}
  .cici-speech{font-size:13px;max-width:240px;bottom:calc(100% + 2px);}
}
@media(max-width:360px){.cici-companion{grid-template-columns:minmax(58px,1fr) auto;gap:6px;}.cici-character{width:64px;height:64px;}.cici-action{font-size:13px;padding-inline:6px;}}
@media(prefers-reduced-motion:reduce){.cici-action{transition:none;}}

.cici-visit{display:flex;align-items:center;justify-content:flex-end;gap:7px;color:var(--accent);font-size:14px;line-height:1.7;margin-top:9px;text-underline-offset:4px;}

/* A quiet, sun-warmed room. This page owns its chrome; course styles stay scoped. */
body.page-cici{background:rgb(252 244 231);color:#60422e}.page-cici .site-header,.page-cici .site-footer,.page-cici .lesson-cat,.page-cici .cici-companion,.page-cici .reading-safety-bar{display:none!important}.page-cici .site-shell,.page-cici .site-main{max-width:none;padding:0}.cici-home{--ink:#60422e;--rust:#b45d24;--cream:#fff8eb;--line:#d6b894;--sage:#899364;color:var(--ink);font-family:inherit;max-width:1600px;margin:auto}.cici-home [hidden]{display:none!important}.cici-home button,.cici-home a{-webkit-tap-highlight-color:transparent}.cici-home button{font:inherit;color:inherit;border:0;cursor:pointer;background:none}.cici-home button:focus-visible,.cici-home a:focus-visible{outline:3px solid #876b36;outline-offset:5px}.cici-home button:disabled{cursor:default;opacity:.55}.cici-home-header{display:flex;align-items:center;gap:26px;padding:19px 34px;min-height:84px;background:#fff8ee;position:relative;z-index:5;border-bottom:1px solid #e5cfb6}.cici-home-header>a{display:flex;align-items:center;gap:9px;color:var(--ink);text-decoration:none;font-size:14px;white-space:nowrap}.cici-home-brand{display:flex;align-items:center;gap:12px;font-size:23px;letter-spacing:.02em;font-weight:700;white-space:nowrap;border-left:1px solid var(--line);padding-left:24px}.cici-home-brand>svg{color:#c17b42}.cici-home-vitals{display:flex;gap:20px;margin-left:auto}.cici-home-vitals label{display:grid;grid-template-columns:16px 1fr;align-items:center;column-gap:5px;row-gap:5px;width:92px;font-size:12px;font-weight:650}.cici-home-vitals meter{appearance:none;grid-column:1/3;display:block;width:100%;height:10px;border:1px solid #cbb18c;border-radius:10px;background:#f0e5d2;overflow:hidden}.cici-home-vitals meter::-webkit-meter-bar{border:0;background:#f0e5d2;box-shadow:none}.cici-home-vitals meter::-webkit-meter-optimum-value{background:#bd7945;border-radius:10px;transition:width .65s ease}.cici-home-vitals label:nth-child(2) meter::-webkit-meter-optimum-value{background:#899361}.cici-home-vitals label:nth-child(3) meter::-webkit-meter-optimum-value{background:#b5a06c}.cici-home-vitals label:nth-child(4) meter::-webkit-meter-optimum-value{background:#c18272}.cici-home-vitals meter::-moz-meter-bar{background:#a88e5f;border-radius:10px}.cici-home-vitals .is-low{color:#a24d2a}.cici-sound{display:grid;place-items:center;border-radius:50%!important;width:38px;height:38px;border:1px solid #ddc6a8!important;flex-shrink:0}.cici-sound.is-on{background:#e5e9d5;color:#657142}.cici-home-main{margin:0;padding:0;max-width:none}.cici-habitat{position:relative;isolation:isolate;aspect-ratio:1.94;min-height:450px;max-height:720px;overflow:hidden;background:#edd5b4}.cici-room-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 59%;z-index:-3;user-select:none;pointer-events:none;transition:filter 1.6s ease}.cici-light{position:absolute;inset:0;z-index:-2;pointer-events:none;background:linear-gradient(180deg,#fff9ee99 0%,transparent 30%,transparent 85%,#eed4b633);transition:background 1.6s ease}.cici-home-heading{position:absolute;top:27px;left:50%;transform:translateX(-50%);text-align:center;width:70%;pointer-events:none;z-index:1}.cici-eyebrow{font-size:12px;letter-spacing:.25em;opacity:.75}.cici-home-heading h1{font-size:clamp(34px,4.3vw,60px);font-weight:650;line-height:1.35;letter-spacing:.12em;margin:7px 0 15px;text-shadow:0 2px 14px #fff6e5}.cici-home-heading h1:after{content:'';display:block;width:85px;height:7px;margin:4px auto 0;border-top:4px solid #959a68;border-radius:50%;transform:rotate(-3deg)}.cici-home-heading p{margin:0;font-size:15px;letter-spacing:.06em}.cici-bond{position:absolute;top:28px;left:32px;display:flex;flex-direction:column;gap:6px;font-size:12px;z-index:1}.cici-bond small{color:#8c725c;font-size:11px}.cici-renderer{position:absolute;inset:0;z-index:2;pointer-events:none}.cici-renderer canvas{display:block;width:100%;height:100%}.cici-home-speech{position:absolute;z-index:4;transform:translateX(-50%);margin:0;background:rgba(255,250,240,.95);border:1px solid #d8b48a;border-radius:17px;padding:9px 17px;max-width:330px;min-width:170px;text-align:center;font-size:13px;line-height:1.6;box-shadow:0 4px 14px #8a593014;pointer-events:none}.cici-home-speech:after{content:'';position:absolute;bottom:-6px;left:50%;width:10px;height:10px;background:rgb(255 250 240);transform:rotate(45deg);border-right:1px solid #d8b48a;border-bottom:1px solid #d8b48a}.cici-cat-touch{position:absolute;z-index:3;transform:translateX(-50%);border-radius:48%!important;touch-action:manipulation}.cici-cat-touch:hover{background:#fff8e508}.cici-hotspot{position:absolute;z-index:4;transform:translateX(-50%);width:12%;height:18%;bottom:8%;border-radius:40%!important}.cici-hotspot span{position:absolute;left:50%;bottom:95%;transform:translateX(-50%);white-space:nowrap;font-size:12px;padding:4px 10px;border-radius:12px;background:#fff8ebdd;border:1px solid #d2ad82;opacity:0;transition:opacity .2s,translate .2s;translate:0 4px}.cici-hotspot:hover span,.cici-hotspot:focus-visible span{opacity:1;translate:0 0}.cici-food{left:24.5%}.cici-water{left:13%;bottom:10%}.cici-ball{left:68%;width:8%;height:12%}.cici-bed{left:54%;width:26%;bottom:4%;height:9%;z-index:2}.cici-scene-note{position:absolute;bottom:13px;left:30px;font-size:11px;letter-spacing:.06em;color:#805e42;background:#fff3dfb0;padding:5px 10px;border-radius:20px;z-index:3}.cici-interactions{position:relative;z-index:6;max-width:1050px;padding:0 30px 22px;margin:-8px auto 0;text-align:center}.cici-home-controls{display:flex;justify-content:center;gap:4px;width:max-content;max-width:100%;padding:7px;background:#fff9ee;border:1px solid #d7b38c;border-radius:50px;margin:0 auto 14px;box-shadow:0 6px 20px #95603717}.cici-home-controls button{display:flex;align-items:center;justify-content:center;gap:10px;padding:11px 24px;border-radius:30px;font-weight:650;font-size:16px;transition:background .2s,color .2s,transform .2s}.cici-home-controls button:hover{background:#f3e4d0}.cici-home-controls button[aria-selected=true]{background:#b45d24;color:#fff9ed;box-shadow:inset 0 0 0 1px #a9511b}.cici-home-controls button:active{transform:scale(.96)}.cici-panels{min-height:92px}.cici-action-list{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;padding:7px 0}.cici-action-list>button,.cici-room-options>button{display:flex;align-items:center;gap:11px;border-radius:16px;padding:11px 15px;min-height:65px;text-align:left;transition:background .2s,transform .2s}.cici-action-list>button:hover,.cici-room-options>button:hover{background:#f1e5d2;transform:translateY(-2px)}.cici-action-list>button>svg{color:#8c774c}.cici-action-list button span{font-size:14px;font-weight:650}.cici-action-list small,.cici-room-options small{display:block;font-size:11px;line-height:1.6;font-weight:400;color:#8b7461;margin-top:3px}.cici-home-hint{font-size:12px;color:#876e56;margin:13px 0 7px}.cici-save-note{font-size:10px;color:#9c8873;margin:0}.cici-panel-caption{font-size:14px;margin:13px 0 12px;text-align:left}.cici-panel-caption>span{font-size:11px;color:#8c7761;margin-left:14px}.cici-expression-list{display:grid;grid-template-columns:repeat(12,1fr);gap:5px}.cici-expression-list button{border-radius:13px;padding:6px 3px 10px;font-size:11px;transition:background .2s,transform .2s}.cici-expression-list button:hover{transform:translateY(-4px);background:#f3e7d4}.cici-expression-list button.is-selected{background:#ead9c1}.cici-expression-list [data-face-preview]{display:block;width:58px;height:56px;margin:0 auto 4px;background-repeat:no-repeat;background-size:contain;background-position:center;filter:drop-shadow(0 2px 2px #66432922)}.cici-outfits{display:flex;justify-content:center;gap:12px}.cici-outfits button{display:flex;gap:8px;align-items:center;padding:8px 12px;border:1px solid transparent;border-radius:13px;font-size:12px;text-align:left}.cici-outfits button[aria-pressed=true]{border-color:#b69b73;background:#f2e6d3}.cici-outfits button[aria-disabled=true]{opacity:.6}.cici-outfits small{display:block;font-size:10px;color:#947d65;margin-top:5px}.cici-outfits [data-item-preview]{display:block;width:56px;height:59px;background-size:contain;background-position:center;background-repeat:no-repeat}.cici-room-options{display:flex;gap:25px;align-items:center;justify-content:center;text-align:left}.cici-room-options p{font-size:12px;color:#90765c;margin:7px 0}.cici-room-options div>button{display:inline-flex;gap:6px;align-items:center;font-size:12px;border-radius:20px;padding:7px 10px}.cici-room-options button[aria-pressed=true]{background:#e9ddc8}.cici-room-options i{width:12px;height:12px;border-radius:50%;background:var(--swatch);display:inline-block}.cici-diary{list-style:none;padding:0;margin:0;max-height:220px;overflow:auto;text-align:left}.cici-diary li{display:flex;gap:24px;padding:11px 4px;font-size:13px;border-bottom:1px dashed #deccb3}.cici-diary time{color:#9b8169;font-size:11px;min-width:100px;line-height:1.8}.cici-minigame{position:absolute;right:22px;top:32%;z-index:5;max-width:230px;text-align:center;padding:15px;background:#fff7e9f2;border:1px solid #cfaf85;border-radius:20px;box-shadow:0 7px 24px #5e3a1c16}.cici-minigame p{font-size:12px;line-height:1.7;margin:0 0 10px}.cici-minigame>[data-room-game-catch]{background:#ad602d;color:#fff8eb;border-radius:25px;padding:10px 25px;min-height:42px}.cici-game-exit{display:block;font-size:11px!important;margin:10px auto 0;opacity:.75}.cici-minigame [data-room-boxes]{display:flex;gap:7px}.cici-minigame [data-room-box]{display:flex;flex-direction:column;align-items:center;gap:5px;border-radius:12px;padding:6px;font-size:11px}.cici-minigame [data-room-box]:hover{background:#e5d4b9}.cici-minigame .is-found{background:#dce5c7}.cici-loading{min-height:70vh;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;text-align:center}.cici-loading-paw{color:#b97843;animation:cici-load-breathe 2s ease-in-out infinite}.cici-loading h2{font-size:25px;font-weight:600;margin:0}.cici-loading p{font-size:13px;color:#8a725d;margin:0}.cici-loading progress{appearance:none;width:min(280px,70vw);height:9px;border:0;border-radius:10px;overflow:hidden;background:#e8d9c2}.cici-loading progress::-webkit-progress-bar{background:#e8d9c2}.cici-loading progress::-webkit-progress-value{background:#9ba472;border-radius:10px;transition:width .3s}.cici-loading progress::-moz-progress-bar{background:#9ba472}.cici-loading>[data-room-load-count]{font-size:11px;color:#8b765f}.cici-loading button{border:1px solid #bd9971;border-radius:24px;padding:10px 26px}.cici-loading a{font-size:12px;color:#90765a;text-decoration:underline;text-underline-offset:4px}.cici-home[data-light=night] .cici-room-art{filter:brightness(.56) saturate(.65)}.cici-home[data-light=night] .cici-light{background:radial-gradient(ellipse at 55% 55%,#ffd18940,transparent 75%),linear-gradient(#2a273560,#322a4320)}.cici-home[data-light=night] .cici-home-heading,.cici-home[data-light=night] .cici-bond{color:#f7e5c6}.cici-home[data-light=night] .cici-home-heading h1{text-shadow:0 2px 20px #eaba6f44}.cici-home[data-light=night] .cici-bond small{color:#e3cdb0}@keyframes cici-load-breathe{50%{transform:translateY(-5px) scale(1.06)}}
@media(min-width:1450px){.cici-home-header{padding-left:50px;padding-right:50px}.cici-habitat{aspect-ratio:2.08}}
@media(max-width:1050px){.cici-home-header{gap:16px;padding:16px 20px}.cici-home-brand{font-size:20px;padding-left:15px}.cici-home-vitals{gap:12px}.cici-home-vitals label{width:68px}.cici-home-controls button{padding:10px 19px}.cici-action-list>button{padding:10px}.cici-expression-list{grid-template-columns:repeat(6,1fr)}.cici-expression-list [data-face-preview]{width:65px;height:62px}.cici-room-options{gap:12px;flex-wrap:wrap}.cici-outfits{gap:3px}.cici-outfits button{padding:6px}.cici-outfits [data-item-preview]{width:40px}}
@media(max-width:700px){.cici-home-header{flex-wrap:wrap;gap:10px;padding:12px 16px}.cici-home-header>a{font-size:12px}.cici-home-header>a span{display:none}.cici-home-brand{font-size:18px;flex:1;border:0;padding:0;gap:8px}.cici-home-brand>svg{width:22px}.cici-sound{width:32px;height:32px}.cici-home-vitals{order:5;width:100%;margin:3px 0 0;justify-content:space-between;gap:15px}.cici-home-vitals label{width:23%;font-size:11px;row-gap:4px}.cici-habitat{aspect-ratio:1;min-height:420px;max-height:560px}.cici-room-art{object-fit:cover;object-position:51% 65%}.cici-home-heading{top:22px;width:94%}.cici-home-heading h1{font-size:35px;margin:5px 0 10px}.cici-eyebrow{font-size:10px}.cici-home-heading p{font-size:12px}.cici-bond{top:auto;bottom:12px;left:14px;font-size:10px;gap:2px}.cici-bond small{font-size:9px}.cici-scene-note{left:auto;right:10px;bottom:12px;font-size:9px;max-width:180px}.cici-home-speech{padding:7px 12px;font-size:11px;min-width:145px;max-width:220px}.cici-interactions{padding:0 12px 20px;margin:-3px auto 0}.cici-home-controls{padding:5px;gap:0;width:100%;justify-content:space-evenly;margin-bottom:8px}.cici-home-controls button{flex-direction:column;gap:3px;padding:9px 12px;font-size:11px;border-radius:23px;min-width:45px}.cici-home-controls button svg{width:21px;height:21px}.cici-action-list{gap:3px;display:grid;grid-template-columns:repeat(3,1fr);padding:5px 0}.cici-action-list>button{justify-content:center;padding:8px 4px;gap:7px;min-height:58px}.cici-action-list>button>svg{width:21px}.cici-action-list button span{font-size:12px}.cici-action-list small{font-size:10px}.cici-home-hint{font-size:10px;line-height:1.8;margin:7px 0}.cici-save-note{font-size:9px;line-height:1.8}.cici-panel-caption{font-size:12px;margin:12px 0 8px}.cici-panel-caption>span{display:block;font-size:10px;margin:4px 0}.cici-expression-list{gap:2px}.cici-expression-list button{font-size:10px;padding:4px 1px 8px}.cici-expression-list [data-face-preview]{width:48px;height:47px}.cici-outfits{flex-wrap:wrap;gap:6px}.cici-outfits button{width:calc(33% - 5px);flex-direction:column;text-align:center;font-size:11px;padding:8px 3px;gap:3px}.cici-outfits [data-item-preview]{width:58px;height:53px}.cici-outfits small{font-size:9px}.cici-room-options{gap:14px;justify-content:flex-start;padding:0 8px}.cici-room-options div>button{font-size:11px;padding:8px}.cici-room-options>button{font-size:12px;padding:4px}.cici-minigame{top:40%;right:9px;max-width:140px;padding:10px;border-radius:15px}.cici-minigame p{font-size:10px}.cici-minigame>[data-room-game-catch]{font-size:12px;padding:9px 17px}.cici-minigame [data-room-box] svg{width:27px}.cici-minigame [data-room-box]{font-size:9px;padding:2px}.cici-minigame [data-room-boxes]{gap:5px}.cici-diary li{font-size:11px;gap:12px}.cici-diary time{font-size:10px;min-width:80px}.cici-hotspot{width:20%}.cici-ball{width:15%}}
@media(prefers-reduced-motion:reduce){.cici-home *, .cici-home *:before,.cici-home *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Keep the warm room independent of the course dark theme. */
.page-cici .cici-home{background:rgb(252 244 231);color:#60422e;min-height:100svh}.page-cici .cici-interactions{background:rgb(252 244 231)}.cici-habitat{height:clamp(440px,calc(100svh - 270px),660px);aspect-ratio:auto}.cici-home-speech:after{background:rgb(255 250 240)!important;border-color:#d8b48a!important}.cici-home-speech:before{display:none!important}@media(max-width:700px){.cici-habitat{height:430px;min-height:430px;aspect-ratio:auto}.cici-home-speech{max-width:155px;min-width:120px}}

.cici-home-heading{top:18px}.cici-home-heading h1{font-size:clamp(32px,3.5vw,44px);margin:4px 0 8px}.cici-home-heading p{font-size:13px}.cici-home-speech:after{background:rgb(255 250 240)!important;box-shadow:none!important}@media(max-width:700px){.cici-home-heading{top:20px}.cici-home-heading h1{font-size:35px}.cici-home-heading p{font-size:11px}}

@media(max-width:700px){.cici-home-speech{width:max-content;max-width:270px;min-width:0;font-size:10px;padding:7px 13px}.cici-home-heading{top:17px}.cici-home-heading h1{margin-bottom:5px}}

.cici-minigame>[data-room-game-catch].is-near{background:#78854e;box-shadow:0 0 0 4px #9ba97126}.cici-minigame [data-item-preview]{display:block;width:50px;height:44px;background-size:contain;background-position:center;background-repeat:no-repeat}@media(max-width:700px){.cici-minigame [data-item-preview]{width:31px;height:30px}}

/* Keep play controls out of the animation stage, including on narrow screens. */
.cici-minigame{position:relative;inset:auto;display:flex;align-items:center;justify-content:center;gap:16px;width:max-content;max-width:100%;margin:2px auto 12px;padding:10px 16px;border:0;border-radius:12px;background:rgb(255 248 235);box-shadow:none}
.cici-minigame p{margin:0;max-width:270px;text-align:left}.cici-game-exit{margin:0!important;min-height:44px}.cici-minigame>[data-room-game-catch]{min-height:44px;white-space:nowrap}
@media(max-width:700px){.cici-minigame{inset:auto;width:100%;max-width:none;gap:9px;padding:8px 10px;flex-wrap:wrap}.cici-minigame p{font-size:11px;flex:1;max-width:185px}.cici-minigame .cici-game-exit{font-size:11px!important;padding:3px 6px}.cici-minigame [data-room-box]{min-width:48px;min-height:44px}.cici-minigame>[data-room-game-catch]{padding:10px 14px}}

/* Daily companionship stays below the stage, leaving cici's silhouette clear. */
.cici-home ::selection{background:#d8bd92;color:#493021}.cici-home button{touch-action:manipulation}
.cici-home-heading .cici-need-action{pointer-events:auto;display:inline-flex;align-items:center;min-height:36px;margin:6px 0 0;padding:6px 17px;border-radius:22px;background:rgb(255 248 235);color:#794721;font-size:13px;box-shadow:0 3px 9px #6b412311}
.cici-daily{display:flex;justify-content:space-between;align-items:center;gap:20px;width:min(840px,100%);margin:20px auto 14px;padding:0 8px;text-align:left}
.cici-daily>div:first-child{display:grid;gap:6px;max-width:245px}.cici-daily strong{font-size:16px;font-weight:650}.cici-daily>div>small{font-size:12px;color:#80674e;line-height:1.6}
.cici-daily-tasks{display:flex;gap:8px;flex:1;justify-content:flex-end}.cici-daily-tasks button{display:flex;align-items:center;gap:9px;padding:9px 12px;border-radius:12px;min-height:56px;text-align:left;transition:background .18s,color .18s}.cici-daily-tasks button:hover{background:#eedfc9}.cici-daily-tasks button>svg{color:#9a744a;flex-shrink:0}.cici-daily-tasks button span{font-size:13px;white-space:nowrap}.cici-daily-tasks small{display:block;font-size:11px;color:#876d50;margin-top:3px}.cici-daily-tasks .is-complete{color:#606d43}.cici-daily-tasks .is-complete small{color:#606d43}.cici-task-check{display:none}.is-complete .cici-task-check{display:inline-flex}
.cici-first-hello{max-width:580px;margin:14px auto;line-height:1.8;font-size:14px;color:#806046}.cici-activity{font-size:13px;color:#806046;margin:6px auto;min-height:20px}.cici-asset-note{font-size:11px;color:#80674e;margin:9px 0 5px}
.cici-home button:disabled{opacity:.6}.cici-action-list button span{font-size:15px}.cici-action-list small{font-size:12px}.cici-home-controls button{min-height:48px}.cici-expression-list button{min-height:66px}
@media(max-width:700px){.cici-home-heading .cici-need-action{margin-top:5px;min-height:32px;font-size:12px;padding:5px 14px}.cici-home-vitals label{font-size:12px}.cici-home-controls button{font-size:12px;padding-inline:10px;min-height:54px}.cici-action-list button span{font-size:14px}.cici-action-list small{font-size:11px}.cici-daily{display:block;margin:18px auto 8px;padding:0 2px}.cici-daily>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:10px;max-width:none;margin:0 6px 8px}.cici-daily strong{font-size:14px;white-space:nowrap}.cici-daily>div>small{font-size:11px;max-width:190px;text-align:right}.cici-daily-tasks{display:grid;grid-template-columns:repeat(3,1fr);gap:3px}.cici-daily-tasks button{padding:8px 5px;gap:5px;min-width:0}.cici-daily-tasks button span{font-size:12px}.cici-daily-tasks button>svg{width:16px}.cici-daily-tasks small{font-size:10px}.cici-task-check svg{width:12px}.cici-first-hello{font-size:13px;padding-inline:7px}.cici-expression-list button{font-size:12px}.cici-minigame{font-size:13px}.cici-save-note{font-size:11px}.cici-home-hint{font-size:12px}}
@media(prefers-reduced-motion:reduce){.cici-home *{scroll-behavior:auto!important;transition:none!important}.cici-loading-paw{animation:none}}

.cici-home[data-light=night] .cici-renderer{filter:brightness(.78) saturate(.85)}

/* Keep the room's framing close to the original wide illustration. */
@media(min-width:701px){.cici-habitat{height:clamp(440px,49vw,660px)}}
.cici-home[data-playing=true] .cici-home-heading p,.cici-home[data-playing=true] .cici-need-action{visibility:hidden}
/* Keep the pointer on the complete cat while it is being carried. */
.cici-cat-touch{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-user-drag:none}
.cici-home[data-drag-state="held"] .cici-cat-touch,.cici-home[data-drag-state="landing"] .cici-cat-touch{cursor:grabbing;z-index:6;background:transparent}
.cici-home[data-sleeping="true"] .cici-cat-touch{cursor:pointer}

/* 本站产业报：宋体铅字、非对称头版、黑白资料照片与横竖栏线。 */
.home-industry{padding:96px 0 104px;border-top:1px solid var(--line);}
.industry-paper{--news-ink:var(--lesson-color-382e25,#382e25);--news-rule:var(--lesson-color-91806b,#91806b);background:var(--lesson-color-f3ecd9,#f3ecd9);color:var(--news-ink);padding:31px 38px 18px;font-family:'Noto Serif SC',serif;border-top:5px double var(--news-ink);border-bottom:3px double var(--news-ink);}
.industry-masthead-main{display:flex;justify-content:center;align-items:center;gap:24px;padding:5px 0 25px;}
.industry-masthead-main>p{font-family:'Noto Serif SC',serif;font-weight:700;font-size:clamp(58px,6.7vw,88px);line-height:1.4;letter-spacing:.06em;margin:0;}
.industry-masthead-main>span{font-size:18px;line-height:1.4;letter-spacing:.12em;color:var(--lesson-color-8c4030,#8c4030);border:1px solid currentColor;padding:7px 6px 8px;font-weight:700;transform:rotate(-5deg);}
.industry-edition{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:10px 0;border-block:1px solid var(--news-ink);font-size:13px;line-height:1.8;}
.industry-edition>strong{font-size:17px;font-weight:700;}.industry-edition>span{white-space:nowrap;}
.industry-frontpage{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:30px;padding:28px 0;border-bottom:3px double var(--news-ink);}
.industry-story{min-width:0;}
.industry-story h3{font-family:'Noto Serif SC',serif;font-size:26px;font-weight:700;line-height:1.65;letter-spacing:0;margin:0 0 10px;text-wrap:pretty;color:var(--news-ink);}
.industry-story.industry-lead h3{font-size:36px;line-height:1.65;}
.industry-byline{display:flex;gap:7px 12px;align-items:baseline;flex-wrap:wrap;font-size:15px;line-height:1.8;margin:0 0 18px;}.industry-byline>strong{font-weight:700;}.industry-byline>span{color:var(--lesson-color-665845,#665845);}
.industry-photo{margin:16px 0 19px;}.industry-photo>img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;filter:grayscale(1) sepia(.18);}
.industry-photo>figcaption{font-family:'Noto Serif SC',serif;font-size:12px;line-height:1.8;margin-top:7px;color:var(--lesson-color-665845,#665845);}.industry-photo>figcaption>span{display:block;}.industry-photo a{text-underline-offset:3px;}
.industry-number{display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 8px;margin:0;}
.industry-number>strong{font-family:'Noto Serif SC',serif;font-size:32px;font-weight:700;line-height:1.5;font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:-.02em;}
.industry-number>span{font-size:17px;line-height:1.7;white-space:nowrap;}
.industry-metric{font-size:13px;line-height:1.8;color:var(--lesson-color-665845,#665845);margin:3px 0 13px;}
.industry-summary{font-size:18px;line-height:1.95;margin:0 0 18px;text-align:justify;text-indent:2em;overflow-wrap:anywhere;}
.industry-story footer{display:flex;justify-content:space-between;gap:7px 14px;flex-wrap:wrap;font-size:13px;line-height:1.8;color:var(--lesson-color-665845,#665845);}
.industry-story time{font-variant-numeric:tabular-nums;}.industry-story footer a{display:inline-flex;align-items:center;gap:3px;text-decoration:underline;text-underline-offset:4px;text-decoration-color:var(--news-rule);}
.industry-story a:hover,.industry-photo a:hover{color:var(--accent);}
.industry-sidebar{border-left:1px solid var(--news-rule);padding-left:28px;display:flex;flex-direction:column;justify-content:space-between;gap:24px;}
.industry-side-story+article{border-top:1px solid var(--news-rule);padding-top:23px;}
.industry-side-story h3{font-size:25px;}.industry-side-story .industry-summary{font-size:17px;}
.industry-digest-heading{display:flex;justify-content:space-between;gap:15px;align-items:baseline;padding:15px 0;border-bottom:1px solid var(--news-rule);}
.industry-digest-heading>strong{font-size:22px;font-weight:700;letter-spacing:.12em;}.industry-digest-heading>span{font-size:14px;color:var(--lesson-color-665845,#665845);}
.industry-digest{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:24px 0 25px;border-bottom:1px solid var(--news-rule);}
.industry-brief{padding:0 23px;}.industry-brief:first-child{padding-left:0;}.industry-brief:last-child{padding-right:0;}.industry-brief+.industry-brief{border-left:1px solid var(--news-rule);}
.industry-brief h3{font-size:24px;}.industry-brief .industry-summary{font-size:17px;}.industry-brief .industry-number>strong{font-size:30px;}
.industry-editorial{display:flex;align-items:center;justify-content:center;gap:14px;padding:24px 0;}
.industry-editorial>span{color:var(--lesson-color-8c4030,#8c4030);}.industry-editorial p{font-size:18px;line-height:1.9;margin:0;}.industry-editorial strong{display:block;font-size:23px;font-weight:700;}
.industry-sources{border-top:1px solid var(--news-rule);padding:13px 0;font-size:15px;line-height:1.95;color:var(--lesson-color-665845,#665845);}
.industry-sources>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;color:var(--news-ink);font-weight:700;}.industry-sources>summary::-webkit-details-marker{display:none;}.industry-sources[open]>summary>svg{transform:rotate(180deg);}
.industry-sources>p{margin:18px 0 0;max-width:72ch;}.industry-sources dl{margin:20px 0;display:grid;gap:15px;}.industry-sources dl>div{display:grid;grid-template-columns:170px minmax(0,1fr);gap:22px;}.industry-sources dt{font-weight:700;color:var(--news-ink);}.industry-sources dd{margin:0;max-width:72ch;}
.industry-folio{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:12px;line-height:1.8;border-top:1px solid var(--news-ink);padding-top:10px;}
@media(max-width:1000px) and (min-width:701px){.industry-paper{padding-inline:24px;}.industry-frontpage{gap:22px;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);}.industry-sidebar{padding-left:20px;}.industry-story.industry-lead h3{font-size:30px;}.industry-side-story h3{font-size:23px;}.industry-number>strong{font-size:29px;}.industry-brief{padding-inline:17px;}.industry-brief h3{font-size:22px;}.industry-edition>strong{display:none;}}
@media(max-width:700px){.home-industry{padding:64px 0 70px;}.industry-paper{padding:18px 18px 13px;}.industry-masthead-main{gap:13px;padding:6px 0 20px;}.industry-masthead-main>p{font-size:47px;letter-spacing:.015em;}.industry-masthead-main>span{font-size:13px;padding:5px 4px;}.industry-edition{gap:7px;flex-wrap:wrap;font-size:12px;justify-content:space-between;}.industry-edition>strong{display:none;}.industry-frontpage{grid-template-columns:1fr;gap:23px;padding:23px 0;}.industry-story.industry-lead h3{font-size:28px;}.industry-sidebar{border-left:0;border-top:1px solid var(--news-rule);padding:23px 0 0;}.industry-story h3,.industry-side-story h3{font-size:24px;}.industry-summary,.industry-side-story .industry-summary,.industry-brief .industry-summary{font-size:17px;}.industry-byline{font-size:14px;}.industry-number>strong{font-size:30px;}.industry-number>span{font-size:15px;}.industry-metric{font-size:13px;}.industry-photo>figcaption{font-size:12px;}.industry-digest{grid-template-columns:1fr;gap:23px;padding:23px 0;}.industry-brief,.industry-brief:first-child,.industry-brief:last-child{padding:0;}.industry-brief+.industry-brief{border-left:0;border-top:1px solid var(--news-rule);padding-top:23px;}.industry-digest-heading{gap:8px;}.industry-digest-heading>strong{font-size:20px;}.industry-digest-heading>span{font-size:12px;}.industry-editorial{justify-content:flex-start;gap:9px;padding:22px 0;}.industry-editorial p{font-size:16px;}.industry-editorial strong{font-size:18px;}.industry-sources{font-size:14px;}.industry-sources dl>div{grid-template-columns:1fr;gap:3px;}.industry-folio{font-size:12px;}.industry-folio>span:last-child{display:none;}}
@media(prefers-reduced-motion:no-preference){.industry-story footer a>svg{transition:transform .2s cubic-bezier(.16,1,.3,1);}.industry-story footer a:hover>svg{transform:translate(2px,-2px);}}

/* 公司名先于标题出现；头版围绕与课程相关的国产大模型展开。 */
.industry-story h3{font-family:'Noto Serif SC',serif;font-size:29px;font-weight:700;line-height:1.45;overflow-wrap:anywhere;margin:0 0 12px;}
.industry-story h4{font-family:'Noto Serif SC',serif;font-size:24px;font-weight:700;line-height:1.7;letter-spacing:0;margin:0 0 12px;color:var(--news-ink);text-wrap:pretty;}
.industry-story.industry-lead h3{font-size:48px;margin-bottom:18px;line-height:1.35;}
.industry-story.industry-lead h4{font-size:33px;line-height:1.65;margin-bottom:15px;}
.industry-lead .industry-number{padding:22px 0 0;border-top:1px solid var(--news-rule);margin-top:24px;}.industry-lead .industry-number>strong{font-size:46px;}.industry-lead .industry-metric{font-size:15px;margin-bottom:23px;}.industry-lead .industry-summary{font-size:19px;}.industry-lead footer{padding-top:12px;}
.industry-brief h3{font-size:25px;}.industry-brief h4{font-size:23px;}.industry-brief .industry-photo{margin-top:15px;}.industry-brief .industry-photo>figcaption{font-size:12px;}
@media(max-width:1000px) and (min-width:701px){.industry-story.industry-lead h3{font-size:41px;}.industry-story.industry-lead h4{font-size:29px;}.industry-lead .industry-number>strong{font-size:36px;}.industry-story h3{font-size:26px;}.industry-story h4{font-size:23px;}.industry-brief h3{font-size:23px;}.industry-brief h4{font-size:21px;}}
@media(max-width:700px){.industry-story.industry-lead h3{font-size:37px;margin-bottom:13px;}.industry-story.industry-lead h4{font-size:26px;}.industry-lead .industry-number{padding-top:17px;margin-top:20px;}.industry-lead .industry-number>strong{font-size:31px;}.industry-lead .industry-summary{font-size:18px;}.industry-story h3,.industry-brief h3{font-size:26px;}.industry-story h4,.industry-brief h4{font-size:23px;}}
.home-industry>.home-section-heading>p>strong{display:block;font-family:var(--display);font-size:22px;font-weight:700;color:var(--accent);}.home-industry>.home-section-heading>p>span{display:block;margin-top:8px;}
@media(max-width:700px){.home-industry>.home-section-heading>p>strong{font-size:19px;}}

/* 朱红批注把 Qwen 专题与课程终章连接起来，保留黑色铅字的新闻层级。 */
.industry-qwen{--editor-red:var(--lesson-color-a12e28,#a12e28);display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:42px;padding:29px 0 30px;border-bottom:1px solid var(--news-rule);align-items:center;}
.industry-qwen h3{color:var(--editor-red);font-size:31px;}.industry-qwen h4{font-size:28px;}.industry-qwen-mark{color:var(--editor-red);background:none;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:7px;font-weight:700;}
.industry-course-note{color:var(--editor-red);border-block:2px solid currentColor;padding:21px 0;transform:rotate(-.6deg);font-family:var(--display);}
.industry-course-note h5{font-family:var(--display);font-size:27px;font-weight:700;line-height:1.65;letter-spacing:0;margin:0 0 15px;color:inherit;}
.industry-course-note p{font-size:19px;line-height:1.9;margin:0 0 13px;}.industry-course-note .industry-course-scope{font-size:15px;}.industry-course-note>a{display:inline-flex;align-items:center;gap:8px;font-size:18px;font-weight:700;text-decoration:underline;text-underline-offset:5px;}.industry-course-note>span{display:block;font-size:13px;line-height:1.8;margin-top:12px;}
@media(max-width:1000px) and (min-width:701px){.industry-qwen{gap:25px;}.industry-course-note h5{font-size:25px;}.industry-qwen h4{font-size:25px;}.industry-course-note p{font-size:18px;}}
@media(max-width:700px){.industry-digest-heading{flex-wrap:wrap;}.industry-qwen{grid-template-columns:1fr;gap:24px;padding:25px 0;}.industry-qwen h3{font-size:29px;}.industry-qwen h4{font-size:25px;}.industry-course-note{transform:none;padding-block:18px;}.industry-course-note h5{font-size:24px;}.industry-course-note p{font-size:18px;}.industry-course-note .industry-course-scope{font-size:14px;}.industry-course-note>a{font-size:17px;}}

/* 报纸上的小号来源链接保持墨色，红色课程批注链接继承朱红，确保对比度。 */
.industry-paper a{color:inherit;}.industry-paper a:hover{color:var(--news-ink);}

.home-pricing{padding:96px 0 84px;border-top:1px solid var(--line);}
.home-pricing .home-section-heading>p{text-wrap:balance;}
.pricing-plans{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:stretch;}
.pricing-plan{display:flex;flex-direction:column;min-width:0;background:var(--lesson-color-fffaf1,#fffaf1);border:1px solid var(--lesson-color-d5b995,#d5b995);border-radius:16px;padding:30px 27px;scroll-margin-top:110px;}
.pricing-plan-full{background:var(--lesson-color-faebd2,#faebd2);border:2px solid var(--lesson-color-a95a24,#a95a24);padding:29px 26px;}
.pricing-plan h3{font-family:var(--display);font-size:27px;font-weight:700;line-height:1.55;margin:0 0 10px;text-wrap:balance;}
.pricing-plan header>p{font-size:17px;line-height:1.9;color:var(--ink-soft);margin:0;min-height:64px;}
.pricing-amount{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px;margin:25px 0 10px;color:var(--ink);font-variant-numeric:tabular-nums;}
.pricing-amount>strong{font-family:var(--display);font-size:64px;line-height:1.2;letter-spacing:-.035em;font-weight:700;}.pricing-amount>span:first-child{font-size:26px;}.pricing-amount>span:last-child{font-size:16px;color:var(--ink-soft);margin-left:5px;}
.pricing-range{font-size:16px;color:var(--ink-soft);line-height:1.8;margin:0 0 23px;padding-bottom:21px;border-bottom:1px solid var(--lesson-color-dcc5a8,#dcc5a8);}
.pricing-plan ul{display:grid;gap:13px;list-style:none;margin:0 0 28px;padding:0;}.pricing-plan li{display:flex;gap:10px;align-items:flex-start;font-size:18px;line-height:1.8;}.pricing-plan li svg{flex-shrink:0;margin-top:7px;color:var(--lesson-color-60753c,#60753c);}
.pricing-plan>.button{display:flex;justify-content:center;gap:10px;margin-top:auto;font-size:18px;line-height:1.7;}
.pricing-footnote{display:flex;align-items:flex-start;justify-content:space-between;gap:18px 30px;margin-top:25px;}.pricing-footnote>p{font-size:16px;line-height:1.9;color:var(--ink-soft);max-width:68ch;margin:0;}.pricing-footnote>a{display:inline-flex;align-items:center;gap:5px;font-size:17px;line-height:1.9;white-space:nowrap;text-underline-offset:5px;}
.pricing-standalone{border-top:0;padding:0 0 35px;}.pricing-standalone .home-section-heading{margin-bottom:40px;}.pricing-standalone .home-section-heading h2{font-size:32px;}.pricing-standalone .home-section-heading>p{font-size:18px;}.site-info-main:has(.pricing-standalone){max-width:1252px;}
@media(max-width:1000px){.pricing-plans{gap:16px;}.pricing-plan{padding:25px 20px;}.pricing-plan-full{padding:24px 19px;}.pricing-plan h3{font-size:24px;}.pricing-plan li{font-size:17px;}.pricing-amount>strong{font-size:57px;}}
@media(max-width:700px){.home-pricing{padding:64px 0;}.pricing-plans{grid-template-columns:1fr;gap:20px;}.pricing-plan{padding:27px 24px;}.pricing-plan-full{padding:26px 23px;}.pricing-plan header>p{min-height:0;font-size:18px;}.pricing-plan h3{font-size:26px;}.pricing-amount>strong{font-size:60px;}.pricing-plan li{font-size:18px;}.pricing-footnote{flex-direction:column;gap:12px;}.pricing-footnote>p{font-size:15px;}.pricing-standalone{padding-top:0;}.pricing-standalone .home-section-heading h2{font-size:28px;}}
.pricing-policy-notice{display:flex;align-items:flex-start;gap:13px;padding:20px 24px;margin:0 0 45px;border:1px solid var(--lesson-color-c8a175,#c8a175);border-radius:12px;background:var(--lesson-color-faebd2,#faebd2);color:var(--ink);}.pricing-policy-notice>svg{flex-shrink:0;margin-top:6px;color:var(--lesson-color-854b23,#854b23);}.pricing-policy-notice>p{font-size:17px;line-height:1.95;margin:0;}.pricing-policy-notice strong{display:block;font-family:var(--display);font-weight:700;font-size:20px;margin-bottom:4px;}.site-info-content>#refund-policy{scroll-margin-top:110px;}
@media(max-width:600px){.pricing-policy-notice{padding:18px 17px;gap:10px;margin-bottom:32px;}.pricing-policy-notice>p{font-size:16px;}.pricing-policy-notice strong{font-size:19px;}}
.pricing-free-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:23px 0;margin-bottom:28px;border-block:1px solid var(--line);}.pricing-free-intro strong{font-family:var(--display);font-size:23px;font-weight:700;line-height:1.7;}.pricing-free-intro p{font-size:17px;line-height:1.9;color:var(--ink-soft);margin:7px 0 0;}.pricing-free-intro>.button{flex-shrink:0;font-size:17px;}
@media(max-width:700px){.pricing-free-intro{align-items:flex-start;flex-direction:column;gap:18px;padding-block:20px;}.pricing-free-intro strong{font-size:21px;}.pricing-free-intro p{font-size:16px;}}
.pricing-free-intro strong{display:block;text-wrap:balance;}.pricing-plan header>p{text-wrap:balance;}
.pricing-free-start{display:grid;grid-template-columns:1.05fr 1fr;gap:48px;background:var(--accent-soft);border-radius:16px;padding:44px 42px;margin-bottom:64px;}
.pricing-free-label{display:inline-flex;align-items:center;gap:8px;color:var(--lesson-color-4f612f,#4f612f);font-size:17px;line-height:1.7;font-weight:700;}
.pricing-free-copy h3{font-family:var(--display);font-size:clamp(28px,3vw,36px);line-height:1.55;margin:18px 0 14px;font-weight:700;text-wrap:balance;}
.pricing-free-copy>p{font-size:18px;line-height:1.9;margin:0;color:var(--ink-soft);max-width:36ch;}
.pricing-free-actions{display:flex;align-items:center;flex-wrap:wrap;gap:18px 24px;margin-top:26px;}
.pricing-free-actions>.button{font-size:18px;min-height:52px;}
.pricing-free-catalog{display:inline-flex;align-items:center;gap:5px;font-size:17px;line-height:1.8;text-underline-offset:5px;}
.pricing-free-copy>p.pricing-free-assurance{font-size:15px;margin-top:18px;}
.pricing-free-path{align-self:center;min-width:0;}
.pricing-free-path h4{font-size:19px;line-height:1.7;margin:0 0 10px;font-weight:700;}
.pricing-free-path ol{list-style:none;margin:0;padding:0;}
.pricing-free-path li+li{border-top:1px solid var(--lesson-color-d8b58c,#d8b58c);}
.pricing-free-path li>a{display:flex;align-items:center;gap:14px;padding:19px 0;text-decoration:none;border-radius:4px;}
.pricing-free-check{color:var(--lesson-color-4f612f,#4f612f);display:flex;flex-shrink:0;}
.pricing-free-path li>a>span:nth-child(2){flex:1;min-width:0;}
.pricing-free-path strong{display:block;font-size:20px;line-height:1.6;margin-bottom:5px;}
.pricing-free-path strong+span{display:block;font-size:16px;line-height:1.8;color:var(--ink-soft);}
.pricing-free-path li>a>svg{flex-shrink:0;color:var(--accent);}
.pricing-free-path li>a:hover strong,.pricing-free-catalog:hover{color:var(--accent-hover);}
.pricing-free-start a:focus-visible{outline:3px solid var(--accent);outline-offset:5px;}
.pricing-upgrade-heading{margin-bottom:28px;}
.pricing-upgrade-heading h3{font-family:var(--display);font-size:28px;line-height:1.6;margin:0 0 10px;text-wrap:balance;}
.pricing-upgrade-heading p{font-size:18px;line-height:1.9;color:var(--ink-soft);margin:0;}
@media(max-width:1000px){.pricing-free-start{gap:30px;padding:32px;}.pricing-free-actions{gap:16px;}}
@media(max-width:700px){.pricing-free-start{grid-template-columns:1fr;gap:32px;padding:28px 22px;margin-bottom:44px;}.pricing-free-copy h3{font-size:28px;}.pricing-free-copy>p{font-size:17px;}.pricing-free-label{font-size:16px;}.pricing-free-actions{align-items:flex-start;flex-direction:column;gap:16px;}.pricing-free-actions>.button{width:100%;justify-content:center;}.pricing-free-path h4{font-size:18px;}.pricing-free-path strong{font-size:18px;}.pricing-free-path strong+span{font-size:15px;}.pricing-free-path li>a{gap:10px;padding:17px 0;}.pricing-upgrade-heading h3{font-size:24px;}.pricing-upgrade-heading p{font-size:17px;}}

.course-price{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 12px;font-variant-numeric:tabular-nums;line-height:1.5}
.course-price-original{font-size:14px;color:var(--ink-soft);white-space:nowrap}
.course-price-original s{text-decoration-thickness:1.5px;text-decoration-color:currentColor}
.course-price-current{display:inline-flex;align-items:baseline;gap:6px;color:var(--accent);white-space:nowrap}
.course-price-current>span{font-size:14px}
.course-price-current strong{font-family:var(--display);font-size:30px;line-height:1.3;font-weight:700}
.course-price-saving{padding:3px 9px;font-size:14px;line-height:1.6;color:var(--lesson-color-7d3519,#7d3519);background:var(--lesson-color-f5dfbf,#f5dfbf);border-radius:6px;white-space:nowrap}
.course-price-large{column-gap:14px;row-gap:8px}
.course-price-large .course-price-original{flex-basis:100%;font-size:16px}
.course-price-large .course-price-current strong{font-size:56px;letter-spacing:-.02em}
.course-price-large .course-price-current>span{font-size:16px}
.course-price-compact{display:inline-flex;gap:6px 10px}
.course-price-compact .course-price-current strong{font-size:20px}
.course-price-compact .course-price-saving{display:none}
.pricing-amount{margin-bottom:8px}
.pricing-purchase-term{font-size:14px;color:var(--ink-soft);margin:0 0 20px}
.course-choice,.account-page .course-choice,.pricing-plan header>p.course-choice{display:inline-flex;align-items:center;gap:7px;min-height:0;padding:5px 10px;margin:10px 0 8px;background:var(--accent);color:var(--paper-raised);border-radius:6px;font-size:14px;line-height:1.7;font-weight:600}
.course-choice svg{width:18px;height:18px;flex:none}
.catalog-volume-price:has(.course-price),.catalog-access-note>a:has(.course-price){display:inline-flex;align-items:center;flex-wrap:wrap;gap:8px 14px;white-space:normal}
@media(max-width:600px){.course-price-large .course-price-current strong{font-size:48px}.course-price{gap:6px 10px}}

/* One shared hot-choice treatment for the home and membership surfaces. */
.course-choice,.account-page .course-choice,.pricing-plan header>p.course-choice{gap:10px;padding:8px 13px;background:var(--lesson-color-8f351b,#8f351b);color:var(--lesson-color-fffaf2,#fffaf2);font-size:16px;line-height:1.6;box-shadow:0 3px 7px rgba(92,42,17,.14)}
.course-choice svg.course-hot-flame{width:30px;height:36px;flex-shrink:0}
@media(max-width:600px){.course-choice,.account-page .course-choice,.pricing-plan header>p.course-choice{gap:8px;padding:7px 10px;font-size:14px}.course-choice svg.course-hot-flame{width:26px;height:32px}}

/* Small, anchored flicker; no layout movement or flashing. */
.course-hot-flame{overflow:visible;transform-origin:50% 92%;animation:course-flame-sway 1.8s ease-in-out infinite;animation-play-state:paused}
.course-hot-flame path:last-child{transform-box:fill-box;transform-origin:50% 100%;animation:course-flame-core 1.3s ease-in-out infinite;animation-play-state:paused}
.course-hot-flame[data-flame-active="true"],.course-hot-flame[data-flame-active="true"] path:last-child{animation-play-state:running}
@keyframes course-flame-sway{0%,100%{transform:rotate(-3deg) scale(.97,1)}35%{transform:rotate(2deg) scale(1.03,.96)}70%{transform:rotate(-1deg) scale(.98,1.05)}}
@keyframes course-flame-core{0%,100%{transform:scale(.96,.96);opacity:.9}50%{transform:scale(1.07,1.1);opacity:1}}
@media(prefers-reduced-motion:reduce){.course-hot-flame,.course-hot-flame path:last-child{animation:none;transform:none;opacity:1}}

/* Separate each course's scope and price into a readable subsection. */
.pricing-detail-list{margin-top:28px}
.pricing-detail-item{padding:30px 0;border-bottom:1px solid var(--line)}
.pricing-detail-item:first-child{padding-top:8px}
.pricing-detail-item:last-child{border-bottom:0;padding-bottom:8px}
.pricing-detail-item>header{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:12px 28px;margin-bottom:18px}
.pricing-detail-item h3{font-family:var(--display);font-size:24px;font-weight:700;line-height:1.5;margin:0}
.pricing-detail-item>div{max-width:68ch}
.site-info-content .pricing-detail-item p{font-size:18px;line-height:1.9;margin:8px 0}
@media(max-width:650px){.pricing-detail-item{padding:24px 0}.pricing-detail-item>header{align-items:flex-start;flex-direction:column;gap:10px;margin-bottom:16px}.pricing-detail-item h3{font-size:23px}.site-info-content .pricing-detail-item p{font-size:17px}}

/* 自查题直接排在纸面上，选项本身就是完整的点击区域。 */
.checkpoint { max-width: 900px; margin: 0 auto 44px; padding: 32px 0 0; border-top: 1px solid var(--line); }
.checkpoint fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.checkpoint legend { float: none; width: 100%; margin: 0; padding: 0; font-size: 23px; font-weight: 700; line-height: 1.75; color: var(--ink); text-wrap: pretty; }
.checkpoint-instruction { margin: 12px 0 20px; color: var(--ink-soft); font-size: 16px; line-height: 1.8; }
.checkpoint-options { display: grid; gap: 12px; }
.checkpoint-option { display: grid; grid-template-columns: 30px minmax(0,1fr) 20px; align-items: center; column-gap: 16px; row-gap: 8px; min-height: 64px; padding: 14px 20px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--ink); background: var(--paper-raised); font-size: 18px; line-height: 1.7; transition: border-color 120ms ease-out, background-color 120ms ease-out; }
.checkpoint-option:hover { border-color: var(--accent); }
.checkpoint-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.checkpoint-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 4px; }
.checkpoint-letter { grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-soft); font-size: 14px; font-weight: 700; line-height: 1; }
.checkpoint-option:has(input:checked) .checkpoint-letter { background: var(--accent); border-color: var(--accent); color: var(--paper-raised); }
.checkpoint-option-text { grid-column: 2; grid-row: 1; min-width: 0; overflow-wrap: anywhere; }
.checkpoint-option-state { grid-column: 2 / -1; grid-row: 2; font-size: 14px; font-weight: 700; }
.checkpoint-option-state:empty { display: none; }
.checkpoint-option input { grid-column: 3; grid-row: 1; width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--accent); }
.checkpoint-option input:focus-visible { outline: none; }
.checkpoint-option:has(input:checked)[data-verdict="correct"] { border-color: var(--operation-right, var(--lesson-color-4f7558,#4f7558)); background: var(--paper-raised); }
.checkpoint-option:has(input:checked)[data-verdict="correct"] .checkpoint-letter { background: var(--operation-right, var(--lesson-color-4f7558,#4f7558)); border-color: var(--operation-right, var(--lesson-color-4f7558,#4f7558)); }
.checkpoint-option:has(input:checked)[data-verdict="correct"] .checkpoint-option-state { color: var(--operation-right, var(--lesson-color-4f7558,#4f7558)); }
.checkpoint-option:has(input:checked)[data-verdict="correct"] input { accent-color: var(--operation-right, var(--lesson-color-4f7558,#4f7558)); }
.checkpoint-option:has(input:checked)[data-verdict="incorrect"] { border-color: var(--coral-label, var(--lesson-color-a94e2e,#a94e2e)); }
.checkpoint-option:has(input:checked)[data-verdict="incorrect"] .checkpoint-option-state { color: var(--coral-label, var(--lesson-color-a94e2e,#a94e2e)); }
.checkpoint-actions { display: flex; align-items: center; gap: 20px; margin: 20px 0 16px; }
.checkpoint-actions .button { flex: 0 0 auto; min-height: 44px; padding-inline: 24px; }
.checkpoint-actions .button-primary { background: var(--accent); color: var(--paper-raised); border-color: var(--accent); font-size: 18px; }
.checkpoint-actions .button-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.checkpoint-feedback { flex: 1; min-width: 0; margin: 0; font-size: 16px; line-height: 1.85; color: var(--ink-soft); overflow-wrap: anywhere; }
.checkpoint[data-check-locale="ko"] { word-break: keep-all; }
.checkpoint-feedback:empty { display: none; }
.checkpoint-feedback.is-correct { color: var(--operation-right, var(--lesson-color-4f7558,#4f7558)); }
.checkpoint-feedback.is-incorrect { color: var(--coral-label, var(--lesson-color-a94e2e,#a94e2e)); }
.checkpoint-reason summary { width: fit-content; cursor: pointer; font-size: 14px; color: var(--ink-soft); padding-block: 10px; min-height: 44px; text-underline-offset: 4px; }
.checkpoint-reason summary:hover { color: var(--accent); text-decoration: underline; }
.checkpoint-reason p { font-size: 18px; line-height: 1.85; margin: 12px 0 0; padding: 16px 0; border-top: 1px solid var(--line-soft); }
@media(max-width:600px) {
 .checkpoint { padding-top: 24px; margin-bottom: 32px; }
 .checkpoint legend { font-size: 21px; }
 .checkpoint-option { gap: 12px; padding: 14px; min-height: 64px; }
 .checkpoint-actions { flex-wrap: wrap; gap: 16px; }
 .checkpoint-feedback { flex-basis: 100%; }
 .checkpoint-option-state { font-size: 14px; }
 .checkpoint-reason p { font-size: 18px; }
}
@media(prefers-reduced-motion:reduce) { .checkpoint-option { transition: none; } }

/* 三张图片对应同一个输入与两种调度方式。配色来自图片像素数据。 */
.pixel-parallel { margin: 32px 0 40px; padding: 24px 0; border-block: 1px solid var(--line); }
.pixel-model-note { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.85; }
.pixel-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.pixel-controls .button { padding: 8px 16px; font-size: 18px; }
.pixel-controls > label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pixel-controls .ds-select { max-width: 100%; }
.pixel-setup { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.8; cursor: pointer; margin-bottom: 28px; }
.pixel-setup input { width: 20px; height: 20px; accent-color: var(--accent); flex: 0 0 auto; }
.pixel-images { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.pixel-images figure { margin: 0; min-width: 0; }
.pixel-images figcaption { margin: 0 0 12px; display: grid; gap: 4px; }
.pixel-images figcaption strong { font-size: 20px; }
.pixel-images figcaption span { font-size: 14px; color: var(--ink-soft); }
.pixel-image { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 8px; background: var(--paper-raised); }
.pixel-images output { display: block; margin-top: 12px; font-size: 14px; line-height: 1.8; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.pixel-round { font-size: 18px; color: var(--accent); margin: 28px 0 8px; font-variant-numeric: tabular-nums; }
.pixel-explain { margin: 0; font-size: 18px; line-height: 1.85; min-height: 4em; }
.pixel-rule { margin: 24px 0 16px; font-size: 18px; line-height: 1.85; }
.lesson-gallery { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.7fr); gap: 24px; margin: 28px 0 40px; }
.lesson-gallery-equal { grid-template-columns: repeat(2,minmax(0,1fr)); }
.lesson-gallery-three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.lesson-gallery > p:empty { display:none; }
.lesson-gallery-equal .lesson-photo img { height: 240px; background: var(--paper-raised); }
.lesson-photo { margin: 0; min-width: 0; }
.lesson-photo img { display: block; width: 100%; height: 300px; object-fit: contain; border-radius: 8px; background: #000; }
.lesson-photo-portrait img { object-fit: cover; }
.lesson-photo figcaption { margin-top: 14px; font-size: 14px; line-height: 1.85; color: var(--ink-soft); }
.guide-content .lesson-photo figcaption p { margin: 0 0 8px; font-size: inherit; line-height: inherit; }
.lesson-photo figcaption strong { display: block; color: var(--ink); font-size: 18px; }
@media(max-width:650px) {
 .lesson-gallery { grid-template-columns: minmax(0,1fr); gap: 28px; }
 .lesson-photo img { height: auto; aspect-ratio: 850 / 478; }
 .lesson-photo-portrait { width: min(100%,240px); justify-self: center; }
 .lesson-photo-portrait img { aspect-ratio: 1; }
 .pixel-images { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 16px; }
 .pixel-source { grid-column: 1 / -1; width:100%; display:grid; grid-template-columns:minmax(0,1fr) 100px; align-items:center; gap:16px; }
 .pixel-source figcaption { margin:0; }
 .pixel-controls { gap: 12px; }
 .pixel-controls > label { flex-wrap: wrap; }
 .pixel-images figcaption strong { font-size: 18px; }
 .pixel-images figcaption span,.pixel-images output { font-size: 14px; }
 .pixel-explain { min-height: 0; }
}

/* 静态网络图保留原始纵横比，按阅读宽度居中。 */
.lesson-photo.lesson-photo-diagram{width:min(100%,440px);margin:28px auto;}
.lesson-photo.lesson-photo-diagram img{height:auto;aspect-ratio:auto;object-fit:contain;background:transparent;border-radius:0;}

/* 上册回顾的训练回路留出独立通道；窄屏仍按容器缩放。 */
#recap .lesson-photo-diagram { width:min(100%,560px); }

/* 仅加宽多头计算图；窄屏在图内横向查看，保持文字可读。 */
#multi-head-flow .lesson-photo-diagram { width:min(100%,800px); }
#multi-head-flow .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
#multi-head-flow .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
#multi-head-flow .lesson-photo-scroll img { min-width:680px; max-width:none; }

/* 注意力展开图保留字号；窄屏在图内查看，不把整张图缩成小字。 */
#attention-overview .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
#attention-overview .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
#attention-overview .lesson-photo-scroll img { min-width:440px; max-width:none; }

/* Transformer路线与层内旁路保留原图字号，窄屏在图内查看。 */
:is(#phase-network,#inside-block) .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
:is(#phase-network,#inside-block) .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
#phase-network .lesson-photo-scroll img { min-width:440px; max-width:none; }
#inside-block .lesson-photo-scroll img { min-width:400px; max-width:none; }

/* Keep the official module names readable; narrow screens can pan the map. */
#phase-code-map .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
#phase-code-map .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
#phase-code-map .lesson-photo-scroll img { min-width:400px; max-width:none; }

/* These layer maps retain their text size and pan within the reading column. */
body:has(#qwen-rmsnorm-code,#qwen-rope-code) #phase-question .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
body:has(#qwen-rmsnorm-code,#qwen-rope-code) #phase-question .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
body:has(#qwen-rmsnorm-code,#qwen-rope-code) #phase-question .lesson-photo-scroll img { min-width:400px; max-width:none; }

/* Keep the three memory-layer maps readable within narrow reading columns. */
body:has(#qwen-short-conv-code,#qwen-delta-update-code,#qwen-gated-deltanet-code) #phase-question .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
body:has(#qwen-short-conv-code,#qwen-delta-update-code,#qwen-gated-deltanet-code) #phase-question .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
body:has(#qwen-short-conv-code,#qwen-delta-update-code,#qwen-gated-deltanet-code) #phase-question .lesson-photo-scroll img { min-width:400px; max-width:none; }

/* Preserve readable labels in the grouping, branch and expert diagrams. */
body:has(#qwen-gqa-code,#qwen-swiglu-code,#qwen-moe-code) #phase-question .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
body:has(#qwen-gqa-code,#qwen-swiglu-code,#qwen-moe-code) #phase-question .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
body:has(#qwen-gqa-code,#qwen-swiglu-code,#qwen-moe-code) #phase-question .lesson-photo-scroll img { min-width:400px; max-width:none; }

/* Residual, vocabulary and patch diagrams retain readable type on small screens. */
body:has(#qwen-residual-block-code,#qwen-lm-head-code,#qwen-vision-patches-code) #phase-question .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
body:has(#qwen-residual-block-code,#qwen-lm-head-code,#qwen-vision-patches-code) #phase-question .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
body:has(#qwen-residual-block-code,#qwen-lm-head-code,#qwen-vision-patches-code) #phase-question .lesson-photo-scroll img { min-width:400px; max-width:none; }

/* Long translated feature names can sit above the matrix on small screens. */
body:has(#qwen-vision-patches-code) [data-demo-frame] .matrix-editor-body { flex-wrap:wrap; row-gap:16px; }

/* Keep visual exchange, merger and assembly diagrams legible on narrow screens. */
body:has(#qwen-vision-block-code,#qwen-vision-merger-code,#qwen-assembly-code) #phase-question .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
body:has(#qwen-vision-block-code,#qwen-vision-merger-code,#qwen-assembly-code) #phase-question .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
body:has(#qwen-vision-block-code,#qwen-vision-merger-code,#qwen-assembly-code) #phase-question .lesson-photo-scroll img { min-width:400px; max-width:none; }

/* Localized matrix labels can wrap above their brackets without clipping. */
body:has(#qwen-vision-block-code,#qwen-vision-merger-code,#qwen-assembly-code) .matrix-editor-body { flex-wrap:wrap; row-gap:16px; }

/* Multimodal positions and resource trade-offs retain legible diagram labels. */
body:has(#qwen-multimodal-assembly-code,#qwen-design-notes-code) #phase-question .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
body:has(#qwen-multimodal-assembly-code,#qwen-design-notes-code) #phase-question .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
body:has(#qwen-multimodal-assembly-code,#qwen-design-notes-code) #phase-question .lesson-photo-scroll img { min-width:400px; max-width:none; }
body:has(#qwen-multimodal-assembly-code,#qwen-design-notes-code) .matrix-editor-body { flex-wrap:wrap; row-gap:16px; }

/* Recap and finale diagrams keep full-size type within the reading column. */
:is(#recap,#a-new-beginning) .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
:is(#recap,#a-new-beginning) .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
:is(#recap,#a-new-beginning) .lesson-photo-scroll img { min-width:400px; max-width:none; }
body:has(#fu-inference) #phase-summary .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; background:var(--lesson-color-fbf6ed,#fbf6ed); border-radius:12px; }
body:has(#fu-inference) #phase-summary .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
body:has(#fu-inference) #phase-summary .lesson-photo-scroll img { min-width:360px; max-width:none; }
body:has(#danmaku-inference) #phase-summary .lesson-photo-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
body:has(#danmaku-inference) #phase-summary .lesson-photo-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
body:has(#danmaku-inference) #phase-summary .lesson-photo-scroll img { min-width:360px; max-width:none; }

/* 真实计算沿神经元连线推进；与阅读页面共用暖纸、墨色和按钮。 */
.perceptron-demo { margin: 28px 0 40px; padding: 24px 0; border-block: 1px solid var(--line); }
.neuron-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 24px; }
.neuron-toolbar .button { font-size: 18px; padding: 8px 16px; }
.neuron-parameters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; max-width: 580px; }
[data-learn="true"] .neuron-parameters { grid-template-columns: repeat(4,minmax(0,1fr)); max-width: 760px; }
[data-multi="true"] .neuron-parameters { grid-template-columns: repeat(5,minmax(0,1fr)); max-width: none; }
.neuron-parameters label { display: grid; gap: 8px; font-size: 16px; color: var(--ink-soft); }
.neuron-parameters input,.neuron-parameters select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; font-size: 20px; padding: 8px 12px; font-variant-numeric: tabular-nums; }
.neuron-parameters input[aria-invalid="true"] { border-color: var(--accent); }
.neuron-parameters input.is-updated { background: var(--accent-soft); border-color: var(--ink); }
.neuron-validation { margin: 8px 0; color: var(--accent); font-size: 16px; }
.neuron-validation:empty { display: none; }
.neuron-diagram { display: block; width: min(100%,760px); height: auto; margin: 48px auto 40px; overflow: visible; }
.neuron-mobile { display: none; }
.neuron-overview { margin: 32px 0; }
.neuron-overview .neuron-diagram { margin-block: 24px 16px; }
.neuron-overview figcaption { color: var(--ink-soft); font-size: 16px; line-height: 1.8; max-width: 65ch; margin-inline: auto; }
.neuron-diagram text { font-family: inherit; fill: var(--ink); }
.neuron-label { font-size: 20px; }
.neuron-value,.neuron-weight { font-size: 26px; font-weight: 700; }
.neuron-weight { fill: var(--accent) !important; }
.neuron-connections path { stroke: var(--ink-soft); stroke-width: 2; fill: none; }
.neuron-connections path.is-current { stroke: var(--accent); stroke-width: 3; }
.neuron-body { fill: var(--paper); stroke: var(--ink-soft); stroke-width: 1.5; }
.neuron-terminal { fill: var(--paper); stroke: var(--ink-soft); stroke-width: 1.5; }
.neuron-divider { stroke: var(--line); stroke-width: 1; fill: none; }
.neuron-sigma { font-size: 44px; }
.neuron-score { font-size: 22px; }
.neuron-rule { font-size: 20px; }
.neuron-diagram .is-current text { fill: var(--accent); }
.neuron-diagram .is-current circle { stroke: var(--accent); stroke-width: 3; }
.neuron-signal { pointer-events: none; }
.neuron-signal rect { fill: var(--accent); }
.neuron-signal text { fill: var(--paper); font-size: 24px; font-weight: 700; }
.neuron-symbol { font-size: 16px; color: var(--ink-soft); line-height: 1.85; margin: 4px 0 20px; }
.neuron-readout { border-top: 1px solid var(--line); padding-top: 20px; min-height: 190px; }
.neuron-step-title { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.neuron-step-title strong { font-size: 20px; }
.neuron-step-title span { flex-shrink: 0; font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.neuron-equation { margin: 14px 0 12px; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.guide-content .neuron-equation p { margin: 0 0 8px; font-size: inherit; line-height: 1.7; }
.guide-content [data-neuron-explain] { font-size: 18px; line-height: 1.85; margin: 0; }
.neuron-learning-result { font-size: 18px; line-height: 1.85; margin: 20px 0 0; }
@media(max-width:650px) {
 .neuron-desktop { display: none; }
 .neuron-mobile { display: block; max-width: 320px; margin: 32px auto; }
 .neuron-toolbar { gap: 10px; }
 .neuron-toolbar .button { font-size: 16px; padding: 8px 12px; }
 .neuron-parameters,[data-learn="true"] .neuron-parameters { gap: 10px; }
 [data-multi="true"] .neuron-parameters { grid-template-columns: repeat(3,minmax(0,1fr)); }
 .neuron-parameters label { font-size: 16px; }
 .neuron-parameters input,.neuron-parameters select { padding: 8px 6px; font-size: 18px; }
 .neuron-parameters input { appearance: textfield; -moz-appearance: textfield; }
 .neuron-parameters input::-webkit-inner-spin-button { appearance: none; }
 .neuron-step-title strong { font-size: 18px; }
 .neuron-equation { font-size: 20px; overflow-wrap: anywhere; }
 .neuron-readout { min-height: 210px; }
}

.neuron-function { font-size: 42px; font-style: italic; }
.neuron-full-equation { text-align: center; margin: 8px 0 20px; font-size: 24px; line-height: 1.8; font-variant-numeric: tabular-nums; }
.guide-content .neuron-full-equation p { margin: 0 0 6px; font-size: inherit; line-height: inherit; overflow-wrap: anywhere; }
@media(max-width:650px) { .neuron-full-equation { font-size: 20px; } }

.neuron-general { margin: 36px 0 24px; }
.neuron-general svg { display: block; width: min(100%,800px); margin-inline: auto; color: var(--ink); }
.neuron-general text { fill: var(--ink); font-family: inherit; }
.neuron-general-value { font-size: 25px; }
.neuron-general-weight { font-size: 23px; fill: var(--accent) !important; }
.neuron-general-label { font-size: 19px; }
.neuron-general figcaption { color: var(--ink-soft); font-size: 16px; line-height: 1.8; margin-top: 12px; }
@media(max-width:650px) { .neuron-general-label { font-size: 25px; } .neuron-general-value,.neuron-general-weight { font-size: 29px; } }

.neuron-dataset { max-width: 580px; margin: 0 0 24px; }
.neuron-dataset>strong { font-size: 18px; }
.neuron-dataset table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 18px; font-variant-numeric: tabular-nums; }
.neuron-dataset th,.neuron-dataset td { text-align: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.neuron-dataset th { font-size: 14px; color: var(--ink-soft); font-weight: 400; }
.neuron-dataset tr.is-selected { background: var(--accent-soft); }
.guide-content [data-neuron-batch-count] { margin: 8px 0 0; font-size: 14px; color: var(--ink-soft); }

:lang(ko) :is(.perceptron-demo,.neural-lab) { word-break:keep-all; overflow-wrap:anywhere; }
.neuron-step-title strong { min-width:0; overflow-wrap:break-word; }

.algebra-lab { margin: 28px 0 40px; }
.algebra-modes,.algebra-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 24px; }
.algebra-modes .button { padding: 8px 16px; font-size: 18px; }
.algebra-tools label { display: inline-flex; gap: 10px; align-items: center; font-size: 16px; }
.algebra-lab [data-algebra-data-matrix] .matrix-value.is-current-cell { background: var(--accent); color: var(--paper-raised); border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; caret-color: var(--paper-raised); font-weight: 700; }
.guide-content .algebra-meaning { font-size: 20px; line-height: 1.9; margin: 0 0 24px; }
.guide-content .algebra-note { font-size: 16px; line-height: 1.8; color: var(--ink-soft); }
.algebra-vector-intro { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr); gap: 30px; align-items: center; }
.algebra-vector-plane { min-width: 0; }
.algebra-vector-plane svg,[data-algebra-geometry] svg { display: block; width: 100%; max-width: 420px; height: auto; margin-inline: auto; overflow: hidden; }
.algebra-lab svg text { fill: var(--ink); font-family: inherit; font-size: 18px; }
.algebra-lab svg .algebra-tick { font-size: 13px; fill: var(--ink-soft); }
.algebra-axis,.algebra-axis line { stroke: var(--ink-soft); stroke-width: 1; }
.algebra-axis line { vector-effect: non-scaling-stroke; }
.algebra-arrow-a { stroke: var(--ink); fill: var(--ink); stroke-width: 2; }
.algebra-arrow-b { stroke: var(--sage); fill: var(--sage); stroke-width: 2; }
.algebra-arrow-result { stroke: var(--accent); fill: var(--accent); stroke-width: 2.8; }
.algebra-vector-label { font-size: 14px !important; }
.algebra-drag { fill: transparent; stroke: var(--accent); stroke-width: 1.5; cursor: grab; }
.algebra-drag:active { cursor: grabbing; }
[data-algebra-vector-plane],[data-algebra-geometry] { touch-action: pan-y; }
.algebra-drag { touch-action: none; }
.algebra-grid-transform { fill: none; stroke: var(--sage); stroke-width: 1; opacity: .28; }
.algebra-projection { stroke: var(--ink-soft); stroke-width: 1.4; stroke-dasharray: 5 4; }
.algebra-geometry { margin: 28px 0 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.algebra-geometry-heading { display: flex; flex-wrap:wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.algebra-geometry-heading strong { font-size: 22px; }
.algebra-map-planes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.algebra-map-planes figure { margin: 0; min-width: 0; }
.algebra-map-planes figcaption { text-align: center; font-size: 18px; margin-bottom: 8px; }
.guide-content .algebra-map-readout { font-size: 20px; text-align: center; font-variant-numeric: tabular-nums; margin: 16px 0; }
.algebra-feature-link { stroke: var(--ink-soft); stroke-width: 1.3; fill: none; opacity: .5; }
.algebra-feature-link.is-active { stroke: var(--accent); stroke-width: 3; opacity: 1; }
.algebra-feature-link.is-zero { stroke-dasharray: 4 5; opacity: .2; }
.algebra-feature-node { fill: var(--paper); stroke: var(--ink-soft); stroke-width: 1.5; }
.algebra-feature-node.result { stroke: var(--accent); stroke-width: 2; }
.algebra-lab svg .algebra-feature-weight { font-size: 16px; fill: var(--accent); stroke: var(--paper); stroke-width: 6px; paint-order: stroke; }
.algebra-feature-view>p { font-size: 16px; text-align: center; }
.algebra-matrix-slices { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-top: 24px; }
.algebra-matrix-slices > div { min-width: 0; max-width: 100%; }
.algebra-lab[data-algebra-kind="matrix"] .matrix-editor,.algebra-transpose .matrix-editor { width: max-content; max-width: 100%; padding: 24px; }
.algebra-lab[data-algebra-kind="matrix"] .matrix-editor-body,.algebra-transpose .matrix-editor-body { justify-content: flex-start; padding: 20px 4px 16px; max-width: 100%; overflow-x: auto; }
.algebra-lab[data-algebra-kind="matrix"] .matrix-symbol,.algebra-transpose .matrix-symbol { flex: 0 0 auto; }
.algebra-transpose-matrices { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 32px; align-items: center; justify-items: center; }
.algebra-transpose-matrices > [data-transpose-source],.algebra-transpose-matrices > [data-transpose-result] { min-width: 0; max-width: 100%; }
.algebra-transpose-arrow { font-size: 32px; color: var(--accent); }
.algebra-transpose-matrices.has-connection .algebra-transpose-arrow { visibility: hidden; }
.algebra-transpose-link { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; color: var(--accent); }
.algebra-transpose-link path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.algebra-transpose-link .algebra-transpose-link-backdrop { stroke: var(--paper); stroke-width: 7; }
.algebra-transpose-link marker path { fill: currentColor; stroke: none; }
.algebra-transpose .matrix-value { position: relative; z-index: 2; background: var(--paper-raised); }
.algebra-transpose .matrix-value.is-operation-active,.algebra-transpose .matrix-value.is-operation-written { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: 2px; }
.algebra-flying-cell { position: absolute; left: 0; top: 0; z-index: 4; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--paper-raised); box-shadow: 0 6px 14px #492b1926; pointer-events: none; font: inherit; font-size: 20px; }
[data-transpose-description] { font-size: 18px; line-height: 1.85; }
@media(max-width:850px) {
 .algebra-transpose-matrices { grid-template-columns: minmax(0,1fr); gap: 24px; }
 .algebra-transpose-arrow { text-align: center; transform: rotate(90deg); }
}
@media(max-width:650px) {
 .algebra-modes { gap: 10px; }
 .algebra-modes .button { font-size: 16px; padding: 8px 13px; }
 .algebra-vector-intro,.algebra-map-planes { grid-template-columns: minmax(0,1fr); gap: 24px; }
 .algebra-matrix-slices { flex-direction: column; }
 .algebra-vector-intro [data-algebra-vector] { max-width: 270px; width: 100%; justify-self: center; }
 .algebra-geometry-heading strong { font-size: 20px; }
 .algebra-geometry-heading .button { padding: 8px 12px; font-size: 16px; }
}

:lang(ko) .algebra-lab { word-break:keep-all; overflow-wrap:anywhere; }
:lang(en) .algebra-lab { hyphens:none; }
.algebra-tools label { max-width:100%; flex-wrap:wrap; }

.mlp-lab { margin:32px 0; font-variant-numeric:tabular-nums; }
.mlp-boundary-layout,.mlp-network-layout { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(220px,1fr); align-items:center; gap:32px; }
.mlp-lab svg { display:block; width:100%; max-width:440px; margin:auto; overflow:visible; }
.mlp-lab svg text { font-family:inherit; font-size:17px; fill:var(--ink); }
.mlp-axes path { stroke:var(--line); stroke-width:1.5; fill:none; }
.mlp-boundary { stroke:var(--accent); stroke-width:2; stroke-dasharray:7 5; fill:none; }
.mlp-point circle,.mlp-unit circle { fill:var(--paper); stroke:var(--ink-soft); stroke-width:1.5; }
.mlp-point.mlp-one circle { fill:var(--ink); stroke:var(--ink); }
.mlp-point.mlp-one text:first-of-type { fill:var(--paper); }
.mlp-mistake { stroke:var(--accent); stroke-width:2; fill:none; }
.mlp-parameters { display:grid; gap:12px; }
.mlp-parameters label { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.mlp-parameters input { width:110px; padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); font:inherit; }
.mlp-parameters .button { justify-self:start; margin-top:8px; }
.mlp-status { color:var(--accent); }
.mlp-truth { margin:24px 0; }
.mlp-truth table { width:100%; border-collapse:collapse; text-align:center; }
.mlp-truth caption { text-align:left; padding-bottom:12px; font-size:16px; color:var(--ink-soft); }
.mlp-truth th,.mlp-truth td { padding:10px 6px; border-bottom:1px solid var(--line); font-weight:400; }
.mlp-truth thead th { font-weight:700; font-size:16px; }
.mlp-truth tr.is-wrong td:last-child { color:var(--accent); font-weight:700; }
.mlp-samples,.mlp-tools { display:flex; flex-wrap:wrap; gap:10px; }
.mlp-samples { margin-bottom:28px; }
.mlp-links path { stroke:var(--line); stroke-width:1.5; fill:none; }
.mlp-links.is-input-active path { stroke:var(--accent); stroke-width:2.5; stroke-dasharray:8 5; animation:mlp-flow 1.1s linear infinite; }
.mlp-unit.is-active circle { stroke:var(--accent); stroke-width:2.5; fill:var(--accent-soft); }
.mlp-lab svg .mlp-node-value { font-size:25px; }
.mlp-lab svg .mlp-node-label { font-size:18px; paint-order:stroke; stroke:var(--paper); stroke-width:5px; stroke-linejoin:round; }
.mlp-network-detail p { font-size:17px; }
.mlp-network-detail p:first-child { margin-top:0; }
.mlp-tools { margin:24px 0; }
.mlp-toggle { display:flex; align-items:center; min-height:44px; gap:10px; font-size:16px; }
.mlp-toggle input { width:18px; height:18px; accent-color:var(--accent); }
.mlp-equations { margin-top:28px; padding:20px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); overflow-wrap:anywhere; font-size:18px; }
.mlp-equations p { margin:6px 0; font-size:inherit; }
.mlp-note { font-size:16px; color:var(--ink-soft); }
.mlp-lab[data-mlp-locale="ko"] { word-break:keep-all; overflow-wrap:anywhere; }
.mlp-rule-buttons { display:flex; flex-wrap:wrap; gap:10px; grid-column:1/-1; }
.mlp-work-row { display:grid; grid-template-columns:150px minmax(0,1fr) 70px; align-items:center; gap:20px; margin:28px 0; font-size:17px; }
.mlp-work-cells { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:6px; }
.mlp-work-cells span { height:26px; border:1px solid var(--line); border-radius:4px; background:var(--paper); }
.mlp-work-cells span.is-working { border-color:var(--accent); }
.mlp-work-cells span.is-done { background:var(--accent); border-color:var(--accent); }
@keyframes mlp-flow { to { stroke-dashoffset:-26; } }
@media(max-width:650px) {
  .mlp-work-row { grid-template-columns:minmax(0,1fr) 65px; gap:12px; }
  .mlp-work-row strong { grid-column:1/-1; }
  .mlp-boundary-layout,.mlp-network-layout { grid-template-columns:minmax(0,1fr); gap:24px; }
  .mlp-parameters { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
  .mlp-parameters p,.mlp-parameters .button { grid-column:1/-1; }
  .mlp-parameters label { display:grid; gap:6px; }
  .mlp-parameters input { width:100%; min-width:0; box-sizing:border-box; }
  .mlp-samples .button { padding:10px 14px; }
  .mlp-equations { font-size:16px; }
}
@media(prefers-reduced-motion:reduce) { .mlp-links.is-input-active path { animation:none; } }

.imageconv{margin-block:28px;padding-block:24px;border-block:1px solid var(--line)}
.imageconv-label{color:var(--ink-soft);margin-block:0 16px}
.imageconv-pixels{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:relative;padding:4px;gap:4px}
.imageconv-pixel{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:110px;border:1px solid var(--line)}
.imageconv-pixel strong{font-size:2rem}.imageconv-pixel small{font-size:1rem}
/* Pixel brightness is data, not reading chrome: keep both themes identical. */
.imageconv-pixel.is-black{background:rgb(36 35 31);color:rgb(255 255 255)}.imageconv-pixel.is-white{background:rgb(255 255 255);color:rgb(36 35 31)}
.imageconv-window{position:absolute;left:calc(var(--scan)*20%);width:40%;top:0;height:100%;border:3px solid var(--accent);pointer-events:none}
.imageconv-calculation{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:16px;padding:22px 8px;background:var(--accent-soft);margin-block:20px;font-variant-numeric:tabular-nums}
.imageconv-calculation strong{font-size:1.8rem;color:var(--accent)}.imageconv-calculation span:last-child{flex-basis:100%;text-align:center}
.imageconv-controls{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:28px}
.imageconv-results{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.imageconv-results button{min-height:68px;background:var(--paper-raised);border:1px solid var(--line);color:var(--ink);border-radius:8px;font-size:1.6rem;cursor:pointer}
.imageconv-results .is-edge{background:var(--accent-soft);color:var(--accent)}
.imageconv-results [aria-pressed=true]{outline:2px solid var(--accent);outline-offset:2px}
.imageconv [data-strip-status]{color:var(--ink-soft);font-size:.9rem;margin-bottom:0}
@media(max-width:600px){.imageconv-pixel{min-height:86px}.imageconv-calculation{gap:10px}.imageconv-controls{gap:10px}}
.weight-sharing { --sharing-cell: 44px; --sharing-gap: 6px; position: relative; isolation: isolate; margin: 32px 0; padding: 28px 0; border-block: 1px solid var(--line); }
.learning-arrows { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 20; color: var(--accent); pointer-events: none; overflow: visible; }
.learning-arrows > path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.learning-arrows marker path { fill: currentColor; stroke: none; }
.learning-arrows > path[data-connection="write"] { stroke-width:3.5; }
.sharing-grid > span:not(.sharing-window),.sharing-grid button,.sharing-kernel span,.sharing-products [data-sharing-operand],.sharing-products [data-sharing-product],[data-sharing-total] { position: relative; z-index: 3; }
.sharing-products [data-sharing-operand],.sharing-products [data-sharing-product],[data-sharing-total] { display: inline-block; background: var(--paper); padding-inline: 3px; }
.sharing-products .is-current [data-sharing-operand],.sharing-products .is-current [data-sharing-product] { background: var(--accent-soft); }
.sharing-visual h3,.sharing-visual p,.sharing-count,.sharing-parameters .text-button { position: relative; z-index: 3; background: var(--paper); }
.sharing-visual { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; justify-items: center; gap: 28px; }
.sharing-visual h3 { font-size: 18px; margin: 0 0 24px; text-align: center; }
.sharing-grid { display: grid; gap: var(--sharing-gap); width: max-content; }
.sharing-input { position: relative; grid-template-columns: repeat(4,var(--sharing-cell)); }
.sharing-grid > span:not(.sharing-window),.sharing-grid button { display: grid; place-items: center; box-sizing: border-box; width: var(--sharing-cell); height: var(--sharing-cell); border: 1px solid var(--line); background: var(--paper-raised); border-radius: 6px; color: var(--ink); font: inherit; font-size: 22px; font-variant-numeric: tabular-nums; padding: 0; }
.sharing-input > span.is-in-window { background: var(--accent-soft); }
.sharing-input > span.is-multiplying,.sharing-kernel span.is-multiplying { background: var(--accent); color: var(--paper-raised); border-color: var(--accent); }
.sharing-parameters [data-sharing-bias].is-current { background: var(--accent-soft); color: var(--ink); }
.weight-sharing .sharing-products { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; list-style: none; margin: 28px 0 0; padding: 0; }
.weight-sharing .sharing-products li { padding: 10px 6px; margin: 0; border-bottom: 2px solid var(--line); font-size: 18px; text-align: center; }
.weight-sharing .sharing-products li.is-current { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.sharing-grid .sharing-window { position: absolute; left: -4px; top: -4px; width: calc(2 * var(--sharing-cell) + var(--sharing-gap) + 8px); height: calc(2 * var(--sharing-cell) + var(--sharing-gap) + 8px); border: 2px solid var(--accent); border-radius: 10px; pointer-events: none; transform: translate(calc(var(--scan-column,0) * (var(--sharing-cell) + var(--sharing-gap))),calc(var(--scan-row,0) * (var(--sharing-cell) + var(--sharing-gap)))); transition: transform 360ms cubic-bezier(.16,1,.3,1); }
.sharing-output { grid-template-columns: repeat(3,var(--sharing-cell)); row-gap:24px; }
.sharing-output button { cursor: pointer; }
.sharing-output button:hover { border-color: var(--accent); }
.sharing-output button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sharing-output button[aria-pressed="true"] { color: var(--paper-raised); background: var(--accent); border-color: var(--accent); }
.sharing-parameters { text-align: center; }
.sharing-kernel { display: grid; grid-template-columns: repeat(2,44px); gap: 6px; width: max-content; margin-inline: auto; }
.sharing-kernel span { display: grid; place-items: center; height: 44px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 6px; color: var(--accent); font-size: 24px; font-weight: 700; }
.weight-sharing .sharing-visual p { font-size: 16px; line-height: 1.8; margin: 18px 0 0; color: var(--ink-soft); text-align: center; }
.sharing-count { display: block; font-size: 16px; margin-top: 12px; }
.sharing-parameters .text-button { display: block; margin: 14px auto 0; font-size: 16px; text-underline-offset: 4px; }
.sharing-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin:0 0 16px; }
.sharing-progress { margin:0 0 26px;color:var(--ink-soft);font-size:16px;line-height:1.7; }
.weight-sharing .sharing-equation { font-size: 20px; line-height: 1.8; margin: 24px 0 12px; overflow-wrap: anywhere; }
.weight-sharing figcaption { font-size: 16px; line-height: 1.9; color: var(--ink-soft); }
@media(max-width:850px) {
 .weight-sharing { --sharing-cell: 32px; --sharing-gap: 4px; }
 .sharing-visual { grid-template-columns: minmax(0,4fr) minmax(0,2fr) minmax(0,3fr); gap: 16px 5px; align-items: center; padding-inline-end:14px; }
 .sharing-source,.sharing-parameters,.sharing-target { display: contents; }
 .sharing-source h3 { grid-column: 1; grid-row: 1; }
 .sharing-parameters h3 { grid-column: 2; grid-row: 1; max-width: 72px; }
 .sharing-target h3 { grid-column: 3; grid-row: 1; }
 .sharing-input { grid-column: 1; grid-row: 2; }
 .sharing-kernel { grid-column: 2; grid-row: 2; grid-template-columns: repeat(2,var(--sharing-cell)); gap: var(--sharing-gap); }
 .sharing-kernel span { height: var(--sharing-cell); font-size: 22px; }
 .sharing-output { grid-column: 3; grid-row: 2; }
 .sharing-source p { grid-column: 1; grid-row: 3; }
 .sharing-parameters p { grid-column: 2; grid-row: 3; max-width: 72px; }
 .sharing-target p { grid-column: 3; grid-row: 3; max-width: 104px; }
 .sharing-count { grid-column: 1 / -1; grid-row: 4; justify-self: center; margin: 0; }
 .sharing-parameters .text-button { grid-column: 1 / -1; grid-row: 5; margin: 0; }
 .sharing-visual h3 { font-size: 14px; margin: 0; align-self: end; }
 .weight-sharing .sharing-visual p { font-size: 14px; margin: 0; }
 .sharing-visual :is(h3,p),.sharing-count,.sharing-parameters .text-button { min-width:0;max-inline-size:100%;overflow-wrap:break-word; }
 .sharing-grid > span:not(.sharing-window),.sharing-grid button { font-size: 20px; }
 .weight-sharing .sharing-products { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:380px) { .weight-sharing { --sharing-cell: 25px; } .sharing-grid > span:not(.sharing-window),.sharing-grid button { font-size: 18px; } }
@media(prefers-reduced-motion:reduce) { .sharing-grid .sharing-window { transition: none; } }

/* 通道入门：同一位置的数表对齐，先分开算，再合成输出。 */
.rgb-channels { --rgb-cell: 40px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 28px; margin: 32px 0; padding-block: 28px; border-block: 1px solid var(--line); }
.rgb-tables { display: flex; justify-content: space-between; gap: 16px; }
.rgb-channels h3 { font-size: 16px; text-align: center; margin: 0 0 16px; }
.rgb-grid { display: grid; grid-template-columns: repeat(3,var(--rgb-cell)); gap: 4px; width: max-content; margin-inline: auto; }
.rgb-grid span,.rgb-grid button { display: grid; place-items: center; width: var(--rgb-cell); height: var(--rgb-cell); padding: 0; background: var(--paper-raised); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; font: inherit; font-size: 18px; box-sizing: border-box; }
.rgb-grid span.is-selected { background: var(--accent); color: var(--paper-raised); border-color: var(--accent); }
.rgb-grid button { cursor: pointer; }
.rgb-grid button[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: inset 0 0 0 2px var(--paper-raised); }
.rgb-grid button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.rgb-channels > .button { justify-self: start; }
.rgb-channels > .button,.rgb-channels figcaption { grid-column: 1 / -1; }
.rgb-channels figcaption { font-size: 18px; line-height: 1.8; }
.channel-story { --cs-cell: 36px; --cs-gap: 5px; position: relative; isolation: isolate; margin: 32px 0; padding-block: 28px; border-block: 1px solid var(--line); }
.channel-story .cs-bias { font-size: 16px; color: var(--ink-soft); margin: 0 0 16px; }
.channel-story .cs-bias.is-current { color:var(--accent); font-weight:700; }
.cs-sum.is-active [data-cs-sum-bias] { color:var(--accent); font-weight:700; }
.cs-row h3,.cs-filter,.cs-bias { position: relative; z-index: 3; background: var(--paper); }
.cs-grid span,.cs-grid button,[data-cs-contribution],.cs-multiply span,.cs-multiply strong,.cs-sum span,.cs-sum strong { position: relative; z-index: 3; }
.cs-multiply span,.cs-multiply strong,.cs-sum span,.cs-sum strong { display: inline-block; padding-inline: 3px; background: var(--paper); }
[data-cs-contribution] { background: var(--paper); }
.cs-output-choice { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.cs-output-choice .button { font-size: 16px; padding: 8px 14px; }
.cs-output-choice .button[aria-pressed="true"] { background: var(--accent); color: var(--paper-raised); }
.channel-story .cs-filter { font-size: 18px; font-weight: 700; margin: 0 0 20px; }
.cs-row { display: grid; grid-template-columns: max-content 20px max-content 32px 90px; gap: 16px; align-items: center; justify-content: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cs-row.is-active { background: var(--paper-raised); }
.cs-row h3,.cs-map-list h3 { font-size: 16px; line-height: 1.7; text-align: center; margin: 0 0 12px; }
.cs-row > div,.cs-row h3,.cs-map-list h3 { min-width:0;max-inline-size:100%;overflow-wrap:break-word; }
.cs-grid { display: grid; width: max-content; gap: var(--cs-gap); margin-inline: auto; }
.cs-input { grid-template-columns: repeat(3,var(--cs-cell)); }
.cs-kernel,.cs-output { grid-template-columns: repeat(2,var(--cs-cell)); }
.cs-output { row-gap:24px; }
.cs-grid span,.cs-grid button { display: grid; place-items: center; width: var(--cs-cell); height: var(--cs-cell); padding: 0; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--paper-raised); font: inherit; font-size: 22px; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.cs-grid span.is-window { border-color: var(--accent); background: var(--accent-soft); }
.cs-grid span.is-pair { color: var(--paper-raised); background: var(--accent); border-color: var(--accent); }
.cs-kernel span { border-color: var(--ink-soft); }
.cs-times { font-size: 24px; text-align: center; }
.cs-arrow { display: block; width: 100%; color: var(--ink-soft); }
.cs-arrow path { stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cs-part { text-align: center; }
.cs-part strong { display: inline-block; padding: 4px; font-size: 30px; font-weight: 700; color: var(--accent); }
.channel-story .cs-multiply { grid-column: 1 / -1; font-size: 18px; text-align: center; margin: 0; }
.channel-story .cs-sum { font-size: 24px; text-align: center; line-height: 1.8; margin: 24px 0; padding: 12px; }
.cs-sum.is-active { background: var(--accent-soft); }
.cs-map-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 48px; margin: 24px 0; }
.cs-output button { cursor: pointer; }
.cs-output button[aria-pressed="true"] { color: var(--paper-raised); background: var(--accent); border-color: var(--accent); }
.cs-output button:hover { border-color: var(--accent); }
.cs-output button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.channel-story .cs-rule { font-size: 18px; text-align: center; line-height: 1.8; }
.cs-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin:0 0 16px; }
.cs-controls .button { font-size: 16px; padding: 8px 14px; }
.channel-story .cs-progress { font-size:16px; color:var(--ink-soft); margin:0 0 24px; }
.channel-story figcaption { font-size: 18px; line-height: 1.9; }
@media(max-width:700px) {
 .rgb-channels { --rgb-cell: 32px; grid-template-columns: minmax(0,1fr); }
 .rgb-tables { justify-content: center; gap: 10px; }
 .rgb-grid span { font-family:var(--mono);font-size:16px;letter-spacing:0;font-variant-numeric:tabular-nums; }
 .channel-story { --cs-cell: 30px; --cs-gap: 4px; }
 .cs-row { grid-template-columns: calc(3 * var(--cs-cell) + 2 * var(--cs-gap)) 16px calc(2 * var(--cs-cell) + var(--cs-gap)) 22px minmax(0,64px); gap:10px;padding-inline-end:14px; }
 .cs-row h3 { font-size: 14px; }
 .cs-grid span,.cs-grid button { font-size: 20px; }
 .channel-story .cs-sum { font-size: 20px; padding-inline: 0; }
 .cs-map-list { gap: 24px; }
 .cs-map-list h3 { font-size: 14px; }
}
@media(max-width:380px) {
 .rgb-tables { flex-wrap:wrap;gap:20px; }
 .channel-story { --cs-cell:26px; }
 .cs-row { grid-template-columns: calc(3 * var(--cs-cell) + 2 * var(--cs-gap)) 14px calc(2 * var(--cs-cell) + var(--cs-gap)) 18px minmax(0,56px); gap:6px; }
}

.neural-lab { margin:32px 0; padding:28px 0; border-block:1px solid var(--line); }
.neural-architecture figcaption { text-align:center; color:var(--ink-soft); margin-bottom:16px; }
.neural-architecture svg { display:block; width:100%; height:auto; }
.neural-architecture .neural-network-portrait { display:none; }
.neural-wires path { stroke:var(--line); stroke-width:1.5; fill:none; }
.neural-layer circle { fill:var(--paper-raised); stroke:var(--ink-soft); stroke-width:1.5; }
.neural-layer text { fill:var(--ink); font-size:18px; }
.neural-layer .neural-activation-label { fill:var(--accent); font-size:16px; }
.neural-layer.is-flowing circle { fill:var(--accent-soft); stroke:var(--accent); stroke-width:3; }
.neural-wires.is-flowing path { stroke:var(--accent); stroke-width:2; }
.neural-controls, .neural-switch { display:flex; flex-wrap:wrap; gap:12px; margin-top:16px; }
.neural-status { min-height:3em; color:var(--ink-soft); margin-bottom:0; }
.neural-role-plot { max-width:680px; margin:16px auto; }
.neural-role-plot svg, .neural-function svg { display:block; width:100%; height:auto; overflow:visible; }
.neural-axes path { fill:none; stroke:var(--line); stroke-width:1.2; }
.neural-axes text { fill:var(--ink-soft); font-size:13px; }
.neural-curve { fill:none; stroke:var(--accent); stroke-width:2.8; stroke-linecap:round; stroke-linejoin:round; }
.neural-dot { fill:var(--accent); stroke:var(--paper); stroke-width:2; }
.neural-projection { fill:none; stroke:var(--sage); stroke-dasharray:4 4; stroke-width:1.2; }
.neural-formula { font-family:var(--font-mono, monospace); font-size:.85rem; overflow-wrap:anywhere; }
.neural-slider { display:flex; align-items:center; gap:16px; }
.neural-slider input { flex:1; min-width:0; accent-color:var(--accent); cursor:pointer; height:32px; }
.neural-lab output, .neural-function output { display:block; font-variant-numeric:tabular-nums; color:var(--accent); margin-top:6px; }
.neural-functions { margin-top:32px; }
.neural-function-primary { max-width:560px; margin-inline:auto; }
.neural-function-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:32px; }
.neural-formula-details { margin-top:20px; }
.neural-formula-details summary, .neural-function-reference>summary { cursor:pointer; color:var(--accent); padding-block:12px; min-height:44px; }
.neural-formula-details summary:focus-visible, .neural-function-reference>summary:focus-visible { outline:2px solid var(--accent); outline-offset:4px; border-radius:4px; }
.neural-function-reference { margin-top:28px; border-top:1px solid var(--line); padding-top:12px; }
.neural-stages { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; list-style:none; padding:24px 0; margin:20px 0; border-block:1px solid var(--line); }
.neural-stages li { margin:0; min-width:0; }
.neural-stages span { display:block; color:var(--ink-soft); font-size:18px; }
.neural-stages strong { display:block; margin-top:12px; font-size:22px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
[data-neural="role"]>.neural-slider { margin-top:28px; }
.neural-function { margin:0; min-width:0; padding:24px 0; border-top:1px solid var(--line); }
.neural-function figcaption strong { display:block; font-size:1.2rem; }
.neural-function figcaption span { display:block; color:var(--ink-soft); margin-top:6px; }
@media(max-width:600px) {
  .neural-architecture .neural-network-landscape { display:none; }
  .neural-architecture .neural-network-portrait { display:block; max-width:380px; margin-inline:auto; }
  .neural-function-grid { grid-template-columns:1fr; gap:8px; }
  .neural-stages { grid-template-columns:1fr; gap:20px; }
  .neural-stages strong { margin-top:6px; }
  .neural-lab { padding-block:20px; margin-block:24px; }
  .neural-function .neural-formula { min-height:0; }
}

.training-data figcaption, [data-training] figcaption { font-size:1.1rem; font-weight:600; margin-bottom:24px; }
.training-table { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; align-items:center; }
.training-table>.matrix-standalone { margin:0 auto; padding:12px 0; }
.training-shared-parameters { text-align:center; }
.training-shared-parameters strong { color:var(--ink-soft); font-size:.9rem; }
.training-shared-parameters p { margin:12px 0 0; color:var(--accent); font-weight:600; }
/* 分类例子按同一行对照分数与答案，保留矩阵字号，省去重复索引提示。 */
#classification-losses .demo-matrices { margin:16px 0; }
#classification-losses .demo-matrices:has(> .matrix-editor + .matrix-editor) { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px; }
#classification-losses .demo-matrices .matrix-editor { width:auto;padding:0; }
#classification-losses .demo-matrices .matrix-editor-body { padding:12px 0;gap:8px; }
#classification-losses .demo-matrices :is(.matrix-column-index,.matrix-help,.matrix-copy) { display:none; }
#classification-losses .demo-equation .katex-display { margin:0; }
@media(min-width:1200px) { .training-table { grid-template-columns:minmax(240px,1fr) auto minmax(180px,.7fr); } }
.training-caption { font-size:.85rem; line-height:1.7; color:var(--ink-soft); margin-top:20px; }
.training-loss-plot { max-width:650px; margin:12px auto; }
.training-loss-plot svg { display:block; width:100%; height:auto; }
.training-descent-settings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 40px; margin:24px 0 16px; }
.training-descent-settings label { display:grid; grid-template-columns:1fr auto; align-items:center; gap:12px; min-width:0; font-size:18px; }
.training-descent-settings input { grid-column:1/-1; width:100%; min-height:44px; margin:0; accent-color:var(--accent); cursor:pointer; }
.training-descent-settings output { font-variant-numeric:tabular-nums; color:var(--accent); }
.training-descent-view { display:grid; grid-template-columns:minmax(0,1fr) 150px; gap:24px; align-items:center; margin:16px 0 28px; }
.training-descent-view .training-loss-plot { width:100%; margin:0; }
.training-descent-view .neural-axes text { font-size:20px; }
.training-readout { margin:0; min-width:0; }
.training-readout>div { padding:12px 0; border-bottom:1px solid var(--line); }
.training-readout dt { font-size:16px; line-height:1.6; color:var(--ink-soft); }
.training-readout dd { margin:4px 0 0; font-size:28px; line-height:1.4; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.training-calculation { min-height:110px; margin:28px 0 20px; padding:20px 0; border-block:1px solid var(--line); }
.training-calculation p { margin:0 0 12px; font-size:18px; line-height:1.85; }
.training-calculation p:last-child { margin-bottom:0; }
.training-calculation p>span { display:inline-block; min-width:100px; margin-right:16px; color:var(--ink-soft); }
.training-calculation strong { font-weight:600; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
[data-training="descent"] .neural-controls { gap:12px; }
[data-training="descent"] .neural-controls .button { min-height:44px; }
@media(max-width:650px) {
 .training-descent-settings { gap:20px; }
 .training-descent-view { grid-template-columns:minmax(0,1fr); gap:12px; }
 .training-descent-view .neural-axes text { font-size:30px; }
 .training-readout { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
 .training-readout dt { font-size:16px; }
 .training-readout dd { font-size:24px; }
 .training-calculation p>span { display:block; min-width:0; margin:0 0 4px; }
}
.training-trail circle { fill:var(--ink-soft); opacity:.55; }
.mse-lab>figcaption { font-size:22px; font-weight:700; }
.mse-toolbar { display:flex;align-items:center;gap:20px;margin-bottom:28px; }
.mse-toolbar .training-caption { flex:1;margin:0; }
.mse-toolbar .button { flex-shrink:0; }
.mse-flow { list-style:none;max-width:720px;margin:0 auto;padding:0; }
.mse-flow-step { position:relative;padding:20px 0 32px;border-top:1px solid var(--line); }
.mse-flow-step:last-child { padding-bottom:0; }
.mse-flow-step h3 { display:flex;align-items:center;gap:12px;font-size:19px;margin:0 0 12px; }
.mse-flow-step h3>span { display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--line);border-radius:50%;font-size:15px;color:var(--accent);flex-shrink:0; }
.mse-calculation { display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,1fr);gap:20px;align-items:center; }
.mse-calculation.mse-inputs { display:block; }
.mse-stage-values { min-width:0; }
.mse-stage-values.mse-pair { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px; }
.mse-stage-values>.matrix-standalone { --matrix-cell-min:44px;--matrix-number-size:25px;max-width:100%;margin:0 auto;padding:6px 0; }
.mse-stage-values .matrix-editor-body { padding:10px 0;gap:10px; }
.mse-stage-values .matrix-symbol { font-size:25px; }
.mse-stage-values .matrix-help { display:none; }
.mse-stage-values .matrix-editor-heading { font-size:13px; }
.mse-stage-values .matrix-editor-heading>span:first-child { min-width:0; }
.mse-equations { font-size:22px;font-variant-numeric:tabular-nums;line-height:1.7;text-align:center; }
.mse-equations p { margin:3px 0; }
.mse-input-note { text-align:center;color:var(--ink-soft);font-size:14px;margin:10px 0 0; }
.mse-flow-arrow { display:flex;justify-content:center;color:var(--accent);margin:14px 0 -20px; }
.mse-flow-step:last-child .mse-equations { color:var(--accent);font-weight:700; }
@media(max-width:650px) {
 .mse-lab .training-descent-settings { grid-template-columns:1fr;gap:14px; }
 .mse-toolbar { align-items:flex-start;gap:12px; }
 .mse-toolbar .training-caption { font-size:14px; }
 .mse-toolbar .button { font-size:14px;padding:8px 12px; }
 .mse-calculation { grid-template-columns:minmax(0,1fr);gap:6px; }
 .mse-stage-values.mse-pair { gap:10px; }
 .mse-stage-values>.matrix-standalone { --matrix-cell-min:32px;--matrix-number-size:22px; }
 .mse-stage-values .matrix-editor-body { gap:6px; }
 .mse-stage-values .matrix-symbol { font-size:21px; }
 .mse-stage-values .matrix-copy { display:none; }
 .mse-stage-values .matrix-editor-heading { gap:5px;flex-wrap:wrap; }
 .mse-equations { font-size:20px; }
 .mse-flow-step h3 { font-size:17px; }
}
.training-cycle { list-style:none; margin:0; padding:0; }
.training-cycle li { display:flex; gap:20px; padding:20px 12px; border-bottom:1px solid var(--line); }
.training-cycle li > span { display:grid; place-items:center; align-self:flex-start; width:32px; height:32px; flex-shrink:0; border:1px solid var(--line); border-radius:50%; font-variant-numeric:tabular-nums; }
.training-cycle li p { margin:6px 0 0; color:var(--ink-soft); font-size:1rem; }
.training-cycle li.is-current { background:var(--accent-soft); }
.training-cycle li.is-current > span { background:var(--accent); color:var(--paper); border-color:var(--accent); }
@media(max-width:600px) {
  .training-cycle li { gap:12px; padding:18px 8px; }
}

/* A single sine-fitting project, from its target to its actual runtime result. */
.sine-target, .sine-network, .sine-fit-result { margin: 28px 0 40px; }
.sine-fit-result { scroll-margin-top: calc(var(--lesson-header-height, 76px) + var(--lesson-navigation-height, 82px) + 24px); }
.sine-target figcaption, .sine-network figcaption, .sine-fit-result figcaption { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.sine-target svg, .sine-fit-result svg { display: block; width: 100%; max-width: 760px; height: auto; margin-inline: auto; }
.sine-axes { fill: var(--ink-soft); font-size: 16px; }
.sine-axes path { fill: none; stroke: var(--line); stroke-width: 1.5; }
.sine-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sine-line.sine-target { stroke: var(--ink); stroke-width: 4; }
.sine-before { stroke: var(--accent); stroke-dasharray: 7 6; }
.sine-fit-result { --sine-trained: var(--lesson-color-426244,#426244); }
[data-theme="dark"] .sine-fit-result { --sine-trained: #a9c697; }
.sine-after { stroke: var(--sine-trained); }
.sine-selected path { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 3 5; }
.sine-selected circle { stroke: var(--paper); stroke-width: 2; }
.sine-dot-target { fill: var(--ink); }
.sine-dot-before { fill: var(--accent); }
.sine-dot-after { fill: var(--sine-trained); }
.sine-point-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-block: 20px; font-size: 18px; }
.sine-point-control output { margin-left: auto; color: var(--ink-soft); font-size: 16px; }
.sine-point-control input { flex-basis: 100%; width: 100%; min-height: 44px; accent-color: var(--accent); cursor: pointer; }
.sine-point-control input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.sine-point-values { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; margin: 20px 0; font-variant-numeric: tabular-nums; }
.sine-point-values dt { color: var(--ink-soft); font-size: 16px; }
.sine-point-values dd { margin: 8px 0 0; color: var(--ink); font-size: 22px; overflow-wrap: anywhere; }
.sine-point-values .sine-value-before dd { color: var(--accent); }
.sine-point-values .sine-value-after dd { color: var(--sine-trained); }
.sine-fit-result .sine-point-feedback { color: var(--ink); }
.sine-target > p, .sine-network > p, .sine-fit-result > p { color: var(--ink-soft); font-size: 16px; line-height: 1.8; }
.sine-network svg { display: block; width: 100%; height: auto; margin: 32px auto 24px; }
.sine-network .sine-mlp-portrait { display: none; }
.sine-mlp-links path { fill: none; stroke: var(--ink-soft); stroke-width: 1; opacity: .22; }
.sine-mlp-layer circle { fill: var(--paper-raised); stroke: var(--ink-soft); stroke-width: 1.5; }
.sine-mlp-hidden circle { fill: var(--accent-soft); stroke: var(--accent); }
.sine-network svg text { fill: var(--ink); font-family: inherit; paint-order: stroke; stroke: var(--paper); stroke-width: 6px; stroke-linejoin: round; }
.sine-network .sine-mlp-title { font-size: 22px; font-weight: 700; }
.sine-network .sine-mlp-count,.sine-network .sine-mlp-operation { font-size: 18px; fill: var(--ink-soft); }
.sine-network .sine-mlp-activation { font-size: 20px; fill: var(--accent); }
.sine-network .sine-mlp-terminal { font-size: 28px; stroke: none; }
.sine-network .sine-mlp-ellipsis { font-size: 30px; }
.python-tensor-results .sine-legend { display: flex; flex-wrap: wrap; gap: 12px 24px; list-style: none; padding: 0; margin: 0 0 16px; font-size: 16px; }
.sine-legend li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.sine-legend li::before { content: ''; width: 24px; border-top: 3px solid var(--ink); }
.sine-legend .sine-before-key::before { border-color: var(--accent); border-top-style: dashed; }
.sine-legend .sine-after-key::before { border-color: var(--sine-trained); }
.sine-fit-result .sine-fit-metrics { color: var(--ink); padding: 18px 0; border-block: 1px solid var(--line); }
.sine-fit-error { color: var(--accent); }
@media (max-width: 700px) {
  .sine-point-values { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 16px; }
  .sine-axes { font-size: 24px; }
  .sine-network .sine-mlp-landscape { display: none; }
  .sine-network .sine-mlp-portrait { display: block; max-width: 380px; }
}
@media (max-width:420px) {
  .sine-axes { font-size:40px; }
}

/* 自编码器只用静态横向节点图说明真实网络结构。 */
.autoencoder-network{margin:40px 0;}
.autoencoder-network-scroll{max-width:100%;overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--accent) var(--paper);padding:16px 0;}
.autoencoder-network svg{display:block;width:100%;min-width:720px;height:auto;max-width:960px;margin:auto;}
.autoencoder-network figcaption{font-size:16px;line-height:1.9;color:var(--ink-soft);margin:20px 0 0;}
.chain-lab input{min-width:0;max-width:100%;height:44px;accent-color:var(--accent);}
.chain-future{fill:none;stroke:var(--line);stroke-width:2;}
.chain-lab .chain-current{font-size:23px;text-align:center;line-height:1.8;font-variant-numeric:tabular-nums;}
.chain-current strong{color:var(--accent);overflow-wrap:anywhere;}
.chain-lab .chain-equation{font-size:21px;line-height:1.9;text-align:center;overflow-wrap:anywhere;overflow-x:auto;max-width:100%;padding-block:6px;}
.chain-lab .gradient-controls{margin:24px 0;}
.chain-operation-label{display:block;margin-bottom:8px;color:var(--ink-soft);font:16px var(--sans);}
.residual-diagram{margin:40px 0;}
.residual-diagram svg{display:block;width:min(100%,440px);height:auto;margin:36px auto;}
.residual-diagram text{font:24px var(--sans);fill:var(--ink);}
.residual-diagram .residual-plus{font-size:38px;}
.residual-wires path{stroke:var(--ink-soft);stroke-width:2;fill:none;}
.residual-wires .residual-shortcut{stroke:var(--accent);stroke-width:3;}
#residual-arrow path{fill:var(--accent);}
.residual-nodes rect,.residual-nodes circle{fill:var(--paper-raised);stroke:var(--line);stroke-width:1.5;}
.residual-nodes circle{fill:var(--accent-soft);stroke:var(--accent);}
.residual-diagram figcaption{font-size:16px;line-height:1.9;color:var(--ink-soft);max-width:620px;margin:auto;}
@media(max-width:650px){.chain-lab .chain-current{font-size:21px;}.residual-diagram{margin-block:32px;}}

.cnn-shape-flow { margin: 32px 0; padding: 24px 0; border-block: 1px solid var(--line); }
.cnn-shape-flow figcaption { font-size: 20px; font-weight: 700; margin-bottom: 28px; text-wrap: balance; }
.article-content .cnn-shape-flow ol { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.article-content .cnn-shape-flow li { position: relative; min-width: 0; margin: 0; text-align: center; }
.cnn-shape-flow li:not(:last-child)::after { content: ''; position: absolute; top: 58px; right: -13px; width: 8px; height: 8px; border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); transform: rotate(45deg); }
.cnn-shape-flow strong { display: block; font-size: 18px; }
.cnn-shape-glyph svg { display: block; width: 100%; height: 64px; }
.cnn-shape-glyph rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
.cnn-shape-flow code { font-size: 16px; font-family: var(--mono); white-space: nowrap; }
.article-content .cnn-shape-flow p { margin: 12px 0 0; font-size: 16px; color: var(--ink-soft); line-height: 1.6; }
@media (max-width: 850px) {
  .article-content .cnn-shape-flow ol { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .article-content .cnn-shape-flow li { display: grid; grid-template-columns: 100px minmax(0, 1fr); column-gap: 16px; align-items: center; text-align: left; }
  .cnn-shape-glyph { grid-column: 1; grid-row: 1 / 4; }
  .cnn-shape-flow strong, .cnn-shape-flow code, .article-content .cnn-shape-flow p { grid-column: 2; }
  .cnn-shape-flow li:not(:last-child)::after { top: auto; bottom: -12px; left: 45px; right: auto; transform: rotate(135deg); }
  .article-content .cnn-shape-flow p { margin-top: 6px; }
}
.transfer-overview { margin: 32px 0; padding: 28px 0; border-block: 1px solid var(--line); }
.transfer-overview > figcaption { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; font-size: 18px; line-height: 1.8; }
.transfer-overview > figcaption img { width: 64px; height: 72px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.transfer-overview > figcaption > div > span,.transfer-overview > figcaption > div > strong { display: block; }
.transfer-overview > figcaption > div > span { color: var(--ink-soft); }
.transfer-overview > figcaption > div > strong { color: var(--accent); }
.transfer-overview .transfer-structure-label { font-size: 18px; font-weight: 700; margin: 0 0 24px; }
.transfer-overview > svg { display: block; width: 100%; height: auto; overflow: hidden; }
.transfer-overview > .transfer-model-portrait { display: none; }
.transfer-overview svg text { font-family: inherit; fill: var(--ink); }
.transfer-backbone-frame { fill: var(--paper-raised); stroke: var(--lesson-color-426244,#426244); stroke-width: 1.5; }
.transfer-head-frame { fill: var(--paper-raised); stroke: var(--ink-soft); stroke-width: 1.5; }
.transfer-preserved-wires path,.transfer-head-wires path { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; }
.transfer-preserved-nodes circle { fill: var(--paper); stroke: var(--lesson-color-426244,#426244); stroke-width: 2; }
.transfer-output-nodes circle { fill: var(--paper); stroke: var(--ink-soft); stroke-width: 2; }
.transfer-new-head .transfer-head-frame,.transfer-new-head .transfer-head-wires path { stroke: var(--accent); }
.transfer-new-head .transfer-output-nodes circle { fill: var(--accent-soft); stroke: var(--accent); }
.transfer-model-label { font-size: 23px; font-weight: 700; }
[data-transfer-backbone] .transfer-model-label { fill: var(--lesson-color-426244,#426244); }
.transfer-new-head .transfer-model-label { fill: var(--accent); }
.transfer-class-label { font-size: 23px; }
.transfer-feature-label,.transfer-head-state { font-size: 20px; }
.transfer-empty-label { font-size: 25px; font-weight: 700; }
.transfer-empty-head .transfer-head-frame { stroke-dasharray: 7 6; }
[data-transfer-head="new"],[data-transfer-head="empty"] { opacity: 0; visibility: hidden; }
[data-transfer-state="empty"] [data-transfer-head="old"],[data-transfer-state="adding"] [data-transfer-head="old"],[data-transfer-state="ready"] [data-transfer-head="old"] { opacity: 0; visibility: hidden; }
[data-transfer-state="empty"] [data-transfer-head="empty"],[data-transfer-state="adding"] [data-transfer-head="new"],[data-transfer-state="ready"] [data-transfer-head="new"] { opacity: 1; visibility: visible; }
[data-transfer-state="training"] [data-transfer-head="old"],[data-transfer-state="trained"] [data-transfer-head="old"] { opacity: 0; visibility: hidden; }
[data-transfer-state="training"] [data-transfer-head="new"],[data-transfer-state="trained"] [data-transfer-head="new"] { opacity: 1; visibility: visible; }
.transfer-overview .transfer-process { display: flex; gap: 12px; justify-content: space-between; list-style: none; margin: 0 0 24px; padding: 0; }
.transfer-overview .transfer-process li { flex: 1; min-width: 0; margin: 0; padding: 0; }
.transfer-process button { width: 100%; height: 100%; min-height: 44px; padding: 10px 4px; border: 0; border-bottom: 2px solid var(--line); background: transparent; color: var(--ink-soft); font-size: 18px; line-height: 1.6; cursor: pointer; }
.transfer-process button[aria-current="step"] { color: var(--accent); border-color: var(--accent); font-weight: 700; }
.transfer-process button:hover { background: var(--paper-raised); }
.transfer-process button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.transfer-new-data { padding: 20px 0; margin-top: 20px; border-block: 1px solid var(--line); }
.transfer-new-data > strong { display: block; font-size: 16px; margin-bottom: 14px; }
.transfer-new-data > div { display: flex; flex-wrap: wrap; gap: 10px; }
.transfer-new-data > div > [data-transfer-example] { display: inline-block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; }
.transfer-new-data > div > [data-transfer-example].is-current { color: var(--paper-raised); background: var(--accent); border-color: var(--accent); }
.transfer-overview [data-transfer-data-status] { font-size: 16px; line-height: 1.8; margin: 14px 0 0; }
.transfer-model-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 20px; }
.transfer-overview .transfer-model-status { min-height: 4em; font-size: 18px; line-height: 1.9; margin: 0 0 20px; }
.transfer-overview .transfer-example-caption { color: var(--ink-soft); font-size: 16px; line-height: 1.8; margin: 0; }
.transfer-overview .transfer-photo-credit { color: var(--ink-soft); font-size: 14px; line-height: 1.8; margin: 16px 0 0; }
@media(max-width:650px) {
 .transfer-overview > .transfer-model-landscape { display: none; }
 .transfer-overview > .transfer-model-portrait { display: block; max-width: 420px; margin-inline: auto; }
 .transfer-overview .transfer-model-label { font-size: 18px; }
 .transfer-overview .transfer-feature-label,.transfer-overview .transfer-head-state { font-size: 16px; }
 .transfer-overview > figcaption { font-size: 16px; gap: 14px; }
}
/* Keep the four calculation nodes compact enough to read as one whole. */
.mse-lab .mse-flow-step { margin:0;padding:14px 0 24px; }
.mse-lab .mse-flow-step:last-child { padding-bottom:0; }
.mse-lab .mse-flow-step h3 { font-size:18px;line-height:1.4;margin:0 0 8px; }
.mse-lab .mse-stage-values>.matrix-standalone { --matrix-cell-min:36px;--matrix-number-size:24px;padding:4px 0; }
.mse-lab .mse-stage-values .matrix-editor-body { padding:6px 0; }
.mse-lab .mse-stage-values .matrix-column-index { display:none; }
.mse-lab .mse-stage-values .matrix-editor-heading { font-size:13px;line-height:1.5; }
.mse-lab .mse-input-note { font-size:14px;line-height:1.6;margin:8px 0 0; }
.mse-lab .mse-equations p { font-size:21px;line-height:1.6;margin:2px 0; }
.mse-lab .mse-flow-arrow { margin:10px 0 -18px; }
@media(max-width:650px){.mse-lab .mse-equations p{font-size:19px;}.mse-lab .mse-stage-values>.matrix-standalone{--matrix-cell-min:30px;--matrix-number-size:22px;}}

.python-learning-result, .learning-curve-primary, .learning-curve-numbers { width: 100%; min-width: 0; max-width: 100%; }
.learning-curve-primary:empty { display: none; }
.learning-curve-primary > section, .learning-curve-numbers > div, .learning-curve-numbers section { min-width: 0; max-width: 100%; }
.learning-curve-primary > section > p, .learning-curve-numbers section > p { color: var(--ink-soft); font-size: 13px; text-align: center; }
.learning-curve { margin: 24px 0; padding-top: 28px; border-top: 1px solid var(--line); }
.learning-curve figcaption { color: var(--ink); font-size: 22px; font-weight: 700; }
.learning-curve-legend { display: flex; flex-wrap: wrap; gap: 14px 28px; padding: 0; margin: 20px 0; list-style: none; font-size: 19px; }
.learning-curve-legend li { display: inline-flex; align-items: center; gap: 10px; }
.learning-curve-legend li::before { content: ''; width: 30px; border-top: 3px solid var(--comment); }
.learning-curve-legend .learning-curve-valid-key::before { border-top: 3px dashed var(--accent); }
.learning-curve svg { display: block; width: 100%; max-width: 780px; height: auto; margin: 0 auto 12px; overflow: visible; }
.learning-curve svg text { font-family: inherit; font-size: 24px; fill: var(--ink-soft); stroke: none; }
.learning-curve-grid path { fill: none; stroke: var(--line-soft); }
.learning-curve-axis { fill: none; stroke: var(--ink-soft); stroke-width: 1.5; }
.learning-curve-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.learning-curve-1 { stroke: var(--comment); }
.learning-curve-2 { stroke: var(--accent); stroke-dasharray: 7 5; }
.learning-curve-best { fill: var(--paper); stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke; }
.learning-curve-cursor { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 3 5; }
.learning-curve-point { stroke: var(--paper); stroke-width: 2; fill: var(--comment); vector-effect: non-scaling-stroke; }
.learning-curve-point.learning-curve-2 { fill: var(--accent); stroke-dasharray: none; }
.learning-curve-control { display: flex; align-items: center; gap: 20px; font-size: 19px; }
.learning-curve-control input { flex: 1; min-width: 0; height: 32px; accent-color: var(--accent); }
.learning-curve-control input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.learning-curve-shortcuts { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.learning-curve-shortcuts button { min-height:44px; padding-inline:12px; }
.learning-curve-readout { font-variant-numeric: tabular-nums; color: var(--ink); min-height: 2.4em; margin: 12px 0; }
.learning-curve-reading-part { display: inline-block; white-space: nowrap; max-inline-size: 100%; }
.learning-curve-best-label { font-size: 18px; color: var(--ink-soft); }
.learning-curve-error { color: var(--ink); font-size: 19px; }
@media (max-width: 650px) {
  .learning-curve svg text { font-size: 40px; }
  .learning-curve figcaption { font-size: 21px; }
  .learning-curve-legend { gap: 10px 20px; }
  .learning-curve-control { gap: 14px; }
}
@media (max-width: 380px) {
  .learning-curve:is([data-learning-digits="4"],[data-learning-digits="6"]) svg text { font-size: 44px; }
}

.achievement-dock { position:fixed; right:24px; bottom:max(18px,env(safe-area-inset-bottom)); width:330px; z-index:30; font-size:14px; line-height:1.55; }
.achievement-bubble { position:relative; margin-right:22px; margin-bottom:4px; padding:18px; border-radius:16px; background:var(--paper-raised); box-shadow:0 6px 24px #492b1926; }
.achievement-bubble-heading { display:flex; gap:12px; align-items:center; justify-content:space-between; }
.achievement-bubble-heading>strong { font-size:16px; }
.achievement-bubble p { margin:9px 0 14px; color:var(--ink-soft); }
.achievement-bubble .button { font-size:14px; padding:9px 14px; min-height:40px; }
.achievement-bubble .button-primary { background:var(--accent); border-color:var(--accent); color:var(--paper-raised); }
.achievement-bubble .button-primary:hover:not(:disabled) { background:var(--accent-hover); border-color:var(--accent-hover); }
.achievement-icon-button { display:inline-flex; align-items:center; justify-content:center; padding:7px; min-width:32px; min-height:32px; background:none; border:0; border-radius:8px; color:var(--ink-soft); }
.achievement-icon-button:hover { background:var(--accent-soft); }
.achievement-dock-footer { display:flex; justify-content:flex-end; align-items:flex-end; gap:8px; }
.achievement-book-button { display:flex; align-items:center; justify-content:center; gap:6px; background:var(--paper-raised); padding:9px 12px; margin-bottom:7px; border:1px solid var(--line); border-radius:24px; min-height:40px; color:var(--ink); font-size:14px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.achievement-book-button:hover { background:var(--accent-soft); }
.achievement-bear-button { position:relative; flex:0 0 96px; width:96px; height:96px; background:none; border:0; padding:0; border-radius:16px; }
.achievement-bear-idle { display:block; width:100%; height:100%; background-size:400% 200%; background-position:0 0; background-repeat:no-repeat; transition:opacity 120ms ease-out; }
.achievement-bear-gesture { display:none; position:absolute; inset:0; background-size:400% 200%; background-repeat:no-repeat; background-position:0 0; }
.achievement-bear-gesture[data-gesture="heart"] { background-position:0 100%; }
.achievement-dock.is-gesturing .achievement-bear-idle { opacity:0; }
.achievement-dock.is-gesturing .achievement-bear-gesture { display:block; animation:achievement-gesture 800ms steps(3,end) forwards; }
.achievement-dock.is-collapsed { width:230px; }
.achievement-dock:has([data-achievement-collection]:not([hidden])) { z-index:70; }
.achievement-dock.is-collapsed .achievement-bubble { display:none; }
.achievement-collection { position:absolute; right:0; bottom:calc(100% + 12px); width:330px; padding:18px; background:var(--paper-raised); border-radius:16px; box-shadow:0 8px 30px #492b1926; max-height:calc(100dvh - 150px); overflow-y:auto; scrollbar-color:var(--line) var(--paper); }
/* 给固定页头、小节导航、底部助手和两端间距分别留位，长译文在列表内滚动。 */
.page-lesson .achievement-dock { --achievement-footer-height:96px; }
.page-lesson .achievement-collection { max-height:max(96px,calc(100dvh - var(--lesson-header-height,76px) - var(--lesson-navigation-height,82px) - var(--achievement-footer-height) - 84px - env(safe-area-inset-bottom) - 36px)); overscroll-behavior:contain; }
.achievement-collection-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.achievement-collection h2 { font-size:18px; margin:0; }
.achievement-collection p { font-size:14px; margin:8px 0 14px; color:var(--ink-soft); }
.achievement-collection ol { padding:0; margin:0; list-style:none; }
.achievement-collection li+li { border-top:1px solid var(--line-soft); }
.achievement-collection li>button { display:flex; align-items:center; gap:12px; width:100%; padding:10px 0; text-align:left; background:none; border:0; }
.achievement-collection li>button>svg { margin-left:auto; }
.achievement-collection strong { display:block; font-size:14px; font-weight:700; }
.achievement-collection small { display:block; font-size:12px; color:var(--ink-soft); margin-top:2px; }
.achievement-medal { display:flex; flex:0 0 32px; align-items:center; justify-content:center; width:32px; height:32px; border:1px solid var(--line); border-radius:50%; font-size:14px; }
.achievement-medal>svg { display:none; }
.is-earned .achievement-medal { color:var(--paper-raised); background:var(--accent); border-color:var(--accent); }
.is-earned .achievement-medal>svg { display:block; }
.is-earned .achievement-medal>span { display:none; }
.achievement-collection .achievement-local-note { margin:14px 0 0; font-size:12px; }
.achievement-ending { display:grid; grid-template-columns:120px minmax(0,1fr); gap:28px; align-items:center; margin:56px 0 0; padding:32px 0 0; border-top:1px solid var(--line); }
.achievement-ending-bear { display:block; width:120px; height:120px; background-size:400% 200%; background-position:100% 100%; background-repeat:no-repeat; }
.article-content .achievement-ending h2 { margin:0 0 14px; font-size:24px; }
.achievement-ending .achievement-route-note { font-size:14px; color:var(--ink-soft); }
.achievement-ending .achievement-ending-count { color:var(--accent); font-size:16px; font-variant-numeric:tabular-nums; }
.achievement-ending .text-button { display:inline-block; margin-left:14px; }
.achievement-ending.is-complete h2 { color:var(--accent); }
@keyframes achievement-gesture { from { background-position-x:0%; } to { background-position-x:100%; } }
@media(max-width:650px) {
  .page-lesson .achievement-dock { --achievement-footer-height:70px; }
  .achievement-dock { right:12px; bottom:max(12px,env(safe-area-inset-bottom)); width:min(300px,calc(100% - 24px)); }
  .achievement-dock.is-collapsed { width:200px; }
  .achievement-bear-button { flex-basis:70px; width:70px; height:70px; }
  .achievement-bubble { margin-right:8px; padding:14px; }
  .achievement-collection { position:fixed; right:12px; bottom:calc(84px + var(--achievement-footer-height,70px) + 12px + env(safe-area-inset-bottom)); width:min(330px,calc(100% - 24px)); }
  .achievement-ending { grid-template-columns:76px minmax(0,1fr); gap:16px; margin-top:40px; padding-top:24px; }
  .achievement-ending-bear { width:76px; height:76px; }
  .article-content .achievement-ending h2 { font-size:22px; }
  .achievement-ending .text-button { margin:12px 0 0; display:block; }
}
@media(prefers-reduced-motion:reduce) { .achievement-bear-idle { transition:none; } .achievement-dock.is-gesturing .achievement-bear-gesture { animation:none; background-position-x:100%; } }

/* Python练习延续暖纸主题；编辑、执行、输出组成一组连续操作。 */
.python-playground { max-width: 900px; min-width: 0; margin: 18px auto 30px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); }
.python-playground-header { display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;border-bottom:1px solid var(--line-soft); }
.python-playground-header h2 { font-size:16px;line-height:1.6;font-weight:650;margin:0; }
.python-playground-header>span { color:var(--muted);font-size:13px;white-space:nowrap; }
.python-playground-hint { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;font-size:14px;line-height:1.8;color:var(--ink-soft);padding:12px 20px;margin:0; }
.python-playground-hint>span { flex:1;min-width:180px; }
.python-playground-hint>.button { flex:none; }
.python-editor-wrap { position:relative;min-width:0;min-height:100px;background:var(--code-background,var(--lesson-color-f5eddf,#f5eddf)); }
.python-editor { width:100%;height:auto;min-height:100px;margin:0;padding:16px 20px;border:0;font-family:var(--mono);font-size:14px;font-weight:400;line-height:1.85;letter-spacing:normal;tab-size:4;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal; }
.python-editor { display:block;position:relative;resize:none;background:transparent;color:var(--ink);caret-color:var(--ink);overflow:hidden;border-radius:0; }
.python-monaco-host { width:100%;height:100%;min-width:0; }
.python-monaco-host[hidden], .python-editor[hidden] { display:none; }
.python-editor-hint { margin:0;padding:9px 20px 0;font-size:13px;line-height:1.7;color:var(--ink-soft); }
.python-editor::selection { background:var(--lesson-color-e2d0b8,#e2d0b8); }
.python-editor:focus-visible { outline:2px solid var(--accent);outline-offset:-2px; }
.python-playground-actions { display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:14px 20px; }
.python-playground-actions .button:disabled { opacity:.55;cursor:default; }
.python-playground-actions .button-primary { background:var(--accent);border-color:var(--accent);color:var(--paper-raised); }
.python-playground-actions .button-primary:hover:not(:disabled) { background:var(--accent-hover); }
.python-playground-status { flex:1;min-width:160px;font-size:14px;color:var(--ink-soft);line-height:1.7; }
.python-output-header { padding:10px 20px;border-top:1px solid var(--line-soft);font-size:14px;font-weight:600;color:var(--ink-soft); }
.python-output { min-height:90px;max-height:280px;padding:5px 20px 18px;margin:0;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-family:var(--mono);font-size:14px;line-height:1.8;color:var(--ink);scrollbar-width:thin;scrollbar-color:var(--muted) var(--paper); }
.python-output:focus-visible { outline:2px solid var(--accent);outline-offset:-3px; }
@media(max-width:600px){
 .python-playground-header{padding:13px 14px;align-items:flex-start;}
 .python-playground-header h2{font-size:14px;}
 .python-playground-header>span{font-size:12px;}
 .python-playground-hint{padding:10px 14px;font-size:13px;}
 .python-editor{padding:14px;}
 .python-editor-hint{padding:9px 14px 0;}
 .python-playground-actions{padding:12px 14px;gap:8px;}
 .python-playground-status{flex-basis:100%;}
 .python-output-header{padding:10px 14px;}
 .python-output{padding:5px 14px 14px;font-size:13px;}
}
.python-example-data{margin:0 22px 22px;padding:14px 0;border-block:1px solid var(--line);color:var(--ink-soft);}
.python-example-data>summary{cursor:pointer;min-height:30px;font-size:16px;}
.python-example-data>p{font-size:15px;line-height:1.9;}
.python-example-data .code-block{margin-top:18px;}
@media(max-width:650px){.python-example-data{margin-inline:16px;}}

/* 翻译后的说明按内容换行；编辑器与按钮保留可读字号。 */
.python-playground-header h2{min-width:0;overflow-wrap:anywhere;font-size:18px;text-wrap:balance;}
.python-playground-hint,.python-editor,.python-playground-status,.python-output,.python-output-header{font-size:16px;}
.python-editor-hint{font-size:14px;}
.python-playground-actions :is(.button,.text-button),.python-playground-hint>.button{min-height:44px;font-size:16px;white-space:normal;}
.python-playground-hint>span{min-width:min(180px,100%);}
.python-playground-hint>.button{max-width:100%;}
.python-playground:lang(ko) :is(p,summary,h2,.python-playground-status){word-break:keep-all;overflow-wrap:anywhere;}

.python-image-output, .python-image-numbers { grid-column: 1 / -1; min-width: 0; width: 100%; }
.python-image-result { margin: 0; padding: 24px 0; text-align: center; }
.python-image-result figcaption { font-size: 21px; font-weight: 700; margin-bottom: 22px; }
.python-image-result svg { display: block; width: 220px; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--line); background: white; }
.python-image-result p, .python-image-error { color: var(--ink-soft); font-size: 17px; line-height: 1.8; }
.python-image-numbers { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.python-image-numbers summary { color: var(--ink); cursor: pointer; padding: 10px 0; }
.python-image-numbers summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.python-image-numbers p { color: var(--ink-soft); font-size: 13px; text-align: center; }

.python-review-output, .python-review-numbers { grid-column: 1 / -1; min-width: 0; width: 100%; }
.review-queue { padding: 24px 0 8px; }
.review-queue h3 { margin: 0 0 18px; color: var(--ink); font-size: 22px; }
.review-queue > p, .review-queue-error { color: var(--ink-soft); font-size: 17px; line-height: 1.8; }
.review-queue ol { padding: 0; margin: 28px 0 0; list-style: none; }
.review-queue li { margin: 0; border-top: 1px solid var(--line); }
.review-queue summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; padding: 20px 8px; color: var(--ink); cursor: pointer; }
.review-queue .review-toggle { width: 20px; height: 20px; color: var(--accent); transition: transform .18s ease-out; }
.review-queue details[open] .review-toggle { transform: rotate(180deg); }
.review-queue summary [data-review-state] { font-weight: 700; }
.review-queue summary span + span { font-size: 16px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.review-queue summary:hover { background: var(--paper-raised); }
.review-queue summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.review-queue .review-text { margin: 0 8px 18px; color: var(--ink); font-size: 22px; line-height: 1.8; overflow-wrap: anywhere; }
.review-queue .text-button { margin: 0 8px 22px; min-height: 44px; max-inline-size: calc(100% - 16px); white-space: normal; text-align: start; }
.python-review-numbers { padding: 18px 0; margin-top: 28px; border-top: 1px solid var(--line); }
.python-review-numbers > summary { color: var(--ink); padding: 10px 0; cursor: pointer; }
.python-review-numbers > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 650px) {
  .review-queue summary { display: grid; grid-template-columns: minmax(0,1fr) 20px; gap: 4px 12px; padding: 16px 4px; font-size: 18px; line-height: 1.6; }
  .review-queue summary span { min-width: 0; grid-column: 1; }
  .review-queue summary span + span { font-size: 16px; line-height: 1.6; text-align: start; }
  .review-queue .review-toggle { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
@media (prefers-reduced-motion: reduce) { .review-queue .review-toggle { transition: none; } }

.frame-comparison { width:100%; min-width:0; padding:28px 0 12px; }
.frame-comparison h3 { margin:0 0 18px; font-size:22px; }
.frame-comparison-note, .frame-comparison-error, .frame-comparison-error-readout { color:var(--ink-soft); font-size:17px; line-height:1.8; }
.frame-comparison-controls { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:24px 0 18px; }
.frame-comparison-controls .button { min-height:44px; }
.frame-comparison-controls [data-frame-label] { margin-left:auto; font-size:17px; font-variant-numeric:tabular-nums; }
.frame-comparison-range { display:flex; align-items:center; gap:18px; color:var(--ink-soft); font-size:17px; }
.frame-comparison-range input { flex:1; min-width:60px; min-height:44px; accent-color:var(--accent); cursor:pointer; }
.frame-comparison-mode { display:inline-flex; align-items:center; min-height:44px; gap:10px; margin-top:10px; cursor:pointer; }
.frame-comparison-mode input { flex:none; width:20px; height:20px; margin:0; accent-color:var(--accent); }
.frame-comparison-images { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; align-items:start; margin:24px 0; }
.frame-comparison-images figure { min-width:0; margin:0; text-align:center; }
.frame-comparison-images figcaption { font-size:18px; margin-bottom:14px; }
.frame-comparison-images canvas { display:block; width:210px; max-width:100%; height:auto; margin:0 auto; border:1px solid var(--line); border-radius:8px; image-rendering:pixelated; }
.frame-comparison-numbers { margin-top:24px; padding-top:14px; border-top:1px solid var(--line); }
.frame-comparison-numbers summary { min-height:44px; padding:10px 0; color:var(--ink); cursor:pointer; }
.frame-comparison-numbers [data-frame-matrices] { display:grid; gap:28px; }
.frame-comparison-numbers .matrix-shape { white-space:normal; overflow-wrap:anywhere; }
.frame-comparison-numbers .matrix-window button { min-width:44px; min-height:44px; }
.frame-comparison-range input:focus-visible, .frame-comparison-numbers summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@media(max-width:650px){
  .frame-comparison { padding-top:22px; }
  .frame-comparison-controls { gap:10px; }
  .frame-comparison-controls .button { padding-inline:13px; }
  .frame-comparison-controls [data-frame-label] { margin-left:0; }
  .frame-comparison-images { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px 12px; }
  .frame-comparison-reference { grid-column:1 / -1; }
  .frame-comparison-reference canvas { width:136px; }
  .frame-comparison-images figcaption { font-size:17px; }
}
.python-frame-output { grid-column:1 / -1; width:100%; min-width:0; }

.python-segmentation-output { grid-column:1 / -1; width:100%; min-width:0; }
.segmentation-result { width:100%; min-width:0; padding:28px 0 12px; }
.segmentation-result h3 { margin:0 0 10px; font-size:22px; }
.segmentation-note,.segmentation-error,.segmentation-readout { color:var(--ink-soft); font-size:17px; line-height:1.8; }
.segmentation-controls { display:flex; flex-wrap:wrap; gap:10px; margin:20px 0 14px; }
.segmentation-controls .button,.segmentation-position .button { min-height:44px; }
.segmentation-controls [aria-pressed="true"] { background:var(--accent); color:var(--paper-raised); }
.segmentation-threshold { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px 20px; padding:10px 16px; margin:0 0 24px; border:1px solid var(--line); border-radius:12px; background:var(--paper-raised); }
.segmentation-result [hidden] { display:none; }
.segmentation-threshold label { display:flex; flex-wrap:wrap; align-items:center; gap:0 12px; min-width:0; }
.segmentation-threshold input { flex:1; min-width:104px; height:44px; accent-color:var(--accent); }
.segmentation-threshold strong,.segmentation-kept { color:var(--accent); font-variant-numeric:tabular-nums; }
.segmentation-result .segmentation-threshold p { margin:0; }
.segmentation-threshold .segmentation-note { grid-column:1 / -1; font-size:15px; }
.segmentation-kept { line-height:1.5; font-weight:700; }
.segmentation-images { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.segmentation-images figure { display:flex; flex-direction:column; min-width:0; margin:0; text-align:center; }
.segmentation-images figcaption { margin:0 0 8px; font-size:17px; line-height:1.4; }
.segmentation-result canvas { display:block; width:200px; max-width:100%; height:auto; margin:0 auto; border:1px solid var(--line); border-radius:3px; cursor:crosshair; image-rendering:pixelated; }
.segmentation-images canvas { margin-top:auto; }
.segmentation-result .segmentation-readout { margin:16px 0 6px; }
.segmentation-position { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; margin:0 0 16px; }
.segmentation-position label { display:flex; flex:1 1 175px; align-items:center; gap:8px; min-width:0; font-size:17px; }
.segmentation-position input { flex:1; min-width:80px; min-height:44px; accent-color:var(--accent); }
.segmentation-result details { margin-top:24px; padding-top:14px; border-top:1px solid var(--line); }
.segmentation-result summary { min-height:44px; padding:10px 0; cursor:pointer; color:var(--ink); }
.segmentation-result .matrix-shape { white-space:normal; overflow-wrap:anywhere; }
.segmentation-result .matrix-window button { min-width:44px; min-height:44px; }
.segmentation-result input:focus-visible,.segmentation-result summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@media(max-width:650px){
 .segmentation-images { gap:8px; }
 .segmentation-images figcaption { font-size:15px; }
 .segmentation-threshold { grid-template-columns:1fr; padding:8px 12px; gap:3px; }
 .segmentation-position { gap:4px 12px; }
 .segmentation-controls { gap:10px; }
 .segmentation-controls .button { padding-inline:12px; }
 .segmentation-result [data-seg-pixel] .matrix-standalone { --matrix-number-size:22px; --matrix-cell-min:42px; }
}

.lesson-audio { margin:32px 0; padding:24px 0; border-block:1px solid var(--line); }
.lesson-audio audio { display:block; width:min(100%,520px); margin:18px auto; }
.lesson-audio figcaption { color:var(--ink-soft); font-size:18px; text-align:center; }
.audio-result { padding:32px 0 20px; color:var(--ink); }
.audio-result h3 { margin:0 0 12px; font-size:22px; }
.audio-result h4 { margin:22px 0 10px; font-size:18px; }
.audio-result-note,.audio-result-readout,.audio-result-error { color:var(--ink-soft); font-size:17px; line-height:1.85; overflow-wrap:anywhere; }
.audio-result audio { display:block; width:min(100%,520px); margin:12px 0 22px; }
.audio-wave,.audio-features { margin:32px 0; }
.audio-result figcaption { margin-bottom:18px; font-size:18px; line-height:1.7; }
.audio-result figcaption span { display:block; color:var(--ink-soft); font-size:17px; }
.audio-result canvas { display:block; width:100%; border:1px solid var(--line); cursor:crosshair; }
.audio-wave canvas { height:160px; }
.audio-features canvas { height:220px; image-rendering:pixelated; }
.audio-result-position { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin:32px 0 24px; }
.audio-result-position label { display:grid; gap:12px; font-size:17px; }
.audio-result-position input { min-width:0; width:100%; min-height:44px; accent-color:var(--accent); }
.audio-result input:focus-visible,.audio-result-numbers summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.audio-result .audio-class-order { display:grid; gap:8px; margin:0 0 18px; padding:0; list-style:none; }
.audio-class-order li { display:grid; grid-template-columns:minmax(0,1fr) minmax(72px,1.2fr) minmax(6ch,max-content); align-items:center; gap:10px; color:var(--ink); font-size:16px; line-height:1.4; }
.audio-class-order small { font-size:13px; color:var(--accent); white-space:nowrap; }
.audio-class-order strong { text-align:right; font-variant-numeric:tabular-nums; }
.audio-class-order meter { width:100%; height:12px; }
.audio-class-order meter::-webkit-meter-bar { border:0; border-radius:999px; background:var(--line-soft); }
.audio-class-order meter::-webkit-meter-optimum-value { border-radius:999px; background:var(--ink-soft); }
.audio-class-order meter::-moz-meter-bar { border-radius:999px; background:var(--ink-soft); }
.audio-class-winner meter::-webkit-meter-optimum-value { background:var(--accent); }
.audio-class-winner meter::-moz-meter-bar { background:var(--accent); }
.audio-decision { padding:12px 16px; border:1px solid var(--line); border-radius:12px; background:var(--paper-raised); }
.audio-decision label { display:flex; flex-wrap:wrap; align-items:center; gap:0 12px; font-size:17px; }
.audio-decision input { flex:1; min-width:112px; height:44px; accent-color:var(--accent); }
.audio-decision label strong,.audio-decision-state strong { color:var(--accent); font-variant-numeric:tabular-nums; }
.audio-result .audio-decision-state { margin:2px 0 5px; min-height:1.5em; }
.audio-decision-state span { color:var(--ink-soft); }
.audio-result .audio-decision .audio-result-note { margin:0; font-size:15px; line-height:1.6; }
.audio-result-numbers { margin:32px 0 0; padding:16px 0; border-top:1px solid var(--line); }
.audio-result-numbers summary { min-height:44px; padding:10px 0; cursor:pointer; font-size:17px; }
.audio-result-numbers summary:hover { color:var(--accent); }
.audio-result-numbers [data-matrix-window] { min-height:44px; }
.audio-result-numbers .matrix-editor-heading { flex-wrap:wrap; }
@media(max-width:650px) {
  .audio-result { padding-top:24px; }
  .audio-result-position { grid-template-columns:1fr; gap:20px; }
  .audio-features canvas { height:180px; }
  .audio-class-order li { grid-template-columns:minmax(0,1fr) minmax(32px,.65fr) minmax(6ch,max-content); gap:7px; }
  .audio-decision { padding:10px 12px; }
  .audio-result figcaption,.lesson-audio figcaption { font-size:17px; }
}

.python-retrieval-output { flex-basis:100%; width:100%; min-width:0; }
.retrieval-result { width:100%; min-width:0; padding:32px 0 20px; color:var(--ink); }
.retrieval-result h3 { margin:0 0 18px; font-size:22px; }
.retrieval-result-note,.retrieval-result-readout,.retrieval-result-error { font-size:17px; line-height:1.85; color:var(--ink-soft); overflow-wrap:anywhere; }
.retrieval-overview { display:grid; grid-template-columns:minmax(178px,.9fr) minmax(0,1.7fr); align-items:center; gap:18px 24px; padding:8px 0 16px; border-bottom:1px solid var(--line); }
.retrieval-query { display:flex; align-items:center; gap:14px; min-width:0; margin:0; }
.retrieval-query figcaption { font-size:17px; line-height:1.5; }
.retrieval-query figcaption span { display:block; font-size:15px; color:var(--ink-soft); margin-top:5px; overflow-wrap:anywhere; }
.retrieval-query canvas { width:clamp(70px,8vw,104px); height:auto; border-radius:5px; image-rendering:pixelated; }
.retrieval-preview label { display:flex; align-items:center; gap:12px; font-size:17px; }
.retrieval-preview input { flex:1; min-width:68px; height:44px; accent-color:var(--accent); }
.retrieval-preview strong { color:var(--accent); font-variant-numeric:tabular-nums; }
.retrieval-result .retrieval-preview p { font-size:15px; line-height:1.6; margin:4px 0 0; }
.retrieval-candidates { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0 14px; }
.retrieval-candidate { display:grid; justify-items:center; align-content:start; gap:7px; min-width:0; padding:10px 6px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:transparent; cursor:pointer; font:inherit; }
.retrieval-candidate[hidden] { display:none; }
.retrieval-candidate[aria-pressed="true"] { border-color:var(--accent); background:var(--paper-raised); }
.retrieval-candidate:hover { border-color:var(--accent); }
.retrieval-candidate:focus-visible,.retrieval-result summary:focus-visible,.retrieval-preview input:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.retrieval-candidate canvas { width:min(100%,96px); height:auto; border-radius:4px; image-rendering:pixelated; }
.retrieval-rank,.retrieval-score { font-size:16px; font-variant-numeric:tabular-nums; }
.retrieval-reference { min-width:0; max-width:100%; font-size:15px; line-height:1.4; color:var(--ink-soft); overflow-wrap:anywhere; }
.retrieval-result-readout strong { display:block; color:var(--ink); }
.retrieval-calculation,.retrieval-numbers { min-width:0; margin-top:28px; padding:16px 0; border-top:1px solid var(--line); }
.retrieval-result summary { padding:10px 0; min-height:44px; cursor:pointer; font-size:17px; }
.retrieval-result summary:hover { color:var(--accent); }
.retrieval-result .operation-demo { margin-inline:0; }
.retrieval-result .matrix-editor-heading { flex-wrap:wrap; }
.retrieval-result [data-matrix-window] { min-height:44px; }
@media(max-width:650px) {
  .retrieval-result { padding-top:16px; }
  .retrieval-overview { grid-template-columns:minmax(76px,.85fr) minmax(0,1.8fr); gap:12px; padding:0 0 12px; }
  .retrieval-query { display:grid; gap:5px; }
  .retrieval-query canvas { width:64px; }
  .retrieval-query figcaption { font-size:15px; }
  .retrieval-query figcaption span { margin-top:1px; font-size:13px; }
  .retrieval-preview label { flex-wrap:wrap; gap:0 8px; font-size:16px; }
  .retrieval-candidates { gap:6px; }
  .retrieval-candidate { gap:4px; padding:8px 4px; }
  .retrieval-rank,.retrieval-score { font-size:14px; }
  .retrieval-reference { font-size:13px; }
}

.python-document-output { display:block; flex:1 1 100%; grid-column:1/-1; width:100%; min-width:0; }
.document-extra-tensors { width:100%; min-width:0; grid-column:1/-1; }
.document-answer { width:100%; min-width:0; padding:28px 0 16px; color:var(--ink); }
.document-answer h3 { margin:0 0 18px; font-size:24px; line-height:1.6; }
.document-answer h4 { margin:0 0 12px; font-size:19px; }
.document-answer-question { margin:0 0 22px; font-size:21px; line-height:1.7; }
.document-check { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 24px; }
.document-evidence,.document-generation { min-width:0; padding:16px 0 0; border-top:1px solid var(--line); }
.document-evidence blockquote { margin:0 0 10px; padding:0; border:0; font-size:24px; line-height:1.8; overflow-wrap:anywhere; }
.document-evidence p,.document-answer-note,.document-answer-error { margin:8px 0; color:var(--ink-soft); font-size:17px; line-height:1.85; overflow-wrap:anywhere; }
.document-raw { display:block; min-height:1.8em; font-size:25px; line-height:1.8; overflow-wrap:anywhere; }
.document-mismatch { padding:.05em .12em; border-radius:4px; background:var(--accent-soft); color:var(--accent); text-decoration:underline; text-underline-offset:.2em; }
.document-verdict { grid-column:1/-1; display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; padding:12px 16px; border-radius:12px; background:var(--accent-soft); line-height:1.65; }
.document-verdict p { flex:1 1 260px; margin:0; }
.document-verdict strong,.document-verdict span { display:block; }
.document-verdict span { color:var(--ink-soft); font-size:16px; }
.document-verdict button { min-height:44px; }
.document-answer details { margin-top:20px; border-top:1px solid var(--line); }
.document-answer summary { min-height:44px; padding:14px 0; cursor:pointer; font-size:18px; line-height:1.8; }
.document-answer summary:hover { color:var(--accent); }
.document-answer summary:focus-visible,.document-ranking button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.document-ranking p,.document-calculation>p,.document-prefix-note { color:var(--ink-soft); font-size:17px; line-height:1.85; }
.document-prefix-note { min-block-size:2lh; }
.document-ranking ol { display:grid; gap:12px; margin:16px 0 0; padding:0; list-style:none; }
.document-ranking button { width:100%; min-height:58px; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:14px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--paper-raised); color:var(--ink); text-align:left; font:inherit; cursor:pointer; }
.document-ranking button[aria-pressed="true"] { border-color:var(--accent); background:var(--accent-soft); }
.document-ranking button:hover { background:var(--button-hover,var(--accent-soft)); }
.document-ranking q { quotes:none; line-height:1.7; overflow-wrap:anywhere; }
.document-ranking button span { color:var(--ink-soft); font-size:16px; font-variant-numeric:tabular-nums; }
.document-trace-controls { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:12px 0 20px; }
.document-trace-controls label { display:flex; align-items:center; gap:14px; flex:1 1 260px; font-size:16px; }
.document-trace-controls input { min-width:80px; flex:1; accent-color:var(--accent); }
.document-trace-controls input:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
.document-prefix { min-height:2.4em; margin:0; padding:14px 0; font-size:28px; line-height:1.8; color:var(--sage); overflow-wrap:anywhere; }
.document-prefix.is-unmatched { color:var(--accent); text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:8px; }
.document-answer .operation-demo { margin-inline:0; }
.document-answer .matrix-editor-heading { flex-wrap:wrap; }
.document-answer .document-picked-number { color:var(--accent); outline:2px solid var(--accent); outline-offset:-2px; }
.document-numbers section+section { margin-top:28px; }
.document-calculation { container:document-calculation / inline-size; }
.document-calculation .operation-equation .matrix-window { flex-direction:column; align-items:stretch; gap:10px; }
.document-calculation .operation-equation .matrix-window>span { text-align:center; white-space:normal; }
.document-calculation .operation-equation .matrix-window>div { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.document-calculation .operation-equation .matrix-window button { min-width:40px; min-height:44px; }
@container document-calculation (max-width:960px) {
  .document-calculation .operation-demo[data-operation-type=matmul] .operation-equation { grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr); gap:18px; }
  .document-calculation .operation-equation>.operation-operand[data-operation-role=left] { grid-column:1; }
  .document-calculation .operation-equation>.operation-sign:nth-child(2) { grid-column:2; text-align:center; }
  .document-calculation .operation-equation>.operation-operand[data-operation-role=right] { grid-column:3; }
  .document-calculation .operation-equation>.operation-sign:nth-child(4),
  .document-calculation .operation-equation>.operation-operand[data-operation-role=result] { grid-column:1/-1; text-align:center; }
}
@container document-calculation (max-width:640px) {
  .document-calculation .operation-demo[data-operation-type=matmul] .operation-equation { grid-template-columns:minmax(0,1fr); }
  .document-calculation .operation-equation>.operation-operand[data-operation-role],
  .document-calculation .operation-equation>.operation-sign:nth-child(2) { grid-column:1; }
}
@media(max-width:650px) {
  .document-answer { padding-top:24px; }
  .document-answer h3 { font-size:22px; }
  .document-check { grid-template-columns:minmax(0,1fr); gap:12px; }
  .document-evidence blockquote,.document-raw { font-size:22px; }
  .document-ranking button { grid-template-columns:minmax(0,1fr) auto; gap:8px; }
  .document-ranking q { grid-column:1/-1; grid-row:2; }
  .document-trace-controls .button { flex:1 1 auto; }
  .document-prefix { font-size:25px; }
}

.python-recommendation-output { flex-basis:100%; width:100%; min-width:0; }
.recommendation-result { min-width:0; padding:32px 0 20px; color:var(--ink); }
.recommendation-result h3 { font-size:22px; margin:0 0 18px; }
.recommendation-result h4 { font-size:20px; margin:28px 0 12px; }
.recommendation-note,.recommendation-readout,.recommendation-error { font-size:17px; line-height:1.85; color:var(--ink-soft); overflow-wrap:anywhere; }
.recommendation-users { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 18px; }
.recommendation-users .button { min-height:44px; max-inline-size:100%; }
.recommendation-users .button[aria-pressed="true"] { color:var(--accent); background:var(--accent-soft); border-color:var(--accent); }
.recommendation-result .recommendation-ranking { list-style:none; margin:20px 0 12px; padding:0; border-top:1px solid var(--line); }
.recommendation-ranking li { border-bottom:1px solid var(--line); }
.recommendation-ranking button { display:grid; grid-template-columns:max-content minmax(0,1fr) max-content; align-items:center; gap:clamp(8px,2vw,20px); width:100%; min-height:50px; padding:10px 12px; border:0; background:transparent; color:var(--ink); font:inherit; text-align:left; font-variant-numeric:tabular-nums; cursor:pointer; }
.recommendation-ranking button>span { font-size:15px; color:var(--ink-soft); }
.recommendation-ranking button>strong { min-width:0; overflow-wrap:anywhere; }
.recommendation-ranking button[aria-pressed="true"] { background:var(--accent-soft); }
.recommendation-ranking button:hover { color:var(--accent); }
.recommendation-ranking button:focus-visible,.recommendation-result summary:focus-visible,.recommendation-result select:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.recommendation-calculation,.recommendation-numbers,.recommendation-reference { margin-top:28px; padding:16px 0; border-top:1px solid var(--line); min-width:0; }
.recommendation-result summary { min-height:44px; padding:10px 0; font-size:17px; cursor:pointer; }
.recommendation-result summary:hover { color:var(--accent); }
.recommendation-controls { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:24px 0 16px; }
.recommendation-controls>span { margin-left:auto; font-size:17px; color:var(--ink-soft); }
.recommendation-unit { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:20px 0; font-size:17px; }
.recommendation-unit[hidden] { display:none; }
.recommendation-unit select { min-height:44px; max-width:100%; color:var(--ink); background:var(--paper-raised); border:1px solid var(--select-border); border-radius:12px; padding:8px 16px; font:inherit; }
.recommendation-stage { min-width:0; margin-top:24px; }
.recommendation-coordinate-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.recommendation-coordinate-grid>.recommendation-matrix:nth-child(3) { grid-column:1/-1; }
.recommendation-matrix { min-width:0; margin:20px 0; }
.recommendation-result .matrix-editor-heading { flex-wrap:wrap; }
.recommendation-result [data-matrix-window] { min-width:44px; min-height:44px; }
.recommendation-result .matrix-copy { min-width:44px; min-height:44px; }
.recommendation-result .operation-demo { margin-inline:0; }
.recommendation-equation { margin:28px 0; line-height:1.9; font-size:18px; overflow-wrap:anywhere; }
.recommendation-final-score { display:block; margin:20px 0; font-size:22px; font-weight:700; color:var(--accent); line-height:1.7; overflow-wrap:anywhere; }
.recommendation-final-score[hidden] { display:none; }
@media(min-width:651px) and (max-width:1100px) {
 .recommendation-result .operation-equation { grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); }
 .recommendation-result .operation-operand[data-operation-role=left] { grid-column:1/-1; }
 .recommendation-result .operation-sign:nth-child(2) { display:none; }
}
@media(max-width:650px) {
 .recommendation-result { padding-top:24px; }
 .recommendation-coordinate-grid { grid-template-columns:minmax(0,1fr); gap:0; }
 .recommendation-ranking button { padding-inline:8px; }
}

/* Monokai：与 Monaco 编辑器采用同一组语义色。 */
.code-block{background:#272822;border-color:#44463d;color:#f8f8f2;margin:28px 0 36px;}
.code-block figcaption{background:#22231e;border-color:#45473c;color:#e3e5d9;padding:15px 19px;}
.code-block .code-language,.code-block .line-number{color:#a8ac9c;}
.code-block .icon-button{color:#d4d8c9;}
.code-block .icon-button:hover{background:#3b3e33;}
.code-block pre{padding:22px 0;scrollbar-color:#626854 #272822;line-height:1.95;overflow-x:hidden;}
.code-block code{font-size:14px;}
.code-block .line-number{width:48px;flex-basis:48px;font-size:12px;}
.code-block .code-line{min-width:0;width:100%;align-items:flex-start;padding-right:22px;}
.code-block .line-content{flex:1;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;}
/* 原始数据单独横向查看，普通代码与上方说明始终完整换行。 */
.code-block .is-raw-data .line-content{white-space:pre;overflow-wrap:normal;overflow-x:auto;scrollbar-width:thin;}
.code-block .is-raw-data .line-content:focus-visible{outline:2px solid var(--honey);outline-offset:2px;}
.code-block .code-line.is-focused{background:#3a3f2f;border-left-color:#a6e22e;}
.code-block .has-comment{background:rgba(166,226,46,.035);}
.code-block .hljs-comment{color:#adb29a;font-family:inherit;font-weight:500;}
.code-block .hljs-keyword{color:#ff6296;}
.code-block .hljs-built_in,.code-block .hljs-type{color:#66d9ef;}
.code-block .hljs-number,.code-block .hljs-literal{color:#c3a2ff;}
.code-block .hljs-string{color:#e6db74;}
.code-block .hljs-title{color:#a6e22e;}
.code-block .hljs-property,.code-block .hljs-attr{color:#f8f8f2;}
.code-block .code-caption{background:#22231e;border-color:#45473c;color:#c5cab9;padding:15px 20px;}
.code-block ::selection{background:#4a5144;color:#fff;}
.python-editor-wrap{background:#272822;}
.python-editor{background:#272822;color:#f8f8f2;caret-color:#f8f8f2;}
.lesson-python-error-line{background:rgba(255,98,150,.12);}
.python-problem{margin:0;padding:20px 22px;border-block:1px solid var(--lesson-color-dcb4a8,#dcb4a8);background:var(--lesson-color-fff5f0,#fff5f0);color:var(--lesson-color-783b2c,#783b2c);}
.python-problem>div{display:flex;align-items:center;justify-content:space-between;gap:14px;}
.python-problem p{font-size:16px;line-height:1.85;margin:12px 0 0;overflow-wrap:anywhere;text-wrap:pretty;line-break:strict;}
.python-problem details{font-size:14px;margin-top:18px;}
.python-playground[data-python-locale="ko"] .python-problem{word-break:keep-all;}
.python-problem pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:240px;overflow:auto;font-family:var(--mono);line-height:1.8;}
.python-problem .text-button{color:var(--lesson-color-783b2c,#783b2c);}
.python-tensor-results{display:flex;gap:32px;flex-wrap:wrap;align-items:flex-start;justify-content:center;padding:30px 22px 36px;border-top:1px solid var(--line);}
.python-tensor-results>section{min-width:0;max-width:100%;}
.python-tensor-results .python-tensor-matrix,.python-tensor-results .python-matrix-host{width:100%;min-width:0;max-width:100%;flex-basis:100%;}
:is(#two-output-maps,#pet-loss-values) .python-tensor-results .python-tensor-matrix{flex:1 1 280px;max-width:420px;}
.python-tensor-results .matrix-standalone{margin:0 auto 8px;}
.python-tensor-results>section>p{font-size:11px;text-align:center;color:var(--ink-soft);margin:0;}
.python-runtime-info{padding:18px 22px 24px;border-top:1px solid var(--line-soft);font-size:12px;color:var(--ink-soft);}
.python-runtime-info p{max-width:65ch;line-height:1.85;margin:15px 0 10px;}
@media(max-width:600px){.code-block figcaption{padding:14px;}.code-block code{font-size:13px;}.python-problem{padding:18px 15px;}.python-problem>div{flex-wrap:wrap;}.python-tensor-results{padding:24px 14px;gap:26px;}}


/* 运行结果使用独立的黑底白字区域，与上面的编辑器分清用途。 */
.python-output-header { background: #22231e; color: #fff; border-color: #44463d; padding-top: 14px; }
.python-output { background: #22231e; color: #fff; padding-top: 10px; font-size: 14px; line-height: 1.9; scrollbar-color: #a8ac9c #22231e; }
.python-output::selection { background: #4a5144; color: #fff; }
.python-output:focus-visible { outline-color: var(--lesson-color-edb44f,#edb44f); }
@media(max-width:600px) { .python-output { font-size: 14px; } }

/* 原生 select 保留键盘与辅助技术行为，统一纸面、字形和箭头间距。 */
.operation-speed select,.operation-pool-rule select,.channel-controls select,.pixel-controls .ds-select,.algebra-tools select,.gradient-settings select{
  appearance:none;
  font-family:var(--sans);
  font-size:18px;
  line-height:1.6;
  font-weight:400;
  min-height:46px;
  min-width:108px;
  padding:8px 42px 8px 15px;
  color:var(--ink);
  background-color:var(--paper-raised);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23795b45' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-size:16px;
  background-position:right 15px center;
  border:1px solid var(--lesson-color-d2b48e,#d2b48e);
  border-radius:11px;
  cursor:pointer;
}
.operation-speed select:hover,.operation-pool-rule select:hover,.channel-controls select:hover,.pixel-controls .ds-select:hover,.algebra-tools select:hover,.gradient-settings select:hover{border-color:var(--accent);background-color:var(--accent-soft);}
.operation-speed select:focus-visible,.operation-pool-rule select:focus-visible,.channel-controls select:focus-visible,.pixel-controls .ds-select:focus-visible,.algebra-tools select:focus-visible,.gradient-settings select:focus-visible{outline:3px solid var(--accent);outline-offset:3px;}
@supports(appearance:base-select){
  .operation-speed select,.operation-pool-rule select,.channel-controls select,.pixel-controls .ds-select,.algebra-tools select,.gradient-settings select,
  .operation-speed select::picker(select),.operation-pool-rule select::picker(select),.channel-controls select::picker(select),.pixel-controls .ds-select::picker(select),.algebra-tools select::picker(select),.gradient-settings select::picker(select){appearance:base-select;}
  .operation-speed select,.operation-pool-rule select,.channel-controls select,.pixel-controls .ds-select,.algebra-tools select,.gradient-settings select{background-image:none;padding:8px 15px;display:inline-flex;align-items:center;justify-content:space-between;gap:16px;}
  .operation-speed select::picker-icon,.operation-pool-rule select::picker-icon,.channel-controls select::picker-icon,.pixel-controls .ds-select::picker-icon,.algebra-tools select::picker-icon,.gradient-settings select::picker-icon{color:var(--ink-soft);margin:0;flex:0 0 auto;}
  .operation-speed select:open::picker-icon,.operation-pool-rule select:open::picker-icon,.channel-controls select:open::picker-icon,.pixel-controls .ds-select:open::picker-icon,.algebra-tools select:open::picker-icon,.gradient-settings select:open::picker-icon{transform:rotate(180deg);}
  .operation-speed select::picker(select),.operation-pool-rule select::picker(select),.channel-controls select::picker(select),.pixel-controls .ds-select::picker(select),.algebra-tools select::picker(select),.gradient-settings select::picker(select){margin-top:8px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--paper-raised);color:var(--ink);box-shadow:0 10px 24px #492b1926;min-width:120px;font-family:var(--sans);font-size:18px;}
  .operation-speed select option,.operation-pool-rule select option,.channel-controls select option,.pixel-controls .ds-select option,.algebra-tools select option,.gradient-settings select option{padding:9px 12px;min-height:44px;gap:12px;border-radius:7px;cursor:pointer;background:transparent;color:var(--ink);}
  .operation-speed select option:checked,.operation-pool-rule select option:checked,.channel-controls select option:checked,.pixel-controls .ds-select option:checked,.algebra-tools select option:checked,.gradient-settings select option:checked{background:var(--accent-soft);color:var(--accent-hover);font-weight:700;}
  .operation-speed select option:hover,.operation-pool-rule select option:hover,.channel-controls select option:hover,.pixel-controls .ds-select option:hover,.algebra-tools select option:hover,.gradient-settings select option:hover{background:var(--accent-soft);}
  .operation-speed select option:focus-visible,.operation-pool-rule select option:focus-visible,.channel-controls select option:focus-visible,.pixel-controls .ds-select option:focus-visible,.algebra-tools select option:focus-visible,.gradient-settings select option:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;}
  .operation-speed select option::checkmark,.operation-pool-rule select option::checkmark,.channel-controls select option::checkmark,.pixel-controls .ds-select option::checkmark,.algebra-tools select option::checkmark,.gradient-settings select option::checkmark{color:var(--accent);margin-inline-start:auto;order:2;}
}
@media(max-width:650px){.operation-speed select,.channel-controls select,.pixel-controls .ds-select,.algebra-tools select,.gradient-settings select{font-size:17px;}.operation-pool-rule select{font-size:15px;min-width:0;max-width:100%;padding-inline:9px;gap:6px;}}

@supports(appearance:base-select){
  .operation-speed select::picker(select),.operation-pool-rule select::picker(select),.channel-controls select::picker(select),.pixel-controls .ds-select::picker(select),.algebra-tools select::picker(select),.gradient-settings select::picker(select){padding:8px;}
  .operation-speed select option,.operation-pool-rule select option,.channel-controls select option,.pixel-controls .ds-select option,.algebra-tools select option,.gradient-settings select option{margin-block:4px;}
}

/* 图片大小、矩阵行列和梯度选择器的鼠标与键盘焦点统一。 */
.pixel-controls .ds-select:focus,.algebra-tools select:focus,.gradient-settings select:focus{outline:3px solid var(--accent);outline-offset:3px;}

/* Fallback arrow follows the dark palette; native base-select keeps its own picker icon. */
@supports not (appearance:base-select){
  :root[data-theme="dark"] :is(.operation-speed select,.operation-pool-rule select,.channel-controls select,.pixel-controls .ds-select,.algebra-tools select,.gradient-settings select){
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c4b7a5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
}

/* 目录与正文共用纸面；只有当前课程使用焦糖色强调。 */
.page-lesson, .course-layout { --course-layout-width: 1800px; --course-layout-inset: 24px; --course-sidebar-width: 316.8px; }
.course-layout { max-width: var(--course-layout-width); margin: 0 auto; }
.course-reading { min-width: 0; }
.course-sidebar { display: none; }
.course-outline { overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: var(--lesson-color-c7a584,#c7a584) transparent; scrollbar-gutter: stable; }
.course-outline::-webkit-scrollbar { width: 6px; }
.course-outline::-webkit-scrollbar-thumb { background: var(--lesson-color-c7a584,#c7a584); border-radius: 5px; }
.course-outline-group { padding: 0 4px 23px 0; }
.course-outline-group + .course-outline-group { border-top: 1px solid var(--line); padding-top: 21px; }
.course-outline-group h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 10px 12px; color: var(--ink); font-size: 18px; line-height: 1.5; }
.course-outline-group h3 > span { font-size: 13px; color: var(--ink-soft); font-weight: 400; }
.course-outline ol { list-style: none; margin: 0; padding: 0; }
.course-outline-part { margin-top: 18px; }
.course-outline-part + .course-outline-part, .course-outline-closing { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.course-outline-part h4 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 10px 6px; color: var(--accent); font: 600 16px/1.7 var(--sans); }
.course-outline-part h4 > span { color: var(--ink-soft); font-size: 12px; font-weight: 400; white-space: nowrap; }
.course-outline li + li { margin-top: 4px; }
.course-outline-link { display: grid; grid-template-columns: 39px minmax(0, 1fr) 16px; align-items: start; gap: 7px; min-height: 48px; padding: 12px 9px; border-radius: 10px; color: var(--ink-soft); text-decoration: none; font-size: 16px; line-height: 1.65; }
.course-outline-link:hover { background: var(--lesson-color-f6ead8,#f6ead8); color: var(--ink); }
.course-outline-link:focus-visible { outline-offset: -3px; }
.course-outline-link[aria-current="page"] { color: var(--lesson-color-97400e,#97400e); background: var(--lesson-color-fae5c4,#fae5c4); font-weight: 700; }
.course-outline-number { padding-top: 2px; font-size: 12px; line-height: 2; font-variant-numeric: tabular-nums; }
.course-outline-name { overflow-wrap: anywhere; }
.course-outline-free { display: inline-block; margin-left: 7px; font-size: 11px; line-height: 1.7; color: var(--lesson-color-48602c,#48602c); font-weight: 400; white-space: nowrap; }
.course-outline-current { display: flex; align-items: center; min-height: 26px; position: relative; }
.course-sidebar-map { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; margin-top: 12px; border-top: 1px solid var(--line); padding: 15px 10px 3px; color: var(--accent); text-decoration: none; font-size: 14px; }
.course-sidebar-map:hover { text-decoration: underline; }
.course-mobile-menu { margin: 14px 22px 0; border-bottom: 1px solid var(--line); }
.course-mobile-menu > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 0 16px; list-style: none; cursor: pointer; font-size: 17px; }
.course-mobile-menu > summary::-webkit-details-marker { display: none; }
.course-mobile-menu > summary > span { color: var(--ink-soft); font-size: 14px; }
.course-mobile-menu > summary > svg:last-child { margin-left: auto; transition: transform .18s ease-out; }
.course-mobile-menu[open] > summary > svg:last-child { transform: rotate(180deg); }
.course-mobile-menu .course-outline { max-height: min(65dvh, 640px); padding: 12px 4px 0; }
.course-mobile-menu .course-outline-link { grid-template-columns: 54px minmax(0, 1fr) 16px; }
.course-mobile-menu .course-sidebar-map { margin-bottom: 14px; }
@media (min-width: 1024px) {
  .course-layout { display: grid; grid-template-columns: var(--course-sidebar-width) minmax(0, 1fr); gap: 24px; padding: 0 var(--course-layout-inset); }
  /* 目录拥有独立区域，正文与页脚滚动到底时也不会把它推到页眉后面。 */
  .course-sidebar { display: flex; flex-direction: column; position: fixed; top: calc(var(--lesson-header-height, 76px) + 16px); left: max(var(--course-layout-inset), calc((100% - var(--course-layout-width)) / 2 + var(--course-layout-inset))); width: var(--course-sidebar-width); height: calc(100dvh - var(--lesson-header-height, 76px) - 32px); min-height: 0; padding: 24px 14px 12px 0; border-right: 1px solid var(--line); }
  .course-reading { grid-column: 2; }
  .course-sidebar-heading { display: flex; align-items: center; gap: 9px; padding: 0 10px 22px; flex: 0 0 auto; }
  .course-sidebar-heading h2 { margin: 0; font-size: 20px; }
  .course-sidebar-heading > span { margin-left: auto; font-size: 13px; color: var(--ink-soft); }
  .course-sidebar .course-outline { flex: 1; min-height: 0; }
  .course-sidebar .course-sidebar-map { flex: 0 0 auto; }
  .course-mobile-menu { display: none; }
  .course-reading > .step-navigation { padding-inline: 12px; }
  .course-reading > .lesson-main { padding-inline: 16px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .page-lesson, .course-layout { --course-sidebar-width: 278.4px; --course-layout-inset: 16px; }
  .course-layout { gap: 16px; }
  .course-reading > .lesson-main { padding-inline: 8px; }
}
.local-course-preview { max-width: 1740px; margin: 12px auto 0; padding: 0 24px; color: var(--ink-soft); font-size: 13px; text-align: right; }
@media (max-width: 650px) {
  .course-mobile-menu { margin-inline: 16px; }
  .course-mobile-menu .course-outline-link { font-size: 17px; padding-block: 13px; }
}

/* 连续教程沿用课程纸面与目录，只在本章提供正文锚点。 */
.python-tutorial .python-topic-link { grid-template-columns: minmax(0, 1fr); }
.python-tutorial .python-topic-link[aria-current="location"] { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.python-tutorial .article-content > h2 { scroll-margin-top: calc(var(--lesson-header-height, 76px) + 24px); }
.python-tutorial .article-content > h2:focus { outline-offset: 6px; }
.python-tutorial .python-flow { margin: 32px 0; padding-block: 20px; border-block: 1px solid var(--line); }
.python-flow { margin: 28px 0; }
.python-flow figcaption { color: var(--ink); font-weight: 700; }
.python-flow-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-block: 16px; }
.python-flow-controls label { display: flex; align-items: center; gap: 8px; }
.python-flow-controls select { color: var(--ink); background: var(--paper-raised); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; }
.python-flow svg { display: block; width: 100%; max-width: 480px; height: auto; margin-inline: auto; }
.python-flow-node rect, .python-flow-node path { fill: var(--paper-raised); stroke: var(--line); stroke-width: 1.5; transition: fill .3s ease-out, stroke .3s ease-out; }
.python-flow-node.is-active rect, .python-flow-node.is-active path { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.python-flow svg text { fill: var(--ink); font: 24px 'Lesson Rounded', sans-serif; text-anchor: middle; }
.python-flow svg .python-flow-label { fill: var(--ink-soft); font-size: 20px; }
.python-flow-lines path { stroke: var(--line); stroke-width: 2; stroke-dasharray: 180; stroke-dashoffset: 0; }
.python-flow-lines path.is-active { stroke: var(--accent); animation: python-flow-trace .55s ease-out; }
@keyframes python-flow-trace { from { stroke-dashoffset: 180; } to { stroke-dashoffset: 0; } }
.python-flow [data-flow-explanation] { min-height: 3.4em; margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .python-flow-lines path.is-active { animation: none; } .python-flow-node rect, .python-flow-node path { transition: none; } }

/* 下册已有独立分组标题时，省去上方重复的总标题（桌面与手机共用）。 */
.course-outline-group:has(> [data-course-part="lower-foundation"]) > h3 { display:none; }

/* 上下册可见分组标题使用同一套字型规格。 */
.course-outline-group > h3, .course-outline-part > h4 { font-family:var(--display); font-size:18px; font-weight:700; line-height:1.5; }
.course-outline-part > h4 > span { font-size:13px; }

.course-outline-source{display:block;font-size:12px;font-weight:400;color:var(--ink-soft);margin-top:3px;}
.localization-draft-note{font-size:16px;line-height:1.8;color:var(--ink-soft);padding-block:14px;margin:0 0 28px;border-bottom:1px solid var(--line);}

.account-control { position:relative; flex:0 0 auto; }
.account-control > [hidden] { display:none; }
.account-menu { position:relative; }
.sign-in-menu { position:relative; }
.sign-in-menu[open] { z-index:100; }
.sign-in-trigger { min-height:44px; cursor:pointer; list-style:none; white-space:nowrap; }
.sign-in-trigger::-webkit-details-marker { display:none; }
.sign-in-trigger::marker { content:''; }
.sign-in-menu[open] .sign-in-trigger>svg:last-child { transform:rotate(180deg); }
.account-dropdown.sign-in-options { display:grid; gap:6px; width:max-content; min-width:205px; padding:8px; }
.sign-in-menu:not([open]) .sign-in-options { display:none; }
.sign-in-options>a { gap:10px; line-height:1.45; }
.sign-in-options>a[hidden] { display:none; }
.sign-in-options>a svg { flex:none; }
.sign-in-options>a:focus-visible,.sign-in-trigger:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.account-menu>summary { display:flex; align-items:center; gap:12px; min-height:48px; max-width:232px; padding:7px 15px 7px 8px; border:1px solid var(--line); border-radius:999px; background:var(--paper-raised); cursor:pointer; list-style:none; color:var(--ink); font-size:16px; }
.account-menu>summary::-webkit-details-marker { display:none; }
.account-menu>summary:hover,.account-menu[open]>summary { background:var(--accent-soft); border-color:var(--lesson-color-c7a584,#c7a584); }
.account-menu>summary>svg { flex:0 0 auto; transition:transform .18s ease-out; }
.account-menu[open]>summary>svg { transform:rotate(180deg); }
.account-avatar { display:grid; place-items:center; position:relative; width:34px; height:34px; flex:0 0 34px; border-radius:50%; background:var(--accent-soft); color:var(--accent); font-size:19px; font-weight:700; overflow:hidden; }
.account-avatar img { width:100%; height:100%; object-fit:cover; }
.account-name { max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:650; }
.account-dropdown { position:absolute; z-index:90; right:0; top:calc(100% + 12px); width:304px; max-width:calc(100vw - 32px); padding:22px; background:var(--paper-raised); border:1px solid var(--line); border-radius:14px; box-shadow:0 10px 30px #492b191a; color:var(--ink); text-align:left; }
.account-dropdown>strong { display:block; font-size:19px; overflow-wrap:anywhere; }
.account-dropdown .account-id { margin:7px 0 18px; font-size:13px; color:var(--ink-soft); }
.account-dropdown dl { margin:0 0 12px; padding-bottom:18px; border-bottom:1px solid var(--line); font-size:14px; line-height:1.8; }
.account-dropdown dl>div { display:grid; grid-template-columns:64px minmax(0,1fr); gap:8px; margin-top:7px; }
.account-dropdown dt { color:var(--ink-soft); }
.account-dropdown dd { margin:0; overflow-wrap:anywhere; }
.account-dropdown>a,.account-dropdown .account-logout { display:flex; align-items:center; width:100%; min-height:44px; padding:9px 10px; border:0; border-radius:8px; background:none; color:var(--ink); font:inherit; font-size:16px; text-decoration:none; text-align:left; }
.account-dropdown>a:hover,.account-dropdown .account-logout:hover { background:var(--accent-soft); }
.account-dropdown form { margin:10px 0 0; padding-top:10px; border-top:1px solid var(--line); }
.account-dropdown .account-logout { color:var(--accent-hover); }
.account-page>header { display:flex; justify-content:space-between; align-items:center; gap:20px; }
@media(max-width:650px) {
 .sign-in-trigger>span { position:absolute; inline-size:1px; block-size:1px; overflow:hidden; clip-path:inset(50%); }
 .sign-in-menu .sign-in-trigger { gap:3px; }
 .sign-in-menu .sign-in-trigger>svg:last-child { inline-size:12px; }
 .account-menu>summary { gap:8px; max-width:164px; min-height:44px; padding-right:10px; }
 .account-name { display:none; }
 .account-avatar { width:30px; height:30px; flex-basis:30px; }
 .account-dropdown { width:290px; padding:20px; }
 .account-page>header { padding:20px 16px; flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) { .account-menu>summary>svg { transition:none; } }

/* 返回首页是明确的导航入口，窄屏也保留文字。 */
.header-actions .home-link{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;white-space:nowrap;color:var(--ink);background:var(--paper-raised);border-color:var(--line);}
.header-actions .home-link:hover{color:var(--ink);background:var(--accent-soft);border-color:var(--line);}
.header-actions .home-link>span{display:inline;}
@media(max-width:600px){.page-lesson>.site-header,.page-cici>.site-header{flex-wrap:wrap;row-gap:10px;}.page-lesson>.site-header>.header-actions,.page-cici>.site-header>.header-actions{margin-left:auto;}}

.language-menu { position:relative;flex:none; }
/* Open Header menus stay above cici's dock, interactions (92) and pet menu (95). */
.header-actions :is(.language-menu,.site-settings,.account-menu)[open] { z-index:100; }
.language-trigger { gap:8px;list-style:none;white-space:nowrap; }
.language-trigger::-webkit-details-marker { display:none; }
.language-trigger::marker { content:''; }
.language-trigger [data-language-flag] { display:flex; }
.header-actions .language-menu .language-flag { flex:none;width:24px;height:18px;border-radius:4px;box-shadow:0 1px 3px color-mix(in srgb,var(--ink) 16%,transparent); }
.language-trigger>svg { width:14px;height:14px;transition:transform .16s ease-out; }
.language-menu[open] .language-trigger>svg { transform:rotate(180deg); }
.language-dropdown { position:absolute;z-index:90;inset-inline-end:0;inset-block-start:calc(100% + 12px);width:260px;max-width:calc(100vw - 32px);padding:18px 12px 12px;border-radius:16px;background:var(--paper-raised);box-shadow:0 10px 32px #492b1929;color:var(--ink); }
html[data-theme="dark"] .language-dropdown { box-shadow:0 10px 32px #0006; }
.language-dropdown>strong { display:block;margin:0 12px 14px;font-size:17px; }
.language-dropdown>nav { display:grid;gap:7px; }
.language-dropdown nav>a { display:flex;align-items:center;gap:12px;min-height:48px;padding:10px 12px;border-radius:10px;color:var(--ink);font-size:17px;line-height:1.5;text-decoration:none; }
.language-dropdown nav>a:hover { background:var(--accent-soft); }
.language-dropdown nav>a[aria-current] { background:var(--accent-soft);color:var(--accent);font-weight:650; }
.language-check { display:flex;margin-inline-start:auto;visibility:hidden; }
.language-dropdown nav>a[aria-current] .language-check { visibility:visible; }
.language-dropdown nav>a:focus-visible { outline:2px solid var(--accent);outline-offset:2px; }
.language-dropdown>p { margin:14px 12px 2px;color:var(--ink-soft);font-size:14px;line-height:1.65;overflow-wrap:anywhere; }
.language-dropdown>[data-language-content] { margin-block-start:8px; }
.language-dropdown { max-block-size:calc(100dvh - var(--lesson-header-height,160px) - 16px);overflow-y:auto;overscroll-behavior:contain;scrollbar-color:var(--line) var(--paper-raised);scrollbar-width:thin; }
.header-actions>.utility-button { flex-shrink:0;white-space:nowrap; }
@media(min-width:851px) {
  html[data-ui-language] .site-header { display:grid;grid-template-columns:auto minmax(0,1fr) auto; }
  html[data-ui-language] .site-header>.brand { grid-column:1; }
  html[data-ui-language] .site-header>.header-actions { grid-column:3;justify-self:end; }
  html[data-ui-language] .site-header>.header-lesson { grid-column:2;position:static;transform:none;min-width:0;text-align:center;overflow-wrap:anywhere; }
  html[data-ui-language] .site-header>.home-header-links { grid-column:2;min-width:0;flex-wrap:wrap;justify-content:center;gap:8px 20px; }
  html[data-ui-language] .home-header-links a { white-space:nowrap; }
  html[data-ui-language] .site-header>.lesson-cat-dock { grid-column:1 / -1; }
}
@media(max-width:1100px) { .language-trigger [data-language-name] { display:none; } }
@media(min-width:601px) and (max-width:1100px) {
  html[data-ui-language] .site-header { display:flex;flex-wrap:wrap;row-gap:10px; }
  html[data-ui-language] .site-header>.brand { flex-shrink:0; }
  html[data-ui-language] .site-header>.header-actions { flex:none;margin-inline-start:auto; }
  html[data-ui-language] .site-header>.header-lesson { flex:1 1 210px;min-width:16ch;overflow-wrap:normal; }
}
@media(max-width:600px) {
  .language-menu .language-trigger { min-width:44px;min-height:44px;padding:8px;gap:5px; }
  .language-trigger>svg { display:none; }
  .language-dropdown { inset-inline-end:-40px; }
}
@media(max-width:360px) { .language-dropdown { inset-inline-end:-66px; } }
@media(prefers-reduced-motion:reduce) { .language-trigger>svg { transition:none; } }

.lesson-cat{position:fixed!important;left:0;top:auto;bottom:0;margin:0;width:104px;height:104px;z-index:90;pointer-events:none;--cat-facing:1;}
.lesson-cat[hidden]{display:none!important;}
.lesson-cat-character{position:absolute;inset:0;transform-origin:50% 100%;}
.lesson-cat-sprite{position:absolute;inset:0;background-size:400% 400%;background-repeat:no-repeat;background-position:0 0;pointer-events:none;transform-origin:50% 100%;}
.lesson-cat-previous{opacity:0;}
.lesson-cat[data-ready="true"]::before{content:"";position:absolute;left:20%;right:15%;bottom:-1px;height:3px;border-radius:50%;background:rgba(73,44,25,.16);filter:blur(1px);}
.lesson-cat[data-action="sleep"] .lesson-cat-character{animation:lesson-cat-breathe 3.4s ease-in-out infinite;}
.lesson-cat[data-paused="true"] .lesson-cat-character{animation-play-state:paused;}
@keyframes lesson-cat-breathe{0%,100%{transform:scaleY(1);}50%{transform:scaleY(1.012);}}
.lesson-cat-hide{position:absolute;top:-9px;right:-5px;display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:50%;background:transparent;color:var(--ink-soft);padding:0;pointer-events:auto;cursor:pointer;opacity:0;}
.lesson-cat:hover .lesson-cat-hide,.lesson-cat:focus-within .lesson-cat-hide{opacity:1;}
.lesson-cat-hide:hover{background:var(--accent-soft);color:var(--ink);}
.lesson-cat-show{position:absolute;left:0;bottom:6px;min-height:44px;padding:6px 10px;border:1px solid var(--line);border-radius:12px;background:var(--paper-raised);color:var(--ink-soft);font-size:13px;pointer-events:auto;cursor:pointer;white-space:nowrap;}
.lesson-cat button:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.lesson-cat [hidden],.lesson-cat[data-collapsed="true"] .lesson-cat-character{display:none!important;}
.lesson-cat[data-collapsed="true"]::before,.lesson-cat[data-ready="false"]::before{display:none;}
.page-lesson:has([data-lesson-cat]):not(:has(.lesson-cat-dock)) .site-footer{padding-bottom:120px;}
@media(max-width:600px){.lesson-cat{width:84px;height:84px;}.lesson-cat-hide{opacity:.7;top:-11px;width:44px;height:44px;right:-11px;}}
@media(prefers-reduced-motion:reduce){.lesson-cat .lesson-cat-character{animation:none;}}
/* Only the pet controls accept pointer input within its activity lane. */
.pet-touch{position:absolute;inset:4% 5% 0;border:0;padding:0;background:none;box-shadow:none;border-radius:44% 44% 12% 12%;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M9 15V9c0-3 4-3 4 0V5c0-3 4-3 4 0v4-2c0-3 4-3 4 0v4c0-3 4-3 4 0v8c0 8-5 11-11 9-4-1-6-5-9-9-2-3 1-5 3-3l3 3' fill='%23fff3dc' stroke='%23845131' stroke-width='1.8' stroke-linejoin='round'/%3E%3Cpath d='m3 7 2-2M24 3l2 1' stroke='%23bc652a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 13 8,grab;}
.pet-touch:hover,.pet-touch:active{background:none;box-shadow:none;transform:none;}
.pet-touch:focus-visible{outline:2px dashed var(--accent);outline-offset:3px;}
.lesson-cat[data-dragging="true"] .pet-touch{cursor:grabbing;}
.lesson-cat[data-interacting="true"]{z-index:92;}
.lesson-cat[data-menu-open="true"]{z-index:95;}
.lesson-cat[data-collapsed="true"] .pet-touch,.lesson-cat[data-collapsed="true"] .pet-bubble{display:none;}
.pet-menu{position:absolute;bottom:calc(100% + 12px);left:var(--pet-menu-left,0px);width:min(304px,calc(100vw - 24px));max-height:none;overflow:visible;border:1px solid var(--line);border-radius:22px 22px 22px 8px;background:var(--paper-raised,var(--paper));color:var(--ink);box-shadow:0 12px 36px rgba(45,26,13,.17);padding:17px 16px 12px;pointer-events:auto;text-align:left;font-family:inherit;line-height:1.45;}
.pet-menu-heading{display:flex;gap:10px;align-items:center;padding:0 0 12px;}
.pet-menu-paw{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:13px;background:var(--accent-soft);color:var(--accent);transform:rotate(-9deg);}
.pet-menu-heading strong{font-size:19px;letter-spacing:.02em;}
.pet-menu-heading p{margin:3px 0 0;font-size:12px;color:var(--ink-soft);}
.pet-menu-close{display:grid;place-items:center;flex:none;margin-left:auto;align-self:flex-start;width:30px;height:30px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink-soft);cursor:pointer;}
.pet-menu-close:hover{background:var(--accent-soft);}
.pet-vitals{display:flex;gap:10px;padding:0 0 12px;}
.pet-vitals label{display:flex;align-items:center;gap:5px;flex:1;min-width:0;font-size:12px;color:var(--ink-soft);white-space:nowrap;}
.pet-vitals meter{appearance:none;-webkit-appearance:none;flex:1;min-width:0;height:6px;border:0;border-radius:8px;background:var(--line);}
.pet-vitals meter::-webkit-meter-bar{background:var(--line);border:0;border-radius:8px;}
.pet-vitals meter::-webkit-meter-optimum-value{background:var(--accent);border-radius:8px;}
.pet-vitals meter[data-pet-vital="energy"]::-webkit-meter-optimum-value{background:#879b65;}
.pet-vitals meter[data-pet-vital="affection"]::-webkit-meter-optimum-value{background:#c98083;}
.pet-vitals meter::-moz-meter-bar{background:var(--accent);border-radius:8px;}
.pet-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);margin-bottom:10px;padding-bottom:8px;}
.pet-tabs button{flex:1;border:0;border-radius:10px;background:transparent;padding:7px 8px;color:var(--ink-soft);font:inherit;font-size:14px;cursor:pointer;}
.pet-tabs button[aria-selected="true"]{background:var(--accent-soft);color:var(--ink);}
.pet-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px 8px;}
.pet-actions>button{display:flex;align-items:center;gap:9px;min-height:42px;padding:8px 9px;border:0;border-radius:11px;background:transparent;color:var(--ink);font:inherit;font-size:14px;cursor:pointer;}
.pet-actions>button svg{flex:none;color:var(--accent);}
.pet-actions>button:hover{background:var(--accent-soft);}
.pet-actions>button:active{transform:scale(.97);}
.pet-hint{grid-column:1/-1;font-size:12px!important;color:var(--ink-soft);margin:7px 0 3px;line-height:1.65;}
.pet-menu-footer{display:flex;align-items:flex-start;gap:8px;border-top:1px solid var(--line);margin-top:9px;padding-top:10px;font-size:12px;color:var(--ink-soft);}
.pet-menu-footer>span{flex:1;}
.pet-menu-footer>button{border:0;background:none;color:var(--ink-soft);font:inherit;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px;white-space:nowrap;}
.pet-menu button:focus-visible{outline:2px solid var(--accent);outline-offset:1px;}
.pet-bubble{position:absolute;bottom:calc(100% + 8px);left:-8px;max-width:190px;width:max-content;border:1px solid var(--line);border-radius:14px 14px 14px 3px;background:var(--paper-raised,var(--paper));color:var(--ink);padding:8px 12px;font-size:12px;line-height:1.5;pointer-events:none;}
.lesson-cat[data-menu-open="true"] .pet-bubble{display:none;}
.pet-drag-fish{position:fixed;left:0;top:0;width:44px;height:40px;background-size:contain;background-position:center;background-repeat:no-repeat;pointer-events:none;z-index:90;}
@media(max-width:600px){.pet-menu{bottom:calc(100% + 8px);padding:14px 14px 10px;}.pet-actions>button{min-height:44px;}.pet-menu-heading strong{font-size:18px;}}
@media(max-height:600px){.pet-menu{bottom:calc(100% + 4px);padding:6px 10px;}.pet-menu-heading{padding-bottom:4px;gap:7px;}.pet-menu-heading strong{font-size:16px;}.pet-menu-paw{width:26px;height:26px;border-radius:8px;}.pet-menu-paw svg{width:18px;height:18px;}.pet-menu-close{width:26px;height:26px;}.pet-menu-heading p,.pet-hint{display:none;}.pet-vitals{padding-bottom:4px;}.pet-vitals label{font-size:12px;}.pet-tabs{padding-bottom:3px;margin-bottom:4px;}.pet-tabs button{font-size:12px;padding:4px 6px;}.pet-actions{grid-template-columns:repeat(3,1fr);gap:2px;}.pet-actions>button{flex-direction:column;gap:2px;min-height:40px;padding:4px 2px;font-size:12px;line-height:1.2;}.pet-actions>button svg{width:16px;height:16px;}.pet-menu-footer{margin-top:4px;padding-top:5px;font-size:12px;}.pet-menu-footer>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}}
@media(prefers-reduced-motion:no-preference){.pet-menu{animation:pet-menu-in .18s cubic-bezier(.16,1,.3,1);}@keyframes pet-menu-in{from{opacity:0;transform:translateY(5px) scale(.98);}to{opacity:1;transform:none;}}}

.pet-nest-link{display:flex;align-items:center;gap:9px;padding:10px 12px;margin-top:9px;border-radius:10px;background:var(--accent-soft);color:var(--accent-hover);text-decoration:none;font-size:14px;line-height:1.7;min-height:44px;}.pet-nest-link>span{flex:1;}.pet-nest-link:hover{background:var(--honey);color:var(--ink);}.pet-nest-link:focus-visible{outline:3px solid var(--accent);outline-offset:3px;}

/* The companion occupies a real lane, never the reading viewport floor. */
.lesson-cat-dock{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;flex:0 0 100%;height:64px;min-width:0;}
.lesson-cat-track{position:relative;min-width:0;height:100%;}
.lesson-cat-dock .lesson-cat{position:absolute!important;left:0;top:0;bottom:auto;width:64px;height:64px;}
.lesson-cat-identity{display:grid;gap:0;margin:0;min-width:0;max-inline-size:100%;color:var(--ink-soft);font-size:14px;line-height:1.6;white-space:nowrap;}
.lesson-cat-identity span{white-space:normal;overflow-wrap:break-word;}
.lesson-cat-identity strong{color:var(--accent);font-size:17px;}
html[data-pet-enabled="false"] .lesson-cat-dock{display:none;}
@media(min-width:1024px){
  .lesson-cat-dock{position:fixed;left:max(var(--course-layout-inset),calc((100% - var(--course-layout-width))/2 + var(--course-layout-inset)));bottom:16px;width:calc(var(--course-sidebar-width) - 14px);height:104px;}
  .lesson-cat-dock .lesson-cat{width:96px;height:96px;}
  .page-lesson:has(.lesson-cat-dock) .course-sidebar{padding-bottom:116px;}
  html[data-pet-enabled="false"] .page-lesson .course-sidebar{padding-bottom:12px;}
}
@media(max-width:1023px){
  .page-lesson>.site-header:has(>.lesson-cat-dock){flex-wrap:wrap;row-gap:6px;}
  .lesson-cat-dock .pet-menu{top:calc(100% + 8px);bottom:auto;max-height:calc(100dvh - var(--lesson-header-height,190px) - 20px);overflow-y:auto;overscroll-behavior-y:contain;}
  .lesson-cat-dock .pet-bubble{top:calc(100% + 8px);bottom:auto;}
}
/* 窄屏把小猫和品牌放在同一行，为正文保留更多高度。 */
@media(max-width:850px){
  html:not([data-pet-enabled="false"]) .page-lesson>.site-header:has(>.lesson-cat-dock){display:grid;grid-template-columns:minmax(0,1fr) 138px;gap:4px 8px;}
  .page-lesson>.site-header:has(>.lesson-cat-dock)>.brand{grid-column:1;grid-row:1;min-width:0;white-space:normal;}
  .page-lesson>.site-header:has(>.lesson-cat-dock)>.brand img{flex-shrink:0;}
  .page-lesson>.site-header:has(>.lesson-cat-dock) .brand-wordmark{min-width:0;}
  .page-lesson>.site-header:has(>.lesson-cat-dock)>.header-actions{grid-column:1 / -1;grid-row:2;justify-self:end;}
  .lesson-cat-dock{grid-column:2;grid-row:1;width:138px;height:auto;min-height:48px;grid-template-columns:60px minmax(0,1fr);gap:6px;flex:none;}
  .lesson-cat-dock .lesson-cat{width:48px;height:48px;}
  .lesson-cat-dock .pet-touch{min-width:44px;min-height:44px;}
  .lesson-cat-identity{font-size:12px;}
  .lesson-cat-identity span{word-break:keep-all;overflow-wrap:anywhere;}
  .lesson-cat-identity strong{font-size:14px;}
}
@media(min-width:1024px) and (max-height:600px){
  .lesson-cat-dock{height:80px;}
  .lesson-cat-dock .lesson-cat{width:72px;height:72px;}
  .page-lesson:has(.lesson-cat-dock) .course-sidebar{padding-bottom:92px;}
  html[data-pet-enabled="false"] .page-lesson .course-sidebar{padding-bottom:12px;}
}

/* The achievement helper yields to reading; cici is only collapsed by the learner. */
.achievement-dock[data-reading-obscured="true"].is-collapsed:not(:focus-within):not(:has([data-achievement-collection]:not([hidden]))){visibility:hidden;}

/* Step labels grow with their content; numerals keep their own space. */
.step-navigation .step-tab { min-width:0; white-space:normal; line-height:1.5; }
.step-tab > .step-number { flex-shrink:0; }
.step-tab > span:last-child { min-width:0; overflow-wrap:break-word; text-wrap:balance; hyphens:none; }
.step-tab:not(:last-child)::after { left:calc(100% + 8px); width:14px; }
.step-navigation.is-long .step-tab { flex:1 0 160px; max-width:260px; }
.step-navigation.is-long .step-tab:not(:last-child)::after { left:calc(100% + 5px); width:8px; }
.lesson-step .step-title { overflow-wrap:anywhere; }
.guide-content .inline-code, .article-content .inline-code { white-space:normal;overflow-wrap:anywhere;word-break:normal; }
.lesson-actions,.discovery-actions { min-width:0;max-inline-size:100%; }
.discovery-actions [data-next] { min-width:0;max-inline-size:100%;white-space:normal;overflow-wrap:break-word;text-align:center; }
.discovery-actions [data-next] svg { flex-shrink:0; }

/* Keep Korean words intact, with an escape for a word wider than its column. */
:lang(ko) :is(.step-title,.article-subtitle,.article-intro,.lesson-intro,.guide-content,.step-tab > span:last-child) { word-break:keep-all; overflow-wrap:anywhere; }
:lang(en) :is(.step-title,.article-subtitle,.article-intro,.lesson-intro,.guide-content) { hyphens:auto; }
.lesson-step:lang(en) .guide-content { hyphens:none; }
.article-intro-outcomes li > span { min-width:0; overflow-wrap:break-word; text-wrap:balance; hyphens:none; }
.reading-word { display:inline-block; max-inline-size:100%; }
@media(max-width:360px) {
 html[data-content-language]:lang(ja) .brand .brand-wordmark strong { font-size:15px; }
}

/* Translated information pages keep full words and balanced short headings. */
html[data-content-language] :is(.site-info-heading h1,.audience-promise,.audience-persona h3,.audience-invitation h2,.update-history-promise,.update-history-next h2,.pricing-standalone .home-section-heading h2) { text-wrap:balance; overflow-wrap:break-word; }
html[data-content-language]:lang(ja) :is(.site-info-main,.audience-page,.update-history) { line-break:strict; }
html[data-content-language]:lang(ko) :is(.site-info-main,.audience-page,.update-history) { word-break:keep-all; overflow-wrap:anywhere; }
:lang(ko) .python-flow :is(figcaption,[data-flow-explanation]) { word-break:keep-all; overflow-wrap:anywhere; }
:lang(ja) .python-flow figcaption { text-wrap:balance; }
@media(max-width:400px) {
 html[data-content-language]:not(:lang(zh-CN)) .course-price-large .course-price-current { flex-wrap:wrap; white-space:normal; min-width:0; max-inline-size:100%; }
 html[data-content-language]:not(:lang(zh-CN)) .course-price-large .course-price-current>span { flex-basis:100%; }
 html[data-content-language]:not(:lang(zh-CN)) .course-price-large .course-price-current strong { font-size:clamp(34px,12vw,48px); white-space:nowrap; }
}

@media(max-width:600px) {
 .step-navigation .step-tab { flex:1 0 auto; max-inline-size:calc(100vw - 58px); min-height:72px; padding:12px 4px; font-size:15px; gap:8px; }
 .step-tab > span:last-child { max-inline-size:22ch; }
 .step-tab > .step-number { width:24px; height:24px; font-size:17px; }
}

/* Homepage translations keep Korean word boundaries and Japanese line-ending rules. */
html[data-content-language]:lang(ko) :is(.home-main,.home-floating-nav) { word-break:keep-all;overflow-wrap:anywhere; }
html[data-content-language]:lang(ja) .home-main { line-break:strict; }
html[data-content-language] .home-pedagogy>span { white-space:normal;max-inline-size:100%; }
html[data-content-language] .home-main .button { min-width:0;max-inline-size:100%;white-space:normal;text-align:center;justify-content:center; }
html[data-content-language] .home-main .button svg { flex-shrink:0; }
.home-browser-promise>div { min-width:0; }
.pricing-free-copy,.pricing-free-path { min-width:0; }
html[data-content-language] .industry-masthead-main { flex-wrap:wrap; }
html[data-content-language] .industry-masthead-main>p { min-width:0;max-inline-size:100%;text-align:center;overflow-wrap:break-word; }
@media(max-width:700px) {
 html[data-content-language] .pricing-free-start { grid-template-columns:minmax(0,1fr); }
 html[data-content-language] .cici-companion { grid-template-columns:minmax(64px,.8fr) minmax(0,2fr);height:auto;min-height:146px; }
 html[data-content-language] .cici-action { min-width:0;white-space:normal; }
}

:root[data-theme="dark"]{--lesson-color-fbf6ed:#1e1d1a;--lesson-color-fffaf2:#292621;--lesson-color-fffaf0:#292621;--lesson-color-f5eddf:#302b24;--lesson-color-f1e4d3:#342c23;--lesson-color-f8eddd:#302a23;--lesson-color-fce6c9:#473420;--lesson-color-fae5c4:#473420;--lesson-color-faebd2:#3b3022;--lesson-color-f8dfb4:#574022;--lesson-color-f9e6c6:#473420;--lesson-color-f9e8df:#3e2f29;--lesson-color-edf0e1:#30382a;--lesson-color-eee8f4:#36303f;--lesson-color-e8eee1:#30382a;--lesson-color-dce9d9:#3a4a32;--lesson-color-e5ddef:#473a54;--lesson-color-e2ecdc:#303d2c;--lesson-color-e1ebda:#303d2c;--lesson-color-f6ead8:#3c3024;--lesson-color-f8f0e4:#2d2821;--lesson-color-492b19:#f1e6d5;--lesson-color-4c2c1c:#f1e6d5;--lesson-color-795b45:#c4b7a5;--lesson-color-84674f:#b8a994;--lesson-color-765741:#c4b7a5;--lesson-color-665845:#c9baa7;--lesson-color-e7d2bd:#594d40;--lesson-color-efdfce:#3d362e;--lesson-color-e4d2bb:#5c4e3d;--lesson-color-d2b48e:#8c7253;--lesson-color-c7a584:#867058;--lesson-color-d8b48e:#8b7153;--lesson-color-bc9471:#8d765e;--lesson-color-bc8a58:#bc9569;--lesson-color-c8a98a:#8b735b;--lesson-color-dec1a1:#79644c;--lesson-color-b15317:#efae75;--lesson-color-a7460d:#ffc18c;--lesson-color-a94e16:#efae75;--lesson-color-97400e:#efb681;--lesson-color-8d581f:#e5b578;--lesson-color-edb44f:#edb44f;--lesson-color-e87a4e:#efa080;--lesson-color-738746:#b1c887;--lesson-color-426244:#a7c9a3;--lesson-color-4f7558:#aad0ae;--lesson-color-4d765a:#aad0ae;--lesson-color-48602c:#b3cd91;--lesson-color-4f612f:#b3cd91;--lesson-color-46673d:#afd09d;--lesson-color-327564:#87d3b6;--lesson-color-9e5033:#f0b194;--lesson-color-7959a3:#cbb7e8;--lesson-color-a14762:#ecabc2;--lesson-color-80641c:#e2ce87;--lesson-color-796096:#cbb6e4;--lesson-color-a95b31:#efb281;--lesson-color-a94e2e:#f2ad90;--lesson-color-a5617a:#e5b1c5;--lesson-color-755238:#dfb792;--lesson-color-7b956d:#b6ce9e;--lesson-color-783b2c:#eab19d;--lesson-color-8c4030:#f4ad99;--lesson-color-ac4427:#f6a88a;--lesson-color-b59b81:#b59b81;--lesson-color-fae9ce:#473420;--lesson-color-f5d7ac:#574022;--lesson-color-edc692:#937448;--lesson-color-bca083:#8c7253;--lesson-color-a94a11:#efae75;--lesson-color-3f2514:#f1e6d5;--lesson-color-a96a32:#e7b17e;--lesson-color-fbe5bf:#473420;--lesson-color-d79540:#e0a957;--lesson-color-d79640:#e0a957;--lesson-color-f8d28d:#574022;--lesson-color-98501d:#efb681;--lesson-color-fae8cd:#3c3024;--lesson-color-fbe8c8:#473420;--lesson-color-77583c:#c4b7a5;--lesson-color-d2a77a:#8c7253;--lesson-color-f7e7d1:#3c3024;--lesson-color-c68f55:#b49268;--lesson-color-f8e4c4:#473420;--lesson-color-efdbbd:#574431;--lesson-color-f4dcae:#574022;--lesson-color-925588:#d4a7cd;--lesson-color-a55024:#efb281;--lesson-color-657b34:#b1c887;--lesson-color-2c6c7a:#90c6d2;--lesson-color-f5e8d6:#3c3024;--lesson-color-a45c22:#efb281;--lesson-color-486b38:#b1c887;--lesson-color-ab611f:#efb281;--lesson-color-9b6f3e:#d4b58c;--lesson-color-d9ba99:#79644c;--lesson-color-d5ad75:#957247;--lesson-color-8c9b70:#afc58b;--lesson-color-f0e8dc:#302b24;--lesson-color-f8eddb:#302b24;--lesson-color-faf4e9:#292621;--lesson-color-c4a27e:#8c7253;--lesson-color-b46643:#e9b09b;--lesson-color-fae4d6:#3e2f29;--lesson-color-8064a1:#cbb7e8;--lesson-color-eee6f5:#36303f;--lesson-color-9a3e2b:#f2ad90;--lesson-color-e2d0b8:#594d40;--lesson-color-edf0e3:#30382a;--lesson-color-fffaf1:#292621;--lesson-color-d5b995:#8c7253;--lesson-color-a95a24:#efb281;--lesson-color-dcc5a8:#79644c;--lesson-color-60753c:#b1c887;--lesson-color-c8a175:#8c7253;--lesson-color-854b23:#e5b578;--lesson-color-d8b58c:#8c7253;--lesson-color-7d3519:#f2ad90;--lesson-color-f5dfbf:#473420;--lesson-color-8f351b:#f2ad90;--lesson-color-dcb4a8:#805b50;--lesson-color-fff5f0:#3e2b26;--lesson-color-fff6e8:#352c21;--lesson-color-f5e7d3:#3c3024;--lesson-color-7c62a3:#cbb7e8;--lesson-color-f3e7d7:#302b24;--lesson-color-31665a:#87d3b6;--lesson-color-e5efe8:#2b3830;--lesson-color-42617e:#a5c3e2;--lesson-color-e8eef4:#2d353e;--lesson-color-a7490f:#efae75;--lesson-color-f9e6ce:#3c3024;--lesson-color-382e25:#eee2cb;--lesson-color-91806b:#99876e;--lesson-color-f3ecd9:#29271f;--lesson-color-a12e28:#f5a198;--lesson-color-fff9ef:#292621;--lesson-color-d3a263:#b49268;--lesson-color-fae9cf:#3c3024;--lesson-color-bd9570:#b49268;--lesson-color-fffdf8:#292621;--lesson-color-d89358:#c79a70;--lesson-color-a34c2d:#f2ad90;--lesson-color-597236:#b1c887;--lesson-color-f5e6d2:#3c3024;--lesson-color-f7dfbc:#473420;--lesson-color-9d4d16:#efae75;--lesson-color-f7ead7:#3c3024;--lesson-color-e8d1b8:#594d40;--lesson-color-daaa72:#c79a70;--lesson-color-dc8530:#efae75;--lesson-color-566b2c:#b1c887;--lesson-color-b96b16:#efae75;--lesson-color-fff0d5:#473420;--lesson-color-d9a45a:#c79a70;--lesson-color-d6b386:#8c7253;--lesson-color-fcf4e7:#302b24;--lesson-color-d6b995:#8c7253;--lesson-color-d9b08c:#8c7253;--lesson-color-c89054:#b49268;--lesson-color-8d775d:#c4b7a5;--lesson-color-ce9d63:#b49268;--lesson-color-783e19:#efb281;--lesson-color-eef1e7:#30382a;--lesson-color-f0c98f:#574022;--lesson-color-b45112:#efae75;--lesson-color-24231f:#f1e6d5}
:root[data-theme="dark"] svg [fill="#fbf6ed"]{fill:#1e1d1a}
:root[data-theme="dark"] svg [stroke="#fbf6ed"]{stroke:#1e1d1a}
:root[data-theme="dark"] svg [fill="#fffaf2"]{fill:#292621}
:root[data-theme="dark"] svg [stroke="#fffaf2"]{stroke:#292621}
:root[data-theme="dark"] svg [fill="#fffaf0"]{fill:#292621}
:root[data-theme="dark"] svg [stroke="#fffaf0"]{stroke:#292621}
:root[data-theme="dark"] svg [fill="#f5eddf"]{fill:#302b24}
:root[data-theme="dark"] svg [stroke="#f5eddf"]{stroke:#302b24}
:root[data-theme="dark"] svg [fill="#f1e4d3"]{fill:#342c23}
:root[data-theme="dark"] svg [stroke="#f1e4d3"]{stroke:#342c23}
:root[data-theme="dark"] svg [fill="#f8eddd"]{fill:#302a23}
:root[data-theme="dark"] svg [stroke="#f8eddd"]{stroke:#302a23}
:root[data-theme="dark"] svg [fill="#fce6c9"]{fill:#473420}
:root[data-theme="dark"] svg [stroke="#fce6c9"]{stroke:#473420}
:root[data-theme="dark"] svg [fill="#fae5c4"]{fill:#473420}
:root[data-theme="dark"] svg [stroke="#fae5c4"]{stroke:#473420}
:root[data-theme="dark"] svg [fill="#faebd2"]{fill:#3b3022}
:root[data-theme="dark"] svg [stroke="#faebd2"]{stroke:#3b3022}
:root[data-theme="dark"] svg [fill="#f8dfb4"]{fill:#574022}
:root[data-theme="dark"] svg [stroke="#f8dfb4"]{stroke:#574022}
:root[data-theme="dark"] svg [fill="#f9e6c6"]{fill:#473420}
:root[data-theme="dark"] svg [stroke="#f9e6c6"]{stroke:#473420}
:root[data-theme="dark"] svg [fill="#f9e8df"]{fill:#3e2f29}
:root[data-theme="dark"] svg [stroke="#f9e8df"]{stroke:#3e2f29}
:root[data-theme="dark"] svg [fill="#edf0e1"]{fill:#30382a}
:root[data-theme="dark"] svg [stroke="#edf0e1"]{stroke:#30382a}
:root[data-theme="dark"] svg [fill="#eee8f4"]{fill:#36303f}
:root[data-theme="dark"] svg [stroke="#eee8f4"]{stroke:#36303f}
:root[data-theme="dark"] svg [fill="#e8eee1"]{fill:#30382a}
:root[data-theme="dark"] svg [stroke="#e8eee1"]{stroke:#30382a}
:root[data-theme="dark"] svg [fill="#dce9d9"]{fill:#3a4a32}
:root[data-theme="dark"] svg [stroke="#dce9d9"]{stroke:#3a4a32}
:root[data-theme="dark"] svg [fill="#e5ddef"]{fill:#473a54}
:root[data-theme="dark"] svg [stroke="#e5ddef"]{stroke:#473a54}
:root[data-theme="dark"] svg [fill="#e2ecdc"]{fill:#303d2c}
:root[data-theme="dark"] svg [stroke="#e2ecdc"]{stroke:#303d2c}
:root[data-theme="dark"] svg [fill="#e1ebda"]{fill:#303d2c}
:root[data-theme="dark"] svg [stroke="#e1ebda"]{stroke:#303d2c}
:root[data-theme="dark"] svg [fill="#f6ead8"]{fill:#3c3024}
:root[data-theme="dark"] svg [stroke="#f6ead8"]{stroke:#3c3024}
:root[data-theme="dark"] svg [fill="#f8f0e4"]{fill:#2d2821}
:root[data-theme="dark"] svg [stroke="#f8f0e4"]{stroke:#2d2821}
:root[data-theme="dark"] svg [fill="#492b19"]{fill:#f1e6d5}
:root[data-theme="dark"] svg [stroke="#492b19"]{stroke:#f1e6d5}
:root[data-theme="dark"] svg [fill="#4c2c1c"]{fill:#f1e6d5}
:root[data-theme="dark"] svg [stroke="#4c2c1c"]{stroke:#f1e6d5}
:root[data-theme="dark"] svg [fill="#795b45"]{fill:#c4b7a5}
:root[data-theme="dark"] svg [stroke="#795b45"]{stroke:#c4b7a5}
:root[data-theme="dark"] svg [fill="#84674f"]{fill:#b8a994}
:root[data-theme="dark"] svg [stroke="#84674f"]{stroke:#b8a994}
:root[data-theme="dark"] svg [fill="#765741"]{fill:#c4b7a5}
:root[data-theme="dark"] svg [stroke="#765741"]{stroke:#c4b7a5}
:root[data-theme="dark"] svg [fill="#665845"]{fill:#c9baa7}
:root[data-theme="dark"] svg [stroke="#665845"]{stroke:#c9baa7}
:root[data-theme="dark"] svg [fill="#e7d2bd"]{fill:#594d40}
:root[data-theme="dark"] svg [stroke="#e7d2bd"]{stroke:#594d40}
:root[data-theme="dark"] svg [fill="#efdfce"]{fill:#3d362e}
:root[data-theme="dark"] svg [stroke="#efdfce"]{stroke:#3d362e}
:root[data-theme="dark"] svg [fill="#e4d2bb"]{fill:#5c4e3d}
:root[data-theme="dark"] svg [stroke="#e4d2bb"]{stroke:#5c4e3d}
:root[data-theme="dark"] svg [fill="#d2b48e"]{fill:#8c7253}
:root[data-theme="dark"] svg [stroke="#d2b48e"]{stroke:#8c7253}
:root[data-theme="dark"] svg [fill="#c7a584"]{fill:#867058}
:root[data-theme="dark"] svg [stroke="#c7a584"]{stroke:#867058}
:root[data-theme="dark"] svg [fill="#d8b48e"]{fill:#8b7153}
:root[data-theme="dark"] svg [stroke="#d8b48e"]{stroke:#8b7153}
:root[data-theme="dark"] svg [fill="#bc9471"]{fill:#8d765e}
:root[data-theme="dark"] svg [stroke="#bc9471"]{stroke:#8d765e}
:root[data-theme="dark"] svg [fill="#bc8a58"]{fill:#bc9569}
:root[data-theme="dark"] svg [stroke="#bc8a58"]{stroke:#bc9569}
:root[data-theme="dark"] svg [fill="#c8a98a"]{fill:#8b735b}
:root[data-theme="dark"] svg [stroke="#c8a98a"]{stroke:#8b735b}
:root[data-theme="dark"] svg [fill="#dec1a1"]{fill:#79644c}
:root[data-theme="dark"] svg [stroke="#dec1a1"]{stroke:#79644c}
:root[data-theme="dark"] svg [fill="#b15317"]{fill:#efae75}
:root[data-theme="dark"] svg [stroke="#b15317"]{stroke:#efae75}
:root[data-theme="dark"] svg [fill="#a7460d"]{fill:#ffc18c}
:root[data-theme="dark"] svg [stroke="#a7460d"]{stroke:#ffc18c}
:root[data-theme="dark"] svg [fill="#a94e16"]{fill:#efae75}
:root[data-theme="dark"] svg [stroke="#a94e16"]{stroke:#efae75}
:root[data-theme="dark"] svg [fill="#97400e"]{fill:#efb681}
:root[data-theme="dark"] svg [stroke="#97400e"]{stroke:#efb681}
:root[data-theme="dark"] svg [fill="#8d581f"]{fill:#e5b578}
:root[data-theme="dark"] svg [stroke="#8d581f"]{stroke:#e5b578}
:root[data-theme="dark"] svg [fill="#edb44f"]{fill:#edb44f}
:root[data-theme="dark"] svg [stroke="#edb44f"]{stroke:#edb44f}
:root[data-theme="dark"] svg [fill="#e87a4e"]{fill:#efa080}
:root[data-theme="dark"] svg [stroke="#e87a4e"]{stroke:#efa080}
:root[data-theme="dark"] svg [fill="#738746"]{fill:#b1c887}
:root[data-theme="dark"] svg [stroke="#738746"]{stroke:#b1c887}
:root[data-theme="dark"] svg [fill="#426244"]{fill:#a7c9a3}
:root[data-theme="dark"] svg [stroke="#426244"]{stroke:#a7c9a3}
:root[data-theme="dark"] svg [fill="#4f7558"]{fill:#aad0ae}
:root[data-theme="dark"] svg [stroke="#4f7558"]{stroke:#aad0ae}
:root[data-theme="dark"] svg [fill="#4d765a"]{fill:#aad0ae}
:root[data-theme="dark"] svg [stroke="#4d765a"]{stroke:#aad0ae}
:root[data-theme="dark"] svg [fill="#48602c"]{fill:#b3cd91}
:root[data-theme="dark"] svg [stroke="#48602c"]{stroke:#b3cd91}
:root[data-theme="dark"] svg [fill="#4f612f"]{fill:#b3cd91}
:root[data-theme="dark"] svg [stroke="#4f612f"]{stroke:#b3cd91}
:root[data-theme="dark"] svg [fill="#46673d"]{fill:#afd09d}
:root[data-theme="dark"] svg [stroke="#46673d"]{stroke:#afd09d}
:root[data-theme="dark"] svg [fill="#327564"]{fill:#87d3b6}
:root[data-theme="dark"] svg [stroke="#327564"]{stroke:#87d3b6}
:root[data-theme="dark"] svg [fill="#9e5033"]{fill:#f0b194}
:root[data-theme="dark"] svg [stroke="#9e5033"]{stroke:#f0b194}
:root[data-theme="dark"] svg [fill="#7959a3"]{fill:#cbb7e8}
:root[data-theme="dark"] svg [stroke="#7959a3"]{stroke:#cbb7e8}
:root[data-theme="dark"] svg [fill="#a14762"]{fill:#ecabc2}
:root[data-theme="dark"] svg [stroke="#a14762"]{stroke:#ecabc2}
:root[data-theme="dark"] svg [fill="#80641c"]{fill:#e2ce87}
:root[data-theme="dark"] svg [stroke="#80641c"]{stroke:#e2ce87}
:root[data-theme="dark"] svg [fill="#796096"]{fill:#cbb6e4}
:root[data-theme="dark"] svg [stroke="#796096"]{stroke:#cbb6e4}
:root[data-theme="dark"] svg [fill="#a95b31"]{fill:#efb281}
:root[data-theme="dark"] svg [stroke="#a95b31"]{stroke:#efb281}
:root[data-theme="dark"] svg [fill="#a94e2e"]{fill:#f2ad90}
:root[data-theme="dark"] svg [stroke="#a94e2e"]{stroke:#f2ad90}
:root[data-theme="dark"] svg [fill="#a5617a"]{fill:#e5b1c5}
:root[data-theme="dark"] svg [stroke="#a5617a"]{stroke:#e5b1c5}
:root[data-theme="dark"] svg [fill="#755238"]{fill:#dfb792}
:root[data-theme="dark"] svg [stroke="#755238"]{stroke:#dfb792}
:root[data-theme="dark"] svg [fill="#7b956d"]{fill:#b6ce9e}
:root[data-theme="dark"] svg [stroke="#7b956d"]{stroke:#b6ce9e}
:root[data-theme="dark"] svg [fill="#783b2c"]{fill:#eab19d}
:root[data-theme="dark"] svg [stroke="#783b2c"]{stroke:#eab19d}
:root[data-theme="dark"] svg [fill="#8c4030"]{fill:#f4ad99}
:root[data-theme="dark"] svg [stroke="#8c4030"]{stroke:#f4ad99}
:root[data-theme="dark"] svg [fill="#ac4427"]{fill:#f6a88a}
:root[data-theme="dark"] svg [stroke="#ac4427"]{stroke:#f6a88a}
:root[data-theme="dark"] svg [fill="#b59b81"]{fill:#b59b81}
:root[data-theme="dark"] svg [stroke="#b59b81"]{stroke:#b59b81}
:root[data-theme="dark"] svg [fill="#fae9ce"]{fill:#473420}
:root[data-theme="dark"] svg [stroke="#fae9ce"]{stroke:#473420}
:root[data-theme="dark"] svg [fill="#f5d7ac"]{fill:#574022}
:root[data-theme="dark"] svg [stroke="#f5d7ac"]{stroke:#574022}
:root[data-theme="dark"] svg [fill="#edc692"]{fill:#937448}
:root[data-theme="dark"] svg [stroke="#edc692"]{stroke:#937448}
:root[data-theme="dark"] svg [fill="#bca083"]{fill:#8c7253}
:root[data-theme="dark"] svg [stroke="#bca083"]{stroke:#8c7253}
:root[data-theme="dark"] svg [fill="#a94a11"]{fill:#efae75}
:root[data-theme="dark"] svg [stroke="#a94a11"]{stroke:#efae75}
:root[data-theme="dark"] svg [fill="#3f2514"]{fill:#f1e6d5}
:root[data-theme="dark"] svg [stroke="#3f2514"]{stroke:#f1e6d5}
:root[data-theme="dark"] svg [fill="#a96a32"]{fill:#e7b17e}
:root[data-theme="dark"] svg [stroke="#a96a32"]{stroke:#e7b17e}
:root[data-theme="dark"] svg [fill="#fbe5bf"]{fill:#473420}
:root[data-theme="dark"] svg [stroke="#fbe5bf"]{stroke:#473420}
:root[data-theme="dark"] svg [fill="#d79540"]{fill:#e0a957}
:root[data-theme="dark"] svg [stroke="#d79540"]{stroke:#e0a957}
:root[data-theme="dark"] svg [fill="#d79640"]{fill:#e0a957}
:root[data-theme="dark"] svg [stroke="#d79640"]{stroke:#e0a957}
:root[data-theme="dark"] svg [fill="#f8d28d"]{fill:#574022}
:root[data-theme="dark"] svg [stroke="#f8d28d"]{stroke:#574022}
:root[data-theme="dark"] svg [fill="#98501d"]{fill:#efb681}
:root[data-theme="dark"] svg [stroke="#98501d"]{stroke:#efb681}
:root[data-theme="dark"] svg [fill="#fae8cd"]{fill:#3c3024}
:root[data-theme="dark"] svg [stroke="#fae8cd"]{stroke:#3c3024}
:root[data-theme="dark"] svg [fill="#fbe8c8"]{fill:#473420}
:root[data-theme="dark"] svg [stroke="#fbe8c8"]{stroke:#473420}
:root[data-theme="dark"] svg [fill="#77583c"]{fill:#c4b7a5}
:root[data-theme="dark"] svg [stroke="#77583c"]{stroke:#c4b7a5}
:root[data-theme="dark"] svg [fill="#d2a77a"]{fill:#8c7253}
:root[data-theme="dark"] svg [stroke="#d2a77a"]{stroke:#8c7253}
:root[data-theme="dark"] svg [fill="#f7e7d1"]{fill:#3c3024}
:root[data-theme="dark"] svg [stroke="#f7e7d1"]{stroke:#3c3024}
:root[data-theme="dark"] svg [fill="#c68f55"]{fill:#b49268}
:root[data-theme="dark"] svg [stroke="#c68f55"]{stroke:#b49268}
:root[data-theme="dark"] svg [fill="#f8e4c4"]{fill:#473420}
:root[data-theme="dark"] svg [stroke="#f8e4c4"]{stroke:#473420}
:root[data-theme="dark"] svg [fill="#efdbbd"]{fill:#574431}
:root[data-theme="dark"] svg [stroke="#efdbbd"]{stroke:#574431}
:root[data-theme="dark"] svg [fill="#f4dcae"]{fill:#574022}
:root[data-theme="dark"] svg [stroke="#f4dcae"]{stroke:#574022}
:root[data-theme="dark"] svg [fill="#925588"]{fill:#d4a7cd}
:root[data-theme="dark"] svg [stroke="#925588"]{stroke:#d4a7cd}
:root[data-theme="dark"] svg [fill="#a55024"]{fill:#efb281}
:root[data-theme="dark"] svg [stroke="#a55024"]{stroke:#efb281}
:root[data-theme="dark"] svg [fill="#657b34"]{fill:#b1c887}
:root[data-theme="dark"] svg [stroke="#657b34"]{stroke:#b1c887}
:root[data-theme="dark"] svg [fill="#2c6c7a"]{fill:#90c6d2}
:root[data-theme="dark"] svg [stroke="#2c6c7a"]{stroke:#90c6d2}
:root[data-theme="dark"] svg [fill="#f5e8d6"]{fill:#3c3024}
:root[data-theme="dark"] svg [stroke="#f5e8d6"]{stroke:#3c3024}
:root[data-theme="dark"] svg [fill="#a45c22"]{fill:#efb281}
:root[data-theme="dark"] svg [stroke="#a45c22"]{stroke:#efb281}
:root[data-theme="dark"] svg [fill="#486b38"]{fill:#b1c887}
:root[data-theme="dark"] svg [stroke="#486b38"]{stroke:#b1c887}
:root[data-theme="dark"] svg [fill="#ab611f"]{fill:#efb281}
:root[data-theme="dark"] svg [stroke="#ab611f"]{stroke:#efb281}
:root[data-theme="dark"] svg [fill="#9b6f3e"]{fill:#d4b58c}
:root[data-theme="dark"] svg [stroke="#9b6f3e"]{stroke:#d4b58c}
:root[data-theme="dark"] svg [fill="#d9ba99"]{fill:#79644c}
:root[data-theme="dark"] svg [stroke="#d9ba99"]{stroke:#79644c}
:root[data-theme="dark"] svg [fill="#d5ad75"]{fill:#957247}
:root[data-theme="dark"] svg [stroke="#d5ad75"]{stroke:#957247}
:root[data-theme="dark"] svg [fill="#8c9b70"]{fill:#afc58b}
:root[data-theme="dark"] svg [stroke="#8c9b70"]{stroke:#afc58b}
:root[data-theme="dark"] svg [fill="#f0e8dc"]{fill:#302b24}
:root[data-theme="dark"] svg [stroke="#f0e8dc"]{stroke:#302b24}
:root[data-theme="dark"] svg [fill="#f8eddb"]{fill:#302b24}
:root[data-theme="dark"] svg [stroke="#f8eddb"]{stroke:#302b24}
:root[data-theme="dark"] svg [fill="#faf4e9"]{fill:#292621}
:root[data-theme="dark"] svg [stroke="#faf4e9"]{stroke:#292621}
:root[data-theme="dark"] svg [fill="#c4a27e"]{fill:#8c7253}
:root[data-theme="dark"] svg [stroke="#c4a27e"]{stroke:#8c7253}
:root[data-theme="dark"] svg [fill="#b46643"]{fill:#e9b09b}
:root[data-theme="dark"] svg [stroke="#b46643"]{stroke:#e9b09b}
:root[data-theme="dark"] svg [fill="#fae4d6"]{fill:#3e2f29}
:root[data-theme="dark"] svg [stroke="#fae4d6"]{stroke:#3e2f29}
:root[data-theme="dark"] svg [fill="#8064a1"]{fill:#cbb7e8}
:root[data-theme="dark"] svg [stroke="#8064a1"]{stroke:#cbb7e8}
:root[data-theme="dark"] svg [fill="#eee6f5"]{fill:#36303f}
:root[data-theme="dark"] svg [stroke="#eee6f5"]{stroke:#36303f}
:root[data-theme="dark"] svg [fill="#9a3e2b"]{fill:#f2ad90}
:root[data-theme="dark"] svg [stroke="#9a3e2b"]{stroke:#f2ad90}
:root[data-theme="dark"] svg [fill="#e2d0b8"]{fill:#594d40}
:root[data-theme="dark"] svg [stroke="#e2d0b8"]{stroke:#594d40}
:root[data-theme="dark"] svg [fill="#edf0e3"]{fill:#30382a}
:root[data-theme="dark"] svg [stroke="#edf0e3"]{stroke:#30382a}
:root[data-theme="dark"] svg [fill="#fffaf1"]{fill:#292621}
:root[data-theme="dark"] svg [stroke="#fffaf1"]{stroke:#292621}
:root[data-theme="dark"] svg [fill="#d5b995"]{fill:#8c7253}
:root[data-theme="dark"] svg [stroke="#d5b995"]{stroke:#8c7253}
:root[data-theme="dark"] svg [fill="#a95a24"]{fill:#efb281}
:root[data-theme="dark"] svg [stroke="#a95a24"]{stroke:#efb281}
:root[data-theme="dark"] svg [fill="#dcc5a8"]{fill:#79644c}
:root[data-theme="dark"] svg [stroke="#dcc5a8"]{stroke:#79644c}
:root[data-theme="dark"] svg [fill="#60753c"]{fill:#b1c887}
:root[data-theme="dark"] svg [stroke="#60753c"]{stroke:#b1c887}
:root[data-theme="dark"] svg [fill="#c8a175"]{fill:#8c7253}
:root[data-theme="dark"] svg [stroke="#c8a175"]{stroke:#8c7253}
:root[data-theme="dark"] svg [fill="#854b23"]{fill:#e5b578}
:root[data-theme="dark"] svg [stroke="#854b23"]{stroke:#e5b578}
:root[data-theme="dark"] svg [fill="#d8b58c"]{fill:#8c7253}
:root[data-theme="dark"] svg [stroke="#d8b58c"]{stroke:#8c7253}
:root[data-theme="dark"] svg [fill="#7d3519"]{fill:#f2ad90}
:root[data-theme="dark"] svg [stroke="#7d3519"]{stroke:#f2ad90}
:root[data-theme="dark"] svg [fill="#f5dfbf"]{fill:#473420}
:root[data-theme="dark"] svg [stroke="#f5dfbf"]{stroke:#473420}
:root[data-theme="dark"] svg [fill="#8f351b"]{fill:#f2ad90}
:root[data-theme="dark"] svg [stroke="#8f351b"]{stroke:#f2ad90}
:root[data-theme="dark"] svg [fill="#dcb4a8"]{fill:#805b50}
:root[data-theme="dark"] svg [stroke="#dcb4a8"]{stroke:#805b50}
:root[data-theme="dark"] svg [fill="#fff5f0"]{fill:#3e2b26}
:root[data-theme="dark"] svg [stroke="#fff5f0"]{stroke:#3e2b26}
:root[data-theme="dark"] svg [fill="#fff6e8"]{fill:#352c21}
:root[data-theme="dark"] svg [stroke="#fff6e8"]{stroke:#352c21}
:root[data-theme="dark"] svg [fill="#f5e7d3"]{fill:#3c3024}
:root[data-theme="dark"] svg [stroke="#f5e7d3"]{stroke:#3c3024}
:root[data-theme="dark"] svg [fill="#7c62a3"]{fill:#cbb7e8}
:root[data-theme="dark"] svg [stroke="#7c62a3"]{stroke:#cbb7e8}
:root[data-theme="dark"] svg [fill="#f3e7d7"]{fill:#302b24}
:root[data-theme="dark"] svg [stroke="#f3e7d7"]{stroke:#302b24}
:root[data-theme="dark"] svg [fill="#31665a"]{fill:#87d3b6}
:root[data-theme="dark"] svg [stroke="#31665a"]{stroke:#87d3b6}
:root[data-theme="dark"] svg [fill="#e5efe8"]{fill:#2b3830}
:root[data-theme="dark"] svg [stroke="#e5efe8"]{stroke:#2b3830}
:root[data-theme="dark"] svg [fill="#42617e"]{fill:#a5c3e2}
:root[data-theme="dark"] svg [stroke="#42617e"]{stroke:#a5c3e2}
:root[data-theme="dark"] svg [fill="#e8eef4"]{fill:#2d353e}
:root[data-theme="dark"] svg [stroke="#e8eef4"]{stroke:#2d353e}
:root[data-theme="dark"] svg [fill="#a7490f"]{fill:#efae75}
:root[data-theme="dark"] svg [stroke="#a7490f"]{stroke:#efae75}
:root[data-theme="dark"] svg [fill="#f9e6ce"]{fill:#3c3024}
:root[data-theme="dark"] svg [stroke="#f9e6ce"]{stroke:#3c3024}
:root[data-theme="dark"] svg [fill="#382e25"]{fill:#eee2cb}
:root[data-theme="dark"] svg [stroke="#382e25"]{stroke:#eee2cb}
:root[data-theme="dark"] svg [fill="#91806b"]{fill:#99876e}
:root[data-theme="dark"] svg [stroke="#91806b"]{stroke:#99876e}
:root[data-theme="dark"] svg [fill="#f3ecd9"]{fill:#29271f}
:root[data-theme="dark"] svg [stroke="#f3ecd9"]{stroke:#29271f}
:root[data-theme="dark"] svg [fill="#a12e28"]{fill:#f5a198}
:root[data-theme="dark"] svg [stroke="#a12e28"]{stroke:#f5a198}
:root[data-theme="dark"] svg [fill="#fff9ef"]{fill:#292621}
:root[data-theme="dark"] svg [stroke="#fff9ef"]{stroke:#292621}
:root[data-theme="dark"] svg [fill="#d3a263"]{fill:#b49268}
:root[data-theme="dark"] svg [stroke="#d3a263"]{stroke:#b49268}
:root[data-theme="dark"] svg [fill="#fae9cf"]{fill:#3c3024}
:root[data-theme="dark"] svg [stroke="#fae9cf"]{stroke:#3c3024}
:root[data-theme="dark"] svg [fill="#bd9570"]{fill:#b49268}
:root[data-theme="dark"] svg [stroke="#bd9570"]{stroke:#b49268}
:root[data-theme="dark"] svg [fill="#fffdf8"]{fill:#292621}
:root[data-theme="dark"] svg [stroke="#fffdf8"]{stroke:#292621}
:root[data-theme="dark"] svg [fill="#d89358"]{fill:#c79a70}
:root[data-theme="dark"] svg [stroke="#d89358"]{stroke:#c79a70}
:root[data-theme="dark"] svg [fill="#a34c2d"]{fill:#f2ad90}
:root[data-theme="dark"] svg [stroke="#a34c2d"]{stroke:#f2ad90}
:root[data-theme="dark"] svg [fill="#597236"]{fill:#b1c887}
:root[data-theme="dark"] svg [stroke="#597236"]{stroke:#b1c887}
:root[data-theme="dark"] svg [fill="#f5e6d2"]{fill:#3c3024}
:root[data-theme="dark"] svg [stroke="#f5e6d2"]{stroke:#3c3024}
:root[data-theme="dark"] svg [fill="#f7dfbc"]{fill:#473420}
:root[data-theme="dark"] svg [stroke="#f7dfbc"]{stroke:#473420}
:root[data-theme="dark"] svg [fill="#9d4d16"]{fill:#efae75}
:root[data-theme="dark"] svg [stroke="#9d4d16"]{stroke:#efae75}
:root[data-theme="dark"] svg [fill="#f7ead7"]{fill:#3c3024}
:root[data-theme="dark"] svg [stroke="#f7ead7"]{stroke:#3c3024}
:root[data-theme="dark"] svg [fill="#e8d1b8"]{fill:#594d40}
:root[data-theme="dark"] svg [stroke="#e8d1b8"]{stroke:#594d40}
:root[data-theme="dark"] svg [fill="#daaa72"]{fill:#c79a70}
:root[data-theme="dark"] svg [stroke="#daaa72"]{stroke:#c79a70}
:root[data-theme="dark"] svg [fill="#dc8530"]{fill:#efae75}
:root[data-theme="dark"] svg [stroke="#dc8530"]{stroke:#efae75}
:root[data-theme="dark"] svg [fill="#566b2c"]{fill:#b1c887}
:root[data-theme="dark"] svg [stroke="#566b2c"]{stroke:#b1c887}
:root[data-theme="dark"] svg [fill="#b96b16"]{fill:#efae75}
:root[data-theme="dark"] svg [stroke="#b96b16"]{stroke:#efae75}
:root[data-theme="dark"] svg [fill="#fff0d5"]{fill:#473420}
:root[data-theme="dark"] svg [stroke="#fff0d5"]{stroke:#473420}
:root[data-theme="dark"] svg [fill="#d9a45a"]{fill:#c79a70}
:root[data-theme="dark"] svg [stroke="#d9a45a"]{stroke:#c79a70}
:root[data-theme="dark"] svg [fill="#d6b386"]{fill:#8c7253}
:root[data-theme="dark"] svg [stroke="#d6b386"]{stroke:#8c7253}
:root[data-theme="dark"] svg [fill="#fcf4e7"]{fill:#302b24}
:root[data-theme="dark"] svg [stroke="#fcf4e7"]{stroke:#302b24}
:root[data-theme="dark"] svg [fill="#d6b995"]{fill:#8c7253}
:root[data-theme="dark"] svg [stroke="#d6b995"]{stroke:#8c7253}
:root[data-theme="dark"] svg [fill="#d9b08c"]{fill:#8c7253}
:root[data-theme="dark"] svg [stroke="#d9b08c"]{stroke:#8c7253}
:root[data-theme="dark"] svg [fill="#c89054"]{fill:#b49268}
:root[data-theme="dark"] svg [stroke="#c89054"]{stroke:#b49268}
:root[data-theme="dark"] svg [fill="#8d775d"]{fill:#c4b7a5}
:root[data-theme="dark"] svg [stroke="#8d775d"]{stroke:#c4b7a5}
:root[data-theme="dark"] svg [fill="#ce9d63"]{fill:#b49268}
:root[data-theme="dark"] svg [stroke="#ce9d63"]{stroke:#b49268}
:root[data-theme="dark"] svg [fill="#783e19"]{fill:#efb281}
:root[data-theme="dark"] svg [stroke="#783e19"]{stroke:#efb281}
:root[data-theme="dark"] svg [fill="#eef1e7"]{fill:#30382a}
:root[data-theme="dark"] svg [stroke="#eef1e7"]{stroke:#30382a}
:root[data-theme="dark"] svg [fill="#f0c98f"]{fill:#574022}
:root[data-theme="dark"] svg [stroke="#f0c98f"]{stroke:#574022}
:root[data-theme="dark"] svg [fill="#b45112"]{fill:#efae75}
:root[data-theme="dark"] svg [stroke="#b45112"]{stroke:#efae75}
:root[data-theme="dark"] svg [fill="#24231f"]{fill:#f1e6d5}
:root[data-theme="dark"] svg [stroke="#24231f"]{stroke:#f1e6d5}
/* 暖炭色夜读：结构、字号和编辑器保持一致，仅切换阅读表面和语义色。 */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1e1d1a;
  --paper-raised: #292621;
  --ink: #f1e6d5;
  --ink-soft: #c4b7a5;
  --muted: #b8a994;
  --line: #594d40;
  --line-soft: #3d362e;
  --accent: #efae75;
  --accent-hover: #ffc18c;
  --accent-soft: #473420;
  --honey: #edb44f;
  --coral: #efa080;
  --sage: #b1c887;
  --comment: #a7c9a3;
  --code-background: #302b24;
  --formula-mint-ink: #87d3b6;
  --formula-peach-ink: #f0b194;
  --formula-lavender-ink: #cbb7e8;
  --formula-rose-ink: #ecabc2;
  --formula-butter-ink: #e2ce87;
}
:root[data-theme="dark"] ::selection { background: #65503a; color: #fff5e8; }
:root[data-theme="dark"] body { background: var(--paper); color: var(--ink); }
:root[data-theme="dark"] .button-primary,
:root[data-theme="dark"] .back-to-top { color: #241b13; }
:root[data-theme="dark"] :is(.button,.utility-button,.back-to-top) { box-shadow: inset 0 1px 1px #ffffff26, 0 3px 9px #00000059; }
:root[data-theme="dark"] :is(.settings-dropdown,.account-dropdown,.catalog-shortcuts) { box-shadow: 0 10px 30px #00000066; }
:root[data-theme="dark"] .settings-dropdown { border: 1px solid var(--line); }
:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .step-navigation { background-color: var(--paper); }
:root[data-theme="dark"] .home-floating-nav { background:var(--paper-raised); box-shadow:0 10px 30px #00000066; }
:root[data-theme="dark"] .home-floating-nav .button-quiet { color:var(--ink); border-color:var(--line); }
:root[data-theme="dark"] .home-floating-nav .button-quiet:hover { color:var(--ink); background:var(--accent-soft); }
:root[data-theme="dark"] .home-floating-nav .button-primary { color:#241b13; }
:root[data-theme="dark"] .home-floating-nav .button:focus-visible { outline-color:var(--accent); }
:root[data-theme="dark"] .lesson-photo-diagram { color-scheme: dark; }
:root[data-theme="dark"] .account-page .wechat-login iframe,
:root[data-theme="dark"] .checkout-qr svg { color-scheme: light; background: white; }

.settings-theme { margin: 0 0 12px; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.settings-theme legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 12px; color: var(--ink); font-size: 16px; }
.settings-theme legend svg { color: var(--accent); }
.settings-theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settings-theme-options label:first-child { grid-column: 1 / -1; }
.settings-theme-options label { position: relative; cursor: pointer; }
.settings-theme-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.settings-theme-options label>span { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink-soft); font-size: 16px; }
.settings-theme-options input:checked + span { color: var(--ink); background: var(--accent-soft); border-color: var(--accent); font-weight: 650; }
.settings-theme-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.settings-theme-options label:hover>span { border-color: var(--accent); }
/* 课堂圈画：只增加可关闭的笔迹层，正文、数学和交互控件保持原样。 */
:root {
  --note-ink-0:#327564; --note-brush-0:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M5%2015Q43%2010%2081%2014T155%2012L151%2026Q92%2023%2054%2027L3%2025Z%22%20fill%3D%22%23327564%22%20fill-opacity%3D%22.25%22%2F%3E%3Cpath%20d%3D%22M8%2028Q70%2024%20150%2025%22%20stroke%3D%22%23327564%22%20stroke-opacity%3D%22.5%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E"); --note-loop-0:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2042%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M137%206C94%201%2033%202%2010%209S-1%2032%2016%2036%20117%2040%20143%2032%20156%209%20139%207M143%2010Q125%204%20104%205%22%20stroke%3D%22%23327564%22%20stroke-width%3D%222.6%22%20vector-effect%3D%22non-scaling-stroke%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --note-ink-1:#a14762; --note-brush-1:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M5%2015Q43%2010%2081%2014T155%2012L151%2026Q92%2023%2054%2027L3%2025Z%22%20fill%3D%22%23a14762%22%20fill-opacity%3D%22.25%22%2F%3E%3Cpath%20d%3D%22M8%2028Q70%2024%20150%2025%22%20stroke%3D%22%23a14762%22%20stroke-opacity%3D%22.5%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E"); --note-loop-1:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2042%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M137%206C94%201%2033%202%2010%209S-1%2032%2016%2036%20117%2040%20143%2032%20156%209%20139%207M143%2010Q125%204%20104%205%22%20stroke%3D%22%23a14762%22%20stroke-width%3D%222.6%22%20vector-effect%3D%22non-scaling-stroke%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --note-ink-2:#7959a3; --note-brush-2:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M5%2015Q43%2010%2081%2014T155%2012L151%2026Q92%2023%2054%2027L3%2025Z%22%20fill%3D%22%237959a3%22%20fill-opacity%3D%22.25%22%2F%3E%3Cpath%20d%3D%22M8%2028Q70%2024%20150%2025%22%20stroke%3D%22%237959a3%22%20stroke-opacity%3D%22.5%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E"); --note-loop-2:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2042%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M137%206C94%201%2033%202%2010%209S-1%2032%2016%2036%20117%2040%20143%2032%20156%209%20139%207M143%2010Q125%204%20104%205%22%20stroke%3D%22%237959a3%22%20stroke-width%3D%222.6%22%20vector-effect%3D%22non-scaling-stroke%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --note-ink-3:#9e5033; --note-brush-3:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M5%2015Q43%2010%2081%2014T155%2012L151%2026Q92%2023%2054%2027L3%2025Z%22%20fill%3D%22%239e5033%22%20fill-opacity%3D%22.25%22%2F%3E%3Cpath%20d%3D%22M8%2028Q70%2024%20150%2025%22%20stroke%3D%22%239e5033%22%20stroke-opacity%3D%22.5%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E"); --note-loop-3:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2042%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M137%206C94%201%2033%202%2010%209S-1%2032%2016%2036%20117%2040%20143%2032%20156%209%20139%207M143%2010Q125%204%20104%205%22%20stroke%3D%22%239e5033%22%20stroke-width%3D%222.6%22%20vector-effect%3D%22non-scaling-stroke%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --note-wave:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20128%2016%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M0%208q4-7%208-1t8%200%208%200%208-1%22%20stroke%3D%22%23327564%22%20stroke-width%3D%224.3%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M32%208q4-7%208-1t8%200%208%200%208-1%22%20stroke%3D%22%23a14762%22%20stroke-width%3D%224.3%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M64%208q4-7%208-1t8%200%208%200%208-1%22%20stroke%3D%22%237959a3%22%20stroke-width%3D%224.3%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M96%208q4-7%208-1t8%200%208%200%208-1%22%20stroke%3D%22%239e5033%22%20stroke-width%3D%224.3%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}
:root[data-theme="dark"] {
  --note-ink-0:#87d3b6; --note-brush-0:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M5%2015Q43%2010%2081%2014T155%2012L151%2026Q92%2023%2054%2027L3%2025Z%22%20fill%3D%22%2387d3b6%22%20fill-opacity%3D%22.25%22%2F%3E%3Cpath%20d%3D%22M8%2028Q70%2024%20150%2025%22%20stroke%3D%22%2387d3b6%22%20stroke-opacity%3D%22.5%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E"); --note-loop-0:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2042%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M137%206C94%201%2033%202%2010%209S-1%2032%2016%2036%20117%2040%20143%2032%20156%209%20139%207M143%2010Q125%204%20104%205%22%20stroke%3D%22%2387d3b6%22%20stroke-width%3D%222.6%22%20vector-effect%3D%22non-scaling-stroke%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --note-ink-1:#ecabc2; --note-brush-1:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M5%2015Q43%2010%2081%2014T155%2012L151%2026Q92%2023%2054%2027L3%2025Z%22%20fill%3D%22%23ecabc2%22%20fill-opacity%3D%22.25%22%2F%3E%3Cpath%20d%3D%22M8%2028Q70%2024%20150%2025%22%20stroke%3D%22%23ecabc2%22%20stroke-opacity%3D%22.5%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E"); --note-loop-1:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2042%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M137%206C94%201%2033%202%2010%209S-1%2032%2016%2036%20117%2040%20143%2032%20156%209%20139%207M143%2010Q125%204%20104%205%22%20stroke%3D%22%23ecabc2%22%20stroke-width%3D%222.6%22%20vector-effect%3D%22non-scaling-stroke%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --note-ink-2:#cbb7e8; --note-brush-2:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M5%2015Q43%2010%2081%2014T155%2012L151%2026Q92%2023%2054%2027L3%2025Z%22%20fill%3D%22%23cbb7e8%22%20fill-opacity%3D%22.25%22%2F%3E%3Cpath%20d%3D%22M8%2028Q70%2024%20150%2025%22%20stroke%3D%22%23cbb7e8%22%20stroke-opacity%3D%22.5%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E"); --note-loop-2:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2042%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M137%206C94%201%2033%202%2010%209S-1%2032%2016%2036%20117%2040%20143%2032%20156%209%20139%207M143%2010Q125%204%20104%205%22%20stroke%3D%22%23cbb7e8%22%20stroke-width%3D%222.6%22%20vector-effect%3D%22non-scaling-stroke%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --note-ink-3:#f0b194; --note-brush-3:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M5%2015Q43%2010%2081%2014T155%2012L151%2026Q92%2023%2054%2027L3%2025Z%22%20fill%3D%22%23f0b194%22%20fill-opacity%3D%22.25%22%2F%3E%3Cpath%20d%3D%22M8%2028Q70%2024%20150%2025%22%20stroke%3D%22%23f0b194%22%20stroke-opacity%3D%22.5%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E"); --note-loop-3:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2042%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M137%206C94%201%2033%202%2010%209S-1%2032%2016%2036%20117%2040%20143%2032%20156%209%20139%207M143%2010Q125%204%20104%205%22%20stroke%3D%22%23f0b194%22%20stroke-width%3D%222.6%22%20vector-effect%3D%22non-scaling-stroke%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  --note-wave:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20128%2016%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M0%208q4-7%208-1t8%200%208%200%208-1%22%20stroke%3D%22%2387d3b6%22%20stroke-width%3D%224.3%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M32%208q4-7%208-1t8%200%208%200%208-1%22%20stroke%3D%22%23ecabc2%22%20stroke-width%3D%224.3%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M64%208q4-7%208-1t8%200%208%200%208-1%22%20stroke%3D%22%23cbb7e8%22%20stroke-width%3D%224.3%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M96%208q4-7%208-1t8%200%208%200%208-1%22%20stroke%3D%22%23f0b194%22%20stroke-width%3D%224.3%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}
.notebook-heading-ink { display:block; width:210px; max-width:60%; height:18px; margin:9px auto 0; color:var(--note-ink-3); }
.notebook-heading-ink>.notebook-pen { display:block; width:100%; height:100%; stroke-width:2.2; }
:root:not([data-notebook-enabled="false"]) .notebook-heading-ink+.heading-underline { display:none; }
.notebook-pen { pointer-events:none; flex:none; }
.notebook-inline-note { display:flex; align-items:flex-start; gap:8px; margin:-4px 0 24px 22px; font:20px/1.8 'Lesson Notebook',var(--sans); color:var(--ink); max-width:56ch; }
.notebook-inline-note>.notebook-pen { width:34px; height:32px; margin-top:1px; color:var(--note-ink); }
.notebook-inline-note>span { min-width:0; }
.notebook-inline-note strong { color:var(--note-ink); font-weight:400; }
.lesson-main .lesson-keypoint {
  padding:0 .08em .62em;
  background-image:var(--note-wave);
  background-size:5.8em .65em;
  background-position:left bottom;
  background-repeat:repeat-x;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}
.lesson-main .lesson-keypoint-term {
  padding:.14em .42em .62em;
  background-image:var(--note-loop-3),var(--note-wave);
  background-repeat:no-repeat,repeat-x;
  background-size:100% calc(100% - .35em),5.8em .65em;
  background-position:center top,left bottom;
}
.notebook-ink-0 { --note-ink:var(--note-ink-0); --note-brush:var(--note-brush-0); --note-loop:var(--note-loop-0); }
.notebook-ink-1 { --note-ink:var(--note-ink-1); --note-brush:var(--note-brush-1); --note-loop:var(--note-loop-1); }
.notebook-ink-2 { --note-ink:var(--note-ink-2); --note-brush:var(--note-brush-2); --note-loop:var(--note-loop-2); }
.notebook-ink-3 { --note-ink:var(--note-ink-3); --note-brush:var(--note-brush-3); --note-loop:var(--note-loop-3); }
.notebook-term,.notebook-emphasis {
  padding:.12em .2em .18em;
  background:var(--note-brush) left 72%/100% 1.2em no-repeat;
  -webkit-box-decoration-break:clone;
  box-decoration-break:clone;
}
.notebook-emphasis-short { padding:.17em .4em .2em; background-image:var(--note-loop); background-size:100% 100%; background-position:center; }
.notebook-margin {
  position:relative; max-width:850px; margin:42px 0 28px; padding:4px 0 0;
  font-family:'Lesson Notebook',var(--sans); font-size:21px; line-height:1.8;
  color:var(--ink);
}
.notebook-margin-label { display:flex; align-items:center; gap:4px; color:var(--note-ink-3); margin:0 0 18px; font-size:22px; }
.notebook-margin-label>.notebook-pen { width:64px; height:38px; transform:rotate(-9deg); }
.notebook-margin-label>span { transform:rotate(-3deg); }
.notebook-margin-body { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:28px 42px; align-items:start; }
.notebook-margin-compact .notebook-margin-body { grid-template-columns:minmax(0,1fr); }
.notebook-translations { margin:0; display:grid; gap:22px; }
.notebook-translation { position:relative; padding-left:16px; min-width:0; }
.notebook-translation::before { content:''; position:absolute; width:6px; height:6px; left:0; top:16px; border-radius:50%; background:var(--note-ink); box-shadow:1px 2px 0 var(--note-ink); }
.notebook-translation dt { display:flex; align-items:center; flex-wrap:wrap; gap:12px; font-weight:400; color:var(--note-ink); }
.notebook-translation dt>span { display:inline-flex; }
.notebook-translation dt svg { width:38px; height:24px; }
.notebook-translation dd { margin:2px 0 0; font-size:20px; line-height:1.8; }
.notebook-correction { display:flex; flex-direction:column; align-items:flex-start; padding:0 4px; min-width:0; }
.notebook-correction-label { color:var(--note-ink-1); font-size:18px; }
.notebook-wrong { display:inline-block; position:relative; max-width:100%; padding:2px 8px; margin:3px 0 6px; }
.notebook-wrong s { text-decoration-color:var(--note-ink-1); text-decoration-thickness:2px; }
.notebook-wrong>.notebook-pen { position:absolute; inset:0; width:100%; height:100%; color:var(--note-ink-1); }
.notebook-right { display:block; color:var(--ink); font-size:20px; line-height:1.9; }
.notebook-right-label { display:block; color:var(--note-ink-0); font-size:19px; font-weight:700; }
.guide-content .notebook-check { display:flex; align-items:center; gap:10px; margin:24px 0 0; color:var(--note-ink-0); font-size:21px; font-weight:700; line-height:1.8; }
.notebook-check>.notebook-pen { width:39px; height:32px; transform:rotate(-6deg); }
html[data-notebook-enabled="false"] [data-notebook-only] { display:none!important; }
html[data-notebook-enabled="false"] .lesson-main :is(.lesson-keypoint,.notebook-term,.notebook-emphasis) {
  padding:0; background:none; text-decoration:none;
}
@media(max-width:650px) {
  .notebook-heading-ink { width:180px; height:16px; }
  .notebook-margin { margin-top:32px; font-size:20px; }
  .notebook-margin-body { grid-template-columns:minmax(0,1fr); gap:26px; }
  .notebook-margin-label { font-size:21px; margin-bottom:16px; }
  .notebook-translation dd,.notebook-right { font-size:20px; }
  .notebook-correction { padding-left:16px; }
  .notebook-inline-note { margin-left:8px; font-size:20px; }
  .notebook-emphasis,.notebook-term,.lesson-main .lesson-keypoint { overflow-wrap:anywhere; }
}
@media(forced-colors:active) {
  .lesson-main :is(.lesson-keypoint,.notebook-term,.notebook-emphasis) { background:none; text-decoration:underline wavy currentColor; text-underline-offset:.2em; }
  .notebook-margin { color:CanvasText; }
  .notebook-margin :is(dt,.notebook-margin-label,.notebook-correction-label,.notebook-right-label,.notebook-check) { color:CanvasText; }
}
@media print {
  .lesson-main :is(.lesson-keypoint,.notebook-term,.notebook-emphasis) { background:none; text-decoration:underline; text-underline-offset:.16em; }
  .notebook-heading-ink,.notebook-wrong>.notebook-pen { display:none; }
  .notebook-margin { break-inside:avoid; }
}
/* 有内容的红笔订正：标出误解后立即给出解释，避免错误句孤立出现。 */
.authored-correction { display:flex; flex-direction:column; align-items:flex-start; gap:4px; margin:24px 0 32px; padding:0 12px; max-width:60ch; font:21px/1.8 'Lesson Notebook',var(--sans); color:var(--ink); }
.authored-correction-label { color:var(--note-ink-1); font-size:18px; }
.authored-correction-wrong { color:var(--ink); text-decoration:line-through wavy var(--note-ink-1); text-decoration-thickness:2.2px; text-decoration-skip-ink:none; padding-inline:4px; }
.authored-correction-right { display:flex; gap:8px; align-items:flex-start; margin-top:4px; }
.authored-correction-right>svg { flex:0 0 32px; width:32px; height:26px; margin-top:4px; color:var(--note-ink-0); }
.authored-correction-right>span { min-width:0; }
.authored-correction-right strong { display:block; font-size:18px; font-weight:400; color:var(--note-ink-0); }
@media(max-width:650px) { .authored-correction { padding-inline:4px; font-size:20px; margin-block:20px 28px; overflow-wrap:anywhere; } }
@media(forced-colors:active) { .authored-correction-label,.authored-correction-right strong,.authored-correction-right>svg { color:CanvasText; } .authored-correction-wrong { text-decoration-color:CanvasText; } }
@media print { .authored-correction { break-inside:avoid; } }
/* 彩虹荧光笔：半透明笔迹，正文墨色与原有圈画保留。 */
.notebook-rainbow-0 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%23f1d451%22%20fill-opacity%3D%22.52%22%2F%3E%3C%2Fsvg%3E"); }
.notebook-rainbow-1 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%23f3ad70%22%20fill-opacity%3D%22.52%22%2F%3E%3C%2Fsvg%3E"); }
.notebook-rainbow-2 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%23ee9cb5%22%20fill-opacity%3D%22.52%22%2F%3E%3C%2Fsvg%3E"); }
.notebook-rainbow-3 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%23c6a7e4%22%20fill-opacity%3D%22.52%22%2F%3E%3C%2Fsvg%3E"); }
.notebook-rainbow-4 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%2394bfe8%22%20fill-opacity%3D%22.52%22%2F%3E%3C%2Fsvg%3E"); }
.notebook-rainbow-5 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%2387cdbb%22%20fill-opacity%3D%22.52%22%2F%3E%3C%2Fsvg%3E"); }
.notebook-rainbow-6 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%23bdd987%22%20fill-opacity%3D%22.52%22%2F%3E%3C%2Fsvg%3E"); }
:root[data-theme="dark"] .notebook-rainbow-0 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%23f5da79%22%20fill-opacity%3D%22.24%22%2F%3E%3C%2Fsvg%3E"); }
:root[data-theme="dark"] .notebook-rainbow-1 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%23f4b77f%22%20fill-opacity%3D%22.24%22%2F%3E%3C%2Fsvg%3E"); }
:root[data-theme="dark"] .notebook-rainbow-2 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%23f2abc3%22%20fill-opacity%3D%22.24%22%2F%3E%3C%2Fsvg%3E"); }
:root[data-theme="dark"] .notebook-rainbow-3 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%23d0b8ee%22%20fill-opacity%3D%22.24%22%2F%3E%3C%2Fsvg%3E"); }
:root[data-theme="dark"] .notebook-rainbow-4 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%23a6cbed%22%20fill-opacity%3D%22.24%22%2F%3E%3C%2Fsvg%3E"); }
:root[data-theme="dark"] .notebook-rainbow-5 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%239bdac6%22%20fill-opacity%3D%22.24%22%2F%3E%3C%2Fsvg%3E"); }
:root[data-theme="dark"] .notebook-rainbow-6 { --rainbow-brush:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20160%2032%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2012Q43%208%2082%2012T157%2010L154%2029Q113%2025%2077%2029T2%2028Z%22%20fill%3D%22%23c8e59c%22%20fill-opacity%3D%22.24%22%2F%3E%3C%2Fsvg%3E"); }
.lesson-main .notebook-highlight { color:var(--ink); padding:.12em 0 .18em; background:var(--rainbow-brush) left 76%/100% 1.15em no-repeat; -webkit-box-decoration-break:clone; box-decoration-break:clone; }
.lesson-main .notebook-emphasis-short.notebook-highlight { padding:.17em .4em .2em; background-image:var(--note-loop),var(--rainbow-brush); background-size:100% 100%,100% 1.15em; background-position:center,left 76%; }
.lesson-main .lesson-keypoint.notebook-highlight { padding:0 0 .62em; background-image:var(--rainbow-brush),var(--note-wave); background-size:100% 1.15em,5.8em .65em; background-position:left 43%,left bottom; background-repeat:no-repeat,repeat-x; }
.lesson-main .lesson-keypoint-term.notebook-highlight { padding:.14em .42em .62em; background-image:var(--note-loop-3),var(--rainbow-brush),var(--note-wave); background-size:100% calc(100% - .35em),100% 1.15em,5.8em .65em; background-position:center top,left 43%,left bottom; background-repeat:no-repeat,no-repeat,repeat-x; }
html[data-notebook-enabled="false"] .lesson-main .notebook-highlight { padding:0; background:none; }
@media(max-width:650px) { .lesson-main .notebook-highlight { overflow-wrap:anywhere; } }
@media(forced-colors:active) { .lesson-main .notebook-highlight { background:none!important; text-decoration:underline; text-underline-offset:.18em; } }
@media print { .lesson-main .notebook-highlight { background:none!important; text-decoration:underline; text-underline-offset:.18em; } }

/* 短圈画作为一个完整排版盒；换行时把笔迹留白计入宽度。长句继续逐行铺色。 */
.lesson-main .notebook-term.notebook-highlight,
.lesson-main .notebook-emphasis-short.notebook-highlight,
.lesson-main .lesson-keypoint-term.notebook-highlight { display:inline-block; max-inline-size:100%; box-sizing:border-box; vertical-align:baseline; overflow-wrap:anywhere; }
html[data-notebook-enabled="false"] .lesson-main :is(.notebook-term,.notebook-emphasis-short,.lesson-keypoint-term).notebook-highlight { display:inline; }

/* 页边解释按完整单词阅读，避免窄屏把 object 等短词拆成两截。 */
.notebook-inline-note > span,.notebook-margin { hyphens:none; }
