/* LEAD UI Theme 2026.10.13 - Canadian public safety portal
   One presentation system; no changes to content, permissions, or query logic. */
:root{
  color-scheme:light;
  --bg:#f3f6fa;--panel:#fff;--line:#d7e0eb;--text:#15304d;
  --muted:#546a80;--accent:#075dbb;--accent-strong:#084c9d;
  --app-bg:#f3f6fa;--app-panel:#102b4a;--app-line:#d7e0eb;
  --app-text:#15304d;--app-muted:#546a80;
  --lead-navy:#0c2948;--lead-navy-deep:#0b213c;
  --lead-blue:#145db7;--lead-blue-hover:#0e4e9e;
  --lead-subtle:#edf3f9;--lead-white:#fff;
  --lead-shadow:0 2px 10px rgba(17,47,80,.055);
}
html{scroll-behavior:smooth}
body{background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
a{color:var(--accent)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
  outline:3px solid #60a6fa;outline-offset:2px
}
[hidden]{display:none!important}
.shell{grid-template-columns:222px minmax(0,1fr);grid-template-rows:58px minmax(0,1fr);background:var(--bg)}
.shell>.sidebar,.sidebar{
  background:linear-gradient(170deg,var(--lead-navy-deep) 0%,var(--lead-navy) 100%);
  color:#d9e7f7;border-right:1px solid #193c61;
  width:222px;padding:18px 13px
}
.sidebar .brand{
  display:block;color:#fff;text-decoration:none;
  font-size:25px;letter-spacing:.045em;font-weight:800;
  line-height:1.3;padding:0 8px 17px;margin:0 0 10px;border-bottom:1px solid rgba(255,255,255,.14)
}
.sidebar .brand::before{content:"🍁";font-size:24px;letter-spacing:0;margin-right:8px}
.sidebar .nav{display:flex;flex-direction:column;gap:2px}
.sidebar .nav .section{
  color:#8fb0d2!important;font-size:10px;letter-spacing:.11em;
  margin:13px 10px 8px;padding:0
}
.sidebar .nav a{
  color:#dbe9f8!important;background:transparent;
  border:1px solid transparent;display:block;line-height:1.25;
  font-size:12.7px;font-weight:540;padding:9px 11px;
  border-radius:6px;text-decoration:none;
  white-space:normal;transition:background .15s,color .15s
}
.sidebar .nav a:hover{color:#fff!important;background:#1b4774;border-color:#2a567f}
.sidebar .nav a[aria-current="page"]{
  color:#fff!important;background:#1563c0;border-color:#3782e0;
  box-shadow:inset 3px 0 0 #93c7ff
}
.shell>.topbar,.topbar{
  background:var(--lead-navy-deep);color:#e6f1ff;border-bottom:1px solid #254c73;
  left:222px;height:58px;padding:10px 20px;z-index:40
}
.topbar .context,.topbar .context a{color:#c5d8ee!important}
.topbar .context{width:158px;flex:0 1 158px;font-size:12px}
.topbar .global-search{margin-left:10px;max-width:540px}
.topbar .global-search input{
  background:#fff;color:#21364e;border-color:#c7d7e8;
  border-radius:6px;height:36px;box-shadow:none;font-size:13px
}
.topbar .global-search input::placeholder{color:#708196}
.topbar .session,.topbar .status{color:#deebfa!important}
.topbar .session{flex-shrink:0;gap:7px}
.topbar .session button,.topbar button{
  color:#ecf5ff;border-color:#40648e;background:#123459;
  font-size:11px;font-weight:700;text-transform:uppercase;
  border-radius:5px;padding:8px 10px
}
.topbar .session button:hover,.topbar button:hover{background:#1f548b;border-color:#7baddf}
.topbar .search-results,.search-results{
  background:#fff;border-color:#c5d5e7;box-shadow:0 13px 26px #122f4b24
}
.topbar .search-results a,.search-results a{color:#18304c;border-bottom-color:#e0e8f0}
.topbar .search-results a:hover,.search-results a:hover{background:#edf4fc}
.topbar .search-results small,.search-results small{color:#62758a}
.shell>main,.shell main{
  background:var(--bg);color:var(--text);max-width:1530px;
  min-width:0;padding:30px 29px 56px
}
.shell>main section{scroll-margin-top:82px}
.eyebrow{color:#1461b5;font-size:11px;letter-spacing:.105em}
h1,h2,h3,h4{color:inherit}
.shell main h2{color:#112f51;letter-spacing:-.025em}
.shell main>.eyebrow+.lede{margin-top:0}
.lede{color:#4e6278;line-height:1.6}
.grid{gap:12px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.card{
  background:#fff;color:#18314e;border:1px solid #d9e3ee;
  border-radius:7px;box-shadow:var(--lead-shadow);
  padding:16px 18px;min-height:0;overflow-wrap:anywhere
}
.card:hover{border-color:#80addf;box-shadow:0 3px 13px #153c6920}
.card h3{color:#163859;font-size:15px;font-weight:700;line-height:1.35}
.card p{color:#536980;font-size:12.7px;line-height:1.52}
.card a{color:#075dbb}
.tag{
  color:#0a59ae;font-size:10.5px;background:#ebf3ff;
  border:1px solid #d1e3fa;border-radius:4px;
  padding:3px 7px;line-height:1.5;font-weight:650
}
.directory-list{background:#fff;border-color:#d5e1ec;box-shadow:var(--lead-shadow);border-radius:7px}
.directory-row{background:#fff;color:#1b344f;border-top-color:#dbe5ef}
.directory-row:hover{background:#f0f6ff}
.directory-row small,.update-row time{color:#63758a}
.update-row{background:#fff;border-top-color:#e0e7f0}
.update-row p{color:#526980}
.directory-index a{border-color:#d3e0ed;background:#fff;color:#145db7}
.directory-index a:hover{background:#edf4fc}
.report-panel{
  background:#fff;color:#16324f;border-color:#cddbea;
  box-shadow:0 15px 35px #10294536
}
.report-panel strong{color:#183b61}
.report-panel label,.report-msg{color:#51667d}
.report-panel input,.report-panel textarea{
  background:#fff;color:#1a344f;border:1px solid #c4d4e5
}
.report-panel button,.shell main button{
  color:#0e4387;background:#fff;border:1px solid #b9cee6;
  border-radius:5px;font-size:12px;font-weight:650
}
.report-panel button:hover,.shell main button:hover{background:#e8f2ff}
.shell main button[type="submit"],.shell main .swb-primary{
  background:#145fc2!important;color:#fff!important;border-color:#1254ae!important
}
.shell main button[type="submit"]:hover,.shell main .swb-primary:hover{background:#0c4b9c!important}
.to-top,.to-top.visible{
  background:#155fb9;color:#fff;border-color:#0a4e9d;
  box-shadow:0 4px 14px #102e5d3d
}
input,select,textarea{accent-color:#1262be}
.shell main input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.shell main select,.shell main textarea{
  background:#fff;color:#17334e;border-color:#c7d6e6;
  border-radius:5px
}
.shell main input::placeholder,.shell main textarea::placeholder{color:#71869b}
.shell main details{background:#fff;color:#1b344f;border-color:#d3e0ed}
.shell main summary{color:#1a436b}
.shell main table{border-color:#d7e1ec}
.shell main th{color:#425d77}
.shell main td{color:#1e3852}
.shell main a{color:#075dbb}
.shell main .status{color:#536980}
.shell main [style*="background:#141925"]{
  background:#fff!important;color:#17344f!important
}
.shell main [style*="background:#1b2230"]{
  background:#f5f8fc!important;color:#17344f!important
}
/* Independent research tools that still carried hardcoded dark surfaces */
.swb .swb-panel,.swb .swb-details{background:#fff;color:#183451;border-color:#d5e2ef}
.swb .swb-banner{background:#e9f3ff;color:#22476d;border-color:#bdd6f2}
.swb label:not(.swb-opt){color:#234363}
.swb input[type=text],.swb select{
  background:#fff;color:#173451;border-color:#c4d4e7
}
.swb .swb-hint,.swb-item small,.swb-details p,.swb-footer{color:#536b82}
.swb .swb-count,.swb .swb-opt,.swb .swb-item{color:#254563;border-color:#d8e3ed}
.swb .swb-item a{color:#075dbb;background:#f6faff;border-color:#bad3ef}
.swb .swb-item a:hover{background:#e5f1ff}
.swb .swb-error{color:#932d30;background:#fff3f3}
.pesd-search input{background:#fff!important;color:#183451!important;border-color:#c6d8e9!important}
.srg,.coord-workbench{color:var(--text)}
/* Provider sheets: preserve MSDS structure and print/QA indicators; restyle chrome only */
.pds-sheet,.r2doc{box-shadow:0 2px 12px #172e5016}
.pds-sheet{border-color:#cad8e7}
.shell .pds-sheet .sheet-header h1{color:#102d4c}
.pds-sheet .section-head{background:#15385b}
.pds-sheet .quick-head{background:#102d4c}
.r2doc{border-color:#c8d7e7}
.r2head{border-bottom-color:#1b436f}
.report-dialog{color:#152e48}
body:has(#request){background:linear-gradient(145deg,#eaf1f9,#f9fbfe);color:#17314e}
body:has(#request)>main{
  background:#fff;color:#17314e;border:1px solid #d7e3ef;
  box-shadow:0 15px 40px #16365b20
}
body:has(#request)>main h1{color:#102e50}
body:has(#request) input{background:#fff;color:#17314e;border-color:#c8d8e8}
body:has(#request) button{background:#135dbb;color:#fff;border-color:#135dbb}
@media(max-width:980px){
 .topbar .context{display:none}
 .topbar .global-search{margin-left:0}
 .topbar .session{gap:4px}
 .topbar .status{display:none}
 .shell>main,.shell main{padding:23px 20px 40px}
}
@media(max-width:760px){
 .shell{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr)}
 .shell>.sidebar,.sidebar{
   position:static;width:100%;height:auto;padding:8px 10px;
   border-right:0;border-bottom:1px solid #25486c;grid-row:1
 }
 .sidebar .brand{display:block;font-size:19px;padding:2px 6px 8px;margin-bottom:6px}
 .sidebar .brand::before{font-size:18px}
 .sidebar .nav{
   display:flex;flex-direction:row;flex-wrap:nowrap;
   overflow-x:auto;gap:5px;padding:2px 0 4px
 }
 .sidebar .nav .section{display:none}
 .sidebar .nav a{
   flex:0 0 auto;font-size:11px;white-space:nowrap;
   padding:7px 9px;border-radius:5px
 }
 .shell>.topbar,.topbar{
   position:sticky;top:0;left:auto;right:auto;grid-column:1;grid-row:2;
   width:100%;height:auto;min-height:50px;padding:7px 10px;gap:7px
 }
 .topbar .global-search{flex:1;min-width:0;max-width:none}
 .topbar .global-search input{font-size:12px;min-width:0}
 .topbar .session button{font-size:9px;padding:8px 6px;white-space:nowrap}
 .shell>main,.shell main{grid-column:1;grid-row:3;width:100%;padding:19px 13px 36px}
 .grid{grid-template-columns:1fr}
 .directory-columns{grid-template-columns:1fr}
 .update-row{grid-template-columns:1fr}
 .card{padding:13px 14px}
 .report-panel{right:8px;top:54px}
}
@media print{
 :root{color-scheme:light}
 body{background:#fff!important;color:#111!important}
 .shell>.sidebar,.sidebar,.shell>.topbar,.topbar,.to-top{display:none!important}
 .shell,.shell>main,.shell main{display:block!important;background:#fff!important;max-width:none!important;padding:0!important;margin:0!important}
 .card,.directory-list{box-shadow:none!important}
}

/* Legacy inline component palettes. These components inject style elements after the head,
   so overrides here intentionally have greater specificity and/or !important. */
.shell main .lib-banner{background:#fff7e9!important;color:#6d4c17!important;border-left-color:#ce913d!important}
.shell main .lib-controls,.shell main .lib-row{
  background:#fff!important;color:#1b3652!important;
  border:1px solid #d3e1ee!important;box-shadow:var(--lead-shadow)
}
.shell main .lib-controls input,.shell main .lib-controls select{
  background:#fff!important;color:#193751!important;border-color:#c5d8e8!important
}
.shell main .lib-row p,.shell main .lib-count{color:#536b83!important}
.shell main .lib-row .lib-note{color:#875f20!important}
.shell main .lib-links a{
  background:#f0f6ff!important;color:#0758b4!important;border-color:#bdd5ee!important
}
.shell main .swb .swb-panel,.shell main .swb .swb-details{
  background:#fff!important;color:#193651!important;border-color:#d3e2ef!important
}
.shell main .swb .swb-banner{
  background:#eaf3ff!important;color:#234c75!important;border-color:#bdd8f0!important
}
.shell main .swb label:not(.swb-opt){color:#284867!important}
.shell main .swb input[type=text],.shell main .swb select{
  background:#fff!important;color:#183750!important;border-color:#c0d4e7!important
}
.shell main .swb .swb-hint,.shell main .swb .swb-item small,
.shell main .swb .swb-details p,.shell main .swb .swb-footer{color:#536c85!important}
.shell main .swb .swb-count,.shell main .swb .swb-opt{color:#244a6c!important}
.shell main .swb .swb-item{border-bottom-color:#dae5ef!important}
.shell main .swb .swb-item a{
  background:#f1f7ff!important;color:#0d5ab2!important;border-color:#b9d3ee!important
}
.shell main .swb .swb-error{color:#9c3136!important}
.shell main .swb .swb-details summary{color:#133b60!important}
@media print{
 .shell main .lib-banner,.shell main .lib-controls,.shell main .lib-row{
   background:#fff!important;color:#111!important
 }
}

/* Very small viewport safeguard: no cards or header controls may widen the app. */
@media(max-width:540px){
 html,body{max-width:100%;overflow-x:clip}
 .shell,.shell>.sidebar,.shell>.topbar,.shell>main{
   max-width:100%;min-width:0
 }
 .shell>.topbar,.topbar{flex-wrap:wrap;gap:6px 7px}
 .topbar .global-search{flex:1 1 170px;min-width:120px}
 .topbar .session{margin-left:0;flex:0 0 auto;gap:4px}
 .topbar .session button{font-size:9px;padding:7px 5px}
 .shell main h2{font-size:clamp(23px,6vw,30px);line-height:1.2;overflow-wrap:anywhere}
 .shell>main,.shell main{padding:17px 12px 34px}
 .shell main .grid{grid-template-columns:minmax(0,1fr)}
 .shell main .card,.shell main .directory-list,.shell main .directory-row{
   min-width:0;max-width:100%
 }
 .directory-row>span{min-width:0;overflow-wrap:anywhere}
}

/* Homepage 2026-10-13: match the light Crime Encyclopedia palette. */
.shell main .lead-welcome{
  background:#fff!important;
  color:#193652!important;
  border:1px solid #d9e3ee!important;
  border-radius:7px!important;
  box-shadow:0 2px 10px rgba(17,47,80,.055);
  padding:24px 26px;
  max-width:100%;
}
.shell main .lead-welcome .eyebrow{
  color:#1461b5!important;
  font-weight:750;
}
.shell main .lead-welcome h2{
  color:#112f51!important;
  font-size:clamp(24px,3vw,30px);
  margin:9px 0 11px;
}
.shell main .lead-welcome p,
.shell main .lead-welcome li{
  color:#435c74!important;
  line-height:1.65;
}
.shell main .lead-welcome .lede{
  color:#506780!important;
  margin:0;
  max-width:950px;
}
.shell main .lead-welcome-summary{
  margin-top:20px;
  padding-top:17px;
  border-top:1px solid #dbe5ef;
}
.shell main .lead-welcome-summary h3{
  color:#153a5f!important;
  font-size:19px;
  margin:0 0 8px;
}
.shell main .lead-welcome-summary .lead-welcome-list{
  margin:8px 0 12px;
  padding-left:22px;
}
.shell main .lead-welcome-summary .lead-welcome-list li{margin:3px 0}
.shell main .lead-welcome-summary .lead-welcome-footer{
  color:#1559a9!important;
  font-weight:700;
  margin:12px 0 0;
}
@media(max-width:760px){
 .shell main .lead-welcome{padding:19px 17px}
 .shell main .lead-welcome-summary h3{font-size:18px}
}
