:root {
  --bg: #07080b;
  --panel: #0e1015;
  --line: #1c1f27;
  --text: #e7e4dc;
  --muted: #8d8b85;
  --faint: #5b5a56;
  --accent: #d9b77a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; }

/* ---------- index ---------- */
.masthead { padding: clamp(48px, 10vw, 120px) 16px clamp(28px, 5vw, 56px); text-align: center; }
.masthead h1 {
  margin: 0; font: 400 clamp(40px, 7vw, 76px)/1.05 var(--serif); letter-spacing: .01em;
}
.masthead p { margin: 14px auto 0; max-width: 40ch; color: var(--muted); }
.masthead .stats {
  margin-top: 22px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
}

.grid {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px;
  padding: 0 6px 6px; max-width: 2200px; margin: 0 auto;
}
.tile {
  position: relative; overflow: hidden; display: block;
  flex: calc(var(--r) * 100) 1 calc(var(--r) * 280px);
  aspect-ratio: var(--r); text-decoration: none;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .4s; }
.tile .cap {
  position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78));
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
}
.tile .cap strong { font: 400 19px/1.25 var(--serif); }
.tile .cap em { font-style: normal; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #c9c5bb; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.03); }
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; transform: none; }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.filler { flex: 1e4 1 0; }
@media (hover: none) { .tile .cap { opacity: 1; transform: none; } }
@media (max-width: 560px) { .tile { flex-basis: 100%; } }

.draft {
  position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 3px;
  background: #b4442f; color: #fff; font: 600 11px/1.6 var(--sans); letter-spacing: .1em; text-transform: uppercase;
}
.bar .draft { position: static; margin-left: 12px; }

/* ---------- detail ---------- */
.bar {
  display: flex; align-items: center; padding: 14px 16px;
}
.home { text-decoration: none; color: var(--muted); font-size: 14px; letter-spacing: .04em; }
.home:hover { color: var(--text); }

