.m2-main { max-width: 54rem; width: 100%; margin: auto; padding: 1rem; box-sizing: border-box; }
.m2-main [hidden] { display: none !important; }
.m2-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.m2-bar h1, .m2-bar p { margin: 0; }
.m2-bar > div:last-child { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.m2-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.m2-topics button.topic { color: #16342e; background: #f3efff; min-width: 0; }
.m2-topics button.topic:nth-child(5n + 2) { background: #e8f1ff; }
.m2-topics button.topic:nth-child(5n + 3) { background: #ffeef0; }
.m2-topics button.topic:nth-child(5n + 4) { background: #e8f6ed; }
.m2-topics button.topic:nth-child(5n + 5) { background: #fff3e0; }
.m2-topics .topic-title { overflow-wrap: anywhere; }
.m2-topics img[hidden] + .topic-title { grid-column: 1 / -1; }
@media (max-width: 830px) {
  .m2-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 630px) {
  .m2-topics { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
}
.m2-practice { text-align: start; min-width: 0; }
.m2-practice blockquote { margin: 1rem 0; padding: 1rem; border-inline-start: .3rem solid #257c70; background: #e7f5f1; white-space: pre-line; overflow-wrap: anywhere; }
.m2-choices { display: grid; gap: .5rem; margin: 1rem 0; }
.m2-choices button { text-align: start; overflow-wrap: anywhere; white-space: normal; width: 100%; }
.m2-choices button[data-result="correct"] { background: #d8f3df; color: #154c25; border-color: #287340; }
.m2-choices button[data-result="wrong"] { background: #ffe2e2; color: #791a1a; border-color: #9a2727; }
.m2-feedback { padding: .75rem; background: #fff0cf; border-radius: .5rem; }

.m2-practice { font-size: 1.1rem; }
.m2-choices button { min-height: 3rem; }
.m2-topics button.topic { grid-template: 1fr / minmax(0, 1fr); min-height: 5rem; }

.m2-choices button { white-space: pre-line; }

.m2-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.m2-table :is(td, th) { padding: .3rem; border: 1px solid #91aaa2; overflow-wrap: anywhere; }
.m2-table caption { margin-bottom: .5rem; text-align: left; font-weight: 700; }

.m2-chart { margin: 0; }
.m2-chart figcaption { margin-bottom: .5rem; font-weight: 700; }
.m2-chart-row { display: grid; grid-template-columns: minmax(5rem, 1fr) minmax(2rem, 2fr) auto; gap: .5rem; align-items: center; margin: .35rem 0; }
.m2-chart-track { height: .8rem; background: #e2ebe7; border-radius: .2rem; }
.m2-chart-bar { display: block; height: 100%; border-radius: .2rem; background: #276456; }

.m2-diagram { margin: 0; }
.m2-diagram figcaption { font-weight: 700; }
.m2-diagram li { margin-block: .5rem; padding: .35rem .5rem; background: #fff; border-inline-start: .25rem solid #276456; }

#m2Topics { display: block; }
#m2Topics[hidden] { display: none; }
.m2-topics button { min-height: 4rem; min-width: 0; }
.m2-topics .topic-title { text-align: left; display: block; }
.pm-fraction { display: inline-grid; grid-template-rows: auto auto; vertical-align: middle; margin: 0 .2em; text-align: center; line-height: 1.15; }
.pm-fraction span:first-child { border-bottom: 1px solid currentColor; padding: 0 .2em .08em; }
.pm-fraction span:last-child { padding: .08em .2em 0; }
.pm-repeating { text-decoration: overline; }
#m2Quote { padding: .35rem; background: #fff; }
.m2-choices button img { margin-top: .35rem; }

.m2-practice { font-size: 1.2rem; }
#m2Prompt { font-weight: 650; font-size: 1.3rem; line-height: 1.35; }
.m2-choices button { min-height: 54px; padding: .6rem .8rem; font-size: 1.17rem; }
#m2Quote { margin-inline: 0; padding: 0; }
#m2Quote img { border-radius: 12px; margin-inline: auto; }
#m2Feedback { overflow-wrap: anywhere; line-height: 1.45; }
