/* Category colours are independent of the selected interface theme.
   The stored legacy category RED means Risker; it is displayed in green. */
@media screen{
html body.riskPage .reportIncidentCategories .reportAccident{background:#a92235!important;color:#fff!important;border-color:#a92235!important}
html body.riskPage .reportIncidentCategories .reportNearMiss{background:#ffe052!important;color:#111827!important;border-color:#aa7a13!important}
html body.riskPage .reportIncidentCategories .reportHazard,html body.riskPage .reportIncidentCategories .reportRisk{background:#156c3e!important;color:#fff!important;border-color:#156c3e!important}
html body.riskPage .reportIncidentCategories :is(.reportAccident,.reportHazard,.reportRisk) :is(strong,span,b,small){color:#fff!important}
html body.riskPage .reportIncidentCategories .reportNearMiss :is(strong,span,b,small){color:#111827!important}
html body.riskPage :is(.riskBadge.RED,.riskType.RED,.riskPin.RED){background:#156c3e!important;color:#fff!important;border-color:#156c3e!important}
html body.riskPage .riskCard.RED{border-left:4px solid #156c3e!important}
html body.riskPage .riskBadge.ACCIDENT{background:#a92235!important;color:#fff!important}
html body.riskPage .riskBadge.NEAR_MISS{background:#ffe052!important;color:#111827!important}
html body .riskBroadcastBox.risk{background:#156c3e!important;color:#fff!important;border-color:#60bd85!important}
html body .riskBroadcastBox.risk :is(h2,p,span,b,strong,small){color:#fff!important}
}
/* Explicit emergency surfaces: never inherit pale text on a pale warning. */
@media screen{
html[data-bo-theme=light]{--em-bg:#fff1f2;--em-text:#111827;--em-title:#a21028;--em-panel:#fff;--em-line:#a21028;--em-link:#075ea8}
html[data-bo-theme=dark]{--em-bg:#351820;--em-text:#fff;--em-title:#ffb8c3;--em-panel:#102b48;--em-line:#ff889b;--em-link:#a8d5ff}
html[data-bo-theme] body :is(.reportEmergency,.boEmergencyCard,.boEmergencyNotice,[id=reportChosenEmergency]){background:var(--em-bg)!important;color:var(--em-text)!important;border:2px solid var(--em-line)!important;border-radius:16px;padding:20px}
html[data-bo-theme] body :is(.reportEmergency,.boEmergencyCard,.boEmergencyHelp,.boEmergencyActivation,.boEmergencyNotice,[id=reportChosenEmergency]) :is(h2,h3,p,small,span,b,strong,li,summary){color:var(--em-text)!important;opacity:1!important;text-shadow:none!important}
html[data-bo-theme] body :is(.reportEmergency,.boEmergencyCard) h2,
html[data-bo-theme] body .reportEmergency h2 span,
html[data-bo-theme] body .boEmergencyNotice>strong{color:var(--em-title)!important;font-weight:850;font-size:clamp(24px,4.5vw,32px);line-height:1.2}
html[data-bo-theme] body :is(.reportEmergency,.boEmergencyCard,.boEmergencyHelp,.boEmergencyActivation,.boEmergencyNotice,[id=reportChosenEmergency]) :is(p,small,li){font-size:16px;line-height:1.55}
html[data-bo-theme] body :is(.reportEmergency,.boEmergencyCard,.boEmergencyHelp,.boEmergencyActivation,.boEmergencyNotice,[id=reportChosenEmergency]) a{color:var(--em-link)!important;text-decoration:underline;font-weight:750}
html[data-bo-theme] body :is(.reportEmergencyActions,.boEmergencyActions){display:grid;gap:10px;margin-top:16px}
html[data-bo-theme] body :is(a.boEmergencyCall,a.reportCall){background:#a21028!important;color:#fff!important;border:2px solid #a21028!important;text-decoration:none!important;font-weight:850;min-height:56px;border-radius:12px;display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 18px;font-size:24px}
html[data-bo-theme] body .boEmergencyCall :is(svg,span,b,strong){color:#fff!important}
html[data-bo-theme] body .boEmergencyCall svg{width:28px;height:28px;flex-shrink:0}
html[data-bo-theme] body :is(.reportAlarmButton,#cancelAccident,[id=reportChosenEmergency] button){background:var(--em-panel)!important;color:var(--em-text)!important;border:2px solid #6b9dcc!important;min-height:52px;font-size:17px;font-weight:800;border-radius:12px;padding:12px 16px}
html[data-bo-theme] body #confirmAccident{background:#a21028!important;color:#fff!important;border:2px solid #a21028!important;min-height:56px;font-size:18px;font-weight:850;border-radius:12px;padding:12px 16px}
html[data-bo-theme] body :is(.boEmergencyDialog,.boEmergencyHelp,.boEmergencyActivation,.reportEmergency details){background:var(--em-panel)!important;color:var(--em-text)!important;border:1px solid #6b9dcc!important;border-radius:16px}
html[data-bo-theme] body .boEmergencyCard{margin-bottom:16px}
html[data-bo-theme] body .boEmergencyHelp,html[data-bo-theme] body .boEmergencyActivation{padding:18px;margin-top:16px}
html[data-bo-theme] body :is(.boEmergencyExamples,.reportEmergencyExamples){display:grid;grid-template-columns:1fr;gap:0}
html[data-bo-theme] body :is(.boEmergencyExamples article,.reportEmergencyExamples>div){padding:16px 0;border-top:1px solid #6b9dcc;min-width:0}
html[data-bo-theme] body :is(.boEmergencyExamples,.reportEmergencyExamples) strong{font-size:18px;font-weight:850}
html[data-bo-theme] body .reportEmergencyExamples svg{color:var(--em-title)!important;width:32px;height:32px}
html[data-bo-theme] body .reportEmergencyHeading>div{min-width:0;flex:1}
html[data-bo-theme] body .boEmergencyDialog h2{margin:0 0 10px}
html[data-bo-theme] body .boEmergencyDialog p{margin:10px 0}
html[data-bo-theme] body dialog.boEmergencyDialog{position:fixed!important;top:4dvh!important;left:50%!important;right:auto!important;bottom:auto!important;transform:translateX(-50%);margin:0!important;max-height:92dvh!important;box-sizing:border-box}
html[data-bo-theme] body :is(.boEmergencyDialog,.reportEmergency) :is(a,button):focus-visible{outline:3px solid var(--em-link);outline-offset:3px}
}
@media screen{
html body.riskPage .reportIncidentCategories .reportCategory .reportSelectedMark{background:#fff!important;color:#111827!important;border-color:#123d65!important}
html body.riskPage .reportWriting[data-type=RED]{border-color:#156c3e!important}
html body.riskPage .reportWriting[data-type=NEAR_MISS]{border-color:#aa7a13!important}
html body.riskPage .reportWriting[data-type=ACCIDENT]{border-color:#a92235!important}
}

@media screen and (max-width:600px){html[data-bo-theme] body .reportEmergencyHeading>.reportCall{display:none!important}}

@media screen{html[data-bo-theme] body #reportChosenEmergency a.boEmergencyCall{background:#a21028!important;color:#fff!important;text-decoration:none!important}}
/* All ordinary risk buttons have explicit theme surfaces; category and emergency colours remain independent. */
@media screen{
html[data-bo-theme=light] body.riskPage :is(button.secondary,.riskButtons button.secondary){background:#fff!important;color:#111827!important;border:1px solid #3177ad!important}
html[data-bo-theme=dark] body.riskPage :is(button.secondary,.riskButtons button.secondary){background:#133252!important;color:#e9f2ff!important;border:1px solid #6b9dcc!important}
html[data-bo-theme] body.riskPage button.primary,html[data-bo-theme] body.riskPage #riskNav button.active{background:#0b54bb!important;color:#fff!important;border-color:#0b54bb!important}
html[data-bo-theme] body.riskPage :is(button.primary,#riskNav button.active) :is(span,b,strong,small){color:#fff!important}
html[data-bo-theme] body.riskPage #riskCloseOverride{background:#156c3e!important;color:#fff!important;border:2px solid #156c3e!important;min-height:52px}
html[data-bo-theme] body .tpPage .tpManualTest{background:#ffe052!important;color:#111827!important;border:2px solid #aa7a13!important;min-height:52px;margin-top:16px}
html[data-bo-theme] body .tpPage .tpUnverified .tpCheck{background:#ffe052!important;color:#111827!important}
}
@media screen{
html[data-bo-theme=light] body.riskPage button:not(.primary):not(.reportCategory):not(.danger):not(.boAlarmAck):not(.boAlarmAckDone):where(:not(#confirmAccident):not(#cancelAccident)){background:#fff!important;color:#111827!important;border-color:#3177ad!important}
html[data-bo-theme=dark] body.riskPage button:not(.primary):not(.reportCategory):not(.danger):not(.boAlarmAck):not(.boAlarmAckDone):where(:not(#confirmAccident):not(#cancelAccident)){background:#133252!important;color:#e9f2ff!important;border-color:#6b9dcc!important}
html[data-bo-theme=light] body.riskPage button:not(.primary):not(.reportCategory):not(.danger):not(.boAlarmAck):not(.boAlarmAckDone):where(:not(#confirmAccident):not(#cancelAccident)) :is(span,b,strong,small){color:#111827!important}
html[data-bo-theme=dark] body.riskPage button:not(.primary):not(.reportCategory):not(.danger):not(.boAlarmAck):not(.boAlarmAckDone):where(:not(#confirmAccident):not(#cancelAccident)) :is(span,b,strong,small){color:#e9f2ff!important}
html[data-bo-theme] body.riskPage #riskNav button.active{background:#0b54bb!important;color:#fff!important}
}
