/* NieboGuard Radar — specialist ATC view.
   App shell only: the live map, data bridge and WSS stay in app.js. */
:root {
  --radar-bg: #050b14;
  --radar-surface: rgba(8, 17, 30, .94);
  --radar-raised: #0d1a2c;
  --radar-line: #223b57;
  --radar-text: #dce9f8;
  --radar-muted: #8fa8c4;
  --radar-accent: #67d7ff;
  --radar-amber: #ffcf70;
  --radar-ok: #7bf0b0;
  --radar-warn: #ffcf70;
  --radar-danger: #ff8a97;
}

body.ng-radar {
  background: var(--radar-bg);
  overflow: hidden;
}

body.ng-radar #topbar,
body.ng-radar #panel,
body.ng-radar #bottom-stack,
body.ng-radar #bottom-status-row,
body.ng-radar #bottom-bar,
body.ng-radar #map-actions,
body.ng-radar .tabbar,
body.ng-radar #tabbar,
body.ng-radar #ng-welcome,
body.ng-radar #ng-feature,
body.ng-radar #ng-tour {
  display: none !important;
}

body.ng-radar #map {
  position: fixed;
  inset: 0;
  z-index: 0;
}
/* Keep the base map visible while radar layers initialise. Legacy ADS-B
   layers are hidden by radar.js as soon as they appear; do not hide the whole
   map, otherwise a slow style load looks like a black screen. */

body.ng-radar .maplibregl-ctrl-top-right {
  top: 60px;
}

body.ng-radar .maplibregl-ctrl-bottom-right {
  bottom: 72px;
}

body.ng-radar #ac-card {
  bottom: 72px;
  z-index: 1600;
}

.radar-app,
.radar-app * {
  box-sizing: border-box;
}

.radar-app {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: none;
  color: var(--radar-text);
  font: 12px/1.4 "Segoe UI", system-ui, sans-serif;
}

.radar-app[hidden] {
  display: none !important;
}

.radar-app button,
.radar-app a,
.radar-app input,
.radar-app select {
  pointer-events: auto;
}

.radar-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: linear-gradient(180deg, rgba(5, 11, 20, .98), rgba(5, 11, 20, .82));
  border-bottom: 1px solid rgba(80, 130, 180, .28);
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.radar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--radar-text);
  text-decoration: none;
  flex: 0 0 auto;
}

.radar-brand img {
  width: 24px;
  height: 24px;
}

.radar-brand b {
  font: 800 12px/1 system-ui;
  letter-spacing: .14em;
}

.radar-brand small {
  display: block;
  margin-top: 2px;
  color: var(--radar-muted);
  font-size: 9px;
  letter-spacing: .02em;
}

.radar-profiles {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  flex: 1 1 auto;
}

.radar-profiles .ng-radar-profile-row {
  padding: 0;
  gap: 3px;
}

.radar-profiles .ng-radar-profile-item {
  min-width: 56px;
  min-height: 44px;
  padding: 3px 6px;
  flex-direction: row;
  gap: 4px;
}

