/* ---------- math notation (screens/mathhelp.js) ---------- */
.mf { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .08em; line-height: 1; font-size: .78em; }
.mf-n, .mf-d { display: block; padding: 0 .12em; }
.mf-n { border-bottom: .09em solid currentColor; padding-bottom: .06em; }
.mf-d { padding-top: .08em; }
.mf .mf { font-size: 1em; }
.mroot { display: inline-flex; align-items: flex-start; white-space: nowrap; }
.mroot-s { font-size: 1.08em; line-height: 1; margin-right: .02em; }
.mroot-in { border-top: .08em solid currentColor; padding: .02em .08em 0; line-height: 1.05; }
.mv { font-style: italic; font-family: Georgia, 'Times New Roman', serif; font-weight: 700; padding: 0 .03em; }
.msq-ans .mf { font-size: .82em; }

/* ---------- help in the question card ---------- */
.msq-helprow { display: flex; justify-content: center; margin: -2px 0 2px; }
.msq-help { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 16px 7px 12px; border-radius: 999px; border: 2px solid rgba(255, 224, 102, .55); background: rgba(255, 224, 102, .12); color: #ffe066; font: 900 15px/1 var(--font); cursor: pointer; transition: transform .12s, background .12s; }
.msq-help:hover { background: rgba(255, 224, 102, .22); transform: translateY(-1px); }
.msq-help svg.i { width: 20px; height: 20px; }
.msq-hint { margin: 8px auto 4px; max-width: 46ch; padding: 10px 14px 11px; border-radius: 16px; background: rgba(255, 224, 102, .1); border: 1.5px solid rgba(255, 224, 102, .35); text-align: left; animation: msqBump .3s; }
.msq-hint-lv { font-size: 11.5px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: #ffe066; margin-bottom: 3px; }
.msq-hint-t { font-size: 16px; font-weight: 800; color: #fff; line-height: 1.35; }
.msq-sol { max-height: min(56vh, 560px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.msq-how { margin-top: 6px; background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .28); color: #fff; }
.msq-go { margin-top: 8px; }

/* ---------- the worked solution ---------- */
.msol { text-align: left; }
.msol-method { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.msol-method svg.i { width: 16px; height: 16px; }
.msol-steps { list-style: none; margin: 0; padding: 0; counter-reset: msol; display: grid; gap: 10px; }
.msol-step { counter-increment: msol; position: relative; padding: 10px 12px 10px 44px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); animation: msqBump .3s; }
.msol-step::before { content: counter(msol); position: absolute; left: 10px; top: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #10213a; font: 900 13px/1 var(--font); }
.msol-say { font-size: 15.5px; font-weight: 800; line-height: 1.35; color: #fff; }
.msol-expr { margin-top: 6px; font-family: var(--font-display); font-size: 25px; line-height: 1.3; color: #ffe9a8; letter-spacing: .3px; }
.msol-why { margin-top: 4px; font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--ink2, #b9c3ef); }
.msol-check { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(79, 224, 124, .14); border: 1.5px solid rgba(79, 224, 124, .45); font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.msol-check svg.i { flex: none; width: 18px; height: 18px; color: #7ff0a6; margin-top: 1px; }
.msol-alt { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink2, #b9c3ef); }
.msol-more { margin-top: 10px; }
.msol-none { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); font-size: 14px; font-weight: 700; color: var(--ink2, #b9c3ef); }
.msol-none svg.i { flex: none; width: 18px; height: 18px; }
.msol.compact .msol-expr { font-size: 22px; }
.msol.compact .msol-say { font-size: 14.5px; }
.msol-modal .msol-title { font-size: clamp(26px, 6vw, 34px); margin-bottom: 12px; }

/* ---------- result screen ---------- */
.res-how { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 4px 10px; min-height: 32px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff; font: 900 13px/1 var(--font); cursor: pointer; }
.res-how svg.i { width: 15px; height: 15px; }
.res-helped { display: flex; align-items: center; gap: 6px; justify-content: center; color: #ffe066; margin: 4px 0; }
.res-helped svg.i { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .msq-hint-t { font-size: 15px; }
  .msol-expr { font-size: 22px; }
  .msq-sol { max-height: 50vh; }
}
.res-missed-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.res-missed { display: grid; gap: 8px; justify-items: center; margin: 4px 0 2px; }
.res-missed-h { text-transform: uppercase; letter-spacing: .6px; color: var(--ink3); }
.res-missed .missed { width: 100%; max-width: 420px; }
