:root {
  --ink: #12183a;
  --ink-lift: #1b2354;
  --line: #2e3a7a;
  --line-soft: #222b62;
  --text: #ece7d8;
  --muted: #a2a9d2;
  --gold: #f5c04a;
  --earth: #5da9ff;
  --panel: #161d45;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at 50% 0%, var(--ink-lift) 0%, var(--ink) 60%) fixed;
  color: var(--text);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-underline-offset: 0.2em; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.page {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.eyebrow {
  margin: 0;
  font: 600 0.8rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

h1 {
  margin: 0.6rem 0 0;
  font: 500 clamp(2rem, 5vw, 3rem)/1.1 var(--serif);
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 0.5rem;
  font: 600 0.8rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Headline numbers */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.big {
  padding: 1.1rem 1.25rem 1rem;
  background: var(--panel);
  border-left: 4px solid var(--gold);
  border-radius: 2px 10px 10px 2px;
}
.big-label { margin: 0; font-size: 0.85rem; color: var(--muted); }
.big-value {
  margin: 0.3rem 0 0;
  font: 400 clamp(1.9rem, 4.6vw, 2.8rem)/1.1 var(--serif);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.big-unit { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--muted); }

/* Distance visual: a linear ruler, Earth on the left, Voyager 1 on the right */
.journey {
  --edge: 0.7rem;
  margin-top: 2rem;
  padding: 0 0 0.25rem;
}

.landmarks {
  position: relative;
  height: 3rem;
  margin: 0 var(--edge);
}
.landmark {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  padding-bottom: 0.55rem;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.25;
  color: var(--muted);
  white-space: nowrap;
}
.landmark b { display: block; font-weight: 500; color: var(--text); }
.landmark::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 0.5rem;
  border-left: 1px dashed var(--muted);
}

.track {
  position: relative;
  height: 1.5rem;
  margin: 0 var(--edge);
}
.beam {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--earth), var(--gold));
  opacity: 0.55;
}
.ticks { position: absolute; inset: 0; }
.tick {
  position: absolute;
  top: 50%;
  height: 0.7rem;
  margin-top: -0.35rem;
  border-left: 1px solid var(--muted);
  opacity: 0.6;
}
.tick.major { height: 1.1rem; margin-top: -0.55rem; opacity: 1; }

.dot {
  position: absolute;
  top: 50%;
  width: 1.1rem;
  height: 1.1rem;
  margin: -0.55rem 0 0 -0.55rem;
  border-radius: 50%;
}
.dot-earth { left: 0; background: var(--earth); box-shadow: 0 0 14px 2px rgba(93, 169, 255, 0.6); }
.dot-probe { left: 100%; background: var(--gold); box-shadow: 0 0 16px 3px rgba(245, 192, 74, 0.6); }

.pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.6rem;
  height: 0.6rem;
  margin: -0.3rem 0 0 -0.3rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.85);
  animation: travel 5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes travel {
  0% { left: 0; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.tick-labels {
  position: relative;
  height: 1.4rem;
  margin: 0.2rem var(--edge) 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tick-label { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }

.ends {
  display: flex;
  justify-content: space-between;
  margin: 0.1rem 0 0;
  font: 600 0.95rem/1.2 var(--sans);
}
.end-earth { color: var(--earth); }
.end-probe { color: var(--gold); }

.journey-note { margin: 0.9rem 0 0; font-size: 0.82rem; color: var(--muted); max-width: 60ch; }

/* Status list */
.stats { margin-top: 2rem; }
dl { margin: 0; }
dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line-soft);
}
dl > div:last-child { border-bottom: 1px solid var(--line-soft); }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.foot { margin-top: 1.5rem; }
.status { margin: 0; font-size: 0.82rem; color: var(--muted); }
.status.error { color: #ffb4a8; }
.status button {
  margin-left: 0.4rem;
  font: inherit;
  color: var(--text);
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  cursor: pointer;
}
.source { margin: 0.5rem 0 0; font-size: 0.78rem; color: var(--muted); max-width: 60ch; }

@media (max-width: 36rem) {
  .page { padding: 1.5rem 1rem 2.5rem; }
  .landmark { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; display: none; }
}