.radar-profiles .ng-radar-profile-item svg {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.radar-profiles .ng-radar-profile-item small {
  max-width: 60px;
  font-size: 9.5px;
}

.radar-profiles .ng-radar-profile-state {
  display: none;
}

.radar-profiles [data-radar-other] {
  position: static;
}

.radar-profiles .ng-radar-profile-more {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  max-width: min(620px, calc(100vw - 20px));
  padding: 5px;
  border: 1px solid var(--radar-line);
  border-radius: 9px;
  background: var(--radar-surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}

.radar-profile {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--radar-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.radar-profile:hover,
.radar-profile:focus-visible {
  color: var(--radar-text);
  border-color: var(--radar-line);
}

.radar-profile[aria-current="page"] {
  color: #06101c;
  background: var(--radar-accent);
  border-color: var(--radar-accent);
}

.radar-profile.planned {
  cursor: not-allowed;
  color: #657d98;
  border: 1px dashed #31455d;
  background: rgba(255, 255, 255, .015);
}

.radar-top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.radar-icon-btn,
.radar-btn {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--radar-line);
  border-radius: 8px;
  background: rgba(13, 26, 44, .92);
  color: var(--radar-text);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.radar-icon-btn svg,
.radar-btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.radar-icon-btn:hover,
.radar-btn:hover,
.radar-icon-btn:focus-visible,
.radar-btn:focus-visible {
  border-color: var(--radar-accent);
  color: #f5fbff;
  outline: none;
}

.radar-icon-btn[aria-expanded="true"],
.radar-btn[aria-expanded="true"],
.radar-btn.active {
  border-color: var(--radar-accent);
  background: #12334a;
  color: #f5fbff;
}

.radar-profile-banner {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 14px;
  border-bottom: 1px solid rgba(80, 130, 180, .18);
  background: rgba(5, 11, 20, .78);
  color: var(--radar-muted);
  font-size: 10px;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.radar-profile-banner .radar-family {
  color: var(--radar-accent);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.radar-profile-banner strong {
  color: var(--radar-text);
  font-size: 11px;
}
.radar-profile-banner em {
  color: var(--radar-muted);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.radar-profile-description {
  color: var(--radar-muted);
  line-height: 1.5;
}

.radar-aircraft-counters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--radar-muted);
  font-size: 9.5px;
  white-space: nowrap;
}
.radar-aircraft-counters span {
  padding: 3px 6px;
  border: 1px solid rgba(80, 130, 180, .25);
  border-radius: 6px;
  background: rgba(13, 26, 44, .72);
}
.radar-aircraft-counters b {
  color: var(--radar-text);
  font-size: 10.5px;
}

.radar-toolbar {
  position: absolute;
  left: 10px;
  top: 64px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: auto;
}

.radar-toolbar .radar-icon-btn {
  width: 42px;
  min-width: 42px;
  padding: 0;
  position: relative;
}

.radar-toolbar .radar-icon-btn .radar-tool-label {
  position: absolute;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  padding: 4px 7px;
  border: 1px solid var(--radar-line);
  border-radius: 6px;
  background: var(--radar-surface);
  color: var(--radar-text);
  font-size: 10px;
  white-space: nowrap;
}

.radar-toolbar .radar-icon-btn:hover .radar-tool-label,
.radar-toolbar .radar-icon-btn:focus-visible .radar-tool-label {
  display: block;
}

.radar-status {
  position: absolute;
  z-index: 2;
  left: 64px;
  bottom: 12px;
  max-width: min(620px, calc(100vw - 84px));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid rgba(80, 130, 180, .28);
  border-radius: 8px;
  background: rgba(5, 11, 20, .88);
  color: var(--radar-muted);
  font-size: 10.5px;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.radar-status b {
  color: var(--radar-text);
  font-weight: 700;
}

.radar-status .radar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--radar-muted);
  flex: 0 0 7px;
}

.radar-status .radar-dot.live {
  background: var(--radar-ok);
  box-shadow: 0 0 0 3px rgba(123, 240, 176, .12);
}

.radar-status .radar-dot.stale {
  background: var(--radar-warn);
}

.radar-status .radar-dot.offline {
  background: var(--radar-danger);
}

.radar-panel {
  position: absolute;
  z-index: 6;
  top: 62px;
  right: 10px;
  width: min(370px, calc(100vw - 20px));
  max-height: calc(100dvh - 74px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--radar-line);
  border-radius: 12px;
  background: var(--radar-surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.radar-panel[hidden] {
  display: none !important;
}

.radar-panel h2 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.2;
}

.radar-panel h3 {
  margin: 14px 0 5px;
  font-size: 11px;
  color: var(--radar-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.radar-panel p {
  margin: 6px 0;
  color: #b8cbe2;
  font-size: 11px;
  line-height: 1.45;
}

.radar-panel ul {
  margin: 5px 0;
  padding-left: 17px;
  color: #b8cbe2;
  font-size: 11px;
  line-height: 1.5;
}

.radar-panel a {
  color: var(--radar-accent);
}

.radar-panel .radar-panel-close {
  float: right;
  margin: -3px -3px 4px 8px;
}

.radar-panel .radar-note {
  padding: 7px 8px;
  border: 1px solid rgba(255, 207, 112, .28);
  border-radius: 7px;
  background: rgba(255, 207, 112, .06);
  color: #e5d4ab;
}

.radar-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 8px;
}

.radar-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  color: #c8d8eb;
  font-size: 10.5px;
}

.radar-legend-symbol {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border: 1px solid #263f59;
  border-radius: 6px;
  background: #07111e;
}

.radar-legend-symbol svg {
  width: 17px;
  height: 17px;
  display: block;
}

.radar-legend-line {
  width: 24px;
  height: 0;
  flex: 0 0 24px;
  border-top: 2px solid var(--radar-accent);
}

.radar-legend-line.dashed {
  border-top-style: dashed;
}

.radar-legend-line.amber {
  border-color: var(--radar-amber);
}

.radar-legend-line.muted {
  border-color: #68829d;
}

.radar-legend-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  border: 1px solid #050b14;
  box-shadow: 0 0 0 1px #263f59;
}

.radar-airspace-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 7px 0;
}

.radar-airspace-jump .radar-btn {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 9.5px;
}

.radar-airspace-jump b {
  color: #8ee7ff;
  font-weight: 700;
}

.radar-diag {
  position: fixed;
  z-index: 2000;
  left: 8px;
  right: 8px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  max-width: 560px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid #2b4661;
  border-radius: 10px;
  background: rgba(5, 11, 20, .97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  color: #dce6f7;
  font-size: 11px;
}

.radar-diag-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: #f5d0fe;
}

.radar-diag-head .radar-icon-btn {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
}

.radar-diag p {
  margin: 5px 0;
  color: #b8cbe2;
  line-height: 1.4;
}

.radar-diag-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 6px 0;
  color: #a9bdd5;
  font-size: 10px;
}

.radar-diag-metrics b {
  color: #dce6f7;
}

.radar-split {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 50%;
  background: #050b14;
  border-left: 1px solid #2b4661;
}

.radar-split[hidden] {
  display: none !important;
}

body.radar-split #map {
  width: 50%;
}

