.practice{margin:20px 0;padding:20px;border:1px solid #c8dafa;border-radius:16px;background:#f6f9ff;color:#101010}.practice h3{margin:0 0 10px}.practice textarea{box-sizing:border-box;width:100%;min-height:320px;resize:vertical;font:14px/1.6 Menlo,monospace;background:#fff;color:#111;border:1px solid #9bb6e0;border-radius:10px;padding:14px;tab-size:4;white-space:pre;overflow:auto}.practice label{display:block;font-weight:600;margin:12px 0 6px}.practice-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.practice button{padding:9px 14px;border:1px solid #174ea6;border-radius:8px;background:white;color:#174ea6;cursor:pointer}.practice button:first-child{background:#174ea6;color:white}.practice button:disabled{opacity:.5;cursor:default}.practice-results{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.6 Menlo,monospace;max-height:420px;overflow:auto}.practice-status{font-weight:600}.practice details{margin:10px 0}.practice summary{cursor:pointer}.practice pre{white-space:pre;overflow:auto;max-height:330px}.practice textarea:focus-visible,.practice button:focus-visible{outline:3px solid #74a8f4;outline-offset:2px}
.practice-open{display:block;width:calc(100% - 28px);margin:14px;padding:13px 16px;border:1px solid #174ea6;border-radius:10px;background:#174ea6;color:white;font-weight:600;cursor:pointer}.practice-modal{box-sizing:border-box;width:min(820px,calc(100% - 24px));max-height:88dvh;margin:auto;padding:24px;overflow:auto}.practice-modal::backdrop,.topics-dialog::backdrop{background:#10244499;backdrop-filter:blur(4px)}.practice-modal-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;position:sticky;top:-24px;background:#f6f9ff;padding:12px 0;z-index:2}.practice-modal-heading h3{font-size:21px}.practice-modal-heading button{flex-shrink:0}.practice-sound{display:flex!important;gap:9px;align-items:center;font-size:14px}.practice-sound input{width:18px;height:18px}.practice-feedback{background:#fff2df;border:1px solid #d39a36;border-radius:10px;padding:14px;display:flex;align-items:center;gap:15px;margin:14px 0}.practice-confetti{position:absolute;inset:0;pointer-events:none;z-index:5}.practice-confetti i{position:absolute;left:50%;top:70%;width:8px;height:13px;animation:practice-pop 1.5s ease-out forwards}@keyframes practice-pop{0%{transform:translate(0,0);opacity:1}65%{opacity:1}100%{transform:translate(var(--x),var(--y)) rotate(var(--r));opacity:0}}@media(max-width:600px){.practice-modal{padding:16px}.practice-modal-heading{top:-16px}.practice-modal textarea{font-size:16px;min-height:280px}.practice-feedback{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){.practice-confetti{display:none}}
.practice-modal{overflow-x:hidden}

.practice-task{padding:16px;margin:8px 0 18px;border:1px solid #ccdcf4;border-radius:12px;background:white}.practice-task h2{font-size:18px;margin:0 0 10px}.practice-task p{margin:8px 0;font-size:14px;line-height:1.6}.practice-task .example{white-space:pre-wrap;overflow-wrap:anywhere}

.practice [hidden]{display:none!important}
.practice-success{position:sticky;bottom:16px;z-index:4;display:grid;grid-template-columns:1fr auto;gap:6px 16px;padding:18px 22px;margin:16px 0;border:1px solid #a6c9ff;border-radius:16px;background:#fff;box-shadow:0 10px 40px #174ea625;animation:practice-correct .3s ease-out}
.practice-success strong{font-size:24px;color:#174ea6}.practice-success span{grid-column:1;color:#101010}.practice-success button{grid-column:2;grid-row:1 / 3;align-self:center}
@keyframes practice-correct{from{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.practice-success{animation:none}}


.practice-optimal-tip{grid-column:1 / -1;font-size:14px;line-height:1.5;margin:8px 0 0}.practice-optimal-link{grid-column:1 / -1;color:#174ea6;text-decoration:underline;font-size:14px;font-weight:600;text-underline-offset:3px}

.practice-code-editor{position:relative;--gutter:3ch;font:14px/1.6 Menlo,monospace}
.practice-code-editor textarea{display:block;padding-left:calc(var(--gutter) + 14px);font:inherit;white-space:pre;overflow-wrap:normal}
.practice-line-numbers{position:absolute;left:1px;top:1px;bottom:1px;width:var(--gutter);overflow:hidden;background:#edf4ff;border-right:1px solid #d4e1f4;border-radius:9px 0 0 9px;pointer-events:none;user-select:none;color:#174ea6}
.practice-line-numbers>div{padding-top:14px;will-change:transform}
.practice-line-numbers span{display:block;text-align:right;padding-right:6px;height:1.6em}
.practice-line-numbers .error-line{background:#ffe0b2;color:#853c00;font-weight:700}
@media(max-width:600px){.practice-code-editor{font-size:16px}}

.practice-code-editor{background:#fff;border-radius:10px}
.practice-highlight{position:absolute;top:1px;bottom:1px;left:calc(var(--gutter) + 15px);right:1px;overflow:hidden;pointer-events:none;user-select:none;color:#111}
.practice-highlight>div{padding-top:14px;white-space:pre;font:inherit;tab-size:4;width:max-content}
.practice-code-editor textarea{position:relative;z-index:1;background:transparent;color:transparent;caret-color:#111;-webkit-text-fill-color:transparent}
.practice-code-editor textarea::selection{background:#a9ccff80}
.practice-line-numbers{z-index:2}
.python-keyword{color:#7a32a8}.python-builtin{color:#075ca8}.python-string{color:#16653e}.python-number{color:#a5480a}.python-comment{color:#596579}
@media(forced-colors:active){.practice-highlight{display:none}.practice-code-editor textarea{color:CanvasText;-webkit-text-fill-color:CanvasText;caret-color:CanvasText}}

pre[data-code] .trace-token{font:inherit;display:inline;white-space:inherit}
