:root {
  color-scheme: dark;
  --bg: #0b1017;
  --panel: #101821;
  --edge: #27333f;
  --text: #e7edf4;
  --muted: #94a3b2;
  --mint: #65e7b1;
  --mono:
    'Cascadia Code', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font:
    16px/1.45 Inter,
    'Segoe UI',
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 70% 10%, #111b2540, transparent 55%), var(--bg);
}
button,
select {
  font: inherit;
  color: inherit;
}
button,
select,
a {
  touch-action: manipulation;
}
button,
select {
  cursor: pointer;
}
button {
  background: none;
  border: 0;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
button:hover {
  filter: brightness(1.17);
}
[hidden] {
  display: none !important;
}
i {
  display: inline-flex;
  align-items: center;
  font-style: normal;
}
.bar {
  border-bottom: 1px solid #222c36;
  background: #0e151d;
}
.bar-inner,
main {
  width: min(100%, 1660px);
  margin: auto;
  padding: 0 clamp(18px, 3.1vw, 56px);
}
.bar-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 50px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  white-space: nowrap;
  font-size: 22px;
  font-weight: 790;
  letter-spacing: 1.3px;
}
.brand b {
  color: var(--mint);
}
nav {
  align-self: stretch;
  display: flex;
  gap: 14px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 14px;
  color: #8d9cae;
  border-bottom: 2px solid transparent;
  padding: 3px 10px 0;
}
.nav.active {
  color: var(--mint);
  border-color: var(--mint);
}
.top-right,
.mode,
.clock,
.signal,
.location,
.range-label,
.panel-head,
h2,
.legend,
.legend > span,
.chart-key,
.all-flights {
  display: flex;
  align-items: center;
}
.top-right {
  margin-left: auto;
  gap: 20px;
}
.mode,
.range-label {
  position: relative;
}
.mode {
  color: #e6bf78;
  background: #30281c;
  border: 1px solid #54432b;
  border-radius: 6px;
  padding-left: 10px;
  font-size: 13px;
}
.mode i:first-child svg {
  width: 15px;
}
.mode i:last-child,
.range-label i {
  position: absolute;
  right: 8px;
  pointer-events: none;
}
.mode i:last-child svg,
.range-label i svg {
  width: 13px;
}
.mode select,
.range-label select {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 6px 28px 6px 7px;
  outline-offset: 0;
}
.mode option,
.range-label option {
  background: #17202a;
  color: var(--text);
}
.live .mode {
  color: var(--mint);
  background: #132c24;
  border-color: #2a4f41;
}
.divider {
  height: 20px;
  border-left: 1px solid var(--edge);
}
.clock {
  font: 12px var(--mono);
  gap: 7px;
  color: var(--muted);
}
.clock b {
  font-weight: 500;
  color: #d1dce8;
}
.clock svg {
  width: 15px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 22px;
}
.eyebrow {
  font: 600 10px var(--mono);
  letter-spacing: 2.2px;
  color: var(--mint);
  display: flex;
  align-items: center;
  gap: 9px;
}
.lit {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px #63e5ae55;
}
.intro h1 {
  font-size: clamp(31px, 2.7vw, 43px);
  line-height: 1.14;
  margin: 8px 0 9px;
  letter-spacing: -1.5px;
  font-weight: 640;
}
.location {
  gap: 7px;
  margin: 0;
  color: #a3b0bf;
  font-size: 13px;
}
.location i svg {
  width: 14px;
  height: 14px;
  color: #9caabb;
}
.location span {
  margin: 0 4px;
  color: #475564;
}
.location small {
  font: 12px var(--mono);
  color: #8191a2;
}
.signal {
  align-self: flex-end;
  margin-bottom: 3px;
  gap: 8px;
  color: var(--muted);
  font: 12px var(--mono);
}
.level {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.level s {
  width: 3px;
  background: var(--mint);
  height: 3px;
}
.level s:nth-child(2) {
  height: 6px;
}
.level s:nth-child(3) {
  height: 9px;
}
.level s:nth-child(4) {
  height: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat,
.panel {
  background: linear-gradient(115deg, #131d27, #111922 80%);
  border: 1px solid var(--edge);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px #00000013;
}
.stat {
  padding: 16px 17px 14px;
  position: relative;
}
.stat-top {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #b7c2ce;
  white-space: nowrap;
}
.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.stat-icon svg {
  width: 16px;
}
.stat-value {
  font: 600 clamp(23px, 2.03vw, 32px) / 1.2 var(--mono);
  letter-spacing: -1.4px;
  margin: 11px 0 5px;
  white-space: nowrap;
}
.stat:first-child .stat-value {
  color: var(--mint);
}
.stat-value small {
  font: 500 13px var(--mono);
  color: #9eaebc;
  letter-spacing: 0;
  margin-left: 5px;
}
.sub {
  color: #91a0af;
  font: 12px var(--mono);
}
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 2.18fr) minmax(294px, 1fr);
  gap: 16px;
  align-items: stretch;
}
.panel-head {
  height: 56px;
  padding: 0 19px;
  justify-content: space-between;
  border-bottom: 1px solid var(--edge);
  gap: 10px;
}
.panel-head h2 {
  margin: 0;
  gap: 9px;
  font-size: 16px;
  letter-spacing: -0.35px;
  font-weight: 620;
}
.panel-head h2 i {
  color: var(--mint);
}
.range-label {
  font-size: 12px;
  color: #b2bfcb;
  gap: 9px;
}
.range-label select {
  font: 12px var(--mono);
  background: #1a252f;
  border: 1px solid #344250;
  border-radius: 5px;
  padding: 6px 25px 6px 9px;
  color: #e0e9f1;
}
.range-label span {
  color: #8d9cab;
}
.count-pill {
  font: 600 12px var(--mono);
  color: var(--mint);
  padding: 3px 9px;
  background: #19332c;
  border: 1px solid #2a4d40;
  border-radius: 5px;
}
#map-wrap {
  position: relative;
  height: clamp(355px, 45vh, 500px);
  isolation: isolate;
  background: #101e24;
}
#map {
  height: 100%;
  background: #0e1c22;
}
.map-mode,
.compass-n,
.map-actions,
.credit {
  position: absolute;
  z-index: 500;
}
.map-mode {
  top: 15px;
  left: 16px;
  background: #0a171bed;
  border: 1px solid #314743;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-radius: 4px;
  font: 10px var(--mono);
  letter-spacing: 1.1px;
  color: #a8cabc;
}
.compass-n {
  top: 14px;
  right: 14px;
  display: grid;
  justify-items: center;
  color: #b2c7ca;
  font: 11px var(--mono);
  gap: 1px;
}
.compass-n span {
  font-size: 17px;
  transform: scaleX(0.65);
  color: #a6bcc1;
}
.map-actions {
  bottom: 15px;
  left: 15px;
  display: grid;
  gap: 3px;
}
.map-actions button,
.icon-btn {
  background: #152027ee;
  border: 1px solid #384951;
  border-radius: 4px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  font-size: 20px;
  color: #b7c9cf;
}
.map-actions button:last-child {
  margin-top: 4px;
}
.map-actions svg {
  width: 15px;
}
.credit {
  right: 5px;
  bottom: 2px;
  background: #0b151dc9;
  color: #9aaeb4;
  font: 10px sans-serif;
  text-decoration: none;
  padding: 2px 4px;
}
.legend {
  height: 39px;
  gap: 20px;
  padding: 0 17px;
  font-size: 11px;
  color: #a2afbc;
  background: #101821;
}
.legend > span {
  gap: 7px;
}
.legend em {
  display: inline-block;
}
.plane-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
}
.station-dot {
  width: 9px;
  height: 9px;
  border: 2px solid #6bd0db;
  border-radius: 100%;
}
.line-dot {
  width: 16px;
  border-top: 1px dashed #689281;
}
.legend small {
  margin-left: auto;
  font-size: 10px;
}
.list-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sort-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #91a0af;
  padding: 9px 17px;
  border-bottom: 1px solid #24303a;
  font-size: 11px;
}
.sort-label svg {
  width: 14px;
  height: 14px;
}
.sort-label span {
  margin-left: auto;
  letter-spacing: 1px;
  font: 10px var(--mono);
}
.flights {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #34454e transparent;
}
.flight {
  padding: 11px 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #22303a;
  width: 100%;
  text-align: left;
}
.flight:hover,
.flight.selected {
  background: #1c2c33;
}
.plane-tile {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--c) 8%, #142029);
  color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 20%, #1c2530);
  border-radius: 7px;
  display: grid;
  place-items: center;
}
.plane-tile svg {
  width: 18px;
  height: 18px;
  transform: rotate(38deg);
}
.flight-name {
  display: block;
  font: 600 14px var(--mono);
  letter-spacing: 0.25px;
}
.flight-type {
  display: block;
  font: 11px/1.5 var(--mono);
  color: #92a2b2;
  margin-top: 2px;
}
.flight-dist {
  margin-left: auto;
  font: 600 14px var(--mono);
  color: #d7e1ea;
  white-space: nowrap;
}
.flight-dist small {
  font: 11px var(--mono);
  color: #8e9eaf;
}
.all-flights {
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  height: 39px;
  flex-shrink: 0;
  border-top: 1px solid var(--edge);
  background: #151f29;
  color: #b8c6d2;
}
.all-flights svg {
  width: 14px;
}
.chart-panel {
  margin-top: 17px;
}
.chart-panel .panel-head {
  border: 0;
}
.chart-key {
  font-size: 11px;
  gap: 8px;
  color: #95a6b4;
  margin: 0 22px;
}
.chart-key .lit {
  width: 7px;
  height: 7px;
}
#chart {
  padding: 7px 17px 12px;
}
#chart svg {
  display: block;
  width: 100%;
  height: 115px;
}
.empty,
.history-info {
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
}
.history-info {
  margin: 0;
}
.leaflet-container {
  font-family: var(--mono);
}
.leaflet-control-container {
  display: none;
}
.town {
  white-space: nowrap;
  color: #869caa;
  font: 10px var(--mono);
  text-shadow:
    0 1px 3px #071117,
    1px 0 2px #071117;
  pointer-events: none;
}
.town:before {
  content: '';
  display: inline-block;
  margin: 0 4px 2px 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #6b8490;
}
.station {
  color: #82eff2;
  text-align: center;
  white-space: nowrap;
  position: relative;
  pointer-events: none;
}
.station i {
  display: block;
  border: 2px solid #78d9d7;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  box-shadow:
    0 0 0 5px #6bd6c625,
    0 0 16px #82e9d966;
  margin: 0 auto;
  background: #204c4e;
}
.station strong {
  display: inline-block;
  font: 600 10px var(--mono);
  color: #d3f5eb;
  background: #102a2c;
  border: 1px solid #476965;
  border-radius: 3px;
  letter-spacing: 0.8px;
  padding: 3px 6px;
  margin-top: 5px;
}
.air-marker {
  color: var(--mint);
  cursor: pointer;
}
.air-marker .glyph {
  position: absolute;
  width: 25px;
  height: 27px;
  filter: drop-shadow(0 0 5px #57e7a347);
  transform-origin: center;
}
.air-marker .tag {
  position: absolute;
  left: 28px;
  top: 14px;
  white-space: nowrap;
  color: #c6dfd5;
  background: #0a171bdb;
  border: 1px solid #3b514d;
  border-radius: 3px;
  padding: 2px 4px;
  font: 9px var(--mono);
}
.air-marker.chosen .glyph {
  filter: drop-shadow(0 0 6px #fff);
  color: white;
}
.ring-label {
  font: 9px var(--mono);
  color: #79aa93;
  white-space: nowrap;
}
.sweep {
  border-radius: 50%;
  background: conic-gradient(
    from 30deg,
    transparent 0deg 322deg,
    #53eda506 324deg,
    #55e49d24 357deg,
    #6aeca768 359.4deg,
    transparent 360deg
  );
  animation: sweep 20s linear infinite;
  pointer-events: none;
}
@keyframes sweep {
  to {
    transform: rotate(360deg);
  }
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0;
  color: #8293a3;
  font: 11px var(--mono);
}
footer .lit {
  width: 5px;
  height: 5px;
  margin-right: 6px;
}
footer b {
  margin: 0 6px;
  color: #546471;
}
footer a {
  color: #a4b6c2;
  text-decoration: none;
}
#notice {
  background: #30291d;
  border: 1px solid #52452c;
  color: #ecd09a;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 13px;
}
dialog {
  background: #111c26;
  color: var(--text);
  border: 1px solid #344654;
  border-radius: 12px;
  padding: 0;
  width: min(570px, calc(100% - 26px));
  max-height: 85vh;
  box-shadow: 0 24px 90px #000a;
}
dialog::backdrop {
  background: #05090eb8;
  backdrop-filter: blur(3px);
}
dialog .panel-head {
  position: sticky;
  top: 0;
  background: #15212c;
  z-index: 1;
}
.history-row,
.table-row {
  width: 100%;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #26333d;
  text-align: left;
  font: 13px var(--mono);
}
.history-row span:last-child,
.table-row span:last-child {
  margin-left: auto;
  color: #91acb4;
}
.detail {
  padding: 20px;
}
.detail-head {
  display: flex;
  gap: 14px;
  align-items: center;
}
.detail-head strong {
  font: 600 24px var(--mono);
}
.detail-head small {
  display: block;
  color: var(--muted);
}
.detail-head .plane-tile {
  width: 48px;
  height: 48px;
}
.instruments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 18px 0;
}
.meter {
  padding: 13px 6px;
  text-align: center;
  background: #182530;
  border: 1px solid #2a3c49;
  border-radius: 7px;
}
.meter svg {
  display: block;
  margin: 0 auto 6px;
  width: 51px;
  height: 35px;
}
.meter strong {
  display: block;
  font: 600 15px var(--mono);
}
.meter small {
  color: var(--muted);
  font-size: 12px;
}
.detail dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}
.detail dt,
.detail dd {
  margin: 0;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid #26343e;
}
.detail dt {
  color: #97a8b6;
}
.detail dd {
  text-align: right;
  font-family: var(--mono);
}
.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.action {
  border: 1px solid #375648;
  background: #18352b;
  color: #9ee8c7;
  border-radius: 6px;
  padding: 9px 13px;
  font-size: 13px;
}
.small-text {
  font-size: 12px;
  color: var(--muted);
}
body:has(.nav[data-page='history'].active) .signal {
  visibility: hidden;
}
@media (min-width: 1600px) {
  .stat {
    padding: 20px;
  }
  .flight {
    padding: 14px 18px;
  }
}
@media (max-width: 1050px) {
  .bar-inner {
    gap: 23px;
  }
  .stat {
    padding: 12px;
  }
  .stat-top {
    gap: 5px;
    font-size: 11px;
  }
  .dashboard {
    grid-template-columns: minmax(0, 1.8fr) minmax(264px, 1fr);
  }
  .stat-icon {
    width: 24px;
    height: 24px;
  }
  .legend {
    gap: 12px;
  }
}
@media (max-width: 760px) {
  .bar-inner {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    gap: 0;
    padding-top: 10px;
  }
  .brand {
    font-size: 19px;
  }
  .brand img {
    width: 31px;
    height: 31px;
  }
  .top-right {
    order: 1;
    gap: 8px;
  }
  .clock,
  .divider {
    display: none;
  }
  nav {
    order: 2;
    width: 100%;
    height: 39px;
    margin-top: 5px;
  }
  .nav {
    font-size: 13px;
  }
  .intro {
    margin: 21px 0 16px;
  }
  .intro h1 {
    font-size: 32px;
  }
  .signal {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }
  .stat-top {
    white-space: normal;
  }
  .stat:nth-child(4),
  .stat:nth-child(5) {
    grid-column: span 1;
  }
  .stat-value {
    font-size: 22px;
  }
  .dashboard {
    grid-template-columns: 1fr;
  }
  .list-panel {
    max-height: 390px;
  }
  .flights {
    flex: 1 1 auto;
  }
  .panel-head {
    height: 50px;
  }
  .location small {
    font-size: 10px;
  }
  #map-wrap {
    height: 390px;
  }
  .chart-panel {
    margin-top: 14px;
  }
  .panel-head h2 {
    font-size: 15px;
  }
  footer {
    flex-wrap: wrap;
    line-height: 1.7;
  }
  .range-label span {
    display: none;
  }
}
@media (max-width: 510px) {
  .stats {
    display: flex;
    overflow-x: auto;
    padding-bottom: 5px;
    scroll-snap-type: x proximity;
  }
  .stat {
    flex: 0 0 155px;
    scroll-snap-align: start;
  }
  .location {
    font-size: 12px;
    gap: 4px;
  }
  .intro .eyebrow {
    font-size: 9px;
  }
  .chart-panel .panel-head {
    flex-wrap: wrap;
    height: auto;
    min-height: 54px;
    padding: 12px;
  }
  .chart-panel .range-label select {
    font-size: 10px;
  }
  .chart-key {
    margin-left: 12px;
  }
  .legend {
    gap: 12px;
    font-size: 10px;
  }
  .legend small {
    max-width: 69px;
  }
  .air-marker .tag {
    font-size: 8px;
  }
  .panel-head {
    padding: 0 13px;
  }
  #map-wrap {
    height: 345px;
  }
  .brand {
    gap: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sweep {
    animation: none;
  }
}
.unknown-course {
  display: grid;
  place-items: center;
  width: 25px;
  height: 27px;
  font-size: 15px;
}
.air-marker.chosen .tag {
  border-color: #b7e3cd;
  color: white;
}
.air-marker.chosen .glyph {
  outline: 1px dashed #a7dbbf;
  outline-offset: 3px;
  border-radius: 50%;
}
.map-actions button:hover {
  color: var(--mint);
  border-color: #749d8c;
}
#history-mode {
  color: var(--muted);
  font: 12px var(--mono);
}
.disconnected .level s,
.disconnected .map-mode .lit {
  background: #e9b56c;
}
.disconnected .signal {
  color: #d3b994;
}
