:root {
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: "Courier New", Courier, monospace;
  --ink: #d9d4c8;
  --dim: #8d887c;
  --warm: #d99a4e;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--ink); font-family: var(--serif); overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { display: flex; align-items: center; justify-content: center; }

#stage { position: relative; background: #000; overflow: hidden; cursor: none; touch-action: none; }
#c { display: block; width: 100%; height: 100%; }

#card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none; opacity: 0; transition: opacity 1.4s; }
#card.on { opacity: 1; }
#card .big { font-size: clamp(26px, 5.2vw, 72px); letter-spacing: .2em; margin-right: -.2em; font-weight: normal; color: #e9e3d6; }
#card .mid { font-size: clamp(16px, 2.2vw, 28px); letter-spacing: .06em; color: #e2dccf; }
#card .small { font-size: clamp(11px, 1.25vw, 16px); color: var(--dim); margin-top: 1.4em; max-width: 60%; line-height: 1.55; }
#card .lvl { font-family: var(--sans); font-size: clamp(10px, 1.1vw, 14px); color: var(--dim); letter-spacing: .02em; margin-bottom: 1.1em; }

#cursor { position: fixed; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: rgba(236,231,219,.75); pointer-events: none; z-index: 6; transition: width .18s, height .18s, margin .18s, background .18s, border-color .18s;
  border: 1px solid transparent; opacity: 0; }
#cursor.in { opacity: 1; }
#cursor.hot { width: 22px; height: 22px; margin: -11px 0 0 -11px; background: transparent; border-color: rgba(236,231,219,.85); }
#cursor.held { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: rgba(217,154,78,.9); border-color: transparent; }
/* the gesture hint at the pointer: a thin ring, a fill, a word. Quiet; it fades as soon as you start doing the thing */
#cue { position: fixed; left: 0; top: 0; width: 80px; height: 80px; margin: -40px 0 0 -40px; pointer-events: none; z-index: 6; opacity: 0; transition: opacity .3s; }
#cue.on { opacity: 1; }
#cue svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 1.5px rgba(0,0,0,.8)); }
#cue .tr { stroke: rgba(236,231,219,.3); stroke-width: 1.2; }
#cue .pg { stroke: rgba(217,154,78,.95); stroke-width: 2.2; transform: rotate(-90deg); transform-box: fill-box; transform-origin: center; stroke-dasharray: 0 100; transition: stroke-dasharray .15s linear, opacity .2s; }
#cue .pulse { stroke: rgba(236,231,219,.7); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
#cue.hold:not(.held) .pulse, #cue.drag:not(.held) .pulse { animation: cue-press 1.5s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes cue-press { 0% { transform: scale(1.75); opacity: 0; } 35% { opacity: .75; } 85%, 100% { transform: scale(.82); opacity: 0; } }
#cue .sw { display: none; stroke: rgba(236,231,219,.88); stroke-width: 1.6; transition: opacity .3s; }
#cue.shake .sw, #cue.drag.held .sw { display: block; animation: cue-swing 1.1s ease-in-out infinite alternate; }
@keyframes cue-swing { from { transform: translateX(-7px); } to { transform: translateX(7px); } }
#cue .w { position: absolute; left: 50%; top: 65px; transform: translateX(-50%); white-space: nowrap; font: 500 11px/1 var(--sans, sans-serif);
  letter-spacing: .2em; text-transform: uppercase; color: rgba(236,231,219,.82); text-shadow: 0 0 2px #000, 0 1px 2px #000; transition: opacity .3s; }
