/* BitSize Machine Learning — builds on python_patterns/patterns.css + python_data/data.css (same
   components) with a burnt-orange accent, the pipeline strip and toolbox, the mlchart pictures
   (decision regions, class shapes), predict-first sliders, chunks and the check kinds. */
:root { --ml-r0: #DCE7FD; --ml-r1: #D8F3E2; --ml-r2: #FBDDEB; --ml-r3: #FDEBC8; --ml-r4: #E4DCFB; --ml-r5: #D3F1F4; --ml-r6: #F1E4D0; --ml-r7: #E5E7EB; }   /* region tints, read by mlchart.js */
.px.ml, .px-panel.ml { --px-accent: #C2410C; --px-accent-2: #F97316; --px-soft-bg: #FFF1E8;
  --mc-a: #EA580C; --mc-b: #2563EB; --mc-hit: #16A34A; --mc-out: #E11D48; --mc-warn: #D97706; --mc-soft: #94A3B8; --mc-ink: #1F2937;
  --mc-c0: #2563EB; --mc-c1: #16A34A; --mc-c2: #DB2777; --mc-c3: #D97706; --mc-c4: #7C3AED; --mc-c5: #0891B2; --mc-c6: #92400E; --mc-c7: #475569; }
.px.ml code { background: #FCEDE3; }
.ml .px-callout--teal { background: #FFF4EC; border-color: #F8D5BE; color: #7C2D12; }
.ml .px-cta:hover { background: #9A3412; }

/* ── pictures (mlchart.js) ── */
.mc-wrap { display: grid; gap: 10px; margin: 2px 0 4px; }
.mc-wrap--multi { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.mc-fig { margin: 0; padding: 10px 10px 6px; border-radius: 14px; background: #fff; border: 1px solid #F3E2D6; box-shadow: 0 12px 26px -22px rgba(124, 45, 18, .5); }
.mc-fig .vz-label { margin: 0 0 2px 6px; }
.mc { display: block; width: 100%; height: auto; font-family: var(--px-mono); }
.mc-plot { fill: #FCFBF9; }
.mc-region { image-rendering: auto; }
.mc-axis { stroke: #9CA3AF; stroke-width: 1.2; }
.mc-tk { stroke: #C7CCD4; }
.mc-tick { font-size: 11px; fill: #6B7280; }
.mc-alabel { font-size: 12px; font-weight: 700; fill: #4B5563; font-family: var(--px-font, inherit); }
.mc-a { --c: var(--mc-a); } .mc-b { --c: var(--mc-b); } .mc-hit { --c: var(--mc-hit); } .mc-out { --c: var(--mc-out); }
.mc-warn { --c: var(--mc-warn); } .mc-soft { --c: var(--mc-soft); } .mc-ink { --c: var(--mc-ink); }
.mc-c0 { --c: var(--mc-c0); } .mc-c1 { --c: var(--mc-c1); } .mc-c2 { --c: var(--mc-c2); } .mc-c3 { --c: var(--mc-c3); }
.mc-c4 { --c: var(--mc-c4); } .mc-c5 { --c: var(--mc-c5); } .mc-c6 { --c: var(--mc-c6); } .mc-c7 { --c: var(--mc-c7); }
.mc-pt { fill: var(--c, var(--mc-a)); fill-opacity: .88; stroke: #fff; stroke-width: 1.2; }
.mc-pt.is-hollow { fill: #fff; fill-opacity: 1; stroke: var(--c, var(--mc-a)); stroke-width: 2; }
.mc-pt.is-hit { stroke: var(--mc-hit); stroke-width: 2.4; }
.mc-pt.is-out { stroke: var(--mc-out); stroke-width: 2.4; }
.mc-ring { fill: none; stroke: #1F2937; stroke-width: 1.8; stroke-dasharray: 3 2; }
.mc-link { stroke: var(--c, #6B7280); stroke-width: 1.8; stroke-opacity: .75; }
.mc-star { font-size: 26px; fill: #1F2937; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.mc-star.mc-c0, .mc-star.mc-c1, .mc-star.mc-c2, .mc-star.mc-c3, .mc-star.mc-c4, .mc-star.mc-c5, .mc-star.mc-c6, .mc-star.mc-c7 { fill: var(--c); }
.mc-bar { fill: var(--c); fill-opacity: .85; }
.mc-bar.is-hit { fill: var(--mc-hit); } .mc-bar.is-out { fill: var(--mc-out); }
.mc-cell { stroke: #F3E2D6; stroke-width: 1; }
.mc-cell.is-hit { stroke: #1F2937; stroke-width: 2.4; }
.mc-celltext { font-size: 12px; font-weight: 700; fill: #374151; }
.mc-celltext.is-dark { fill: #fff; }
.mc-line { fill: none; stroke: var(--c); stroke-linejoin: round; stroke-linecap: round; }
.mc-dot { fill: var(--c); stroke: #fff; stroke-width: 1.2; }
.mc-line.is-dash, .mc-vline.is-dash { stroke-dasharray: 5 4; }
.mc-vline { stroke: var(--c); stroke-width: 2.2; }
.mc-band { fill: var(--c); fill-opacity: .14; }
.mc-vlabel, .mc-blabel, .mc-llabel, .mc-note { font-size: 11.5px; font-weight: 700; fill: var(--c, #1F2937); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.mc-keys { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 8px 2px; font-size: 12.5px; font-weight: 600; color: #374151; }
.mc-key i { font-style: normal; margin-right: 5px; color: var(--c); }
.ml .vz-stage.is-done .mc-fig { border-color: #BBF7D0; }
@media (max-width: 560px) { .mc-wrap--multi { grid-template-columns: 1fr; } .mc-tick { font-size: 13px; } }

/* ── the pipeline strip (lesson header + map) ── */
.ml-pipe { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; counter-reset: slot; }
.ml-slot { position: relative; padding: 8px 10px; border-radius: 12px; border: 2px dashed color-mix(in srgb, var(--sc) 30%, #fff); background: #F7F8F8; transition: all .2s; }   /* unused: dashed and grey, text stays readable (no opacity) */
.ml-slot b { display: block; font: 800 11px var(--px-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--sc); }
.ml-slot small { display: block; font-size: 11.5px; line-height: 1.3; color: var(--px-soft); }
.ml-slot.is-used { background: #fff; border-style: solid; border-color: color-mix(in srgb, var(--sc) 45%, #fff); }
.ml-slot.is-lit { background: var(--sc); border-color: var(--sc); transform: translateY(-2px); box-shadow: 0 10px 22px -14px var(--sc); }
.ml-slot.is-lit b, .ml-slot.is-lit small { color: #fff; }
.ml-slot + .ml-slot::before { content: '→'; position: absolute; left: -9px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #A8A29E; }
@media (max-width: 700px) { .ml-pipe { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ml-slot:nth-child(4)::before { display: none; } .ml-slot small { display: none; } }

/* ── 1 · See it: predict first, then the sliders ── */
.ml-guess { margin: 0 0 14px; padding: 14px 16px; border-radius: 16px; border: 2px dashed #F59E66; background: linear-gradient(180deg, #FFF8F3, #FFF1E8); }
.ml-guess__h { margin: 0 0 4px; }
.ml-guess__h span { font: 800 11px var(--px-mono); letter-spacing: .12em; text-transform: uppercase; color: #C2410C; }
.ml-guess__q { margin: 0 0 10px; font-size: 16px; font-weight: 600; line-height: 1.45; }
.ml-guess__opts { display: grid; gap: 8px; }
.ml-inputs { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; padding: 12px 14px; border-radius: 14px; margin: 0 0 12px;
  background: linear-gradient(180deg, #FFFAF6, #FFF1E8); border: 1px solid #F8D5BE; position: relative; transition: opacity .25s; }
.ml-inputs.is-locked { opacity: .55; }
.ml-inputs__lock { display: none; flex-basis: 100%; margin: 0; font-size: 12.5px; font-weight: 700; color: #9A3412; }
.ml-inputs.is-locked .ml-inputs__lock { display: block; }
.ml-slider { display: grid; gap: 4px; min-width: 170px; flex: 1 1 170px; font-size: 12.5px; color: #4B5563; }
.ml-slider > span { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ml-slider code { font-weight: 700; color: #7C2D12; background: none !important; padding: 0; }
.ml-slider output { font: 800 13px var(--px-mono); color: #C2410C; min-width: 3ch; text-align: right; }
.ml-slider small { color: #8B8FA3; font-size: 11.5px; }
.ml-slider input[type=range] { width: 100%; accent-color: #EA580C; height: 22px; cursor: pointer; }
.ml-slider input[type=range]:disabled { cursor: not-allowed; }
.ml-hood { margin: 16px 0 0; padding: 12px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--px-line); }
.ml-hood summary { cursor: pointer; color: #7C2D12; }
.ml-hood p { margin: 8px 0 0; font-size: 14px; color: var(--px-soft); }
.ml-code { margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: var(--px-code); color: #EDEDED; font: 13px/1.6 var(--px-mono); white-space: pre-wrap; overflow-x: auto; text-align: left; }
.ml-out { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: #F6F4F1; font: 13px/1.55 var(--px-mono); white-space: pre-wrap; }

/* ── 2 · Chunks ── */
.ml-chunks { display: grid; gap: 10px; margin: 0 0 14px; }
.ml-chunk { display: block; width: 100%; text-align: left; padding: 10px 12px 10px 14px; border-radius: 14px; border: 1.5px solid var(--px-line); border-left: 6px solid var(--sc);
  background: #fff; font: inherit; color: inherit; cursor: pointer; transition: box-shadow .2s, transform .2s, border-color .2s; }
.ml-chunk:hover { box-shadow: 0 10px 24px -18px var(--sc); }
.ml-chunk.is-open { border-color: var(--sc); box-shadow: 0 12px 26px -16px var(--sc); }
.ml-chunk.is-ran { animation: ml-ran .5s ease; }
@keyframes ml-ran { 40% { transform: translateX(4px); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sc) 25%, transparent); } }
.ml-chunk__h { display: flex; align-items: center; gap: 10px; }
.ml-chunk__h b { font-size: 15px; }
.ml-chunk__n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sc); color: #fff; font: 700 12px var(--px-mono); flex: none; }
.ml-tag { margin-left: auto; padding: 2px 8px; border-radius: 6px; background: var(--sc); color: #fff; font: 800 10.5px var(--px-mono); letter-spacing: .08em; text-transform: uppercase; }
.ml-chunk .ml-code { margin: 8px 0 0; }
.ml-chunk__does { display: grid; gap: 6px; margin-top: 10px; font-size: 14.5px; line-height: 1.55; }
.ml-io { justify-self: start; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--sc) 12%, #fff); color: var(--sc); font: 700 12.5px var(--px-mono); }

/* ── 3 · When ── */
.ml-when { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ml-when__box { padding: 12px 16px; border-radius: 14px; background: #fff; border: 1px solid #E5E7EB; }
.ml-when__box h3 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #57534E; }
.ml-when__box ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.5; }
.ml-when__box p { margin: 0; line-height: 1.55; }
.ml-when__box--good { border-color: #BBF7D0; background: #F6FEF9; } .ml-when__box--good h3 { color: #15803D; }
.ml-when__box--weak { border-color: #FECDD3; background: #FFF7F8; } .ml-when__box--weak h3 { color: #BE123C; }
.ml-when__box--knobs { border-color: #F8D5BE; background: #FFFAF6; } .ml-when__box--knobs h3 { color: #C2410C; }
.ml-knobs { list-style: none; padding: 0 !important; }
.ml-knobs li { display: grid; gap: 2px; padding: 4px 0; border-top: 1px dashed #F3E2D6; }
.ml-knobs li:first-child { border-top: 0; }
.ml-knobs code { justify-self: start; font-weight: 700; }
@media (max-width: 680px) { .ml-when { grid-template-columns: 1fr; } }

/* ── 5 · Build: faded tasks ── */
.ml-fade { padding: 2px 9px; border-radius: 999px; font: 700 11px var(--px-mono); letter-spacing: .04em; background: #F1F5F9; color: #475569; }
.ml-fade--complete .ml-fade { background: #DCFCE7; color: #166534; }
.ml-fade--modify .ml-fade { background: #FEF3C7; color: #92400E; }
.ml-fade--make .ml-fade { background: #FFE4D5; color: #9A3412; }

/* ── 6 · Check ── */
.ml-kind { padding: 2px 8px; border-radius: 6px; background: #FFF1E8; color: #C2410C; font: 800 10.5px var(--px-mono); letter-spacing: .08em; text-transform: uppercase; }
.ml-lines { margin: 0 0 12px; padding: 8px 0; border-radius: 10px; background: var(--px-code); color: #E6E6E6; font: 13px/1.6 var(--px-mono); overflow-x: auto; }
.ml-ln { display: block; padding: 0 12px; white-space: pre; }
.ml-ln i { display: inline-block; width: 2.2ch; margin-right: 10px; font-style: normal; color: #6B7280; text-align: right; }
.ml-ln.is-mark { background: rgba(234, 88, 12, .35); box-shadow: inset 3px 0 0 #F97316; }
.ml-gap { padding: 0 4px; border-radius: 4px; background: #F97316; color: #fff; font-weight: 700; }
.ml-order { display: grid; gap: 8px; }
.ml-order__h { margin: 4px 0 0; font: 700 11px var(--px-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--px-faint); }
.ml-order__ans { margin: 0; padding: 8px; min-height: 48px; border-radius: 12px; border: 2px dashed #F8D5BE; background: #FFFCFA; list-style: none; display: grid; gap: 6px; counter-reset: ord; }
.ml-order__ans li { counter-increment: ord; display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; animation: ml-in .2s ease; }
.ml-order__ans li::before { content: counter(ord); display: grid; place-items: center; width: 22px; height: 22px; margin-top: 6px; border-radius: 50%; background: #EA580C; color: #fff; font: 700 11px var(--px-mono); }
.ml-order__ans li.ml-order__empty { display: block; color: var(--px-faint); font-size: 13.5px; padding: 6px; }
.ml-order__ans li.ml-order__empty::before { display: none; }
.ml-order__ans.is-key { border-color: #BBF7D0; background: #F6FEF9; }
.ml-order__ans.is-key li::before { background: #16A34A; }
.ml-order__ans pre, .ml-piece pre { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--px-code); color: #EDEDED; font: 12.5px/1.55 var(--px-mono); white-space: pre-wrap; text-align: left; }
.ml-order__pool { display: grid; gap: 6px; }
.ml-piece { display: block; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; }
.ml-piece:hover pre { outline: 2px solid #F97316; }
.ml-bug { display: grid; gap: 0; padding: 8px; border-radius: 12px; background: var(--px-code); }
.ml-bugln { display: flex; gap: 10px; align-items: baseline; width: 100%; min-height: 30px; padding: 3px 10px; border: 0; border-radius: 6px; background: transparent; color: #EDEDED; text-align: left; cursor: pointer; font: 13px/1.5 var(--px-mono); }
.ml-bugln i { flex: none; width: 2ch; font-style: normal; color: #6B7280; text-align: right; }
.ml-bugln code { background: none !important; color: inherit; padding: 0; white-space: pre-wrap; }
.ml-bugln:hover:not(:disabled) { background: rgba(249, 115, 22, .25); }
.ml-bugln.is-right { background: rgba(22, 163, 74, .4); }
.ml-bugln.is-wrong { background: rgba(225, 29, 72, .4); }
.ml-bugln:disabled { cursor: default; }
.ml-pics { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ml-pic { position: relative; padding: 6px; border-radius: 14px; border: 2px solid var(--px-line); background: #fff; cursor: pointer; transition: border-color .15s, transform .15s; }
.ml-pic:hover:not(:disabled) { border-color: #F97316; transform: translateY(-2px); }
.ml-pic .mc { border-radius: 8px; }
.ml-pic__n { position: absolute; top: 10px; left: 10px; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #1F2937; color: #fff; font: 700 12px var(--px-mono); }
.ml-pic__label { display: none; margin-top: 4px; font: 700 13px var(--px-mono); }
.ml-pic.is-told .ml-pic__label { display: block; }
.ml-pic.is-right { border-color: var(--px-ok); background: var(--px-ok-bg); }
.ml-pic.is-wrong { border-color: var(--px-bad); background: var(--px-bad-bg); }
.ml-pic:disabled { cursor: default; }

/* ── Finish: the toolbox cards ── */
.ml-earned { margin-top: 16px; }
.ml-earned__h { margin: 0 0 8px; font-weight: 800; }
.ml-earned__cards { display: flex; flex-wrap: wrap; gap: 10px; }
.ml-earned.is-new .ml-card { animation: ml-pop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.ml-card { display: grid; gap: 4px; min-width: 220px; max-width: 320px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--sc); background: color-mix(in srgb, var(--sc) 6%, #fff); }
.ml-card .ml-tag { margin: 0; justify-self: start; }
.ml-card > code { font-size: 15px; font-weight: 800; color: var(--sc); background: none !important; padding: 0; }
.ml-card small { font-size: 13px; color: var(--px-soft); line-height: 1.45; }
@keyframes ml-pop { from { opacity: 0; transform: scale(.8) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ml-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── the map ── */
.ml-mapwrap { max-width: 1120px; margin: 0 auto; padding: 10px 24px 90px; }
.ml-continue { display: flex; align-items: center; gap: 18px; margin: 0 0 18px; padding: 18px 22px; border-radius: 20px; text-decoration: none; color: #fff !important;
  background: linear-gradient(120deg, var(--pc, #C2410C), #7C2D12); box-shadow: 0 20px 40px -26px rgba(124, 45, 18, .9); transition: transform .2s; }
.ml-continue:hover { transform: translateY(-2px); }
.ml-continue__ico { flex: none; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: rgba(255, 255, 255, .16); font-size: 30px; }
.ml-continue__txt { flex: 1; display: grid; gap: 3px; min-width: 0; }
.ml-continue__txt small { font: 700 11.5px var(--px-mono); letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.ml-continue__txt b { font-size: 22px; line-height: 1.2; }
.ml-continue__txt span { font-size: 14.5px; opacity: .92; line-height: 1.45; }
.ml-continue__txt code { background: rgba(255, 255, 255, .18) !important; color: #fff; }
.ml-continue__go { flex: none; padding: 10px 18px; border-radius: 999px; background: #fff; color: #9A3412; font-weight: 800; }
@media (max-width: 640px) { .ml-continue { flex-wrap: wrap; } .ml-continue__go { width: 100%; text-align: center; } }
.ml-box { margin: 0 0 18px; padding: 16px 18px 6px; border-radius: 18px; background: #fff; border: 1px solid #F3E2D6; }
.ml-box h2 { margin: 0 0 2px; font-size: 18px; }
.ml-box__sub { margin: 0 0 12px; color: var(--px-soft); font-size: 14px; }
/* The map's pipeline: a compact strip of the six slots (earned / total, a bar), then one
   full-width shelf of blocks per slot, so a slot with 40 blocks and one with 2 both fit. */
.ml-flow { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ml-flow li { position: relative; min-width: 0; }
.ml-flow li + li::before { content: '→'; position: absolute; left: -8px; top: 50%; transform: translate(-50%, -50%); font-size: 11px; color: #A8A29E; }
.ml-flow__step { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 8px 10px 9px; border-radius: 12px; text-decoration: none;
  border: 2px solid color-mix(in srgb, var(--sc) 40%, #fff); background: color-mix(in srgb, var(--sc) 6%, #fff); }
.ml-flow__step:hover { border-color: var(--sc); }
.ml-flow__step b { font: 800 11px var(--px-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--sc); }
.ml-flow__step small { font-size: 11.5px; line-height: 1.3; color: var(--px-soft); }
.ml-flow__n { margin-top: auto; padding-top: 4px; font: 700 12px var(--px-mono); color: var(--px-ink, #1C1917); }
.ml-flow__bar { display: block; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--sc) 15%, #fff); overflow: hidden; }
.ml-flow__bar i { display: block; height: 100%; background: var(--sc); border-radius: 4px; }
.ml-shelves { display: flex; flex-direction: column; margin-bottom: 10px; }
.ml-shelf { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid #F3E2D6; scroll-margin-top: 80px; }
.ml-shelf__head { margin: 0; padding-top: 3px; display: flex; flex-direction: column; gap: 1px; font-size: inherit; }
.ml-shelf__head b { font: 800 11px var(--px-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--sc); }
.ml-shelf__head span { font: 600 11px var(--px-mono); color: var(--px-faint, #A8A29E); }
.ml-shelf .ml-blocks { margin-top: 0; }
.ml-shelf__more { display: none; }
@media (max-width: 700px) {
  .ml-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ml-flow li:nth-child(4)::before { display: none; }
  .ml-flow__step small { display: none; }
  .ml-flow__step.is-on { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 14%, #fff); box-shadow: 0 6px 16px -10px var(--sc); }
  .ml-shelf { grid-template-columns: 1fr; gap: 6px; border-top: 0; padding-top: 0; }
  .ml-shelf:not(.is-on) { display: none; }
  .ml-shelf:not(.is-all) .ml-block:nth-child(n+13) { display: none; }
  .ml-shelf__more { display: block; justify-self: start; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--sc); background: #fff;
    color: var(--sc); font: 700 12px var(--px-mono); cursor: pointer; }
  .ml-shelf__head { flex-direction: row; align-items: baseline; gap: 8px; padding-top: 0; }
}
.ml-blocks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ml-block { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 7px; border: 1px dashed color-mix(in srgb, var(--sc) 50%, #fff);
  font: 600 11px var(--px-mono); color: var(--px-soft); text-decoration: none; max-width: 100%; overflow-wrap: anywhere; }
.ml-block i { font-style: normal; color: var(--sc); font-size: 9px; flex: none; }
.ml-block.is-got { border-style: solid; background: var(--sc); border-color: var(--sc); color: #fff; }
.ml-block.is-got i { color: #fff; }
.ml-block.is-soon { color: var(--px-faint); border-color: var(--px-line); }
.ml-datasets { margin-top: 22px; }
.ml-datasets li { background: #FFF8F3; border-color: #F8E4D6; }
.ml-datasets li code { color: #7C2D12; }

/* ── the hero demo ── */
.ml-demo { margin: 0; padding: 12px 14px 10px; border-radius: 18px; background: linear-gradient(160deg, #FFFFFF 0%, #FFF1E8 100%);
  border: 1px solid #F8D5BE; box-shadow: 0 24px 50px -30px rgba(124, 45, 18, .55); }
.ml-demo__cap { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font: 700 12.5px var(--px-mono); color: #7C2D12; }
.ml-demo__cap span { padding: 3px 9px; border-radius: 8px; background: #FFE4D5; }
.ml-demo__cap b { color: #C2410C; }
.ml-demo__svg { display: block; width: 100%; height: auto; border-radius: 12px; overflow: hidden; background: #FCFBF9; }
@media (max-width: 860px) { .ml .px-hero { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ml-chunk.is-ran, .ml-earned.is-new .ml-card, .ml-order__ans li { animation: none; } }

/* ── the Pipeline Builder ── */
.ml-bhead { padding: 10px 0 18px; }
.ml-bhead h1 { font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 46px); font-weight: 600; line-height: 1.05; margin: 0 0 10px; }
.ml-bhead h1 em { font-style: italic; font-weight: 400; color: var(--px-accent); }
.ml-bhead p { margin: 0; max-width: 680px; color: var(--px-soft); font-size: 16px; line-height: 1.6; }
.ml-bds { display: flex; flex-wrap: wrap; gap: 8px; }
.ml-bds__b { display: grid; gap: 2px; text-align: left; padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--px-line); background: #fff; cursor: pointer; font: inherit; color: inherit; }
.ml-bds__b small { font: 700 10.5px var(--px-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--px-faint); }
.ml-bds__b.is-on { border-color: #C2410C; background: #FFF4EC; box-shadow: 0 8px 20px -16px #C2410C; }
.ml-bslots { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ml-bslot { position: relative; padding: 10px; border-radius: 14px; border: 2px solid color-mix(in srgb, var(--sc) 45%, #fff); background: #fff; min-height: 140px; }
.ml-bslot > b { display: block; margin-bottom: 8px; font: 800 11px var(--px-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--sc); }
.ml-bslot + .ml-bslot::before { content: '→'; position: absolute; left: -10px; top: 12px; font-size: 12px; color: #A8A29E; }
.ml-bslot__body { display: grid; gap: 6px; }
.ml-bfixed { display: block; padding: 6px 8px; border-radius: 9px; background: var(--sc); color: #fff; }
.ml-bfixed code { background: none !important; color: #fff; padding: 0; font-size: 11.5px; }
.ml-bchip { display: grid; gap: 1px; text-align: left; padding: 6px 8px; border-radius: 9px; border: 1.5px dashed color-mix(in srgb, var(--sc) 55%, #fff); background: #fff; cursor: pointer; font: inherit; color: var(--px-soft); }
.ml-bchip code { background: none !important; padding: 0; font-size: 11.5px; color: inherit; word-break: break-word; }
.ml-bchip small { font-size: 10.5px; color: var(--px-faint); }
.ml-bchip:hover:not(.is-locked) { border-color: var(--sc); color: var(--px-ink); }
.ml-bchip.is-on { border-style: solid; border-color: var(--sc); background: var(--sc); color: #fff; animation: ml-pop .35s ease both; }
.ml-bchip.is-locked { opacity: .55; cursor: not-allowed; }
.ml-bknob { display: grid; gap: 2px; font-size: 11.5px; }
.ml-bknob > span { display: flex; justify-content: space-between; }
.ml-bknob output { font: 800 12px var(--px-mono); color: var(--sc); }
.ml-bknob input { width: 100%; accent-color: #EA580C; }
.ml-bnote { font-size: 12px; color: var(--px-faint); }
.ml-bgrid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; }
.ml-bcode__h { display: flex; justify-content: space-between; align-items: center; }
.ml-bcode { max-height: 520px; overflow: auto; white-space: pre; }
@media (max-width: 960px) { .ml-bslots { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ml-bslot:nth-child(4)::before { display: none; } .ml-bgrid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ml-bslots { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ml-bslot::before { display: none; } }
.ml-toolcards { max-width: none; padding: 0; margin: 0 0 18px; }
.ml-bgrid > * { min-width: 0; } .ml-builder .vz { max-width: 100%; overflow: hidden; }
.mc-imgbox { fill: #fff; stroke: #E7E2DC; stroke-width: 1.2; }
.mc-imgbox.is-hit { stroke: var(--mc-hit); stroke-width: 2.6; }
.mc-imgbox.is-out { stroke: var(--mc-out); stroke-width: 2.6; }
.mc-px { fill: #1F2937; }
.mc-px.is-neg { fill: #2563EB; }
.mc-contour { fill: none; stroke: var(--c, #1F2937); stroke-width: 2.4; stroke-linecap: round; }
.mc-contour.is-dash { stroke-dasharray: 6 5; stroke-width: 1.8; }
.mc-edge { fill: none; stroke: #CBD5E1; stroke-width: 2; }
.mc-edge.is-hit { stroke: #EA580C; stroke-width: 3.4; }
.mc-edgelabel { font-size: 10px; font-weight: 700; fill: #94A3B8; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.mc-node { fill: var(--c, #94A3B8); stroke: color-mix(in srgb, var(--c, #94A3B8) 70%, #fff); stroke-width: 1.4; }
.mc-node.is-leaf { stroke-width: 2.2; }
.mc-node.is-hit { stroke: #EA580C; stroke-width: 3.2; }
.mc-nodetext { font-size: 11.5px; font-weight: 700; fill: #1F2937; }
.mc-nodesub { font-size: 10px; fill: #475569; }
.mc-nodetext.is-small { font-size: 9.5px; } .mc-nodesub.is-small { font-size: 8.5px; }

/* ── the Which model? chooser: the Statistics chooser's components (stats.css), in this app's orange ── */
.ml .st-ch-trail li + li::before { color: #F59E66; }
.ml .st-ch-trail button { border-color: #F8D5BE; background: #FFF8F3; color: #7C2D12; }
.ml .st-ch-trail button:hover { border-color: #EA580C; }
.ml .st-ch-opt:hover:not(:disabled) { background: #FFF8F3; }
.ml .st-ch-res { border-color: #F8C4A2; box-shadow: 0 10px 30px -18px rgba(194, 65, 12, .55); }
.ml .st-ch-res h2 { color: #7C2D12; }
.ml .st-ch-code pre { color: #FDECE1; }
.ml .st-when__box--alt { border-color: #F8D5BE; background: #FFFAF6; } .ml .st-when__box--alt h3 { color: #C2410C; }
.ml .st-ch-all summary { color: #7C2D12; }
.ml .st-ch-n { color: #F59E66; }
.mc-image { image-rendering: pixelated; }
.ml .vz.is-busy { position: relative; }
.ml .vz.is-busy .vz-stage { opacity: .45; transition: opacity .15s; }
.ml .vz.is-busy::after { content: 'Recomputing…'; position: absolute; top: 12px; right: 14px; padding: 4px 10px; border-radius: 999px;
  background: #1F2937; color: #fff; font: 700 12px var(--px-mono); }
.mc-boxr { fill: none; stroke: var(--c, var(--mc-a)); stroke-width: 2.2; }
.mc-boxr.is-dash { stroke-dasharray: 4 3; }
.mc-boxlabel { fill: var(--c, var(--mc-a)); font-size: 11px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
