*{box-sizing:border-box}
:root{color-scheme:light;--ink:#19382e;--muted:#53685e;--green:#154e3c;--teal:#0e4a3c;--edge:#d7dfd6;--page:#f4f5ee;--white:#fffefa;--gold:#e4c781;--a:#306b53;--b:#589383;--c:#c9a653;--d:#8d7a9e}
body{margin:0;background:var(--page);color:var(--ink);font:15px/1.5 "Inter","Segoe UI",Arial,sans-serif;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}button,a,summary,input[type=checkbox]{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.55;cursor:default}button,select,input,textarea{touch-action:manipulation}
:focus-visible{outline:3px solid #aa7d27;outline-offset:3px}a{color:var(--green)}[hidden]{display:none!important}h1,h2,h3,h4,p{margin:0}
.wrap{max-width:1220px;width:calc(100% - 80px);margin-inline:auto}
.skip{position:absolute;top:-60px;left:12px;background:white;padding:8px 14px;z-index:5}.skip:focus{top:8px}
.masthead{background:#153f33;color:white;box-shadow:0 1px 0 #103326}
.bar{height:74px;display:flex;align-items:center;gap:23px}
.brand{display:flex;align-items:center;gap:12px;font:600 27px/1.1 "DM Serif Text",Georgia,serif;letter-spacing:-1.1px;white-space:nowrap}
.brand-mark{width:38px;height:40px;display:grid;place-items:center;color:#edda9f}.brand-mark svg{width:38px;height:38px}
.brand-school{border-left:1px solid #6c8a78;padding-left:23px;font-size:13px;letter-spacing:.018em;color:#dfebdf}
.bar-actions,.result-actions,.heading-group,.between{display:flex;align-items:center}.bar-actions{gap:22px;margin-left:auto}.bar-link{color:#f1f4ed;background:none;border:0;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-size:13px;padding:8px 0;font-weight:600}.bar-link:hover{text-decoration:underline;text-underline-offset:4px}
i[data-icon]{width:19px;height:19px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;font-style:normal}i[data-icon] svg{width:100%;height:100%}
.intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:35px 0 24px}.intro h1{font:500 clamp(38px,4.3vw,57px)/1.04 "DM Serif Text",Georgia,serif;letter-spacing:-2.8px;color:#183c2e}.title-dot{color:#b59046}.intro p{margin-top:10px;color:var(--muted);font-size:15px}
.work-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(288px,.445fr);gap:24px;align-items:start}.editor{display:grid;gap:17px}.panel,.summary-card{border:1px solid var(--edge);border-radius:12px;background:var(--white);box-shadow:0 2px 4px #153e2c05}
.panel{padding:23px 26px 22px}.section-heading,.heading-group{display:flex;align-items:center;gap:11px}.between{justify-content:space-between}.section-icon{width:31px;height:31px;display:grid;place-items:center;color:#31604c;background:#eaf1e6;border-radius:8px}.section-icon i{width:17px;height:17px}
h2{font-size:19px;font-weight:680;letter-spacing:-.45px;line-height:1.25}.section-desc{color:var(--muted);font-size:13px;line-height:1.55;margin:10px 0 15px}
.fields{display:grid;gap:14px}.fields.trio{grid-template-columns:.72fr .93fr 1.38fr;margin-top:17px}.fields.duo{grid-template-columns:1fr 1fr}.inset-top{margin-top:14px}
label,.f-label{font-size:13px;line-height:1.45;font-weight:650;display:block}label small{color:var(--muted);font-size:12px;font-weight:450}
select,input:not([type=checkbox]),textarea{width:100%;border:1px solid #c8d3c7;border-radius:7px;background:white;font-weight:440;color:#233e31;outline-color:#a87b2f}
select,input:not([type=checkbox]){min-height:42px;padding:8px 11px}select{appearance:none;padding-right:30px;background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath d='m4 7 6 6 6-6' fill='none' stroke='%234e6559' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center}
textarea{padding:9px 11px;min-height:67px;resize:vertical}label>select,label>input,label>textarea{margin-top:5px}input::placeholder,textarea::placeholder{color:#718177}
.identity{border-top:1px solid #e3e7dd;margin-top:18px;padding-top:12px}.identity summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:7px;color:var(--green);font-size:13px;font-weight:600}.identity summary i{width:15px;height:15px}.identity summary::after{content:"⌄";margin-left:2px}.identity[open] summary::after{transform:rotate(180deg)}summary::-webkit-details-marker{display:none}
.phase-pill{color:#4c5d3e;font-size:12px;background:#f0f2e5;border:1px solid #dee4d0;border-radius:30px;padding:2px 10px;font-weight:650;white-space:nowrap}
.topic-list{display:grid;gap:7px}.topic-row{display:flex;align-items:center;gap:10px;position:relative;min-height:43px;padding:9px 12px;border:1px solid #d9dfd4;background:#fff;border-radius:7px;cursor:pointer;font-weight:560;font-size:14px}.topic-row.chosen{background:#f1f6ee;border-color:#9cb59e}.topic-row input{accent-color:var(--green);width:17px;height:17px;min-width:17px;margin:0;cursor:pointer}.topic-name{flex:1}.topic-tag{font-size:11px;color:#596c5b;font-weight:500}
.topic-tools{display:flex;align-items:center;gap:19px;margin-top:12px;flex-wrap:wrap}
.topic-wrap{display:flex;gap:6px;align-items:stretch}.topic-wrap .topic-row{flex:1}.edit-custom{align-self:center}
.btn,.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;font-weight:650;border-radius:7px;text-decoration:none;line-height:1.3}.btn{padding:10px 14px;font-size:13px}.btn.primary{background:var(--green);color:#fff;border-color:var(--green)}.btn.primary:hover{background:#0e3c2d}.btn.light{background:#fffefa;border-color:#c6d2c6;color:#214b37}.btn.light:hover,.icon-button:hover{background:#edf3e9}.btn.text-btn{padding:3px 0;background:transparent;color:var(--green);border-radius:2px}.btn.text-btn:hover{text-decoration:underline;text-underline-offset:3px}.text-btn i{width:16px;height:16px}
.side-col{position:sticky;top:18px}.summary-card{overflow:hidden}.summary-head{background:#174735;color:white;display:flex;align-items:center;gap:13px;padding:21px 22px 20px;border-bottom:3px solid #d6b975}.summary-head h2{font:500 23px/1.2 "DM Serif Text",Georgia,serif;letter-spacing:-.5px}.summary-head span:not(.doc-emblem){font-size:12px;display:block;color:#dde7d7;margin-top:2px}.doc-emblem{width:40px;height:45px;display:grid;place-items:center;color:#ecdaa5;border:1px solid #87a287;border-radius:6px}.doc-emblem i{width:23px;height:23px}
.summary-body{padding:17px 22px 21px}.total-row,.summary-line,.paper-bar{display:flex;align-items:center;justify-content:space-between;gap:12px}.total{display:flex;align-items:baseline;gap:7px}.total strong{color:#193e30;font:500 51px/1.1 "DM Serif Text",Georgia,serif;letter-spacing:-3px}.total span,#sum-topics{font-size:13px;color:var(--muted)}.meter{display:flex;height:6px;gap:3px;border-radius:50px;overflow:hidden;background:#e7ebe1;margin:11px 0 15px}.meter span{height:100%;min-width:2px}.summary-lines{display:grid;gap:7px}.summary-line{font-size:13px}.summary-line span:first-child{display:flex;align-items:center;gap:9px}.dot{width:9px;height:9px;display:inline-block;border-radius:3px;flex-shrink:0}.summary-line strong{font-variant-numeric:tabular-nums}
.output-note{display:flex;gap:9px;align-items:flex-start;margin:17px 0;padding:14px 0 0;border-top:1px solid #dce2d7}.output-note>i{width:16px;height:16px;color:#648366;margin-top:2px}.output-note strong{display:block;font-size:13px;font-weight:650}.output-note p{font-size:12px;line-height:1.5;margin-top:2px;color:var(--muted)}.generate{width:100%;min-height:44px}.generate .arrow{margin-left:auto;width:16px}.generate>i:first-child{margin-right:auto;width:17px}
.quantities{display:grid;grid-template-columns:1fr 1fr;gap:9px}.quantity{display:flex;align-items:center;gap:8px;justify-content:space-between;padding:9px 10px;border:1px solid #dce2d6;border-radius:7px;background:#fff}.quantity>label{display:flex;gap:7px;align-items:center;font-weight:540;font-size:13px}.quantity input:not([type=checkbox]){width:59px;min-height:34px;margin:0;padding:4px 5px 4px 8px;text-align:center;font-weight:650}
.help,.empty{font-size:13px;color:var(--muted);line-height:1.55}.empty{background:#f4f6ee;border-radius:6px;padding:12px}.notice{border:1px solid #dac38b;background:#fff7e0;color:#65491b;font-size:13px;border-radius:7px;padding:10px 11px;margin:12px 0;white-space:pre-line}
.site-footer{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--edge);font-size:12px;color:#586c5b;margin-top:32px;padding:18px 0 25px}.site-footer b{padding:0 4px}.site-footer .text-btn{font-size:12px}
dialog{color:var(--ink);border:1px solid #c7d2c4;border-radius:12px;padding:0;width:min(720px,calc(100% - 24px));max-height:88dvh;background:var(--white);box-shadow:0 18px 80px #082c243d}dialog::backdrop{background:#132b20a3;backdrop-filter:blur(2px)}.dialog-head{position:sticky;top:0;background:var(--white);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 21px;border-bottom:1px solid var(--edge);z-index:2}.dialog-head h2{font:500 26px/1.1 "DM Serif Text",Georgia,serif;letter-spacing:-.6px}.icon-button{background:transparent;border-color:var(--edge);width:33px;height:33px;flex-shrink:0}.icon-button i{width:16px;height:16px}#dialog-body{padding:19px 21px 22px}.dlg-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:18px}.stack{display:grid;gap:13px}.card-editor,.map-card,.ref-block{background:white;border:1px solid var(--edge);border-radius:8px;padding:13px 14px}.map-card h3,.ref-block h3{font-size:16px;line-height:1.3}.map-card+.map-card,.ref-block+.ref-block{margin-top:10px}.ref-block p,.map-card p{font-size:13px;margin-top:6px}.ref-details{margin-top:9px}.ref-details summary{font-size:13px;font-weight:600;color:var(--green);cursor:pointer}.ref-quote{border-left:3px solid #aec2a8;padding-left:10px;white-space:pre-line}.ref-details small,.pageref{font-size:12px;color:var(--muted)}.card-editor{display:grid;gap:9px}.row-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.row-title strong{font-size:14px}.updown{display:flex;gap:4px}.tap-small{border:1px solid #cdd8cd;border-radius:4px;padding:4px 8px;background:#fbfcf8;color:var(--green);font-size:12px;cursor:pointer}.mode-line{display:grid;gap:7px;margin:10px 0}.mode-option{display:flex;gap:8px;align-items:center;font-weight:500;cursor:pointer}.mode-option input{width:16px;height:16px;accent-color:var(--green)}.map-card label{margin-top:10px}
.result-actions{gap:8px;flex-wrap:wrap}.result-intro{margin-top:22px}.back-link{margin-bottom:10px}.result-tabs{display:flex;border-bottom:1px solid #bdcdbe;gap:18px;overflow:auto}.tab{white-space:nowrap;position:relative;padding:12px 4px 10px;background:none;border:0;border-bottom:3px solid transparent;color:#53685b;font-weight:600;display:flex;align-items:center;gap:7px}.tab.active{border-bottom-color:var(--green);color:var(--green)}.tab i{width:16px;height:16px}.paper-bar{margin:12px 0;font-size:13px;color:var(--muted)}.paper-preview{max-width:940px;margin:0 auto;border:1px solid #d3dbce;box-shadow:0 3px 12px #1833260a;background:white;padding:clamp(24px,5vw,66px);border-radius:3px}.sheet{color:#172a21;font:14px/1.58 "Inter","Segoe UI",Arial,sans-serif;overflow-wrap:anywhere}.sheet-head{border-bottom:2px solid #254e39;padding-bottom:13px;margin-bottom:16px}.sheet-school{font-weight:700;color:#355946;font-size:13px;letter-spacing:.05em}.sheet-kind{font-weight:600;font-size:13px;color:#46654e;margin-top:8px}.sheet h2{font:600 32px/1.18 "DM Serif Text",Georgia,serif;color:#1d3829;letter-spacing:-.8px;margin:2px 0 6px}.sheet h3{font-size:17px;line-height:1.3;color:#214a33;margin:21px 0 5px}.sheet h4{font-size:14px;margin:11px 0 4px}.sheet-meta,.sheet-guide{font-size:12px;color:#4d6054;line-height:1.55}.student{display:flex;gap:24px;margin:16px 0;flex-wrap:wrap;font-size:13px}.student span{min-width:140px}.student b{display:inline-block;width:120px;border-bottom:1px dotted #59725e}
.q{margin:13px 0 18px;padding-left:28px;position:relative}.q-num{position:absolute;left:0;top:0;font-weight:700}.stimulus{white-space:pre-line;background:#f5f6f1;border-left:3px solid #abc0a9;padding:8px 11px;margin:0 0 8px;color:#293d2d}.q-stem{font-weight:560;white-space:pre-line}.opts{list-style:none;margin:5px 0 0;padding:0}.opts li{display:flex;gap:7px;margin:2px 0}.opt-lab{min-width:23px;flex-shrink:0}.sq{display:inline-block;width:10px;height:10px;border:1px solid #444;margin-right:5px}.answer-line{border-bottom:1px dotted #526857;max-width:340px;margin-top:22px}.paper-table{width:100%;border-collapse:collapse;margin:9px 0 14px;font-size:13px;line-height:1.45;table-layout:fixed}.paper-table th,.paper-table td{padding:6px 8px;border:1px solid #ccd6c8;text-align:left;vertical-align:top;overflow-wrap:anywhere}.paper-table th{background:#edf2e9;font-weight:700}.paper-table .numcol{width:7%}.keys .formcol{width:22%}.match-tbl td{width:50%}.match-tbl span{font-weight:700}.goal-block{margin:12px 0;padding:8px 12px;border-left:3px solid #9eb69f;background:#f6f8f2;font-size:13px}.goal-block p+p{margin-top:4px}.blueprint{font-size:12px}.blueprint .tpcol{width:11%}.blueprint .typecol{width:18%}.blueprint .matcol{width:23%}.why{margin:11px 0;padding:6px 0;border-bottom:1px solid #e1e6df}.why h4{margin:0 0 3px}.line-text{white-space:pre-line}.paper-note{font-size:12px;color:#546b59;margin-top:8px}#print-root{display:none}
@media(min-width:1450px){.wrap{max-width:1240px}.intro{margin-top:43px}.panel{padding:25px 28px}.work-layout{gap:27px}}
@media(max-width:930px){.wrap{width:calc(100% - 44px)}.work-layout{gap:15px;grid-template-columns:minmax(0,1fr) 275px}.panel{padding:18px}.summary-head,.summary-body{padding-left:16px;padding-right:16px}.fields.trio{grid-template-columns:1fr 1fr}.fields.trio label:last-child{grid-column:1/-1}.quantities{grid-template-columns:1fr}.brand-school{font-size:12px}}
@media(max-width:720px){.wrap{width:calc(100% - 30px)}.bar{height:62px;gap:10px}.brand{font-size:23px;gap:7px}.brand-mark,.brand-mark svg{width:29px}.brand-school{display:none}.bar-actions{gap:12px}.bar-link{font-size:12px}.secondary-head span{display:none}.secondary-head{width:32px;justify-content:center}.work-layout{grid-template-columns:1fr}.side-col{position:static}.intro,.result-intro{align-items:flex-start;flex-wrap:wrap;margin:23px 0 18px}.intro h1{font-size:42px}.intro p{font-size:14px;margin-top:6px}.panel{padding:17px 16px}.editor{gap:12px}.quantities{grid-template-columns:1fr 1fr}.summary-head{padding:15px 17px}.summary-body{padding:13px 17px 16px}.summary-lines{grid-template-columns:1fr 1fr;gap:7px 15px}.summary-line{font-size:12px}.result-tabs{gap:9px}.tab{font-size:12px;padding:10px 2px}.tab i{display:none}.paper-preview{padding:20px 16px}.paper-bar{font-size:12px}.site-footer{margin-top:22px}.doc-emblem{height:36px;width:34px}.total strong{font-size:41px}}
@media(max-width:455px){.quantities{grid-template-columns:1fr}.fields.duo{grid-template-columns:1fr}.site-footer{gap:9px;font-size:11px}.site-footer .text-btn{font-size:11px}.summary-lines{grid-template-columns:1fr}.bar-actions{gap:8px}.topic-tools{gap:13px}.paper-table th,.paper-table td{padding:4px 3px}.sheet{font-size:13px}.blueprint{font-size:10px}.student{gap:5px}.bar-link{gap:5px}.topic-tag{max-width:72px;text-align:right}.result-actions .btn{font-size:12px}}
@page{size:A4 portrait;margin:15mm 15mm 17mm}
@media print{html,body{background:white!important;color:black!important}body>*{display:none!important}#print-root{display:block!important}#print-root>.sheet+.sheet{break-before:page;page-break-before:always}.sheet{font-family:Arial,sans-serif;font-size:10.5pt;line-height:1.4;color:black;overflow:visible}.sheet *{box-shadow:none!important}.sheet h2{font-size:22pt}.sheet h3{font-size:13pt;break-after:avoid}.sheet h4{break-after:avoid}.sheet-school,.sheet-meta,.sheet-guide,.paper-note{color:#263729}.sheet-head{margin-bottom:9pt}.sheet-guide{break-after:avoid}.q,.why,.goal-block,tr{break-inside:avoid;page-break-inside:avoid}.q{margin:8pt 0 11pt}.paper-table{font-size:9pt}.blueprint{font-size:8.6pt}.paper-table th,.paper-table td{padding:4pt 5pt}.sheet .stimulus,.sheet .goal-block,.sheet th{print-color-adjust:exact;-webkit-print-color-adjust:exact}.sheet thead{display:table-header-group}.student{margin:10pt 0}.answer-line{margin-top:15pt}.sheet-meta,.sheet-guide,.paper-note{font-size:9pt}}


.question-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 11px;
}
.question-actions .btn { padding: 7px 9px; font-size: 12px; }
.question-status { font-size: 12px; color: var(--muted); }
.alternatives { display: grid; gap: 12px; margin-top: 12px; }
.alternative-card {
  border: 1px solid var(--edge);
  border-radius: 9px;
  background: #fff;
  padding: 12px 14px;
  overflow-wrap: anywhere;
}
.alternative-card .q { margin: 0 0 10px; }
.alternative-key { margin: 0 0 10px; }
.alternative-key summary { cursor: pointer; font-size: 13px; font-weight: 650; }
.alternative-key p { margin-top: 5px; font-size: 13px; white-space: pre-line; }
.question-editor { gap: 12px; }
.question-editor > .help + .help { margin-top: -9px; }
.question-fields {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 9px 13px 13px;
}
.question-fields legend { padding: 0 3px; font-weight: 650; }
.question-option {
  display: grid;
  grid-template-columns: minmax(0,1fr) max-content;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}
.question-option .answer-toggle { display: flex; gap: 6px; align-items: center; min-height: 46px; }
.question-option .answer-toggle input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}
.question-pair { margin-top: 10px; }

.category-control { max-width: 390px; margin-top: 14px; }
.level-fieldset { padding: 0; margin: 14px 0 10px; border: 0; min-width: 0; }
.level-fieldset legend { padding: 0; margin-bottom: 7px; font-size: 13px; font-weight: 650; }
.level-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.level-options label { display: flex; align-items: center; gap: 7px; border: 1px solid var(--edge); border-radius: 6px; padding: 7px 9px; font-size: 12px; }
.level-options input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.level-options input:disabled + span { opacity: .55; }
.filter-summary { margin-top: 7px; }
.fit-counts { margin: 0 0 8px; width: 100%; }
.level-tag { margin-left: auto; background: #eaf2e8; color: #214b37; border-radius: 4px; padding: 3px 6px; }
.blueprint .tpcol { width: 8%; }
.blueprint .matcol { width: 20%; }
.blueprint .typecol { width: 16%; }
.blueprint .levelcol { width: 17%; }
.question-image { width: 67mm; max-width: 100%; margin: 0 0 8px; break-inside: avoid; }
.question-image.image-small { width: 42mm; }
.question-image.image-large { width: 105mm; }
.question-image img { display: block; width: 100%; height: auto; max-height: 100mm; object-fit: contain; object-position: left center; }
.question-image figcaption { font-size: 12px; line-height: 1.35; margin-top: 3px; }
.image-editor .question-image { margin-top: 8px; }
.image-editor .fields { margin-bottom: 9px; }
.image-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.image-actions .btn { padding: 6px 8px; }
@media print {
  .question-image img { max-height: 82mm; }
  .question-image figcaption { font-size: 8.5pt; }
}
