/* Fourth Form Maths "See it" interactives, set 1 (ff-maths-see-1.js). Classes prefixed ms-. */
.ms { --ms-c: #1E73FF; background: #fff; color: #0F2147; font-family: Arial, Helvetica, sans-serif; border: 1px solid #D6DEEB; border-radius: 14px; padding: 14px; box-sizing: border-box; max-width: 100%; overflow-wrap: anywhere; }
.ms *, .ms *::before, .ms *::after { box-sizing: border-box; }
.ms-instr { font-weight: bold; margin: 0 0 10px; line-height: 1.4; }
.ms-fig { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ms-svg { display: block; width: 100%; max-width: 560px; height: auto; }
.ms-svg text { font-family: Arial, Helvetica, sans-serif; }
.ms-drag { touch-action: none; cursor: ew-resize; }
.ms-two { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: flex-start; width: 100%; }
.ms-two .ms-svg { flex: 1 1 260px; max-width: 420px; }
.ms-two .ms-sq-area { flex: 1 1 260px; max-width: 360px; }
.ms-two .ms-sq-graph { flex: 1 1 300px; max-width: 420px; }
.ms-big { font-size: 1.15em; text-align: center; margin: 4px 0; max-width: 100%; overflow-x: auto; }
.ms-ctrls { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 0; }
.ms-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; width: 100%; }
.ms-fig > .ms-row { align-items: center; justify-content: center; }
.ms-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 150px; min-width: 0; }
.ms-segw { flex: 1 1 100%; }
.ms-lab { font-size: 0.92em; color: #0F2147; }
.ms-val { color: #0F2147; }
.ms-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-btn { min-height: 44px; min-width: 44px; border-radius: 10px; border: 2px solid var(--ms-c); background: #fff; color: #0F2147; padding: 4px 14px; font: inherit; font-weight: bold; cursor: pointer; line-height: 1.2; }
.ms-btn:hover { background: #EEF3FB; }
.ms-btn[aria-pressed="true"] { background: var(--ms-c); color: #fff; border-color: #0F2147; }
.ms-btn[aria-pressed="true"]::before { content: "\2713\00a0"; }
.ms-btn:focus-visible, .ms select:focus-visible, .ms input:focus-visible { outline: 3px solid #0F2147; outline-offset: 2px; }
.ms-btn-sm { font-weight: normal; padding: 4px 10px; }
.ms-btn-alt { border-color: #0F2147; border-style: dashed; }
.ms input[type="range"] { width: 100%; min-height: 32px; accent-color: var(--ms-c); margin: 0; }
.ms select, .ms .ms-num, .ms .ms-text { min-height: 44px; border-radius: 10px; border: 1px solid #9FB0CC; padding: 0 8px; font: inherit; color: #0F2147; background: #fff; max-width: 100%; }
.ms .ms-num { width: 4.2em; text-align: center; }
.ms .ms-text { flex: 1 1 140px; min-width: 0; }
.ms-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.ms-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.ms-check input { width: 22px; height: 22px; accent-color: var(--ms-c); }
.ms-eq { align-items: center; gap: 6px; }
.ms-eq .ms-lab { flex: 1 1 100%; font-weight: bold; }
.ms-eqt { font-weight: bold; }
.ms-out { background: #F3F6FB; border-left: 4px solid var(--ms-c); padding: 8px 10px; border-radius: 6px; margin: 12px 0 0; line-height: 1.5; }
.ms-note { font-size: 0.9em; color: #33415C; }
.ms-pts { align-self: stretch; margin: 0; }
.ms-regions .ms-lab, .ms-pairs .ms-lab { flex: 1 1 100%; text-align: center; }
.ms-sub { margin-top: 14px; border-top: 1px solid #D6DEEB; padding-top: 10px; }
.ms-h { margin: 0 0 8px; font-size: 1em; }
.ms-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ms-step { padding: 6px 8px; border-left: 3px solid var(--ms-c); background: #FAFBFD; overflow-x: auto; }
.ms-step .ms-note { display: block; margin-top: 2px; }
.ms-table { width: 100%; overflow-x: auto; }
.ms-tab { border-collapse: collapse; margin: 0 auto; }
.ms-tab caption { padding-bottom: 4px; }
.ms-tab th, .ms-tab td { border: 1px solid #C5D0E2; padding: 4px 8px; text-align: center; min-width: 2.6em; }
.ms-tab th { background: #EEF3FB; }
.ms .katex { font-size: 1.05em; }
