*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,Segoe UI,Arial,sans-serif;background:#eef3f7;color:#17324a}button{font:inherit}header{height:70px;background:#123653;color:#fff;display:flex;align-items:center;padding:0 20px;gap:18px;box-shadow:0 3px 16px #0002;position:relative;z-index:5}.brand{display:flex;flex-direction:column;min-width:235px}.brand small{font-size:10px;letter-spacing:.12em;opacity:.75}.brand strong{font-family:Georgia,serif;font-size:22px}.ticker{flex:1;text-align:center;font-weight:800;letter-spacing:.08em;color:#f2c45d}header button{background:#ffffff16;color:#fff;border:1px solid #ffffff44;border-radius:9px;padding:9px 13px;cursor:pointer}.shell{display:grid;grid-template-columns:250px 1fr;min-height:calc(100vh - 70px)}aside{background:#fff;border-right:1px solid #d9e2e9;padding:18px 14px;transition:.25s}.week{font-size:11px;font-weight:900;letter-spacing:.14em;color:#708597;margin:0 10px 12px}.classbtn{width:100%;text-align:left;border:0;background:transparent;padding:11px 12px;border-radius:10px;margin:2px 0;color:#29465e;cursor:pointer;font-weight:700}.classbtn.active{background:#e7f1f8;color:#0c5e91}.note{margin:18px 10px 0;padding-top:14px;border-top:1px solid #e3e9ee;font-size:11px;line-height:1.45;color:#7c8d9a}main{min-width:0;display:flex;flex-direction:column}.toolbar{display:flex;justify-content:space-between;align-items:end;padding:18px 28px 12px;gap:18px}.subject{font-family:Georgia,serif;font-size:25px;font-weight:700;color:#123653}#status{font-size:12px;color:#73889a;margin-top:3px}#days{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}#days button,#answers{border:1px solid #ccd9e2;background:#fff;color:#34546c;padding:8px 12px;border-radius:9px;cursor:pointer;font-weight:700}#days button.active,#answers.active{background:#1f6f9f;color:#fff;border-color:#1f6f9f}.stage{flex:1;display:grid;grid-template-columns:52px minmax(0,1fr) 52px;align-items:center;padding:0 16px 12px;min-height:0}.viewer{height:min(72vh,760px);display:flex;gap:14px;justify-content:center;align-items:center;min-width:0}.viewer img{display:block;max-width:100%;max-height:100%;object-fit:contain;background:#fff;border-radius:10px;box-shadow:0 8px 32px #17324a26}.arrow{border:0;background:transparent;font-size:52px;color:#537086;cursor:pointer}.arrow:disabled{opacity:.15}.desmos-wrap{display:none;height:100%;min-width:42%;flex:1;background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 8px 32px #17324a26}.desmos-wrap.open{display:flex;flex-direction:column}.desmos-head{padding:10px 14px;border-bottom:1px solid #dce5eb;display:flex;justify-content:space-between;gap:10px;font-size:12px}.desmos-head span{color:#718494}#calculator{flex:1;min-height:420px}footer{height:58px;display:flex;align-items:center;justify-content:center;gap:18px;padding:0 20px}#dots{display:flex;gap:5px;max-width:52vw;overflow:hidden}.dot{width:7px;height:7px;border-radius:50%;background:#b7c6d1;flex:0 0 auto}.dot.active{background:#1f6f9f;transform:scale(1.35)}#count{font-size:12px;color:#6d8292;min-width:72px}.collapsed .shell{grid-template-columns:0 1fr}.collapsed aside{transform:translateX(-260px);overflow:hidden;padding:0;border:0}.collapsed .viewer{height:min(78vh,820px)}
@media(max-width:900px){.ticker{display:none}.shell{grid-template-columns:1fr}aside{position:fixed;top:70px;bottom:0;left:0;width:260px;z-index:4;box-shadow:4px 0 20px #0002}.collapsed aside{transform:translateX(-270px)}.toolbar{align-items:flex-start;flex-direction:column;padding:12px 16px}.stage{grid-template-columns:34px minmax(0,1fr) 34px;padding:0 4px}.viewer{height:auto;min-height:55vh;flex-direction:column}.desmos-wrap{width:100%;min-height:520px}.viewer img{width:100%;height:auto}.arrow{font-size:38px}.brand strong{font-size:18px}}

.viewer.desmos-special img{width:var(--task-width);max-width:var(--task-width);height:100%;object-fit:contain}
.viewer.desmos-special .desmos-wrap{width:var(--desmos-width);min-width:var(--desmos-width);flex:0 0 var(--desmos-width)}
@media(max-width:900px){
 .viewer.desmos-special img{width:100%;max-width:100%;height:auto}
 .viewer.desmos-special .desmos-wrap{width:100%;min-width:100%;flex-basis:auto}
}

/* Week banner: visible/moving for 30 seconds, absent for the next 120 seconds. */
.ticker{position:relative;overflow:hidden;height:34px;flex:1;text-align:initial}
.ticker-run{position:absolute;top:7px;white-space:nowrap;font-weight:900;letter-spacing:.08em;color:#f2c45d;animation:weekTicker 150s linear infinite}
@keyframes weekTicker{0%{opacity:1;transform:translateX(-100%)}20%{opacity:1;transform:translateX(calc(100vw - 470px))}20.01%,100%{opacity:0;transform:translateX(calc(100vw - 470px))}}
/* Desmos replaces the redundant static graphing workspace. */
.viewer.desmos-special{gap:8px;justify-content:stretch}
.viewer.desmos-special img{width:var(--task-width);max-width:var(--task-width);height:100%;object-fit:contain;object-position:left center;box-shadow:none}
.viewer.desmos-special .desmos-wrap{width:var(--desmos-width);min-width:var(--desmos-width);flex:0 0 var(--desmos-width)}
/* Inline approved answers; there is no separate Answer Center navigation. */
#viewAnswer{border:1px solid #1f6f9f;background:#1f6f9f;color:#fff;padding:9px 16px;border-radius:9px;cursor:pointer;font-weight:900;letter-spacing:.04em}
.answer-panel{margin:0 80px 10px;background:#fff;border:1px solid #cad9e3;border-left:5px solid #1f6f9f;border-radius:12px;box-shadow:0 8px 24px #17324a18;padding:0 18px 14px}
.answer-head{display:flex;justify-content:space-between;align-items:center;padding:12px 0 8px;color:#123653}.answer-head button{border:0;background:#eef4f8;color:#34546c;border-radius:8px;padding:7px 10px;cursor:pointer}.answer-panel p{margin:8px 0;line-height:1.45;color:#203d54}
@media(max-width:900px){.answer-panel{margin:0 12px 10px}.viewer.desmos-special img{width:100%;max-width:100%;height:auto}.viewer.desmos-special .desmos-wrap{width:100%;min-width:100%;flex-basis:auto}.ticker{display:block;min-width:0}.ticker-run{font-size:10px}}

/* V4: keep the slide-position navigator visible and useful on every lesson. */
main{padding-bottom:64px}
footer{
  position:fixed;
  left:250px;
  right:0;
  bottom:0;
  z-index:12;
  height:58px;
  background:rgba(238,243,247,.97);
  border-top:1px solid #d6e0e7;
  backdrop-filter:blur(8px);
  box-shadow:0 -5px 18px #17324a12;
}
.collapsed footer{left:0}
#dots{display:flex;gap:6px;align-items:center;justify-content:center;max-width:min(58vw,760px);overflow:hidden}
.dot{width:8px;height:8px}
.dot.active{background:#1f6f9f;transform:scale(1.4)}
#count{font-size:12px;font-weight:700;color:#557087;min-width:58px}
.viewer.desmos-special{
  width:100%;
  align-items:stretch;
  justify-content:stretch;
  gap:12px;
}
.viewer.desmos-special img{
  flex:0 0 var(--task-width);
  width:var(--task-width);
  max-width:var(--task-width);
  height:100%;
  object-fit:contain;
  object-position:center center;
  background:#fff;
}
.viewer.desmos-special .desmos-wrap{
  flex:0 0 var(--desmos-width);
  width:var(--desmos-width);
  min-width:var(--desmos-width);
  height:100%;
}
.viewer.desmos-special #calculator{min-height:0;height:100%}
@media(max-width:900px){
  main{padding-bottom:58px}
  footer{left:0}
  .viewer.desmos-special{flex-direction:column}
  .viewer.desmos-special img{width:100%;max-width:100%;height:auto;flex-basis:auto}
  .viewer.desmos-special .desmos-wrap{width:100%;min-width:100%;height:560px;flex-basis:560px}
}

/* V5 verified graph-workspace layout */
#viewer.desmos-special{display:grid;grid-template-columns:minmax(300px,38%) minmax(0,62%);gap:12px;align-items:stretch;width:100%}
#viewer.desmos-special>img{width:100%;max-width:100%;height:100%;min-width:0;object-fit:contain;object-position:center;background:#fff}
#viewer.desmos-special>#desmosWrap.open{display:flex!important;width:100%;min-width:0;height:100%;min-height:620px;flex-direction:column}
#viewer.desmos-special #calculator{width:100%;height:100%;min-height:560px;flex:1}
@media(max-width:900px){
 #viewer.desmos-special{display:flex;flex-direction:column}
 #viewer.desmos-special>#desmosWrap.open{min-height:560px}
}

#viewAnswer{
  border:0;
  background:#0c6d9f;
  color:white;
  padding:10px 18px;
  border-radius:999px;
  font-weight:900;
  letter-spacing:.04em;
  box-shadow:0 4px 14px #0c6d9f33;
  cursor:pointer;
  flex:0 0 auto;
}
#viewAnswer:hover{background:#095c87}
#viewAnswer[hidden]{display:none!important}
footer{justify-content:center}

/* V7 — dominant live Desmos workspace */
#viewer.desmos-special{display:grid!important;grid-template-columns:minmax(250px,30%) minmax(0,70%)!important;gap:10px!important;align-items:stretch!important}
#viewer.desmos-special>img{width:100%!important;max-width:100%!important;height:100%!important;object-fit:contain!important;background:#fff}
#viewer.desmos-special>#desmosWrap.open{display:flex!important;width:100%!important;min-width:0!important;height:100%!important;min-height:640px!important}
#viewer.desmos-special #calculator{width:100%!important;height:100%!important;min-height:600px!important}
footer{display:flex!important}
#dots,#count{display:flex!important}
@media(max-width:900px){#viewer.desmos-special{display:flex!important;flex-direction:column!important}#viewer.desmos-special>#desmosWrap.open{min-height:560px!important}}

/* V8 — requested final Desmos balance: instructions 50% / live Desmos 50%. */
#viewer.desmos-special{
  grid-template-columns:minmax(0,50%) minmax(0,50%)!important;
}

/* V9 — functional PE resource links only. */
.resource-links{margin:10px 28px 0;padding:12px 16px;border:1px solid #d6e0e7;border-radius:12px;background:#fff;font-size:14px;line-height:1.6}
.resource-links a{font-weight:800;text-decoration:underline}
.resource-links span{padding:0 4px;color:#8295a5}
/* V11 — multi-week architecture + mobile-first reliability. */
.week-switch{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:0 6px 12px}.weekbtn{border:1px solid #cad8e2;background:#f7fafc;color:#456278;border-radius:9px;padding:8px 6px;font-size:11px;font-weight:900;cursor:pointer}.weekbtn.active{background:#123653;color:#fff;border-color:#123653}
@media(max-width:900px){
 header{height:58px;padding:0 8px;gap:8px}.brand{min-width:0;flex:1}.brand small{font-size:8px}.brand strong{font-size:15px}.ticker{display:none!important}#full{display:none}header button{padding:7px 9px}
 .shell{min-height:calc(100dvh - 58px)}aside{top:58px;width:min(84vw,300px);padding:14px 10px}.collapsed aside{transform:translateX(-110%)}
 .toolbar{padding:10px 10px 6px;gap:8px}.subject{font-size:20px}#status{font-size:11px}#days{width:100%;display:grid;grid-template-columns:repeat(5,1fr);gap:4px}#days button{padding:8px 2px;font-size:10px;white-space:nowrap}
 .stage{display:grid;grid-template-columns:32px minmax(0,1fr) 32px;padding:2px 0 8px;align-items:center}.viewer{min-height:0;height:auto;width:100%;padding:0;gap:8px}.viewer img{width:100%;max-width:100%;max-height:none;height:auto;border-radius:4px;box-shadow:0 3px 14px #17324a20}.arrow{font-size:34px;padding:0;z-index:2}
 .resource-links{margin:6px 8px 0;padding:10px 12px;font-size:13px}.resource-links a{display:inline-block;margin:3px 0}
 .answer-panel{margin:6px 8px 8px;padding:0 12px 10px}.answer-panel p{font-size:14px}
 main{padding-bottom:62px;overflow-x:hidden}footer{height:58px;left:0;padding:0 8px;gap:8px}#viewAnswer{padding:9px 12px;font-size:11px}#dots{max-width:48vw;gap:4px}.dot{width:6px;height:6px}#count{min-width:42px;font-size:11px}
 #viewer.desmos-special{display:flex!important;flex-direction:column!important}#viewer.desmos-special>img{width:100%!important;height:auto!important}#viewer.desmos-special>#desmosWrap.open{width:100%!important;min-height:520px!important;height:520px!important}
}
@media(max-width:480px){#days button{font-size:9px}.brand small{display:none}.brand strong{font-size:14px}.subject{font-size:18px}.stage{grid-template-columns:26px minmax(0,1fr) 26px}.arrow{font-size:29px}.week-switch{margin-top:2px}}

/* V13 — scalable calendar-aware week navigation. */
.current-week-card{margin:0 6px 10px;padding:10px 12px;border-radius:11px;background:#eef6fb;border:1px solid #c9dce9;display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center}.current-week-card span{grid-row:1/3;background:#1f6f9f;color:#fff;border-radius:7px;padding:5px 7px;font-size:8px;font-weight:900;letter-spacing:.08em;text-align:center}.current-week-card strong{font-size:13px;color:#123653}.current-week-card small{font-size:10px;color:#708597}.week-nav{display:grid;grid-template-columns:25px 1fr 25px;gap:5px;align-items:stretch;margin:0 2px 10px}.week-switch{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:0}.weekbtn{min-width:0;padding:7px 3px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.05}.weekbtn span{font-size:10px;white-space:nowrap}.weekbtn small{font-size:7px;margin-top:4px;letter-spacing:.06em;opacity:.72}.weekbtn.active small{color:#f2c45d;opacity:1}.week-arrow{border:1px solid #cad8e2;background:#fff;color:#34546c;border-radius:8px;font-size:20px;font-weight:900;cursor:pointer}.week-arrow:disabled{opacity:.22;cursor:default}.week{margin-top:4px}.weekbtn:only-child{grid-column:2}.week-switch:has(.weekbtn:nth-child(2):last-child){grid-template-columns:1fr 1fr}
@media(max-width:480px){.current-week-card{margin-left:2px;margin-right:2px}.week-nav{grid-template-columns:23px 1fr 23px}.weekbtn span{font-size:9px}.weekbtn small{font-size:6.5px}}

/* v13.1 MOBILE SIDEBAR FIX
   On phones the sidebar is position:fixed and must not reserve a grid column.
   Keep the lesson canvas at full width whether the drawer is open or closed. */
@media (max-width:900px){
  .shell,
  .collapsed .shell{grid-template-columns:minmax(0,1fr)!important;}
  main{grid-column:1!important;width:100%;min-width:0;}
  aside{grid-column:auto;}
}

#noClass{font-size:clamp(24px,4vw,48px);color:#173850;padding:2rem;text-align:center} [hidden]{display:none!important} .resource-links a{display:inline-block;padding:.45rem .7rem;margin:.2rem;border:1px solid #b9cddb;border-radius:7px;background:#fff;color:#174f7b;text-decoration:none} .resource-links a:hover{text-decoration:underline} #answerBody p{white-space:normal;line-height:1.6;font-size:18px}

/* Single centered week selector: arrows reveal other weeks */
.week-nav{grid-template-columns:32px minmax(0,1fr) 32px;align-items:stretch}
.week-switch{display:flex;justify-content:center;align-items:stretch;min-width:0}
.week-switch .weekbtn{width:100%;max-width:190px;min-height:46px;cursor:default;padding:9px 8px}
.week-switch .weekbtn span{font-size:13px;letter-spacing:.055em}
.week-switch .weekbtn small{font-size:9px;margin-top:5px}
.week-arrow{font-size:24px}

/* V14 — Weeks 8–11 continuity + stable modal Desmos + mobile-first override */
#desmosWrap{display:none!important}.desmos-action{border:0;background:#16836b;color:#fff;padding:10px 16px;border-radius:999px;font-weight:900;letter-spacing:.03em;cursor:pointer;box-shadow:0 4px 14px #16836b33}.desmos-action[hidden]{display:none!important}
.desmos-modal[hidden]{display:none!important}.desmos-modal{position:fixed;inset:0;z-index:1000;background:#081a29e8;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:flex;align-items:center;justify-content:center}.modal-open{overflow:hidden}.desmos-shell{width:min(1500px,100%);height:min(920px,100%);background:#fff;border-radius:16px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 24px 90px #0009}.desmos-top{height:56px;flex:0 0 56px;background:#123653;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 16px;gap:12px}.desmos-top>div{min-width:0;display:flex;gap:12px;align-items:baseline}.desmos-top span{font-size:12px;color:#d8e7ef;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.desmos-top button{border:1px solid #ffffff55;background:#ffffff14;color:#fff;border-radius:9px;padding:8px 11px;cursor:pointer;white-space:nowrap}.desmos-grid{min-height:0;flex:1;display:grid;grid-template-columns:minmax(300px,42%) minmax(0,58%)}.task-pane{min-width:0;min-height:0;background:#eef3f7;display:flex;align-items:center;justify-content:center;padding:10px;border-right:1px solid #ccd9e2;overflow:hidden}.task-pane img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;background:#fff;box-shadow:0 5px 20px #17324a20}.calculator{width:100%;height:100%;min-width:0;min-height:0}.desmos-error{padding:30px;font-weight:700;color:#6b2b2b}
@media(max-width:900px){html,body{max-width:100%;overflow-x:hidden}header{height:56px;padding:0 8px;gap:7px}.brand{min-width:0;flex:1}.brand small{display:none}.brand strong{font-size:15px;white-space:nowrap}.ticker{display:none!important}#full{display:none}.shell,.collapsed .shell{grid-template-columns:minmax(0,1fr)!important;min-height:calc(100dvh - 56px)}aside{position:fixed;z-index:50;top:56px;bottom:0;left:0;width:min(86vw,310px);padding:12px 10px;overflow:auto;transform:translateX(0);box-shadow:5px 0 24px #0003}.collapsed aside{transform:translateX(-110%);padding:12px 10px;border-right:1px solid #d9e2e9}main{width:100%;min-width:0;padding-bottom:64px;overflow-x:hidden}.toolbar{padding:9px 8px 6px;gap:7px;align-items:flex-start;flex-direction:column}.subject{font-size:20px;line-height:1.05}#status{font-size:10.5px}#days{width:100%;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}#days button{min-width:0;padding:8px 1px;font-size:9.5px;overflow:hidden;text-overflow:ellipsis}#days button:disabled{opacity:.35}.stage{display:grid;grid-template-columns:28px minmax(0,1fr) 28px;padding:2px 0 7px;align-items:center;min-height:0}.viewer{height:auto!important;min-height:0;width:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.viewer img{display:block;width:100%;height:auto;max-width:100%;max-height:none;object-fit:contain;border-radius:4px;box-shadow:0 3px 14px #17324a20}.arrow{font-size:31px;padding:0;min-width:0}.resource-links{margin:5px 7px;padding:9px 10px;font-size:12px}.answer-panel{margin:5px 7px 8px;padding:0 10px 10px;max-height:42dvh;overflow:auto}.answer-panel p,#answerBody p{font-size:14px;line-height:1.45}footer{left:0!important;height:58px;padding:0 6px;gap:6px}.desmos-action,#viewAnswer{font-size:10.5px!important;padding:9px 10px!important}#dots{max-width:34vw;gap:3px}.dot{width:5px;height:5px}#count{font-size:10px;min-width:38px}.desmos-modal{padding:0}.desmos-shell{width:100vw;height:100dvh;border-radius:0}.desmos-top{height:52px;flex-basis:52px;padding:0 9px}.desmos-top span{display:none}.desmos-top strong{font-size:14px}.desmos-top button{font-size:11px;padding:7px 8px}.desmos-grid{grid-template-columns:1fr;grid-template-rows:minmax(150px,32dvh) minmax(0,1fr)}.task-pane{padding:5px;border-right:0;border-bottom:1px solid #ccd9e2}.task-pane img{max-height:100%;max-width:100%;box-shadow:none}.calculator{min-height:0}.current-week-card{margin:0 2px 8px}.week-nav{grid-template-columns:28px minmax(0,1fr) 28px}.week-switch .weekbtn{min-height:42px}.note{margin-top:10px}}
@media(max-width:480px){.brand strong{font-size:13px}.subject{font-size:18px}.stage{grid-template-columns:24px minmax(0,1fr) 24px}.arrow{font-size:27px}#days button{font-size:8.5px}.desmos-grid{grid-template-rows:minmax(120px,27dvh) minmax(0,1fr)}footer{gap:4px}.desmos-action,#viewAnswer{padding:8px 8px!important;font-size:9.5px!important}#dots{max-width:25vw}}

/* V15 QA: prevent controls from covering slide content; retire old dark-blue answer button. */
main{padding-bottom:0!important}
footer{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;background:#eef3f7!important;box-shadow:none!important;backdrop-filter:none!important;border-top:1px solid #d6e0e7}
#viewAnswer{background:#fff!important;color:#174f7b!important;border:1px solid #8fb2c8!important;box-shadow:none!important}
#viewAnswer:hover{background:#eaf3f8!important}
#viewAnswer[hidden]{display:none!important}
.answer-panel[hidden]{display:none!important}
@media(max-width:900px){main{padding-bottom:0!important}footer{position:relative!important;left:auto!important}}
