:root{color-scheme:light;--ink:#152139;--muted:#5a677d;--line:#dce3ef;--blue:#4359ca;--orange:#a95412;--surface:#fff;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-size:16px}*{box-sizing:border-box}body{margin:0;background:#f3f6fc;color:var(--ink)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;min-height:44px;padding:10px 19px;border:1px solid #cad3e3;background:#fff;color:var(--ink);border-radius:9px;font-size:.9375rem;font-weight:600;transition:background .15s,box-shadow .15s}button:hover:not(:disabled){background:#edf1fb}button:focus-visible,a:focus-visible{outline:3px solid #6384f5;outline-offset:4px}button:disabled{cursor:default;opacity:.45}code,.mono{font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace}main{width:min(1180px,calc(100% - 64px));margin:0 auto;padding:36px 0 28px}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.eyebrow{font-size:.75rem;letter-spacing:.11em;font-weight:700;margin:0 0 11px;color:var(--muted)}h1{font-size:2rem;letter-spacing:-.035em;margin:0 0 10px;line-height:1.25;font-weight:720}h1 .mono{font-weight:700;letter-spacing:-.055em}.intro{margin:0;color:var(--muted);line-height:1.7;font-size:1rem}.simulation-label{font-size:.8125rem;padding:7px 11px;border:1px solid #d7dfec;border-radius:6px;white-space:nowrap;color:var(--muted);margin-top:30px}.controls{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:26px 0 22px}.mode-control{display:inline-flex;padding:4px;border:1px solid #cfd8e8;background:#e5ebf5;border-radius:11px}.mode{border:0;min-width:113px;background:transparent;color:#526075;min-height:41px;padding:8px 18px}.mode.active{background:#fff;color:var(--ink);box-shadow:0 1px 4px #10234918}.playback{display:flex;gap:9px}.primary{background:var(--ink);border-color:var(--ink);color:#fff;display:flex;align-items:center;justify-content:center;gap:9px;min-width:139px}.primary:hover:not(:disabled){background:#2a3c60}.primary span:first-child{font-size:.75rem}.reset{color:var(--muted);background:transparent}.workspace{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(330px,1fr);gap:22px;align-items:stretch}.experiment{min-width:0}.shared-panel{background:#121c32;border:1px solid #121c32;border-radius:15px;color:#fff;padding:22px 26px 0;overflow:hidden}.shared-heading{display:flex;justify-content:space-between;align-items:center}.shared-heading .eyebrow{color:#a9b7d1;margin:0}.shared-heading code{font-size:.875rem;color:#b5c2da}.counter-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:13px 0 18px}.counter{display:flex;align-items:baseline;gap:20px}.counter-name{font-size:1.125rem;color:#b7c5e2}.counter strong{font-family:"SFMono-Regular",Consolas,monospace;font-size:4.4rem;font-weight:500;line-height:1;letter-spacing:-.06em}.expected{display:flex;flex-direction:column;gap:5px;color:#bac6dc;font-size:.8125rem;line-height:1.5;text-align:right}.expected code{font-size:.9375rem;color:#edf2ff}.expected b{color:#fff;font-size:1rem}.lock-state{border-top:1px solid #33405a;padding:12px 0;display:flex;align-items:center;gap:9px;font-size:.875rem;line-height:1.5;color:#c3cfe4}.lock-symbol{color:#9facce}.lock-state.held{color:#c8d0ff}.lock-state.held .lock-symbol{color:#b6c2ff}.thread-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:15px}.thread{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px 13px;transition:border-color .15s,box-shadow .15s;min-width:0}.thread header{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:18px}.thread h2{font-size:.9375rem;display:flex;align-items:center;gap:8px;margin:0;white-space:nowrap}.thread-mark{width:25px;height:25px;background:#e8ecff;color:#3a4fac;display:inline-flex;align-items:center;justify-content:center;font-family:Consolas,monospace;font-size:.875rem;border-radius:6px}.thread-b .thread-mark{background:#fff0dc;color:#a95412}.thread-status{color:var(--muted);font-size:.75rem;white-space:nowrap}.local{display:flex;align-items:center;justify-content:space-between;padding:0 7px 14px;color:var(--muted);font-size:.875rem;gap:8px}.local strong{font:600 1.625rem "SFMono-Regular",Consolas,monospace;color:var(--blue)}.thread-b .local strong{color:var(--orange)}.code-steps{list-style:none;padding:0;margin:0}.code-steps li{display:flex;align-items:center;gap:14px;padding:9px 8px;border-radius:6px;line-height:1.4;color:#616d82;min-width:0}.code-steps li>span{font-size:.75rem;color:#73809a}.code-steps code{font-size:.875rem;white-space:nowrap;letter-spacing:-.025em}.thread-a .code-steps li.current{background:#edf0ff;color:#3248ac}.thread-b .code-steps li.current{background:#fff2e2;color:#955017}.code-steps li.current>span{color:inherit;font-weight:700}.thread.active-a{border-color:#8b9ae9;box-shadow:0 0 0 1px #8b9ae933}.thread.active-b{border-color:#daa268;box-shadow:0 0 0 1px #daa26833}.thread.blocked{border-style:dashed}.thread.blocked .thread-status{color:#985318}.lock-bracket{font-size:.75rem;padding:0 6px 5px;color:#657497;letter-spacing:-.03em}.lock-bracket.bottom{padding-top:5px;padding-bottom:0}.event-card{background:#e8eef9;border:1px solid #d7e0f1;border-radius:11px;padding:17px 20px;margin-top:15px;min-height:137px}.event-kicker{font-size:.75rem;font-weight:700;letter-spacing:.04em;margin:0 0 7px;color:#586b90}.event-card h3{font-size:1rem;margin:0 0 8px;line-height:1.5}.event-card>p:last-child{margin:0;font-size:.9375rem;color:#4a5d7f;line-height:1.7}.event-card.loss{background:#fff0dd;border-color:#eecfa6}.event-card.loss .event-kicker,.event-card.loss>p:last-child{color:#885017}.event-card.success{background:#e7f4ee;border-color:#b9d8cb}.event-card.success .event-kicker,.event-card.success>p:last-child{color:#2d6853}.timeline-panel{border:1px solid var(--line);border-radius:15px;background:#fff;padding:23px 23px 18px;min-width:0;display:flex;flex-direction:column}.timeline-panel header{display:flex;align-items:center;justify-content:space-between;gap:10px}.timeline-panel .eyebrow{margin-bottom:9px}.timeline-panel h2{font-size:1rem;margin:0;font-weight:650;line-height:1.5}#progress-label{font-size:.8125rem;color:var(--muted);white-space:nowrap}.progress-track{height:3px;background:#edf1f7;margin:19px 0 8px;overflow:hidden;border-radius:5px}#progress{height:100%;background:#6378d9;transition:width .25s;width:0}#timeline{list-style:none;padding:0;margin:0;flex:1}#timeline li{position:relative;display:grid;grid-template-columns:20px 27px 1fr auto;gap:9px;align-items:center;padding:17px 6px;border-bottom:1px solid #edf1f7;border-radius:6px;font-size:.875rem;min-height:64px}#timeline li.compact{padding-top:9px;padding-bottom:9px;min-height:43px}#timeline .index{font-family:Consolas,monospace;font-size:.75rem;color:#6b7790;text-align:center}#timeline .badge{width:24px;height:24px;display:inline-flex;justify-content:center;align-items:center;border-radius:6px;background:#e8ecff;color:#3a4fac;font:600 .8125rem Consolas,monospace}#timeline .badge.b{background:#fff0dc;color:#9b5417}#timeline .action{line-height:1.45}#timeline .value{font:500 .75rem Consolas,monospace;color:#60718e;white-space:nowrap}#timeline li.pending .badge{background:#f0f3f9;color:#7b859a}#timeline li.pending{color:#7c879a}#timeline li.pending .value{color:#8b95a7}#timeline li.current{background:#eef2ff;border-bottom-color:transparent;color:#243a85}#timeline li.current.b{background:#fff2e2;color:#895019}#timeline li.done:not(.current) .index::before{content:'✓';font-size:.75rem}#timeline li.done:not(.current) .index span{display:none}.timeline-foot{font-size:.75rem;color:#6c7890;margin:17px 0 0;line-height:1.6}.takeaways{display:grid;grid-template-columns:1fr 1fr;gap:48px;margin:29px 0 25px;padding:0 3px}.takeaways h2{font-size:1rem;margin:0 0 9px;line-height:1.5}.takeaways p{font-size:.9375rem;color:var(--muted);line-height:1.8;margin:0}.takeaways code{font-size:.9em}.takeaways strong{font-weight:600;color:#354560}footer{border-top:1px solid #d9e2ef;padding:18px 3px 0;color:#65728a;font-size:.8125rem;line-height:1.8}footer p{margin:0}footer .source{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}a{color:#526696;text-underline-offset:3px}a:hover{color:#273f86}[hidden]{display:none!important}@media(max-width:970px){main{width:calc(100% - 40px);padding-top:26px}.workspace{grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr);gap:16px}.thread header{flex-wrap:wrap}.thread h2{font-size:.875rem}.thread-status{padding-left:33px}.code-steps li{gap:9px;padding-left:5px;padding-right:5px}.code-steps code{font-size:.8125rem}.timeline-panel{padding:21px 15px 16px}.lock-bracket{font-size:.6875rem}.shared-panel{padding-left:21px;padding-right:21px}.takeaways{gap:28px}}@media(max-width:760px){main{width:calc(100% - 32px);padding-top:25px}.page-head{display:block}h1{font-size:1.75rem}.simulation-label{display:inline-block;margin-top:12px;font-size:.75rem;padding:5px 8px}.intro{font-size:.9375rem}.controls{flex-wrap:wrap;gap:13px;margin:20px 0 18px}.mode-control{width:100%}.mode{flex:1}.playback{width:100%}.playback .primary{flex:1}.playback #step{flex:1}.workspace{grid-template-columns:1fr;gap:18px}.shared-panel{padding:19px 20px 0}.counter strong{font-size:4rem}.thread{padding:15px 10px}.thread header{display:flex;flex-wrap:nowrap;gap:4px;margin-bottom:16px}.thread h2{font-size:.9375rem;gap:6px}.thread-status{padding:0;font-size:.75rem}.thread-mark{width:23px;height:23px}.code-steps li{gap:10px;padding:9px 7px}.code-steps code{font-size:.875rem}.local{padding-left:7px;padding-right:7px}.thread-grid{gap:10px}.lock-bracket{font-size:.75rem;padding-left:5px}.event-card{padding:17px 18px;min-height:140px}.timeline-panel{padding:21px 18px 18px}#timeline li{min-height:51px;padding:11px 6px}#timeline li.compact{min-height:43px}.takeaways{grid-template-columns:1fr;gap:23px;margin-top:25px}.takeaways p{font-size:1rem}footer{font-size:.8125rem}}@media(max-width:390px){main{width:calc(100% - 24px)}.thread header{flex-wrap:wrap}.thread-status{padding-left:29px}.code-steps li{gap:8px;padding:8px 5px}.code-steps code{font-size:.8125rem}.lock-bracket{font-size:.6875rem}.counter{gap:13px}.shared-panel{padding-left:16px;padding-right:16px}.expected{font-size:.75rem}.playback button{padding-left:13px;padding-right:13px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
/* Keep the teaching text readable and code contained at narrow widths and large text sizes. */
.thread header{flex-wrap:wrap}.thread-status{font-size:.875rem;white-space:normal}.lock-bracket{font-size:.75rem;overflow-wrap:anywhere}.lock-bracket code{white-space:normal}.code-steps code{white-space:normal;overflow-wrap:anywhere}.code-steps li{min-width:0}.code-steps code{min-width:0}.takeaways p{font-size:1rem}
@media(max-width:390px){.lock-bracket{font-size:.75rem}.thread-status{font-size:.875rem}.expected{font-size:.8125rem}}
