:root{--ink:#183d50;--muted:#456578;--paper:#f4f8fa;--line:#d5e3e9;--accent:#007e84;--light:#e6f3f2;--error:#a63127}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:20px/1.5 system-ui,sans-serif}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--accent);outline-offset:3px}header,main{max-width:1200px;margin:auto;padding:16px 24px}header{display:flex;justify-content:space-between;gap:15px;align-items:center}.brand{font-weight:700;color:var(--ink);text-decoration:none}header nav{display:flex;gap:8px}main{padding-bottom:40px}h1{font-size:30px;line-height:1.25;margin:12px 0 22px}h2{font-size:25px;line-height:1.3;margin:0 0 15px}h3{font-size:21px;line-height:1.4;margin:0 0 12px}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.card{padding:20px;background:white;border:1px solid var(--line);border-radius:12px;text-align:left}.card h2{font-size:22px;margin:0}.card:hover{border-color:var(--accent)}.primary,.secondary{border:1px solid #bccfd8;border-radius:8px;padding:8px 14px;background:white;font-size:18px}.primary,.secondary.active{background:var(--accent);color:white;border-color:var(--accent)}.quiet,.back{border:0;background:transparent;padding:7px;color:var(--ink);font-size:17px}.back{padding-left:0}.worktop{display:flex;justify-content:space-between;gap:20px;align-items:center}.counter{font-size:18px;white-space:nowrap}.lesson-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}.lesson-toolbar nav,.task-picker,.intro-methods,.page-picker{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.lesson-toolbar button,.lesson-toolbar select{font-size:16px}.task-picker select,.method-selector select{padding:6px;border:1px solid var(--line);border-radius:7px;background:white;max-width:290px}.task-picker button{padding:3px 12px;font-size:23px}.method-selector{display:flex;align-items:center;gap:8px;font-size:15px}.method-selector select{font-size:15px}.task-sheet,.intro-sheet{background:white;border:1px solid var(--line);border-radius:14px;padding:22px 26px}.intro-sheet{max-width:920px;margin:auto}.task-context{font-size:22px;margin:0 0 16px}.part{padding:20px 0;border-bottom:1px solid var(--line)}.part:last-child{border-bottom:0}.page-picker{margin:16px 0}.page-picker button{font-size:16px;padding:6px 12px}.options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-width:950px}.option{display:flex;align-items:center;gap:12px;text-align:left;border:1px solid #bccfd8;border-radius:8px;background:white;padding:9px 12px;font-size:18px;line-height:1.4}.option.selected{background:var(--light);border-color:var(--accent)}.option.good{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.item-actions{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}.item-actions button{font-size:17px;padding:7px 12px}.field-label{display:block;font-size:17px;margin:8px 0 5px}.writing-entry,.answer-entry{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.writing-entry input{width:min(100%,430px);min-width:130px;flex:1}.answer-entry input{width:min(100%,220px)}input,textarea{border:1px solid #9db6c3;border-radius:7px;padding:9px;background:white;font-size:21px;min-width:0}textarea{width:100%;resize:vertical}.writing-entry button{font-size:16px;padding:7px 10px}.unit{font-size:19px;white-space:nowrap}.live-math{font-size:25px;margin:8px 0;overflow:auto;min-height:25px}.live-math:empty{min-height:0;margin:0}.working-board{margin:12px 0}.math-row,.example-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px;font-size:26px;margin:9px 0}.edit-row{margin-left:auto;font-size:14px}.operation-entry{display:inline-flex;gap:7px;align-items:center;flex-wrap:nowrap}.operation-entry input{width:90px;font-size:18px;padding:6px}.operation-entry button{font-size:15px;padding:6px 9px}.operation-mark{white-space:nowrap;font-size:20px}.operation-expansion{background:var(--paper);padding:8px;border-radius:7px}.small{font-size:16px;color:var(--muted);margin:8px 0}.feedback{font-size:18px;background:var(--light);padding:9px 12px;border-radius:7px;margin:10px 0 0}.feedback:empty,.solution:empty{display:none}.feedback.error{color:var(--error);background:#fff0ed}.feedback.inline{display:block;font-size:15px;margin:5px 0 0;padding:5px}.solution{margin-top:12px;border-top:1px solid var(--line);padding-top:10px;font-size:20px}.root-choice{border:1px solid var(--line);border-radius:8px;padding:12px;margin:12px 0}.root-choice p{margin:0 0 10px}.task-figures,.part-figures{display:flex;align-items:center;justify-content:center;gap:24px;flex-wrap:wrap}.model-image{display:block;width:100%;max-width:540px;max-height:430px;height:auto;object-fit:contain;margin:12px auto 18px}.art-image{display:block;width:100%;max-width:390px;max-height:260px;height:auto;object-fit:contain;margin:12px auto 18px}.task-figures:has(.art-image):has(.model-image)>.model-image,.part-figures:has(.art-image):has(.model-image)>.model-image{width:53%;margin-left:0;margin-right:0}.task-figures:has(.art-image):has(.model-image)>.art-image,.part-figures:has(.art-image):has(.model-image)>.art-image{width:38%;margin-left:0;margin-right:0}.coordinate-grid{display:block;width:100%;max-width:520px;aspect-ratio:1;height:auto;margin:8px 0 12px;touch-action:none}.coordinate-answer{width:165px;font-size:21px}.coordinate-part .item-body:has(>.coordinate-grid){display:grid;grid-template-columns:minmax(300px,480px) minmax(160px,1fr);column-gap:24px;align-items:start}.coordinate-part .item-body>.coordinate-grid{grid-row:1/4}.coordinate-part .item-body>.field-label{grid-column:2}.coordinate-part .item-body>.coordinate-answer{grid-column:2}.plot-host{max-width:520px}.angle-grid{display:block;width:100%;max-width:380px;aspect-ratio:1;touch-action:none}.part select{padding:7px;border:1px solid var(--line);border-radius:7px;background:white;font-size:18px;max-width:100%}.proportion-table,.conversion-table{border-collapse:collapse;width:100%;margin:14px 0}.proportion-table{max-width:600px}.proportion-table th,.proportion-table td,.conversion-table th,.conversion-table td{border:1px solid var(--line);padding:9px;text-align:center}.proportion-table input{width:100%;text-align:center;padding:7px}.proportion-table th{font-size:18px}.conversion-table{font-size:16px;min-width:850px}.conversion-table th{font-weight:500}.conversion-table th:first-child{text-align:left;min-width:150px}.conversion-table input{width:100px;font-size:19px;padding:7px}.conversion-table button{font-size:15px;padding:5px 9px}.conversion-scroll{overflow:auto}.math-toolbar{position:sticky;bottom:6px;z-index:2;display:flex;gap:5px;flex-wrap:wrap;background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:7px;margin:15px 0}.math-toolbar button{font-size:17px;padding:5px 10px}.formula-bank{margin:12px 0;font-size:18px}.formula-bank summary{cursor:pointer}.formula-bank button{margin:7px 7px 0 0;font-size:16px}.bottom-nav{display:flex;justify-content:space-between;gap:14px;margin-top:18px}.intro-methods{margin:15px 0}.intro-practice{border-top:1px solid var(--line);margin-top:20px;padding-top:16px}.intro-sheet #begin{margin-top:22px}.score{font-size:42px;font-weight:700}.task-buttons{display:flex;flex-wrap:wrap;gap:10px}.secondary.done{background:var(--light)}.review{border-bottom:1px solid var(--line);padding:14px 0}.review summary{cursor:pointer}dialog{max-width:720px;width:90%;border:1px solid var(--line);border-radius:14px;padding:26px;color:var(--ink);background:white}dialog::backdrop{background:#183d5080}.close{float:right;border:0;background:white;font-size:28px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}[hidden]{display:none!important}mjx-container{max-width:100%}
@media(max-width:700px){body{font-size:19px}header,main{padding:12px 14px}header{align-items:flex-start}.brand{font-size:18px}header .quiet{font-size:15px;padding:5px}h1{font-size:26px}.cards{grid-template-columns:1fr}.card{padding:18px}.task-sheet,.intro-sheet{padding:18px 15px}.task-context{font-size:21px}.lesson-toolbar{gap:8px}.method-selector{flex-wrap:wrap}.method-selector select{max-width:100%}.coordinate-part .item-body:has(>.coordinate-grid){display:block}.coordinate-grid{max-width:520px}.part{padding:18px 0}.task-figures:has(.art-image):has(.model-image)>.model-image,.part-figures:has(.art-image):has(.model-image)>.model-image{width:100%;max-height:350px}.task-figures:has(.art-image):has(.model-image)>.art-image,.part-figures:has(.art-image):has(.model-image)>.art-image{width:100%;max-height:190px}.task-figures,.part-figures{gap:0}.writing-entry{gap:7px}.writing-entry input{flex-basis:100%;width:100%}.math-row{font-size:23px}.operation-entry input{width:75px}.conversion-table{min-width:750px}.math-toolbar{bottom:3px}.model-image{max-height:370px}.art-image{max-height:210px}}
@media(max-width:440px){.options{grid-template-columns:1fr}.option{font-size:18px}.lesson-toolbar button,.lesson-toolbar select{font-size:15px}.task-picker select{max-width:205px}.task-context{font-size:20px}h3{font-size:20px}.math-row{gap:8px}.operation-entry{gap:5px}}
@media print{header,.lesson-toolbar,.bottom-nav,.math-toolbar,.item-actions,.writing-entry{display:none}body{background:white;color:black}.part{break-inside:avoid}}

/* Feedback review: two questions per row; retain readable labels. */
.model-image{max-width:350px;max-height:250px;margin:5px auto 8px}.art-image{max-width:290px;max-height:190px;margin:5px auto 8px}.task-figures,.part-figures{gap:14px}.task-figures:empty,.part-figures:empty{display:none}.part{padding:14px 0}.task-sheet{padding:18px 22px}.question-grid.mc-grid,.question-grid.coordinate-series{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 22px}.question-grid>.part{min-width:0;border-bottom:1px solid var(--line);padding:12px 0}.mc-grid h3{font-size:19px;margin-bottom:6px}.mc-grid .model-image{max-width:280px;max-height:155px;margin:3px auto 7px}.mc-grid .art-image{max-height:130px}.mc-grid .option{font-size:17px;padding:6px 8px;gap:7px}.mc-grid .item-actions{margin-top:8px}.coordinate-series .coordinate-grid{max-width:330px;margin:0 auto 7px}.coordinate-series .plot-host{max-width:330px;margin:auto}.coordinate-series .coordinate-part .item-body:has(>.coordinate-grid){display:block}.coordinate-series h3{font-size:19px}.point-controls{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:5px 0}.point-controls button{font-size:15px;padding:4px 8px}.point-status{margin:5px 0}
@media(max-width:700px){.question-grid.mc-grid,.question-grid.coordinate-series{grid-template-columns:1fr}.model-image{max-height:240px}.task-figures:has(.art-image):has(.model-image)>.model-image,.part-figures:has(.art-image):has(.model-image)>.model-image{max-height:240px}.task-figures:has(.art-image):has(.model-image)>.art-image,.part-figures:has(.art-image):has(.model-image)>.art-image{max-height:160px}.mc-grid .model-image{max-height:155px}}

/* Version 9: six compact MC questions per page and one coordinate task per view. */
.mc-grid{gap:8px 18px!important}.mc-grid>.part{padding:8px 0}.mc-grid h3{font-size:18px;line-height:1.25;margin:0 0 5px}.mc-grid .model-image{max-height:100px;max-width:235px;margin:2px auto 4px}.mc-grid .option{font-size:16px;line-height:1.25;padding:5px 8px;min-height:31px}.mc-grid .options{gap:5px}.mc-grid .feedback{font-size:15px;padding:4px 7px;margin-top:5px}.mc-grid .art-image{max-height:80px}.option.good{background:#dcf0df;color:#174b28;border-color:#328346}.option.bad{background:#f9dfdc;color:#7b241c;border-color:#ba4539}.part-figures,.task-figures{gap:10px}.part{padding:10px 0}.task-sheet{padding:14px 20px}.lesson-toolbar{margin-bottom:10px}.page-picker{margin:9px 0}.task-context{margin-bottom:10px;font-size:21px}.model-image{margin:3px auto 6px;max-height:235px}.art-image{margin:3px auto 6px;max-height:165px}.working-board{margin:7px 0}.math-row{margin:6px 0}.field-label{margin:5px 0 3px}.live-math{margin:5px 0}.final-answer{padding:6px 9px;background:#dcf0df;border-radius:6px;margin:7px 0;font-size:21px}.conversion-table{margin:8px 0;min-width:720px;table-layout:fixed}.conversion-table th:first-child{min-width:0;text-align:center}.conversion-table td,.conversion-table th{padding:5px}.conversion-table input{width:100%;font-size:18px;padding:6px 4px;text-align:center}.given-value{font-weight:700}.conversion-table .cell-correct{background:#dcf0df;border-color:#328346;color:#174b28}.conversion-table .cell-error{background:#f9dfdc;border-color:#ba4539}.conversion-table input[readonly]{cursor:default}.single-coordinate{display:block}.single-coordinate .coordinate-grid,.single-coordinate .plot-host{max-width:410px}.single-coordinate .part{border-bottom:0;padding:4px 0}.single-coordinate .item-actions{margin-top:5px}.single-coordinate .coordinate-part .item-body:has(>.coordinate-grid){display:grid;grid-template-columns:minmax(260px,410px) 180px;gap:14px}.single-coordinate .coordinate-part .item-body:has(>.coordinate-grid)>.coordinate-grid{grid-row:1/4}.single-coordinate h3{font-size:20px;margin-bottom:6px}.lesson-toolbar label{font-size:17px}.lesson-toolbar select{padding:5px;border:1px solid var(--line);border-radius:6px;background:white}.bottom-nav{margin-top:10px}.rounding{font-size:15px;margin:5px 0}
@media(max-width:700px){.single-coordinate .coordinate-part .item-body:has(>.coordinate-grid){display:block}.mc-grid h3{font-size:18px}.task-sheet{padding:12px 14px}.single-coordinate .coordinate-grid,.single-coordinate .plot-host{max-width:350px}}
@media(min-width:701px) and (max-height:850px){header,main{padding-top:9px;padding-bottom:9px}h1{font-size:27px;margin:6px 0 12px}.mc-grid .model-image{max-height:85px}.mc-grid h3{font-size:17px}.mc-grid .option{font-size:15px;padding:4px 7px;min-height:28px}.single-coordinate .coordinate-grid,.single-coordinate .plot-host{max-width:360px}}

.model-image[src$="r9-point.svg"]{width:140px;max-height:70px}.model-image[src$="r9-compare2.svg"]{max-width:540px;max-height:200px}

/* v10: retain the approved visual style and compact empty space. */
.operation-mark mjx-container{font-size:1em!important}.measure-host{width:100%;max-width:640px;margin:3px auto 6px}.measure-svg{width:100%;height:auto;display:block;touch-action:none}.measure-svg #measure-ruler{cursor:grab}.ruler-control{display:flex;align-items:center;gap:10px;font-size:16px}.ruler-control input{flex:1;max-width:320px;padding:0}.calculator-help{font-size:18px;margin:10px 0}.calculator-help ol{padding-left:24px}.calculator-help li{margin:5px 0}.calculator-help p{margin:6px 0}.part h3{font-weight:500}.model-image[src*="r10-r10-kk"],.model-image[src*="r10-r10-sim"],.model-image[src*="r10-7-11"]{max-width:480px;max-height:210px}.mc-grid .model-image[src*="r10-r10-kk"]{max-width:300px;max-height:135px}.task-sheet>h2{margin-bottom:8px}.item-actions{margin-top:7px}.formula-bank{margin:8px 0}.math-toolbar{margin:9px 0}.intro-methods button{font-size:16px}.model-image{max-width:400px}.task-context mjx-container,.part h3 mjx-container{font-size:1em!important}

.conversion-table .unit-divider{border-left:3px solid #555}.task-figures:empty,.part-figures:empty{display:none}

.current-operation{display:flex;gap:.5rem;align-items:center}.current-operation input{width:8rem}.answer-preview{font-size:1.15rem}.coordinate-fields{display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem}.coordinate-fields input{max-width:10rem}.mc-grid mjx-container{font-size:115%!important}.intro-example-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem}.intro-model{max-height:190px;max-width:100%}

.test-sheet .mc-grid .model-image{max-height:145px}.test-sheet .mc-grid .option{font-size:17px}.test-sheet .mc-grid h3{font-size:19px}.intro-example-grid .example-row{font-size:20px}

.task-context:empty{display:none}.coordinate-fields{grid-template-columns:1fr}.coordinate-fields label{display:grid;grid-template-columns:1.3em 1fr;align-items:center;gap:.4em}.coordinate-fields input{width:100%;min-width:0}.intro-model{display:block;margin:0 auto .4em}@media(max-width:700px){.coordinate-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}

.equation-operation-row{display:flex;align-items:center;flex-wrap:nowrap;gap:14px;max-width:100%;overflow-x:auto}.equation-operation-row>.live-math{flex:none;margin:8px 0}.equation-operation-row .current-operation,.math-row,.math-row .operation-entry{display:flex;align-items:center;flex-wrap:nowrap;gap:8px}.equation-operation-row .current-operation{flex:none;margin:0}.current-operation input,.operation-entry input{width:105px;min-width:80px;max-width:140px}.math-row{overflow-x:auto}.math-row>span{flex:none}
