.asteroid-explorer-stage {
  padding: clamp(0.8rem, 2.5vw, 1.75rem) 0 clamp(2rem, 5vw, 4rem);
}

.asteroid-explorer-layout {
  width: min(100%, 76rem);
}

.explorer-back-link {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 14px rgba(33, 37, 41, 0.14);
  color: #0056b3;
  font-weight: 700;
}

.explorer-back-link:hover {
  color: #003f84;
  text-decoration: none;
}

.asteroid-explorer-panel {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(110, 193, 255, 0.35);
  border-radius: 22px;
  background: rgba(6, 14, 33, 0.97);
  box-shadow: 0 18px 50px rgba(5, 11, 27, 0.43);
  color: #eef8ff;
}

.asteroid-explorer-header {
  max-width: 52rem;
  margin: 0 auto;
  text-align: center;
}

.asteroid-explorer-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

.asteroid-explorer-header p:last-child {
  margin: 0.5rem 0 0;
  color: #bdcee0;
}

.explorer-kicker,
.detail-kicker {
  margin: 0 0 0.12rem;
  color: #65d9ff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.asteroid-controls {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(16rem, 1.5fr);
  gap: 0.8rem;
  width: min(100%, 62rem);
  margin: 1.25rem auto 0;
  padding: 0.85rem;
  border: 1px solid rgba(113, 190, 247, 0.28);
  border-radius: 13px;
  align-items: end;
  background: rgba(16, 34, 65, 0.92);
}

.asteroid-control {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.asteroid-control label {
  margin-bottom: 0.3rem;
  color: #dceeff;
  font-size: 0.82rem;
  font-weight: 700;
}

.asteroid-control input,
.asteroid-control select {
  width: 100%;
  min-height: 44px;
  padding: 0.48rem 0.6rem;
  border: 1px solid #78abd0;
  border-radius: 8px;
  background: #fff;
  color: #172737;
  font: inherit;
}

.asteroid-control small {
  min-height: 1rem;
  margin-top: 0.25rem;
  color: #9db4c9;
  font-size: 0.7rem;
}

.explorer-button {
  display: inline-flex;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid #4fc6f1;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  background: #087eae;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.explorer-button:hover {
  border-color: #a4e8ff;
  background: #0b91c5;
  color: #fff;
  text-decoration: none;
}

.asteroid-status {
  min-height: 1.5rem;
  margin: 0.85rem auto;
  color: #d5e8f7;
  font-weight: 700;
  text-align: center;
}

.asteroid-status.is-error {
  color: #ff9d90;
}

.asteroid-summary {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto 0.8rem;
}

.asteroid-summary > div {
  min-width: 10rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(112, 190, 247, 0.3);
  border-radius: 9px;
  background: rgba(18, 39, 72, 0.9);
  text-align: center;
}

.asteroid-summary span,
.asteroid-summary output {
  display: block;
}

.asteroid-summary span {
  color: #9fb8cf;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.asteroid-summary output {
  margin-top: 0.08rem;
  color: #fff;
  font-weight: 700;
}

.asteroid-plot-wrap {
  position: relative;
  width: min(100%, 58rem);
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid #378db8;
  border-radius: 16px;
  background: #020612;
  box-shadow: 0 0 0 2px rgba(68, 185, 238, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.42);
}

#asteroidPlot {
  display: block;
  width: 100%;
  height: auto;
  background: #020612;
  cursor: pointer;
  touch-action: manipulation;
}

.asteroid-legend {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  display: flex;
  gap: 0.45rem 0.8rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(134, 207, 241, 0.3);
  border-radius: 8px;
  flex-wrap: wrap;
  background: rgba(3, 10, 25, 0.82);
  color: #d9ebf7;
  font-size: 0.67rem;
}

.asteroid-legend span {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}

.legend-dot,
.legend-earth,
.legend-ring {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
}

.legend-normal {
  background: #ffb12f;
  box-shadow: 0 0 5px #ffb12f;
}

.legend-hazard {
  border: 2px solid #ff554b;
  background: #ff9c37;
}

.legend-earth {
  background: #258cd2;
  box-shadow: inset -3px -2px 4px #082d5b;
}

.legend-ring {
  border: 1px dashed #7bc9ec;
  background: transparent;
}

.plot-help,
.plot-caveat,
.asteroid-credit {
  max-width: 58rem;
  margin: 0.7rem auto 0;
  color: #9fb5ca;
  font-size: 0.78rem;
  text-align: center;
}

.plot-caveat {
  padding: 0.65rem 0.8rem;
  border-left: 3px solid #4db8e5;
  background: rgba(18, 38, 68, 0.7);
  text-align: left;
}

.asteroid-credit a {
  color: #75dcff;
  font-weight: 700;
}

.asteroid-details {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(18rem, 1.8fr) auto;
  gap: 1rem;
  width: min(100%, 58rem);
  margin: 1rem auto 0;
  padding: 1rem;
  border: 1px solid rgba(111, 194, 252, 0.35);
  border-radius: 13px;
  align-items: center;
  background: rgba(17, 36, 66, 0.92);
}

.asteroid-details[hidden] {
  display: none;
}

.asteroid-details h2 {
  margin: 0;
  font-size: 1.35rem;
}

.hazard-label {
  margin: 0.25rem 0 0;
  color: #b8cfdf;
  font-size: 0.8rem;
}

.hazard-label.is-hazardous {
  color: #ff9c8d;
  font-weight: 700;
}

.asteroid-details dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
  margin: 0;
}

.asteroid-details dl div {
  min-width: 0;
}

.asteroid-details dt {
  color: #99b5cc;
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.asteroid-details dd {
  margin: 0.1rem 0 0;
  color: #fff;
  font-size: 0.86rem;
}

.explorer-link-button {
  text-align: center;
}

.explorer-back-link:focus-visible,
.explorer-button:focus-visible,
.asteroid-control input:focus-visible,
.asteroid-control select:focus-visible {
  outline: 3px solid #8bdcff;
  outline-offset: 3px;
}

@media (max-width: 767.98px) {
  .asteroid-controls,
  .asteroid-details {
    grid-template-columns: 1fr;
  }

  .asteroid-select-control {
    grid-row: auto;
  }

  .asteroid-details dl {
    grid-template-columns: 1fr 1fr;
  }

  .asteroid-legend {
    position: static;
    border-width: 1px 0 0;
    border-radius: 0;
  }
}

@media (max-width: 479.98px) {
  .asteroid-explorer-panel {
    padding: 0.9rem 0.55rem 1.15rem;
    border-radius: 15px;
  }

  .asteroid-details dl {
    grid-template-columns: 1fr;
  }
}