.radar-split-map {
  position: absolute;
  inset: 0;
}

.radar-split-head {
  position: absolute;
  z-index: 6;
  top: 66px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 7px;
  border: 1px solid #2b4661;
  border-radius: 7px;
  background: rgba(5, 11, 20, .9);
  color: #c8d8eb;
  font-size: 10px;
}

.radar-split-head .radar-icon-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
}

.radar-split-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 7px 0;
}

@media (max-width: 760px) {
  body.radar-split #map {
    width: 100%;
    height: 50%;
  }
  .radar-split {
    top: 50%;
    width: 100%;
    height: 50%;
    border-left: 0;
    border-top: 1px solid #2b4661;
  }
  .radar-split-head {
    top: 8px;
  }
}

.radar-seo-figure {
  margin: 14px 0 8px;
}

.radar-seo-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #2b4661;
  border-radius: 10px;
  background: #07111e;
}

.radar-seo-figure figcaption {
  margin-top: 5px;
  color: #7890a9;
  font-size: 10px;
  line-height: 1.35;
}

.radar-handoff-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 7px 0;
}

.radar-handoff-links .radar-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.radar-preset-row {
  display: flex;
  align-items: stretch;
  gap: 5px;
}

.radar-preset-row .radar-timeline-item {
  flex: 1;
}

.radar-preset-row > .radar-icon-btn {
  width: 34px;
  min-width: 34px;
  align-self: center;
}

.radar-analytics-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 7px 0;
}

