/* Canonical Android report presentation, shared by QR/APP and desktop. */
:is(body.pem-report-surface,#reportModal) .context{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:14px 0}
:is(body.pem-report-surface,#reportModal) .ctx{background:#f7f9fc;border-radius:11px;padding:11px}
:is(body.pem-report-surface,#reportModal) .ctx b{display:block;font-size:.82rem;color:#687688}
:is(body.pem-report-surface,#reportModal) .ctx span{font-weight:650}
:is(body.pem-report-surface,#reportModal) .emergency-note{background:#fff1ef;border:1px solid #f0bbb4;border-radius:14px;padding:14px;margin:12px 0}
:is(body.pem-report-surface,#reportModal) .emergency-note b{color:#a7281b}
:is(body.pem-report-surface,#reportModal) .safety-note{background:#fff8e8;border:1px solid #e9cf8c;border-radius:13px;padding:12px;color:#654b0e}
:is(body.pem-report-surface,#reportModal) .types{display:grid;gap:9px}
:is(body.pem-report-surface,#reportModal) .type-btn{width:100%;min-height:54px;border:1px solid #cad5e2;border-radius:13px;background:#fff;text-align:left;padding:12px 14px;font-weight:700;cursor:pointer;transition:.15s ease}
:is(body.pem-report-surface,#reportModal) .type-btn.emergency{background:#fff7f6;color:#a72b20;border-color:#d8a49e;font-size:1.05rem}
:is(body.pem-report-surface,#reportModal) .type-btn.selected{background:#eaf2ff;color:#0f2d55;border-color:#2e6fb7;box-shadow:0 0 0 2px rgba(46,111,183,.12)}
:is(body.pem-report-surface,#reportModal) .type-btn.emergency.selected{background:#a72b20;color:#fff;border-color:#a72b20;box-shadow:0 0 0 2px rgba(167,43,32,.16)}
:is(body.pem-report-surface,#reportModal) .selection-summary{padding:13px 14px;border-radius:12px;background:#edf8f1;border:1px solid #b9dfc6;color:#176b3a}
:is(body.pem-report-surface,#reportModal) .panel{margin-top:14px;border-top:1px solid #e3e9f0;padding-top:14px}
:is(body.pem-report-surface,#reportModal) .panel[hidden]{display:none}
:is(body.pem-report-surface,#reportModal) .form{display:grid;gap:10px}
:is(body.pem-report-surface,#reportModal) .form textarea,:is(body.pem-report-surface,#reportModal) .form input[type=file],:is(body.pem-report-surface,#reportModal) .form input[type=text],:is(body.pem-report-surface,#reportModal) .form input[type=datetime-local]{width:100%;box-sizing:border-box}
:is(body.pem-report-surface,#reportModal) .form textarea,:is(body.pem-report-surface,#reportModal) .form input[type=text],:is(body.pem-report-surface,#reportModal) .form input[type=datetime-local]{padding:11px;border:1px solid #c8d3df;border-radius:10px}
:is(body.pem-report-surface,#reportModal) .form textarea{min-height:105px}
:is(body.pem-report-surface,#reportModal) .submit{min-height:52px}
:is(body.pem-report-surface,#reportModal) .submit.emergency{background:#a72b20;color:#fff;border-color:#a72b20}
:is(body.pem-report-surface,#reportModal) .muted{color:#687688}
:is(body.pem-report-surface,#reportModal) .small{font-size:.88rem}
:is(body.pem-report-surface,#reportModal) .error{color:#a11}
:is(body.pem-report-surface,#reportModal) .success{color:#176b3a}
:is(body.pem-report-surface,#reportModal) .honeypot{position:absolute;left:-9999px;opacity:0;pointer-events:none}
:is(body.pem-report-surface,#reportModal) .result{padding:14px;border-radius:13px;background:#edf8f1;border:1px solid #b9dfc6}
:is(body.pem-report-surface,#reportModal) .badge-public{display:inline-block;padding:5px 9px;border-radius:999px;background:#eaf1fb;color:#23496f;font-size:.78rem;font-weight:700}
:is(body.pem-report-surface,#reportModal) .identity-box,:is(body.pem-report-surface,#reportModal) .control-box{border:1px solid #cad5e2;border-radius:13px;padding:13px;background:#f8fafc}
:is(body.pem-report-surface,#reportModal) .identity-box legend,:is(body.pem-report-surface,#reportModal) .control-box legend{font-weight:750;padding:0 6px}
:is(body.pem-report-surface,#reportModal) .identity-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
:is(body.pem-report-surface,#reportModal) .identity-grid .wide{grid-column:1/-1}
:is(body.pem-report-surface,#reportModal) .consent,:is(body.pem-report-surface,#reportModal) .choice{display:flex;gap:8px;align-items:center}
:is(body.pem-report-surface,#reportModal) .consent input,:is(body.pem-report-surface,#reportModal) .choice input{margin:0}
:is(body.pem-report-surface,#reportModal) .choice-row{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0}
:is(body.pem-report-surface,#reportModal) .choice-row .choice{min-width:84px;padding:10px 14px;border:1px solid #cad5e2;border-radius:11px;background:#fff;cursor:pointer;font-weight:700;transition:.15s ease}
:is(body.pem-report-surface,#reportModal) .choice-row .choice.selected{background:#eaf2ff;color:#0f2d55;border-color:#2e6fb7;box-shadow:0 0 0 2px rgba(46,111,183,.12)}
:is(body.pem-report-surface,#reportModal) .choice-row .choice.selected::after{content:'✓';margin-left:auto;color:#176b3a;font-weight:800}
:is(body.pem-report-surface,#reportModal) .control-detail{display:grid;gap:9px;margin-top:10px}
:is(body.pem-report-surface,#reportModal) .control-detail[hidden]{display:none}
@media(max-width:560px){
:is(body.pem-report-surface,#reportModal) .context,:is(body.pem-report-surface,#reportModal) .identity-grid{grid-template-columns:1fr}
:is(body.pem-report-surface,#reportModal) .identity-grid .wide{grid-column:auto}
}
:is(body.pem-report-surface,#reportModal) .context-disclosure{margin:8px 0 16px}
:is(body.pem-report-surface,#reportModal) .context-disclosure>summary{cursor:pointer;display:flex;align-items:center;gap:12px;list-style:none;padding:8px 2px;color:#086cce;border-radius:8px}
:is(body.pem-report-surface,#reportModal) .context-disclosure>summary::-webkit-details-marker{display:none}
:is(body.pem-report-surface,#reportModal) .context-disclosure>summary:focus-visible{outline:3px solid #86b9ee}
:is(body.pem-report-surface,#reportModal) .context-disclosure .pin{width:27px;height:27px;flex:none}
:is(body.pem-report-surface,#reportModal) .context-disclosure .context-caption{display:grid;gap:1px}
:is(body.pem-report-surface,#reportModal) .context-disclosure .context-caption small{color:#65798f;font-size:.86rem}
:is(body.pem-report-surface,#reportModal) .context-disclosure .context-caption strong{font-weight:750;color:#086cce}
:is(body.pem-report-surface,#reportModal) .context-disclosure .chevron{border:solid #086cce;border-width:0 2px 2px 0;width:9px;height:9px;transform:rotate(45deg);margin:0 0 5px 4px}
:is(body.pem-report-surface,#reportModal) .context-disclosure[open] .chevron{transform:rotate(225deg);margin:6px 0 0 4px}
:is(body.pem-report-surface,#reportModal) .context-disclosure .context{margin-top:9px}
:is(body.pem-report-surface,#reportModal) .emergency-note.home-warning{display:flex;gap:13px;align-items:start;background:#fff0f0;border:1px solid #ffc4c3;margin:15px 0 20px;color:#ab1823;padding:16px;border-radius:14px}
:is(body.pem-report-surface,#reportModal) .home-warning .warning-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:50%;background:#d32130;color:#fff;font-size:25px;font-weight:800}
:is(body.pem-report-surface,#reportModal) .home-warning p{margin:0;line-height:1.47;color:#a71720;font-size:1rem}
:is(body.pem-report-surface,#reportModal) .home-warning strong{color:#a71720}
:is(body.pem-report-surface,#reportModal) .home-warning .last-sentence{display:block}
:is(#content,#reportKindGroup)>h2{font-size:1.52rem;color:#10274b;margin:18px 0 16px}
:is(#content,#reportKindGroup)>.types{gap:11px}
:is(#content,#reportKindGroup) .type-btn,:is(#content,#reportKindGroup) .type-btn.emergency:not(.selected){display:flex;gap:14px;align-items:center;width:100%;min-height:66px;padding:10px 14px;border-radius:13px;border:1px solid #d6e1ed;background:#fff;color:#0b2548;font-size:1rem;font-weight:750;box-shadow:none}
:is(#content,#reportKindGroup) .type-btn .category-icon{display:grid;flex:none;place-items:center;width:44px;height:44px;border-radius:50%;background:#e8f3ff;color:#1874d1}
:is(#content,#reportKindGroup) .type-btn .category-icon svg{width:25px;height:25px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
:is(#content,#reportKindGroup) .type-btn[data-type="EMERGENCY"] .category-icon{background:#ffeaea;color:#cf2433}
:is(#content,#reportKindGroup) .type-btn[data-type="NEAR_MISS"] .category-icon{background:#fff3d7;color:#e5a000}
:is(#content,#reportKindGroup) .type-btn[data-type="UNSAFE_CONDITION"] .category-icon{background:#dff7e9;color:#149263}
:is(#content,#reportKindGroup) .type-btn[data-type="UNSAFE_ACT"] .category-icon{background:#efe7ff;color:#7739bf}
:is(#content,#reportKindGroup) .type-btn[data-type="OTHER"] .category-icon{background:#ebeff3;color:#566c84}
:is(#content,#reportKindGroup) .type-btn .category-name{flex:1}
:is(#content,#reportKindGroup) .type-btn .category-arrow{font-size:1.7rem;line-height:1;color:#6e88a1}
:is(#content,#reportKindGroup) .type-btn .selected-check{display:none}
:is(#content,#reportKindGroup) .type-btn.selected .selected-check{display:inline}
:is(#content,#reportKindGroup) .type-btn:hover:not(.selected){background:#f7faff;border-color:#7aa6d8}
:is(#content,#reportKindGroup) .type-btn.emergency.selected{background:#a72b20;color:#fff;border-color:#a72b20}
:is(#content,#reportKindGroup) .type-btn.emergency.selected .category-icon{background:#fff;color:#ae1623}
:is(#content,#reportKindGroup) .type-btn.emergency.selected .category-arrow{color:#fff}
:is(#content,#reportKindGroup) .type-btn:focus-visible{outline:3px solid #84b7ff;outline-offset:2px}
:is(#content,#reportForm)>.muted.small{border-top:1px solid #dde8f3;padding-top:16px;margin-top:23px;line-height:1.5}
@media(max-width:560px){
:is(#content,#reportKindGroup) .type-btn,:is(#content,#reportKindGroup) .type-btn.emergency:not(.selected){min-height:61px;gap:12px;padding:8px 11px}
:is(#content,#reportKindGroup) .type-btn .category-icon{width:40px;height:40px}
:is(body.pem-report-surface,#reportModal) .emergency-note.home-warning{padding:12px}
:is(body.pem-report-surface,#reportModal) .home-warning p{font-size:.94rem}
:is(#content,#reportKindGroup)>h2{font-size:1.35rem}
}
:is(body.pem-report-surface,#reportModal) .form,:is(body.pem-report-surface,#reportModal) .control-detail{grid-template-columns:minmax(0,1fr);min-width:0}
:is(body.pem-report-surface,#reportModal) .form>*,:is(body.pem-report-surface,#reportModal) .control-detail>*,:is(body.pem-report-surface,#reportModal) .identity-grid>*,:is(body.pem-report-surface,#reportModal) .context>*,:is(body.pem-report-surface,#reportModal) .type-btn .category-name{min-width:0}
:is(body.pem-report-surface,#reportModal) .form fieldset{min-inline-size:0;width:100%;max-width:100%;box-sizing:border-box;margin-inline:0}
:is(body.pem-report-surface,#reportModal) .identity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
:is(body.pem-report-surface,#reportModal) .form textarea,:is(body.pem-report-surface,#reportModal) .form input:not([type=radio]):not([type=checkbox]):not(.honeypot):not(.pem-evidence-native),:is(body.pem-report-surface,#reportModal) .form select{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
:is(body.pem-report-surface,#reportModal) .form .pem-evidence-picker{box-sizing:border-box;min-width:0;width:100%;flex-wrap:wrap}
:is(body.pem-report-surface,#reportModal) .form .pem-evidence-trigger{max-width:100%;white-space:normal}
:is(body.pem-report-surface,#reportModal) .form .pem-evidence-name{flex:1 1 80px;min-width:0;overflow-wrap:anywhere}
:is(body.pem-report-surface,#reportModal) .form .choice-row .choice{max-width:100%;box-sizing:border-box}
:is(body.pem-report-surface,#reportModal) .form legend,:is(body.pem-report-surface,#reportModal) .ctx,:is(body.pem-report-surface,#reportModal) .form label{overflow-wrap:anywhere}
@media(max-width:560px){
:is(body.pem-report-surface,#reportModal) .identity-grid{grid-template-columns:minmax(0,1fr)}
}

/* One icon palette for desktop and QR/Android. */
:root{--pem-report-blue-bg:#e8f3ff;--pem-report-blue:#246eab;--pem-report-red-bg:#ffeaea;--pem-report-red:#cf2433;--pem-report-amber-bg:#fff3d7;--pem-report-amber:#bd8100;--pem-report-green-bg:#dff7e9;--pem-report-green:#149263;--pem-report-purple-bg:#efe7ff;--pem-report-purple:#7739bf;--pem-report-neutral-bg:#ebeff3;--pem-report-neutral:#566c84}
:is([data-report-icon],[data-type]) :is(.pem-report-type-icon,.category-icon){display:inline-grid!important;place-items:center;flex:0 0 36px!important;width:36px!important;height:36px!important;border-radius:50%;background:var(--pem-report-blue-bg);color:var(--pem-report-blue)}
:is([data-report-icon],[data-type]) :is(.pem-report-type-icon,.category-icon) svg{width:20px!important;height:20px!important;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
:is([data-report-icon="EMERGENCY"],[data-type="EMERGENCY"]) :is(.pem-report-type-icon,.category-icon){background:var(--pem-report-red-bg)!important;color:var(--pem-report-red)!important}
:is([data-report-icon="NEAR_MISS"],[data-type="NEAR_MISS"]) :is(.pem-report-type-icon,.category-icon){background:var(--pem-report-amber-bg)!important;color:var(--pem-report-amber)!important}
:is([data-report-icon="UNSAFE_CONDITION"],[data-type="UNSAFE_CONDITION"]) :is(.pem-report-type-icon,.category-icon){background:var(--pem-report-green-bg)!important;color:var(--pem-report-green)!important}
:is([data-report-icon="UNSAFE_ACT"],[data-type="UNSAFE_ACT"]) :is(.pem-report-type-icon,.category-icon){background:var(--pem-report-purple-bg)!important;color:var(--pem-report-purple)!important}
:is([data-report-icon="OTHER"],[data-type="OTHER"],[data-report-icon="NONCONFORMITY"],[data-type="NONCONFORMITY"]) :is(.pem-report-type-icon,.category-icon){background:var(--pem-report-neutral-bg)!important;color:var(--pem-report-neutral)!important}

/* Desktop shell and location adapter; all report components use the Android layout. */
#reportModal:not([hidden]){overflow:hidden!important;padding:12px!important}
#reportModal .modal-card{width:min(560px,calc(100vw - 24px))!important;max-width:560px!important;max-height:min(740px,88dvh);overflow-y:auto;overflow-x:hidden;padding:18px;box-sizing:border-box;border-radius:18px;background:#fff;border:1px solid #e0e7ef;box-shadow:0 8px 24px rgba(15,45,85,.06)}
#reportModal .modal-head{position:sticky;top:-18px;background:#fff;padding:14px 0 10px;z-index:5;display:flex;justify-content:space-between;align-items:start;border-bottom:1px solid #e3e9f0}
#reportModal .modal-head h2{font-size:1rem;margin:3px 0;color:#10274b}
#reportModal .pem-report-eyebrow{font-size:9px;letter-spacing:.12em;font-weight:750;color:#667b91;text-transform:uppercase}
#reportModal #reportForm{display:block;min-width:0}
#reportModal #reportKindGroup{border:0;margin:0;padding:0;min-width:0}
#reportModal #reportFormPanel .form{margin:0}
#reportModal #reportForm [hidden],#reportModal #reportForm[hidden],#reportModal #reportConfirmation[hidden],#reportModal #reportConfirmation [hidden]{display:none!important}
#reportModal #reportForm .context label,#reportModal #reportFormPanel label{font-weight:inherit;display:block}
#reportModal #reportForm .choice-row .choice{display:flex;align-items:center;gap:8px;min-height:44px}
#reportModal #reportForm select{padding:11px;border:1px solid #c8d3df;border-radius:10px;background:#fff}
#reportModal #reportFormPanel .form textarea{resize:vertical}
#reportModal .report-group-title{margin:14px 0 8px}
#reportModal #reportConfirmation{display:grid;gap:10px;padding:0}
#reportModal #reportConfirmation .result{display:grid;gap:9px}
#reportModal #reportConfirmation .result h3,#reportModal #reportConfirmation .result p{margin:0}
#reportModal #reportConfirmation .form-actions{display:flex;gap:8px;flex-wrap:wrap}
#reportModal .type-btn .category-name{font-weight:750}
#reportModal [data-report-mode=event][hidden]{display:none!important}
@media(max-width:560px){#reportModal .modal-card{padding:12px;max-height:calc(100dvh - 24px)}#reportModal .modal-head{top:-12px}}


/* Preserve the Android typography and control geometry inside the desktop shell.
   Width adapts; the report itself has one visual vocabulary. */
html:has(#reportModal:not([hidden])),body:has(#reportModal:not([hidden])){overflow:hidden!important}
#reportModal .modal-card{font-size:16px;line-height:normal;color:#10284a}
#reportModal #reportForm #reportFormPanel{border:0!important;border-top:1px solid #e3e9f0!important;border-radius:0!important;padding:14px 0 0!important;margin-top:14px!important;box-shadow:none!important;background:transparent!important}
#reportModal #reportForm #reportFormPanel h3{font-size:1.17em!important;line-height:normal!important;color:#10284a!important;font-weight:700!important}
#reportModal #reportForm #reportFormPanel :is(p,label,fieldset,.identity-box,.safety-note){font-size:16px!important;line-height:normal!important}
#reportModal #reportForm #reportFormPanel .small{font-size:.88rem!important}
#reportModal #reportForm #reportFormPanel label{font-weight:400!important;color:#10284a!important}
#reportModal #reportForm #reportFormPanel :is(#reportEvidenceWrap,#reportMeasureEvidenceWrap){display:block!important;gap:normal!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;font-size:16px!important;line-height:normal!important}
#reportModal #reportForm #reportFormPanel .pem-evidence-trigger{line-height:normal!important}
#reportModal #reportForm #reportFormPanel :is(textarea,input[type=text],input[type=datetime-local]){font-size:16px!important;line-height:normal!important;color:#000!important;border:1px solid #c8d3df!important;border-radius:10px!important;padding:11px!important;min-height:0!important;height:auto!important;box-sizing:border-box!important}
#reportModal #reportForm #reportFormPanel textarea{font-size:13.3333px!important;min-height:105px!important}
#reportModal #reportForm #reportFormPanel select{font-size:13.3333px!important;line-height:normal!important;color:#000!important;border:1px solid #767676!important;border-radius:0!important;padding:0!important;min-height:0!important;height:auto!important;background:#fff!important}
#reportModal #reportForm #reportFormPanel .choice-row .choice{font-weight:800!important;font-size:16px!important;border-radius:12px!important;border-width:2px!important;min-height:54px!important}
#reportModal #reportForm #reportFormPanel .choice-row .choice.selected{border-color:#2e6fb7!important}
#reportModal #reportForm #reportFormPanel .submit{background:#0b73e0!important;color:#fff!important;border:1px solid #0b73e0!important;border-radius:10px!important;padding:9px 12px!important;font-weight:700!important;font-size:16px!important;line-height:normal!important;min-height:52px!important;box-shadow:none!important}
#reportModal #reportForm #reportFormPanel .submit.emergency{background:#a72b20!important;border-color:#a72b20!important}
#reportModal #reportForm #reportFormPanel .submit:disabled{opacity:.55!important;cursor:not-allowed!important}
#reportModal #reportConfirmation .result{font-size:16px;line-height:normal}
#reportModal #reportConfirmation .result h3{font-size:1.17em;font-weight:700}
#reportModal #reportForm #reportFormPanel .choice-row .choice.selected{color:#0f2d55!important}

#reportModal #reportForm #reportFormPanel #reportDescriptionLabel{font-size:13.3333px!important;min-height:105px!important}
#reportModal #reportForm #reportFormPanel .choice-row .choice:has(input:checked){color:#0f2d55!important;background:#eaf2ff!important;border-color:#2e6fb7!important;box-shadow:0 0 0 2px rgba(46,111,183,.12)!important}
#reportModal #reportForm #reportFormPanel .choice-row .choice:has(input:checked)::after{content:'\2713';margin-left:auto;color:#176b3a;font-weight:800}


/* Emergency is the only fully red report type, in both channels. */
:is(#content,#reportKindGroup) .type-btn[data-type="EMERGENCY"]{
  background:#b91c2b!important;color:#fff!important;border-color:#b91c2b!important;
}
:is(#content,#reportKindGroup) .type-btn[data-type="EMERGENCY"]:hover{background:#a51623!important;border-color:#a51623!important}
:is(#content,#reportKindGroup) .type-btn[data-type="EMERGENCY"].selected,
:is(#content,#reportKindGroup) .type-btn[data-type="EMERGENCY"][aria-pressed="true"]{background:#991b24!important;border-color:#991b24!important;box-shadow:0 0 0 2px rgba(153,27,36,.18)!important}
:is(#content,#reportKindGroup) .type-btn[data-type="EMERGENCY"] .category-icon{background:#fff!important;color:#b91c2b!important}
:is(#content,#reportKindGroup) .type-btn[data-type="EMERGENCY"] :is(.category-name,.category-arrow,.selected-check){color:#fff!important}
:is(body.pem-report-surface,#reportModal) .submit.emergency,
#reportModal #reportForm #reportFormPanel .submit.emergency{background:#b91c2b!important;border-color:#b91c2b!important;color:#fff!important}
/* Desktop adapts dimensions only; menu remains a single Android column. */
@media(min-width:561px){
  #reportModal .modal-card{padding:16px}
  #reportModal .modal-head{top:-16px;padding:10px 0 8px}
  #reportKindGroup .type-btn{min-height:56px;padding:8px 12px;gap:12px}
  #reportKindGroup>.types{gap:8px}
  #reportKindGroup>h2{font-size:1.35rem;margin:12px 0}
  #reportKindGroup .report-group-title{margin:12px 0 7px}
  #reportModal .home-warning{padding:12px;margin:10px 0 14px}
  #reportModal .context-disclosure{margin:5px 0 10px}
}
