/* Lane M pages: Results, Answers, Marking, grade grid, online test. Tokens only (dx.css owns colours). */
.mk-page, .mk-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; align-content: start; }
.mk-note { font-size: 12px; }
table.tb tr.mk-out td { color: var(--ink-3); }
.mk-tbtn { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-align: left; min-height: 44px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-tbtn:hover { color: var(--primary); text-decoration: underline; }
.mk-tbtn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.mk-went { display: grid; gap: 10px; }
.mk-went .numrow { min-height: 36px; flex-wrap: nowrap; }
.mk-ell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.tb td.mk-qcell { white-space: normal; min-width: 240px; max-width: 520px; }
.mk-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-kic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.mk-log .fold-b { padding: 0 0 8px; }
.mk-log .list .li { padding: 8px 14px; min-height: 52px; }
.mk-log .pager { padding: 0 14px; }
.d-h .tl-logo + h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 599px) {
  table.tb td.mk-qcell { min-width: 0; max-width: none; }
  table.tb td.mk-res { grid-column: span 2; }
}
.tb-stack > table.tb td.mk-res { grid-column: span 2; }
/* Total stays in view while many round columns scroll sideways (phones show cards instead). */
@media (min-width: 600px) {
  table.tb .mk-tot { position: sticky; right: 0; background: var(--surface); }
}

