/* Compact internal jump to the Terminal / Intranet cards on Home. */
.other-resources-nav {
  width: 100%;
}

.other-resources-code {
  font-family: "Orbitron", "Rajdhani", sans-serif;
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--gold-bright, #ffd96e);
}

.network-services {
  margin-top: 18px;
  scroll-margin-top: 104px;
}

/* Portal-level resource cards: intentionally compact, with the approved
   Terminal and Intranet artwork acting as a clear system identifier. */
.network-services .network-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  column-gap: 16px;
  align-items: center;
  overflow: hidden;
}

.network-services .network-card > .portal-resource-art {
  grid-column: 1;
  grid-row: 1 / -1;
  display: grid;
  place-items: center;
  width: 108px;
  aspect-ratio: 1;
  align-self: center;
  border: 1px solid rgba(105,186,255,.24);
  border-radius: 10px;
  background:
    radial-gradient(circle, rgba(105,186,255,.10), transparent 70%),
    rgba(1,8,18,.52);
  overflow: hidden;
}

.network-services .network-card[data-portal-resource="intranet"] > .portal-resource-art {
  border-color: rgba(228,175,46,.30);
}

.network-services .portal-resource-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.network-services .network-card > :not(.portal-resource-art) {
  grid-column: 2;
}

/* Home and Basic Training are portal-level destinations, so their new
   rendered artwork should breathe rather than being cropped into a circle. */
.nav-code.station-icon-host:has(.station-icon[data-station="directory"]),
.nav-code.station-icon-host:has(.station-icon[data-station="general"]),
.page-id.station-icon-host:has(.station-icon[data-station="directory"]),
.page-id.station-icon-host:has(.station-icon[data-station="general"]) {
  border-radius: 9px;
  overflow: hidden;
}

.nav-code.station-icon-host:has(.station-icon[data-station="directory"]) .station-icon-image,
.nav-code.station-icon-host:has(.station-icon[data-station="general"]) .station-icon-image,
.page-id.station-icon-host:has(.station-icon[data-station="directory"]) .station-icon-image,
.page-id.station-icon-host:has(.station-icon[data-station="general"]) .station-icon-image {
  object-fit: contain;
}

/* Slightly thicker mobile/tablet top bar and a more usable hamburger target. */
@media (max-width: 900px) {
  .topbar {
    min-height: 82px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .menu-button {
    width: 52px;
    height: 52px;
    border-radius: 11px;
    font-size: 1.35rem;
    line-height: 1;
  }

  .sidebar {
    top: 82px;
  }

  .nav-scrim {
    inset: 82px 0 0;
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 80px;
  }

  .sidebar {
    top: 80px;
  }

  .nav-scrim {
    inset: 80px 0 0;
  }
}

@media (orientation: landscape) and (max-height: 650px) and (min-width: 560px) and (max-width: 1180px) {
  .topbar {
    min-height: 68px;
    padding: 8px 12px;
  }

  .menu-button {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .app-layout {
    min-height: calc(100vh - 68px);
  }

  .sidebar {
    top: 68px;
  }

  .nav-scrim {
    inset: 68px 0 0;
  }

  .network-services {
    scroll-margin-top: 78px;
  }

  .network-services .network-card {
    min-height: 110px;
    grid-template-columns: 88px minmax(0, 1fr);
    column-gap: 12px;
  }

  .network-services .network-card > .portal-resource-art {
    width: 88px;
  }
}

@media (max-width: 560px) {
  .network-services .network-card {
    min-height: 112px;
    grid-template-columns: 82px minmax(0, 1fr);
    column-gap: 12px;
  }

  .network-services .network-card > .portal-resource-art {
    width: 82px;
  }
}
