.product-form{color:var(--ink);max-width:none;margin:0;font-size:14px}
.product-form .product-back{margin:0 0 12px;padding:7px 10px;background:transparent;border-color:transparent;color:#234d79;min-height:36px}
.product-form .product-form-heading{margin-bottom:18px}
.product-form .product-form-heading h1{font-size:27px;line-height:1.35;margin:0 0 6px;color:var(--ink)}
.product-form .product-form-heading p{margin:0;color:var(--muted);font-size:14px;line-height:1.6}
.product-form #task-form{overflow:visible;box-shadow:none}
.product-form #task-form{max-width:1180px}
.product-form .product-form-grid{display:block}
.product-form .form-section{padding:18px 24px;min-width:0}
.product-form .form-section+.form-section{border-top:1px solid var(--line);border-left:0;background:#fff;border-radius:0}
.product-form .form-stack{gap:12px;align-content:start}
.product-form .product-section-heading{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:1px}
.product-form .product-section-heading h2{font-size:17px;margin:0;color:var(--ink)}
.product-form .product-section-heading>span{font-size:14px;color:var(--muted)}
.product-form .plan-import-tools{display:flex;gap:12px;align-items:flex-end;padding:12px 16px;margin-top:10px;background:#f7f9fb;border-radius:var(--radius)}
.product-form .form-secondary-tools{display:flex;align-items:center;flex-wrap:wrap;gap:6px 22px}
.product-form .description-add:has([hidden]){display:none}
.product-form .description-field-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.product-form .description-field-heading .disclosure-toggle{min-height:24px;padding:0;font-size:14px}
.product-form .disclosure-toggle[aria-expanded="true"]>.icon{transform:rotate(180deg)}
.product-form .disclosure-toggle{padding:3px 0;min-height:30px;border-color:transparent;background:transparent;color:var(--blue)}
.product-form .disclosure-toggle:not(:disabled):hover{background:transparent;border-color:transparent;text-decoration:underline}
.product-form .plan-name-section{padding:20px 24px;border-top:1px solid var(--line);scroll-margin-bottom:125px}
.product-form .plan-name-section>.form-field{max-width:520px}
.product-form .plan-import-tools .form-field{flex:1}
.product-form .form-field{gap:5px;font-size:14px}
.product-form .field-input,.product-form .field-select{min-height:40px;font-size:14px;color:var(--ink);padding:9px 12px}
.product-form .form-field textarea{min-height:76px;max-height:300px;font-size:14px;line-height:1.55;padding:9px 11px}
.product-form .form-field small,.product-form .field-help{font-size:14px;color:var(--muted);line-height:1.6;margin:0}
.product-form .field-error:empty{display:none}
.product-form .form-field .field-error{color:#a13228}
.product-form .invalid-field input,.product-form .invalid-field select{border-color:#b44d40}
.product-form .form-inline{gap:9px;flex-wrap:nowrap}
.product-form .form-inline .form-field{min-width:0}
.product-form .language-options{gap:10px 18px}
.product-form .check-row{color:#354b65;gap:7px}
.product-form .check-row input{width:17px;height:17px;flex:none}
.product-form #selected-problems{--selection-columns:24px minmax(240px,1fr) 126px 155px;--selection-gap:16px}
.product-form .selected-problem,.product-form .selected-problem-heading{display:grid;grid-template-columns:var(--selection-columns);gap:var(--selection-gap);align-items:center}
.product-form .selected-problem{padding:10px 0;border-bottom:1px solid #e1e7ee}
.product-form .selected-problem-heading{font-size:14px;color:var(--muted);padding:0 0 3px}
.product-form .points-column{text-align:center}
.product-form .selection-number{color:var(--muted);font-size:14px}
.product-form .selection-title{min-width:0}
.product-form .selection-title strong{font-size:14px;line-height:1.55;font-weight:500;overflow-wrap:anywhere}
.product-form .points-field{gap:3px}
.product-form .points-field>.points-label{display:none;font-size:14px;color:var(--muted)}
.product-form .points-control{display:flex;align-items:center;gap:0}
.product-form .points-control .btn{min-height:33px;height:33px;width:29px;padding:3px;flex:none;border-radius:5px 0 0 5px;font-size:17px}
.product-form .points-control .btn:last-child{border-radius:0 5px 5px 0}
.product-form .points-control input{appearance:textfield;-moz-appearance:textfield;border-radius:0;height:33px;min-height:33px;text-align:center;padding:5px 3px;width:64px;border-left:0;border-right:0}
.product-form .points-control input::-webkit-outer-spin-button,.product-form .points-control input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.product-form .selection-actions{display:flex;flex-wrap:nowrap;gap:8px;justify-content:flex-end}
.product-form .selection-menu>summary{min-height:33px;padding:5px 7px;gap:5px}
.product-form .selection-menu>div{min-width:140px}
.product-form .selection-actions .btn{min-height:33px;padding:5px 7px;font-size:14px}
.product-form .selected-total{margin:9px 0 0;text-align:right;color:#24466e;font-size:14px}
.product-form .selected-empty{padding:12px;background:#f7f9fc;border-radius:5px}
.product-form .time-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.product-form .late-deadline{display:grid;gap:4px;padding:10px 12px;border:1px solid #dce5f0;background:#f0f5fb;border-radius:6px;margin-top:6px;color:#23466e}
.product-form .late-deadline>span{font-size:14px;color:#536b85}
.product-form .late-deadline output{font-size:14px;line-height:1.5;font-weight:500}
.product-form #late-settings{display:grid;gap:8px}
.product-form [hidden]{display:none!important}
.product-form .form-rules{color:var(--muted);font-size:14px;line-height:1.7}
.product-form .form-rules summary{cursor:pointer;width:fit-content}
.product-form .form-rules p{margin:7px 0 0}
.product-form .form-actions{position:sticky;bottom:0;min-height:76px;padding:18px 24px;background:#fff;border-top:1px solid #dbe3ed;border-radius:0 0 8px 8px;gap:10px;box-shadow:none;z-index:6}
.product-form .form-actions .field-help{max-width:none;flex:1;min-width:140px}
.product-form .form-actions .btn{min-height:40px;flex:none}
.product-form .form-actions .btn.primary{background:var(--blue);border-color:var(--blue)}
.product-form #task-form>.form-error,.product-form #form-lock-notice{margin:16px 20px 0}
.product-form :is(input,select,textarea,button,a,summary){scroll-margin-top:85px;scroll-margin-bottom:115px}
.product-form :is(button,a,select,input,textarea,summary):focus-visible{outline:2px solid #487daf;outline-offset:3px}
.product-form .btn{transition:background-color 150ms,border-color 150ms,box-shadow 150ms}
.product-form .btn:disabled{opacity:1;cursor:not-allowed}
.product-form .btn:not(:disabled):hover{border-color:#9db4ce;background:#edf3fa}
.product-form .btn.primary:not(:disabled):hover{background:var(--blue-hover)}
.product-form .btn:not(:disabled):active{box-shadow:inset 0 1px 3px #1b365527}
@media(max-width:1220px){.product-form .form-section{padding:18px 20px}.product-form #selected-problems{--selection-columns:18px minmax(180px,1fr) 126px 155px;--selection-gap:12px}.product-form .product-form-heading h1{font-size:25px}}
@media(max-width:900px){.product-form #selected-problems{--selection-columns:18px minmax(100px,1fr) 126px}.product-form .selected-problem-heading{display:none}.product-form .points-field>.points-label{display:block}.product-form .selection-actions{grid-column:2/-1}.product-form .form-actions{position:static}.product-form :is(input,select,textarea,button,a,summary){scroll-margin-bottom:24px}}
@media(max-width:600px){.product-form .form-section{padding:16px}.product-form .plan-import-tools{flex-wrap:wrap}.product-form .plan-import-tools .form-field{flex-basis:100%}.product-form .time-inputs{grid-template-columns:1fr}.product-form #selected-problems{--selection-columns:18px minmax(0,1fr) 126px}.product-form .selection-actions{grid-column:2/-1}.product-form .form-actions{padding:12px 16px}.product-form .form-actions .field-help{flex-basis:100%}.product-form .form-actions .btn{flex:1}.product-form .form-inline{flex-wrap:wrap}.product-form .form-inline .form-field{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){.product-form *{transition:none!important;scroll-behavior:auto!important}}

/* Shared existing edit forms; query and login forms keep their own layouts. */
.product-common-form{color:var(--ink);font-size:14px;overflow:visible}
.product-common-form .form-section{padding:20px}
.product-common-form .form-section h2{font-size:17px;color:var(--ink);margin-bottom:15px}
.product-common-form .form-stack{gap:20px}
.product-common-form .form-grid{gap:16px 20px}
.product-common-form .form-field{font-size:14px;color:var(--ink);gap:6px}
.product-common-form .field-input,.product-common-form .field-select,.product-common-form textarea{color:var(--ink);font-size:14px;min-height:40px}
.product-common-form .field-help,.product-common-form .form-field small{font-size:14px;line-height:1.65;color:var(--muted)}
.product-common-form .form-field .field-error{color:#a13228}
.product-common-form .field-error:empty{display:none}
.product-common-form textarea{line-height:1.65;resize:vertical}
.product-common-form .form-actions{padding:18px 24px;background:#fff;gap:10px;min-height:70px;border-top:1px solid #dbe3ed;box-shadow:none}
.product-common-form .form-actions .field-help{max-width:none;flex:1;min-width:180px}
.product-common-form :is(input,select,textarea,button,a,summary){scroll-margin-top:85px;scroll-margin-bottom:115px}
.product-common-form :is(input,select,textarea,button,a,summary):focus-visible{outline:2px solid #487daf;outline-offset:3px}
.product-common-form .test-row{gap:12px;padding:15px 0}
.product-common-form .test-row .form-field{font-size:14px}
.product-common-form .test-number{color:#526980;font-size:14px}
.problem-author-form [name="description"]{min-height:120px}
.problem-author-form .form-field textarea{min-height:85px}
.problem-author-form .form-actions{position:sticky;bottom:0;z-index:6}
.product-form .selection-actions [data-act="snapshot-preview"]{color:#234d79;background:#f2f6fb;border-color:#c8d7e7}
.snapshot-preview-dialog{width:min(880px,calc(100vw - 48px));max-height:86vh;padding:0;border:1px solid #d6e0eb;border-radius:10px;color:var(--ink)}
.snapshot-preview-dialog .dialog-head{position:sticky;top:0;z-index:1;background:#fff;border-bottom:1px solid #e0e6ee;padding:17px 22px}
.snapshot-preview-dialog .dialog-body{padding:20px}
.snapshot-preview-dialog .snapshot-preview-title{font-size:20px;line-height:1.5;margin:0 0 16px;color:var(--ink);overflow-wrap:anywhere}
.snapshot-preview-dialog .problem-statement{box-shadow:none;border:0;border-radius:0;margin:0}
.snapshot-preview-dialog .problem-statement>.panel-head{display:none}
.snapshot-preview-dialog .problem-statement>.panel-body{padding:0}
.snapshot-preview-dialog .statement-section{margin-bottom:20px}
.snapshot-preview-dialog .statement-section h3{font-size:15px;color:#344c68}
.snapshot-preview-dialog .statement-section p{font-size:14px;color:#3d526c;line-height:1.8}
.snapshot-preview-dialog .sample-label{font-size:14px;color:#52677e}
.snapshot-preview-dialog .sample-box pre{font-size:14px;color:#2c435f}
.snapshot-preview-dialog :is(button,a,summary):focus-visible{outline:2px solid #487daf;outline-offset:3px}
@media(max-width:980px){.product-common-form .form-actions{position:static}.product-common-form :is(input,select,textarea,button,a,summary){scroll-margin-bottom:24px}}
@media(max-width:600px){.product-common-form .form-section{padding:16px}.product-common-form .form-grid{grid-template-columns:1fr}.product-common-form .form-actions{padding:12px 16px}.product-common-form .form-actions .field-help{flex-basis:100%}.product-common-form .test-row{grid-template-columns:22px 1fr}.product-common-form .test-row .form-field{grid-column:2}.product-common-form .test-row .btn{grid-column:2;justify-self:end}.snapshot-preview-dialog{width:calc(100vw - 24px)}.snapshot-preview-dialog .dialog-head,.snapshot-preview-dialog .dialog-body{padding:16px}.snapshot-preview-dialog .sample-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.product-common-form *,.snapshot-preview-dialog *{transition:none!important;scroll-behavior:auto!important}}

/* Continuous reading order: content, questions, then this task's schedule. */
.product-form .product-section-heading{padding-bottom:0;margin-bottom:0;border-bottom:0}
.product-form .product-section-heading h2{font-size:18px}
.product-form .selection-title strong{font-size:15px;color:var(--ink);font-weight:600}
.product-form .selected-total{color:var(--ink);font-weight:600}
.product-common-form{max-width:1180px}
.product-common-form#class-settings{max-width:900px}
.product-common-form .form-section h2{font-size:18px}
.product-common-form .test-number{font-size:14px;color:var(--muted)}

.public-sample+.public-sample{margin-top:20px}.public-sample h4{font-size:14px;color:#3a506c;font-weight:600;margin:0 0 10px}.teaching-app .public-sample .sample-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.teaching-app .public-sample .sample-box pre{white-space:pre;overflow:auto;min-height:48px;max-width:100%;tab-size:4}.public-samples-form{gap:10px}.public-samples-form>.section-actions{margin:0}.public-samples-form>.field-help{margin:0}.sample-row{min-width:0;padding:16px 0;border-bottom:1px solid var(--line)}.sample-row:last-child{border-bottom:0}.sample-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.sample-row-head h3{font-size:14px;font-weight:600;color:#3a506c;margin:0}.sample-row .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sample-row .form-field{font-size:13px}.problem-author-form .sample-row .code-field{min-height:110px}@media(max-width:740px){.sample-row .form-grid,.teaching-app .public-sample .sample-grid{grid-template-columns:minmax(0,1fr)}}
.problem-picker-dialog{width:min(840px,calc(100vw - 40px));max-height:88vh;padding:0}
.problem-picker-dialog form{display:flex;flex-direction:column;max-height:calc(88vh - 68px)}
.problem-picker-dialog .picker-body{display:flex;flex-direction:column;min-height:0;gap:16px;padding:20px 24px}
.picker-filters{display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:16px}
.picker-filters .form-field{margin:0}
.picker-rows{overflow:auto;min-height:140px;max-height:52vh;border:1px solid #dce3ec;border-radius:8px;overscroll-behavior:contain}
.picker-row{display:flex;align-items:flex-start;gap:12px;padding:12px 16px;border-bottom:1px solid #e8edf3;cursor:pointer}
.picker-row:last-child{border-bottom:0}
.picker-row:hover{background:#f4f7fb}
.picker-row:has(input:checked){background:#eef4fc}
.picker-row:focus-within{outline:2px solid #245d9b;outline-offset:-2px}
.picker-row input{flex:0 0 auto;width:17px;height:17px;margin-top:3px;accent-color:#245d9b}
.picker-row-content{min-width:0;display:grid;gap:6px}
.picker-row-title{display:flex;gap:10px;align-items:baseline;overflow-wrap:anywhere;font-weight:600}
.picker-code{font-variant-numeric:tabular-nums;color:#245d9b;white-space:nowrap}
.picker-row-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:12px}
.picker-source{color:#65778d}
.picker-added{color:#4d637c;font-weight:600}
.picker-row.already-added{background:#f7f8fa;color:#728094;cursor:default}
.picker-empty{padding:32px 20px;text-align:center;color:#65778d}
.problem-picker-dialog .dialog-actions{flex-shrink:0;border-top:1px solid #dce3ec;padding:16px 24px;background:#fff}
.problem-picker-dialog #picker-selected{margin-right:auto}
@media(max-width:720px){.picker-filters{grid-template-columns:1fr}.problem-picker-dialog .picker-body{padding:16px}.problem-picker-dialog .dialog-actions{padding:14px 16px}.picker-rows{max-height:44vh}}
/* Teacher instructions remain brief; the complete machine prompt scrolls inside. */
.problem-file-dialog{width:min(720px,calc(100vw - 40px))}.problem-file-help{line-height:1.75}.problem-file-help h3{margin:18px 0 8px}.problem-file-help ol{padding-left:24px}.problem-file-help li+li{margin-top:8px}.problem-file-emphasis{padding:12px 14px;background:#edf3fa;border-left:3px solid #234e7e;border-radius:4px;color:#173e68}.problem-ai-details{margin-top:16px}.problem-ai-details summary{cursor:pointer;color:#234e7e}.problem-ai-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto;margin:12px 0 0;padding:12px;background:#f5f7fa;border:1px solid #e2e8f0;border-radius:4px;font:12px/1.65 Consolas,monospace}.problem-ai-status:empty{display:none}.problem-ai-status{font-size:13px;color:#a83332}.problem-file-dialog .dialog-actions{justify-content:flex-start}
