:root {
  color-scheme: dark;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: #dbede0;
  background: #070e0a;
  font-synthesis: none;
  --green: #a2fb89;
  --bright: #c3ffa9;
  --dim: #a0b6a6;
  --quiet: #829987;
  --line: #284333;
  --surface: #0e1912;
  --warn: #ffd180;
  --critical: #ff9d87;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 70% 30%, #13231a 0%, #070e0a 65%); min-height: 100vh; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
button { font: inherit; }
button:focus-visible { outline: 2px solid var(--bright); outline-offset: 3px; }
.console { width: min(100%, 1220px); margin: auto; padding: 24px 28px 30px; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 19px; margin-bottom: 21px; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 14px; align-items: center; }
.brand p, .trip span, .radar-heading p { color: var(--dim); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.brand h1 { margin-top: 4px; font-size: clamp(24px, 3vw, 38px); line-height: 1; letter-spacing: -.055em; color: #eaF6e9; }
.brand-symbol { display: block; position: relative; width: 44px; height: 44px; border: 1px solid #52895d; border-radius: 50%; flex: none; box-shadow: 0 0 18px #8af9691c, inset 0 0 18px #8af9691c; background: conic-gradient(from 3deg, transparent 80%, #81f76947 98%, #acff7bb0); }
.brand-symbol::before { content: ""; position: absolute; inset: 8px; border: 1px solid #558c5f; border-radius: 50%; }
.brand-symbol::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: var(--bright); box-shadow: 0 0 9px #9cff77; }
.trip { display: grid; gap: 5px; text-align: right; }
.trip time { color: #c6d7c9; font-size: 14px; }
.dashboard { display: grid; grid-template-columns: minmax(285px, 330px) minmax(0, 1fr); align-items: start; gap: 21px; }
.panel, .radar { min-width: 0; }
.panel { border: 1px solid var(--line); background: linear-gradient(155deg, #14221a, #0c1710 70%); border-radius: 12px; padding: 19px; }
.section-heading, .cabin-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.section-heading { margin-bottom: 15px; }
.section-heading h2 { font-size: 16px; letter-spacing: -.035em; }
.live, .gps-badge { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; text-transform: uppercase; font-size: 10px; letter-spacing: .11em; }
.live { color: var(--green); }
.live i, .gps-badge i { display: block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.live i, .gps-badge[data-state="active"] i { box-shadow: 0 0 8px currentColor; }
.navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.reading { display: grid; gap: 5px; min-width: 0; background: #08130d; border: 1px solid #263e2e; padding: 11px; border-radius: 6px; }
.reading dt, .gauge-caption { color: var(--dim); font-size: 11px; }
.reading dd, .gauge-reading { color: var(--bright); font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.1; }
.reading dd { font-size: clamp(22px, 3vw, 32px); }
.reading small, .gauge-reading small { font-size: 11px; color: var(--dim); font-weight: 400; }
.heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.heading dd { margin-top: 5px; font-size: 23px; }
.reading-source { display: block; color: var(--quiet); font-size: 10px; margin-top: 4px; }
.reading-source:empty { display: none; }
.compass { width: 39px; height: 39px; border: 1px solid #4d6952; border-radius: 50%; display: grid; place-items: center; position: relative; margin-right: 3px; }
.compass b { position: absolute; color: var(--dim); inset: 1px 0 auto; text-align: center; font-size: 8px; font-weight: 400; }
.compass i { width: 21px; height: 21px; background: var(--green); clip-path: polygon(50% 0, 80% 85%, 50% 65%, 20% 85%); }
.cabin { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.cabin-heading { margin-bottom: 10px; }
.cabin-heading h3 { font-size: 13px; }
.cabin-heading > span { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gauge { --gauge-color: #a3f180; min-width: 0; }
.gauge[data-state="low"] { --gauge-color: var(--warn); }
.gauge[data-state="critical"] { --gauge-color: var(--critical); }
.gauge-caption { display: grid; gap: 3px; align-items: start; min-height: 26px; }
.gauge-state { color: var(--gauge-color); font-size: 9px; }
.gauge-reading { margin: 4px 0 8px; font-size: 23px; color: var(--gauge-color); }
.gauge-track { height: 4px; background: #24352a; border-radius: 2px; overflow: hidden; }
.gauge-track i { display: block; width: var(--level, 70%); height: 100%; background: var(--gauge-color); transition: width .65s ease, background .35s linear; }
.controls { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 19px; }
.controls button {
  border: 1px solid #365340;
  border-radius: 6px;
  padding: 9px 10px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #0a170f;
  color: #d6e9d8;
  white-space: nowrap;
  font-size: 12px;
  cursor: pointer;
}
.controls button:hover { background: #1a3321; border-color: #6c9b6c; }
.controls button.primary { background: #a6f78d; color: #102715; border-color: #a6f78d; font-weight: 750; }
.controls button.primary:hover { background: #c3ffa9; }
.controls button[aria-pressed="true"] { background: #233a28; color: var(--bright); border-color: #5c805d; }
.controls button:disabled { cursor: default; opacity: .7; }
.toggle-state { font-size: 9px; color: var(--dim); text-transform: uppercase; }
.target-icon { width: 13px; height: 13px; border: 1.4px solid currentColor; border-radius: 50%; position: relative; }
.target-icon::after { position: absolute; inset: 3.2px; content: ""; border-radius: 50%; background: currentColor; }
.sound-icon { width: 13px; height: 14px; background: currentColor; clip-path: polygon(0 34%, 28% 34%, 64% 5%, 64% 95%, 28% 66%, 0 66%, 0 34%, 78% 33%, 86% 39%, 86% 61%, 78% 66%, 78% 33%); }
.status { color: var(--dim); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.radar {
  position: relative;
  aspect-ratio: 1;
  isolation: isolate;
  width: 100%;
  border: 1px solid #508453;
  border-radius: 12px;
  overflow: hidden;
  background: #041009;
  box-shadow: 0 0 38px #5dfd6211;
  container-type: inline-size;
}
.radar-heading, figcaption { position: absolute; z-index: 2; left: 3.3%; right: 3.3%; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.radar-heading { top: 3%; align-items: flex-start; }
.radar-heading p { color: #a9d6a4; }
.radar-heading h2 { margin-top: 4px; font-size: clamp(15px, 3.15cqw, 28px); letter-spacing: -.06em; line-height: 1; color: var(--bright); }
.radar-heading h2 span { color: #75ad73; }
.gps-badge { border: 1px solid #386444; border-radius: 4px; background: #07150b; color: #a1bba5; padding: 6px 7px; }
.gps-badge[data-state="active"] { color: var(--green); }
.gps-badge[data-state="searching"], .gps-badge[data-state="outside"] { color: var(--warn); }
#scope { display: block; width: 100%; height: 100%; }
figcaption { align-items: flex-end; bottom: 2.5%; color: #94b69a; font-size: clamp(9px, 1.42cqw, 12px); line-height: 1.2; }
#coordinates { text-align: right; color: #bbdcba; font-variant-numeric: tabular-nums; }
.location-marker { position: absolute; z-index: 3; width: 0; height: 0; pointer-events: none; }
.location-marker > span {
  position: absolute;
  width: clamp(58px, 13cqw, 105px);
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  padding: 4px;
  border: 1px solid #c6ffb4;
  border-radius: 6px;
  background: #e6ffd9;
  box-shadow: 0 0 15px #7cff6970;
}
.location-marker > span::after { content: ""; position: absolute; bottom: -5px; left: calc(50% - 4px); width: 8px; height: 8px; transform: rotate(45deg); background: #e6ffd9; }
.location-marker img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.location-marker i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #edffe8; box-shadow: 0 0 0 3px #6fff77a0, 0 0 15px 3px #6fff77; transform: translate(-50%, -50%); }
.location-marker[data-outside="true"] i { background: #ffd180; box-shadow: 0 0 0 3px #ffd18080, 0 0 13px #ffd180; }

@media (orientation: portrait), (max-width: 690px) and (min-height: 550px) {
  .console { max-width: 720px; padding: 15px 14px 20px; }
  .masthead { padding-bottom: 13px; margin-bottom: 12px; }
  .dashboard { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .panel { padding: 12px; }
  .section-heading { margin-bottom: 9px; }
  .navigation { grid-template-columns: .94fr .92fr 1.25fr; }
  .reading { padding: 8px 7px; align-content: start; gap: 3px; }
  .reading dt, .gauge-caption { font-size: 10px; }
  .reading dd { font-size: 20px; }
  .heading { grid-column: auto; gap: 3px; }
  .heading dd { font-size: 18px; }
  .reading-source { font-size: 8px; }
  .compass { width: 27px; height: 27px; flex: none; margin-right: 0; }
  .compass i { width: 14px; height: 14px; }
  .compass b { font-size: 6px; }
  .cabin { margin-top: 11px; padding-top: 9px; }
  .cabin-heading { margin-bottom: 5px; }
  .gauge-caption { min-height: 13px; }
  .gauge-reading { font-size: 20px; margin-bottom: 5px; }
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 11px; }
  .controls button { min-height: 37px; padding: 7px; font-size: 11px; }
  .status { grid-column: 1 / -1; font-size: 10px; }
}
@media (max-width: 450px) {
  .brand { gap: 8px; }
  .brand-symbol { width: 33px; height: 33px; }
  .brand-symbol::before { inset: 6px; }
  .brand-symbol::after { inset: 13px; }
  .brand p, .trip span, .radar-heading p { font-size: 9px; letter-spacing: .08em; }
  .brand h1 { font-size: 23px; }
  .trip time { font-size: 10px; }
  .gps-badge { font-size: 8px; padding: 4px; gap: 4px; }
  .gps-badge i { width: 4px; height: 4px; }
}
@media (orientation: landscape) and (max-height: 570px) {
  .console { padding: 9px 12px 12px; }
  .masthead { padding-bottom: 8px; margin-bottom: 8px; }
  .brand-symbol { width: 33px; height: 33px; }
  .brand-symbol::before { inset: 6px; }
  .brand-symbol::after { inset: 13px; }
  .brand h1 { font-size: 24px; }
  .dashboard { grid-template-columns: minmax(218px, 310px) minmax(0, max(270px, calc(100svh - 66px))); justify-content: center; gap: 10px; }
  .panel { padding: 11px; }
  .section-heading { margin-bottom: 8px; }
  .navigation { grid-template-columns: .92fr .9fr 1.25fr; }
  .reading { padding: 6px 7px; gap: 2px; }
  .reading dd { font-size: 19px; }
  .heading { grid-column: auto; }
  .heading dd { font-size: 16px; }
  .reading-source { font-size: 8px; }
  .compass { display: none; }
  .cabin { margin-top: 9px; padding-top: 8px; }
  .cabin-heading { margin-bottom: 4px; }
  .gauge-caption { min-height: 12px; }
  .gauge-reading { font-size: 18px; margin-bottom: 4px; }
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 9px; }
  .controls button { font-size: 10px; padding: 6px; min-height: 34px; white-space: normal; }
  .status { grid-column: 1 / -1; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .gauge-track i { transition: none; }
}
