:root{font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#24334a;background:#f4f7fb;--accent:#2864d2;--border:#dce4ef;--muted:#738096;--panel:white;--bg:#f4f7fb}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}a{color:var(--accent);text-decoration:none}button,.button{border:1px solid var(--border);border-radius:10px;padding:10px 15px;background:var(--panel);color:inherit;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:550;font-size:16px}button:hover,.button:hover{background:#edf3ff;border-color:#aec7f0}button:disabled{opacity:.5;cursor:wait}.primary{background:var(--accent);color:white;border-color:var(--accent)}.primary:hover{background:#1f55b8;color:white}.danger{color:#b53545}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #9abdf5;outline-offset:3px}input,select,textarea{width:100%;padding:12px 13px;border:1px solid #cdd8e6;border-radius:10px;background:var(--panel);color:inherit;min-width:0}label{display:block;font-size:15px;font-weight:600;margin:0 0 8px}h1{font-size:34px;letter-spacing:-.7px;margin:0 0 10px}h2{font-size:22px;letter-spacing:-.3px;margin:0 0 16px}h3{font-size:18px;margin:0 0 10px}p{line-height:1.6}.muted{color:var(--muted);font-size:16px}.small{font-size:13px}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.between{justify-content:space-between}.stack{display:grid;gap:18px}.field{margin:0 0 18px}.logo{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:750;letter-spacing:-.3px}.brandmark{display:grid;place-items:center;width:36px;height:36px;background:#2864d2;color:white;border-radius:11px;font-size:25px}.shell{display:grid;grid-template-columns:246px minmax(0,1fr);min-height:100vh}.sidebar{background:var(--panel);border-right:1px solid var(--border);padding:28px 20px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}.sidebar nav{display:grid;gap:5px;margin-top:36px}.nav-item{text-align:left;justify-content:flex-start;background:transparent;border-color:transparent;padding:12px 13px;color:#62728a;position:relative}.nav-item.active{background:#edf3ff;color:#225bbb}.nav-item.active:before{content:'';position:absolute;left:0;width:3px;height:18px;background:#2864d2;border-radius:3px}.sidebar-foot{margin-top:auto;border-top:1px solid var(--border);padding-top:18px}.avatar{width:38px;height:38px;border-radius:50%;background:#e9effa;color:#3b62a1;display:grid;place-items:center;font-weight:650}.user-name{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:600}.main{padding:36px 44px 60px;max-width:1440px;width:100%;margin:auto}.topline{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);padding-bottom:22px;margin-bottom:34px;color:var(--muted);font-size:15px}.version{font-size:12px;background:#eaf0fb;color:#476b9f;padding:5px 9px;border-radius:20px}.page-head{margin-bottom:28px}.page-head p{margin:0;color:var(--muted)}.card{background:var(--panel);border:1px solid var(--border);border-radius:16px;padding:24px}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.stat{font-size:38px;letter-spacing:-1px;font-weight:650;margin:15px 0 0}.section{margin-top:28px}.empty{padding:48px 25px;text-align:center;background:var(--panel);border:1px dashed #c9d6e8;border-radius:16px}.empty .empty-icon{font-size:29px;color:#6084bd;margin-bottom:16px}.empty p{max-width:480px;margin:0 auto 20px;color:var(--muted);font-size:16px}.list-card{display:flex;align-items:center;gap:18px;justify-content:space-between;background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:20px 22px;margin-bottom:12px}.list-card h3{margin-bottom:6px}.list-card p{margin:4px 0;color:var(--muted);font-size:15px}.pill{display:inline-flex;padding:5px 10px;border-radius:20px;font-size:12px;font-weight:600;background:#edf2fa;color:#536b8f}.pill.green{background:#e8f5ed;color:#24774a}.pill.amber{background:#fff4dc;color:#8b6525}.table-wrap{overflow:auto;background:var(--panel);border:1px solid var(--border);border-radius:14px}table{width:100%;border-collapse:collapse;font-size:16px;text-align:left}th{padding:14px 18px;background:#f8fafc;color:#748198;font-weight:550;font-size:13px;white-space:nowrap}td{padding:17px 18px;border-top:1px solid #edf1f6;vertical-align:top}.auth-shell{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.auth-story{padding:64px 10%;background:#eef3fc;display:flex;flex-direction:column;justify-content:space-between;position:relative}.auth-story h1{font-size:49px;line-height:1.14;max-width:470px;letter-spacing:-1.7px}.auth-story p{max-width:440px;color:#72809a}.auth-note{padding:20px;border:1px solid #d9e3f2;border-radius:14px;background:#ffffff85;max-width:440px}.auth-note p{margin:8px 0 0;font-size:15px}.auth-panel{display:flex;align-items:center;justify-content:center;padding:36px;background:var(--panel)}.auth-form{width:100%;max-width:390px}.auth-form h1{font-size:32px}.auth-tabs{display:flex;gap:20px;margin:28px 0;border-bottom:1px solid var(--border)}.auth-tabs button{border:0;border-radius:0;padding:0 0 13px;background:none;color:var(--muted)}.auth-tabs .active{color:var(--accent);border-bottom:2px solid var(--accent)}.auth-form .primary{width:100%;padding:13px}.form-error{color:#b53545;background:#fff1f0;padding:10px 13px;border-radius:9px;font-size:15px;line-height:1.5;margin-bottom:16px}.form-error:empty{display:none}#notice{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:90vw;background:#25344d;color:white;padding:13px 20px;border-radius:12px;box-shadow:0 8px 30px #24334a30;z-index:3000;font-size:16px}dialog{padding:28px;border:1px solid var(--border);border-radius:18px;background:var(--panel);color:inherit;width:min(540px,calc(100vw - 30px));max-height:85vh;overflow:auto}dialog::backdrop{background:#13223c65;backdrop-filter:blur(3px)}dialog.wide{width:min(950px,calc(100vw - 30px))}.loading{padding:80px;text-align:center;color:var(--muted)}.search{width:280px}.invite-code{padding:14px;background:#f5f8fd;border:1px dashed #c0cfe5;border-radius:10px;overflow-wrap:anywhere;font-family:ui-monospace,monospace;font-size:15px}.lesson-rich{line-height:1.6;overflow-wrap:anywhere}.lesson-rich p:first-child{margin-top:0}.lesson-rich p:last-child{margin-bottom:0}.lesson-rich img,.lesson-image{max-width:100%;max-height:400px;object-fit:contain}.work-shell{max-width:880px;margin:0 auto;padding:26px 22px 70px}.work-header{position:sticky;top:0;background:var(--panel);border-bottom:1px solid var(--border);padding:13px 24px;display:flex;align-items:center;gap:14px;flex-wrap:wrap;z-index:20}.work-header a{margin-right:auto}.work-meta{display:flex;gap:16px;margin-top:15px;color:var(--muted);font-size:15px}.work-block{padding:25px;background:var(--panel);border:1px solid var(--border);border-radius:15px;margin:16px 0}.work-block h2{line-height:1.35}.option{display:flex;align-items:center;gap:10px;font-weight:400;border:1px solid var(--border);border-radius:10px;padding:12px;margin:10px 0;cursor:pointer}.option input{width:17px;height:17px}.gap-input{width:160px;display:inline-block;margin:5px}.match-row{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:center;margin:12px 0}.feedback{padding:13px;border-radius:10px;background:#edf3fc;margin-top:12px;font-size:16px}.feedback.correct{background:#e8f5ed;color:#24774a}.feedback.incorrect{background:#fff1ef;color:#a7433e}.hint{background:#fff6de}.work-foot{display:flex;gap:10px;justify-content:space-between;margin-top:25px}.progressbar{height:5px;background:#e3eaf4;flex:1;min-width:80px;border-radius:5px;overflow:hidden}.progressbar span{display:block;height:100%;background:var(--accent);transition:width .2s}.timer{font-variant-numeric:tabular-nums;font-size:16px;font-weight:600}.start-card{margin:65px auto;max-width:620px;padding:38px;text-align:center}.start-card h1{font-size:32px}.start-card .primary{margin-top:20px;padding:13px 30px}.answer-code{white-space:pre-wrap;overflow-wrap:anywhere}.work-block.callout{border-left:4px solid var(--accent);background:#edf3fc}.order-row{display:flex;align-items:center;gap:10px;border:1px solid var(--border);padding:10px;border-radius:9px;margin:8px 0}.order-row span{flex:1}.result-question{border-top:1px solid var(--border);padding:20px 0}.mobile-menu{display:none}body.student-dark{--panel:#1c293b;--border:#384a62;--muted:#a6b6cc;--bg:#101827;background:var(--bg);color:#e6edf8}body.student-dark th,body.student-dark .feedback{background:#26374f}body.student-dark .work-block.callout{background:#26374f}@media(max-width:1050px){.main{padding:28px 24px}.shell{grid-template-columns:215px minmax(0,1fr)}.sidebar{padding:24px 14px}.cards{gap:12px}.auth-story{padding:45px 8%}.auth-story h1{font-size:39px}}@media(max-width:760px){.shell{display:block}.sidebar{height:auto;position:static;padding:16px;border-right:0;border-bottom:1px solid var(--border)}.sidebar nav{display:flex;overflow:auto;margin-top:18px;gap:3px}.nav-item{white-space:nowrap;padding:10px;font-size:13px}.sidebar-foot{display:none}.main{padding:22px 16px}.topline{margin-bottom:25px;padding-bottom:15px}.cards{grid-template-columns:1fr}.cards .card{display:flex;align-items:center;justify-content:space-between}.stat{margin:0}.list-card{align-items:flex-start;flex-direction:column;padding:18px}.auth-shell{display:block}.auth-story{padding:22px;background:transparent}.auth-story>div:nth-child(2),.auth-note{display:none}.auth-panel{padding:25px 22px}.auth-form{max-width:460px}h1{font-size:28px}.search{width:100%}.work-header{padding:12px}.work-shell{padding:20px 12px 50px}.work-block{padding:18px}.match-row{grid-template-columns:1fr;gap:8px}.start-card{padding:26px;margin:25px 0}.work-foot{flex-wrap:wrap}.topline .version{display:none}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}


  .student-theme,.python-launch{border:1px solid #cad8ea;background:#f2f6fd;border-radius:9px;padding:8px 12px;cursor:pointer}

  .python-window{position:fixed;z-index:1000;top:11vh;left:15vw;width:min(740px,85vw);height:min(640px,77vh);min-width:310px;min-height:190px;max-width:100vw;max-height:100vh;resize:both;overflow:hidden;display:flex;flex-direction:column;border:1px solid #60738c;border-radius:13px;box-shadow:0 22px 60px #0005;font-family:Arial,sans-serif}
  .python-window[hidden]{display:none!important}
  .python-window[data-theme=dark]{--py-bg:#17212f;--py-fg:#e2eaf7;--py-panel:#222e40;--py-line:#41516a;--py-input:#111b29}
  .python-window[data-theme=light]{--py-bg:#f8fafc;--py-fg:#1f334c;--py-panel:#eaf0f8;--py-line:#b7c9dc;--py-input:#fff}
  .python-window{background:var(--py-bg);color:var(--py-fg)}
  .python-titlebar{background:var(--py-panel);border-bottom:1px solid var(--py-line);display:flex;justify-content:space-between;align-items:center;padding:7px 11px;cursor:move;touch-action:none;user-select:none}
  .python-controls{display:flex;gap:5px}.python-controls button{border:1px solid var(--py-line);border-radius:6px;background:var(--py-bg);color:var(--py-fg);padding:5px 10px;cursor:pointer}
  .python-content{display:flex;flex-direction:column;gap:10px;padding:16px;overflow:auto;flex:1;min-height:0;box-sizing:border-box}.python-content[hidden]{display:none!important}
  .python-label{font-size:13px;color:var(--py-fg);opacity:.82}
  .python-code,.python-stdin,.python-output{box-sizing:border-box;background:var(--py-input);color:var(--py-fg);border:1px solid var(--py-line);border-radius:7px;padding:12px;font:14px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;width:100%;tab-size:4}
  .python-code{flex:1;min-height:180px;resize:vertical}.python-stdin{resize:vertical;min-height:48px}.python-output{margin:0;min-height:90px;max-height:180px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
  .python-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.python-run{background:#276ad4;color:#fff;border:0;border-radius:8px;padding:9px 16px;cursor:pointer}.python-run:disabled{opacity:.6}
  .python-status{font-size:13px;opacity:.8}.python-window.python-minimized{height:auto!important;min-height:0!important;resize:none}
  .python-window.python-maximized{top:0!important;left:0!important;width:100vw!important;height:100vh!important;max-width:none;max-height:none;border-radius:0;resize:none}
  body.student-dark{background:#101827;color:#e6edf8}body.student-dark header,body.student-dark .student-card{background:#1c293b;color:#e6edf8;border-color:#384a62}
  body.student-dark .muted,body.student-dark .type-label{color:#b4c5dd}body.student-dark .student-option{border-color:#40516a}
  body.student-dark .student-input,body.student-dark .student-option select{background:#152133;color:#e6edf8;border-color:#4a607c}
  body.student-dark .student-theme,body.student-dark .python-launch{background:#2a3a52;color:#e6edf8;border-color:#40516a}
  /* Keep the console bottom edge visible even when the floating window shrinks. */
  .python-content{overflow:hidden!important;min-height:0!important;gap:0!important;padding:0!important;display:flex!important;flex-direction:column!important}
  .python-editor-pane{flex:1 1 0;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:14px 15px 8px;box-sizing:border-box}
  .python-editor-pane .python-code{flex:1 0 105px;min-height:105px}
  .python-console-pane{flex:0 1 170px;height:170px;min-height:85px;max-height:calc(100% - 35px);min-width:0;display:flex;flex-direction:column;gap:6px;padding:0 15px 14px;box-sizing:border-box;overflow:hidden}
  .python-console-pane .python-output{flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:auto!important}
  .python-console-pane .python-label{flex:0 0 auto}
  .python-console-pane .python-output-resize{flex:0 0 13px}
  .python-window{resize:none!important}
  .python-stdin-section{border:1px solid var(--py-line);border-radius:8px;padding:0 10px;background:var(--py-panel)}
  .python-stdin-summary{padding:10px 2px;cursor:pointer;font-size:15px;font-weight:600;user-select:none}
  .python-stdin-section .python-stdin{margin:0 0 10px;display:block}
  .python-output{height:120px;min-height:90px;max-height:none;flex:0 0 120px;overflow:auto}
  .python-output-resize{height:13px;min-height:13px;flex:0 0 13px;cursor:ns-resize;text-align:center;color:var(--py-fg);opacity:.7;line-height:9px;border-top:1px solid var(--py-line);touch-action:none;user-select:none}
  .python-resize-grip{position:absolute;z-index:5;touch-action:none}
  .python-resize-n{top:0;left:12px;right:12px;height:7px}
  .python-resize-s{bottom:0;left:12px;right:12px;height:7px}
  .python-resize-e{right:0;top:12px;bottom:12px;width:7px}
  .python-resize-w{left:0;top:12px;bottom:12px;width:7px}
  .python-resize-ne{right:0;top:0;width:15px;height:15px}
  .python-resize-nw{left:0;top:0;width:15px;height:15px}
  .python-resize-se{right:0;bottom:0;width:15px;height:15px}
  .python-resize-sw{left:0;bottom:0;width:15px;height:15px}
  @media(max-width:800px){.python-window{left:3vw;top:10vh;width:94vw;height:75vh;min-width:0}header{padding:12px}}

.course-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px;margin-top:24px}.course-card{display:flex;flex-direction:column;gap:12px}.course-card .primary{align-self:flex-start;margin-top:auto}.course-progress{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:10px 0}.course-progress progress{width:180px;height:9px;accent-color:#4065df}.back-link{margin-bottom:20px}.section .page-head h1{font-size:27px}

.work-block.callout h3{color:var(--callout-accent,var(--accent));margin-top:0}

.lesson-image{display:block;margin-left:auto;margin-right:auto}

/* Administrator-only, short-lived test-account session. */
.beta-debug-banner{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:14px 0;padding:14px 18px;border:1px solid #d4a347;border-radius:12px;background:#fff8e8;color:#594322}
.beta-debug-banner strong{font-weight:750}
.beta-debug-banner span{font-size:15px}
.beta-debug-banner button{white-space:nowrap}
@media(max-width:600px){.beta-debug-banner{align-items:stretch;flex-direction:column}.beta-debug-banner button{width:100%}}

/* Preserve teacher-authored paragraph breaks on the pupil's start screen. */
.lesson-description{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}

