body.sattrack-page {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.map-wrap {
  width: min(96vw, 1200px);
  margin: 1.5rem auto 2rem;
  padding: 0 1rem;
}

.tracker-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tracker-heading h1 {
  margin-bottom: 0.3rem;
}

.data-source-link {
  flex: 0 0 auto;
  font-size: 0.9rem;
}

.category-controls {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid #d2d8df;
  border-radius: 10px;
  background: rgba(248, 249, 250, 0.96);
}

.category-controls legend {
  width: auto;
  margin: 0;
  padding: 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.category-controls > p {
  margin: 0 0 0.75rem;
  color: #555f69;
  font-size: 0.86rem;
}

.category-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
}

.category-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid #dde1e6;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  font-size: 0.88rem;
}

.category-option:hover {
  border-color: #aeb8c4;
}

.category-option input {
  flex: 0 0 auto;
}

.category-option:has(input:focus-visible) {
  outline: 3px solid rgba(0, 123, 255, 0.25);
  outline-offset: 1px;
}

.category-option:has(input:checked) {
  border-color: #9da9b6;
  box-shadow: inset 0 0 0 1px rgba(75, 88, 102, 0.1);
}

.category-dot {
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 50%;
}

.category-featured {
  background: #f5a623;
}

.category-weather {
  background: #1e88e5;
}

.category-communications {
  background: #d81b60;
}

.category-navigation {
  background: #2eaf62;
}

.category-scientific {
  background: #8e5ad7;
}

.category-miscellaneous {
  background: #607d8b;
}

.category-count {
  margin-left: auto;
  color: #66717c;
  font-size: 0.78rem;
}

.tracker-summary {
  display: flex;
  gap: 0.55rem 1.25rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  color: #3f4650;
  font-size: 0.88rem;
}

.station-key {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.station-key-label {
  min-width: 2.1rem;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.station-key-iss {
  background: #1976d2;
}

.station-key-css {
  background: #d32f2f;
}

#mapid {
  width: 100%;
  height: min(62vh, 620px);
  min-height: 430px;
  border: 1px solid #c7ced8;
  border-radius: 10px;
  background: #dce5ea;
  box-shadow: 0 0.35rem 1rem rgba(25, 42, 62, 0.12);
}

.satellite-canvas-layer {
  pointer-events: none;
}

.satellite-marker {
  filter: drop-shadow(0 1px 1px rgba(32, 35, 39, 0.45));
}

.satellite-popup {
  min-width: 190px;
}

.satellite-popup strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.satellite-popup dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.6rem;
  margin: 0;
}

.satellite-popup dt,
.satellite-popup dd {
  margin: 0;
}

.satellite-popup dd {
  text-align: right;
}

.map-controls {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.map-status {
  margin: 0;
  color: #444;
}

.tracker-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.info-card {
  padding: 1.15rem;
  border: 1px solid #d5d9de;
  border-radius: 8px;
  background: #f8f9fa;
}

.info-card h2 {
  font-size: 1.1rem;
}

.info-card p:last-child {
  margin-bottom: 0;
}

body.sattrack-page footer.footer {
  padding: 0.4rem 0;
}

body.sattrack-page footer p {
  margin-bottom: 0;
  font-size: 0.7rem;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .map-wrap {
    width: 100%;
    margin-top: 1rem;
    padding: 0 0.75rem;
  }

  .tracker-heading {
    align-items: start;
    flex-direction: column;
  }

  #mapid {
    height: 55vh;
    min-height: 360px;
  }

  .tracker-cards {
    grid-template-columns: 1fr;
  }

  .category-options {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1050px) {
  .category-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
