/* Phone layout (< 744px) for the marks screens — see the mobile handoff. */
@media (max-width:743.98px){
  /* ================================================================ overview */
  /* Term and Standard on one row, Class and Refresh on the next, the dates
     behind "More filters" two to a row */
  .mk-ov-bar > .btn{align-self:end}
  .mk-ov-bar > .mmore > .inline-field{grid-column:auto}

  /* the figures: two across even at 360, label / value / note */
  .mk-ov .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}
  .mk-ov .card{padding:12px 14px;min-width:0}
  .mk-ov .card .k{font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase;
    color:#5C6D64;overflow-wrap:anywhere}
  .mk-ov .card .v{font-size:24px;font-weight:600;line-height:1.2;margin-top:4px;overflow-wrap:anywhere}
  .mk-ov .card .n{font-size:13.5px;color:#5C6D64;line-height:1.3}

  .mk-ov .panel{overflow:hidden;min-width:0}
  .mk-ov .panel > header{font-size:16px;font-weight:600}
  .mk-ov .panel > header > span{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0}
  .mk-ov .panel > header .mono.dim{font-weight:400;font-size:13px}
  .mk-ov .panel > .mlist{border-top:0}
  .mk-ov .mrow-num .mk-under{color:#9C332B}

  /* attendance by section: a meter per class, the target a dark line on it */
  .mk-ov .chart{padding:12px 14px 14px}
  .mk-ov .chart-row{gap:10px;min-height:34px;padding:3px 0;min-width:0}
  .mk-ov .chart-label{flex:0 0 64px;min-width:0;font-size:13px;color:#16211C;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mk-ov .chart-track{height:12px;border-radius:6px;min-width:0}
  .mk-ov .chart-target{top:0;bottom:0;width:2px;background:#16211C;opacity:.7}
  .mk-ov .chart-value{flex:0 0 52px;min-width:0;font-size:13px;color:#16211C}

  /* ============================================================= assessments */
  .mk-ex-bar > .mk-classfield{min-width:0}
  .mk-ex-bar > .mk-classfield > .inline-field{width:100%}

  /* a class block: a header a thumb can hit, the rows flush under it */
  .mk-orgsec{border-radius:16px;border-color:#E5EAE6;padding:0;overflow:hidden}
  .mk-orgsec.collapsed{padding-bottom:0}
  .mk-orgsec > .orgsec-h{min-height:52px;margin:0;padding:4px 6px 4px 14px;font-size:15px}
  .mk-orgsec > .orgsec-h .collapsecaret{width:44px;height:44px}
  .mk-orgsec > .orgsec-body{border-top:1px solid #E5EAE6}
  .mk-orgsec > .orgsec-body > div:not(.mlist){padding:10px}
  .mk-orgsec > .orgsec-body > div:not(.mlist):has(> .mlist){padding:0}
  .orgsec .mrow > .pill{max-width:42%;white-space:normal;text-align:center;line-height:1.25}
  .mk-totals > span + span::before{content:' · ';color:#5C6D64}
  .mk-totals > .low{color:#9C332B}

  /* the new-assessment form: the type as one segmented control */
  .mk-newexam .atype{display:flex;gap:0;border:1.5px solid var(--line);border-radius:12px;overflow:hidden;
    background:var(--surface)}
  .mk-newexam .atype button{flex:1 1 0;min-width:0;min-height:48px;border:0;border-radius:0;
    padding:6px 8px;text-align:center;background:var(--surface);color:#16211C}
  .mk-newexam .atype button + button{border-left:1.5px solid var(--line)}
  .mk-newexam .atype button.on{background:#0E7A63;color:#fff}
  .mk-newexam .atype b{font-size:14px;font-weight:600}
  .mk-newexam .atype small{display:none}
  .mk-newexam .calmode{display:flex;border-radius:12px}
  .mk-newexam .calmode button{flex:1;min-height:44px;font-size:15px}
  .mk-newexam .subjpick{border-radius:12px}
  .mk-newexam .subjpick .sp,.mk-newexam .subjpick .hdr{grid-template-columns:24px minmax(0,1fr) 96px}
  .mk-newexam .subjpick .sp{min-height:60px;padding:6px 12px}
  .mk-newexam .subjpick .sp input[type=checkbox]{width:22px;height:22px}
  .mk-newexam .subjpick .sp input[type=number]{height:48px;font-size:16px}
  .mk-newexam .subjpick .sp .t,.mk-newexam .subjpick .hdr{font-size:12px}
  .mk-newexam .totalbox{border-radius:12px}
  .mk-newexam .totalbox .k{font-size:12px}

  /* one assessment: the subject picker, the student cards */
  .mk-subjbar{margin-bottom:12px}
  .mk-subjbar > *{grid-column:1 / -1}
  .stack .scard{border-radius:16px}
  .stack .scard .mono.dim{font-size:12px !important}
  .stack .scard .chips span{font-size:12px}
  .stack .scard .top > .grow{min-width:0}

  /* marking, one student at a time: a row per subject, a 48px field */
  .mstu{border-radius:16px;padding:14px;min-width:0}
  .mstu .who > div{min-width:0}
  .mstu .who h3{font-size:18px;overflow-wrap:anywhere}
  .mstu .mf{grid-template-columns:minmax(0,1fr) 96px 52px;min-height:60px;gap:10px}
  .mstu .mf > span:first-child{min-width:0;overflow-wrap:anywhere;font-size:16px}
  .mstu .mf .block{font-size:12px !important}
  .mstu .mf > .mono.dim{font-size:13px}
  .mstu .mf input[type=number]{width:100%;height:48px;font-size:16px;padding:0 6px}
  .mstu .mf input[type=checkbox]{width:28px;height:28px}
  .mstu .mf input.bad{border-color:#9C332B !important;background:#FBEDEB;color:#9C332B}
  .mstu .totrow{font-size:16px}
  .mstu .tiles.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .mstu .tile{min-height:56px;min-width:0;border-radius:12px}
  .mstu .tile .lbl{font-size:14px}
  .mstu .tile .key{font-size:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  /* publishing: rows a thumb can tick */
  .publist{border-radius:12px}
  .pubrow{min-height:56px;flex-wrap:wrap;row-gap:4px}
  .pubrow input[type=checkbox]{width:22px;height:22px;flex:none}
  .pubrow > .grow{min-width:0;flex:1 1 120px}
  .pubrow .mono.dim{font-size:12px !important}

  /* ============================================================ marks report */
  .mk-mg-bar > .inline-field:first-child{grid-column:1 / -1}
  .mk-mg-bar > .bar.tight{grid-column:1 / -1}
  .mk-mg-bar > .bar.tight > .btn{flex:1}
  .mk-hide{display:none !important}
  .panel:has(> .mlist) > header .gridkey{font-size:12px;gap:6px 10px}
  .panel:has(> .mlist) > header .gridkey .markcell{font-size:12px}
  .panel:has(> .mlist) > .mlist{border-top:0}
  .mk-band{font-family:var(--mono)}
  .mk-band.good{color:#0A5A49}
  .mk-band.ok{color:#16211C}
  .mk-band.watch{color:var(--amber)}
  .mk-band.bad{color:#9C332B}
  .mk-band.none{color:#5C6D64}
  .mk-swatch{display:inline-block;width:14px;height:14px;border-radius:50%;margin:0 4px}
  .mk-mg-sheet > header{min-width:0}
  .mk-mg-who{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mk-mg-sheet .mlist{border:1px solid #E5EAE6;border-radius:16px;overflow:hidden}

  /* ========================================================= marks by standard */
  .mk-mc-bar > *{grid-column:1 / -1}
  .mk-mc-bar ~ .crumbs{gap:4px 8px;font-size:14px}
  .mk-mc-bar ~ .crumbs .crumb{min-height:44px;display:inline-flex;align-items:center;font-size:14px}
  .mk-mc-note{padding:10px 14px 0;font-size:13px;color:#5C6D64}
  .mk-mc .chartgrid{padding:10px;gap:10px}
  .mk-mc .chartcard{border-radius:16px;min-width:0}
  .mk-mc .mk-fold-h{min-height:56px;padding:6px 6px 6px 14px;font-size:15px;cursor:pointer;
    -webkit-tap-highlight-color:transparent}
  .mk-mc .mk-fold-h:active{background:#F7FAF7}
  .mk-mc .mk-fold-h .collapsecaret{width:44px;height:44px;flex:none}
  .mk-mc .mk-marks{font-size:12px}
  .mk-mc .chartoverall{font-size:13px;padding:3px 9px}
  .mk-mc .mk-shut > .chartbars{display:none}
  .mk-mc .mk-shut > .mk-fold-h{border-bottom:0}
  .mk-mc .chartbars{padding:12px 14px;gap:10px}
  .mk-mc .barline{grid-template-columns:minmax(0,96px) minmax(0,1fr)}
  .mk-mc .barlabel{font-size:13px;color:#16211C}
  .mk-mc .barrow{min-width:0}
  .mk-mc .bartrack{position:relative;height:10px;overflow:visible;min-width:0}
  .mk-mc .bartrack::after{content:'';position:absolute;left:60%;top:-3px;bottom:-3px;width:2px;
    border-radius:1px;background:#16211C;opacity:.55}
  .mk-mc .barval{font-size:13px;min-width:44px}
  .mk-mc .mk-mc-open{width:100%;margin-top:4px}
}
