/* Shared NPN tactical site header for non-map pages. */
.npn-site-classbar,
.npn-site-header,
.npn-site-header * {
  box-sizing: border-box;
}

.npn-site-classbar {
  position: relative;
  z-index: 80;
  display: grid;
  min-height: 18px;
  place-items: center;
  padding: 2px 10px;
  background: #1b7a3d;
  color: #fff;
  font: 600 10px "Saira Condensed", "Arial Narrow", Arial, sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.npn-site-header {
  --site-bg: #0c0e0d;
  --site-surface: #111513;
  --site-surface-2: #161b18;
  --site-surface-3: #1b221d;
  --site-inset: #0b0f0d;
  --site-line: #2a322c;
  --site-line-strong: #3c4a40;
  --site-green: #46e06b;
  --site-green-dim: #2ea043;
  --site-amber: #ffb84d;
  --site-orange: #ff8a3d;
  --site-red: #e5484d;
  --site-blue: #6cb2ff;
  --site-text: #d7e0d9;
  --site-text-bright: #eff5f0;
  --site-muted: #8ca394;
  position: relative;
  z-index: 80;
  border-bottom: 1px solid var(--site-line-strong);
  background: var(--site-surface);
  color: var(--site-text);
  font-family: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .32);
}

.npn-site-primary {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 0 16px;
}

.npn-site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.npn-site-logo {
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--site-green-dim);
  background: #060707;
  color: var(--site-green);
  font: 700 14px "Saira Condensed", "Arial Narrow", Arial, sans-serif;
  letter-spacing: .04em;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  overflow: hidden;
  padding: 0;
}

.npn-site-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(70, 224, 107, .35));
}

.npn-site-title {
  color: var(--site-text-bright);
  font: 700 22px "Saira Condensed", "Arial Narrow", Arial, sans-serif;
  letter-spacing: .11em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.npn-site-subtitle {
  margin-top: 2px;
  color: var(--site-muted);
  font-size: 9px;
  letter-spacing: .06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.npn-site-readouts {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  min-width: 0;
}

.npn-site-cell {
  display: grid;
  gap: 1px;
  text-align: right;
}

.npn-site-cell .cap {
  color: var(--site-muted);
  font: 500 9px "Saira Condensed", "Arial Narrow", Arial, sans-serif;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.npn-site-cell .val {
  color: var(--site-text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

#npnSiteDataAge.tac-ok { color: var(--site-green); }
#npnSiteDataAge.tac-warn { color: var(--site-amber); }
#npnSiteDataAge.tac-alert { color: #ff6b5e; }

.npn-site-meshcon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #9aa7a0;
  background: var(--site-inset);
  color: #9aa7a0;
  font: 700 12px "Saira Condensed", "Arial Narrow", Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.npn-site-meshcon[data-level="5"] {
  border-color: var(--site-green);
  color: var(--site-green);
  box-shadow: 0 0 8px rgba(70, 224, 107, .35);
}

.npn-site-meshcon[data-level="4"] {
  border-color: var(--site-green-dim);
  color: var(--site-green-dim);
}

.npn-site-meshcon[data-level="3"] {
  border-color: var(--site-amber);
  color: var(--site-amber);
}

.npn-site-meshcon[data-level="2"] {
  border-color: var(--site-orange);
  color: var(--site-orange);
}

.npn-site-meshcon[data-level="1"] {
  border-color: var(--site-red);
  background: var(--site-red);
  color: #060707;
}

.npn-site-led {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: currentColor;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4);
}

.npn-site-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 5px 16px;
  overflow-x: auto;
  border-top: 1px solid var(--site-line);
  scrollbar-width: none;
}

.npn-site-actions::-webkit-scrollbar {
  display: none;
}

.npn-site-viewgroup,
.npn-site-quietlinks {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
}

.npn-site-viewgroup {
  border: 1px solid var(--site-line-strong);
  gap: 0;
  margin-right: 6px;
}

.npn-site-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
  overflow: visible;
  border: 1px solid var(--site-line-strong);
  background: var(--site-surface-2);
  color: var(--site-text);
  font: 600 11px "Saira Condensed", "Arial Narrow", Arial, sans-serif;
  letter-spacing: .10em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.npn-site-viewgroup .npn-site-btn {
  border: 0;
  border-left: 1px solid var(--site-line);
}

.npn-site-viewgroup .npn-site-btn:first-child {
  border-left: 0;
}

.npn-site-btn:hover,
.npn-site-btn[aria-current="page"] {
  border-color: var(--site-green-dim);
  background: var(--site-surface-3);
  color: var(--site-text-bright);
}

.npn-site-btn[aria-current="page"] {
  color: var(--site-green);
  box-shadow: inset 0 -2px 0 var(--site-green);
}

@media (max-width: 1180px) {
  .npn-site-subtitle {
    display: none;
  }

  .npn-site-readouts {
    gap: 10px;
  }
}

@media (max-width: 760px) {
  .npn-site-classbar {
    min-height: 14px;
    font-size: 8px;
    letter-spacing: .14em;
  }

  .npn-site-primary {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
    min-height: 0;
    padding: 10px 12px;
  }

  .npn-site-brand {
    width: 100%;
  }

  .npn-site-title {
    font-size: 18px;
    letter-spacing: .08em;
    white-space: normal;
  }

  .npn-site-logo {
    width: 48px;
    height: 48px;
  }

  .npn-site-readouts {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .npn-site-cell {
    text-align: left;
  }

  .npn-site-actions {
    padding: 6px 12px;
  }
}

@media (max-width: 520px) {
  .npn-site-cell-data {
    display: none;
  }

  .npn-site-readouts {
    justify-content: space-between;
  }

  .npn-site-meshcon {
    margin-left: auto;
  }
}

@media (max-width: 430px) {
  .npn-site-meshcon {
    padding: 0 9px;
  }
}
