*{box-sizing:border-box}body{margin:0;background:#f4f5f7;color:#202b3c;font:16px/1.5 Arial,sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid #c9ced7;background:#fff;color:#273349;border-radius:7px;padding:9px 13px;font-weight:600;line-height:1.4;display:inline-flex;align-items:center;justify-content:center;gap:7px}button:hover{background:#f0f2f6}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #2855b6;outline-offset:3px}[hidden]{display:none!important}.button-icon{width:18px;height:18px;flex:none}.app-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 24px;background:#fff;border-bottom:1px solid #e1e4e9}.brand{display:flex;align-items:center;gap:10px}.mark{width:36px;height:36px;display:grid;place-items:center;background:#e9effb;color:#244fba;border-radius:8px;font:700 20px monospace}h1{font-size:21px;line-height:1.2;margin:0 0 3px}.brand div>span{display:block;font-size:13px;color:#647084;line-height:1.4}main{max-width:1600px;margin:auto;padding:20px 24px}.file-menu{position:relative;flex-shrink:0}.file-menu>summary{display:flex;align-items:center;gap:18px;list-style:none;border:1px solid #c9ced7;border-radius:7px;padding:8px 13px;cursor:pointer;font-weight:600;font-size:15px}.file-menu>summary::-webkit-details-marker{display:none}.file-menu[open]>summary{background:#f0f3fa}.file-options{position:absolute;top:calc(100% + 8px);right:0;z-index:25;background:#fff;border:1px solid #d4dae4;box-shadow:0 8px 24px #19243b1a;padding:6px;border-radius:9px;min-width:210px}.file-options button{width:100%;justify-content:flex-start;text-align:left;background:transparent;border:0;box-shadow:none;color:#273349;padding:11px}.file-options button:hover{background:#f0f3fa}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:16px}.actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.primary{background:#2855b6;border-color:#2855b6;color:#fff;min-width:95px}.primary:hover{background:#204797}.step,.stuck-button{background:#fff;color:#374963}#stop{color:#9c2c23;border-color:#ddc5c1}.toolbar #status{font-size:14px;color:#5a677c;line-height:1.5}.workspace{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:18px;align-items:stretch}.panel{min-width:0;background:#fff;border:1px solid #dce1e8;border-radius:9px;overflow:hidden}.panelhead{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#fff;border-bottom:1px solid #e6e9ef;gap:12px}.panelhead h2{font-size:16px;font-weight:700;margin:0}.panelhead>span{font-size:12px;color:#718096}.code{display:flex;flex-direction:column}#editor{min-height:470px;flex:1}.cm-editor{height:100%;font-size:22px}.cm-scroller{font-family:Consolas,'Courier New',monospace!important;line-height:1.65!important}.cm-content{padding-top:12px!important}.cm-line{padding-left:12px!important}.cm-gutters{background:#fafbfc!important;border:0!important;color:#8a94a4!important;min-width:42px}.cm-tooltip-autocomplete{font-size:16px}.current-line{background:#fff0ae!important;border-left:3px solid #d8ad22}.error-line{background:#fff0ee!important;border-left:3px solid #ce4e40}.codefoot{padding:9px 16px;border-top:1px solid #eef0f4;font-size:12px;color:#768094}.right{display:flex;min-width:0}.console{width:100%;display:flex;flex-direction:column}.consolebody{flex:1;padding:18px;min-height:430px;max-height:650px;overflow:auto;background:#fff;color:#263449;font:20px/1.65 Consolas,'Courier New',monospace}pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font:inherit}#consolehint{font:15px/1.7 Arial,sans-serif;color:#758095;margin:0}#input-callout{padding:12px 16px;background:#fff5cd;color:#594610;border-bottom:1px solid #ead8a1}#input-callout strong,#input-callout span{display:block;font-size:15px;line-height:1.6}#inputform{display:flex;align-items:center;gap:9px;margin-top:10px}#inputform label{color:#516078;font-size:23px}#answer{width:100%;min-width:0;color:#273349;background:#fffdf4;border:2px solid #dab752;border-radius:6px;padding:9px;font-size:19px}#inputform button{font-size:15px}.waiting-input{border-color:#d8b656}.waiting-input #inputform button{background:#fff2be;color:#56410a;border-color:#d8b656}#error{margin:0;padding:16px;background:#fff7f6;border-top:1px solid #e7bbb6;color:#523c3b}#error h2{color:#9e3025;font-size:18px;margin:0 0 8px}#errmessage{font:600 16px/1.6 Arial,sans-serif;margin:0 0 8px}#errhelp{font-size:15px;line-height:1.7;margin:0 0 10px}.example,.python-details{margin-top:12px;font-size:14px}.example summary,.python-details summary{cursor:pointer;font-weight:600;padding:4px 0}.example pre,.python-details pre{font:14px/1.7 Consolas,monospace;background:#fff;border:1px solid #eadbd9;border-radius:6px;margin-top:8px;padding:10px}footer{display:flex;justify-content:space-between;gap:15px;font-size:12px;line-height:1.7;color:#727d8f;margin-top:15px}.back-studio{font-size:14px;text-decoration:none;color:#2855b6;font-weight:600}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* One help window, containing both questions and examples. */
.dr-helper{position:fixed;z-index:40;right:20px;bottom:20px;width:430px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 40px);background:#fff;display:flex;flex-direction:column;border:1px solid #c3cddd;border-radius:11px;box-shadow:0 12px 50px #1c2c4b33;overflow:hidden}.dr-helper-head{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid #e0e5ed;background:#fff}.helper-badge{display:grid;place-items:center;width:33px;height:33px;border-radius:7px;background:#e9effb;color:#244fba;font:700 19px monospace}.dr-helper-head h2{font-size:18px;margin:0}.dr-helper-head p{font-size:13px;color:#6a778b;margin:3px 0 0}.dr-helper-head>button{margin-left:auto;border:0;font-size:24px;font-weight:400;padding:2px 8px}.dr-helper-body{overflow-y:auto;padding:16px;overscroll-behavior:contain}.helper-library{border:1px solid #dbe1eb;border-radius:7px;margin-bottom:18px}.helper-library>summary{cursor:pointer;padding:11px 13px;font-size:15px;font-weight:600;color:#2855b6}.help-content{padding:0 12px 14px}.help-content>label{display:block;font-size:14px;margin:8px 0}.help-content select{width:100%;padding:9px;background:#fff;border:1px solid #bfc9d8;border-radius:6px;font-size:15px;color:#273349}.help-content>a{display:block;margin-top:12px;font-size:14px;color:#2855b6}.help-content .recipe{margin-top:12px;padding:0;border:0;box-shadow:none}.help-content .recipe-icon,.help-content .recipe-tag{display:none}.help-content .recipe h2{font-size:17px}.helper-welcome{font-size:15px;line-height:1.7;color:#4c5c74;margin:0 0 15px}.dr-helper label{display:block;font-size:15px;font-weight:600;margin-bottom:8px}.dr-helper textarea{font:16px/1.6 Arial,sans-serif;width:100%;min-height:92px;max-height:180px;resize:vertical;padding:10px;border:1px solid #b7c3d4;border-radius:7px;color:#273349}.helper-submit{width:100%;margin-top:9px;background:#2855b6;color:#fff;border-color:#2855b6}.helper-submit:hover{background:#204797}.helper-topics{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0 16px}.helper-topics button{font-size:13px;font-weight:500;padding:6px 9px;border-color:#d1d9e5}.helper-reply{border-top:1px solid #e3e8ef;padding-top:14px}.helper-reply h3{font-size:17px;margin:0 0 9px}.helper-reply p{font-size:15px;line-height:1.7;margin:0 0 12px;white-space:pre-wrap}.helper-next{border-left:3px solid #2855b6;padding:10px 12px;background:#f3f6fc;border-radius:4px;margin:12px 0}.helper-next strong{font-size:14px;color:#244f9b}.helper-next p{margin:5px 0 0}.dr-helper details summary{font-size:14px;font-weight:600;cursor:pointer}.dr-helper #stuck-example{margin:14px 0}.dr-helper details pre{font:16px/1.7 Consolas,monospace;background:#f5f7fa;padding:12px;border-radius:6px;border:1px solid #dfe5ec;margin-top:10px;color:#263449}.dr-helper details p{font-size:13px;line-height:1.6;color:#69768a}.dr-helper #stuck-line,.dr-helper #stuck-more{font-size:14px;padding:7px 10px;margin:4px 0}#stuck-hint{font-size:15px;line-height:1.7;background:#f3f6fc;padding:10px;border-radius:6px}.helper-check{font-size:14px;color:#4a5c78;line-height:1.7}.helper-note{font-size:12px;color:#778397;line-height:1.6;border-top:1px solid #e5e9ef;padding-top:12px;margin:15px 0 0}
/* Full-page examples remain available from the helper. */
.how-page{max-width:1250px}.how-intro{padding:5px 0 22px}.eyebrow{font-size:12px;letter-spacing:1px;font-weight:700;color:#6b7890}.how-intro h2{font-size:29px;margin:6px 0 9px}.how-intro>p{font-size:16px;color:#596b85;margin:0 0 16px}.learning-path{display:flex;flex-wrap:wrap;gap:10px}.learning-path>span{font-size:13px;background:white;border:1px solid #dfe4eb;border-radius:6px;padding:7px 10px;color:#5d6a7e}.learning-path b{margin-right:6px;color:#2855b6}.recipes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.recipe{background:#fff;border:1px solid #dce2ea;border-radius:8px;padding:19px;min-width:0}.recipe-title{display:flex;align-items:center;gap:10px}.recipe-icon{display:grid;place-items:center;width:36px;height:36px;flex-shrink:0;background:#f0f3f8;color:#5b6c86;border-radius:7px;font:700 18px monospace}.recipe-tag{font-size:11px;color:#718096;letter-spacing:.7px}.recipe h2{font-size:18px;line-height:1.4;margin:3px 0 0}.recipe p{font-size:14px;line-height:1.7;color:#53637b}.snippet{border:1px solid #dbe2ec;background:#fafbfd;border-radius:7px;overflow:hidden;margin:14px 0}.snippetbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;border-bottom:1px solid #e2e7ef}.snippetbar>span{font-size:11px;letter-spacing:.8px;color:#758297}.copy{font-size:12px;padding:5px 8px;font-weight:500}.snippet pre{padding:12px;font:14px/1.8 Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;color:#273349}.str{color:#285876}.num{color:#674a91}.kw,.fn{color:#2855b6}.result{border-left:2px solid #d4deee;padding-left:10px}.tip{font-size:13px!important}.input-reminder{background:#fff;border:1px solid #d9e0e9;border-radius:8px;padding:17px;margin:0 0 22px;max-width:850px}.input-reminder>strong{font-size:16px;display:block;margin-bottom:10px}.input-reminder>code{display:block;font:17px/1.7 Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;background:#f5f7fb;padding:10px;border-radius:5px}.input-reminder>p{font-size:14px;line-height:1.7}.print-reminder{display:flex;flex-wrap:wrap;gap:10px;align-items:center;font-size:14px;color:#596980}.print-reminder code{font-size:16px;color:#273349}.copy-status{font-size:14px;color:#53637b}.how-page footer a{color:#2855b6}
@media(max-width:1050px){.toolbar #status{flex-basis:100%}.recipes{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:800px){.app-header{padding:13px 16px}main{padding:16px}.workspace{grid-template-columns:1fr;gap:16px}#editor{min-height:330px;height:330px}.consolebody{min-height:220px;max-height:440px}.cm-editor{font-size:21px}footer{flex-direction:column;gap:4px}.dr-helper{right:12px;bottom:12px;max-height:calc(100dvh - 24px)}}@media(max-width:500px){.brand div>span{max-width:245px;font-size:12px}.mark{display:none}.actions{gap:7px}.actions button{font-size:14px;padding:9px 10px}.toolbar{gap:10px}.panelhead{padding:11px 13px}.panelhead #saved{font-size:11px}.recipes{grid-template-columns:1fr}.how-intro h2{font-size:25px}}

/* A small amount of colour gives each area a clear identity. */
body{background:#eef4fb}.app-header{background:#e8f1ff;border-bottom-color:#d2dff3}.mark{background:#ffe077;color:#243e73}.brand h1{color:#203e70}.file-menu>summary{background:#fff;border-color:#bdcde7;color:#284b7c}.code>.panelhead{background:#eaf1ff;color:#244a87}.console>.panelhead{background:#e9f6f1;color:#28674f}.stuck-button{background:#f0eafb;border-color:#d0c2e8;color:#604185}.stuck-button:hover{background:#e7dcf8}.step{background:#edf3ff;border-color:#bfd0eb;color:#2d5189}.step:hover{background:#e1ebfc}.dr-helper-head{background:#f0eafb;border-bottom-color:#dcd0ec}.helper-badge{background:#e4d8f4;color:#604185}.dr-helper-head h2{color:#604185}.helper-submit{background:#65508a;border-color:#65508a}.helper-submit:hover{background:#534072}.helper-next{background:#f4f0fa;border-left-color:#8064a6}.helper-next strong{color:#604185}.new-programme-dialog{max-width:min(460px,calc(100vw - 32px));width:460px;background:#fff;border:1px solid #c9d7e9;border-radius:12px;padding:25px;color:#293a55;box-shadow:0 16px 65px #1a315340}.new-programme-dialog::backdrop{background:#1e33515c}.new-programme-dialog h2{font-size:22px;margin:0 0 12px;color:#274b80}.new-programme-dialog p{font-size:16px;line-height:1.7;margin:10px 0}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:22px}

.robot-logo{display:block;flex:none;width:48px;height:48px;object-fit:contain}.helper-robot{width:44px;height:44px}@media(max-width:500px){.robot-logo{width:40px;height:40px}.brand div>span{max-width:215px}}

#run{background:#4ade80;border-color:#22c55e;color:#06351c;font-weight:700}#run:hover:not(:disabled){background:#22c55e;border-color:#16a34a}

.challenge-button{background:#ffe16a;border-color:#e0ba35;color:#57410a;font-weight:700}.challenge-button:hover{background:#ffd44c}.dr-helper-body h3{font-size:18px;line-height:1.5;margin:0 0 10px}#challenge-picker>p{font-size:15px;line-height:1.6;color:#53637b}#challenge-form fieldset{padding:0;margin:14px 0;border:0;display:grid;gap:9px}.dr-helper .topic-check{display:flex;align-items:center;gap:12px;border:1px solid #d7dfea;border-radius:8px;padding:12px;margin:0;cursor:pointer}.topic-check:has(input:checked){border-color:#c7a02e;background:#fff9df}.topic-check input{width:20px;height:20px;accent-color:#8a6914;flex:none}.topic-check strong,.topic-check small{display:block}.topic-check strong{font-size:15px}.topic-check small{font-size:13px;font-weight:400;color:#657187;margin-top:4px}.pick-error{font-size:14px;color:#a6372b}.challenge-label{font-size:12px;font-weight:700;letter-spacing:1px;color:#856014}#challenge-title{margin-top:7px}#challenge-topics{font-size:13px;color:#68758a}#challenge-steps{padding-left:23px;font-size:16px;line-height:1.7}#challenge-steps li{margin:9px 0;padding-left:3px}.challenge-test{background:#fff7d8;border-radius:7px;padding:12px;color:#5a481a;font-size:15px;line-height:1.7}#challenge-hint{margin:15px 0}#challenge-hint p{font-size:15px}.challenge-task-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.challenge-task-actions button{font-size:14px}
