/* 自主学 · a quiet, readable workspace for every subject */
:root {
  --paper: #faf9f5;
  --surface: #fff;
  --ink: #33463b;
  --ink-strong: #193f32;
  --muted: #7e8b7d;
  --line: #e3e8df;
  --green: #255d46;
  --green-deep: #194b37;
  --green-soft: #eaf1e5;
  --gold: #d3a253;
  --gold-soft: #fbf1dc;
  --shadow: 0 6px 24px rgba(42,62,49,.045);
  --shadow-raised: 0 14px 32px rgba(42,62,49,.09);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: var(--ui-size,16px);
  line-height: 1.65;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; min-width: 320px; }
button,input,select,textarea { font: inherit; }
button,select { cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline: 3px solid #c49540; outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
img,svg { max-width: 100%; }
button:disabled { cursor: default; }
::selection { background: #d9eacb; color: var(--ink-strong); }
input::placeholder,textarea::placeholder { color: var(--muted); }
.hide,[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.muted,.muted-label { color: var(--muted); }
.muted-label { font-size: 0.82rem; }

/* Application frame */
.shell { min-height: 100vh; }
.app-header,.topbar { min-height: 76px; padding: 13px clamp(20px,2.6vw,42px); display: flex; align-items: center; justify-content: space-between; gap: 28px; background: rgba(255,255,252,.95); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.22rem; letter-spacing: .035em; flex: 0 0 auto; }
.brand-icon,.brand-mark { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 13px; background: var(--green); color: #fff; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.brand-icon svg { width: 25px; height: 25px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.3; }
.brand-sub { font-size: 0.8rem; color: var(--muted); font-weight: 550; letter-spacing: .13em; margin-top: 4px; }
.header-actions { display: flex; align-items: center; gap: 17px; min-width: 0; }
.course-badge { display: inline-flex; gap: 7px; align-items: center; color: #74836d; font-size: 0.83rem; white-space: nowrap; }
.course-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #8aa983; }
.app-layout,.layout { display: grid; grid-template-columns: 236px minmax(0,1fr); max-width: 1680px; margin: 0 auto; min-height: 100vh; }
.app-sidebar,.sidebar { display: flex; flex-direction: column; align-self: start; position: sticky; top: 0; height: 100vh; padding: 27px 18px 22px; background: #fdfdf9; border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #dce3d8 transparent; }
.sidebar-section-label,.side-title { display: block; margin: 23px 0 10px; padding: 0 13px; font-size: 0.8rem; color: var(--muted); font-weight: 700; letter-spacing: .14em; }
.sidebar-section-label:first-child,.side-title:first-child { margin-top: 0; }
.topnav { display: flex; flex-wrap: wrap; gap: 5px; }
.app-sidebar .topnav,.sidebar .topnav { display: grid; gap: 5px; }
.navbtn,.side-link { display: flex; align-items: center; gap: 11px; border: 0; border-radius: 10px; background: transparent; color: #7c8876; padding: 11px 13px; font-size: 0.89rem; font-weight: 600; text-align: left; transition: background .18s ease,color .18s ease; }
.navbtn .icon,.side-link .icon { width: 18px; height: 18px; color: var(--muted); }
.navbtn:hover,.side-link:hover { color: var(--green); background: #f0f4ed; }
.navbtn.active,.side-link.active { background: #e6eee3; color: var(--green-deep); font-weight: 750; }
.navbtn.active .icon,.side-link.active .icon { color: var(--green); }
.unitnav { display: grid; gap: 3px; }
.unitlink { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; color: #7b8874; background: transparent; text-align: left; font-size: 0.8rem; line-height: 1.55; transition: background .18s ease,color .18s ease; }
.unitlink:hover { color: var(--green); background: #f0f4ed; }
.unitlink.active { color: var(--green-deep); background: #e9f0e5; font-weight: 700; }
.unitnum { color: var(--muted); font-size: 0.8rem; font-weight: 650; font-variant-numeric: tabular-nums; flex: 0 0 22px; }
.unitlink.active .unitnum { color: #4b8059; }
.sidebar-footer,.side-note { margin: auto 7px 0; padding: 18px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; line-height: 1.8; }
.sidebar-footer p,.side-note p { margin: 0; }
.side-note { margin-top: 28px; }
.workspace { min-width: 0; }
.main { min-width: 0; padding: 30px clamp(26px,3.5vw,54px) 60px; }
.footer { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 0.8rem; border-top: 1px solid var(--line); margin-top: 46px; padding-top: 19px; }

/* Headings, search and course context */
.page-header { display: flex; justify-content: space-between; gap: 22px; align-items: center; margin-bottom: 25px; }
.page-heading { min-width: 0; }
.header-kicker,.eyebrow { color: #829381; font-size: 0.8rem; font-weight: 650; letter-spacing: .1em; margin: 0 0 8px; }
.page-title,.page-heading h1 { color: var(--ink-strong); font-size: clamp(1.7rem,2.6vw,2.25rem); font-weight: 750; line-height: 1.36; letter-spacing: -.035em; margin: 0; }
.page-sub { color: #7c887e; max-width: 760px; font-size: 0.91rem; line-height: 1.8; margin: 12px 0 27px; }
.search-box { position: relative; display: flex; align-items: center; gap: 9px; color: var(--muted); width: min(300px,32vw); min-width: 150px; }
.search-box > .icon { position: absolute; left: 13px; width: 17px; height: 17px; pointer-events: none; }
.search-box input { width: 100%; height: 41px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 13px 9px 39px; color: var(--ink); font-size: 0.82rem; transition: border .18s ease,box-shadow .18s ease; }
.search-box input:focus { border-color: #92ac92; box-shadow: 0 0 0 3px #eaf1e6; outline: 0; }
.search-box kbd { position: absolute; right: 11px; padding: 0 5px; color: var(--muted); border: 1px solid #e7ebe1; border-radius: 4px; background: #fafbf8; font-size: .8rem; line-height: 20px; }
.search-results { display: grid; gap: 10px; margin: 18px 0; }
.course-context { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; color: var(--muted); font-size: 0.8rem; margin-bottom: 20px; }
.context-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid #e0e7db; border-radius: 7px; background: #fffefa; color: #6b7c6e; font-size: 0.8rem; }
.context-pill .icon { width: 14px; height: 14px; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; color: var(--muted); font-size: 0.8rem; }
.crumb button { border: 0; background: transparent; color: #6d8672; padding: 0; }
.crumb button:hover { color: var(--green); }
.crumb > span:not(:last-child) { color: var(--muted); }

/* Course dashboard */
.hero { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(170px,28%); gap: 12px; overflow: hidden; padding: 30px 36px; border: 1px solid #dfe8d5; border-radius: 20px; background: #edf3e5; margin-bottom: 28px; min-height: 228px; }
.hero::after { content: ""; position: absolute; width: 210px; height: 210px; right: -44px; bottom: -116px; border: 40px solid rgba(132,161,102,.08); border-radius: 50%; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; min-width: 0; align-self: center; }
.hero .eyebrow,.hero .header-kicker { color: #708c64; margin-bottom: 11px; }
.hero h1,.hero h2 { color: #234e38; font-size: clamp(1.65rem,2.8vw,2.55rem); line-height: 1.35; font-weight: 750; letter-spacing: -.035em; margin: 0 0 12px; }
.hero p { max-width: 590px; color: #74826b; font-size: 0.87rem; line-height: 1.85; margin: 0; }
.hero .btn { margin-top: 20px; }
.hero-art { display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; color: #487d50; }
.hero-art svg { width: 100%; height: auto; max-height: 205px; overflow: visible; }
.hero-stats { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; margin-top: 24px; }
.stat-block { min-width: 66px; }
.stat-block:not(:first-child) { border-left: 1px solid #d8e3ce; padding-left: 28px; }
.stat-block strong,.stat-block b { display: block; color: #3d6244; font-size: 1.28rem; line-height: 1.4; font-weight: 750; font-variant-numeric: tabular-nums; }
.stat-block span,.stat-block small { display: block; margin-top: 3px; font-size: 0.8rem; color: #819175; }
.section-head,.section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 27px 0 17px; }
.section-head h2,.section-title h2 { margin: 0; color: #3a5042; font-size: 1.05rem; font-weight: 700; letter-spacing: -.015em; }
.section-head > span,.section-title > span,.section-title p { color: var(--muted); font-size: 0.8rem; margin: 0; }
.term-tabs { display: inline-flex; gap: 3px; padding: 4px; border-radius: 10px; background: #edf0e8; flex: 0 0 auto; }
.term-tabs button { background: transparent; border: 0; border-radius: 7px; padding: 7px 19px; color: var(--muted); font-size: 0.8rem; font-weight: 550; line-height: 1.6; white-space: nowrap; }
.term-tabs button:hover { color: var(--green); }
.term-tabs button.active { color: var(--green-deep); background: #fff; font-weight: 700; box-shadow: 0 2px 5px rgba(43,63,38,.06); }
.dashboard-grid,.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 17px; }
.card,.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.card { padding: 23px; display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.card h2,.card h3 { margin: 0; color: #34513e; font-size: 1.07rem; line-height: 1.5; font-weight: 700; }
.card p { color: var(--muted); font-size: 0.81rem; line-height: 1.85; margin: 0; }
.card .bottom,.unit-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 13px; font-size: 0.8rem; color: var(--muted); }
.card .bottom strong,.unit-card-footer strong { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.unit-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 23px; border: 1px solid #e4e8dc; border-radius: 16px; background: #fff; box-shadow: var(--shadow); transition: border-color .18s ease,transform .18s ease,box-shadow .18s ease; }
.unit-card h2 { font-size: 1.07rem; color: #34513e; font-weight: 700; line-height: 1.55; margin: 0 0 10px; }
.unit-card > p { color: #7d886f; font-size: 0.81rem; line-height: 1.85; margin: 0 0 15px; }
.unit-card:hover { transform: translateY(-3px); border-color: #b9cdac; box-shadow: var(--shadow-raised); }
.unit-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.unit-card-top .meta { color: var(--muted); font-size: 0.8rem; letter-spacing: .08em; }
.unit-symbol { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; color: #658663; border-radius: 12px; background: #eef3e9; font-family: ui-serif,Georgia,serif; font-size: 1.4rem; font-weight: 600; }
.unit-symbol svg { width: 25px; height: 25px; }
.unit-card:nth-child(4n+2) .unit-symbol { color: #a98540; background: #f8f2e2; }
.unit-card:nth-child(4n+3) .unit-symbol { color: var(--muted); background: #edf5f3; }
.unit-card:nth-child(4n) .unit-symbol { color: #a28a77; background: #f5efe9; }
.unit-card .progress-track { margin-top: 14px; }
.progress-track,.progress-bar { background: #edf0e8; height: 5px; border-radius: 999px; overflow: hidden; }
.progress-fill,.progress-bar > span,.progress-bar > div { display: block; height: 100%; border-radius: inherit; background: #87a66d; transition: width .25s ease; }
.summary-row,.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin: 0 0 27px; }
.summary-item,.metric-grid > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.summary-item b,.metric-grid strong { display: block; color: #466544; font-size: 1.65rem; line-height: 1.5; font-variant-numeric: tabular-nums; font-weight: 700; }
.summary-item span,.metric-grid span { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 3px; }

/* Shared controls and lesson lists */
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 23px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border: 1px solid #d8e0d2; background: #fff; color: #597553; border-radius: 9px; padding: 9px 15px; font-size: 0.84rem; font-weight: 600; line-height: 1.5; white-space: normal; transition: background .15s ease,border-color .15s ease,box-shadow .15s ease; }
.btn .icon { width: 16px; height: 16px; }
.btn:hover { background: #f1f5ed; border-color: #bdcfb3; }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); box-shadow: 0 3px 6px rgba(34,84,57,.08); }
.btn.primary:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn.gold { background: #efd79f; border-color: #efd79f; color: #735a2d; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--green); background: #edf2e8; }
.btn.small { min-height: 34px; padding: 6px 11px; font-size: 0.8rem; border-radius: 8px; }
.btn:disabled { opacity: .55; box-shadow: none; }
.chip,.badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 3px 8px; border-radius: 5px; background: #f0f2eb; color: var(--muted); font-size: 0.8rem; line-height: 1.65; font-weight: 600; }
.chip.done,.badge.success { background: #eaf3e5; color: #6b905b; }
.chip.skipped { background: #f8f0de; color: var(--muted); }
.chip.studying { background: #e8f1ed; color: #648b7a; }
.chip.wrong,.badge.danger { background: #fbefea; color: #b77965; }
.meta { font-size: 0.8rem; color: var(--muted); font-weight: 550; }
.filterbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 25px 0 16px; }
.filterbar .btn { border-color: transparent; background: transparent; color: var(--muted); }
.filterbar .btn.active { background: #e8f0e0; color: #688253; border-color: #e8f0e0; }
.lesson-list { display: grid; gap: 11px; }
.lesson-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 22px; padding: 21px 24px; border: 1px solid var(--line); border-radius: 13px; background: #fff; transition: border-color .18s ease; }
.lesson-row:hover { border-color: #b8cdb0; }
.lesson-row h3 { font-size: 0.98rem; line-height: 1.6; color: #3d5740; margin: 5px 0; }
.lesson-row h3 a:hover { color: var(--green); }
.lesson-row p { color: var(--muted); font-size: 0.8rem; margin: 0; line-height: 1.85; }
.lesson-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; max-width: 285px; }
.empty,.empty-state { border: 1px dashed #d7e2cc; border-radius: 15px; padding: 36px 28px; color: var(--muted); background: #fafcf7; text-align: center; font-size: 0.87rem; }
.empty-state .icon { width: 36px; height: 36px; color: var(--muted); margin-bottom: 10px; }
.empty-state h3 { color: #667e53; margin: 0 0 8px; font-size: 1rem; }
.empty-state p { margin: 0 0 17px; }
.inline-note { display: flex; gap: 8px; color: var(--muted); font-size: 0.8rem; line-height: 1.75; margin: 18px 0; }
.inline-note .icon { margin-top: 2px; width: 15px; height: 15px; }

/* A reading page that feels like an open book */
.lesson-layout { display: grid; grid-template-columns: minmax(0,840px) 170px; gap: clamp(22px,3vw,44px); align-items: start; }
.reading { min-width: 0; max-width: 870px; }
.lesson-layout .reading { max-width: none; }
.lesson-header { padding-bottom: 27px; border-bottom: 1px solid var(--line); margin-bottom: 27px; }
.lesson-header .page-title,.lesson-header h1 { color: var(--ink-strong); font-size: clamp(1.7rem,2.4vw,2.3rem); font-weight: 750; line-height: 1.4; letter-spacing: -.03em; margin: 0; }
.reading .lead { color: #7b8c72; font-size: 0.98rem; line-height: 1.9; margin: 15px 0 21px; }
.reading-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 0.8rem; color: var(--muted); margin: 15px 0; }
.lesson-toc { position: sticky; top: 104px; align-self: start; padding: 6px 0 12px 17px; border-left: 1px solid #e1e8d8; font-size: 0.8rem; color: var(--muted); }
.lesson-toc h3,.lesson-toc .sidebar-section-label { padding: 0; margin: 0 0 13px; color: var(--muted); font-size: 0.8rem; font-weight: 650; letter-spacing: .09em; }
.lesson-toc nav { display: grid; gap: 3px; }
.toc-link { display: flex; gap: 7px; width: 100%; padding: 8px 0; color: var(--muted); line-height: 1.7; border: 0; background: transparent; text-align: left; font-size: 0.8rem; }
.toc-link > span { flex: 0 0 17px; color: var(--muted); font-size: 0.8rem; padding-top: 2px; }
.toc-link:hover,.toc-link.active { color: #537a41; }
.lesson-toc .btn { margin-top: 18px; width: 100%; font-size: 0.8rem; padding: 8px; }
.panel { padding: 25px 28px; margin: 18px 0; min-width: 0; }
.panel h2 { color: #3b573c; font-size: 1.03rem; font-weight: 700; margin: 0 0 15px; line-height: 1.55; }
.teaching-section,.learning-block { position: relative; margin: 19px 0; padding: 27px 29px; border: 1px solid #e3e9dc; border-radius: 15px; background: #fff; box-shadow: 0 3px 14px rgba(46,70,40,.025); scroll-margin-top: 103px; }
.teaching-section h2,.learning-block h2 { color: #4b6943; font-size: 1.03rem; line-height: 1.6; margin: 0 0 15px; }
.teaching-section p,.learning-block p { margin: 0; color: #5c6f53; font-size: 0.96rem; line-height: 2.05; overflow-wrap: break-word; }
.teaching-section p+p,.learning-block p+p { margin-top: 12px; }
.block-label { display: flex; align-items: center; gap: 7px; font-size: 0.8rem; color: var(--muted); font-weight: 650; letter-spacing: .08em; margin-bottom: 12px; }
.block-label .icon { width: 15px; height: 15px; }
.definition-block { background: #f0f5e9; border-color: #dce8ce; }
.definition-block h2 { color: #4c6e3e; }
.definition-block p { color: #527047; font-weight: 550; }
.explanation-block { background: #fff; }
.worked-example { background: #fffaf0; border-color: #ece0c6; }
.worked-example h2 { color: #96743c; }
.worked-example p { color: #877654; }
.worked-example .block-label { color: var(--muted); }
.learning-steps { display: grid; gap: 16px; list-style: none; counter-reset: learn-step; padding: 0; margin: 17px 0 0; }
.learning-steps li { position: relative; padding-left: 37px; counter-increment: learn-step; line-height: 1.95; color: #617254; }
.learning-steps li::before { content: counter(learn-step,decimal-leading-zero); position: absolute; top: 3px; left: 0; background: #edf3e5; color: #809765; width: 24px; height: 24px; font-size: 0.8rem; font-weight: 650; border-radius: 7px; display: grid; place-items: center; }
.point-list { padding-left: 1.2em; margin: 0; display: grid; gap: 12px; color: #69775e; font-size: 0.92rem; line-height: 1.95; }
.point-list li { padding-left: 5px; }
.point-list li::marker { color: var(--muted); font-size: 0.81rem; font-weight: 600; }
.callout { display: flex; flex-direction: column; border-left: 3px solid #d7ad66; background: #fbf4e5; color: #9a8053; padding: 19px 22px; border-radius: 0 11px 11px 0; margin: 22px 0; font-size: 0.89rem; line-height: 1.9; }
.callout b { display: block; color: #a18249; font-size: 0.8rem; margin-bottom: 5px; }
.callout p { margin: 0; }
.example { background: #f0f5e9; border-radius: 12px; padding: 19px 22px; margin: 19px 0; color: #708461; }
.example b { color: #587847; }
.lesson-bottom { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 25px 0 0; margin-top: 27px; border-top: 1px solid var(--line); }
.lesson-bottom .toolbar { margin: 0; }

/* Diagrams fit their page; larger detail is available in a dialog. */
.diagram-card { margin: 21px 0; padding: 19px 22px 13px; background: #fcfefa; border: 1px solid #e1e9d7; border-radius: 16px; min-width: 0; overflow: hidden; }
.diagram-card button { width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; color: inherit; }
.diagram-card[data-action] { cursor: zoom-in; }
.lesson-diagram { display: block; width: 100%; max-width: 100%; min-width: 0; height: auto; max-height: none; overflow: visible; }
.diagram-card figcaption { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 12px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.8; text-align: center; }
.diagram-card figcaption .icon { width: 13px; height: 13px; }
.diagram-card:hover { border-color: #c3d4b2; }

/* Review and tests */
.review-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.activity-card,.test-option-card { padding: 25px; border: 1px solid var(--line); background: #fff; border-radius: 17px; min-width: 0; }
.activity-card h3,.test-option-card h3 { color: #45633c; font-size: 1.08rem; margin: 13px 0 8px; }
.activity-card p,.test-option-card p { font-size: 0.83rem; color: var(--muted); margin: 0 0 17px; line-height: 1.85; }
.activity-card > .icon,.test-option-card > .icon { color: var(--muted); width: 25px; height: 25px; }
.test-config { display: flex; align-items: end; gap: 15px; flex-wrap: wrap; }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font-size: 0.8rem; font-weight: 600; color: #819271; }
.field select { min-width: 260px; max-width: 100%; border: 1px solid #d8e3cd; background: #fff; color: #6d835b; border-radius: 9px; padding: 11px 36px 11px 13px; font-size: 0.83rem; }
.quiz-layout { display: grid; grid-template-columns: minmax(0,1fr) 205px; align-items: start; gap: 24px; }
.quiz-layout > *,.quiz-layout form { min-width: 0; }
.quiz-aside { position: sticky; top: 102px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.quiz-aside h3 { font-size: 0.85rem; color: #6d8758; margin: 0 0 13px; }
.quiz-aside p { font-size: 0.8rem; color: var(--muted); line-height: 1.8; }
.quiz-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; }
.quiz-dot { aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 1px solid #e1e8d9; border-radius: 7px; background: #fafcf7; color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.quiz-dot:hover { border-color: #a8c090; }
.quiz-dot.current { border-color: #86a66d; color: #678b4c; box-shadow: 0 0 0 1px #86a66d; }
.quiz-dot.answered,.quiz-dot.correct { color: #67874f; background: #e5efd9; border-color: #c8ddaf; }
.quiz-dot.incorrect { color: #b17c64; background: #faede4; border-color: #edc9b5; }
.quiz-progress { color: #839673; font-size: 0.8rem; margin: 17px 0; }
.quiz-progress .progress-track,.quiz-progress .progress-bar { margin-top: 9px; }
.quiz-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; margin: 26px 0; }
.question { padding: 26px 28px; margin: 0 0 19px; scroll-margin-top: 102px; }
.question > .meta { display: block; font-size: 0.8rem; margin-bottom: 12px; color: var(--muted); }
.question h3,.question h2 { margin: 0 0 20px; font-size: 1.02rem; font-weight: 600; color: #425b3d; line-height: 1.95; overflow-wrap: break-word; }
.options { display: grid; gap: 9px; }
.option { display: flex; align-items: flex-start; gap: 11px; border: 1px solid #e4eadd; border-radius: 10px; background: #fdfefa; padding: 12px 15px; color: #75866a; font-size: 0.89rem; line-height: 1.8; cursor: pointer; transition: background .15s ease,border-color .15s ease; }
.option:hover { background: #f3f7ed; border-color: #ccddba; }
.option:has(input:checked) { background: #edf4e3; border-color: #a8c78b; color: #5e7c46; }
.option:has(input:disabled) { cursor: default; }
.option input { accent-color: #719852; margin: 5px 0 0; flex: 0 0 auto; width: 15px; height: 15px; }
.text-answer { display: block; width: 100%; max-width: 500px; padding: 12px 14px; color: #5d7750; border: 1px solid #d5e0c9; border-radius: 9px; background: #fdfefa; font-size: 0.87rem; }
.text-answer:disabled { background: #f5f7f0; opacity: 1; color: var(--muted); -webkit-text-fill-color: #859675; }
.feedback { padding: 16px 18px; margin-top: 17px; border: 1px solid #dfe9d2; border-radius: 10px; background: #f0f6e9; color: #7d9269; font-size: 0.86rem; line-height: 1.95; overflow-wrap: break-word; }
.feedback b { display: block; color: #688752; margin-bottom: 6px; font-size: 0.83rem; }
.feedback.bad { background: #fdf3ed; color: var(--muted); border-color: #f0dfd1; }
.feedback.bad b { color: #b77959; }
.results-score { color: #65874e; font-size: 1.6rem; font-weight: 750; }
.case-parts { display: grid; gap: 17px; margin-top: 18px; }
.case-part { display: grid; gap: 9px; color: #7b8c6a; font-size: 0.88rem; line-height: 1.8; }
.case-part .text-answer { font-weight: 400; }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.case-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 300px; margin: 15px 0; border: 1px solid #dfe7d5; border-radius: 9px; overflow: hidden; font-size: 0.8rem; color: #819270; }
.case-table th,.case-table td { padding: 10px 13px; text-align: left; border-bottom: 1px solid #e7edde; border-right: 1px solid #e7edde; }
.case-table th { background: #eff5e7; color: #7a9262; font-weight: 600; }
.case-table th:last-child,.case-table td:last-child { border-right: 0; }
.case-table tr:last-child td { border-bottom: 0; }

/* Expandable school / subject catalog */
.stage-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin: 23px 0; }
.stage-card { border: 1px solid var(--line); border-radius: 19px; background: #fff; padding: 25px; min-width: 0; }
.stage-card > .icon { width: 27px; height: 27px; color: var(--muted); }
.stage-card h2 { font-size: 1.17rem; color: #566f46; margin: 17px 0 6px; }
.stage-card > p { color: var(--muted); font-size: 0.8rem; margin: 0 0 20px; }
.course-tile { display: flex; gap: 11px; align-items: center; padding: 15px; margin-top: 10px; border: 1px solid #e2ead8; border-radius: 11px; background: #fbfdf8; color: #7d9565; font-size: 0.84rem; }
.course-tile:hover { border-color: #b9cfa3; background: #f1f7e9; }
.course-tile .icon { color: var(--muted); }
.course-tile strong { display: block; color: #73905b; font-size: 0.85rem; }
.course-tile small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 3px; }
.course-tile[aria-disabled="true"],.course-tile.disabled { color: var(--muted); border-style: dashed; cursor: default; background: #fdfefa; }

/* Feedback and expanded illustrations */
.toast { position: fixed; bottom: 27px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; align-items: center; gap: 9px; padding: 13px 22px; max-width: calc(100vw - 32px); color: #f8fbf3; background: #365b38; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 8px 30px rgba(40,68,29,.18); border-radius: 12px; font-size: 0.86rem; line-height: 1.8; }
.toast .icon { width: 17px; height: 17px; color: var(--muted); }
.dialog-backdrop { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: center; padding: 30px; background: rgba(32,48,31,.48); backdrop-filter: blur(7px); }
.dialog-panel { position: relative; width: min(100%,1080px); max-height: calc(100dvh - 60px); overflow: auto; background: #fffefa; border: 1px solid #e5eadc; border-radius: 20px; padding: 25px 30px; box-shadow: 0 25px 80px rgba(18,39,20,.22); }
.dialog-panel h2 { margin: 0 50px 23px 0; color: #4f7140; font-size: 1.15rem; }
.dialog-panel > .btn,.dialog-panel > button[aria-label] { position: absolute; top: 16px; right: 16px; }
.dialog-panel .diagram-card { border: 0; padding: 20px 0 0; background: transparent; overflow: auto; }
.dialog-panel .lesson-diagram { width: 100%; min-width: 620px; max-width: none; }
.dialog-panel figcaption { margin-top: 20px; }
.dialog-panel p { color: var(--muted); font-size: 0.8rem; line-height: 1.8; }

/* Laptop, tablet and handheld layouts */
@media (min-width: 1450px) {
  .dashboard-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .main { padding-left: 48px; padding-right: 48px; }
}
@media (max-width: 1180px) {
  .app-layout,.layout { grid-template-columns: 208px minmax(0,1fr); }
  .app-sidebar,.sidebar { padding-left: 13px; padding-right: 13px; }
  .main { padding: 28px; }
  .lesson-layout { grid-template-columns: minmax(0,1fr); }
  .lesson-toc { display: none; }
  .lesson-row { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .lesson-actions { max-width: none; justify-content: flex-start; }
  .hero { padding: 28px; }
  .hero-stats { gap: 20px; }
  .stat-block:not(:first-child) { padding-left: 20px; }
  .quiz-layout { grid-template-columns: minmax(0,1fr) 175px; gap: 16px; }
  .quiz-aside { padding: 15px; }
  .quiz-nav { gap: 4px; }
  .stage-grid { gap: 14px; }
  .stage-card { padding: 19px; }
}
@media (max-width: 920px) {
  .app-layout,.layout { grid-template-columns: 188px minmax(0,1fr); }
  .app-header,.topbar { gap: 15px; padding-left: 21px; padding-right: 21px; }
  .brand { font-size: 1.08rem; gap: 9px; }
  .brand-sub { font-size: 0.8rem; }
  .course-badge { display: none; }
  .main { padding: 25px 23px 50px; }
  .hero { grid-template-columns: minmax(0,1fr) 120px; padding: 24px; gap: 2px; min-height: 215px; }
  .hero h1,.hero h2 { font-size: 1.8rem; }
  .hero p { font-size: 0.82rem; }
  .hero-stats { gap: 15px; }
  .stat-block:not(:first-child) { padding-left: 15px; }
  .hero-art { align-self: start; margin-top: 30px; }
  .hero-art svg { max-height: 130px; }
  .summary-row,.metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .unit-card,.card { padding: 20px; }
  .dashboard-grid,.grid { gap: 13px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quiz-layout { display: flex; flex-direction: column; }
  .quiz-aside { position: static; order: -1; width: 100%; }
  .quiz-nav { grid-template-columns: repeat(auto-fill,minmax(27px,1fr)); }
  .quiz-dot { max-width: 38px; }
  .quiz-aside > p { margin: 8px 0 0; }
  .stage-grid { grid-template-columns: 1fr; }
  .stage-card { padding: 23px; }
  .review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 90px; }
  .app-header,.topbar { min-height: 68px; padding: 12px 18px; gap: 12px; }
  .brand-icon,.brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-icon svg { width: 23px; height: 23px; }
  .brand { font-size: 1.06rem; }
  .header-actions { gap: 9px; }
  .header-actions .btn { font-size: 0.8rem; padding: 7px 10px; min-height: 35px; }
  .header-actions .btn .icon { width: 15px; height: 15px; }
  .app-layout,.layout { display: block; }
  .app-sidebar,.sidebar { position: relative; top: auto; display: block; height: auto; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); background: #fcfdf8; overflow: visible; }
  .app-sidebar .topnav,.sidebar .topnav { display: flex; gap: 5px; flex-wrap: nowrap; }
  .app-sidebar .topnav .navbtn,.sidebar .topnav .navbtn { flex: 1; justify-content: center; padding: 9px 7px; white-space: nowrap; font-size: 0.8rem; gap: 7px; }
  .app-sidebar .topnav .icon,.sidebar .topnav .icon { width: 16px; height: 16px; }
  .sidebar-section-label,.side-title,.sidebar-footer,.side-note { display: none; }
  .unitnav { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 3px; margin-top: 9px; padding: 0 0 3px; scrollbar-width: none; }
  .unitnav::-webkit-scrollbar { display: none; }
  .unitlink { flex: 0 0 auto; font-size: 0.8rem; padding: 7px 9px; gap: 6px; }
  .unitnum { flex-basis: auto; font-size: 0.8rem; }
  .main { padding: 26px 20px 48px; }
  .page-header { margin-bottom: 21px; }
  .page-title,.page-heading h1 { font-size: 1.85rem; }
  .search-box { width: 170px; min-width: 0; }
  .search-box input { height: 38px; font-size: 0.8rem; }
  .search-box kbd { display: none; }
  .hero { min-height: 225px; }
  .hero-art { align-self: center; margin: 0; }
  .hero h1,.hero h2 { font-size: 1.85rem; }
  .hero p { max-width: 370px; }
  .hero-stats { margin-top: 21px; }
  .section-title,.section-head { margin-top: 24px; }
  .lesson-header { margin-top: 3px; }
  .teaching-section,.learning-block,.panel { padding: 23px; }
  .question { padding: 23px; }
  .dialog-backdrop { padding: 15px; }
  .dialog-panel { padding: 22px; max-height: calc(100dvh - 30px); border-radius: 16px; }
}
@media (max-width: 480px) {
  .app-header,.topbar { padding: 11px 16px; min-height: 65px; }
  .brand-copy { line-height: 1.27; }
  .brand-sub { font-size: 0.8rem; margin-top: 3px; letter-spacing: .08em; }
  .header-actions .course-badge,.header-actions .search-box { display: none; }
  .topbar { flex-wrap: wrap; }
  .topbar > .topnav { width: 100%; justify-content: space-between; }
  .app-sidebar,.sidebar { padding: 8px 13px; }
  .app-sidebar .topnav .navbtn,.sidebar .topnav .navbtn { font-size: 0.8rem; gap: 5px; padding: 8px 5px; border-radius: 8px; }
  .main { padding: 23px 16px 42px; }
  .page-header { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
  .page-header > .search-box { width: 100%; }
  .page-title,.page-heading h1 { font-size: 1.65rem; }
  .header-kicker,.eyebrow { font-size: 0.8rem; margin-bottom: 7px; }
  .page-sub { font-size: 0.83rem; margin-bottom: 23px; }
  .course-context { gap: 6px; margin-bottom: 17px; font-size: 0.8rem; }
  .context-pill { padding: 4px 8px; font-size: 0.8rem; }
  .hero { grid-template-columns: minmax(0,1fr) 78px; padding: 23px 21px; margin-bottom: 22px; border-radius: 16px; gap: 0; min-height: 225px; }
  .hero-copy { grid-column: 1 / -1; }
  .hero h1,.hero h2 { font-size: 1.83rem; max-width: 80%; }
  .hero p { font-size: 0.8rem; max-width: 80%; line-height: 1.85; }
  .hero-art { position: absolute; width: 91px; height: 130px; top: 19px; right: 11px; opacity: .64; }
  .hero-art svg { width: 100%; }
  .hero-stats { gap: 21px; margin-top: 23px; }
  .stat-block { min-width: 51px; }
  .stat-block:not(:first-child) { padding-left: 20px; }
  .stat-block strong,.stat-block b { font-size: 1.19rem; }
  .stat-block span,.stat-block small { font-size: 0.8rem; }
  .section-head,.section-title { align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
  .section-head h2,.section-title h2 { font-size: 0.98rem; }
  .section-title > span,.section-head > span { font-size: 0.8rem; }
  .term-tabs { padding: 3px; border-radius: 8px; }
  .term-tabs button { font-size: 0.8rem; padding: 6px 12px; border-radius: 6px; }
  .dashboard-grid,.grid { grid-template-columns: 1fr; gap: 13px; }
  .unit-card,.card { padding: 21px; }
  .unit-card-top { margin-bottom: 4px; }
  .unit-symbol { width: 40px; height: 40px; border-radius: 11px; }
  .card h2,.card h3 { font-size: 1.07rem; }
  .card p { font-size: 0.8rem; }
  .card .bottom,.unit-card-footer { padding-top: 8px; }
  .summary-row,.metric-grid { gap: 10px; }
  .summary-item,.metric-grid > div { padding: 14px 17px; border-radius: 12px; }
  .summary-item b,.metric-grid strong { font-size: 1.48rem; }
  .summary-item span,.metric-grid span { font-size: 0.8rem; }
  .toolbar { gap: 7px; margin: 20px 0; }
  .btn { padding: 9px 12px; font-size: 0.8rem; min-height: 40px; }
  .btn.small { font-size: 0.8rem; padding: 6px 9px; min-height: 33px; }
  .lesson-row { padding: 19px; gap: 14px; }
  .lesson-row h3 { font-size: 0.96rem; }
  .lesson-row p { font-size: 0.8rem; }
  .lesson-actions { gap: 6px; }
  .filterbar { gap: 3px; }
  .filterbar .btn.small { padding: 6px 9px; }
  .crumb { margin-bottom: 20px; gap: 6px; font-size: 0.8rem; }
  .reading .lead { font-size: 0.9rem; line-height: 1.95; }
  .reading-meta { font-size: 0.8rem; }
  .lesson-header { padding-bottom: 19px; margin-bottom: 20px; }
  .lesson-header .page-title { font-size: 1.65rem; }
  .learning-block,.teaching-section,.panel { padding: 21px 19px; border-radius: 13px; }
  .learning-block h2,.teaching-section h2,.panel h2 { font-size: 0.99rem; margin-bottom: 13px; }
  .learning-block p,.teaching-section p { font-size: 0.95rem; line-height: 2.06; }
  .block-label { font-size: 0.8rem; }
  .point-list { font-size: 0.91rem; gap: 12px; }
  .callout { padding: 17px 18px; font-size: 0.86rem; }
  .diagram-card { margin: 19px 0; padding: 11px 9px 12px; border-radius: 13px; }
  .diagram-card figcaption { font-size: 0.8rem; margin-top: 8px; padding: 0 4px; }
  .lesson-bottom { align-items: stretch; }
  .lesson-bottom > .btn { width: 100%; }
  .field { width: 100%; }
  .field select { min-width: 0; width: 100%; font-size: 0.8rem; }
  .test-config { gap: 13px; }
  .test-config > .btn { width: 100%; }
  .question { padding: 22px 19px; margin-bottom: 16px; }
  .question h3 { font-size: 0.96rem; line-height: 1.95; }
  .option { padding: 11px 12px; font-size: 0.89rem; gap: 9px; }
  .option input { margin-top: 5px; width: 15px; height: 15px; }
  .text-answer { padding: 11px 12px; font-size: .9rem; }
  .feedback { padding: 14px; font-size: 0.85rem; }
  .case-table { min-width: 280px; font-size: 0.8rem; }
  .case-table th,.case-table td { padding: 9px; }
  .case-part { font-size: 0.87rem; }
  .quiz-aside { padding: 15px; }
  .quiz-nav { grid-template-columns: repeat(auto-fill,minmax(26px,1fr)); gap: 5px; }
  .quiz-actions { display: grid; grid-template-columns: 1fr; }
  .review-grid { gap: 14px; }
  .activity-card,.test-option-card,.stage-card { padding: 22px; }
  .empty,.empty-state { padding: 29px 22px; font-size: 0.83rem; }
  .footer { margin-top: 33px; padding-top: 17px; font-size: 0.8rem; line-height: 1.8; }
  .dialog-backdrop { padding: 10px; }
  .dialog-panel { padding: 20px 16px; max-height: calc(100dvh - 20px); }
  .dialog-panel h2 { font-size: 1rem; }
  .dialog-panel .lesson-diagram { min-width: 630px; }
  .toast { bottom: 18px; font-size: 0.8rem; padding: 11px 16px; width: max-content; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  body { background: #fff; }
  .app-header,.topbar,.app-sidebar,.sidebar,.lesson-toc,.toolbar,.lesson-bottom,.footer,.quiz-aside,.dialog-backdrop { display: none !important; }
  .app-layout,.layout,.lesson-layout,.quiz-layout { display: block; }
  .workspace,.main { padding: 0; }
  .reading { max-width: none; }
  .panel,.learning-block,.teaching-section,.diagram-card,.question { box-shadow: none; break-inside: avoid; }
  .page-title { color: #000; }
}

/* Component refinements for the unified learning workspace */
.app-sidebar > .brand { margin: 0 10px 29px; }
.app-sidebar > .course-context { display: grid; gap: 7px; margin: 0 9px 23px; padding: 15px; border: 1px solid #e2e9d9; border-radius: 12px; background: #f4f7ed; }
.app-sidebar .course-context > .context-pill { justify-self: start; padding: 0; border: 0; background: transparent; font-size: 0.8rem; color: var(--muted); }
.app-sidebar .course-context > strong { display: flex; align-items: center; justify-content: space-between; font-size: 1.07rem; color: #527445; }
.app-sidebar .course-context > strong span { font-size: 0.84rem; color: var(--muted); }
.app-sidebar .course-context > span:last-child { color: var(--muted); font-size: 0.8rem; }
.side-main-nav { display: grid; gap: 5px; }
.side-main-nav .icon { display: grid; place-items: center; font-size: 20px; line-height: 1; }
.nav-count { margin-left: auto; font-size: 0.8rem; padding: 1px 5px; border-radius: 4px; background: #dce8d2; color: #6e8d56; }
.sidebar-section-label { display: flex; align-items: center; justify-content: space-between; letter-spacing: .08em; }
.sidebar-section-label > span { color: var(--muted); letter-spacing: 0; font-weight: 500; font-size: 0.8rem; }
.sidebar-term-label { margin: 14px 12px 7px; font-size: 0.8rem; color: var(--muted); }
.sidebar-term-label:first-child { margin-top: 4px; }
.unit-check { margin-left: auto; color: var(--muted); font-size: 0.8rem; }
.sidebar-footer { padding-top: 20px; margin-top: 30px; }
.sidebar-footer .sidebar-section-label { margin: 0 0 7px; padding: 0; color: var(--muted); font-size: 0.8rem; }
.sidebar-footer a { display: inline-block; margin-top: 13px; font-size: 0.8rem; color: var(--muted); }
.sidebar-footer a:hover { color: var(--green); }
.app-header { padding-left: clamp(26px,3.5vw,54px); padding-right: clamp(26px,3.5vw,54px); }
.header-course { color: #64775a; font-size: 0.8rem; white-space: nowrap; }
.header-course span { margin: 0 9px; color: var(--muted); }
.mobile-menu { display: none; }
.search-box > span:first-child { position: absolute; left: 13px; color: var(--muted); font-size: 22px; line-height: 1; pointer-events: none; }
.search-box .search-hint { display: none; }
.search-box input { padding-left: 37px; }
.skip-link { position: fixed; left: 18px; top: 10px; transform: translateY(-160%); z-index: 120; padding: 11px 16px; background: var(--green); color: #fff; border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hero { padding: 35px 38px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 23px; }
.hero-actions .btn { margin: 0; }
.hero-actions .btn.primary { min-width: 150px; }
.hero-resume { display: block; margin-top: 12px; color: var(--muted); font-size: 0.8rem; }
.hero-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0 0 35px; padding: 5px 3px; gap: 0; }
.stat-block { padding: 0 25px; }
.stat-block:first-child { padding-left: 0; }
.stat-block:not(:first-child) { padding-left: 28px; }
.stat-block > span { color: #849476; font-size: 0.8rem; margin: 0 0 6px; }
.stat-block strong { color: #4c7040; font-size: 1.7rem; letter-spacing: -.03em; }
.stat-block strong small { display: inline; margin: 0 0 0 4px; font-size: 0.8rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.stat-block > p { font-size: 0.8rem; color: var(--muted); margin: 5px 0 0; }
.term-tabs { margin-bottom: 22px; }
.unit-card-footer { margin-top: auto; padding: 5px 0 14px; }
.unit-card-footer i { font-style: normal; color: var(--muted); margin: 0 5px; }
.card-arrow { display: grid; place-items: center; border: 1px solid #e6edde; width: 27px; height: 27px; border-radius: 50%; color: var(--muted); transition: background .18s ease,color .18s ease; }
.unit-card:hover .card-arrow { background: #eaf3df; color: #668a48; }
.unit-progress-label { color: var(--muted); font-size: 0.8rem; margin-top: 8px; }
.lesson-row-main { min-width: 0; }
.lesson-row .reading-meta { margin: 0 0 5px; gap: 8px; }
.lesson-row .reading-meta .muted-label { font-size: 0.8rem; }
.lesson-actions select { background: #fafcf7; color: var(--muted); border: 1px solid #e1e9d6; border-radius: 8px; padding: 6px 9px; font-size: 0.8rem; min-width: 92px; min-height: 34px; }
.learning-block .block-label { font-size: 0.8rem; width: 30px; height: 27px; background: #f0f5e9; border-radius: 6px; display: inline-grid; place-items: center; margin-bottom: 12px; letter-spacing: .03em; }
.definition-block .block-label { background: #e1edce; color: var(--muted); }
.worked-example .block-label { background: #f7ecca; color: var(--muted); }
.diagram-wrap { position: relative; }
.diagram-wrap .diagram-card { padding-bottom: 37px; }
.diagram-zoom { position: absolute; right: 17px; bottom: 14px; border: 0; color: var(--muted); background: transparent; font-size: 0.8rem; padding: 3px 5px; border-radius: 4px; }
.diagram-zoom:hover { color: #607e48; background: #edf4e4; }
.toc-practice { border-top: 1px solid #e5ecdb; margin-top: 22px; padding-top: 15px; }
.toc-practice p { font-size: 0.8rem; color: var(--muted); margin: 0; }
.toc-practice .btn { margin-top: 12px; }
.lesson-bottom h2 { color: #5a7847; font-size: 1.05rem; margin: 0 0 6px; }
.lesson-bottom p { color: var(--muted); font-size: 0.8rem; margin: 0; }
.next-lesson { margin-left: auto; color: var(--muted); font-size: 0.8rem; }
.next-lesson:hover { color: var(--green); }
.text-link { color: #749459; font-size: 0.8rem; }
.text-link:hover { color: #426a2f; text-decoration: underline; text-underline-offset: 4px; }
.wrong-list { display: grid; gap: 0; }
.wrong-item { padding: 19px 0; border-bottom: 1px solid #e8edde; }
.wrong-item:last-child { border: 0; padding-bottom: 0; }
.wrong-item > p { font-size: 0.88rem; color: #728665; line-height: 1.9; margin: 8px 0 12px; }
.wrong-item .toolbar { margin: 0; }
.attempt-row { display: flex; justify-content: space-between; align-items: center; gap: 13px; padding: 18px 0; border-bottom: 1px solid #e7edde; color: #7d916d; font-size: 0.8rem; }
.attempt-row:last-child { border: 0; }
.attempt-row > span { min-width: 0; }
.attempt-row > span > small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
.attempt-row > strong { flex: 0 0 auto; color: #77965b; font-size: 1.13rem; font-variant-numeric: tabular-nums; }
.attempt-row > strong small { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.review-grid .panel { margin-top: 0; }
.review-grid .section-title { margin-top: 0; }
.review-grid .section-title h2 { margin: 0; }
.empty-icon { display: block; font-size: 28px; color: var(--muted); margin: 0 auto 10px; }
.activity-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px; background: #f1f6e8; border-color: #dce8cc; }
.activity-card h3 { margin: 6px 0; }
.activity-card p { margin: 0; }
.quiz-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.quiz-progress strong { font-size: 0.88rem; font-weight: 600; color: #6c8d52; }
.quiz-progress strong > span { color: var(--muted); font-size: 0.8rem; font-weight: 400; }
.quiz-progress > span { color: var(--muted); font-size: 0.8rem; }
.quiz-aside.panel { margin-top: 0; }
.quiz-legend { display: flex; gap: 9px; flex-wrap: wrap; margin: 14px 0 20px; font-size: 0.8rem; color: var(--muted); }
.full-width { width: 100%; }
.save-note { text-align: center; font-size: 0.8rem !important; margin-bottom: 0; }
.question .reading-meta { margin-top: 0; margin-bottom: 19px; }
.question .badge { padding: 4px 9px; }
.difficulty-1 { background: #eff4e8; color: var(--muted); }
.difficulty-2 { background: #f8f0dc; color: var(--muted); }
.difficulty-3 { background: #f8ebe3; color: var(--muted); }
.option.selected { background: #edf4e3; border-color: #a8c78b; color: #5e7c46; }
.option-letter { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #e0e8d6; border-radius: 6px; background: #fff; color: var(--muted); flex: 0 0 auto; font-size: 0.8rem; line-height: 1; margin-top: 1px; }
.option.selected .option-letter { background: #85a864; color: #fff; border-color: #85a864; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option:has(input:focus-visible) { outline: 3px solid #c49540; outline-offset: 3px; }
.correct-text { color: #719453; font-size: 0.8rem; }
.incorrect-text { color: #b28665; font-size: 0.8rem; }
.feedback > strong { display: block; color: #62844b; font-size: 0.85rem; margin-bottom: 8px; }
.feedback.bad > strong { color: #ac7958; }
.feedback p { margin: 5px 0; }
.feedback .text-link { display: inline-block; margin-top: 8px; }
.result-card h2 { margin: 6px 0 9px; font-size: 1.75rem; color: #5b7c42; }
.result-card h2 small { color: var(--muted); font-size: 0.94rem; font-weight: 500; }
.result-card .toolbar { margin: 0; }
.stage-card.available { background: #f4f8ed; border-color: #cadcba; }
.course-tile { padding: 27px; gap: 33px; max-width: 900px; background: #fff; }
.course-tile-art { width: 220px; flex: 0 0 220px; background: #f0f5e9; border-radius: 15px; overflow: hidden; }
.course-tile-art svg { width: 100%; height: auto; display: block; }
.course-tile h2 { color: #466d37; font-size: 1.6rem; margin: 7px 0 10px; }
.course-tile p { color: var(--muted); font-size: 0.84rem; line-height: 1.8; margin: 5px 0; }
.course-tile .btn { margin-top: 18px; }
.dialog-open { overflow: hidden; }
.dialog-panel { max-width: 490px; }
.dialog-panel.diagram-dialog { max-width: 1080px; }
.dialog-panel > .section-title { margin: 0 0 20px; }
.dialog-panel > .section-title h2 { margin: 0; }
.dialog-panel > .section-title .btn { flex: 0 0 30px; width: 30px; padding: 3px; border: 0; background: #f0f5e8; color: var(--muted); }
.dialog-panel > .toolbar { margin-bottom: 0; justify-content: flex-end; }
.footer { justify-content: space-between; }

@media (max-width: 1180px) {
  .app-header { padding-left: 28px; padding-right: 28px; }
  .app-sidebar > .brand { margin-left: 10px; }
  .stat-block { padding: 0 18px; }
  .stat-block:not(:first-child) { padding-left: 18px; }
  .stat-block strong { font-size: 1.5rem; }
  .stat-block > p { font-size: 0.8rem; }
  .hero { padding: 30px; }
  .hero h1 { font-size: 2.15rem; }
  .course-tile-art { width: 180px; flex-basis: 180px; }
}
@media (max-width: 920px) {
  .app-header { padding-left: 23px; padding-right: 23px; gap: 15px; }
  .header-course { font-size: 0.8rem; }
  .header-course span { margin: 0 5px; }
  .search-box { width: 220px; }
  .app-sidebar > .course-context { margin-left: 3px; margin-right: 3px; padding: 12px; }
  .hero h1 { font-size: 1.9rem; }
  .hero { padding: 26px; }
  .hero-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 21px 0; }
  .stat-block:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat-block > p { font-size: 0.8rem; }
  .stat-block strong { font-size: 1.65rem; }
  .quiz-aside { order: 0; }
  .review-grid { gap: 7px; }
  .course-tile { gap: 22px; padding: 23px; }
  .course-tile-art { width: 145px; flex-basis: 145px; }
}
@media (max-width: 720px) {
  .app-header { display: grid; grid-template-columns: 34px minmax(0,1fr); padding: 14px 20px; gap: 10px 12px; }
  .header-course { font-size: 0.85rem; }
  .header-actions { grid-column: 1 / -1; }
  .header-actions .search-box { display: flex; width: 100%; }
  .header-actions .search-box input { height: 38px; }
  .mobile-menu { display: grid; place-items: center; width: 33px; height: 33px; padding: 0; background: #eef4e7; border: 1px solid #e1ead5; border-radius: 8px; color: #7d9566; font-size: 1rem; line-height: 1; }
  .app-sidebar { display: none; }
  .app-sidebar.mobile-open { display: flex; position: fixed; inset: 0 auto 0 0; height: 100dvh; width: 275px; padding: 25px 18px; z-index: 55; overflow-y: auto; box-shadow: 12px 0 50px rgba(37,61,23,.15); border-right: 1px solid #e1e8d8; }
  .app-sidebar.mobile-open + .workspace::before { content: ""; position: fixed; inset: 0; z-index: 25; background: rgba(45,63,33,.25); backdrop-filter: blur(3px); }
  .app-sidebar.mobile-open + .workspace .mobile-menu { position: fixed; z-index: 60; top: 17px; right: 17px; width: 36px; height: 36px; background: #fff; box-shadow: 0 3px 13px rgba(37,61,23,.08); }
  .app-sidebar.mobile-open .sidebar-section-label { display: flex; }
  .app-sidebar.mobile-open .sidebar-footer { display: block; }
  .app-sidebar.mobile-open .unitnav { display: grid; margin: 0; padding: 0; overflow: visible; }
  .app-sidebar.mobile-open .unitlink { font-size: 0.8rem; padding: 10px 12px; gap: 10px; }
  .app-sidebar.mobile-open .unitnum { flex: 0 0 22px; font-size: 0.8rem; }
  .app-sidebar > .brand { margin-bottom: 24px; }
  .app-sidebar .brand-icon { width: 41px; height: 41px; }
  .app-sidebar .brand { font-size: 1.22rem; }
  .app-sidebar .brand-sub { font-size: 0.8rem; }
  .app-sidebar > .course-context { margin-left: 9px; margin-right: 9px; padding: 15px; }
  .hero { padding: 29px; }
  .hero p { font-size: 0.85rem; }
  .hero h1 { font-size: 2.05rem; }
  .hero-stats { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; }
  .stat-block { padding: 0 17px; }
  .stat-block:nth-child(3) { border-left: 1px solid #d8e3ce; padding-left: 17px; }
  .stat-block:not(:first-child) { padding-left: 17px; }
  .stat-block > p { font-size: 0.8rem; }
  .stat-block strong { font-size: 1.4rem; }
  .course-tile { padding: 23px; }
}
@media (max-width: 480px) {
  .app-header { padding: 12px 16px; gap: 9px 11px; }
  .header-course { font-size: 0.82rem; }
  .header-actions { width: 100%; }
  .header-actions .search-box { display: flex; width: 100%; }
  .header-actions .search-box input { font-size: .9rem; height: 38px; }
  .hero { padding: 25px 22px; min-height: 285px; }
  .hero h1 { font-size: 1.85rem; max-width: 90%; line-height: 1.4; }
  .hero p { font-size: 0.8rem; max-width: 90%; margin-top: 9px; }
  .hero-art { width: 100px; height: 115px; top: auto; right: 7px; bottom: 2px; opacity: .45; z-index: 0; }
  .hero-actions { margin-top: 21px; gap: 5px; }
  .hero-actions .btn.primary { min-width: 138px; }
  .hero-actions .btn.ghost { padding-left: 11px; padding-right: 11px; }
  .hero-resume { font-size: 0.8rem; margin-top: 13px; max-width: 78%; }
  .hero-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 21px 0; padding: 2px 2px; margin-bottom: 26px; }
  .stat-block:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat-block:not(:first-child) { padding-left: 24px; }
  .stat-block:nth-child(3) { padding-left: 0; }
  .stat-block strong { font-size: 1.65rem; }
  .stat-block > span { font-size: 0.8rem; margin-bottom: 4px; }
  .stat-block strong small { font-size: 0.8rem; }
  .stat-block > p { font-size: 0.8rem; }
  .term-tabs { display: flex; width: 100%; margin-bottom: 18px; }
  .term-tabs button { flex: 1; padding: 8px 5px; font-size: 0.8rem; }
  .unit-card h2 { font-size: 1.07rem; }
  .unit-card > p { font-size: 0.8rem; }
  .unit-progress-label { font-size: 0.8rem; }
  .lesson-header h1 { font-size: 1.7rem; }
  .learning-block .block-label { font-size: 0.8rem; width: 27px; height: 24px; }
  .next-lesson { margin: 8px 0 0; width: 100%; font-size: 0.8rem; }
  .lesson-bottom h2 { font-size: 0.99rem; }
  .lesson-bottom p { font-size: 0.8rem; }
  .activity-card { flex-direction: column; align-items: flex-start; padding: 23px; gap: 17px; }
  .activity-card > .btn { width: 100%; }
  .question h2 { font-size: 0.99rem; }
  .option-letter { width: 23px; height: 23px; font-size: 0.8rem; }
  .quiz-actions { display: flex; flex-wrap: nowrap; }
  .quiz-actions .btn { flex: 1; }
  .quiz-legend { margin-top: 12px; font-size: 0.8rem; }
  .result-card h2 { font-size: 1.58rem; }
  .course-tile { flex-direction: column; align-items: stretch; padding: 22px; gap: 22px; }
  .course-tile-art { width: 100%; flex-basis: auto; height: 170px; }
  .course-tile-art svg { height: 100%; }
  .course-tile h2 { font-size: 1.45rem; }
  .course-tile p { font-size: 0.8rem; }
}

/* Mobile navigation always has an accessible close control within its layer. */
.sidebar-close { display: none; }
@media (max-width:720px) { .mobile-open .sidebar-close { display: grid; place-items:center; position:absolute; top:18px; right:16px; width:32px; height:32px; border:1px solid #dbe4d6; border-radius:8px; background:#fff; color:#315b49; z-index:2; } }

/* Subject-aware accents retain one consistent reading environment. */
.subject-physics { --green:#376981; --green-deep:#254f67; --green-soft:#e8f0f5; --ink-strong:#23495f; --line:#e0e8ed; }
.subject-physics .hero { background:#eef4f7; border-color:#dce8ef; }
.subject-physics .navbtn.active,.subject-physics .unitlink.active,.subject-physics .term-tabs button.active { background:#e4edf3; color:var(--green-deep); }
.subject-physics .course-context,.subject-physics .unit-symbol { background:#edf3f7; }
.subject-physics .progress-bar > span { background:#6b96af; }
.subject-physics .context-pill,.subject-physics .navbtn.active .icon { color:#52778d; }
.sidebar-term-label { margin:15px 12px 5px; color:var(--muted); font-size: 0.8rem; letter-spacing:.08em; font-weight:650; }
.course-grid { display:grid; gap:20px; }
.course-grid .course-tile { transition:transform .2s ease,box-shadow .2s ease; }
.course-grid .course-tile:hover { transform:translateY(-2px); box-shadow:var(--shadow-raised); }
.course-grid .course-tile .btn { margin-top:8px; }
.course-tile.subject-physics { background:linear-gradient(110deg,#edf4f8,#fff 80%); border-color:#dce7ee; }
.course-tile.subject-chemistry { background:linear-gradient(110deg,#f0f5ec,#fff 80%); }
.course-tile.subject-physics .course-tile-art { background:#e8f0f6; }
.loading-state { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:16px; min-height:90vh; max-width:660px; text-align:center; margin:auto; padding:32px; }
.loading-state h1 { font-size: 1.9rem; line-height:1.4; margin:10px 0 0; color:var(--ink-strong); }
.loading-state p { margin:0; max-width:540px; line-height:1.9; color:var(--muted); }
.loading-state .brand-icon { width:58px; height:58px; font-size: 1.6rem; }
.question-diagram { margin:20px 0; padding:15px; background:#f9fbfc; border:1px solid var(--line); border-radius:12px; }
.question-diagram svg { display:block; width:100%; max-height:360px; }
.question .diagram-card { margin:20px 0; }
@media (max-width:480px) {
  .term-tabs button { font-size: 0.8rem; padding:9px 4px; }
  .loading-state h1 { font-size: 1.5rem; }
  .question-diagram { padding:6px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { transition:none!important; animation:none!important; }
}
.edition-note { margin:0 0 26px; font-size: 0.8rem; color:var(--muted); }
.edition-note a { margin-left:12px; color:var(--green); border-bottom:1px solid #c9d8d0; }
.portal-header { min-height:86px; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:20px max(24px,calc((100vw - 1100px) / 2)); background:#fdfdfb; border-bottom:1px solid var(--line); }
.portal-main { max-width:1180px; margin:auto; padding:48px 40px 20px; }
.portal-main .course-tile { margin:0; }
@media (min-width:1024px) {
  .portal-main .course-grid { grid-template-columns:1fr 1fr; }
  .portal-main .course-tile { flex-direction:column; align-items:flex-start; padding:32px; }
  .portal-main .course-tile-art { flex-basis:auto; width:100%; height:190px; background:transparent; }
  .portal-main .course-tile-art svg { height:190px; width:100%; }
}
@media (max-width:600px) {
  .portal-header { padding:16px 22px; }
  .portal-header .text-link,.portal-header .muted-label { font-size: 0.8rem; }
  .portal-main { padding:28px 20px 10px; }
  .portal-main .page-heading h1 { font-size: 1.6rem; }
}
.future-heading { margin-top:42px; }
.portal-main .course-tile-art { height:145px; }
.portal-main .course-tile-art svg { height:145px; }
.portal-main .stage-card { padding:22px 24px; }
.dialog-panel .question-diagram svg { min-width:630px; max-height:none; }


/* Reading scale shared by the portal, chemistry, physics and future courses. */
:root { --muted:#52655a; --ink:#293d33; --reading-size:18px; --ui-size:16px; }
body { font-size:1rem; line-height:1.85; }
.main { max-width:1500px; }
.workspace,.main,.reading,.lesson-layout,.quiz-layout > div { min-width:0; }
.learning-block p,.learning-steps li,.point-list,.callout,.option,.text-answer,.case-part,.feedback,.teaching-section p { font-size:1rem; line-height:1.85; color:var(--ink); }
.question h2 { font-size:1.05rem; line-height:1.9; font-weight:600; color:var(--ink-strong); }
.learning-block h2 { font-size:1.2rem; line-height:1.6; }
.learning-block p,.feedback p { margin:0.75em 0; }
.page-sub,.lead,.unit-card > p,.lesson-row p,.hero p,.course-tile p,.activity-card p,.test-option-card p { font-size:.95rem; color:var(--muted); }
.case-table { font-size:.95rem; color:var(--ink); }
.case-table th,.case-table td { padding:.6em .75em; line-height:1.7; }
.meta,.muted-label,.badge,.chip,.reading-meta,.crumb,.edition-note,.footer,.diagram-card figcaption,.sidebar-section-label,.header-kicker,.quiz-legend,.quiz-aside p,.question-stage-note { font-size:.8rem; line-height:1.7; }
.btn,.navbtn,.unitlink,.term-tabs button,.field label,.field select,.status-select,.search-box input { font-size:.9rem; }
.btn,.term-tabs button,.text-answer,.reading-control select { min-height:44px; }
.header-actions { flex-wrap:wrap; gap:12px; }
.app-header { height:auto; min-height:82px; align-items:center; }
.search-box { flex:1 1 220px; }
.reading-control { display:flex; align-items:center; gap:.4rem; white-space:nowrap; font-size:.8rem; color:var(--ink); }
.reading-control select { font:inherit; border:1px solid #b8c7be; border-radius:9px; padding:.35rem .6rem; color:var(--ink); background:#fff; max-width:100%; }
.portal-header { flex-wrap:wrap; gap:15px; }
.portal-header .reading-control { margin-left:auto; }
.sidebar-term-label { color:var(--muted); }
.app-sidebar { width:280px; }
.app-layout { grid-template-columns:280px minmax(0,1fr); }
.unitlink { align-items:flex-start; white-space:normal; }
.unitnum { flex-shrink:0; }
.lesson-layout { grid-template-columns:minmax(0,1fr) 215px; }
.lesson-toc .toc-link { font-size:.8rem; line-height:1.65; padding-top:10px; padding-bottom:10px; }
.quiz-layout { grid-template-columns:minmax(0,1fr) 210px; }
.quiz-dot { font-size:.85rem; min-height:40px; }
.quiz-nav { grid-template-columns:repeat(4,minmax(0,1fr)); }
.option-letter { min-width:1.5rem; width:1.5rem; height:auto; min-height:1.5rem; font-size:.85rem; }
.option input { width:20px; height:20px; margin-top:.4em; }
.chemical-equation { display:inline-flex; align-items:center; flex-wrap:wrap; gap:.3em; font-size:1em; color:inherit; vertical-align:middle; margin:.25em .15em; line-height:1.6; max-width:100%; }
.chemical-equation > span { overflow-wrap:anywhere; }
.reaction-sign { display:inline-flex; flex-direction:column; align-items:center; justify-content:flex-end; min-width:2.4em; padding-top:.1em; line-height:1.1; }
.reaction-condition { font-size:.8rem; line-height:1.4; white-space:nowrap; }
.reaction-sign > span:last-child { font-size:1.3em; line-height:1; }
.diagram-card { overflow:auto; overscroll-behavior-x:contain; }
.diagram-card figcaption { min-width:0; color:var(--muted); }
.diagram-zoom { font-size:.85rem; min-height:44px; position:static; margin:8px 0 0 auto; display:flex; }
.diagram-dialog .diagram-card { overflow:auto; }
.difficulty-4 { color:#76521c; background:#faf0db; }
.difficulty-5 { color:#783f39; background:#faeae5; }
.question-stage-note { color:var(--muted); margin:12px 0; }
.correct-text,.incorrect-text { font-size:.8rem; }
.feedback { color:var(--ink); }
@media(max-width:1250px) {
  .lesson-layout { grid-template-columns:minmax(0,1fr); }
  .lesson-toc { display:none; }
  .hero h1 { font-size:1.8rem; }
  .dashboard-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:1000px) {
  .app-layout { grid-template-columns:240px minmax(0,1fr); }
  .app-sidebar { width:240px; }
  .quiz-layout { grid-template-columns:minmax(0,1fr); }
  .quiz-aside { position:static; }
  .quiz-nav { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .course-grid { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:760px) {
  .app-layout { display:block; }
  .app-sidebar { width:min(88vw,340px); }
  .main { padding:24px 16px; }
  .app-header { position:relative; padding:12px 16px; }
  .header-actions { display:flex; align-items:center; }
  .header-actions .search-box { flex-basis:100%; width:100%; }
  .header-actions .search-box input { height:44px; font-size:.9rem; }
  .reading-control { margin-left:auto; }
  .hero-art { display:none; }
  .hero { grid-template-columns:1fr; padding:24px; }
  .hero h1,.hero p,.hero-resume { max-width:100%; }
  .hero h1,.page-heading h1 { font-size:1.6rem; }
  .hero-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns:1fr; }
  .question { padding:20px 16px; }
  .question h2 { font-size:1rem; }
  .term-tabs { flex-wrap:wrap; }
  .term-tabs button { flex:1 1 125px; }
  .case-table { min-width:400px; }
  .case-part { min-width:0; }
  .portal-header .text-link { width:100%; }
  .footer { flex-wrap:wrap; gap:10px; }
  .chemical-equation { overflow-wrap:anywhere; }
  .lesson-header h1 { font-size:1.6rem; }
}

.answer-analysis h3 { font-size:1rem; color:var(--ink-strong); margin:1.1em 0 .4em; }
.solution-steps { display:grid; gap:.8em; padding-left:1.5em; margin:.6em 0 1em; font-size:1rem; line-height:1.9; }
.solution-steps li::marker { font-weight:700; color:var(--green); }
.analysis-pitfall { border-left:3px solid #ae8646; padding:.5em 1em; background:#fffaf0; margin:1em 0; }
.analysis-pitfall p { margin:.4em 0; }
.analysis-method { border-top:1px solid var(--line); padding:.75em 0; }
.analysis-method summary { cursor:pointer; color:var(--ink-strong); font-size:.9rem; }
.analysis-links { display:flex; flex-wrap:wrap; gap:.6em; margin-top:1em; }
.return-to-question { margin:.5em 0; position:sticky; top:90px; z-index:2; box-shadow:var(--shadow); }
@media(max-width:760px) { .return-to-question { top:8px; } }

/* 统一题型提示与答案区；多选同时依靠文字、图标和边框识别。 */
.question-type { display:inline-flex; align-items:center; padding:.2em .7em; border-radius:6px; border:1px solid #c8d7cb; background:#f0f5ef; color:#284c3c; font-size:.9rem; line-height:1.6; }
.question-type-multi { color:#663c10; background:#fff0c8; border:2px solid #b87920; font-weight:800; }
.multi-select-notice { display:flex; align-items:flex-start; gap:12px; margin:16px 0 22px; padding:16px 20px; background:#fff7df; border:2px solid #b87920; border-left-width:6px; border-radius:10px; color:#543510; }
.multi-select-notice strong { font-size:1.05rem; font-weight:800; }
.multi-select-notice p { margin:4px 0 0; font-size:.95rem; line-height:1.75; }
.multi-select-symbol { font-size:1.4rem; line-height:1.4; }
.question-instructions { font-size:.9rem; line-height:1.75; color:var(--muted); margin:14px 0; }
.option input[type="checkbox"] { width:24px; height:24px; accent-color:#805112; flex-shrink:0; }
.question-reference { margin:14px 0 20px; font-size:.85rem; line-height:1.8; color:var(--muted); }
.question-reference summary { cursor:pointer; }
.correct-answer-block { background:#fff; border:1px solid #9bb49f; border-radius:10px; padding:18px 22px; margin:0 0 18px; }
.correct-answer-block h3 { margin:0 0 14px; font-size:1.1rem; color:#244d36; }
.correct-answer-options,.correct-answer-parts { list-style:none; margin:0; padding:0; }
.correct-answer-options li,.correct-answer-parts li { display:flex; align-items:flex-start; gap:12px; margin:10px 0; font-size:1rem; color:var(--ink); line-height:1.8; }
.answer-letter { min-width:1.7em; text-align:center; background:#e8f1e7; border-radius:5px; font-weight:800; color:#244d36; }
.correct-answer-parts li>span { min-width:5em; color:var(--muted); font-size:.9rem; }
.correct-answer-text { font-size:1.1rem; font-weight:700; color:var(--ink); }
.answer-verdict { font-weight:650; font-size:.95rem; }
.quiz-tier-summary { padding:10px 12px; border-radius:8px; background:#f2f5ed; color:#415640; line-height:1.8; }
.quiz-dot { display:flex; flex-direction:column; justify-content:center; gap:0; min-height:58px; line-height:1.35; }
.quiz-multi-marker { font-size:.65rem; font-weight:800; color:#6a4112; }
@media(max-width:640px){
  .multi-select-notice { padding:12px; gap:8px; }
  .correct-answer-block { padding:14px; }
  .quiz-dot { max-width:none; min-height:58px; }
}
.option input[type="checkbox"] { position:static; opacity:1; }
.quiz-dot { aspect-ratio:auto; width:100%; min-width:0; }

/* 2026-09: 阅读正文与界面各自分级，共用一份阅读偏好。标准正文18px、界面16px。 */
body { line-height:1.65; }
.app-layout { grid-template-columns:248px minmax(0,1fr); max-width:1600px; }
.app-sidebar { width:248px; padding:24px 16px 20px; }
.app-header { min-height:72px; padding:12px clamp(24px,3vw,40px); gap:20px; }
.main { max-width:1240px; margin:0 auto; padding:28px clamp(24px,3vw,40px) 56px; }
.brand-sub,.sidebar-section-label,.unitnum,.header-kicker,.meta,.muted-label,.badge,.chip,.reading-meta,.crumb,.edition-note,.footer,.diagram-card figcaption,.quiz-legend,.quiz-aside p,.question-stage-note { font-size:.875rem; }
.navbtn,.unitlink,.lesson-toc .toc-link { font-size:.9375rem; }
.navbtn { padding:10px 12px; }
.unitlink { padding:8px 10px; line-height:1.6; }
.btn,.term-tabs button,.field label,.field select,.status-select,.search-box input { font-size:1rem; }
.reading-control { font-size:.875rem; }
.reading-control select,.search-box input { font-size:max(16px,1rem); }
.page-title,.page-heading h1,.lesson-header h1 { font-size:2rem; line-height:1.35; letter-spacing:0; }
.hero h1 { font-size:2.25rem; line-height:1.35; }
.page-sub,.lead,.unit-card > p,.lesson-row p,.hero p,.course-tile p,.activity-card p,.test-option-card p { font-size:1rem; line-height:1.75; }
.lesson-layout { grid-template-columns:minmax(0,760px) 184px; gap:32px; }
.lesson-layout .reading { max-width:760px; width:100%; }
.reading .lead { font-size:var(--reading-size); line-height:1.8; }
.learning-block p,.learning-steps li,.point-list,.callout,.option,.text-answer,.case-part,.feedback,.teaching-section p,.solution-steps,.correct-answer-options li,.correct-answer-parts li,.correct-answer-text { font-size:var(--reading-size); line-height:1.8; }
.question h2 { font-size:var(--reading-size); line-height:1.8; font-weight:650; }
.learning-block h2 { font-size:1.5rem; line-height:1.5; margin-bottom:14px; }
.learning-block p,.feedback p { margin:.7em 0; }
.learning-block { margin-bottom:32px; }
.case-table { font-size:var(--reading-size); }
.case-table th,.case-table td { padding:.55em .65em; }
.question { padding:24px; }
.question-type { font-size:.9375rem; }
.question-instructions,.question-reference { font-size:.9375rem; }
.multi-select-notice { padding:14px 16px; margin:14px 0 20px; }
.multi-select-notice strong { font-size:1.0625rem; }
.multi-select-notice p { font-size:1rem; line-height:1.7; }
.option { padding:12px 14px; }
.option-letter { font-size:.9375rem; min-width:1.5rem; }
.option input[type="checkbox"] { width:20px; height:20px; margin-top:.35em; }
.correct-answer-block h3,.answer-analysis h3 { font-size:1.125rem; }
.answer-verdict { font-size:1rem; }
.correct-answer-parts li>span { font-size:.9375rem; }
.quiz-layout { grid-template-columns:minmax(0,1fr) 200px; max-width:1120px; }
.quiz-aside { padding:18px; top:92px; }
.quiz-aside h3 { font-size:1rem; }
.quiz-nav { grid-template-columns:repeat(4,minmax(0,1fr)); }
.quiz-dot { font-size:.9375rem; min-height:52px; }
.quiz-multi-marker { font-size:.75rem; }
.quiz-tier-summary { padding:10px; }
.analysis-pitfall { padding:.6em .9em; }
.analysis-method summary,.analysis-links .btn { font-size:.9375rem; }
.chemical-equation { font-size:1em; }
.reaction-condition { font-size:.8em; }
@media(max-width:1280px){
  .lesson-layout { grid-template-columns:minmax(0,760px); justify-content:center; }
  .lesson-toc { display:none; }
}
@media(max-width:1050px){
  .app-layout { grid-template-columns:224px minmax(0,1fr); }
  .app-sidebar { width:224px; }
  .quiz-layout { grid-template-columns:minmax(0,1fr); }
  .quiz-aside { position:static; }
}
@media(max-width:760px){
  .app-layout { display:block; }
  .app-sidebar { width:min(88vw,300px); }
  .main { padding:24px 16px 40px; }
  .app-header { padding:12px 16px; }
  .page-heading h1,.lesson-header h1,.hero h1 { font-size:1.625rem; }
  .learning-block h2 { font-size:1.375rem; }
  .question { padding:18px 16px; }
  .reading .lead { font-size:var(--reading-size); }
  .question h2 { font-size:var(--reading-size); }
  .header-actions .search-box input { font-size:max(16px,1rem); }
  .quiz-nav { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .multi-select-notice { padding:12px; }
  .correct-answer-block { padding:14px; }
}