.radar-analytics-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 46px;
  padding: 6px;
  border: 1px solid #263a52;
  border-radius: 7px;
  background: #0b1626;
}

.radar-analytics-card b {
  color: #f0abfc;
  font-size: 14px;
  line-height: 1.1;
}

.radar-analytics-card small {
  color: #7890a9;
  font-size: 8.5px;
  line-height: 1.2;
}

.radar-analytics-charts h4 {
  margin: 8px 0 4px;
  color: #c8d8eb;
  font-size: 10px;
}

.radar-analytics-bar {
  display: grid;
  grid-template-columns: 88px 1fr 34px;
  gap: 6px;
  align-items: center;
  min-height: 22px;
  color: #a9bdd5;
  font-size: 9px;
}

.radar-analytics-bar > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-analytics-bar b {
  color: #dce6f7;
  text-align: right;
  font-size: 9px;
}

.radar-analytics-track {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #16283d;
}

.radar-analytics-track span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #7c3aed, #f0abfc);
}

.radar-analytics-replay {
  margin: 6px 0;
  padding: 7px;
  border: 1px solid #2b4661;
  border-radius: 7px;
  background: #0a1728;
}

.radar-airspace-detail {
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #2b4661;
  border-radius: 8px;
  background: #0a1728;
}

.radar-airspace-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: #f5d0fe;
  font-size: 12px;
}

.radar-airspace-detail-head .radar-icon-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
}

.radar-airspace-detail-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 7px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(80, 130, 180, .14);
  color: #c8d8eb;
  font-size: 10px;
}

.radar-airspace-detail-row span {
  color: #7890a9;
}

.radar-airspace-detail-row b {
  font-weight: 600;
  color: #dce6f7;
}

.radar-term {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 7px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(80, 130, 180, .14);
  font-size: 10.5px;
}

.radar-term b {
  color: var(--radar-accent);
}

.radar-term span {
  color: #b8cbe2;
}

.radar-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(80, 130, 180, .12);
  color: #c8d8eb;
  font-size: 11px;
}

.radar-settings-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--radar-accent);
}

.radar-settings-row select {
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--radar-line);
  border-radius: 6px;
  background: #07111e;
  color: var(--radar-text);
  font: inherit;
}

.radar-measure {
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  display: none;
  min-width: 250px;
  max-width: calc(100vw - 20px);
  padding: 8px 10px;
  border: 1px solid var(--radar-accent);
  border-radius: 9px;
  background: rgba(5, 11, 20, .94);
  color: var(--radar-text);
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.radar-measure.open {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.radar-measure b {
  font-size: 13px;
  color: var(--radar-accent);
}

.radar-measure small {
  color: var(--radar-muted);
  font-size: 10px;
}

.radar-toast {
  position: absolute;
  left: 50%;
  bottom: 112px;
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  padding: 8px 12px;
  border: 1px solid var(--radar-line);
  border-radius: 8px;
  background: #0b1a2b;
  color: var(--radar-text);
  font-size: 11px;
  opacity: 0;
  transition: opacity .18s;
  pointer-events: none;
}

.radar-toast.show {
  opacity: 1;
}

.radar-planned-note {
  margin-top: 6px;
  color: #7f96b0;
  font-size: 10px;
}

.radar-sr-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.radar-seo {
  display: block;
}
#radar-seo[hidden] {
  display: none !important;
}

.radar-seo h1 {
  margin: 0 0 6px;
  font-size: 18px;
}

.radar-seo h2 {
  margin-top: 16px;
}

.radar-seo details {
  margin: 7px 0;
  border-top: 1px solid rgba(80, 130, 180, .18);
  padding-top: 5px;
}

.radar-seo summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 650;
}

.radar-seo p,
.radar-seo li {
  color: #b8cbe2;
  font-size: 11px;
  line-height: 1.5;
}

.radar-seo a {
  color: var(--radar-accent);
}

