/* General interactive lab (model_explorer): parameter model + rule drill. Extends pbl-lab.css. */
.ml-plot { margin-top: 4px; }
.ml-grid { stroke: #e7e9f2; stroke-width: 1; }
.ml-axis { stroke: #8a8f9e; stroke-width: 1.4; }
.ml-tick { font-size: 11px; fill: #7a7f8e; }
.ml-axis-label { font-size: 12px; fill: #4a4f5e; font-weight: 600; }
.ml-curve { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: d .12s linear; }
.ml-ghost { fill: none; stroke-width: 2; stroke-dasharray: 5 5; opacity: .32; }
.ml-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 2px 0; font-size: 12.5px; color: var(--ink-soft, #475569); }
.ml-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.ml-legend-item i { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.ml-legend-ghost i { background: repeating-linear-gradient(90deg, #9aa0b0 0 5px, transparent 5px 9px); }
.ml-sec { margin: 16px 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary, #8c55f2); }
.ml-params { display: grid; gap: 10px; }
.ml-param { padding: 12px 14px; border: 1px solid #ebe7f7; border-radius: 14px; background: color-mix(in srgb, var(--card, #fff) 92%, #8c55f2 8%); transition: border-color .2s ease, box-shadow .2s ease; }
.ml-param.is-active { border-color: #b79af7; box-shadow: 0 0 0 3px rgba(140, 85, 242, .12); }
.ml-param-head { display: flex; align-items: baseline; gap: 8px; font-size: 14px; cursor: pointer; }
.ml-sym { font: italic 700 17px/1 "Times New Roman", Georgia, serif; color: #8c55f2; min-width: 18px; }
.ml-name { flex: 1; font-weight: 600; color: var(--ink, #1d1b26); }
.ml-val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink, #1d1b26); background: var(--card, #fff); border-radius: 8px; padding: 1px 8px; }
.ml-param input[type=range] { width: 100%; margin: 10px 0 4px; accent-color: #8c55f2; }
.ml-effect { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft, #5b6070); }
.ml-param.is-active .ml-effect { color: var(--ink, #1d1b26); }
.ml-readouts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ml-readouts .ml-sec { width: 100%; }
.ml-readout { display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 12px; border-radius: 999px; background: #f4f5f9; font-size: 13px; }
.ml-readout b { font-variant-numeric: tabular-nums; color: #8c55f2; }
.ml-tasks { display: grid; gap: 6px; }
.ml-task { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; background: #f7f7fb; font-size: 13.5px; line-height: 1.5; cursor: pointer; }
.ml-task input { margin-top: 3px; accent-color: #22a387; }
.ml-task.is-done span { color: #22a387; text-decoration: line-through; text-decoration-color: rgba(34,163,135,.5); }
.ml-reset { margin-top: 14px; border: 1px solid #e3e1ec; background: var(--card, #fff); color: var(--ink, #1d1b26); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; cursor: pointer; }
.ml-rule { padding: 12px 14px; border-radius: 14px; background: #f6f2ff; border: 1px solid #e6dcff; }
.ml-rule b { font-size: 12px; color: #8c55f2; letter-spacing: .05em; } .ml-rule p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; }
.ml-score { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; font-size: 13px; font-weight: 700; }
.ml-score-bar { flex: 1; height: 8px; border-radius: 99px; background: #ececf2; overflow: hidden; }
.ml-score-bar i { display: block; height: 100%; background: #8c55f2; border-radius: 99px; transition: width .3s ease; }
.ml-items { display: grid; gap: 10px; }
.ml-item { padding: 12px 14px; border-radius: 16px; border: 1px solid #ececf2; background: var(--card, #fff); transition: border-color .2s ease, background .2s ease; }
.ml-item.is-right { border-color: #9fe0cb; background: #f2fcf8; } .ml-item.is-wrong { border-color: #f6b9ba; background: #fff6f6; }
.ml-item-text { font-size: 15.5px; font-weight: 700; margin-bottom: 8px; }
.ml-item-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ml-choice { border: 2px solid transparent; border-radius: 999px; padding: 8px 16px; background: #f4f5f9; color: var(--ink, #1d1b26); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.ml-choice:not(:disabled):hover { background: #ece8f9; }
.ml-choice.is-answer { border-color: #7fdcbf; background: #e9fbf4; } .ml-choice.is-picked { border-color: #f6a5a7; background: #fff1f1; }
.ml-why { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: #4a4659; }
.ml-done { margin-top: 12px; padding: 12px; border-radius: 14px; text-align: center; font-weight: 700; background: #eefcf7; color: #2c9a7b; position: relative; }
html.night .ml-grid { stroke: #34313d; } html.night .ml-tick, html.night .ml-axis-label { fill: #a29fb0; }
html.night .ml-param { border-color: #3a3546; background: #262330; } html.night .ml-readout, html.night .ml-task, html.night .ml-choice { background: #302d38; }
html.night .ml-rule { background: #2b2440; border-color: #3d3358; } html.night .ml-item { border-color: #34313d; }
html.night .ml-item.is-right, html.night .ml-done { background: #173a31; } html.night .ml-item.is-wrong { background: #3d2224; }
@media (prefers-reduced-motion: reduce) { .ml-curve, .ml-score-bar i { transition: none; } }
