/* Original styling for ROM technology and finite-buffer interactive lab. */
.romlesson-step-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.85rem; margin:1rem 0; }
.romlesson-concept { padding:1rem; border:1px solid #dae2ee; border-radius:16px; background:#f8fbff; min-width:0; }
.romlesson-concept h3 { color:#2a4475; font-size:1.03rem; margin:0 0 .65rem; }
.romlesson-concept p { line-height:1.55; }
.romlesson-solutions { border:1px solid #d6e1ef; border-radius:14px; margin:1rem 0; padding:.85rem 1rem; }
.romlesson-solutions summary { font-weight:750; cursor:pointer; }
.ml2-lab { --ml2-ink:#20304d; --ml2-border:#cfdaeb; --ml2-blue:#335391; color:var(--ml2-ink); border:1px solid var(--ml2-border); background:#f7f9fd; padding:1.15rem; border-radius:21px; margin:1.25rem 0; box-shadow:0 12px 27px rgba(38,54,97,.07); }
.ml2-lab * { box-sizing:border-box; }
.ml2-lab .ml2-header { display:flex; justify-content:space-between; align-items:center; gap:.8rem; }
.ml2-lab .ml2-header h3 { margin:0; color:#193a6b; font-size:1.28rem; }
.ml2-lab .ml2-header p { margin:.35rem 0 .8rem; color:#526078; }
.ml2-lab .ml2-kicker { border-radius:999px; background:#e5ebfa; color:#24477d; font-weight:750; padding:.35rem .7rem; white-space:nowrap; }
.ml2-lab .ml2-tabs { display:flex; flex-wrap:wrap; gap:.5rem; padding-bottom:.75rem; border-bottom:1px solid var(--ml2-border); margin-bottom:1rem; }
.ml2-lab button { background:var(--ml2-blue); border:1px solid var(--ml2-blue); color:white; border-radius:11px; padding:.64rem .8rem; font:inherit; font-weight:700; cursor:pointer; }
.ml2-lab button:hover:not(:disabled) { background:#243d78; }
.ml2-lab button:focus-visible, .ml2-lab input:focus-visible, .ml2-lab select:focus-visible { outline:3px solid #f6a835; outline-offset:3px; }
.ml2-lab .ml2-tabs button { color:#244775; background:white; border-color:#c1cfe4; }
.ml2-lab .ml2-tabs button.is-active { color:white; background:var(--ml2-blue); border-color:var(--ml2-blue); }
.ml2-lab .ml2-panel { background:#fff; border:1px solid var(--ml2-border); border-radius:17px; padding:1rem; }
.ml2-lab .ml2-panel[hidden] { display:none!important; }
.ml2-lab .ml2-panel h4 { color:#1c4379; font-size:1.12rem; margin:.1rem 0 .6rem; }
.ml2-lab .ml2-panel p { line-height:1.55; }
.ml2-lab label { display:block; font-weight:700; margin:.75rem 0 .3rem; }
.ml2-lab select { width:min(100%,440px); font:inherit; padding:.55rem; border-radius:10px; border:1px solid #9caecd; color:var(--ml2-ink); background:white; }
.ml2-lab .ml2-state-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.6rem; margin:1rem 0; }
.ml2-lab .ml2-state-card { border:1px solid #cfdaeb; background:#f1f6ff; padding:.75rem; border-radius:12px; min-width:0; }
.ml2-lab .ml2-state-card span { display:block; font-size:.86rem; color:#5a6980; margin-bottom:.3rem; }
.ml2-lab .ml2-state-card strong { overflow-wrap:anywhere; }
.ml2-lab .ml2-actions { display:flex; flex-wrap:wrap; gap:.5rem; margin:.9rem 0; }
.ml2-lab button.ml2-secondary { background:#fff; color:#264675; border-color:#9fb3d1; }
.ml2-lab button.ml2-secondary:hover { background:#edf3ff; }
.ml2-lab .ml2-feedback { border-left:4px solid #6d8dbb; border-radius:8px; background:#f0f5fc; padding:.65rem .75rem; min-height:2.5rem; }
.ml2-lab .ml2-feedback.ml2-error { background:#fff2ec; border-color:#c36b4b; }
.ml2-lab .ml2-note { color:#56667b; font-size:.9rem; }
.ml2-lab .ml2-controls-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.8rem; margin:.9rem 0; }
.ml2-lab .ml2-controls-grid > div { border:1px solid #d6e1ee; border-radius:13px; padding:.6rem .75rem; background:#f9fbff; }
.ml2-lab .ml2-controls-grid label { margin:0 0 .5rem; }
.ml2-lab input[type=range] { width:100%; accent-color:#335391; cursor:pointer; }
.ml2-lab .ml2-controls-grid select { width:100%; }
.ml2-lab .ml2-flow-labels { display:flex; justify-content:space-between; gap:.4rem; color:#36527f; font-weight:750; font-size:.92rem; padding:.2rem; }
.ml2-lab .ml2-slots { display:flex; flex-wrap:wrap; gap:.5rem; border:1px dashed #adbfd7; border-radius:14px; padding:.7rem; min-height:75px; background:#f5f8fd; }
.ml2-lab .ml2-slot { display:flex; align-items:center; justify-content:center; padding:.55rem .45rem; min-height:48px; flex:1 1 65px; max-width:110px; background:#fff; border:1px dashed #b5c3d8; border-radius:10px; font-weight:750; color:#78869b; }
.ml2-lab .ml2-slot.is-full { border:1px solid #4675b2; color:#234577; background:#dfeefe; }
.ml2-lab .ml2-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.6rem; margin:1rem 0; }
.ml2-lab .ml2-stats div { background:#f0f5fc; border:1px solid #d7e1ef; padding:.6rem; border-radius:11px; }
.ml2-lab .ml2-stats span { display:block; color:#5a6c87; font-size:.82rem; }
.ml2-lab .ml2-stats strong { display:block; color:#1d3f73; font-size:1.45rem; font-variant-numeric:tabular-nums; }
.ml2-lab details { border:1px solid #d5e0ef; border-radius:10px; padding:.65rem .8rem; margin:.75rem 0; }
.ml2-lab details summary { font-weight:700; cursor:pointer; }
.ml2-lab .ml2-log { padding-left:1.3rem; overflow-wrap:anywhere; }
@media(max-width:790px) { .romlesson-step-grid { grid-template-columns:1fr; } .ml2-lab .ml2-controls-grid { grid-template-columns:1fr; } }
@media(max-width:590px) { .ml2-lab { padding:.65rem; } .ml2-lab .ml2-state-grid { grid-template-columns:1fr; } .ml2-lab .ml2-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .ml2-lab .ml2-panel { padding:.75rem; } }
@media(prefers-reduced-motion:reduce) { .ml2-lab *, .ml2-lab *::before, .ml2-lab *::after { transition:none!important; } }
