/* TogetherEd maths zone. Colour here is functional: pieces need telling apart on a board. */
:root {
  --m1: #E11D48; --m2: #F97316; --m3: #EAB308; --m4: #16A34A; --m5: #0891B2; --m6: #2563EB; --m7: #7C3AED; --m8: #DB2777;
  --m9: #65A30D; --m10: #0D9488; --m11: #9333EA; --m12: #C2410C;
}
.mz-stage { padding: 6px 0; }
.mz-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; margin: 12px 0 0; }
.mz-bar label { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.mz-bar input[type="number"] { width: 90px; }
.mz-bar select { width: auto; }
.mz-bar input[type="checkbox"] { width: auto; }
.mz-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mz-seg button { border: 0; border-radius: 0; background: transparent; color: var(--fg); padding: 8px 12px; }
.mz-seg button + button { border-left: 1px solid var(--line); }
.mz-seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.mz-big { text-align: center; font-size: clamp(2rem, 8vw, 6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; min-height: 1.1em; }
.mz-sub { text-align: center; color: var(--muted); margin-top: 6px; font-size: clamp(1rem, 2.2vw, 1.4rem); }
.mz-svg { width: 100%; height: auto; display: block; margin: 0 auto; touch-action: none; user-select: none; }
.display .mz-stage { width: 94vw; }
.display .mz-svg { max-height: 78vh; }
.display .mz-big { font-size: clamp(4rem, 16vw, 14rem); }
.mz-swatches { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mz-swatches button { width: 30px; height: 30px; border-radius: 50%; padding: 0; border: 2px solid transparent; }
.mz-swatches button[aria-pressed="true"] { border-color: var(--fg); box-shadow: 0 0 0 2px var(--bg) inset; }
.mz-grid-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 24px 0; }
.mz-tool { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--panel); }
.mz-tool:hover { border-color: var(--fg); }
.mz-tool strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.mz-tool span { color: var(--muted); font-size: .92rem; }
.mz-tool .ico { display: block; height: 44px; margin-bottom: 10px; }
