:root{font-family:system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;color:#182b3a;background:#f4f7fa;line-height:1.65;font-size:16px;color-scheme:light}*{box-sizing:border-box}body{margin:0}header{background:white;border-bottom:1px solid #dce5ed;padding:18px max(20px,calc((100vw - 1160px)/2));display:flex;gap:24px;align-items:center;justify-content:space-between}header a{color:#274c6c;text-decoration:none}nav{display:flex;gap:18px;flex-wrap:wrap}main{max-width:1160px;margin:32px auto;padding:0 20px 70px}h1{font-size:30px;line-height:1.35;margin:0 0 12px}h2{font-size:23px;line-height:1.5}h3{font-size:18px}p{white-space:pre-wrap;overflow-wrap:anywhere}button,input,textarea,select{font:inherit}button,.button{border:1px solid #a9bccd;border-radius:8px;padding:9px 17px;background:#fff;color:#18364d;cursor:pointer;text-decoration:none;display:inline-block}button:hover{background:#edf4fa}button.primary{background:#175b85;color:#fff;border-color:#175b85}button.danger{color:#9f2424;border-color:#d3a4a4}button:disabled{cursor:wait;opacity:.6}input,textarea,select{border:1px solid #b5c6d3;border-radius:6px;background:white;color:inherit;padding:9px 11px;max-width:100%}input:not([type=checkbox]):not([type=radio]),textarea,select{width:100%}textarea{min-height:110px;resize:vertical}label{display:block;margin:13px 0 7px;font-weight:600}label:has(input[type=checkbox]),label:has(input[type=radio]){font-weight:400;display:flex;gap:12px;align-items:flex-start}input[type=checkbox],input[type=radio]{margin-top:7px;min-width:18px;min-height:18px}fieldset{border:1px solid #d4e0e9;border-radius:10px;padding:16px 20px;margin:20px 0;min-width:0}legend{font-weight:650;padding:0 8px;max-width:100%;overflow-wrap:anywhere}.card{background:white;border:1px solid #dce5ed;border-radius:12px;padding:24px;margin:18px 0;box-shadow:0 2px 7px #152d4a04}.muted{color:#576d7c;font-size:14px}.actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin:18px 0}.grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.question-head{display:flex;align-items:center;gap:14px;justify-content:space-between}.question-head select{max-width:220px}.question-head input{max-width:100px}.question-head label{margin:0}.notice{background:#fff5d8;border-left:4px solid #d3a534;padding:14px 18px;white-space:pre-wrap;overflow-wrap:anywhere}.success{background:#e9f5ee;border-color:#358157}.error{background:#fff0ee;border-color:#b14e42}.badge{background:#eaf0f5;border-radius:6px;padding:3px 8px;font-size:13px;margin-right:8px}table{width:100%;border-collapse:collapse}td,th{text-align:left;vertical-align:top;border-bottom:1px solid #dce5ed;padding:12px 8px;overflow-wrap:anywhere}th{color:#4a6174;font-size:14px}.table-scroll{overflow:auto}.sticky{position:sticky;top:0;z-index:2;background:#f4f7faf2;padding:12px 0;border-bottom:1px solid #dce5ed;display:flex;justify-content:space-between;gap:16px}.timer{font-variant-numeric:tabular-nums;color:#86451c;font-weight:650}.answer{white-space:pre-wrap;background:#f4f7fa;padding:16px;border-radius:8px;overflow-wrap:anywhere}dialog{border:1px solid #c3d2df;border-radius:12px;max-width:540px;padding:25px}dialog::backdrop{background:#152b3d77}.hidden,[hidden]{display:none!important}:focus-visible{outline:3px solid #d69b1d;outline-offset:3px}.options-editor .grid{grid-template-columns:34px 1fr;gap:10px;align-items:center}.options-editor input[type=checkbox],.options-editor input[type=radio]{margin:0}code{overflow-wrap:anywhere}a{color:#15577f}#private-area{min-width:0}@media(max-width:700px){header{padding:15px 20px;display:block}nav{margin-top:10px;gap:12px}main{margin-top:22px;padding:0 14px 48px}.card{padding:18px}.grid{grid-template-columns:1fr;gap:0}.question-head{flex-wrap:wrap}h1{font-size:25px}.actions button{flex-grow:1}.sticky{font-size:14px;flex-wrap:wrap}td,th{min-width:110px}fieldset{padding:14px}header strong{font-size:18px}}

#question-summary{padding:14px 18px;background:#fff;border:1px solid #c9d8e3;border-radius:8px;cursor:pointer;font-weight:600}#question-details{margin:18px 0}

/* Public site links stay usable before a teacher or student signs in. */
header{flex-wrap:wrap}header .site-home{color:inherit;text-decoration:none;font-size:18px;font-weight:700;white-space:nowrap}header .site-switcher{display:flex;gap:18px;align-items:center;font-size:14px}header nav{flex-wrap:wrap}header nav a{white-space:nowrap}header .site-switcher a{display:inline-flex;align-items:center;min-height:40px}
@media(max-width:620px){header{gap:8px 16px}header .site-home{font-size:17px}header nav{gap:8px 14px;font-size:13px}}

#chapter-template-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.chapter-template{border-top:1px solid #dce5ed;padding:10px 0 16px;min-width:0}.chapter-template h3{margin:10px 0}.chapter-template p{margin:8px 0}@media(max-width:700px){#chapter-template-list{grid-template-columns:1fr}}