/* Answers */
.mk-gh { display: flex; gap: 10px; align-items: center; min-width: 0; flex: 1 1 240px; }
.mk-gh > svg.lucide { color: var(--ink-3); flex: none; }
.mk-ght { display: grid; min-width: 0; }
.mk-ght h3 { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-ght .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-anlist { border-top: 1px solid var(--line); }
.mk-who { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.pav.mk-pav { width: 22px; height: 22px; font-size: 10px; flex: none; }
.pav.mk-pav svg.lucide { width: 13px; height: 13px; }
.mk-key { color: var(--ok); }
.an-pts small.mk-time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mk-notin .an-pts b { color: var(--ink-3); text-decoration: line-through; }
.mk-sform { display: contents; }
/* Card look without .card, so a page change scrolls back to the first group, not to the pager. */
.mk-pgcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.mk-pgcard .pager { border-top: 0; }
.mk-sbtn { max-width: 100%; }
.mk-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; min-height: 32px; }
.mk-sort[aria-sort] { color: var(--ink); font-weight: 600; }
.mk-thnote { display: block; font-size: 10px; color: var(--ink-3); font-weight: 400; }
.mk-ftabs { overflow-x: auto; max-width: 100%; }
.mk-fpanes { padding: 4px; max-height: min(52vh, 460px); overflow-y: auto; }
.mk-fsrch { display: flex; margin: 6px; }
.mk-fall { padding: 2px 6px; }
.mk-chk { cursor: pointer; position: relative; }
.mk-chk input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.mk-chk .box.round { border-radius: 50%; }
.mk-chk input:checked + .box { background: var(--primary); border-color: var(--primary); }
.mk-chk input:not(:checked) + .box svg.lucide { visibility: hidden; }
.mk-chk input:focus-visible + .box { outline: 2px solid var(--primary); outline-offset: 2px; }
.mk-chk[hidden] { display: none; }

/* Marking */
.mk-steps .checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.mk-steps .checks li { border-top: 0; }
.mk-sbar { width: 120px; }
.mk-shead > .grow { min-width: 7em; }
.mk-inb { padding: 0 16px 12px; }
.mk-srow { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; }
.mk-slist > :first-child { border-top: 0; }
.mk-srow[hidden], .mk-sgh[hidden] { display: none; }
.mk-sgh { background: var(--surface-2); min-height: 48px; }
.mk-sgh .num { font-size: 13px; }
.mk-off { opacity: .6; }
.mk-setup { display: grid; gap: 8px; }
.mk-danger-link { justify-self: start; color: var(--danger); }
.mk-empty-act { display: flex; justify-content: center; padding: 0 16px 20px; }
.mk-kfor { width: 240px; max-width: 100%; }
.mk-kfor .fsel { width: 100%; }
.mk-kq { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 14px; }
.mk-kq > li { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mk-kqt { display: flex; gap: 10px; align-items: flex-start; }
.mk-kn { font-weight: 700; color: var(--ink-3); min-width: 24px; font-variant-numeric: tabular-nums; }
.mk-kopts { list-style: none; margin: 0; padding: 0 0 0 34px; display: grid; gap: 4px; }
.mk-kopts li { display: flex; gap: 8px; align-items: center; }
.mk-kopts li.right { color: var(--ok); font-weight: 600; }
.mk-kopts li svg.lucide { width: 16px; height: 16px; }
.mk-kans { margin: 0; padding-left: 34px; }
.mk-kq .chips { padding-left: 34px; }
.mk-cutro { min-height: 44px; gap: 10px; }
.mk-tieacts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mk-tieacts .help { flex: 1 1 100%; margin: 0; }
.mk-hand { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.mk-hlist { max-height: 320px; overflow-y: auto; }
.mk-gcol { color: var(--ink-2); }
.mk-aqt { display: grid; gap: 4px; min-width: 0; }
.mk-aqk { font-size: 13px; }

/* Grade grid */
.mk-gform { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.mk-gin { width: min(1100px, 100%); margin-inline: auto; display: grid; gap: 16px; }
.gcell { cursor: pointer; font: inherit; }
.gcell:disabled { cursor: default; }
.gcell .mk-gk { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 64px; }
.gcell:focus-visible, .gcell[aria-current="true"] { outline: 2px solid var(--primary); outline-offset: 2px; }
.mk-gexp { margin: 0 0 8px; overflow-wrap: anywhere; }
.mk-gmarks { margin-top: 10px; max-width: 200px; }
.mk-gedit { scroll-margin: 12px; }
.ar .tn .mk-tnm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#mk-ans .d-b, #mk-team .d-b { grid-auto-rows: max-content; }

/* Online test and camera check */
.mk-center { text-align: center; }
.mk-center-row { justify-content: center; }
.mk-exjoin { display: grid; gap: 16px; }
.mk-exintro { display: grid; gap: 4px; }
.mk-exam { display: grid; gap: 16px; }
.mk-q { display: grid; gap: 14px; }
.mk-q[hidden] { display: none; }
.qx.mk-qx { font-size: 18px; line-height: 27px; overflow-wrap: anywhere; }
.mk-fig { max-width: 100%; max-height: 260px; border-radius: 12px; border: 1px solid var(--line); justify-self: start; cursor: zoom-in; }
.mk-ways { display: grid; gap: 8px; }
.way.mk-way { min-height: 56px; width: 100%; }
.way.mk-way b { width: 22px; flex: none; }
.mk-optimg { display: block; max-height: 64px; margin-top: 6px; border-radius: 6px; }
.mk-exnav { justify-content: space-between; }
.mk-exnav .btn:disabled { opacity: .45; }
.mk-strip-btn { border: 0; background: none; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; min-height: 44px; }
[data-mk-left].mk-late { color: var(--danger); font-weight: 600; }
.mk-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; padding: 4px 0 12px; }
.mk-sn { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; }
.mk-sn.ok { background: var(--ok-c); border-color: var(--ok); color: var(--ok); }
.mk-sn.warn { background: var(--warn-c); border-color: var(--warn); color: var(--warn); }
.mk-sn[aria-current="true"] { outline: 2px solid var(--primary); outline-offset: 2px; }
.mk-strip-key { padding-bottom: 8px; }
.mk-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-facts { width: 100%; border-collapse: collapse; font-size: 13px; }
.mk-facts td { padding: 6px 4px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.mk-facts td.ok { color: var(--ok); } .mk-facts td.bad { color: var(--danger); } .mk-facts td.warn { color: var(--warn); }
.mk-report { margin: 0; max-height: 240px; overflow: auto; font-size: 11px; background: var(--surface-2); border-radius: 8px; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Hand marking */
.mk-hbody { display: grid; gap: 12px; }
.mk-hq { font-size: 15px; overflow-wrap: anywhere; }
.mk-hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.mk-hcard { padding: 12px; display: grid; gap: 10px; align-content: start; }
.mk-hcard.mk-hedited { border-color: var(--primary); }
.mk-hwho { display: flex; gap: 8px; align-items: center; min-width: 0; }
.mk-hwho b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mk-hp { font-weight: 700; }
.mk-hpts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mk-hpts .in { width: 110px; }
.in.mk-hword { width: 160px; }
.fchip.mk-right[aria-pressed="true"] { background: var(--ok-c); color: var(--ok); border-color: var(--ok); }
.fchip.mk-wrong[aria-pressed="true"] { background: var(--danger-c); color: var(--danger); border-color: var(--danger); }
.mk-hwill { margin: 0; color: var(--primary); font-size: 13px; font-weight: 600; min-height: 16px; }
.mk-hwill.mk-need, .mk-herr { color: var(--danger); }
.mk-herr { margin: 0; font-size: 13px; }
.mk-herr:empty { display: none; }
.mk-hnote { font-size: 13px; }

/* Scan page */
.mk-scan { min-height: 100%; background: var(--bg); }
.mk-scan .hidden { display: none !important; }
.mk-scam { max-height: min(60vh, 600px); justify-self: center; }
.mk-scam video, .mk-scam img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mk-scam video { object-fit: cover; }
.mk-scam img { object-fit: contain; background: var(--cam-bg); }
.mk-scam .frame-g { z-index: 1; pointer-events: none; transition: opacity .18s ease-out, border-width .18s ease-out; }
.mk-scan[data-state="hunting"] .frame-g { opacity: .55; }
.mk-scan[data-state="locked"] .frame-g { border-width: 5px; }
.mk-ssteps { justify-content: center; }
.mk-sstep { display: inline-flex; align-items: center; gap: 4px; }
.mk-sstep .mk-si-done, .mk-sstep .mk-si-on { display: none; }
.mk-sstep.done .mk-si-done, .mk-sstep.on .mk-si-on { display: inline-block; }
.mk-sstep.done { color: var(--ok); }
.mk-sstep.on { color: var(--ink); font-weight: 600; }
.mk-sstep.on .mk-si-on { animation: mk-spin 1s linear infinite; }
@keyframes mk-spin { to { transform: rotate(360deg); } }
.mk-swho { text-align: center; display: grid; gap: 2px; min-height: 44px; align-content: center; }
.mk-swho p { margin: 0; }
.mk-sname { font-size: 20px; font-weight: 600; line-height: 26px; overflow-wrap: anywhere; }
.mk-ssub { font-size: 13px; color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.mk-ssub .tl-logo { width: 22px; height: 22px; border-radius: 6px; font-size: 9px; }
.mk-sup { cursor: pointer; }
.mk-sup:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.mk-srecent .li { min-height: 52px; padding: 8px 16px; }
.mk-scrv { position: fixed; transform: translateY(100%); visibility: hidden; transition: transform .3s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .3s; }
.mk-scrv.is-open { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.mk-sav { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: var(--on-pc); flex: none; margin-left: 8px; }
.mk-sav .tl-logo { width: 40px; height: 40px; border-radius: 10px; }
.mk-sav:has(.tl-logo) { background: none; }
.gcell .ga.mk-sblank { color: var(--ink-3); font-weight: 500; }
.mk-spick { position: fixed; inset: 0; z-index: 90; }
.mk-splist { max-height: 50vh; overflow-y: auto; border-radius: 12px; border: 1px solid var(--line); }
.mk-splist .li:first-child { border-top: 0; }
.li.mk-sprow { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.li.mk-sprow:hover { background: var(--surface-3); }
@media (prefers-reduced-motion: reduce) {
  .mk-sstep.on .mk-si-on { animation: none; }
  .mk-scrv, .mk-scrv.is-open, .mk-scam .frame-g { transition: none; }
}
.mk-scrv .wiz-h { height: auto; min-height: 64px; padding-block: 8px; }
/* Round tables in the narrow main column wrap long team names instead of stacking into cards. */
.mk-page .cols.main-side table.tb .tm { white-space: normal; min-width: 140px; }
.mk-page .cols.main-side table.tb td.tm span, .mk-page .cols.main-side table.tb td.tm .mk-tbtn { white-space: normal; overflow-wrap: anywhere; }
.mk-page .cols.main-side table.tb :is(th, td):not(.tm):not(.l) { padding-left: 8px; padding-right: 8px; }
.mk-page .cols.main-side table.tb td.l:first-child { min-width: 72px; }