.hero { margin: 0; padding: 0 0 8px; }
.hero .zoom {
  all: unset; cursor: zoom-in; display: block; margin: 0 auto;
  width: fit-content; max-width: 100%;
}
.hero img {
  max-width: 100vw; max-height: calc(100vh - 110px); width: auto; height: auto; margin: 0 auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.hero .zoom { position: relative; }
.hero .marker { position: absolute; width: 0; height: 0; pointer-events: none; }
.hero .marker svg { position: absolute; left: -40px; top: -6px; overflow: visible; }
.hero .marker circle, .hero .marker line { fill: none; stroke: #ff3b2f; stroke-width: 1.8; }
.hero .marker line { stroke-width: 2.2; stroke-linecap: round; }
.hero .zoom:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hero figcaption { text-align: center; color: var(--faint); font-size: 12px; padding: 12px 16px 0; letter-spacing: .04em; }

.info { max-width: 920px; margin: 0 auto; padding: 40px 16px 24px; }
.head h1 { margin: 0 0 14px; font: 400 clamp(32px, 5vw, 52px)/1.1 var(--serif); }
.lede { font: 400 20px/1.55 var(--serif); color: #d6d2c8; margin: 0 0 12px; max-width: 62ch; }
.note {
  margin: 16px 0 0; padding: 10px 14px; border-left: 2px solid var(--accent);
  background: var(--panel); color: var(--muted); font-size: 14px;
}

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px 32px;
  margin: 40px 0; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts div { min-width: 0; }
.facts dt { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.facts dd { margin: 0; color: var(--text); }

.block { margin: 0 0 36px; }
.block h2 {
  font: 400 13px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 14px; display: flex; gap: 12px; align-items: baseline;
}
.block h2 small { font-size: 13px; letter-spacing: .04em; text-transform: none; color: var(--accent); }
.block p { margin: 0; color: #c9c6be; max-width: 70ch; }
.scroll { overflow-x: auto; }
.acq { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.acq th, .acq td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-top: 1px solid var(--line); }
.acq thead th { border-top: 0; font-size: 11px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding-top: 0; }
.acq tbody th { font: 400 18px/1.3 var(--serif); color: var(--accent); width: 90px; }
.acq b { font-weight: 500; }
.acq span { color: var(--muted); font-size: 13px; }

.dl a {
  display: inline-block; padding: 10px 18px; border: 1px solid #3a3a3a; border-radius: 999px;
  text-decoration: none; font-size: 14px; color: var(--text); transition: border-color .2s, background .2s;
}
.dl a:hover { border-color: var(--accent); background: rgba(217, 183, 122, .06); }

.pn { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.pn a { text-decoration: none; color: var(--muted); font: 400 17px/1.3 var(--serif); max-width: 48%; }
.pn a:hover { color: var(--text); }
.pn .next { text-align: right; margin-left: auto; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  max-width: 2200px; margin: 0 auto; padding: 40px 16px 48px; color: var(--faint); font-size: 12px; letter-spacing: .04em;
}

/* ---------- full-resolution viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; background: #000; touch-action: none; }
.viewer[hidden] { display: none; }
.viewer .stage { position: absolute; inset: 0; overflow: hidden; cursor: grab; }
.viewer .stage.drag { cursor: grabbing; }
.viewer .stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; -webkit-user-drag: none; }
.vbar {
  position: absolute; inset: 0 0 auto 0; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px 10px 16px; background: linear-gradient(rgba(0, 0, 0, .7), transparent); pointer-events: none;
}
.vhint { color: #9a978f; font-size: 12px; letter-spacing: .04em; }
.vclose {
  pointer-events: auto; background: rgba(255, 255, 255, .08); border: 0; color: #fff; width: 40px; height: 40px;
  border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer;
}
.vclose:hover { background: rgba(255, 255, 255, .18); }
.viewer .loading::after {
  content: "Loading full resolution…"; position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  color: #9a978f; font-size: 12px;
}
@media (max-width: 560px) { .vhint { display: none; } }
@media (prefers-reduced-motion: reduce) { .tile img, .tile .cap { transition: none; } }

/* ---------- animation, notes, observatory ---------- */
.hero video.anim { display: block; margin: 0 auto; max-width: 100vw; max-height: calc(100vh - 110px); width: auto; height: auto; background: #000; }
.anote { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.play {
  position: absolute; left: 12px; top: 10px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; color: #fff; background: rgba(0, 0, 0, .55);
}
.observatory { max-width: 1400px; margin: 0 auto; padding: clamp(56px, 8vw, 110px) 16px 0; }
.observatory h2 { margin: 0 0 8px; font: 400 clamp(28px, 4vw, 40px)/1.1 var(--serif); text-align: center; }
.observatory .intro { margin: 0 auto 32px; max-width: 60ch; text-align: center; color: var(--muted); }
.obs-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.obs { margin: 0; }
.obs img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px; }
.obs figcaption { padding: 12px 2px 0; color: var(--muted); font-size: 14px; }
.obs figcaption strong { display: block; color: var(--text); font: 400 19px/1.3 var(--serif); margin-bottom: 2px; }

/* ---------- at a glance sidebar: beside the image on wide screens ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 0 36px; max-width: 2100px; margin: 0 auto; padding: 0 24px; align-items: start; }
.layout .col { min-width: 0; }
.layout .hero img, .layout .hero video.anim { max-width: 100%; }
.info { max-width: 920px; padding-left: 0; padding-right: 0; }
.pn { max-width: 2100px; margin: 24px auto 0; padding: 24px 24px 0; }
.glance {
  position: sticky; top: 16px; margin-top: 0; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 22px 22px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  scrollbar-width: thin;
}
.glance h2 { margin: 0 0 16px; font: 400 13px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.glance dl { margin: 0; display: grid; gap: 14px; }
.glance dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.glance dd { margin: 0; font-size: 15px; line-height: 1.45; }
.glance dd span { color: var(--muted); font-size: 13px; }
.skymap { display: block; width: 100%; height: auto; margin: 20px 0 6px; }
.skymap .sky { fill: #0a0c12; stroke: var(--line); }
.skymap .never { fill: rgba(255, 255, 255, .045); }
.skymap .grid line { stroke: #1b1f29; stroke-width: .6; }
.skymap .gal { fill: none; stroke: #6f7fa8; stroke-width: 5; stroke-opacity: .28; stroke-linecap: round; }
.skymap .ecl { fill: none; stroke: var(--accent); stroke-width: .8; stroke-dasharray: 3 3; stroke-opacity: .6; }
.skymap .lab text { fill: var(--faint); font: 8px var(--sans); }
.skymap .dot { fill: #fff; }
.skymap .ring { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.maplegend { margin: 0 0 4px; color: var(--faint); font-size: 11px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.maplegend .k { display: inline-block; width: 14px; height: 4px; margin-right: 4px; vertical-align: middle; border-radius: 2px; }
.maplegend .k.gal { background: #6f7fa8; opacity: .5; height: 5px; }
.maplegend .k.ecl { border-top: 1px dashed var(--accent); height: 0; }
.maplegend .k.never { background: rgba(255, 255, 255, .12); height: 8px; }
.did { margin: 18px 0 0; padding: 16px 0 0 16px; border-top: 1px solid var(--line); color: #c9c6be; font-size: 14px; line-height: 1.5; }
.did li { margin-bottom: 8px; }
.did li::marker { color: var(--accent); }
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; padding: 0; }
  .info { padding-left: 16px; padding-right: 16px; }
  .glance { position: static; max-height: none; margin: 0 16px 36px; }
  .pn { padding: 24px 16px 0; }
}

/* ---------- callout ("spot it") + see-also in the sidebar ---------- */
.callout { margin: 0 0 20px; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.callout h3 { margin: 0 0 10px; font: 400 18px/1.3 var(--serif); color: var(--accent); }
.callout img { width: 100%; height: auto; border-radius: 3px; display: block; }
.callout p { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: #d6d2c8; }
.seealso { display: block; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--accent); text-decoration: none; font-size: 14px; }
.seealso:hover { text-decoration: underline; }

/* ---------- archive running totals across the top of the home page ---------- */
.totals {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  max-width: 2200px; margin: 0 auto; padding: 18px 22px 0;
}
.totals b { display: block; font: 400 clamp(26px, 3.4vw, 40px)/1 var(--serif); color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.totals span { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.totals .r { text-align: right; }
.totals .mid { align-self: center; font-size: 11px; letter-spacing: .2em; color: var(--faint); }
@media (max-width: 560px) { .totals .mid { display: none; } }

/* object labels over the hero image (labels.js) */
.hero { --lc: #d9b77a; --lo: .85; }
.hero .labels { position: absolute; inset: 0; pointer-events: none; display: none; container-type: size; }
.hero.labels-on .labels { display: block; }
.hero .lbl { position: absolute; width: 0; height: 0; color: var(--lc); opacity: var(--lo); font: 500 12px/1.2 var(--sans, system-ui, sans-serif); }
.hero .lbl.t3 { display: none; }
.hero.labels-all .lbl.t3 { display: block; }
.hero .lbl .ring {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  width: max(12px, calc(var(--d) * 1cqw)); aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid currentColor; pointer-events: auto; cursor: help;
}
.hero.labels-all .lbl.t3 .ring { width: max(9px, calc(var(--d) * 1cqw)); border-width: 1px; }
.hero .lbl b, .hero .lbl em {
  position: absolute; left: 10px; top: 0; transform: translateY(-50%); white-space: nowrap;
  text-shadow: 0 0 3px #000, 0 0 6px #000; pointer-events: none;
}
.hero .lbl b { left: calc(max(6px, var(--d, 0) * 0.5cqw) + 6px); }
.hero .lbl b { display: none; font-weight: 600; letter-spacing: .02em; }
.hero .lbl.on b, .hero .lbl.tip b { display: block; }
.hero .lbl em { display: none; top: 1.3em; font-style: normal; font-weight: 400; font-size: 11px; color: #eee;
  background: rgba(7, 8, 11, .85); padding: 4px 7px; border-radius: 4px; transform: none; white-space: normal; width: max-content; max-width: 260px; }
.hero .lbl:hover b, .hero .lbl.tip b, .hero .lbl:hover em, .hero .lbl.tip em { display: block; }
.hero .lbl:hover, .hero .lbl.tip { opacity: 1; z-index: 3; }
.hero .lbl.farthest b::after { content: "  · farthest"; font-weight: 400; opacity: .8; }

.lctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px;
  padding: 12px 16px 0; font-size: 13px; color: var(--muted); }
.lctl .ltoggle { all: unset; cursor: pointer; padding: 6px 14px; border: 1px solid var(--accent); border-radius: 999px;
  color: var(--accent); letter-spacing: .03em; }
.lctl .ltoggle[aria-pressed="true"] { background: var(--accent); color: #07080b; }
.lctl .ltoggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lctl label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.lctl .lcolor { display: inline-flex; align-items: center; gap: 6px; }
.lctl .lcolor button { all: unset; cursor: pointer; width: 18px; height: 18px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.lctl .lcolor button.sel { box-shadow: 0 0 0 2px #07080b, 0 0 0 4px var(--c); }
.lctl input[type=color] { width: 26px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.lctl input[type=range] { width: 110px; accent-color: var(--accent); }
.lctl .lfacts { flex-basis: 100%; text-align: center; margin: 2px 0 0; font-size: 12px; color: var(--faint); display: none; }
.lctl .lfacts b { color: var(--muted); font-weight: 600; }
.hero.labels-on .lctl .lfacts { display: block; }
/* name position chosen by the builder: p-r right, p-l left, p-t above, p-b below the ring */
.hero .lbl { --rr: max(6px, var(--d, 0) * 0.5cqw); }
.hero .lbl.p-l b { left: auto; right: calc(var(--rr) + 6px); }
.hero .lbl.p-l em { left: auto; right: 10px; }
.hero .lbl.p-t b { left: 0; top: calc(-1 * var(--rr) - 12px); transform: translate(-50%, -50%); }
.hero .lbl.p-b b { left: 0; top: calc(var(--rr) + 12px); transform: translate(-50%, -50%); }
.hero .lbl.p-t em, .hero .lbl.p-b em { left: 0; top: calc(var(--rr) + 22px); transform: translateX(-50%); }

/* sky map: small one opens the large one */
.skyopen { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.skyopen:hover .skymap .sky { stroke: var(--accent); }
.skydlg { width: min(1100px, 94vw); max-height: 92vh; padding: 18px 20px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: #0d0f14; color: inherit; }
.skydlg::backdrop { background: rgba(0, 0, 0, .72); }
.skyhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.skyhead h3 { margin: 0; font-size: 17px; font-weight: 500; }
.skyclose { border: 0; background: none; color: var(--faint); font-size: 26px; line-height: 1; cursor: pointer; }
.skyclose:hover { color: #fff; }
.skymap.big { margin: 12px 0 8px; }
.skymap.big .lab text { font-size: 12px; }
.skymap.big .gal { stroke-width: 12; }
.skymap.big .ecl { stroke-width: 1.2; stroke-dasharray: 6 5; }
.skymap.big .months text { fill: var(--faint); font: 12px var(--sans); }
.skymap.big .mcap { fill: var(--faint); font: italic 11px var(--sans); opacity: .8; }
.skymap.big .gc circle { fill: none; stroke: #9fb0d8; stroke-width: 1.2; }
.skymap.big .gc text { fill: #9fb0d8; font: 12px var(--sans); }
.skymap.big .obj { fill: #7d8aa8; stroke: #0d0f14; stroke-width: 1; cursor: pointer; transition: r .12s, fill .12s; }
.skymap.big a:hover .obj, .skymap.big a:focus .obj { fill: var(--accent); r: 7px; }
.skymap.big .tname { fill: #fff; font: 600 15px var(--sans); paint-order: stroke; stroke: #0a0c12; stroke-width: 4px; }
.skynote { margin: 4px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.maplegend .k.obj { width: 8px; height: 8px; border-radius: 50%; background: #7d8aa8; }
/* extra figures under the main image (annotated version etc.) */
.hero.extra { margin-top: 28px; }
.hero .extrahead { font-size: 17px; font-weight: 600; margin: 0 16px 10px; letter-spacing: .01em; }
.hero .extracap { text-align: left; font-size: 13.5px; line-height: 1.6; letter-spacing: 0; color: var(--muted, var(--faint)); }

/* SHO explainer (assets/sho.js, gallery.json "explainer": "sho") */
.shox { margin: 30px 16px 8px; padding: 18px 18px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.shox-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.shox h2 { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: .01em; }
.shox-play { font: 12px var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 3px 11px; cursor: pointer; }
.shox-play:hover { color: var(--text); }
.shox-intro, .shox-card p, .shox-legend, .shox-foot { font: 13.5px/1.6 var(--sans); color: var(--muted); }
.shox-intro { margin: 8px 0 14px; }
.shox-map { display: flex; gap: 18px; align-items: center; }
.shox-map svg { width: 210px; flex: none; }
.shox-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.shox-legend b, .shox-h b { color: var(--text); font-weight: 600; }
.shox i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.shox-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.shox-card { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.25); }
.shox-h { display: flex; flex-direction: column; gap: 4px; font: 13px/1.4 var(--sans); color: var(--muted); }
.shox-chip { font-size: 11.5px; color: var(--faint); }
.shox-chip i { width: 8px; height: 8px; margin: 0 4px 0 8px; }
.shox-chip i:first-child { margin-left: 0; }
.shox-card svg { display: block; width: 100%; height: auto; margin: 8px 0 4px; }
.shox-card p { margin: 0; font-size: 13px; }
.shox-foot { margin: 14px 0 0; font-size: 12.5px; color: var(--faint); }
.shox svg text { font-family: var(--sans); }
.shox .step { font-size: 12.5px; fill: var(--text); }
.shox .step .num { fill: var(--accent); font-weight: 700; }
.shox .lab { font-size: 11px; }
.shox .tiny { font-size: 8.5px; fill: var(--faint); }
.shox .nuc { font-size: 8px; font-weight: 700; fill: #2a2112; text-anchor: middle; }
@media (max-width: 1100px) { .shox-cards { grid-template-columns: 1fr; } .shox-card svg { max-width: 420px; } }
@media (max-width: 560px) { .shox { margin: 24px 8px 8px; padding: 14px; } .shox-map { flex-direction: column; } .shox-map svg { width: 200px; } }
