/* Incident workflow, layered over the existing light atlas. */
body.in-workspace { --muted: #526b60; }
body.in-workspace .demo-banner,
body.in-workspace:not([data-screen=incidents]) .demo-banner {
  position: absolute; inset: 66px 0 auto; z-index: 900;
  height: 28px; max-width: none; width: 100%; padding: 0 24px;
  display: flex; justify-content: space-between; align-items: center;
  background: #edf3ef; color: #466054; border-radius: 0; pointer-events: auto;
}
.demo-banner > span { font-size: 11px; }
.demo-banner > span::after { content: none; }
.demo-banner .text-button { font-size: 11px; margin: 0; }
.ops-shell { padding-top: 28px; }
.ops-nav { top: 94px; }
.command-stage { height: calc(100svh - 94px); min-height: 600px; }
body[data-screen=incidents] .ops-header { top: 108px; }
body[data-screen=incidents] .ops-header .button { min-height: 38px; }
.atlas-title { top: 28px; left: 24px; width: 260px; }
.atlas-title h1 { font-size: 30px; line-height: 1.15; max-width: none; letter-spacing: -.025em; }
.atlas-title p { font-size: 12px; margin-top: 10px; max-width: none; }
.atlas-entry { position: absolute; top: 130px; left: 24px; z-index: 450; display: flex; flex-direction: column; align-items: start; gap: 8px; }
.atlas-entry .atlas-alert-toggle { position: static; min-height: 44px; padding: 10px 16px; gap: 22px; }
.next-alert { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #23796b; padding: 8px 0; }
.next-alert .icon { width: 16px; height: 16px; }
.command-stage .leaflet-tile-pane { filter: none; opacity: 1; }
.map-panel .leaflet-control-container { position: absolute; inset: 0; pointer-events: none; }
.map-panel .leaflet-control { pointer-events: auto; }
.command-stage .map-panel::after { background: linear-gradient(90deg,#f5f8f6f2,transparent 32%),linear-gradient(0deg,#f5f8f6,transparent 12%); }
.map-tools { position: absolute; right: 20px; bottom: 112px; z-index: 570; display: flex; flex-direction: column; padding: 4px; background: white; border-radius: 12px; box-shadow: 0 2px 5px #0000000a,0 8px 28px #0000000c; }
.map-tools button { width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 4px; border-radius: 8px; color: #203e3a; font-size: 11px; }
.map-tools button:hover { background: #edf5f1; }
.map-tools #map-overview { flex-direction: column; border-top: 1px solid #e4ece8; border-radius: 0 0 8px 8px; }
.map-tools .icon { width: 19px; height: 19px; stroke-width: 2px; }
.map-marker { width: 28px; height: 28px; border: 3px solid white; display: flex; align-items: center; justify-content: center; background: #bb5948; }
.map-marker span { color: white; font-size: 11px; font-weight: 600; }
.map-marker.responding { background: #987423; }
.map-marker.resolved { background: #36856b; width: 18px; height: 18px; margin: 5px; }
.map-marker::after { display: none; }
.is-selected .map-marker { outline: 3px solid #203e3a; outline-offset: 4px; }
.command-stage .ops-stats { bottom: 0; left: 0; right: 0; padding: 19px 24px 22px; border-radius: 0; background: linear-gradient(90deg,#fffffffa,#fffffff0); gap: 35px !important; min-height: 78px; align-items: center; }
.ops-stats > button { display: flex; align-items: baseline; gap: 10px; text-align: left; border-radius: 8px; padding: 3px 5px; }
.ops-stats > button:hover { background: #edf5f1; }
.ops-stats > button:nth-child(1) b { color: #b04d3d; }
.ops-stats > button:nth-child(2) b { color: #876921; }
.ops-stats > button:nth-child(3) b { color: #23796b; }
.ops-stats b { font-size: 27px; }
.ops-stats > a { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #23796b; }
.atlas-legend { left: 24px; bottom: 108px; flex-direction: row; gap: 16px; font-size: 11px; }
.feed-message { left: 24px; bottom: 148px; font-size: 11px; }
.leaflet-control-attribution { margin-bottom: 80px !important; font-size: 9px !important; }
.command-stage .queue { left: 24px; top: 225px; bottom: 85px; width: 330px; }
.queue-tools { position: sticky; top: 0; z-index: 1; background: white; padding: 16px 18px; }
.queue-title { margin-bottom: 10px; }
.queue-title .icon-button { width: 32px; height: 32px; }
#queue-count { display: block; font-size: 11px; color: #526b60; margin-top: 12px; }
.incident-list { max-height: none; }
.incident-item { padding: 16px 18px; }
.incident-item strong small { display: block; margin-top: 3px; font-size: 11px; font-weight: 400; color: #526b60; }
.incident-item-bottom { gap: 12px; }
.incident-item-top,.incident-item p,.incident-item-bottom { color: #526b60; }
.pill.alert { background: #fbedE8; color: #934535; }
.pill.progress { background: #faf1dc; color: #795a16; }
.pill.safe { background: #e6f3eb; color: #25684f; }
.command-stage .detail-body { top: 65px; bottom: 86px; right: 82px; width: 360px; padding: 24px; border-radius: 12px; background: white; }
.atlas-close { right: 90px; top: 73px; width: 32px; height: 32px; background: #f5f8f6; }
.atlas-close .icon { width: 17px; height: 17px; }
.detail-heading { padding-right: 22px; }
.detail-heading h2 { font-size: 25px; }
.detail-heading p { font-size: 12px; color: #526b60; margin-top: 7px; }
.incident-snapshot { display: flex; justify-content: space-between; gap: 10px; margin: 14px 0; color: #526b60; font-size: 11px; }
.incident-snapshot > span { display: flex; align-items: center; gap: 5px; }
.incident-snapshot .icon { width: 14px; height: 14px; }
.response-steps { display: flex; gap: 8px; padding: 12px 0; border-block: 1px solid #e4ece8; }
.response-steps > span { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 10px; color: #526b60; }
.response-steps i { width: 17px; height: 17px; border: 1px solid #a1b6a9; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.response-steps .complete i { background: #23796b; border-color: #23796b; color: white; }
.response-steps .icon { width: 12px; height: 12px; stroke-width: 2px; }
.incident-primary { margin: 14px 0; }
.help-user { width: 100%; min-height: 48px; font-size: 15px; gap: 10px; justify-content: center; background: #b04d3d; }
.help-user:hover { background: #943d2f; }
.help-user .help-dot { width: 6px; height: 6px; border-radius: 50%; background: white; animation: help-attention 2s ease-out 3; }
@keyframes help-attention { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.help-user.pulse-paused .help-dot { animation-play-state: paused; }
.incident-primary > small,.location-block > small { display: block; font-size: 10px; color: #526b60; margin-top: 8px; line-height: 1.5; }
.response-owner { display: flex; align-items: center; gap: 12px; color: #23796b; }
.response-owner .icon { width: 23px; height: 23px; }
.response-owner strong { display: block; font-size: 14px; }
.response-owner span { display: block; font-size: 12px; margin-top: 4px; color: #526b60; }
.location-block { padding-top: 12px; border-top: 1px solid #e4ece8; }
.location-block-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.location-block-heading h3 { font-size: 13px; }
.location-block-heading > span { font-size: 9px; white-space: nowrap; }
.location-stale { color: #846219; }
.location-fresh { color: #23796b; }
.location-block > p { font-size: 11px; color: #526b60; margin-top: 8px; }
.location-warning { margin: 12px 0; font-size: 11px; padding: 12px; border-radius: 8px; }
.location-coordinate { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
.location-coordinate button { color: #23796b; font-size: 12px; padding: 8px; }
.directions-button { margin-top: 10px; width: 100%; min-height: 44px; font-size: 12px; justify-content: center; gap: 8px; }
.directions-button .icon { width: 17px; height: 17px; }
.incident-record { border-top: 1px solid #e4ece8; margin-top: 22px; padding-top: 16px; }
.incident-record summary { font-size: 12px; cursor: pointer; }
.incident-record summary span { margin-left: 10px; color: #526b60; font-size: 10px; }
.incident-record .location-facts { margin-top: 18px; padding: 0 0 12px; }
.timeline time { min-width: 57px; font-size: 9px; }
.detail-actions .button { width: 100%; }
.button.secondary { background: #edf5f1; color: #23796b; }
.button.secondary:hover { background: #dfede4; }
.map-tools button,.help-user,.directions-button,.next-alert { transition: background-color 150ms cubic-bezier(0.2,0,0,1),scale 150ms cubic-bezier(0.2,0,0,1); }
.map-tools button:active,.help-user:active,.directions-button:active { scale: .96; }
:focus-visible { outline: 3px solid #23796b; outline-offset: 3px; }
::selection { background: #cfe7db; color: #203e3a; }
input { caret-color: #23796b; }
@media(max-width:1100px) and (min-width:761px) {
  .command-stage .ops-stats { gap: 20px !important; }
  .ops-stats > button { gap: 7px; }
  .ops-stats > a span { display: none; }
}
@media(max-width:760px) {
  body.in-workspace .demo-banner,body.in-workspace:not([data-screen=incidents]) .demo-banner { top: 58px; height: 30px; padding: 0 15px; }
  .demo-banner > span { font-size: 9px; }
  .demo-banner .text-button { font-size: 9px; }
  .ops-shell { padding-top: 30px; }
  .ops-nav { top: auto; }
  .command-stage { height: calc(100svh - 140px); min-height: 620px; }
  body[data-screen=incidents] .ops-header { top: 150px; right: 15px; }
  body[data-screen=incidents] .command-actions .text-button { display: none; }
  body[data-screen=incidents] .ops-header .button { min-height: 34px; font-size: 10px; }
  .atlas-title { left: 15px; top: 65px; width: 255px; }
  .atlas-title h1 { font-size: 25px; }
  .atlas-title p { display: none; }
  .atlas-entry { top: 136px; left: 15px; flex-direction: row; gap: 14px; align-items: center; }
  .atlas-entry .atlas-alert-toggle { min-height: 40px; font-size: 11px; padding: 8px 12px; gap: 14px; }
  .next-alert { font-size: 11px; }
  .command-stage .map-panel::after { background: linear-gradient(180deg,#f5f8f6e6,transparent 26%),linear-gradient(0deg,#f5f8f6,transparent 15%); }
  .map-tools { bottom: 110px; right: 15px; }
  .command-stage .ops-stats { bottom: 0; left: 0; right: 0; padding: 14px 15px 18px; gap: 8px !important; }
  .ops-stats > button { display: block; padding: 0; }
  .ops-stats b { font-size: 23px; display: block; }
  .ops-stats span { font-size: 10px; }
  .ops-stats > a { font-size: 10px; flex-direction: column; gap: 3px; }
  .ops-stats > a span { display: block; }
  .atlas-legend { bottom: 98px; left: 15px; font-size: 9px; gap: 10px; }
  .feed-message { display: none; }
  .leaflet-control-attribution { margin-bottom: 81px !important; font-size: 9px !important; }
  .command-stage .queue { top: 185px; left: 15px; right: 75px; width: auto; bottom: 90px; }
  .queue-tools { padding: 12px 14px; }
  .filters { flex-wrap: wrap; }
  .filters button { font-size: 10px; padding: 7px; }
  .command-stage .detail-body { top: 52px; left: 15px; right: 15px; bottom: 90px; width: auto; padding: 22px; }
  .atlas-close { top: 60px; right: 24px; }
  .command-stage.show-detail .map-tools { visibility: hidden; }
  .command-stage.show-detail .atlas-entry,.command-stage.show-queue .atlas-entry { visibility: hidden; }
  .assignment { flex-wrap: wrap; }
  .assignment label { min-width: 175px; }
}
@media(prefers-reduced-motion:reduce) {
  .help-user .help-dot { animation: none; }
  .map-tools button,.help-user,.directions-button,.next-alert { transition: none; }
  .map-tools button:active,.help-user:active,.directions-button:active { scale: 1; }
}
