.hb-toolbar{position:sticky;top:60px;z-index:15;margin:18px 0 28px;padding:14px 18px;border:1px solid #c8d7e1;border-left:4px solid #39777c;border-radius:4px;background:#f3f8fa;font:13px/1.6 "Segoe UI",Arial,sans-serif;box-shadow:0 2px 6px #0017440a}
.hb-controls{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.hb-controls label{font-weight:600;display:flex;gap:9px;align-items:center;flex:1}.hb-controls input{min-width:0;max-width:260px;width:100%;padding:8px 10px;background:#fff;color:#243747;border:1px solid #99adbf;border-radius:4px;font:14px "Segoe UI",sans-serif}
.hb-toolbar button,.hb-choices button{font:600 12px/1.5 "Segoe UI",Arial,sans-serif;border:1px solid #9db2c2;border-radius:4px;padding:8px 11px;background:#fff;color:#203e55;cursor:pointer}.hb-controls>button:last-child{background:#001744;color:#fff;border-color:#001744}.hb-status,.hb-progress{margin:5px 0 0;font-size:12px}.hb-status{color:#35664a}.hb-status.error{color:#a12d25}.hb-progress{font-weight:600}.hb-help,.hb-history{margin:6px 0 0;font-size:12px}.hb-help summary,.hb-history summary{cursor:pointer}.hb-history select{max-width:100%;margin:8px 6px 8px 0;padding:8px;font:13px "Segoe UI",sans-serif}.hb-history button{margin:4px}
.handbook-live .annotated-row{grid-template-columns:minmax(0,1fr) 290px;gap:26px}.handbook-live .review-margin{position:sticky;top:215px}.handbook-live #review-toggle{display:none}.handbook-live .review-note[hidden]{display:none!important}
.hb-response{border:1px solid #deceb0;border-left:3px solid #aa7e2c;border-radius:4px;background:#fff9ee;padding:15px;color:#243747;font:13px/1.65 "Segoe UI",Arial,sans-serif;scroll-margin-top:220px}.hb-response h3{font:650 14px/1.5 "Segoe UI",Arial,sans-serif;color:#20354c;margin:0 0 10px}.hb-response .hb-context{font-size:12px;color:#536578;margin:0 0 12px}.hb-choices{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.hb-choices button{font-size:12px;text-align:left;padding:8px 10px}.hb-choices button[aria-pressed="true"]{background:#e0efea;border-color:#367e65;color:#235b46;box-shadow:inset 0 0 0 1px #367e65}.hb-response label{display:block;font-weight:600;font-size:12px;margin:10px 0 6px}.hb-response textarea{width:100%;min-height:120px;box-sizing:border-box;resize:vertical;background:white;color:#243747;border:1px solid #99adbf;border-radius:4px;padding:10px;font:14px/1.6 "Segoe UI",Arial,sans-serif}.hb-response textarea[hidden],.hb-response label[hidden]{display:none!important}.hb-response button:disabled,.hb-response textarea:disabled{opacity:.7}.hb-answered{border-left-color:#367e65}.hb-agenda{border:1px solid #cbdde1;border-left:4px solid #39777c;border-radius:4px;padding:18px 22px;margin:0 0 30px;background:#f1f8f7}.hb-agenda h3{margin-top:0}.hb-agenda li{margin:12px 0}.hb-agenda li p{white-space:pre-wrap;font-size:14px;margin:6px 0}.hb-toolbar :focus-visible,.hb-response :focus-visible{outline:3px solid #ac8535;outline-offset:3px}
@media(max-width:1000px){.handbook-live .annotated-row{grid-template-columns:1fr}.handbook-live .review-margin{position:static}.hb-toolbar{position:static}.hb-response{scroll-margin-top:20px}.hb-controls label{flex-basis:100%}.hb-controls input{max-width:none}}
@media print{.hb-toolbar,.hb-response,.hb-agenda{display:none!important}.handbook-live .annotated-row{display:block}.handbook-live .review-margin{display:none}}
.handbook-live #review-toggle{display:none!important}.hb-response h3{background:none;border:0;padding:0}
.hb-view-toggle{margin-left:10px;padding:10px 14px;border:1px solid #a9b9c7;border-radius:4px;background:#fff;color:#17496f;font:600 13px/1.4 'Segoe UI',Arial,sans-serif;cursor:pointer}
.hb-view-toggle:focus-visible{outline:3px solid #ac8535;outline-offset:3px}
.hb-view-toggle[aria-pressed=true]{background:#0b2a4d;border-color:#0b2a4d;color:#fff}
.hb-presenting :is(.hb-toolbar,.hb-response,.hb-agenda,.review-note,.review-direction,#review,[data-chapter=review]){display:none!important}
.portal-f-maths.hb-presenting .chapter{scroll-margin-top:24px}
@media print{.hb-view-toggle{display:none!important}}

/* Match curriculum review states and compact controls without overriding content. */
body.portal-f-maths .hb-toolbar{padding:8px 14px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;top:0}
body.portal-f-maths .hb-controls{grid-column:1/-1;align-items:center;flex-wrap:nowrap;gap:7px}body.portal-f-maths .hb-controls label{font-size:12px}body.portal-f-maths .hb-controls input{max-width:180px;padding:5px 7px;font-size:12px}body.portal-f-maths .hb-controls button{padding:5px 8px;white-space:nowrap}body .hb-progress{margin:0;font-size:12px}body .hb-more{font-size:12px;justify-self:end}body .hb-more>summary{cursor:pointer}body .hb-more[open]{grid-column:1/-1;justify-self:stretch;max-height:35vh;overflow:auto}body .hb-status{margin:6px 0}
body.portal-f-maths .hb-response.hb-required{background:#eaf3ff;border-color:#8cb2dc;border-left:4px solid #205d9e}body.portal-f-maths .hb-response.hb-optional,body.portal-f-maths .hb-response.hb-answered{background:#edf7ef;border-color:#9cc4a6;border-left:4px solid #287044}
body .hb-review-row{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:24px;align-items:start}body .hb-reading-body{min-width:0}body .hb-review-rail{min-width:0;position:sticky;top:115px}body .hb-review-rail .hb-response{margin-bottom:14px;scroll-margin-top:120px}
body.hb-required-only:not(.hb-presenting) .chapter:not(.hb-has-required):not(.review-chapter),body.hb-required-only .hb-response:not(.hb-required){display:none!important}
body.hb-presenting .hb-review-row{display:block}body.hb-presenting .hb-review-rail{display:none}
@media(max-width:1000px){body .hb-review-row{grid-template-columns:1fr}body .hb-review-rail{position:static}body.portal-f-maths .hb-toolbar{position:static}body.portal-f-maths .hb-controls{flex-wrap:wrap}body.portal-f-maths .hb-controls label{flex-basis:100%}body.portal-f-maths .hb-controls input{max-width:none}}
@media print{body .hb-review-row{display:block}body .hb-review-rail{display:none}}

body.portal-f-maths .hb-response.hb-discussion{background:#fff3dd;border-color:#e5c995;border-left-color:#8b5b11}
