:root {
  --void: #030a17;
  --deep: #0a1526;
  --edge: #1c3149;
  --filament: #f7b876;
  --node: #67d3df;
  --ink: #e8f0f5;
  --ink-muted: #8fa3b5;
  --measure: 68ch;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 16.5px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--node); text-decoration-color: color-mix(in srgb, var(--node) 40%, transparent); }
a:hover { color: var(--filament); }

/* ---- masthead + nav ---- */
header.mast {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--void) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--edge);
}
.mast-in {
  max-width: 1100px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.wordmark {
  font-weight: 650; letter-spacing: 0.02em; font-size: 17px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark .accent { color: var(--filament); }
nav.site { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; align-items: center; }
nav.site a {
  color: var(--ink-muted); text-decoration: none; font-size: 15.5px;
  padding: 8px 12px; border-radius: 7px; border: 1px solid transparent;
  line-height: 1.2;
}
nav.site a:hover { color: var(--ink); background: var(--deep); }
nav.site a[aria-current="page"] { color: var(--ink); background: var(--deep); }
/* The two interactive things get a border so they read as instruments rather
   than as two more articles. */
nav.site a.go {
  color: var(--filament); border-color: color-mix(in srgb, var(--filament) 45%, transparent);
}
nav.site a.go:hover { color: #030a17; background: var(--filament); border-color: var(--filament); }
nav.site a.go[aria-current="page"] { color: #030a17; background: var(--filament); }

/* ---- layout ---- */
main { max-width: 1100px; margin: 0 auto; padding: 0 20px 80px; }
.prose { max-width: var(--measure); }
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.12; letter-spacing: -0.02em; margin: 40px 0 12px; }
h2 { font-size: 25px; line-height: 1.2; letter-spacing: -0.01em; margin: 46px 0 10px; }
h3 { font-size: 18.5px; margin: 30px 0 6px; }
.lede { font-size: 19px; color: var(--ink-muted); max-width: var(--measure); }

/* ---- hero ---- */
.hero {
  border-bottom: 1px solid var(--edge);
  background:
    radial-gradient(900px 420px at 22% -10%, color-mix(in srgb, var(--filament) 20%, transparent), transparent 70%),
    radial-gradient(700px 380px at 80% 0%, color-mix(in srgb, var(--node) 11%, transparent), transparent 70%);
}
.hero-in { max-width: 1100px; margin: 0 auto; padding: 56px 20px 44px; }
/* Homepage: the lockup IS the headline. */
.hero.home { background: #000919; }   /* the lockup's own background */
/* Sized so the lockup, the strapline and the animation all land above the
   fold on a laptop; the animation is the thing worth seeing first. */
.hero.home .hero-in { text-align: center; padding: 14px 20px 22px; }
.hero.home .lockup {
  width: 100%; max-width: 430px; height: auto; display: block; margin: 0 auto;
}
.hero.home .lede { margin: -6px auto 0; max-width: 58ch; font-size: 17px; }
.hero-art { margin: 16px auto 0; max-width: 640px; }
.hero-art img {
  width: 100%; height: auto; display: block; border-radius: 12px;
  border: 1px solid var(--edge);
}
.hero p.lede { font-size: 20px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 8px;
  text-decoration: none; font-weight: 550; font-size: 15px;
  border: 1px solid var(--edge); color: var(--ink); background: var(--deep);
}
.btn:hover { border-color: var(--filament); color: var(--ink); }
.btn.primary { background: var(--filament); border-color: var(--filament); color: #030a17; }
.btn.primary:hover { background: var(--node); border-color: var(--node); color: #030a17; }

/* ---- stat band ---- */
.stats {
  display: grid; gap: 1px; background: var(--edge);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border: 1px solid var(--edge); border-radius: 10px; overflow: hidden;
  margin: 34px 0;
}
.stat { background: var(--deep); padding: 16px 18px; }
.stat .n { font-size: 26px; font-weight: 650; color: var(--filament); letter-spacing: -0.02em; }
.stat .k { font-size: 12.5px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.07em; }

/* ---- cards ---- */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 26px 0; }
.card {
  background: var(--deep); border: 1px solid var(--edge); border-radius: 10px;
  padding: 20px; text-decoration: none; color: inherit; display: block;
}
.card:hover { border-color: var(--filament); }
.card h3 { margin: 0 0 6px; color: var(--ink); }
.card p { margin: 0; color: var(--ink-muted); font-size: 15px; }

/* ---- figures + tables ---- */
figure { margin: 28px 0; }
figure img {
  width: 100%; height: auto; border-radius: 8px;
  border: 1px solid var(--edge); display: block;
}
/* Data figures are wide and thin; letting them run the full column makes the
   page all chart and no argument. */
figure:not(.photo) { max-width: 760px; }
figcaption { font-size: 14px; color: var(--ink-muted); margin-top: 8px; max-width: var(--measure); }
table { border-collapse: collapse; width: 100%; margin: 22px 0; font-size: 15px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--edge); }
th { color: var(--ink-muted); font-weight: 550; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
code {
  background: var(--deep); border: 1px solid var(--edge); border-radius: 4px;
  padding: 1px 5px; font-size: 0.9em;
}
.note {
  border-left: 3px solid var(--filament); background: var(--deep);
  padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 24px 0;
  color: var(--ink-muted); font-size: 15px; max-width: var(--measure);
}

/* ---- photographs ---- */
/* Images are illustration, not the point — but a standalone photograph is
   sized by WIDTH, never cropped to a height. Cover-cropping an astrophoto
   throws away the composition, and on the Cygnus group it cut the ends off
   the tidal tail, which is the only reason the picture is there. */
figure.photo { margin: 26px 0; max-width: 760px; }
figure.photo img { border-radius: 10px; }
figure.photo .credit { display: block; margin-top: 5px; font-size: 12.5px; color: #6f8394; }
figure.photo .credit a { color: #6f8394; }
.photo-row {
  display: grid; gap: 16px; margin: 26px 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
/* Side by side, both images get the SAME height — different aspect ratios
   otherwise leave one column short and the row ragged. */
/* In a row, a uniform height is worth a crop: unequal aspect ratios otherwise
   leave one column short and the row ragged. */
.photo-row figure.photo { margin: 0; max-width: none; }
.photo-row figure.photo img { height: 250px; width: 100%; object-fit: cover; }
figure.photo.wide img { max-height: 520px; }
figure.photo.tall img { max-height: 620px; }
/* Instruments are context, not the subject. */
figure.photo.small { max-width: 380px; }

/* ---- pull quote / key idea ---- */
.key {
  border-left: 3px solid var(--node); background: var(--deep);
  padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 26px 0;
  font-size: 17px; color: var(--ink); max-width: var(--measure);
}

/* ---- glossary term ---- */
.term { border-bottom: 1px dotted var(--ink-muted); cursor: help; }

/* ---- footer ---- */
footer.site {
  border-top: 1px solid var(--edge); margin-top: 60px;
  background: var(--deep);
}
.foot-in {
  max-width: 1100px; margin: 0 auto; padding: 30px 20px 44px;
  display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  font-size: 14.5px; color: var(--ink-muted);
}
.foot-in h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink); }
.foot-in ul { list-style: none; margin: 0; padding: 0; }
.foot-in li { margin: 3px 0; }

@media (max-width: 640px) {
  .mast-in { gap: 10px; padding: 9px 16px; }
  nav.site { gap: 13px; width: 100%; margin-left: 0; }
  main, .hero-in, .foot-in { padding-left: 16px; padding-right: 16px; }
}
