/* Safety readability (v1): the instruction panel (safety_action_guide_v2.js), the icon guide and the incident
   wizard (safety_guided_v2.js) were drawn at 7–9px with light "note" boxes whose text inherited the dark theme's
   light ink — white on white on laptops and desktops. Their styles are injected at runtime, so these rules carry
   the extra `html body` weight. Sizes follow the platform's 11px floor; body text is 13px. */

/* ---- Instruction panel (خطر حيوي، انسكاب …) ---- */
html body .sap-head h3{font-size:19px}
html body .sap-head small{font-size:12px}
html body .sap-note{font-size:13px;font-weight:700;padding:10px 13px;line-height:1.6}
html body .sap-card b,html body .sap-title{font-size:14px;color:var(--ink)}
html body .sap-card p{font-size:13px;line-height:1.8}
html body .sap-step b{font-size:15px}
html body .sap-step p{font-size:13px;line-height:1.75}
html body .sap-dont,html body .sap-critical{font-size:13px;line-height:1.75}
html body .sap-dont b,html body .sap-critical b{font-size:13.5px}
html body .sap-orange ol{font-size:13px}
html body .sap-emergency{font-size:13px}

html[data-theme=dark] body .sap-note{background:rgba(22,160,125,.16)!important;color:#c9f5e8!important;border:1px solid rgba(86,216,200,.38)}
html[data-theme=dark] body .sap-card,html[data-theme=dark] body .sap-step{background:rgba(255,255,255,.035);border-color:rgba(160,200,220,.22)}
html[data-theme=dark] body .sap-card b,html[data-theme=dark] body .sap-step b{color:#f2f8fc}
html[data-theme=dark] body .sap-card p,html[data-theme=dark] body .sap-step p{color:#d3e2ec!important}
html[data-theme=dark] body .sap-head small{color:#a9c3d4}
html[data-theme=dark] body .sap-icon{background:#f2fbf8}
html[data-theme=dark] body .sap-dont{background:rgba(244,63,94,.13)!important;color:#ffd5dc!important;border:1px solid rgba(244,63,94,.45)}
html[data-theme=dark] body .sap-critical{background:rgba(245,158,11,.13)!important;color:#ffe3b3!important;border:1px solid rgba(245,158,11,.45)}
html[data-theme=dark] body .sap-emergency{background:rgba(245,158,11,.10)!important;color:#ffe3b3;border-color:rgba(245,158,11,.45)!important}
html[data-theme=dark] body .sap-orange{background:rgba(239,139,34,.16)!important;color:#ffd9b0!important}

/* ---- Icon guide tiles ---- */
html body .sig-head h3{font-size:16px}
html body .sig-btn b{font-size:13px}
html body .sig-btn small{font-size:11.5px}
html[data-theme=dark] body .sig-btn small{color:#b4cad9}
html[data-theme=dark] body .sig-btn.active{border-color:#56d8c8;box-shadow:0 0 0 2px rgba(86,216,200,.35)}

/* ---- Incident wizard ---- */
html body .sgi-question{font-size:20px}
html body .sgi-explain{font-size:13px}
html body .sgi-type b{font-size:14px}
html body .sgi-type small{font-size:12px}
html body .sgi-quicknote,html body .sgi-coach,html body .sgi-preview{font-size:13px;line-height:1.75}
html body .sgi-preview b{font-size:14px}
html body .sgi-choice{font-size:13px}
html body .sgi-intro b{font-size:14px}
html body .sgi-intro small{font-size:12px}

html[data-theme=dark] body .sgi-coach{background:rgba(24,137,107,.18)!important;color:#d8f6ec!important;border-right-color:#34d399!important}
html[data-theme=dark] body .sgi-coach b{color:#ffffff}
html[data-theme=dark] body .sgi-quicknote{background:rgba(255,255,255,.04)!important;color:#d3e2ec!important;border-color:rgba(160,200,220,.25)!important}
html[data-theme=dark] body .sgi-quicknote strong{color:#7fe3d3!important}
html[data-theme=dark] body .sgi-preview{color:#d3e2ec;border-color:rgba(160,200,220,.35)!important}
html[data-theme=dark] body .sgi-preview b{color:#f2f8fc}
html[data-theme=dark] body .sgi-choice{color:#e6f0f6;background:rgba(255,255,255,.03)}
html[data-theme=dark] body .sgi-choice:has(input:checked){border-color:#56d8c8;background:rgba(86,216,200,.12)}
html[data-theme=dark] body .sgi-type small{color:#b4cad9}
html[data-theme=dark] body .sgi-intro{background:rgba(24,137,107,.12)!important;border-color:rgba(86,216,200,.3)!important}
html[data-theme=dark] body .sgi-intro i{background:rgba(86,216,200,.18)}
html[data-theme=dark] body .sgi-intro small{color:#c3d6e3}

/* ---- Incident list (safety_intelligence_v1.js + the print button from safety_incident_form_v1.js) ---- */
html body .si-feed-item b{font-size:14px}
html body .si-feed-item small{font-size:12px}
html[data-theme=dark] body .si-feed-item small{color:#b4cad9}
/* The print button sat in the row's grid as a third cell and stretched across the card. */
html body .si-feed-item .sif-print{grid-column:1/-1;justify-self:start;width:auto;min-height:34px;padding:6px 14px;font-size:12.5px;margin:0}
html[data-theme=dark] body .si-feed-item .sif-print{color:#e6f0f6;background:rgba(255,255,255,.05);border-color:rgba(160,200,220,.3)}

/* ---- Closing an incident (safety_wow_v3.js) ---- */
html body .sga-head h3{font-size:19px}
html body .sga-head small{font-size:12px}
html body .sga-summary{font-size:13px;line-height:1.75}
html body .sga-q{font-size:15px}
html body .sga-act{font-size:13px;min-height:44px}
html body .sga-safe button{font-size:14px;color:var(--ink)}
html[data-theme=dark] body .sga-head small{color:#a9c3d4}
html[data-theme=dark] body .sga-summary{color:#d3e2ec}
html[data-theme=dark] body .sga-act{color:#e6f0f6}
html[data-theme=dark] body .sga-act.on{background:rgba(52,211,153,.18)!important;border-color:#34d399!important;color:#d9fbe9!important}
html[data-theme=dark] body .sga-safe button{color:#e6f0f6;background:rgba(255,255,255,.03)}
html[data-theme=dark] body .sga-safe .yes.on{background:rgba(52,211,153,.18)!important;border-color:#34d399!important;color:#d9fbe9!important}
html[data-theme=dark] body .sga-safe .no.on{background:rgba(244,63,94,.16)!important;border-color:#fb7185!important;color:#ffd5dc!important}
html body .si-feed-item .si-pill,html body .si-feed-item .si-tbtn{font-size:12px;padding:5px 11px}

/* Hovering an incident type gave it the light-theme background (#eefaf7) while the dark theme's text stayed light,
   so the title and hint vanished under the pointer. */
html[data-theme=dark] body .sgi-type:hover:not(.active){background:rgba(86,170,160,.12)!important;border-color:#56aaa0!important;color:#eafffb!important}
html[data-theme=dark] body .sgi-type:hover:not(.active) b{color:#ffffff!important}
html[data-theme=dark] body .sgi-type:hover:not(.active) small{color:#cfe6ee!important}
html[data-theme=dark] body .sgi-type:focus-visible{outline:2px solid #56d8c8;outline-offset:2px}
