
    .hd{ display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:2px solid var(--ink); padding-bottom:4px; margin-bottom:2px; }
    .hd h1{ font-size:1.12em; margin:0; font-weight:800; line-height:1.15; }
    .hd .who{ font-size:.88em; color:var(--muted); display:flex; align-items:center; gap:6px; white-space:nowrap; }
    .calcbadge{ vertical-align:-3px; }
    .subhd{ font-size:.8em; color:var(--muted); margin:2px 0 6px; }
    .ess{ display:flex; flex-wrap:wrap; gap:4px 14px; border:1.5px solid var(--ink); border-radius:8px; padding:5px 10px; margin-bottom:7px; font-size:.82em; align-items:baseline; }
    .ess .ef b{ margin-right:5px; }
    /* balanced 2-column flow (grid rows leave holes under short zones); capstone sits outside, full width */
    .zgrid{ columns:2; column-gap:7px; margin-bottom:7px; }
    .zone{ border:1.5px solid var(--line); border-radius:8px; padding:6px 9px 4px; break-inside:avoid; margin-bottom:7px; }
    .zone.cap{ border-color:var(--red); margin-bottom:0; }
    .zh{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; border-bottom:1px solid var(--line); padding-bottom:3px; margin-bottom:4px; }
    .zl{ font-weight:800; font-size:.92em; } .cap .zl{ color:var(--red); }
    .zchip{ font-size:.68em; font-weight:700; color:var(--blue); background:var(--tag-note-bg); border-radius:9px; padding:2px 8px; white-space:nowrap; }
    .mq{ padding:3px 0 2px; font-size:.88em; }
    .mq + .mq{ border-top:1px dashed var(--line); margin-top:3px; padding-top:6px; }
    .qtop{ display:flex; gap:10px; align-items:flex-start; } .qmain{ flex:1 1 auto; min-width:0; }
    .qfig{ flex:0 0 auto; text-align:center; } .qfig svg{ max-width:100%; width:auto; height:auto; }
    .qfigbig{ text-align:center; margin:6px 0 4px; } .qfigbig svg{ max-width:100%; width:auto; height:auto; max-height:170px !important; }   /* the mat is ONE page: probability-trees four tree diagrams (190px each) ran it to 1097px on a ~1060px page, and with the mark scheme to 4 pages (limit 3) */
    .qhead{ display:flex; align-items:baseline; gap:7px; }
    .qn{ font-weight:800; color:var(--red); } .qtxt{ flex:1; } .mk{ color:var(--muted); font-size:.82em; white-space:nowrap; font-style:italic; }
    .ansline{ font-size:.85em; color:var(--muted); display:flex; align-items:baseline; gap:7px; }
    .ansline .rule{ flex:1; border-bottom:1px solid var(--ink); height:0; }
    .brk{ break-before:page; page-break-before:always; }
    .ms{ font-size:.9em; } .ms .subhd{ margin-bottom:8px; }
    .ms .msq{ break-inside:avoid; border:1px solid var(--line); border-radius:6px; padding:5px 10px; margin-bottom:7px; }
    .msqh{ display:flex; align-items:baseline; gap:8px; font-size:1em; font-weight:600; border-bottom:1px solid var(--line); padding-bottom:3px; margin-bottom:4px; }
    .msbody{ display:grid; grid-template-columns:1.4fr 1fr; gap:14px; }
    .mlab{ display:block; font-size:.7em; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); margin-bottom:2px; }
    .mmeth{ margin:1px 0; } .mmeth .katex{ font-size:.98em; } .mans{ margin-top:3px; font-weight:700; color:var(--green); }
    .mrow{ display:flex; align-items:baseline; gap:6px; margin:2px 0; }
    .tick{ color:var(--green); font-weight:800; } .mpts{ font-weight:700; white-space:nowrap; } .mdesc{ color:#333; }
    .matnote{ margin-top:6px; font-size:.78em; color:var(--muted); border-top:1px dashed var(--line); padding-top:5px; }