:root {
  color-scheme: light;
  --paper: #ece8db;
  --ink: #232832;
  --dark: #262c36;
  --lite: #eee9d8;
  --gold: #f6c35c;
  --rule: #aaa391;
  --mono: ui-monospace, "Courier New", monospace;
  --sans: "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); scroll-padding-top: 1rem; }
body { margin: 0; font: 1.075rem/1.56 var(--sans); }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.02; }
a { color: inherit; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
img { display: block; width: 100%; height: auto; }
.wrap { width: min(73rem, 100% - 3.5rem); margin-inline: auto; }
.skip { position: absolute; inset: 1rem auto auto 1rem; z-index: 1; padding: .5rem; background: var(--paper); }
.skip:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }

.masthead { display: flex; align-items: baseline; justify-content: space-between; gap: .32rem 1.35rem; flex-wrap: wrap; padding-block: .95rem; }
.wordmark { font: 800 1.15rem/1.2 var(--sans); letter-spacing: -.035em; }
.masthead a { text-decoration: none; }
.masthead a:hover { text-decoration: underline; }
.masthead nav { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; font: 700 .78rem/1.4 var(--mono); }
.map-band { background: var(--dark); color: var(--lite); border-top: .32rem solid #867e67; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: clamp(1.6rem, 6vw, 5rem); align-items: center; padding-block: clamp(1.8rem, 5vw, 3.8rem); }
.period { display: flex; align-items: center; gap: .5rem; color: var(--gold); font: 700 .78rem/1.45 var(--mono); text-transform: uppercase; }
.period span { flex: none; display: inline-block; width: .68rem; height: .68rem; background: var(--gold); }
.intro h1 { margin: .55rem 0 1rem; max-width: 12ch; font-size: clamp(3rem, 6vw, 6.35rem); line-height: .9; letter-spacing: -.07em; }
.intro h1 span { color: var(--gold); }
.intro > p:not(.period) { max-width: 36ch; color: #dbd6c7; }
.index { margin-top: 1.4rem; border-top: 1px solid #686a69; }
.index ol { display: grid; grid-template-columns: 1fr 1fr; list-style: none; padding: 0; margin: 0; }
.index li { border-bottom: 1px solid #686a69; }
.index a { display: flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .38rem .2rem .38rem .15rem; color: var(--lite); font: 700 .8rem/1.26 var(--mono); text-decoration: none; }
.index a:hover { color: var(--gold); text-decoration: underline; }
.index a span { color: var(--gold); }

.moon { margin-inline: auto; width: min(100%, 35rem); }
.globe { position: relative; isolation: isolate; background: var(--dark); width: 100%; aspect-ratio: 1; }
.globe img { border-radius: 50%; mix-blend-mode: screen; opacity: .89; }
.pin-dot, .pin-line, .pin { position: absolute; top: var(--y); left: var(--x); }
.pin-dot { width: .45rem; height: .45rem; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 2px var(--ink); transform: translate(-50%, -50%); }
.pin-line { height: 1px; width: var(--length); background: var(--gold); transform-origin: left center; transform: rotate(var(--angle)); pointer-events: none; }
.pin { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; transform: translate(-50%, -50%); background: var(--ink); color: var(--gold); border: 1px solid var(--gold); font: 700 .87rem/1 var(--mono); text-decoration: none; }
.pin::after { content: ""; position: absolute; inset: -.45rem; }
.pin:hover, .pin:focus-visible { background: var(--gold); color: #222; }
.moon figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem 1rem; border-top: 1px solid #686a69; margin-top: .65rem; padding-top: .6rem; color: var(--lite); font: .73rem/1.4 var(--mono); }

.mission-notes { margin-block: clamp(2.25rem, 6vw, 5rem); }
.section-head { border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule); padding-block: .75rem; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; }
.section-head h2 { font-size: clamp(2.25rem, 5vw, 4.1rem); letter-spacing: -.065em; }
.section-head p { font: .82rem/1.4 var(--mono); }
.mission { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .84fr); gap: 1.5rem 3.75rem; border-bottom: 1px solid var(--rule); padding: clamp(1.3rem, 4vw, 2.8rem) 0; scroll-margin-top: .75rem; }
.mission:target .mission-id { background: #f2cf83; }
.mission-id { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; padding: .28rem .55rem; border: 1px solid var(--rule); font: 700 .78rem/1.45 var(--mono); }
.mission-id time { font-weight: normal; }
.mission h3 { margin-block: .65rem .35rem; font-size: clamp(2rem, 4.55vw, 3.8rem); letter-spacing: -.066em; }
.coords { font: .9rem/1.5 var(--mono); color: #5c5037; }
.mission-story { margin-top: .85rem; max-width: 53ch; }
.crew { margin-top: 1.1rem; border-top: 1px solid var(--rule); }
.crew div { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .75rem; padding: .38rem 0; border-bottom: 1px solid var(--rule); }
.crew dt { width: min(10rem, 100%); font: 700 .77rem/1.4 var(--mono); }
.crew dd { font-size: .95rem; }
.mission figure { min-width: 0; }
.mission figure img { aspect-ratio: 1.3; object-fit: cover; background: #24282b; border: .4rem solid #34383a; }
.mission figcaption { margin-top: .43rem; font: .75rem/1.45 var(--mono); }
.sources { margin-block: 2.7rem; padding-bottom: 1.5rem; display: grid; grid-template-columns: minmax(0, .55fr) minmax(0, 1.25fr) auto; gap: 1.25rem; align-items: start; }
.sources h2 { font-size: 1.6rem; letter-spacing: -.04em; }
.sources ul { margin: 0; padding-left: 1.1rem; }
.sources li, .back { font: .82rem/1.55 var(--mono); }
.sources li + li { margin-top: .4rem; }

@media (max-width: 46rem) {
  .wrap { width: calc(100% - 2rem); }
  .map-layout, .mission { grid-template-columns: minmax(0, 1fr); }
  .intro h1 { font-size: clamp(3rem, 11vw, 5.2rem); }
  .map-layout { gap: clamp(1.2rem, 5vw, 2rem); }
  .mission { gap: 1.1rem; }
  .mission figure { width: min(100%, 30rem); }
  .sources { grid-template-columns: 1fr; gap: .75rem; }
}

@media (max-width: 24rem) {
  .masthead nav { column-gap: .88rem; }
  .period { font-size: .72rem; }
  .index a { font-size: .73rem; }
  .pin { width: 1.9rem; height: 1.9rem; }
}

/* Positions projected onto the near-side image, with separate label anchors. */
.pin-dot.apollo-11 { --x:69.12%; --y:49.44%; }
.pin-dot.apollo-12 { --x:30.95%; --y:52.52%; }
.pin-dot.apollo-14 { --x:35.62%; --y:53.05%; }
.pin-dot.apollo-15 { --x:52.73%; --y:28.86%; }
.pin-dot.apollo-16 { --x:62.67%; --y:57.49%; }
.pin-dot.apollo-17 { --x:73.05%; --y:33.43%; }
.pin-line.apollo-11 { --x:69.12%; --y:49.44%; --length:10.28%; --angle:-55.11deg; }
.pin-line.apollo-12 { --x:30.95%; --y:52.52%; --length:16.63%; --angle:-131.16deg; }
.pin-line.apollo-14 { --x:35.62%; --y:53.05%; --length:18.79%; --angle:136.44deg; }
.pin-line.apollo-15 { --x:52.73%; --y:28.86%; --length:16.13%; --angle:-127.12deg; }
.pin-line.apollo-16 { --x:62.67%; --y:57.49%; --length:16.60%; --angle:95.78deg; }
.pin-line.apollo-17 { --x:73.05%; --y:33.43%; --length:12.89%; --angle:-62.50deg; }
.pin.apollo-11 { --x:75%; --y:41%; }
.pin.apollo-12 { --x:20%; --y:40%; }
.pin.apollo-14 { --x:22%; --y:66%; }
.pin.apollo-15 { --x:43%; --y:16%; }
.pin.apollo-16 { --x:61%; --y:74%; }
.pin.apollo-17 { --x:79%; --y:22%; }
