:root{--bg:#f8f8f6;--card:#fff;--ink:#252a42;--muted:#7a8096;--violet:#6253c9;--deep:#343060;--border:#e9e8ef;--gold:#e2a443;--shadow:0 11px 35px rgba(36,35,71,.045);--shellwidth:310px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);font-family:system-ui,-apple-system,'Segoe UI','Noto Sans Tamil',sans-serif;color:var(--ink);-webkit-font-smoothing:antialiased}button,input,a{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.38}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #aa97ff;outline-offset:3px}a{text-decoration:none;color:inherit}button{touch-action:manipulation}button::-moz-focus-inner{border:0}::selection{background:#ede9ff}body.drawer-open{overflow:hidden}
.app-shell{display:grid;grid-template-columns:var(--shellwidth) minmax(0,1fr);min-height:100vh;max-width:1730px;margin:0 auto}.sidebar{display:flex;flex-direction:column;position:sticky;top:0;height:100dvh;background:#fff;border-right:1px solid var(--border);padding:26px 18px 0;min-width:0;z-index:20}.side-grip,.side-close,.backdrop{display:none}.side-brand{display:flex;align-items:center;gap:12px;padding:0 9px 22px;letter-spacing:-.8px}.logo{display:grid;place-items:center;background:#eae7ff;color:#5f55b1;border-radius:14px;width:43px;height:43px;font-size:25px;font-weight:900;flex:none}.side-brand b{font-size:27px;line-height:1}.side-brand small{display:block;font-size:9px;font-weight:800;letter-spacing:1.65px;color:#9494a9;margin-top:6px}.gold{color:#d59a41}.side-caption{color:#9699ad;margin:14px 10px 11px;font-size:10px;letter-spacing:1.4px;font-weight:850}.side-classes{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 4px}.side-grade{border:1px solid #e8e6f0;background:#fff;color:#61657a;border-radius:14px;padding:12px 10px;display:flex;justify-content:space-between;align-items:center;min-height:48px;font-size:12px;font-weight:850;transition:background .2s,transform .2s,border-color .2s}.side-grade:hover{transform:translateY(-2px);border-color:#aa9bea}.side-grade.active{color:#fff;background:#4b427f;border-color:#4b427f;box-shadow:0 4px 13px #42387b29}.side-grade b{font-size:16px}.side-browse{display:flex;align-items:center;justify-content:space-between;gap:4px;margin:29px 9px 13px;font-size:13px;font-weight:800}.side-count{font-size:10px;color:#9a9db0;font-weight:650}.search-field{border:1px solid #e8e7f0;border-radius:13px;display:flex;align-items:center;padding:0 11px;height:43px;gap:8px;background:#f9f9fc;color:#8c92a7;margin:0 3px 12px}.search-field>span{font-size:22px}.search-field input{font-size:12px;flex:1;min-width:0;border:0;outline:0;background:transparent;color:#30324d}.search-field input::placeholder{color:#a1a4b5}.search-field kbd{font:700 10px monospace;background:#fff;border:1px solid #e5e5ee;color:var(--text-secondary);border-radius:5px;padding:3px 6px}.exercise-list{flex:1;overflow:auto;overscroll-behavior:contain;padding:0 3px 20px;scrollbar-width:thin;scrollbar-color:#d9d3ec transparent}.exercise-group{margin:3px 0 7px;border-radius:12px;overflow:hidden}.exercise-group>summary{display:flex;gap:7px;align-items:center;min-height:41px;list-style:none;cursor:pointer;font-weight:790;font-size:12.5px;padding:11px 9px;color:#646986;border-radius:10px}.exercise-group>summary::-webkit-details-marker{display:none}.exercise-group>summary:before{content:'›';font-size:19px;line-height:.5;transition:transform .2s;color:#aaa2cb}.exercise-group[open]>summary:before{transform:rotate(90deg)}.exercise-group>summary:hover{background:#f5f3ff}.exercise-group .exercise-number{margin-left:auto;font-weight:750;font-size:10px;color:#a3a5b6}.exercise-question{display:flex;align-items:center;gap:8px;width:100%;min-width:0;min-height:39px;border:0;background:transparent;color:#656c85;text-align:left;border-radius:10px;padding:8px 6px 8px 24px;font-size:11.5px;line-height:1.4;font-weight:650}.exercise-question:hover{background:#f8f6ff}.exercise-question.active{background:#efebff;color:#4b3aa4;font-weight:800}.exercise-question>span:nth-child(2){min-width:0;flex:1;overflow-wrap:anywhere}.question-bullet{color:#b7b0d9;flex:none;font-size:13px}.question-done{color:#2a9b7d}.empty-search{font-size:12px;color:#8a90a2;line-height:1.6;padding:10px}.sidebar-foot{border-top:1px solid var(--border);padding:12px 9px 18px;background:#fff}.sidebar-foot p{margin:3px 0 12px;color:#9c9fb0;font-size:10.5px}.sidebar-foot p span:first-child{color:var(--gold)}.sidebar-foot>a{display:flex;justify-content:space-between;gap:6px;align-items:center;color:#6153b6;font-weight:800;font-size:12px}
.workspace{min-width:0}.appbar{height:70px;position:sticky;z-index:10;top:0;border-bottom:1px solid #e8e7ee;display:flex;align-items:center;justify-content:flex-end;gap:18px;background:#fcfbf9ee;backdrop-filter:blur(16px);padding:0 clamp(18px,3vw,52px)}.brand-mobile{display:none}.browse-button{border:1px solid #e4e2ec;border-radius:12px;background:#fff;min-height:40px;padding:8px 13px;display:none;align-items:center;gap:8px;font-weight:800;color:#4e477f}.browse-symbol{font-size:18px}.appbar-actions{display:flex;align-items:center;gap:13px}.basics-link{font-size:12px;display:inline-flex;align-items:center;gap:5px;font-weight:800;color:#625999;padding:9px 12px;background:white;border-radius:11px;border:1px solid var(--border)}.basics-link:hover{background:#f5f1ff}.lang-switch{display:flex;align-items:center;gap:3px;padding:4px;border-radius:12px;background:#efedf5}.lang-switch button{border:0;background:transparent;color:#73728c;padding:7px 10px;min-height:34px;border-radius:9px;font-weight:850;font-size:11px}.lang-switch button.active{background:#fff;color:#43378f;box-shadow:0 1px 8px #30275c17}
.lesson-container{max-width:920px;margin:0 auto;padding:clamp(20px,3vw,36px) clamp(19px,4vw,48px) 34px}.welcome{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:130px;padding-bottom:14px}.eyebrow{font-size:10px;font-weight:850;letter-spacing:1.8px;color:var(--text-secondary);display:flex;align-items:center;gap:9px}.eyebrow-dot{width:7px;height:7px;border-radius:50%;background:#e1a455}.welcome h1{font:800 clamp(30px,4vw,42px)/1.2 system-ui,sans-serif;letter-spacing:-1.6px;margin:8px 0 7px;color:#292c47}.heading-star{color:var(--brand-gold);font-size:.6em;vertical-align:middle}.welcome p{font-size:12.5px;color:var(--text-secondary);margin:0;line-height:1.5}.class-emblem{position:relative;width:94px;height:94px;border-radius:29px;background:radial-gradient(circle at 20% 20%,#faf0c6,#f0e8ff);display:grid;place-items:center;color:#5e55a9;flex:none;transform:rotate(-5deg);box-shadow:inset 0 -8px 20px #8a73bc11}.class-emblem span{font-size:43px;font-weight:900;transform:rotate(5deg);z-index:1}.class-emblem svg{position:absolute;width:100%;height:100%;opacity:.48}.status-row{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:12px 0 13px}.crumb{font-weight:780;color:#8b8da1;font-size:11.5px;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.small-total{border-radius:50px;color:#9a86b3;background:#f0ebf8;font-size:10px;font-weight:850;padding:7px 11px;white-space:nowrap}
.lesson-card{border:1px solid #e8e5ed;border-radius:24px;background:white;padding:clamp(17px,3.5vw,31px);box-shadow:var(--shadow);animation:fadeCard .22s ease-out}@keyframes fadeCard{from{opacity:.55;transform:translateY(5px)}to{opacity:1;transform:none}}.question-top,.lesson-title-row,.lesson-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px}.lesson-tag{color:#9065b7;background:#f4edfa;border:1px solid #efe4f5;border-radius:8px;padding:7px 9px;font-size:10.5px;letter-spacing:.4px;font-weight:850}.lesson-progress{color:#a3a1b1;font:800 12px system-ui;white-space:nowrap}.lesson-title-row{align-items:flex-start;margin-top:25px}.lesson-title-row>div{min-width:0;flex:1}.mini-topic{font-size:12px;color:#a6a5b3;font-weight:730;margin-bottom:6px}.lesson-title-row h2{font-size:clamp(20px,2.9vw,27px);letter-spacing:-.55px;line-height:1.25;margin:0;overflow-wrap:anywhere}.figure-button{display:inline-flex;gap:5px;white-space:nowrap;align-items:center;border:1px solid #e3e0f1;color:#5e4ca7;background:#f9f8ff;font-weight:800;font-size:11.5px;border-radius:11px;padding:10px 13px;min-height:40px}.figure-button:hover{background:#eeeaff}.figure-button[hidden]{display:none}.question-text{background:#f8f9fc;border-left:3px solid #ad9bdb;border-radius:0 11px 11px 0;margin-top:22px;padding:17px 19px;font-size:clamp(16px,2.1vw,19px);font-weight:600;line-height:1.65;color:#363a58;overflow-wrap:anywhere;white-space:pre-wrap}.lesson-divider{display:flex;justify-content:space-between;gap:8px;align-items:center;margin:27px 0 12px;padding-top:17px;border-top:1px solid #f0eff4}.lesson-divider>span:first-child{color:#a4a0ad;font-size:10px;letter-spacing:1.5px;font-weight:850}.step-count{font-size:11px;color:#aaa7b7;font-weight:800}.steps{list-style:none;margin:0;padding:0;display:grid;gap:11px}.worked-step{display:grid;grid-template-columns:34px minmax(0,1fr);gap:12px;align-items:start;padding:11px 1px;animation:fadeCard .24s ease-out}.step-circle{width:33px;height:33px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:850;background:#f0effb;color:#7b68b8}.worked-step:last-child .step-circle{background:#e7f6f0;color:#29916e}.step-reason{font-size:13.5px;color:#767c91;line-height:1.55;margin-bottom:7px}.step-equation{font-size:clamp(16px,2.6vw,22px);font-weight:800;color:#393c6e;line-height:1.65;overflow-x:auto;overscroll-behavior-x:contain;white-space:normal;overflow-wrap:anywhere}.frac{display:inline-flex;flex-direction:column;vertical-align:middle;align-items:center;line-height:1.2;max-width:100%;margin:0 .1em;white-space:nowrap}.frac > span:first-child{border-bottom:1.8px solid currentColor;padding:0 .15em .12em}.frac > span:last-child{padding:.12em .15em 0}.step-equation sup,.math-answer sup,.question-text sup{font-size:.7em;line-height:0}.answer-box{border:1px solid #c6e6d8;background:#f0fbf5;border-radius:16px;padding:17px 18px;margin-top:17px;animation:fadeCard .2s}.answer-box>div:first-child{color:#277b61;font-size:12px;font-weight:850;display:flex;align-items:center;gap:8px}.answer-sparkle{font-size:23px}.math-answer{color:#176f54;font-size:clamp(19px,2.8vw,26px);font-weight:850;line-height:1.7;margin-top:7px;overflow-wrap:anywhere}.step-actions{display:flex;gap:11px;flex-wrap:wrap;margin-top:22px}.step-primary,.step-quiet{min-height:46px;padding:11px 17px;border-radius:12px;font-size:12px;font-weight:850}.step-primary{border:1px solid #4d427c;color:white;background:#443b77;box-shadow:0 4px 11px #30265826}.step-primary:hover{background:#584d93}.step-quiet{border:1px solid #e2e0ef;background:#fff;color:#625b96}.step-primary[hidden],.step-quiet[hidden]{display:none}.lesson-bottom{border-top:1px solid #f1f0f5;margin-top:25px;padding-top:18px}.kind-badge{color:#8e91a1;font-size:10.5px;font-weight:780;line-height:1.45}.mark-button{font-size:11.5px;border:1px solid #ddd9e9;background:#fff;padding:9px 11px;border-radius:11px;min-height:41px;color:#696185;font-weight:800;white-space:nowrap}.mark-button[aria-pressed=true]{color:#1a8064;border-color:#bde4d3;background:#ebfbf4}
.page-controls{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center;margin-top:15px}.page-button{min-height:49px;padding:12px 15px;border-radius:13px;background:#fff;border:1px solid #e6e3ed;color:#635c88;font-size:12px;font-weight:850;white-space:nowrap}.page-button.next{background:#343058;color:#fff;border-color:#343058;justify-self:stretch}.page-button:first-child{justify-self:stretch}.page-button:not(:disabled):hover{filter:brightness(.97)}.page-status{width:84px;display:flex;flex-direction:column;align-items:center;gap:8px;font-size:10px;color:#9995a6;font-weight:800}.page-track{width:70px;height:4px;background:#e6e4ef;border-radius:99px;overflow:hidden}.page-track span{display:block;height:100%;background:#6c5cc5;transition:width .25s}.reference-line{display:flex;gap:10px;align-items:flex-start;padding:15px 3px 0;color:#999eae;font-size:10.5px;line-height:1.55}.reference-line>span{font-size:15px;color:#a198bd}.reference-line p{margin:0;flex:1}.reference-line>a{color:#7063ab;font-weight:800;white-space:nowrap}.reference-line>a[hidden]{display:none}.bottom-extras{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:30px;padding-top:17px;border-top:1px solid #eae9ef;color:#a3a4b4;font-size:10px}.bottom-extras a{color:#7465ad;font-weight:750}.bottom-extras strong{font-weight:800;color:#66627d}
.class-dock{display:none}.figure-dialog{width:min(93vw,740px);max-height:92dvh;border:1px solid #e7e4ee;border-radius:22px;background:#fff;padding:0;box-shadow:0 23px 75px #22214355;color:var(--ink);overflow:hidden}.figure-dialog::backdrop{background:#1d1c38a8;backdrop-filter:blur(4px)}.dialog-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px 23px;border-bottom:1px solid #eeedf3}.dialog-header>div>span{font-size:10px;font-weight:800;letter-spacing:1.4px;color:#9d93b9}.dialog-header h3{margin:5px 0 0;font-size:20px}.dialog-close{border:1px solid #e6e2f3;background:#fff;color:#6256a1;padding:10px 12px;border-radius:10px;min-height:41px;font-size:12px;font-weight:800}.diagram-content{padding:20px 24px 0;display:flex;justify-content:center;align-items:center;min-height:220px;max-height:65dvh;overflow:auto}.diagram-content svg{width:100%;height:auto;max-width:600px;max-height:58dvh;display:block}.diagram-caption{font-size:11px;color:#868ba1;line-height:1.5;padding:0 23px 18px}.diagram-wrap{width:100%;display:grid;place-items:center}
@media(max-width:1100px){:root{--shellwidth:278px}.lesson-container{padding-left:26px;padding-right:26px}}
@media(max-width:800px){
 .app-shell{display:block;min-height:0;height:calc(100dvh - 80px - env(safe-area-inset-bottom));overflow:hidden}.workspace{height:100%;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin}.sidebar{position:fixed;inset:auto 0 0;height:min(87dvh,760px);padding:13px 15px 0;border:1px solid #e9e6ef;border-radius:24px 24px 0 0;box-shadow:0 -18px 60px #1d183f34;transform:translateY(110%);transition:transform .28s cubic-bezier(.2,.85,.25,1);z-index:45;visibility:hidden}.drawer-open .sidebar{transform:translateY(0);visibility:visible}.side-grip{display:block;margin:0 auto 7px;background:#d4cfdf;width:47px;height:5px;border-radius:30px;flex:none}.side-close{display:block}.sidebar .side-top{display:flex;align-items:center;justify-content:space-between}.side-brand{padding:2px 8px 6px}.side-brand .logo{width:31px;height:31px;font-size:19px;border-radius:10px}.side-brand b{font-size:21px}.side-brand small{display:none}.icon-button{border:0;background:#f5f3fa;color:#675a97;border-radius:10px;min-height:39px;min-width:42px}.side-caption{margin:7px 9px 10px}.side-classes{grid-template-columns:repeat(4,minmax(0,1fr))}.side-grade{min-height:45px;font-size:11px;padding:8px;gap:2px}.side-grade b{font-size:14px}.side-browse{margin:17px 8px 10px}.search-field{height:43px}.exercise-list{padding-bottom:max(15px,env(safe-area-inset-bottom))}.sidebar-foot{display:none}.backdrop{display:block;position:fixed;inset:0;background:#1f1b368e;z-index:44;opacity:0;pointer-events:none;transition:opacity .25s}.drawer-open .backdrop{opacity:1;pointer-events:auto}.appbar{height:63px;padding:0 15px;justify-content:space-between;gap:8px}.brand-mobile{display:flex;align-items:center;gap:6px;font-size:20px;font-weight:850;letter-spacing:-.7px}.brand-mobile .logo{width:33px;height:33px;font-size:19px;border-radius:10px}.browse-button{display:flex;font-size:11px;padding:7px 9px;min-height:39px}.browse-symbol{font-size:14px}.appbar-actions{gap:5px}.basics-link{padding:8px 9px;font-size:11px}.lang-switch button{font-size:11px;padding:5px 7px;min-height:31px}.lesson-container{max-width:730px;padding:15px 14px 30px}.welcome{min-height:120px}.welcome h1{font-size:30px}.class-emblem{width:72px;height:72px;border-radius:22px}.class-emblem span{font-size:34px}.status-row{margin:9px 0 10px}.lesson-card{border-radius:20px;padding:18px}.lesson-title-row{margin-top:18px}.question-text{margin-top:16px}.lesson-divider{margin-top:20px}.class-dock{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;left:8px;right:8px;bottom:max(7px,env(safe-area-inset-bottom));height:66px;background:#fffdfaed;border:1px solid #e7e5ef;border-radius:19px;box-shadow:0 8px 35px #17143426;backdrop-filter:blur(16px);z-index:19;padding:5px 7px;gap:4px}.dock-grade{display:flex;align-items:center;justify-content:center;gap:3px;flex-direction:column;border:0;border-radius:13px;background:transparent;color:#8c8ca4;font-size:10px;font-weight:790;min-width:0}.dock-grade strong{font-size:19px;line-height:1.1}.dock-grade.active{background:#4c437f;color:#fff;box-shadow:0 4px 11px #3d327a25}.dock-grade:not(.active):active{background:#e9e7f8}.figure-dialog{max-width:96vw}.diagram-content{min-height:210px;padding:13px}
}
@media(max-width:430px){.appbar{padding:0 10px}.brand-mobile b{font-size:19px}.brand-mobile .logo{width:29px;height:29px}.browse-button{padding:6px 7px;gap:4px;font-size:10px}.browse-symbol{font-size:14px}.basics-link{padding:7px;font-size:10px}.basics-link span{display:none}.lang-switch{padding:2px}.lang-switch button{padding:6px;font-size:10px;min-width:28px;min-height:34px}.lesson-container{padding:10px 11px 30px}.welcome{min-height:104px}.welcome p{font-size:11.5px;max-width:260px}.welcome h1{font-size:28px}.class-emblem{width:66px;height:66px}.lesson-card{padding:15px}.lesson-title-row h2{font-size:21px}.lesson-title-row{gap:7px}.figure-button{padding:8px 9px;min-height:40px}.figure-button span{display:none}.question-text{padding:14px;font-size:16px}.step-equation{font-size:18px}.worked-step{gap:7px;grid-template-columns:30px minmax(0,1fr)}.step-circle{width:29px;height:29px}.step-reason{font-size:12.5px}.page-controls{gap:5px}.page-button{padding:10px 8px;font-size:11px}.page-status{width:58px;font-size:10px}.page-track{width:54px}.kind-badge{font-size:10px}.mark-button{font-size:10px;padding:8px}.bottom-extras{margin-top:24px}.reference-line{font-size:10px}}
@media(max-width:355px){.brand-mobile b{display:none}.appbar{gap:5px}.browse-button{font-size:10px}.side-grade{font-size:10px}.lesson-title-row h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* v1.20 · lesson-first interface */
.crumb{max-width:100%;overflow:visible;display:flex;align-items:center;gap:5px;flex-wrap:wrap;white-space:normal}
.crumb-link{border:1px solid transparent;background:transparent;color:#62547f;min-height:34px;padding:6px 7px;border-radius:10px;font-size:12px;font-weight:800;white-space:normal;text-align:left;line-height:1.3;transition:background .18s,border-color .18s}
.crumb-link:hover,.crumb-link:focus-visible{background:#eeeafa;border-color:#e0d8f7}.crumb-link span{font-size:11px;color:#a59cbc}
.crumb-sep{color:#b3acc2;font-weight:800;flex:none}
.figure-button{background:#eeeaff;border:1px solid #cfc3f5;min-height:43px;padding:9px 14px;color:#4d3b9a;letter-spacing:.2px;font-size:13px;white-space:nowrap}
.figure-button span:last-child{font-size:16px}
.question-text{margin-top:14px}
.lesson-title-row{margin-top:12px}
.lesson-divider{margin-top:13px;padding-top:12px}
.steps{gap:7px}
.worked-step{padding:7px 1px}
.step-reason{margin-bottom:3px}
.step-equation{line-height:1.45}
.answer-box{margin-top:12px;padding:11px 14px}
.math-answer{line-height:1.35;margin-top:3px}
.lesson-bottom{margin-top:11px;padding-top:8px}
.diagram-content{display:block;max-height:min(68dvh,620px);overflow-y:auto;overflow-x:hidden;padding:14px 19px 0}
.figure-dialog{width:min(96vw,770px);max-height:94dvh}
.diagram-wrap svg{max-height:50dvh}
.diagram-caption{padding-top:8px;font-size:12px}
.concept-note{margin:10px 0;color:#464b6e;background:#f4f1ff;border-radius:13px;padding:11px 13px;font-size:13px;line-height:1.55}
.concept-key{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 0}
.concept-key span{border-radius:15px;background:#f5f6fa;padding:5px 9px;font-size:11px;color:#605a80;font-weight:700}
.concept-adjust{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:8px 4px}
.concept-adjust label{font-size:12px;font-weight:800;color:#605788}
.concept-adjust input{flex:1;min-width:135px;accent-color:#6752c6}
.concept-adjust output{min-width:60px;color:#5544a0;font-size:19px;font-weight:800}
@media(max-width:800px){
 .app-shell{height:calc(100dvh - 75px - env(safe-area-inset-bottom))}
 .workspace{display:flex;flex-direction:column;min-height:0}
 .lesson-container{display:flex;flex-direction:column;flex:1;min-height:0;padding:5px 12px 7px;overflow:hidden;width:100%}
 .welcome{display:none}
 .status-row{flex:0 0 auto;margin:5px 0 7px;gap:3px;min-height:33px}
 .small-total{display:none}
 .crumb{max-width:100%;gap:2px}
 .crumb-link{font-size:11px;padding:4px 3px;min-height:30px}
 .lesson-card{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:11px 14px 8px;border-radius:17px;animation:none}
 .question-top{flex:0 0 auto;min-height:23px}
 .lesson-tag{font-size:9.5px;padding:4px 7px}
 .lesson-progress{font-size:10px}
 .lesson-title-row{margin-top:6px;flex:0 0 auto;align-items:center}
 .lesson-title-row h2{font-size:18px;line-height:1.18}
 .mini-topic{display:none}
 .figure-button{font-size:12px;padding:7px 10px;min-height:38px}
 .figure-button span{display:inline!important}
 .question-text{font-size:clamp(12px,3.4vw,15px);line-height:1.35;margin-top:8px;padding:9px 11px;max-height:24dvh;overflow-y:auto;flex:0 0 auto;border-radius:8px;border-left-width:3px}
 .steps-region{flex:1;min-height:0;overflow:auto;overscroll-behavior-y:contain;scrollbar-width:thin;margin:6px -4px 0;padding:0 4px 5px}
 .lesson-divider{position:sticky;top:0;background:#fff;margin:0;padding:7px 0 5px;border:0;z-index:2}
 .lesson-divider>span:first-child{font-size:9px}
 .step-count{font-size:10px}
 .steps{gap:0}
 .worked-step{padding:4px 0;grid-template-columns:25px minmax(0,1fr);gap:7px}
 .step-circle{width:24px;height:24px;font-size:11px}
 .step-reason{font-size:11.5px;line-height:1.32;margin:0 0 2px}
 .step-equation{font-size:clamp(13px,3.5vw,16px);line-height:1.35}
 .answer-box{flex:0 0 auto;margin-top:4px;padding:8px 11px;border-radius:12px}
 .answer-box>div:first-child{font-size:10.5px}
 .math-answer{font-size:clamp(16px,4.2vw,21px);line-height:1.28;margin-top:2px;max-height:10dvh;overflow:auto}
 .lesson-bottom{flex:0 0 auto;margin-top:4px;padding-top:5px}
 .kind-badge{font-size:9px}
 .mark-button{min-height:30px;padding:4px 8px;font-size:10px}
 .page-controls{flex:0 0 auto;margin:6px 0 2px;gap:7px}
 .page-button{min-height:39px;padding:6px 10px}
 .page-status{gap:2px}
 .reference-line,.bottom-extras{display:none}
 .diagram-content{padding:12px 10px 0}
 .diagram-wrap svg{max-height:43dvh}
}
@media(max-width:430px){
 .appbar{height:56px}
 .lesson-container{padding:4px 9px 5px}
 .crumb-link{font-size:10px;padding:4px 2px}
 .crumb-link span{font-size:9px}
 .lesson-card{padding:9px 10px 7px}
 .lesson-title-row h2{font-size:17px}
 .page-controls{margin:5px 0 0}
 .class-dock{height:60px}
 .app-shell{height:calc(100dvh - 68px - env(safe-area-inset-bottom))}
}
@media(max-height:670px) and (max-width:800px){
 .question-text{max-height:19dvh}
 .lesson-bottom{display:none}
 .app-shell{height:calc(100dvh - 65px - env(safe-area-inset-bottom))}
 .class-dock{height:55px}
}

@media(max-width:800px){
 .lesson-card{flex:0 1 auto;max-height:100%}
 .steps-region{flex:0 1 auto;min-height:0}
 .step-reason{color:#525c73;font-size:12.5px}
 .step-equation{color:#343665}
 .lesson-divider>span:first-child{color:#797388}
}
@media(max-height:690px) and (max-width:800px){.step-reason{font-size:11.8px}}/* Relevant inline geometry. */

#quickSteps[hidden],.inline-figure[hidden],.figure-button[hidden]{display:none!important}

.inline-figure{margin:10px 0 0;display:block;border:1px solid #e7e2f3;background:#fcfbff;border-radius:13px;padding:7px 8px 6px;flex:0 0 auto}
.inline-figure-open{border:0;background:transparent;width:100%;display:flex;align-items:center;gap:8px;color:#6b53a2;padding:0;text-align:left;cursor:pointer}
.inline-figure-visual{flex:1;min-width:0;display:flex;justify-content:center;align-items:center;overflow:hidden}
.inline-figure-visual svg{display:block;width:auto;max-width:100%;height:122px;max-height:122px}
.inline-figure-action{font-size:11px;font-weight:850;line-height:1.4;max-width:102px;flex:0 0 102px}
.inline-figure figcaption{color:#78738a;font-size:9.5px;line-height:1.3;padding:4px 6px 0}
.basics-link{font-weight:850}
@media(max-width:800px){
 .appbar{height:92px;min-height:92px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:39px 39px;row-gap:1px;column-gap:8px;align-content:center;padding:4px 13px 5px}
 .brand-mobile{grid-column:1;grid-row:1;align-self:center}
 .appbar-actions{display:contents}
 .lang-switch{grid-column:2;grid-row:1;justify-self:end}
 .browse-button{grid-column:1;grid-row:2;justify-self:start;margin:0;min-width:110px}
 .basics-link{grid-column:2;grid-row:2;justify-self:end;display:flex;gap:7px;min-height:38px;padding:8px 12px;border-radius:12px;background:#f1edff;border:1px solid #dcd1fa;color:#4d3b8c;font-size:12px}
 .basics-link span{display:inline!important}

 .steps-region{margin-top:4px}
 .inline-figure{margin-top:6px;padding:4px 6px}
 .inline-figure-visual svg{height:90px;max-height:90px}
 .inline-figure figcaption{font-size:9px;padding-top:2px}
 .inline-figure-action{font-size:10px;max-width:100px;flex-basis:100px}

 .answer-box{margin-top:5px}
}
@media(max-width:430px){
 .appbar{height:88px;min-height:88px;grid-template-rows:36px 37px;padding:4px 10px 5px}
 .brand-mobile{font-size:19px}
 .basics-link{padding:7px 8px;font-size:11px;gap:4px}
 .browse-button{min-height:35px}

 .app-shell{height:calc(100dvh - 69px - env(safe-area-inset-bottom))}
}
@media(max-width:365px){
 .brand-mobile b{font-size:18px}
 .basics-link{font-size:10px;padding:7px 6px}
 .browse-button{font-size:10px}
 .inline-figure-visual svg{height:76px;max-height:76px}
 .inline-figure-action{max-width:84px;flex-basis:84px;font-size:9px}
}
@media(min-width:801px){
.inline-figure{max-width:650px}.inline-figure-visual svg{height:160px;max-height:160px}}

/* Balance figure visibility against the steps area on smaller phones. */
@media(max-width:800px) and (min-height:741px){
 .inline-figure-visual svg{height:115px;max-height:115px}
 .inline-figure-action{max-width:86px;flex-basis:86px;font-size:10px}
 .inline-figure figcaption{font-size:9.5px}
}
@media(max-width:800px) and (max-height:740px){
 .lesson-card{padding:7px 10px 4px}
 .question-top{min-height:20px}
 .lesson-title-row{margin-top:3px}
 .question-text{font-size:12px;line-height:1.27;margin-top:4px;padding:6px 8px;max-height:16dvh}
 .inline-figure{margin-top:3px;padding:2px 5px}
 .inline-figure-visual svg{height:63px;max-height:63px}
 .inline-figure figcaption{display:none}
 .inline-figure-action{flex-basis:85px;font-size:9px}

 .lesson-bottom{display:none}
 .answer-box{padding:6px 9px;margin-top:3px}
 .answer-box>div:first-child{font-size:10px}
 .math-answer{font-size:clamp(13px,3.9vw,17px)}
 .steps-region{margin-top:2px}
 .worked-step{padding:3px 0}
 .step-reason{font-size:11px}

}

/* v1.22 — one uninterrupted quick answer, no pinned/clipped green card.
   Details are a separate, accessible full-screen reading space. */
#stepsRegion{scrollbar-width:none}
.answer-box{position:static;bottom:auto;z-index:auto;min-width:0}
.math-answer{max-height:none;overflow:visible;overflow-wrap:anywhere}
.answer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 10px;align-items:center}
.answer-part{display:flex;gap:3px;min-width:0;align-items:center;justify-content:center;text-align:center;overflow-wrap:anywhere;padding:3px 1px;line-height:1.25}
.step-equation-group{display:flex;flex-wrap:wrap;gap:5px 12px;align-items:center}
.math-part{display:inline-block;max-width:100%;overflow-wrap:anywhere}
.lesson-card .answer-box{background:#f1faf5;border-color:#cfe8d9}

@media(max-width:800px){
 /* The quick lesson is one flowing page. No competing nested vertical scrollbars. */
 .app-shell{height:calc(100dvh - 70px - env(safe-area-inset-bottom));overflow:hidden}
 .workspace{height:100%;min-height:0}
 .lesson-container{overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:thin;display:block;padding:5px 12px 12px}
 .lesson-card{display:block;height:auto;max-height:none;overflow:visible;flex:none;padding:11px 14px 12px}
 .question-text{max-height:none;overflow:visible;flex:none}
 .steps-region,#quickSteps{height:auto;max-height:none;min-height:0;overflow:visible;flex:none;margin:2px 0 0;padding:0}
 .lesson-divider{position:static;top:auto;padding:6px 0 5px;margin:0 0 3px;background:transparent}
 .worked-step{padding:5px 0;gap:8px}
 .step-reason{margin-bottom:2px;line-height:1.32}
 .step-equation{overflow:visible;overflow-wrap:anywhere;line-height:1.28}
 .answer-box{position:static;margin:9px 0 0;padding:10px 12px;border-radius:13px;max-height:none;min-height:0;overflow:visible}
 .answer-box>div:first-child{font-size:11px;line-height:1.25}
 .math-answer{margin-top:5px;font-size:clamp(15px,4vw,20px);line-height:1.25;max-height:none;overflow:visible}
 .answer-grid{gap:3px 6px}
 .answer-part{font-size:clamp(12px,3.55vw,17px);line-height:1.2}
 .lesson-bottom{padding-top:9px;margin-top:4px}
 .page-controls{margin:10px 0 8px;min-height:43px}
 .reference-line{display:none}

}
@media(max-width:430px){
 .app-shell{height:calc(100dvh - 70px - env(safe-area-inset-bottom))}
 .lesson-container{padding:3px 9px 12px}
 .lesson-card{padding:9px 11px 10px}
 .lesson-title-row{margin-top:6px}
 .question-text{margin-top:7px;padding:9px 10px;font-size:13.4px;line-height:1.37}

 .worked-step{grid-template-columns:23px minmax(0,1fr);gap:7px;padding:4px 0}
 .step-circle{width:23px;height:23px;font-size:11px}
 .step-reason{font-size:12px}
 .step-equation{font-size:clamp(12.5px,3.5vw,15px)}
 .answer-grid-many{grid-template-columns:repeat(3,minmax(0,1fr))}
 .math-answer .frac{margin:0}

}
@media(max-width:800px) and (max-height:740px){
 .app-shell{height:calc(100dvh - 65px - env(safe-area-inset-bottom))}
 .lesson-card{padding:7px 10px 10px}
 .question-text{max-height:none;overflow:visible}
 .lesson-bottom{display:flex}
 .answer-box{padding:8px 10px;margin-top:7px}
 .answer-part{font-size:12px}
 .page-controls{margin:7px 0 9px}
}
@media(min-width:801px){
 .steps-region{overflow:visible;max-height:none}
 .math-answer.answer-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
 .answer-part{font-size:18px}
}

/* v1.22 refinement: progress stays available without a tall footer. */
.question-tools{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.question-tools .mark-button{min-height:32px;padding:6px 9px;font-size:11px}
@media(max-width:800px){
 .lesson-bottom{display:none!important}
 .question-tools{gap:9px}
 .question-tools .mark-button{min-width:30px;min-height:28px;padding:3px 6px;border-radius:9px}
 .question-tools .mark-button span{display:none}
 .answer-sparkle{font-size:18px}
 .answer-grid-many .answer-part{font-size:clamp(12px,3.2vw,14px);padding:0}
 .answer-grid-many .frac{line-height:1.02}
 .answer-grid-many .frac > span:first-child{padding:0 .1em .04em}
 .answer-grid-many .frac > span:last-child{padding:.04em .1em 0}
 .answer-box{padding:8px 10px!important}
 .math-answer{margin-top:3px}
}

@media(max-width:540px){
}

/* Keep Quick Solution compact: Why? shares the explanation line rather than adding a new row. */

/* Triggle v1.24 — Visual Lesson. Media is loaded only after the student opens the player. */
.vl-launch[hidden],.vl-loading[hidden],.vl-error[hidden]{display:none!important}
.vl-launch{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0 14px}
.vl-launch-button{appearance:none;border:1px solid #b8abe5;border-radius:16px;background:#eee9ff;color:#423574;padding:12px 18px;min-height:48px;font:800 14px/1.2 system-ui,sans-serif;cursor:pointer;box-shadow:0 2px 8px #7f63c21c}
.vl-launch-button:focus-visible,.vl-close:focus-visible,.vl-tool-button:focus-visible,.vl-download:focus-visible,#vlRetry:focus-visible{outline:3px solid #825bdf;outline-offset:3px}
.vl-launch-button:hover{background:#e7dfff}
.vl-launch-note{font:600 12px/1.4 system-ui,sans-serif;color:#776c87}

.vl-inline-panel[hidden],.vl-inline-error[hidden],.vl-inline-tools [hidden]{display:none!important}
.vl-inline-panel{display:flex;flex-direction:column;align-items:center;gap:12px;flex:1 1 100%;width:100%;max-width:700px;margin:3px auto 10px;padding:16px 14px;background:#faf8ff;border:1px solid #ded4f4;border-radius:20px;box-shadow:0 5px 22px #49358a12}
.vl-inline-heading{text-align:center;max-width:100%}
.vl-inline-badge{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 12px;font:850 10px system-ui,sans-serif;letter-spacing:1.2px;background:#ece5ff;color:#554181}
.vl-inline-heading h3{margin:9px 0 5px;font:800 clamp(17px,3vw,22px)/1.3 system-ui,sans-serif;color:#2e2853}
.vl-inline-heading p{margin:0;font:600 12px system-ui,sans-serif;color:#75698a}
.vl-inline-panel video{display:block;box-sizing:border-box;width:auto;max-width:100%;height:min(64dvh,600px);max-height:600px;aspect-ratio:9/16;object-fit:contain;background:#211e42;border-radius:14px;outline:none;box-shadow:0 6px 25px #29204924}
.vl-inline-panel video:focus-visible{outline:3px solid #9471ed;outline-offset:3px}
.vl-inline-tools{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;width:100%}
.vl-inline-error{margin:0;color:#a83232;font:600 12px/1.5 system-ui,sans-serif}
@media(max-width:430px){.vl-inline-panel{padding:12px 10px;border-radius:17px}.vl-inline-panel video{height:min(57dvh,540px)}}

.vl-dialog{padding:0;border:0;border-radius:22px;background:var(--surface-page);color:var(--text-primary);box-shadow:0 25px 90px #14152d70;width:min(94vw,850px);max-width:850px;max-height:calc(100dvh - 18px);overflow:auto}
.vl-dialog::backdrop{background:rgba(25,24,50,.80);backdrop-filter:blur(5px)}
.vl-shell{display:flex;flex-direction:column;min-height:0}
.vl-header{position:sticky;top:0;z-index:4;display:flex;gap:12px;justify-content:space-between;align-items:center;background:#faf9f6ee;backdrop-filter:blur(12px);border-bottom:1px solid #e9e5f1;padding:13px clamp(14px,3vw,28px)}
.vl-heading{min-width:0}.vl-eyebrow{display:block;color:var(--text-secondary);font-weight:800;font-size:10px;letter-spacing:1.4px}
.vl-heading h2{margin:4px 0 0;font-size:clamp(18px,3.6vw,24px);line-height:1.18;font-weight:800}
.vl-close{flex-shrink:0;display:inline-flex;align-items:center;gap:5px;padding:11px 12px;border:1px solid #ded8ef;border-radius:13px;background:white;color:var(--text-navigation);font:800 12px/1 system-ui,sans-serif;min-height:44px;cursor:pointer}
.vl-body{padding:12px clamp(12px,3vw,28px) 24px;display:flex;flex-direction:column;align-items:stretch;gap:12px}
.vl-question-details{border:1px solid #e8e4ee;background:white;border-radius:13px;padding:12px 15px;color:#3b3e55}
.vl-question-details summary{font-size:13px;font-weight:750;cursor:pointer;min-height:23px}
.vl-question-details p{font-size:clamp(14px,2.9vw,17px);line-height:1.55;margin:9px 0 3px}
.vl-video-wrap{position:relative;display:flex;justify-content:center;align-items:center;min-height:180px;border-radius:16px;background:#22213b;overflow:hidden}
.vl-video-wrap video{display:block;width:100%;max-height:min(65dvh,730px);aspect-ratio:9/16;object-fit:contain;background:#201d37;outline:none}
.vl-video-wrap video[hidden],.vl-drive-frame[hidden],.vl-player-toolbar [hidden],.vl-help[hidden]{display:none!important}
.vl-drive-frame{display:block;width:min(100%,420px);height:min(66dvh,747px);min-height:320px;aspect-ratio:9/16;border:0;background:#201d37;margin:0 auto}
@media(max-width:430px){.vl-drive-frame{height:min(60dvh,620px);min-height:260px}}
.vl-loading{position:absolute;top:14px;left:14px;z-index:1;padding:9px 12px;border-radius:10px;background:#faf9f5ed;color:var(--text-explanation);font-size:12px;font-weight:750;pointer-events:none}
.vl-error{border:1px solid #edcece;border-radius:13px;background:var(--surface-incorrect);padding:12px 14px;color:var(--text-incorrect);line-height:1.55;font-size:13px}
.vl-error p{margin:5px 0 9px}.vl-error button{padding:8px 12px;border-radius:10px;border:1px solid #c9a3a3;background:white;font-weight:800;color:#8a2626}
.vl-player-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:9px}
.vl-speed-label{display:inline-flex;align-items:center;gap:8px;color:var(--text-secondary);font:700 12px system-ui,sans-serif}
.vl-speed-label select{font:750 14px system-ui,sans-serif;border:1px solid #dcd5ea;border-radius:11px;padding:10px 7px;background:white;color:var(--text-primary);min-height:42px}
.vl-tool-button,.vl-download{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:43px;border-radius:11px;border:1px solid #d6ceeb;background:white;padding:10px 11px;font:800 12px system-ui,sans-serif;color:var(--text-navigation);cursor:pointer;text-decoration:none}
.vl-download{background:#382f68;color:white;border-color:#382f68}
.vl-download[hidden]{display:none}
.vl-notice{font:650 12px/1.5 system-ui,sans-serif;color:var(--text-secondary);margin:0}
.vl-help{font:500 11px/1.5 system-ui,sans-serif;color:var(--text-explanation);margin:0}
@media(min-width:740px){.vl-dialog{width:min(88vw,830px)}.vl-video-wrap video{max-width:min(100%,480px)}.vl-video-wrap{background:#e9e7f2}.vl-player-toolbar{justify-content:center;gap:18px}}
@media(max-width:410px){.vl-header{padding:10px 12px}.vl-heading h2{font-size:17px}.vl-close{padding:9px 10px;min-height:40px}.vl-close span{max-width:90px;line-height:1.3;text-align:left}.vl-video-wrap video{max-height:min(58dvh,530px)}.vl-player-toolbar{gap:6px}.vl-download,.vl-tool-button{font-size:11px;padding:8px}.vl-launch{margin:9px 0}}
@media(prefers-reduced-motion:reduce){.vl-dialog::backdrop{backdrop-filter:none}}/* v1.26: show the extra mode only when a genuinely authored conceptual lesson exists. */

/* v1.27: A quiet availability note on shortlisted video-worthy questions only.
   No non-working video button, no blank player, and no sample video. */
.vl-launch-button[hidden],.vl-coming-soon[hidden],.vl-launch-note[hidden]{display:none!important}
.vl-coming-soon{display:flex;align-items:center;gap:9px;color:var(--text-secondary);background:var(--bond-tint);border:1px solid #e8e2f2;border-radius:12px;padding:10px 13px;font:700 12px/1.4 system-ui,sans-serif;max-width:100%}
.vl-coming-icon{color:var(--text-secondary);font-size:18px;line-height:1}

.mathml-brackets{display:inline-block;vertical-align:middle;font-size:1.4em;white-space:nowrap;margin:0 .07em}

/* Chapter-first curriculum navigation; legacy lesson presentation is retained. */
.curriculum-chapter{margin:0 0 7px;min-width:0}
.chapter-link{display:block;width:100%;text-align:left;min-height:52px;padding:11px 10px;border:1px solid #ebe7f1;border-radius:12px;background:#fff;color:#595472;line-height:1.45;overflow-wrap:anywhere}
.chapter-link strong{display:block;font-size:12px;line-height:1.5}.chapter-link small{display:block;font-size:10px;margin-top:4px;color:#817c91}.chapter-link:hover{background:#f8f5ff}.chapter-link.active{border-color:#c9bce8;background:#f3efff;color:#4b3a82}
.chapter-link:focus-visible,.chapter-question-links button:focus-visible{outline:3px solid #917be4;outline-offset:2px}
.chapter-status{display:inline-block;border:1px solid #dbd4e9;background:#f4effa;color:#6a5688;border-radius:99px;font-weight:750;font-size:12px;padding:5px 10px;line-height:1.5}
.chapter-status[data-status=published]{background:#ecf8f0;color:#216f4d;border-color:#c8e7d3}
.chapter-overview{padding:25px;border:1px solid #e5dfed;background:#fff;border-radius:20px;min-width:0;line-height:1.65;color:#5a5c72;overflow-wrap:anywhere}
.chapter-overview h2{font-size:clamp(21px,3vw,29px);color:#34304e;line-height:1.4;margin:8px 0 13px}.chapter-overview h3{font-size:17px;color:#49425e;margin:24px 0 6px}.chapter-overview p{font-size:13px}.chapter-overview .eyebrow{font-size:10px;letter-spacing:.6px}
.chapter-sections{list-style:none;margin:18px 0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.chapter-sections li{border:1px solid #eae6ef;background:#faf8fc;border-radius:10px;padding:10px 12px;font-size:12px;display:flex;justify-content:space-between;gap:8px;align-items:center}.chapter-sections small{color:#857394;font-size:10px;text-align:right}
.terminology-note{border-left:3px solid #d7b276;background:#fffaf1;border-radius:6px;padding:9px 11px;color:#85653d}.chapter-coverage-note{color:#777082}.chapter-question-links{display:grid;gap:7px}.chapter-question-links button{display:block;width:100%;min-height:44px;border:1px solid #e5ddef;border-radius:10px;background:#faf8ff;color:#5a4584;text-align:left;font-size:12px;line-height:1.5;padding:10px 12px;overflow-wrap:anywhere}
#chapterOverview[hidden],#lessonCard[hidden]{display:none!important}.chapter-overview-active .page-controls,.chapter-overview-active .reference-line{display:none!important}
@media(max-width:800px){.chapter-overview-active .lesson-container{overflow-y:auto;display:block}.chapter-overview-active .status-row{margin-bottom:9px}.chapter-overview{padding:17px;border-radius:17px}.chapter-overview h2{font-size:22px}.chapter-overview p{font-size:12px}.chapter-sections{grid-template-columns:1fr}.chapter-link{min-height:50px}}

.chapter-review{font-size:11px!important;color:#81768d}.chapter-references{margin-top:24px;padding-top:2px;border-top:1px solid #eee9f2}.chapter-reference{padding:11px 0;border-bottom:1px solid #f0edf4}.chapter-reference a{color:#645090;font-weight:750;font-size:12px}.chapter-reference p{font-size:11px;margin:5px 0;color:#82788f}
/* Keep both mobile learning routes readable at narrow widths. */
@media(max-width:430px){
 .appbar{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:36px 52px;height:102px;min-height:102px;column-gap:8px}
 .browse-button,.basics-link{width:100%;min-width:0;min-height:50px;justify-content:center;line-height:1.45;padding:6px;gap:4px}
 .browse-button [data-i18n=browse],.basics-link span{min-width:0;white-space:normal;overflow-wrap:anywhere}
 #browseChevron{display:none}
 .chapter-sections li{flex-wrap:wrap;row-gap:3px}.chapter-sections small{white-space:normal;text-align:left;overflow-wrap:normal}
}

/* Phase 2 pilot: scoped additions preserve all existing Triggle themes/layout. */
.math-group-power{display:inline-flex;vertical-align:middle;align-items:center;white-space:nowrap;gap:0;line-height:1.18;margin:0 .08em}
.math-group{display:inline-flex;align-items:center;gap:0;vertical-align:middle}
.math-group-inner{display:inline-block;line-height:1.45}
.math-bracket{font-family:inherit;font-size:1.52em;font-weight:450;line-height:1.1;display:inline-block}
.math-group-power>sup{align-self:flex-start;position:relative;top:-.25em;margin:0 .03em;font-size:.72em!important;line-height:1.15;min-width:.48em;text-align:left}

.step-equation .math-group-power,.math-answer .math-group-power{white-space:nowrap}
.p2-lab{margin:18px 0 26px;border:1px solid #d9d3e6;border-radius:18px;background:linear-gradient(175deg,#fcfbff,#fff);padding:clamp(14px,3vw,24px);color:#363b59;box-shadow:0 8px 24px #3d2e7310}
.chapter-overview .p2-lab h3{font-size:clamp(19px,3.5vw,23px);line-height:1.3;color:#3e345c;margin:4px 0 9px}
.chapter-overview .p2-lab h4{font-size:16px;line-height:1.3;color:#3e345c;margin:4px 0 8px}
.p2-kicker{color:#7362a8;font-weight:850;letter-spacing:.8px;font-size:10px}
.chapter-overview .p2-lab p{font-size:clamp(13px,2.4vw,15px);line-height:1.65}
.p2-intro{color:#575775}.p2-objective{margin-top:12px}
.p2-given{padding:10px 14px;background:#f4f1fa;border-radius:11px;color:#383653;line-height:1.95!important}
.p2-controls{margin:18px 0 7px}.p2-controls>p{margin:0 0 7px;font-weight:750}
.p2-modes,.p2-choices{display:flex;gap:8px;flex-wrap:wrap}
.p2-modes button,.p2-choices button,.p2-hint,.p2-deeper button{min-height:44px;line-height:1.25;padding:10px 13px;border-radius:11px;border:1px solid #d7d1e4;background:white;color:#534779;font-size:14px;font-family:inherit;font-weight:760;cursor:pointer}
.p2-modes button[aria-pressed=true],.p2-choices button[aria-pressed=true]{background:#eee9fa;color:#392565;border-color:#8b77bc;box-shadow:inset 0 0 0 1px #8b77bc}
.p2-modes button:focus-visible,.p2-choices button:focus-visible,.p2-hint:focus-visible,.p2-deeper button:focus-visible,.p2-lab summary:focus-visible{outline:3px solid #9074dc;outline-offset:2px}
.p2-canvas{max-width:520px;margin:12px auto;padding:8px;background:#fff;border-radius:13px;border:1px solid #ebe8f0}
.p2-canvas svg{display:block;width:100%;height:auto;max-height:250px}
.p2-result{border-radius:12px;border:1px solid #cae7dd;background:#f0faf6;padding:11px 13px;color:#276e56;font-size:clamp(15px,3vw,20px)!important;overflow-wrap:anywhere}
.p2-explain{color:#54566f;min-height:1.7em}
.p2-regions,.p2-deeper{border:1px solid #e6e2ee;border-radius:12px;background:#fff;padding:12px 14px;margin:12px 0;font-size:14px}
.p2-regions summary,.p2-deeper summary{color:#5a4687;font-weight:780;cursor:pointer;min-height:26px}
.p2-regions div{margin-top:9px;line-height:1.6;overflow-wrap:anywhere}
.p2-check{border-top:1px solid #ebe7f2;margin-top:18px;padding-top:13px}
.p2-check h4{margin-top:3px}.p2-choices button{min-width:75px}
.p2-hint{background:#f8f5ff;margin-top:12px}
.p2-feedback{font-weight:700;color:var(--text-explanation);min-height:22px}
.p2-deeper ol{padding-left:24px;margin:13px 0;display:grid;gap:12px;line-height:1.65}
.p2-deeper button{background:#62508d;color:#fff;border-color:#62508d}
.p2-deeper button[hidden]{display:none}
.p2-paper{background:#fff9ed;border:1px solid #f0dfbd;border-radius:13px;padding:10px 14px;display:flex;align-items:flex-start;gap:12px;margin-top:16px;color:#65502c}
.p2-paper>span{font-size:24px}
.p2-paper p{margin:0}
.chapter-overview .p2-free{font-size:11px!important;color:#86819a;text-align:center;margin:16px 0 0}
@media(max-width:420px){.p2-lab{padding:13px}.p2-modes button{flex:1 1 calc(50% - 8px);font-size:13px;padding:9px 6px}.p2-choices button{flex:1 1 auto}.p2-given{font-size:13px!important;padding:8px 10px}}
@media(prefers-reduced-motion:reduce){.p2-lab *{animation:none!important;transition:none!important}}

/* Phase 2, Grade 9 Set Language: scoped compact learning-path UI.
   Uses the current Triggle palette; avoids new global layouts and fonts. */
.sp2-journey{margin:20px 0 18px;border:1px solid #ddd7eb;border-radius:18px;padding:clamp(14px,3.2vw,25px);background:var(--surface-content);min-width:0;color:var(--text-explanation)}
.sp2-kicker{font-size:10px;letter-spacing:1px;font-weight:850;color:#7564ad}
.chapter-overview .sp2-journey h3{font-size:clamp(19px,3vw,23px);line-height:1.3;margin:5px 0 8px;color:var(--text-primary)}
.chapter-overview .sp2-journey h4{font-size:clamp(17px,3vw,20px);line-height:1.4;margin:10px 0;color:var(--text-primary)}
.chapter-overview .sp2-journey h5{font-size:15px;line-height:1.3;margin:0 0 7px;color:var(--text-primary)}
.chapter-overview .sp2-journey p{font-size:clamp(13px,2.5vw,15px);line-height:1.65;overflow-wrap:anywhere}
.sp2-intro{color:var(--text-explanation);max-width:65ch}
.sp2-progress{color:var(--text-secondary)!important;font-weight:780;border-left:3px solid #aa91d8;padding:3px 0 3px 11px;margin:16px 0}
.sp2-nav{display:flex;gap:8px;overflow-x:auto;scrollbar-width:thin;overscroll-behavior-x:contain;padding:4px 1px 12px;margin:12px 0 18px;max-width:100%}
.sp2-nav-button{display:flex;flex:0 0 146px;min-width:0;align-items:center;gap:7px;border:1px solid #e5deef;border-radius:12px;min-height:62px;padding:9px;background:#fff;color:#574f71;cursor:pointer;font:700 11px/1.4 system-ui,sans-serif;text-align:left}
.sp2-nav-number{display:grid;place-items:center;border-radius:8px;min-width:26px;height:27px;color:#6b5b98;background:#f0ebfb;font-size:12px}
.sp2-nav-name{flex:1;min-width:0;overflow-wrap:anywhere}
.sp2-done-mark{color:var(--text-correct);font-size:16px;min-width:12px}
.sp2-nav-button.sp2-current{background:#f1edfb;border-color:#9785c4;box-shadow:inset 0 0 0 1px #9785c4;color:#3e306b}
.sp2-nav-button.sp2-done .sp2-nav-number{background:#e5f5eb;color:var(--text-correct)}
.sp2-panel{border-top:1px solid #ece7f3;padding-top:15px;min-width:0}
.sp2-stage-reference{font-size:11px;color:var(--text-secondary);font-weight:700;line-height:1.6;overflow-wrap:anywhere}
.sp2-idea{font-weight:675;color:var(--text-explanation)}
.sp2-example{color:var(--text-explanation)}
.sp2-formula{padding:12px 14px;border:1px solid #d8d1ec;border-radius:11px;background:#f8f5ff;color:var(--text-primary);font-size:clamp(16px,3.8vw,22px);font-weight:760;line-height:1.85;overflow-x:auto;white-space:normal;overflow-wrap:anywhere;overscroll-behavior-x:contain;margin:13px 0}
.sp2-demo{background:#fbfafe;border:1px solid #ebe6f3;padding:12px;border-radius:12px;margin-top:14px;min-width:0}
.sp2-demo-title{font-weight:770;color:#69608e;margin:0 0 9px}
.sp2-demo-controls{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.sp2-demo-controls button,.sp2-answers button,.sp2-recall-actions button,.sp2-reveal{min-height:44px;border:1px solid #d8d0e8;background:#fff;color:var(--text-primary);border-radius:10px;padding:9px 12px;font-size:13px;font-weight:730;font-family:inherit;line-height:1.4;cursor:pointer}
.sp2-demo-controls button[aria-pressed=true],.sp2-answers button[aria-pressed=true]{background:#eae4fa;border-color:#8066c5;color:#3d2e70;box-shadow:inset 0 0 0 1px #8066c5}
.sp2-demo-output{margin:12px 0 0!important;min-height:25px;color:var(--text-primary);font-size:clamp(14px,3vw,17px)!important;line-height:1.7!important;display:flex;gap:6px 14px;flex-wrap:wrap}
.sp2-demo-output span{white-space:nowrap}
.sp2-range-label{font-weight:700;color:var(--text-explanation);width:100%;display:flex;align-items:center;gap:10px;justify-content:space-between}
.sp2-range-label output{color:var(--text-primary);font-size:18px}
.sp2-demo-controls input[type=range]{display:block;width:100%;min-width:0;accent-color:#625099;height:32px;touch-action:pan-y}
.sp2-recall{padding:14px 0;border-top:1px solid #eee9f3;margin-top:18px}
.sp2-recall>p{margin:7px 0 12px}
.sp2-answers{display:flex;gap:7px;flex-wrap:wrap}
.sp2-answers button{flex:1 1 200px;min-width:0;text-align:left;overflow:visible;white-space:normal;overflow-wrap:anywhere}
.sp2-answers button .triggle-math,.sp2-answers button .katex,.sp2-answers button .katex-html{max-width:100%;overflow:visible;white-space:normal}
.sp2-recall-actions{display:flex;gap:7px;flex-wrap:wrap;margin:11px 0}
.sp2-recall-actions button{background:#fbf9ff;font-size:12px;min-height:42px}
.sp2-why{background:var(--bond-tint);padding:11px 12px;border-left:3px solid var(--bond-border);border-radius:6px;font-size:13px;line-height:1.7;overflow-wrap:anywhere;color:var(--text-explanation)}
.sp2-why[hidden]{display:none}
.sp2-recall [data-feedback]{color:var(--text-explanation);font-weight:750;min-height:22px;margin:8px 0 0}
.sp2-paper,.sp2-hard{margin-top:12px;border:1px solid #ede0b9;border-radius:12px;background:#fffaf0;padding:12px 13px;color:var(--text-explanation)}
.sp2-hard{border-color:#d9d0eb;background:#faf8ff;color:var(--text-explanation)}
.sp2-paper summary,.sp2-hard summary{font-size:13px;font-weight:770;cursor:pointer;line-height:1.6;min-height:28px}
.sp2-paper p,.sp2-hard p{margin:11px 0 4px!important}
.sp2-hard ol{padding-left:22px;display:grid;gap:12px;line-height:1.7}
.sp2-reveal{background:#625092;color:#fff;border-color:#625092;margin:6px 0}
.sp2-reveal[hidden]{display:none}
.chapter-overview .sp2-private{font-size:11px;color:var(--text-secondary);text-align:center;margin:14px 0 0}
.sp2-journey button:focus-visible,.sp2-journey summary:focus-visible,.sp2-journey input:focus-visible{outline:3px solid #9470de;outline-offset:2px}
@media(max-width:420px){.sp2-journey{padding:13px;border-radius:15px}.sp2-nav-button{flex-basis:138px}.sp2-demo{padding:10px}.sp2-demo-controls button{font-size:12px;flex:1 1 auto}.sp2-answers button{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){.sp2-journey *{animation:none!important;transition:none!important}}

/* Small honest completion marker: the 41-chapter curriculum itself remains planned. */
.sp2-pilot-note{display:inline-flex;margin:4px 0 9px 8px;padding:6px 10px;border-radius:99px;font:750 11px/1.4 system-ui,sans-serif;background:#eaf5ef;border:1px solid #cbe5d5;color:#28694c}
@media(max-width:420px){.sp2-pilot-note{margin-left:0}}/* Active learning mode + optional video call-to-action (2026-11). */

.vl-launch{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:14px 0 10px;padding:13px;border:1px solid #e4dcf3;background:#faf8ff;border-radius:14px}
.vl-launch-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;background:#fff;border:1px solid #b9a9dd;border-radius:12px;color:#4a397b;box-shadow:none;text-align:center}
.vl-launch-button[aria-expanded="true"]{background:#eae3fa;border-color:#9f86d4;color:#342867}
.vl-launch-note:empty{display:none}
.vl-inline-panel{margin:0 auto 2px}
@media(max-width:430px){
.vl-launch{padding:10px}}

/* Full-viewport visual lesson: no inline expansion or second fullscreen step. */
.vl-dialog{position:fixed;inset:0;box-sizing:border-box;width:100%;max-width:none;height:100%;max-height:none;margin:0;padding:0;border-radius:0;overflow:hidden;background:#f8f6fc;box-shadow:none}
.vl-dialog[open]{display:block}
.vl-dialog .vl-shell{height:100%;min-height:0;overflow:hidden}
.vl-dialog .vl-header{position:relative;flex:0 0 auto;box-sizing:border-box;padding:calc(10px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left));background:#fff}
.vl-dialog .vl-body{box-sizing:border-box;flex:1 1 auto;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:7px;padding:8px 0 calc(7px + env(safe-area-inset-bottom))}
.vl-dialog .vl-question-details{
  display:block;box-sizing:border-box;flex:0 0 auto;min-width:0;
  margin:1px max(12px,env(safe-area-inset-right)) 2px max(12px,env(safe-area-inset-left));
  padding:10px 14px 11px;border:1px solid #d8ceeb;border-left:4px solid #8b74bd;
  border-radius:12px;background:#f2effa;color:var(--text-primary);
}
.vl-dialog .vl-question-label{
  display:block;font:800 10px/1.35 system-ui,sans-serif;letter-spacing:1.1px;
  text-transform:uppercase;color:#66518f;
}
.vl-dialog .vl-question-details p{
  margin:5px 0 0;font:700 clamp(14px,3.5vw,17px)/1.45 system-ui,sans-serif;
  color:#282340;overflow-wrap:break-word;text-wrap:pretty;
}
@media(max-width:410px){.vl-dialog .vl-question-details{padding:9px 12px 10px}}
.vl-dialog .vl-video-wrap{flex:1 1 auto;min-height:0;border-radius:0;background:#211e42}
.vl-dialog .vl-video-wrap video{width:100%;height:100%;max-width:100%;max-height:100%;aspect-ratio:auto;object-fit:contain;background:#211e42}
.vl-dialog .vl-drive-frame{width:100%;max-width:500px;height:100%;max-height:100%;min-height:0}
.vl-dialog .vl-player-toolbar{flex:0 0 auto;justify-content:center;min-height:46px;padding:0 12px}
.vl-dialog .vl-player-toolbar:has(> :only-child[hidden]){display:none}
.vl-dialog .vl-notice:empty,.vl-dialog .vl-help[hidden]{display:none!important}
.vl-dialog .vl-notice,.vl-dialog .vl-help{padding-inline:15px}
.vl-dialog .vl-close{min-width:44px;min-height:44px;border-radius:12px;background:#ffe3e9;border:2px solid #e64b68;color:#ab173d;font-size:17px;font-weight:900;box-shadow:0 2px 8px #b71e4217}
.vl-dialog .vl-close:hover{background:#ffced9}
.vl-dialog .vl-close:focus-visible{outline:3px solid #b51c48;outline-offset:2px}
.vl-dialog .vl-close span{font-size:12px;font-weight:800;color:#ab173d}
@media(min-width:740px){.vl-dialog{width:100%;max-width:none}.vl-dialog .vl-video-wrap{background:#211e42}.vl-dialog .vl-video-wrap video{max-width:100%}}
@media(max-width:410px){.vl-dialog .vl-close{min-height:44px;padding:8px 10px}.vl-dialog .vl-close span{font-size:11px}}

/* Grade 9 Real Numbers: interactive number-line and calculation mini-labs. */
.rnlab{margin:14px auto 24px;max-width:980px}
.rnlab .rnlab-visual{display:grid;place-items:center;min-height:95px;max-width:100%;overflow:hidden;margin-top:12px}
.rnlab-line{display:block;width:100%;height:auto;max-height:180px;overflow:visible}
.rnlab-choices{display:flex;flex-wrap:wrap;gap:8px}
.rnlab .rnlab-choice{flex:1 1 auto;min-height:44px;overflow-wrap:anywhere}
.rnlab-range{display:grid;gap:8px;width:100%;min-width:0}
.rnlab-range label{display:flex;justify-content:space-between;gap:12px;font-weight:750;color:#58497c;font-size:13px}
.rnlab-range output{font-variant-numeric:tabular-nums}
.rnlab-range input{width:100%;accent-color:#7951aa;min-height:34px;touch-action:pan-y}
.rnlab-big{font-size:clamp(22px,5vw,36px);font-weight:800;color:#5b347c;text-align:center;overflow-wrap:anywhere}
.rnlab-source-note{display:block;margin-top:9px;color:#777086;font-size:11px;line-height:1.5}
.rnlab-next{min-height:44px;padding:10px 16px;border:1px solid #6c54a1;border-radius:10px;background:#61518f;color:white;font-weight:700;cursor:pointer;margin-top:10px}
.rnlab [data-answers] button[aria-pressed=true]{border-color:#7457aa;background:#efeaff}
@media(max-width:420px){.rnlab .rnlab-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.rnlab .rnlab-choice{font-size:12px;padding:8px 6px}}/* Question navigation clarity, 2026-11-08: two distinct, unmistakable actions. */

/* Persistent question reference: always visible; only the learning stage scrolls. */

/* Textbook-quality math notation; native browser MathML avoids a network dependency. */
.triggle-math{display:inline-block;vertical-align:middle;font-size:1em;font-weight:normal;line-height:1.25;white-space:nowrap}
.triggle-math mi{text-transform:none;font-family:'KaTeX_Math','KaTeX_Main',Georgia,'Times New Roman',serif;font-style:italic}
.triggle-math mn{font-family:'KaTeX_Main',Georgia,'Times New Roman',serif;font-style:normal}
.frac{vertical-align:middle}
.frac>span{display:block;max-width:100%}
.rnlab .sp2-formula{line-height:2.05;overflow-x:auto;overflow-y:visible}
.rnlab .sp2-demo-output{display:block;line-height:2.1!important;overflow-x:auto;overflow-y:visible;overflow-wrap:normal}
.rnlab .sp2-demo-output .triggle-math,.rnlab .sp2-formula .triggle-math{margin-inline:.04em}
.rnlab .rnlab-choice{display:inline-flex;justify-content:center;align-items:center;gap:0;min-width:0;overflow:visible;white-space:normal;overflow-wrap:anywhere;padding-inline:12px}
.rnlab .rnlab-choice .triggle-math{display:inline-block;max-width:100%;line-height:1.65;vertical-align:middle}
.rnlab .rnlab-choice .triggle-math{font-size:1.18em}
.rnlab .sp2-example .triggle-math,.rnlab .sp2-recall .triggle-math{font-size:1.08em}
@media(max-width:420px){.rnlab .sp2-formula{padding:10px;font-size:clamp(15px,4.1vw,19px)}.rnlab .rnlab-choice{font-size:12px;padding:10px 7px}}

/* Grade 9 rationalisation: readable, vertically separated textbook steps. */
.rnlab .rnlab-rational-goal{
 margin:4px auto 8px;padding:11px 13px;width:100%;box-sizing:border-box;
 border-radius:10px;background:#f3f0fb;color:#46396d;
 font-size:clamp(13px,2.6vw,15px);line-height:1.6;font-weight:750;text-align:left;
}
.rnlab .sp2-demo-output:has(.rnlab-rational-steps){overflow:visible;white-space:normal;margin-top:8px!important}
.rnlab .rnlab-choices:has(.rnlab-rational-math) .rnlab-choice{min-height:70px;padding:12px 7px;overflow:visible}
.rnlab .rnlab-choice .rnlab-rational-math{font-size:clamp(17px,3.4vw,22px);white-space:nowrap}
.rnlab-rational-steps{list-style:none;margin:6px 0 14px;padding:0;display:grid;gap:10px;min-width:0}
.rnlab-rational-step{
 display:grid;grid-template-columns:28px minmax(0,1fr);gap:10px;align-items:start;
 margin:0;padding:12px 11px;background:white;border:1px solid #e4dfed;border-radius:12px;
}
.rnlab-rational-step .rnlab-step-number{
 display:grid;place-items:center;min-width:28px;height:28px;border-radius:50%;
 color:var(--text-secondary);background:#ede7f8;font-weight:850;font-size:13px;
}
.rnlab-step-content{min-width:0}
.rnlab-step-content strong{display:block;color:#413260;font-size:13px;font-weight:800;line-height:1.45}
.rnlab .rnlab-step-content p{font-size:12.5px!important;line-height:1.55!important;color:#676178;margin:6px 0 0!important;overflow-wrap:break-word}
.rnlab .rnlab-step-equation{
 display:block;max-width:100%;box-sizing:border-box;overflow-x:auto;overflow-y:hidden;
 padding:10px 3px 7px;color:#302748;line-height:1.6;text-align:left;
 scrollbar-width:thin;overscroll-behavior-x:contain;
}
.rnlab .rnlab-step-equation .rnlab-rational-math{
 margin:0;font-size:clamp(18px,3.6vw,25px);vertical-align:middle;
}
.rnlab-rational-result{
 display:flex;align-items:center;justify-content:space-between;gap:10px;
 flex-wrap:wrap;padding:15px;border:1px solid #cfe4d7;border-radius:12px;
 background:#f2fbf6;color:#226950;
}
.rnlab-rational-result strong{font-size:14px}
.rnlab-rational-result .rnlab-rational-math{font-size:clamp(22px,4.5vw,30px);color:#226950}
@media(max-width:420px){
 .rnlab-rational-step{gap:8px;padding:11px 9px}
 .rnlab .rnlab-step-equation .rnlab-rational-math{font-size:19px}
 .rnlab .rnlab-choices:has(.rnlab-rational-math) .rnlab-choice{min-height:72px}
}

/* Powers, signs and operands stay in one inline formula inside every button. */
.rnlab .rnlab-math-choice{display:inline-block;white-space:nowrap;line-height:1.45;max-width:100%}
.rnlab .rnlab-math-choice .triggle-math{vertical-align:baseline}

/* Calm, readable ChatGPT-style display maths for Triggle's guided solutions.
   The reusable .triggle-display-equation hook can be adopted by other lessons.
   Keep all effects scoped to the rationalisation lab for a safe rollout. */
.rnlab .sp2-demo.rnlab-chatgpt-math{
  background:#fff;border:1px solid #e8e4ee;padding:clamp(14px,3.3vw,24px);
}
.rnlab .rnlab-rational-goal{
  width:100%;margin:14px 0 0;padding:4px 1px;border-radius:0;
  background:transparent;color:var(--text-explanation);text-align:left;
  font-size:clamp(15px,3.1vw,17px);font-weight:650;line-height:1.75;
}
.rnlab .sp2-demo-output:has(.rnlab-rational-steps){
  margin:0!important;overflow:visible;white-space:normal;
  line-height:1.6!important;
}
.rnlab .rnlab-rational-steps{
  display:grid;gap:0;margin:12px 0 0;padding:0;
}
.rnlab .rnlab-rational-step{
  display:block;margin:0;padding:20px 0 24px;
  border:0;border-bottom:1px solid #eae7ef;border-radius:0;
  background:transparent;min-width:0;
}
.rnlab .rnlab-step-heading{
  display:flex;align-items:center;gap:11px;
}
.rnlab .rnlab-step-heading strong{
  color:var(--text-primary);font-size:clamp(15px,3vw,17px);font-weight:770;
  line-height:1.45;
}
.rnlab .rnlab-step-number{flex:none}
.rnlab .rnlab-step-content p{
  margin:12px 0 4px!important;
  color:#4d4758;font-size:clamp(14px,2.9vw,16px)!important;
  font-weight:430;line-height:1.75!important;overflow-wrap:break-word;
}
.rnlab .rnlab-step-equation.triggle-display-equation,
.rnlab .rnlab-rational-result .triggle-display-equation{
  display:flex;justify-content:center;align-items:center;
  width:100%;max-width:100%;min-width:0;margin:16px auto 6px;
  padding:12px 0;box-sizing:border-box;overflow:visible;
  text-align:center;background:transparent;
}
.rnlab .triggle-display-equation .rnlab-rational-math{
  display:block;max-width:100%;margin:0;
  color:#252330;font-family:math, "Cambria Math", "STIX Two Math", serif;
  font-size:clamp(23px,4.8vw,33px);font-weight:450;
  line-height:1.4;white-space:nowrap;math-style:normal;
}
.rnlab .rnlab-equation-flow{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;
  gap:10px 12px;min-width:0;max-width:100%;
}
.rnlab .rnlab-equation-flow .rnlab-equation-operator{
  display:inline-block;line-height:1.4;font-family:math,serif;
  font-size:clamp(24px,5vw,32px);font-weight:450;color:#2b2639;
}
.rnlab .rnlab-rational-result{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:0;margin:14px 0 4px;padding:20px 0 8px;border:0;border-radius:0;
  background:transparent;color:#343045;text-align:center;
}
.rnlab .rnlab-rational-result strong{
  color:var(--text-secondary);font-size:clamp(14px,3vw,16px);font-weight:750;
}
.rnlab .rnlab-rational-result .triggle-display-equation{
  margin:8px auto 0;padding:8px 0;
}
.rnlab .rnlab-rational-result .triggle-display-equation .rnlab-rational-math{
  color:#332450;font-size:clamp(27px,5.5vw,37px);
}
@media(max-width:420px){
 .rnlab .sp2-demo.rnlab-chatgpt-math{padding:13px 12px}
 .rnlab .rnlab-rational-step{padding:18px 0 21px}
 .rnlab .rnlab-step-equation.triggle-display-equation{margin:13px auto 5px;padding:11px 0}
 .rnlab .triggle-display-equation .rnlab-rational-math{font-size:23px}
 .rnlab .rnlab-equation-flow{gap:8px 10px}
}

/* ChatGPT-inspired textbook worked example: calm prose, independent parts,
 * centered display maths, and scan-friendly rationality conclusions.
 * This is intentionally scoped to authored examples (first: Grade 9 Ex. 2.12).
 */
.lesson-card.twd-lesson{--twd-ink:#2f2a40;--twd-sub:#655f73;--twd-line:#e7e3ef}
.twd-lesson .question-text.twd-question{
 background:#fff;border:0;padding:0;margin-top:16px;
 font-size:inherit;line-height:1.6;font-weight:400;white-space:normal;
 overflow:visible;max-height:none;color:var(--twd-ink);
}
.twd-question-inner{display:grid;gap:16px}
.twd-question .twd-prompt{
 font-size:clamp(16px,3.3vw,19px);font-weight:650;line-height:1.65;
 margin:0 0 2px;color:var(--twd-ink);
}
.twd-question-parts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.twd-question-part{
 display:grid;align-content:start;gap:11px;padding:15px 13px;
 background:#fbfaff;border:1px solid #e8e4f1;border-radius:14px;min-width:0;
}
.twd-part-label{
 color:#62518f;font-size:14px;font-weight:850;letter-spacing:.01em;
}
.twd-given-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;min-width:0}
.twd-display-equation{
 display:flex;justify-content:center;align-items:center;max-width:100%;
 min-width:0;box-sizing:border-box;overflow-x:auto;overflow-y:hidden;
 text-align:center;scrollbar-width:thin;overscroll-behavior-x:contain;
}
.twd-display-equation .twd-math,.twd-relations .twd-math,
.twd-final-value .twd-math{
 display:block;max-width:100%;margin:0 auto;
 color:var(--twd-ink,#2f2a40);
 font-family:math,"Cambria Math","STIX Two Math",serif;
 font-weight:450;font-size:clamp(16px,2.9vw,21px);
 line-height:1.55;white-space:nowrap;math-style:normal;
}
.twd-relations{
 display:flex;flex-wrap:wrap;gap:6px 15px;justify-content:center;align-items:center;
 padding-top:10px;border-top:1px solid #ede9f4;min-width:0;
}
.twd-relations .twd-math{font-size:clamp(15px,2.7vw,18px);margin:0;line-height:1.4}
.twd-lesson .lesson-divider{margin-top:18px;padding-top:12px}
.twd-lesson .worked-step.twd-worked-step{
 display:block;margin:0;padding:22px 1px 25px;
 border-bottom:1px solid var(--twd-line);min-width:0;
}
.twd-step-heading{display:flex;align-items:center;gap:11px;min-width:0}
.twd-step-index{
 display:grid;place-items:center;min-width:38px;min-height:38px;border-radius:12px;
 color:#654ca0;background:#f0ebfa;font-weight:850;font-size:17px;
}
.twd-step-heading h3{margin:0;color:var(--twd-ink);font-size:clamp(16px,3.2vw,19px);font-weight:800;line-height:1.45}
.twd-step-reason{
 margin:12px 0 12px;color:#565166;font-size:clamp(14px,2.7vw,16px);
 font-weight:420;line-height:1.7;
}
.twd-derivations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;min-width:0}
.twd-derivation{min-width:0;padding:14px 9px 9px;border-radius:13px;background:#fbfaff}
.twd-variable-title{display:flex;gap:8px;justify-content:space-between;align-items:center;flex-wrap:wrap}
.twd-variable-title strong{font-size:19px;color:#45366f}
.twd-kind{
 display:inline-flex;align-items:center;flex:none;line-height:1.25;font-weight:750;
 font-size:clamp(11px,2.6vw,13px);padding:5px 9px;border-radius:9px;letter-spacing:.01em;
}
.twd-kind.twd-rational{background:#e5f4ec;color:#247253}
.twd-kind.twd-irrational{background:#f0ebfa;color:#5b4790}
.twd-calculation{
 display:grid;justify-content:stretch;gap:8px;min-width:0;margin-top:13px;
}
.twd-calculation .twd-display-equation{
 padding:8px 0;min-height:49px;
}
.twd-calculation .twd-math{font-size:clamp(18px,3.4vw,23px)}
.twd-calculation .twd-calculation-result{
 border-top:1px solid #e8e4f1;padding-top:13px;
}
.twd-calculation-result .twd-math{color:#4c387d;font-weight:550;font-size:clamp(19px,3.7vw,25px)}
.twd-lesson .answer-box{background:#f5faf7!important;border:1px solid #d8e9df;margin-top:18px;padding:17px 15px}
.twd-lesson .math-answer.twd-answer{
 display:block;margin:11px 0 0;max-height:none;overflow:visible;
 font-size:inherit;line-height:1.5;overflow-wrap:normal;
}
.twd-final-list{display:grid;gap:0}
.twd-final-row{display:grid;grid-template-columns:35px minmax(0,1fr);gap:10px;padding:12px 0;border-top:1px solid #dcece3}
.twd-final-row:first-child{border-top:0;padding-top:2px}
.twd-final-part{font-size:14px;color:#337357;align-self:center}
.twd-final-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
.twd-final-value{display:grid;justify-items:center;align-content:center;gap:7px;min-width:0}
.twd-final-value .twd-math{font-size:clamp(19px,3.4vw,24px);font-weight:600;color:#226c4e}
.twd-final-value .twd-kind{font-size:11px;padding:5px 8px;white-space:normal;text-align:center}

@media(max-width:680px){
 .twd-question-parts{grid-template-columns:minmax(0,1fr)}
 .twd-question .twd-prompt{font-size:16px}
 .twd-question-part{padding:12px;gap:8px}
 .twd-derivations{grid-template-columns:minmax(0,1fr);gap:12px}
 .twd-derivation{padding:13px 10px}
 .twd-calculation .twd-math{font-size:clamp(19px,5vw,23px)}
 .twd-final-value .twd-math{font-size:clamp(18px,4.5vw,23px)}
 .twd-lesson .worked-step.twd-worked-step{padding:18px 0 22px}

}
@media(max-width:360px){
 .twd-given-grid{gap:3px}
 .twd-final-values{gap:4px}
 .twd-final-row{grid-template-columns:27px minmax(0,1fr);gap:6px}
 .twd-calculation .twd-math{font-size:19px}
 .twd-question .twd-display-equation .twd-math{font-size:17px}
}

/* Example 2.12: textbook question immediately followed by its own solution.
   No intermediate page-length list of unanswered questions. */
.twd-lesson .twd-question-inner{gap:0}
.twd-lesson .worked-step.twd-worked-step{
  padding:20px 0 28px;border-bottom:1px solid var(--twd-line);
}
.twd-question-answer-pair{display:grid;gap:0;min-width:0}
.twd-question-answer-pair>.twd-question-part{
  background:#faf9ff;border:1px solid #e7e1f0;border-radius:16px 16px 0 0;
  padding:16px 15px;min-width:0;
}
.twd-question-answer-pair>.twd-part-solution{
  min-width:0;padding:17px 15px 19px;border:1px solid #e7e1f0;
  border-top:0;border-radius:0 0 16px 16px;background:#fff;
}
.twd-question-answer-pair .twd-part-label{
  font-size:17px;line-height:1.4;font-weight:850;color:#604a92;
}
.twd-question-answer-pair .twd-step-heading h3{
  font-size:clamp(17px,3.2vw,20px);color:#342953;
}
.twd-question-answer-pair .twd-step-reason{
  margin:10px 0 13px;line-height:1.7;
}
.twd-question-answer-pair .twd-derivations{margin-top:8px}
.twd-lesson .answer-box[hidden]{display:none!important}
.twd-lesson .twd-question .twd-prompt{margin-bottom:3px}
@media(max-width:680px){
  .twd-question-answer-pair>.twd-question-part{padding:13px 11px}
  .twd-question-answer-pair>.twd-part-solution{padding:14px 11px 18px}
  .twd-lesson .worked-step.twd-worked-step{padding:13px 0 19px}
}

/* Grade 9 inclusive learning: discoverable concept navigation for shared Android phones.
 * Horizontal topic chips remain scrollable but no longer hide the only way forward. */
.sp2-journey .sp2-journey-controls{
 display:grid;grid-template-columns:minmax(0,1fr) minmax(62px,auto) minmax(0,1fr);
 gap:7px;align-items:center;min-width:0;margin:14px 0 5px;padding:8px;
 border:1px solid #dcd2ea;border-radius:13px;background:#f8f5fd
}
.sp2-journey .sp2-journey-controls button{
 display:flex;align-items:center;justify-content:center;min-width:0;min-height:46px;
 border:1px solid #b8a8d2;border-radius:10px;padding:8px 9px;
 background:#fff;color:#392952;font-size:12px;font-weight:800;
 line-height:1.4;text-align:center;overflow-wrap:anywhere;white-space:normal
}
.sp2-journey .sp2-journey-controls button:disabled{
 opacity:1;color:#686273;background:#eeeaf3;border-color:#ded7e8;cursor:default
}
.sp2-journey .sp2-journey-controls [data-journey-index]{
 font-size:12px;font-weight:850;color:#3e3056;line-height:1.4;text-align:center;white-space:normal
}
.chapter-overview .sp2-navigation-tip{
 color:#524861;font-size:12px!important;line-height:1.45!important;margin:6px 0 1px
}
.sp2-journey .sp2-nav{margin:6px 0 15px;scrollbar-width:auto;scrollbar-color:#8c78b4 #ece6f5}
.sp2-journey .sp2-nav-button{min-height:66px}
.chapter-overview .sp2-private{color:#554b68}
@media(max-width:380px){
 .sp2-journey .sp2-journey-controls{gap:4px;padding:6px;grid-template-columns:minmax(0,1fr) 65px minmax(0,1fr)}
 .sp2-journey .sp2-journey-controls button{padding:7px 5px;font-size:11px}
 .sp2-journey .sp2-journey-controls [data-journey-index]{font-size:11px}
}

/* WCAG 2.2 AA contrast: inactive bilingual switch and mobile class dock.
 * Prior audit showed #73728c on #efedf5 and #8c8ca4 on white below 4.5:1. */
.lang-switch button:not(.active){color:#514a67}
@media(max-width:800px){
 .dock-grade:not(.active){color:#4d465d}
 .dock-grade:not(.active) strong,.dock-grade:not(.active) span{color:inherit}
}

/* Grade 9: normal-flow concept question above its answer choices.
   No floating/sticky overlay or clipped question on smaller phones. */
.sp2-journey .sp2-concept-heading{margin:10px 0 14px;scroll-margin-top:14px}
.chapter-overview .sp2-concept-heading h4{margin:0 0 7px;font-size:clamp(17px,2.8vw,20px);line-height:1.45;color:#302654}
.chapter-overview .sp2-concept-question{font-size:clamp(14px,2.6vw,16px)!important;line-height:1.65!important;font-weight:650;color:var(--text-primary);margin:10px 0 14px!important;max-height:none;overflow:visible;position:static;box-shadow:none}
.sp2-question-label{display:block;margin:0 0 5px;font:800 10px/1.3 system-ui,sans-serif;letter-spacing:.8px;color:#615087}
.sp2-journey .sp2-journey-footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin:20px 0 9px;padding-top:17px;border-top:1px solid #e4daee}
.sp2-journey .sp2-journey-footer button{min-height:49px;padding:10px 15px;border:1px solid #beb1d6;border-radius:12px;background:#fff;color:#45346f;font:800 13px/1.45 system-ui,sans-serif;max-width:100%;overflow-wrap:anywhere}
.sp2-journey .sp2-journey-footer button.sp2-footer-next{background:#403171;border-color:#403171;color:#fff;margin-left:auto}
.sp2-journey .sp2-journey-footer button.sp2-footer-next.is-return{background:#275d51;border-color:#275d51}
.sp2-journey .sp2-journey-footer button:disabled{opacity:.65}
.chapter-overview .sp2-slider-guide{font-size:13px!important;line-height:1.55!important;color:var(--text-explanation);margin:8px 0 10px}
.chapter-overview .sp2-slider-formula{font-size:14px!important;font-weight:700;line-height:1.65!important;color:var(--text-primary);background:var(--bond-tint);border-radius:9px;padding:9px 11px;margin:9px 0 3px}
.sp2-journey .sp2-demo-controls:has(input[type=range]){display:block}
.sp2-journey .sp2-demo-controls input[type=range]{width:100%;min-height:44px}
.sp2-journey .sp2-demo-controls [data-venn-lab]{width:100%}
.sp2-journey .sp2-demo-controls .p2-lab{margin:12px 0}
.textbook-extras{margin:23px 0;padding-top:17px;border-top:2px solid #e7deed}
.textbook-extras h3{font-size:19px;color:#362b59;line-height:1.4;margin:4px 0 7px}
.textbook-extras>p{color:#615772;line-height:1.65;font-size:13px!important}
.textbook-extra{border:1px solid #e0d8e9;background:#fff;border-radius:12px;margin:10px 0;padding:12px 14px}
.textbook-extra summary{font-size:14px;font-weight:750;color:#362a5e;line-height:1.65;cursor:pointer;min-height:43px}
.textbook-extra .source{color:#69607a;font-size:11px;margin:7px 0}
.textbook-extra .task-question{font-size:13px;line-height:1.65;color:#343148;margin:7px 0 10px}
.textbook-extra details{border-left:3px solid #9280c0;padding:5px 0 5px 12px;margin:12px 0}
.textbook-extra details summary{color:#483479;font-weight:800}
.textbook-extra .task-answer{line-height:1.75;font-size:13px;overflow-wrap:anywhere;color:#343148}
.textbook-extra .task-answer p{margin:6px 0}
@media(max-width:800px){
 .sp2-journey .sp2-journey-footer button{font-size:12px}
}
@media(max-width:400px){
 .sp2-journey .sp2-journey-footer{gap:6px}
 .sp2-journey .sp2-journey-footer button{padding:9px 10px}
}

/* Touch and keyboard alternatives for the common-member slider; scoped to lesson 7. */
.sp2-journey .sp2-slider-touch{display:grid;grid-template-columns:46px minmax(0,1fr) 46px;gap:8px;align-items:center;min-width:0}
.sp2-journey .sp2-slider-touch button{min-width:46px;min-height:48px;padding:6px;font-size:23px;font-weight:800;border-color:#8170b3;background:#f8f5ff}
.sp2-journey .sp2-slider-touch button:disabled{opacity:.48;cursor:not-allowed}
.sp2-journey .sp2-slider-touch input[type=range]{width:100%;min-width:0;min-height:48px}
@media(max-width:380px){.sp2-journey .sp2-slider-touch{grid-template-columns:43px minmax(0,1fr) 43px;gap:5px}
.sp2-journey .sp2-slider-touch button{min-width:43px}}

/* Source-checked original Set Language Venn diagrams. Numbers and labels remain
   legible at 320px; captions and textual regions do not rely on color alone. */
.g9-venn-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:13px;align-items:start;width:100%}
.g9-venn-figure{margin:0;min-width:0;border:1px solid #e4ddeb;border-radius:13px;padding:10px;background:#fff}
.g9-venn-figure figcaption{font-size:16px;font-weight:800;color:#413469;text-align:center;margin:2px 0 6px}
.g9-venn-svg{display:block;width:100%;height:auto;max-width:610px;margin:0 auto;aspect-ratio:560/420}
.g9-venn-text-alternative{font-size:13px;line-height:1.65;color:#463d62;border-left:3px solid #9885c3;padding:9px 11px;margin:12px 0;overflow-wrap:anywhere}
.inline-figure .g9-venn-gallery{grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr))}
.figure-dialog .g9-venn-gallery{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr))}
@media(max-width:400px){.g9-venn-figure{padding:5px}.g9-venn-text-alternative{font-size:12px}}

/* A clear, non-floating route from any question to the current class chapter grid. */
.all-chapters-return{display:flex;justify-content:center;margin:13px 0 4px}
.all-chapters-return[hidden]{display:none!important}
.all-chapters-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:min(100%,420px);min-height:50px;padding:12px 16px;border:1.5px solid #b6a6db;border-radius:14px;background:#f3effd;color:#3d356e;font:inherit;font-size:14px;font-weight:850;line-height:1.4;text-align:center;cursor:pointer;box-shadow:0 3px 12px rgba(49,36,100,.06)}
.all-chapters-button span:first-child{font-size:20px;line-height:1}
.all-chapters-button:hover{background:#eae3fb}
.all-chapters-button:focus-visible{outline:3px solid #705bc6;outline-offset:3px}
@media(max-width:800px){.all-chapters-button{width:100%;min-height:52px;font-size:13px}}

/* Textbook reader v2: legible three-level location and a true non-overlapping
   bottom dock (flex sibling of the scroll region). EN/TA and keyboard accessible. */
.page-controls[hidden]{display:none!important}
.page-controls .page-status{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
.page-controls{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) minmax(0,1fr);position:relative}
.page-controls .all-chapters-return{display:flex;margin:0;min-width:0}
.page-controls .all-chapters-button{width:100%;max-width:none;min-width:0;min-height:52px;padding:10px 8px;box-shadow:none;font-size:13px}
.page-controls .page-button{display:flex;justify-content:center;align-items:center;gap:5px;min-width:0;white-space:normal;line-height:1.3}
.page-controls button:focus-visible{outline:3px solid #7252bc;outline-offset:2px}
body.textbook-reader .status-row{margin:11px 0 15px;align-items:flex-start;min-height:0}
body.textbook-reader .crumb{display:flex;flex-wrap:wrap;gap:6px;max-width:100%;white-space:normal;overflow:visible}
body.textbook-reader .crumb-link{display:inline-flex;align-items:center;gap:6px;min-height:46px;padding:9px 10px;font-size:clamp(16px,2vw,19px);font-weight:850;line-height:1.35;color:#382b60;background:#f6f1fd;border:1px solid #e0d6f1;border-radius:12px;text-align:left}
body.textbook-reader .crumb-link span{font-size:12px;color:#6d5793}
body.textbook-reader .crumb-sep{align-self:center;font-size:20px;color:#675580;padding:0 2px}
body.textbook-reader .crumb-link:last-child{background:#ebe3fa;border-color:#c9b8e6;color:#302252}
body.textbook-reader .page-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.32fr) minmax(0,1fr);width:100%;margin:0!important;gap:8px;min-height:0;padding:11px max(16px,env(safe-area-inset-left)) calc(11px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-right));background:#fff;border:1px solid #e2dceb;border-radius:0;box-shadow:none;backdrop-filter:none;z-index:4}
body.textbook-reader .page-button,body.textbook-reader .all-chapters-button{min-height:54px;border-radius:12px;font-size:14px;padding:9px 8px}
body.textbook-reader .all-chapters-button{background:#f3edfd;color:#3d3067;border-color:#c9b8e6}
body.textbook-reader .page-button.next{background:#37305e;color:#fff}
body.textbook-reader .page-controls button:disabled{opacity:.47;cursor:not-allowed}
@media(max-width:800px){
 body.textbook-reader{overflow:hidden}
 body.textbook-reader .app-shell{height:100dvh!important;min-height:0!important;overflow:hidden!important}
 body.textbook-reader .workspace{display:flex!important;flex-direction:column!important;min-height:0!important;height:100%!important;overflow:hidden!important}
 body.textbook-reader .appbar{flex:0 0 auto;position:relative!important;top:auto;transform:none!important;visibility:visible!important;opacity:1!important}
 body.textbook-reader .lesson-container{display:block!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;padding:10px 12px 18px!important;overscroll-behavior-y:contain;scrollbar-width:thin}
 body.textbook-reader .lesson-card{display:block!important;flex:none!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
 body.textbook-reader .question-text,body.textbook-reader .steps-region,body.textbook-reader .steps{max-height:none!important;overflow:visible!important}
 body.textbook-reader .status-row{margin:9px 0 14px}
 body.textbook-reader .crumb-link{font-size:clamp(16px,4.4vw,18px);min-height:44px;padding:8px 9px}
 body.textbook-reader .page-controls{position:relative!important;inset:auto!important;flex:0 0 auto!important;width:100%!important;max-width:none!important;min-height:0!important;grid-template-columns:minmax(0,1fr) minmax(0,1.32fr) minmax(0,1fr);gap:5px;padding:9px 8px calc(9px + env(safe-area-inset-bottom))!important;border-top:2px solid #cfc1e6;border-left:0;border-right:0;border-bottom:0;border-radius:0}
 body.textbook-reader .page-button,body.textbook-reader .all-chapters-button{min-height:62px;font-size:12px;padding:8px 5px;line-height:1.35}
 body.textbook-reader .all-chapters-button{font-size:12px;font-weight:850}
 body.textbook-reader .class-dock,body.textbook-reader #focusNavToggle{display:none!important}
 body.textbook-reader .reference-line,body.textbook-reader .bottom-extras{display:block}
}
@media(max-width:350px){
 body.textbook-reader .crumb-link{font-size:16px}
 body.textbook-reader .page-button,body.textbook-reader .all-chapters-button{font-size:11.5px;padding:8px 3px}
}
@media(prefers-reduced-motion:reduce){
 body.textbook-reader .page-controls,body.textbook-reader .crumb-link{transition:none!important;animation:none!important}
}

/* Unified navigation v3: shared text scale and one non-overlapping reader layout.
   Navigation occupies its own flex row; answer content always scrolls above it. */
:root{--triggle-nav-font-size:16px;--triggle-nav-weight:700}
.page-controls .page-button,
.page-controls .all-chapters-button{
  box-sizing:border-box;
  font-family:inherit;
  font-size:var(--triggle-nav-font-size);
  font-weight:var(--triggle-nav-weight);
  line-height:1.35;
  min-height:52px;
  white-space:normal;
  word-break:normal;
  hyphens:none;
}
.page-controls .all-chapters-button .nav-arrow{
  flex:0 0 auto;
  font-size:var(--triggle-nav-font-size);
  font-weight:var(--triggle-nav-weight);
  line-height:1;
}
body.textbook-reader .page-controls .page-button,
body.textbook-reader .page-controls .all-chapters-button{
  font-size:var(--triggle-nav-font-size);
  font-weight:var(--triggle-nav-weight);
  min-height:52px;
  padding:11px 12px;
  line-height:1.35;
}
body.textbook-reader .all-chapters-button{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
}
@media(max-width:800px){
  body.textbook-reader .page-controls{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-areas:"chapters chapters" "previous next";
    column-gap:10px;
    row-gap:8px;
    padding:11px max(14px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))!important;
  }
  body.textbook-reader .page-controls #previous{grid-area:previous}
  body.textbook-reader .page-controls #allChaptersReturn{
    grid-area:chapters;
    width:100%;
    margin:0;
  }
  body.textbook-reader .page-controls #next{grid-area:next}
  body.textbook-reader .page-controls .page-button,
  body.textbook-reader .page-controls .all-chapters-button{
    font-size:var(--triggle-nav-font-size);
    min-height:52px;
    padding:11px 9px;
  }
  body.textbook-reader .page-controls .all-chapters-button{min-height:50px}
  body.textbook-reader .lesson-container{scroll-padding-bottom:20px}
}
@media(max-width:350px){
  body.textbook-reader .page-controls{column-gap:8px}
  body.textbook-reader .page-controls .page-button,
  body.textbook-reader .page-controls .all-chapters-button{
    font-size:var(--triggle-nav-font-size);
    padding:10px 7px;
  }
}

/* Chapter hub v4: the class breadcrumb is the only context switcher.
   No floating grade-switcher may cover chapter section cards. */
.chapter-overview-active .crumb-link{
  min-height:44px;
  padding:8px 11px;
  border:1px solid #e3ddef;
  border-radius:11px;
  background:#f8f6fc;
  color:#4a3c6e;
  font-size:14px;
}
.chapter-overview-active .status-row{margin:7px 0 10px;min-height:0}
@media(max-width:800px){
  body.chapter-overview-active .class-dock{display:none!important}
  body.chapter-overview-active .app-shell{height:100dvh!important;min-height:0!important}
  body.chapter-overview-active .workspace{height:100%!important;min-height:0}
  body.chapter-overview-active .lesson-container{
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding-bottom:calc(30px + env(safe-area-inset-bottom))!important;
    scroll-padding-bottom:22px;
  }
  body.chapter-overview-active .crumb-link{min-height:44px;font-size:14px;padding:8px 11px}
}

/* Home already has four class cards; directories have a class selector in the title.
   The floating Class 9–12 dock is redundant and must never hide chapter cards. */
@media(max-width:800px){
  body.discovery-active .class-dock{display:none!important}
  body.discovery-active .app-shell{height:100dvh!important;min-height:0!important}
  body.discovery-active .workspace{height:100%!important;min-height:0!important}
  body.discovery-active .lesson-container{
    overflow-y:auto!important;overflow-x:hidden!important;
    padding-bottom:calc(25px + env(safe-area-inset-bottom))!important;
    scroll-padding-bottom:20px;
  }
}

/* Compact mathematical complexity, always labelled in text. */
.difficulty-indicator{display:inline-flex;align-items:center;margin-top:6px;padding:2px 7px;border:1px solid #d8d3df;border-radius:6px;color:#3f3550;background:#f7f5fa;font:600 .75rem/1.5 system-ui,sans-serif;white-space:nowrap}
.difficulty-indicator[hidden],.solution-review[hidden]{display:none}
.solution-review{display:block;margin-top:5px;font:500 .75rem/1.5 system-ui,sans-serif;color:#644b20}

/* Grade 9 Chapter 2: one compact conceptual beat at a time; no extra pages or modes. */
.rnlab .rnlab-foundation{min-width:0;margin:15px 0 16px;padding:14px;border:1px solid #e6e2ef;border-radius:17px;background:#fcfbff}
.rnlab .rnlab-foundation-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,120px),1fr));gap:7px;margin-bottom:10px}
.rnlab .rnlab-foundation-tabs button{display:flex;align-items:center;gap:7px;padding:8px 9px;min-height:44px;border:1px solid #e4dfeb;border-radius:11px;background:#fff;color:#504d6a;text-align:left;font-size:12px;font-weight:720;line-height:1.35}
.rnlab .rnlab-foundation-tabs button[aria-pressed="true"]{background:#efecfa;border-color:#9384cc;color:#3d3179}
.rnlab .rnlab-foundation-num{flex:none;display:grid;place-items:center;border:1px solid currentColor;border-radius:50%;width:23px;height:23px;font-size:11px}
.rnlab .rnlab-foundation-current{min-width:0}
.rnlab .rnlab-foundation-current p{margin:3px 0 9px;font-size:clamp(13px,2.7vw,15px);line-height:1.65;color:var(--text-explanation)}
.rnlab .rnlab-foundation-equation{max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;padding:11px 7px;border-radius:11px;background:#fff;text-align:center;font-size:clamp(17px,3.2vw,22px);scrollbar-width:thin;overscroll-behavior-x:contain}
.rnlab .rnlab-foundation-equation .katex-display{margin:0;min-width:max-content}
.rnlab .rnlab-foundation-equation math{font-size:1em}
.rnlab .rnlab-pitfall{margin:11px 0 0;padding:11px 13px;border:1px solid #eee7dc;border-radius:12px;background:#fffefa;color:var(--text-explanation)}
.rnlab .rnlab-pitfall summary{cursor:pointer;font-weight:750;font-size:12px;min-height:22px}
.rnlab .rnlab-pitfall p{font-size:13px;line-height:1.6;margin:9px 0 0}
@media(max-width:390px){.rnlab .rnlab-foundation{padding:10px}.rnlab .rnlab-foundation-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.rnlab .rnlab-foundation-tabs button{font-size:11px;padding:8px 7px}.rnlab .rnlab-foundation-equation{font-size:18px}}
@media(prefers-reduced-motion:reduce){.rnlab .rnlab-foundation *{scroll-behavior:auto}}

/* One-line return route before the current exercise identifier. */
.question-exercise-path{display:flex;align-items:center;gap:7px;min-width:0;flex-wrap:wrap}
.exercise-index-link{min-height:40px;padding:7px 9px;border:1px solid #d6cae8;border-radius:10px;background:#f9f6ff;color:#49346b;font-size:13px;font-weight:780;cursor:pointer;white-space:nowrap}
.exercise-index-link[hidden]{display:none!important}
.exercise-index-link:focus-visible{outline:3px solid #7c64af;outline-offset:2px}
@media(max-width:430px){body.textbook-reader .question-exercise-path{gap:5px}body.textbook-reader .exercise-index-link{font-size:12px;min-height:38px;padding:6px 8px}body.textbook-reader .question-top{align-items:flex-start}body.textbook-reader .lesson-progress{padding-top:8px}}

/* Reuse the reader’s navigation buttons in the Geometry question header. */
.question-top-nav:not([hidden]){display:flex;flex:none;gap:5px}
body.textbook-reader .question-top-nav .page-button{min-width:44px;min-height:44px;padding:6px;font-size:18px}
.question-top-nav .page-button:disabled{opacity:.45;cursor:default}
.lesson-card:has(.question-top-nav:not([hidden])) .figure-button{min-width:44px;min-height:44px}
.lesson-card:has(.question-top-nav:not([hidden])) .inline-figure-open{flex-direction:column;align-items:center}
.lesson-card:has(.question-top-nav:not([hidden])) .inline-figure-visual{width:min(100%,320px)}
.lesson-card:has(.question-top-nav:not([hidden])) .inline-figure-action{flex:none;max-width:none}
.triggle-table-wrap{margin:12px 0;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #dfd7c8;border-radius:12px;background:#fffdfa}
.triggle-data-table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.35;text-align:center;color:var(--text-primary)}
.triggle-data-table th,.triggle-data-table td{padding:9px 8px;border-bottom:1px solid #ece5d8;border-right:1px solid #ece5d8;word-break:normal;overflow-wrap:normal}
.triggle-data-table th:last-child,.triggle-data-table td:last-child{border-right:0}
.triggle-data-table tr:last-child th,.triggle-data-table tr:last-child td{border-bottom:0}
.triggle-data-table thead th{background:#f5f0ff;color:#3c2a69;font-weight:750}
.triggle-data-table tbody th[scope="row"]{text-align:left;font-weight:700;background:#faf7f0;color:var(--text-primary)}
.triggle-data-table tbody td{white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:430px){.triggle-data-table{font-size:12px}.triggle-data-table th,.triggle-data-table td{padding:7px 5px}}

/* Mensuration Q10: preserve legible radius and slant labels on narrow phones.
   The full-width, vertical enlarge action avoids the 160px thumbnail squeeze. */
@media (max-width:420px){
  .inline-figure:has(#inlineFigureVisual img[src*="/ex7-1-q10"]) .inline-figure-open{
    flex-direction:column;align-items:stretch;gap:5px;
  }
  .inline-figure:has(#inlineFigureVisual img[src*="/ex7-1-q10"]) .inline-figure-visual{
    width:100%;flex:none;min-width:0;max-width:100%;overflow:visible;
  }
  .inline-figure:has(#inlineFigureVisual img[src*="/ex7-1-q10"]) .inline-figure-visual img{
    width:min(100%,330px)!important;height:auto!important;max-height:215px!important;
    object-fit:contain;margin-inline:auto;
  }
  .inline-figure:has(#inlineFigureVisual img[src*="/ex7-1-q10"]) .inline-figure-action{
    flex:none;max-width:100%;width:100%;text-align:center;font-size:11px;
  }
}
.triggle-mcq-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-top:12px}
.triggle-mcq-btn{min-height:44px;padding:10px 12px;border:1px solid var(--control-border);border-radius:10px;background:#faf8f4;color:var(--text-primary);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s,background-color .15s}
.triggle-mcq-btn:hover,.triggle-mcq-btn:focus-visible{border-color:#264653;background:#f0f4f8;outline:2px solid #264653;outline-offset:1px}
.triggle-mcq-btn.is-correct{border-color:var(--text-correct);background:var(--surface-correct);color:var(--text-correct);font-weight:600}
.triggle-mcq-btn.is-wrong{border-color:var(--text-incorrect);background:var(--surface-incorrect);color:var(--text-incorrect)}
.triggle-mcq-feedback{margin:8px 0 0;font-size:0.92rem;font-weight:600}
.triggle-mcq-feedback.is-correct{color:var(--text-correct)}
.triggle-mcq-feedback.is-wrong{color:var(--text-incorrect)}

/* Triggle Home + direct chapter navigation, 2026.
   Scoped styling, no third-party fonts/frameworks. Preserve original app colors. */
.discovery-view[hidden],.chapter-fastnav[hidden]{display:none!important}
.discovery-active .welcome,
.discovery-active .status-row,
.discovery-active .page-controls,
.discovery-active .reference-line,
.discovery-active .bottom-extras>a{display:none!important}
.discovery-active .lesson-container{max-width:1100px;padding-top:clamp(15px,2.5vw,30px)}
.discovery-view{display:block;min-width:0}
.discovery-view:focus{outline:0}
.discover-hero{position:relative;overflow:hidden;display:flex;align-items:center;min-height:284px;padding:clamp(22px,4.7vw,43px);background:linear-gradient(125deg,#302b57 0%,#4c427e 62%,#6252a2 100%);border-radius:28px;color:#fff;box-shadow:0 13px 38px #3d305c21}
.discover-hero:after{content:'';position:absolute;width:260px;height:260px;border-radius:50%;right:-125px;top:-165px;background:#ffffff0d;box-shadow:0 0 0 28px #ffffff08,0 0 0 56px #ffffff05}
.discover-hero-copy{position:relative;z-index:1;min-width:0;flex:1}
.discover-eyebrow{letter-spacing:1.6px;font-size:10px;font-weight:850;color:#a192c7;text-transform:uppercase;display:block}
.discover-hero .discover-eyebrow{color:#e6d9aa;margin:0 0 12px}
.discover-hero h1{font-size:clamp(30px,5vw,52px);letter-spacing:-1.9px;line-height:1.13;font-weight:850;margin:0 0 16px;max-width:650px}
.discover-hero .discover-description{font-size:clamp(13.5px,1.5vw,16px);line-height:1.65;color:#e8e3f7;max-width:520px;margin:0}
.discover-art{width:205px;max-width:30%;flex:none;display:flex;align-items:center;justify-content:center;position:relative;z-index:1}
.discover-art svg{display:block;width:100%;height:auto}
.discover-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:26px}
.discover-actions button,.discover-feature button{border:0;border-radius:12px;padding:12px 17px;min-height:47px;font-size:13px;font-weight:840;line-height:1.35;cursor:pointer}
.discover-primary{background:#f2c87d;color:#352950;box-shadow:0 4px 12px #21183e27}
.discover-secondary{background:#ffffff1a;color:#fff;border:1px solid #ffffff54!important}
.discover-actions button:hover{filter:brightness(1.06)}
.discover-access{margin:12px 0 24px;padding:0 3px;font-size:11px;color:var(--text-secondary);line-height:1.6}
.discover-access span{font-size:16px;color:#4c8a70;vertical-align:middle}
.discover-section{margin:25px 0 32px}
.discover-section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.discover-section h2,.discover-feature h2{font-size:clamp(19px,2.8vw,24px);line-height:1.3;color:var(--text-primary);letter-spacing:-.55px;margin:0 0 12px;font-weight:810}
.discover-section-heading h2{margin:0}
.discover-grade-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.discover-grade{position:relative;text-align:left;display:flex;flex-direction:column;gap:7px;min-width:0;min-height:146px;padding:18px 16px;border:1px solid #e5e1ec;border-radius:20px;background:#fff;color:#403857;box-shadow:0 6px 19px #352c5b0b;transition:box-shadow .18s,border-color .18s,transform .18s}
.discover-grade:hover{transform:translateY(-3px);box-shadow:0 11px 24px #3d315a1a;border-color:#aaa0cf}
.discover-grade-number{width:51px;height:51px;display:grid;place-items:center;border-radius:16px;background:#f1edff;color:#62549c;font-size:28px;font-weight:890;line-height:1}
.discover-grade-10 .discover-grade-number{background:#eaf4ff;color:#407baf}
.discover-grade-11 .discover-grade-number{background:#eaf8f3;color:#327d67}
.discover-grade-12 .discover-grade-number{background:#fff2e6;color:#a67a4c}
.discover-grade-copy{display:flex;flex-direction:column;gap:3px}
.discover-grade-copy b{font-size:15px;line-height:1.3}
.discover-grade-copy small{color:var(--text-secondary);font-size:11px;line-height:1.4}
.discover-grade-arrow{position:absolute;right:16px;top:16px;color:#9b91ba;font-size:20px}
.discover-find{background:#fff;padding:22px;border:1px solid #e8e5ed;border-radius:20px;box-shadow:var(--shadow)}
.discover-find h2{margin-bottom:17px}
.discover-find label{display:block;color:var(--text-secondary);font-size:12px;font-weight:760;margin-bottom:7px}
.discover-find input,.discover-find select{width:100%;max-width:100%;min-height:48px;box-sizing:border-box;border:1px solid #d8d3e5;background:#faf9fe;color:var(--text-primary);border-radius:12px;padding:11px 14px;font-size:14px;font-family:inherit;outline-offset:3px}
.discover-find input:focus,.discover-find select:focus{border-color:#8168bb;box-shadow:0 0 0 3px #8974c31c;outline:0}
.discover-find input{margin-bottom:18px}
.discover-find select{appearance:auto;background-color:#faf9fe}
.discover-results{margin:-11px 0 20px;display:grid;gap:5px;max-height:310px;overflow-y:auto;border-radius:13px;border:1px solid #e8e4ef;padding:7px;background:#fff}
.discover-results[hidden]{display:none!important}
.discover-results .discover-chapter{min-height:54px;padding:9px 12px;border-radius:9px}
.discover-results .discover-chapter-meta{display:none}
.discover-results .discover-chapter-number{font-size:10px}
.discover-results .discover-chapter strong{font-size:13px}
.discover-empty{color:var(--text-secondary);font-size:13px;padding:8px}
.discover-feature{display:flex;align-items:center;gap:17px;padding:19px 20px;border:1px solid #d4e9dc;background:linear-gradient(110deg,#f2fbf5,#fffdfa);border-radius:19px}
.discover-feature-icon{display:grid;place-items:center;flex:none;width:70px;height:70px;border-radius:22px;background:#dbf2e4;color:#378b65;font-size:37px;font-weight:780}
.discover-feature>div{flex:1;min-width:0}
.discover-feature-tag{color:#438668;font-size:10px;font-weight:850;letter-spacing:.5px;text-transform:uppercase}
.discover-feature h2{font-size:18px;margin:4px 0 5px}
.discover-feature p{color:var(--text-explanation);font-size:12px;line-height:1.55;margin:0}
.discover-feature button{background:#3f8466;color:#fff;flex:none;max-width:190px}
.discover-method-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.discover-method-grid>div{min-width:0;padding:17px 16px;background:#fff;border:1px solid #e6e3ec;border-radius:17px}
.discover-method-grid span{font-size:11px;color:#9583bb;font-weight:870}
.discover-method-grid h3{font-size:15px;color:var(--text-primary);margin:8px 0 6px}
.discover-method-grid p{font-size:12px;color:var(--text-explanation);line-height:1.55;margin:0}
.discover-directory-head{background:linear-gradient(110deg,#f1edff,#fbfaff);border:1px solid #e4dcf6;border-radius:23px;padding:clamp(18px,3.7vw,30px)}
.discover-back,.discover-change{border:0;background:transparent;color:var(--text-navigation);padding:7px 2px;min-height:40px;font-size:12px;font-weight:810}
.discover-back{display:block;margin-bottom:11px}
.discover-directory-head h1{font-size:clamp(30px,5vw,44px);color:var(--text-primary);letter-spacing:-1.5px;margin:5px 0}
.discover-directory-head>p{color:var(--text-explanation);font-size:14px;line-height:1.6;max-width:620px;margin:8px 0}
.discover-directory-summary{display:flex;gap:7px;flex-wrap:wrap;margin-top:15px}
.discover-directory-summary span{padding:7px 11px;border:1px solid #e1d9ed;background:#fff;color:var(--text-secondary);border-radius:99px;font-size:11px;font-weight:720}
.discover-filter-status{font-size:11px;color:var(--text-secondary);margin:-11px 0 12px;min-height:0}
.discover-chapter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.discover-chapter{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0;min-height:120px;width:100%;padding:16px 39px 15px 16px;text-align:left;border:1px solid #e7e2ee;background:#fff;border-radius:15px;color:#3d3858;box-shadow:0 3px 14px #3b34580b}
.discover-chapter:hover{border-color:#b9a6df;background:#fcfaff}
.discover-chapter[hidden]{display:none}
.discover-chapter-number{color:var(--text-secondary);font-size:11px;font-weight:820}
.discover-chapter strong{font-size:15px;line-height:1.45;overflow-wrap:anywhere}
.discover-chapter-meta{font-size:11px;font-weight:650;color:var(--text-secondary);line-height:1.5}
.discover-chapter-meta.is-ready{color:var(--text-secondary)}
.discover-card-arrow{position:absolute;right:15px;top:13px;color:#a79abb;font-size:17px}
.discover-tip{color:var(--text-secondary);font-size:12px;margin:20px 0;line-height:1.6}
.home-link[aria-current=page]{background:#ece7ff;border-color:#bfb2e9;color:var(--text-navigation)}
.home-link .home-icon{font-size:20px;line-height:1;font-weight:800}
.chapter-fastnav{background:#f8f6fd;border:1px solid #e7e2f0;border-radius:13px;padding:12px 14px;margin:18px 0;color:var(--text-explanation)}
.chapter-fastnav label{font-size:12px;font-weight:810;display:block;margin-bottom:7px}
.chapter-fastnav select{width:100%;min-height:47px;padding:9px 12px;border-radius:10px;background:#fff;border:1px solid #cfc4e5;color:var(--text-primary);font-size:13px}
.chapter-fastnav small{color:var(--text-secondary);font-size:11px;line-height:1.5;display:block;margin-top:7px}
.chapter-fastnav select:focus-visible{outline:3px solid #9078d1;outline-offset:2px}
.chapter-overview [data-nav],.chapter-question-links,.chapter-references{scroll-margin-top:110px}
@media(min-width:801px){.discovery-active .lesson-container{max-width:1080px}.discovery-view{min-height:410px}}
@media(max-width:800px){
 .discovery-active .lesson-container{padding:15px 14px 34px}
 .discover-hero{min-height:240px;border-radius:23px}
 .discover-art{max-width:27%}
 .discover-grade-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .discover-grade{min-height:128px}
 .discover-method-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .discover-feature{flex-wrap:wrap}
 .discover-feature button{max-width:none}
}
@media(max-width:430px){
 .discovery-active .lesson-container{padding:11px 11px 34px}
 .discover-hero{min-height:238px;border-radius:21px;padding:22px 20px}
 .discover-hero h1{font-size:32px;line-height:1.15;letter-spacing:-1.15px}
 .discover-hero .discover-description{font-size:13.5px}
 .discover-art{position:absolute;right:-22px;bottom:-26px;opacity:.32;max-width:none;width:130px;pointer-events:none}
 .discover-actions{margin-top:20px;flex-direction:column;align-items:flex-start;gap:8px}
 .discover-actions button{min-height:46px;font-size:12px;padding:10px 14px}
 .discover-grade-grid{gap:9px}
 .discover-grade{border-radius:16px;padding:13px;min-height:117px}
 .discover-grade-number{width:40px;height:40px;font-size:24px;border-radius:13px}
 .discover-grade-copy b{font-size:14px}
 .discover-grade-copy small{font-size:10px}
 .discover-find{padding:17px 15px;border-radius:17px}
 .discover-chapter-grid{grid-template-columns:1fr}
 .discover-chapter{min-height:95px;padding:13px 38px 12px 14px}
 .discover-feature{gap:10px;padding:15px}
 .discover-feature-icon{width:52px;height:52px;font-size:28px;border-radius:15px}
 .discover-feature h2{font-size:16px}
 .discover-feature button{width:100%}
 .discover-method-grid{grid-template-columns:1fr;gap:8px}
 .discover-method-grid>div{padding:12px 14px}
 .discover-method-grid h3{margin:2px 0 4px}
 .discover-method-grid p{font-size:11.5px}
 .discover-directory-head{padding:20px 17px}
 .discover-directory-summary span{font-size:10px}
}
@media(max-width:355px){
 .discover-hero h1{font-size:29px}
 .discover-hero{padding:20px 17px}
 .discover-hero .discover-description{font-size:12.5px}
 .discover-actions button{font-size:11px}
 .discover-hero .discover-eyebrow{font-size:9px}
}
@media(prefers-reduced-motion:reduce){.discover-grade{transition:none!important;transform:none!important}}

/* Chapter-first class directory v1: one compact header and immediate Chapter 1.
   No oversized welcome panel, duplicate "all chapters" heading or intro badges. */
.discover-class-header{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
  gap:7px 13px;margin:0 0 14px;padding:1px 0 0;
}
.discover-class-header h1{
  margin:0;min-width:0;
  font-size:clamp(22px,3.3vw,29px);font-weight:850;
  line-height:1.25;letter-spacing:-.7px;
}
.discover-class-switch{
  display:inline-flex;align-items:center;gap:7px;
  min-height:48px;max-width:100%;
  padding:6px 6px 6px 0;border:0;border-radius:9px;
  background:transparent;color:var(--text-primary);font:inherit;line-height:inherit;
  text-align:left;cursor:pointer;
}
.discover-class-switch span{font-size:17px;color:var(--text-navigation);font-weight:800}
.discover-class-switch:hover{color:var(--text-navigation)}
.discover-class-switch:focus-visible,.discover-class-option:focus-visible{
  outline:3px solid #8467c3;outline-offset:2px;
}
.discover-class-count{
  flex:0 0 auto;color:var(--text-secondary);background:#f4effb;
  border-radius:99px;padding:6px 10px;font-size:12px;font-weight:750;
}
.discover-class-options[hidden]{display:none!important}
.discover-class-options{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;
  padding:10px;margin:0 0 14px;background:#f8f5fd;
  border:1px solid #dfd5ed;border-radius:13px;
}
.discover-class-option{
  min-height:48px;padding:8px 5px;
  border:1px solid #ddd3eb;border-radius:10px;
  background:#fff;color:var(--text-navigation);font-size:13px;font-weight:770;
  cursor:pointer;
}
.discover-class-option.is-current{
  background:#4c427e;color:#fff;border-color:#4c427e;
}
.discover-directory-list{margin:0}
.discover-directory-list .discover-chapter-grid{margin:0}
@media(max-width:800px){
  .discover-class-header{margin-bottom:11px}
  .discover-class-header h1{font-size:clamp(21px,5.5vw,26px)}
  .discover-class-count{font-size:11px}
}
@media(max-width:355px){
  .discover-class-header{gap:3px 9px}
  .discover-class-header h1{font-size:21px}
  .discover-class-switch{min-height:46px}
  .discover-class-count{font-size:10.5px;padding:5px 9px}
}


/* Minimal student home and class chooser. */
.home-active .lesson-container{padding-top:clamp(12px,2vw,22px)!important}
.home-active .discovery-view{min-height:0!important}
.discover-home-minimal{
 width:100%;max-width:790px;margin:0 auto;
 display:grid;gap:clamp(20px,3.5vw,28px)
}
.discover-home-classes{min-width:0}
.discover-home-minimal h1,.discover-home-minimal h2{
 margin:0 0 12px!important;letter-spacing:-.55px;
 font-size:clamp(21px,3vw,26px)!important;line-height:1.3!important;
 font-weight:820!important;color:var(--text-primary)!important
}
.discover-home-minimal .discover-grade:focus-visible{
 outline:3px solid #7654b9;outline-offset:3px
}
.home-active .discover-grade-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.home-active .discover-grade{
 display:flex;align-items:flex-start;flex-direction:column;
 min-height:118px;padding:15px 17px;gap:9px;
 border-radius:16px;box-shadow:0 3px 14px #3328530a
}
.home-active .discover-grade-number{
 width:42px;height:42px;font-size:23px;border-radius:12px
}
.home-active .discover-grade-copy b{font-size:16px}
.home-active .discover-grade-arrow{top:13px;right:15px;font-size:20px}
@media(max-width:800px){
 .home-active .discover-grade-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .home-active .discover-grade{min-height:105px;padding:14px}
 .discover-home-minimal{gap:22px}
}
@media(max-width:430px){
 .home-active .lesson-container{padding:14px 14px 25px!important}
 .discover-home-minimal h1,.discover-home-minimal h2{font-size:21px!important;margin-bottom:10px!important}
 .home-active .discover-grade{min-height:100px;padding:12px}
 .home-active .discover-grade-number{width:40px;height:40px;font-size:23px}
 .home-active .discover-grade-copy b{font-size:15px}
}
@media(prefers-reduced-motion:reduce){
 .home-active .discover-grade{transition:none!important;transform:none!important}
}

/* Chapter-first Triggle UI: a calm four-way choice, not an endless lesson page.
   Local-only CSS; original brand, student progress and solution presentation retained. */
.chapter-hub{position:relative}
.chapter-hub .hub-header{padding:2px 0 3px}
.chapter-hub .hub-eyebrow{letter-spacing:1.4px;font-size:10px;font-weight:820;color:var(--text-secondary);margin:0}
.chapter-hub .hub-header h2{margin:8px 0 7px;font-size:clamp(23px,4vw,32px);line-height:1.23;letter-spacing:-.7px}
.chapter-hub .hub-intro{color:var(--text-explanation);font-size:14px!important;margin:6px 0 12px;line-height:1.55}
.hub-top-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.hub-top-actions button,.hub-back-menu,.hub-resource-link{border:0;background:transparent;padding:7px 2px;color:var(--text-navigation);font-size:12px;font-weight:800;min-height:40px;text-align:left}
.hub-top-actions button:hover,.hub-back-menu:hover{color:var(--text-navigation);text-decoration:underline}
.hub-stage-note{font-size:11px!important;margin:0 0 12px;color:var(--text-secondary)}
.hub-section-menu{margin-top:9px}
.chapter-hub .hub-section-menu h3{font-size:17px;color:var(--text-primary);letter-spacing:-.25px;margin:0 0 12px}
.hub-section-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.hub-section-card{position:relative;min-width:0;min-height:150px;display:flex;flex-direction:column;align-items:flex-start;gap:6px;border:1px solid #e8e2ee;border-radius:17px;padding:17px 42px 14px 17px;text-align:left;color:#42385c;background:#fff;box-shadow:0 5px 17px #3930550d;cursor:pointer}
.hub-section-card:hover{border-color:#b9a6db;background:#fcfaff;box-shadow:0 8px 21px #39305517}
.hub-section-card.is-current{border-color:#a892d6;background:#f6f2ff;box-shadow:0 0 0 1px #a892d6}
.hub-section-icon{width:39px;height:39px;display:grid;place-items:center;border-radius:12px;background:#ebe8fc;color:#7461a4;font-size:22px;font-weight:850}
.hub-section-card[data-hub-section=examples] .hub-section-icon{background:#fff0dc;color:#ae7c3d}
.hub-section-card[data-hub-section=exercises] .hub-section-icon{background:#e7f5ee;color:#35876a}
.hub-section-card[data-hub-section=quizzes] .hub-section-icon{background:#e7f3fd;color:#5182ad}
.hub-section-card strong{font-size:17px;line-height:1.38;overflow-wrap:anywhere}
.hub-section-description{font-size:11.5px;color:#7e788d;line-height:1.48}
.hub-section-count{font-size:10.5px;color:#5b4c81;font-weight:830;margin-top:auto;line-height:1.5}
.hub-section-card.is-upcoming .hub-section-count{color:var(--text-secondary);font-weight:700}
.hub-section-arrow{position:absolute;right:17px;top:16px;font-size:18px;color:#a69abf}
.hub-footer{border-top:1px solid #eee9f4;padding-top:13px;margin-top:22px}
.hub-back-menu{display:inline-flex;align-items:center;margin:12px 0 6px;gap:5px}
.hub-panel{margin:15px 0 0;padding:13px 0 0;border-top:1px solid #ebe5f3;min-width:0}
.hub-panel .hub-info{margin:8px 0 17px;color:var(--text-explanation);font-size:13px!important;line-height:1.65}
.hub-panel .sp2-journey,.hub-panel .p2-lab{margin:12px 0 18px}
.hub-next-section{border:1px solid #cdbfe7;background:#f4f0ff;border-radius:12px;padding:12px 15px;min-height:45px;font-weight:800;color:var(--text-navigation);cursor:pointer}
.hub-question-group{margin:13px 0 24px;display:grid;gap:8px}
.hub-question-group[hidden]{display:none}
.chapter-hub .hub-question-group h4{font-size:13px;line-height:1.5;color:#61547c;margin:4px 0}
.hub-question{width:100%;min-height:60px;display:grid;grid-template-columns:1fr 17px;gap:4px 8px;align-items:center;text-align:left;padding:11px 12px;border:1px solid #e8e3ef;border-radius:13px;background:#fcfbfe;color:#453b61;cursor:pointer}
.hub-question:hover{background:#f4efff;border-color:#d1c5ec}
.hub-question-label{grid-column:1;font-size:12px;font-weight:850;line-height:1.4}
.hub-question-title{grid-column:1;color:#80778d;font-size:11px;line-height:1.45;overflow-wrap:anywhere}
.hub-question-arrow{grid-column:2;grid-row:1/span 2;text-align:right;color:#ac9bc9}
.hub-question[hidden]{display:none}
.hub-question-filters{margin:15px 0}
.hub-question-filters select{width:100%;min-height:46px;border:1px solid #dcd3ea;border-radius:11px;padding:8px 11px;color:#483a63;background:#fff;font-size:13px}
.hub-quiz-question{border:1px solid #e8e4ef;background:#fff;border-radius:14px;padding:13px 14px;margin:13px 0}
.chapter-hub .hub-quiz-question h4{font-size:14px;line-height:1.55;color:var(--text-primary);margin:2px 0 12px}
.hub-quiz-progress{font-size:12px!important;font-weight:820;color:var(--text-secondary);background:var(--bond-tint);border-radius:9px;padding:9px 12px}
.hub-quiz-answers{display:grid;grid-template-columns:1fr;gap:8px}
.hub-quiz-answers button{border:1px solid var(--control-border);border-radius:10px;background:#faf9fd;padding:11px;min-height:44px;text-align:left;color:var(--text-primary);font-size:13px;line-height:1.45}
.hub-quiz-answers button[aria-pressed=true]{background:#eae5f7;border-color:#a58ac8}
.hub-quiz-help{margin-top:12px;font-size:12px;color:var(--text-explanation)}
.hub-quiz-help summary{color:var(--text-navigation);cursor:pointer;min-height:28px;font-weight:800}
.hub-quiz-help p{margin:4px 0 8px!important}
.hub-quiz-feedback{color:var(--text-explanation);font-size:12px!important;font-weight:740;min-height:20px}
.hub-source{padding:13px 0;border-bottom:1px solid #eeeaf3}
.hub-source a{font-weight:770;color:var(--text-navigation);overflow-wrap:anywhere;font-size:13px}
.hub-source p{color:var(--text-secondary);font-size:11px!important;margin:4px 0}
.hub-review{font-size:11px!important;color:var(--text-secondary);margin-top:16px}
.sidebar-chapter-sections{margin:4px 0 12px 13px;padding:7px 5px;border-left:2px solid #d6c7ec;display:grid;grid-template-columns:1fr 1fr;gap:6px}
.sidebar-chapter-sections button{border:1px solid #e7e2f0;border-radius:9px;padding:9px 6px;min-height:40px;text-align:center;background:#f9f7fe;font-size:10px;font-weight:740;color:var(--text-navigation);line-height:1.4;overflow-wrap:anywhere}
.sidebar-chapter-sections button.active{background:#ece6fd;color:var(--text-navigation);border-color:#b7a5df}
.sidebar-search-bottom{flex:none;border-top:1px solid #eee8f5;background:#fff;padding:10px 3px 8px}
.sidebar-search-bottom p{font-size:10px;font-weight:800;letter-spacing:.3px;color:var(--text-secondary);margin:0 4px 7px}
.sidebar-search-bottom .search-field{margin-bottom:4px}
.sidebar-search-results{padding:4px 3px 8px}
.sidebar-search-results .exercise-question{padding-left:12px;overflow-wrap:anywhere}
.hub-section-card:focus-visible,.hub-back-menu:focus-visible,.hub-question:focus-visible,.hub-top-actions button:focus-visible,.sidebar-chapter-sections button:focus-visible{outline:3px solid #9581d4;outline-offset:2px}
@media(max-width:800px){
 .chapter-hub{padding:16px!important}
 .chapter-hub .hub-header h2{font-size:24px}
 .hub-section-grid{gap:9px}
 .hub-section-card{min-height:149px;padding:13px 29px 12px 12px;border-radius:14px}
 .hub-section-card strong{font-size:14.5px}
 .hub-section-icon{width:35px;height:35px;font-size:20px;border-radius:10px}
 .hub-section-arrow{right:11px;top:12px}
 .sidebar-search-bottom{padding-bottom:max(8px,env(safe-area-inset-bottom))}
}
@media(max-width:355px){
 .chapter-hub{padding:12px!important}
 .hub-section-card{min-height:158px;padding-right:20px}
 .hub-section-card strong{font-size:13px}
 .hub-section-description{font-size:10.5px}
 .hub-section-count{font-size:10px}
 .sidebar-chapter-sections{grid-template-columns:1fr 1fr}
}
@media(prefers-reduced-motion:reduce){.hub-section-card{transition:none!important}}


/* Direct section navigation: hide the four large cards once a section opens. */
.chapter-hub .hub-top-actions{margin:0 0 11px}
.chapter-hub .hub-back-menu,.chapter-hub .hub-back-class{display:inline-flex;align-items:center;min-height:44px;padding:8px 3px;margin:0;text-decoration:none}
.chapter-hub .hub-header{margin-bottom:10px}
.chapter-hub .hub-header h2{margin:5px 0 5px}
.chapter-hub .hub-panel{margin:0;padding:6px 0 0;border-top:0;min-width:0}
.chapter-hub .hub-panel>.hub-info:first-child{margin-top:2px}
.chapter-hub .hub-panel .hub-question-group:first-of-type{margin-top:7px}
.chapter-hub .hub-panel .hub-quiz-progress{margin:8px 0 12px}
.chapter-hub .hub-panel .sp2-journey{margin-top:6px}
.question-return{margin:0 0 12px;display:flex;align-items:center}
.question-return[hidden]{display:none!important}
.question-return button{display:inline-flex;align-items:center;min-height:44px;padding:8px 6px;border:0;background:transparent;color:var(--text-navigation);font-size:12px;font-weight:820;font-family:inherit;line-height:1.45;cursor:pointer}
.question-return button:hover{text-decoration:underline;color:var(--text-navigation)}
.question-return button:focus-visible{outline:3px solid #917be4;outline-offset:2px;border-radius:7px}
@media(max-width:800px){
 .chapter-hub .hub-panel{padding:4px 0 0}
 .chapter-hub .hub-top-actions{margin:0 0 5px}
 .question-return{margin:2px 0 9px}
}


/* Grade 9 chapter readiness: say exactly what is ready without implying editorial sign-off. */
.chapter-hub .hub-question-breakdown{
 font-size:12px!important;line-height:1.65;color:var(--text-explanation);
 padding:10px 12px;margin:0 0 15px;border:1px solid #ded4ed;
 border-radius:11px;background:#f7f4fc
}
.chapter-hub .hub-stage-note{color:var(--text-secondary);font-size:12px!important;line-height:1.5}
.chapter-hub .hub-eyebrow{color:var(--text-navigation)}
.chapter-hub .hub-section-description{color:var(--text-explanation)}
.chapter-hub .hub-question-title{color:var(--text-primary)}
.chapter-hub .hub-question-arrow{color:var(--text-navigation)}
.chapter-hub .hub-info{color:var(--text-explanation)}

/* Unified navigation v3: identical Back typography in chapter menus and questions. */
.chapter-hub .hub-top-actions button,
.question-return button{
  display:inline-flex;
  align-items:center;
  box-sizing:border-box;
  max-width:100%;
  min-height:48px;
  padding:10px 12px;
  border:1px solid #d5c9e9;
  border-radius:12px;
  background:#f7f3ff;
  color:var(--text-primary);
  font-family:inherit;
  font-size:var(--triggle-nav-font-size,16px);
  font-weight:var(--triggle-nav-weight,700);
  line-height:1.35;
  text-align:left;
  white-space:normal;
  word-break:normal;
  cursor:pointer;
}
.chapter-hub .hub-top-actions button:focus-visible,
.question-return button:focus-visible{
  outline:3px solid #7252bc;
  outline-offset:2px;
}
@media(max-width:800px){
  .chapter-hub .hub-top-actions button,
  .question-return button{
    font-size:var(--triggle-nav-font-size,16px);
    min-height:48px;
  }
}

/* Chapter hub v4: one heading, immediately accessible learning choices,
   compact honest counts, and no duplicate introductory panels. */
.chapter-hub .hub-top-actions{margin:0 0 12px}
.chapter-hub .hub-header{margin:0 0 7px;padding:0}
.chapter-hub .hub-eyebrow{font-size:11px;letter-spacing:1px;line-height:1.4}
.chapter-hub .hub-header h2{margin:5px 0 8px;line-height:1.22}
.chapter-hub .hub-question-breakdown{
  display:block;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--text-secondary);
  font-size:12px!important;
  font-weight:650;
  line-height:1.55;
  margin:0 0 12px;
}
.chapter-hub .hub-section-menu{margin-top:7px}
.chapter-hub .hub-section-menu h3{font-size:16px;margin:0 0 11px}
.chapter-hub .hub-stage-note{font-size:12px!important;line-height:1.5;margin:14px 0 5px;color:var(--text-secondary)}
.chapter-hub .hub-footer{margin-top:11px;padding-top:9px}
@media(max-width:800px){
  .chapter-hub .hub-top-actions{margin-bottom:10px}
  .chapter-hub .hub-header h2{font-size:clamp(24px,5.5vw,29px)}
  .chapter-hub .hub-question-breakdown{margin-bottom:9px}
  .chapter-hub .hub-section-grid{gap:10px}
  .chapter-hub .hub-section-card{min-height:145px}
}


/* Grade 9 Set Language concepts: mobile-first density pass.
   Scoped to the existing journey; does not change exercises, answers,
   completion storage, language controls, or interactive lesson behavior. */
@media (max-width:800px) {
  .chapter-hub:has(.sp2-journey) {padding:12px!important}
  .chapter-hub:has(.sp2-journey) .hub-top-actions {margin-bottom:4px}
  .chapter-hub:has(.sp2-journey) .hub-header {margin-bottom:3px}
  .chapter-hub:has(.sp2-journey) .hub-header h2 {font-size:clamp(23px,5.5vw,28px);margin:3px 0}
  .chapter-hub:has(.sp2-journey) .hub-intro {margin:2px 0 6px;line-height:1.4}
  .chapter-hub:has(.sp2-journey) .hub-panel {padding-top:0}
  .chapter-hub .hub-panel .sp2-journey {
    margin:4px 0 12px;
    padding:12px;
    border-radius:14px;
    background:#fff;
  }
  .chapter-hub .sp2-kicker {font-size:10px;letter-spacing:.6px}
  .chapter-hub .sp2-journey h3 {font-size:clamp(18px,4.8vw,21px);line-height:1.3;margin:4px 0 6px}
  .chapter-hub .sp2-intro {font-size:13px!important;line-height:1.45!important;margin:5px 0 8px}
  .chapter-hub .sp2-progress {margin:7px 0;padding:2px 0 2px 9px;font-size:12px!important}
  .chapter-hub .sp2-journey .sp2-journey-controls {margin:7px 0;padding:5px;gap:6px}
  .chapter-hub .sp2-journey .sp2-journey-controls button {
    min-height:44px;font-size:12px;line-height:1.35;padding:7px 6px;
  }
  .chapter-hub .sp2-journey .sp2-nav {margin:5px 0 9px;padding:2px 1px 7px;gap:6px}
  .chapter-hub .sp2-journey .sp2-nav-button {
    flex-basis:125px;min-height:49px;padding:7px;border-radius:10px;
  }
  .chapter-hub .sp2-journey .sp2-panel {padding-top:10px}
  .chapter-hub .sp2-journey .sp2-formula {margin:9px 0;padding:10px 12px}
  .chapter-hub .sp2-journey .sp2-demo {margin-top:10px}
}
@media (max-width:380px) {
  .chapter-hub .sp2-journey .sp2-journey-controls {grid-template-columns:minmax(0,1fr) 54px minmax(0,1fr)}
  .chapter-hub .sp2-journey .sp2-nav-button {flex-basis:115px}
}


/* Grade 9 Set Language — Math-First Learning Canvas.
   A single compact picker replaces the introductory card, redundant
   explanations and horizontal seven-item carousel. Keep maths readable. */
.chapter-hub:has(.sp2-journey) .hub-panel .sp2-journey{
  border:0;border-radius:0;box-shadow:none;background:transparent;
  padding:0;margin:0;min-width:0
}
.chapter-hub .sp2-learning-toolbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;margin:0 0 8px;min-width:0
}
.chapter-hub .sp2-idea-picker{
  display:inline-flex;justify-content:space-between;align-items:center;gap:12px;
  min-height:46px;max-width:100%;min-width:0;padding:9px 12px;
  border:1px solid #cfc4e1;border-radius:11px;background:#f7f4fd;
  color:var(--text-navigation);font:800 13px/1.35 system-ui,sans-serif;text-align:left;
  cursor:pointer;white-space:normal
}
.chapter-hub .sp2-picker-chevron{font-size:19px;line-height:1;flex:none}
.chapter-hub .sp2-idea-picker[aria-expanded=true] .sp2-picker-chevron{transform:rotate(180deg)}
.chapter-hub .sp2-learning-toolbar .sp2-progress{
  display:inline-block;flex:none;margin:0;padding:0;border:0;
  color:var(--text-secondary)!important;font:700 12px/1.4 system-ui,sans-serif!important;
  white-space:nowrap
}
.chapter-hub .sp2-journey .sp2-nav{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));
  gap:6px;overflow:visible;max-width:100%;margin:0 0 12px;padding:9px;
  border:1px solid #e4ddec;border-radius:12px;background:#fbf9ff;
  scrollbar-width:auto
}
.chapter-hub .sp2-journey .sp2-nav[hidden]{display:none!important}
.chapter-hub .sp2-journey .sp2-nav-button{
  width:100%;min-height:48px;min-width:0;flex:none;gap:10px;
  padding:9px 11px;font-size:13px;line-height:1.45;
  border-radius:9px;overflow-wrap:normal
}
.chapter-hub .sp2-journey .sp2-nav-name{overflow-wrap:break-word;word-break:normal}
.chapter-hub .sp2-journey .sp2-panel{border:0;padding:0;margin:0}
.chapter-hub .sp2-journey .sp2-concept-heading{margin:3px 0 7px;scroll-margin-top:12px}
.chapter-hub .sp2-journey .sp2-concept-heading h4{
  font-size:clamp(21px,4.5vw,26px);line-height:1.28;letter-spacing:-.35px;
  margin:0 0 5px;color:var(--text-primary)
}
.chapter-hub .sp2-journey .sp2-idea{margin:5px 0 8px;font-size:15px!important;line-height:1.55!important}
.chapter-hub .sp2-journey .sp2-example{margin:5px 0 8px;font-size:14px!important;line-height:1.55!important}
.chapter-hub .sp2-journey .sp2-formula{margin:9px 0;padding:10px 12px}
.chapter-hub .sp2-journey .sp2-demo{margin-top:9px}
.chapter-hub .sp2-journey .sp2-stage-reference{
  margin:18px 0 4px;padding-top:9px;border-top:1px solid #ebe5f1;
  font-size:11px;line-height:1.6;color:var(--text-secondary)
}
.chapter-hub .sp2-journey .sp2-footer-prev:disabled{opacity:.5}

@media(max-width:800px){
  /* The global header remains fully keyboard/screen-reader accessible,
     but no longer takes two entire rows above the maths lesson. */
  .workspace:has(.chapter-hub .sp2-journey) .appbar{
    display:grid;grid-template-columns:minmax(0,1fr) 44px 44px auto;
    grid-template-rows:1fr;align-items:center;gap:4px;
    height:60px;min-height:60px;padding:0 8px
  }
  .workspace:has(.chapter-hub .sp2-journey) .brand-mobile{
    grid-column:1;grid-row:1;min-width:0
  }
  .workspace:has(.chapter-hub .sp2-journey) .browse-button{
    grid-column:2;grid-row:1;justify-self:center;justify-content:center;
    width:44px;min-width:44px;min-height:44px;padding:5px;margin:0
  }
  .workspace:has(.chapter-hub .sp2-journey) #browseBtn [data-i18n="browse"],
  .workspace:has(.chapter-hub .sp2-journey) #homeBtn [data-i18n="home"]{
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;
    overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0
  }
  .workspace:has(.chapter-hub .sp2-journey) #browseChevron{display:none}
  .workspace:has(.chapter-hub .sp2-journey) .basics-link{
    grid-column:3;grid-row:1;justify-self:center;justify-content:center;
    width:44px;min-width:44px;min-height:44px;padding:5px;margin:0
  }
  .workspace:has(.chapter-hub .sp2-journey) .lang-switch{
    grid-column:4;grid-row:1;justify-self:end;padding:2px;gap:1px
  }
  .workspace:has(.chapter-hub .sp2-journey) .lang-switch button{
    min-height:42px;min-width:39px;padding:5px 6px
  }
  .chapter-hub:has(.sp2-journey){padding:10px!important}
  .chapter-hub:has(.sp2-journey) .hub-top-actions{margin:0 0 2px}
  .chapter-hub:has(.sp2-journey) .hub-header{
    display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 10px;
    margin:0 0 7px;padding:0
  }
  .chapter-hub:has(.sp2-journey) .hub-header .hub-eyebrow{
    font-size:11px;line-height:1.35;margin:0
  }
  .chapter-hub:has(.sp2-journey) .hub-header h2{
    font-size:16px!important;line-height:1.35;margin:0!important;
    letter-spacing:0
  }
  .chapter-hub .sp2-learning-toolbar{gap:6px;margin:0 0 7px}
  .chapter-hub .sp2-idea-picker{min-height:44px;padding:9px 10px;font-size:12.5px}
  .chapter-hub .sp2-learning-toolbar .sp2-progress{
    font-size:11px!important
  }
  .chapter-hub .sp2-journey .sp2-concept-heading h4{
    font-size:clamp(20px,5.5vw,24px)
  }
  .chapter-hub .sp2-journey .sp2-nav{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:355px){
  .workspace:has(.chapter-hub .sp2-journey) .brand-mobile b{font-size:17px}
  .workspace:has(.chapter-hub .sp2-journey) .brand-mobile .logo{width:27px;height:27px}
  .chapter-hub .sp2-learning-toolbar .sp2-progress{font-size:10px!important}
}


/* Grade 9 Set Language Concepts — index first, one Back button in lessons.
   Scope to the Concepts journey; all other chapters retain their navigation. */
.chapter-hub .sp2-index-view[hidden],
.chapter-hub .sp2-detail-view[hidden]{display:none!important}
.chapter-hub .sp2-index-view .sp2-progress{
  display:block;margin:0 0 12px;padding:0;border:0;
  font:700 12px/1.5 system-ui,sans-serif;color:var(--text-secondary)!important
}
.chapter-hub .sp2-index-view .sp2-nav{
  display:grid;grid-template-columns:minmax(0,1fr);
  gap:9px;overflow:visible;border:0;background:transparent;
  border-radius:0;padding:0;margin:0;max-width:100%
}
.chapter-hub .sp2-index-view .sp2-nav-button{
  min-height:57px;display:flex;align-items:center;gap:12px;
  padding:11px 13px;background:#fff;border:1px solid #e3ddec;
  border-radius:12px;font-size:14px;line-height:1.5;font-weight:750;
  color:#403658;box-shadow:none;text-align:left;
  white-space:normal;overflow-wrap:normal
}
.chapter-hub .sp2-index-view .sp2-nav-name{
  overflow-wrap:break-word;word-break:normal
}
.chapter-hub .sp2-index-view .sp2-nav-button.sp2-done .sp2-nav-number{
  background:var(--surface-correct);color:var(--text-correct)
}
.chapter-hub .sp2-index-view .sp2-done-mark{margin-left:auto}
.chapter-hub .sp2-detail-navigation{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:8px;margin:0 0 9px
}
.chapter-hub .sp2-detail-navigation [data-journey-index]{
  color:#6b607a;font:750 12px/1.4 system-ui,sans-serif;
}
.chapter-hub .sp2-back-index{
  display:inline-flex;align-items:center;min-height:44px;
  border:0;background:transparent;padding:8px 3px;
  color:#473873;font:800 14px/1.4 system-ui,sans-serif;
  cursor:pointer;text-align:left
}
.chapter-hub .sp2-back-index:focus-visible{
  outline:3px solid #9470de;outline-offset:2px;border-radius:7px
}
.chapter-hub:has(.sp2-journey[data-view="lesson"]) .hub-top-actions{display:none}
.chapter-hub .sp2-detail-view .sp2-panel{padding:0;margin:0;border:0}
@media(max-width:800px){
  .chapter-hub .sp2-index-view .sp2-nav-button{
    padding:10px 12px;min-height:56px;font-size:13.5px
  }
  .chapter-hub .sp2-index-view .sp2-nav-number{
    flex:none;width:33px;height:34px;font-size:14px
  }
  .chapter-hub .sp2-detail-navigation{margin:0 0 7px}
}

/* Concept lesson navigation stays AFTER all teaching, diagrams, and practice.
   Mobile controls are in normal flow; never overlay the lesson while scrolling. */
@media (max-width:800px) {
  .chapter-hub .sp2-journey[data-view="lesson"] .sp2-detail-view {
    overflow:visible;
  }
  .chapter-hub .sp2-journey[data-view="lesson"] .sp2-journey-footer {
    position:static;
    bottom:auto;
    z-index:auto;
    box-sizing:border-box;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    align-items:center;
    gap:8px;
    margin:18px 0 0;
    padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px));
    border:1px solid #ded6ed;
    border-radius:15px;
    background:#fff;
    box-shadow:none;
  }
  .chapter-hub .sp2-journey[data-view="lesson"] .sp2-journey-footer button {
    box-sizing:border-box;
    width:100%;
    min-width:0;
    min-height:50px;
    max-width:none;
    margin:0;
    padding:10px 8px;
    font-size:clamp(12px,3.6vw,14px);
    line-height:1.35;
    text-align:center;
    overflow-wrap:break-word;
    word-break:normal;
    cursor:pointer;
  }
  .chapter-hub .sp2-journey[data-view="lesson"] .sp2-journey-footer button.sp2-footer-next {
    margin:0;
  }
  .chapter-hub .sp2-journey[data-view="lesson"] .sp2-journey-footer button:focus-visible {
    outline:3px solid #8061c9;
    outline-offset:2px;
  }
}
@media (max-width:355px) {
  .chapter-hub .sp2-journey[data-view="lesson"] .sp2-journey-footer {
    gap:6px;padding:7px 6px calc(7px + env(safe-area-inset-bottom,0px));
  }
  .chapter-hub .sp2-journey[data-view="lesson"] .sp2-journey-footer button {
    font-size:12px;padding:9px 6px;
  }
}

/* Shared Grade 9 and Grade 10 concept navigation: at the end of the lesson,
   not viewport-sticky, so figures and answers remain uncovered. */
@media(max-width:800px){
  .chapter-hub .sp2-journey[data-view="lesson"] .sp2-detail-view{
    overflow:visible;min-width:0
  }
  .chapter-hub .sp2-journey[data-view="lesson"] .sp2-panel{
    padding-bottom:clamp(12px,3vh,24px)!important
  }
  .chapter-hub .sp2-journey[data-view="lesson"] [data-adaptive-dock]{
    position:static;bottom:auto;z-index:auto;
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.18fr);
    align-items:stretch;gap:10px;
    margin:18px 0 0;
    padding:9px 10px calc(9px + env(safe-area-inset-bottom,0px));
    border:1px solid #ded6ed;border-radius:15px;
    background:#fff;box-shadow:none;
    backdrop-filter:none;-webkit-backdrop-filter:none
  }
  .chapter-hub .sp2-journey [data-adaptive-dock] button{
    width:100%;min-width:0;min-height:50px;margin:0;
    padding:10px 9px;border-radius:12px;
    font-size:clamp(11px,3.25vw,14px);
    line-height:1.35;white-space:normal;
    overflow-wrap:break-word
  }
  .chapter-hub .sp2-journey [data-adaptive-dock] .sp2-footer-prev:disabled{
    opacity:.48;cursor:default
  }
  .chapter-hub .sp2-journey [data-adaptive-dock] button:focus-visible{
    outline:3px solid #8066c4;outline-offset:2px
  }
}
@media(max-width:355px){
  .chapter-hub .sp2-journey[data-view="lesson"] [data-adaptive-dock]{gap:6px}
  .chapter-hub .sp2-journey [data-adaptive-dock] button{padding:8px 6px}
}
@media(prefers-reduced-transparency:reduce){
  .chapter-hub .sp2-journey [data-adaptive-dock]{
    background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none
  }
}

/* All-grade student concepts contract, 2026-11-15:
   one quiet index -> one mathematical idea -> one Back -> one bottom Previous/Next.
   Never repeat the chapter title, introductory sales text or progress counts here.
   Source attribution and deeper reasoning remain available on demand. */
.chapter-hub[data-hub-section="concepts"] .hub-top-actions{margin:0 0 10px}
.chapter-hub[data-hub-section="concepts"] .hub-panel{padding:0;margin:0;border:0;min-width:0}
.chapter-hub[data-hub-section="concepts"] .sp2-journey{
 margin:0;padding:0;border:0;box-shadow:none;background:transparent;min-width:0
}
.chapter-hub[data-hub-section="concepts"] .sp2-index-view .sp2-progress,
.chapter-hub[data-hub-section="concepts"] .sp2-private,
.chapter-hub[data-hub-section="concepts"] .sp2-detail-navigation [data-journey-index]{
 display:none!important
}
.chapter-hub[data-hub-section="concepts"] .sp2-index-view .sp2-nav{margin:0;padding:0}
.chapter-hub[data-hub-section="concepts"] .sp2-detail-navigation{margin:0 0 7px}
.chapter-hub[data-hub-section="concepts"] .sp2-detail-view .sp2-concept-heading{margin:3px 0 10px}
.chapter-hub[data-hub-section="concepts"] .sp2-detail-view .sp2-concept-heading h4{margin:0;line-height:1.35}
.chapter-hub[data-hub-section="concepts"] .rnlab .sp2-demo{margin:8px 0 13px}
.chapter-hub[data-hub-section="concepts"] .rnlab .sp2-explanation{margin:10px 0 15px}
.chapter-hub[data-hub-section="concepts"] .rnlab .sp2-recall{margin-top:13px}
.chapter-hub[data-hub-section="concepts"] .rnlab .sp2-journey-footer{margin-top:14px}
@media(max-width:800px){
 .chapter-hub[data-hub-section="concepts"] .sp2-index-view .sp2-nav{gap:8px}
 .chapter-hub[data-hub-section="concepts"] .sp2-index-view .sp2-nav-button{
  min-height:55px;padding:11px 12px;font-size:14px
 }
 .chapter-hub[data-hub-section="concepts"] .sp2-detail-view .sp2-panel{min-width:0}
}

/* Specialised Grade 12 matrix scenes follow the same one-Back rule. */
.chapter-hub:has(.matrix-concepts[data-view="lesson"]) .hub-top-actions{display:none}

/* Universal textbook exercise index: one clear, tappable row per exercise. */
.hub-exercise-index{display:grid;gap:9px;margin:6px 0 20px}
.hub-exercise-link{width:100%;min-height:64px;display:grid;grid-template-columns:minmax(0,1fr) 28px;align-items:center;gap:3px 12px;padding:12px 16px;text-align:left;border:1px solid #dfd9eb;border-radius:14px;background:#fff;color:#302748;cursor:pointer}
.hub-exercise-link strong{grid-column:1;font-size:clamp(15px,2.3vw,18px);font-weight:790;line-height:1.4}
.hub-exercise-link small{grid-column:1;font-size:12px;line-height:1.4;color:var(--text-secondary)}
.hub-exercise-arrow{grid-column:2;grid-row:1/span 2;text-align:right;font-size:24px;color:var(--text-navigation)}
.hub-exercise-link:hover{background:#f8f5fd;border-color:#a996ce}
.hub-exercise-link:focus-visible{outline:3px solid #7c64af;outline-offset:2px}
@media(max-width:430px){.hub-exercise-index{gap:8px}.hub-exercise-link{min-height:60px;padding:11px 13px}}


/* Concept-video pilot: no extra card or unavailable-media button. */
/* A single cherry-merlot accent makes optional narrated lessons easy to spot. */
.sp2-concept-video-button{
  display:block;box-sizing:border-box;width:100%;max-width:100%;
  min-height:56px;margin:12px 0 16px;padding:14px 18px;
  border:1px solid var(--text-navigation);border-radius:14px;
  background:var(--text-navigation);color:var(--surface-content);
  font:inherit;font-size:clamp(14px,3.7vw,17px);font-weight:750;
  line-height:1.45;text-align:left;cursor:pointer;
  box-shadow:0 4px 12px rgba(85,29,49,.15);
  transition:background-color .16s ease,box-shadow .16s ease,transform .16s ease
}
.sp2-concept-video-button:hover{background:var(--text-primary);box-shadow:0 6px 16px rgba(85,29,49,.2)}
.sp2-concept-video-button:active{background:var(--text-primary);transform:translateY(1px)}
@media(prefers-reduced-motion:reduce){.sp2-concept-video-button{transition:none}}
.sp2-concept-video-button[hidden]{display:none}
.sp2-concept-video-button:focus-visible,.sp2-concept-video-close:focus-visible{outline:3px solid var(--text-navigation);outline-offset:3px}
.sp2-concept-video-dialog{box-sizing:border-box;width:min(94vw,520px);max-height:96dvh;padding:12px;border:0;border-radius:16px;background:#fff;color:var(--text-primary);box-shadow:0 18px 55px #08172455}
.sp2-concept-video-dialog::backdrop{background:rgba(7,18,26,.78)}
.sp2-concept-video-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}
.sp2-concept-video-heading h3{font-size:1rem;line-height:1.35;margin:3px 0 0;font-weight:650}
.sp2-concept-video-close{flex-shrink:0;min-height:40px;padding:8px 12px;border:1px solid #ddd;border-radius:9px;background:#fff;color:inherit;font:inherit;cursor:pointer}
.sp2-concept-video-note[role=alert]{color:var(--text-incorrect)}
.sp2-concept-video-dialog video{display:block;margin:auto;max-width:100%;width:auto;max-height:min(75dvh,780px);aspect-ratio:9/16;background:#111;border-radius:9px}
.sp2-concept-video-note{font-size:.8rem;line-height:1.4;color:var(--text-explanation);margin:9px 4px 2px;text-align:center}
@media(max-width:480px){.sp2-concept-video-dialog{width:97vw;max-height:98dvh;padding:8px}.sp2-concept-video-note[role=alert]{color:var(--text-incorrect)}
.sp2-concept-video-dialog video{max-height:78dvh}.sp2-concept-video-heading h3{font-size:.9rem}}


/* Concept-first Grade 10 flow, 2026-11-16.
   The optional explanation toggle is removed. Keep indispensable teaching
   text as quiet, always-visible notes on concepts without a full guided video. */
.chapter-hub .sp2-simple-journey .sp2-lesson-note{
  margin:12px 0 14px;
  padding:2px 1px 11px;
  border-bottom:1px solid #e9e6ed;
  color:var(--text-explanation);
}
.chapter-hub .sp2-simple-journey .sp2-lesson-note p{
  margin:0 0 7px;
  font-size:clamp(14px,3.5vw,16px);
  line-height:1.6;
}
.chapter-hub .sp2-simple-journey .sp2-lesson-note .sp2-example{
  font-weight:400;
}
.chapter-hub .sp2-simple-journey .sp2-lesson-note .sp2-stage-reference{
  display:block;margin-top:4px;
}
@media(max-width:800px){
  /* Navigation follows the practice activity; it cannot float over answers. */
  .chapter-hub .sp2-simple-journey[data-view="lesson"] [data-adaptive-dock]{
    position:static;
    bottom:auto;
    z-index:auto;
    margin:15px 0 0;
    padding:8px;
    border:1px solid #ded6ed;
    border-radius:15px;
    background:#fff;
    box-shadow:none;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }
  .chapter-hub .sp2-simple-journey[data-view="lesson"] .sp2-panel{
    padding-bottom:0!important;
  }
}

/* Grade 10 Ch 2: quick, touch-friendly Next concept at top of lesson. */
.chapter-hub[data-hub-section="concepts"] .sp2-top-next{display:inline-flex;align-items:center;justify-content:flex-end;min-height:44px;min-width:0;padding:8px 3px;border:0;background:transparent;color:var(--text-navigation);font:800 14px/1.4 system-ui,sans-serif;cursor:pointer;text-align:right}
.chapter-hub[data-hub-section="concepts"] .sp2-top-next:focus-visible{outline:3px solid #9470de;outline-offset:2px;border-radius:7px}
@media(max-width:355px){.chapter-hub[data-hub-section="concepts"] .sp2-detail-navigation{flex-wrap:nowrap;gap:5px}.chapter-hub[data-hub-section="concepts"] .sp2-top-next,.chapter-hub[data-hub-section="concepts"] .sp2-back-index{font-size:12px}}


/* Grade 9 · Surds: first-glance explanation, not an unexplained slider.
   The grid shows only the perfect-square factor, and ×2 is a separate factor. */
.chapter-hub .rnlab .rnlab-surd-try-label{
  width:100%;margin:0 0 3px;color:var(--text-explanation);font-size:13px;font-weight:700;line-height:1.5
}
.chapter-hub .rnlab .rnlab-surd-options{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%
}
.chapter-hub .rnlab .rnlab-surd-options .rnlab-choice{
  min-height:48px;white-space:normal;font-size:15px;padding:8px 5px
}
.chapter-hub .rnlab .rnlab-surd-story{width:100%;min-width:0}
.chapter-hub .rnlab .rnlab-surd-question{
  width:100%;margin:2px 0 3px;color:var(--text-primary);font:800 clamp(17px,4.5vw,21px)/1.35 system-ui,sans-serif
}
.chapter-hub .rnlab .rnlab-surd-lead{
  margin:0 0 12px;color:var(--text-explanation);font-size:14px;line-height:1.55
}
.chapter-hub .rnlab .rnlab-surd-factors{
  display:grid;grid-template-columns:minmax(0,1fr) 23px minmax(0,.72fr);
  align-items:center;gap:7px;width:100%;min-width:0
}
.chapter-hub .rnlab .rnlab-surd-square-card,
.chapter-hub .rnlab .rnlab-surd-leftover-card{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:6px;min-width:0;min-height:153px;padding:10px 5px;border-radius:15px;
  border:1px solid #e3dbea;background:#fff
}
.chapter-hub .rnlab .rnlab-surd-square-card{background:#f5f1fc}
.chapter-hub .rnlab .rnlab-surd-leftover-card{background:#fff7ec;border-color:#f0deca}
.chapter-hub .rnlab .rnlab-surd-grid{
  display:grid;grid-template-columns:repeat(var(--surd-k),1fr);
  gap:3px;width:min(104px,100%);aspect-ratio:1
}
.chapter-hub .rnlab .rnlab-surd-tile{display:block;min-width:0;background:#8b72bc;border-radius:2px}
.chapter-hub .rnlab .rnlab-surd-square-card strong{
  font-size:clamp(12px,3.5vw,15px);color:var(--text-primary);text-align:center
}
.chapter-hub .rnlab .rnlab-surd-leftover-card strong{
  font-size:42px;line-height:1.2;color:var(--text-primary)
}
.chapter-hub .rnlab .rnlab-surd-factor-label{
  font-size:clamp(10px,2.7vw,12px);line-height:1.35;font-weight:750;text-align:center;
  color:var(--text-secondary)
}
.chapter-hub .rnlab .rnlab-surd-times{
  text-align:center;color:#474055;font-size:25px;font-weight:750
}
.chapter-hub .rnlab .rnlab-surd-description{
  margin:11px 0 3px;color:var(--text-explanation);font-size:13px;line-height:1.55
}
.chapter-hub .rnlab .sp2-demo-output:has(.rnlab-surd-equations){
  overflow:visible;white-space:normal;margin-top:11px!important
}
.chapter-hub .rnlab .rnlab-surd-equations{display:grid;gap:8px;width:100%}
.chapter-hub .rnlab .rnlab-surd-equation{
  padding:10px 12px;border:1px solid #e8e3ee;border-radius:12px;background:#fff;min-width:0
}
.chapter-hub .rnlab .rnlab-surd-equation>span{
  display:block;margin-bottom:4px;font-size:12px;line-height:1.4;font-weight:740;color:var(--text-secondary)
}
.chapter-hub .rnlab .rnlab-surd-math{
  font-size:clamp(17px,4.4vw,21px);line-height:1.75;color:#312b50;
  max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin
}
.chapter-hub .rnlab .rnlab-surd-result{background:#edf7f0;border-color:#c8e3d1}
.chapter-hub .rnlab .rnlab-surd-result .rnlab-surd-math{font-weight:800;color:#24634a}
.chapter-hub .rnlab .rnlab-surd-conclusion{
  margin:9px 1px 2px;color:var(--text-explanation);font-size:14px;line-height:1.55
}
@media(max-width:355px){
  .chapter-hub .rnlab .rnlab-surd-factors{grid-template-columns:minmax(0,1fr) 18px minmax(0,.8fr);gap:4px}
  .chapter-hub .rnlab .rnlab-surd-square-card,
  .chapter-hub .rnlab .rnlab-surd-leftover-card{min-height:130px;padding:8px 4px}
  .chapter-hub .rnlab .rnlab-surd-grid{width:min(82px,100%)}
  .chapter-hub .rnlab .rnlab-surd-math{font-size:16px}
}


/* AUD01-01: compact five-operation Venn, visible within the Grade 9 lesson. */
.chapter-hub .sp2-venn-defs{font-size:12px;line-height:1.55;color:var(--text-explanation);margin:8px 0 10px}
.chapter-hub .sp2-venn-defs p{font-size:12px!important;margin:4px 0;overflow-wrap:anywhere}
.chapter-hub .sp2-venn-controls{display:flex!important;flex-wrap:wrap;gap:7px;margin:8px 0}
.chapter-hub .sp2-venn-controls button{flex:1 1 84px;min-height:44px;min-width:0;padding:8px 6px;border:1px solid #d8cbe7;border-radius:10px;background:#fff;color:#453359;font:750 13px/1.3 system-ui,sans-serif}
.chapter-hub .sp2-venn-controls button[aria-pressed="true"]{border-color:#34856c;background:#e7f6ed;color:#245a45;box-shadow:inset 0 0 0 1px #34856c}
.chapter-hub .sp2-venn-controls button:focus-visible{outline:3px solid #7360a2;outline-offset:2px}
.chapter-hub .sp2-venn-svg{display:block;width:100%;height:auto;max-width:540px;max-height:300px;margin:5px auto 8px}
.chapter-hub .sp2-venn-explain{font-size:12px!important;line-height:1.5;color:var(--text-explanation);margin:5px 0 2px}
@media(max-width:380px){.chapter-hub .sp2-venn-controls button{flex-basis:82px;font-size:12px}}


/* AUD01-02: cardinality context, legible two-line equations and optional 3-set bridge. */
.chapter-hub .sp2-count-givens{display:flex;flex-wrap:wrap;gap:7px;margin:7px 0 12px}
.chapter-hub .sp2-count-givens>span{flex:1 1 72px;min-width:0;text-align:center;padding:8px 5px;border:1px solid #d9e8dc;background:#edf7f0;border-radius:10px;font-size:clamp(13px,3.6vw,16px);font-weight:750}
.chapter-hub .sp2-count-equation{display:block;width:100%;min-width:0;padding:3px 0;font-size:clamp(12px,3.5vw,15px);overflow-x:auto;scrollbar-width:thin}
.chapter-hub .sp2-count-equation .triggle-tex{max-width:100%;overflow-x:auto}
.chapter-hub .sp2-count-note{display:block;margin-top:7px;font-size:12px;line-height:1.5;font-weight:550}
.chapter-hub .sp2-count-three-bridge{margin:11px 0 0;padding:11px 10px;background:#f7f5fc;border:1px solid #e6ddf3;border-radius:10px}
.chapter-hub .sp2-count-three-bridge strong{display:block;font-size:13px;line-height:1.4;margin-bottom:5px}
.chapter-hub .sp2-count-three-bridge p{font-size:12px!important;line-height:1.5;margin:5px 0}
.chapter-hub .sp2-three-set-math{font-size:clamp(11px,3.1vw,14px);max-width:100%;overflow-x:auto;scrollbar-width:thin;padding:7px 1px}
.chapter-hub .sp2-three-set-math:focus-visible{outline:2px solid #7960ad;outline-offset:2px}


/* Render Tamil in the Sets lessons even when the device lacks a Tamil font. */
@font-face{
  font-family:"Triggle Noto Sans Tamil";
  src:url("./vendor/noto-sans-tamil/tamil.woff2") format("woff2");
  font-weight:400 900;
  font-style:normal;
  font-display:swap;
  unicode-range:U+0964-0965,U+0B82-0BFA,U+200C-200D,U+20B9,U+25CC;
}
html[lang="ta"] .chapter-hub .g9-set-journey{font-family:"Triggle Noto Sans Tamil",system-ui,sans-serif}
html[lang="ta"] .chapter-hub .g9-set-journey :is(button,summary){font-family:inherit}

/* Triggle Living Concepts — one visual stage, original mathematics retained. */
.chapter-hub .sp2-journey .lc-lab{
  border:1px solid #ded4ee;border-radius:20px;background:#f7f3fd;
  padding:13px;margin:8px 0 12px;box-shadow:0 7px 20px rgba(69,43,96,.035)
}
.chapter-hub .lc-lab .lc-lab-title{
  margin:0 0 8px;font-size:11px!important;letter-spacing:.07em;
  color:var(--text-secondary);text-transform:uppercase;font-weight:800
}
.chapter-hub .lc-instruction{font-size:14px;line-height:1.5;font-weight:750;margin:4px 0;color:var(--text-explanation)}
.chapter-hub .lc-scene{display:block;width:100%;height:auto;max-height:252px;margin:7px auto}
.chapter-hub .lc-boundary{stroke:#8e7abc;fill:#fffefa;stroke-width:2.5}
.chapter-hub .lc-set-label,.chapter-hub .lc-count-label{font:750 15px/1 system-ui,sans-serif;fill:#5a487c}
.chapter-hub .lc-node{fill:#ece6f7;stroke:#b9abd9;stroke-width:1.5}
.chapter-hub .lc-selected .lc-node{fill:#dff3e9;stroke:#37896e;stroke-width:3}
.chapter-hub .lc-outsider{fill:#fff0e7;stroke:#ce8c68;stroke-width:2.5}
.chapter-hub .lc-number{font:24px Georgia,serif;fill:#413658;text-anchor:middle}
.chapter-hub .lc-vis-description{font-size:11px;line-height:1.45;color:var(--text-secondary);margin:0 0 10px}
.chapter-hub .lc-equation{
  display:flex;flex-wrap:wrap;gap:9px 14px;justify-content:center;align-items:center;
  background:#fff;border:1px solid #e4ddec;border-radius:12px;
  margin:12px 0 4px;padding:12px 8px;font-size:18px;min-height:52px;
}
.chapter-hub .lc-meaning{font:650 12px/1.5 system-ui,sans-serif;color:var(--text-secondary)}
.chapter-hub .lc-tag{
  font:800 11px/1.4 system-ui,sans-serif;letter-spacing:.055em;
  color:var(--text-secondary);margin:0 0 7px
}
.chapter-hub .lc-detective{
  margin:12px 0 14px;border:1px solid #e3ddeb;border-radius:17px;
  padding:14px;background:#fff
}
.chapter-hub .lc-detective h5{font-size:17px;line-height:1.4;color:var(--text-primary);margin:0 0 11px}
.chapter-hub .lc-rules{display:grid;gap:8px}
.chapter-hub .lc-rules button{
  width:100%;min-height:48px;border:1px solid #dcd5e6;background:#fefcff;
  border-radius:11px;text-align:left;padding:10px 12px;font:700 13px/1.4 system-ui,sans-serif;
  color:var(--text-primary);cursor:pointer
}
.chapter-hub .lc-rules button[aria-pressed=true]{
  background:#f1ebfb;border-color:#8d72c4;box-shadow:inset 0 0 0 1px #8d72c4
}
.chapter-hub .lc-rule-feedback{
  margin:10px 0 0;padding:10px 12px;background:#faf1e9;
  border-radius:10px;font-size:13px;line-height:1.5;color:#65482e
}
.chapter-hub .lc-rule-feedback[data-correct=true]{background:#e9f5ee;color:var(--text-correct)}
.chapter-hub .lc-count-a,.chapter-hub .lc-count-b{
  fill:rgba(137,107,204,.13);stroke:#8069b4;stroke-width:2.5
}
.chapter-hub .lc-count-b{fill:rgba(73,157,134,.12);stroke:#4e967e}
.chapter-hub .lc-count-value{
  font:750 24px/1 Georgia,serif;text-anchor:middle;fill:#423560
}
.chapter-hub .lc-count-caption{
  font:700 12px/1.4 system-ui,sans-serif;text-anchor:middle;fill:#635574
}
.chapter-hub .lc-universe{fill:#fffefa;stroke:#b2a2cd;stroke-width:2}
.chapter-hub .lc-d-circle{fill:rgba(140,112,198,.065);stroke:#8872b6;stroke-width:2}
.chapter-hub .lc-d-member{fill:#f5f1fa;stroke:#b6a9d0;stroke-width:1}
.chapter-hub .lc-highlight .lc-d-member{fill:#d9f2e5;stroke:#33856a;stroke-width:2.2}
.chapter-hub .lc-d-number{
  font:750 16px Georgia,serif;fill:#46375d;text-anchor:middle
}
.chapter-hub .lc-d-legend{
  color:var(--text-explanation);font-size:12px;line-height:1.5;margin:0 2px 8px;text-align:center
}
.chapter-hub .sp2-journey .lc-lab .sp2-demo-controls button{
  min-width:44px;min-height:47px;font-size:16px
}
.chapter-hub .sp2-explanation{
  margin:7px 0 12px;padding:0;border:1px solid #e5deec;border-radius:13px;
  background:#fff;overflow:hidden
}
.chapter-hub .sp2-explanation summary,
.chapter-hub .rnlab-pitfall summary{
  min-height:45px;padding:11px 14px;cursor:pointer;display:flex;align-items:center;
  font:750 13px/1.5 system-ui,sans-serif;color:var(--text-explanation)
}
.chapter-hub .rnlab-pitfall{
  margin:10px 0 4px;border:1px solid #e5deec;border-radius:13px;background:#fff;overflow:hidden
}
.chapter-hub .rnlab-pitfall p{margin:0;padding:0 14px 12px}
.chapter-hub .sp2-explanation-body{padding:0 13px 13px}
.chapter-hub .sp2-journey .lc-hide-original{display:none}
@media (prefers-reduced-motion:no-preference){
  .chapter-hub .lc-node,.chapter-hub .lc-d-member{
    transition:fill .18s ease,stroke .18s ease
  }
}
@media(max-width:370px){
  .chapter-hub .sp2-journey .lc-lab{padding:10px}
  .chapter-hub .lc-scene{max-height:212px}
  .chapter-hub .lc-equation{font-size:16px}
}

/* In membership, the active question is the only instruction and the
   verified Rule Detective question needs no redundant "Current question" label. */
.chapter-hub .sp2-journey [data-living-concept="membership"] .sp2-demo-title,
.chapter-hub .sp2-journey [data-living-concept="membership"] .sp2-question-label{
  display:none
}
/* Membership status must switch immediately when an inside/outside choice changes. */
.chapter-hub .lc-node{transition:none!important}

/* Triggle Math-First v1
   Mobile-first low-distraction reader shared by all grades, both languages.
   No JavaScript dependencies, no fullscreen figure takeover. */
:root{--math-first-target:44px}
.chapter-hub .hub-heading-a11y{
 position:absolute!important;width:1px!important;height:1px!important;
 padding:0!important;margin:-1px!important;overflow:hidden!important;
 clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important
}
.chapter-hub .hub-top-actions{margin:0 0 5px!important}
.chapter-hub .hub-top-actions .hub-back-menu,
.chapter-hub .hub-top-actions .hub-back-class{
 border:0!important;background:transparent!important;box-shadow:none!important;
 min-height:44px!important;padding:7px 2px!important;border-radius:6px!important;
 color:var(--text-navigation)!important;font-weight:750!important;text-decoration:none!important
}
.chapter-hub .hub-top-actions button:hover{text-decoration:underline!important}
.chapter-hub .hub-panel{padding-top:0!important}
.chapter-hub .hub-quiz-progress{
 display:inline-flex;align-items:center;background:transparent!important;
 padding:4px 0!important;margin:0 0 7px!important;
 color:var(--text-secondary)!important;font-size:13px!important
}
.chapter-hub .hub-quiz-question:first-of-type{margin-top:3px}
.chapter-hub .hub-quiz-question{padding:12px!important}
.chapter-hub .hub-quiz-question h4{font-size:16px!important;line-height:1.5!important}
.chapter-hub .hub-quiz-answers button{font-size:15px!important}
.chapter-hub .hub-content-status{border-top:1px solid #ebe8f0;padding:8px 0;margin:12px 0 0}
.chapter-hub .hub-content-status summary{min-height:44px;font-size:13px;font-weight:720;cursor:pointer;color:var(--text-navigation);display:flex;align-items:center}
.chapter-hub .hub-content-status p{font-size:13px!important;color:var(--text-explanation);line-height:1.55}

/* Textbook thinking activities: single card, question, answer. No nested
   'Show worked answer' disclosure and no duplicate section introduction. */
.chapter-hub[data-hub-section="activities"] .hub-panel{margin:0!important;border:0!important}
.chapter-hub[data-hub-section="activities"] .hub-top-actions .hub-back-menu{font-size:14px!important;font-weight:600!important}
.chapter-hub .textbook-extras{
 margin:0!important;padding:0!important;border:0!important;min-width:0
}
.chapter-hub .activity-index-heading{
 font-size:18px!important;line-height:1.35!important;letter-spacing:-.02em;
 font-weight:680!important;color:var(--text-primary)!important;margin:2px 0 8px!important
}
.chapter-hub .textbook-extra{
 margin:0!important;border:0!important;border-bottom:1px solid #e8e5ed!important;
 background:transparent!important;border-radius:0!important;
 padding:0!important;box-shadow:none!important;min-width:0
}
.chapter-hub .textbook-extra>summary{
 min-height:56px!important;box-sizing:border-box;padding:10px 3px!important;margin:0!important;
 font-size:15px!important;line-height:1.4!important;font-weight:550!important;
 color:var(--text-primary)!important;cursor:pointer;display:grid!important;
 grid-template-columns:34px minmax(0,1fr) 20px;gap:10px;align-items:center;list-style:none!important;
 text-align:start;background:transparent!important;border:0!important;border-radius:8px!important
}
.chapter-hub .textbook-extra>summary::-webkit-details-marker{display:none}
.chapter-hub .textbook-extra>summary::marker{content:""}
.chapter-hub .textbook-extra>summary:focus-visible{outline:2px solid #6b55a2;outline-offset:-2px}
.chapter-hub .textbook-extra>summary .activity-mark{
 width:34px;height:34px;border-radius:10px;display:grid;place-items:center;
 font-size:19px;line-height:1;font-weight:600;color:#514078;background:#efebf7
}
.chapter-hub .textbook-extra[data-activity-kind="thinking"] .activity-mark{background:#f7edd9;color:#795616}
.chapter-hub .textbook-extra[data-activity-kind="progress"] .activity-mark{background:#e6f0e9;color:#285a43}
.chapter-hub .textbook-extra>summary .activity-copy{display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}
.chapter-hub .textbook-extra>summary .activity-kicker{font-size:11px;line-height:1.4;font-weight:600;color:var(--text-secondary)}
.chapter-hub .textbook-extra>summary .activity-title{font-size:15px;line-height:1.4;font-weight:550}
.chapter-hub .textbook-extra>summary .activity-translation-note{font-size:11px;line-height:1.4;font-weight:500;color:var(--text-secondary)}
.chapter-hub .textbook-extra>summary .activity-toggle{
 width:20px;height:20px;display:grid;place-items:center;color:var(--text-secondary);font-size:18px;line-height:1;font-weight:400
}
.chapter-hub .textbook-extra>summary .activity-toggle::before{content:"+"}
.chapter-hub .textbook-extra[open]>summary .activity-toggle::before{content:"−"}
.chapter-hub .textbook-extra[open]>summary{background:#f8f7fa!important}
@media(hover:hover){.chapter-hub .textbook-extra>summary:hover{background:#f8f7fa!important}}
.chapter-hub .textbook-extra>.task-question{
 margin:12px 4px 8px!important;font-size:16px!important;
 line-height:1.6!important;font-weight:600;color:var(--text-primary)!important;
 white-space:pre-line;overflow-wrap:anywhere
}
.chapter-hub .textbook-extra .task-solution{
 border-left:2px solid #9a88c3;margin:10px 4px 12px;
 background:#f8f6fd;border-radius:0 8px 8px 0;padding:12px;min-width:0
}
.chapter-hub .textbook-extra .task-solution-label{
 font-size:13px;line-height:1.3;color:var(--text-primary);margin:0 0 7px;font-weight:800
}
.chapter-hub .textbook-extra .task-answer{
 color:var(--text-explanation);font-size:15px;line-height:1.65;overflow-wrap:anywhere
}
.chapter-hub .textbook-extra .task-answer p{
 font-size:15px!important;line-height:1.65!important;
 margin:5px 0 8px!important;white-space:pre-wrap
}
.chapter-hub .task-source-details{
 margin:0 4px 10px!important;padding:0!important;
 border:0!important;border-left:0!important;background:transparent
}
.chapter-hub .task-source-details summary{
 min-height:32px!important;font-size:12px!important;font-weight:700!important;
 color:var(--text-navigation)!important;list-style-position:inside;cursor:pointer
}
.chapter-hub .task-source-details p{
 color:var(--text-explanation)!important;font-size:12px!important;line-height:1.5!important;margin:5px 0!important
}
.activity-table-scroll{max-width:100%;overflow-x:auto;scrollbar-width:thin;outline-offset:3px}
.activity-cardinality-table{
 width:100%;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums;
 min-width:360px;text-align:center;background:#fff;border-radius:8px;overflow:hidden
}
.activity-cardinality-table caption{font-size:12px;font-weight:800;color:var(--text-secondary);text-align:left;padding:4px 0 8px}
.activity-cardinality-table th,.activity-cardinality-table td{
 border:1px solid #ddd4ea;padding:7px 5px;white-space:nowrap
}
.activity-cardinality-table th{background:#eee9f9;color:var(--text-primary);font-weight:800}
.activity-cardinality-table tbody tr:nth-child(even){background:#faf8fe}

/* The figure is a compact, translucent comparison sheet. The underlying
   worked answer stays visible, and a duplicate readable answer is inside. */
.figure-dialog{
 position:fixed!important;inset:auto auto max(12px,env(safe-area-inset-bottom)) 50%!important;
 transform:translateX(-50%);margin:0!important;
 width:min(96vw,660px)!important;max-width:660px;
 max-height:min(76dvh,650px)!important;overflow-y:auto!important;
 border:1px solid rgba(147,120,196,.75)!important;border-radius:20px!important;
 background:rgba(239,232,250,.68)!important;color:var(--text-explanation);
 -webkit-backdrop-filter:blur(14px) saturate(1.15);
 backdrop-filter:blur(14px) saturate(1.15);
 box-shadow:0 10px 40px rgba(42,29,84,.17),inset 0 1px 0 rgba(255,255,255,.75)!important
}
.figure-dialog::backdrop{
 background:rgba(28,21,51,.045)!important;
 -webkit-backdrop-filter:none!important;backdrop-filter:none!important
}
.figure-dialog .dialog-header{
 position:sticky;top:0;z-index:2;padding:9px 14px!important;
 background:rgba(250,246,255,.73);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)
}
.figure-dialog .dialog-header h3{font-size:16px!important;margin:2px 0!important}
.figure-dialog .dialog-close{
 color:var(--text-navigation)!important;background:var(--surface-content)!important;
 border:1px solid var(--control-border)!important;font-size:14px!important;
 min-height:44px!important;min-width:72px!important
}
.figure-dialog .diagram-content{padding:8px 12px 0!important;overflow-x:auto}
.figure-dialog .diagram-content svg{max-height:280px;width:100%;height:auto}
.figure-dialog .diagram-caption{
 font-size:12px!important;line-height:1.5!important;margin:5px 12px!important;color:var(--text-secondary)!important
}
.figure-dialog .diagram-compare{
 margin:8px 12px 12px;padding:10px 12px;border:1px solid #cfdfd6;
 border-radius:12px;background:rgba(244,252,248,.88)
}
.figure-dialog .diagram-compare strong{display:block;font-size:12px;color:var(--text-correct);margin-bottom:5px}
.figure-dialog .diagram-compare .math-answer{font-size:16px;line-height:1.5;color:var(--text-correct)}
.figure-dialog button:focus-visible,.activity-table-scroll:focus-visible{outline:3px solid #7351b9;outline-offset:2px}

@media(max-width:800px){
 /* A single 54px row replaces the two large navigation rows on question pages. */
 body.textbook-reader .appbar{
  display:grid!important;grid-template-columns:minmax(0,1fr) 40px 40px auto!important;
  grid-template-rows:1fr!important;gap:5px!important;align-items:center!important;
  height:54px!important;min-height:54px!important;padding:4px 8px!important
 }
 body.textbook-reader .brand-mobile{grid-column:1!important;grid-row:1!important;min-width:0}
 body.textbook-reader .brand-mobile b{font-size:17px!important;white-space:nowrap}
 body.textbook-reader .brand-mobile .logo{width:29px!important;height:29px!important}
 body.textbook-reader .appbar-actions{display:contents!important}
 body.textbook-reader .browse-button{
  grid-column:2!important;grid-row:1!important;justify-self:center!important;
  width:40px!important;min-width:40px!important;height:40px!important;
  min-height:40px!important;padding:0!important;justify-content:center!important;
  margin:0!important;border-radius:11px!important
 }
 body.textbook-reader .browse-button [data-i18n],
 body.textbook-reader .browse-button #browseChevron{display:none!important}
 body.textbook-reader .browse-button .browse-symbol{font-size:22px!important}
 body.textbook-reader .home-link{
  grid-column:3!important;grid-row:1!important;width:40px!important;
  min-width:40px!important;height:40px!important;justify-self:center!important;
  min-height:40px!important;margin:0!important;padding:0!important;justify-content:center!important
 }
 body.textbook-reader .home-link [data-i18n]{display:none!important}
 body.textbook-reader .home-link .home-icon{font-size:23px!important;line-height:1!important}
 body.textbook-reader .lang-switch{
  grid-column:4!important;grid-row:1!important;justify-self:end!important;
  margin:0!important;min-width:0!important
 }
 body.textbook-reader .lang-switch button{min-height:36px!important;padding:5px 7px!important;font-size:12px!important}
 /* Breadcrumb is one scrollable line; the last group is duplicated by the
    exercise badge and the Find topic drawer, so do not stack a third pill. */
 body.textbook-reader .status-row{margin:4px 0 6px!important;min-height:0!important;overflow:hidden}
 body.textbook-reader .crumb{flex-wrap:nowrap!important;overflow-x:auto!important;gap:4px!important;scrollbar-width:none;white-space:nowrap!important}
 body.textbook-reader .crumb::-webkit-scrollbar{display:none}
 body.textbook-reader .crumb-link{
  flex:none;max-width:min(41vw,170px);min-height:34px!important;padding:5px 8px!important;
  font-size:16px!important;line-height:1.2!important;overflow:hidden;text-overflow:ellipsis;
  border-radius:9px!important
 }
 body.textbook-reader .crumb-link:last-child,
 body.textbook-reader .crumb-sep:last-of-type{display:none!important}
 body.textbook-reader .crumb-sep{font-size:15px!important}
 body.textbook-reader .lesson-container{padding:7px 10px 10px!important}
 body.textbook-reader .lesson-card{
  display:flex!important;flex-direction:column!important;gap:0!important;
  padding:12px 12px 15px!important;border-radius:18px!important
 }
 body.textbook-reader .lesson-card>.question-top{order:1;min-height:0!important}
 body.textbook-reader .lesson-card>.lesson-title-row{order:2;margin-top:5px!important}
 body.textbook-reader .lesson-card>#questionText{order:3}
 body.textbook-reader .lesson-card>#answerBox{order:4}
 body.textbook-reader .lesson-card>#inlineFigure{order:5}
 body.textbook-reader .lesson-card>#stepsRegion{order:7}
 body.textbook-reader .lesson-card>#visualLessonAction{order:8}
 body.textbook-reader .lesson-card>.lesson-bottom{order:9}
 body.textbook-reader .lesson-progress{font-size:11px!important}
 body.textbook-reader .mini-topic{display:none!important}
 body.textbook-reader .lesson-title-row h2{font-size:19px!important;line-height:1.3!important}
 body.textbook-reader .question-text{
  max-height:none!important;min-height:0!important;overflow:visible!important;
  margin:8px 0 0!important;padding:11px 13px!important;
  font-size:clamp(15px,3.9vw,17px)!important;line-height:1.5!important
 }
 body.textbook-reader .answer-box{
  margin:9px 0 0!important;padding:10px 12px!important;border-radius:12px!important;
  min-height:0!important
 }
 body.textbook-reader .answer-box>div:first-child{font-size:12px!important}
 body.textbook-reader .answer-box .math-answer{font-size:clamp(16px,4vw,19px)!important;line-height:1.4!important}
 body.textbook-reader .steps-region{
  margin:11px 0 0!important;padding:0!important;max-height:none!important;
  min-height:0!important;overflow:visible!important
 }
 body.textbook-reader .steps{overflow:visible!important;max-height:none!important}
 body.textbook-reader .inline-figure{
  margin:8px 0 0!important;padding:8px!important;min-height:0!important
 }
 body.textbook-reader .inline-figure-visual svg{max-height:118px!important;height:auto!important}
 body.textbook-reader .inline-figure figcaption{font-size:11px!important;line-height:1.4!important}
 body.textbook-reader .page-controls{
  grid-template-areas:"chapters chapters" "previous next"!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  row-gap:2px!important;column-gap:8px!important;
  padding:3px 9px calc(5px + env(safe-area-inset-bottom))!important;
  border-top:1px solid #e2d9ec!important;
  box-shadow:none!important;border-radius:0!important;background:#fff!important;
  min-height:0!important
 }
 body.textbook-reader .page-controls .all-chapters-button{
  min-height:48px!important;padding:5px!important;font-size:16px!important;
  border:0!important;box-shadow:none!important;background:transparent!important;
  color:var(--text-navigation)!important
 }
 body.textbook-reader .page-controls .all-chapters-button .nav-arrow{font-size:16px!important}
 body.textbook-reader .page-controls .page-button{
  min-height:48px!important;padding:8px!important;font-size:16px!important;
  line-height:1.25!important;border-radius:10px!important
 }
 body.textbook-reader .page-controls #allChaptersReturn{margin:0!important}
 body.textbook-reader .lesson-container{scroll-padding-bottom:8px!important}
 .figure-dialog{
  bottom:calc(9px + env(safe-area-inset-bottom))!important;
  max-height:min(64dvh,550px)!important
 }
 .figure-dialog .diagram-content svg{max-height:185px!important}
 .figure-dialog .diagram-caption{font-size:11px!important}
 .figure-dialog .diagram-compare .math-answer{font-size:15px!important}
}
@media(max-width:355px){
 body.textbook-reader .brand-mobile b{font-size:15px!important}
 body.textbook-reader .appbar{grid-template-columns:minmax(0,1fr) 38px 38px auto!important;gap:3px!important;padding:4px 6px!important}
 body.textbook-reader .browse-button,body.textbook-reader .home-link{width:38px!important;min-width:38px!important}
 body.textbook-reader .lang-switch button{font-size:11px!important;padding:5px!important}
 body.textbook-reader .crumb-link{font-size:16px!important}
 .chapter-hub .textbook-extra>.task-question{font-size:15px!important}
}
@media(prefers-reduced-transparency:reduce){
 .figure-dialog{background:#fdfbff!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
}
@media(prefers-reduced-motion:reduce){
 .figure-dialog,.chapter-hub .textbook-extra{animation:none!important;transition:none!important}
}


/* Reader navigation: one quiet return link. Never force a second
   navigation action or cover the question and immediate final answer. */
body.textbook-reader .question-return{
 display:flex!important;align-items:center!important;
 margin:0 0 6px!important;padding:0!important;gap:0!important
}
body.textbook-reader .question-return button{
 display:inline-flex!important;justify-content:flex-start!important;align-items:center!important;
 width:auto!important;max-width:100%!important;min-height:44px!important;
 padding:6px 8px!important;font-size:15px!important;line-height:1.35!important;
 font-weight:750!important;text-align:left!important;white-space:normal!important;
 color:var(--text-navigation)!important;border:0!important;border-radius:9px!important;
 background:transparent!important;box-shadow:none!important
}
body.textbook-reader .question-return button:hover{background:#f3eefb!important}
body.textbook-reader .question-return button:focus-visible{outline:3px solid #7458c6!important;outline-offset:2px!important}



/* Venn-only viewing polish: the Figure button is the single entry point.
   Remove any visual duplicate preview; preserve other source-required drawings.
   SVG retains aria-labelledby <title>/<desc> for non-visual access. */
body.textbook-reader .inline-figure:has(.g9-venn-svg){display:none!important}
.figure-dialog .g9-venn-gallery{
 display:grid!important;grid-template-columns:1fr!important;
 width:100%!important;gap:8px!important;align-items:stretch!important
}
.figure-dialog .diagram-content:has(.g9-venn-gallery){
 display:block!important;width:100%!important;box-sizing:border-box!important;
 padding:0 6px 2px!important;overflow-x:hidden!important;
 max-height:min(52dvh,520px)!important;scrollbar-width:thin
}
.figure-dialog .g9-venn-figure{
 width:100%!important;max-width:none!important;min-width:0!important;
 padding:0!important;margin:0!important;border:0!important;
 border-radius:0!important;box-shadow:none!important;background:transparent!important
}
.figure-dialog .diagram-content .g9-venn-svg{
 display:block!important;width:100%!important;max-width:none!important;
 height:auto!important;max-height:none!important;margin:0!important;
 aspect-ratio:560 / 420!important;object-fit:fill!important
}
.figure-dialog .g9-venn-figure figcaption{
 padding:5px 0 3px!important;margin:0!important;
 font-weight:800!important;line-height:1.25!important
}
@media(max-width:800px){
 .figure-dialog:has(.g9-venn-gallery){
  max-height:min(72dvh,660px)!important
 }
 .figure-dialog .diagram-content:has(.g9-venn-gallery){
  max-height:min(46dvh,470px)!important
 }
}

body.textbook-reader .grade10-statistics-crumb .grade10-statistics-crumb-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font: inherit;
}

/* Keep the visually hidden KaTeX MathML inside each table's scroll container. */
body.textbook-reader .triggle-table-wrap {
  position: relative;
}

.g10ch8-lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .55rem;
  min-width: 0;
}
.g10ch8-lab > * { min-width: 0; }
.g10ch8-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .6rem;
  margin: .3rem 0;
}
.g10ch8-control > span { min-width: 0; overflow-wrap: anywhere; }
.g10ch8-control select {
  min-height: 2.75rem;
  max-width: 100%;
  padding: .3rem .5rem;
  border: 1px solid #64748b;
  border-radius: .45rem;
  background: var(--surface-content);
  color: var(--text-primary);
  font: inherit;
}
.g10ch8-graphic {
  display: block;
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  color: #172554;
  font-size: 12px;
}
.g10ch8-axis, .g10ch8-circle, .g10ch8-tree-active {
  stroke: #334155;
  fill: none;
  stroke-width: 1.5;
}
.g10ch8-mean {
  stroke: #7c2d12;
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}
.g10ch8-mean-sample { color: #7c2d12; }
.g10ch8-point { fill: #3730a3; }
.g10ch8-tree-muted { stroke: #cbd5e1; stroke-width: 1.5; }
.g10ch8-region { fill: #fff; stroke: #64748b; }
.g10ch8-region.is-selected { fill: #c7d2fe; }
.g10ch8-result, .g10ch8-legend { margin: 0; }
.g10ch8-outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.g10ch8-outcomes li {
  min-width: 2.4rem;
  padding: .35rem .45rem;
  border: 1px solid #64748b;
  border-radius: .35rem;
  text-align: center;
}
.g10ch8-outcomes .g10ch8-favourable {
  border: 2px solid #3730a3;
  background: #e0e7ff;
  color: #172554;
}
.g10ch8-concept-link {
  align-self: flex-start;
  margin-top: .35rem;
  padding: .45rem .65rem;
  border: 1px solid #c7d2fe;
  border-radius: .6rem;
  background: var(--bond-tint);
  color: var(--text-navigation);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

/* Inline, discrete numeric controls: no Android selection dialog. */
.g10ch8-range-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .15rem .65rem;
  width: 100%;
  margin-block: .45rem;
}
.g10ch8-control-name {
  overflow-wrap: anywhere;
}
.g10ch8-range-value {
  color: var(--text-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: end;
}
.g10ch8-range-control .g10ch8-range {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  accent-color: var(--text-navigation);
  cursor: pointer;
}
.g10ch8-range-control .g10ch8-range:focus-visible {
  outline: 2px solid #3730a3;
  outline-offset: 3px;
  border-radius: .3rem;
}
.g10ch8-range-bounds {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}

/* Always-visible lesson and figures. No touch-triggered hidden states. */
@media (max-width:800px){
 body.textbook-reader #figureBtn:not([hidden]){
   display:inline-flex!important;opacity:1!important;visibility:visible!important;
   pointer-events:auto!important;
 }
 body.textbook-reader #inlineFigure:not([hidden]){
   display:block!important;opacity:1!important;visibility:visible!important;
   pointer-events:auto!important;
 }
 body.textbook-reader #figureBtn[hidden],
 body.textbook-reader #inlineFigure[hidden]{display:none!important}
 body.textbook-reader .lesson-card>.question-top,
 body.textbook-reader .lesson-card>.lesson-title-row,
 body.textbook-reader .lesson-card>#questionText,
 body.textbook-reader .lesson-card>#answerBox,
 body.textbook-reader .lesson-card>#stepsRegion{
   visibility:visible!important;opacity:1!important;
 }
 body.textbook-reader #questionNavDock{
   visibility:visible!important;opacity:1!important;
   pointer-events:auto!important;transform:none!important;
 }
 body.textbook-reader .lesson-card>.lesson-bottom{display:flex!important}
 body.textbook-reader .focus-nav-toggle{display:none!important}
}
@media(prefers-reduced-motion:reduce){
 body.textbook-reader .appbar{transition:none!important;animation:none!important}
}

/* Fixed reading context without wasting a separate "Back to worked examples"
   row. The breadcrumb remains an actual chapter picker; the bottom dock
   retains Back to all chapters, Previous and Next page. */
body.textbook-reader .question-return,
body.textbook-reader #questionReturn{
  display:none!important;
}
body.textbook-reader .status-row{
  position:sticky!important;
  top:70px;
  z-index:20;
  background:#faf9f6!important;
  border-bottom:1px solid #e7e2ee;
  padding:7px 2px!important;
  margin:0 0 8px!important;
  isolation:isolate;
}
@media(max-width:800px){
  /* The appbar already sits above the independently scrolling lesson area.
     Keep it permanently visible; pin breadcrumbs to the top of that area. */
  body.textbook-reader .appbar{
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
  body.textbook-reader .status-row{
    position:sticky!important;
    top:0!important;
    z-index:20!important;
    min-height:42px!important;
    margin:0 0 8px!important;
    padding:5px 2px 7px!important;
    backdrop-filter:none!important;
  }
}/* One useful action, placed immediately beneath the example/question title.
   Quick solution is always rendered in #quickSteps; there is no Quick button. */




@media(max-width:800px){

  body.textbook-reader .lesson-card>#questionText{order:4!important}
  body.textbook-reader .lesson-card>#answerBox{order:5!important}
  body.textbook-reader .lesson-card>#inlineFigure{order:6!important}
  body.textbook-reader .lesson-card>#stepsRegion{order:7!important}
  body.textbook-reader .lesson-card>#visualLessonAction{order:8!important}
  body.textbook-reader .lesson-card>.lesson-bottom{order:9!important}
}

/* Adaptive Continuous Reader — one document scroll for all Grade 9–12 questions.
   The header and small context remain reachable; the question, equations, and
   worked answer use normal document flow, never a nested vertical viewport. */
body.textbook-reader #allChaptersReturn{display:none!important}
body.textbook-reader .page-controls{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-areas:"previous next"!important;
  column-gap:10px!important;
  row-gap:0!important;
  max-width:920px;
  margin:0 auto!important;
  box-shadow:none!important;
}
body.textbook-reader #questionNavDock #previous{grid-area:previous!important}
body.textbook-reader #questionNavDock #next{grid-area:next!important}
body.textbook-reader .page-controls .page-button{
  min-width:0;min-height:48px!important;font-size:clamp(14px,3.8vw,16px)!important;
  line-height:1.3!important;padding:8px 12px!important;white-space:normal!important;
}
body.textbook-reader #questionJump[hidden]{display:none!important}
body.textbook-reader #questionJump{
  flex:none;max-width:44%;min-height:40px;border:1px solid #ddd2ee;
  background:#f6f1ff;color:#4a3975;border-radius:10px;
  font-size:13px;font-weight:800;line-height:1.3;padding:8px 10px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
body.textbook-reader #questionJump:focus-visible{
  outline:3px solid #7351b9;outline-offset:2px;
}
body.textbook-reader #lessonCard>.lesson-bottom,
body.textbook-reader #lessonCard>#answerBox{display:none!important}
body.textbook-reader .final-answer-step{
  display:grid;grid-template-columns:25px minmax(0,1fr);gap:9px;
  align-items:start;border:1px solid #cbe6d7;border-radius:13px;
  background:#eefaf3;padding:11px 10px;margin:10px 0 5px;
}
body.textbook-reader .final-answer-step .step-circle{
  width:25px;height:25px;background:#d5f0e3;color:#177753;font-size:14px;
}
body.textbook-reader .final-answer-label{
  display:block;color:#236c51;font-size:12px;line-height:1.4;font-weight:800;margin-bottom:5px;
}
body.textbook-reader .final-answer-value{
  color:#176d51;font-size:clamp(16px,3.8vw,19px);
  font-weight:800;line-height:1.45;overflow-wrap:anywhere;min-width:0;
}
body.textbook-reader .final-answer-value.answer-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:5px 9px;
}
body.textbook-reader .final-answer-value .answer-part{min-width:0;overflow-wrap:anywhere}
body.textbook-reader .twd-worked-step:last-child .twd-part-solution{
  border-color:#cbe6d7;background:#eefaf3;
}
@media(max-width:800px){
  body.textbook-reader{--reader-question-size:clamp(15px,3.9vw,17px)}
  html:has(body.textbook-reader){scroll-behavior:auto}
  body.textbook-reader{
    height:auto!important;min-height:100%!important;
    overflow-x:hidden!important;overflow-y:auto!important;
    touch-action:pan-y!important;
  }
  body.textbook-reader .app-shell{
    height:auto!important;min-height:100dvh!important;overflow:visible!important;
  }
  body.textbook-reader .workspace{
    display:block!important;height:auto!important;min-height:100dvh!important;
    overflow:visible!important;
    padding-bottom:calc(var(--triggle-reader-dock-height,70px) + 18px + env(safe-area-inset-bottom))!important;
  }
  body.textbook-reader .appbar{
    position:sticky!important;top:0!important;z-index:50!important;
    height:54px!important;min-height:54px!important;
    visibility:visible!important;opacity:1!important;transform:none!important;
  }
  body.textbook-reader .lesson-container{
    display:block!important;height:auto!important;min-height:0!important;max-height:none!important;
    flex:none!important;overflow:visible!important;
    padding:7px 10px 12px!important;
  }
  body.textbook-reader .status-row{
    position:sticky!important;top:54px!important;z-index:35!important;
    display:flex!important;align-items:center!important;justify-content:space-between!important;
    gap:8px!important;min-height:42px!important;
    margin:0 0 8px!important;padding:4px 4px 7px!important;
    background:#faf9f6!important;border-bottom:1px solid #e7e2ee!important;
  }
  body.textbook-reader .status-row .crumb{
    display:flex!important;flex:1 1 auto!important;min-width:0!important;
    flex-wrap:nowrap!important;max-width:none!important;
    gap:4px!important;overflow:hidden!important;white-space:nowrap!important;
  }
  body.textbook-reader .status-row .crumb-link{
    min-height:36px!important;min-width:0!important;
    padding:6px 8px!important;font-size:clamp(13px,3.7vw,15px)!important;
    line-height:1.3!important;white-space:nowrap!important;
    overflow:hidden!important;text-overflow:ellipsis!important;max-width:45vw!important;
  }
  body.textbook-reader .status-row .crumb-link:last-child,
  body.textbook-reader .status-row .crumb-sep:last-of-type{
    display:none!important;
  }
  body.textbook-reader.reader-question-past .status-row .crumb-link:first-child,
  body.textbook-reader.reader-question-past .status-row .crumb-sep:first-of-type{
    display:none!important;
  }
  body.textbook-reader .status-row #gradeTotal{display:none!important}
  body.textbook-reader #lessonCard{
    display:flex!important;flex-direction:column!important;flex:none!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    overflow:visible!important;padding:12px 13px 17px!important;
  }
  body.textbook-reader #lessonCard>.question-top{order:1!important;flex:0 0 auto!important}
  body.textbook-reader #lessonCard>.lesson-title-row{order:2!important;flex:0 0 auto!important}
  body.textbook-reader #lessonCard>#questionText{
    order:3!important;flex:none!important;height:auto!important;min-height:0!important;
    max-height:none!important;overflow:visible!important;white-space:pre-wrap!important;
    overflow-wrap:anywhere!important;font-size:var(--reader-question-size)!important;
    line-height:1.55!important;margin:9px 0 0!important;padding:12px 13px!important;
    scroll-margin-top:115px!important;
  }
  body.textbook-reader #lessonCard>#inlineFigure{order:4!important;flex:none!important}
  body.textbook-reader #lessonCard>#answerBox{order:6!important}
  body.textbook-reader #lessonCard>#stepsRegion{
    order:7!important;display:block!important;flex:none!important;
    height:auto!important;min-height:0!important;max-height:none!important;
    margin:11px 0 0!important;padding:0 1px 6px!important;
    overflow:visible!important;overscroll-behavior:auto!important;
  }
  body.textbook-reader #lessonCard>#visualLessonAction{order:8!important;flex:none!important}
  body.textbook-reader #lessonCard>.lesson-bottom{order:9!important}
  body.textbook-reader #stepsList,body.textbook-reader #quickSteps{
    height:auto!important;max-height:none!important;overflow:visible!important;
  }
  body.textbook-reader #lessonCard .lesson-divider{
    position:static!important;margin:14px 0 10px!important;padding-top:12px!important;
  }
  body.textbook-reader #lessonCard .step-reason{
    font-size:15px!important;line-height:1.55!important;
  }
  body.textbook-reader #lessonCard .worked-step{padding:9px 0!important}
  body.textbook-reader .reference-line,body.textbook-reader .bottom-extras,
  body.textbook-reader .class-dock{display:none!important}
  body.textbook-reader #questionNavDock:not([hidden]){
    position:fixed!important;left:0!important;right:0!important;bottom:0!important;
    top:auto!important;z-index:40!important;display:grid!important;
    width:100%!important;max-width:none!important;
    grid-template-areas:"previous next"!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    margin:0!important;column-gap:9px!important;row-gap:0!important;
    padding:5px max(9px,env(safe-area-inset-right))
      calc(5px + env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left))!important;
    border:0!important;border-top:1px solid #e1dbe9!important;
    border-radius:0!important;background:#fff!important;
    box-shadow:none!important;transform:none!important;
    opacity:1!important;visibility:visible!important;pointer-events:auto!important;
  }
  body.textbook-reader #questionNavDock .page-button{
    min-height:48px!important;border-radius:10px!important;
    font-size:clamp(14px,3.8vw,16px)!important;padding:8px!important;
  }
  body.textbook-reader #stepsRegion:focus-visible,
  body.textbook-reader #questionText:focus-visible{
    outline:2px solid #8870c7;outline-offset:2px;
  }
}
@media(max-width:350px){
  body.textbook-reader #questionJump{max-width:40%;font-size:12px;padding:7px 6px}
}
@media(prefers-reduced-motion:reduce){
  body.textbook-reader #questionText,
  body.textbook-reader #stepsRegion{scroll-behavior:auto!important;animation:none!important}
}

/* KaTeX owns formula geometry. Keep all scroll/clipping outside its glyphs. */
.triggle-tex{display:inline-block;max-width:100%;vertical-align:middle;font-weight:normal;line-height:1.5;overflow-x:auto;overflow-y:hidden;padding:.25em .12em;box-sizing:border-box;overscroll-behavior-x:contain}
.triggle-tex-display{display:block;text-align:center;margin:.3em 0;padding:.5em .15em}
.triggle-tex .katex-display{margin:0}
.triggle-tex .katex{font-size:1.1em;text-align:initial;white-space:nowrap}
.triggle-tex-display .katex{text-align:center}
.triggle-tex:focus-visible{outline:2px solid var(--text-navigation);outline-offset:2px}
.structured-equation{min-width:0;font-size:clamp(16px,2vw,20px);line-height:1.6}
.structured-equation .triggle-tex-display + .triggle-tex-display{margin-top:.65em}
.worked-step>div,.final-answer-content,.final-answer-value{min-width:0;max-width:100%}
.question-text .triggle-tex-display,.final-answer-value .triggle-tex-display{font-size:clamp(17px,2vw,21px)}
.math-fallback{font-weight:normal;overflow-wrap:anywhere}
/* Keep the longer derivation's small labels and two-digit step numbers readable. */
#lessonCard:has(.triggle-tex) :is(#questionLabel,#itemPosition,#stepCount){color:var(--text-secondary)}
#lessonCard:has(.triggle-tex) .worked-step:not(.final-answer-step) .step-circle{color:var(--text-secondary)}
#lessonCard:has(.triggle-tex) .step-reason{color:var(--text-explanation)}
#lessonCard:has(.triggle-tex) :is(#questionTitle,[data-i18n="stepByStep"]){color:var(--text-primary)}

/* Triggle mathematics typography contract (2026-11-13):
   offline KaTeX as the primary display, not plain-text slash fractions.
   Align maths like a clear worked ChatGPT explanation; scroll only the
   individual exceptionally wide formula, never the full question page. */
#lessonCard .worked-step .structured-equation{
  max-width:100%;
  min-width:0;
  font-size:clamp(17px,4vw,20px);
  line-height:1.7;
  overflow:visible;
}
#lessonCard .structured-equation .triggle-tex-display,
#lessonCard .final-answer-value .triggle-tex-display,
#lessonCard #answerText .triggle-tex-display{
  display:block;
  width:100%;
  max-width:100%;
  margin:.32em 0 .55em;
  padding:.33em .12em .48em;
  text-align:left;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  overscroll-behavior-x:contain;
}
#lessonCard :is(.structured-equation,.final-answer-value,#answerText) .triggle-tex-display .katex-display,
#lessonCard :is(.structured-equation,.final-answer-value,#answerText) .triggle-tex-display .katex{
  text-align:left;
}
#lessonCard :is(.structured-equation,.final-answer-value,#answerText) .triggle-tex-display .katex{
  font-size:1.04em;
}
#lessonCard .structured-equation .katex-html{
  white-space:nowrap;
}
#lessonCard .worked-step .step-reason{
  margin-bottom:.28em;
}
@media (max-width:420px){
 #lessonCard .worked-step .structured-equation{font-size:17px}
 #lessonCard :is(.structured-equation,.final-answer-value,#answerText) .triggle-tex-display{
   margin:.3em 0 .45em;
   padding:.28em .08em .4em;
 }
}

/* Class 9 reader rhythm, shared by every chapter. Mobile declarations match
   the specificity of the existing pinned reader overrides. */
body.g9-math-first #lessonCard > #questionText {
  font-size: clamp(18px, 4.5vw, 20px) !important;
  line-height: 1.55 !important;
  font-weight: 600;
}
body.g9-math-first #lessonCard .step-reason {
  font-size: clamp(16px, 4vw, 18px) !important;
  line-height: 1.55 !important;
  margin-bottom: .1em;
  color: var(--bond-charcoal);
}
body.g9-math-first #lessonCard .lesson-divider {
  margin: 7px 0 6px !important;
  padding-top: 9px !important;
}
body.g9-math-first #lessonCard .lesson-divider > [data-i18n="stepByStep"] {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: normal;
  color: var(--bond-graphite);
}
body.g9-math-first #lessonCard .worked-step {
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 9px;
  padding: 7px 0 !important;
}
body.g9-math-first #lessonCard .step-circle {
  width: 25px;
  height: 25px;
  background: var(--bond-tint);
  color: var(--bond-muted);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
body.g9-math-first #lessonCard .step-equation,
body.g9-math-first #lessonCard .final-answer-value {
  font-size: clamp(19px, 4.7vw, 22px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--bond-graphite);
}
body.g9-math-first #lessonCard .step-equation:empty { display: none; }

/* KaTeX's inline strut aligns the formula with the surrounding prose.
   Allow tall glyphs, and contain width before scroll controls are prepared. */
body.g9-math-first #lessonCard .triggle-tex:not(.triggle-tex-display) {
  display: inline-flex;
  align-items: baseline;
  vertical-align: baseline;
  padding: .06em .15em;
  overflow: clip visible;
}
/* Keep KaTeX's own breakpoints between terms and relations. A single
   unbreakable fragment can still use the reader's local scroll. */
body.g9-math-first #lessonCard .triggle-tex:not(.triggle-tex-display) .katex {
  min-width: 0;
}
body.g9-math-first #lessonCard .triggle-tex:not(.triggle-tex-display) .katex-html {
  white-space: normal;
}
body.g9-math-first #lessonCard :is(#questionText, .structured-equation, .final-answer-value, #answerText) .triggle-tex-display {
  font-size: clamp(19px, 4.7vw, 22px);
  margin: .08em 0;
  padding: .16em .12em .22em;
  text-align: left;
  overflow: clip visible;
}
/* Oversized expressions still scroll locally. Reserve vertical room for
   denominators, radicals and raised symbols inside the scroll container. */
body.g9-math-first #lessonCard .triggle-tex:not(.triggle-tex-display)[tabindex],
body.g9-math-first #lessonCard :is(#questionText, .structured-equation, .final-answer-value, #answerText) .triggle-tex-display[tabindex] {
  padding-block: .4em;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
body.g9-math-first #lessonCard :is(#questionText, .structured-equation, .final-answer-value, #answerText) .triggle-tex-display :is(.katex-display, .katex) {
  text-align: left;
}
body.g9-math-first #lessonCard :is(#questionText, .structured-equation, .final-answer-value, #answerText) .triggle-tex-display .katex {
  font-size: 1.05em;
}
body.g9-math-first #questionText .g9-question-option {
  display: inline-block;
  max-width: 100%;
}
body.g9-math-first #lessonCard .triggle-tex[tabindex]:focus-visible {
  outline-color: var(--bond-burgundy);
}
body.g9-math-first #lessonCard .final-answer-step {
  margin: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--bond-border);
  border-radius: 0;
  background: transparent;
}
body.g9-math-first #lessonCard .final-answer-step .step-circle {
  background: var(--surface-correct);
  color: var(--bond-emerald);
}
body.g9-math-first #lessonCard .final-answer-label {
  margin: 1px 0 2px;
  font-size: 15px;
  font-weight: 650;
  color: var(--bond-emerald);
}

/* Existing Grade 9 concept and activity pages use the same reading scale. */
body.g9-math-first #chapterOverview :is(.sp2-idea, .sp2-example, .sp2-recall > p, .task-question, .task-answer),
body.g9-math-first #chapterOverview .rnlab .rnlab-step-content p {
  font-size: 16px !important;
  line-height: 1.6 !important;
  color: var(--bond-charcoal);
}
body.g9-math-first #chapterOverview .sp2-concept-question {
  font-size: clamp(17px, 4.4vw, 19px) !important;
}
body.g9-math-first #chapterOverview .sp2-formula .triggle-tex { font-size: 18px; }

@media (max-width: 800px) {
  body.g9-math-first.textbook-reader { touch-action: auto !important; }
  body.g9-math-first #lessonCard .triggle-tex[tabindex] {
    scroll-margin-block: 108px var(--triggle-reader-dock-height, 70px);
  }
}

/* Match the pinned exercise reader. Scale the equation container so KaTeX
   retains its own relative sizes for scripts, fractions and nested radicals. */
@media (max-width:800px) {
  body.textbook-reader.exercise-reading-scale #lessonCard.lesson-card > #questionText {
    font-size:var(--reader-question-size)!important;
    font-weight:600;
  }
  body.textbook-reader.exercise-reading-scale #lessonCard .worked-step .step-reason {
    font-size:15px!important;
    font-weight:400;
  }
  body.textbook-reader.exercise-reading-scale #lessonCard #questionHead {font-size:19px;font-weight:700}
  body.textbook-reader.exercise-reading-scale #stepsList details > summary {font-size:12px}
  body.textbook-reader.exercise-reading-scale #lessonCard .worked-step .structured-equation {
    font-size:clamp(17px,4vw,20px)!important;
  }
  body.textbook-reader.exercise-reading-scale #lessonCard #stepsList .structured-equation .triggle-tex {
    font-size:inherit;
  }
  body.textbook-reader.exercise-reading-scale #lessonCard #stepsList .structured-equation .triggle-tex .katex {
    font-size:1.04em;
  }
}

/* Let Tamil table headings wrap inside the exercise reader's four columns. */
@media (max-width: 430px) {
  html[lang="ta"] .exercise-reading-scale .triggle-data-table {
    table-layout: fixed;
  }
  html[lang="ta"] .exercise-reading-scale .triggle-data-table th {
    overflow-wrap: anywhere;
  }
}

/* Isolated from the existing exercise reader and other grades. */
.matrix-concepts{--mc-ink:#352c49;--mc-purple:#65468c;--mc-line:#ded4e8;color:var(--mc-ink);max-width:780px;margin:0 auto;scroll-margin-top:74px;font-size:1rem;line-height:1.5}
.matrix-concepts *{box-sizing:border-box}
.matrix-concepts [hidden]{display:none!important}
.matrix-concepts button,.matrix-concepts select,.mc-dialog button{font:inherit;min-height:44px;border:1px solid var(--mc-line,#ded4e8);border-radius:10px;padding:8px 12px;background:#fffdfa;color:#49355f;cursor:pointer;max-width:100%}
.matrix-concepts button:disabled{opacity:.48;cursor:default}
.matrix-concepts button:focus-visible,.matrix-concepts select:focus-visible,.mc-dialog button:focus-visible{outline:3px solid #8970aa;outline-offset:3px}
.matrix-concepts .mc-primary{background:#65468c;color:white;border-color:#65468c}
.mc-top{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--mc-line);padding-bottom:9px}
.mc-top>span{font-size:.8125rem;font-weight:750;letter-spacing:.05em}
.mc-top button,.mc-secondary button,.mc-end button{border:0;background:transparent;text-decoration:underline;text-underline-offset:4px;padding:7px 3px}
.mc-index{display:grid;gap:6px;margin:10px 0 18px}
.mc-index button{text-align:left;display:grid;grid-template-columns:28px 1fr;gap:0 5px;font-size:.9375rem}
.mc-index button>span{grid-row:span 2;color:#76568e}.mc-index small{font-size:.75rem;color:#73637e}
.mc-index button[aria-current=step]{background:#ede5f4;border-color:#795b9c}
.mc-scene-heading{padding:14px 0 12px}.mc-scene-heading p{font-size:.75rem!important;letter-spacing:.025em;font-weight:750;color:#745888;margin:0 0 5px}
.chapter-hub .mc-scene-heading h3{font-size:clamp(1.3125rem,3vw,1.6875rem);line-height:1.25;letter-spacing:-.45px;margin:0;color:#352c49;max-width:590px}
.mc-scene-heading h3:focus{outline:0}
.mc-stage{border:1px solid var(--mc-line);border-radius:17px;background:#fffdfa;overflow:hidden}
.mc-visual{padding:15px 12px 9px;min-height:175px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:7px}
.mc-equation{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:9px;max-width:100%;font-size:1rem}
.mc-matrix-wrap{display:inline-block;max-width:100%;vertical-align:middle;margin:2px 4px}
.mc-matrix{border-collapse:separate;border-spacing:0;border-left:2px solid #53405f;border-right:2px solid #53405f;border-radius:3px;position:relative;width:auto!important;margin:0;font-variant-numeric:tabular-nums;background:transparent!important}
.mc-matrix td{border:0;text-align:center;vertical-align:middle;min-width:38px;height:36px;padding:3px 6px;font-size:1.0625rem;line-height:1.2;white-space:nowrap;color:#352c49;transition:background-color .25s;position:relative;background:transparent}
.mc-matrix math{font-size:1em}.mc-matrix td button{min-width:44px;min-height:44px;border:0;border-radius:7px;padding:5px;color:inherit;background:transparent}
.mc-matrix td:has(button){padding:0;min-width:44px}
.mc-matrix td.mc-cut{color:#827489;background:#f3eef5}.mc-matrix td.mc-selected{background:#e9dcf4;color:#432a62;outline:2px solid #8767a5;outline-offset:-2px;border-radius:6px}
.mc-matrix td.mc-pivot:after{content:'';position:absolute;bottom:0;left:20%;right:20%;border-bottom:3px solid #80609b}
.mc-matrix td.mc-divider{border-left:2px solid #a88dbb}
.mc-transpose td{animation:mc-transpose .4s ease-out both}
@keyframes mc-transpose{from{transform:translate(var(--dx),var(--dy));background:#e9dcf4}to{transform:translate(0,0)}}
.mc-caption{font-size:.8125rem!important;color:#695a71;text-align:center;margin:3px 0;max-width:440px}
.mc-controls{padding:10px 12px;display:flex;flex-wrap:wrap;align-items:end;justify-content:center;gap:9px;background:#f7f3f9;border-top:1px solid #ebe4f0}
.mc-control{display:flex;flex-direction:column;gap:4px;flex:1 1 130px;min-width:0;max-width:310px;font-size:.75rem;font-weight:700;color:#5c486e}
.mc-control select{width:100%;font-size:.875rem;min-width:0;padding:9px 7px}
.mc-result{padding:12px 14px;border-top:1px solid #ebe4f0;min-height:68px;text-align:center;font-size:.9375rem;overflow-wrap:anywhere}
.mc-result small{color:#695a71;font-size:.75rem}.mc-result .mc-equation{margin-top:9px}
.mc-signs{font-family:monospace;font-size:1.25rem;line-height:1.5;margin-top:10px;color:#65468c}
.mc-takeaway{border-left:3px solid #a88dbb;padding:2px 0 2px 12px;margin:14px 0 5px;font-size:.9375rem!important;line-height:1.5}
.mc-secondary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;font-size:.8125rem}
.mc-navigation{display:flex;justify-content:space-between;gap:12px;margin-top:12px}.mc-navigation button{font-size:.9375rem;font-weight:750;min-width:98px}.mc-navigation button:last-child{background:#ede5f4;border-color:#bfa7d2}
.mc-end{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:5px;margin:17px 0 6px;padding-top:8px;border-top:1px solid var(--mc-line);font-size:.75rem;color:#716276}.mc-end button{font-size:.8125rem}
.mc-check{border:1px solid var(--mc-line);border-radius:12px;padding:12px;margin-top:8px;background:#faf7fc}.mc-check p{font-size:.9375rem!important;margin:0 0 10px}.mc-check>div{display:flex;gap:8px;flex-wrap:wrap}.mc-check button{font-size:.875rem}.mc-check [aria-pressed=true]{background:#ede5f4;border-color:#795b9c}.mc-check [data-feedback]{margin:12px 0 0}.mc-check [data-reason]{margin-top:9px;font-size:.75rem}
.mc-plane{width:100%;max-width:320px;height:auto;max-height:235px;overflow:hidden;display:block}.mc-plane text{fill:#45364e;font:12px system-ui,sans-serif}.mc-line-primary{stroke:#72518f;stroke-width:3;fill:none}.mc-line-secondary{stroke:#35766d;stroke-width:2.5;stroke-dasharray:7 4;fill:none}.mc-dot-primary{fill:#65468c}.mc-dot-secondary{fill:#35766d}.mc-shape{fill:#c8b2dc;fill-opacity:.5;stroke:#6e478f;stroke-width:2}.mc-ghost{fill:none;stroke:#817087;stroke-dasharray:4 4;stroke-width:1.5}
.mc-flow{font-size:.875rem;text-align:center;color:#65506f;margin:3px 0}.mc-message{font-size:32px;font-weight:750;letter-spacing:.18em}.mc-drag-rows{display:flex;gap:10px;margin-top:6px}.mc-drag-rows button{font-size:.8125rem}
.mc-rank-count{font-size:44px;font-weight:750;color:#65468c;text-align:center;line-height:1.2}.mc-rank-count span{display:block;font-size:.8125rem;font-weight:500}.mc-ranks{display:flex;gap:20px;justify-content:center;align-items:center;text-align:center;padding:9px 0}.mc-ranks span{font-size:.875rem}.mc-ranks b{display:block;font-size:35px;color:#65468c}.mc-ranks>strong{font-size:30px}
.mc-dialog{width:min(560px,calc(100% - 28px));max-height:85dvh;overflow:auto;border:1px solid #d3c5dd;border-radius:17px;background:#fffdfa;color:#352c49;padding:20px;font:16px/1.65 system-ui,sans-serif}.mc-dialog::backdrop{background:#30263880}.mc-dialog form{text-align:right}.mc-dialog h3{font-size:22px;line-height:1.3}.mc-dialog small{color:#6d5b79}.mc-dialog p{overflow-wrap:anywhere}
@media(min-width:700px){.mc-visual{min-height:210px;padding:20px}.mc-controls{padding:14px 20px}.mc-result{padding:14px 20px}.mc-stage{max-width:660px;margin:auto}.mc-scene-heading{padding:20px 0 15px}.mc-plane{max-height:250px}}
@media(max-width:370px){.mc-visual{padding:12px 5px}.mc-controls{padding:9px 7px;gap:7px}.mc-control{flex-basis:120px}.mc-result{padding:11px 8px}.mc-matrix td{min-width:30px;padding:3px 4px;font-size:1rem}.mc-equation{gap:5px}.mc-top{gap:5px}.mc-top button{font-size:.8125rem}.mc-ranks{gap:12px}}
@media(prefers-reduced-motion:reduce){.matrix-concepts *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Shared all-grade Concepts contract: Grade 12 matrices start at a quiet
   numbered index, then one immersive mathematical scene at a time. */
.matrix-concepts .sp2-index-view[hidden],.matrix-concepts .sp2-detail-view[hidden]{display:none!important}
.matrix-concepts .mc-index{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;margin:0;padding:0}
.matrix-concepts .mc-index button{
 width:100%;min-width:0;display:flex;align-items:center;gap:12px;
 min-height:57px;padding:11px 13px;background:#fff;text-align:left;
 border:1px solid #e3ddec;border-radius:12px;font-weight:750;line-height:1.5
}
.matrix-concepts .mc-index button span{
 display:grid;place-items:center;flex:none;width:32px;height:33px;
 border-radius:9px;background:#f0ebfb;color:#6b5b98;font-size:13px
}
.matrix-concepts .sp2-detail-navigation{margin:0 0 7px}
.matrix-concepts [data-index-toggle]{
 display:inline-flex;align-items:center;min-height:44px;
 border:0;background:transparent;padding:8px 3px;color:#473873;
 text-align:left;font-weight:800
}
.matrix-concepts[data-view="lesson"] .mc-scene-heading{padding:2px 0 11px}
.matrix-concepts[data-view="lesson"] .mc-navigation button{min-height:50px}
@media(max-width:800px){
 .matrix-concepts[data-view="lesson"] [data-adaptive-dock]{
  position:sticky;bottom:0;z-index:25;display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.18fr);gap:8px;
  margin:12px -10px 0;padding:9px max(10px,env(safe-area-inset-right))
    max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
  border-top:1px solid #e4deec;background:#fff;box-shadow:0 -5px 18px #2b204411
 }
 .matrix-concepts[data-view="lesson"] [data-adaptive-dock] button{
  min-width:0;width:100%;min-height:50px;padding:9px 6px;
  font-size:clamp(12px,3.25vw,14px);white-space:normal
 }
 .matrix-concepts[data-view="lesson"] :is(button,select,[tabindex]):focus{
  scroll-margin-bottom:112px
 }
}

/* VER Triggle: Grade 10 / Chapter 2 only.
   Inspired by the clear, restrained typography of a ChatGPT maths explanation.
   Uses system fonts and the app's existing offline KaTeX assets; no remote fonts. */
body.g10-ch2-type{
  --g10-ch2-text:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans Tamil",Arial,sans-serif;
  --g10-ch2-maths:"KaTeX_Main","STIX Two Math","Cambria Math","Latin Modern Math","Noto Sans Math",serif;
  font-family:var(--g10-ch2-text);
  font-kerning:normal;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
body.g10-ch2-type :is(button,input,select,textarea),
body.g10-ch2-type :is(.welcome h1,.lesson-progress,.difficulty-indicator,.solution-review),
body.g10-ch2-type :is(.lesson-card,.lesson-container,.chapter-overview,.page-controls,.crumb,.sidebar,.appbar,.path-dialog,.figure-dialog){
  font-family:var(--g10-ch2-text);
}
/* Question first: calm text with comfortable line lengths. */
body.g10-ch2-type .lesson-card .lesson-title-row h2{
  font-family:var(--g10-ch2-text);
  font-weight:650;
  font-size:clamp(20px,4.6vw,26px);
  line-height:1.35;
  letter-spacing:-.025em;
}
body.g10-ch2-type .lesson-card :is(.mini-topic,.lesson-tag,.lesson-progress){
  font-family:var(--g10-ch2-text);
  font-weight:600;
  font-size:12px;
  line-height:1.4;
  letter-spacing:0;
}
body.g10-ch2-type .lesson-card .question-text{
  font-family:var(--g10-ch2-text);
  font-size:clamp(16px,3.8vw,18px)!important;
  font-weight:450;
  line-height:1.64;
  letter-spacing:0;
  color:#27313b;
  padding:clamp(12px,2.2vw,18px);
  overflow-wrap:anywhere;
}
/* Existing mobile reader uses #questionText with !important.
   Match its specificity so our Chapter 2 legibility survives at 320px. */
body.g10-ch2-type.textbook-reader #lessonCard>#questionText{
  font-family:var(--g10-ch2-text);
  font-size:clamp(16px,3.8vw,18px)!important;
  font-weight:450;
  line-height:1.64!important;
}
body.g10-ch2-type .lesson-card .lesson-divider>span:first-child,
body.g10-ch2-type .lesson-card .step-count{
  font-family:var(--g10-ch2-text);
  font-size:12px;
  font-weight:600;
  letter-spacing:.02em;
}
body.g10-ch2-type .lesson-card .worked-step .step-reason{
  font-family:var(--g10-ch2-text);
  font-size:clamp(15.5px,3.7vw,17px)!important;
  font-weight:450;
  line-height:1.58;
  letter-spacing:0;
  color:#384454;
  overflow-wrap:anywhere;
}
body.g10-ch2-type .lesson-card .worked-step .step-equation{
  font-family:var(--g10-ch2-maths);
  font-size:clamp(17px,4.15vw,21px)!important;
  font-weight:500;
  line-height:1.68;
  letter-spacing:0;
  color:var(--text-primary);
  max-width:100%;
  min-width:0;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  overflow-wrap:anywhere;
}
body.g10-ch2-type :is(.question-text,.step-equation,.math-answer,.final-answer-value,.chapter-overview) math{
  font-family:"STIX Two Math","Cambria Math","Latin Modern Math","Noto Sans Math",serif;
  font-weight:normal;
}
/* KaTeX already provides its own mathematical glyphs/geometry: do not override them. */
body.g10-ch2-type :is(.question-text,.step-equation,.math-answer,.final-answer-value) .triggle-tex{
  font-weight:400;
  max-width:100%;
}
body.g10-ch2-type .lesson-card :is(.math-answer,.final-answer-value){
  font-family:var(--g10-ch2-text);
  font-size:clamp(17px,4vw,21px)!important;
  font-weight:550;
  line-height:1.55;
  letter-spacing:0;
  overflow-wrap:anywhere;
}
body.g10-ch2-type .lesson-card .final-answer-step .step-reason{
  font-weight:600;
}
body.g10-ch2-type .lesson-card .step-circle{
  font-family:var(--g10-ch2-text);
  font-weight:650;
  font-size:13px;
}
body.g10-ch2-type .lesson-card :is(.kind-badge,.mark-button){
  font-family:var(--g10-ch2-text);
  font-weight:550;
  font-size:12px;
  line-height:1.45;
}
body.g10-ch2-type .chapter-overview{
  font-family:var(--g10-ch2-text);
  line-height:1.6;
}
body.g10-ch2-type .chapter-overview :is(h1,h2,h3){
  font-family:var(--g10-ch2-text);
  font-weight:650;
  letter-spacing:-.02em;
}
body.g10-ch2-type .chapter-overview :is(p,li,summary,button){
  font-family:var(--g10-ch2-text);
  line-height:1.55;
}
body.g10-ch2-type .page-controls .page-button,
body.g10-ch2-type .page-controls .all-chapters-button,
body.g10-ch2-type .crumb-link{
  font-family:var(--g10-ch2-text);
  font-weight:650;
  letter-spacing:0;
}
@media(max-width:430px){
  body.g10-ch2-type .lesson-card .question-text,
  body.g10-ch2-type.textbook-reader #lessonCard>#questionText{font-size:var(--reader-question-size,16px)!important;line-height:1.62!important}
  body.g10-ch2-type .lesson-card .worked-step .step-reason{font-size:15.5px!important}
  body.g10-ch2-type .lesson-card .worked-step .step-equation{font-size:18px!important;line-height:1.6}
  body.g10-ch2-type .lesson-card :is(.math-answer,.final-answer-value){font-size:18px!important}
}
/* Large text must remain usable inside the existing one-scroll-area mobile reader. */
@media(max-width:800px){
  /* The shared reader has one DOCUMENT scroller. Constraining only the X axis
     turns overflow-y:visible into overflow-y:auto, trapping Android swipes. */
  body.g10-ch2-type.textbook-reader .lesson-container{
    overflow:visible!important;
    height:auto!important;
    max-height:none!important;
  }
  body.g10-ch2-type .lesson-card .worked-step{min-width:0}
  body.g10-ch2-type .lesson-card .worked-step>div{min-width:0}
}

/* Grade 10 only: a single, quiet, opt-in bridge beneath a selected step.
   Never changes the verified question, working, answer or other grades. */
#stepsList .why-step-g10{
  display:block;min-width:0;max-width:100%;margin:4px 0 0;
  font-size:12px;line-height:1.5;color:var(--text-explanation);
}
#stepsList .why-step-g10>summary{
  display:inline-flex;align-items:center;gap:6px;min-height:36px;
  max-width:100%;padding:5px 7px 5px 0;
  color:var(--text-navigation);font-size:12px;font-weight:650;line-height:1.3;
  list-style:none;cursor:pointer;border-radius:6px;
  text-decoration:none;outline-offset:3px;touch-action:manipulation;
}
#stepsList .why-step-g10>summary::-webkit-details-marker{display:none}
#stepsList .why-step-g10>summary::before{
  content:'?';display:grid;place-items:center;flex:0 0 17px;
  width:17px;height:17px;box-sizing:border-box;
  border:1px solid #b9b0cc;border-radius:50%;font-weight:700;font-size:11px;
}
#stepsList .why-step-g10>summary:focus-visible{
  outline:2px solid #69569a;outline-offset:3px;
}
#stepsList .why-step-g10[open]>summary{color:var(--text-navigation)}
#stepsList .why-step-panel{
  width:100%;min-width:0;max-width:100%;box-sizing:border-box;
  margin:3px 0 8px;padding:9px 12px;
  border:1px solid #e9e3f0;border-left:3px solid #9b89c4;
  border-radius:0 9px 9px 0;background:#faf8fd;
  color:var(--text-explanation);font-size:13px;line-height:1.55;
  overflow-wrap:anywhere;
}
#stepsList .why-step-panel p{margin:0}
#stepsList .why-step-math{margin:7px 0 1px;min-width:0;max-width:100%;overflow-x:auto;overflow-y:visible;scrollbar-width:thin}
#stepsList .why-step-math .triggle-tex{max-width:100%;display:block}
#stepsList .why-step-math .katex-display{margin:0;text-align:left}
#stepsList .why-step-math .math-fallback{font-size:12px}
@media(max-width:360px){
 #stepsList .why-step-g10{margin-top:2px}
 #stepsList .why-step-panel{padding:8px 10px;font-size:12.5px}
 #stepsList .why-step-g10>summary{min-height:38px}
}
@media(prefers-reduced-motion:reduce){
 #stepsList .why-step-g10 *,#stepsList .why-step-g10{animation:none!important;transition:none!important}
}

/* Optional miniature, authored mathematical diagrams; never visible while closed. */
#stepsList .why-step-visual{
 margin:10px 0 2px;max-width:100%;min-width:0;
 padding:9px 9px 8px;box-sizing:border-box;
 border:1px solid #e3ddec;border-radius:12px;background:#fff;
}
#stepsList .why-step-visual-caption{
 margin:0 0 8px;color:var(--text-secondary);font-size:11px;font-weight:650;
 line-height:1.45;letter-spacing:0;overflow-wrap:anywhere;
}
#stepsList .why-step-visual svg{
 display:block;width:100%;height:auto;max-width:400px;
 margin:0 auto;overflow:visible;
}
#stepsList .why-grid-scroll{
 width:100%;max-width:100%;overflow-x:auto;scrollbar-width:thin;
 overscroll-behavior-x:contain;outline-offset:2px;
}
#stepsList .why-grid-scroll:focus-visible{outline:2px solid #69569a}
#stepsList .why-pair-grid{
 width:100%;border-collapse:separate;border-spacing:3px;
 table-layout:auto;text-align:center;
 font-size:clamp(11px,2.8vw,13px);line-height:1.3;
}
#stepsList .why-pair-grid th,#stepsList .why-pair-grid td{
 border-radius:5px;padding:7px 6px;white-space:nowrap;
}
#stepsList .why-pair-grid th{
 background:#ece7f5;color:var(--text-primary);font-weight:750;
}
#stepsList .why-pair-grid td{
 background:#f7f4fb;border:1px solid #e8e1f3;color:var(--text-primary);
}
#stepsList .why-pair-grid .why-grid-corner{background:#ded7ef}
#stepsList .why-mapping{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:5px 8px;max-width:100%}
#stepsList .why-map-row{display:flex;align-items:center;justify-content:center;gap:7px;padding:4px 2px}
#stepsList .why-map-value{min-width:24px;min-height:25px;display:grid;place-items:center;padding:2px 6px;background:#f3effb;border:1px solid #e6def0;border-radius:6px;font-weight:700}
#stepsList .why-map-arrow{font-size:17px;font-weight:700;color:var(--text-secondary)}
#stepsList .why-flow{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px 7px}
#stepsList .why-flow-node{display:grid;place-items:center;min-height:30px;padding:6px 9px;border:1px solid #dbd2ed;background:#f8f5ff;border-radius:7px;text-align:center;font-size:12px;font-weight:650;min-width:0;max-width:100%;overflow-wrap:anywhere}
#stepsList .why-flow-arrow{color:var(--text-secondary);font-size:15px;font-weight:700}
#stepsList .why-venn-answer{display:flex;align-items:center;justify-content:center;margin-top:3px;font-size:12px}
@media(max-width:360px){
 #stepsList .why-step-visual{padding:7px 6px}
 #stepsList .why-pair-grid th,#stepsList .why-pair-grid td{padding:6px 4px}
 #stepsList .why-flow-node{font-size:11px;padding:5px 7px}
}

/* Tiny optional transfer check; entirely inside the closed Why disclosure. */
#stepsList .why-step-transfer{margin-top:10px;padding-top:9px;border-top:1px solid #e4deed;min-width:0}
#stepsList .why-step-transfer-heading{font-size:11px;font-weight:700;color:var(--text-secondary);margin:0 0 4px}
#stepsList .why-step-transfer-prompt{font-size:13px;line-height:1.45;margin:0 0 8px;color:var(--text-primary)}
#stepsList .why-step-transfer-options{display:flex;flex-wrap:wrap;gap:7px;min-width:0}
#stepsList .why-step-transfer-choice{
  appearance:none;min-width:61px;min-height:36px;max-width:100%;
  padding:7px 11px;border:1px solid var(--control-border);border-radius:8px;
  background:#fff;color:var(--text-primary);font:inherit;font-size:13px;font-weight:650;
  cursor:pointer;touch-action:manipulation;overflow-wrap:anywhere
}
#stepsList .why-step-transfer-choice[aria-pressed="true"]{border-color:var(--text-navigation);background:var(--bond-selection)}
#stepsList .why-step-transfer-choice:focus-visible{outline:2px solid var(--text-navigation);outline-offset:2px}
#stepsList .why-step-transfer-feedback{margin:7px 0 0;font-size:12px;line-height:1.45}
#stepsList .why-step-transfer-feedback:empty{display:none}

/* Grade 9: same quiet disclosure as Grade 10; no new permanent chrome. */
#stepsList details.why-step-g9{display:block;min-width:0;max-width:100%;margin:4px 0 0;font-size:12px;line-height:1.5;color:var(--text-explanation)}
#stepsList details.why-step-g9>summary{display:inline-flex;align-items:center;gap:6px;min-height:44px;max-width:100%;padding:5px 7px 5px 0;color:var(--text-navigation);font-size:14px;font-weight:650;line-height:1.3;list-style:none;cursor:pointer;border-radius:6px;outline-offset:3px;touch-action:manipulation}
#stepsList details.why-step-g9>summary::-webkit-details-marker{display:none}
#stepsList details.why-step-g9>summary::before{content:'?';display:grid;place-items:center;flex:0 0 17px;width:17px;height:17px;box-sizing:border-box;border:1px solid #b9b0cc;border-radius:50%;font-size:11px;font-weight:700}
#stepsList details.why-step-g9>summary:focus-visible{outline:2px solid #69569a;outline-offset:3px}
#stepsList details.why-step-g9[open]>summary{color:var(--text-navigation)}
#stepsList .why-step-g9 .why-step-panel{width:100%;min-width:0;max-width:100%;box-sizing:border-box;margin:3px 0 8px;padding:9px 12px;border:1px solid #e9e3f0;border-left:3px solid #9b89c4;border-radius:0 9px 9px 0;background:#faf8fd;color:var(--text-explanation);font-size:clamp(16px,4vw,18px);line-height:1.55;overflow-wrap:anywhere}
#stepsList .why-step-g9 .why-step-panel p{margin:0}
#stepsList .why-step-g9-figure{margin:10px 0 2px;max-width:100%;min-width:0;padding:8px;box-sizing:border-box;border:1px solid #e3ddec;border-radius:10px;background:#fff}
#stepsList .why-step-g9-figure .why-step-visual-caption{margin:0 0 4px;color:var(--text-secondary);font-size:13px;font-weight:600}
#stepsList .why-step-g9-figure svg{width:100%;height:auto;display:block;max-height:185px}
@media(max-width:360px){#stepsList .why-step-g9 .why-step-panel{padding:8px 10px}}
@media(prefers-reduced-motion:reduce){#stepsList .why-step-g9 *,#stepsList .why-step-g9{animation:none!important;transition:none!important}}

.geometry-question-hint { margin-block:4px 8px; color:var(--text-navigation); }
.geometry-question-hint summary { width:fit-content; min-height:32px; cursor:pointer; }
.geometry-question-hint p { margin-block:4px 8px; }

/* Grade 10, Chapter 2 only: accessible, low-bandwidth mathematical mini-labs.
   Minimal surface; no animation, graphics libraries, remote assets or progress banners. */
.chapter-hub[data-hub-section="concepts"]:has(.g10ch2-visual) .sp2-detail-view .sp2-formula{
  background:#F8F7FD;color:var(--text-primary);border-color:#DADCE5;
  margin:10px 0 14px;padding:14px 10px;overflow-x:auto
}
.g10ch2-visual{
  background:#F9FAFC;border:1px solid #DADCE5;border-radius:15px;
  padding:12px 14px;margin:10px 0 16px;min-width:0
}
.g10ch2-visual-title{font-size:13px;font-weight:750;color:var(--text-secondary);margin:0 0 12px}
.g10ch2-scene{
  display:flex;align-items:center;align-content:center;gap:7px;
  flex-wrap:wrap;min-height:45px;margin:8px 0 12px;max-width:100%;
}
.g10ch2-chip{
  display:inline-flex;align-items:center;justify-content:center;
  padding:9px 10px;min-width:36px;min-height:40px;border-radius:11px;
  background:#FFFFFF;border:1px solid #DADCE5;
  color:var(--text-primary);font-size:16px;font-weight:650;font-variant-numeric:tabular-nums
}
.g10ch2-chip.is-selected{background:var(--bond-selection);border:2px solid var(--text-navigation);color:var(--text-navigation)}
.g10ch2-dot-group{display:inline-flex;align-items:center;gap:1px;min-height:36px;
  padding:1px 3px;border-radius:9px;border:1px solid #DADCE5;background:white}
.g10ch2-dot-group .g10ch2-chip{padding:2px;min-width:10px;min-height:18px;border:0;font-size:19px}
.g10ch2-dot-group.is-remainder{border-color:#13746F;background:#EBF5F3}
.g10ch2-fraction-bar{display:flex;align-items:center;justify-content:center;
  height:30px;max-width:100%;border-radius:5px;background:#13746F;color:#FFFFFF;
  font-size:12px;font-weight:700;white-space:nowrap}
.g10ch2-visual input[type=range]{display:block;width:100%;max-width:100%;
  min-height:44px;margin:0 0 2px;accent-color:var(--text-navigation);cursor:pointer}
.g10ch2-visual-feedback{color:var(--text-primary);font-weight:700;font-size:14px;
  line-height:1.5;margin:8px 0 0}
.g10ch2-practice-link{display:block;width:100%;min-height:46px;
  background:#FFFFFF;border:1px solid var(--text-navigation);border-radius:12px;
  padding:10px 14px;margin:14px 0;color:var(--text-navigation);font-size:14px;
  font-weight:750;text-align:center}
.g10ch2-practice-link:focus-visible{outline:3px solid var(--text-navigation);outline-offset:3px}
.chapter-hub .sp2-simple-journey .sp2-panel:has(.g10ch2-visual) .sp2-recall-actions button{
  min-width:44px;min-height:44px
}
@media(max-width:430px){
 .g10ch2-visual{padding:11px 10px}
 .g10ch2-chip{font-size:15px;padding:8px}
 .g10ch2-dot-group{gap:0}
 .g10ch2-dot-group .g10ch2-chip{font-size:17px;padding:1px}
}

/* A.P. sum only: teach equal end-pairs, not an arbitrary sequence position. */
.g10ch2-pairing{background:#FCFCFE}
.g10ch2-pairing-title{margin:0 0 12px;font-size:15px;font-weight:750;line-height:1.45;color:var(--text-primary)}
.g10ch2-pairing-terms{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-bottom:12px}
.g10ch2-pairing-term{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:80px;padding:8px 2px 6px;border:1px solid #DADCE5;border-radius:11px;background:white}
.g10ch2-pairing-number{font-size:clamp(19px,4vw,27px);font-weight:750;line-height:1.15;color:var(--text-primary);font-variant-numeric:tabular-nums}
.g10ch2-pairing-label{min-height:2.7em;display:grid;place-items:center;font-size:10px;line-height:1.25;text-align:center;color:#596272;font-weight:650}
.g10ch2-pairing-term.is-pair-one{background:#EDE7FA;border-color:#7560B0}
.g10ch2-pairing-term.is-pair-two{background:#E3F0EB;border-color:#478B76}
.g10ch2-pairing-term.is-middle{background:#FFF2D9;border-color:#B78A42}
.g10ch2-pairing-explanation{min-width:0;padding:11px 12px;background:#F5F5FA;border-radius:12px}
.g10ch2-pairing-math,.g10ch2-pairing-formula{min-width:0;overflow-x:auto;text-align:center;color:var(--text-primary);font-size:clamp(15px,3.5vw,19px)}
.g10ch2-pairing-math .katex-display,.g10ch2-pairing-formula .katex-display{margin:.2em 0;overflow-x:auto;overflow-y:hidden;padding:2px 0}
.g10ch2-pairing-formula{margin-top:8px;border-top:1px solid #E2DFEA;padding-top:8px}
.g10ch2-pairing-formula[hidden]{display:none}
.g10ch2-pairing-note{font-size:13px!important;line-height:1.55!important;margin:10px 0 0!important;color:var(--text-explanation)!important}
.g10ch2-pairing-controls{display:flex;justify-content:space-between;align-items:center;gap:7px;margin-top:12px}
.g10ch2-pairing-controls button{box-sizing:border-box;min-height:44px;padding:10px 12px;border:1px solid #C9C5D6;border-radius:10px;background:white;color:var(--text-navigation);font:inherit;font-size:13px;font-weight:730;cursor:pointer}
.g10ch2-pairing-controls button:last-child{background:#232A34;color:white;border-color:#232A34}
.g10ch2-pairing-controls button:disabled{opacity:.45;cursor:default}
.g10ch2-pairing-controls button:focus-visible{outline:3px solid #8061C9;outline-offset:2px}
.g10ch2-pairing-progress{font-size:11px;color:var(--text-secondary);text-align:center;white-space:nowrap}
@media(max-width:430px){
 .g10ch2-pairing{padding:11px 9px}
 .g10ch2-pairing-terms{gap:4px}
 .g10ch2-pairing-term{min-height:72px;padding:6px 1px 4px}
 .g10ch2-pairing-label{font-size:11px;overflow-wrap:anywhere}
 .g10ch2-pairing-controls button{font-size:12px;padding:10px 8px}
}

/* Grade 10, Chapter 2 geometric series: original + doubled rows, then cancellation.
   All controls work without animation and on 320px Android screens. */
.g10ch2-gp-lab{background:#FCFCFE;padding:12px 10px}
.gp-lab-heading{font:750 15px/1.4 system-ui,sans-serif;color:#2B3343;margin:0 0 12px}
.gp-lab-stage{display:grid;gap:8px;min-width:0}
.gp-lab-row{display:grid;grid-template-columns:minmax(65px,auto) minmax(0,1fr);gap:8px;align-items:center}
.gp-lab-row[hidden]{display:none!important}
.gp-lab-row-label{font:750 12px/1.35 system-ui,sans-serif;color:var(--text-secondary)}
.gp-lab-cells{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;min-width:0}
.gp-lab-term{position:relative;display:grid;place-items:center;min-width:0;min-height:48px;
  border:1px solid #DDD9E7;border-radius:9px;background:#fff;color:var(--text-primary);
  font:750 clamp(14px,3.8vw,20px)/1.25 system-ui,sans-serif;font-variant-numeric:tabular-nums}
.gp-lab-term.is-gap{background:transparent;border:1px dashed transparent}
.gp-lab-row[data-row="doubled"] .gp-lab-term:not(.is-gap){background:#EDF2FD}
.gp-lab-term.is-cancelled{opacity:.54;text-decoration:line-through;text-decoration-thickness:2px;
  text-decoration-color:#684F84}
.gp-lab-row[data-row="doubled"] .gp-lab-term.is-remaining{
  background:#DDEFE6;border-color:#438267;color:#1E6045}
.gp-lab-row[data-row="original"] .gp-lab-term.is-subtracted{
  background:#FAE8E5;border-color:#B46D62;color:#823D34}
.gp-lab-math,.gp-lab-derivation,.gp-lab-final{overflow-x:auto;overflow-y:hidden;max-width:100%;
  color:#263143;text-align:center;font-size:clamp(14px,3.6vw,18px);scrollbar-width:thin}
.gp-lab-math{margin:14px 0 10px;padding:12px 8px;border-radius:10px;background:#F2F1F7}
.gp-lab-math .katex-display,.gp-lab-derivation .katex-display,.gp-lab-final .katex-display{margin:.25em 0}
.gp-lab-general{padding:10px;background:#F4F8F6;border:1px solid #C7DDD0;border-radius:10px}
.gp-lab-general[hidden]{display:none!important}
.gp-lab-general-label{margin:0 0 6px;color:#245946;font-size:12px;font-weight:800}
.gp-lab-final{margin-top:8px;font-weight:750}
.gp-lab-edge{margin:8px 0 0;font-size:12px;line-height:1.55;color:#4E5B69}
.gp-lab-note{font-size:13px!important;line-height:1.55!important;color:var(--text-explanation)!important;margin:10px 0 12px!important}
.gp-lab-actions{display:flex;align-items:center;justify-content:space-between;gap:6px}
.gp-lab-actions button{min-height:44px;min-width:0;border:1px solid #C9C5D6;border-radius:10px;
  padding:9px 10px;background:white;color:var(--text-navigation);font:750 12px/1.35 system-ui,sans-serif;cursor:pointer}
.gp-lab-actions button:last-child{background:#232A34;border-color:#232A34;color:#fff}
.gp-lab-actions button:disabled{opacity:.45;cursor:default}
.gp-lab-actions button:focus-visible{outline:3px solid #8061C9;outline-offset:2px}
.gp-lab-counter{flex:0 0 auto;color:var(--text-secondary);font:700 11px/1.3 system-ui,sans-serif;text-align:center}
@media(max-width:400px){
 .g10ch2-gp-lab{padding:11px 8px}
 .gp-lab-row{grid-template-columns:minmax(57px,auto) minmax(0,1fr);gap:5px}
 .gp-lab-cells{gap:3px}
 .gp-lab-term{min-height:43px;font-size:clamp(13px,3.8vw,17px)}
 .gp-lab-actions button{padding:8px 7px;font-size:13px}
}
@media(prefers-reduced-motion:reduce){.g10ch2-gp-lab *{animation:none!important;transition:none!important}}


/* Student Psychology Lab pilot: two concept-specific, slider-free explanations.
   Keep every HCF equation visible and every GP multiplication explicit at 320px. */
.g10ch2-hcf-steps,.g10ch2-gp-steps{background:#FCFCFE}
.g10ch2-hcf-title,.g10ch2-gp-title{
  margin:0 0 9px;color:var(--text-primary);font-size:16px;font-weight:760;line-height:1.4
}
.g10ch2-hcf-definition,.g10ch2-gp-instruction{
  margin:0 0 13px;color:var(--text-explanation);font-size:13px;line-height:1.55
}
.g10ch2-hcf-step{padding:12px 0;border-top:1px solid #E2DFEA;min-width:0}
.g10ch2-hcf-label{margin:0 0 6px!important;color:var(--text-explanation)!important;
  font-size:13px!important;font-weight:700;line-height:1.45!important}
.g10ch2-hcf-equation{min-width:0;text-align:center;font-size:clamp(15px,4.5vw,20px);
  color:var(--text-primary);overflow-wrap:anywhere}
.g10ch2-hcf-equation .katex-display{margin:.2em 0;max-width:100%}
.g10ch2-hcf-remainder{margin:7px 0 0!important;color:var(--text-explanation)!important;
  font-size:12px!important;font-weight:680}
.g10ch2-hcf-answer{margin:8px 0 0!important;padding:11px;border-radius:11px;
  background:#EFF6F1;color:var(--text-correct)!important;line-height:1.5!important;
  font-size:13px!important}
.g10ch2-hcf-answer strong{display:block;font-size:17px;margin-bottom:4px}
.g10ch2-gp-terms{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;
  margin:10px 0 12px;min-width:0}
.g10ch2-gp-term{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;
  justify-content:center;min-width:0;min-height:66px;gap:4px;padding:7px 2px;
  color:var(--text-primary);border:1px solid #DADCE5;border-radius:11px;background:#fff;
  font:inherit;cursor:pointer}
.g10ch2-gp-term small{color:var(--text-secondary);font-size:clamp(10px,2.7vw,12px);
  font-weight:650;white-space:nowrap}
.g10ch2-gp-term strong{font-size:clamp(16px,4.6vw,22px);
  font-variant-numeric:tabular-nums}
.g10ch2-gp-term.is-selected{border:2px solid var(--text-navigation);background:var(--bond-selection)}
.g10ch2-gp-term:focus-visible,.g10ch2-gp-actions button:focus-visible{
  outline:3px solid #8061C9;outline-offset:2px}
.g10ch2-gp-explanation{background:#F2F1F7;border-radius:12px;text-align:center;
  padding:14px 8px 12px;min-height:94px;box-sizing:border-box}
.g10ch2-gp-equation{display:block;color:var(--text-primary);font-size:clamp(20px,5.7vw,28px);
  font-weight:760;font-variant-numeric:tabular-nums}
.g10ch2-gp-note{margin:9px 0 0!important;color:var(--text-explanation)!important;
  font-size:13px!important;line-height:1.5!important}
.g10ch2-gp-actions{display:flex;justify-content:space-between;gap:12px;margin-top:12px}
.g10ch2-gp-actions button{min-height:44px;min-width:0;padding:8px 11px;
  border:1px solid #C9C5D6;border-radius:11px;background:#fff;color:var(--text-navigation);
  font:700 13px/1.4 system-ui,sans-serif;cursor:pointer}
.g10ch2-gp-actions button:last-child{background:#232A34;border-color:#232A34;color:#fff}
.g10ch2-gp-actions button:disabled{opacity:.43;cursor:default}
@media(max-width:360px){
  .g10ch2-gp-terms{gap:4px}
  .g10ch2-gp-term{padding:6px 1px}
  .g10ch2-gp-actions button{font-size:12px;padding:8px}
}
@media(prefers-reduced-motion:reduce){
  .g10ch2-hcf-steps *,.g10ch2-gp-steps *{animation:none!important;transition:none!important}
}

/* Mission 04: only Grade 10 Chapter 2 receives the sticky-header clearance. */
.chapter-hub:has([data-g10ch2-visual]) .sp2-journey{
  scroll-margin-top:calc(var(--sticky-header-height, 76px) + 16px)
}
.chapter-hub:has([data-g10ch2-visual]) .sp2-concept-heading{
  scroll-margin-top:calc(var(--sticky-header-height, 76px) + 16px)
}

/* Three focused, mobile-first discovery labs: Grade 10 Chapter 2. */
.g10ch2-discovery{background:#FCFCFD;border:1px solid #D9DEE7;border-radius:14px;padding:14px 12px;max-width:100%;min-width:0;overflow:hidden}
.g10ch2-discovery-title{margin:0 0 12px;color:var(--text-primary);font:750 16px/1.4 system-ui,sans-serif}
.g10ch2-discovery-trail{display:flex;gap:5px;flex-wrap:wrap;min-width:0;margin:8px 0 12px}
.g10ch2-discovery-chip{background:#F4F1F5;color:var(--text-explanation);padding:7px 9px;border-radius:9px;font:650 13px/1.4 system-ui,sans-serif}
.g10ch2-discovery-chip.is-active{background:#E9F2EC;border:1px solid #A9C5B6;color:var(--text-navigation)}
.g10ch2-discovery-math{overflow-x:auto;max-width:100%;padding:10px 6px;border-radius:10px;background:#F1F4F7;color:var(--text-primary)}
.g10ch2-discovery-math .katex-display{margin:.35em 0}
.g10ch2-discovery-note{color:var(--text-explanation);font:500 14px/1.65 system-ui,sans-serif;margin:11px 0}
.g10ch2-discovery-subnote,.g10ch2-discovery-complete{color:var(--text-secondary);font:500 12px/1.6 system-ui,sans-serif;margin:9px 0 0}
.g10ch2-discovery-complete{color:#245341;font-weight:700}
.g10ch2-discovery-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}
.g10ch2-discovery-controls button,.g10ch2-discovery-choices button{min-height:44px;border:1px solid #BDC6D1;background:#FFF;color:var(--text-primary);border-radius:10px;padding:8px 12px;font:700 13px/1.35 system-ui,sans-serif}
.g10ch2-discovery-controls button:last-child{background:#263244;color:#FFF}
.g10ch2-discovery-controls button:disabled{opacity:.45}
.g10ch2-discovery-progress{font:600 12px/1.4 system-ui,sans-serif;color:var(--text-secondary);white-space:nowrap}
.g10ch2-discovery-label{font:650 13px/1.4 system-ui,sans-serif;color:var(--text-explanation);margin:6px 0}
.g10ch2-discovery-choices{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}
.g10ch2-discovery-choices button{min-width:44px}
.g10ch2-discovery-choices button[aria-pressed=true]{background:#742B46;border-color:#742B46;color:#FFF}
.g10ch2-discovery-range-row{display:flex;align-items:center;gap:10px;margin:10px 0 12px}
.g10ch2-discovery-range-row label{font:600 13px/1.4 system-ui,sans-serif;flex:0 0 auto;color:var(--text-explanation)}
.g10ch2-discovery-range-row input{flex:1;min-width:40px;accent-color:#742B46}
.g10ch2-discovery-range-row strong{font:750 15px system-ui,sans-serif;min-width:2ch;text-align:right;color:#23354A}
.g10ch2-discovery-track{background:#E1E7EA;border:1px solid #B7C6CA;border-radius:12px;width:100%;height:32px;overflow:hidden}
.g10ch2-discovery-filled{height:100%;background:#2D806C;transition:width .15s ease-out}
.g10ch2-discovery-controls button:focus-visible,.g10ch2-discovery-choices button:focus-visible,.g10ch2-discovery-range-row input:focus-visible{outline:3px solid #8F6ED0;outline-offset:2px}
@media(max-width:360px){.g10ch2-discovery{padding:10px 8px}.g10ch2-discovery-chip{font-size:12px;padding:6px 7px}.g10ch2-discovery-controls button{padding:8px}}
@media(prefers-reduced-motion:reduce){.g10ch2-discovery-filled{transition:none}}

.g10ch2-special-section{margin:16px 0;min-width:0}
.g10ch2-special-section + .g10ch2-special-section{padding-top:14px;border-top:1px solid #D9DEE7}
.g10ch2-special-section .g10ch2-discovery-title{margin-bottom:8px}
.g10ch2-special-section p,.g10ch2-special-diagram figcaption{margin:8px 0;color:var(--text-explanation);font-size:14px;line-height:1.65}
.g10ch2-special a.g10ch2-special-prerequisite{color:var(--text-navigation);text-decoration:underline;text-underline-offset:.15em}
.g10ch2-special-prerequisite:focus-visible{outline:3px solid #8F6ED0;outline-offset:2px}
.g10ch2-special-math{min-width:0;color:var(--text-primary)}
.g10ch2-special-math .triggle-tex-display{margin:.15em 0}
.g10ch2-special .g10ch2-discovery-chip .triggle-tex{padding:0}
.g10ch2-special .g10ch2-discovery-math .triggle-tex-display{margin:0}
.g10ch2-special .g10ch2-special-status{
  position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap
}
.g10ch2-special-diagram{margin:10px 0;text-align:center}
.g10ch2-special-diagram svg{display:block;width:100%;max-width:350px;margin:0 auto}
.g10ch2-special-diagram rect{fill:#F1F4F7;stroke:#C9D1DD}
.g10ch2-special-diagram [data-triangle="3"] rect{fill:#E9F2EC;stroke:#A9C5B6}
.g10ch2-special-diagram text{
  fill:#253043;font:700 13px system-ui,sans-serif;text-anchor:middle;dominant-baseline:central
}
.g10ch2-special :is(.g10ch2-special-proof,.g10ch2-special-odd){margin-top:8px;padding:0 8px;border:1px solid #D9DEE7;border-radius:10px;background:#FCFCFD}
.g10ch2-special summary{min-height:44px;padding:10px 2px;box-sizing:border-box;color:var(--text-primary);font-weight:700;cursor:pointer}
.g10ch2-special summary:focus-visible{outline:3px solid #8F6ED0;outline-offset:2px}

/* Mission 04: compact optional mathematical proofs, readable on narrow Android screens. */
.g10ch2-special .g10ch2-special-proof,.g10ch2-special .g10ch2-special-odd{
  margin:10px 0;padding:0 10px;border:1px solid #D9DEE7;border-radius:10px;background:#FCFCFD
}
.g10ch2-special :is(.g10ch2-special-proof,.g10ch2-special-odd) summary{
  display:flex;align-items:center;min-height:44px;line-height:1.4
}
.g10ch2-tri-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}
.g10ch2-tri-card{min-width:0;padding:8px 4px;background:#F7F8FA;border:1px solid #D9DEE7;border-radius:10px}
.g10ch2-tri-card.is-total{background:#E9F2EC;border-color:#A9C5B6}
.g10ch2-tri-title{display:block;font:700 12px/1.4 system-ui,sans-serif;color:var(--text-primary);margin-bottom:8px;overflow-wrap:anywhere}
.g10ch2-tri-rows{display:grid;gap:4px}
.g10ch2-tri-row{display:flex;justify-content:center;gap:3px}
.g10ch2-tri-cell{display:grid;place-items:center;min-width:24px;height:24px;border-radius:4px;
  background:#FFF;border:1px solid #CFD6E0;color:var(--text-primary);font:700 14px/1 system-ui,sans-serif}
.g10ch2-discovery-power{font:700 13px/1.55 system-ui,sans-serif;margin:8px 0;color:var(--text-primary)}
.g10ch2-discovery-bridge{padding:10px 0}
.g10ch2-discovery-controls{flex-wrap:wrap}
.g10ch2-discovery-controls button[hidden]{display:none!important}
.g10ch2-congruence-controls,.g10ch2-factor-controls{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 12px}
.g10ch2-congruence-control{display:grid;gap:4px;flex:1 1 120px;font:650 13px/1.45 system-ui,sans-serif}
.g10ch2-congruence-control input{width:100%;min-height:44px;accent-color:#742B46}
.g10ch2-factor-controls button{min-height:44px;flex:1 1 130px;border:1px solid #BDC6D1;border-radius:10px;background:#FFF;color:var(--text-primary);font:700 13px/1.35 system-ui,sans-serif;padding:9px}
.g10ch2-factor-controls button[aria-pressed=true]{background:#742B46;border-color:#742B46;color:#FFF}
.g10ch2-factor-controls button:focus-visible,.g10ch2-congruence-controls input:focus-visible{outline:3px solid #8F6ED0;outline-offset:2px}
.g10ch2-factor-expression{overflow-wrap:anywhere}
.g10ch2-factor-legend{font-size:13px;line-height:1.5;color:var(--text-explanation);margin:6px 0 0}
@media(min-width:640px){.g10ch2-tri-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:360px){.g10ch2-tri-grid{gap:6px}.g10ch2-tri-card{padding:6px 2px}}

.g10ch2-special-math{overflow-x:auto;max-width:100%;scrollbar-width:thin}

.g10ch2-factor-power{font-weight:700;padding:4px 2px;border:1px solid transparent;border-radius:4px}
.g10ch2-factor-power.is-picked{color:var(--text-navigation);border-color:#4D8F6B;background:#E9F2EC;text-decoration:underline;text-decoration-thickness:2px}

/* Grade 10 Chapter 3 Algebra — Interactive Concept Labs & Schema Extensions.
   Harmonizes with Bond Light surface tokens, zero network requests, 320px-safe. */
.chapter-hub[data-hub-section="concepts"]:has(.g10ch3-lab) .sp2-detail-view .sp2-formula{
  background:var(--bond-tint,#F3F0E9);
  color:var(--bond-graphite,#181B20);
  border:1px solid var(--bond-border,#D7D4CC);
  border-radius:14px;
  margin:8px 0 14px;
  padding:12px 10px;
  overflow-x:auto;
}
.g10ch3-tamil-badge{
  margin:0 0 10px;
  padding:8px 12px;
  border-radius:10px;
  background:#FFF7EA;
  border:1px solid #E3C996;
  color:var(--text-secondary);
  font-size:12.5px;
  line-height:1.45;
  font-weight:650;
}
.g10ch3-lab{
  background:#FFFFFF;
  border:1px solid var(--bond-border,#D7D4CC);
  border-radius:16px;
  padding:14px;
  margin:10px 0 16px;
  min-width:0;
  box-shadow:0 2px 10px rgba(24,27,32,.04);
}
.g10ch3-lab-title{
  margin:0 0 10px;
  font-size:14.5px;
  line-height:1.4;
  font-weight:750;
  color:var(--bond-graphite,#181B20);
}
.g10ch3-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 10px;
}
.g10ch3-tab,.g10ch3-chip-toggle,.g10ch3-btn{
  box-sizing:border-box;
  min-height:44px;
  min-width:44px;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid var(--bond-border,#D7D4CC);
  background:#FFFFFF;
  color:var(--bond-graphite,#181B20);
  font:inherit;
  font-size:13px;
  font-weight:700;
  line-height:1.3;
  cursor:pointer;
  text-align:center;
  transition:background-color .14s ease,border-color .14s ease;
}
.g10ch3-tab[aria-pressed="true"],.g10ch3-chip-toggle[aria-pressed="true"]{
  background:var(--bond-selection,#F6EDE7);
  border-color:var(--bond-burgundy,#6E2933);
  color:var(--bond-burgundy,#6E2933);
  box-shadow:inset 0 0 0 1px var(--bond-burgundy,#6E2933);
}
.g10ch3-chip-toggle{
  width:100%;
  margin-top:8px;
  text-align:left;
  background:#FAF9F6;
}
.g10ch3-btn-primary{
  background:var(--bond-graphite,#181B20);
  border-color:var(--bond-graphite,#181B20);
  color:#FFFFFF;
}
.g10ch3-btn:disabled{opacity:.45;cursor:default}
.g10ch3-step-badge{
  margin:2px 0 8px;
  font-size:12.5px;
  font-weight:750;
  color:var(--bond-burgundy,#6E2933);
}
.g10ch3-math-box{
  background:#FAF9F6;
  border:1px solid #E5E1D8;
  border-radius:12px;
  padding:10px 8px;
  margin:8px 0;
  overflow-x:auto;
  overflow-y:hidden;
  max-width:100%;
  color:var(--bond-graphite,#181B20);
  text-align:center;
}
.g10ch3-math-box .katex-display{margin:.2em 0}
.g10ch3-note{
  margin:8px 0 0;
  font-size:13.5px!important;
  line-height:1.55!important;
  color:var(--text-secondary)!important;
}
.g10ch3-note.is-danger{
  color:var(--text-incorrect)!important;
  font-weight:650;
}
.g10ch3-callout{
  margin:8px 0 0;
  padding:9px 11px;
  border-radius:10px;
  background:#F6EDE7;
  border-left:3px solid var(--bond-burgundy,#6E2933);
  font-size:13px;
  line-height:1.5;
  color:var(--bond-graphite,#181B20);
}
.g10ch3-step-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:10px;
}
.g10ch3-progress{
  font-size:12px;
  font-weight:700;
  color:var(--bond-muted,#525B62);
  white-space:nowrap;
}
.g10ch3-svg-card{
  background:#FCFBF8;
  border:1px solid #E5E1D8;
  border-radius:12px;
  padding:8px;
  margin:8px 0;
}
.g10ch3-plot{
  min-inline-size:0;
  margin-block:.625rem;
}
.g10ch3-tabs[hidden]{display:none}
.g10ch3-svg{
  display:block;
  width:100%;
  max-width:340px;
  height:auto;
  margin:0 auto;
}
.g10ch3-factor-grid{
  display:grid;
  gap:4px;
  margin:8px 0;
  min-width:0;
}
.g10ch3-fg-row{
  display:grid;
  grid-template-columns:52px repeat(4,minmax(0,1fr));
  gap:4px;
  align-items:center;
  text-align:center;
  font-size:11.5px;
  font-variant-numeric:tabular-nums;
}
.g10ch3-fg-row>*{
  min-width:0;
  padding:7px 2px;
  border-radius:8px;
  background:#FAF9F6;
  border:1px solid #E6E3DC;
  overflow-wrap:break-word;
}
.g10ch3-fg-row>:first-child{
  white-space:nowrap;
}
.g10ch3-fg-row.is-head>*{
  background:transparent;
  border:0;
  font-size:10.5px;
  font-weight:700;
  color:var(--bond-muted,#525B62);
  padding:2px 1px;
}
@media (max-width:400px){
  .chapter-hub[data-hub-section="concepts"]:has(.g10ch3-lab) .katex-display{
    font-size:0.86em;
    margin:0.18em 0;
  }
  .chapter-hub[data-hub-section="concepts"]:has(.g10ch3-lab) .sp2-detail-view .sp2-formula,
  .g10ch3-math-box{
    padding:9px 6px;
  }
  .g10ch3-fg-row{
    grid-template-columns:46px repeat(4,minmax(0,1fr));
    font-size:10.5px;
    gap:3px;
  }
}
.g10ch3-fg-row.is-result.is-min>*{background:#E8F4EF;border-color:#9ACAB9;color:#125445;font-weight:750}
.g10ch3-fg-row.is-result.is-max>*{background:#F6EDE7;border-color:#D8B3A9;color:#6E2933;font-weight:750}
.g10ch3-fg-row.is-result.is-sum>*{background:#EDF1FA;border-color:#AEBEE2;color:#233D75;font-weight:750}
.g10ch3-card-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:6px 0;
}
.g10ch3-mini-card{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:9px 10px;
  border-radius:10px;
  background:#FAF9F6;
  border:1px solid #E5E1D8;
  font-size:12.5px;
}
.g10ch3-mini-card strong{color:var(--bond-burgundy,#6E2933);font-size:13px}
.g10ch3-mat-grid{
  display:grid;
  gap:6px;
  max-width:210px;
  margin:6px auto;
  padding:8px 10px;
  border-left:2.5px solid var(--bond-graphite,#181B20);
  border-right:2.5px solid var(--bond-graphite,#181B20);
  border-radius:12px;
  background:#FAF9F6;
}
.g10ch3-mat-grid.is-compact{
  max-width:none;
  margin:2px 0;
  padding:6px 8px;
  gap:5px;
}
.g10ch3-mat-cell,.g10ch3-mat-static{
  display:grid;
  place-items:center;
  min-width:44px;
  min-height:44px;
  border-radius:9px;
  font-size:15px;
  font-weight:750;
  font-variant-numeric:tabular-nums;
}
.g10ch3-mat-static{
  min-width:34px;
  min-height:36px;
  background:#FFFFFF;
  border:1px solid #E2DFD7;
  color:var(--bond-graphite,#181B20);
}
.g10ch3-mat-static.is-hi{
  background:#E8F4EF;
  border-color:#166353;
  color:#125445;
}
.g10ch3-mat-cell{
  border:1px solid var(--bond-border,#D7D4CC);
  background:#FFFFFF;
  color:var(--bond-graphite,#181B20);
  cursor:pointer;
}
.g10ch3-mat-cell.is-cross{background:#F8F4EE}
.g10ch3-mat-cell.is-selected{
  background:var(--bond-selection,#F6EDE7);
  border:2px solid var(--bond-burgundy,#6E2933);
  color:var(--bond-burgundy,#6E2933);
}
.g10ch3-op-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin:8px 0;
}
.g10ch3-op-mat{display:flex;flex-direction:column;align-items:center;gap:3px}
.g10ch3-op-lbl{font-size:11px;font-weight:750;color:var(--bond-muted,#525B62)}
.g10ch3-op-sym{font-size:18px;font-weight:750;color:var(--bond-graphite,#181B20);padding-top:14px}
.g10ch3-subprompt{margin:2px 0 6px;font-size:12.5px;color:var(--bond-muted,#525B62);text-align:center}

/* Worked demo + collapsible "Understand the idea" + related textbook links */
.chapter-hub[data-hub-section="concepts"]:has(.g10ch3-lab) .sp2-example-math{
  margin:6px 0 8px;
  padding:8px 8px;
  border-radius:10px;
  background:#FAF9F6;
  border:1px solid #E5E1D8;
  overflow-x:auto;
}
.g10ch3-deep-dive{
  margin:12px 0;
  border:1px solid var(--bond-border,#D7D4CC);
  border-radius:13px;
  background:#FCFBF8;
}
.g10ch3-deep-dive summary{
  min-height:44px;
  display:flex;
  align-items:center;
  padding:10px 14px;
  font-size:14px;
  font-weight:750;
  color:var(--bond-burgundy,#6E2933);
  cursor:pointer;
  list-style:none;
}
.g10ch3-deep-dive summary::before{
  content:'▸ ';
  margin-right:7px;
  transition:transform .15s ease;
}
.g10ch3-deep-dive[open] summary::before{content:'▾ '}
.g10ch3-deep-dive summary::-webkit-details-marker{display:none}
.g10ch3-deep-list{
  margin:0;
  padding:0 16px 14px 30px;
  display:grid;
  gap:8px;
  font-size:13.5px;
  line-height:1.58;
  color:var(--text-explanation);
}
.g10ch3-exercise-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:14px 0;
}
.g10ch3-exercise-row .g10ch2-practice-link{
  margin:0;
  flex:1 1 200px;
}
.g10ch3-exercise-note{
  margin:12px 0;
  font-size:12.5px;
  color:var(--bond-muted,#525B62);
}

/* Focus visibility & narrow Android portrait screens */
.g10ch3-tab:focus-visible,.g10ch3-chip-toggle:focus-visible,.g10ch3-btn:focus-visible,.g10ch3-mat-cell:focus-visible,.g10ch3-deep-dive summary:focus-visible{
  outline:3px solid var(--bond-burgundy,#6E2933);
  outline-offset:2px;
}
@media(max-width:430px){
  .g10ch3-lab{padding:11px 10px}
  .g10ch3-tab{font-size:12.5px;padding:8px 9px}
  .g10ch3-fg-row{grid-template-columns:34px repeat(4,minmax(0,1fr));font-size:11px;gap:3px}
  .g10ch3-fg-row.is-head>*{font-size:10px}
}
@media(max-width:340px){
  .g10ch3-fg-row{grid-template-columns:30px repeat(4,minmax(0,1fr));font-size:10px;gap:2px}
  .g10ch3-card-grid{grid-template-columns:minmax(0,1fr)}
}

/* Grade 10 Chapter 4 Geometry — Interactive Concept Studio (Bond-light, 320px-safe, offline). */
.g10ch4-studio{
  display:grid;
  gap:12px;
  min-width:0;
}
.g10ch4-tamil-badge{
  margin:0;
  padding:8px 12px;
  border-radius:10px;
  background:#FFF7EA;
  border:1px solid #E3C996;
  color:var(--text-explanation);
  font-size:12.5px;
  line-height:1.45;
  font-weight:650;
}
.g10ch4-card{
  background:#FFFFFF;
  border:1px solid var(--bond-border,#D7D4CC);
  border-radius:16px;
  padding:14px;
  min-width:0;
  box-shadow:0 2px 10px rgba(24,27,32,.04);
}
.g10ch4-card-head{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 8px;
}
.g10ch4-step-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  background:var(--bond-tint,#F3F0E9);
  color:var(--bond-burgundy,#6E2933);
  font-size:11.5px;
  font-weight:800;
  letter-spacing:.3px;
}
.g10ch4-card-kicker{
  margin:0;
  font-size:12px;
  font-weight:800;
  letter-spacing:.6px;
  text-transform:uppercase;
  color:var(--bond-muted,#525B62);
}
.g10ch4-glance-text{
  margin:0 0 10px;
  font-size:14.5px;
  line-height:1.55;
  color:var(--bond-graphite,#181B20);
  font-weight:550;
}
.g10ch4-glance-visual{
  background:#FCFBF8;
  border:1px solid #E5E1D8;
  border-radius:12px;
  padding:8px;
  margin:0 0 10px;
}
.g10ch4-glance-svg{
  display:block;
  width:100%;
  max-width:300px;
  height:auto;
  margin:0 auto;
}
.g10ch4-formula{
  background:var(--bond-tint,#F3F0E9);
  color:var(--bond-graphite,#181B20);
  border:1px solid var(--bond-border,#D7D4CC);
  border-radius:12px;
  padding:10px 8px;
  overflow-x:auto;
  overflow-y:hidden;
  max-width:100%;
}
.g10ch4-formula .katex-display{margin:.15em 0}

/* Discover Interactive Lab */
.g10ch4-lab{
  min-width:0;
}
.g10ch4-lab-title{
  margin:0 0 8px;
  font-size:14.5px;
  line-height:1.4;
  font-weight:750;
  color:var(--bond-graphite,#181B20);
}
.g10ch4-tabs,.g10ch4-preset-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:6px 0 8px;
}
.g10ch4-tab,.g10ch4-chip-btn{
  box-sizing:border-box;
  min-height:44px;
  min-width:44px;
  padding:8px 11px;
  border-radius:10px;
  border:1px solid var(--bond-border,#D7D4CC);
  background:#FFFFFF;
  color:var(--bond-graphite,#181B20);
  font:inherit;
  font-size:12.5px;
  font-weight:700;
  line-height:1.3;
  cursor:pointer;
  text-align:center;
  transition:background-color .14s ease,border-color .14s ease;
}
.g10ch4-tab[aria-pressed="true"],.g10ch4-chip-btn[aria-pressed="true"]{
  background:var(--bond-selection,#F6EDE7);
  border-color:var(--bond-burgundy,#6E2933);
  color:var(--bond-burgundy,#6E2933);
  box-shadow:inset 0 0 0 1px var(--bond-burgundy,#6E2933);
}
.g10ch4-btn-primary{
  background:var(--bond-graphite,#181B20);
  border-color:var(--bond-graphite,#181B20);
  color:#FFFFFF;
}
.g10ch4-chip-btn:disabled{opacity:.45;cursor:default}
.g10ch4-svg{
  display:block;
  width:100%;
  max-width:340px;
  height:auto;
  margin:6px auto;
  background:#FCFBF8;
  border:1px solid #E5E1D8;
  border-radius:12px;
  touch-action:none;
  user-select:none;
}
.g10ch4-handle{cursor:grab}
.g10ch4-handle:active{cursor:grabbing}
.g10ch4-metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(124px,1fr));
  gap:6px;
  margin:8px 0;
}
.g10ch4-metric{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:8px 10px;
  border-radius:10px;
  background:#FAF9F6;
  border:1px solid #E5E1D8;
  font-variant-numeric:tabular-nums;
  min-width:0;
}
.g10ch4-metric span{
  font-size:11px;
  color:var(--bond-muted,#525B62);
  font-weight:650;
}
.g10ch4-metric strong{
  font-size:13px;
  color:var(--bond-graphite,#181B20);
  overflow-wrap:anywhere;
}
.g10ch4-slider-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:4px 8px;
  align-items:center;
  margin:8px 0 4px;
}
.g10ch4-slider-row[hidden]{display:none}
.g10ch4-slider-top{
  grid-column:1 / -1;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}
.g10ch4-card,.sp2-concept-heading{scroll-margin-top:72px}
.g10ch4-slider-label{
  grid-column:1 / -1;
  font-size:12.5px;
  font-weight:700;
  color:var(--bond-graphite,#181B20);
}
.g10ch4-slider{
  width:100%;
  min-height:44px;
  accent-color:var(--bond-burgundy,#6E2933);
  cursor:pointer;
}
.g10ch4-slider-val{
  min-width:42px;
  text-align:right;
  font-size:13px;
  font-weight:750;
  font-variant-numeric:tabular-nums;
  color:var(--bond-burgundy,#6E2933);
}
.g10ch4-hint{
  margin:4px 0 0;
  font-size:12px!important;
  color:var(--bond-muted,#525B62)!important;
}
.g10ch4-status{
  margin:8px 0 0;
  padding:9px 11px;
  border-radius:10px;
  background:#FAF9F6;
  border:1px solid #E5E1D8;
  font-size:13px!important;
  line-height:1.5!important;
  color:var(--bond-graphite,#181B20)!important;
  font-weight:600;
}
.g10ch4-status.is-match{
  background:#EFF8F4;
  border-color:#BEDFD2;
  color:var(--text-correct)!important;
}
.g10ch4-status.is-warn{
  background:#FDF2F3;
  border-color:#E7BCC1;
  color:var(--text-incorrect)!important;
}
.g10ch4-step-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin:8px 0;
}
.g10ch4-progress{
  font-size:12px;
  font-weight:750;
  color:var(--bond-muted,#525B62);
  white-space:nowrap;
}

/* Understand section */
.g10ch4-intro{
  margin:0 0 10px;
  font-size:13.5px;
  line-height:1.55;
  color:var(--text-explanation);
}
.g10ch4-symbol-list{
  display:grid;
  gap:8px;
  margin:0;
  padding:0;
  list-style:none;
}
.g10ch4-symbol-item{
  display:grid;
  gap:4px;
  padding:9px 11px;
  border-radius:10px;
  background:#FAF9F6;
  border:1px solid #E5E1D8;
}
.g10ch4-symbol-badge{
  font-weight:750;
  color:var(--bond-burgundy,#6E2933);
  overflow-x:auto;
}
.g10ch4-symbol-meaning{
  margin:0;
  font-size:13px;
  line-height:1.52;
  color:var(--text-explanation);
}
.g10ch4-watchout{
  margin:10px 0 0;
  padding:9px 11px;
  border-radius:10px;
  background:#FFF7EA;
  border-left:3px solid #B79253;
  font-size:13px;
  line-height:1.52;
  color:var(--text-explanation);
}

/* Why it works (Visual Proof) */
.g10ch4-proof-list{
  display:grid;
  gap:8px;
  margin:0;
  padding:0;
  list-style:none;
}
.g10ch4-proof-step{
  padding:10px 11px;
  border-radius:11px;
  background:#FAF9F6;
  border:1px solid #E5E1D8;
  min-width:0;
}
.g10ch4-proof-title{
  margin:0 0 5px;
  font-size:13px;
  font-weight:750;
  color:var(--bond-burgundy,#6E2933);
}
.g10ch4-proof-math{
  overflow-x:auto;
  overflow-y:hidden;
  max-width:100%;
  margin:4px 0 6px;
}
.g10ch4-proof-math .katex-display{margin:.15em 0}
.g10ch4-proof-reason{
  margin:0;
  font-size:13px;
  line-height:1.52;
  color:var(--text-explanation);
}

/* Connect section */
.g10ch4-connect-note{
  margin:0 0 10px;
  font-size:13.5px;
  line-height:1.55;
  color:var(--text-explanation);
}
.g10ch4-exercise-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.g10ch4-exercise-row .g10ch2-practice-link{
  margin:0;
  flex:1 1 200px;
  min-height:44px;
}
.g10ch4-exercise-upcoming{
  margin:0;
  font-size:12.5px;
  font-weight:650;
  color:var(--bond-muted,#525B62);
}

.g10ch4-studio .sp2-recall-actions button,.g10ch4-studio .sp2-answers button{
  min-height:44px;
  min-width:44px;
}
.g10ch4-tab:focus-visible,.g10ch4-chip-btn:focus-visible,.g10ch4-slider:focus-visible{
  outline:3px solid var(--bond-burgundy,#6E2933);
  outline-offset:2px;
}
@media(max-width:400px){
  .g10ch4-card{padding:10px 8px}
  .g10ch4-studio .katex-display{font-size:0.78em;margin:0.15em 0}
  .g10ch4-tab,.g10ch4-chip-btn{font-size:12px;padding:8px 9px}
}

/*
 * Triggle | Paper + Indigo | 2026-11-15
 * One shared, low-bandwidth color layer for Grades 9–12.
 * Applied AFTER the functional CSS; no layout changes, scripts, external fonts
 * or image downloads. Preserve distinct colors on mathematical graphs,
 * warnings, success/errors and multi-set Venn diagrams.
 *
 * 7 preview contrast pairs: body 14.64:1, white on indigo 8.96:1,
 * teal plot on white 5.59:1. Those are token-level, not site-wide claims.
 */
:root {
  color-scheme: light;
  --bg: #F7F7F4;
  --card: #FFFFFF;
  --ink: #22283B;
  --muted: #566275;
  --violet: #473D91;
  --deep: #473D91;
  --border: #DADCE5;
  --gold: #B77D20;
  --paper-indigo: #473D91;
  --paper-tint: #EEEAF8;
  --paper-teal: #13746F;
  --paper-rule: #DADCE5;
  --paper-muted: #566275;
  --paper-ink: #22283B;
  --paper-white: #FFFFFF;
  --shadow: 0 6px 24px rgba(34,40,59,.045);
}
body { background: var(--bg); color: var(--ink); }
::selection { background: var(--paper-tint); color: var(--paper-ink); }

/* The surrounding UI reads like paper, not a second interactive activity. */
.sidebar, .appbar, .class-dock, .lesson-card, .chapter-hub,
.path-dialog, .figure-dialog {
  background-color: var(--paper-white);
  color: var(--paper-ink);
}
.appbar { border-bottom-color: var(--paper-rule); }
.sidebar { border-right-color: var(--paper-rule); }
.class-dock { border-color: var(--paper-rule); }
.logo, .brand-mobile .logo, .side-brand .logo {
  background: var(--paper-tint);
  color: var(--paper-indigo);
}
.brand-mobile b, .side-brand b { color: var(--paper-ink); }
.gold { color: var(--gold); }
.lang-switch { background: var(--paper-tint); }
.lang-switch button { color: var(--paper-muted); }
.lang-switch button.active {
  background: var(--paper-white); color: var(--paper-indigo);
}
.browse-button, .basics-link, .icon-button, .side-grade,
.crumb-link, .question-return button {
  color: var(--paper-indigo);
}
.browse-button, .basics-link { background: var(--paper-white); border-color: var(--paper-rule); }
.icon-button { background: var(--paper-tint); }
.crumb-link:hover, .basics-link:hover { background: var(--paper-tint); }
.class-dock .dock-grade.active, .page-button.next,
.step-primary {
  background: var(--paper-indigo); color: white; border-color: var(--paper-indigo);
}
.class-dock .dock-grade:not(.active) { color: var(--paper-muted); }
.page-button:not(.next), .step-quiet, .mark-button, .figure-button,
.dialog-close {
  background: var(--paper-white); color: var(--paper-indigo);
  border-color: var(--paper-rule);
}
.page-track span { background: var(--paper-indigo); }
.lesson-tag, .small-total { background: var(--paper-tint); color: var(--paper-indigo); }
.lesson-card { border-color: var(--paper-rule); }
.question-text {
  color: var(--paper-ink); background: #F8F9FC;
  border-left-color: var(--paper-indigo);
}
.step-reason, .lesson-progress, .mini-topic, .reference-line,
.kind-badge, .step-count { color: var(--paper-muted); }
.step-equation, .lesson-title-row h2 { color: var(--paper-ink); }
.step-circle { background: var(--paper-tint); color: var(--paper-indigo); }
.answer-box, .lesson-card .answer-box { background: #F0F9F6; border-color: #BFDCD4; }
.answer-box>div:first-child, .math-answer { color: #11645B; }

/* Grade chooser and chapter directory. Color conveys selection, not "grade rank". */
.discover-hero {
  background: var(--paper-indigo);
  color: white;
  box-shadow: 0 7px 24px rgba(71,61,145,.09);
}
.discover-hero .discover-description,
.discover-hero .discover-eyebrow { color: #F0ECFF; }
.discover-primary {
  background: #FFFFFF; color: var(--paper-indigo);
  box-shadow: none;
}
.discover-secondary { background: transparent; color: white; border-color: #E3DFFF; }
.discover-grade, .discover-chapter, .discover-feature {
  background: var(--paper-white); color: var(--paper-ink);
  border-color: var(--paper-rule);
}
.discover-grade-copy b, .discover-chapter strong, .discover-section h2,
.discover-feature h2, .discover-directory-head h1 { color: var(--paper-ink); }
.discover-grade-copy small, .discover-chapter-meta,
.discover-feature p { color: var(--paper-muted); }
.discover-grade-number, .discover-grade-10 .discover-grade-number,
.discover-grade-11 .discover-grade-number,
.discover-grade-12 .discover-grade-number, .discover-feature-icon {
  background: var(--paper-tint); color: var(--paper-indigo);
}
.discover-grade-arrow, .discover-card-arrow {
  color: var(--paper-indigo);
}
.discover-grade:hover, .discover-chapter:hover {
  background: #FBFAFF; border-color: var(--paper-indigo);
}
.discover-find input, .discover-find select {
  background: var(--paper-white); color: var(--paper-ink); border-color: var(--paper-rule);
}
.discover-back, .discover-change,
.discover-feature button, .discover-feature-tag {
  color: var(--paper-indigo);
}
.discover-feature { background: #FFFFFF; }
.discover-feature button {
  background: var(--paper-indigo); color: #FFFFFF;
}

/* Chapter menus and textbook exercise choices. */
.chapter-hub .hub-header h2, .chapter-hub .hub-question-group h4,
.hub-section-card strong { color: var(--paper-ink); }
.hub-top-actions button, .hub-back-menu, .hub-resource-link,
.chapter-hub .hub-back-class, .hub-question-arrow {
  color: var(--paper-indigo);
}
.hub-section-card, .hub-question, .hub-quiz-question {
  color: var(--paper-ink); background: var(--paper-white);
  border-color: var(--paper-rule); box-shadow: none;
}
.hub-section-card:hover, .hub-question:hover {
  background: #FBFAFF; border-color: var(--paper-indigo);
}
.hub-section-card.is-current, .hub-quiz-answers button[aria-pressed=true] {
  background: var(--paper-tint); border-color: var(--paper-indigo);
  box-shadow: inset 0 0 0 1px var(--paper-indigo);
}
.hub-section-icon,
.hub-section-card[data-hub-section=exercises] .hub-section-icon,
.hub-section-card[data-hub-section=quizzes] .hub-section-icon,
.hub-section-card[data-hub-section=examples] .hub-section-icon {
  background: var(--paper-tint); color: var(--paper-indigo);
}
.hub-question-title, .hub-section-count { color: var(--paper-muted); }
.hub-question-filters select, .hub-quiz-answers button {
  background: var(--paper-white); color: var(--paper-ink);
  border-color: var(--paper-rule);
}

/* Every grade's Concepts entry and lesson: same paper surface. */
.chapter-hub .sp2-index-view .sp2-nav-button,
.matrix-concepts .mc-index button {
  background: var(--paper-white); color: var(--paper-ink);
  border-color: var(--paper-rule);
  box-shadow: none;
}
.chapter-hub .sp2-index-view .sp2-nav-button.sp2-current,
.chapter-hub .sp2-index-view .sp2-nav-button[aria-current=step],
.matrix-concepts .mc-index button[aria-current=step] {
  background: var(--paper-tint); color: var(--paper-ink);
  border-color: var(--paper-indigo);
}
.sp2-nav-number, .chapter-hub .sp2-index-view .sp2-nav-number,
.matrix-concepts .mc-index button span {
  background: var(--paper-tint); color: var(--paper-indigo);
}
.chapter-hub .sp2-back-index, .matrix-concepts [data-index-toggle] {
  color: var(--paper-indigo);
}
.chapter-overview .sp2-journey h4,
.chapter-overview .sp2-journey h5, .sp2-idea,
.rnlab-big, .sp2-demo-output, .sp2-recall>p {
  color: var(--paper-ink);
}
.sp2-formula, .chapter-hub .sp2-journey .sp2-formula,
.rnlab .rnlab-foundation-equation {
  background: #F8F7FD; color: var(--paper-ink);
  border-color: var(--paper-rule);
}
.sp2-demo, .chapter-hub .sp2-journey .sp2-demo {
  background: #FBFBFE; border-color: var(--paper-rule);
}
.sp2-demo-title, .sp2-range-label, .rnlab-range label {
  color: var(--paper-muted);
}
.sp2-demo-controls button, .sp2-answers button,
.sp2-recall-actions button, .sp2-reveal,
.rnlab .rnlab-choice {
  background: var(--paper-white); border-color: var(--paper-rule);
  color: var(--paper-indigo);
}
.sp2-demo-controls button[aria-pressed=true],
.sp2-answers button[aria-pressed=true],
.rnlab [data-answers] button[aria-pressed=true] {
  background: var(--paper-tint); color: var(--paper-indigo);
  border-color: var(--paper-indigo);
  box-shadow: inset 0 0 0 1px var(--paper-indigo);
}
.sp2-why, .sp2-explanation, .rnlab-pitfall {
  background: #FAF9FD; border-color: var(--paper-rule);
  color: var(--paper-ink);
}
.sp2-explanation summary { color: var(--paper-indigo); }
.sp2-stage-reference, .rnlab-source-note { color: var(--paper-muted); }
.sp2-journey-footer, .chapter-hub .sp2-journey[data-view=lesson] .sp2-journey-footer,
.matrix-concepts[data-view=lesson] [data-adaptive-dock] {
  background: #FFFFFF; border-color: var(--paper-rule);
}
.sp2-journey-footer button, .chapter-hub .sp2-journey[data-view=lesson] .sp2-journey-footer button,
.matrix-concepts[data-view=lesson] [data-adaptive-dock] button {
  background: var(--paper-white); border-color: var(--paper-rule);
  color: var(--paper-indigo);
}
.sp2-journey-footer .sp2-footer-next,
.chapter-hub .sp2-journey[data-view=lesson] .sp2-journey-footer button.sp2-footer-next {
  background: var(--paper-indigo); color: white; border-color: var(--paper-indigo);
}
.sp2-demo-controls input[type=range], .rnlab-range input,
.matrix-concepts input[type=range] { accent-color: var(--paper-indigo); }

/* A second hue is reserved for mathematical plot marks and data. Don't turn
   all graphs into one color: Venn memberships and contrasting quantities
   need their existing separate visual encodings. */
.rnlab .rnlab-line :is(.rnlab-selected,.selected-point) {
  fill: var(--paper-teal); stroke: var(--paper-teal);
}
.matrix-concepts {
  --mc-ink: var(--paper-ink);
  --mc-purple: var(--paper-indigo);
  --mc-line: var(--paper-rule);
  color: var(--paper-ink);
}
.matrix-concepts .mc-stage,
.matrix-concepts .mc-controls,
.matrix-concepts .mc-index button,
.matrix-concepts .mc-check {
  border-color: var(--paper-rule);
}
.matrix-concepts .mc-stage { background: var(--paper-white); }
.matrix-concepts .mc-controls { background: #F7F7FA; }
.matrix-concepts .mc-index button,
.matrix-concepts button, .matrix-concepts select {
  color: var(--paper-ink);
}
.matrix-concepts .mc-primary {
  background: var(--paper-indigo); color: #FFFFFF; border-color: var(--paper-indigo);
}
.matrix-concepts .mc-navigation button:last-child {
  background: var(--paper-indigo); color: #FFFFFF; border-color: var(--paper-indigo);
}
.matrix-concepts [data-index-toggle] { color: var(--paper-indigo); }
.matrix-concepts .mc-takeaway { border-left-color: var(--paper-teal); color: var(--paper-ink); }
.matrix-concepts .mc-dot-primary { fill: var(--paper-teal); }
.matrix-concepts .mc-line-primary { stroke: var(--paper-teal); }

/* Keyboard and low-cost-device contrast. No animation, images or requests. */
:where(button,a,input,select,summary,[tabindex]):focus-visible,
.sp2-journey button:focus-visible,
.sp2-journey summary:focus-visible,
.matrix-concepts button:focus-visible,
.matrix-concepts select:focus-visible {
  outline: 3px solid var(--paper-indigo);
  outline-offset: 3px;
}
.discover-hero :is(button,a):focus-visible { outline-color: #FFFFFF; }
@media (forced-colors: active) {
  .sp2-nav-button[aria-current=step], .matrix-concepts .mc-index button[aria-current=step],
  .sp2-answers button[aria-pressed=true], .hub-section-card.is-current {
    outline: 2px solid Highlight; outline-offset: -2px;
  }
}

/*
 * VER Triggle | Midnight Precision (Bond-inspired light learning)
 * 2026-11-15. Loaded after paper-indigo.css, intentionally reversible.
 *
 * No fonts, images, imports or animations. Retains all maths and diagrams.
 * Gold is decorative only: it must not carry small-text contrast on white.
 */
:root {
  color-scheme: light;
  --text-primary: #181B20;
  --text-explanation: #404650;
  --text-secondary: #525B62;
  --text-navigation: #6E2933;
  --text-correct: #166353;
  --text-incorrect: #B42318;
  --brand-gold: #B79253;
  --surface-page: #F7F6F2;
  --surface-content: #FFFFFF;
  --surface-correct: #EFF8F4;
  --surface-incorrect: #FEF3F2;
  --control-border: #7A7470;

  --bond-graphite: var(--text-primary);
  --bond-charcoal: var(--text-explanation);
  --bond-brass: var(--brand-gold);
  --bond-burgundy: var(--text-navigation);
  --bond-ivory: var(--surface-page);
  --bond-white: var(--surface-content);
  --bond-emerald: var(--text-correct);
  --bond-muted: var(--text-secondary);
  --bond-border: #D7D4CC;
  --bond-tint: #F3F0E9;
  --bond-selection: #F6EDE7;
  --bg: var(--bond-ivory);
  --card: var(--bond-white);
  --ink: var(--bond-graphite);
  --muted: var(--bond-muted);
  --violet: var(--bond-graphite);
  --deep: var(--bond-graphite);
  --border: var(--bond-border);
  --gold: var(--bond-brass);
  --paper-indigo: var(--bond-graphite);
  --paper-tint: var(--bond-tint);
  --paper-rule: var(--bond-border);
  --paper-muted: var(--bond-muted);
  --paper-ink: var(--bond-graphite);
  --paper-white: var(--bond-white);
  --shadow: 0 5px 23px rgba(24,27,32,.045);
}
body { background: var(--bond-ivory); color: var(--bond-graphite); }
::selection { background: #E9D8BD; color: var(--bond-graphite); }

/* A white, distraction-free navigation surface on every grade and lesson.
 * The graphite-and-brass logo is the single Bond signature, not a dark toolbar. */
.appbar {
  background: var(--bond-white);
  border-bottom-color: var(--bond-border);
  color: var(--bond-graphite);
  backdrop-filter: none;
}
.appbar .brand-mobile b { color: var(--bond-graphite); }
.appbar .brand-mobile .logo {
  background: var(--bond-graphite); color: #E0BE84;
}
.appbar .gold { color: var(--bond-brass); }
.appbar .browse-button,
.appbar .basics-link {
  background: var(--bond-white); border-color: var(--bond-border);
  color: var(--bond-graphite);
}
.appbar .browse-button:hover, .appbar .basics-link:hover {
  background: var(--bond-tint);
  border-color: var(--bond-border);
  color: var(--bond-graphite);
}
.appbar .home-link[aria-current=page] {
  background: var(--bond-white);
  border-color: var(--bond-border);
  color: var(--bond-graphite);
}
.appbar .lang-switch { background: var(--bond-tint); }
.appbar .lang-switch button { color: var(--bond-graphite); }
.appbar .lang-switch button.active {
  background: var(--bond-white); color: var(--bond-graphite);
  box-shadow: 0 1px 5px rgba(24,27,32,.12);
}

/* Class rail and concise chapter/exercise wayfinding. */
.sidebar, .sidebar-foot, .sidebar-search-bottom {
  background: #FBFAF7;
  border-color: var(--bond-border);
}
.side-brand .logo {
  background: var(--bond-graphite); color: #E0BE84;
}
.side-brand b { color: var(--bond-graphite); }
.side-caption, .side-brand small, .side-count, .sidebar-foot p {
  color: var(--bond-muted);
}
.side-grade { background: var(--bond-white); border-color: var(--bond-border); color: var(--bond-graphite); }
.side-grade.active, .class-dock .dock-grade.active {
  background: var(--bond-graphite); border-color: var(--bond-graphite); color: #FFFFFF;
}
.side-grade:hover, .exercise-group>summary:hover, .exercise-question:hover {
  background: var(--bond-tint); border-color: var(--bond-burgundy);
}
.exercise-group>summary { color: var(--bond-graphite); }
.exercise-question { color: var(--bond-muted); }
.exercise-question.active {
  background: var(--bond-selection); color: var(--bond-burgundy);
}
.sidebar-chapter-sections button.active {
  background: var(--bond-selection); color: var(--bond-burgundy); border-color: var(--bond-burgundy);
}
.search-field {
  background: var(--bond-white); border-color: var(--bond-border); color: var(--bond-muted);
}
.search-field input { color: var(--bond-graphite); }

/* Home: one distinctive dark signature, then calm light chapter cards. */
.discover-hero {
  background: var(--bond-graphite); color: #FFFFFF;
  box-shadow: 0 7px 22px rgba(24,27,32,.085);
}
.discover-hero .discover-eyebrow, .discover-hero .discover-description { color: #F0EEEA; }
.discover-hero .discover-primary {
  background: #FFFFFF; color: var(--bond-graphite);
}
.discover-hero .discover-secondary {
  background: transparent; color: #FFFFFF; border-color: #D6C5AB;
}
.discover-grade, .discover-chapter, .discover-feature, .hub-section-card,
.hub-question, .hub-quiz-question {
  background: #FFFFFF; color: var(--bond-graphite);
  border-color: var(--bond-border);
  box-shadow: none;
}
.discover-grade-number, .discover-feature-icon, .hub-section-icon,
.hub-section-card[data-hub-section=exercises] .hub-section-icon,
.hub-section-card[data-hub-section=quizzes] .hub-section-icon,
.hub-section-card[data-hub-section=examples] .hub-section-icon {
  background: var(--bond-graphite); color: #E0BE84;
}
.discover-grade-arrow, .discover-card-arrow,
.hub-question-arrow { color: var(--bond-burgundy); }
.discover-grade:hover, .discover-chapter:hover, .hub-section-card:hover,
.hub-question:hover {
  background: #FCFBF8; border-color: var(--bond-burgundy);
}
.discover-directory-head, .chapter-fastnav {
  background: var(--bond-tint); border-color: var(--bond-border);
}
.discover-back, .discover-change, .chapter-hub .hub-top-actions button,
.hub-back-menu, .question-return button, .exercise-index-link {
  color: var(--bond-burgundy);
}
.hub-section-card.is-current, .hub-quiz-answers button[aria-pressed=true] {
  background: var(--bond-selection);
  border-color: var(--bond-burgundy);
  box-shadow: inset 0 0 0 1px var(--bond-burgundy);
}

/* The theme applies to the complete student journey (not only the home).
 * Grade 10 Relations and Functions has the same surfaces as Grades 9, 11 and 12.
 * No change to content, spacing, mathematics, transitions or navigation. */
.discover-home-minimal h1, .discover-home-minimal h2 {
  color: var(--bond-graphite) !important;
}
.discover-class-header h1, .discover-directory-head h1,
.discover-section h2, .discover-feature h2,
.chapter-hub .hub-header h2, .chapter-hub .hub-section-menu h3,
.chapter-overview h2, .chapter-overview h3,
.welcome h1 { color: var(--bond-graphite); }
.discover-class-switch, .discover-class-switch span,
.discover-grade-copy b, .discover-chapter strong { color: var(--bond-graphite); }
.discover-class-count, .discover-class-options {
  background: var(--bond-tint); border-color: var(--bond-border);
  color: var(--bond-muted);
}
.discover-class-option {
  background: var(--bond-white); border-color: var(--bond-border);
  color: var(--bond-graphite);
}
.discover-class-option.is-current {
  background: var(--bond-graphite); border-color: var(--bond-graphite);
  color: var(--bond-white);
}
.hub-section-menu h3, .hub-question-group h4,
.chapter-hub .hub-question-label { color: var(--bond-graphite); }
.hub-section-description { color: var(--text-explanation); }
.hub-question-title { color: var(--text-primary); }
.hub-section-count, .discover-chapter-meta, .discover-grade-copy small, .crumb {
  color: var(--bond-muted);
}
.hub-exercise-link, .chapter-link, .chapter-question-links button {
  background: var(--bond-white); border-color: var(--bond-border);
  color: var(--bond-graphite);
}
.hub-exercise-link:hover, .chapter-link:hover,
.chapter-question-links button:hover {
  background: #FCFBF8; border-color: var(--bond-burgundy);
}
.hub-exercise-arrow, .chapter-reference a, .hub-resource-link {
  color: var(--bond-burgundy);
}
.chapter-link.active {
  background: var(--bond-selection); border-color: var(--bond-burgundy);
  color: var(--bond-graphite);
}
.chapter-overview, .chapter-sections li,
.chapter-fastnav select, .hub-question-filters select {
  background: var(--bond-white); border-color: var(--bond-border);
  color: var(--bond-graphite);
}
.hub-exercise-link:focus-visible, .discover-class-switch:focus-visible,
.discover-class-option:focus-visible {
  outline: 3px solid var(--bond-burgundy);
  outline-offset: 2px;
}

/* Exercise reader. Preserve original mathematical glyphs and line spacing. */
.lesson-card { background: #FFFFFF; border-color: var(--bond-border); }
.lesson-title-row h2, .step-equation, .question-text { color: var(--bond-graphite); }
.lesson-tag, .small-total {
  background: var(--bond-selection); border-color: #E8D5D2; color: var(--bond-burgundy);
}
.question-text {
  background: #FAF9F6; border-left-color: var(--bond-burgundy);
}
.step-circle {
  background: var(--bond-tint); color: var(--bond-graphite);
}
.figure-button, .page-button:not(.next), .step-quiet,
.mark-button, .dialog-close {
  background: #FFFFFF; color: var(--bond-graphite); border-color: var(--bond-border);
}
.page-button.next, .step-primary, .discover-feature button {
  background: var(--bond-graphite); border-color: var(--bond-graphite); color: #FFFFFF;
}
.page-status, .crumb-link span, .hub-section-arrow { color: var(--bond-muted); }
.page-track span { background: var(--bond-burgundy); }
.answer-box, .lesson-card .answer-box {
  background: var(--surface-correct); border-color: #BEDFD2;
}
.answer-box>div:first-child, .math-answer { color: var(--bond-emerald); }
.mark-button[aria-pressed=true] {
  background: var(--surface-correct); border-color: #BEDFD2; color: var(--bond-emerald);
}

/* Concept indexes, demos, matrices: selection is not confused with correctness. */
.chapter-hub .sp2-index-view .sp2-nav-button.sp2-current,
.chapter-hub .sp2-index-view .sp2-nav-button[aria-current=step],
.matrix-concepts .mc-index button[aria-current=step] {
  background: var(--bond-selection);
  color: var(--text-navigation);
  border-color: var(--text-navigation);
}
.sp2-nav-number, .chapter-hub .sp2-index-view .sp2-nav-number,
.matrix-concepts .mc-index button span {
  background: var(--bond-tint); color: var(--bond-graphite);
}
.sp2-journey-footer .sp2-footer-next,
.chapter-hub .sp2-journey[data-view=lesson] .sp2-journey-footer button.sp2-footer-next,
.matrix-concepts .mc-primary,
.matrix-concepts .mc-navigation button:last-child {
  background: var(--bond-graphite); border-color: var(--bond-graphite); color: #FFFFFF;
}
.sp2-demo-controls button[aria-pressed=true], .sp2-answers button[aria-pressed=true],
.rnlab [data-answers] button[aria-pressed=true] {
  background: var(--bond-selection); color: var(--bond-burgundy);
  border-color: var(--bond-burgundy);
}
.sp2-demo, .chapter-hub .sp2-journey .sp2-demo,
.matrix-concepts .mc-stage, .sp2-formula {
  background: #FFFFFF;
}
.sp2-demo-controls input[type=range], .rnlab-range input,
.matrix-concepts input[type=range] { accent-color: var(--bond-burgundy); }
/* Mathematics plot colors (multiple sets, lines, points), warning and error
 * states are deliberately NOT overridden by this visual theme. */

/* Answer groups and form controls need a visible boundary on paper. */
.hub-quiz-answers button,
.sp2-answers button,
.search-field,
.chapter-hub .hub-question-filters select {
  border-color: var(--control-border);
}
.hub-quiz-answers button[aria-pressed=true],
.sp2-answers button[aria-pressed=true] {
  border-color: var(--text-navigation);
  color: var(--text-navigation);
}
.sp2-journey :is(.sp2-formula, .sp2-demo-output, .sp2-recall > p:not([role=status])) {
  color: var(--text-primary);
}
.sp2-journey :is(.sp2-idea, .sp2-example, .sp2-intro) {
  color: var(--text-explanation);
}

/* Discoverable keyboard navigation and accessible focus on both surfaces. */
:where(button,a,input,select,summary,[tabindex]):focus-visible,
.sp2-journey button:focus-visible, .matrix-concepts button:focus-visible {
  outline: 3px solid var(--bond-burgundy);
  outline-offset: 3px;
}
.appbar :is(button,a):focus-visible {
  outline: 3px solid var(--bond-burgundy);
  outline-offset: 3px;
}
.discover-hero :is(button,a):focus-visible {
  outline: 3px solid #F0D7A9;
  outline-offset: 3px;
}
@media (forced-colors: active) {
  .hub-section-card.is-current, .exercise-question.active,
  .sp2-nav-button[aria-current=step] {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}

/* Probability concept lessons use the existing Bond Light shell and journey. */
.probability-lesson {
  color: var(--ink, #241e26);
  line-height: 1.55;
}

.probability-lesson p {
  margin: 0 0 10px;
  font-size: 1rem;
}

.probability-demo {
  display: grid;
  gap: 9px;
}

.probability-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.probability-controls button {
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #a99a9e;
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 650;
  cursor: pointer;
}

.probability-controls button[aria-pressed="true"] {
  border-color: #792b45;
  background: #792b45;
  color: #fff;
}

.probability-outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3.8rem, 1fr));
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.probability-wide-outcomes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.probability-outcomes li {
  display: grid;
  place-content: center;
  grid-auto-flow: column;
  gap: 4px;
  min-height: 43px;
  padding: 4px;
  border: 1px solid #d2c7cb;
  border-radius: 7px;
  background: #fff;
  color: var(--text-primary);
  text-align: center;
  font-size: 0.94rem;
}

.probability-outcomes .probability-match,
.probability-outcomes [data-matches="A"] {
  border-color: #792b45;
  background: #f7e7ec;
  font-weight: 700;
}

.probability-outcomes [data-matches="B"] {
  border-color: #326458;
  background: #e7f4ee;
  font-weight: 700;
}

.probability-outcomes [data-matches="A and B"] {
  border-color: #483a61;
  background: #eee8f7;
  font-weight: 700;
}

.probability-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(50px, 1fr);
  align-items: center;
  gap: 4px 10px;
  margin: 0;
}

.probability-comparison dd {
  margin: 0;
}

.probability-comparison meter {
  width: 100%;
  height: 16px;
}

.probability-result {
  margin-top: 8px;
}

.probability-detail {
  border-block: 1px solid #d2c7cb;
  margin: 14px 0;
}

.probability-detail summary {
  min-height: 44px;
  padding: 10px 4px;
  font-weight: 700;
  cursor: pointer;
}

.probability-detail summary:focus-visible,
.probability-controls button:focus-visible {
  outline: 3px solid #792b45;
  outline-offset: 2px;
}

.probability-lesson .probability-answers {
  display: grid;
}

.probability-answers button {
  text-align: left;
}

.probability-feedback:not(:empty) {
  margin-top: 10px;
  font-weight: 650;
}

.probability-lesson .probability-feedback p {
  margin: 4px 0 0;
  font-weight: 400;
}

.probability-event-pairs .probability-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.probability-demo .probability-event-key {
  margin: 0;
}

.g9-investigation {
  display: grid;
  gap: .8rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.g9-investigation p {
  margin: 0;
}

.g9-investigation fieldset {
  min-inline-size: 0;
  margin: 0;
  padding: .75rem;
  border: 1px solid var(--line, #d9dfeb);
  border-radius: .75rem;
}

.g9-investigation legend {
  max-inline-size: 100%;
  padding-inline: .3rem;
  font-weight: 700;
}

.g9-investigation .sp2-answers {
  margin-block: .4rem;
}

.g9-investigation .sp2-answers button,
.g9-investigation-reset {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
}

.g9-investigation-diagram svg {
  display: block;
  width: 100%;
  max-width: 28rem;
  height: auto;
  margin: .5rem auto;
}

.g9-investigation-diagram table {
  margin-block: .5rem;
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.g9-investigation-diagram :is(th, td) {
  padding: .25rem .1rem;
  border: 1px solid var(--line, #d9dfeb);
}

.g9-investigation-result,
.g9-investigation-feedback {
  padding-block: .35rem;
}

.g9-investigation-math {
  min-width: 0;
  max-width: 100%;
}

.g9-investigation-reset {
  padding: .25rem .7rem;
}

.g9-investigation-more summary {
  cursor: pointer;
  font-weight: 600;
}

.g9-investigation-more p {
  margin-block: .55rem;
}

/* Statistics activities sit inside the shared Bond Light concept journey. */
.statistics-studio {
  color: var(--bond-charcoal, #241e26);
  line-height: 1.55;
}

.statistics-studio p {
  margin: 8px 0;
}

.statistics-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.statistics-studio [hidden] {
  display: none;
}

.statistics-options button,
.statistics-exercise {
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #a99a9e;
  border-radius: 8px;
  background: white;
  color: var(--text-primary);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.statistics-options button[aria-pressed="true"] {
  background: #792b45;
  border-color: #792b45;
  color: white;
}

.statistics-studio :is(button, summary):focus-visible {
  outline: 3px solid #792b45;
  outline-offset: 2px;
}

.statistics-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.statistics-table caption {
  padding: 4px 0;
  text-align: left;
  font-weight: 700;
}

.statistics-table :is(th, td) {
  padding: 5px;
  border-bottom: 1px solid #d2c7cb;
  text-align: left;
}

.statistics-tiles,
.statistics-bars {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}

.statistics-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.statistics-tiles li,
.statistics-bars li {
  padding: 5px 8px;
  border: 1px solid #d2c7cb;
  border-radius: 6px;
}

.statistics-studio .statistics-highlight {
  background: #f7e7ec;
  font-weight: 700;
}

.statistics-bars li {
  display: grid;
  grid-template-columns: minmax(65px, 1.1fr) minmax(40px, 1fr) 1.5ch;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.statistics-bars meter {
  width: 100%;
}

.statistics-studio details {
  border-block: 1px solid #d2c7cb;
  margin: 12px 0;
}

.statistics-studio summary {
  min-height: 44px;
  padding: 10px 2px;
  font-weight: 700;
  cursor: pointer;
}

.statistics-answers {
  display: grid;
}

.statistics-answers button {
  text-align: left;
}

/* Grade 9 Mensuration — focused, touch-first, offline-ready learning lab. */
.g9m-lab{max-width:100%;min-width:0;margin:0 auto 1rem;padding:clamp(.8rem,3vw,1.1rem);border:1px solid rgba(88,103,126,.23);border-radius:18px;background:rgba(122,140,167,.055)}
.g9m-instruction{font-size:1rem;line-height:1.55;margin:0 0 .8rem;color:inherit}
.g9m-choices{display:flex;flex-wrap:wrap;gap:.55rem}
.g9m-choices button{appearance:none;min-width:66px;min-height:46px;display:inline-flex;justify-content:center;align-items:center;cursor:pointer;border-radius:13px;padding:.55rem .9rem;font:inherit;font-weight:700;line-height:1.25;border:1px solid rgba(68,82,113,.35);background:var(--card,#fff);color:var(--ink,#263345)}
.g9m-choices button[aria-pressed="true"]{border-color:#a04e50;box-shadow:inset 0 0 0 1px #a04e50;background:rgba(160,78,80,.09)}
.g9m-choices button:focus-visible{outline:3px solid #ad5a58;outline-offset:2px}
.g9m-diagram{min-height:160px;max-width:340px;margin:.3rem auto .2rem;display:grid;place-items:center}
.g9m-triangle{width:100%;height:auto;overflow:visible}
.g9m-edges{fill:none;stroke:#8a5350;stroke-width:3;stroke-linejoin:round}
.g9m-side-labels{font-size:15px;font-weight:700;text-anchor:middle;fill:currentColor;paint-order:stroke;stroke:var(--card,#fff);stroke-width:5px;stroke-linejoin:round}
.g9m-vertices{font-size:13px;font-weight:650;fill:currentColor}
.g9m-impossible{font-size:.97rem;line-height:1.6;text-align:center;padding:1.2rem .75rem;margin:0}
.g9m-result{min-height:2.8rem;font-size:.98rem;line-height:1.65;font-weight:650;padding:.75rem .85rem;border-radius:12px;background:rgba(126,139,160,.1);overflow-wrap:anywhere}
@media(max-width:350px){.g9m-choices{gap:.4rem}.g9m-choices button{min-width:59px;padding:.55rem}.g9m-lab{padding:.7rem}}
@media(prefers-reduced-motion:reduce){.g9m-lab *{scroll-behavior:auto}}

/* 7.3 area split: large labels with halos, never buried under the diagonal. */
.g9m-quad-svg,.g9m-net-svg{width:100%;height:auto;display:block}
.g9m-quad-svg .g9m-quad-outline{fill:rgba(147,90,86,.06);stroke:#88504c;stroke-width:3;stroke-linejoin:round}
.g9m-quad-svg .g9m-quad-half{fill:rgba(177,81,77,.28);stroke:none;opacity:.14;transition:opacity .15s ease}
.g9m-quad-svg .g9m-quad-half.is-active{opacity:1}
.g9m-quad-svg .g9m-quad-diagonal{stroke:#665d57;stroke-width:2;stroke-dasharray:5 4}
.g9m-quad-svg .g9m-quad-labels{font-weight:700;font-size:13px;text-anchor:middle;fill:currentColor;paint-order:stroke;stroke:var(--card,#fff);stroke-width:5px;stroke-linejoin:round}
/* 7.4 exact six-face unfolded net; faded excluded top and bottom. */
.g9m-net-svg .g9m-net-face rect{stroke:#775a4e;stroke-width:1.7;fill:#ecd4b9}
.g9m-net-svg .g9m-net-face:nth-child(odd) rect{fill:#e5c3a2}
.g9m-net-svg .g9m-net-face.is-muted rect{fill:#e6e9ee;stroke:#9ca3ad;stroke-dasharray:3 3}
.g9m-net-svg .g9m-net-face text{font-size:12px;font-weight:700;fill:#372b28;text-anchor:middle;paint-order:stroke;stroke:#fff;stroke-width:2.5px}
.g9m-net-svg .g9m-net-face.is-muted text{fill:#6d737c}
.g9m-choices + .g9m-choices{margin-top:.65rem}
.g9m-layers{display:grid;gap:.55rem;padding:1rem .45rem;justify-content:center;overflow:visible}
.g9m-layer{display:flex;align-items:center;gap:.75rem}
.g9m-layer-name{font-size:.9rem;min-width:4rem;font-weight:650}
.g9m-cubes{display:grid;gap:3px}
.g9m-unit-cube{display:block;width:100%;aspect-ratio:1;background:#e9c7a6;border:1.5px solid #8d6150;border-radius:3px;box-shadow:inset 1px 1px 0 rgba(255,255,255,.6)}
.g9m-layer:nth-child(even) .g9m-unit-cube{background:#cfb5b0}
@media(max-width:350px){.g9m-layer{gap:.5rem}.g9m-layer-name{min-width:3.5rem;font-size:.82rem}}
@media(prefers-reduced-motion:reduce){.g9m-quad-svg .g9m-quad-half{transition:none}}

.g9m-tamil-badge{margin:.35rem 0 .65rem;color:inherit;opacity:.8;font-size:.85rem;line-height:1.45;max-width:65ch}

/*
 * Triggle Grade 9 Concepts — Mensuration-inspired, scoped visual language.
 * Shared learning chrome only; preserve domain-specific math/diagram colours.
 * English and Tamil, offline, mobile-first. No Grade 10–12 selectors.
 */
.chapter-hub[data-grade="9"][data-hub-section="concepts"] {
  --g9-ui-lab-bg: rgba(122, 140, 167, .055);
  --g9-ui-lab-border: rgba(88, 103, 126, .23);
  --g9-ui-lab-pad: clamp(.8rem, 3vw, 1.1rem);
  --g9-ui-card: var(--card, #fff);
  --g9-ui-border: var(--bond-border, #d7d4cc);
  --g9-ui-ink: var(--bond-graphite, #22283b);
  --g9-ui-muted: var(--bond-muted, #566275);
  --g9-ui-selected: var(--bond-selection);
  --g9-ui-selected-border: var(--text-navigation);
  --g9-ui-focus: var(--text-navigation);
  --g9-ui-result: rgba(126, 139, 160, .1);
}

/* Match Ch 7's softly tinted teaching lab, without inserting new DOM nodes. */
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  .g9m-lab,
  .sp2-journey .lc-lab,
  .sp2-journey .sp2-demo,
  .probability-demo
) {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  padding: var(--g9-ui-lab-pad);
  border: 1px solid var(--g9-ui-lab-border);
  border-radius: 18px;
  background: var(--g9-ui-lab-bg);
  box-shadow: none;
}

/* All selector groups retain their original grid/flex/width behaviour. */
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  .g9m-choices button,
  .sp2-demo-controls button,
  .lc-rules button,
  .rnlab .rnlab-choice,
  .rnlab .rnlab-foundation-tabs button,
  .probability-controls button
) {
  box-sizing: border-box;
  min-height: 46px;
  max-width: 100%;
  padding: .55rem .9rem;
  border: 1px solid var(--control-border);
  border-radius: 13px;
  background: var(--g9-ui-card);
  color: var(--g9-ui-ink);
  font-family: inherit;
  font-size: clamp(.875rem, 2.8vw, 1rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  .g9m-choices button,
  .sp2-demo-controls button,
  .lc-rules button,
  .rnlab .rnlab-choice,
  .rnlab .rnlab-foundation-tabs button,
  .probability-controls button
)[aria-pressed="true"] {
  background: var(--g9-ui-selected);
  border-color: var(--g9-ui-selected-border);
  box-shadow: inset 0 0 0 1px var(--g9-ui-selected-border);
  color: var(--g9-ui-ink);
}

/* Do not paint Venn regions, sets, number-line markers, surd tiles, or event
 * outcomes in theme colours: those hues communicate mathematical meaning. */
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  .lc-lab-title,
  .lc-instruction,
  .lc-tag,
  .sp2-demo-title,
  .sp2-question-label,
  .rnlab-big,
  .rnlab-range label
) {
  color: var(--g9-ui-ink);
}
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  .lc-detective,
  .lc-equation,
  .rnlab-surd-equation
) {
  border-color: var(--g9-ui-border);
}
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  .g9m-result,
  .probability-result:not(:empty)
) {
  padding: .75rem .85rem;
  border-radius: 12px;
  background: var(--g9-ui-result);
  color: var(--g9-ui-ink);
  font-size: .98rem;
  font-weight: 650;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  .sp2-explanation,
  .rnlab-pitfall,
  .probability-detail
) {
  border: 1px solid var(--g9-ui-border);
  border-radius: 13px;
  background: var(--g9-ui-card);
}
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  .sp2-explanation summary,
  .rnlab-pitfall summary,
  .probability-detail summary
) {
  box-sizing: border-box;
  min-height: 46px;
  padding: .65rem .9rem;
  color: var(--g9-ui-ink);
  font-weight: 700;
}

/* NEON M02 P1: Keep Sets' long Tamil top controls side by side.
   Restrict this compact treatment to the Sets lesson (not Grade 10 nav). */
.chapter-hub[data-grade="9"][data-hub-section="concepts"] .g9-set-journey .sp2-detail-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  column-gap: 5px;
}
.chapter-hub[data-grade="9"][data-hub-section="concepts"] .g9-set-journey .sp2-detail-navigation :is(.sp2-back-index, .sp2-top-next) {
  box-sizing: border-box;
  min-width: 0;
  padding-inline: 0;
  font-size: clamp(11px, 3.05vw, 13px);
  letter-spacing: normal;
  white-space: nowrap;
}

/* NEON M02 P1: Flex summaries suppress the platform disclosure marker.
   Provide an explicit accessible visual affordance without changing details. */
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  details.sp2-explanation,
  details.rnlab-pitfall
) > summary {
  list-style: none;
  gap: .45rem;
  cursor: pointer;
}
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  details.sp2-explanation,
  details.rnlab-pitfall
) > summary::-webkit-details-marker {
  display: none;
}
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  details.sp2-explanation,
  details.rnlab-pitfall
) > summary::before {
  content: '▸';
  display: inline-block;
  flex: none;
  color: var(--g9-ui-selected-border);
  font-size: 1.12em;
  line-height: 1;
  transform-origin: center;
  transition: transform .15s ease;
}
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  details.sp2-explanation,
  details.rnlab-pitfall
)[open] > summary::before {
  transform: rotate(90deg);
}

/* NEON M02 P2: Outcome displays must not look like another row of controls.
   Preserve semantic A/B colours and all clickable button styles. */
.chapter-hub[data-grade="9"][data-hub-section="concepts"] .probability-demo .probability-outcomes {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--g9-ui-lab-border);
}
.chapter-hub[data-grade="9"][data-hub-section="concepts"] .probability-demo .probability-outcomes li {
  border-radius: 8px;
}

/* Text on SVG strokes remains readable without altering plot semantics. */
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  .rnlab-line text,
  .lc-set-label,
  .lc-count-label
) {
  paint-order: stroke;
  stroke: var(--g9-ui-card);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
  button,
  summary,
  input[type="range"]
):focus-visible {
  outline: 3px solid var(--g9-ui-focus);
  outline-offset: 2px;
}

/* Do not turn the practice grids or special 2×2 probability controls into
 * generic flex controls. Preserve original layout and allow Tamil wrapping. */
.chapter-hub[data-grade="9"][data-hub-section="concepts"] .probability-event-pairs .probability-controls > button {
  min-width: 0;
}
@media (max-width: 350px) {
  .chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
    .g9m-lab,
    .sp2-journey .lc-lab,
    .sp2-journey .sp2-demo,
    .probability-demo
  ) {
    padding: .7rem;
  }
  .chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
    .g9m-choices button,
    .sp2-demo-controls button,
    .probability-controls button
  ) {
    padding: .5rem .65rem;
  }
}
/* NEON M03 / Issue #324: 320px Tamil navigation and word-safe probability labels.
   Keep Grade 9 concept scope only; 390px stays on the existing one-row layout. */
@media (max-width: 340px) {
  .chapter-hub[data-grade="9"][data-hub-section="concepts"] .g9-set-journey .sp2-detail-navigation {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 12px;
  }
  .chapter-hub[data-grade="9"][data-hub-section="concepts"] .g9-set-journey .sp2-detail-navigation :is(.sp2-back-index, .sp2-top-next) {
    min-width: 0;
    padding-inline: 2px;
    font-size: 11px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: break-word;
  }
  .chapter-hub[data-grade="9"][data-hub-section="concepts"] .g9-set-journey .sp2-top-next {
    justify-self: end;
    text-align: right;
  }
  .chapter-hub[data-grade="9"][data-hub-section="concepts"] .probability-event-pairs .probability-controls > button {
    min-height: 46px;
    padding-inline: .35rem;
    font-size: .8rem;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-hub[data-grade="9"][data-hub-section="concepts"] :is(
    .lc-node,
    .lc-d-member,
    .g9m-quad-half,
    details.sp2-explanation > summary::before,
    details.rnlab-pitfall > summary::before
  ) {
    transition: none !important;
  }
}

/* Grade 9 §5.3 coordinate plot. */
.chapter-hub[data-grade="9"][data-hub-section="concepts"] .g9-distance-lab{
  min-width:0; max-width:480px; width:100%; margin:.75rem auto;
}
.chapter-hub .g9-distance-lab .g9-distance-plot-note{
  margin:.2rem auto 0; padding:0 .25rem; text-align:center;
  font:500 .875rem/1.4 var(--ver-font,system-ui,sans-serif); color:var(--text-secondary);
}

/* Grade 9 Chapter 3 only: no shared theme or navigation overrides. */
.chapter-hub[data-grade="9"][data-hub-section="concepts"] .g9a-lab {
  margin: 4px 0 12px;
  padding: 12px;
  background: rgba(122,140,167,.055);
  border: 1px solid rgba(100,116,143,.2);
  border-radius: 18px;
  min-width: 0;
}
.g9a-rule {
  margin: 0 0 10px;
  font-size: .94rem;
  line-height: 1.35;
  font-weight: 650;
  color: var(--text-explanation);
}
.g9a-choices {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 5px;
  min-width: 0;
}
.g9a-option {
  box-sizing: border-box;
  min-width: 0;
  min-height: 48px;
  padding: 6px 3px;
  font-size: clamp(.76rem,2.8vw,.94rem);
  font-weight: 700;
  overflow-wrap: anywhere;
  border: 1px solid #cfc8c3;
  border-radius: 12px;
  color: var(--text-primary);
  background: #fff;
  cursor: pointer;
}
.g9a-option[aria-pressed="true"] {
  background: #f8e4e2;
  border: 2px solid #883b46;
  color: var(--text-navigation);
}
.g9a-option:focus-visible,.g9a-answer-options button:focus-visible {
  outline: 3px solid #92505d;
  outline-offset: 2px;
}
.g9a-stage {
  min-width: 0;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #e3deda;
  border-radius: 13px;
  background: #fff;
}
.g9a-expression {
  min-width: 0;
  text-align: center;
  font-size: 1.1rem;
}
.g9a-rewrite {
  margin: 3px 0;
  font-size: .87rem;
  text-align: center;
}
.g9a-expression .katex-display { margin: .25em 0; }
.g9a-expression .triggle-tex,.g9a-rewrite .triggle-tex {max-width:100%;}
.g9a-powers {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 9px 0;
}
.g9a-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid #d3dfd8;
  border-radius: 10px;
  background: #f6faf7;
  color: var(--text-primary);
  font-size: .78rem;
  line-height: 1.35;
  white-space: normal;
}
.g9a-chip.g9a-invalid {border-color:#e8c9c9;background:#fff4f3;color:var(--text-incorrect);}
.g9a-icon {font-weight:800;}
.g9a-verdict {
  margin: 0;
  font-size: .87rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-correct);
}
.g9a-verdict.g9a-incorrect {color:var(--text-incorrect);}
.g9a-practice {margin: 12px 0;}
.g9a-practice h5 {margin: 0 0 5px;font-size: 1rem;}
.g9a-small {margin: 0 0 9px;font-size: .89rem;}
.g9a-transfer {
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #e2dada;
  border-radius: 12px;
  background: rgba(255,255,255,.8);
  min-width: 0;
}
.g9a-transfer-math {margin:0 0 7px;min-width:0;font-size:1rem;}
.g9a-answer-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.g9a-answer-options button {
  min-width:0;
  min-height:46px;
  padding:7px;
  border:1px solid var(--control-border);
  background:#fff;
  border-radius:10px;
  color:var(--text-primary);
  line-height:1.35;
  font-size:.86rem;
  cursor:pointer;
}
.g9a-answer-options button[aria-pressed="true"] {border:2px solid var(--text-navigation);background:var(--bond-selection);font-weight:700;}
.g9a-feedback {margin:7px 0 0;font-size:.87rem;color:var(--text-explanation);line-height:1.4;}
.g9a-feedback:empty {display:none;}
.g9a-deep {margin:10px 0;border:1px solid #e2d9db;border-radius:12px;padding:10px 12px;font-size:.9rem;}
.g9a-deep summary {font-weight:650;cursor:pointer;}
.g9a-deep li {margin:8px 0;line-height:1.5;}
.g9a-source,.g9a-review {display:block;margin:8px 0;font-size:.74rem;color:var(--text-secondary);line-height:1.45;}
@media (max-width:360px) {
  .chapter-hub[data-grade="9"][data-hub-section="concepts"] .g9a-lab{padding:9px;}
  .g9a-stage{padding:8px;}
  .g9a-chip{font-size:.75rem;}
  .g9a-option{font-size:.78rem;}
}
@media (prefers-reduced-motion:reduce) {
  .g9a-option,.g9a-answer-options button {transition:none!important;}
}
.g9a-rule-math {margin:0 0 10px;padding:8px 10px;background:#fff;border:1px solid #e3deda;border-radius:12px;overflow-x:auto;text-align:center;}
.g9a-practice-links {margin:14px 0 8px;padding:12px;border:1px solid #e2d9db;border-radius:14px;background:#fcf9f8;}
.g9a-practice-links h5 {margin:0 0 8px;font-size:.96rem;color:var(--text-primary);}
.g9a-practice-row {display:flex;flex-wrap:wrap;gap:8px;}
.g9a-practice-btn {
  min-height:44px;padding:8px 12px;border:1px solid #c999a0;border-radius:10px;
  background:#fff;color:var(--text-navigation);font-size:.86rem;font-weight:650;cursor:pointer;
}
.g9a-practice-btn:hover,.g9a-practice-btn:focus-visible {background:#f8e4e2;border-color:#883b46;outline:none;}

/* The home route shares the app's navigation and language controls. */
.home-wordmark { display: none; }
body.home-active {
  --studio-ink: var(--text-primary);
  --studio-rule: #d9ddd4;
  --studio-width: 76rem;
}
.home-active .app-shell { display: block; max-width: none; }
.home-active .workspace { width: 100%; }
.home-active .appbar {
  display: grid;
  grid-template: "brand menu language" auto / minmax(0, 1fr) auto auto;
  align-items: center;
  height: auto;
  min-height: 4.25rem;
  gap: 1rem;
  padding: .42rem max(5vw, calc((100vw - var(--studio-width)) / 2));
  background: #fff;
  border-bottom: 1px solid var(--studio-rule);
}
.home-active .appbar-actions { display: contents; }
.home-active .brand-mobile { display: none; }
.home-active #homeBtn {
  grid-area: brand;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: auto;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: none;
  box-shadow: none;
}
.home-active #homeBtn .home-icon { display: none !important; }
.home-active #homeBtn [data-i18n=home] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.home-active #homeBtn .home-wordmark {
  display: inline-flex;
  align-items: center;
  gap: clamp(.3rem, 1.4vw, .55rem);
  white-space: nowrap;
}
.home-wordmark img {
  display: block;
  width: clamp(1.875rem, 8.5vw, 2.5rem);
  height: auto;
  border-radius: 24%;
}
.home-wordmark b {
  font: 700 clamp(.875rem, 4.35vw, 1.6rem)/1.1 Arial, "Liberation Sans", Roboto, sans-serif;
  letter-spacing: -.035em;
  color: var(--text-primary);
}
.home-active #browseBtn {
  grid-area: menu;
  display: inline-flex;
  justify-content: center;
  width: auto;
  min-height: 44px;
  padding: .3rem .65rem;
  border: 0;
  font-size: .9rem;
  font-weight: 630;
}
.home-active #browseChevron { display: none; }
.home-active .lang-switch {
  grid-area: language;
  justify-self: end;
  align-items: center;
  width: auto;
  border-radius: .8rem;
  padding: 3px;
}
.home-active .lang-switch button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 .6rem;
  border-radius: .65rem;
  font: 680 .9rem/1.4 system-ui, "Triggle Noto Sans Tamil", sans-serif;
}
.home-active .lesson-container {
  display: block;
  width: min(90%, var(--studio-width));
  max-width: none;
  margin-inline: auto;
  padding: clamp(1rem, 2.6vw, 2rem) 0 max(1rem, env(safe-area-inset-bottom)) !important;
}
.home-active .discover-home-minimal {
  display: grid;
  width: 100%;
  max-width: none;
  gap: 0;
}
.home-studio-cover {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(17rem, 30vw, 24rem);
  overflow: hidden;
  border: 1px solid #cdd9cd;
  border-radius: clamp(1.1rem, 2.5vw, 2rem);
  background: #eff3e8;
}
.home-studio-cover::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 68%;
  background: url("home-studio.webp") right 56% / cover no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 32%);
}
.home-cover-type { padding: 2rem clamp(1.5rem, 4vw, 3.9rem); }
.home-cover-type p {
  margin: 0 0 .6rem;
  font: 720 .78rem/1.5 system-ui, "Triggle Noto Sans Tamil", sans-serif;
  color: var(--text-secondary);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.home-active .home-cover-type h1 {
  margin: 0 !important;
  color: var(--studio-ink) !important;
  font: normal 400 clamp(3.6rem, 6.4vw, 6.4rem)/1.05 KaTeX_Main, Georgia, serif !important;
  letter-spacing: -.065em;
}
.home-active .discover-home-classes { padding: clamp(1.3rem, 2.7vw, 2.4rem) 0 0; }
.home-active .discover-home-classes h2 {
  font: 720 clamp(1.2rem, 2vw, 1.65rem)/1.4 system-ui, "Triggle Noto Sans Tamil", sans-serif !important;
  color: var(--studio-ink) !important;
  margin: 0 0 .75rem !important;
  letter-spacing: -.04em;
}
.home-active .discover-grade-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(.65rem, 1.7vw, 1.35rem); }
.home-active .discover-grade-grid .discover-grade {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  gap: .2rem;
  justify-content: center;
  align-items: flex-start;
  min-height: clamp(6.4rem, 9.2vw, 8.3rem);
  padding: .8rem clamp(1.1rem, 2.4vw, 2rem);
  border: 1px solid var(--bond-border);
  background: var(--surface-content);
  color: var(--text-primary);
  border-radius: 1.05rem;
  box-shadow: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.home-active .discover-grade-grid .discover-grade-10 {
  background: var(--surface-content);
  border-color: var(--bond-border);
  color: var(--text-primary);
}
.home-active .discover-grade::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -2.8rem;
  bottom: -5rem;
  width: 12rem;
  height: 12rem;
  background: repeating-radial-gradient(circle, transparent 0 .71rem, var(--bond-border) .75rem .8rem, transparent .84rem 1.48rem);
}
.home-active .discover-grade-10::after {
  border-radius: 0;
  transform: rotate(-34deg);
  background: repeating-linear-gradient(0deg, transparent 0 .72rem, var(--bond-border) .75rem .8rem, transparent .84rem 1.48rem);
}
.home-grade-label {
  font: normal 400 clamp(1.8rem, 3.2vw, 3rem)/1.12 KaTeX_Main, Georgia, serif;
  letter-spacing: -.045em;
}
.home-grade-label b { font: inherit; }
.home-chapter-count { font: 550 .9rem/1.5 system-ui, "Triggle Noto Sans Tamil", sans-serif; }
.home-copyright {
  margin-top: clamp(1.25rem, 3vw, 2.5rem);
  padding-top: .85rem;
  border-top: 1px solid var(--studio-rule);
  color: var(--text-secondary);
}
.home-copyright small { font: 550 .83rem/1.6 system-ui, sans-serif; }
.home-active :is(.discover-grade, #browseBtn, #homeBtn, .lang-switch button):focus-visible {
  outline: 3px solid var(--text-navigation);
  outline-offset: 3px;
}
html[lang=ta] .home-active :is(.home-cover-type h1, .home-grade-label) {
  font-family: "Triggle Noto Sans Tamil", system-ui, sans-serif !important;
  letter-spacing: 0;
}
html[lang=ta] .home-active .home-cover-type p { letter-spacing: 0; }
html[lang=ta] .home-active .discover-home-classes h2 { letter-spacing: 0; }
html[lang=ta] .home-active .home-grade-label { font-size: clamp(1.25rem, 2.4vw, 2rem); line-height: 1.55; }

@media (min-width: 801px) {
  .home-active .sidebar { display: none; }
  .home-active.drawer-open .sidebar {
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(22rem, 90vw);
    box-shadow: 12px 0 40px #172d2926;
    z-index: 31;
  }
  .home-active.drawer-open .side-close { display: grid; place-items: center; min-width: 44px; min-height: 44px; }
  .home-active.drawer-open .side-top { display: flex; justify-content: space-between; align-items: flex-start; }
  .home-active.drawer-open .backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: #142d2852; }
}
@media (hover:hover) {
  .home-active .discover-grade-grid .discover-grade:hover { transform: translateY(-2px); box-shadow: 0 5px 15px #1c42301a; }
}
@media (max-width: 680px) {
  .home-active .appbar { padding: .28rem clamp(.5rem, 2.5vw, 1.25rem); gap: .25rem; min-height: 3.7rem; }
  .home-active #browseBtn { width: 44px; padding: 0; }
  body.home-active .appbar .lang-switch button {
    min-inline-size: 44px;
    padding-inline: .25rem;
  }
  .home-active #browseBtn [data-i18n=browse] {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .home-active .lesson-container { width: 92%; }
  .home-studio-cover { min-height: 0; height: clamp(13.5rem, 73vw, 21rem); align-items: start; }
  .home-studio-cover::before {
    width: 100%;
    mask-image: none;
    background: linear-gradient(180deg, #f0f3e8fa, #f0f3e8e8 23%, #f0f3e82a 48%, transparent 63%),
                url("home-studio-mobile.webp") right 60% / cover no-repeat;
  }
  .home-cover-type { padding: clamp(.9rem, 4.4vw, 1.6rem); }
  .home-cover-type p { font-size: .72rem; margin-bottom: .22rem; letter-spacing: .1em; }
  .home-active .home-cover-type h1 { font-size: clamp(2.65rem, 9vw, 3.65rem) !important; }
  .home-active .discover-grade-grid .discover-grade { padding-inline: clamp(.7rem, 4vw, 1.5rem); }
  .home-active .discover-grade::after { width: 8rem; height: 8rem; bottom: -4.9rem; right: -3.5rem; opacity: .24; }
}
@media (max-width: 355px) {
  .home-active .appbar { padding-inline: .375rem; }
  .home-active .appbar .lang-switch { padding: 2px; gap: 1px; }
  body.home-active .appbar #langTa { font-family: "Triggle Noto Sans Tamil", sans-serif; }
  .home-wordmark img { width: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .home-active .discover-grade-grid .discover-grade { transition: none; transform: none; }
}

/* VER Glyph v1.1. Shared student surfaces, controls and exercise reader. */
body.ver-glyph {
  /* Keep the current layout connected to the shared textbook palette. */
  --ver-paper: var(--bond-ivory);
  --ver-indigo: var(--text-navigation);
  --ver-gold: var(--bond-brass);
  --ver-tint: var(--bond-tint);
  --ver-ink: var(--bond-graphite);
  --ver-white: var(--bond-white);
  --ver-muted: var(--bond-muted);
  --ver-divider: var(--bond-border);
  --ver-control-edge: var(--control-border);
  --ver-focus: var(--text-navigation);
  --ver-question-surface: #FAF9F6;
  --ver-dialog-backdrop: rgb(24 27 32 / 48%);
  --ver-space-1: .25rem;
  --ver-space-2: .5rem;
  --ver-space-3: .75rem;
  --ver-space-4: 1rem;
  --ver-space-5: 1.5rem;
  --ver-space-6: 2rem;
  --ver-radius: .5rem;
  --ver-radius-surface: .75rem;
  --ver-touch: 48px;
  --ver-icon: 1.25rem;
  --ver-motion: 150ms;
  --ver-reader-width: 51rem;
  --ver-reader-edge: clamp(.75rem, 3vw, 2rem);
  --ver-nav-height: 3.5rem;
  --ver-text-small: .875rem;
  --ver-text-body: 1rem;
  --ver-text-question: clamp(1.125rem, 1.05rem + .4vw, 1.375rem);
  --ver-question-weight: 580;
  --ver-text-math: clamp(1.1875rem, 1.14rem + .25vw, 1.375rem);
  --ver-prose-leading: 1.55;
  --ver-font: system-ui, -apple-system, "Segoe UI", sans-serif;

  --shadow: none;
  background: var(--ver-paper);
  color: var(--ver-ink);
  font-family: var(--ver-font);
}

body.ver-glyph.lang-ta {
  --ver-font: "Triggle Noto Sans Tamil", system-ui, sans-serif;
  --ver-prose-leading: 1.64;
  --ver-text-question: clamp(1.0625rem, 1.025rem + .18vw, 1.25rem);
  --ver-text-question-math: clamp(1.0625rem, 1rem + .45vw, 1.3125rem);
  --ver-question-weight: 530;
}

:root:has(body.ver-glyph.textbook-reader) {
  scroll-padding-block-start: calc(var(--triggle-reader-header-height, 4rem) + .5rem);
}

.ver-starting :is(.app-shell, .class-dock) { opacity: 0; }
.ver-glyph:not(.ver-starting) .ver-loading,
html[lang="en"] .ver-loading [lang="ta"],
html[lang="ta"] .ver-loading [lang="en"] { display: none; }
.ver-loading {
  position: absolute;
  inset-block-start: var(--ver-space-6);
  inset-inline: var(--ver-space-5);
  margin: 0;
  color: var(--ver-indigo);
  font: 650 var(--ver-text-body)/var(--ver-prose-leading) var(--ver-font);
}

.ver-glyph ::selection {
  background: var(--ver-tint);
  color: var(--ver-ink);
}

.ver-glyph .ver-icon {
  display: block;
  flex: 0 0 auto;
  inline-size: var(--ver-icon);
  block-size: var(--ver-icon);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ver-glyph .ver-point { fill: var(--ver-gold); stroke: var(--ver-indigo); stroke-width: .65; }

.ver-emblem {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  color: var(--ver-indigo);
  background: var(--ver-tint);
  border-radius: var(--ver-radius);
}

.ver-emblem .ver-icon { --ver-icon: 1.625rem; }
.ver-emblem:empty { display: none; }

.ver-glyph :is(.appbar, .sidebar, #pathDialog, #figureDialog, #visualLessonDialog) {
  border-color: var(--ver-divider);
  box-shadow: none;
}

.ver-glyph :is(.sidebar, .sidebar-foot, .sidebar-search-bottom) { background: var(--ver-paper); }
.ver-glyph .sidebar[inert] { content-visibility: hidden; }
.ver-glyph :is(.sidebar .side-grade, .sidebar .chapter-link, .sidebar-chapter-sections button) {
  border-radius: var(--ver-radius);
  box-shadow: none;
}
.ver-glyph .sidebar :is(.chapter-link small, .sidebar-search-bottom p),
.ver-glyph .sidebar .search-field input::placeholder {
  color: var(--ver-muted);
  opacity: 1;
}
.ver-glyph .sidebar-chapter-sections { border-color: var(--ver-divider); }
.ver-glyph .sidebar-chapter-sections button {
  border-color: var(--ver-divider);
  background: var(--ver-tint);
  color: var(--ver-indigo);
}

.ver-glyph :is(.appbar button, .appbar a, .dialog-close, .path-option, .sidebar button,
  .discover-grade, .discover-chapter, .hub-section-card, .hub-exercise-link,
  #questionNavDock button, .question-top-nav button, .ver-question-picker,
  .ver-question-tools button, .ver-question-tools summary) {
  transition: background-color var(--ver-motion) ease, color var(--ver-motion) ease,
    border-color var(--ver-motion) ease;
}

.ver-glyph :is(button, a, summary, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--ver-focus) !important;
  outline-offset: 2px;
}

.ver-glyph :is(.appbar, .appbar .lang-switch, .appbar .lang-switch button) { box-shadow: none; }
.ver-glyph .appbar .lang-switch {
  background: var(--bond-tint);
  border-radius: var(--ver-radius);
}
.ver-glyph .appbar .lang-switch button {
  min-block-size: var(--ver-touch);
  min-inline-size: var(--ver-touch);
  border-radius: var(--ver-radius);
  font-family: var(--ver-font);
}
.ver-glyph .appbar .lang-switch button.active {
  background: var(--ver-white);
  color: var(--ver-ink);
  box-shadow: none;
}
.ver-glyph .appbar :is(.browse-button, .home-link) {
  min-block-size: var(--ver-touch);
  border-radius: var(--ver-radius);
}
.ver-glyph .appbar { background: var(--ver-white); backdrop-filter: none; }
.ver-glyph .appbar :is(.home-icon, .browse-symbol) { place-items: center; }

/* Chapter 2 retains its math face and uses the shared face for prose and controls. */
body.ver-glyph.g10-ch2-type { --g10-ch2-text: var(--ver-font); }

.ver-glyph :is(.discover-grade, .discover-chapter, .hub-section-card, .hub-exercise-link, .path-option) {
  background: var(--ver-white);
  border-color: var(--ver-divider);
  box-shadow: none;
  border-radius: var(--ver-radius-surface);
}
.ver-glyph :is(.discover-grade, .discover-chapter, .hub-section-card, .hub-exercise-link, .path-option):hover,
.ver-glyph :is(.path-option.selected, .hub-section-card.is-current) {
  background: var(--ver-tint);
  border-color: var(--ver-control-edge);
  box-shadow: none;
}
.ver-glyph .discover-chapter:not([hidden]) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--ver-space-1) var(--ver-space-3);
  align-content: center;
  min-block-size: 6rem;
  padding: var(--ver-space-3);
}
.ver-glyph .discover-chapter .ver-emblem { grid-column: 1; grid-row: 1 / span 3; align-self: center; }
.ver-glyph .discover-chapter :is(.discover-chapter-number, strong, .discover-chapter-meta) {
  grid-column: 2;
  overflow-wrap: anywhere;
}
.ver-glyph .discover-chapter .discover-card-arrow {
  position: static;
  grid-column: 3;
  grid-row: 1 / span 3;
  align-self: center;
}
.ver-glyph :is(.discover-card-arrow, .hub-section-arrow) {
  --ver-icon: 1rem;
  color: var(--ver-muted);
}
.ver-glyph .discover-chapter .discover-chapter-number { color: var(--ver-muted); }
.ver-glyph .ver-chapter-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: var(--ver-space-4);
}
.ver-chapter-heading .ver-emblem { grid-column: 1; grid-row: 1 / span 2; }
.ver-chapter-heading :is(.hub-eyebrow, h2) { grid-column: 2; }

.ver-glyph .chapter-hub .hub-section-icon {
  background: var(--ver-tint);
  color: var(--ver-indigo);
  border-radius: var(--ver-radius);
}
.ver-glyph :is(.hub-exercise-link, .path-option, .dialog-close, .activity-summary, .hub-top-actions button) {
  min-block-size: var(--ver-touch);
}
.ver-glyph :is(.chapter-overview, .chapter-hub, .path-option, .vl-dialog) {
  overflow-wrap: anywhere;
}
.ver-glyph :is(.textbook-extra, .task-solution, .hub-directory, .g10ch7-lab) {
  border-color: var(--ver-divider);
  box-shadow: none;
}
.ver-glyph :is(.textbook-extra, .task-solution) {
  background: var(--ver-paper);
  border-radius: var(--ver-radius);
}
.ver-glyph:has(.path-dialog[open]) { overflow: hidden; }
.ver-glyph .path-dialog {
  inline-size: min(520px, calc(100% - 16px));
  max-inline-size: none;
  inset-block: env(safe-area-inset-top) env(safe-area-inset-bottom);
  max-block-size: min(92vh, 820px);
  max-block-size: min(92dvh, 820px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ver-divider);
  border-radius: var(--ver-radius-surface);
  background: var(--ver-paper);
  color: var(--ver-ink);
  font: 1rem/1.45 var(--ver-font);
}
.ver-glyph .path-dialog[open] {
  display: flex;
  flex-direction: column;
}
.ver-glyph .path-dialog .dialog-header {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 10px 12px;
  border-color: var(--ver-divider);
  background: var(--ver-white);
}
.ver-glyph .path-heading {
  align-self: center;
  overflow-wrap: anywhere;
}
.ver-glyph .path-heading h3 {
  margin: 0;
  font-size: 1.3125rem;
  font-weight: 600;
}
.ver-glyph .path-hint {
  margin: 0;
  color: var(--ver-muted);
  font-size: .875rem;
}
.ver-glyph .path-dialog .dialog-close {
  min-inline-size: var(--ver-touch);
  padding: 0;
  background: var(--ver-tint);
  color: var(--ver-indigo);
  font-size: 1.125rem;
  line-height: 1.25;
}
.ver-glyph .path-options {
  display: flex;
  flex-direction: column;
  min-block-size: 0;
  gap: 6px;
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 10px;
}
.ver-glyph .path-option {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--ver-divider);
  color: var(--ver-ink);
  font: inherit;
  text-align: start;
  white-space: normal;
}
.ver-glyph .is-chapter-picker .path-option {
  display: flex;
  flex-wrap: wrap;
}
.ver-glyph .is-chapter-picker .path-option-copy {
  flex: 1 1 min(100%, 9rem);
  min-inline-size: 0;
}
.ver-glyph .path-option-copy {
  align-self: center;
  display: grid;
  gap: 2px;
}
.ver-glyph .path-option strong {
  font-size: 1.0625rem;
  font-weight: 500;
}
.ver-glyph .path-option small {
  color: var(--ver-muted);
  font-size: .875rem;
}
.ver-glyph .path-option-symbols {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ver-glyph .path-number {
  min-inline-size: 1.8em;
  padding: .125em .2em;
  border-radius: var(--ver-radius);
  background: var(--ver-tint);
  color: var(--text-secondary);
  font-size: .8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
  text-align: center;
}
.ver-glyph .path-option-mark {
  align-self: center;
  min-inline-size: 1em;
  color: var(--ver-indigo);
  font-size: 1rem;
  text-align: center;
}
.ver-glyph .path-option-symbols .path-option-mark {
  min-inline-size: 0;
  font-size: .875rem;
}
.ver-glyph .path-option.selected .path-number {
  background: var(--ver-indigo);
  color: var(--ver-white);
}
.ver-glyph #figureDialog {
  inset: 0 !important;
  width: min(96vw, 48rem) !important;
  max-width: none;
  max-height: 94dvh !important;
  margin: auto !important;
  border-color: var(--ver-divider) !important;
  border-radius: var(--ver-radius-surface) !important;
  background: var(--ver-paper) !important;
  box-shadow: none !important;
  transform: none;
  backdrop-filter: none !important;
  scroll-padding-block: 5rem var(--ver-space-4);
}
.ver-glyph :is(#figureDialog, .path-dialog)::backdrop {
  background: var(--ver-dialog-backdrop) !important;
  backdrop-filter: none !important;
}
.ver-glyph #figureDialog .dialog-header {
  align-items: start;
  background: var(--ver-white);
  border-color: var(--ver-divider);
  backdrop-filter: none;
}
.ver-glyph #figureDialog .dialog-header h3 {
  overflow-wrap: anywhere;
  font: 650 var(--ver-text-body)/var(--ver-prose-leading) var(--ver-font) !important;
}
.ver-glyph #figureDialog .dialog-close {
  flex: 0 0 auto;
  min-block-size: var(--ver-touch) !important;
  background: var(--ver-tint) !important;
  color: var(--ver-indigo) !important;
  border-color: var(--ver-divider) !important;
}
.ver-glyph #figureDialog .diagram-content {
  max-block-size: none;
  min-block-size: 0;
  padding: var(--ver-space-3) !important;
}
.ver-glyph #figureDialog .diagram-content > :is(img, svg) {
  inline-size: auto !important;
  max-inline-size: 100% !important;
  block-size: auto;
  max-block-size: 74dvh !important;
}
.ver-glyph #figureDialog .diagram-compare { background: var(--ver-tint); border-color: var(--ver-divider); }
.ver-glyph #figureDialog :is(#diagramCompareLabel, #diagramCompareAnswer) { color: var(--text-correct); }
.ver-glyph #visualLessonDialog .vl-shell { background: var(--ver-paper); }
.ver-glyph #visualLessonDialog .vl-header { background: var(--ver-white); border-color: var(--ver-divider); }

.ver-glyph.textbook-reader .welcome { display: none; }

.ver-glyph.textbook-reader .lesson-container {
  inline-size: 100%;
  max-inline-size: var(--ver-reader-width);
  padding: var(--ver-space-1) max(var(--ver-reader-edge), env(safe-area-inset-right))
    var(--ver-space-4) max(var(--ver-reader-edge), env(safe-area-inset-left)) !important;
  margin-inline: auto;
}

.ver-glyph.textbook-reader .status-row {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap;
  gap: 0 var(--ver-space-2) !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: var(--ver-paper) !important;
  overflow: visible !important;
}
.ver-glyph.textbook-reader .status-row .crumb {
  flex: 1 1 auto !important;
  flex-wrap: wrap !important;
  gap: 0 2px !important;
  overflow: visible !important;
  white-space: normal !important;
}
.ver-glyph.textbook-reader .status-row #gradeTotal { display: none !important; }
body.ver-glyph.textbook-reader .status-row .crumb-link {
  display: inline-flex !important;
  flex: 0 1 auto;
  align-items: center;
  max-width: 100% !important;
  min-height: 2rem !important;
  gap: var(--ver-space-1);
  padding: var(--ver-space-1) 2px !important;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: 600 var(--ver-text-small)/1.35 var(--ver-font) !important;
  text-align: start;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
}
.ver-glyph.textbook-reader .status-row .crumb-link:hover { background: var(--ver-tint); }
.ver-glyph.textbook-reader .crumb-link .ver-crumb-label { color: inherit; font-size: inherit; }
.ver-glyph.textbook-reader #exerciseIndexLink > [aria-hidden] { display: none; }
body.ver-glyph.textbook-reader .status-row .crumb-sep { display: inline !important; color: var(--ver-muted); }

.ver-glyph.textbook-reader #lessonCard.lesson-card {
  display: flex;
  flex-direction: column;
  container: ver-reader / inline-size;
  gap: 0;
  max-width: none;
  margin: 0;
  padding: 0 !important;
  border: 0;
  border-radius: 0 !important;
  background: var(--ver-white);
  box-shadow: none;
  animation: none;
}

.ver-glyph.textbook-reader #lessonCard > .question-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center !important;
  gap: 0 var(--ver-space-2);
  min-width: 0;
  margin: 0;
}
.ver-question-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: var(--ver-space-2);
}
.ver-glyph.textbook-reader #lessonCard #questionHead {
  margin: 0;
  color: var(--ver-ink);
  font: 700 clamp(1.125rem, 1rem + .7vw, 1.625rem)/1.35 var(--ver-font) !important;
  overflow-wrap: normal;
  word-break: normal;
}

.ver-glyph .ver-question-picker {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: var(--ver-space-2);
  min-block-size: var(--ver-touch);
  max-inline-size: 100%;
  padding: var(--ver-space-1) var(--ver-space-2);
  border: 0;
  border-radius: var(--ver-radius);
  background: transparent;
  color: var(--ver-indigo);
  font: 650 var(--ver-text-small)/1.3 var(--ver-font);
  text-align: start;
}
.ver-glyph .ver-question-picker:hover { background: var(--ver-tint); }
.ver-glyph #itemPosition {
  display: block;
  padding: 0 !important;
  color: var(--ver-muted) !important;
  font: 500 .8125rem/1.3 var(--ver-font) !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap;
}

.ver-glyph.textbook-reader #lessonCard .question-top-nav { gap: 0; }
.ver-glyph.textbook-reader #lessonCard .question-top-nav .page-button {
  display: inline-grid;
  place-items: center;
  min-inline-size: var(--ver-touch);
  min-block-size: var(--ver-touch);
  padding: 0;
  border: 0;
  border-radius: var(--ver-radius);
  background: transparent;
  color: var(--ver-indigo);
  box-shadow: none;
}
.ver-glyph.textbook-reader #lessonCard .question-top-nav .page-button:hover:not(:disabled) { background: var(--ver-tint); }
.ver-question-track {
  order: 2;
  height: 2px;
  overflow: hidden;
  background: var(--ver-tint);
}
.ver-question-track span {
  display: block;
  block-size: 100%;
  background: var(--text-navigation);
  transition: inline-size var(--ver-motion) ease-out;
}

.ver-question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--ver-space-1) var(--ver-space-2);
  order: 2;
}
.ver-glyph #lessonCard .difficulty-indicator:not([hidden]) {
  display: inline-flex;
  margin: var(--ver-space-1) 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ver-muted);
  font: 600 .8125rem/1.4 var(--ver-font);
}

body.ver-glyph.textbook-reader #lessonCard.lesson-card > #questionText {
  order: 3;
  max-inline-size: 100%;
  margin: 0 !important;
  padding: var(--ver-space-2) 0 !important;
  border: 0;
  border-radius: 0;
  background: var(--ver-question-surface);
  box-shadow: none;
  color: var(--ver-ink);
  font-family: var(--ver-font);
  font-size: var(--ver-text-question) !important;
  font-weight: var(--ver-question-weight);
  line-height: var(--ver-prose-leading) !important;
  overflow-wrap: anywhere;
  scroll-margin-top: 0 !important;
}
.ver-glyph.lang-ta #questionText :is(.triggle-tex:not(.triggle-tex-display), math:not(.katex-mathml math)) {
  font-size: var(--ver-text-question-math);
}

.ver-glyph.textbook-reader #lessonCard > #inlineFigure {
  order: 4 !important;
  margin: var(--ver-space-2) 0 !important;
  padding: 0 !important;
  border: 0;
  background: var(--ver-white);
  box-shadow: none;
}
.ver-glyph #lessonCard #inlineFigure figcaption {
  display: block;
  padding: var(--ver-space-1) var(--ver-space-2) 0;
  color: var(--ver-muted);
  font-size: var(--ver-text-small) !important;
  line-height: var(--ver-prose-leading) !important;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ver-glyph #lessonCard #inlineFigureOpen {
  flex-direction: column;
  align-items: center;
  gap: var(--ver-space-1);
  color: var(--ver-indigo);
}
.ver-glyph #lessonCard .inline-figure-visual {
  flex: 0 1 auto;
  inline-size: min(100%, 36rem);
  overflow: visible;
}
.ver-glyph #lessonCard .inline-figure-visual svg {
  block-size: auto !important;
  max-height: min(55dvh, 23rem) !important;
  inline-size: auto;
  max-inline-size: 100%;
}
.ver-glyph #lessonCard .inline-figure-action {
  flex: none;
  max-inline-size: 100%;
  padding-inline: var(--ver-space-2);
  font: 600 var(--ver-text-small)/var(--ver-prose-leading) var(--ver-font);
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ver-glyph #lessonCard .inline-figure-visual:has(img) {
  position: relative;
  block-size: clamp(10rem, 58cqi, 22rem);
}
.ver-glyph #lessonCard #inlineFigureVisual > img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
}


.ver-question-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 0 var(--ver-space-2);
  min-inline-size: 0;
}
.ver-question-tools { order: 5; margin-block-start: var(--ver-space-1); }
.ver-question-tools:not(:has(> :not([hidden]))) { display: none; }
.ver-glyph #lessonCard .ver-question-tools :is(button, summary):not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: var(--ver-space-2);
  min-block-size: var(--ver-touch);
  max-inline-size: 100%;
  margin: 0;
  padding: var(--ver-space-1) var(--ver-space-2);
  border: 0;
  border-radius: var(--ver-radius);
  background: transparent;
  color: var(--ver-indigo);
  box-shadow: none;
  font: 650 var(--ver-text-small)/1.35 var(--ver-font);
  text-align: start;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ver-glyph #lessonCard .ver-question-tools :is(button, summary):hover {
  background: var(--ver-tint);
}
.ver-glyph #lessonCard #quickSolutionAction:not([hidden]) { background: var(--ver-tint); }
.ver-glyph #lessonCard #quickSolutionAction:not([hidden]):hover { background: var(--ver-divider); }
.ver-glyph #lessonCard #g9GeometryHint { margin: 0; }
.ver-glyph #lessonCard #g9GeometryHint[open] { flex-basis: 100%; }
.ver-glyph #lessonCard #g9GeometryHint > summary::-webkit-details-marker { display: none; }
.ver-glyph #lessonCard #g9GeometryHint > summary::after { content: "+"; font-weight: 500; }
.ver-glyph #lessonCard #g9GeometryHint[open] > summary::after { content: "−"; }
.ver-glyph #lessonCard #g9GeometryHint > p {
  margin: 0 0 var(--ver-space-2);
  padding: var(--ver-space-2) var(--ver-space-3);
  border-inline-start: 2px solid var(--ver-gold);
  background: var(--ver-tint);
  color: var(--ver-ink);
  font-size: var(--ver-text-body);
  line-height: var(--ver-prose-leading);
  overflow-wrap: anywhere;
}

.ver-glyph.textbook-reader #lessonCard > #stepsRegion {
  order: 7 !important;
  min-width: 0;
  margin: var(--ver-space-3) 0 0 !important;
  padding: 0 !important;
  scroll-margin-block-start: 0;
}
.ver-glyph.textbook-reader #lessonCard .lesson-divider {
  gap: var(--ver-space-2);
  margin: 0 0 var(--ver-space-1) !important;
  padding: var(--ver-space-2) 0 0 !important;
  border-top: 1px solid var(--ver-divider);
  color: var(--ver-indigo);
  font: 700 var(--ver-text-body)/1.4 var(--ver-font);
  letter-spacing: normal;
  text-transform: none;
}
.ver-glyph.textbook-reader #lessonCard .lesson-divider [data-i18n="stepByStep"] {
  color: var(--text-primary) !important;
}
.ver-glyph #lessonCard #stepCount { color: var(--ver-muted); text-transform: none; }
.ver-glyph.textbook-reader #lessonCard .worked-step {
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: var(--ver-space-2);
  padding: var(--ver-space-2) 0 !important;
  border-color: var(--ver-divider);
}
.ver-glyph.textbook-reader #lessonCard .worked-step .step-circle {
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: var(--ver-space-1);
  background: var(--bond-tint);
  color: var(--text-secondary);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}
body.ver-glyph.textbook-reader #lessonCard .worked-step .step-reason {
  margin: 0 0 var(--ver-space-1);
  color: var(--text-explanation);
  font-family: var(--ver-font);
  font-size: var(--ver-text-body) !important;
  line-height: var(--ver-prose-leading) !important;
  overflow-wrap: anywhere;
}

.ver-glyph.textbook-reader #lessonCard .worked-step .structured-equation {
  font-size: var(--ver-text-math) !important;
}
.ver-glyph.textbook-reader #lessonCard .triggle-tex-display {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin: 0 0 var(--ver-space-1);
  padding: var(--ver-space-1) .125rem;
  overflow: clip visible !important;
  font-size: var(--ver-text-math) !important;
  color: var(--ver-ink);
  text-align: start;
}
.ver-glyph.textbook-reader #lessonCard .triggle-tex[tabindex] {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: var(--ver-control-edge) var(--ver-tint);
  scroll-margin-block: 0;
}
.ver-glyph #lessonCard .triggle-tex-display :is(.katex, .katex-display) {
  text-align: start;
}
.ver-glyph.textbook-reader #lessonCard .triggle-tex-display .katex {
  font-size: 1.04em !important;
  color: inherit;
}
.ver-glyph.textbook-reader #lessonCard .worked-step summary {
  min-block-size: var(--ver-touch);
  align-content: center;
  color: var(--ver-focus);
}
.ver-glyph.textbook-reader #lessonCard .worked-step :is(details, summary) {
  scroll-margin-block: 0;
}

.ver-glyph.textbook-reader #lessonCard .final-answer-step {
  margin: var(--ver-space-2) 0 0;
  padding: var(--ver-space-2) !important;
  border: 0;
  border-inline-start: 2px solid var(--text-correct);
  border-radius: var(--ver-space-1);
  background: var(--surface-correct);
}
.ver-glyph.textbook-reader #lessonCard .final-answer-step .step-circle {
  background: transparent;
  color: var(--text-correct);
  font-size: 1.375rem;
  font-weight: 500;
}
.ver-glyph #lessonCard :is(.final-answer-label, .final-answer-value, .final-answer-value .triggle-tex-display) {
  color: var(--text-correct);
}
.ver-glyph #lessonCard .final-answer-label { font-size: var(--ver-text-small); }
.ver-glyph #lessonCard .twd-part-solution { background: var(--ver-tint); border-color: var(--ver-divider); }
.ver-glyph .triggle-table-wrap {
  border-color: var(--ver-divider);
  border-radius: var(--ver-radius);
  background: var(--ver-white);
  overscroll-behavior-inline: contain;
}
.ver-glyph .triggle-data-table {
  font: 400 var(--ver-text-small)/var(--ver-prose-leading) var(--ver-font);
}
.ver-glyph .triggle-data-table :is(th, td) { border-color: var(--ver-divider); }
.ver-glyph .triggle-data-table thead th { background: var(--ver-tint); color: var(--text-primary); }

.ver-glyph.textbook-reader #questionNavDock {
  container: ver-dock / inline-size;
  max-inline-size: var(--ver-reader-width);
  background: var(--ver-paper) !important;
  border-color: var(--ver-divider) !important;
}
.ver-glyph.textbook-reader #questionNavDock:not([hidden]):has(#questionJump:not([hidden])) {
  grid-template-areas: "previous question next" !important;
  grid-template-columns: minmax(0, 1fr) var(--ver-touch) minmax(0, 1fr) !important;
}
body.ver-glyph.textbook-reader #questionNavDock #questionJump {
  grid-area: question;
  position: static;
  inline-size: var(--ver-touch);
  min-block-size: var(--ver-touch);
  max-inline-size: none;
  border-color: var(--ver-divider);
  border-radius: var(--ver-radius);
  background: var(--ver-white);
  color: var(--ver-indigo);
  font: 600 1.25rem/1 var(--ver-font);
}
.ver-glyph.textbook-reader #questionNavDock .page-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: var(--ver-space-2);
  border: 1px solid var(--ver-control-edge);
  border-radius: var(--ver-radius) !important;
  background: var(--ver-white);
  color: var(--ver-indigo);
  box-shadow: none;
  font: 650 var(--ver-dock-text, var(--ver-text-body))/1.4 var(--ver-font) !important;
  overflow-wrap: break-word;
}
.ver-glyph.textbook-reader #questionNavDock .page-button.next {
  background: var(--ver-indigo);
  color: var(--ver-white);
  border-color: var(--ver-indigo);
}
.ver-glyph.textbook-reader #questionNavDock .page-button:hover:not(:disabled):not(.next) { background: var(--ver-tint); }
.ver-glyph.textbook-reader #questionNavDock .page-button.next:hover:not(:disabled) { background: var(--ver-focus); }
.ver-glyph.textbook-reader #questionNavDock .page-button:disabled {
  background: var(--ver-tint);
  color: var(--ver-muted);
  border-color: var(--ver-divider);
  opacity: 1;
}
@container ver-dock (max-width: 17rem) {
  .ver-glyph.textbook-reader #questionNavDock .page-button span { display: none; }
}

@media (max-width: 800px) {
  .ver-glyph.textbook-reader #questionNavDock { --ver-dock-text: var(--ver-text-small); }
  :root:has(body.ver-glyph.textbook-reader) {
    scroll-padding-block-end: calc(var(--triggle-reader-dock-height, 4rem) + .5rem);
  }
  body.ver-glyph.textbook-reader { touch-action: auto !important; }
  body.ver-glyph:not(.home-active) .appbar {
    grid-template-columns: minmax(0, 1fr) var(--ver-touch) var(--ver-touch) auto !important;
    grid-template-rows: auto;
    height: auto !important;
    min-height: var(--ver-nav-height) !important;
    padding: calc(var(--ver-space-1) + env(safe-area-inset-top))
      max(var(--ver-space-2), env(safe-area-inset-right)) var(--ver-space-1)
      max(var(--ver-space-2), env(safe-area-inset-left)) !important;
    gap: var(--ver-space-1) !important;
  }
  body.ver-glyph:not(.home-active) .appbar .brand-mobile { overflow: hidden; }
  body.ver-glyph:not(.home-active) .appbar .brand-mobile .logo { flex: 0 0 auto; }
  body.ver-glyph:not(.home-active) .appbar .brand-mobile b {
    display: block;
    font-size: clamp(.9375rem, .75rem + 1vw, 1.125rem);
    letter-spacing: -.045em;
    white-space: nowrap;
  }
  body.ver-glyph:not(.home-active) .appbar :is(.browse-button, .home-link) {
    display: inline-grid;
    place-items: center;
    grid-row: 1;
    width: var(--ver-touch) !important;
    min-width: var(--ver-touch) !important;
    height: auto !important;
    min-height: var(--ver-touch) !important;
    border: 0;
    box-shadow: none;
  }
  body.ver-glyph:not(.home-active) .appbar #browseBtn { grid-column: 2; }
  body.ver-glyph:not(.home-active) .appbar #homeBtn { grid-column: 3; }
  body.ver-glyph:not(.home-active) .appbar .lang-switch { grid-area: 1 / 4; }
  body.ver-glyph:not(.home-active) .appbar :is([data-i18n="browse"], [data-i18n="home"], #browseChevron) {
    display: none !important;
  }
  body.ver-glyph:not(.home-active) .appbar .lang-switch button {
    min-height: var(--ver-touch) !important;
    font-size: var(--ver-text-small) !important;
  }
  .ver-glyph.textbook-reader #lessonCard .triggle-tex[tabindex] { touch-action: pan-x pan-y; }
  .ver-glyph.textbook-reader #lessonCard .worked-step .structured-equation .triggle-tex-display {
    width: calc(100% + 2rem);
    max-width: calc(100% + 2rem);
    margin-inline-start: -2rem !important;
  }
  .ver-glyph #figureDialog {
    width: 100% !important;
    max-height: 100dvh !important;
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
      env(safe-area-inset-bottom) env(safe-area-inset-left);
    border: 0 !important;
    border-radius: 0 !important;
  }
}

@media (max-width: 430px) {
  body.ver-glyph:not(.home-active) .appbar .brand-mobile b { display: none; }
  .ver-glyph .ver-question-identity .ver-emblem { inline-size: 2rem; block-size: 2rem; }
  .ver-glyph .ver-question-identity .ver-icon { --ver-icon: 1.375rem; }
  .ver-glyph.textbook-reader #lessonCard > .question-top { gap: 0 var(--ver-space-1); }
  .ver-glyph .ver-question-picker {
    flex-direction: column;
    gap: 0;
    min-inline-size: var(--ver-touch);
    padding-inline: var(--ver-space-1);
  }
  .ver-glyph #questionPickerLabel { display: none; }
}

@container ver-reader (max-width: 16.5rem) {
  .ver-glyph.textbook-reader #lessonCard > .question-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ver-glyph .ver-question-identity { grid-column: 1 / -1; }
  .ver-glyph .ver-question-picker { justify-self: start; }
}

@media (max-width: 800px) and (max-height: 480px) {
  :root:has(body.ver-glyph.textbook-reader) { scroll-padding-block: .5rem; }
  body.ver-glyph.textbook-reader .appbar { position: static !important; }
  body.ver-glyph.textbook-reader .workspace {
    padding-bottom: env(safe-area-inset-bottom) !important;
  }
  body.ver-glyph.textbook-reader #questionNavDock:not([hidden]) {
    position: static !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ver-glyph :is(.appbar *, .sidebar *, .discover-chapter, .discover-grade, .path-option,
    .hub-section-card, .hub-exercise-link, #lessonCard, #lessonCard button, #lessonCard summary,
    .ver-question-track span, #questionNavDock button) { transition: none !important; }
}

/* Apply the same evaluated states after chapter-specific choice styling. */
.ver-glyph [data-answer-state="correct"] {
  --answer-ink: var(--text-correct);
  --answer-surface: var(--surface-correct);
}
.ver-glyph [data-answer-state="incorrect"] {
  --answer-ink: var(--text-incorrect);
  --answer-surface: var(--surface-incorrect);
}
.ver-glyph [data-answer-state] {
  color: var(--answer-ink) !important;
}
.ver-glyph button[aria-pressed=true][data-answer-state] {
  background: var(--answer-surface);
  border-color: var(--answer-ink);
  box-shadow: inset 0 0 0 1px var(--answer-ink);
}
.ver-glyph :is([role=status], [aria-live]):not(.triggle-mcq-feedback)[data-answer-state="correct"]::before {
  content: "✓ " / "";
}
.ver-glyph :is([role=status], [aria-live]):not(.triggle-mcq-feedback)[data-answer-state="incorrect"]::before {
  content: "✕ " / "";
}

.diagramguard-svg {
  --diagramguard-vertex: .9375rem;
  --diagramguard-measurement: .875rem;
  --diagramguard-expression: .9375rem;
  --diagramguard-secondary: .875rem;
  display: block;
  inline-size: 100%;
  block-size: auto;
  margin-inline: auto;
  font-family: var(--ver-font, system-ui, sans-serif);
  overflow: hidden;
}
.diagramguard-svg text { font-weight: 550; }
.diagramguard-svg [data-dg-font="vertex"] { font-size: var(--diagramguard-vertex); }
.diagramguard-svg [data-dg-font="measurement"] { font-size: var(--diagramguard-measurement); }
.diagramguard-svg [data-dg-font="expression"] { font-size: var(--diagramguard-expression); }
.diagramguard-svg [data-dg-font="secondary"] { font-size: var(--diagramguard-secondary); }
.diagramguard-annotation {
  display: block;
  margin: 0;
  padding: .375rem .625rem .5rem;
  color: var(--ver-indigo, #37305e);
  font: 550 .9375rem/var(--ver-prose-leading, 1.55) var(--ver-font, system-ui, sans-serif);
  text-align: center;
  overflow-wrap: anywhere;
}
.diagramguard-annotation[hidden] { display: none; }
.diagramguard-font-probe {
  position: absolute;
  visibility: hidden;
  inline-size: 1rem;
  block-size: 0;
  pointer-events: none;
}
.g10ch4-lab .diagramguard-svg {
  max-inline-size: 480px;
  border: 0;
  border-radius: 0;
  background: transparent;
  touch-action: auto;
}
.g10ch4-glance-visual .diagramguard-svg { max-inline-size: 300px; }
.diagramguard-figure {
  display: block;
  inline-size: min(100%, 480px);
  min-inline-size: 0;
  margin-inline: auto;
}
.ver-glyph #lessonCard #inlineFigureVisual :is(.diagramguard-rectangle, .diagramguard-coordinate),
.ver-glyph #figureDialog .diagram-content :is(.diagramguard-rectangle, .diagramguard-coordinate) {
  inline-size: 100% !important;
  max-inline-size: 480px !important;
  max-block-size: none !important;
  max-height: none !important;
}

.diagramguard-coordinate-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem .8rem;
  padding: .125rem .25rem .5rem;
  color: var(--text-primary, #24203c);
  font: 500 var(--diagramguard-secondary, .875rem)/1.45 var(--ver-font, system-ui, sans-serif);
  font-variant-numeric: tabular-nums;
}
.diagramguard-coordinate-key > span { white-space: nowrap; }
.diagramguard-coordinate-key[hidden] { display: none; }
.diagramguard-coordinate-key > .diagramguard-named-point { white-space: normal; }
.diagramguard-coordinate-scale {
  display: block;
  margin: 0 0 .5rem;
  text-align: center;
  color: var(--text-secondary, #525b62);
  font: 500 var(--diagramguard-secondary, .875rem)/1.45 var(--ver-font, system-ui, sans-serif);
}

.diagramguard-coordinate-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .3rem .8rem;
  padding: .125rem .25rem .5rem;
  color: var(--text-primary, #24203c);
  font: 500 var(--diagramguard-secondary, .875rem)/1.45 var(--ver-font, system-ui, sans-serif);
}
.diagramguard-coordinate-legend > span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.diagramguard-line-sample {
  flex: 0 0 .8rem;
  border-block-start: 2px solid currentColor;
}
.diagramguard-line-sample[data-dashed] { border-block-start-style: dashed; }

.diagramguard-coordinate-heading {
  display: block;
  margin-block: .4rem .15rem;
  color: var(--text-primary, #24203c);
  font: 550 .9375rem/1.4 var(--ver-font, system-ui, sans-serif);
}

.coordinate-figure-caption {
  max-inline-size: 480px;
  margin: 0 auto var(--ver-space-3, .75rem);
  padding-inline: var(--ver-space-3, .75rem);
  color: var(--text-explanation, #24203c);
  font: 500 .875rem/1.6 var(--ver-font, system-ui, sans-serif);
  overflow-wrap: anywhere;
}

.home-cover-type .home-cover-subtitle {
  margin: .55rem 0 0;
  max-inline-size: 28ch;
  font-size: clamp(.82rem, 2.2vw, 1rem);
  letter-spacing: normal;
  text-transform: none;
}
.home-app-info { display: flex; justify-content: center; margin-block-start: .9rem; }
.triggle-app-info {
  min-height: 44px;
  padding: .45rem .8rem;
  border: 1px solid #d5c9ba;
  border-radius: .7rem;
  color: #6e2933;
  background: #fffdf8;
  font: 680 .9rem/1.5 var(--ver-font, system-ui, sans-serif);
}
.sidebar > .triggle-app-info { margin: .2rem .25rem max(.65rem, env(safe-area-inset-bottom)); align-self: start; }
.triggle-app-info:focus-visible, .triggle-install-dialog button:focus-visible {
  outline: 2px solid #6e2933;
  outline-offset: 3px;
}
.triggle-install-dialog {
  box-sizing: border-box;
  max-inline-size: min(29rem, calc(100% - 2rem));
  max-block-size: 85dvh;
  padding: clamp(1rem, 5vw, 2rem);
  border: 1px solid #d5c9ba;
  border-radius: 1.2rem;
  background: #fffdf8;
  color: #181b20;
  overflow: auto;
  font: 1rem/1.55 var(--ver-font, system-ui, sans-serif);
}
.triggle-install-dialog::backdrop { background: #181b20a8; }
.triggle-install-dialog img { display: block; border-radius: .8rem; }
.triggle-install-dialog h2 { margin-block: .65rem .15rem; line-height: 1.3; padding-inline-end: 2rem; }
.triggle-install-dialog p { margin-block: .55rem; color: #404650; overflow-wrap: anywhere; }
.triggle-install-dialog p:empty { display: none; }
.triggle-install-dialog .triggle-install-publisher { font-size: .85rem; color: #525b62; }
#triggleInstallClose {
  float: inline-end;
  min-inline-size: 44px;
  min-block-size: 44px;
  background: transparent;
  color: #181b20;
  border: 1px solid #d5c9ba;
  border-radius: .7rem;
  font-size: 1.35rem;
}
#triggleNativeInstall {
  min-block-size: 44px;
  padding: .4rem .9rem;
  border: 1px solid #6e2933;
  border-radius: .7rem;
  background: #6e2933;
  color: #fff;
  font: 680 1rem/1.5 var(--ver-font, system-ui, sans-serif);
}
.triggle-offline {
  margin: 0 0 .6rem;
  padding: .45rem .7rem;
  border: 1px solid #dfd3bc;
  border-radius: .65rem;
  background: #fff7e6;
  color: #404650;
  font-size: .9rem;
}
.triggle-unavailable {
  max-width: 34rem;
  margin: max(2rem, env(safe-area-inset-top)) auto;
  padding: 1.25rem;
  color: #181b20;
}
.triggle-unavailable a { display: inline-block; min-block-size: 44px; padding-block: .55rem; color: #6e2933; }
html[lang=en] .triggle-unavailable [lang=ta], html[lang=ta] .triggle-unavailable [lang=en] { display: none; }

.triggle-unavailable:not([hidden]) ~ .class-dock { display: none !important; }
.ver-static-home.ver-starting .app-shell { opacity: 1; }
.ver-static-home :is(.ver-loading, #lessonCard) { display: none; }
a.discover-grade, a.discover-chapter { text-decoration: none; }
@media (display-mode: standalone) {
  .home-active .appbar {
    padding-block-start: max(.42rem, env(safe-area-inset-top));
    padding-inline: max(4vw, env(safe-area-inset-left)) max(4vw, env(safe-area-inset-right));
  }
}
