:root {
  font-family:Arial,Helvetica,sans-serif;
  color:#172332;
  background:#e7e9eb;
  font-synthesis:none;
  --blue:#2c4978;
  --line:#ccd2d8
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  min-height:100dvh;
  display:flex;
  flex-direction:column
}
button,input,select {
  font:inherit
}
button {
  cursor:pointer;
  touch-action:manipulation
}
button:focus-visible,input:focus-visible,select:focus-visible {
  outline:4px solid #eea813;
  outline-offset:4px
}
button:disabled {
  cursor:not-allowed;
  opacity:.4
}
.topbar {
  height:76px;
  background:var(--blue);
  color:#fff;
  display:flex;
  align-items:center;
  gap:0;
  padding-right:18px
}
.menu {
  height:69px;
  width:100px;
  border:0;
  background:#ffffff05;
  color:white;
  font-size:32px;
  position:relative
}
.notification-dot {
  position:absolute;
  width:11px;
  height:11px;
  background:#eea813;
  border-radius:50%;
  top:18px;
  right:29px
}
.unit-status {
  display:grid;
  place-items:center;
  flex:1;
  min-width:0;
  align-self:stretch;
  border-bottom:7px solid #8d4271
}
.topbar[data-status-tone="clear"] .unit-status { border-bottom-color:#39a852 }
.topbar[data-status-tone="active"] .unit-status { border-bottom-color:#ff9a16 }
.topbar[data-status-tone="unavailable"] .unit-status { border-bottom-color:#6f9ed1 }
.topbar[data-status-tone="signed-off"] .unit-status { border-bottom-color:#d63c3c }
.unit-status strong {
  overflow:hidden;
  padding:0 12px;
  font-size:25px;
  font-weight:600;
  text-align:center;
  text-overflow:ellipsis;
  white-space:nowrap
}
.unit-callsign {
  min-width:120px;
  max-width:220px;
  margin:6px 16px;
  padding:8px 12px;
  overflow:hidden;
  border:4px solid #fff;
  border-radius:4px;
  color:#fff;
  font-size:clamp(22px,3vw,34px);
  font-weight:700;
  line-height:1;
  text-align:center;
  text-overflow:ellipsis;
  white-space:nowrap
}
.indicators {
  display:flex;
  align-items:center;
  gap:20px;
  font-size:25px
}
#connection {
  font-size:12px;
  color:#bde4c0
}
#clock {
  font-variant-numeric:tabular-nums
}
.identity {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 32px;
  font-size:11px;
  letter-spacing:1.8px;
  color:#647080
}
.demo-badge {
  font-size:10px;
  letter-spacing:1px;
  border:1px solid #b5bdc6;
  padding:5px 8px;
  border-radius:3px
}
main {
  width:100%;
  max-width:1400px;
  margin:auto;
  flex:1;
  padding:12px 32px 24px
}
.tiles {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:clamp(12px,2vmin,24px);
  width:100%;
  margin:0
}
.tile {
  background:none;
  border:0;
  display:flex;
  align-items:center;
  flex-direction:column;
  gap:12px;
  padding:8px;
  position:relative;
  color:#172332;
  font-weight:600;
  font-size:19px
}
.circle {
  width:100%;
  aspect-ratio:1;
  border-radius:50%;
  border:4px solid #fff;
  background:linear-gradient(145deg,var(--tile),color-mix(in srgb,var(--tile),#000 14%));
  display:grid;
  place-items:center;
  box-shadow:0 2px 3px #17233212;
  transition:transform .15s
}
.tile:hover:not(:disabled) .circle {
  transform:translateY(-3px)
}
.circle svg {
  width:53%;
  height:53%;
  color:white;
  fill:none;
  stroke:currentColor;
  stroke-width:4;
  stroke-linecap:round;
  stroke-linejoin:round
}
.tile.sign-on .circle {
  border-color:#e9a72e
}
.tile.sign-on:after {
  content:'SIGN ON';
  position:absolute;
  top:16px;
  right:8px;
  background:#f5ac22;
  color:#252c37;
  padding:7px 13px;
  border-radius:3px;
  font-size:11px;
  letter-spacing:1px
}
.home-caption {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  color:#7b8690;
  font-size:12px;
  margin:12px 0 0
}
.page-dot {
  height:8px;
  width:8px;
  border-radius:50%;
  background:#3285bd
}
.page-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 0 22px;
  gap:16px
}
.eyebrow {
  font-size:11px;
  letter-spacing:1.4px;
  color:#647080;
  text-transform:uppercase
}
h1 {
  font-size:28px;
  font-weight:500;
  margin:8px 0
}
h2 {
  font-size:22px;
  font-weight:500;
  margin:0
}
h3 {
  font-size:19px;
  margin:8px 0 15px
}
.panel {
  background:#fff;
  border:1px solid var(--line);
  border-radius:6px;
  padding:26px;
  margin-bottom:18px
}
.grid {
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:22px
}
.field {
  display:flex;
  flex-direction:column;
  gap:9px;
  margin-bottom:20px;
  font-size:14px
}
input,select {
  width:100%;
  padding:15px;
  border:1px solid #a7b1bd;
  border-radius:4px;
  background:white;
  color:#172332
}
button.primary,button.secondary,button.danger,a.primary {
  padding:14px 22px;
  min-height:48px;
  border-radius:4px;
  border:1px solid #bac3cc;
  font-weight:600
}
button.primary,a.primary {
  background:var(--blue);
  color:#fff;
  border-color:var(--blue);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none
}
button.secondary {
  background:#fff;
  color:var(--blue)
}
button.danger {
  color:#9f3030;
  background:#fff;
  border-color:#dbaaaa
}
.actions {
  display:flex;
  gap:12px;
  flex-wrap:wrap
}
.task-status-bar {
  width:100%;
  min-height:62px;
  margin-bottom:18px;
  padding:12px;
  border:1px solid #ffffff70;
  border-radius:4px;
  color:white;
  font-size:18px;
  font-weight:700;
  text-transform:uppercase;
}
.task-status-bar.clear { background:#218739 }
.task-status-bar.unavailable { background:#9454a9 }
.muted {
  color:#626e7b;
  line-height:1.65;
  font-size:14px
}
.label {
  font-size:11px;
  letter-spacing:1px;
  text-transform:uppercase;
  color:#74818b
}
.value {
  font-size:20px;
  margin:8px 0 24px
}
.tag {
  display:inline-block;
  background:#e7edf6;
  color:var(--blue);
  padding:6px 10px;
  border-radius:3px;
  font-size:12px
}
.category {
  background:#fff0d1;
  color:#855800
}
.incident {
  border-left:5px solid #dca323
}
.incident-head {
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center
}
.incident p {
  line-height:1.65
}
.task-screen {
  display:flex;
  flex-direction:column;
}
.task-status-controls {
  display:flex;
  flex:1;
  flex-direction:column;
}
.task-status-controls .unavailable {
  margin-top:auto;
}
.empty {
  padding:65px 24px;
  text-align:center;
  color:#647080
}
.status-buttons {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px
}
.status-buttons button[aria-pressed=true] {
  background:#deecdf;
  border-color:#71a275;
  color:#255730
}
#notice {
  padding:14px 32px;
  background:#fff1cb;
  color:#604800;
  font-size:14px
}
footer {
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
  border-top:1px solid var(--line);
  padding:16px 32px;
  color:#6e7985;
  font-size:11px;
  letter-spacing:.5px
}
footer b {
  color:#2c4978
}
footer button {
  border:0;
  background:none;
  color:#465c76;
  min-height:32px;
  font-size:12px
}
dialog {
  border:1px solid var(--line);
  border-radius:8px;
  padding:26px;
  max-width:540px;
  width:calc(100% - 32px);
  color:#172332
}
dialog::backdrop {
  background:#14243899
}
.dialog-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:20px
}
.dialog-head button {
  border:0;
  background:#eef1f4;
  width:40px;
  height:40px;
  border-radius:4px
}
dialog.incident-alert {
  max-width:480px;
  padding:0;
  overflow:hidden;
  border:2px solid #102c5c;
  border-radius:8px;
  background:#dfe6e0;
  box-shadow:0 18px 70px #0009
}
dialog.incident-alert::backdrop {
  background:#db1730a6;
  animation:incident-emergency-flash 1s steps(1,end) infinite
}
dialog.incident-alert .dialog-head {
  justify-content:center;
  margin:0;
  padding:16px 20px;
  background:#171d21;
  color:#fff;
  text-align:center
}
dialog.incident-alert .dialog-head h2 {
  font-size:25px
}
dialog.incident-alert #dialog-content {
  padding:18px 8px 8px
}
.new-incident-alert {
  display:grid;
  gap:20px;
  text-align:center
}
.incident-alert-field {
  display:grid;
  gap:4px;
  font-size:18px
}
.incident-alert-field strong {
  font-size:27px;
  line-height:1.1;
  color:#101820
}
.incident-alert-patient {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.incident-audio-warning {
  display:grid;
  gap:6px;
  margin:0 10px;
  padding:12px;
  border:1px solid #a86d00;
  border-radius:5px;
  background:#fff1c9;
  color:#5f4300;
  font-size:13px
}
.incident-audio-warning button {
  min-height:42px;
  border:1px solid #7c5b12;
  border-radius:4px;
  background:#fff;
  color:#4f3900;
  font-weight:700
}
#acknowledge-new-incident {
  width:100%;
  min-height:54px;
  border:2px solid #d8e6ff;
  border-radius:5px;
  background:linear-gradient(#2858a4,#183f83);
  color:#fff;
  font-size:18px;
  font-weight:700;
  letter-spacing:.5px;
  text-transform:uppercase;
  box-shadow:0 0 0 2px #17376b
}
dialog.incident-alert.stand-down-alert::backdrop {
  background:#111a;
  animation:none
}
.stand-down-notification {
  display:grid;
  gap:28px;
  min-width:min(360px,80vw);
  padding:28px 8px 8px;
  text-align:center
}
.stand-down-notification strong {
  color:#101820;
  font-size:34px;
  line-height:1.1
}
#acknowledge-stand-down {
  width:100%;
  min-height:54px;
  border:2px solid #d8e6ff;
  border-radius:5px;
  background:linear-gradient(#2858a4,#183f83);
  color:#fff;
  font-size:18px;
  font-weight:700;
  letter-spacing:.5px;
  text-transform:uppercase;
  box-shadow:0 0 0 2px #17376b
}
@keyframes incident-emergency-flash {
  0%,49% { background:#db1730a6 }
  50%,100% { background:#1261c8a6 }
}
.loading {
  text-align:center;
  margin:80px 0
}
.terminal-id {
  font-family:monospace;
  font-size:12px;
  color:#6e7985
}
@media(min-width:1450px) {
  main {
  padding-top:30px;
  padding-bottom:40px
}

}
@media(max-width:800px) {
  .topbar {
  padding-right:10px
}
.menu {
  width:64px
}
.notification-dot {
  right:14px
}
.unit-status {
  min-width:80px
}
.unit-status strong {
  font-size:21px
}
.unit-callsign {
  min-width:82px;
  max-width:130px;
  margin:7px 10px;
  padding:8px;
  border-width:3px;
  font-size:22px
}
.indicators {
  gap:10px
}
#connection {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}
.identity {
  padding:16px
}
.tiles {
  gap:16px 12px
}
.tile {
  font-size:15px;
  padding:2px
}
.circle {
  border-width:3px
}
.tile.sign-on:after {
  top:4px;
  right:0;
  font-size:9px;
  padding:5px
}
.grid {
  grid-template-columns:1fr
}
main {
  padding:12px 16px 24px
}
.panel {
  padding:20px
}
.footer-detail {
  display:none
}
footer {
  padding:12px 16px
}

}
@media(max-width:560px) {
  .tiles {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px
}
.identity>span:first-child {
  font-size:9px;
  letter-spacing:.6px
}
.page-title {
  align-items:flex-start
}
h1 {
  font-size:24px
}
.demo-badge {
  font-size:8px
}
.unit-status strong {
  font-size:16px
}
.unit-callsign {
  min-width:64px;
  max-width:88px;
  margin:8px 6px;
  padding:7px 5px;
  font-size:17px
}
.indicators {
  gap:6px;
  font-size:18px
}
#clock {
  font-size:16px
}
footer {
  align-items:flex-start
}
.tile {
  font-size:17px
}
#connection {
  font-size:10px
}
.status-buttons {
  grid-template-columns:1fr
}

}
@media(prefers-reduced-motion:reduce) {
  * {
  transition:none!important
}
dialog.incident-alert::backdrop {
  animation:none;
  background:#142438cc
}

}

:root .blue {
  --tile:#2877bc
}
:root .purple {
  --tile:#9454a9
}
:root .green {
  --tile:#76a768
}
:root .gold {
  --tile:#d3a124
}
.section-gap {
  margin-top:24px
}

/* Mobilisation terminal: persistent tabs/actions, with the content pane
   scrolling independently on smaller screens. */
body:has(main.incident-screen) {
  height:100dvh;
}
body:has(main.incident-screen) > :not(main) {
  flex-shrink:0;
}
body:has(main.incident-screen) .identity {
  display:none;
}
body:has(main.incident-screen) footer {
  padding:2px 16px;
}
main.incident-screen {
  display:flex;
  flex-direction:column;
  max-width:none;
  min-height:360px;
  margin:0;
  padding:0;
  overflow:hidden;
}
.incident-summary {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:10px 20px;
  flex-shrink:0;
  background:#dce2e9;
  font-size:13px;
}
.incident-summary > div {
  display:flex;
  align-items:center;
  gap:16px;
}
.incident-priority {
  color:#952a29;
  font-weight:700;
}
.incident-source {
  color:#546171;
  font-size:11px;
}
.incident-picker {
  display:flex;
  align-items:center;
  gap:12px;
}
.incident-picker select {
  width:auto;
  max-width:300px;
  padding:8px;
}
.incident-tabs {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  background:#243c67;
  flex-shrink:0;
  border-bottom:3px solid #fff;
}
.incident-tabs button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:14px 8px;
  min-height:64px;
  border:0;
  border-right:1px solid #ffffff35;
  background:transparent;
  color:white;
  font-size:16px;
}
.incident-tabs button[aria-selected=true] {
  background:#1675b7;
  box-shadow:inset 0 -4px #91d0f4;
}
.incident-tabs svg,.incident-map svg {
  width:28px;
  height:28px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0;
}
.incident-content {
  flex:1;
  min-height:0;
  overflow:auto;
  padding:18px;
}
.incident-location-layout {
  display:grid;
  grid-template-columns:minmax(260px,1fr) minmax(0,2fr);
  gap:18px;
  height:100%;
  min-height:280px;
}
.incident-detail-layout {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:18px;
}
.incident-section {
  border:1px solid #919eaa;
  background:#fafbf9;
  border-radius:3px;
  overflow:hidden;
  margin-bottom:18px;
}
.incident-section h2 {
  background:#293e70;
  color:#fff;
  padding:12px 18px;
  font-size:18px;
  font-weight:500;
}
.incident-section-body {
  padding:20px;
  font-size:18px;
  line-height:1.5;
  overflow-wrap:anywhere;
}
.incident-section-body p {
  margin:0;
}
.incident-section dl {
  margin:0;
}
.incident-field {
  margin:0 0 20px;
}
.incident-field:last-child {
  margin-bottom:0;
}
.incident-field dt {
  color:#56606a;
  font-size:14px;
  font-style:italic;
}
.incident-field dd {
  margin:3px 0 0;
  font-weight:600;
}
.patient-fields {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px 24px;
}
.incident-warnings {
  margin:0;
  padding-left:20px;
}
.incident-warnings li::marker {
  color:#b23430;
}
.incident-narrative {
  white-space:pre-wrap;
}
.incident-map {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:28px;
  gap:14px;
  text-align:center;
  background:#d9e1df;
  border:1px solid #a5b2af;
  border-radius:3px;
  min-height:260px;
}
.incident-map svg {
  width:56px;
  height:56px;
  color:#b94636;
}
.incident-map strong {
  font-size:21px;
}
.incident-map p {
  margin:0;
  font-weight:600;
}
.incident-map span {
  color:#566662;
  max-width:420px;
  line-height:1.5;
}
.incident-action-bar {
  display:grid;
  grid-template-columns:3fr 1fr;
  gap:16px;
  padding:12px 18px;
  padding-bottom:max(12px,env(safe-area-inset-bottom));
  flex-shrink:0;
  border-top:1px solid #bec6ce;
  background:#e7e9eb;
}
.incident-action-bar.single {
  grid-template-columns:1fr;
}
.incident-action-bar.cad-status-actions {
  grid-template-columns:4fr 1fr;
}
.incident-action-bar button {
  min-height:62px;
  padding:12px;
  text-transform:uppercase;
  font-size:18px;
  font-weight:700;
  border:1px solid #ffffff70;
  border-radius:4px;
}
.incident-primary {
  color:#231c0c;
  background:#ff9a16;
}
.incident-primary.clear {
  color:white;
  background:#218739;
}
.incident-quick-clear {
  color:white;
  background:#218739;
}
.incident-other {
  color:white;
  background:#087aba;
}
.live-readonly-note {
  align-self:center;
  padding:0 12px;
  color:#425673;
  font-size:15px;
}
@media(max-width:700px) {
  .incident-tabs button {
    flex-direction:column;
    gap:6px;
    padding:10px 2px;
    font-size:10px;
  }
  .incident-tabs svg {
    width:24px;
    height:24px;
  }
  .incident-summary {
    flex-wrap:wrap;
    padding:8px 12px;
    gap:6px;
    font-size:11px;
  }
  .incident-summary > div {
    gap:10px;
  }
  .incident-content {
    padding:10px;
  }
  .incident-location-layout,.incident-detail-layout {
    grid-template-columns:1fr;
    height:auto;
    gap:10px;
  }
  .incident-location-layout .incident-section {
    margin-bottom:0;
  }
  .patient-fields {
    grid-template-columns:1fr;
    gap:0;
  }
  .incident-section h2 {
    font-size:16px;
    padding:10px 12px;
  }
  .incident-section-body {
    font-size:16px;
    padding:14px;
  }
  .incident-field {
    margin-bottom:14px;
  }
  .incident-action-bar {
    gap:10px;
    padding:10px;
    padding-bottom:max(10px,env(safe-area-inset-bottom));
  }
  .incident-action-bar button {
    min-height:54px;
    font-size:14px;
  }
}

/* Size each circle against both dimensions of its grid cell, leaving room
   for the label. The home screen uses the space between the header/footer. */
body:has(main.home) {
  height:100dvh;
  background:radial-gradient(ellipse at 50% 42%,#bfc1c3 0,#a4a7aa 48%,#85898d 100%);
}
body:has(main.home) > :not(main) {
  flex-shrink:0;
}
body:has(main.home) .identity {
  display:none;
}
body:has(main.home) footer {
  display:none;
}
main.home {
  max-width:none;
  min-height:400px;
  display:flex;
  flex-direction:column;
  margin:0;
  padding:clamp(18px,3.2vmin,38px) clamp(20px,3.5vw,58px) 8px;
  background:linear-gradient(120deg,#ffffff0d,#22293015 70%,#0d141b22);
}
.home .tiles {
  flex:1;
  gap:clamp(6px,1.6vmin,18px) clamp(18px,3vw,52px);
  grid-template-rows:repeat(2,minmax(0,1fr));
}
.home .tile {
  container-type:size;
  min-width:0;
  min-height:0;
  justify-content:center;
  gap:6px;
  padding:0;
  color:#fff;
  font-size:clamp(15px,2.2vmin,22px);
  font-weight:700;
  line-height:1.25;
  text-shadow:0 2px 3px #20262daa;
}
.home .circle {
  width:min(100cqw,calc(100cqh - 1.25em - 6px),19.5vw,320px);
  flex-shrink:0;
  border-color:#f4f5f5;
  border-width:3px;
  box-shadow:0 3px 7px #1b222a52,inset 0 1px 2px #ffffff52;
}
.home .circle .nma-glyph {
  width:56%;
  height:56%;
  object-fit:contain;
  pointer-events:none;
  user-select:none;
}
.home .tile.sign-on .circle {
  border-color:#ef3a56;
}
.home .tile[data-page="crew"]:not(.sign-on) .circle {
  border-color:#45c65a;
}
.home .tile.sign-on:after {
  display:none;
}
.home .tile:disabled {
  opacity:.72;
  filter:saturate(.78);
}
.home .home-caption {
  display:flex;
  min-height:16px;
  margin:2px 0 0;
  color:inherit;
}
.home .page-dot {
  width:8px;
  height:8px;
  box-shadow:0 1px 2px #20262d80;
}
.home .page-dot.secondary {
  background:#f1f2f2;
}
/* Portrait tablets and phones use four rows; short windows scroll rather
   than shrinking the controls below a comfortable touch size. */
@media (max-width:560px), (orientation:portrait) and (max-width:1100px) {
  main.home {
    min-height:min-content;
    padding:18px 18px 10px;
  }
  .home .tiles {
    flex:none;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:repeat(4,auto);
    gap:16px;
  }
  .home .tile {
    container-type:inline-size;
  }
  .home .circle {
    width:min(100%,320px);
  }
}
