/*!
 * voyager-map.css  v1.1.0
 * v1.1.0 (25 October 2026): the date column has a fixed width so the
 * slider holds still while dragged, and the map has a fullscreen layout;
 * after the swap the new page head stays above the map (order -2).
 * The 3D map of both Voyager paths under the countdown on /voyager/
 * (js/voyager-map.js). Loads after ss-sim.css and voyager.css and uses
 * the page tokens voyager.css sets on .ss-voyager-page.
 *
 * Colours: the frame is true black like every sim. Controls (the
 * slider, the stops, Back to today) are yellow, never blue, because
 * blue on this site means a link. On the map itself Voyager 1 is
 * amber, the page's distance colour, and Voyager 2 is turquoise, the
 * colour of its card further down; those are artwork, not controls.
 */

.ss-voyager-page .vg-map {
    max-width: var(--content-w, 1320px);
    margin: 0 auto 1rem;
}
.ss-voyager-page .vg-map[hidden] { display: none; }

.ss-voyager-page .vg-map-head {
    padding: 1rem 1.5rem 0;
    text-align: center;
}
.ss-voyager-page .vg-map-intro { padding: 0 1.5rem; }
.ss-voyager-page .vg-map-intro .ss-sim-prose { margin-bottom: 1.5rem; }

/* ---- the frame: canvas, labels, hint and credit ----
   Height from the screen, like the countdown above it: on a 1366 x 768
   laptop the frame, the slider and the stops fit on screen together
   once the map is scrolled to; the readout cards sit just below. */
.ss-voyager-page .vg-map-frame {
    position: relative;
    height: clamp(380px, calc(100vh - 270px), 640px);
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    isolation: isolate;
    box-shadow:
        0 0 0 1px rgba(250, 219, 103, .55),
        0 0 14px rgba(250, 219, 103, .12);
}
.ss-voyager-page .vg-map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    /* One finger scrolls the page; two turn the map (voyager-map.js). */
    touch-action: pan-y;
    cursor: grab;
}
.ss-voyager-page .vg-map-canvas:active { cursor: grabbing; }

.ss-voyager-page .vg-map-labels {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.ss-voyager-page .vg-map-label {
    position: absolute;
    left: 0;
    top: 0;
    padding: 0 0 0 10px;
    margin-top: -.5em;
    white-space: nowrap;
    font-size: .64rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, .78);
    text-shadow: 0 0 3px #000, 0 1px 6px #000;
    visibility: hidden;
}
.ss-voyager-page .vg-map-label--v1,
.ss-voyager-page .vg-map-label--v2 { padding-left: 14px; font-size: .72rem; font-weight: 700; }
/* Voyager 1's name sits above its dot and Voyager 2's below, so the
   two (and Earth's, at launch) do not land on top of each other. */
