:root {
  color-scheme: light;
  --bg: #f5f7f3;
  --rail: #ffffff;
  --panel: #ffffff;
  --line: #d6ddd4;
  --text: #20291f;
  --muted: #54614f;
  --sub: #5c6959;
  --lime: #426c32;
  --green: #397137;
  --amber: #8f5a0e;
  --gray: #67716b;
  --red: #a12e27;
  --mono: "IBM Plex Mono", monospace;
  --sans: Barlow, Arial, sans-serif;
  --rail-w: 212px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.43 var(--sans);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
a {
  color: inherit;
}
a {
  text-decoration: none;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.53;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
button:hover:not(:disabled),
a:hover {
  filter: brightness(1.13);
}
button svg,
i svg {
  display: block;
}
i {
  font-style: normal;
}
.skip {
  position: fixed;
  left: 5px;
  top: -50px;
  background: var(--lime);
  color: #ffffff;
  padding: 8px;
  z-index: 200;
}
.skip:focus {
  top: 5px;
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  background: var(--rail);
  border-right: 1px solid var(--line);
  z-index: 20;
}
.brand {
  display: flex;
  height: 86px;
  align-items: center;
  padding: 0 21px;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.brand img {
  width: 35px;
}
.brand strong {
  font:
    800 27px/0.95 "Barlow Condensed",
    sans-serif;
  letter-spacing: 1.1px;
}
.brand small {
  display: block;
  font: 500 8px/1 var(--mono);
  letter-spacing: 1.05px;
  margin-top: 6px;
  color: #52684c;
}
.nav-group {
  padding: 26px 13px 0;
}
.nav-group + .nav-group {
  padding-top: 30px;
}
.nav-group p,
.micro {
  color: var(--sub);
  font: 500 10px/1.4 var(--mono);
  letter-spacing: 1.35px;
  margin: 0;
}
.nav-group p {
  margin: 0 12px 10px;
}
.nav-group nav {
  display: grid;
  gap: 4px;
}
.nav-group a,
.nav-group button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #4b5948;
  font-weight: 500;
  font-size: 14px;
  text-align: left;
  line-height: 1.3;
}
.nav-group a.active {
  background: #e7efdf;
  border-color: #c5d4b9;
  color: var(--lime);
}
.nav-group a:not(.active):hover,
.nav-group button:hover {
  background: #f0f4ec;
  color: #273525;
}
.nav-group b {
  margin-left: auto;
  font: 10px var(--mono);
  background: #f0f3ed;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.nav-group .external {
  margin-left: auto;
  opacity: 0.5;
}
.external svg {
  width: 13px;
  height: 13px;
}
.rail-end {
  margin-top: auto;
}
.workspace,
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px;
  padding: 16px 8px;
}
.workspace {
  border-top: 1px solid var(--line);
}
.box-icon,
.avatar {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid #cad6c6;
  border-radius: 4px;
  color: #4c6246;
  background: #f1f5ec;
}
.workspace small,
.workspace b,
.identity b,
.identity small {
  display: block;
  text-align: left;
}
.workspace small {
  font: 9px var(--mono);
  letter-spacing: 1px;
  color: var(--sub);
}
.workspace b,
.identity b {
  font-size: 14px;
  font-weight: 600;
}
.identity {
  width: calc(100% - 24px);
  border-top: 1px solid var(--line);
  padding-bottom: 22px;
}
.identity small {
  font-size: 12px;
  color: var(--muted);
}
.identity > i {
  margin-left: auto;
  color: var(--sub);
}
.avatar {
  border-radius: 50%;
  background: #eaf1e3;
  color: var(--lime);
}
.shell {
  margin-left: var(--rail-w);
}
.bar {
  background: #fff;
  height: 59px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  gap: 12px;
}
.crumb,
.bar-right,
.feed-status,
.clock {
  display: flex;
  align-items: center;
  gap: 10px;
}
.crumb {
  font-size: 13px;
  color: var(--muted);
}
.crumb i {
  color: #61765b;
}
.crumb b {
  font-weight: 400;
  color: #97a391;
}
.crumb strong {
  font-weight: 500;
  color: #2c3e28;
}
.bar-right {
  gap: 19px;
}
.feed-status,
.clock,
.tiny {
  font: 10px var(--mono);
  letter-spacing: 0.6px;
}
.feed-status {
  border: 1px solid #c4d5bc;
  color: #38562e;
  padding: 5px 8px;
  border-radius: 3px;
  gap: 7px;
}
.feed-status svg {
  width: 11px;
  height: 11px;
}
.clock {
  color: var(--muted);
  gap: 7px;
}
.clock svg {
  width: 13px;
  height: 13px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: currentColor;
  flex-shrink: 0;
}
.feed-status .dot,
.live-text {
  color: var(--green);
}
.mobile-toggle {
  display: none !important;
}
main {
  max-width: 1800px;
  margin: auto;
  padding: 25px 28px 36px;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.heading h1 {
  font: 600 clamp(29px, 2.6vw, 42px) / 1.08 var(--sans);
  letter-spacing: -1.1px;
  margin: 0 0 4px;
}
.heading p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}
.primary,
.secondary,
.outline,
.icon,
.map-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 4px;
  font-weight: 600;
}
.primary {
  background: var(--lime);
  color: #ffffff;
  border: 1px solid #3b622d;
  padding: 9px 16px;
  box-shadow: inset 0 1px #d3edc533;
}
.secondary,
.outline,
.icon,
.map-tool {
  color: #374733;
  background: #f7f9f5;
  border: 1px solid #cfd8cb;
  padding: 7px 11px;
  font-size: 13px;
}
.outline {
  background: transparent;
}
.icon {
  padding: 6px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: linear-gradient(110deg, #ffffff, #fcfdfb);
  padding: 13px 16px;
  position: relative;
  overflow: hidden;
}
.stat-top,
.stat-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.stat-top span {
  color: #53614f;
  font: 500 10px var(--mono);
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
.stat-top svg {
  width: 15px;
  height: 15px;
  color: #657660;
}
.stat strong {
  font: 600 34px/1.05 var(--sans);
  letter-spacing: -0.9px;
  display: block;
  margin-top: 4px;
}
.stat:nth-child(2) strong,
.stat:nth-child(2) svg {
  color: var(--green);
}
.stat:nth-child(3) strong,
.stat:nth-child(3) svg {
  color: var(--amber);
}
.stat-bottom {
  align-items: baseline;
}
.stat small {
  color: var(--muted);
  font-size: 12px;
}
.operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(252px, 27%);
  gap: 15px;
  align-items: stretch;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  overflow: hidden;
}
.panel-head {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  gap: 10px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.section-title > svg {
  color: var(--lime);
  width: 17px;
  height: 17px;
}
.section-title h2 {
  font: 600 18px/1.2 var(--sans);
  margin: 0;
  letter-spacing: -0.25px;
}
.head-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}
.head-tools .icon,
.head-tools .map-tool {
  height: 26px;
  font-size: 11px;
  padding: 3px 7px;
  color: #485b42;
}
.map-tool svg {
  width: 13px;
  height: 13px;
}
.head-tools .icon svg {
  width: 13px;
  height: 13px;
}
.map-panel {
  display: flex;
  flex-direction: column;
}
.map {
  isolation: isolate;
  position: relative;
  min-height: 302px;
  flex: 1;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: #dce5d9;
}
.map canvas,
.markers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map canvas {
  z-index: -1;
}
.map-hud,
.map-north,
.map-zoom,
.map-sector {
  position: absolute;
  z-index: 2;
  color: #32462b;
}
.map-hud {
  top: 13px;
  left: 14px;
  font: 500 9px var(--mono);
  letter-spacing: 1.3px;
  background: #f8fbf0e8;
  padding: 4px 7px;
  border-left: 2px solid var(--lime);
}
.map-north {
  text-shadow: 0 1px 2px white;
  right: 15px;
  top: 12px;
  display: grid;
  justify-items: center;
  gap: 1px;
  font: 9px var(--mono);
}
.map-north:after {
  content: "";
  width: 0;
  height: 0;
  border: 4px solid transparent;
  border-bottom: 10px solid #32412f;
  transform: translateY(-3px);
}
.map-sector {
  bottom: 11px;
  left: 14px;
  font: 9px var(--mono);
  letter-spacing: 1px;
  padding: 1px 4px;
  background: #f8fbf0d9;
}
.map-zoom {
  right: 12px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.map-zoom button {
  width: 25px;
  height: 23px;
  display: grid;
  place-items: center;
  color: #32442d;
  background: #f9fcf3f2;
  border: 1px solid #9cab97;
  border-radius: 2px;
}
.map-zoom svg {
  width: 13px;
  height: 13px;
}
.marker {
  --unit: var(--green);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: absolute;
  transform: translate(-50%, -42%);
  padding: 2px 3px;
  z-index: 1;
  color: var(--unit);
  text-shadow: 0 1px 2px #0000;
}
.marker.idle {
  --unit: var(--amber);
}
.marker.offline,
.marker.unknown {
  --unit: #53615c;
}
.marker.selected {
  z-index: 2;
}
.symbol {
  position: relative;
  display: grid;
  place-items: center;
  background: #f5faed;
  box-shadow:
    0 0 0 3px #2b402321,
    0 4px 8px #20361b38;
  width: 30px;
  height: 30px;
  border: 1.5px solid currentColor;
  border-radius: 5px;
  transform: rotate(45deg);
}
.symbol svg {
  transform: rotate(-45deg);
  width: 17px;
  height: 17px;
}
.marker.selected .symbol {
  background: #dcefc9;
  outline: 1px solid currentColor;
  outline-offset: 4px;
  box-shadow: 0 0 14px 5px #44613438;
}
.marker span:last-child {
  margin-top: 5px;
  background: #f7fbf4ed;
  border: 1px solid #819674;
  border-radius: 2px;
  padding: 2px 5px;
  font: 500 9px/1.25 var(--mono);
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.4px;
}
.marker.selected span:last-child {
  background: #38612d;
  color: #ffffff;
  border-color: #335529;
  text-shadow: none;
}
.map-legend {
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font: 10px var(--mono);
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.map-legend .legend-end {
  margin-left: auto;
  font-size: 9px;
  color: #65755e;
}
.working {
  --status: var(--green);
}
.idle {
  --status: var(--amber);
}
.unknown,
.offline {
  --status: #626e66;
}
.map-legend .dot,
.status .dot {
  color: var(--status);
}
.inspector {
  display: flex;
  flex-direction: column;
}
.inspector > .panel-head {
  border-bottom: 1px solid var(--line);
}
.inspector .meta-mark {
  color: var(--sub);
  font: 9px var(--mono);
  letter-spacing: 1px;
}
.intel-body {
  padding: 15px;
  display: flex;
  flex: 1;
  flex-direction: column;
}
.unit-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.unit-emblem {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #ecf3e5;
  border: 1px solid #c5d6b9;
  color: var(--lime);
  border-radius: 4px;
}
.unit-heading h3 {
  font:
    700 24px/1.02 "Barlow Condensed",
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 4px;
}
.unit-heading small {
  font-size: 12px;
  color: var(--muted);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--status);
  font: 500 10px/1.45 var(--mono);
  text-transform: capitalize;
  white-space: nowrap;
}
.chip {
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--status) 28%, transparent);
  background: color-mix(in srgb, var(--status) 7%, transparent);
}
.mission {
  margin: 13px 0 10px;
  background: #f0f5eb;
  border-left: 2px solid #7b9c61;
  padding: 8px 10px;
}
.mission .micro {
  font-size: 8px;
  color: #52674a;
}
.mission p {
  font-size: 14px;
  color: #273723;
  margin: 3px 0 0;
  line-height: 1.3;
}
.intel-body dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 8px;
  font-size: 12px;
  margin: 0 0 12px;
}
.intel-body dt {
  color: var(--muted);
}
.intel-body dd {
  margin: 0;
  text-align: right;
  color: #2e3c29;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.intel-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: auto;
}
.intel-actions .secondary {
  width: 100%;
  font-size: 12px;
  padding: 6px;
}
.intel-actions .secondary svg {
  margin-left: auto;
  width: 13px;
}
.intel-actions .secondary {
  justify-content: flex-start;
}
.roster-panel {
  margin-top: 17px;
}
.roster-panel > .panel-head {
  border-bottom: 1px solid var(--line);
  min-height: 52px;
}
.count-pill {
  color: #465d40;
  border: 1px solid #c9d4c3;
  border-radius: 4px;
  padding: 0 5px;
  font: 10px/17px var(--mono);
}
select,
input,
textarea {
  color: var(--text);
  background: #fcfdfa;
  border: 1px solid #c7d2c2;
  border-radius: 4px;
}
select {
  padding: 4px 7px;
  font: 12px var(--sans);
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  background: #f3f6f0;
  font: 500 9px/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.85px;
  color: var(--muted);
  padding: 10px 13px;
  white-space: nowrap;
}
td {
  padding: 10px 13px;
  border-top: 1px solid #e0e6dd;
  font-size: 13px;
}
.roster-table tr[data-id] {
  cursor: pointer;
}
.roster-table tr[data-id]:hover {
  background: #f4f8ee;
}
.roster-table tr.selected {
  background: #f0f5e9;
}
.agent-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.device-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #f2f5ef;
  border: 1px solid #cdd8c9;
  color: #596f52;
  border-radius: 4px;
}
.device-icon svg {
  width: 16px;
}
.agent-cell b {
  font-weight: 600;
}
.agent-cell small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.cell-mission {
  max-width: 23vw;
  color: #455540;
}
.provider-chip {
  display: inline-block;
  border: 1px solid #d0d9cb;
  padding: 2px 6px;
  border-radius: 3px;
  color: #4b5b45;
  font-size: 11px;
  white-space: nowrap;
}
.number-cell {
  font: 11px var(--mono);
  color: #364431;
  text-align: right;
}
.row-open {
  padding: 4px;
  color: var(--muted);
}
.row-open svg {
  width: 13px;
}
.table-note {
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  font: 10px var(--mono);
  color: var(--sub);
}
.empty {
  padding: 28px 20px;
  color: var(--muted);
  text-align: center;
}
.empty p {
  margin: 6px 0;
}
.map-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 18px;
  border: 1px solid #9caf94;
  background: #fcfff7ed;
  white-space: nowrap;
  font-size: 13px;
}
.banner {
  border: 1px solid #d2b676;
  background: #fcf5e7;
  color: #795718;
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.log {
  padding: 0 15px;
}
.log-entry {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.log-entry > svg {
  color: var(--lime);
  width: 16px;
}
.log-entry b {
  font-weight: 600;
}
.log-entry small {
  display: block;
  color: var(--muted);
}
.log-entry time {
  color: var(--muted);
  font: 11px var(--mono);
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--sub);
}
.searchbox input {
  padding: 5px 8px;
  font-size: 12px;
  width: 145px;
}
dialog {
  background: #ffffff;
  color: var(--text);
  border: 1px solid #b9c7b2;
  border-radius: 7px;
  padding: 0;
  width: min(520px, 94vw);
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 24px 80px #10200e44;
}
dialog::backdrop {
  background: #1b291b70;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 21px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font: 600 22px var(--sans);
  margin: 0;
}
.dialog-content {
  padding: 18px 21px 22px;
}
.dialog-content p {
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.45;
}
.dialog-content h3 {
  font-size: 15px;
  margin: 18px 0 8px;
}
.dialog-content label {
  display: grid;
  gap: 5px;
  color: #46543f;
  font-weight: 500;
  font-size: 13px;
  margin: 0 0 12px;
}
.dialog-content input,
.dialog-content select,
.dialog-content textarea {
  width: 100%;
  padding: 8px 10px;
  font: 14px var(--sans);
}
.dialog-content textarea {
  resize: vertical;
}
.dialog-content input[type="checkbox"] {
  width: auto;
  align-self: center;
}
.dialog-content .checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dialog-content .button-row {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}
.dialog-content .error {
  color: var(--red);
  margin-top: 8px;
}
.dialog-content .hint {
  font-size: 12px;
  color: #60705b;
}
.dialog-content .choice {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f4f8f1;
  margin-top: 8px;
}
.choice > svg {
  color: var(--lime);
}
.choice b,
.choice small {
  display: block;
}
.choice small {
  font-size: 12px;
  color: var(--muted);
}
.choice .current {
  margin-left: auto;
}
.danger {
  color: var(--red);
}
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: none;
  padding: 9px 15px;
  background: #eaf4e0;
  color: #284a20;
  border: 1px solid #92a985;
  border-radius: 4px;
  box-shadow: 0 4px 18px #14271122;
}
.toast.show {
  display: block;
}
.history-bars {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  align-items: end;
  height: 55px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.history-bars span {
  background: #698f52;
  min-height: 2px;
}
.history-bars span.missing {
  background: #d3dccd;
}
.history-axis {
  display: flex;
  justify-content: space-between;
  font: 9px var(--mono);
  color: var(--sub);
  margin-top: 3px;
}
.history-list {
  max-height: 160px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.history-list li {
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}
.history-list time {
  color: var(--muted);
  margin-right: 5px;
}
.dialog-content .intel-body {
  padding: 0;
}
.dialog-content .mission p {
  margin: 3px 0 0;
  color: var(--text);
}
.dialog-content .micro {
  color: var(--muted);
}
.dialog-content .admin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}
.dialog-content code {
  overflow-wrap: anywhere;
}
.full-map .map-panel {
  position: fixed;
  inset: 16px;
  z-index: 30;
  box-shadow: 0 0 0 30px #f0f4ec;
}
.full-map .map {
  min-height: 0;
}
.net-bad .dot {
  color: var(--amber);
}
@media (min-width: 1640px) {
  .map {
    min-height: 365px;
  }
  .bar {
    padding-inline: 40px;
  }
  main {
    padding-inline: 40px;
  }
  .stat {
    padding: 17px 19px;
  }
  .intel-body {
    padding: 20px;
  }
  .intel-body dl {
    gap: 8px;
  }
}
@media (max-width: 1190px) {
  :root {
    --rail-w: 175px;
  }
  .brand {
    padding: 0 12px;
    gap: 7px;
  }
  .brand strong {
    font-size: 25px;
  }
  .brand small {
    font-size: 7px;
  }
  .bar {
    padding-inline: 20px;
  }
  main {
    padding: 20px 17px;
  }
  .operations-grid {
    grid-template-columns: minmax(0, 1fr) 241px;
    gap: 10px;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 12px;
  }
  .nav-group {
    padding-inline: 7px;
  }
  .map {
    min-height: 306px;
  }
  td,
  th {
    padding-inline: 9px;
  }
}
@media (max-width: 920px) {
  :root {
    --rail-w: 60px;
  }
  .brand {
    height: 64px;
    justify-content: center;
    padding: 0;
  }
  .brand span,
  .nav-group p,
  .nav-group nav > a > b,
  .nav-group .external,
  .workspace,
  .identity > span:not(.avatar),
  .identity > i {
    display: none;
  }
  .nav-group a,
  .nav-group button {
    font-size: 0;
    gap: 0;
    justify-content: center;
    padding: 11px;
  }
  .nav-group {
    padding-top: 16px;
  }
  .nav-group + .nav-group {
    border-top: 1px solid var(--line);
    margin-top: 15px;
    padding-top: 15px;
  }
  .identity {
    margin: 0;
    width: 100%;
    justify-content: center;
    padding: 15px 0;
  }
  .operations-grid {
    grid-template-columns: minmax(0, 1fr) 220px;
  }
  .intel-body {
    padding: 12px;
  }
  .marker span:last-child {
    font-size: 8px;
  }
  .clock {
    font-size: 9px;
  }
}
@media (max-width: 720px) {
  :root {
    --rail-w: 0px;
  }
  .mobile-toggle {
    display: inline-flex !important;
  }
  .rail {
    transform: translateX(-105%);
    width: 208px;
    transition: transform 0.15s;
    box-shadow: 8px 0 35px #16221226;
  }
  .rail.open {
    transform: translateX(0);
  }
  .rail.open .brand span,
  .rail.open .nav-group p,
  .rail.open .identity > span:not(.avatar) {
    display: block;
  }
  .rail.open .nav-group a,
  .rail.open .nav-group button {
    font-size: 14px;
    justify-content: flex-start;
    gap: 10px;
  }
  .rail.open .workspace {
    display: flex;
  }
  .brand {
    justify-content: flex-start;
    padding: 0 20px;
  }
  .bar {
    padding: 0 12px;
    height: 48px;
    justify-content: flex-start;
    gap: 9px;
  }
  .bar-right {
    margin-left: auto;
    gap: 6px;
  }
  .crumb {
    font-size: 12px;
    gap: 6px;
  }
  .crumb > i,
  .clock {
    display: none;
  }
  main {
    padding: 18px 12px 28px;
  }
  .heading {
    margin-bottom: 14px;
  }
  .heading h1 {
    font-size: 30px;
  }
  .heading p {
    font-size: 12px;
  }
  .primary {
    padding: 8px 10px;
    white-space: nowrap;
    font-size: 13px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
    margin-bottom: 10px;
  }
  .stat {
    padding: 9px 11px;
  }
  .stat strong {
    font-size: 28px;
  }
  .stat-top span {
    font-size: 9px;
  }
  .stat small {
    font-size: 11px;
  }
  .operations-grid {
    grid-template-columns: 1fr;
  }
  .map {
    height: 280px;
    min-height: 280px;
  }
  .panel-head {
    min-height: 42px;
    padding: 8px 11px;
  }
  .inspector .intel-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .inspector .mission,
  .inspector dl {
    margin: 0;
  }
  .inspector .intel-actions {
    align-self: end;
  }
  .roster-panel {
    margin-top: 10px;
  }
  .map-legend {
    font-size: 9px;
    padding: 8px 10px;
  }
  .section-title h2 {
    font-size: 17px;
  }
  .cell-mission {
    max-width: unset;
  }
  .searchbox input {
    width: 100px;
  }
  .table-wrap .roster-table {
    min-width: 750px;
  }
  .log-entry time {
    font-size: 9px;
  }
  .map-hud {
    font-size: 8px;
  }
  .heading .primary svg {
    width: 15px;
  }
  .full-map .map-panel {
    inset: 3px;
  }
  .full-map .map {
    height: auto;
  }
  .symbol {
    width: 24px;
    height: 24px;
  }
  .symbol svg {
    width: 14px;
  }
  .marker span:last-child {
    font-size: 7px;
  }
  .map-legend .legend-end {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.marker.working .symbol:before {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid var(--green);
  border-radius: 5px;
  opacity: 0;
  animation: transmit 4.5s ease-out infinite;
}
.marker.working:nth-child(2n) .symbol:before {
  animation-delay: 1.5s;
}
@keyframes transmit {
  0%,
  55% {
    opacity: 0;
    transform: scale(1);
  }
  60% {
    opacity: 0.55;
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}
.intel-actions .dispatch-quick {
  background: #ecf4e6;
  border-color: #b6cda8;
  color: var(--lime);
}
.dialog-content .history-summary {
  color: var(--text);
  font-size: 14px;
}
.intel-body dd {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .inspector .intel-body dl,
  .inspector .intel-actions {
    grid-column: 1/-1;
  }
  .inspector .intel-body dl {
    padding-top: 5px;
  }
  .inspector .intel-actions {
    margin: 0;
  }
  .inspector .unit-heading h3 {
    font-size: 21px;
  }
  .head-tools:has(.searchbox) {
    flex-wrap: wrap;
    justify-content: end;
  }
  .heading h1 {
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .marker.working .symbol:before {
    animation: none;
  }
}

/* The gate backdrop is drawn from a local empty layout. */
body.auth-pending :is(.rail, .shell, .skip) {
  visibility: hidden;
}
body.access-locked {
  overflow: hidden;
}
#access-gate {
  width: min(420px, calc(100vw - 32px));
  border-radius: 10px;
  border-color: #bfccbc;
  box-shadow: 0 22px 74px #15261c36;
}
#access-gate::backdrop {
  background: rgb(95 104 101 / 38%);
  backdrop-filter: grayscale(1) blur(3px);
  -webkit-backdrop-filter: grayscale(1) blur(3px);
}
body.access-locked :is(.rail, .shell) {
  filter: grayscale(1);
}
#access-content {
  padding: clamp(24px, 5vw, 34px);
}
.gate-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #40523a;
  font:
    700 19px/1 "Barlow Condensed",
    sans-serif;
  letter-spacing: 1px;
  margin-bottom: 23px;
}
.gate-brand img {
  width: 25px;
  height: 29px;
}
#access-title {
  color: var(--text);
  font: 600 29px/1.1 var(--sans);
  letter-spacing: -0.6px;
  margin: 0 0 10px;
}
.gate-desc {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 22px;
  overflow-wrap: anywhere;
}
.gate-form label,
.gate-form input {
  display: block;
  width: 100%;
}
.gate-form label {
  font-size: 14px;
  font-weight: 600;
}
.gate-form input {
  background: white;
  border: 1px solid #acbca7;
  border-radius: 4px;
  color: var(--text);
  font: 16px/1.4 var(--sans);
  min-height: 45px;
  margin: 6px 0 0;
  padding: 10px 12px;
}
.gate-form input[name="code"] {
  font-family: var(--mono);
  letter-spacing: 0.22em;
}
.gate-form .primary {
  width: 100%;
  min-height: 44px;
  display: flex;
  justify-content: center;
  margin-top: 15px;
}
.gate-actions {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 11px;
}
.gate-actions button,
.account-signout {
  color: var(--lime);
  font-weight: 600;
  min-height: 40px;
  padding: 0;
}
.gate-actions button:hover,
.account-signout:hover {
  text-decoration: underline;
}
.gate-error,
.gate-notice {
  font-size: 14px;
  line-height: 1.4;
  margin: 10px 0 0;
}
.gate-error {
  color: var(--red);
}
.gate-notice {
  color: var(--muted);
}
.gate-error:empty,
.gate-notice:empty {
  display: none;
}
.preview-stats,
.preview-panels {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}
.preview-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.preview-panels {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
.preview-stats > div,
.preview-map,
.preview-list {
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 18px;
}
.preview-stats i,
.preview-stats span,
.preview-line,
.preview-list i::before,
.preview-list i::after {
  display: block;
  border-radius: 2px;
  background: #d9e0d5;
}
.preview-stats i {
  width: 48%;
  height: 9px;
}
.preview-stats span {
  width: 24%;
  height: 23px;
  margin-top: 13px;
}
.preview-line {
  width: 95px;
  height: 10px;
}
.preview-line.long {
  width: min(260px, 84%);
  margin-top: 10px;
}
.preview-terrain {
  height: 260px;
  margin-top: 20px;
  background: #d9e5d3 url("/assets/sector-relief.jpg") center / cover;
  opacity: 0.6;
}
.preview-list i {
  display: block;
  padding: 20px 0 14px;
  border-bottom: 1px solid var(--line);
}
.preview-list i::before,
.preview-list i::after {
  content: "";
  height: 7px;
  width: 45%;
}
.preview-list i::after {
  margin-top: 6px;
  width: 72%;
  opacity: 0.55;
}
@media (max-width: 600px) {
  .preview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .preview-panels {
    grid-template-columns: 1fr;
  }
  .preview-panels .preview-list {
    display: none;
  }
}
.detail-new-chat {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 10px 0;
}
.detail-new-chat small,
.job-receipts small {
  color: var(--muted);
}
.job-receipts small {
  display: block;
  overflow-wrap: anywhere;
}
.map-panel {
  align-self: start;
  width: 100%;
}
.map {
  min-height: clamp(305px, 30vw, 444px);
  touch-action: pan-y;
  background: #e6eeea;
}
.map:has([data-action="map-reset"]) {
  touch-action: none;
  cursor: grab;
}
.map:active:has([data-action="map-reset"]) {
  cursor: grabbing;
}
.map .marker {
  cursor: pointer;
}
.map-unmapped {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 10px;
}
.marker.cluster .symbol {
  background: #e9eddf;
  border-width: 2px;
}
.full-map .map-panel {
  width: auto;
}
@media (max-width: 700px) {
  .map {
    min-height: 252px;
    height: 252px;
  }
  .map-legend {
    flex-wrap: wrap;
  }
  .map-legend .legend-end {
    margin-left: 0;
  }
}
.owner-options {
  margin: 12px 0;
  border-block: 1px solid var(--line);
}
.owner-options summary {
  cursor: pointer;
  padding: 11px 0;
  font-weight: 600;
  font-size: 13px;
}
.marker {
  transform: translate(-50%, 0);
  margin-top: -17px;
}
@media (max-width: 720px) {
  .marker {
    margin-top: -14px;
  }
}