@media (max-width: 760px) {
  .radar-topbar {
    min-height: 48px;
    gap: 7px;
    padding: 4px 7px;
  }
  body.ng-radar .maplibregl-ctrl-top-right {
    top: 62px;
  }
  .radar-profile-banner {
    top: 48px;
    min-height: 24px;
    padding: 2px 8px;
    font-size: 9px;
    gap: 5px;
  }
  .radar-profile-banner .radar-family {
    display: none;
  }
  .radar-profile-banner strong {
    font-size: 10px;
    white-space: nowrap;
  }
  .radar-profile-banner em {
    font-size: 9px;
  }
  .radar-aircraft-counters {
    gap: 4px;
    font-size: 8.5px;
  }
  .radar-aircraft-counters span {
    padding: 2px 4px;
  }
  .radar-aircraft-counters span:nth-child(n+3) {
    display: none;
  }

  .radar-brand small,
  .radar-brand b {
    display: none;
  }

  .radar-brand img {
    width: 26px;
    height: 26px;
  }

  .radar-profile {
    min-height: 40px;
    padding: 6px 7px;
    font-size: 10px;
  }
  .radar-profiles .ng-radar-profile-item {
    min-width: 45px;
    min-height: 44px;
    padding-inline: 2px;
  }
  .radar-profiles .ng-radar-profile-item small {
    max-width: 45px;
    font-size: 8.5px;
  }
  .radar-profiles [data-radar-other] small {
    max-width: 70px;
  }

  .radar-top-actions .radar-btn span {
    display: none;
  }

  .radar-top-actions .radar-btn {
    min-width: 40px;
    padding: 0;
  }

  .radar-toolbar {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 4px;
    border: 1px solid rgba(80, 130, 180, .25);
    border-radius: 10px;
    background: rgba(5, 11, 20, .88);
    backdrop-filter: blur(8px);
    scrollbar-width: none;
  }

  .radar-toolbar .radar-icon-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .radar-toolbar .radar-icon-btn .radar-tool-label {
    display: none !important;
  }

  .radar-panel {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: calc(112px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(62dvh, calc(100dvh - 180px));
    border-radius: 12px;
  }

  .radar-status {
    left: 8px;
    right: 8px;
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    max-width: none;
    font-size: 10px;
  }

  .radar-measure {
    bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .radar-toast {
    bottom: calc(164px + env(safe-area-inset-bottom, 0px));
  }

  body.ng-radar #ac-card {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    max-height: 40dvh;
  }
}

@media (max-width: 380px) {
  .radar-profiles {
    gap: 1px;
  }

  .radar-profile {
    padding-inline: 5px;
  }

  .radar-legend-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .radar-app *,
  .radar-app *::before,
  .radar-app *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .radar-toast {
    transition: none;
  }
}

/* OSINT timeline */
.radar-timeline{display:flex;flex-direction:column;gap:5px;margin:7px 0}
.radar-timeline-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;min-height:44px;padding:6px 8px;border:1px solid #263a52;border-radius:7px;background:#0b1626;color:#dce6f7;text-align:left;font:inherit;cursor:pointer}
.radar-timeline-item:hover,.radar-timeline-item:focus-visible{border-color:#f0abfc;outline:none}
.radar-timeline-item b{font-size:11px;line-height:1.2;color:#f5d0fe}
.radar-timeline-item span{font-size:9.5px;line-height:1.3;color:#a9bdd5}
.radar-timeline-item small{font-size:8.5px;color:#7890a9}
.radar-timeline-item.selected{border-color:#f0abfc;background:#1b1230}

/* On mobile the status strip sits directly above the bottom tool dock.
   While a bottom sheet is open it must not cover the sheet or compete with
   the sheet's own actions. */
@media (max-width: 760px) {
  .radar-app.radar-panel-open .radar-status {
    display: none !important;
  }
  .radar-app.radar-panel-open .radar-panel {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    max-height: min(70dvh, calc(100dvh - 124px));
  }
}

/* PPI: circular presentation over the same live map. No antenna animation. */
body[data-radar-profile="ppi"] {
  background: #050b14;
}

body[data-radar-profile="ppi"] #map {
  clip-path: circle(42vmin at 50% 50%);
}

.radar-ppi-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(84vmin, 680px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(103, 215, 255, .75);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  box-shadow: 0 0 0 1px rgba(103, 215, 255, .08), 0 0 50px rgba(0, 0, 0, .35);
}

.ppi-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(103, 215, 255, .26);
  border-radius: 50%;
  pointer-events: none;
}

.ppi-ring span {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 3px;
  background: rgba(5, 11, 20, .85);
  color: #8fc9e8;
  font-size: 8px;
  letter-spacing: .03em;
}
.ppi-ring.r25 span,
.ppi-ring.r50 span,
.ppi-ring.r75 span { display: none; }
.ppi-ring.r100 span { right: 6px; bottom: 8px; top: auto; transform: none; }

.ppi-ring.r25 { width: 25%; height: 25%; }
.ppi-ring.r50 { width: 50%; height: 50%; }
.ppi-ring.r75 { width: 75%; height: 75%; }
.ppi-ring.r100 { width: 100%; height: 100%; border-color: rgba(103, 215, 255, .75); }

.ppi-cross,
.ppi-cross::before {
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(103, 215, 255, .18);
  content: "";
}

.ppi-cross {
  width: 100%;
  height: 1px;
  transform: translate(-50%, -50%);
}

.ppi-cross::before {
  width: 1px;
  height: 100%;
  transform: translate(-50%, -50%);
}

.ppi-bearing {
  position: absolute;
  color: #8fc9e8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-shadow: 0 1px 3px #050b14;
}

.ppi-bearing.n { left: 50%; top: -17px; transform: translateX(-50%); }
.ppi-bearing.e { right: 6px; top: 50%; transform: translateY(-50%); }
.ppi-bearing.s { left: 50%; bottom: -17px; transform: translateX(-50%); }
.ppi-bearing.w { left: 6px; top: 50%; transform: translateY(-50%); }

.ppi-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(103, 215, 255, .7);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  background: rgba(5, 11, 20, .8);
  padding: 2px 4px;
  border-radius: 4px;
}

@media (max-width: 760px) {
  .radar-ppi-overlay { width: min(88vmin, 520px); }
  body[data-radar-profile="ppi"] #map { clip-path: circle(44vmin at 50% 50%); }
}

/* Radar does not display the analytics consent banner. Analytics stays
   disabled until the user chooses on the standard map. */
body.ng-radar #analytics-consent,
body.ng-radar #radar-consent-chip {
  display: none !important;
}

/* ── Variant C surface for specialist /radar profiles ───────────────────── */
:root {
  --radar-bg: var(--ng-color-bg, #080d17);
  --radar-surface: rgba(9,17,30,.96);
  --radar-raised: var(--ng-color-surface-raised, #16233a);
  --radar-line: var(--ng-color-border, #22314a);
  --radar-text: var(--ng-color-text, #dce6f7);
  --radar-muted: var(--ng-color-muted, #8fa2c2);
  --radar-accent: var(--ng-color-info, #5b8cff);
  --radar-amber: var(--ng-color-warning, #ffcf70);
  --radar-ok: var(--ng-color-success, #6ee7a0);
  --radar-warn: var(--ng-color-warning, #ffcf70);
  --radar-danger: var(--ng-color-danger, #ff8a97);
}
body.ng-radar { background: var(--radar-bg); font-family: var(--ng-font-sans, system-ui); }
.radar-topbar {
  min-height: 58px; padding: 7px 14px;
  background: linear-gradient(180deg, rgba(9,17,30,.99), rgba(6,11,21,.92));
  border-bottom-color: var(--ng-color-border-strong, #2b3b57);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.radar-brand b { font-size: 14px; letter-spacing: .17em; }
.radar-brand small { color: var(--ng-color-muted, #8fa2c2); }
.radar-profiles .ng-radar-profile-item { border-radius: 9px; }
.radar-profile { border-radius: 8px; color: var(--ng-color-muted, #8fa2c2); }
.radar-profile:hover, .radar-profile:focus-visible { color: var(--ng-color-text-strong, #f5f9ff); border-color: var(--ng-color-border-strong, #2b3b57); }
.radar-profile[aria-current="page"] { background: var(--ng-color-info, #5b8cff); border-color: var(--ng-color-info, #5b8cff); color: #06101c; }
.radar-icon-btn, .radar-btn {
  min-width: 38px; min-height: 38px; border-radius: 9px;
  border-color: var(--ng-color-border, #22314a);
  background: rgba(14,23,39,.86); color: var(--ng-color-text, #dce6f7);
}
.radar-icon-btn:hover, .radar-btn:hover, .radar-icon-btn:focus-visible, .radar-btn:focus-visible {
  border-color: var(--ng-color-info, #5b8cff); color: #fff;
}
.radar-icon-btn[aria-expanded="true"], .radar-btn[aria-expanded="true"], .radar-btn.active {
  border-color: rgba(91,140,255,.6); background: rgba(91,140,255,.14); color: #e8f1ff;
}
.radar-toolbar { left: 12px; top: 64px; gap: 6px; }
.radar-toolbar .radar-icon-btn { width: 40px; min-width: 40px; }
.radar-toolbar .radar-icon-btn .radar-tool-label {
  left: 46px; border-color: var(--ng-color-border-strong, #2b3b57);
  background: var(--radar-surface); border-radius: 7px;
}
.radar-status {
  left: 68px; bottom: 14px; border-radius: 10px;
  border-color: var(--ng-color-border, #22314a); background: rgba(8,13,23,.9);
  color: var(--ng-color-muted, #8fa2c2); font-size: 10.5px;
}
.radar-status b { color: var(--ng-color-text-strong, #f5f9ff); }
.radar-panel {
  top: 60px; right: 12px; width: min(390px, calc(100vw - 24px));
  padding: 14px; border-radius: 15px; border-color: var(--ng-color-border-strong, #2b3b57);
  background: linear-gradient(165deg, rgba(17,29,49,.99), rgba(6,11,21,.99));
  box-shadow: 0 26px 70px rgba(0,0,0,.5);
}
.radar-panel h2 { font-size: 17px; color: var(--ng-color-text-strong, #f5f9ff); }
.radar-panel h3 { color: var(--ng-color-muted, #8fa2c2); }
.radar-panel p, .radar-panel ul, .radar-panel li { color: var(--ng-color-muted, #8fa2c2); }
.radar-panel a { color: var(--ng-color-info-soft, #9fc0ff); }
.radar-panel .radar-note {
  border-color: rgba(255,176,32,.28); background: rgba(255,176,32,.06); color: #e5d4ab;
}
.radar-panel .radar-panel-close { border-radius: 8px; }
.radar-legend-item { border-color: var(--ng-color-border, #22314a); background: rgba(15,26,44,.62); border-radius: 8px; }
.radar-legend-item b { color: var(--ng-color-text, #dce6f7); }
@media (max-width: 700px) {
  .radar-topbar { min-height: 54px; padding-inline: 9px; }
  .radar-brand b { font-size: 12px; }
  .radar-profile-banner { top: 54px; }
  .radar-toolbar {
    left: 8px; top: 62px; bottom: auto;
    height: auto; max-height: none;
  }
  .radar-panel { top: 60px; right: 8px; padding: 11px; }
}

/* Stage 1: shared NG layers in OSINT. Unavailable controls are visibly
   unavailable without pretending the layer is simply switched off. */
.radar-settings-row[data-unavailable="true"] {
  opacity: .55;
  border-style: dashed;
}
.radar-settings-row[data-unavailable="true"] label { cursor: not-allowed; }
.radar-settings-row input[type="checkbox"]:disabled { cursor: not-allowed; }