.ss-voyager-page .vg-map-label--v1 { color: var(--amber, #E29000); margin-top: -1.45em; }
.ss-voyager-page .vg-map-label--v2 { color: var(--nebula-turquoise, #4A9FD4); margin-top: .35em; }
.ss-voyager-page .vg-map-label--sun { padding-left: 16px; color: #FFE6A8; }
.ss-voyager-page .vg-map-label--shell { color: var(--highlight-yellow, #fadb67); margin-top: -1.6em; transform-origin: 0 0; }
.ss-voyager-page .vg-map-label--ring { padding-left: 4px; margin-top: .4em; color: rgba(226, 232, 240, .45); }

/* Near the right edge a label sits to the left of its dot instead
   (voyager-map.js): the gap moves to the other side, same width. */
.ss-voyager-page .vg-map-label.is-flipped { padding-left: 0; padding-right: 10px; }
.ss-voyager-page .vg-map-label--v1.is-flipped,
.ss-voyager-page .vg-map-label--v2.is-flipped { padding-right: 14px; }
.ss-voyager-page .vg-map-label--sun.is-flipped { padding-right: 16px; }
.ss-voyager-page .vg-map-label--ring.is-flipped { padding-right: 4px; }

.ss-voyager-page .vg-map-hint,
.ss-voyager-page .vg-map-credit {
    position: absolute;
    z-index: 2;
    margin: 0;
    font-size: .62rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--vg-dim, #AE8E7B);
    text-shadow: 0 1px 4px #000;
    pointer-events: none;
}
.ss-voyager-page .vg-map-hint   { left: 14px; top: 12px; }
.ss-voyager-page .vg-map-credit { right: 14px; bottom: 10px; }
.ss-voyager-page .vg-map-hint-touch,
.ss-voyager-page .vg-map-hint-fs { display: none; }
@media (hover: none) {
    .ss-voyager-page .vg-map-hint-mouse { display: none; }
    .ss-voyager-page .vg-map-hint-touch { display: inline; }
    /* In fullscreen one finger turns the map (voyager-map.js). */
    .ss-voyager-page .vg-map.is-fullscreen .vg-map-hint-touch { display: none; }
    .ss-voyager-page .vg-map.is-fullscreen .vg-map-hint-fs { display: inline; }
}

/* Fullscreen: top right, where nothing else sits, dressed like the
   stops (muted yellow, yellow when pressed, filled on hover), never the
   shared sim blue, which on this site means a link. The icon turns
   inwards while fullscreen. */
.ss-voyager-page .vg-map-fs {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 3;
    padding: .42rem .85rem;
    font-size: .72rem;
    border-color: rgba(250, 219, 103, .4);
    color: var(--starlight-muted, #E2E8F0);
    background: rgba(0, 0, 0, .45);
}
.ss-voyager-page .vg-map-fs[aria-pressed="true"] {
    border-color: var(--highlight-yellow, #fadb67);
    color: var(--highlight-yellow, #fadb67);
}
.ss-voyager-page .vg-map-fs:focus-visible {
    background: var(--highlight-yellow, #fadb67);
    border-color: var(--highlight-yellow, #fadb67);
    color: #1A0C08;
    outline: none;
}
@media (hover: hover) {
    .ss-voyager-page .vg-map-fs:hover {
        background: var(--highlight-yellow, #fadb67);
        border-color: var(--highlight-yellow, #fadb67);
        color: #1A0C08;
    }
}
.ss-voyager-page .vg-map-fs svg { width: 13px; height: 13px; }
.ss-voyager-page .vg-map-fs .vg-map-fs-out,
.ss-voyager-page .vg-map.is-fullscreen .vg-map-fs .vg-map-fs-in { display: none; }
.ss-voyager-page .vg-map.is-fullscreen .vg-map-fs .vg-map-fs-out { display: inline; }

/* ---- the panel under the frame: date, slider, stops, readout ----
   The date column has a fixed width, made for the widest date there is
   ("28 September 2026" is 9.5 times the date's font size). If it grew
   and shrank with each date, the slider beside it would slide under
   the pointer mid-drag and the date would jump back and forth. The
   first line is for browsers without clamp(), such as some TVs. */
.ss-voyager-page .vg-map-panel {
    display: grid;
    grid-template-columns: 16.7rem 1fr auto;
    grid-template-columns: calc(clamp(1.25rem, 2.4vw, 1.7rem) * 9.8) 1fr auto;
    align-items: center;
    gap: .6rem 1.25rem;
    padding: 1.1rem 1.5rem 0;
}
.ss-voyager-page .vg-map-when { min-width: 0; text-align: left; }
.ss-voyager-page .vg-map-date {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.25rem, 2.4vw, 1.7rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--starlight, #F7FAFC);
    font-variant-numeric: tabular-nums;
}
.ss-voyager-page .vg-map-stamp {
    margin: .15rem 0 0;
    font-size: .64rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--vg-dim, #AE8E7B);
}
/* The site's honesty rule: when the map shows anything but today, the
   stamp says so, in the active yellow. */
.ss-voyager-page .vg-map.is-replay .vg-map-stamp { color: var(--highlight-yellow, #fadb67); }

.ss-voyager-page .vg-map-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 32px;
    margin: 0;
    background: transparent;
    cursor: pointer;
}
.ss-voyager-page .vg-map-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
}
.ss-voyager-page .vg-map-range::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
}
.ss-voyager-page .vg-map-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -8px;
    border: 0;
    border-radius: 50%;
    background: var(--highlight-yellow, #fadb67);
    box-shadow: 0 0 0 4px rgba(250, 219, 103, .22), 0 1px 6px rgba(0, 0, 0, .8);
}
.ss-voyager-page .vg-map-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: var(--highlight-yellow, #fadb67);
    box-shadow: 0 0 0 4px rgba(250, 219, 103, .22), 0 1px 6px rgba(0, 0, 0, .8);
}
.ss-voyager-page .vg-map-range:focus-visible {
    outline: 2px solid var(--highlight-yellow, #fadb67);
    outline-offset: 4px;
    border-radius: 6px;
}

/* Stops and Back to today: resting outline in a muted yellow, the
   pressed stop in full yellow, and any hover filled yellow, the same
   three states as the sim buttons but never blue. */
.ss-voyager-page .vg-map-stops {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem;
    margin: .2rem 0 0;
}
.ss-voyager-page .vg-map-stop,
.ss-voyager-page .vg-map-now {
    padding: .45rem .9rem;
    border: 1px solid rgba(250, 219, 103, .4);
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: var(--starlight-muted, #E2E8F0);
    font: inherit;
    font-size: .76rem;
    font-weight: 500;
    letter-spacing: .04em;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}
.ss-voyager-page .vg-map-stop[aria-pressed="true"] {
    border-color: var(--highlight-yellow, #fadb67);
    color: var(--highlight-yellow, #fadb67);
    background: rgba(250, 219, 103, .1);
}
.ss-voyager-page .vg-map-stop:focus-visible,
.ss-voyager-page .vg-map-now:focus-visible {
    background: var(--highlight-yellow, #fadb67);
    border-color: var(--highlight-yellow, #fadb67);
    color: #1A0C08;
    outline: none;
}
/* Hover only where there is a real pointer: on a touch screen hover
   sticks after a tap and would hide the pressed outline. */
@media (hover: hover) {
    .ss-voyager-page .vg-map-stop:hover,
    .ss-voyager-page .vg-map-now:hover {
        background: var(--highlight-yellow, #fadb67);
        border-color: var(--highlight-yellow, #fadb67);
        color: #1A0C08;
    }
}
/* Hidden, Back to today keeps its place (invisible, and out of reach
   of the keyboard and screen readers), so the slider does not change
   width the moment the date leaves today. */
.ss-voyager-page .vg-map-now[hidden] { display: inline-block; visibility: hidden; }

.ss-voyager-page .vg-map-readout {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin: .6rem 0 0;
}
.ss-voyager-page .vg-map-probe {
    margin: 0;
    padding: .7rem 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(121, 85, 72, .4);
    text-align: left;
}
.ss-voyager-page .vg-map-probe dt {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 .3rem;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.ss-voyager-page .vg-map-probe dt::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
}
.ss-voyager-page .vg-map-probe--v1 dt { color: var(--amber, #E29000); }
.ss-voyager-page .vg-map-probe--v2 dt { color: var(--nebula-turquoise, #4A9FD4); }
.ss-voyager-page .vg-map-probe dd {
    margin: 0;
    font-size: .88rem;
    line-height: 1.5;
    color: var(--starlight-muted, #E2E8F0);
}
.ss-voyager-page .vg-map-num {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--starlight, #F7FAFC);
    font-variant-numeric: tabular-nums;
}

.ss-voyager-page .vg-map-note {
    max-width: 900px;
    margin: 1rem auto 0;
    padding: 0 1.5rem;
    font-size: .8rem;
    line-height: 1.6;
    color: var(--vg-dim, #AE8E7B);
    text-align: center;
}

@media (max-width: 640px) {
    .ss-voyager-page .vg-map-head { padding: .5rem 1rem 0; }
    .ss-voyager-page .vg-map-intro { padding: 0 1rem; }
    .ss-voyager-page .vg-map-frame {
        height: clamp(300px, 58vh, 460px);
        border-radius: 12px;
    }
    .ss-voyager-page .vg-map-panel {
        grid-template-columns: 1fr auto;
        padding: .9rem 1rem 0;
    }
    .ss-voyager-page .vg-map-scrub { grid-column: 1 / -1; grid-row: 2; }
    .ss-voyager-page .vg-map-readout { grid-template-columns: 1fr; }
    .ss-voyager-page .vg-map-note { padding: 0 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ss-voyager-page .vg-map-stop,
    .ss-voyager-page .vg-map-now { transition: none; }
}

/* ================================================================
   THE 18 NOVEMBER SWAP
   voyager-map.js adds vg-after-milestone to the page once the
   countdown's T0_MS has passed (decided at page load, and only when
   the map works). The map then comes first and the countdown sits
   under it as a smaller readout: the countdown digits, their label and
   the milestone instant lines step aside, and the kicker, title,
   distance, signal time and star bar stay.
   The page order changes on screen only, and the page head (with the
   h1, voyager.css PAGE HEAD) stays first both on screen and in the
   HTML, which is what search engines and screen readers read: the map
   takes order -1, so the head takes -2 to stay above it.
   Fullscreen (is-fullscreen, set by voyager.js) keeps the full module.
   ================================================================ */
.ss-voyager-page.vg-after-milestone {
    display: flex;
    flex-direction: column;
}
.ss-voyager-page.vg-after-milestone > * { width: 100%; }
.ss-voyager-page.vg-after-milestone .vg-head { order: -2; }
.ss-voyager-page.vg-after-milestone .vg-map {
    order: -1;
    margin-top: 1rem;
}
/* As the hero, the picture comes straight under its heading: the
   intro paragraph moves below the controls, the note stays last. */
.ss-voyager-page.vg-after-milestone .vg-map:not([hidden]) {
    display: flex;
    flex-direction: column;
}
.ss-voyager-page.vg-after-milestone .vg-map-head { padding-top: 0; }
.ss-voyager-page.vg-after-milestone .vg-map-intro { order: 1; margin-top: 1.25rem; }
.ss-voyager-page.vg-after-milestone .vg-map-note { order: 2; }
.ss-voyager-page.vg-after-milestone .ss-sim-module:not(.is-fullscreen) {
    height: auto;
    margin-top: 2rem;
}
.ss-voyager-page.vg-after-milestone .ss-sim-module:not(.is-fullscreen) .ss-sim-overlay {
    position: relative;
    inset: auto;
    padding: 2rem 1.25rem 3.25rem;
}
.ss-voyager-page.vg-after-milestone .ss-sim-module:not(.is-fullscreen) .ss-sim-count-label,
.ss-voyager-page.vg-after-milestone .ss-sim-module:not(.is-fullscreen) .ss-sim-countdown,
.ss-voyager-page.vg-after-milestone .ss-sim-module:not(.is-fullscreen) .ss-sim-instant {
    display: none;
}

/* ================================================================
   THE MAP FULLSCREEN
   voyager-map.js adds is-fullscreen to the map section while it fills
   the screen: the picture takes all the height the slider, stops and
   readout leave, and the heading, intro and note step aside. Last in
   the file so it wins over the swap rules above. In fullscreen one
   finger turns the map, so the canvas keeps every touch.
   ================================================================ */
.ss-voyager-page .vg-map.is-fullscreen {
    display: flex;
    flex-direction: column;
    max-width: none;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: clamp(12px, 2vw, 32px);
    background: #000;
    overflow-y: auto;
}
.ss-voyager-page .vg-map.is-fullscreen .vg-map-head,
.ss-voyager-page .vg-map.is-fullscreen .vg-map-intro,
.ss-voyager-page .vg-map.is-fullscreen .vg-map-note { display: none; }
.ss-voyager-page .vg-map.is-fullscreen .vg-map-frame {
    flex: 1 1 auto;
    height: auto;
    min-height: 320px;
}
.ss-voyager-page .vg-map.is-fullscreen .vg-map-canvas { touch-action: none; }
.ss-voyager-page .vg-map.is-fullscreen .vg-map-panel {
    flex: none;
    padding: 1rem 0 0;
}

/* ---- the small planetarium (voyager-map.js v1.2.0, 31 October 2026) ----
   The Sun's, planets' and Voyagers' names take a click to fly there (the
   rest of the label layer still lets clicks through to the map), and a
   Whole journey button sits under Fullscreen, dressed the same. */
.ss-voyager-page .vg-map-label.is-pickable { pointer-events: auto; cursor: pointer; }
@media (hover: hover) {
    .ss-voyager-page .vg-map-label.is-pickable:hover { color: var(--highlight-yellow, #fadb67); }
}
.ss-voyager-page .vg-map-reset {
    position: absolute;
    top: 48px;
    right: 12px;
    z-index: 3;
    padding: .42rem .85rem;
    font-size: .72rem;
    border-color: rgba(250, 219, 103, .4);
    color: var(--starlight-muted, #E2E8F0);
    background: rgba(0, 0, 0, .45);
}
@media (hover: hover) {
    .ss-voyager-page .vg-map-reset:hover {
        background: var(--highlight-yellow, #fadb67);
        border-color: var(--highlight-yellow, #fadb67);
        color: #1A0C08;
    }
}
