:root {
  --ink:#17333a; --muted:#5f7176; --paper:#fffdf8; --canvas:#f2efe7;
  --teal:#0c6166; --coral:#d85d49; --gold:#e7ad3d; --green:#267451;
  --red:#a83d31; --line:#d8d5cb; --blue:#1769aa; --shadow:0 10px 28px rgba(29,48,51,.10);
}
*{box-sizing:border-box} html{color-scheme:light;scroll-behavior:smooth}
body{margin:0;color:var(--ink);background:var(--canvas);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;line-height:1.35}
button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}
button:focus-visible,input:focus-visible,[tabindex]:focus-visible,summary:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.skip-link{position:fixed;left:10px;top:-60px;z-index:30;background:#fff;padding:8px 12px;border-radius:8px;color:#000}.skip-link:focus{top:8px}
.topbar{height:60px;padding:8px max(14px,calc((100vw - 1120px)/2));display:flex;justify-content:space-between;align-items:center;gap:18px;color:#fff;background:linear-gradient(115deg,#084d51,#148087)}
.eyebrow,.kicker{margin:0 0 2px;font-size:.68rem;font-weight:850;letter-spacing:.10em;text-transform:uppercase}
.topbar h1{margin:0;font:750 1.45rem/1.05 Georgia,serif}
.progress{width:min(330px,42vw);display:grid;grid-template-columns:1fr auto;gap:4px 12px;font-size:.78rem}.progress strong{font-size:.9rem}
.progress-track{grid-column:1/-1;height:6px;border-radius:999px;background:rgba(255,255,255,.28);overflow:hidden}.progress-track i{display:block;width:0;height:100%;background:#ffd36f;transition:width .2s ease}
.activity-shell{width:min(1120px,calc(100% - 20px));margin:10px auto 8px;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:10px;align-items:stretch}
.model-panel,.task-panel{min-height:326px;background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.model-panel{padding:12px}.panel-heading,.question-title{display:flex;justify-content:space-between;align-items:center;gap:10px}.panel-heading h2,.question-title h2{margin:0;font:750 1.14rem/1.1 Georgia,serif}.panel-heading .button{min-height:38px;padding:6px 11px}
.bag-line{height:80px;margin-top:8px;display:grid;grid-template-columns:1fr auto 1.28fr auto .72fr;gap:7px;align-items:center}
.mini-bag{min-height:68px;padding:7px 8px;color:#fff;border-radius:10px 10px 18px 18px;text-align:center}.bag-one{background:var(--coral)}.bag-two{background:var(--teal)}
.mini-bag span{display:block;margin-bottom:6px;font-size:.68rem;font-weight:800}.mini-bag b{display:inline-grid;width:27px;height:27px;margin:0 2px;place-items:center;color:var(--ink);background:#fff;border-radius:50%;font-size:.8rem}
.arrow{font-weight:900;color:var(--teal);font-size:1.25rem}.formed{height:68px;display:grid;place-content:center;text-align:center;border:2px dashed #bbb4a7;border-radius:11px;background:#faf6eb}
.formed small{font-size:.58rem;font-weight:850;text-transform:uppercase}.formed strong{font:800 1.9rem/1 Georgia,serif;color:var(--teal)}.formed span{font-size:.62rem;color:var(--muted)}
.sample-heading{margin:8px 1px 5px;display:flex;justify-content:space-between;align-items:end;gap:8px}.sample-heading strong{display:block;font-size:.81rem}.sample-heading div span{display:block;color:var(--muted);font-size:.65rem}.sample-heading>span{white-space:nowrap;color:var(--teal);font-size:.72rem;font-weight:800}
.outcome-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.outcome{min-width:44px;min-height:44px;padding:5px;color:var(--ink);background:#fff;border:2px solid var(--line);border-radius:9px;font-weight:850}.outcome:hover{border-color:#88a3a3}.outcome[aria-pressed="true"]{color:#074f53;background:#d7eeed;border-color:var(--teal)}.outcome.correct-outcome{color:#195d40;background:#ddf2e6;border-color:var(--green)}.outcome.missed-outcome{color:#6a4800;background:#fff2cf;border-color:var(--gold);border-style:dashed}.outcome.extra-outcome{color:#7b2a22;background:#fae4df;border-color:var(--red)}
.grid-key{margin-top:5px;display:flex;justify-content:flex-end;gap:10px;color:var(--muted);font-size:.62rem}.grid-key span{display:inline-flex;align-items:center;gap:4px}.grid-key i{width:9px;height:9px;border-radius:2px;border:1px solid}.key-selected{background:#d7eeed;border-color:var(--teal)!important}.key-correct{background:#ddf2e6;border-color:var(--green)!important}.key-missed{background:#fff2cf;border-color:var(--gold)!important;border-style:dashed!important}
.task-panel{overflow:hidden}.tabs{height:56px;display:grid;grid-template-columns:repeat(3,1fr);background:#e7ece9;border-bottom:1px solid var(--line)}.tabs button{min-height:48px;padding:5px 6px;border:0;border-right:1px solid #ced7d4;background:transparent;color:var(--ink)}.tabs button:last-child{border-right:0}.tabs span{display:block;font-weight:900}.tabs i{display:block;margin-top:1px;color:var(--muted);font-size:.58rem;font-style:normal}.tabs button[aria-selected="true"]{background:var(--paper);box-shadow:inset 0 4px 0 var(--coral)}.tabs button.status-correct i{color:var(--green);font-weight:800}.tabs button.status-wrong i{color:var(--red);font-weight:800}
#questionPane{padding:10px 12px}.question-title .button{min-height:36px;padding:4px 7px}.prompt{min-height:35px;margin:5px 0 6px;color:var(--muted);font-size:.82rem}.hint{margin:5px 0;padding:7px 8px;border-left:4px solid var(--gold);border-radius:0 8px 8px 0;background:#fbf1d8;font-size:.74rem}
.answer-block{display:grid;grid-template-columns:auto 1fr;gap:3px 8px;align-items:center}.answer-block label{font-size:.82rem;font-weight:850}.answer-block input{min-width:0;min-height:44px;padding:7px 9px;border:2px solid #c9c5ba;border-radius:8px}.answer-block p{grid-column:2;margin:0;color:var(--muted);font-size:.62rem}
.confidence{margin:7px 0 0;padding:0;border:0;display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.confidence legend{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.confidence button{min-height:34px;padding:4px;border:1px solid #c9c5ba;border-radius:7px;background:#fff;font-size:.68rem}.confidence button[aria-pressed="true"]{color:#fff;background:var(--teal);border-color:var(--teal)}
.task-actions{margin-top:7px;display:grid;grid-template-columns:44px 1fr 44px;gap:6px}.button{min-height:44px;padding:7px 12px;border:2px solid transparent;border-radius:9px;font-weight:850}.button.primary{color:#fff;background:var(--teal)}.button.outline{color:var(--teal);background:#fff;border-color:#8cafad}.button.text-button{min-height:40px;padding:5px 8px;color:var(--teal);background:transparent;border:0}
.feedback{min-height:42px;margin-top:7px;padding:7px 9px;border-radius:8px;background:#edf1ef;color:var(--muted);font-size:.73rem}.feedback.good{color:#18583c;background:#e1f2e8;border:1px solid #a1cfb4}.feedback.bad{color:#722b23;background:#f8e5e1;border:1px solid #dca59c}
.finish-bar{width:min(1120px,calc(100% - 20px));min-height:48px;margin:0 auto 12px;padding:4px 7px 4px 3px;display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}.finish-bar p{margin:0;flex:1;text-align:center;color:var(--muted);font-size:.75rem}.button.finish{color:#fff;background:var(--coral)}
.learning-trace{width:min(1120px,calc(100% - 20px));margin:0 auto 28px;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:var(--paper);font-size:.8rem}.learning-trace summary{cursor:pointer;font-weight:800}.learning-trace ol{margin:8px 0 0;padding-left:22px;color:var(--muted)}
dialog{width:min(900px,calc(100% - 24px));max-height:calc(100vh - 32px);padding:0;border:0;border-radius:16px;box-shadow:0 25px 70px rgba(0,0,0,.28)}dialog::backdrop{background:rgba(10,30,34,.64)}.dialog-shell{padding:20px;background:var(--paper)}.dialog-shell.wide{overflow:auto}.dialog-head{display:flex;justify-content:space-between;gap:12px}.dialog-head h2{margin:0;font-family:Georgia,serif}.dialog-close{width:40px;height:40px;border:0;border-radius:50%;font-size:1.35rem}.result-score{display:flex;align-items:center;gap:16px;margin:16px 0;padding:16px;border-radius:12px;background:#e4f1ef}.result-score>strong{font:800 2.8rem/1 Georgia,serif;color:var(--teal)}.result-score p{margin:3px 0}.teacher-preview{position:fixed;right:12px;bottom:12px;z-index:8;padding:8px 12px;color:#fff;background:#142f38;border:0;border-radius:999px}
@media (max-width:760px){.topbar{height:auto;min-height:66px}.activity-shell{grid-template-columns:1fr}.model-panel,.task-panel{min-height:0}.bag-line{grid-template-columns:1fr auto 1.25fr;height:auto}.formed{grid-column:1/-1;height:58px}.bag-line>.arrow:nth-of-type(2){display:none}.finish-bar{align-items:stretch;flex-wrap:wrap}.finish-bar p{order:-1;flex-basis:100%}.finish-bar .button{flex:1}.learning-trace{margin-bottom:20px}}
@media (max-width:420px){.topbar{align-items:flex-start}.progress{width:43vw}.topbar h1{font-size:1.18rem}.activity-shell{width:calc(100% - 12px);margin-top:6px}.model-panel{padding:9px}.panel-heading h2{font-size:1rem}.mini-bag b{width:26px;height:26px}.outcome{min-width:40px}.finish-bar{width:calc(100% - 12px)}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media print{.topbar{color:#000;background:#fff}.button,.teacher-preview,dialog{display:none!important}.activity-shell{display:block}.task-panel{margin-top:12px}}
