/* Math Word Style: scoped to converter-generated content only. */
.mws-article {font-size:18px!important;line-height:1.65!important;color:#182437;overflow-wrap:break-word}
.mws-article *, .mws-article *::before,.mws-article *::after {box-sizing:border-box}
.mws-article .wordlatex-question {padding:18px 20px!important;margin:0 0 16px!important;border:1px solid #d8e4f2!important;border-radius:12px!important;background:#edf5ff!important;overflow-x:auto}
.mws-article .wordlatex-question:nth-of-type(even) {background:#f0f9ee!important;border-color:#d8e9d7!important}
.mws-article .wordlatex-question p {margin:7px 0!important;line-height:1.65!important}
.mws-article .wordlatex-question p:first-child>span[style*="cf202b"],
.mws-article .wordlatex-question p:first-child>strong:first-child {color:#d01d2a!important;font-weight:800!important}
.mws-article .wordlatex-question img,.mws-article img {display:block!important;margin:14px auto!important;max-width:100%!important;height:auto!important;object-fit:contain}
.mws-article .wordlatex-question table {width:100%!important;max-width:100%;border-spacing:7px 6px!important;border-collapse:separate!important;table-layout:fixed;margin:10px 0!important;border:0!important}
.mws-article .wordlatex-question table td {background:#fff!important;border:1px solid #d6e1ef!important;border-radius:9px!important;padding:8px 10px!important;vertical-align:middle!important;overflow-wrap:anywhere;min-width:0}
.mws-article .wordlatex-question table td span[style*="border-radius:50%"] {display:inline-flex!important;align-items:center;justify-content:center;min-width:27px!important;width:27px!important;height:27px!important;line-height:1!important;border:1.5px solid #2563eb!important;border-radius:50%!important;color:#174e96!important;font-weight:800!important;margin-right:7px!important;vertical-align:middle}
.mws-article .wordlatex-question .MathJax,.mws-article .wordlatex-question mjx-container {font-size:1em!important;max-width:100%}
@media(max-width:650px){.mws-article{font-size:18px!important}.mws-article .wordlatex-question{padding:12px!important}.mws-article .wordlatex-question table{table-layout:auto!important;border-spacing:3px!important}.mws-article .wordlatex-question table td{padding:6px!important}}

/* Legacy WordPress paste compatibility */
.mws-article .wordlatex-question.mws-q-0{background:#eef6ff!important}
.mws-article .wordlatex-question.mws-q-1{background:#f1faef!important}
.mws-article .mws-question-label{color:#cf202b!important;font-weight:800!important}
.mws-article .mws-answer-label{display:inline-flex!important;align-items:center!important;justify-content:center!important;border:1.5px solid #2563eb!important;border-radius:50%!important;color:#174e96!important;font-weight:800!important;min-width:29px!important;height:29px!important;margin-right:7px!important;padding:0 3px!important;line-height:1!important}
.mws-article .wordlatex-question table{border-collapse:separate!important;border-spacing:7px 6px!important;border:0!important}
.mws-article .wordlatex-question table td{border:1px solid #d6e1ef!important;border-radius:9px!important;background:#fff!important;padding:8px 10px!important}
.mws-article .wordlatex-question img{display:block!important;margin:14px auto!important;max-width:100%!important;height:auto!important}

/* v1.3: white background for all questions */
.mws-article .wordlatex-question,.mws-article .wordlatex-question:nth-of-type(even),.mws-article .wordlatex-question.mws-q-0,.mws-article .wordlatex-question.mws-q-1{background:transparent!important;border:0!important;border-radius:0!important;padding:6px 0!important;margin:10px 0!important;overflow:visible!important}

/* v1.8 Responsive answer layout: 4->2 on phones; 2->1; 1 stays 1. */
.mws-article .wordlatex-question table.wl-answer-table,
.preview .wordlatex-question table.wl-answer-table {
 width:100%!important;max-width:100%!important;border:0!important;
 border-spacing:0!important;border-collapse:separate!important;table-layout:auto!important;
 display:block!important;margin:10px 0!important;
}
.mws-article .wordlatex-question table.wl-answer-table tbody,
.preview .wordlatex-question table.wl-answer-table tbody {
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px!important;
}
.mws-article .wordlatex-question table.wl-answer-table.wl-cols-2 tbody,
.preview .wordlatex-question table.wl-answer-table.wl-cols-2 tbody {grid-template-columns:repeat(2,minmax(0,1fr))}
.mws-article .wordlatex-question table.wl-answer-table.wl-cols-1 tbody,
.preview .wordlatex-question table.wl-answer-table.wl-cols-1 tbody {grid-template-columns:minmax(0,1fr)}
.mws-article .wordlatex-question table.wl-answer-table tr,
.preview .wordlatex-question table.wl-answer-table tr {display:contents!important}
.mws-article .wordlatex-question table.wl-answer-table td,
.preview .wordlatex-question table.wl-answer-table td {
 display:block!important;box-sizing:border-box!important;width:auto!important;min-width:0!important;
 background:#fff!important;border:1px solid #d6e1ef!important;border-radius:9px!important;
 padding:8px 10px!important;overflow-wrap:normal!important;word-break:normal!important;
}
.mws-article .wordlatex-question table.wl-answer-table td mjx-container,
.preview .wordlatex-question table.wl-answer-table td mjx-container {max-width:100%;overflow-x:auto;overflow-y:hidden;vertical-align:middle}
@media(max-width:700px){
 .mws-article .wordlatex-question table.wl-answer-table.wl-cols-4 tbody,
 .preview .wordlatex-question table.wl-answer-table.wl-cols-4 tbody {grid-template-columns:repeat(2,minmax(0,1fr))}
 .mws-article .wordlatex-question table.wl-answer-table.wl-cols-2 tbody,
 .preview .wordlatex-question table.wl-answer-table.wl-cols-2 tbody {grid-template-columns:minmax(0,1fr)}
 .mws-article .wordlatex-question table.wl-answer-table td,
 .preview .wordlatex-question table.wl-answer-table td {padding:8px!important}
}
@media(max-width:360px){
 .mws-article .wordlatex-question table.wl-answer-table.wl-cols-4 tbody,
 .preview .wordlatex-question table.wl-answer-table.wl-cols-4 tbody {grid-template-columns:minmax(0,1fr)}
}

/* v1.5: section headings in all four exam parts */
.mws-article .wl-section-heading,
.entry-content .wl-section-heading,
.wp-block-post-content .wl-section-heading {
 display:block!important;box-sizing:border-box!important;width:100%!important;max-width:100%!important;
 background:#e8f2ff!important;border:0!important;border-left:5px solid #1565c0!important;
 border-radius:6px!important;padding:15px 12px!important;margin:25px 0 18px!important;
 text-align:center!important;color:#1557a0!important;font-size:25px!important;
 font-weight:800!important;line-height:1.4!important;
}
@media(max-width:480px){.mws-article .wl-section-heading,.entry-content .wl-section-heading,.wp-block-post-content .wl-section-heading{padding:12px 8px!important;}}