#cue.moving .sw, #cue.moving .w { opacity: 0; }
#cue.shake.moving .tr { stroke: rgba(236,231,219,.18); }
body.loading #cue { opacity: 0 !important; }
@media (prefers-reduced-motion: reduce) { #cue .pulse, #cue .sw { animation: none !important; } }

/* start, pause: plain text on black, like the end of a print */
#menu, #pause { position: fixed; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; z-index: 20; text-align: center; }
#menu[hidden], #pause[hidden], #sources[hidden], #glossary[hidden] { display: none; }
.m-in { max-width: 640px; padding: 24px; }
#menu h1 { font-weight: normal; font-size: clamp(34px, 6vw, 76px); letter-spacing: .22em; margin: 0 -.22em .35em 0; color: #e9e3d6; }
.def { color: var(--dim); margin: 0 0 3.2em; font-size: 16px; }
.m-items a { display: block; margin: .5em auto; font-size: 20px; letter-spacing: .03em; color: var(--ink); cursor: pointer; width: max-content; padding: 2px 10px; border-bottom: 1px solid transparent; }
.m-items a:hover { border-bottom-color: var(--warm); color: #fff; }
.m-note { margin-top: 3.2em; color: var(--dim); font-size: 14px; line-height: 1.7; }
.m-foot { margin-top: 1.6em; color: #5e5a52; font-size: 12px; letter-spacing: .04em; }

/* sources: the game, frozen and out of focus behind a quiet reading page */
#sources, #glossary { position: fixed; inset: 0; z-index: 30; overflow-y: auto; background: rgba(6,6,7,.84); -webkit-backdrop-filter: blur(18px) saturate(.7); backdrop-filter: blur(18px) saturate(.7);
  touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; -webkit-user-select: text; user-select: text; cursor: auto; font-family: var(--sans); scrollbar-width: thin; scrollbar-color: #3a3833 transparent; }
#sources::-webkit-scrollbar, #glossary::-webkit-scrollbar { width: 8px; } #sources::-webkit-scrollbar-thumb, #glossary::-webkit-scrollbar-thumb { background: #3a3833; border-radius: 4px; } #sources::-webkit-scrollbar-track, #glossary::-webkit-scrollbar-track { background: transparent; }
.s-in { max-width: 780px; margin: 0 auto; padding: 0 28px 96px; color: #cfcabd; }
.s-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 22px 0 16px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8a857a;
  background: linear-gradient(rgba(8,8,9,.96) 60%, rgba(8,8,9,0)); }
.s-top a { cursor: pointer; letter-spacing: .06em; text-transform: none; font-size: 14px; color: #b9b4a8; border-bottom: 1px solid transparent; }
.s-top a:hover { color: #fff; border-bottom-color: var(--warm); }
.s-head { padding: 4vh 0 0; }
.s-head h2 { font-family: var(--serif); font-weight: normal; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; letter-spacing: .02em; color: #f1ebde; margin: 0 0 .5em; }
.s-lead { font-family: var(--serif); font-style: italic; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.55; color: #a29c8f; margin: 0 0 2.2em; max-width: 34em; }
.s-tabs { display: flex; flex-wrap: wrap; gap: .4em 2em; border-bottom: 1px solid rgba(236,231,219,.12); margin-bottom: 1.2em; }
.s-tabs a { cursor: pointer; font-size: 14px; color: #8f8a7e; padding: .7em 0; margin-bottom: -1px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.s-tabs a:hover { color: #e9e3d6; }
.s-tabs a.on { color: #f1ebde; border-bottom-color: var(--warm); }
#sources section[hidden] { display: none; }
#sources h3 { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #8a857a; margin: 2.6em 0 .6em; }
#sources ul { list-style: none; margin: 0; padding: 0; }
.facts li { display: grid; grid-template-columns: 1fr 11em; gap: 1.6em; padding: .8em 0; border-bottom: 1px solid rgba(236,231,219,.07); }
.facts p { margin: 0; font-family: var(--serif); font-size: 16.5px; line-height: 1.5; color: #e6e0d3; }
.facts .cite { font-size: 12.5px; line-height: 1.5; color: #8f8a7e; text-decoration: none; text-align: right; padding-top: .2em; }
.facts .cite span { display: block; color: #6f6b62; }
.facts .cite:hover, .facts .cite:hover span { color: var(--warm); }
.s-note { font-family: var(--serif); font-size: 16.5px; line-height: 1.55; color: #b9b4a8; margin: 2em 0 1em; }
.ours li { padding: 1.1em 0; border-bottom: 1px solid rgba(236,231,219,.07); }
.ours h4, .docs h4 { margin: 0 0 .3em; font-size: 14px; font-weight: 600; color: #ece6d9; }
.ours p, .docs p { margin: 0; font-family: var(--serif); font-size: 16.5px; line-height: 1.55; color: #cfc9bb; }
.docs li { padding: 1.6em 0; border-bottom: 1px solid rgba(236,231,219,.07); }
.docs h4 { font-family: var(--serif); font-weight: normal; font-size: 21px; line-height: 1.3; }
.docs .by { font-size: 13px; color: #8a857a; margin: 0 0 .7em; }
.docs a { display: inline-block; margin-top: .8em; font-size: 14px; color: #d8d2c5; text-decoration: none; border-bottom: 1px solid rgba(217,154,78,.5); }
.docs a:hover { color: #fff; border-bottom-color: var(--warm); }
.s-small { margin-top: 2.6em; font-size: 12.5px; line-height: 1.7; color: #6f6b62; }
@media (max-width: 640px) {
  .s-in { padding: 0 18px 72px; }
  .facts li { grid-template-columns: 1fr; gap: .35em; }
  .facts .cite { text-align: left; padding: 0; }
  .facts .cite span { display: inline; margin-left: .5em; }
}

/* the debrief: Maren's results sheet, a real piece of paper laid over the frozen lab. Typed results, her pen on top. */
#report { position: absolute; inset: 0; display: none; background: rgba(4,5,6,.8); -webkit-backdrop-filter: blur(14px) saturate(.7); backdrop-filter: blur(14px) saturate(.7);
  cursor: auto; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-user-select: text; user-select: text;
  scrollbar-width: thin; scrollbar-color: #3a3833 transparent; --ink: #22201c; --pen: #1d2c5e; --red: #9a2b22;
  --hand: "Ink Free", "Segoe Print", "Bradley Hand", "Marker Felt", cursive; }
#report.on { display: block; }
#report:focus { outline: none; }
#report::-webkit-scrollbar { width: 8px; } #report::-webkit-scrollbar-thumb { background: #3a3833; border-radius: 4px; }
#report .page { padding: clamp(24px, 6vh, 64px) 16px 130px; }
#report .sheet { position: relative; max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 60px) clamp(22px, 5.5vw, 66px) 44px; color: var(--ink);
  background: #ebe5d6; box-shadow: 0 2px 0 rgba(255,255,255,.25) inset, 0 30px 90px rgba(0,0,0,.65), 0 4px 14px rgba(0,0,0,.4); transform: rotate(-.35deg); }
#report .sheet::before { content: ''; position: absolute; inset: 0; background-image: var(--grain); background-size: 160px 160px; opacity: .1; mix-blend-mode: multiply; pointer-events: none; }
#report .lab-head { display: flex; justify-content: space-between; gap: 1em; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
  color: #4a463e; padding-bottom: 10px; border-bottom: 1.5px solid #3a362f; }
#report .hand { font-family: var(--hand); color: var(--pen); }
#report .note { font-size: clamp(22px, 2.4vw, 29px); line-height: 1.3; margin: 22px 0 6px; transform: rotate(-1.2deg); transform-origin: left; }
#report section { margin-top: 28px; }
#report h5 { font-family: var(--mono); font-weight: bold; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #3a362f; margin: 0 0 10px; }
/* three results, typed, each with a pen mark and the reason under it */
#report .res { padding: 10px 0 12px; border-bottom: 1px dashed rgba(58,54,47,.35); }
#report .res-l { display: flex; align-items: baseline; gap: 12px; font-family: var(--mono); font-size: 15px; }
#report .res-q { min-width: 15.5em; color: #4a463e; }
#report .res-v { flex: 1; color: var(--ink); font-weight: bold; }
#report .res-why { margin: 6px 0 0; font-family: var(--serif); font-size: 16px; line-height: 1.5; color: #35322c; }
#report .mark { font-size: 26px; line-height: .8; }
#report .mark.no { color: var(--red); }
/* the rack */
#report .rack { display: flex; flex-wrap: wrap; gap: 5px 5px; margin: 4px 0 12px; }
#report .tube { display: inline-flex; flex-direction: column; align-items: center; width: 36px; padding: 6px 0 4px; border: 1px solid rgba(58,54,47,.45); border-radius: 2px 2px 12px 12px;
  font-family: var(--mono); font-size: 12px; color: #4a463e; background: rgba(255,255,255,.18); }
#report .tube .mark { font-size: 22px; margin-top: 2px; }
#report .key { list-style: none; margin: 0; padding: 0; font-family: var(--serif); font-size: 15.5px; line-height: 1.5; color: #35322c; }
#report .key li { margin: 3px 0; }
#report .key-n { font-family: var(--mono); font-size: 13.5px; font-weight: bold; color: var(--ink); margin-right: .4em; }
/* NASA's requirements */
#report table.req { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px; }
#report .req th { text-align: left; font-weight: normal; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #6a655a; padding: 0 10px 6px 0; border-bottom: 1.5px solid #3a362f; }
#report .req td { padding: 8px 10px 8px 0; border-bottom: 1px solid rgba(58,54,47,.25); vertical-align: top; color: var(--ink); }
#report .req td:last-child { width: 32px; padding-right: 0; text-align: center; }
#report .req small { display: block; font-family: var(--serif); font-style: italic; font-size: 13.5px; color: #5c574d; margin-top: 2px; }
#report .req-note { margin: 8px 0 0; font-family: var(--serif); font-style: italic; font-size: 14px; color: #5c574d; }
/* the notes */
#report .notes .k { display: block; margin: 16px 0 3px; font-family: var(--mono); font-size: 13px; font-weight: bold; color: #3a362f; }
#report .notes p { margin: 0; font-family: var(--serif); font-size: 16.5px; line-height: 1.6; color: #2c2925; }
#report .foot { margin: 30px 0 0; padding-top: 10px; border-top: 1px solid rgba(58,54,47,.3); font-family: var(--serif); font-style: italic; font-size: 13px; color: #6a655a; }
/* the way on: the same quiet button as the start screen, always in reach */
#report .next { position: sticky; bottom: 0; display: flex; justify-content: center; margin-top: -110px; padding: 44px 16px 26px; background: linear-gradient(rgba(4,5,6,0), rgba(4,5,6,.9) 55%); pointer-events: none; }
#report .next span { pointer-events: auto; cursor: pointer; font-family: var(--sans); font-size: 15px; letter-spacing: .3em; margin-right: -.3em; text-transform: uppercase; color: #f4efe4;
  padding: .75em 2.4em; border: 1px solid rgba(236,231,219,.45); background: rgba(4,5,6,.55); transition: border-color .25s, background .25s; }
#report .next span:hover { border-color: #e2a35a; background: rgba(226,163,90,.08); }
@media (max-height: 520px) { #report .next { margin-top: -80px; padding: 26px 16px 12px; } #report .next span { padding: .55em 1.6em; font-size: 13px; } }
@media (max-width: 640px) {
  #report .sheet { transform: none; }
  #report .res-l { flex-wrap: wrap; gap: 2px 10px; } #report .res-q { min-width: 100%; font-size: 13px; }
  #report .req th:nth-child(1) { width: 40%; }
}

.m-story { color: #cfc9bb; font-size: 17px; line-height: 1.6; margin: -1.6em auto 2.2em; max-width: 520px; }


/* ---------- the words around the picture ----------
   Bar mode: the black bars are tall enough, so subtitles and the quiet action line sit below the picture
   and the chapter title above it, as on a letterboxed film. Inset mode (short screens, phones): the same
   elements sit just inside the frame. Positions are set by layoutHud() in js/engine.js. */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 4; font-family: var(--sans); }
#sub { position: absolute; left: 0; right: 0; text-align: center; opacity: 0; transition: opacity .3s;
  font-size: var(--subSize, 20px); line-height: 1.35; color: #f4f1ea; font-weight: 500; padding: 0 6%;
  text-shadow: 0 0 2px #000, 0 1px 2px #000, 0 0 8px rgba(0,0,0,.7); }
#sub.on { opacity: 1; }
#who { color: #b9b4a8; font-weight: 400; margin-right: .4em; }
#who:empty { display: none; }
#who::after { content: ":"; }
#line i { font-style: normal; color: #d8d3c7; }
#act { position: absolute; font-size: var(--actSize, 14px); line-height: 1.35; color: #a8a397; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 0 2px #000, 0 1px 2px #000; }
#goal { opacity: 0; transition: opacity .4s; }
#goal.on { opacity: 1; }
#goal b { font-weight: 500; color: #e9e5dc; }
#hint { display: none; color: #e9e5dc; }
#hint small { font-size: 1em; color: #a8a397; }
#hint small::before { content: " \2014  "; }
#act.hovering #goal { display: none; }
#act.hovering #hint { display: inline; }
#chip { position: absolute; font-size: var(--actSize, 14px); color: #8f8a7f; opacity: 0; transition: opacity 1.4s; white-space: nowrap; text-shadow: 0 0 2px #000, 0 1px 2px #000; }
#chip.on { opacity: 1; }
#chip b { font-weight: 500; color: #d6d1c5; }
#menuBtn { position: absolute; display: none; pointer-events: auto; font-size: var(--actSize, 14px); color: #8f8a7f; cursor: pointer; padding: 8px 12px; text-shadow: 0 0 2px #000; }
#menuBtn:hover { color: #fff; }
body.playing #menuBtn { display: block; }

/* who is speaking, the first time they speak: a documentary lower third */
#who3 { position: absolute; left: 3.4%; bottom: 7%; font-family: var(--sans); opacity: 0; transition: opacity .9s; pointer-events: none; text-shadow: 0 0 2px #000, 0 1px 3px #000; }
#who3.on { opacity: 1; }
#who3 .n { font-size: clamp(13px, 1.45vw, 19px); color: #f1ede4; font-weight: 500; }
#who3 .r { font-size: clamp(11px, 1.15vw, 15px); color: #b3aea2; margin-top: .15em; }


#card .recap { font-size: clamp(15px, 2.05vw, 27px); color: #e9e3d6; max-width: 66%; line-height: 1.55; }
#card .recap p { margin: 0 0 .75em; }
#card .recap .then { color: #b9b4a8; font-size: .8em; }
#card .go { font-family: var(--sans); font-size: clamp(11px, 1.1vw, 14px); color: #7d786e; margin-top: 2em; opacity: 0; transition: opacity 1s; }
#card .go.on { opacity: 1; }

/* phones */
.touch { display: none; }
body.is-touch .touch { display: inline; }
body.is-touch .desk { display: none; }
body.is-touch #cursor { display: none; }
#rotate { display: none; position: fixed; inset: 0; z-index: 50; background: #000; color: #d9d4c8; font-family: var(--sans); font-size: 18px; align-items: center; justify-content: center; text-align: center; padding: 24px; }
@media (orientation: portrait) and (pointer: coarse) { #rotate { display: flex; } }
@media (max-height: 500px) {
  #menu { align-items: flex-start; overflow-y: auto; }
  .m-in { padding: 10px 24px; }
  #menu h1 { font-size: 34px; margin-bottom: .1em; }
  .def { margin-bottom: 1em; }
  .m-items a { font-size: 17px; margin: .2em auto; }
  .m-story { margin: .6em auto .6em; font-size: 15px; }
  .m-note { margin-top: .8em; font-size: 13px; }
}

/* ---------- between chapters: a held, defocused frame from the film itself ---------- */
#loader { position: absolute; inset: 0; z-index: 3; background: #000; opacity: 0; visibility: hidden; pointer-events: none; overflow: hidden;
  transition: opacity 1.1s ease, visibility 0s linear 1.1s; }
#loader.on { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; }
#loader .ls { position: absolute; inset: -4%; }
#loader .ls canvas { width: 100%; height: 100%; display: block; filter: blur(14px) brightness(.5) saturate(.75); transform: scale(1.06); }
#loader.on .ls canvas { animation: up-hold 16s ease-out forwards; }
@keyframes up-hold { from { transform: scale(1.06); } to { transform: scale(1.0); } }
#loader .lg { position: absolute; inset: -50%; opacity: .06; background-image: var(--grain); background-size: 160px 160px; animation: up-grain .5s steps(5) infinite; mix-blend-mode: overlay; }
@keyframes up-grain { 0% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-4%); } 60% { transform: translate(-4%,-1%); } 80% { transform: translate(3%,3%); } 100% { transform: translate(0,0); } }
#loader .lw { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; transition: opacity .8s; }
#loader.carding .lw { opacity: 0; }
#loader .lc { font-family: var(--sans); font-size: clamp(10px, 1vw, 13px); color: rgba(233,227,214,.55); letter-spacing: .02em; }
#loader .lt { font-family: var(--serif); font-size: clamp(24px, 3.2vw, 46px); color: #eee8db; letter-spacing: .18em; margin: .25em -.18em 0 0; text-shadow: 0 2px 30px rgba(0,0,0,.6); }
#loader .lf { max-width: min(58%, 680px); margin-top: clamp(18px, 4vh, 40px); transition: opacity .6s; }
#loader .lf.swap { opacity: 0; }
#loader .fact { font-family: var(--serif); font-style: italic; font-size: clamp(12px, 1.25vw, 17px); color: rgba(220,214,201,.78); line-height: 1.5; }
#loader .src { font-family: var(--sans); font-size: clamp(9px, .85vw, 11.5px); color: rgba(200,194,182,.45); margin-top: .5em; }
#card { z-index: 4; }

/* ---------- the start screen: a few words, centred, over a dark sky; the Earth low on the horizon ---------- */
#menu { background: transparent; display: block; font-family: var(--sans); text-align: center; }
#menu .m-center { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(92vw, 760px); }
#menu .m-kicker { font-size: 12px; color: #7d786e; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 2.2em; }
#menu h1 { font-family: var(--serif); font-weight: normal; font-size: clamp(52px, 7.5vw, 112px); letter-spacing: .28em; margin: 0 -.28em .22em 0; color: #f1ebde; line-height: 1; }
#menu .def { font-family: var(--serif); font-style: italic; color: #9d978a; margin: 0; font-size: clamp(15px, 1.35vw, 19px); }
#menu .def i { font-style: normal; color: #c9c3b6; }
#menu .m-story { color: #cbc5b8; font-size: clamp(14px, 1.2vw, 17px); margin: 1.1em auto 2.6em; max-width: none; }
#menu .m-begin { display: inline-block; font-size: clamp(17px, 1.5vw, 21px); color: #f4efe4; letter-spacing: .3em; margin-right: -.3em; text-transform: uppercase; padding: .75em 2.4em; border: 1px solid rgba(236,231,219,.38); cursor: pointer; transition: border-color .25s, color .25s, background .25s; }
#menu .m-begin:hover { border-color: #e2a35a; color: #fff; background: rgba(226,163,90,.07); }
#menu .m-row { display: flex; justify-content: center; flex-wrap: wrap; gap: .4em 2.2em; margin-top: 2.1em; }
#menu .m-row a { font-size: 14px; color: #9a958a; cursor: pointer; padding: .2em 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
#menu .m-row a:hover { color: #f4efe4; border-bottom-color: #e2a35a; }
#menu .m-row a[hidden] { display: none; }
#menu .m-foot { position: absolute; left: 0; right: 0; bottom: 16px; margin: 0; font-size: 11px; color: rgba(205,200,190,.55); letter-spacing: .02em; text-shadow: 0 1px 3px #000; }
@media (max-height: 520px) {
  #menu .m-center { top: 44%; } #menu .m-kicker { margin-bottom: 1em; font-size: 10px; }
  #menu h1 { font-size: 44px; } #menu .m-story { margin: .6em 0 1.2em; } #menu .m-row { margin-top: 1.1em; }
  #menu .m-begin { padding: .55em 2em; font-size: 15px; } #menu .m-foot { bottom: 8px; font-size: 9.5px; }
}

/* ---------- the pause page: the frozen frame, blurred, and a few words ---------- */
#pause { background: rgba(4,5,7,.55); -webkit-backdrop-filter: blur(14px) saturate(.8); backdrop-filter: blur(14px) saturate(.8); display: flex; align-items: center; justify-content: center; text-align: center; font-family: var(--sans); }
#pause[hidden] { display: none; }
#pause .p-center { width: min(92vw, 720px); }
#pause .p-kicker { font-size: 12px; color: #8a857a; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 1.4em; }
#pause .p-ch { font-size: 13px; color: #9a958a; margin: 0 0 .3em; }
#pause h2 { font-family: var(--serif); font-weight: normal; font-size: clamp(30px, 4vw, 54px); letter-spacing: .14em; margin: 0 -.14em 1.3em 0; color: #f1ebde; text-transform: none; }
#pause .p-resume { display: inline-block; font-size: clamp(15px, 1.35vw, 19px); color: #f4efe4; letter-spacing: .3em; margin-right: -.3em; text-transform: uppercase; padding: .7em 2.4em; border: 1px solid rgba(236,231,219,.4); cursor: pointer; transition: border-color .25s, background .25s; }
#pause .p-resume:hover { border-color: #e2a35a; background: rgba(226,163,90,.08); }
#pause .p-row { display: flex; justify-content: center; flex-wrap: wrap; gap: .5em 2em; margin-top: 2em; }
#pause .p-row a { font-size: 14px; color: #a5a094; cursor: pointer; padding: .2em 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
#pause .p-row a:hover { color: #fff; border-bottom-color: #e2a35a; }
#pause .p-keys { margin-top: 2.6em; font-size: 12px; color: #6f6b62; }
body.is-touch #pause .p-keys { display: none; }

/* while a chapter is being built the system pointer is shown instead of the drawn one */
body.loading #stage { cursor: default; }
body.loading #cursor { opacity: 0 !important; }

/* ---------- the glossary: a list of terms, and a card with the object on a turntable ---------- */
.g-in { max-width: 1080px; }
.g-wrap { display: grid; grid-template-columns: 15em 1fr; gap: 3em; margin-top: 1em; align-items: start; }
.g-list { position: sticky; top: 64px; display: flex; flex-direction: column; max-height: calc(100vh - 90px); overflow-y: auto; scrollbar-width: none; padding-bottom: 2em; }
.g-group { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #77736a; margin: 1.6em 0 .5em; }
.g-group:first-child { margin-top: .4em; }
.g-list a { cursor: pointer; font-size: 14.5px; color: #a29d91; padding: .34em 0 .34em .9em; border-left: 1px solid rgba(236,231,219,.1); transition: color .2s, border-color .2s; }
.g-list a:hover { color: #ece6d9; }
.g-list a.on { color: #f4efe4; border-left-color: var(--warm); }
.g-card { min-width: 0; }
.g-view { position: relative; aspect-ratio: 16 / 9; margin-bottom: 1.6em; background: radial-gradient(ellipse at 50% 42%, rgba(70,66,60,.35), rgba(10,10,11,.0) 70%); border-bottom: 1px solid rgba(236,231,219,.08); }
.g-view[hidden] { display: none; }
.g-view canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.g-view canvas:active { cursor: grabbing; }
.g-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #6f6b62; pointer-events: none; }
.g-load[hidden] { display: none; }
.g-hint { position: absolute; right: 0; bottom: .6em; font-size: 12px; color: #6a665d; pointer-events: none; }
.g-term { font-family: var(--serif); font-weight: normal; font-size: clamp(28px, 3vw, 40px); color: #f1ebde; margin: 0 0 .45em; letter-spacing: .01em; text-transform: none; }
.g-what { font-family: var(--serif); font-size: 19px; line-height: 1.6; color: #e6e0d3; margin: 0 0 1.6em; max-width: 36em; }
.g-k { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #8a857a; margin: 1.8em 0 .6em; }
#glossary ul { list-style: none; margin: 0; padding: 0; }
.g-nasa li { padding: .7em 0; border-bottom: 1px solid rgba(236,231,219,.07); }
.g-nasa p { margin: 0 0 .25em; font-family: var(--serif); font-size: 16.5px; line-height: 1.5; color: #d9d3c6; }
.g-nasa a { font-size: 12.5px; color: #8f8a7e; text-decoration: none; }
.g-nasa a:hover { color: var(--warm); }
.g-game { font-family: var(--serif); font-size: 16.5px; line-height: 1.55; color: #b9b4a8; margin: 0; max-width: 36em; }
.g-credit { font-size: 12.5px; color: #6f6b62; margin-top: 1.8em; }
@media (max-width: 760px) {
  .g-wrap { grid-template-columns: 1fr; gap: 1em; }
  .g-list { position: static; flex-direction: row; flex-wrap: wrap; gap: .3em .9em; max-height: none; padding-bottom: .5em; }
  .g-group { width: 100%; margin: 1em 0 .2em; }
  .g-list a { border-left: 0; padding: .25em 0; border-bottom: 1px solid transparent; }
  .g-list a.on { border-bottom-color: var(--warm); }
  .g-what { font-size: 17px; }
}

/* a quiet note on the start screen when the browser runs on built-in graphics */
#menu .m-gpu { position: absolute; left: 50%; transform: translateX(-50%); bottom: 40px; margin: 0; width: min(92vw, 760px); font-size: 11.5px; line-height: 1.5; color: rgba(205,200,190,.6); text-shadow: 0 1px 3px #000; }
#menu .m-gpu[hidden] { display: none; }
@media (max-height: 480px) { #menu .m-gpu { bottom: 26px; font-size: 10px; } }

/* the logbook: a quiet line in the top bar when something is noticed, and its page (shares the sources page's look) */
#note { position: absolute; left: 0; right: 0; text-align: center; font-size: var(--actSize, 14px); color: #c9c4b8; opacity: 0; transition: opacity .9s; white-space: nowrap; pointer-events: none;
  text-shadow: 0 0 2px #000, 0 1px 2px #000; }
#note.on { opacity: 1; transition: opacity .35s; }
#note .nk { color: #8f8a7f; letter-spacing: .08em; text-transform: uppercase; font-size: .82em; margin-right: .6em; }
#note .nn { color: #8f8a7f; margin-left: .6em; }
#sources h3 .lb-n { float: right; letter-spacing: .04em; text-transform: none; font-weight: 400; color: #6f6b62; }
.lb li { padding: 1em 0; border-bottom: 1px solid rgba(236,231,219,.07); }
.lb h4 { margin: 0 0 .3em; font-size: 14px; font-weight: 600; color: #ece6d9; }
.lb p { margin: 0; font-family: var(--serif); font-size: 16.5px; line-height: 1.55; color: #cfc9bb; }
.lb .lb-src { display: block; margin-top: .45em; font-size: 12.5px; color: #8f8a7e; }
.lb .lb-no h4 { color: #6f6b62; font-weight: 400; }
.lb .lb-no p { color: #6f6b62; font-style: italic; font-size: 15px; }
/* the end page: what this flight led to, and the outcomes found on earlier flights */
#end { position: fixed; inset: 0; z-index: 29; overflow-y: auto; background: rgba(6,6,7,.9); font-family: var(--sans); cursor: auto; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: #3a3833 transparent; }
#end[hidden] { display: none; }
#end .s-head { padding-top: 10vh; }
.e-out { list-style: none; margin: 0; padding: 0; }
.e-out li { display: grid; grid-template-columns: 13em 1fr; gap: 1.4em; padding: .85em 0; border-bottom: 1px solid rgba(236,231,219,.07); }
.e-out h4 { margin: 0; font-size: 14px; font-weight: 600; color: #ece6d9; padding-top: .15em; }
.e-out p { margin: 0; display: flex; flex-wrap: wrap; gap: .3em 1.6em; font-family: var(--serif); font-size: 16.5px; line-height: 1.5; }
.e-this { color: #f1ebde; border-bottom: 1px solid var(--warm); }
.e-seen { color: #8f8a7e; }
.e-not { color: #4c4943; letter-spacing: .2em; }
.e-go { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1em 2.2em; margin-top: 2em; }
.e-go a { cursor: pointer; font-size: 15px; color: #b9b4a8; border-bottom: 1px solid transparent; }
.e-go a:hover { color: #fff; border-bottom-color: var(--warm); }
@media (max-width: 640px) { .e-out li { grid-template-columns: 1fr; gap: .3em; } }
#end .e-go .m-begin { font-size: 15px; color: #f4efe4; letter-spacing: .24em; text-transform: uppercase; padding: .7em 2em; border: 1px solid rgba(236,231,219,.38); transition: border-color .25s, background .25s; }
#end .e-go .m-begin:hover { border-color: #e2a35a; background: rgba(226,163,90,.07); }

/* ---------- phones and short screens: words big enough to read, pages that fit ---------- */
@media (max-height: 520px), (max-width: 760px) {
  /* chapter cards: fit four short paragraphs on a landscape phone */
  #card .recap { font-size: 14.5px; line-height: 1.42; max-width: 84%; }
  #card .recap p { margin: 0 0 .5em; }
  /* the logbook, sources and glossary pages */
  .s-top { padding: 12px 0 8px; }
  .s-head { padding-top: 1vh; }
  .s-head h2 { font-size: 26px; margin-bottom: .3em; }
  .s-lead { font-size: 14px; margin-bottom: 1.2em; }
  #sources h3 { margin: 1.6em 0 .4em; }
  .lb li { padding: .7em 0; } .lb p, .facts p, .ours p { font-size: 15px; } .lb h4 { font-size: 13px; }
  .facts li { grid-template-columns: 1fr 8em; gap: 1em; padding: .6em 0; }
  /* the end page */
  #end .s-head { padding-top: 3vh; }
  .e-out li { grid-template-columns: 10.5em 1fr; gap: .8em; padding: .55em 0; }
  .e-out h4 { font-size: 13px; } .e-out p { font-size: 15px; gap: .2em 1.1em; }
  .e-go { margin-top: 1.2em; gap: .8em 1.6em; } .e-go a { font-size: 14px; }
  #end .e-go .m-begin { font-size: 13px; padding: .6em 1.4em; }
  /* the logbook note in the top bar */
  #note { font-size: 12px; }
}
@media (pointer: coarse) { .s-top a, .e-go a, .s-tabs a { padding: .5em 0; } }   /* bigger targets for fingers */
/* no sideways scroll on any reading page, whatever a long word or link does */
#sources, #glossary, #end { overflow-x: hidden; }
.s-in { overflow-wrap: anywhere; }

/* between chapters: a caption low in the left corner, time over place, the way a film marks a jump in time.
   No boxes, no lines, no accent colour: off-white type with a soft shadow, fading in and out on its own. */
#bridge { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 1s; }
#bridge.on { opacity: 1; }
#bridge.dark { background: rgba(0,0,0,.45); transition: opacity 1s, background .8s; }
#bridge .br-txt { position: absolute; left: 6.5%; bottom: 10%; max-width: 46%; text-align: left; opacity: 0; transform: translateY(4px); transition: opacity 1.1s ease, transform 1.6s ease; }
#bridge .br-txt.on { opacity: 1; transform: none; }
#bridge .br-when { font-family: var(--sans); font-size: clamp(10px, .82vw, 13px); font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: rgba(236,231,219,.78); margin-bottom: .55em;
  text-shadow: 0 0 2px rgba(0,0,0,.9), 0 1px 3px rgba(0,0,0,.8); }
#bridge .br-what { font-family: var(--serif); font-size: clamp(14px, 1.3vw, 20px); line-height: 1.4; color: rgba(236,231,219,.92); letter-spacing: .01em;
  text-shadow: 0 0 2px rgba(0,0,0,.9), 0 1px 4px rgba(0,0,0,.85), 0 0 18px rgba(0,0,0,.6); }
@media (max-height: 520px), (max-width: 760px) {
  #bridge .br-txt { left: 5.5%; bottom: 8%; max-width: 70%; }
  #bridge .br-when { font-size: 10px; } #bridge .br-what { font-size: 14px; }
}

/* phones held sideways: the picture is barely 350 px tall, so every word gets smaller and stays out of its way */
@media (max-height: 500px) {
  #sub { font-size: min(var(--subSize, 20px), 11.5px); line-height: 1.3; }
  #act, #chip, #menuBtn { font-size: min(var(--actSize, 14px), 10px); }
  #who3 .n { font-size: 10px; } #who3 .r { font-size: 9px; }
  #card .recap { font-size: 11px; line-height: 1.4; max-width: 84%; }
  #card .go { font-size: 9.5px; margin-top: .9em; }
  #card .big { font-size: 26px; } #card .mid { font-size: 14px; } #card .small { font-size: 10px; } #card .lvl { font-size: 9px; }
  #loader .lt { font-size: 19px; } #loader .lc { font-size: 9px; } #loader .lf { margin-top: 10px; } #loader .lf .fact { font-size: 10.5px; } #loader .lf .src { font-size: 9px; }
  #bridge .br-what { font-size: 11px; } #bridge .br-when { font-size: 8.5px; }
  #note { font-size: 9.5px; }
  #pause .p-row a { font-size: 12px; } #pause h2 { font-size: 24px; }
  #menu h1 { font-size: 36px; } #menu .m-story { font-size: 13px; } #menu .m-row a { font-size: 12.5px; } #menu .def { font-size: 12px; }
  .s-head h2 { font-size: 22px; } .s-lead { font-size: 12.5px; }
  .lb p, .facts p, .ours p { font-size: 13.5px; } .lb h4, .e-out h4 { font-size: 12px; } .e-out p { font-size: 13.5px; }
}
/* the start screen's note for iPhone, where a web page cannot take the whole screen by itself */
#menu .m-ios { position: absolute; left: 50%; transform: translateX(-50%); bottom: 40px; margin: 0; width: min(92vw, 640px); font-size: 11.5px; line-height: 1.5; color: rgba(205,200,190,.7); text-align: center; font-family: var(--sans); }
#menu .m-ios[hidden] { display: none; }
@media (max-height: 480px) { #menu .m-ios { bottom: 24px; font-size: 10px; } }

/* the end credits: the team's name over the last picture, out of focus, then a slow roll */
#credits { position: fixed; inset: 0; z-index: 9; background: #000; overflow: hidden; opacity: 0; transition: opacity 1.2s ease; cursor: default; text-shadow: 0 1px 3px rgba(0,0,0,.75); }
#credits.on { opacity: 1; }
#credits .cr-bg { position: absolute; inset: -6%; }
#credits .cr-bg canvas { width: 100%; height: 100%; display: block; object-fit: cover; filter: blur(18px) brightness(.32) saturate(.7); transform: scale(1.04); animation: cr-push 70s linear forwards; }
@keyframes cr-push { to { transform: scale(1.16); } }
#credits::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 35%, rgba(0,0,0,.65) 100%); }
#credits .cr-title { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; opacity: 0; transition: opacity 1.5s ease; }
#credits .cr-title.on { opacity: 1; }
#credits .cr-t1 { font-size: clamp(40px, 7vw, 96px); letter-spacing: .34em; margin-right: -.34em; text-transform: uppercase; color: #efe9dc; font-weight: 400; }
#credits .cr-by { font-style: italic; font-size: clamp(14px, 1.6vw, 21px); color: #b3ac9e; margin-top: 2.2em; }
#credits .cr-team { font-family: var(--sans); font-size: clamp(14px, 1.7vw, 22px); letter-spacing: .3em; margin-right: -.3em; text-transform: uppercase; color: #e6dfd1; margin-top: .8em; }
#credits .cr-team.cr-name { font-size: clamp(12px, 1.35vw, 18px); margin-top: .9em; }
#credits .cr-team.cr-name + .cr-name { margin-top: .75em; }
#credits .cr-roll { position: absolute; left: 0; right: 0; top: 0; z-index: 1; will-change: transform; }
#credits .cr-in { max-width: 720px; margin: 0 auto; padding: 0 24px; text-align: center; }
#credits .cr-sec { margin: 0 0 3.4em; }
#credits .cr-sec h5 { margin: 0 0 1.1em; font: 500 11px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: #8f897d; }
#credits .cr-sec p { margin: .4em 0; font-size: clamp(16px, 1.7vw, 21px); line-height: 1.4; color: #e3ddd0; }
#credits .cr-sec p small { display: block; max-width: 34em; margin: .3em auto .9em; font-family: var(--sans); font-size: clamp(11.5px, 1.05vw, 13.5px); line-height: 1.5; color: #9b9589; }
#credits .cr-sec p:last-child small { margin-bottom: 0; }
#credits .cr-crew { margin-bottom: 5em; }
#credits .cr-crew p { font-size: clamp(18px, 2vw, 25px); }
#credits .cr-pair { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.3em; text-align: left; }
#credits .cr-pair .r { text-align: right; font-style: italic; color: #a49e91; font-size: .82em; align-self: center; }
#credits .cr-note { margin: 5em 0 0; font-size: clamp(13px, 1.3vw, 16px); line-height: 1.65; color: #9b9589; }
#credits .cr-end { margin: 34vh 0 0; font-style: italic; font-size: clamp(19px, 2.1vw, 27px); color: #efe9dc; }
#credits .cr-skip { position: absolute; right: 24px; bottom: 20px; z-index: 1; font: 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(236,231,219,.42); opacity: 0; transition: opacity 1s; }
#credits .cr-skip.on { opacity: 1; }
@media (max-width: 560px) { #credits .cr-pair { grid-template-columns: 1fr; text-align: center; row-gap: .1em; } #credits .cr-pair .r { text-align: center; } }
