@font-face{font-family:Rubik;src:url('./fonts/rubik-regular.woff') format('woff');font-weight:400;font-display:swap}
@font-face{font-family:Rubik;src:url('./fonts/rubik-bold.woff') format('woff');font-weight:700;font-display:swap}
:root{
  color-scheme:light;--ink:#192c48;--muted:#4d6174;--navy:#193251;--blue:#244c76;
  --teal:#17635b;--border:#d9e2e9;--canvas:#f3f6f8;--soft:#eaf5f2;--shadow:0 4px 17px rgba(28,53,75,.045);
}
*{box-sizing:border-box}
html{background:var(--canvas);scroll-behavior:smooth}
body{margin:0;color:var(--ink);font-family:Rubik,Arial,sans-serif;font-size:1rem;line-height:1.55}
button,input{font:inherit;color:inherit}
button,a,input{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
button:disabled{cursor:default}
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible,[tabindex="-1"]:focus-visible{outline:3px solid #c4790b;outline-offset:3px}
[hidden]{display:none!important}
.sr,.skip:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip:focus{position:fixed;top:8px;right:12px;z-index:5;background:white;padding:8px 16px}
.wrap{width:min(1104px,calc(100% - 64px));margin-inline:auto}
.top{background:#fff;border-bottom:1px solid var(--border)}
.top-inner,.brand,.text-button,.rail-head,.dialog-head,.actions,.main-actions,.kind,.choice,.hint-link,.review-button,.score-line{display:flex;align-items:center}
.top-inner,.rail-head,.dialog-head,.actions{justify-content:space-between}
.top-inner{min-height:64px;gap:16px}
.brand{font-size:1.18rem;font-weight:700;gap:.58rem;letter-spacing:-.025em}
.text-button,.hint-link{gap:.42rem;border:0;background:transparent;color:var(--blue);font-size:.93rem;font-weight:700;padding:8px 2px}
.text-button:hover,.hint-link:hover,.dialog-head button:hover{color:var(--teal)}
.text-button svg,.hint-link svg,.kind svg,.topic-icon svg,.feedback-icon,.review-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.hero{position:relative;overflow:hidden;isolation:isolate;background:linear-gradient(104deg,#263f69,#18294d 70%);border-radius:22px;margin-block:25px 24px;min-height:147px;display:flex;align-items:center;color:#fff}
.hero-copy{z-index:1;padding:26px 38px}
.hero h1{margin:0;font-size:clamp(2rem,3.7vw,3.0rem);line-height:1.16;letter-spacing:-.045em}
.hero p{color:#dce8f0;margin:8px 0 0;font-size:1.06rem}
.hero-art{position:absolute;left:0;top:0;width:34%;max-width:345px;height:100%;pointer-events:none}
.workspace{display:grid;grid-template-columns:245px minmax(0,1fr);align-items:start;gap:20px;margin-bottom:38px}
.rail,#exercise{background:#fff;border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow)}
.rail{padding:19px 14px 13px}
.rail-head{padding:0 5px;gap:6px}
.rail-head h2,.dialog-head h2{margin:0;font-size:1.06rem;font-weight:700}
#progress-label{font-size:.87rem;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.meter{height:5px;background:#e5ecf0;margin:13px 5px 14px;border-radius:5px;overflow:hidden}
#progress-fill{display:block;background:var(--teal);width:0;height:100%;transition:width .2s}
.mobile-picker{display:none}
.select-box{position:relative;min-width:0}
.select-box select{width:100%;height:40px;appearance:none;padding:4px 10px 4px 31px;border:1px solid #b8cbd0;border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:.92rem;cursor:pointer}
.select-box svg{position:absolute;pointer-events:none;inset-inline-end:10px;top:13px;width:15px;height:15px;fill:none;stroke:var(--teal);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
select:focus-visible{outline:3px solid #c4790b;outline-offset:2px}
#topic-list{display:grid;gap:3px}
.topic-button{display:grid;grid-template-columns:27px 1fr auto;align-items:center;gap:8px;min-height:41px;width:100%;padding:5px 7px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--ink);text-align:start;font-size:.94rem;line-height:1.3}
.topic-button:hover{background:#f3f7f7}
.topic-button[aria-pressed="true"]{background:var(--soft);color:var(--teal);border-color:#badbd3;font-weight:700}
.topic-icon{display:grid;place-items:center;width:27px;height:27px;border-radius:7px;background:#eef2f4;color:#537182}
.topic-icon svg{width:17px;height:17px}
.topic-button[aria-pressed="true"] .topic-icon{background:var(--teal);color:#fff}
.topic-count{color:var(--muted);font-size:.77rem;font-weight:400;font-variant-numeric:tabular-nums}
.step-number,.letter{display:grid;place-items:center;flex:none;font-size:.92rem;font-variant-numeric:tabular-nums;font-weight:700}
.review-button .step-number{width:28px;height:28px;border:1px solid #d3dfe5;border-radius:7px;background:#f7f9fa;color:#50677b}
.summary-link{border:1px solid var(--border);width:100%;background:#f4f7fa;color:var(--blue);font-weight:700;padding:9px;border-radius:9px;margin:12px 0 3px}
#exercise{position:relative;min-width:0;overflow:hidden;scroll-margin-top:12px}
.panel{padding:23px 29px 21px}
.q-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px}
.kind{gap:7px;font-size:.91rem;color:#1e615a;font-weight:700}
.kind svg{width:31px;height:31px;background:#e4f2ee;padding:6px;border-radius:9px;stroke-width:1.8}
.count{font-size:.89rem;color:var(--muted)}
h2.question{margin:0;font-size:clamp(1.45rem,2.8vw,2.05rem);line-height:1.28;letter-spacing:-.035em}
.prompt,.passage{font-size:1.08rem;line-height:1.65}
.prompt{margin:10px 0 0}
.passage,.problem-scene{background:#f1f7f8;border-inline-start:4px solid #72b4aa;border-radius:10px;padding:13px 17px;margin:16px 0 12px}
.passage{color:#243d54}
.direction,.input-label,.sort-tip{color:var(--muted);font-size:.9rem}
.direction{margin:8px 0 0}
.sequence-panel{margin:14px 0 15px;padding:12px 18px 11px;text-align:center;border:1px solid #cfdfdf;border-radius:13px;background-color:#edf6f4;background-image:linear-gradient(#20816e0f 1px,transparent 1px),linear-gradient(90deg,#20816e0f 1px,transparent 1px);background-size:16px 16px}
.sequence-panel figcaption{font-size:.80rem;color:#3e625d;margin-bottom:8px}
.sequence{position:relative;isolation:isolate;list-style:none;display:grid;grid-template-columns:repeat(var(--terms,8),minmax(0,1fr));align-items:center;gap:clamp(4px,1.1vw,10px);max-width:610px;margin:0 auto;padding:0}
.sequence::before{content:"";position:absolute;border-top:2px dotted #79a79f;left:3%;right:3%;top:50%;z-index:-1}
.sequence li{display:grid;place-items:center;min-height:49px;background:#fff;border:1px solid #a9c8c2;border-radius:9px;font-size:clamp(1.12rem,2.25vw,1.7rem);font-weight:700;line-height:1;color:#203d4f;font-variant-numeric:tabular-nums}
.sequence .missing{background:#fff4d8;border:2px dashed #b37a1d;color:#845814}
fieldset{margin:0;padding:0;border:0;min-width:0}
.options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 11px;margin-top:13px}
.choice{gap:11px;position:relative;min-height:48px;line-height:1.4;border:1px solid #cfdbe3;border-radius:11px;background:#fff;padding:9px 12px;cursor:pointer;font-size:1.05rem}
.choice input{width:1px;height:1px;position:absolute;opacity:0}
.choice:has(input:focus-visible){outline:3px solid #c4790b;outline-offset:2px}
.choice:hover:has(input:enabled){border-color:#86aaa8;background:#f6faf9}
.choice.selected{border-color:#278175;background:#f0f8f5;box-shadow:inset 0 0 0 1px #278175}
.choice.right{border-color:#2c8274;background:#edf7f2;box-shadow:inset 0 0 0 1px #2c8274}
.choice.wrong{border-color:#ae812f;background:#fff6e5}
.choice:has(input:disabled){cursor:default}
.letter{border-radius:7px;background:#eef2f5;color:#466076;width:26px;height:26px;font-weight:400;font-size:.87rem}
.choice.selected .letter,.choice.right .letter{background:#22695f;color:white}
.choice.wrong .letter{background:#865611;color:#fff}
.choice .option-number{font-size:1.15rem;line-height:1;font-weight:700}
.choice-status{margin-inline-start:auto;white-space:nowrap;font-size:.76rem;color:#176255}
.choice.wrong .choice-status{color:#795018}
.choices-analogy,.choices-deduction,.choices-verbal{grid-template-columns:1fr}
.pair{display:flex;gap:.42rem;align-items:baseline;flex-wrap:wrap}
.pair .separator{color:#75908e}
.actions{gap:12px;min-height:62px;padding:12px 29px;background:#fafcfd;border-top:1px solid var(--border);flex-wrap:wrap}
.main-actions{gap:8px;margin-inline-start:auto;flex-wrap:wrap}
.primary,.secondary{min-height:42px;padding:9px 22px;border:1px solid transparent;border-radius:10px;font-weight:700;font-size:.97rem}
.primary{color:#fff;background:var(--navy)}
.primary:hover:enabled{background:#2d4b70}
.primary:disabled{color:#56697c;background:#e2e8ed;border-color:#d7e0e7}
.secondary{background:#fff;border:1px solid #cad6df;color:var(--blue)}
.secondary:hover{background:#f2f6f7}
.hint-link{font-size:.94rem;min-height:41px}
.hint-box,.feedback{margin-top:17px;border-radius:12px;padding:13px 15px}
.hint-box{background:#fff6dd;border:1px solid #edd7a0;color:#634815}
.hint-box strong,.feedback h3{font-size:1.02rem;margin:0}
.hint-box p,.feedback p{margin:4px 0 0;line-height:1.55}
.feedback{background:#eff7f4;border:1px solid #c5dfd5}
.feedback.incorrect{background:#fff8e9;border-color:#ead8ac}
.feedback-head{display:flex;align-items:center;gap:8px;color:#1c6354}
.incorrect .feedback-head{color:#795016}
.feedback .explanation{color:#263e4c}
.math-work{padding-top:5px;font-variant-numeric:tabular-nums;text-align:start}
.math-work bdi{display:inline-block;color:#284b5b;border-radius:6px;background:#ffffffb8;padding:2px 8px;letter-spacing:.015em}
.solution-order{font-weight:700}
.clues{margin:10px 0 14px;padding-inline-start:1.4rem}
.clues li{margin:4px 0;padding-inline-start:3px}
.clues li::marker{color:#347b71;font-weight:700}
.sort-tip{margin:4px 0 8px}
.bank,.slots{display:grid;grid-template-columns:repeat(var(--slots,4),minmax(0,1fr));gap:8px}
.bank{background:#edf5f4;border-radius:10px;padding:8px;margin:0 0 10px}
.chip,.slot{min-width:0;border-radius:9px}
.chip{min-height:39px;border:1px solid #aac6c0;background:white;color:#23554e;font-weight:700}
.chip[data-draggable],.slot[data-draggable]{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.drag-ghost{position:fixed;z-index:10;pointer-events:none;transform:translate(-50%,-80%);background:#1c6459;color:#fff;border:2px solid #fff;border-radius:9px;padding:5px 16px;box-shadow:0 3px 10px #192f4933;font-weight:700}
.chip:active:enabled,.slot:active:enabled{cursor:grabbing}
.chip:disabled{background:transparent;border-style:dashed;color:#637a73;border-color:#b7cac5}
.slot{min-height:65px;display:grid;place-content:center;gap:1px;border:1.5px dashed #9aafbd;background:#fff}
.slot:disabled:not(.filled){color:#587182}
.slot .slot-position{color:#52697b;font-size:.81rem}
.slot .slot-value{font-weight:700;line-height:1.3}
.slot.filled{background:#eff6f6;border:1px solid #86b4ac}
.slot.drop-hover,.bank.drop-hover{background:#fff4d9;border-color:#a37522}
.input-label{display:block;margin:17px 0 5px;font-weight:700;color:var(--ink)}
.number-input{width:145px;max-width:50%;min-height:44px;border:1px solid #a4b9c8;border-radius:9px;text-align:center;letter-spacing:.03em;font-size:1.23rem;font-variant-numeric:tabular-nums;background:#fff}
.number-input:disabled{background:#f2f5f6;color:var(--ink);opacity:1}
.input-unit{margin-inline-start:8px;color:var(--muted)}
.matrix-area{padding:12px;margin:13px 0 9px;border:1px solid #d1e1de;background:#eef5f3;border-radius:12px}
.shape-matrix{display:grid;gap:4px;width:fit-content;margin:auto}
.matrix-row{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;direction:ltr}
.matrix-cell{display:grid;place-items:center;background:#fff;border:1px solid #b7cdca;border-radius:7px;width:clamp(43px,6.4vw,56px);aspect-ratio:1}
.matrix-cell:last-child{border-color:#90afa8}
.matrix-cell.unknown{background:#fff3ce;border:1.5px dashed #ae822d;color:#825916;font-size:1.55rem;font-weight:700}
.tile{display:block;width:83%;height:auto;max-width:59px}
.choices-matrix{grid-template-columns:repeat(4,minmax(0,1fr))}
.choices-matrix .choice{min-height:58px;gap:6px;padding:6px 8px;justify-content:space-around}
.choices-matrix .tile{width:39px;height:39px}
.choices-matrix .choice-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.shape-caption{margin:4px 0 0;text-align:center;font-size:.78rem;color:#4f6d65}
.score-line{gap:12px;margin:15px 0 6px}
.score-value{display:inline-block;padding:4px 13px;border-radius:12px;background:#e6f3ed;color:#1a6558;font-size:2rem;font-weight:700;line-height:1.5}
.review-list{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:7px}
.review-button{width:100%;gap:10px;text-align:start;border:1px solid var(--border);border-radius:10px;padding:10px;background:#fff}
.review-button:hover{background:#f3f7f7}
.review-button .review-result{font-size:.86rem;margin-inline-start:auto;white-space:nowrap}
.review-button.right .review-result{color:#216554}
.review-button.wrong .review-result{color:#7c5719}
dialog{color:var(--ink);border:1px solid #cad7df;border-radius:18px;padding:23px 25px;width:min(500px,calc(100% - 30px));box-shadow:0 22px 88px #13284344;max-height:85vh;overflow:auto}
dialog::backdrop{background:#15273db3}
.dialog-head h2{font-size:1.45rem}
.close-button{background:#eef3f5;border:0;border-radius:8px;min-width:36px;height:36px;font-size:1.45rem;line-height:1}
dialog h3{margin:16px 0 5px;font-size:1.04rem}
dialog p{margin:9px 0;color:#405469}
.source-links{display:grid;gap:7px;margin-top:16px}
.source-links a{color:#1a655a;text-underline-offset:3px}

.question-tools{display:flex;align-items:center;justify-content:space-between;gap:6px 12px;flex-wrap:wrap;margin:-3px 0 12px}
.difficulty-tag,.timer-box{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border:1px solid #d6e6df;border-radius:7px;background:#f1f8f3;color:#275e49;font-size:.9rem;line-height:1.3}
.difficulty-tag{font-weight:700}
.difficulty-tag.level-2{background:#eef6fa;color:#315b73;border-color:#d5e8f0}
.difficulty-tag.level-3{background:#f4f3fc;color:#574984;border-color:#e2def3}
.difficulty-tag.level-4{background:#fff5e4;color:#805424;border-color:#f2dfbb}
.difficulty-tag.level-5{background:#f9eff7;color:#7d3f68;border-color:#edd8e8}
.level-bars{display:inline-flex;align-items:flex-end;gap:2px;direction:ltr;margin-inline:1px;height:14px}
.level-bars i{width:3px;border-radius:1px;background:currentColor;opacity:.19}
.level-bars i.on{opacity:.9}.level-bars i:nth-child(1){height:4px}.level-bars i:nth-child(2){height:6px}.level-bars i:nth-child(3){height:8px}.level-bars i:nth-child(4){height:10px}.level-bars i:nth-child(5){height:13px}
.timer-box{background:#f4f7fa;color:#455e73;border-color:#dbe4ea}
.timer-box svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.timer-box bdi{font-weight:700;font-variant-numeric:tabular-nums;color:#263e55;min-width:3.1ch}
.sequence li .arrow-tile{max-width:34px}.choices-matrix .paper-tile{width:46px;height:46px}
.paper-example>div{display:grid;place-items:center}.paper-example .tile{width:66px;max-width:66px}
.review-topic{margin:9px 0;border:1px solid var(--border);border-radius:10px;padding:9px 12px}
.review-topic summary{cursor:pointer;font-weight:700;color:var(--blue)}
.review-topic .review-list{margin-top:10px}
@media(max-width:850px){
  .wrap{width:calc(100% - 36px)}.workspace{grid-template-columns:198px minmax(0,1fr);gap:13px}
  .rail{padding:15px 9px 9px}.topic-button{gap:5px;padding-inline:4px;font-size:.89rem}
  .panel{padding:21px}.actions{padding-inline:21px}.hero{margin-block:18px}.hero-copy{padding-inline:27px}
}
@media(max-width:680px){
  .wrap{width:calc(100% - 24px)}.top-inner{min-height:53px}.brand{font-size:1.08rem}.brand img{width:29px;height:29px}
  .hero{border-radius:15px;min-height:110px;margin-block:13px}.hero-copy{padding:16px 15px;max-width:77%}
  .hero h1{font-size:clamp(1.55rem,5.7vw,2.1rem)}.hero p{font-size:.91rem;line-height:1.4;margin-top:4px}
  .hero-art{width:31%;left:-4%;opacity:.95}
  .workspace{display:flex;flex-direction:column;align-items:stretch;gap:10px;margin-bottom:18px}
  .rail{border-radius:12px;padding:9px 11px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:7px 12px}
  .rail-head{display:block;padding:0}.rail-head h2{font-size:.91rem;line-height:1.2}#progress-label{font-size:.8rem}
  .meter,#topic-list{display:none}.mobile-picker{display:block}.select-box select{height:40px}
  .summary-link{grid-column:1/-1;margin:3px 0 0;padding:3px}
  #exercise{border-radius:14px}.panel{padding:16px}.q-meta{margin-bottom:8px}
  .actions{padding:10px 15px;min-height:55px}.kind{font-size:.85rem}.kind svg{width:27px;height:27px}
  .count{font-size:.82rem}.sequence-panel{padding:8px 6px 10px;margin-block:11px}.sequence-panel figcaption{margin-bottom:6px}
  .sequence{gap:4px}.sequence li{min-height:38px;border-radius:6px;font-size:clamp(1rem,4.5vw,1.4rem)}
  .options{margin-top:10px;gap:7px}.choice{padding:8px 9px;gap:7px;min-height:42px}.letter{width:24px;height:24px}
  .passage,.problem-scene{padding:10px 12px}.prompt,.passage{font-size:1rem}.choices-analogy .choice{font-size:.94rem}
  .feedback,.hint-box{padding:11px 12px}.bank,.slots{gap:5px}.slot{min-height:56px}
  .choices-matrix .choice{padding:3px;gap:3px}.choices-matrix .tile{width:30px;height:30px}
  .choices-matrix .letter{width:17px;height:22px}
}
@media(max-width:360px){
  .rail{gap:4px}.hero-copy{max-width:83%}.hero-art{width:25%}
  .panel{padding:12px}.bank{padding:5px}.pair{gap:.25rem}.choices-matrix .choice{flex-direction:column}
  .choice-status{font-size:.68rem}.primary,.secondary{padding-inline:13px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important}}

@media(max-width:680px){
  .question-tools{margin:1px 0 10px;gap:5px}
  .difficulty-tag,.timer-box{font-size:.87rem;padding:3px 6px;gap:4px}
  .long-sequence{gap:2px}.long-sequence li{min-height:33px;font-size:clamp(.81rem,3.4vw,1.12rem)}
  .sorter:has(.slot:nth-child(5)) .bank,.sorter:has(.slot:nth-child(5)) .slots{gap:3px}
  .sorter:has(.slot:nth-child(5)) .chip,.sorter:has(.slot:nth-child(5)) .slot{font-size:.87rem;padding-inline:1px}
}
@media(max-width:390px){
  .previous-question{padding-inline:9px}
  .choices-matrix .paper-tile{width:32px;height:32px}
}
