/* Scientific content retains its original figures within the shared site shell. */
.python-course .python-article{min-width:0}
.python-course .python-article>section{scroll-margin-top:100px}
.python-course .science-figure{background:transparent}
.python-course .figure-stage{overflow:auto;max-width:100%;background:#fbfaf6;border-radius:5px}
.python-course .figure-stage>img{display:block;width:100%;height:auto;margin:0 auto}
.python-course .science-figure figcaption{font-size:13px;line-height:1.85;margin-top:14px}
.python-course .figure-counter{font-weight:650;margin-right:8px}
.python-course .equation-block{margin:28px 0;padding:22px;border:1px solid var(--line);border-radius:5px;background:var(--wash);min-width:0}
.python-course .equation-display{max-width:100%;overflow-x:auto;overflow-y:hidden;padding:14px 4px;text-align:center;font-size:20px}
.python-course .equation-display mjx-container{display:inline-block!important;margin:0!important}
.python-course .equation-display svg{max-width:none!important;background:transparent}
.python-course .symbol-table{width:100%;font-size:13px;margin:16px 0}
.python-course .symbol-table td:first-child{width:110px;font-family:Cambria,Georgia,serif;font-style:italic}
.python-course .equation-block p{font-size:14px}
.python-course .inline-math,.python-course .symbol-math{display:inline-block;font-size:.96em;vertical-align:-.15em}
.python-course .inline-math mjx-container,.python-course .symbol-math mjx-container{display:inline-block!important;margin:0!important}
.python-course .inline-math svg,.python-course .symbol-math svg{max-width:none!important;height:auto!important;background:transparent}
.python-course .symbol-math{font-style:normal}
.python-course .code-example{margin:28px 0;background:#f9fbfb;color:#19272e;border-radius:5px;overflow:hidden}
.python-course .code-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;background:#dfe8eb}
.python-course .code-head h3{font-size:15px;line-height:1.6;margin:0;color:#19272e}
.python-course .code-actions{display:flex;gap:6px;flex-shrink:0}
.python-course .code-actions button{font-size:12px;padding:5px 9px;background:white;color:#19272e;border-color:#b9c7ce}
.python-course .code-example .code-explanation{font-size:14px;line-height:1.8;padding:15px 18px 0;margin:0;max-width:none;color:#334851}
.python-course .code-example pre{margin:0;padding:20px;overflow:auto;font:13px/1.75 Consolas,'SFMono-Regular',monospace;tab-size:4;background:#f9fbfb;color:#19272e;max-width:100%}
.python-course .code-example pre code{font:inherit;white-space:pre;overflow-wrap:normal;background:none;padding:0;color:inherit}
.python-course .code-example pre:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.python-course .download-project{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:20px 0;margin:28px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.python-course .download-project a{font-size:14px}.python-course .download-project p{margin:0;font-size:12px;color:var(--muted)}
.python-course .science-lab{--ink:#19272e;--muted:#526269;--panel:#fff;--paper:#fbfaf6;--accent:#165976;--wash:#e8f0f3;--line:#cbd2d3;background:#fff;color:#19272e;padding:24px;margin:32px 0;overflow:hidden;line-height:1.8;font-size:14px;border-radius:5px;min-width:0}
.python-course .science-lab h2,.python-course .science-lab h3{color:#19272e;margin-top:0}
.python-course .science-lab p{font-size:14px;color:#19272e}
.python-course .science-lab label{font-size:14px;color:#19272e}
.python-course .science-lab input,.python-course .science-lab select,.python-course .science-lab button{font-size:14px;color:#19272e;max-width:100%}
.python-course .science-lab input[type=range]{accent-color:#165976;max-width:100%}
.python-course .science-lab canvas{max-width:100%;height:auto}
.python-course .science-lab svg{display:block}
.python-course .science-lab fieldset{border:1px solid #c7d2d7;padding:14px}
.python-course .science-lab pre{overflow:auto;max-width:100%;font-size:13px;line-height:1.7;background:#edf1ed;color:#19272e}
.python-course .science-lab :where(div,figure){min-width:0}
.python-course .science-lab figure{margin-left:0;margin-right:0}
.python-course .science-lab .lab-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}
.python-course .science-lab .lab-grid>*{min-width:0}
.python-course .science-lab .lab-controls,.python-course .lab-tools{display:flex;align-items:center;flex-wrap:wrap;gap:14px 20px;margin:22px 0}
.python-course .science-lab .lab-controls label{display:flex;align-items:center;gap:8px}
.python-course .science-lab .lab-controls input[type=range]{min-width:180px;max-width:100%}
.python-course .science-lab svg text{font-family:'Microsoft YaHei',Arial,sans-serif}
.python-course .lab-output{font-variant-numeric:tabular-nums}
.python-course .lab-plot-scroll{min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
.python-course .lab-plot-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.python-course .lab-plot-scroll>svg{min-width:0;max-width:none;width:100%}
.python-course .references{padding:26px 0;border-top:1px solid var(--line);margin-top:45px}
.python-course .references h2{font-size:21px}.python-course .references li{font-size:13px;line-height:1.8}
.python-course .ref-role,.python-course .ref-license{display:block;color:var(--muted);font-size:12px}
.python-course .insight{background:var(--wash);padding:20px;margin:24px 0}
.python-course .insight p:last-child{margin-bottom:0}
@media(max-width:1100px){.python-course .lab-plot-scroll>svg{min-width:var(--plot-reading-width)}.python-course .science-lab .lab-grid,.python-course .science-lab .lab-plot-grid{grid-template-columns:1fr!important}}
@media(max-width:760px){.python-course .code-head{flex-wrap:wrap;padding:12px}.python-course .code-example pre{padding:14px;font-size:12px}.python-course .code-example .code-explanation{font-size:12px;padding:12px}.python-course .science-figure figcaption{font-size:12px}.python-course .equation-block{padding:14px 10px}.python-course .symbol-table{display:block;overflow:auto;font-size:12px}.python-course .equation-block p{font-size:13px}.python-course .science-lab{padding:16px 10px;font-size:13px}.python-course .science-lab p{font-size:13px}.python-course .science-lab input,.python-course .science-lab select{font-size:16px}.python-course .science-lab .lab-controls label{display:block;max-width:100%;line-height:1.65}.python-course .science-lab .lab-controls input[type=range]{display:block;width:220px;min-width:0;max-width:100%;margin:9px 0}.python-course .science-lab .lab-controls select{max-width:100%}.python-course .science-lab .lab-controls label>span,.python-course .science-lab .lab-controls output{white-space:normal}.python-course .references h2{font-size:19px}}

.python-course .code-example .code-explanation{font-size:15px;line-height:1.8;padding:0 22px;max-width:none}
.python-course .code-example .code-explanation{padding:0 14px;font-size:14px}
.python-course .code-example .hll { background-color: #ffffcc }
.python-course .code-example .c { color: #3D7B7B; font-style: italic }
.python-course .code-example .err { border: 1px solid #F00 }
.python-course .code-example .k { color: #008000; font-weight: bold }
.python-course .code-example .o { color: #666 }
.python-course .code-example .ch { color: #3D7B7B; font-style: italic }
.python-course .code-example .cm { color: #3D7B7B; font-style: italic }
.python-course .code-example .cp { color: #9C6500 }
.python-course .code-example .cpf { color: #3D7B7B; font-style: italic }
.python-course .code-example .c1 { color: #3D7B7B; font-style: italic }
.python-course .code-example .cs { color: #3D7B7B; font-style: italic }
.python-course .code-example .gd { color: #A00000 }
.python-course .code-example .ge { font-style: italic }
.python-course .code-example .ges { font-weight: bold; font-style: italic }
.python-course .code-example .gr { color: #E40000 }
.python-course .code-example .gh { color: #000080; font-weight: bold }
.python-course .code-example .gi { color: #008400 }
.python-course .code-example .go { color: #717171 }
.python-course .code-example .gp { color: #000080; font-weight: bold }
.python-course .code-example .gs { font-weight: bold }
.python-course .code-example .gu { color: #800080; font-weight: bold }
.python-course .code-example .gt { color: #04D }
.python-course .code-example .kc { color: #008000; font-weight: bold }
.python-course .code-example .kd { color: #008000; font-weight: bold }
.python-course .code-example .kn { color: #008000; font-weight: bold }
.python-course .code-example .kp { color: #008000 }
.python-course .code-example .kr { color: #008000; font-weight: bold }
.python-course .code-example .kt { color: #B00040 }
.python-course .code-example .m { color: #666 }
.python-course .code-example .s { color: #BA2121 }
.python-course .code-example .na { color: #687822 }
.python-course .code-example .nb { color: #008000 }
.python-course .code-example .nc { color: #00F; font-weight: bold }
.python-course .code-example .no { color: #800 }
.python-course .code-example .nd { color: #A2F }
.python-course .code-example .ni { color: #717171; font-weight: bold }
.python-course .code-example .ne { color: #CB3F38; font-weight: bold }
.python-course .code-example .nf { color: #00F }
.python-course .code-example .nl { color: #767600 }
.python-course .code-example .nn { color: #00F; font-weight: bold }
.python-course .code-example .nt { color: #008000; font-weight: bold }
.python-course .code-example .nv { color: #19177C }
.python-course .code-example .ow { color: #A2F; font-weight: bold }
.python-course .code-example .w { color: #BBB }
.python-course .code-example .mb { color: #666 }
.python-course .code-example .mf { color: #666 }
.python-course .code-example .mh { color: #666 }
.python-course .code-example .mi { color: #666 }
.python-course .code-example .mo { color: #666 }
.python-course .code-example .sa { color: #BA2121 }
.python-course .code-example .sb { color: #BA2121 }
.python-course .code-example .sc { color: #BA2121 }
.python-course .code-example .dl { color: #BA2121 }
.python-course .code-example .sd { color: #BA2121; font-style: italic }
.python-course .code-example .s2 { color: #BA2121 }
.python-course .code-example .se { color: #AA5D1F; font-weight: bold }
.python-course .code-example .sh { color: #BA2121 }
.python-course .code-example .si { color: #A45A77; font-weight: bold }
.python-course .code-example .sx { color: #008000 }
.python-course .code-example .sr { color: #A45A77 }
.python-course .code-example .s1 { color: #BA2121 }
.python-course .code-example .ss { color: #19177C }
.python-course .code-example .bp { color: #008000 }
.python-course .code-example .fm { color: #00F }
.python-course .code-example .vc { color: #19177C }
.python-course .code-example .vg { color: #19177C }
.python-course .code-example .vi { color: #19177C }
.python-course .code-example .vm { color: #19177C }
.python-course .code-example .il { color: #666 }
/* Standalone experiment controls keep labels with their corresponding inputs. */
.experimental-course .science-lab>label{display:block;margin:14px 0 5px}
.experimental-course .science-lab>input[type=range]{display:block;width:min(100%,360px);margin:6px 0 16px}
.experimental-course .science-lab>button{margin:8px 8px 14px 0}
.experimental-course .science-lab>[data-lab-scroll]{margin-top:16px}
