:root {
  color-scheme: dark;
  --bg: #05080c;
  --bg-alt: #0a1218;
  --panel: rgba(10, 18, 24, 0.84);
  --panel-strong: rgba(14, 24, 31, 0.96);
  --line: rgba(255, 183, 77, 0.18);
  --line-strong: rgba(255, 183, 77, 0.34);
  --text: #d8dee6;
  --muted: #8f9aa8;
  --amber: #ffb74d;
  --amber-bright: #ffd07a;
  --steel: #6f8296;
  --glow: 0 0 18px rgba(255, 183, 77, 0.22);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top, rgba(255, 183, 77, 0.08), transparent 34%),
    linear-gradient(180deg, #09131a 0%, #05080c 55%, #04070a 100%);
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--mono);
  background:
    linear-gradient(180deg, rgba(255, 183, 77, 0.05), transparent 18%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 5px
    );
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 40px;
}

.site-header,
.panel,
.site-footer {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.site-header {
  padding: 24px;
  border-radius: 24px;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--amber);
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.title-block {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
}

#mission-name,
.log-panel h2,
.hero-panel h2 {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#mission-name {
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 0.96;
}

.tagline,
.panel-copy,
.metric-copy,
.credit-line,
.site-footer {
  color: var(--muted);
}

.tagline {
  margin: 12px 0 0;
  max-width: 40rem;
  line-height: 1.6;
}

.ship-block {
  min-width: 220px;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 183, 77, 0.04);
  text-align: right;
}

.ship-block strong {
  display: block;
  margin-top: 8px;
  color: var(--amber-bright);
  font-size: 1.12rem;
  letter-spacing: 0.16em;
}

.dashboard {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.panel {
  border-radius: 24px;
  padding: 22px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-copy {
  margin: 0;
  max-width: 22rem;
  line-height: 1.55;
  text-align: right;
}

.hero-panel {
  background:
    radial-gradient(circle at top left, rgba(255, 183, 77, 0.1), transparent 30%),
    var(--panel-strong);
}

.hero-figure {
  margin: 0;
}

.hero-viewport {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at center, rgba(255, 183, 77, 0.12), transparent 44%),
    #020304;
  min-height: 260px;
}

#jupiter-image {
  width: 100%;
}

.hero-fallback {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 24px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--amber);
}

/* the [hidden] attribute must win over display:grid, or the "unavailable"
   fallback shows even when the telescope image loaded fine */
.hero-fallback[hidden] {
  display: none;
}

.credit-line {
  margin-top: 12px;
  font-size: 0.92rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.clock-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px;
  grid-column: span 2;
}

.met-clock {
  margin: 18px 0 24px;
  color: var(--amber-bright);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.92;
  letter-spacing: 0.1em;
  text-shadow: 0 0 18px rgba(255, 183, 77, 0.34), 0 0 32px rgba(255, 183, 77, 0.16);
  word-break: break-word;
}

.phase-band {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

#phase-label {
  display: block;
  margin-top: 9px;
  color: var(--text);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
}

.metric-panel {
  min-width: 0;
}

.metric-value {
  display: block;
  margin: 18px 0 10px;
  color: var(--amber-bright);
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  letter-spacing: 0.08em;
}

.metric-copy {
  margin: 0;
  line-height: 1.6;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 183, 77, 0.12);
}

.timeline-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline-stamp {
  color: var(--steel);
}

.timeline-label {
  line-height: 1.55;
}

.timeline-item-logged .timeline-stamp,
.timeline-item-logged .timeline-label {
  color: var(--amber-bright);
}

.timeline-item-upcoming {
  opacity: 0.56;
}

.site-footer {
  margin-top: 20px;
  padding: 18px 22px;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 960px) {
  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clock-panel {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 20px;
  }

  .site-header,
  .panel,
  .site-footer {
    border-radius: 20px;
  }

  .title-block,
  .panel-header {
    flex-direction: column;
    align-items: start;
  }

  .ship-block,
  .panel-copy {
    width: 100%;
    text-align: left;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .clock-panel {
    grid-column: span 1;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .met-clock {
    font-size: clamp(1.85rem, 10vw, 3rem);
  }
}
