/* BitSize Data & MLOps — builds on python_patterns/patterns.css + python_data/data.css (the same
   lesson components) with an olive accent, the opsviz.js scenes and the System Map. */
.px.mo, .px-panel.mo { --px-accent: #4D7C0F; --px-accent-2: #84CC16; --px-soft-bg: #F1F7E8;
  --ov-ink: #1A2310; --ov-soft: #64748B; --ov-line: #D9E5CC; --ov-ok: #15803D; --ov-bad: #DC2626; --ov-warn: #B45309;
  --lane-data: #0F766E; --lane-model: #C2410C; --lane-ops: #6D28D9; --ov-dup: #EA580C; }
.px.mo code { background: #EEF5E3; }
.mo .px-callout--olive { background: #F1F7E8; border-color: #D3E6BC; color: #2C3D12; }

/* ── a scene ── */
.ov-host { display: grid; gap: 10px; margin: 4px 0 2px; align-content: start; }   /* held tall by steady.js: spare room goes below */
.ov-svg--narrow { max-width: 620px; margin-inline: auto; }
.ov-svg { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--ov-line); border-radius: 14px; font-family: var(--px-font, system-ui, sans-serif); }
.ov-ctl { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(180deg, #F7FBF1, #EEF5E3); border: 1px solid #D3E6BC; transition: opacity .25s; }
.ov-host.is-locked .ov-ctl { opacity: .38; pointer-events: none; filter: saturate(.4); }
.ov-host.is-locked .ov-ctl::before { content: '🔒 Answer the prediction above to unlock the controls'; flex-basis: 100%; font-size: 12.5px; font-weight: 700; color: #2C3D12; }
.ov-seg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ov-seg__lab { font-size: 12.5px; color: #475569; margin-right: 4px; }
.ov-seg button, .ov-btn { border: 1px solid #C9DDB0; background: #fff; color: var(--ov-ink); border-radius: 999px; padding: 6px 12px; font: 600 13px inherit; cursor: pointer; }
.ov-seg button.is-on { background: var(--px-accent); border-color: var(--px-accent); color: #fff; }
.ov-btn:hover, .ov-seg button:hover { border-color: var(--px-accent); }
.ov-btn--go { background: var(--px-accent); border-color: var(--px-accent); color: #fff; }
.ov-btn:disabled { opacity: .45; cursor: not-allowed; }
.ov-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ov-say { margin: 0; min-height: calc(4.5em + 24px); padding: 11px 14px; border-radius: 12px; background: #F1F7E8; border: 1px solid #D3E6BC; color: #2C3D12; font-size: 15px; line-height: 1.5; }

/* svg marks */
.ov-axis { stroke: #94A3B8; stroke-width: 1.2; }
.ov-tick-lab { font-size: 11px; fill: #64748B; }
.ov-lab { font-size: 12px; font-weight: 700; fill: #334155; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.ov-lab--soft { fill: #64748B; font-weight: 600; }
.ov-lab--bad { fill: var(--ov-bad); }
.ov-big { font-size: 17px; font-weight: 800; fill: var(--ov-ink); }
.ov-big.is-ok { fill: var(--ov-ok); } .ov-big.is-bad { fill: var(--ov-bad); }
.ov-order { stroke: var(--lane-data); stroke-width: 1.4; opacity: .75; }
.ov-order.is-future { opacity: .18; }
.ov-run { fill: var(--px-accent); }
.ov-run.is-future { fill: #CBD5E1; }
.ov-runband { fill: var(--px-accent); opacity: .85; }
.ov-runband.is-dense { opacity: .55; }
.ov-stale { fill: var(--ov-bad); fill-opacity: .1; stroke: var(--ov-bad); stroke-opacity: .4; stroke-dasharray: 4 3; }
.ov-look { stroke: var(--ov-ink); stroke-width: 2; stroke-dasharray: 3 3; }
.ov-limit { stroke: var(--ov-bad); stroke-width: 1.2; stroke-dasharray: 5 4; }
.ov-spark { fill: none; stroke: var(--ov-ok); stroke-width: 2.4; stroke-linejoin: round; }
.ov-spark.is-bad { stroke: var(--ov-bad); }
.ov-bar { fill: var(--px-accent); fill-opacity: .8; }
.ov-bar.is-dup { fill: var(--ov-dup); }
.ov-bar.is-soft { fill: #CBD5E1; }
.ov-truth { stroke: var(--ov-ink); stroke-width: 2; stroke-dasharray: 6 4; }
.ov-pipe { fill: none; stroke: #CBD8BD; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.ov-pipe.is-alt { stroke: #F5C9A8; stroke-width: 5; stroke-dasharray: 6 5; }
.ov-node circle { fill: #fff; stroke: var(--px-accent); stroke-width: 2.4; }
.ov-node.is-off circle { stroke: #CBD5E1; stroke-dasharray: 4 3; }
.ov-node.is-off .ov-node__i { opacity: .3; }
.ov-node__i { font-size: 22px; }
.ov-node__t { font-size: 13px; font-weight: 700; fill: var(--ov-ink); }
.ov-node__s { font-size: 11.5px; font-weight: 700; fill: #475569; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.ov-quar rect { fill: #FFF4EC; stroke: var(--ov-dup); stroke-width: 1.6; stroke-dasharray: 4 3; }
.ov-board rect { fill: #F1F7E8; stroke: var(--px-accent); stroke-width: 1.6; }
.ov-board.is-bad rect { fill: #FDECEC; stroke: var(--ov-bad); }
.ov-board__n { font-size: 17px; font-weight: 800; fill: var(--ov-ink); }
.ov-board.is-bad .ov-board__n { fill: var(--ov-bad); }
.ov-token { fill: var(--px-accent); stroke: #fff; stroke-width: 1.5; }
.ov-token.is-dup { fill: var(--ov-dup); }

/* meters */
.ov-meters { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--ov-line); border-radius: 14px; background: #fff; }
.ov-meter { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; font-size: 14px; }
.ov-meter__val { font: 800 15px var(--px-mono, ui-monospace, monospace); text-align: right; }
.ov-meter__note { grid-column: 1 / -1; font-size: 12px; color: #64748B; }
.ov-meter__note:empty { display: none; }
.ov-meter.is-ok .ov-meter__val { color: var(--ov-ok); }
.ov-meter.is-bad .ov-meter__val { color: var(--ov-bad); }
.ov-meter.is-warn .ov-meter__val { color: var(--ov-warn); }

/* ETL vs ELT lanes */
.ov-lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ov-lane { border: 1px solid var(--ov-line); border-radius: 14px; padding: 12px 14px; background: #fff; display: grid; gap: 8px; align-content: start; transition: border-color .2s, background .2s; }
.ov-lane h4 { margin: 0; font-size: 16px; }
.ov-lane.is-ok { border-color: var(--ov-ok); background: #F3FAF5; }
.ov-lane.is-bad { border-color: var(--ov-bad); background: #FFF7F7; }
.ov-steps { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ov-stepchip { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid #D3E6BC; background: #F7FBF1; opacity: .45; transition: opacity .25s, background .25s; }
.ov-stepchip + .ov-stepchip::before { content: '→ '; color: #94A3B8; }
.ov-stepchip.is-on { opacity: 1; background: #E4F0D2; }
.ov-wh { border: 1px dashed #C9DDB0; border-radius: 10px; padding: 8px 10px; font-size: 13px; display: grid; gap: 6px; }
.ov-tabs { display: grid; gap: 4px; }
.ov-tabs span { font-family: var(--px-mono, ui-monospace, monospace); font-size: 12.5px; padding: 4px 8px; border-radius: 6px; background: #EEF5E3; }
.ov-tabs span.is-empty { background: none; color: #94A3B8; font-family: inherit; }
.ov-out { margin: 0; font-size: 14px; min-height: 1.4em; }
@media (max-width: 640px) { .ov-lanes { grid-template-columns: 1fr; } }

/* OLTP vs OLAP grids */
.ov-grids { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ov-grid { border: 1px solid var(--ov-line); border-radius: 14px; padding: 10px 12px; background: #fff; }
.ov-grid__h { margin: 0 0 8px; display: grid; font-size: 14px; }
.ov-grid__h span { font-size: 12px; color: #64748B; }
.ov-cells { display: grid; gap: 3px; }
.ov-cell { height: 14px; border-radius: 3px; background: #EEF2EA; transition: background .15s; }
.ov-cell--h { height: auto; background: none; font: 600 9.5px var(--px-mono, ui-monospace, monospace); color: #64748B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-cell.is-read { background: #F59E0B; }
.ov-cell.is-hit { background: var(--px-accent); }
@media (max-width: 640px) { .ov-grids { grid-template-columns: 1fr; } }

/* Part 2 scenes */
.ov-cellr { fill: #EEF2EA; stroke: #D6E0CC; stroke-width: .8; }
.ov-cellr.is-want { fill: #F59E0B; stroke: #D97706; }
.ov-cell-lab { font-size: 9.5px; fill: #475569; font-family: var(--px-mono, ui-monospace, monospace); }
.ov-page { fill: #fff; stroke: #D6E0CC; stroke-width: 1.2; }
.ov-page.is-read { fill: #FEF3C7; stroke: #D97706; stroke-width: 2; }
.ov-chunk { fill: #EEF2EA; stroke: #D6E0CC; }
.ov-chunk.is-read { fill: #F59E0B; stroke: #D97706; }
.ov-chunk.is-skip { fill: #fff; stroke: #E2E8F0; stroke-dasharray: 3 3; }
.ov-stat-lab { font-size: 10.5px; font-weight: 700; fill: var(--px-accent); font-family: var(--px-mono, ui-monospace, monospace); }
.ov-stat-lab.is-skip { fill: #94A3B8; text-decoration: line-through; }
.ov-slider { display: grid; gap: 3px; min-width: 200px; flex: 1 1 200px; font-size: 12.5px; color: #475569; }
.ov-slider > span { display: flex; justify-content: space-between; gap: 8px; }
.ov-slider b { font: 800 13px var(--px-mono, ui-monospace, monospace); color: var(--px-accent); }
.ov-slider input { width: 100%; accent-color: var(--px-accent); height: 22px; cursor: pointer; }
.ov-formats, .ov-schema { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.ov-file { border: 1px solid var(--ov-line); border-radius: 14px; padding: 10px 12px; background: #fff; min-width: 0; }
.ov-file__h { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: #64748B; }
.ov-file pre { margin: 0; padding: 8px 10px; border-radius: 8px; background: #F4F6F1; font: 12px/1.5 var(--px-mono, ui-monospace, monospace); overflow-x: auto; white-space: pre; }
.ov-file ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; }
.ov-file li { padding: 4px 8px; border-radius: 6px; background: #F4F6F1; font-family: var(--px-mono, ui-monospace, monospace); font-size: 12.5px; }
.ov-file li b { margin-right: 8px; }
.ov-file li.is-ok { background: #ECFDF3; } .ov-file li.is-bad { background: #FEF2F2; color: #991B1B; } .ov-file li.is-warn { background: #FFFBEB; }
.ov-blocked { margin: 8px 0 0; font-size: 13.5px; font-weight: 700; color: #991B1B; }
.ov-readers { display: grid; gap: 8px; align-content: start; }
.ov-reader { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ov-line); background: #fff; font-size: 14px; }
.ov-reader span { font-size: 13px; color: #475569; }
.ov-reader.is-ok { border-color: #86EFAC; background: #F0FDF4; }
.ov-reader.is-bad { border-color: #FCA5A5; background: #FEF2F2; }
.ov-reader.is-silent { border-color: #FCD34D; background: #FFFBEB; }
.ov-reader.is-silent b::after { content: '  ⚠ no error'; font-size: 11.5px; color: #B45309; }
.ov-tool { fill: #fff; stroke: #D6E0CC; stroke-width: 1.4; }
.ov-tool.is-on { fill: #F1F7E8; stroke: var(--px-accent); stroke-width: 2; }
.ov-handarrow { stroke: #A3B18A; stroke-width: 2; }
.ov-membar { fill: #EEF2EA; } .ov-memfill { fill: var(--px-accent); } .ov-memfill.is-bad { fill: var(--ov-bad); }
.ov-folder { fill: #F8FAF5; stroke: #D6E0CC; }
.ov-folder.is-read { fill: #FEF3C7; stroke: #D97706; }
.ov-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ov-arch { display: grid; gap: 4px; align-content: start; padding: 12px; border-radius: 14px; border: 1px solid var(--ov-line); background: #fff; font-size: 14px; }
.ov-arch small { color: #64748B; font-size: 12px; }
.ov-arch__v { margin: 6px 0 0; font-size: 13.5px; }
.ov-arch__v span { font-weight: 800; }
.ov-arch.is-ok { border-color: #86EFAC; background: #F0FDF4; } .ov-arch.is-bad { border-color: #FCA5A5; background: #FEF2F2; } .ov-arch.is-warn { border-color: #FCD34D; background: #FFFBEB; }
@media (max-width: 640px) { .ov-formats, .ov-schema, .ov-three { grid-template-columns: 1fr; } }

/* Part 3 scenes */
.ov-memblock { fill: var(--px-accent); fill-opacity: .85; }
.ov-memblock.is-copy { fill: #F59E0B; fill-opacity: .55; }
.ov-ramline { stroke: var(--ov-bad); stroke-width: 2.4; stroke-dasharray: 6 4; }
.ov-flowbar { fill: var(--px-accent); fill-opacity: .75; }
.ov-flowbar.is-big { fill: #F59E0B; }
.ov-core.is-busy { fill: var(--px-accent); } .ov-core.is-idle { fill: #E2E8F0; } .ov-core.is-none { fill: none; stroke: #E2E8F0; stroke-dasharray: 2 2; }
.ov-memfill.is-spill { fill: #6D28D9; }
.ov-edge { fill: none; stroke: #CBD5E1; stroke-width: 1.8; }
.ov-edge.is-on { stroke: var(--px-accent); stroke-width: 2.6; }
.ov-model rect { fill: #fff; stroke: #C9DDB0; stroke-width: 1.4; cursor: pointer; }
.ov-model.is-source rect { fill: #F8FAF5; stroke-dasharray: 4 3; }
.ov-model.is-pick rect { stroke: var(--px-accent); stroke-width: 2.6; fill: #F1F7E8; }
.ov-model.is-up rect { fill: #EFF6FF; stroke: #60A5FA; } .ov-model.is-down rect { fill: #FFF7ED; stroke: #FB923C; }
.ov-model.is-ok rect { fill: #F0FDF4; stroke: #22C55E; } .ov-model.is-fail rect { fill: #FEF2F2; stroke: #EF4444; stroke-width: 2.4; }
.ov-model.is-skip rect { fill: #F8FAFC; stroke: #CBD5E1; stroke-dasharray: 4 3; } .ov-model.is-skip text { fill: #94A3B8; }
.ov-model:focus { outline: none; } .ov-model:focus rect { stroke: var(--px-accent); stroke-width: 2.6; }
.ov-worker { fill: #F8FAF5; stroke: #D6E0CC; }
.ov-dot { stroke: #fff; stroke-width: .8; }
.ov-c-a { fill: #DC2626; } .ov-c-b { fill: #2563EB; } .ov-c-c { fill: #059669; } .ov-c-d { fill: #D97706; }
.ov-line { fill: none; stroke-width: 2.6; } .ov-line.is-one { stroke: #2563EB; } .ov-line.is-clus { stroke: #C2410C; }
.ov-c-one { fill: #2563EB; } .ov-c-clus { fill: #C2410C; }
.ov-cross { fill: var(--ov-ink); }
.ov-pick { display: grid; gap: 4px; padding: 16px 18px; border-radius: 14px; border: 2px solid var(--px-accent); background: #F7FBF1; }
.ov-pick__h { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--px-accent); }
.ov-pick > b { font-size: 20px; }
.ov-pick p { margin: 0; font-size: 14.5px; }
.ov-pick__alt { color: #475569; }

/* Parts 4–5 scenes */
.ov-panel { border: 1px solid var(--ov-line); border-radius: 14px; padding: 10px 12px; background: #fff; display: grid; gap: 6px; }
.ov-note { margin: 0; font-size: 12.5px; color: #64748B; }
.ov-blocks { display: flex; flex-wrap: wrap; gap: 4px; }
.ov-blk { width: 14px; height: 14px; border-radius: 3px; background: #EEF2EA; }
.ov-blk.is-on { background: var(--px-accent); } .ov-blk.is-off { background: #fff; border: 1px dashed #CBD5E1; }
.ov-tbl { border-collapse: collapse; font-size: 13.5px; width: 100%; }
.ov-tbl th, .ov-tbl td { padding: 4px 8px; border-bottom: 1px solid #EEF2EA; text-align: left; }
.ov-tbl td.is-ok { color: var(--ov-ok); font-weight: 800; } .ov-tbl td.is-bad { color: var(--ov-bad); font-weight: 800; }
.ov-stepsrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ov-stepbox { padding: 10px 6px; border-radius: 10px; border: 1px solid #D6E0CC; background: #fff; font-size: 12.5px; font-weight: 700; text-align: center; color: #94A3B8; }
.ov-stepbox.is-pass { color: var(--ov-ink); border-color: #86EFAC; background: #F0FDF4; }
.ov-stepbox.is-stop { color: #991B1B; border-color: #FCA5A5; background: #FEF2F2; }
@media (max-width: 560px) { .ov-stepsrow { grid-template-columns: 1fr; } }
.ov-reqline { margin: 0; padding: 8px 12px; border-radius: 10px; background: #F4F6F1; font: 12.5px/1.5 var(--px-mono, ui-monospace, monospace); white-space: pre-wrap; word-break: break-all; }
.ov-reqline.is-ok { background: #ECFDF3; } .ov-reqline.is-bad { background: #FEF2F2; color: #991B1B; }
.ov-recline { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 10px; border-radius: 8px; background: #F8FAF5; font-size: 13px; }
.ov-recline code { font-size: 12px; background: none; word-break: break-all; }
.ov-recline.is-ok { background: #F0FDF4; } .ov-recline.is-bad { background: #FEF2F2; color: #991B1B; } .ov-recline.is-warn { background: #FFFBEB; }
@media (max-width: 560px) { .ov-recline { grid-template-columns: 1fr; } }
.ov-evt { fill: var(--px-accent); } .ov-evt.is-late { fill: #F59E0B; } .ov-evt.is-lost { fill: var(--ov-bad); }
.ov-partition { fill: #F8FAF5; stroke: #D6E0CC; } .ov-msg { fill: #C9DDB0; }
.ov-jobbar { fill: #A3B18A; } .ov-jobbar.is-ok { fill: var(--ov-ok); } .ov-jobbar.is-bad { fill: var(--ov-bad); }
.ov-grid2 { border-collapse: separate; border-spacing: 4px; font-size: 13px; }
.ov-grid2 th { text-align: left; color: #475569; font-weight: 700; padding-right: 8px; }
.ov-grid2 td { width: 44px; height: 26px; border-radius: 5px; text-align: center; color: #fff; font-weight: 800; }
.ov-grid2 td.is-success { background: #22C55E; } .ov-grid2 td.is-failed { background: #EF4444; } .ov-grid2 td.is-upstream_failed { background: #F97316; }
.ov-share.is-ok { fill: #22C55E; } .ov-share.is-warn { fill: #F59E0B; } .ov-share.is-bad { fill: #EF4444; }
.ov-interval { fill: #F1F7E8; stroke: #C9DDB0; } .ov-interval.is-open { fill: #fff; stroke-dasharray: 3 3; }
.ov-runbox { fill: #fff; stroke: #D6E0CC; } .ov-runbox.is-ok { fill: #F0FDF4; stroke: #22C55E; } .ov-runbox.is-bad { fill: #FEF2F2; stroke: #EF4444; }

/* Parts 6–7 scenes */
.ov-blk.is-bad { background: var(--ov-bad); }
.ov-logbox { margin: 0; padding: 10px 12px; border-radius: 10px; background: #1E2416; color: #E6EDD9; font: 12px/1.6 var(--px-mono, ui-monospace, monospace); overflow-x: auto; white-space: pre; }
.ov-logbox .is-bad { color: #FCA5A5; font-weight: 700; }
.ov-flowbar.is-dim { fill-opacity: .25; }

/* Parts 8–9 scenes */
.ov-recline.is-off { opacity: .55; }
.ov-dot.is-plain { fill: #94A3B8; } .ov-dot.is-bad { fill: var(--ov-bad); } .ov-dot.is-ok { fill: var(--ov-ok); }

/* ── the System Map ── */
.ov-mapwrap { overflow-x: auto; border: 1px solid var(--ov-line); border-radius: 16px; background: #fff; -webkit-overflow-scrolling: touch; }
.ov-mapwrap > .ov-map { min-width: 640px; }
.ov-mapwrap > .ov-map--full { min-width: 900px; }
.ov-map { display: block; width: 100%; height: auto; font-family: var(--px-font, system-ui, sans-serif); }
.ov-stage__box { fill: #fff; stroke: #D6E0CC; stroke-width: 1.4; transition: fill .2s, stroke .2s, opacity .2s; }
.ov-stage__band { fill: var(--lc); }
.ov-lane-data { --lc: var(--lane-data); } .ov-lane-model { --lc: var(--lane-model); } .ov-lane-ops { --lc: var(--lane-ops); }
.ov-stage__t { font-size: 15px; font-weight: 800; fill: var(--ov-ink); }
.ov-stage__j { font-size: 11px; fill: #64748B; }
.ov-chip rect { fill: #F6F8F3; stroke: #D6E0CC; stroke-width: 1; transition: fill .2s, stroke .2s; }
.ov-chip text { font-size: 11px; font-weight: 600; fill: #334155; pointer-events: none; }
.ov-chip.is-soon rect { stroke-dasharray: 3 2; fill: #fff; }
.ov-chip.is-soon text { fill: #94A3B8; }
.ov-chip.is-app rect { fill: #FFF7ED; stroke: #FDBA74; }
.ov-chip.is-passed rect { fill: #E4F0D2; stroke: var(--px-accent); }
.ov-chip.is-passed text { fill: #2C3D12; }
.ov-stage.is-passed .ov-stage__box { stroke: var(--px-accent); }
.ov-map--full .ov-chip { cursor: pointer; }
.ov-map--full .ov-chip:hover rect, .ov-map--full .ov-chip:focus rect { stroke: var(--px-accent); stroke-width: 2; }
.ov-chip:focus { outline: none; }
.ov-chip.is-picked rect { fill: var(--px-accent); stroke: var(--px-accent); }
.ov-chip.is-picked text { fill: #fff; }
.ov-tick { stroke: #C4B5FD; stroke-width: 1.4; stroke-dasharray: 2 4; }
.ov-flow__line { fill: none; stroke: #A3B18A; stroke-width: 2.2; }
.ov-arrowhead { fill: #A3B18A; }
.ov-flow__lab { font-size: 10.5px; font-weight: 700; fill: #4B5B33; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; opacity: 0; transition: opacity .2s; pointer-events: none; }
.ov-map.show-flows .ov-flow__lab, .ov-flow__lab.is-lit { opacity: 1; }
.ov-flow.is-lit .ov-flow__line { stroke: var(--px-accent); stroke-width: 3; }
.ov-map.is-focus .ov-stage:not(.is-lit) { opacity: .28; }
.ov-map.is-focus .ov-flow:not(.is-lit) { opacity: .2; }
.ov-map.is-focus .ov-chip.is-lit rect { fill: var(--px-accent); stroke: var(--px-accent); }
.ov-map.is-focus .ov-chip.is-lit text { fill: #fff; }
.ov-stage.is-lit .ov-stage__box { stroke: var(--px-accent); stroke-width: 2.4; fill: #FBFDF7; }
.ov-map--thumb .ov-chip text { font-size: 11px; }
@media (prefers-reduced-motion: reduce) { .ov-stage__box, .ov-chip rect, .ov-flow__lab, .ov-cell, .ov-stepchip { transition: none; } }

/* the Map page */
.mo-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0; font-size: 13px; color: #475569; }
.mo-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--lc); }
.mo-legend .is-chip { width: 22px; height: 12px; border-radius: 6px; background: #F6F8F3; border: 1px solid #D6E0CC; }
.mo-legend .is-done { background: #E4F0D2; border-color: var(--px-accent); }
.mo-legend .is-soon { background: #fff; border-style: dashed; }
.mo-legend label { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; cursor: pointer; font-weight: 600; }
.mo-card { background: #fff; border: 1px solid var(--ov-line); border-radius: 16px; padding: 16px 18px; margin-top: 14px; }
.mo-card h2 { margin: 0 0 4px; font-size: 19px; }
.mo-card__stage { font-size: 12.5px; font-weight: 700; color: var(--lc); text-transform: uppercase; letter-spacing: .06em; }
.mo-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; margin: 10px 0 12px; }
.mo-kv b { color: #64748B; white-space: nowrap; }
@media (max-width: 520px) { .mo-kv { grid-template-columns: 1fr; gap: 2px; } .mo-kv dd { margin-bottom: 8px; } }
.mo-kv dt, .mo-kv dd { margin: 0; }

/* ── the lesson ── */
.mo-story { margin: 0 0 12px; padding: 18px 20px; border-radius: 16px; background: linear-gradient(120deg, #1A2310, #3F6212 65%, #4D7C0F); color: #fff; }
.mo-story span { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; margin-bottom: 4px; }
.mo-story h2 { margin: 0 0 8px; font-size: 21px; color: #fff; }
.mo-story p { margin: 0; font-size: 15.5px; line-height: 1.6; opacity: .95; }
.mo-mini { border: 1px solid var(--ov-line); border-radius: 14px; overflow: hidden; background: #fff; margin-top: 12px; }
.mo-mini__h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; padding: 8px 12px; border-bottom: 1px solid #E8EFE0; color: #475569; }
.mo-mini .ov-mapwrap { border: 0; border-radius: 0; }
.mo-predict { border: 2px dashed var(--px-accent); border-radius: 14px; padding: 12px 14px; margin: 8px 0 12px; background: #FCFEF9; }
.mo-predict.is-done { border-style: solid; border-color: #D3E6BC; }
.mo-ideas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.mo-idea { display: grid; gap: 4px; align-content: start; padding: 14px 16px; border: 1px solid var(--ov-line); border-radius: 14px; background: #fff; }
.mo-idea__i { font-size: 26px; line-height: 1; }
.mo-idea b { font-size: 15.5px; }
.mo-idea span { font-size: 14.5px; color: #334155; line-height: 1.5; }
.mo-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.mo-tool { display: grid; gap: 8px; align-content: start; padding: 14px 16px; border: 1px solid var(--ov-line); border-radius: 14px; background: #fff; }
.mo-tool h3 { margin: 0; font-size: 16.5px; }
.mo-tool__tag { font-size: 12.5px; color: #64748B; margin-top: -4px; }
.mo-tool ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; }
.mo-tool li { padding-left: 20px; position: relative; }
.mo-tool .is-use li::before { content: '✓'; position: absolute; left: 0; color: var(--ov-ok); font-weight: 800; }
.mo-tool .is-avoid li::before { content: '✗'; position: absolute; left: 0; color: var(--ov-bad); font-weight: 800; }
.mo-tool__cost { font-size: 13px; color: #475569; border-top: 1px dashed #E2E8DA; padding-top: 8px; }
.mo-decide { margin: 14px 0 0; padding: 14px 18px; border-radius: 14px; background: #1A2310; color: #fff; font-size: 16px; }
.mo-decide span { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin-bottom: 2px; }
.mo-none { margin-top: 10px; border-left: 4px solid var(--ov-ok); background: #F3FAF5; border-radius: 0 12px 12px 0; padding: 10px 14px; font-size: 14.5px; }
.mo-code { border-radius: 14px; overflow: hidden; border: 1px solid #2A3320; background: #1E2416; }
.mo-code__h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; font: 600 12.5px var(--px-mono, ui-monospace, monospace); color: #C8D6B4; background: #161B10; border-bottom: 1px solid #2A3320; flex-wrap: wrap; }
.mo-code pre { margin: 0; padding: 10px 0; overflow-x: auto; font: 13.5px/1.6 var(--px-mono, ui-monospace, monospace); color: #E6EDD9; background: none; }
.mo-code pre code.hljs { background: none; padding: 0; }
.mo-line { display: block; padding: 0 14px 0 0; white-space: pre; }
.mo-line::before { content: attr(data-n); display: inline-block; width: 2.6em; margin-right: 12px; text-align: right; color: #6B7A57; user-select: none; }
.mo-line.has-note { cursor: pointer; }
.mo-line.has-note::before { color: #A3E635; }
.mo-line.is-on { background: rgba(163, 230, 53, .14); box-shadow: inset 3px 0 0 #A3E635; }
.mo-verified { font-size: 12px; font-weight: 600; color: #A3E635; }
.mo-verified.is-illustrative { color: #FBBF24; }
.mo-setup { margin: 8px 0 0; font-size: 13.5px; }
.mo-setup summary { cursor: pointer; font-weight: 700; color: #475569; }
.mo-setup pre { margin: 6px 0 0; padding: 10px 12px; border-radius: 10px; background: #F4F6F1; font: 12.5px/1.5 var(--px-mono, ui-monospace, monospace); overflow-x: auto; }
.mo-output { margin-top: 10px; border-radius: 12px; border: 1px solid var(--ov-line); background: #fff; overflow: hidden; }
.mo-output__h { padding: 6px 12px; font-size: 12px; font-weight: 700; color: #64748B; background: #F7FAF3; border-bottom: 1px solid #E8EFE0; }
.mo-output pre { margin: 0; padding: 10px 14px; font: 13px/1.5 var(--px-mono, ui-monospace, monospace); overflow-x: auto; }
.mo-notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.mo-notes li { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border: 1px solid var(--ov-line); border-radius: 12px; background: #fff; font-size: 14.5px; cursor: pointer; }
.mo-notes li.is-on, .mo-notes li:focus { border-color: var(--px-accent); background: #F7FBF1; outline: none; }
.mo-notes li > span:first-child { font: 700 12px var(--px-mono, ui-monospace, monospace); color: var(--px-accent); white-space: nowrap; }
.mo-kind { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--px-accent); background: #EEF5E3; border-radius: 999px; padding: 2px 9px; margin-bottom: 6px; }
.mo-bug { border-radius: 12px; overflow: hidden; border: 1px solid #2A3320; background: #1E2416; margin: 6px 0 8px; }
.mo-bug pre { margin: 0; padding: 8px 0; overflow-x: auto; font: 13.5px/1.6 var(--px-mono, ui-monospace, monospace); color: #E6EDD9; }
.mo-bug .mo-line { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.mo-bug button.mo-line { cursor: pointer; }
.mo-bug button.mo-line:hover:not(:disabled) { background: rgba(163, 230, 53, .12); }
.mo-bug .mo-line.is-right { background: rgba(34, 197, 94, .25); }
.mo-bug .mo-line.is-wrong { background: rgba(239, 68, 68, .3); }
.mo-order { display: grid; gap: 10px; margin: 6px 0 8px; }
.mo-order__pool, .mo-order__seq { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; padding: 8px; border-radius: 12px; border: 1px dashed #C9DDB0; background: #FCFEF9; }
.mo-order__seq { counter-reset: step; border-style: solid; background: #fff; }
.mo-order__pool button, .mo-order__seq span { border: 1px solid #C9DDB0; background: #fff; border-radius: 10px; padding: 7px 11px; font: 600 13.5px inherit; text-align: left; }
.mo-order__pool button { cursor: pointer; }
.mo-order__pool button:hover { border-color: var(--px-accent); }
.mo-order__seq span { background: #EEF5E3; counter-increment: step; }
.mo-order__seq span::before { content: counter(step) '. '; color: var(--px-accent); font-weight: 800; }
.mo-order__seq:empty::before { content: 'Tap the steps in order'; color: #94A3B8; font-size: 13px; padding: 4px; }
.mo-order.is-ok .mo-order__seq { border-color: var(--ov-ok); }
.mo-order.is-bad .mo-order__seq { border-color: var(--ov-bad); }
.mo-order__right { font-size: 13.5px; margin: 0; }

/* the home page */
.mo-hero-map { display: block; border: 1px solid var(--ov-line); border-radius: 16px; overflow: hidden; background: #fff; text-decoration: none; }
.mo-hero-map__cap { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: 13px; color: #475569; border-top: 1px solid #E8EFE0; }
.mo-hero-map__cap b { color: var(--px-accent); }
.mo-soon summary { cursor: pointer; font-weight: 700; color: #475569; }
.mo-soon ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; color: #64748B; }
.mo-soon ol li { display: flex; gap: 10px; }
.mo-soon ol span { font-family: var(--px-mono, ui-monospace, monospace); color: #94A3B8; min-width: 2ch; }
@media (max-width: 560px) {
  .mo-story h2 { font-size: 18px; }
  .ov-tick-lab { font-size: 13px; } .ov-lab { font-size: 13.5px; }
}

/* "Which stack?" chooser */
.mo-chooser { display: grid; gap: 14px; margin: 16px 0 24px; }
.mo-q { background: #fff; border: 1.5px solid #D6E0CC; border-radius: 16px; padding: 14px 16px; }
.mo-q.is-done { border-color: color-mix(in srgb, var(--px-accent) 45%, #D6E0CC); }
.mo-q__t { margin: 0 0 10px; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.mo-q__t span { width: 24px; height: 24px; border-radius: 50%; background: var(--px-accent); color: #fff; display: inline-grid; place-items: center; font-size: 13px; }
.mo-q__opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.mo-opt { text-align: left; border: 1.5px solid #D6E0CC; background: #fff; border-radius: 12px; padding: 10px 12px; font: inherit; cursor: pointer; display: grid; gap: 2px; color: inherit; }
.mo-opt small { color: #64748B; font-size: 12.5px; }
.mo-opt:hover { border-color: var(--px-accent); }
.mo-opt.is-on { border-color: var(--px-accent); background: #F0F7E6; }
.mo-result h2 { margin: 8px 0 12px; }
.mo-recs { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.mo-recs li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; background: #fff; border: 1px solid #D6E0CC; border-radius: 14px; padding: 12px 14px; }
.mo-recs p { margin: 4px 0; font-size: 14px; color: #334155; }
.mo-recs__stage { font-weight: 800; color: var(--px-accent); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.mo-recs__up { color: #92400E !important; }
.mo-recs__soon { color: #94A3B8; font-size: 13px; }
.mo-note { color: #64748B; font-size: 13.5px; }
@media (max-width: 600px) { .mo-recs li { grid-template-columns: 1fr; gap: 4px; } }

/* cheat sheet */
.mo-ref-stage { margin: 22px 0 8px; }
.mo-ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mo-ref-card { background: #fff; border: 1px solid #D6E0CC; border-radius: 14px; padding: 14px; display: grid; gap: 6px; align-content: start; }
.mo-ref-card h3 { margin: 0; font-size: 16px; }
.mo-ref-card p { margin: 0; font-size: 13.5px; color: #334155; }
.mo-ref-card pre { margin: 6px 0 0; max-height: 260px; overflow: auto; padding: 10px 12px; border-radius: 10px; background: var(--px-code, #1E2416); color: #E6E6E6; font: 12px/1.55 var(--px-mono, ui-monospace, monospace); }
.px.mo .mo-ref-card pre code { background: none; color: inherit; padding: 0; border: 0; font: inherit; white-space: pre; }
.mo-ref-card .mo-ref-lock { color: #94A3B8; font-size: 12.5px; }
.mo-gloss { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 10px 0; font-size: 14px; }
.mo-gloss dt { font-weight: 800; }
.mo-gloss dd { margin: 0; color: #334155; }
.mo-versions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.mo-versions span { border: 1px solid #D6E0CC; border-radius: 999px; padding: 4px 10px; font-size: 13px; background: #fff; }
@media (max-width: 600px) { .mo-gloss { grid-template-columns: 1fr; } .mo-gloss dd { margin-bottom: 6px; } }
