
.m7e-app{
  --m7e-border:#dfe5ec;
  --m7e-bg:#f7f9fc;
  --m7e-text:#172033;
  --m7e-muted:#667085;
  --m7e-accent:#2f6fed;
  --m7e-good:#147a45;
  --m7e-good-bg:#eaf8f0;
  --m7e-bad:#b42318;
  --m7e-bad-bg:#fff0ef;
  max-width:1000px;
  margin:32px auto;
  color:var(--m7e-text);
  font-family:inherit;
}
.m7e-app *{box-sizing:border-box}
.m7e-hero{
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:center;
  padding:30px;
  border:1px solid var(--m7e-border);
  border-radius:20px;
  background:linear-gradient(135deg,#fff,#f2f6ff);
}
.m7e-hero h2,.m7e-quiz h3,.m7e-worked h3{margin:4px 0 8px}
.m7e-hero p{margin:0;color:var(--m7e-muted)}
.m7e-kicker{
  display:inline-block;
  font-size:.8rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--m7e-accent);
}
.m7e-hero-symbols{
  flex:0 0 auto;
  font-size:clamp(2rem,5vw,4.25rem);
  font-weight:800;
  white-space:nowrap;
}
.m7e-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
.m7e-card{
  padding:20px;
  border:1px solid var(--m7e-border);
  border-radius:16px;
  background:#fff;
}
.m7e-card h3{margin:8px 0 6px;font-size:1.05rem}
.m7e-card p{margin:0 0 12px;color:var(--m7e-muted);line-height:1.5}
.m7e-symbol{font-size:2rem;font-weight:800;color:var(--m7e-accent)}
.m7e-example{
  padding:10px 12px;
  border-radius:10px;
  background:var(--m7e-bg);
  font-weight:700;
  overflow-wrap:anywhere;
}
.m7e-rulebox{
  margin:18px 0;
  padding:18px 20px;
  border-radius:16px;
  background:#eef4ff;
  border:1px solid #cfdcff;
}
.m7e-rulebox>span{font-size:1.4rem;font-weight:800;margin-left:10px}
.m7e-rulebox p{margin:6px 0 0;color:var(--m7e-muted)}
.m7e-worked{
  padding:24px;
  border:1px solid var(--m7e-border);
  border-radius:18px;
  background:#fff;
}
.m7e-worked-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:14px;
}
.m7e-worked-item{
  padding:16px;
  border-radius:14px;
  background:var(--m7e-bg);
}
.m7e-worked-item>strong{font-size:1.35rem}
.m7e-worked-item p{color:var(--m7e-muted);line-height:1.5}
.m7e-worked-item span{font-weight:700}
.m7e-quiz{
  margin-top:22px;
  padding:26px;
  border:1px solid var(--m7e-border);
  border-radius:20px;
  background:#fff;
}
.m7e-quiz-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:20px;
  margin-bottom:18px;
}
.m7e-quiz-head p{margin:0;color:var(--m7e-muted)}
.m7e-progress-wrap{min-width:180px}
.m7e-progress-label{font-size:.85rem;color:var(--m7e-muted)}
.m7e-progress{
  height:8px;
  border-radius:999px;
  background:#e9edf3;
  overflow:hidden;
  margin-top:6px;
}
.m7e-progress span{
  display:block;
  width:5%;
  height:100%;
  background:var(--m7e-accent);
  transition:width .25s ease;
}
.m7e-question-card{
  padding:22px;
  border-radius:16px;
  background:var(--m7e-bg);
}
.m7e-question-number{
  color:var(--m7e-accent);
  font-weight:800;
  font-size:.85rem;
  margin-bottom:8px;
}
.m7e-question{
  font-size:1.2rem;
  font-weight:800;
  line-height:1.4;
}
.m7e-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:18px;
}
.m7e-option{
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 14px;
  background:#fff;
  border:2px solid var(--m7e-border);
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  transition:.15s ease;
}
.m7e-option:hover{border-color:#b8c7e8}
.m7e-option input{width:18px;height:18px;accent-color:var(--m7e-accent)}
.m7e-option.is-correct{
  border-color:var(--m7e-good);
  background:var(--m7e-good-bg);
}
.m7e-option.is-wrong{
  border-color:var(--m7e-bad);
  background:var(--m7e-bad-bg);
}
.m7e-feedback{
  display:none;
  margin-top:16px;
  padding:14px 16px;
  border-radius:12px;
  line-height:1.5;
}
.m7e-feedback.show{display:block}
.m7e-feedback.good{background:var(--m7e-good-bg);color:var(--m7e-good)}
.m7e-feedback.bad{background:var(--m7e-bad-bg);color:var(--m7e-bad)}
.m7e-actions{display:flex;gap:10px;margin-top:16px}
.m7e-btn{
  appearance:none;
  border:1px solid var(--m7e-border);
  background:#fff;
  color:var(--m7e-text);
  padding:11px 16px;
  border-radius:10px;
  font-weight:800;
  cursor:pointer;
}
.m7e-btn:hover{transform:translateY(-1px)}
.m7e-btn:disabled{opacity:.45;cursor:not-allowed;transform:none}
.m7e-btn-primary{
  border-color:var(--m7e-accent);
  background:var(--m7e-accent);
  color:#fff;
}
.m7e-result{
  margin-top:18px;
  padding:24px;
  text-align:center;
  border-radius:16px;
  background:var(--m7e-bg);
}
.m7e-score{font-size:2.4rem;font-weight:900}
.m7e-result-text{margin:6px 0 16px;color:var(--m7e-muted)}
@media (max-width:780px){
  .m7e-grid,.m7e-worked-grid{grid-template-columns:1fr 1fr}
  .m7e-hero,.m7e-quiz-head{align-items:flex-start;flex-direction:column}
  .m7e-hero-symbols{font-size:2.4rem}
}
@media (max-width:560px){
  .m7e-grid,.m7e-worked-grid,.m7e-options{grid-template-columns:1fr}
  .m7e-hero,.m7e-quiz,.m7e-worked{padding:18px}
  .m7e-actions{flex-direction:column}
  .m7e-btn{width:100%}
}
.m7e-definitions{margin-bottom:18px}.m7e-series{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}@media(max-width:560px){.m7e-series{flex-direction:column}.m7e-series .m7e-btn{width:100%}}

/* Mathe 7e Intro v3 — beginner definitions */
.m7e-v3-definitions{margin:22px 0 28px}
.m7e-v3-title{padding:22px 24px;margin-bottom:14px;border-radius:18px;background:#f2f6ff;border:1px solid #d7e2ff}
.m7e-v3-title span{font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#2f6fed}
.m7e-v3-title h3{margin:5px 0 7px}
.m7e-v3-title p{margin:0;color:#667085}
.m7e-v3-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:14px 0}
.m7e-v3-def{padding:19px;border:1px solid #dfe5ec;border-radius:16px;background:#fff}
.m7e-v3-wide{display:flex;gap:18px;align-items:flex-start}
.m7e-v3-def h4{margin:5px 0 9px;font-size:1.05rem}
.m7e-v3-def p{line-height:1.55;margin:8px 0}
.m7e-v3-symbol{font-size:2.1rem;line-height:1;font-weight:900;color:#2f6fed}
.m7e-v3-formula{padding:10px 12px;border-radius:10px;background:#f7f9fc;font-weight:800}
.m7e-v3-example{color:#344054}
.m7e-v3-memory{padding:17px 20px;border-radius:14px;background:#eef8f2;border:1px solid #ccebd8;font-size:1.12rem}
.m7e-v3-memory span{display:block;margin-top:5px;font-size:.95rem;font-weight:400}
@media(max-width:760px){.m7e-v3-grid{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.m7e-v3-grid{grid-template-columns:1fr}.m7e-v3-wide{display:block}.m7e-v3-wide .m7e-v3-symbol{margin-bottom:10px}}


/* V7 — exercise switcher + nested Venn diagram */
.m7e-exercise-switcher{display:flex;gap:10px;flex-wrap:wrap;margin:28px 0 14px}
.m7e-venn-section{margin-top:0}
.m7e-venn-card{background:#fff;border:1px solid #dfe5ec;border-radius:18px;padding:22px}
.m7e-venn-prompt{text-align:center;font-size:1.35rem;margin:10px 0 18px}
.m7e-venn-prompt strong{font-size:1.7rem}
.m7e-venn-diagram{position:relative;max-width:620px;height:500px;margin:0 auto 18px;border:2px dashed #cbd5e1;border-radius:22px;background:#fafbfc;overflow:hidden}
.m7e-venn-zone{position:absolute;display:flex;align-items:flex-start;justify-content:center;border:3px solid #64748b;background:rgba(255,255,255,.78);cursor:pointer;transition:.16s ease;font:inherit}
.m7e-venn-zone:hover:not(:disabled){transform:scale(1.015);box-shadow:0 6px 20px rgba(15,23,42,.10)}
.m7e-venn-zone b{position:absolute;top:12px;left:18px;font-size:1.65rem}
.m7e-venn-zone span{margin-top:48px;font-weight:700;font-size:.88rem}
.m7e-venn-outside{inset:10px;border:0;background:transparent;border-radius:18px;align-items:flex-end;justify-content:flex-end;padding:12px;z-index:1}
.m7e-venn-outside span{margin:0;background:#fff;border:1px solid #dbe2ea;border-radius:999px;padding:7px 11px}
.m7e-venn-q{width:430px;height:430px;border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%);z-index:2}
.m7e-venn-q:hover:not(:disabled){transform:translate(-50%,-50%) scale(1.015)}
.m7e-venn-z{width:300px;height:300px;border-radius:50%;left:50%;top:54%;transform:translate(-50%,-50%);z-index:3}
.m7e-venn-z:hover:not(:disabled){transform:translate(-50%,-50%) scale(1.015)}
.m7e-venn-n{width:165px;height:165px;border-radius:50%;left:50%;top:60%;transform:translate(-50%,-50%);z-index:4}
.m7e-venn-n:hover:not(:disabled){transform:translate(-50%,-50%) scale(1.015)}
.m7e-venn-n span{margin-top:62px}
.m7e-venn-zone.is-correct{background:#dcfce7!important;border-color:#16a34a!important;box-shadow:0 0 0 4px rgba(22,163,74,.12)}
.m7e-venn-zone.is-wrong{background:#fee2e2!important;border-color:#dc2626!important}
.m7e-venn-zone:disabled{cursor:default;opacity:1}
@media(max-width:650px){
  .m7e-venn-diagram{height:390px}
  .m7e-venn-q{width:330px;height:330px}
  .m7e-venn-z{width:230px;height:230px}
  .m7e-venn-n{width:125px;height:125px}
  .m7e-venn-zone b{top:8px;left:13px;font-size:1.35rem}
  .m7e-venn-zone span{margin-top:38px;font-size:.76rem}
  .m7e-venn-n span{margin-top:47px}
}
@media(max-width:410px){
  .m7e-venn-diagram{height:330px}
  .m7e-venn-q{width:280px;height:280px}
  .m7e-venn-z{width:195px;height:195px}
  .m7e-venn-n{width:105px;height:105px}
}


/* V8 — make the Venn structure and labels unambiguous.
   Labels are separate from buttons so WordPress/theme button styles cannot hide them. */
.m7e-venn-diagram{isolation:isolate}
.m7e-venn-zone{
  padding:0!important;
  margin:0!important;
  min-width:0!important;
  min-height:0!important;
  color:transparent!important;
  text-indent:-9999px!important;
}
.m7e-venn-label{
  position:absolute;
  z-index:10;
  pointer-events:none;
  display:flex;
  align-items:center;
  gap:7px;
  color:#172033!important;
  background:#fff;
  border:1px solid #d8e0ea;
  border-radius:999px;
  padding:5px 10px;
  box-shadow:0 2px 7px rgba(15,23,42,.08);
  line-height:1.15;
}
.m7e-venn-label strong{font-size:1.35rem;color:#172033!important}
.m7e-venn-label span{font-size:.76rem;color:#475467!important}
.m7e-label-q{left:20%;top:16%}
.m7e-label-z{left:31%;top:36%}
.m7e-label-n{left:50%;top:59%;transform:translate(-50%,-50%)}
.m7e-label-out{right:4%;bottom:4%;font-size:.78rem}
.m7e-venn-help{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px 16px;
  margin:8px auto 2px;
  font-size:.84rem;
  color:#475467;
}
.m7e-venn-help span{background:#f7f9fc;border-radius:999px;padding:5px 9px}
.m7e-venn-help strong{color:#172033}
@media(max-width:650px){
  .m7e-venn-label{padding:4px 7px;gap:4px}
  .m7e-venn-label strong{font-size:1.05rem}
  .m7e-venn-label span{font-size:.65rem}
  .m7e-label-q{left:14%;top:15%}
  .m7e-label-z{left:27%;top:35%}
}

/* V9 — Exercise 3 */
.m7e-vocab-option{
  display:block;width:100%;text-align:left;padding:13px 15px;margin:0;
  border:1px solid #d7deea;border-radius:12px;background:#fff;color:#172033;
  font:inherit;font-weight:650;cursor:pointer;transition:.15s ease;
}
.m7e-vocab-option:hover:not(:disabled){border-color:#7c8cf8;transform:translateY(-1px)}
.m7e-vocab-option.is-correct{background:#dcfce7;border-color:#16a34a}
.m7e-vocab-option.is-wrong{background:#fee2e2;border-color:#dc2626}
.m7e-vocab-option:disabled{cursor:default;opacity:1}

.m7e-cloze-sentence{font-size:1.08rem;line-height:2.8;white-space:normal;margin:18px 0}.m7e-cloze-sentence input{display:inline-block;vertical-align:middle;max-width:100%;height:38px;padding:4px 8px;margin:3px 4px;border:2px solid #aab6d2;border-radius:7px;background:#fff;color:#15223d;font:inherit;line-height:1.3}.m7e-cloze-sentence input:focus{outline:2px solid #7258df}.m7e-cloze-sentence input.m7e-cloze-correct{border-color:#239b67;background:#e7f9f0}.m7e-cloze-sentence input.m7e-cloze-wrong{border-color:#d45858;background:#fff0f0}.m7e-cloze-chip{display:inline-block;background:#eee9ff;color:#40317c;border-radius:16px;padding:5px 11px;margin:3px;font-weight:700}.m7e-cloze-level{margin-top:12px}.m7e-cloze-level select{padding:7px;border-radius:7px;margin-left:8px;color:#17243d;background:#fff}.m7e-cloze-solution{margin-top:15px;padding:12px;border:1px solid #c7d0e1;border-radius:8px}.m7e-cloze-solution summary{cursor:pointer;font-weight:700}.m7e-cloze-hints{margin:10px 0}
/* V11.1: touch-friendly hint chips; tap to insert or drag to a blank */
.m7e-cloze-chip{border:1px solid #b9abf4;cursor:grab;touch-action:manipulation;font:inherit;min-height:38px}.m7e-cloze-chip:active{cursor:grabbing}.m7e-cloze-chip:focus-visible{outline:3px solid #7258df;outline-offset:2px}.m7e-cloze-chip-used{background:#dff5e9;border-color:#8ccdaa}

.m7e-cloze-chip-selected{outline:3px solid #7c3aed!important;outline-offset:2px;background:#ede9fe!important;color:#4c1d95!important}

.m7e-notes-prompt,.m7e-notes .m7e-notes-prompt{font-size:1.12rem;line-height:2.5;margin:16px 0}.m7e-note-input{display:inline-block!important;vertical-align:middle!important;width:135px!important;max-width:38vw!important;min-height:42px!important;margin:3px 5px!important;padding:5px 9px!important;border:2px solid #94a3b8!important;border-radius:8px!important;background:white!important;color:#172554!important;font-size:1rem!important}.m7e-note-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin:14px 0}.m7e-note-option{display:flex;align-items:center;gap:10px;min-height:52px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#f8fafc;color:#172554;cursor:pointer;font-size:1rem}.m7e-note-option input{width:19px;height:19px;flex:none;accent-color:#6d28d9}.m7e-note-correct{background:#dcfce7!important;border-color:#16a34a!important}.m7e-note-wrong{background:#fee2e2!important;border-color:#dc2626!important}.m7e-note-instruction{font-size:.92rem;color:#475569}

/* v12.1: theme-independent touch-friendly notation selection */
.m7e-notes .m7e-note-choice{appearance:none!important;-webkit-appearance:none!important;display:flex!important;width:100%!important;min-height:54px!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important;white-space:normal!important;line-height:1.35!important;box-sizing:border-box!important;touch-action:manipulation;cursor:pointer!important;font-family:inherit!important;font-weight:500!important;}
.m7e-notes .m7e-note-choice::before{content:'';width:19px;height:19px;border:2px solid #64748b;border-radius:50%;display:inline-block;flex:0 0 19px;margin-right:12px;background:white;box-sizing:border-box;}
.m7e-notes .m7e-note-choice[aria-pressed='true']{border:2px solid #6d28d9!important;background:#ede9fe!important;color:#312e81!important;}
.m7e-notes .m7e-note-choice[aria-pressed='true']::before{background:#6d28d9;box-shadow:inset 0 0 0 3px white;border-color:#6d28d9;}
.m7e-notes .m7e-note-choice:disabled{opacity:1!important;cursor:default!important;}
