/* Scoped to the embeddable module. No selectors alter the parent app. */
.mmg {
 --mmg-ink:#233b34; --mmg-muted:#5b6862; --mmg-paper:#fffdf7; --mmg-line:#c8d4c9;
 --mmg-accent:#29634e; color:var(--mmg-ink); background:var(--mmg-paper);
 border:1px solid var(--mmg-line); border-radius:20px; padding:clamp(16px,3vw,32px);
 font:inherit; line-height:1.65; max-width:1100px; margin:auto;
}
.mmg * { box-sizing:border-box; }
.mmg h2,.mmg h3,.mmg h4 { color:var(--mmg-ink); line-height:1.35; }
.mmg h2 { margin:.35rem 0 1rem; font-size:clamp(1.4rem,3vw,2rem); }
.mmg h3 { font-size:1.3rem; margin:1rem 0; }
.mmg p { margin:.7rem 0; white-space:pre-line; }
.mmg-header { border-bottom:1px solid var(--mmg-line); padding-bottom:18px; margin-bottom:20px; }
.mmg-kicker { display:block; color:var(--mmg-accent); font-size:.78rem; font-weight:700; letter-spacing:.08em; }
.mmg-meta { color:var(--mmg-muted); font-size:.86rem; }
.mmg-intro { max-width:65ch; }
.mmg-catalog { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:14px; margin-top:22px; }
.mmg button,.mmg input,.mmg textarea,.mmg select { font:inherit; }
.mmg button { cursor:pointer; touch-action:manipulation; }
.mmg-button,.mmg-token,.mmg-card {
 min-height:44px; border:1px solid var(--mmg-line); border-radius:12px;
 padding:10px 16px; color:var(--mmg-ink); background:#fff; line-height:1.5;
}
.mmg-card { display:flex; flex-direction:column; gap:10px; text-align:left; padding:20px; }
.mmg-card strong { font-size:1.14rem; }
.mmg-card:hover,.mmg-button:hover,.mmg-token:hover { border-color:var(--mmg-accent); background:#eef5ed; }
.mmg .mmg-primary { color:#fff; background:var(--mmg-accent); border-color:var(--mmg-accent); }
.mmg .mmg-primary:hover { background:#1e4d3b; }
.mmg button:disabled { opacity:.5; cursor:default; }
.mmg :focus-visible { outline:3px solid #a74815; outline-offset:3px; }
.mmg-actions,.mmg-bank,.mmg-order { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.mmg-actions { margin:16px 0 0; }
.mmg-work { padding:18px; background:#f3f6ee; border-radius:14px; margin:16px 0; }
.mmg-order { min-height:72px; background:#fff; border:2px dashed #95ad98; border-radius:12px; padding:12px; margin-bottom:18px; }
.mmg-selected { background:#e1edda; }
.mmg-field { display:flex; flex-direction:column; gap:6px; margin:14px 0; font-weight:600; }
.mmg input,.mmg textarea,.mmg select {
 width:100%; min-height:46px; color:var(--mmg-ink); background:#fff;
 border:1px solid #879a8c; border-radius:8px; padding:10px; font-weight:400;
}
.mmg select { white-space:normal; max-width:100%; }
.mmg textarea { resize:vertical; }
.mmg-equation { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:12px 0; }
.mmg-molecule { display:flex; gap:5px; align-items:center; font-weight:700; }
.mmg-molecule input { width:80px; }
.mmg-sign { font-weight:700; font-size:1.2rem; }
.mmg-ledger { width:100%; border-collapse:collapse; margin:18px 0 0; background:#fff; }
.mmg-ledger td,.mmg-ledger th { padding:8px; border:1px solid var(--mmg-line); text-align:left; }
.mmg-feedback,.mmg-reference,.mmg-hints { padding:14px 18px; border-left:4px solid #8c7844; background:#f6efd8; border-radius:6px; overflow-wrap:anywhere; }
.mmg-success { border-color:#38754b; background:#e5f2e1; }
.mmg-error { border-color:#a44329; background:#fff0e9; }
.mmg-reference { border-color:#5b7791; background:#edf3f9; }
.mmg-explanation { max-width:75ch; }
.mmg-review-card { border:1px solid var(--mmg-line); border-radius:14px; padding:18px; margin:14px 0; }
.mmg-response { white-space:pre-wrap; overflow-wrap:anywhere; background:#f2f5f0; padding:10px; font:inherit; }
.mmg summary { cursor:pointer; min-height:40px; padding:6px 0; }
@media (max-width:520px) {
 .mmg { padding:16px; border-radius:12px; }
 .mmg-work { padding:12px; }
 .mmg-actions>.mmg-button { flex:1 1 130px; }
 .mmg-ledger { font-size:.8rem; }
 .mmg-ledger td,.mmg-ledger th { padding:6px; }
 .mmg-molecule input { width:65px; }
}
@media (prefers-reduced-motion:reduce) { .mmg * { scroll-behavior:auto; } }

/* Evidence is a readable source sentence, not a shuffled answer bank. */
.mmg-evidence { display:flex; gap:5px; flex-wrap:wrap; padding:12px 0; }
.mmg-evidence .mmg-token { min-width:34px; padding:8px; }
.mmg-evidence [aria-pressed="true"] { background:#cee4c9; border-color:#29634e; box-shadow:inset 0 -3px #29634e; }
.mmg-lexeme { border:1px solid var(--mmg-line); border-radius:6px; background:#fff; padding:4px 10px; }

.mmg-evidence-static { display:inline-flex; align-items:center; min-height:44px; padding:8px 3px; color:var(--mmg-muted); }
