:root{color-scheme:dark;font-family:"Geist","Inter",system-ui,sans-serif;background:#10161d;color:#ebf1f5;--border:#2a3642;--muted:#a4b3c0;--cyan:#72dce6;--panel:#16202a}
*{box-sizing:border-box}
body{margin:0}
button,input{font:inherit}
button,a,input{touch-action:manipulation}
button{border:0;cursor:pointer;color:inherit;background:none}
button:focus-visible,a:focus-visible,canvas:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
a{color:var(--cyan);text-underline-offset:3px}
.top{height:70px;padding:0 26px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);gap:12px}
.brand{display:flex;align-items:center;gap:12px}
.logo{display:grid;place-items:center;color:var(--cyan);border:1px solid #315464;background:#17323b;border-radius:10px;width:34px;height:34px;font-size:22px}
h1,h2,p{margin:0}
h1{font-size:19px;font-weight:680;letter-spacing:-.04em}
h2{font-size:23px;letter-spacing:-.045em}
.switch,.layers,.zoom{display:flex;border:1px solid var(--border);border-radius:9px;background:#141e27;padding:3px;gap:3px}
.switch button,.filters button{font-size:13px;padding:8px 10px;border-radius:6px;color:var(--muted);white-space:nowrap}
.switch button[aria-pressed=true],.filters button[aria-pressed=true]{background:#243743;color:#c7f2f5}
main{height:calc(100dvh - 70px);min-height:560px;display:grid;grid-template-columns:minmax(0,1fr) 380px}
.map-frame{position:relative;overflow:hidden;background:#182733}
canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}
canvas:active{cursor:grabbing}
.map-tools{position:absolute;top:18px;left:18px;display:flex;gap:8px;flex-wrap:wrap}
.layers label{display:flex;gap:5px;align-items:center;padding:4px 7px;font-size:13px}
.layers input{accent-color:var(--cyan)}
.zoom{position:absolute;left:18px;bottom:28px;flex-direction:column}
.zoom button{width:34px;height:34px;font-size:21px;border-radius:5px}
.zoom button:hover,.filters button:hover{background:#263747}
.map-note,.attribution{position:absolute;right:10px;background:#121c25df;padding:4px 8px;border-radius:4px;font-size:11px;color:#c0cdd6;pointer-events:none}
.map-note{bottom:34px}
.map-note:empty{display:none}
.attribution{bottom:9px}
.attribution a{pointer-events:auto;color:inherit}
.events{overflow:auto;border-left:1px solid var(--border);padding:22px;background:#10161d}
.events-header p{font-size:13px;color:var(--muted);line-height:1.45;margin:7px 0 15px}
.filters{display:flex;gap:3px;flex-wrap:wrap;margin-bottom:15px}
#event-list{display:grid;gap:7px}
.event{background:#161f29;border:1px solid #273442;text-align:left;width:100%;border-radius:9px;padding:11px 12px;display:grid;gap:4px}
.event:hover,.event[aria-current=true]{border-color:#52858f;background:#1c2b36}
.event-type{font-size:11px;font-weight:690;color:#8ce1e9}
.event-type.red{color:#ff9ba5}.event-type.yellow{color:#fbd084}.event-type.white{color:#e4eef6}
.event-title{font-size:14px;font-weight:630}
.event-meta,.empty,.sources{font-size:12px;color:var(--muted)}
.empty{padding:14px 0}
#detail{border:1px solid var(--border);border-radius:9px;margin-top:14px;padding:13px;font-size:13px;line-height:1.5}
#detail p{margin:5px 0 8px;color:#c9d5dd}
.sources{display:grid;gap:6px;margin-top:17px;padding-top:14px;border-top:1px solid var(--border)}
@media(max-width:850px){
  main{grid-template-columns:1fr;height:auto}
  .map-frame{height:58dvh;min-height:360px}
  .events{border-left:0;border-top:1px solid var(--border)}
}
@media(max-width:450px){
  .top{padding:0 11px}.brand{gap:7px}.logo{width:27px;height:27px;font-size:17px}h1{font-size:16px}
  .map-tools{top:10px;left:10px;gap:5px}.zoom{left:10px}.layers label{padding-inline:3px}
}

.map-popup{position:absolute;z-index:2;width:min(252px,calc(100% - 20px));padding:12px 34px 12px 12px;background:#14202b;border:1px solid #46616e;border-radius:9px;box-shadow:0 6px 24px #080c1180;font-size:12px;line-height:1.4}
.map-popup strong{display:block;font-size:14px}
.map-popup p{color:#c0cdd6;margin:4px 0}
.map-popup-close{position:absolute;top:4px;right:4px;width:28px;height:28px;border-radius:5px;font-size:18px}
.map-popup-close:hover{background:#263747}

.incident-history{margin:0 0 12px;padding:10px 12px;border:1px solid var(--border);border-radius:8px;font-size:12px;color:var(--muted)}
.incident-history summary{cursor:pointer;color:#dfeaf0;font-weight:600}
.incident-history p{margin-top:7px;line-height:1.5}
.event-type.reported-threat,.event-type.reported-impact,.event-type.restriction{color:#d6c4ff}
