.mg-root{--mg:#1e766d;--mg-border:#d9e6e1;max-width:1220px;margin:auto;padding:0 0 65px;color:#233541;font-size:14px}.mg-root *{box-sizing:border-box}.mg-hero{background:linear-gradient(120deg,#173e40,#152735);border-radius:21px;padding:32px 36px;color:white}.mg-hero small{color:#a3d9ca;letter-spacing:.1em;font-size:12px}.mg-hero h1{font-size:clamp(1.55rem,3vw,2.4rem);color:white;line-height:1.35;margin:12px 0}.mg-hero p{color:#e0eaea;line-height:1.9;max-width:770px}.mg-hero>div{display:flex;flex-wrap:wrap;gap:10px;margin-top:19px}.mg-hero a{display:inline-block;border:1px solid #719991;border-radius:10px;color:white;padding:9px 13px;text-decoration:none}.mg-tabs{display:flex;gap:5px;max-width:660px;padding:6px;background:#e9f1ef;border-radius:13px;margin:20px 0}.mg-tabs a{flex:1;text-decoration:none;text-align:center;border-radius:9px;color:#37615e;padding:10px 4px}.mg-tabs a.active{background:white;color:#145b50;font-weight:700;box-shadow:0 2px 8px #142b2633}.mg-panel{border:1px solid var(--mg-border);background:white;border-radius:16px;padding:24px}.mg-panel>h2,.mg-results>h2{font-size:1.4rem;margin:0 0 10px}.mg-panel>p,.mg-panel p{line-height:1.85}.mg-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(250px,1fr);gap:20px;margin:23px 0}.mg-layout label,.mg-sampling label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:650}.mg-layout textarea,.mg-layout select,.mg-sampling input{border:1px solid #c9dad5;padding:9px 11px;border-radius:9px;background:#fff;color:#243840;max-width:100%;font:inherit}.mg-layout textarea{width:100%;resize:vertical;min-height:90px}.mg-selects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.mg-switches{border:1px solid var(--mg-border);border-radius:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px 16px}.mg-switches legend{font-weight:700;padding:0 6px}.mg-switches label{display:flex;flex-direction:row;align-items:center;gap:8px}.mg-switches input{accent-color:var(--mg);width:17px;height:17px}.mg-actions{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.mg-root button{cursor:pointer;padding:10px 14px;border-radius:9px;background:#eef6f2;border:1px solid #9fbbb1;color:#1e6359;font:inherit;font-weight:700}.mg-root button.mg-main{background:var(--mg);color:white;border-color:var(--mg)}.mg-root button:disabled{opacity:.6;cursor:wait}.mg-note{background:#fff8ea;border-radius:10px;color:#806744;padding:12px 14px;font-size:12px;line-height:1.9}.mg-error{background:#fff0e9;color:#813b22;padding:12px;border-radius:9px}.mg-diagram{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border-radius:12px;background:#f0f7f5;padding:17px;text-align:center;font-size:12px;line-height:1.6}.mg-diagram>span{background:white;border:1px solid #c7ddd5;padding:8px 11px;border-radius:8px;width:100%}.mg-diagram>b{color:#3b8b7f}.mg-stack{border:2px dashed #86b7a9;border-radius:11px;padding:7px;width:100%;display:grid;gap:7px}.mg-block{background:white;border:1px solid #cee2db;border-radius:8px;padding:10px;display:grid;gap:5px}.mg-block small{font-weight:750;color:#24675b}.mg-block>div{padding:7px;background:#edf4f2;border-radius:5px}.mg-block .inactive{color:#9a9d9f;text-decoration:line-through;opacity:.5}.mg-stats{display:grid;gap:8px;margin-top:14px}.mg-stats span{display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid #e7eee9;padding:7px 0}.mg-stats b{color:#217b6e}.mg-results{border-top:1px solid var(--mg-border);padding-top:24px;margin-top:22px}.mg-scroll{overflow:auto}.mg-scroll table{border-collapse:collapse;min-width:700px;width:100%;font-size:12px}.mg-scroll th,.mg-scroll td{padding:13px 9px;text-align:start;border-bottom:1px solid #dce8e2}.mg-scroll th{background:#f2f7f5;color:#46776a}.mg-chart{border:1px solid var(--mg-border);border-radius:10px;margin:18px 0;padding:12px}.mg-chart svg{width:100%;max-height:270px}.mg-chart p{font-size:12px;color:#506d6c}.mg-empty{border:1px dashed #9abdb2;padding:22px;text-align:center;color:#527a71;border-radius:10px}.mg-sampling{border-top:1px solid var(--mg-border);padding-top:15px}.mg-sampling label{margin-bottom:10px}.mg-sampling input:not([type=range]){width:100%}.mg-output{background:#f1f7f5;min-height:55px;padding:12px;overflow-wrap:anywhere;border-radius:8px}.mg-att{padding:13px;background:#f7faf9;border-radius:10px}.mg-head{padding:10px;border-bottom:1px solid var(--mg-border)}.mg-head>div{display:grid;grid-template-columns:110px 1fr 45px;gap:8px;margin:8px 0;align-items:center}.mg-track{height:10px;background:#dce9e3;border-radius:8px;overflow:hidden}.mg-track i{display:block;background:#2b8f80;height:100%}.mg-history article{display:grid;grid-template-columns:70px 1fr;gap:16px;border-bottom:1px solid var(--mg-border);padding:14px 0}.mg-history article>b{font-size:1.4rem;color:#278473}.mg-history h3{margin:0 0 6px}.mg-history p{color:#51686f}.mg-history a,.mg-links a{color:#126e61}.mg-columns{display:grid;grid-template-columns:1fr 1fr;gap:22px}.mg-columns p{color:#52666b}.mg-links{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.mg-links a{border:1px solid var(--mg-border);border-radius:8px;padding:9px 12px;text-decoration:none}.mg-root :is(button,input,select,textarea,a):focus-visible{outline:3px solid #e9b64b;outline-offset:2px}@media(max-width:850px){.mg-layout,.mg-columns{grid-template-columns:1fr}.mg-hero{padding:24px}.mg-panel{padding:15px}}@media(max-width:440px){.mg-selects,.mg-switches{grid-template-columns:1fr}.mg-tabs a{font-size:12px}.mg-head>div{grid-template-columns:75px 1fr 38px}}

.mg-compute{padding:14px;border:1px solid #c5ddd4;border-radius:11px;background:#f1f8f6;margin-top:16px}
.mg-compute label{font-weight:750;display:flex;gap:7px;flex-direction:column;max-width:400px}.mg-compute select{width:100%;background:white;border:1px solid #9ebfb3;padding:11px;border-radius:9px}.mg-compute p{font-size:12px;line-height:1.8;color:#526b69;margin:9px 0 0}
.mg-progress{min-height:25px;display:grid;gap:6px;font-size:13px}.mg-progress progress{width:100%;height:12px;accent-color:#218b79}.mg-danger{color:#ae3c36!important;background:#fff2f1!important;border-color:#edb8ae!important}
.mg-benchmark{margin:16px 0;padding:14px;border:1px solid #c2dace;border-radius:11px;background:#f7faf9}.mg-benchmark h3{margin:0 0 12px}.mg-runtime{font-size:13px;color:#3c7166}

.mg-objective{padding:14px;margin-top:15px;border:1px solid #d0dedc;border-radius:12px;background:#f5f8f8}
.mg-objective label{font-weight:750;margin-bottom:7px}.mg-objective select{width:100%;max-width:420px;padding:10px;border:1px solid #b5ccca;border-radius:8px}
.mg-objective p{font-size:12px;color:#516a69;margin:8px 0 0}.mg-objective-pill{background:#edf6f2;border-radius:8px;padding:9px 12px;font-size:12px}
.mg-study{border:1px solid #c7ded6;border-radius:12px;padding:15px;margin-top:18px;background:#f7faf9}.mg-study h3{margin-top:0}.mg-study p{font-size:13px}
/* v1.51 — bilingual foundations and measured guided experiment */
.mg-foundation,.mg-guided{scroll-margin-top:24px}
.mg-eyebrow{display:inline-block;color:#176c5e;font-size:12px;font-weight:800;letter-spacing:.02em;margin-bottom:8px}
.mg-foundation-goals{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:13px}
.mg-foundation-goals>div,.mg-worked,.mg-guide-steps>div{background:#f4f9f8;border:1px solid #cde1db;border-radius:11px;padding:14px}
.mg-foundation-goals ul,.mg-worked ol{padding-inline-start:24px;line-height:1.7}
.mg-pathways{display:flex;gap:9px;flex-wrap:wrap;margin:9px 0}.mg-pathways button,.mg-guide-actions button{cursor:pointer;border-radius:8px;border:1px solid #89b7ab;background:#f7fcfa;padding:10px 13px;color:#1b514a;font-weight:700}
.mg-pathways button.active{background:#176b60;color:white}.mg-pathways button:focus-visible,.mg-guide-actions button:focus-visible{outline:3px solid #f1ad50;outline-offset:3px}
.mg-route-description{padding:10px 14px;border-inline-start:4px solid #248e7b;background:#f5faf8}
.mg-probability{display:grid;gap:10px;max-width:480px;margin:14px 0}.mg-probability>div{display:grid;grid-template-columns:88px 1fr 50px;align-items:center;gap:10px}.mg-probability span{height:13px;background:#e3ebe8;border-radius:6px;overflow:hidden}.mg-probability i{display:block;height:100%;background:#298777}
.mg-glossary{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.mg-glossary>div{border:1px solid #d2e2de;border-radius:9px;padding:11px}.mg-glossary dt{font-weight:750}.mg-glossary dd{margin:4px 0 0;color:#3f5856;line-height:1.6}
.mg-jump{display:inline-block;margin-top:18px;color:#166f63;font-weight:750}
.mg-guide-steps{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(235px,1fr))}.mg-guide-steps>div>b{display:inline-grid;place-items:center;width:25px;height:25px;background:#1d7669;color:white;border-radius:50%}.mg-guide-steps h3{font-size:16px}.mg-guide-steps select{width:100%;margin:9px 0;padding:9px;background:white;border-radius:8px;border:1px solid #9cb7b0}
.mg-guide-actions{display:grid;gap:10px;margin-top:12px}.mg-guide-actions button:disabled{opacity:.45;cursor:not-allowed}.mg-guided-results{border:1px solid #c4d9d1;padding:15px;border-radius:11px;margin:16px 0}.mg-guided-results th,.mg-guided-results td{text-align:start;padding:10px;border-bottom:1px solid #e1ebe7}.mg-guided-results table{width:100%;border-collapse:collapse}.mg-inference{border-inline-start:4px solid #297f70;background:#f0f8f4;padding:14px;line-height:1.75}
@media(max-width:640px){.mg-guide-steps{grid-template-columns:1fr}.mg-probability>div{grid-template-columns:65px 1fr 45px}}
.mg-evolution{border:1px solid #d0e2dc;padding:12px 15px;border-radius:10px;margin:15px 0}.mg-evolution summary{cursor:pointer;font-weight:750}.mg-evolution article{padding:10px 0;border-top:1px solid #e0ebe7;margin-top:8px}.mg-evolution article p{font-size:13px}.mg-jump{border:0;background:transparent;cursor:pointer;text-decoration:underline;font:inherit;padding:0}

/* WKL-024BS (E-02): declared auto-save restore banner and same-model continuation panel. */
.mg-session-restore{margin:0 0 16px;padding:12px 16px;border:1px solid #7d8f6a;border-inline-start:4px solid #4d6b3c;border-radius:10px;background:#eef4e6;color:#2f4423;line-height:1.7}
.mg-session-restore .mg-guide-actions{margin-top:10px}
.mg-continuation{margin:14px 0 0;padding:12px 16px;border:1px solid #9a8455;border-inline-start:4px solid #7a6633;border-radius:10px;background:#f7f1e1;color:#5a4a26;line-height:1.75}
.mg-continuation h4{margin:0 0 6px}