/* Worksheet list and solving workspace: compact like a real classroom workflow, while retaining LetsMath's visual system. */
body:has(.worksheet-table) .shell,body:has(.study-sheet) .shell,body:has(.assessment-runner) .shell{width:100%;max-width:1920px;padding-right:clamp(20px,3.1vw,64px);padding-left:clamp(20px,3.1vw,64px)}
.worksheet-toolbar{display:flex;align-items:center;gap:10px;margin:18px 0 14px;padding:12px;border:1px solid #e1e8f1;border-radius:12px;background:#fff}
.worksheet-toolbar select,.worksheet-toolbar>.outline{height:42px;padding:0 12px;border:1px solid #d7e0eb;border-radius:8px;background:#fff;color:#465a73;font:inherit}
.worksheet-search{display:flex;align-items:center;gap:8px;flex:1;min-width:220px;height:42px;padding:0 12px;border:1px solid #d7e0eb;border-radius:8px;color:#8291a5}
.worksheet-search>span{font-size:22px;line-height:1}.worksheet-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#20324c;font:inherit}
.worksheet-result-count{margin-left:auto;color:#73839a;font-size:13px;font-weight:750;white-space:nowrap}
.worksheet-table-scroll{max-width:100%;overflow:auto;border-radius:14px;-webkit-overflow-scrolling:touch}
.worksheet-table{min-width:1160px;box-shadow:0 8px 24px rgba(29,55,94,.05)}
.worksheet-table .table-head,.worksheet-table .table-row{grid-template-columns:minmax(290px,2.4fr) minmax(105px,1fr) minmax(110px,1fr) minmax(120px,1fr) minmax(128px,1fr) 80px 58px 132px;gap:12px;padding-right:14px;padding-left:16px}
.worksheet-table .table-head{min-height:48px;font-size:12px}.worksheet-table .table-row{min-height:90px;padding-top:10px;padding-bottom:10px;font-size:13px}
.worksheet-table .table-head span:nth-child(3){font-size:0}.worksheet-table .table-head span:nth-child(3)::after{content:"난이도";font-size:12px}.worksheet-table .scorebar{display:none}
.worksheet-row:nth-child(even){background:#fcfdff}.worksheet-row:hover{background:#f5f8fc}
.worksheet-table .titlecell b{font-size:15px;line-height:1.45}.worksheet-table .titlecell i{vertical-align:1px}.worksheet-table .titlecell small{font-size:11px;line-height:1.5}.worksheet-table .titlecell small>span{padding:0 2px;color:#b5c0ce}
.worksheet-course,.worksheet-due{line-height:1.45}.worksheet-course small,.worksheet-due small{display:block;margin-top:4px;color:#8795a8;font-size:11px}.worksheet-student-cell{display:grid;gap:5px;min-width:0}.worksheet-student-cell strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#354a65;font-size:13px}.worksheet-student-cell select{width:100%;min-width:0;height:30px;padding:0 6px;border:1px solid #dbe3ed;border-radius:6px;background:white;color:#64758a;font-size:11px}
.worksheet-actions{display:flex;align-items:center;gap:5px}.worksheet-actions .outline{min-height:34px;padding:0 10px;border-radius:7px;font-size:12px}.worksheet-visual-tag{display:inline-block;margin-left:4px;padding:2px 6px;border-radius:5px;background:#edf4ff;color:#3973cb;font-style:normal;font-weight:750}
.study-sheet{--study-progress:0%;display:grid;gap:12px;width:100%;max-width:none;margin-top:18px;padding-bottom:88px}
.study-progress{position:relative;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:66px;padding:12px 18px;border:1px solid #d8e5f8;border-radius:12px;background:#f1f6ff;color:#536b89}
.study-progress:after{position:absolute;right:0;bottom:0;left:0;height:3px;border-radius:0 0 12px 12px;background:linear-gradient(90deg,#2878ed var(--study-progress),#e7edf5 var(--study-progress));content:""}
.study-progress>div{display:grid;gap:4px}.study-progress b{color:#385675;font-size:15px}.study-progress small{color:#8291a4}.study-progress>span{font-size:13px}.study-progress>span strong{color:#246bfe;font-size:18px}
.study-question-nav{display:flex;gap:7px;overflow:auto;padding:3px 1px 8px;scrollbar-width:thin}.study-question-nav a{display:grid;place-items:center;flex:0 0 40px;height:36px;border:1px solid #dce4ef;border-radius:8px;background:#fff;color:#5e7087;font-size:12px;font-weight:800;text-decoration:none}.study-question-nav a:hover,.study-question-nav a:focus{border-color:#7baeff;background:#eff6ff;color:#246bfe}
.study-question{min-width:0;margin:0;padding:18px 20px 20px;border:1px solid #dfe6ef;border-radius:13px;background:#fff;box-shadow:0 4px 14px rgba(30,56,92,.035);scroll-margin-top:96px}
.study-question legend{display:flex;align-items:flex-start;gap:11px;width:100%;padding:0 0 13px;border-bottom:1px solid #edf1f6;color:#1e304b;font-size:16px;font-weight:800;line-height:1.55}
.study-q-number{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:9px;background:#edf4ff;color:#2872df;font-size:13px}
.study-question legend>span:last-child{min-width:0}.study-question legend small{display:block;margin-top:4px;color:#8997a9;font-size:11px;font-weight:600}
.study-question-body{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;padding-top:16px}.study-question-body.has-visual{grid-template-columns:minmax(300px,.88fr) minmax(360px,1.12fr);align-items:center}
.study-question-body:not(.has-visual) .study-answer-area{max-width:900px}.study-visual-area{align-self:stretch;display:grid;align-content:center;min-height:250px}.study-visual-area .qb-graph-wrap{max-width:760px}.study-visual-area .qb-graph{max-height:440px;object-fit:contain}
.study-answer-area{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.study-answer-area label{display:grid;grid-template-columns:19px 25px minmax(0,1fr);align-items:center;gap:9px;min-height:54px;margin:0;padding:10px 13px;border:1px solid #e1e7ef;border-radius:9px;background:#fff;color:#344b68;font-size:14px;line-height:1.5;cursor:pointer}.study-answer-area label:hover{border-color:#a8c7f6;background:#f8fbff}.study-answer-area label:has(input:checked){border-color:#4387ef;background:#eff6ff;box-shadow:0 0 0 2px rgba(55,125,231,.08)}.study-answer-area input{width:16px;height:16px;margin:0;accent-color:#2877ea}.study-option-index{color:#7c8ba0;font-weight:800}.study-visual-area{min-width:0;padding:10px;border:1px solid #e5ebf3;border-radius:10px;background:#fbfcfe;text-align:center}.study-visual-area .qb-graph-wrap{width:100%;max-width:680px;margin:0 auto}.study-visual-area .qb-graph{display:block;width:100%;height:auto;max-height:none}.study-visual-area .qb-formula{max-width:100%;overflow-x:auto}
.study-submit-bar{position:sticky;bottom:12px;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 0;padding:11px 14px;border:1px solid #dce5f2;border-radius:12px;background:rgba(255,255,255,.96);box-shadow:0 8px 28px rgba(31,55,91,.13);backdrop-filter:blur(10px)}.study-submit-bar>span{color:#718198;font-size:13px}.study-submit-bar>span b{color:#246bfe}
.study-empty-state{display:grid;grid-template-columns:56px minmax(0,1fr);align-items:start;gap:18px;max-width:980px;margin:28px auto;padding:28px 32px;border:1px solid #d9e5f4;border-radius:16px;background:linear-gradient(125deg,#fff 0%,#f8fbff 100%);box-shadow:0 10px 30px rgba(29,55,94,.06)}.study-empty-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;background:#edf4ff;color:#3677df;font-size:30px;font-weight:700}.study-empty-state .kicker{font-size:11px}.study-empty-state h2{margin:7px 0 8px;color:#1c2d47;font-size:21px;letter-spacing:-.5px}.study-empty-state p{max-width:760px;margin:0;color:#718198;line-height:1.7}.study-empty-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:18px}.study-empty-state>div:last-child>small{display:block;margin-top:17px;padding-top:13px;border-top:1px solid #e8eef6;color:#8998ac;font-size:12px}
@media(max-width:1000px){.worksheet-toolbar{flex-wrap:wrap}.worksheet-search{flex-basis:100%}.worksheet-result-count{margin-left:0}.study-question-body.has-visual{grid-template-columns:minmax(0,1fr)}.study-visual-area .qb-graph-wrap{max-width:600px}}
@media(min-width:761px) and (max-width:1400px){.topbar{gap:12px;padding-right:16px;padding-left:16px}.brand{min-width:145px}.mainnav{gap:clamp(7px,1vw,13px)}.mainnav button,.more button{font-size:13px}.tools{flex:0 0 auto;gap:8px}.tools .talk-link{flex:0 0 auto;white-space:nowrap;padding-right:7px;padding-left:7px;font-size:11px}.tools .user{flex:0 0 auto;white-space:nowrap;gap:5px;font-size:12px}.tools .avatar{flex:0 0 29px}}
@media(max-width:760px){.worksheet-toolbar{display:grid;grid-template-columns:1fr 1fr;padding:10px}.worksheet-search{grid-column:1/-1;min-width:0}.worksheet-toolbar select{min-width:0;width:100%}.worksheet-result-count{align-self:center}.worksheet-toolbar>.outline{width:100%}.worksheet-table-scroll{margin:0 -2px}.study-sheet{gap:9px;margin-top:12px;padding-bottom:78px}.study-progress{align-items:flex-start;flex-direction:column;gap:7px;padding:12px 14px}.study-question{padding:14px 12px}.study-question legend{font-size:15px}.study-question-body.has-visual{grid-template-columns:minmax(0,1fr);gap:12px}.study-answer-area{grid-template-columns:minmax(0,1fr)}.study-answer-area label{min-height:48px;padding:9px 10px;font-size:14px}.study-visual-area{padding:6px}.study-submit-bar{bottom:8px;margin-right:0;margin-left:0;padding:9px}.study-submit-bar .primary{min-height:42px;padding:0 12px;font-size:13px}}

/* Keep the solving workspace centered and readable. The base app's legacy
   860px worksheet cap leaves a dead right-hand column, while an unlimited
   canvas makes each question feel oversized on large monitors. */
@media(min-width:761px){
  body:has(.study-sheet) .shell{width:100%;max-width:1760px;margin-right:auto;margin-left:auto;padding-right:clamp(24px,3vw,52px);padding-left:clamp(24px,3vw,52px);box-sizing:border-box}
  body:has(.study-sheet) .study-sheet{display:grid;width:100%;max-width:none;box-sizing:border-box}
  body:has(.study-sheet) .study-question{width:100%;min-width:0;box-sizing:border-box}
  body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1fr) minmax(380px,.92fr);gap:clamp(18px,2vw,30px)}
  body:has(.study-sheet) .study-answer-area{max-width:760px}
  body:has(.study-sheet) .study-visual-area .qb-graph-wrap{width:100%;max-width:640px}
}
@media(min-width:1400px){body:has(.study-sheet) .study-question{padding:20px 24px 22px}body:has(.study-sheet) .study-question-body{padding-top:18px}body:has(.study-sheet) .study-answer-area{gap:9px}body:has(.study-sheet) .study-answer-area label{min-height:54px;padding:10px 14px;font-size:14px}}
@media(max-width:1000px){body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1fr)}}
@media print{.topbar,.study-question-nav,.study-submit-bar,.worksheet-toolbar,.tabs,.headline>.primary{display:none!important}.study-sheet{max-width:none}.study-question{break-inside:avoid;box-shadow:none}.study-visual-area{break-inside:avoid}}

/* Final desktop balance: keep the worksheet table readable and use the full
   solving canvas without letting the graph overpower the actual question. */
@media(min-width:1401px){
  body:has(.worksheet-table) .shell{max-width:1920px;padding-right:clamp(32px,3.2vw,64px);padding-left:clamp(32px,3.2vw,64px)}
  .worksheet-table .table-row{min-height:98px;font-size:14px}
  .worksheet-table .titlecell b{font-size:16px}
  body:has(.study-sheet) .shell{max-width:1880px}
  body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1.08fr) minmax(400px,.92fr)}
  body:has(.study-sheet) .study-visual-area .qb-graph-wrap{max-width:620px}
}

/* Card actions belong to their own textbook cover. The former negative
   top offsets depended on a guessed cover height and floated over filters. */
.textbook-card{isolation:isolate}
.textbook-card-body{position:static}
.textbook-card-actions{top:8px;right:8px;z-index:2;gap:5px}
.textbook-card-actions .icon-action{width:36px;height:36px;border:1px solid rgba(220,228,238,.92);font-size:20px}
.textbook-grid{align-items:start;gap:24px 20px;padding:24px}
.textbook-cover{border-radius:8px}
.textbook-card h3{margin-top:13px;color:#1e2d43;font-size:17px;line-height:1.4}
.textbook-card p{min-height:38px;color:#697991;font-size:13px}
.textbook-card-body>small{font-size:12px;line-height:1.65}
.textbook-toolbar{margin:16px 0 20px}

/* Teacher worksheet detail: roster, answer marks, selected-answer canvas, and
   real question previews follow the four-pane grading reference. */
.worksheet-review-backdrop{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:10px;background:rgba(24,32,44,.52)}
.worksheet-grading-workspace{display:grid;grid-template-rows:auto minmax(0,1fr);width:min(1980px,100%);height:min(1000px,calc(100dvh - 20px));overflow:hidden;border:1px solid #d9dce2;border-radius:15px;background:#fff;box-shadow:0 16px 60px rgba(15,24,38,.25)}
.worksheet-grading-header{display:grid;grid-template-rows:minmax(56px,auto) 50px;min-width:0;border-bottom:1px solid #dce1e8;background:#fff}
.worksheet-grading-toprow{display:flex;align-items:center;gap:16px;min-width:0;padding:8px 18px}
.worksheet-grading-doc-title{display:grid;min-width:0;gap:3px}.worksheet-grading-doc-title>b{overflow:hidden;color:#323b47;font-size:16px;text-overflow:ellipsis;white-space:nowrap}.worksheet-grading-doc-title>small{color:#9099a5;font-size:11px}
.worksheet-grading-top-actions{display:flex;align-items:center;gap:10px;margin-left:auto;color:#8993a0;font-size:12px;white-space:nowrap}.worksheet-grading-top-actions>span{white-space:nowrap}.worksheet-grading-top-actions button{width:38px;height:38px;flex:0 0 38px;border:1px solid #dce2e9;border-radius:8px;background:#fff;color:#5f6977;font-size:23px;line-height:1;cursor:pointer}.worksheet-grading-top-actions button.worksheet-answer-history{width:auto;min-width:142px;flex:0 0 auto;padding:0 14px;color:#52647a;font-size:12px;font-weight:700;white-space:nowrap}.worksheet-grading-top-actions .worksheet-single-student-toggle{display:inline-flex;align-items:center;gap:6px;color:#56677e;font-size:12px;font-weight:700;white-space:nowrap}.worksheet-grading-top-actions .worksheet-single-student-toggle input{width:15px;height:15px;margin:0;accent-color:#2877ea}.worksheet-grading-top-actions button:last-child{border-color:transparent;font-size:30px}
.worksheet-grading-header .grading-close{width:40px;height:40px;flex:0 0 40px;border:1px solid #d9e0e8;border-radius:10px;background:#fff;color:#53647a;font-size:25px}
.worksheet-grading-header .grading-workspace-title{display:grid;min-width:180px;gap:3px}
.worksheet-grading-header .grading-workspace-title .kicker{font-size:9px;letter-spacing:.12em}
.worksheet-grading-header .grading-workspace-title b{overflow:hidden;color:#26364c;font-size:16px;text-overflow:ellipsis;white-space:nowrap}
.worksheet-grading-header .grading-workspace-title small{color:#8995a5;font-size:11px}
.worksheet-grading-header .grading-workspace-tabs{display:flex;align-self:stretch;align-items:center;gap:0;margin-left:8px}
.worksheet-grading-header .grading-workspace-tabs button{height:100%;padding:0 13px;border:0;border-bottom:3px solid transparent;background:#fff;color:#6c7581;font-size:13px;font-weight:700;white-space:nowrap}
.worksheet-grading-header .grading-workspace-tabs button.active{border-bottom-color:#2877ea;color:#2877ea}
.worksheet-grading-tools{display:flex;align-items:center;gap:10px;margin-left:auto;color:#627188;font-size:13px;white-space:nowrap}
.worksheet-grading-meta{display:flex;align-items:center;gap:24px;min-height:48px;padding:0 20px;border-bottom:1px solid #e5e8ed;background:#fafbfd;color:#78869a;font-size:12px}
.worksheet-grading-meta span{display:flex;gap:8px}.worksheet-grading-meta b{color:#344760}
.worksheet-grading-grid{display:grid;grid-template-columns:minmax(210px,24%) minmax(270px,21%) minmax(260px,22%) minmax(320px,33%);min-height:0}
.worksheet-grading-grid>.grading-roster-pane,.worksheet-grading-grid>.grading-answer-pane,.worksheet-grading-grid>.worksheet-review-scratch,.worksheet-grading-grid>.grading-question-pane{min-width:0;min-height:0;overflow:auto;border-right:1px solid #e2e5e9;background:#fff}
.worksheet-grading-grid>.grading-answer-pane{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto}
.worksheet-grading-grid>.worksheet-review-scratch{display:grid;place-items:center;padding:18px;background:#f5f6f8}
.worksheet-roster-columns{display:grid;grid-template-columns:minmax(0,1fr) 54px 62px;gap:6px;padding:8px 10px;border-bottom:1px solid #dce1e8;color:#8a929c;font-size:10px;font-weight:700;text-align:center}.worksheet-roster-columns span:first-child{text-align:left}.worksheet-grading-grid .grading-roster-row{grid-template-columns:minmax(0,1fr) 54px 62px;gap:6px;padding-right:8px;padding-left:10px}.worksheet-grading-grid .grading-roster-name b{font-size:12px}.worksheet-grading-grid .grading-roster-name small{font-size:9px}.worksheet-grading-grid .grading-student-state,.worksheet-roster-wrong{font-size:10px;text-align:center;white-space:nowrap}.worksheet-roster-wrong{color:#7f8997}
.worksheet-answer-canvas{display:grid;justify-items:center;gap:10px;max-width:360px;padding:22px;color:#8a929d;text-align:center}.worksheet-answer-canvas .worksheet-canvas-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:14px;background:#eceff3;color:#a0a7b1;font-size:26px}.worksheet-answer-canvas b{color:#737d89;font-size:14px}.worksheet-answer-canvas p{margin:0;font-size:12px;line-height:1.7}
.worksheet-review-edit-form,.worksheet-review-composition,.worksheet-review-summary{width:min(540px,100%);max-height:100%;overflow:auto;padding:20px;border:1px solid #e0e4ea;border-radius:10px;background:#fff;color:#3c4858}.worksheet-review-edit-form h2,.worksheet-review-composition h2,.worksheet-review-summary h2{margin:0 0 18px;font-size:17px}.worksheet-review-edit-form label{display:grid;gap:6px;margin:12px 0;color:#687588;font-size:12px;font-weight:700}.worksheet-review-edit-form input{height:40px;padding:0 10px;border:1px solid #d9e0e8;border-radius:7px;font:inherit}.worksheet-review-edit-form .primary{margin-top:8px}.worksheet-review-composition h2 small,.worksheet-review-summary h2 small{margin-left:8px;color:#8a95a4;font-size:12px}.worksheet-composition-row,.worksheet-review-summary>div{display:grid;grid-template-columns:30px minmax(0,1fr) 34px 34px;align-items:center;gap:8px;padding:9px 0;border-top:1px solid #edf0f4;font-size:12px}.worksheet-composition-row>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.worksheet-composition-row button{height:30px;border:1px solid #dce2e9;border-radius:6px;background:white}.worksheet-composition-row button:disabled{opacity:.35}.worksheet-review-summary>div{grid-template-columns:48px minmax(0,1fr) minmax(0,1fr) 52px}.worksheet-review-summary strong.correct{color:#2775e9}.worksheet-review-summary strong.wrong{color:#dd4b4b}.worksheet-lecture-question{width:min(680px,100%);max-height:100%;overflow:auto;padding:22px;border:1px solid #e0e4ea;border-radius:10px;background:#fff;color:#27364b}.worksheet-lecture-question>span{color:#7b8797;font-size:12px}.worksheet-lecture-question h2{font-size:21px;line-height:1.7}.worksheet-lecture-question ol{display:grid;grid-template-columns:1fr 1fr;gap:10px}.worksheet-lecture-question>div:last-child{display:flex;justify-content:space-between;margin-top:18px}
.worksheet-review-empty{padding:20px;color:#718096;font-size:13px}.worksheet-review-empty p{line-height:1.6}
.worksheet-review-question-card{margin:10px;padding:13px;border:1px solid #dfe3e9;border-radius:10px;background:#fff;cursor:pointer}
.worksheet-review-question-card.active{border-color:#6da6ff;box-shadow:0 0 0 2px #e8f1ff}
.worksheet-review-question-card>header{display:flex;align-items:center;gap:8px;padding-bottom:9px;border-bottom:1px solid #e8ebef}.worksheet-review-question-card>header>b{font-size:14px}
.worksheet-review-question-card .grading-preview-prompt{padding:12px 1px 8px;color:#29384c;font-size:13px;line-height:1.7}
.worksheet-review-question-card .grading-preview-options{display:grid;grid-template-columns:1fr 1fr;gap:5px 12px;margin:4px 0 10px;padding-left:22px;color:#45556b;font-size:12px;line-height:1.6}
.worksheet-review-question-card .grading-preview-options li.student-choice{color:#2473e9;font-weight:800}
.worksheet-review-question-card .grading-preview-visual{max-width:100%;margin:6px 0 10px;overflow:hidden}.worksheet-review-question-card .qb-graph-wrap{max-width:100%;margin:0 auto}.worksheet-review-question-card .qb-graph{max-height:210px}
.worksheet-review-answer-line{display:grid;grid-template-columns:auto 1fr auto 1fr;gap:6px 10px;padding:8px;border-radius:7px;background:#f4f6f8;color:#758398;font-size:11px}.worksheet-review-answer-line b{overflow:hidden;color:#40526a;text-overflow:ellipsis;white-space:nowrap}
.worksheet-review-question-card .grading-preview-explanation{margin-top:8px;font-size:11px}
.worksheet-bank-candidates{margin:12px 10px 18px;padding-top:10px;border-top:1px solid #e2e8f0}.worksheet-bank-candidates>header{display:grid;gap:3px;margin:0 3px 8px;color:#29384c;font-size:12px}.worksheet-bank-candidates>header span,.worksheet-bank-candidates>p{color:#718096;font-size:11px;line-height:1.55}.worksheet-bank-candidate{cursor:default;background:#fbfdff}.worksheet-bank-candidate .grading-level-badge.pending{background:#fff4db;color:#9b6415}.worksheet-bank-candidate .grading-level-badge.approved{background:#e8f7ef;color:#23824f}.worksheet-bank-candidate-meta{color:#718096;font-size:10px}.worksheet-bank-candidate-formula{margin:5px 0;padding:8px;border-radius:7px;background:#f4f7fc;text-align:center}.worksheet-bank-candidate-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}.worksheet-bank-candidate-actions>span{color:#9b6415;font-size:10px;line-height:1.4}.worksheet-bank-candidate-actions button,.worksheet-bank-candidates>button{flex:0 0 auto;min-height:31px;padding:4px 9px;font-size:11px}
.worksheet-row .titlecell[role="button"]{cursor:pointer}
.worksheet-row .titlecell[role="button"]:focus-visible{outline:2px solid #4387ef;outline-offset:3px;border-radius:5px}
.worksheet-review-visual-empty{display:block;padding:14px;border:1px dashed #d8e1ee;border-radius:8px;color:#8694a8;font-size:11px;text-align:center}
.worksheet-review-question-card .grading-preview-visual .qb-graph-wrap{width:100%;max-width:520px;margin:0 auto}
.worksheet-review-question-card .grading-preview-visual .qb-graph{display:block;width:100%;height:auto;max-height:240px;object-fit:contain}
.worksheet-grading-grid .grading-question-pane{display:grid;grid-template-rows:auto minmax(0,1fr)}.worksheet-grading-grid .grading-question-preview-list{overflow:auto}
.worksheet-grading-grid.question-pane-collapsed{grid-template-columns:minmax(210px,24%) minmax(270px,21%) minmax(0,1fr) 48px}.worksheet-grading-grid.question-pane-collapsed .grading-question-preview-list,.worksheet-grading-grid.question-pane-collapsed .grading-question-pane-head>b,.worksheet-grading-grid.question-pane-collapsed .grading-question-tools{display:none}.worksheet-grading-grid.question-pane-collapsed .grading-question-pane-head{justify-content:center;padding:0}.worksheet-grading-grid.question-pane-collapsed .grading-question-pane-head>button{transform:rotate(180deg)}
.grading-question-pane-head>button,.grading-question-tools button{height:34px;min-width:34px;border:1px solid #dce3ec;border-radius:7px;background:#fff;color:#66768a;cursor:pointer}.grading-question-pane-head{gap:8px}.grading-question-pane-head>b{margin-right:auto}.grading-question-tools{display:flex;align-items:center;gap:6px}.grading-question-tools button{padding:0 9px;font-size:12px;font-weight:700}.grading-question-tools button.active{border-color:#8db6f8;background:#f1f6ff;color:#2874f0}
.worksheet-grading-grid .grading-mark-buttons button:disabled{opacity:.35;cursor:not-allowed}
.worksheet-review-unassigned{display:grid;gap:12px;margin:12px;padding:18px;border:1px dashed #cbd9ec;border-radius:12px;background:#f8fbff;color:#53677f}
.worksheet-review-unassigned b{color:#2d4664;font-size:14px}.worksheet-review-unassigned p{margin:0;font-size:12px;line-height:1.6}.worksheet-review-unassigned label{display:grid;gap:6px;color:#6d7e93;font-size:11px;font-weight:700}.worksheet-review-unassigned select{height:36px;padding:0 9px;border:1px solid #d3dfed;border-radius:7px;background:#fff;color:#3a506d;font:inherit}.worksheet-review-unassigned .primary{min-height:38px}
.worksheet-single-student-toggle{display:flex;align-items:center;gap:6px;color:#64748b;font-size:12px;white-space:nowrap}.worksheet-single-student-toggle input{accent-color:#2877ea}.worksheet-answer-history{height:34px;padding:0 10px;border:1px solid #dce3ec;border-radius:7px;background:#fff;color:#53677f;font-size:12px;font-weight:700;white-space:nowrap;cursor:pointer}.worksheet-answer-history:hover{border-color:#8db6f8;color:#2874f0}
/* Empty roster state: do not reserve two large grading panes for a learner
   and submission that do not exist. Give the real question preview room. */
.worksheet-grading-grid.no-assigned-students{grid-template-columns:minmax(220px,26%) minmax(0,1fr)}
.worksheet-grading-grid.no-assigned-students>.grading-roster-pane{grid-column:1;grid-row:1;background:#fbfcfe}
.worksheet-grading-grid.no-assigned-students>.grading-answer-pane,
.worksheet-grading-grid.no-assigned-students>.worksheet-review-scratch{display:none!important}
.worksheet-grading-grid.no-assigned-students>.grading-question-pane{grid-column:2;grid-row:1;min-width:0}
.worksheet-grading-grid.no-assigned-students .grading-pane-heading{padding:18px 20px}
.worksheet-grading-grid.no-assigned-students .grading-roster{display:grid;align-content:start;padding:16px}
.worksheet-grading-grid.no-assigned-students .grading-roster>.worksheet-review-empty{margin:8px;padding:18px;border:1px dashed #d7e0eb;border-radius:10px;background:#fff;color:#52657e;font-size:13px;line-height:1.7}
.worksheet-grading-grid.no-assigned-students .grading-roster>.worksheet-review-empty b{display:block;margin-bottom:5px;color:#304762;font-size:14px}
.worksheet-grading-grid.no-assigned-students .grading-roster>.worksheet-review-empty p{margin:0;color:#718198}
.worksheet-grading-grid.no-assigned-students .grading-question-preview-list{padding:8px 12px 24px}
.worksheet-grading-grid.no-assigned-students .worksheet-review-question-card{max-width:1100px;margin:10px auto 16px;padding:20px 24px;border-color:#e0e6ee;border-radius:12px}
.worksheet-grading-grid.no-assigned-students .worksheet-review-question-card .grading-preview-prompt{font-size:16px;line-height:1.8}
.worksheet-grading-grid.no-assigned-students .worksheet-review-question-card .grading-preview-visual .qb-graph-wrap{max-width:760px}
.worksheet-grading-grid.no-assigned-students .worksheet-review-question-card .grading-preview-visual .qb-graph{max-height:330px}
@media(max-width:1250px){.worksheet-grading-grid{grid-template-columns:minmax(180px,24%) minmax(240px,26%) minmax(0,1fr)}.worksheet-grading-grid>.worksheet-review-scratch{display:none}.worksheet-grading-header .grading-workspace-tabs button{padding:0 8px;font-size:12px}}
@media(max-width:760px){.worksheet-review-backdrop{inset:0;padding:0}.worksheet-grading-workspace{width:100%;height:100dvh;border:0;border-radius:0}.worksheet-grading-header{grid-template-rows:minmax(52px,auto) 42px}.worksheet-grading-toprow{padding:6px 9px}.worksheet-grading-doc-title>b{font-size:13px}.worksheet-grading-top-actions>span{display:none}.worksheet-grading-header .grading-workspace-tabs{overflow:auto}.worksheet-grading-header .grading-workspace-tabs button{flex:0 0 auto;padding:0 9px;font-size:11px}.worksheet-grading-grid{grid-template-columns:minmax(125px,34%) minmax(0,1fr);grid-template-rows:minmax(130px,30%) minmax(0,1fr)}.worksheet-grading-grid>.grading-roster-pane{grid-column:1;grid-row:1}.worksheet-grading-grid>.grading-answer-pane{grid-column:1;grid-row:2}.worksheet-grading-grid>.grading-question-pane{grid-column:2;grid-row:1/3}.worksheet-grading-grid>.worksheet-review-scratch{display:none}.worksheet-roster-columns{display:none}.worksheet-grading-grid .grading-roster-row{grid-template-columns:minmax(0,1fr) 46px 42px}.worksheet-review-question-card{margin:7px;padding:10px}.worksheet-review-question-card .grading-preview-options{grid-template-columns:1fr}.grading-question-pane-head small{display:none}}
@media(max-width:760px){.worksheet-grading-grid.no-assigned-students{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.worksheet-grading-grid.no-assigned-students>.grading-roster-pane{grid-column:1;grid-row:1;max-height:150px;border-bottom:1px solid #e2e5e9}.worksheet-grading-grid.no-assigned-students>.grading-question-pane{grid-column:1;grid-row:2;min-height:0}.worksheet-grading-grid.no-assigned-students .grading-roster{max-height:90px;overflow:auto}.worksheet-grading-grid.no-assigned-students .grading-pane-heading{padding:10px 12px}.worksheet-grading-grid.no-assigned-students .grading-roster>.worksheet-review-empty{margin:0;padding:8px 12px;border:0;background:transparent}.worksheet-grading-grid.no-assigned-students .worksheet-review-question-card .grading-preview-visual .qb-graph{max-height:300px}}

/* Match the compact landscape diagrams used in printed exam sheets.  The
   graph remains centered inside the question card instead of stretching to
   the full right pane and pushing the next question below the fold. */
.worksheet-review-question-card .grading-preview-visual .qb-graph-wrap{width:min(100%,360px);max-width:360px;margin:6px auto 10px}
.worksheet-review-question-card .grading-preview-visual .qb-graph{max-height:260px}
.worksheet-grading-grid.no-assigned-students .worksheet-review-question-card .grading-preview-visual .qb-graph-wrap{width:min(100%,460px);max-width:460px}
.worksheet-grading-grid.no-assigned-students .worksheet-review-question-card .grading-preview-visual .qb-graph{max-height:290px}
@media(max-width:760px){
  .worksheet-review-question-card .grading-preview-visual .qb-graph-wrap{width:min(100%,330px);max-width:330px}
  .worksheet-review-question-card .grading-preview-visual .qb-graph{max-height:230px}
}

/* Independent teacher review board.  This is intentionally a command-center
   layout rather than a student-list/question-split clone: the teacher moves
   from roster -> answer board -> question inspector. */
.worksheet-review-command-center{background:radial-gradient(circle at 14% 12%,rgba(91,113,255,.22),transparent 28%),linear-gradient(135deg,#101a30 0%,#182641 48%,#0d1425 100%);backdrop-filter:blur(7px)}
.worksheet-review-console{display:grid;grid-template-rows:auto auto minmax(0,1fr);width:min(1660px,calc(100vw - 34px));height:min(930px,calc(100dvh - 34px));overflow:hidden;border:1px solid rgba(255,255,255,.15);border-radius:24px;background:#f5f7fb;box-shadow:0 28px 80px rgba(3,8,22,.45);color:#1a2942}
.review-console-header{display:flex;align-items:center;justify-content:space-between;gap:20px;min-width:0;padding:22px 28px;background:#101a30;color:#fff}
.review-console-brand{min-width:0}.review-console-brand>span,.review-board-label,.review-inspector-heading>div>span,.review-sidebar-label{color:#8fa8ff;font-size:10px;font-weight:800;letter-spacing:.16em}.review-console-brand h1{margin:7px 0 5px;overflow:hidden;font-size:22px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.review-console-brand p{margin:0;color:#a9b7ce;font-size:12px}
.review-console-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}.review-console-chip{padding:8px 12px;border:1px solid rgba(255,255,255,.18);border-radius:999px;color:#c7d2e5;font-size:11px;font-weight:800;white-space:nowrap}.review-console-chip.is-submitted{border-color:rgba(92,220,172,.4);background:rgba(70,205,155,.12);color:#76e6bc}.review-console-history,.review-console-close{height:38px;border:1px solid rgba(255,255,255,.22);border-radius:10px;background:rgba(255,255,255,.08);color:#e7edfa;font:inherit;font-size:11px;font-weight:800;cursor:pointer}.review-console-history{padding:0 12px}.review-console-close{width:38px;font-size:23px;line-height:1}.review-console-history:hover,.review-console-close:hover{border-color:#8fa8ff;background:rgba(143,168,255,.18)}
.review-console-tabs{display:flex;align-items:center;gap:5px;padding:10px 24px;border-bottom:1px solid #dfe5ef;background:#fff}.review-console-tabs button{height:34px;padding:0 14px;border:1px solid transparent;border-radius:9px;background:transparent;color:#718096;font-size:12px;font-weight:800;cursor:pointer}.review-console-tabs button.active{border-color:#c8d6ff;background:#edf2ff;color:#3854b8}.review-console-tabs button:hover{background:#f5f7fb;color:#263e7a}
.review-console-layout{display:grid;grid-template-columns:240px minmax(390px,1fr) minmax(370px,460px);min-height:0;background:#eef2f8}.review-console-sidebar,.review-console-center,.review-console-inspector{min-width:0;min-height:0;overflow:auto}.review-console-sidebar{display:flex;flex-direction:column;gap:12px;padding:18px;border-right:1px solid #dce3ee;background:#e9eef7}.review-sidebar-card{border:1px solid #d9e2ef;border-radius:16px;background:#fff;box-shadow:0 5px 18px rgba(40,58,91,.05)}.review-sidebar-summary{padding:18px}.review-sidebar-summary strong{display:block;margin-top:9px;color:#1b2e50;font-size:38px;line-height:1}.review-sidebar-summary strong small{margin-left:4px;color:#91a0b5;font-size:16px}.review-sidebar-summary p{margin:6px 0 14px;color:#8391a6;font-size:11px}.review-sidebar-progress{height:7px;overflow:hidden;border-radius:9px;background:#edf1f6}.review-sidebar-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#5668ee,#32c6a0)}.review-sidebar-students{overflow:hidden}.review-sidebar-title{display:flex;align-items:center;justify-content:space-between;padding:15px 16px;border-bottom:1px solid #edf0f5}.review-sidebar-title h2{margin:0;color:#243957;font-size:14px}.review-sidebar-title span{color:#71829b;font-size:11px;font-weight:800}.review-student-list{padding:7px}.review-student-list .worksheet-roster-columns{display:none}.review-student-list .grading-roster-row{display:grid;width:100%;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px 10px;border:0;border-radius:10px;background:transparent;text-align:left;cursor:pointer}.review-student-list .grading-roster-row:hover{background:#f2f5fb}.review-student-list .grading-roster-row.active{background:#e9efff;box-shadow:inset 3px 0 #5668ee}.review-student-list .grading-roster-name{display:grid;gap:4px;min-width:0}.review-student-list .grading-roster-name b{overflow:hidden;color:#29405f;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.review-student-list .grading-roster-name small{overflow:hidden;color:#8996aa;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.review-student-list .grading-student-state,.review-student-list .worksheet-roster-wrong{align-self:center;color:#8491a4;font-size:10px;white-space:nowrap}.review-student-list .worksheet-review-empty{margin:6px;padding:14px;border:1px dashed #cbd7e8;border-radius:12px;background:#f8faff;color:#63758e;font-size:11px;line-height:1.6}.review-student-list .worksheet-review-empty b{display:block;margin-bottom:4px;color:#2c4669;font-size:12px}.review-student-list .worksheet-review-empty label{display:grid;gap:6px;margin-top:12px;color:#73849b;font-weight:800}.review-student-list .worksheet-review-empty select{height:34px;border:1px solid #d4deec;border-radius:8px;background:#fff;color:#334b6c}.review-student-list .worksheet-review-empty .primary{width:100%;min-height:36px;margin-top:8px}
.review-console-center{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;background:#f8faff}.review-board-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:20px 24px 14px;background:#f8faff}.review-board-toolbar h2{margin:6px 0 0;color:#192d4b;font-size:21px}.review-board-stats{display:flex;gap:6px}.review-board-stats b{display:grid;min-width:58px;padding:8px 10px;border:1px solid #dae3f0;border-radius:11px;background:#fff;color:#2d4a78;font-size:17px;text-align:center}.review-board-stats b:nth-child(2){color:#cc5360}.review-board-stats b:nth-child(3){color:#909caf}.review-board-stats small{display:block;margin-top:3px;color:#93a0b1;font-size:9px;font-weight:800}.review-board-notice{margin:0 24px 10px;padding:11px 13px;border:1px solid #dbe5f3;border-radius:10px;background:#fff;color:#75869e;font-size:11px}.review-answer-board{min-height:0;padding:6px 24px 20px;overflow:auto}.review-answer-board .grading-answer-row{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:62px;margin:7px 0;padding:9px 12px;border:1px solid #dce5f1;border-radius:13px;background:#fff;box-shadow:0 3px 12px rgba(37,59,95,.04);cursor:pointer}.review-answer-board .grading-answer-row:hover{border-color:#a8bbef;transform:translateY(-1px)}.review-answer-board .grading-answer-row.active{border-color:#6d7ff1;background:#f0f3ff;box-shadow:0 0 0 3px rgba(109,127,241,.12)}.review-answer-board .grading-answer-row>b{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#edf1f8;color:#405776;font-size:12px}.review-answer-board .grading-answer-row.active>b{background:#5668ee;color:#fff}.review-answer-board .grading-answer-row>span{color:#667892;font-size:12px}.review-answer-board .grading-mark-buttons{display:flex;gap:5px}.review-answer-board .grading-mark-buttons button{width:34px;height:34px;border:1px solid #d4deeb;border-radius:9px;background:#fff;color:#8291a6;font-size:17px}.review-answer-board .grading-mark-buttons button.chosen.correct{border-color:#36bb92;background:#36bb92;color:#fff}.review-answer-board .grading-mark-buttons button.chosen.wrong{border-color:#e45a68;background:#e45a68;color:#fff}.review-board-empty{display:grid;place-items:center;min-height:180px;border:1px dashed #cad6e6;border-radius:16px;color:#8796aa;font-size:12px}.review-board-footer{display:flex;align-items:center;justify-content:space-between;padding:12px 24px;border-top:1px solid #dde5f0;background:#fff;color:#71829a;font-size:11px}.review-board-footer b{color:#2e4771}.review-board-footer .primary{min-height:36px;padding:0 15px;border:0;border-radius:9px;background:#5668ee;color:#fff;font-size:11px;font-weight:800}.review-board-footer .primary:disabled{background:#c8d1df;color:#fff}
.review-console-inspector{border-left:1px solid #dce3ee;background:#fff}.review-inspector-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:20px 20px 14px;border-bottom:1px solid #e4eaf2}.review-inspector-heading h2{margin:6px 0 0;color:#203652;font-size:18px}.review-inspector-tools{display:flex;gap:5px}.review-inspector-tools button{height:30px;padding:0 8px;border:1px solid #d9e2ee;border-radius:8px;background:#fff;color:#647690;font-size:10px;font-weight:800;cursor:pointer}.review-inspector-tools button.active{border-color:#8492ed;background:#eff1ff;color:#4d5dc7}.review-inspector-body{padding:14px;overflow:auto}.review-inspector-body .worksheet-review-question-card{margin:0;border-color:#d8e1ee;border-radius:16px;box-shadow:0 7px 22px rgba(42,63,99,.06)}.review-inspector-body .worksheet-review-question-card.active{border-color:#6d7ff1;box-shadow:0 0 0 3px rgba(109,127,241,.12)}.review-inspector-body .grading-preview-prompt{font-size:15px;line-height:1.8}.review-inspector-body .grading-preview-options{font-size:12px}.review-inspector-body .grading-preview-visual .qb-graph-wrap{width:min(100%,330px);max-width:330px}.review-inspector-lecture,.review-inspector-empty{padding:18px;border:1px solid #dbe4f0;border-radius:14px;background:#f8faff;color:#71839b;font-size:11px;line-height:1.7}.review-inspector-lecture h3{margin:10px 0;color:#263e5f;font-size:15px;line-height:1.7}.review-inspector-lecture p{margin:0}.review-inspector-empty{text-align:center}
@media(max-width:1100px){.worksheet-review-console{width:calc(100vw - 20px);height:calc(100dvh - 20px)}.review-console-layout{grid-template-columns:190px minmax(320px,1fr) minmax(300px,36%)}.review-console-header{padding:18px}.review-console-brand h1{font-size:18px}.review-console-chip{display:none}}
@media(max-width:760px){.worksheet-review-console{width:100%;height:100dvh;border:0;border-radius:0}.review-console-header{align-items:flex-start;padding:14px 15px}.review-console-brand h1{font-size:16px}.review-console-actions{gap:4px}.review-console-history{display:none}.review-console-tabs{overflow:auto;padding:8px 10px}.review-console-tabs button{flex:0 0 auto;padding:0 10px}.review-console-layout{display:grid;grid-template-columns:1fr;grid-template-rows:auto minmax(260px,1fr) minmax(340px,1fr);overflow:auto}.review-console-sidebar{display:grid;grid-template-columns:140px minmax(0,1fr);gap:8px;padding:10px;border-right:0;border-bottom:1px solid #dce3ee}.review-sidebar-summary{padding:12px}.review-sidebar-summary strong{font-size:28px}.review-sidebar-students{min-height:0}.review-sidebar-title{padding:10px}.review-student-list{max-height:90px;overflow:auto}.review-console-center{min-height:320px}.review-board-toolbar{padding:14px}.review-board-toolbar h2{font-size:17px}.review-board-stats b{min-width:42px;padding:6px;font-size:14px}.review-board-notice{margin:0 14px 8px}.review-answer-board{padding:4px 14px 12px}.review-board-footer{padding:10px 14px}.review-console-inspector{min-height:340px;border-top:1px solid #dce3ee;border-left:0}.review-inspector-heading{padding:13px 14px}.review-inspector-body{padding:10px 14px}.review-inspector-body .worksheet-review-question-card{margin:0}.review-inspector-body .grading-preview-options{grid-template-columns:1fr}}

/* Match the compact Matholic grading card: the stem stays readable, the
   optional formula is an inline textbook expression, and a graph keeps one
   stable landscape ratio instead of becoming a tall dashboard chart. */
.worksheet-review-question-card .grading-preview-visual,
.grading-preview-card .grading-preview-visual,
.grading-preview-visual[data-preview-visual]{max-width:100%;margin:5px 0 9px;padding:0;border:0;border-radius:0;background:transparent;overflow:visible}
.worksheet-review-question-card .grading-preview-visual .qb-formula,
.grading-preview-card .grading-preview-visual .qb-formula,
.grading-preview-visual[data-preview-visual] .qb-formula{display:block;max-width:100%;margin:0 0 8px;padding:0;border:0;border-radius:0;background:transparent;color:#29384c;font-family:"Cambria Math","STIX Two Math","Noto Sans KR",serif;font-size:clamp(14px,1.25vw,17px);font-weight:500;line-height:1.55;letter-spacing:0;text-align:left;overflow:visible;white-space:normal}
.worksheet-review-question-card .grading-preview-visual .qb-graph-wrap,
.grading-preview-card .grading-preview-visual .qb-graph-wrap,
.grading-preview-visual[data-preview-visual] .qb-graph-wrap{width:min(100%,360px);max-width:360px;margin:4px auto 8px;padding:0;border:0;border-radius:0;background:transparent;box-sizing:border-box}
.worksheet-review-question-card .grading-preview-visual .qb-graph,
.grading-preview-card .grading-preview-visual .qb-graph,
.grading-preview-visual[data-preview-visual] .qb-graph{display:block;width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:560 / 360;object-fit:contain}
.worksheet-review-question-card .grading-preview-visual .qb-graph-wrap>small,
.grading-preview-card .grading-preview-visual .qb-graph-wrap>small,
.grading-preview-visual[data-preview-visual] .qb-graph-wrap>small{margin-top:4px;color:#65758a;font-size:10px;line-height:1.35;text-align:center}
.worksheet-review-question-card .grading-preview-visual .qb-graph-legend,
.grading-preview-card .grading-preview-visual .qb-graph-legend,
.grading-preview-visual[data-preview-visual] .qb-graph-legend{margin:5px 0 0;color:#29384c;font-size:10px;line-height:1.35}
@media(max-width:760px){
  .worksheet-review-question-card .grading-preview-visual .qb-formula,
  .grading-preview-card .grading-preview-visual .qb-formula,
  .grading-preview-visual[data-preview-visual] .qb-formula{font-size:14px}
  .worksheet-review-question-card .grading-preview-visual .qb-graph-wrap,
  .grading-preview-card .grading-preview-visual .qb-graph-wrap,
  .grading-preview-visual[data-preview-visual] .qb-graph-wrap{width:min(100%,330px);max-width:330px}
}

/* Keep the worksheet's marking sheet self-contained instead of relying on
   generic textbook-grading styles from completion-v6.css. */
.worksheet-grading-grid .grading-pane-heading{display:flex;align-items:center;gap:10px;min-height:52px;padding:12px 16px;border-bottom:1px solid #e3e8ef;background:#fff}
.worksheet-grading-grid .grading-pane-heading>b{min-width:0;color:#26364c;font-size:14px;line-height:1.4}
.worksheet-grading-grid .grading-submit-status{margin-left:auto;color:#d14b4b;font-size:11px;font-weight:750;white-space:nowrap}
.worksheet-grading-grid .grading-answer-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px;padding:12px 16px;border-bottom:1px solid #e7ebf1;color:#687991;font-size:12px}
.worksheet-grading-grid .grading-answer-summary>b{color:#283b55;font-size:12px}
.worksheet-grading-grid .grading-answer-summary>i{grid-column:1/-1;height:5px;margin:0;border-radius:99px;background:#edf1f6}
.worksheet-grading-grid .grading-answer-summary>i em{border-radius:inherit;background:#2e78ed}
.worksheet-grading-grid .grading-answer-list{min-height:0;padding:4px 10px;overflow:auto}
.worksheet-grading-grid .grading-answer-row{display:grid;align-items:center;min-height:54px;grid-template-columns:38px minmax(0,1fr) auto;gap:8px;padding:7px 8px;border-bottom:1px solid #edf0f4;background:#fff}
.worksheet-grading-grid .grading-answer-row:hover{background:#f8fbff}
.worksheet-grading-grid .grading-answer-row.active{background:#edf5ff;box-shadow:inset 3px 0 #2874f0}
.worksheet-grading-grid .grading-answer-row>b{padding-left:4px;color:#344760;font-size:13px;font-variant-numeric:tabular-nums}
.worksheet-grading-grid .grading-answer-row>span{min-width:0;color:#66768b;font-size:12px}
.worksheet-grading-grid .grading-mark-buttons{display:flex;align-items:center;gap:4px}
.worksheet-grading-grid .grading-mark-buttons button{width:34px;height:34px;flex:0 0 34px;border:1px solid #d8e0e9;border-radius:7px;background:#fff;color:#7c8998;font-size:18px}
.worksheet-grading-grid .grading-mark-buttons button:disabled{background:#f6f7f9;color:#9ba5b1}
.worksheet-grading-grid .grading-mark-buttons button.chosen.correct{border-color:#2874f0;background:#2874f0;color:#fff}
.worksheet-grading-grid .grading-mark-buttons button.chosen.wrong{border-color:#e34d56;background:#e34d56;color:#fff}
.worksheet-grading-grid .grading-submit-footer{min-height:58px;padding:9px 12px;border-top:1px solid #e2e7ee;background:#fff;font-size:11px}
.worksheet-grading-grid .grading-submit-footer>span{white-space:nowrap}
.worksheet-grading-grid .grading-submit-footer .primary{min-height:38px;padding:0 12px;white-space:nowrap}
.worksheet-grading-grid .grading-unsubmitted-note{display:grid;gap:4px;margin:8px 4px 10px;padding:10px 12px;border:1px solid #e5e9ef;border-radius:8px;background:#f7f8fa;color:#66768b;font-size:11px;line-height:1.45}
.worksheet-grading-grid .grading-unsubmitted-note>b{color:#42536a;font-size:12px}
.worksheet-grading-grid .grading-mark-buttons button:disabled{opacity:.58;background:#f5f6f8;color:#8994a2;cursor:not-allowed}
@media(max-width:520px){.worksheet-grading-grid:not(.no-assigned-students) .grading-roster-row{grid-template-columns:minmax(0,1fr) auto;min-height:70px;gap:3px 8px;padding:9px 10px}.worksheet-grading-grid:not(.no-assigned-students) .grading-roster-name{grid-column:1;grid-row:1}.worksheet-grading-grid:not(.no-assigned-students) .grading-student-state{grid-column:2;grid-row:1}.worksheet-grading-grid:not(.no-assigned-students) .worksheet-roster-wrong{grid-column:1/-1;justify-self:start;margin-top:-3px;padding-left:1px}.worksheet-grading-grid:not(.no-assigned-students) .grading-answer-row{grid-template-columns:28px minmax(0,1fr) auto;gap:4px;padding:5px 4px}.worksheet-grading-grid:not(.no-assigned-students) .grading-answer-row>span.grading-answer-label{max-width:100%;padding:3px 6px;font-size:10px}.worksheet-grading-grid:not(.no-assigned-students) .grading-mark-buttons{gap:3px}.worksheet-grading-grid:not(.no-assigned-students) .grading-mark-buttons button{width:29px;height:30px;flex-basis:29px}}
/* On phone/narrow embedded browser widths, keep the grading flow readable:
   roster, answer marks, then the actual worksheet questions. The former
   side-by-side mobile layout squeezed the roster and made the mark controls
   look like an unstyled column. */
@media(max-width:760px){
  .worksheet-grading-grid:not(.lecture-mode){grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(96px,auto) minmax(190px,34%) minmax(0,1fr)}
  .worksheet-grading-grid:not(.lecture-mode)>.grading-roster-pane{grid-column:1;grid-row:1;max-height:150px;border-right:0;border-bottom:1px solid #e2e5e9}
  .worksheet-grading-grid:not(.lecture-mode)>.grading-answer-pane{grid-column:1;grid-row:2;min-height:0;border-right:0;border-bottom:1px solid #e2e5e9}
  .worksheet-grading-grid:not(.lecture-mode)>.grading-question-pane{grid-column:1;grid-row:3;min-height:0;border-right:0}
  .worksheet-grading-grid:not(.lecture-mode)>.worksheet-review-scratch{display:none!important}
  .worksheet-grading-grid:not(.lecture-mode) .grading-roster{max-height:86px;overflow:auto}
  .worksheet-grading-grid:not(.lecture-mode) .grading-pane-heading{min-height:44px;padding:9px 12px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-roster-row{grid-template-columns:minmax(0,1fr) auto auto;min-height:52px;gap:6px;padding:7px 12px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-roster-name b{font-size:13px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-roster-name small{font-size:10px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-answer-summary{padding:7px 12px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-answer-list{padding:3px 8px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-answer-row{min-height:44px;grid-template-columns:30px minmax(0,1fr) auto;gap:6px;padding:4px 6px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-mark-buttons button{width:30px;height:30px;flex-basis:30px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-submit-footer{min-height:48px;padding:5px 9px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-question-pane-head{height:44px;padding:0 10px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-question-pane-head small{display:none}
  .worksheet-grading-grid:not(.lecture-mode) .grading-question-tools{gap:4px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-question-tools button{height:30px;min-width:30px;padding:0 6px;font-size:11px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-question-preview-list{padding:6px 8px 18px}
  .worksheet-grading-grid:not(.lecture-mode) .worksheet-review-question-card{margin:6px 0 10px;padding:11px}
  .worksheet-grading-grid:not(.lecture-mode) .worksheet-review-question-card .grading-preview-prompt{font-size:14px}
  .worksheet-grading-grid:not(.lecture-mode) .worksheet-review-question-card .grading-preview-options{grid-template-columns:1fr 1fr;font-size:12px}
}
@media(max-width:420px){
  .worksheet-grading-grid:not(.lecture-mode) .grading-roster-row{grid-template-columns:minmax(0,1fr) auto;gap:3px 8px}
  .worksheet-grading-grid:not(.lecture-mode) .grading-roster-name{grid-column:1;grid-row:1}
  .worksheet-grading-grid:not(.lecture-mode) .grading-student-state{grid-column:2;grid-row:1}
  .worksheet-grading-grid:not(.lecture-mode) .worksheet-roster-wrong{grid-column:1/-1;justify-self:start}
  .worksheet-grading-grid:not(.lecture-mode) .worksheet-review-question-card .grading-preview-options{grid-template-columns:1fr}
}
/* Older open tabs may render the empty roster without the state class. Infer
   the same no-student layout from its explicit empty-state message. */
.worksheet-grading-grid:has(>.grading-roster-pane .grading-roster>.worksheet-review-empty){grid-template-columns:minmax(220px,26%) minmax(0,1fr)}
.worksheet-grading-grid:has(>.grading-roster-pane .grading-roster>.worksheet-review-empty)>.grading-answer-pane,
.worksheet-grading-grid:has(>.grading-roster-pane .grading-roster>.worksheet-review-empty)>.worksheet-review-scratch{display:none!important}
.worksheet-grading-grid:has(>.grading-roster-pane .grading-roster>.worksheet-review-empty)>.grading-roster-pane{grid-column:1;grid-row:1}
.worksheet-grading-grid:has(>.grading-roster-pane .grading-roster>.worksheet-review-empty)>.grading-question-pane{grid-column:2;grid-row:1;min-width:0}
@media(max-width:760px){.worksheet-grading-grid .grading-answer-row{min-height:48px;grid-template-columns:30px minmax(0,1fr) auto;gap:5px;padding:5px}.worksheet-grading-grid .grading-mark-buttons button{width:30px;height:30px;flex-basis:30px}.worksheet-grading-grid:has(>.grading-roster-pane .grading-roster>.worksheet-review-empty){grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}.worksheet-grading-grid:has(>.grading-roster-pane .grading-roster>.worksheet-review-empty)>.grading-roster-pane{grid-column:1;grid-row:1;max-height:150px}.worksheet-grading-grid:has(>.grading-roster-pane .grading-roster>.worksheet-review-empty)>.grading-question-pane{grid-column:1;grid-row:2}}

/* Final responsive rules for the real solving screen. Keep the worksheet and
   its progress bar aligned to the available canvas; only place the graph next
   to the answers when both columns have enough room. */
@media(min-width:1200px){
  body:has(.study-sheet) .shell{width:100%;max-width:1920px;margin-right:auto;margin-left:auto;padding-right:clamp(28px,3.2vw,64px);padding-left:clamp(28px,3.2vw,64px);box-sizing:border-box}
  body:has(.study-sheet) .study-sheet,body:has(.study-sheet) .study-progress,body:has(.study-sheet) .study-question,body:has(.study-sheet) .study-submit-bar{width:100%;max-width:none;box-sizing:border-box}
  body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1.08fr) minmax(380px,.92fr);gap:clamp(20px,2.2vw,36px)}
  body:has(.study-sheet) .study-visual-area{min-height:0;align-self:stretch}
  body:has(.study-sheet) .study-visual-area .qb-graph-wrap{width:100%;max-width:760px}
  body:has(.study-sheet) .study-visual-area .qb-graph{max-height:380px}
}

/* Worksheet detail polish: the four panes have explicit proportions and the
   roster owns its button reset, so unrelated app styles cannot distort it. */
.worksheet-grading-grid:not(.no-assigned-students){grid-template-columns:minmax(220px,.9fr) minmax(285px,1fr) minmax(320px,1.08fr) minmax(390px,1.32fr)}
.worksheet-grading-grid .grading-roster-row{display:grid;width:100%;min-height:64px;grid-template-columns:minmax(0,1fr) 54px 62px;align-items:center;gap:6px;margin:0;padding:9px 8px 9px 12px;border:0;border-bottom:1px solid #e8edf3;border-radius:0;background:#fff;color:#30425a;text-align:left;font:inherit;box-sizing:border-box;cursor:pointer;appearance:none;-webkit-appearance:none}
.worksheet-grading-grid .grading-roster-row:hover{background:#f7faff}
.worksheet-grading-grid .grading-roster-row:focus-visible{position:relative;z-index:1;outline:2px solid #75a9f5;outline-offset:-2px}
.worksheet-grading-grid .grading-roster-row.active{background:#edf5ff;box-shadow:inset 3px 0 #2874f0}
.worksheet-grading-grid .grading-roster-name{display:grid;min-width:0;gap:4px}
.worksheet-grading-grid .grading-roster-name b{overflow:hidden;color:#263a55;font-size:13px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.worksheet-grading-grid .grading-roster-name small{overflow:hidden;color:#8391a4;font-size:10px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}
.worksheet-grading-grid .grading-student-state{color:#df5454;font-size:10px;font-weight:750}
.worksheet-grading-grid .grading-roster-row:has(.grading-student-state:not(:empty)) .grading-student-state{white-space:nowrap}
.worksheet-grading-grid .grading-answer-row>span.grading-answer-label{justify-self:start;max-width:100%;overflow:hidden;padding:4px 8px;border-radius:999px;background:#f1f3f6;color:#69788d;font-size:11px;font-weight:700;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}
.worksheet-grading-grid .grading-answer-row>span.grading-answer-label.has-response{background:#edf5ff;color:#2d65ad}
.worksheet-grading-grid .grading-answer-row>span.grading-answer-label.awaiting-response{background:#f3f4f6;color:#7b8796}
.worksheet-grading-grid.lecture-mode{grid-template-columns:minmax(190px,18%) minmax(230px,19%) minmax(310px,32%) minmax(320px,31%)}
.worksheet-grading-grid.lecture-mode>.worksheet-review-scratch{display:grid;grid-column:3;min-width:0;min-height:0;padding:clamp(16px,2vw,30px);background:#f5f7fa}
.worksheet-grading-grid.lecture-mode .worksheet-lecture-question{width:min(820px,100%);max-height:100%;padding:clamp(22px,3vw,40px);border-color:#e0e7f0;border-radius:14px;box-shadow:0 8px 28px rgba(31,55,91,.07)}
.worksheet-grading-grid.lecture-mode .worksheet-lecture-question h2{margin:12px 0 20px;font-size:clamp(21px,2vw,30px);line-height:1.55;letter-spacing:-.025em}
.worksheet-grading-grid.lecture-mode .worksheet-lecture-question ol{gap:10px 24px;margin:0 0 20px;padding-left:26px;font-size:clamp(15px,1.2vw,18px);line-height:1.7}
.worksheet-grading-grid.lecture-mode .worksheet-lecture-question>p{padding-top:14px;border-top:1px solid #edf0f4;color:#52647c;font-size:14px;line-height:1.75}
.worksheet-grading-grid.lecture-mode .worksheet-lecture-question .grading-preview-visual{max-width:680px;margin:18px auto}
.worksheet-grading-grid .grading-question-preview-list{scroll-behavior:smooth;scroll-padding-block:16px}
.worksheet-grading-grid .worksheet-review-question-card{scroll-margin-block:16px}
.worksheet-grading-grid .grading-answer-row[role="button"]{cursor:pointer}
.worksheet-grading-grid .grading-answer-row[role="button"]:focus-visible{position:relative;z-index:1;outline:2px solid #75a9f5;outline-offset:-2px}
.worksheet-grading-grid .worksheet-lecture-question button:disabled{opacity:.42;cursor:not-allowed;box-shadow:none}
@media(max-width:1250px){
  .worksheet-grading-grid:not(.no-assigned-students){grid-template-columns:minmax(180px,24%) minmax(240px,26%) minmax(0,1fr)}
  .worksheet-grading-grid:not(.lecture-mode)>.worksheet-review-scratch{display:none}
  .worksheet-grading-grid.lecture-mode{grid-template-columns:minmax(150px,19%) minmax(200px,22%) minmax(280px,31%) minmax(280px,28%)}
  .worksheet-grading-grid.lecture-mode>.worksheet-review-scratch{display:grid;grid-column:3}
}
@media(max-width:760px){
  .worksheet-grading-grid.lecture-mode{display:block;overflow:auto;padding:12px}
  .worksheet-grading-grid.lecture-mode>.grading-roster-pane,.worksheet-grading-grid.lecture-mode>.grading-answer-pane,.worksheet-grading-grid.lecture-mode>.grading-question-pane{display:none!important}
  .worksheet-grading-grid.lecture-mode>.worksheet-review-scratch{display:grid;min-height:100%;padding:8px}
  .worksheet-grading-grid.lecture-mode .worksheet-lecture-question{width:100%;max-height:none;padding:18px}
  .worksheet-grading-grid.lecture-mode .worksheet-lecture-question ol{grid-template-columns:minmax(0,1fr)}
}
@media(min-width:761px) and (max-width:1199px){
  body:has(.study-sheet) .shell{width:100%;max-width:100%;padding-right:clamp(18px,3vw,36px);padding-left:clamp(18px,3vw,36px);box-sizing:border-box}
  body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1fr)}
  body:has(.study-sheet) .study-visual-area{min-height:0}
  body:has(.study-sheet) .study-visual-area .qb-graph-wrap{width:100%;max-width:700px}
  body:has(.study-sheet) .study-visual-area .qb-graph{max-height:340px}
}
@media(max-width:760px){
  body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1fr)}
  body:has(.study-sheet) .study-visual-area{min-height:0}
  body:has(.study-sheet) .study-visual-area .qb-graph{max-height:260px}
}

/* Final worksheet-detail pass: remove the narrow, oversized card feel and use
   the whole desktop canvas for the question index + active question. */
@media(min-width:1200px){
  body:has(.study-sheet) .shell{width:calc(100% - 64px);max-width:1920px;margin-right:auto;margin-left:auto;padding-right:0;padding-left:0;box-sizing:border-box}
  body:has(.study-sheet) .study-sheet{width:100%;max-width:none;box-sizing:border-box}
  body:has(.study-sheet) .study-workspace{grid-template-columns:minmax(205px,240px) minmax(0,1fr);gap:16px}
  body:has(.study-sheet) .study-question-stage{width:100%;max-width:none}
  body:has(.study-sheet) .study-question{min-height:300px;padding:20px 24px}
  body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1fr) minmax(360px,.9fr);gap:24px}
  body:has(.study-sheet) .study-visual-area .qb-graph-wrap{max-width:640px}
}
@media(min-width:761px) and (max-width:1199px){
  body:has(.study-sheet) .study-workspace{grid-template-columns:minmax(170px,210px) minmax(0,1fr);gap:12px}
  body:has(.study-sheet) .study-question{min-height:280px;padding:18px}
  body:has(.study-sheet) .study-question legend{font-size:17px}
}
@media(max-width:760px){
  body:has(.study-sheet) .study-workspace{grid-template-columns:minmax(0,1fr);gap:8px}
  body:has(.study-sheet) .study-question-nav{display:flex;max-height:none;overflow-x:auto;overflow-y:hidden}
  body:has(.study-sheet) .study-question{min-height:0;padding:16px 14px}
  body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1fr)}
}

/* The filter strip is part of document flow. Sticky positioning caused it to
   cover the question above the fold on shorter laptop screens. */
.qb-v3-preview-filters,.qb-v3-visual-filters{position:static!important;inset:auto!important;z-index:auto!important;box-shadow:none}
.qb-v3-visual-preview-list{align-items:start;gap:18px}
.qb-v3-visual-preview-card{min-width:0;overflow:hidden}
.qb-v3-visual-preview-card:has(.qb-graph-wrap){grid-column:1/-1}
@media(max-width:760px){
  .qb-v3-visual-preview-list{grid-template-columns:minmax(0,1fr)}
  .qb-v3-visual-preview-card:has(.qb-graph-wrap){grid-column:1}
}
.textbook-search,.textbook-toolbar select{height:46px}
.worksheet-visual-review-notice{min-height:70px;padding:12px 16px;margin:12px 0 16px}
.worksheet-visual-review-notice b{font-size:14px}

/* Student worksheet detail: replace the long, oversized single-column stack
   with a deliberate workbook grid. Metadata and controls span the canvas;
   text-only problems share two columns, while graph/diagram problems retain
   the full line so their visual work is never squeezed. */
@media(min-width:1050px){
  body:has(.study-sheet) .shell{width:calc(100% - 80px);max-width:1600px;margin-right:auto;margin-left:auto;padding-right:0;padding-left:0;box-sizing:border-box}
  body:has(.study-sheet) .study-sheet{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:14px 18px;width:100%;max-width:none;margin:18px auto 0}
  body:has(.study-sheet) .study-assignment-meta,body:has(.study-sheet) .study-progress,body:has(.study-sheet) .study-question-nav,body:has(.study-sheet) .study-submit-bar{grid-column:1/-1;width:100%;box-sizing:border-box}
  body:has(.study-sheet) .study-question{width:100%;min-width:0;box-sizing:border-box;padding:16px 18px 18px}
  body:has(.study-sheet) .study-question:has(.study-visual-area){grid-column:1/-1}
  body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1fr) minmax(340px,.8fr);gap:20px}
  body:has(.study-sheet) .study-answer-area{grid-template-columns:minmax(0,1fr);max-width:none}
  body:has(.study-sheet) .study-answer-area label{min-height:46px;padding:8px 11px}
  body:has(.study-sheet) .study-visual-area{min-height:220px}
  body:has(.study-sheet) .study-visual-area .qb-graph-wrap{max-width:640px}
}
@media(min-width:761px) and (max-width:1049px){
  body:has(.study-sheet) .shell{width:calc(100% - 48px);max-width:100%;margin-right:auto;margin-left:auto;padding-right:0;padding-left:0;box-sizing:border-box}
  body:has(.study-sheet) .study-sheet{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
  body:has(.study-sheet) .study-assignment-meta,body:has(.study-sheet) .study-progress,body:has(.study-sheet) .study-question-nav,body:has(.study-sheet) .study-submit-bar{width:100%;box-sizing:border-box}
}
@media(max-width:760px){
  body:has(.study-sheet) .study-sheet{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
  body:has(.study-sheet) .study-assignment-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
  body:has(.study-sheet) .study-assignment-meta>div:nth-child(2n){border-right:0}
  body:has(.study-sheet) .study-assignment-meta>div:last-child{grid-column:1/-1;border-top:1px solid #edf1f6}
}

/* The solver now mounts one active question inside .study-workspace. Older
   two-column worksheet rules left this nested workspace in only half of the
   sheet, producing the large blank right-hand area seen in the reference
   comparison. Keep the meta/progress full width and give the actual workspace
   the entire row; its own grid then cleanly separates the question index and
   the active problem. */
@media(min-width:1050px){
  body:has(.study-sheet) .study-sheet{grid-template-columns:minmax(0,1fr)}
  body:has(.study-sheet) .study-workspace{grid-column:1/-1;width:100%;min-width:0;box-sizing:border-box}
  body:has(.study-sheet) .study-assignment-meta,
  body:has(.study-sheet) .study-progress,
  body:has(.study-sheet) .study-submit-bar{grid-column:1/-1}
}
@media(min-width:761px) and (max-width:1049px){
  body:has(.study-sheet) .study-sheet{grid-template-columns:minmax(0,1fr)}
  body:has(.study-sheet) .study-workspace{grid-column:1/-1;width:100%;min-width:0;box-sizing:border-box}
}

/* Focused worksheet detail: a compact question index and one active problem,
   matching the familiar answer-entry / question-preview workflow. */
body:has(.study-sheet) .study-workspace{grid-column:1/-1;display:grid;grid-template-columns:220px minmax(0,1fr);align-items:start;gap:18px;min-width:0}
body:has(.study-sheet) .study-question-nav{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:6px;max-height:min(68vh,720px);overflow:auto;padding:8px;border:1px solid #e0e7f0;border-radius:12px;background:#fff}
body:has(.study-sheet) .study-question-jump{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:8px;width:100%;min-height:42px;padding:5px 9px;border:1px solid transparent;border-radius:8px;background:transparent;color:#51647d;text-align:left;cursor:pointer}
body:has(.study-sheet) .study-question-jump>span{display:grid;place-items:center;width:30px;height:30px;border-radius:7px;background:#f0f3f7;color:#5f7085;font-size:12px;font-weight:800}
body:has(.study-sheet) .study-question-jump>i{overflow:hidden;color:#8996a8;font-size:11px;font-style:normal;text-overflow:ellipsis;white-space:nowrap}
body:has(.study-sheet) .study-question-jump:hover{background:#f6f9fd}
body:has(.study-sheet) .study-question-jump.is-current{border-color:#a9c9ff;background:#edf5ff;color:#246bdb}
body:has(.study-sheet) .study-question-jump.is-current>span{background:#2877ea;color:white}
body:has(.study-sheet) .study-question-jump.is-answered:not(.is-current)>span{background:#e9f7ef;color:#27814f}
body:has(.study-sheet) .study-question-jump.is-answered>i{color:#27814f}
body:has(.study-sheet) .study-question-stage{display:grid;gap:12px;min-width:0}
body:has(.study-sheet) .study-question[hidden]{display:none!important}
body:has(.study-sheet) .study-question{min-height:360px;padding:24px 28px;border-color:#dce4ee;border-radius:14px;box-shadow:0 4px 18px rgba(27,49,80,.045)}
body:has(.study-sheet) .study-question legend{font-size:19px;line-height:1.6}
body:has(.study-sheet) .study-question-body{grid-template-columns:minmax(0,1fr);gap:20px;padding-top:20px}
body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1fr) minmax(320px,.85fr);align-items:center}
body:has(.study-sheet) .study-answer-area{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
body:has(.study-sheet) .study-answer-area label{min-height:52px;padding:10px 13px;border-color:#e3e8ef;font-size:15px}
body:has(.study-sheet) .study-visual-area{min-height:0;padding:12px;background:#fff}
body:has(.study-sheet) .study-visual-area .qb-graph-wrap{max-width:560px}
body:has(.study-sheet) .study-visual-area .qb-graph{max-height:360px}
body:has(.study-sheet) .study-question-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 2px}
body:has(.study-sheet) .study-question-controls>span{color:#718198;font-size:13px}
body:has(.study-sheet) .study-question-controls>span b{color:#253954;font-size:15px}
body:has(.study-sheet) .study-question-controls button:disabled{opacity:.45;cursor:not-allowed}
body:has(.study-sheet) .study-submit-bar{margin-top:0}
@media(max-width:1000px){body:has(.study-sheet) .study-workspace{grid-template-columns:180px minmax(0,1fr);gap:12px}body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1fr)}body:has(.study-sheet) .study-question{min-height:0;padding:20px}}
@media(max-width:760px){body:has(.study-sheet) .study-workspace{grid-template-columns:minmax(0,1fr);gap:9px}body:has(.study-sheet) .study-question-nav{display:flex;max-height:none;gap:6px;padding:6px;scroll-snap-type:x proximity}.study-question-jump{flex:0 0 94px!important;grid-template-columns:30px minmax(0,1fr)!important;gap:5px!important;padding:4px!important;scroll-snap-align:start}.study-question-jump>i{font-size:10px!important}.study-question-stage{gap:8px!important}.study-question-controls{position:sticky;bottom:68px;z-index:2;padding:7px!important;border:1px solid #e4eaf2;border-radius:9px;background:rgba(255,255,255,.96)}body:has(.study-sheet) .study-question{padding:16px 14px}.study-question legend{font-size:16px!important}.study-answer-area{grid-template-columns:minmax(0,1fr)!important}.study-question-body.has-visual{grid-template-columns:minmax(0,1fr)!important}.study-visual-area .qb-graph{max-height:280px!important}}

/* Worksheet detail: use the full desktop canvas, but keep a clear workbook
   hierarchy and compact answer choices instead of a narrow column floating
   in a large blank area. */
@media(min-width:761px){
  body:has(.study-sheet) .shell{width:calc(100% - 64px);max-width:1840px;padding-right:0;padding-left:0}
  body:has(.study-sheet) .study-sheet{gap:16px;margin-top:20px}
  body:has(.study-sheet) .study-assignment-meta{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:hidden;border:1px solid #e0e7f0;border-radius:12px;background:#fff}
  body:has(.study-sheet) .study-assignment-meta>div{display:grid;align-content:center;gap:5px;min-width:0;min-height:68px;padding:12px 16px;border-right:1px solid #edf1f6}
  body:has(.study-sheet) .study-assignment-meta>div:last-child{border-right:0}
  body:has(.study-sheet) .study-assignment-meta span{color:#8290a3;font-size:11px;font-weight:700}
  body:has(.study-sheet) .study-assignment-meta b{overflow:hidden;color:#304762;font-size:14px;text-overflow:ellipsis;white-space:nowrap}
  body:has(.study-sheet) .study-progress{min-height:72px;padding:14px 20px}
  body:has(.study-sheet) .study-question{padding:22px 26px 24px;border-color:#dce4ee;border-radius:14px;box-shadow:0 3px 12px rgba(27,49,80,.035)}
  body:has(.study-sheet) .study-question legend{font-size:18px;line-height:1.6}
  body:has(.study-sheet) .study-question legend small{font-size:12px}
  body:has(.study-sheet) .study-answer-area{max-width:none;gap:8px 12px}
  body:has(.study-sheet) .study-answer-area label{min-height:58px;padding:12px 15px;font-size:16px}
  body:has(.study-sheet) .study-visual-area .qb-graph-wrap{max-width:720px}
}
@media(max-width:760px){body:has(.study-sheet) .shell{width:100%;padding-right:14px;padding-left:14px}.study-assignment-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;border:1px solid #e0e7f0;border-radius:10px;background:#fff}.study-assignment-meta>div{display:grid;gap:4px;min-width:0;padding:10px 12px;border-right:1px solid #edf1f6;border-bottom:1px solid #edf1f6}.study-assignment-meta span{color:#8290a3;font-size:10px}.study-assignment-meta b{overflow:hidden;color:#304762;font-size:12px;text-overflow:ellipsis;white-space:nowrap}}
.worksheet-visual-review-notice p{font-size:12px;line-height:1.45}
.worksheet-toolbar{margin-top:14px;margin-bottom:12px;padding:10px 12px}
.worksheet-table .table-head{position:static;top:auto;z-index:auto;background:#f8fafd;color:#566982;font-size:13px}
.worksheet-table .table-row{min-height:96px}
.worksheet-table .titlecell b{color:#1e2d43;font-size:16px;letter-spacing:-.2px}
.worksheet-table .titlecell small{color:#687b94;font-size:12px}
.worksheet-missing-questions{display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;background:#fff5e7;color:#9a6418;font-style:normal;font-weight:750}
.worksheet-distribution-warning{display:inline-flex;align-items:center;margin-left:5px;padding:2px 7px;border:1px solid #f0d28f;border-radius:999px;background:#fff8e8;color:#8c6219;font-size:10px;font-style:normal;font-weight:750;line-height:1.4;white-space:nowrap}
.worksheet-distribution-blocked{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:0 9px;border:1px solid #e5d4ad;border-radius:7px;background:#fff9eb;color:#89641e;font-size:11px;font-weight:700;text-align:center;white-space:nowrap}
.worksheet-row-needs-questions .worksheet-actions .outline{border-color:#d8e2ef;color:#4c6480}
.worksheet-table .worksheet-actions .outline{min-height:36px;font-size:13px}
.worksheet-page-tabs{display:flex;align-items:center;min-height:58px;margin:0 0 8px;border-bottom:1px solid #e1e7ef}
.worksheet-page-tabs .tabs{display:flex;align-items:center;gap:8px;width:100%;margin:0;padding:0;border:0}
.worksheet-page-tabs .tabs>button:not(.primary){min-height:48px;padding:0 16px;border-bottom:2px solid transparent;background:transparent;color:#66778e;font-size:15px}
.worksheet-page-tabs .tabs>button.active{border-bottom-color:#2877ea;color:#2877ea}
.worksheet-page-tabs .tabs>button.primary{min-height:40px;margin-left:8px;padding:0 16px;border-radius:8px;font-size:14px}
.worksheet-visual-review-notice{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:58px;margin:10px 0 12px;padding:9px 14px}
.worksheet-visual-review-notice>div:first-child{min-width:0}
.worksheet-visual-review-notice b{font-size:13px}
.worksheet-visual-review-notice p{margin:3px 0 0;font-size:11px;line-height:1.4}
.worksheet-visual-review-actions{display:flex;flex:0 0 auto;gap:7px}
.worksheet-visual-review-actions .outline,.worksheet-visual-review-actions .primary{min-height:34px;padding:0 11px;font-size:12px}
@media(max-width:760px){.worksheet-page-tabs{min-height:54px}.worksheet-page-tabs .tabs{gap:2px}.worksheet-page-tabs .tabs>button:not(.primary){min-height:44px;padding:0 10px;font-size:14px}.worksheet-page-tabs .tabs>button.primary{min-height:36px;margin-left:auto;padding:0 10px;font-size:12px}.worksheet-visual-review-notice{align-items:flex-start;flex-direction:column;gap:8px}.worksheet-visual-review-actions{flex-wrap:wrap}}
@media(max-width:1100px){.textbook-card-actions{top:8px;right:8px}}
@media(max-width:760px){
  .textbook-grid{gap:18px 12px;padding:14px}
  .textbook-card-actions{top:7px;right:7px;gap:4px}
  .textbook-card-actions .icon-action{width:32px;height:32px;font-size:18px}
  .textbook-card h3{font-size:15px}
  .worksheet-visual-review-notice{padding:12px}
}

/* Teacher-style selection and bulk output: retain a dense table without
   sacrificing scanability or collapsing the title column. */
.worksheet-table{min-width:1180px}
.worksheet-table .table-head,.worksheet-table .table-row{grid-template-columns:30px minmax(270px,2.1fr) minmax(100px,.9fr) minmax(92px,.82fr) minmax(112px,.92fr) minmax(118px,.95fr) 78px 54px 132px;gap:10px;padding-right:16px;padding-left:16px}
.worksheet-select-cell{display:grid;place-items:center;min-width:0;margin:0}
.worksheet-select-cell input{width:17px;height:17px;margin:0;accent-color:#2877ea;cursor:pointer}
.worksheet-row.is-selected{background:#f0f6ff!important}
.worksheet-row.is-selected .titlecell b{color:#175fc8}
.worksheet-bulk-actions{display:flex;align-items:center;gap:9px;min-height:46px;margin:0 0 10px;padding:7px 12px;border:1px solid #d8e5f7;border-radius:9px;background:#f4f8ff}
.worksheet-bulk-actions[hidden]{display:none}
.worksheet-selected-count{margin-right:auto;color:#365477;font-size:13px;font-weight:800}
.worksheet-bulk-actions button{min-height:32px;padding:0 11px;font-size:12px}
.worksheet-table .table-head span:nth-child(3){font-size:inherit}
.worksheet-table .table-head span:nth-child(3)::after{content:none}
@media(max-width:760px){.worksheet-bulk-actions{position:sticky;top:6px;z-index:3}.worksheet-table .table-head,.worksheet-table .table-row{gap:8px;padding-right:10px;padding-left:10px}}

/* Keep bank-review context visible on the worksheet page without letting it
   outrank the actual worksheet list. */
.worksheet-visual-review-notice{min-height:0;gap:14px;margin:8px 0 10px;padding:8px 12px;border:1px solid #e2e9f2;border-left:3px solid #8aabd8;border-radius:9px;background:#fbfcfe;box-shadow:none}
.worksheet-visual-review-notice b{font-size:12px;line-height:1.35}
.worksheet-visual-review-notice p{margin:2px 0 0;color:#74849a;font-size:11px;line-height:1.35}
.worksheet-visual-review-notice p span{color:#8a96a6}
.worksheet-visual-review-actions{gap:6px}
.worksheet-visual-review-actions .outline,.worksheet-visual-review-actions .primary{min-height:30px;padding:0 9px;border-radius:7px;font-size:11px}
.worksheet-toolbar{margin-top:10px;margin-bottom:10px;padding:9px 10px;border-color:#e7ebf1;border-radius:10px;box-shadow:none}
.worksheet-table{box-shadow:0 2px 10px rgba(29,55,94,.035)}
.worksheet-table .table-head{border-bottom:1px solid #e2e7ee;background:#f8f9fb}
.worksheet-table .table-row{min-height:88px;border-bottom-color:#e7e9ed}
.worksheet-table .titlecell b{line-height:1.4}
.worksheet-table .titlecell small{line-height:1.4}
@media(max-width:760px){.worksheet-visual-review-notice{align-items:stretch;gap:8px;padding:10px}.worksheet-visual-review-notice p span{display:block;margin-top:2px}.worksheet-visual-review-actions{display:grid;grid-template-columns:1fr 1fr}.worksheet-visual-review-actions button{width:100%}}

/* Final detail-layout guard: override legacy two-column rules after all
   worksheet styles; stack and constrain the active workspace on mobile. */
@media(min-width:1050px){
  body:has(.study-sheet) .shell{width:calc(100% - 80px);max-width:1600px;margin-right:auto;margin-left:auto;padding-right:0;padding-left:0;box-sizing:border-box}
  body:has(.study-sheet) .study-sheet{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:14px 18px;width:100%;max-width:none;margin:18px auto 0}
  body:has(.study-sheet) .study-workspace{grid-column:1/-1;width:100%;min-width:0;box-sizing:border-box}
  body:has(.study-sheet) .study-assignment-meta,body:has(.study-sheet) .study-progress,body:has(.study-sheet) .study-question-nav,body:has(.study-sheet) .study-submit-bar{grid-column:1/-1;width:100%;box-sizing:border-box}
  body:has(.study-sheet) .study-question{width:100%;min-width:0;box-sizing:border-box;padding:16px 18px 18px}
  body:has(.study-sheet) .study-question:has(.study-visual-area){grid-column:1/-1}
  body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1fr) minmax(340px,.8fr);gap:20px}
  body:has(.study-sheet) .study-answer-area{grid-template-columns:minmax(0,1fr);max-width:none}
  body:has(.study-sheet) .study-answer-area label{min-height:46px;padding:8px 11px}
  body:has(.study-sheet) .study-visual-area{min-height:220px}
  body:has(.study-sheet) .study-visual-area .qb-graph-wrap{max-width:640px}
}
@media(min-width:761px) and (max-width:1049px){
  body:has(.study-sheet) .shell{width:calc(100% - 48px);max-width:100%;margin-right:auto;margin-left:auto;padding-right:0;padding-left:0;box-sizing:border-box}
  body:has(.study-sheet) .study-sheet{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
  body:has(.study-sheet) .study-assignment-meta,body:has(.study-sheet) .study-progress,body:has(.study-sheet) .study-question-nav,body:has(.study-sheet) .study-submit-bar{width:100%;box-sizing:border-box}
}
@media(max-width:760px){
  body:has(.study-sheet) .study-sheet{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
  body:has(.study-sheet) .study-assignment-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
  body:has(.study-sheet) .study-assignment-meta>div:nth-child(2n){border-right:0}
  body:has(.study-sheet) .study-assignment-meta>div:last-child{grid-column:1/-1;border-top:1px solid #edf1f6}
}
@media(max-width:760px){
  body:has(.study-sheet) .shell{width:100%;max-width:100%;padding-right:12px;padding-left:12px;box-sizing:border-box}
  body:has(.study-sheet) .study-sheet,body:has(.study-sheet) .study-workspace,body:has(.study-sheet) .study-question-stage{width:100%;min-width:0;box-sizing:border-box}
  body:has(.study-sheet) .study-workspace{grid-template-columns:minmax(0,1fr);gap:9px}
  body:has(.study-sheet) .study-question-nav{min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
  body:has(.study-sheet) .study-question{width:100%;min-width:0;box-sizing:border-box}
  body:has(.study-sheet) .study-question-body,body:has(.study-sheet) .study-question-body.has-visual{grid-template-columns:minmax(0,1fr);min-width:0}
  body:has(.study-sheet) .study-visual-area,body:has(.study-sheet) .study-visual-area .qb-graph-wrap{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
  body:has(.study-sheet) .study-visual-area svg,body:has(.study-sheet) .study-visual-area canvas{max-width:100%;height:auto}
}
.worksheet-detail-loading{display:grid;place-items:center;gap:12px;min-height:52vh;padding:32px;color:#60738d;text-align:center}
.worksheet-detail-loading>span{color:#2878f0;font-size:30px;animation:worksheet-detail-spin 1s linear infinite}
.worksheet-detail-loading>b{font-size:15px;font-weight:700}
@keyframes worksheet-detail-spin{to{transform:rotate(360deg)}}

/* Worksheet list polish: keep assignment, submission, and row actions in their own columns. */
.worksheet-table{min-width:1140px;border-color:#e2e8f0;border-radius:13px;box-shadow:0 4px 16px rgba(31,55,89,.045)}
.worksheet-table .table-head,.worksheet-table .table-row{grid-template-columns:30px minmax(290px,2.25fr) minmax(112px,.92fr) minmax(112px,.9fr) minmax(128px,1fr) minmax(142px,1.08fr) minmax(88px,.68fr) minmax(54px,.42fr) minmax(146px,1fr);gap:10px;padding-right:16px;padding-left:16px}
.worksheet-table .table-head{min-height:50px;border-bottom-color:#e3e8ef;background:#f8fafd;color:#687990;font-size:12px}
.worksheet-table .table-row{min-height:86px;padding-top:9px;padding-bottom:9px;border-bottom-color:#e9edf3;font-size:13px}
.worksheet-table .table-row:hover{background:#f8fbff}
.worksheet-table .titlecell{min-width:0}
.worksheet-table .titlecell[role=button]{cursor:pointer}
.worksheet-table .titlecell[role=button]:focus-visible{outline:2px solid #4d8cff;outline-offset:4px;border-radius:4px}
.worksheet-table .titlecell b{font-size:15px;line-height:1.45}
.worksheet-table .titlecell small{font-size:11px;line-height:1.45}
.worksheet-table .worksheet-student-cell{align-content:center;gap:6px;width:100%;min-width:0}
.worksheet-table .worksheet-student-cell strong{font-size:12px}
.worksheet-table .worksheet-student-cell select{appearance:none;width:100%;height:32px;min-height:32px;padding:0 27px 0 9px;border:1px solid #d8e1ed;border-radius:7px;background-color:#fff;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%237688a0' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center;color:#536780;font-size:11px;line-height:1.2;text-overflow:ellipsis;cursor:pointer}
.worksheet-table .worksheet-student-cell select:focus-visible{outline:2px solid #78aaff;outline-offset:1px}
.worksheet-table .worksheet-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:6px;width:100%;min-width:0}
.worksheet-table .worksheet-actions>.outline{min-width:0;min-height:34px;padding:0 7px;border-radius:7px;font-size:11px}
.worksheet-table .worksheet-actions>.outline:only-child{grid-column:1/-1}
.worksheet-table .worksheet-course,.worksheet-table .worksheet-due{min-width:0;overflow-wrap:anywhere}
.worksheet-table .worksheet-result-count{font-variant-numeric:tabular-nums}
.worksheet-visual-review-notice{display:flex;align-items:center;justify-content:space-between;min-height:58px;margin:8px 0 12px;padding:8px 14px;border:1px solid #ead9aa;border-radius:10px;background:#fffcf3;box-shadow:none}
.worksheet-visual-review-notice>div:first-child{min-width:0}
.worksheet-visual-review-notice b{color:#745c2c;font-size:12px;line-height:1.4}
.worksheet-visual-review-notice p{margin:3px 0 0;color:#8a7752;font-size:11px;line-height:1.4}
.worksheet-visual-review-actions{display:flex;flex:0 0 auto;gap:7px}
.worksheet-visual-review-actions .outline,.worksheet-visual-review-actions .primary{min-height:34px;padding:0 11px;border-radius:7px;font-size:12px}
@media(max-width:760px){.worksheet-table{min-width:1080px}.worksheet-table .table-head,.worksheet-table .table-row{grid-template-columns:28px minmax(240px,2fr) minmax(100px,.85fr) minmax(100px,.8fr) minmax(116px,.9fr) minmax(128px,1fr) 76px 50px 130px;gap:8px;padding-right:10px;padding-left:10px}.worksheet-table .worksheet-actions{gap:4px}.worksheet-visual-review-notice{align-items:flex-start;flex-direction:column;gap:8px}.worksheet-visual-review-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.worksheet-visual-review-actions button{width:100%}}

/* Match the supplied worksheet-list reference: the list is the primary task,
   so bank-review status must not displace its tabs, filters, and rows. */
body:has(.worksheet-page-tabs) .shell{padding-top:10px}
body:has(.worksheet-page-tabs) .headline{display:none!important}
body:has(.worksheet-page-tabs) .worksheet-visual-review-notice{display:none!important}
.worksheet-page-tabs{min-height:58px;margin-top:0;margin-bottom:8px}
.worksheet-page-tabs .tabs{justify-content:flex-start}
.worksheet-page-tabs .tabs>button:not(.primary){position:relative;min-height:48px;padding:0 14px;color:#252b35;font-size:15px;font-weight:700}
.worksheet-page-tabs .tabs>button.active{color:#2877ea}
.worksheet-page-tabs .tabs>button small{display:none}
.worksheet-page-tabs .tabs>button.primary{margin-left:auto;min-height:40px;border-radius:8px}
.worksheet-toolbar{display:flex;align-items:center;gap:10px;min-height:48px;margin:14px 0 16px;padding:0;border:0;background:transparent}
.worksheet-toolbar .worksheet-search{flex:0 1 300px;min-width:210px;height:42px;border:1px solid #d8dde5;border-radius:8px;background:#fff}
.worksheet-toolbar .worksheet-search input{height:40px;font-size:14px}
.worksheet-toolbar>select,.worksheet-toolbar>.outline{height:42px;min-height:42px;border:1px solid #d8dde5;border-radius:8px;background-color:#fff;color:#303640;font-size:14px}
.worksheet-toolbar>select{min-width:138px;padding:0 34px 0 12px}
.worksheet-toolbar .worksheet-result-count{margin-left:auto;color:#77818e;font-size:12px;white-space:nowrap}
.worksheet-table{min-width:0;border:0;border-radius:0;background:#fff;box-shadow:none}
.worksheet-table .table-head,.worksheet-table .table-row{grid-template-columns:36px minmax(360px,2.35fr) minmax(138px,.9fr) minmax(136px,.9fr) minmax(128px,.8fr) minmax(120px,.8fr) minmax(80px,.52fr) minmax(62px,.42fr) minmax(116px,.72fr);gap:10px;padding-right:18px;padding-left:18px}
.worksheet-table .table-head{min-height:48px;border-bottom:1px solid #dfe3e8;background:#fff;color:#343942;font-size:13px;font-weight:700}
.worksheet-table .table-row{min-height:100px;padding-top:11px;padding-bottom:11px;border-bottom:1px solid #e3e5e8;color:#353a43;font-size:14px}
.worksheet-table .table-row:hover{background:#fafbfc}
.worksheet-table .titlecell b{font-size:16px;font-weight:750;letter-spacing:-.35px}
.worksheet-table .titlecell b i{flex:0 0 auto}
.worksheet-table .titlecell small{margin-top:4px;color:#858b94;font-size:12px}
.worksheet-table .worksheet-course{font-size:14px;line-height:1.45}
.worksheet-table .worksheet-course small,.worksheet-table .worksheet-due small{display:block;margin-top:3px;color:#858b94;font-size:12px}
.worksheet-table .worksheet-due{font-size:14px;line-height:1.45}
.worksheet-table .worksheet-student-cell{display:flex;align-items:center;justify-content:center;gap:6px}
.worksheet-table .worksheet-student-cell strong{font-size:14px;font-weight:500}
.worksheet-table .worksheet-student-cell select{width:auto;max-width:100%;height:30px;min-height:30px;padding-left:8px;font-size:12px}
.worksheet-table .worksheet-actions{display:flex;justify-content:flex-end;gap:7px}
.worksheet-table .worksheet-actions>.outline{min-height:36px;padding:0 11px;border:1px solid #3280ff;border-radius:7px;color:#2877ea;font-size:13px;white-space:nowrap}
.worksheet-table .worksheet-result-count,.worksheet-table .link{color:#2877ea}
@media(max-width:1050px){.worksheet-toolbar{flex-wrap:wrap}.worksheet-toolbar .worksheet-search{flex:1 1 260px}.worksheet-table{min-width:1140px}}
@media(max-width:760px){.worksheet-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 10px}.worksheet-toolbar .worksheet-search{grid-column:1/-1;width:100%;min-width:0}.worksheet-toolbar>select,.worksheet-toolbar>.outline{width:100%;min-width:0}.worksheet-toolbar .worksheet-result-count{margin:0}.worksheet-table{min-width:1120px}}

/* Functional worksheet filters and a compact reference-like calendar view. */
.worksheet-toolbar .worksheet-extra-filter{display:flex;align-items:center;gap:6px;height:42px;padding:0 8px;border:1px solid #d8dde5;border-radius:8px;background:#fff;color:#77818e;font-size:12px;white-space:nowrap}
.worksheet-toolbar .worksheet-extra-filter>span{font-weight:700}
.worksheet-toolbar .worksheet-extra-filter select,.worksheet-toolbar .worksheet-extra-filter input{height:36px;min-width:90px;padding:0 6px;border:0;border-radius:5px;background:transparent;color:#303640;font-size:13px}
.worksheet-toolbar .worksheet-extra-filter select{min-width:92px}
.worksheet-toolbar .worksheet-date-filter{gap:4px}.worksheet-toolbar .worksheet-date-filter input{width:124px;min-width:0}.worksheet-toolbar .worksheet-date-filter i{font-style:normal;color:#9aa3af}
.worksheet-view-switch{display:flex;flex:0 0 auto;height:40px;border:1px solid #d8dde5;border-radius:8px;overflow:hidden;background:#fff}
.worksheet-view-switch button{padding:0 11px;border:0;border-right:1px solid #e3e7ed;background:#fff;color:#657184;font-size:12px;font-weight:700}.worksheet-view-switch button:last-child{border-right:0}.worksheet-view-switch button.active{background:#eef4ff;color:#2877ea;box-shadow:inset 0 0 0 1px #2877ea}
.worksheet-page-tabs .tabs{display:flex;align-items:center;gap:8px}
.worksheet-page-tabs .tabs>.worksheet-view-switch{margin-left:auto}
.worksheet-page-tabs .tabs>button.primary{margin-left:0}
.worksheet-calendar-view{margin-top:16px;padding:18px;border:1px solid #e0e5eb;border-radius:12px;background:#fff}
.worksheet-calendar-view[hidden],.worksheet-table-scroll[hidden]{display:none!important}
.worksheet-calendar-view>header{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px;color:#374151}.worksheet-calendar-view>header span{color:#8490a0;font-size:12px}
.worksheet-calendar-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.worksheet-calendar-grid article{display:grid;gap:7px;min-width:0;padding:13px;border:1px solid #e6eaf0;border-radius:9px;background:#fff}.worksheet-calendar-grid time{color:#2877ea;font-size:12px;font-weight:750}.worksheet-calendar-grid article>b{overflow:hidden;color:#26364b;text-overflow:ellipsis;white-space:nowrap}.worksheet-calendar-grid article>span,.worksheet-calendar-grid article>small{color:#7a8798;font-size:12px}.worksheet-calendar-grid .outline{justify-self:start;min-height:32px;padding:0 10px;font-size:12px}.worksheet-calendar-empty{grid-column:1/-1;padding:35px;text-align:center;color:#8190a3}
.worksheet-create-backdrop{position:fixed;inset:0;z-index:1100;display:grid;place-items:center;padding:18px;background:rgba(25,36,53,.48)}
.worksheet-create-dialog{width:min(720px,100%);max-height:min(90dvh,900px);overflow:auto;padding:24px;border:1px solid #dfe5ed;border-radius:15px;background:#fff;box-shadow:0 20px 70px rgba(20,34,57,.26)}
.worksheet-create-dialog>header{display:flex;justify-content:space-between;gap:16px;padding-bottom:17px;border-bottom:1px solid #e8ebf0}.worksheet-create-dialog>header h2{margin:6px 0 0;color:#26364b;font-size:24px}.worksheet-create-dialog>header p{margin:7px 0 0;color:#7d8ba0;font-size:13px}.worksheet-create-close{width:38px;height:38px;border:0;border-radius:8px;background:#f2f5f9;color:#617188;font-size:24px}
.worksheet-create-form{display:grid;gap:17px;padding-top:18px}.worksheet-create-form label{display:grid;gap:6px;color:#52637a;font-size:12px;font-weight:750}.worksheet-create-form input:not([type=checkbox]),.worksheet-create-form select{width:100%;height:42px;padding:0 10px;border:1px solid #d7dfe9;border-radius:7px;background:#fff;color:#29384c;font:inherit}.worksheet-create-title-field input{font-size:14px!important}.worksheet-create-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.worksheet-create-roster{min-width:0;margin:0;padding:12px;border:1px solid #e1e6ed;border-radius:9px}.worksheet-create-roster legend{padding:0 5px;color:#394b63;font-size:13px;font-weight:800}.worksheet-create-roster legend small{margin-left:6px;color:#8390a0;font-size:11px;font-weight:500}.worksheet-roster-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:180px;overflow:auto}.worksheet-roster-options>label{display:flex;align-items:center;gap:9px;min-width:0;padding:9px;border:1px solid #edf0f4;border-radius:7px;background:#fbfcfd;cursor:pointer}.worksheet-roster-options>label input{accent-color:#2877ea}.worksheet-roster-options>label span{display:grid;min-width:0;gap:2px}.worksheet-roster-options>label b{overflow:hidden;color:#35465d;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.worksheet-roster-options>label small{overflow:hidden;color:#8a96a6;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.worksheet-create-count{margin:0;color:#78879b;font-size:12px;line-height:1.5}.worksheet-create-form>footer{display:flex;justify-content:flex-end;gap:8px;padding-top:14px;border-top:1px solid #e8ebf0}.worksheet-create-status{padding:24px 4px;color:#66778e;line-height:1.7}.worksheet-create-status.error{color:#79571e}.worksheet-create-status p{margin:5px 0 12px}
@media(max-width:1050px){.worksheet-toolbar .worksheet-date-filter input{width:105px}.worksheet-toolbar .worksheet-extra-filter{flex:0 0 auto}}
@media(max-width:760px){.worksheet-toolbar .worksheet-extra-filter{width:100%;justify-content:space-between}.worksheet-toolbar .worksheet-extra-filter select{flex:1}.worksheet-toolbar .worksheet-date-filter{grid-column:1/-1}.worksheet-toolbar .worksheet-date-filter input{flex:1;width:auto}.worksheet-page-tabs .tabs{flex-wrap:wrap}.worksheet-page-tabs .tabs>.worksheet-view-switch{margin-left:0}.worksheet-create-dialog{padding:17px}.worksheet-create-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.worksheet-roster-options{grid-template-columns:1fr}}

/* Student view: only linked, genuinely assigned worksheet records and real results. */
.student-worksheet-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:22px 0}
.student-worksheet-overview>div{display:grid;gap:6px;padding:16px;border:1px solid #e1e8f2;border-radius:11px;background:#fff}
.student-worksheet-overview span,.student-worksheet-course{color:#7b8ba2;font-size:12px;font-weight:700}
.student-worksheet-overview b{color:#26364b;font-size:19px}
.student-worksheet-panel{padding:22px}
.student-worksheet-panel .panelhead{margin-bottom:14px}
.student-worksheet-list{display:grid;gap:10px}
.student-worksheet-card{display:grid;grid-template-columns:minmax(0,1fr) 160px auto;align-items:center;gap:18px;padding:17px;border:1px solid #e2e8f0;border-radius:11px;background:#fff}
.student-worksheet-card-main{min-width:0}.student-worksheet-card h3{margin:5px 0;color:#26364b;font-size:17px}.student-worksheet-card p,.student-worksheet-card-status span,.student-worksheet-card-status small{margin:0;color:#78879b;font-size:12px}
.student-worksheet-card-status{display:grid;gap:4px}.student-worksheet-card-status>b{color:#2877ea;font-size:13px}
.student-worksheet-empty{padding:24px;border:1px dashed #cfd9e7;border-radius:10px;background:#f8fafd;color:#53657c}.student-worksheet-empty>b{font-size:15px}.student-worksheet-empty p{margin:7px 0 0;color:#78879b;font-size:13px;line-height:1.6}
.student-account-links{margin-top:18px;padding:22px}.student-account-links .panelhead p{max-width:700px;margin:7px 0 0;color:#75849a;font-size:13px;line-height:1.6}
.student-account-link-list{display:grid;gap:8px;margin:14px 0}.student-account-link-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,300px);align-items:center;gap:15px;padding:10px 12px;border:1px solid #e6ebf2;border-radius:8px}.student-account-link-row>span{display:grid;gap:3px}.student-account-link-row b{color:#33445c;font-size:13px}.student-account-link-row small{color:#8290a1;font-size:11px}.student-account-link-row input{height:38px;padding:0 10px;border:1px solid #d8e0e9;border-radius:7px;font:inherit}
@media(max-width:760px){.student-worksheet-overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.student-worksheet-overview>div{padding:12px}.student-worksheet-overview b{font-size:16px}.student-worksheet-card{grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:13px}.student-worksheet-card-status{grid-column:1}.student-worksheet-card>.primary{grid-column:2;grid-row:1/3}.student-account-link-row{grid-template-columns:1fr;gap:8px}.student-account-links{padding:15px}}

/* A real month grid, not a date-sorted card list, with visible deadline items. */
.worksheet-calendar-month-nav{display:flex;align-items:center;gap:10px}
.worksheet-calendar-month-nav>b{min-width:104px;text-align:center;font-size:16px;font-variant-numeric:tabular-nums}
.worksheet-calendar-month-nav>button{width:32px;height:32px;border:1px solid #dce2ea;border-radius:7px;background:#fff;color:#50617a;font-size:20px;line-height:1;cursor:pointer}
.worksheet-calendar-weekdays,.worksheet-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.worksheet-calendar-weekdays{border-top:1px solid #e7ebf0;border-right:1px solid #e7ebf0;border-left:1px solid #e7ebf0;background:#f8fafc;color:#78869a;text-align:center;font-size:12px;font-weight:750}
.worksheet-calendar-weekdays>span{padding:9px 3px;border-right:1px solid #e7ebf0}
.worksheet-calendar-weekdays>span:last-child{border-right:0}
.worksheet-calendar-day{display:flex;min-width:0;min-height:104px;flex-direction:column;gap:4px;padding:6px;border-right:1px solid #e7ebf0;border-bottom:1px solid #e7ebf0;background:#fff}
.worksheet-calendar-grid>.worksheet-calendar-day:nth-child(7n+1){border-left:1px solid #e7ebf0}
.worksheet-calendar-day.is-outside{background:#f8f9fb}
.worksheet-calendar-day>time{align-self:flex-start;min-width:23px;padding:3px 5px;border-radius:99px;color:#56677f;font-size:11px;font-weight:700;text-align:center}
.worksheet-calendar-day.is-today>time{background:#2877ea;color:#fff}
.worksheet-calendar-event{display:grid;gap:2px;width:100%;min-width:0;padding:5px 6px;border:0;border-left:3px solid #69b94c;border-radius:4px;background:#eef7e9;color:#34465b;text-align:left;cursor:pointer}
.worksheet-calendar-event>b,.worksheet-calendar-event>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.worksheet-calendar-event>b{font-size:10px}.worksheet-calendar-event>small{color:#748198;font-size:9px}
.worksheet-calendar-more{color:#718096;font-size:10px}
@media(max-width:760px){
  .worksheet-table-scroll{overflow:visible}
  .worksheet-table{width:100%;min-width:0;overflow:visible;border:0;background:transparent}
  .worksheet-table>.table-head{display:none}
  .worksheet-table>.table-row{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title check" "course course" "level due" "student student" "submission round" "actions actions";gap:9px 12px;min-height:0;margin:8px 0;padding:13px;border:1px solid #e0e5eb;border-radius:11px;background:#fff;box-shadow:0 2px 8px rgba(29,55,94,.035)}
  .worksheet-table .table-row>.worksheet-select-cell{grid-area:check;justify-self:end;align-self:start}
  .worksheet-table .table-row>.titlecell{grid-area:title;min-width:0;padding-right:6px}
  .worksheet-table .table-row>.worksheet-course{grid-area:course}
  .worksheet-table .table-row>span:nth-child(4){grid-area:level}
  .worksheet-table .table-row>.worksheet-due{grid-area:due}
  .worksheet-table .table-row>.worksheet-student-cell{grid-area:student;display:grid;grid-template-columns:minmax(0,1fr) minmax(104px,42%);justify-content:stretch;padding-top:8px;border-top:1px solid #edf0f4}
  .worksheet-table .table-row>span.link{grid-area:submission}
  .worksheet-table .table-row>span:nth-child(8){grid-area:round}
  .worksheet-table .table-row>.worksheet-actions{grid-area:actions;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding-top:8px;border-top:1px solid #edf0f4}
  .worksheet-table .worksheet-course::before,.worksheet-table .table-row>span:nth-child(4)::before,.worksheet-table .worksheet-due::before,.worksheet-table .worksheet-student-cell::before,.worksheet-table .table-row>span.link::before,.worksheet-table .table-row>span:nth-child(8)::before{display:block;margin-bottom:3px;color:#8995a4;font-size:10px;font-weight:650}
  .worksheet-table .worksheet-course::before{content:"과정"}
  .worksheet-table .table-row>span:nth-child(4)::before{content:"난이도"}
  .worksheet-table .worksheet-due::before{content:"제출 기간"}
  .worksheet-table .worksheet-student-cell::before{content:"학생";grid-column:1/-1}
  .worksheet-table .table-row>span.link::before{content:"제출"}
  .worksheet-table .table-row>span:nth-child(8)::before{content:"회차"}
  .worksheet-table .worksheet-student-cell strong{justify-self:start;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
  .worksheet-table .worksheet-student-cell select{width:100%;max-width:100%;height:32px}
  .worksheet-table .worksheet-actions>.outline{width:100%;min-height:38px}
  .worksheet-calendar-view{padding:10px}
  .worksheet-calendar-month-nav{gap:5px}.worksheet-calendar-month-nav>b{min-width:88px;font-size:14px}
  .worksheet-calendar-day{min-height:72px;gap:2px;padding:3px}
  .worksheet-calendar-day>time{min-width:20px;padding:2px;font-size:10px}
  .worksheet-calendar-event{padding:4px 3px;border-left-width:2px}
  .worksheet-calendar-event>b{font-size:9px}.worksheet-calendar-event>small{display:none}
}

/* Keep all grading panes inside the viewport on phones; override the more specific desktop grid. */
.worksheet-ai-profile-state{margin:12px 10px;padding:14px 16px;border:1px solid #c9dcff;border-radius:12px;background:#f4f8ff;color:#34445e}
.worksheet-ai-profile-state b{display:block;font-size:14px}.worksheet-ai-profile-state p{margin:6px 0 0;color:#63748d;font-size:13px;line-height:1.55}
.worksheet-ai-profile-state.error{border-color:#f1c9c9;background:#fff7f7}.worksheet-ai-profile-state button{margin-top:10px}
@media(max-width:760px){
  .worksheet-grading-grid:not(.no-assigned-students){grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(88px,auto) minmax(176px,30%) minmax(0,1fr);overflow:auto}
  .worksheet-grading-grid:not(.no-assigned-students)>.grading-roster-pane{grid-column:1;grid-row:1;min-height:0;border-right:0;border-bottom:1px solid #e2e5e9}
  .worksheet-grading-grid:not(.no-assigned-students)>.grading-answer-pane{grid-column:1;grid-row:2;min-height:0;border-right:0;border-bottom:1px solid #e2e5e9}
  .worksheet-grading-grid:not(.no-assigned-students)>.grading-question-pane{grid-column:1;grid-row:3;min-height:240px;border-right:0}
  .worksheet-grading-grid:not(.no-assigned-students)>.worksheet-review-scratch{display:none!important}
}

/* Keep every worksheet question on the same full-width track.  The browser's
   implicit grid sizing could shrink text-only cards to their content width,
   while visual or longer-answer cards used a different width. */
.worksheet-grading-grid .grading-question-preview-list{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;justify-items:stretch;width:100%;min-width:0;box-sizing:border-box}
.worksheet-grading-grid .worksheet-review-question-card{display:block;width:100%;min-width:0;max-width:1100px;justify-self:center;box-sizing:border-box}
.worksheet-grading-grid.no-assigned-students>.grading-question-pane,
.worksheet-grading-grid.no-assigned-students .grading-question-preview-list{width:100%;min-width:0}
.worksheet-grading-grid.no-assigned-students .worksheet-review-question-card{display:block;width:100%;max-width:1100px;justify-self:center}
@media(max-width:760px){
  .worksheet-grading-grid .worksheet-review-question-card{max-width:none}
}

/* Final grading-preview scale.  Unassigned workbooks have a wide question
   pane, but the reference grading sheet keeps each problem at a textbook
   reading width.  Graphs use a fixed landscape frame so the axes do not
   become oversized or vertically distorted. */
.worksheet-grading-grid.no-assigned-students .worksheet-review-question-card{width:min(100%,860px);max-width:860px;padding:18px 22px}
.worksheet-grading-grid .worksheet-review-question-card .grading-preview-visual .qb-graph-wrap{width:min(100%,360px)!important;max-width:360px!important;margin:6px auto 10px!important;padding:0!important;box-sizing:border-box}
.worksheet-grading-grid .worksheet-review-question-card .grading-preview-visual .qb-graph{display:block;width:100%!important;height:auto!important;min-height:0!important;max-height:260px!important;aspect-ratio:560 / 360;object-fit:contain}
.worksheet-grading-grid.no-assigned-students .worksheet-review-question-card .grading-preview-visual .qb-graph-wrap{width:min(100%,360px)!important;max-width:360px!important}

/* Matholic-aligned worksheet list: compact rows, real difficulty distribution,
   and short date/action labels.  This block intentionally comes last so the
   list remains deterministic despite the older compatibility overrides above. */
body.worksheet-list-matholic .worksheet-toolbar{align-items:center;gap:10px}
body.worksheet-list-matholic .worksheet-table .table-head,
body.worksheet-list-matholic .worksheet-table .table-row{grid-template-columns:36px minmax(340px,2.35fr) minmax(132px,.9fr) minmax(150px,1fr) minmax(120px,.78fr) minmax(116px,.78fr) minmax(76px,.5fr) minmax(58px,.4fr) minmax(146px,.86fr);gap:10px}
body.worksheet-list-matholic .worksheet-table .table-head{min-height:54px;padding-top:0;padding-bottom:0}
body.worksheet-list-matholic .worksheet-table .table-row{min-height:100px;padding-top:15px;padding-bottom:15px}
body.worksheet-list-matholic .worksheet-table .titlecell>b{font-size:16px;line-height:1.35}
body.worksheet-list-matholic .worksheet-table .titlecell>small{margin-top:6px;line-height:1.25}
body.worksheet-list-matholic .worksheet-table .worksheet-due{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap;font-variant-numeric:tabular-nums}
body.worksheet-list-matholic .worksheet-table .worksheet-due>b{font-size:14px;font-weight:700;color:#3c4b60}
body.worksheet-list-matholic .worksheet-table .worksheet-due>small{font-size:13px;color:#65748a}
body.worksheet-list-matholic .worksheet-table .worksheet-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
body.worksheet-list-matholic .worksheet-table .worksheet-actions>.outline{min-width:66px;padding:8px 10px;white-space:nowrap}
body.worksheet-list-matholic .worksheet-level-summary{display:grid;gap:6px;width:100%;min-width:0}
body.worksheet-list-matholic .worksheet-level-bar{display:flex;flex:0 0 auto;overflow:hidden;width:100%!important;height:10px;border-radius:999px;background:#e5e8ec}
body.worksheet-list-matholic .worksheet-level-bar>i{display:block;min-width:4px;height:100%}
body.worksheet-list-matholic .worksheet-level-bar>.concept{background:#d5d7da}
body.worksheet-list-matholic .worksheet-level-bar>.basic{background:#a8df52}
body.worksheet-list-matholic .worksheet-level-bar>.practice{background:#ffb35d}
body.worksheet-list-matholic .worksheet-level-bar>.advanced{background:#f57b74}
body.worksheet-list-matholic .worksheet-level-counts{display:flex;gap:5px 8px;flex-wrap:wrap;color:#6c7582;font-size:11px;line-height:1.2;white-space:nowrap}
body.worksheet-list-matholic .worksheet-level-counts>.concept{color:#878d96}
body.worksheet-list-matholic .worksheet-level-counts>.basic{color:#58a846}
body.worksheet-list-matholic .worksheet-level-counts>.practice{color:#ed8a2e}
body.worksheet-list-matholic .worksheet-level-counts>.advanced{color:#ef635c}
@media(max-width:1120px){
  body.worksheet-list-matholic .worksheet-table .table-head,
  body.worksheet-list-matholic .worksheet-table .table-row{grid-template-columns:32px minmax(290px,2fr) minmax(118px,.82fr) minmax(130px,.9fr) minmax(112px,.74fr) minmax(105px,.72fr) minmax(70px,.46fr) minmax(54px,.36fr) minmax(128px,.8fr);gap:8px}
  body.worksheet-list-matholic .worksheet-level-counts{font-size:10px;gap:3px 6px}
}
@media(max-width:760px){
  body.worksheet-list-matholic .worksheet-table .table-row{min-height:0}
  body.worksheet-list-matholic .worksheet-table .worksheet-due{align-items:flex-end}
  body.worksheet-list-matholic .worksheet-table .worksheet-level-summary{max-width:220px}
}

/* Keep the teacher list usable on laptop-width viewports.  The compact
   Matholic columns remain readable, but they must be allowed to reflow before
   the management buttons are pushed outside the viewport. */
@media(min-width:761px) and (max-width:1500px){
  body.worksheet-list-matholic .worksheet-toolbar{
    flex-wrap:wrap;
    align-content:flex-start;
    row-gap:8px;
  }
  body.worksheet-list-matholic .worksheet-toolbar .worksheet-extra-filter:not(.worksheet-date-filter){
    flex:0 1 136px;
    min-width:120px;
  }
  body.worksheet-list-matholic .worksheet-toolbar .worksheet-date-filter{
    flex:1 1 280px;
    min-width:260px;
  }
  body.worksheet-list-matholic .worksheet-toolbar .worksheet-search{
    flex:1 1 220px;
    min-width:190px;
  }
  body.worksheet-list-matholic .worksheet-toolbar>select{
    flex:0 1 138px;
    min-width:124px;
  }
  body.worksheet-list-matholic .worksheet-toolbar .worksheet-result-count{margin-left:0}

  body.worksheet-list-matholic .worksheet-table-scroll{
    max-width:100%;
    overflow-x:auto;
    overflow-y:visible;
  }
  body.worksheet-list-matholic .worksheet-table{
    min-width:0;
    overflow:visible;
  }
  body.worksheet-list-matholic .worksheet-table .table-head,
  body.worksheet-list-matholic .worksheet-table .table-row{
    grid-template-columns:30px minmax(250px,1.9fr) minmax(108px,.82fr) minmax(110px,.86fr) minmax(112px,.8fr) minmax(105px,.78fr) minmax(72px,.5fr) minmax(52px,.38fr) minmax(130px,.9fr);
    gap:8px;
    padding-right:12px;
    padding-left:12px;
  }
  body.worksheet-list-matholic .worksheet-table .worksheet-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:6px;
    min-width:0;
    overflow:visible;
  }
  body.worksheet-list-matholic .worksheet-table .worksheet-actions>.outline{
    flex:0 1 auto;
    min-width:0;
    padding-right:8px;
    padding-left:8px;
  }
}
/* Review board has five vertical bands: toolbar, progress, notice, answer list, footer. */
.review-console-center{grid-template-rows:auto auto auto minmax(0,1fr) auto}

/* The question is the teacher's primary review surface. Keep student context
   on the left, enlarge the question inspector in the middle, and move the
   compact marking sheet to the right. */
.review-console-layout{grid-template-columns:240px minmax(560px,1fr) minmax(310px,360px);grid-template-areas:"sidebar inspector board"}
.review-console-sidebar{grid-area:sidebar}
.review-console-inspector{grid-area:inspector}
.review-console-center{grid-area:board}
.review-inspector-body{padding:20px 24px 28px}
.review-inspector-body .worksheet-review-question-card{padding:20px 22px}
.review-inspector-body .grading-preview-prompt{font-size:19px;line-height:1.85}
.review-inspector-body .grading-preview-options{font-size:15px;line-height:1.9;gap:8px 34px}
.review-inspector-body .worksheet-review-answer-line{font-size:13px}
.review-inspector-body .review-inspector-lecture h3{font-size:20px}
.review-inspector-body .grading-preview-visual .qb-graph-wrap{width:min(100%,560px);max-width:560px}
@media(max-width:1100px){.review-console-layout{grid-template-columns:190px minmax(430px,1fr) minmax(280px,34%);grid-template-areas:"sidebar inspector board"}}
@media(max-width:760px){.review-console-layout{grid-template-columns:1fr;grid-template-rows:auto minmax(300px,1fr) minmax(360px,1fr);grid-template-areas:"sidebar" "board" "inspector"}.review-inspector-body{padding:14px}.review-inspector-body .worksheet-review-question-card{padding:16px}.review-inspector-body .grading-preview-prompt{font-size:16px}}

/* Keep the active study question beside the question index on desktop.
   Earlier worksheet rules made the index span the full sheet, pushing the
   actual problem below the fold. */
@media(min-width:761px){
  body:has(.study-sheet) .study-question-nav{grid-column:auto;width:100%;min-width:0}
  body:has(.study-sheet) .study-question-stage{grid-column:auto;width:100%;min-width:0}
}
