/* AI disclosure: written with Claude (Anthropic) during NASA Space Apps Milano 2026, from the team's instructions,
   and checked by the team. See README, "AI use". */
/* SPHEREx Blink on yourastro.space. Same system as the main site:
   light grey ground, one electric blue, compressed capitals, mono labels, flat square shapes.
   The sky itself stays plain greyscale, as astronomers read it. */

:root {
    --bg: #f2f2f2; --panel: #fafafa; --surface: #ffffff;
    --blue: #141ef0; --blue-deep: #0a10a8;
    --blue-soft: rgba(20, 30, 240, .08); --blue-line: rgba(20, 30, 240, .28);
    --grey-btn: #e4e4e8; --grey-btn-hover: #d6d6dc;
    --warn: #b3261e;
    --display: 'Antonio', 'Arial Narrow', sans-serif;
    --text: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #070b2e; --panel: #0b1038; --surface: #0f1545;
    --blue: #8a92ff; --blue-deep: #c3c7ff;
    --blue-soft: rgba(138, 146, 255, .12); --blue-line: rgba(138, 146, 255, .3);
    --grey-btn: #161d55; --grey-btn-hover: #1f2770;
    --warn: #ff8a80;
    color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--blue); font: 400 17px/1.55 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-deep); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--blue); color: var(--bg); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 30; background: var(--bg); padding: 6px 10px; border: 2px solid var(--blue); }
@media (prefers-reduced-motion: reduce) { *, *::after { transition: none !important; animation: none !important; } }

/* ---------- header, as on every page of the site ---------- */
.frame { border: 5px solid var(--blue); }
.top { display: flex; align-items: center; gap: 24px; padding: 28px clamp(16px, 6vw, 92px) 12px; }
.top nav { flex: 1; display: flex; justify-content: center; gap: clamp(18px, 4vw, 56px); }
.top nav a { font: 400 16px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }
.mark { display: inline-grid; justify-items: center; text-decoration: none; border: 2px solid var(--blue); padding: 5px 7px 4px; font: 600 15px/0.9 var(--display); text-transform: uppercase; }
.mark span + span { border-top: 2px solid var(--blue); padding-top: 3px; margin-top: 3px; font-weight: 200; font-size: 17px; }
.mark:hover { background: var(--blue); color: var(--bg); }
.mark:hover span + span { border-color: var(--bg); }
.tools { display: flex; align-items: center; gap: 8px; flex: none; }
.lang { display: inline-flex; border: 1px solid var(--blue); }
.lang button { font: 600 12px/1 var(--mono); background: transparent; color: var(--blue); border: 0; padding: 7px 9px; min-height: 30px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--blue); color: var(--bg); }
.theme-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; cursor: pointer; background: transparent; color: var(--blue); border: 1px solid var(--blue); }
.theme-toggle:hover { background: var(--blue-soft); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .t-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .t-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .t-moon { display: none; }

.eyebrow { font: 600 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-align: center; margin: 0 0 14px; }
.eyebrow::before { content: '[ '; opacity: .6; }
.eyebrow::after { content: ' ]'; opacity: .6; }

/* ---------- hero ---------- */
.hero { display: grid; justify-items: center; text-align: center; padding: clamp(20px, 3vw, 36px) 16px clamp(20px, 2.6vw, 30px); }
.hero h1 { font: 200 clamp(60px, 8.5vw, 124px)/0.86 var(--display); text-transform: none; margin: 0 0 16px; letter-spacing: -0.01em; }
.lede { max-width: 64ch; margin: 0; font-size: 17px; }

/* ---------- the whole sky: map, outside, inside ---------- */
.explore { max-width: 1180px; margin: 0 auto 28px; padding: 0 16px; }
.ex-stage { position: relative; aspect-ratio: 2 / 1; background: #000; overflow: hidden; }
.ex-sky, .ex-earth { position: absolute; inset: 0; width: 100%; height: 100%; }
.ex-earth { object-fit: contain; background: #000; }
.explore[data-world="earth"] .ex-sky { visibility: hidden; }
.ex-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; color: #f2f2f2; font: 400 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; opacity: .75; pointer-events: none; }
.ex-zoom { position: absolute; right: 12px; top: 12px; display: grid; gap: 6px; z-index: 5; }
.ex-zoom button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid #f2f2f2; background: rgba(7, 11, 46, .55); color: #f2f2f2; font: 400 20px/1 var(--display); cursor: pointer; }
.ex-zoom button:hover { background: #141ef0; border-color: #141ef0; }
.ex-zoom svg { width: 18px; height: 18px; }
.explore[data-world="earth"] .ex-zoom { visibility: hidden; }
.ex-dock { display: grid; justify-items: center; gap: 12px; padding: 14px 14px 12px; border-top: 1px solid var(--blue-line); }
.shapes { display: flex; gap: clamp(16px, 4vw, 40px); }
.shapes button { display: inline-flex; align-items: center; gap: 7px; padding: 4px 2px 6px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--blue); cursor: pointer; font: 400 17px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.shapes button svg { width: 18px; height: 18px; }
.shapes button:hover { border-bottom-color: var(--blue-line); }
.shapes button[aria-checked="true"] { border-bottom-color: var(--blue); }
.shapes button[aria-disabled="true"] { opacity: .3; cursor: default; border-bottom-color: transparent; }
.ex-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 12px; }
.ex-row .seg { min-width: 300px; }
.ex-row .btn { min-height: 40px; font-size: 16px; }
.seg.seg4 { grid-template-columns: repeat(4, 1fr); }
/* sky / Earth: a flat vertical switch in the site's square style, up for the sky, down for the Earth */
.world { display: inline-grid; grid-template-columns: auto auto; grid-template-rows: 1fr 1fr; align-items: center; column-gap: 9px; padding: 3px 10px 3px 4px; border: 1px solid var(--blue); }
.world .wtrack { grid-row: 1 / span 2; position: relative; width: 20px; height: 44px; padding: 0; border: 1px solid var(--blue); background: transparent; cursor: pointer; }
.world .wtrack::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 18px; background: var(--blue); transition: transform .25s cubic-bezier(.45, 1.45, .55, 1); }
.explore[data-world="earth"] .world .wtrack::after { transform: translateY(20px); }
.world button[data-world] { border: 0; background: none; padding: 0 4px; height: 22px; text-align: left; color: var(--blue); opacity: .8; cursor: pointer; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.world button[data-world][aria-checked="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.ex-lambda { display: flex; align-items: center; gap: 12px; width: min(820px, 100%); }
.ex-lambda .label { margin: 0; }
.ex-lambda input { flex: 1; min-width: 160px; accent-color: var(--blue); }
.ex-lambda output { font: 400 13px var(--mono); min-width: 7ch; text-align: right; font-variant-numeric: tabular-nums; }
.ex-now { margin: 0; max-width: 76ch; text-align: center; font-size: 15px; min-height: 1.5em; }
.ex-about { font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.ex-about::after { content: ' \2193'; }
.ex-now .src { font: 400 12px var(--mono); letter-spacing: .03em; }
/* outside: a sphere needs a square room, centred in the panel */
.explore[data-shape="outside"][data-world="sky"] .ex-sky { left: 50%; width: auto; height: 100%; aspect-ratio: 1; transform: translateX(-50%); }
/* the crosshair: two thin lines across the whole map, fixed to the screen, never in the way of the mouse */
.ex-cross { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.ex-cross::before, .ex-cross::after { content: ""; position: absolute; background: rgba(242, 242, 242, .38); }
.ex-cross::before { left: 0; right: 0; top: 50%; height: 1px; }
.ex-cross::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.explore.no-cross .ex-cross, .explore[data-world="earth"] .ex-cross { display: none; }
/* the lens: a square you drag over the map; its centre is the spot it hands to the viewer */
.lens { position: absolute; left: 0; top: 0; width: 132px; height: 132px; z-index: 6; border: 2px solid #f2f2f2; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 6px 24px rgba(0, 0, 0, .45); display: grid; grid-template-rows: auto 1fr; }
.lens::after { content: ""; position: absolute; left: 50%; top: calc(50% + 11px); width: 10px; height: 10px; transform: translate(-50%, -50%); border: 1px solid #f2f2f2; border-radius: 50%; pointer-events: none; }
.lens-bar { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 3px 4px 3px 7px; background: #141ef0; color: #f2f2f2; font: 400 10px/1.2 var(--mono); letter-spacing: .02em; cursor: grab; touch-action: none; user-select: none; white-space: nowrap; overflow: hidden; }
.lens-bar:active { cursor: grabbing; }
.lens-bar:focus-visible { outline: 2px solid #ffb000; outline-offset: 0; }
.lens-bar button { border: 0; background: none; color: #f2f2f2; font: 400 16px/1 var(--display); cursor: pointer; padding: 0 2px; }
.lens-use { align-self: end; justify-self: center; margin-bottom: 6px; padding: 3px 8px; border: 0; background: rgba(7, 11, 46, .8); color: #f2f2f2; font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.lens-use:hover { background: #141ef0; }
#lensBtn { gap: 6px; }
#lensBtn[aria-pressed="true"] { background: var(--blue); color: var(--bg); }
.seg.seg6 { grid-template-columns: repeat(6, 1fr); min-width: 240px; }
.seg.seg6 button { min-height: 30px; }
.ex-lambda { flex-wrap: wrap; justify-content: center; }
.ex-centre { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; font: 400 12px var(--mono); }
.ex-centre .label { margin: 0; }
.ex-centre output { font-variant-numeric: tabular-nums; }
.mini { min-height: 26px; padding: 0 9px; border: 1px solid var(--blue); background: transparent; color: var(--blue); font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.mini:hover { background: var(--blue-soft); }
.check.mini { border: 0; padding: 0; margin: 0; font: 400 12px var(--mono); }
/* what the marks on the map mean */
.ex-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 0; font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.ex-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ex-legend i { display: inline-block; flex: none; }
.lg-target { width: 11px; height: 11px; border: 2px solid #7a82ff; border-radius: 50%; }
.lg-known { width: 8px; height: 8px; border: 1.5px solid currentColor; }
.lg-sun { width: 11px; height: 11px; border: 2px solid #ff8a3d; border-radius: 50%; }
.lg-ecl { width: 18px; border-top: 2px dashed #ff8a3d; }
.lg-hole { width: 12px; height: 9px; border-radius: 50%; background: #000; box-shadow: 0 0 0 1px var(--blue-line); }
.ex-legend.no-known > span:not(:first-child) { display: none; }
.explore[data-world="earth"] .ex-legend { display: none; }
/* the card for a known object: over the map's top left on wide screens, under the map on phones */
.explore > .panel { position: relative; }
.ex-card { position: absolute; left: 12px; top: var(--k-top, 52px); z-index: 7; width: min(340px, calc(100% - 84px)); max-height: calc(100% - var(--k-top, 52px) - 12px); overflow: auto; padding: 14px 16px 14px; background: var(--panel); color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 10px 30px rgba(0, 0, 0, .35); font-size: 15px; line-height: 1.5; }
.ex-card[hidden] { display: none; }
.ex-peek { position: absolute; z-index: 8; width: 200px; padding: 10px 12px 12px; background: var(--panel); color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 10px 30px rgba(0, 0, 0, .4); }
.ex-peek[hidden] { display: none; }
.ex-peek .ex-card-x { right: 4px; top: 2px; width: 28px; height: 28px; font-size: 20px; }
.ex-peek-name { margin: 0 26px 2px 0; font: 400 18px/1.1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.ex-peek-tag, .ex-peek-when { margin: 0 0 8px; font: 500 10.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.ex-peek-when { margin: 6px 0 8px; }
.ex-peek canvas { display: block; width: 176px; height: 176px; background: #000; image-rendering: pixelated; cursor: pointer; }
.ex-peek .mini { width: 100%; }
.ex-peek.peek-dock { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-width: 360px; margin: 0 auto; padding: 8px 10px; display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto auto 1fr auto; column-gap: 10px; align-items: start; }
.ex-peek.peek-dock canvas { grid-column: 1; grid-row: 1 / 5; width: 96px; height: 96px; }
.ex-peek.peek-dock .ex-peek-name { grid-column: 2; font-size: 16px; }
.ex-peek.peek-dock .ex-peek-tag, .ex-peek.peek-dock .ex-peek-when { grid-column: 2; margin: 0 0 4px; }
.ex-peek.peek-dock .mini { grid-column: 2; align-self: end; }
.ex-card p { margin: 0 0 10px; }
.ex-card-type { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.ex-card-name { margin: 0 32px 8px 0; font: 400 26px/1.05 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.ex-card-note { font: 400 12px/1.45 var(--mono); opacity: .8; padding-top: 8px; border-top: 1px solid var(--blue-line); }
.ex-card-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-card-x { position: absolute; right: 8px; top: 6px; width: 32px; height: 32px; border: 0; background: none; color: var(--blue); font: 400 24px/1 var(--display); cursor: pointer; }
.ex-card-x:hover { background: var(--blue-soft); }
@media (max-width: 720px) {
    .ex-card { position: relative; left: auto; top: auto; width: auto; max-height: none; box-shadow: none; border-top: 1px solid var(--blue-line); }
}

@media (max-width: 640px) {
    .ex-stage { aspect-ratio: 4 / 3; }
    .explore .panel-bar span:last-child { display: none; }
    .explore[data-shape="map"] .ex-stage, .explore[data-world="earth"] .ex-stage { aspect-ratio: 2 / 1; }
    .shapes button { font-size: 15px; }
    .ex-row .seg { min-width: 0; width: 100%; }
    /* on a short phone map the four buttons go in one row along the top, so they cover less of the sky */
    .ex-zoom { right: 8px; top: 8px; grid-auto-flow: column; gap: 4px; }
    .ex-zoom button { width: 30px; height: 30px; }
    .explore.is-full .ex-stage .ex-fslabel { top: 48px; max-width: calc(100% - 24px); font-size: 11px; }
    .explore.is-full > .panel > .ex-dock { top: 84px; width: calc(100% - 24px); max-height: calc(100% - 96px); }
}

/* ---------- the two steps of the page ---------- */
.step { display: flex; align-items: baseline; gap: 12px; max-width: 1180px; margin: 0 auto 12px; padding: 0 16px; font: 400 clamp(22px, 2.6vw, 30px)/1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.step span:first-child { font: 600 12px var(--mono); letter-spacing: .08em; padding: 4px 7px; background: var(--blue); color: var(--bg); }
#step2 { scroll-margin-top: 12px; }
/* the map only takes the mouse and finger once someone clicks it, so the page always scrolls */
.ex-shield { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; cursor: pointer; }
.ex-shield span { padding: 8px 14px; background: rgba(7, 11, 46, .85); color: #f2f2f2; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; opacity: 0; transition: opacity .2s; }
.ex-shield.hint span, .ex-shield:focus-visible span { opacity: 1; }
.ex-shield[hidden], .explore[data-world="earth"] .ex-shield { display: none; }
.ex-next { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; }
.ex-next .btn { min-height: 40px; font-size: 17px; }
/* credits as a list you can scan */
.credits dl { display: grid; grid-template-columns: 140px 1fr; margin: 0; }
.credits dt, .credits dd { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--blue-line); }
.credits dt { font: 400 11px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.credits dd { font-size: 16px; }
.credits dt:last-of-type, .credits dd:last-of-type { border-bottom: 0; }
.credits + .btns { margin-top: 28px; }
@media (max-width: 640px) {
    .credits dl { grid-template-columns: 1fr; }
    .credits dt { border-bottom: 0; padding-bottom: 0; }
}

/* ---------- full screen: the map with its controls, or the viewer with its timeline ---------- */
.fs-btn .i-close { display: none; }
.is-full .fs-btn .i-open { display: none; }
.is-full .fs-btn .i-close { display: block; }
.fs-btn svg { width: 16px; height: 16px; }
.is-full { position: fixed; inset: 0; z-index: 50; margin: 0; padding: 0; max-width: none; width: 100vw; height: 100vh; height: 100dvh; background: var(--bg); overflow: auto; }
:fullscreen.is-full { position: static; }
/* a grid row has a definite height, which Aladin needs: it sizes its canvas from height: 100% */
.explore.is-full > .panel { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); box-shadow: none; }
.explore.is-full .ex-stage { aspect-ratio: auto; height: 100%; min-height: 0; }
/* the whole-sky oval is 2:1, so in full screen the map keeps that shape, centred, and never cuts the oval */
.explore.is-full[data-shape="map"] .ex-stage { aspect-ratio: 2 / 1; width: auto; max-width: 100%; justify-self: center; }
.explore.is-full[data-shape="map"] .ex-sky, .explore.is-full .ex-earth { background: #000; }
.explore.is-full > .panel { background: #000; }
.explore.is-full .panel-bar, .explore.is-full .ex-dock { background: var(--panel); }
.explore.is-full .ex-shield { display: none; }
.explore.is-full .ex-next { display: none; }
/* full screen, as in the Time Lens: nothing under the map; settings float over it, legend and centre sit on it */
.fs-only { display: none !important; }
.explore.is-full .ex-zoom .fs-only { display: grid !important; }
.explore.is-full .ex-dock { display: none; position: absolute; z-index: 8; left: 12px; top: 46px; width: min(380px, calc(100% - 72px)); max-height: calc(100% - 58px); overflow: auto; gap: 10px; padding: 14px; border: 1px solid var(--blue); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.explore.is-full.panel-open .ex-dock { display: grid; }
.explore.is-full .ex-dock .ex-row .seg { min-width: 0; width: 100%; }
.explore.is-full .ex-dock .ex-lambda { width: 100%; }
#fsPanelBtn[aria-expanded="true"] { background: #141ef0; border-color: #141ef0; }
.explore.is-full .ex-fslabel { display: block !important; position: absolute; left: 12px; top: 12px; z-index: 4; max-width: calc(100% - 80px); margin: 0; padding: 4px 9px; background: #141ef0; color: #f2f2f2; font: 400 12px/1.3 var(--mono); letter-spacing: .03em; }
.explore.is-full.panel-open .ex-fslabel { visibility: hidden; }
.explore.is-full .ex-fsbar { display: flex !important; position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 4; max-width: calc(100% - 24px); flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; padding: 6px 12px; background: rgba(7, 11, 46, .78); color: #f2f2f2; }
.ex-fsbar .ex-legend { color: #f2f2f2; font-size: 10px; }
.ex-fscentre { margin: 0; font: 400 11px var(--mono); letter-spacing: .04em; white-space: nowrap; }
.ex-fscentre span { text-transform: uppercase; opacity: .75; }
.ex-fscentre output { font-variant-numeric: tabular-nums; }
.explore.is-full[data-world="earth"] .ex-fsbar { display: none !important; }
.explore.is-full .ex-now { font-size: 14px; }
.viewer.is-full { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; box-shadow: none; }
.viewer.is-full .band { display: grid; place-items: center; min-height: 0; }
.viewer.is-full .stage { width: min(100vw, calc(100dvh - 150px)); }
body.has-full { overflow: hidden; }

/* ---------- the tool ---------- */
.tool { scroll-margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; max-width: 1180px; margin: 0 auto; padding: 0 16px clamp(40px, 5vw, 64px); }
.panel { background: var(--panel); box-shadow: 0 0 0 1px var(--blue-line); }
.panel-bar { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--blue-line); font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.panel-bar span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.panel-body { padding: 14px; }

.viewer .band { background: #000; }
/* on a wide screen the viewer stays in sight while the settings beside it scroll, so every change is seen */
@media (min-width: 981px) {
    .tool > .viewer:not(.is-full) { position: sticky; top: 12px; }
    .viewer:not(.is-full) .band { background: transparent; padding-top: 10px; }
    .viewer:not(.is-full) .stage { width: min(100%, max(380px, calc(100svh - 340px))); }
}
.viewer .stage { position: relative; width: min(100%, calc(100svh - 240px)); min-width: 260px; aspect-ratio: 1; margin: 0 auto; background: #000; }
.viewer canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.pill { position: absolute; padding: 3px 7px; background: var(--blue); color: #f2f2f2; font: 400 12px/1.3 var(--mono); letter-spacing: .02em; font-variant-numeric: tabular-nums; pointer-events: none; }
:root[data-theme="dark"] .pill { background: #141ef0; }
.pill.tl { left: 0; top: 0; } .pill.tr { right: 0; top: 0; } .pill:empty { display: none; }
.loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; background: rgba(7, 11, 46, .9); color: #f2f2f2; font-size: 16px; }
.loading p { margin: 0; max-width: 36ch; }
.loading .sub { font: 400 14px/1.5 var(--text); opacity: .8; }
.loading.err p:first-child { color: #ffb4ab; }
.bar { width: min(260px, 70%); height: 6px; background: rgba(242, 242, 242, .18); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: #f2f2f2; transition: width .3s; }
.bar.busy i { width: 30%; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

.timeline { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--blue-line); }
.timeline input[type=range] { flex: 1; accent-color: var(--blue); min-width: 0; }
.timeline .count { font: 400 12px var(--mono); min-width: 7ch; text-align: right; font-variant-numeric: tabular-nums; }
.play { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; background: var(--blue); color: var(--bg); cursor: pointer; flex: none; }
.play:hover { background: var(--blue-deep); }
.play svg { width: 14px; height: 14px; fill: currentColor; }
.viewer .legend { margin: 0; padding: 0 14px 10px; font: 400 11px/1.6 var(--mono); letter-spacing: .03em; }
.viewer .legend:empty { display: none; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid; margin-right: 6px; vertical-align: -1px; }
.k-gaia { border-color: #7a82ff; } .k-cw { border-color: #ffb000; }
.now { margin: 0; padding: 10px 14px 12px; border-top: 1px solid var(--blue-line); font-size: 15px; min-height: 2.6em; }

/* controls column */
.side { display: grid; gap: 16px; }
.choices { display: grid; }
.choices button { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--blue-line); background: transparent; color: var(--blue); cursor: pointer; text-align: left; font: 400 18px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.choices button:last-child { border-bottom: 0; }
.choices button small { font: 400 11px var(--mono); letter-spacing: .06em; }
.choices button:hover { background: var(--blue-soft); }
.choices button[aria-checked="true"] { background: var(--blue); color: var(--bg); }
.choices button[aria-checked="true"] small { opacity: 1; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--blue); }
.seg + .seg { margin-top: 10px; }
#pick[aria-pressed="true"] { background: var(--blue); color: var(--bg); }
.seg button { min-height: 36px; border: 0; background: transparent; color: var(--blue); cursor: pointer; font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.seg button + button { border-left: 1px solid var(--blue); }
.seg button:hover { background: var(--blue-soft); }
.seg button[aria-checked="true"] { background: var(--blue); color: var(--bg); }
.label { display: block; font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; }
.seg + .label, .seg + .label + .seg { margin-top: 12px; }

details.panel > summary { list-style: none; cursor: pointer; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary .panel-bar { border-bottom-color: transparent; }
details.panel[open] > summary .panel-bar { border-bottom-color: var(--blue-line); }
details.panel > summary .plus::before { content: '+'; }
details.panel[open] > summary .plus::before { content: '\2212'; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; font: 400 11px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select { height: 36px; padding: 0 8px; background: var(--surface); border: 1px solid var(--blue-line); border-radius: 0; color: var(--blue); font: 400 14px var(--mono); text-transform: none; letter-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; }
.field input:focus, .field select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 1px var(--blue); }
.check { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; font-size: 15px; cursor: pointer; }
.check input { accent-color: var(--blue); width: 16px; height: 16px; margin: 0; }
.hint { font-size: 14px; margin: 10px 0 0; }
/* the spectrum: one dot per exposure, coloured by sky pass */
.spec-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.spec-plot .ax { stroke: var(--blue-line); stroke-width: 1; }
.spec-plot .tk { fill: var(--blue); font: 400 9px var(--mono); }
.spec-plot .lb { fill: var(--blue); font: 400 9px var(--mono); letter-spacing: .03em; }
.spec-plot .win { fill: rgba(255, 176, 0, .22); }
.spec-plot .pt { fill: var(--blue); opacity: .35; cursor: default; }
.spec-plot .pt.mine { opacity: .85; cursor: pointer; }
.spec-plot .pt.p1 { fill: #7a82ff; } .spec-plot .pt.p2 { fill: #0a10a8; } .spec-plot .pt.p3 { fill: #5d5d8a; }
.spec-plot .pt.on { fill: #ffb000; opacity: 1; stroke: var(--blue); stroke-width: 1; }
.spec-plot .pt.dim { opacity: .12; }
#wlC { width: 100%; accent-color: #ffb000; margin: 4px 0 0; }
#wlC:disabled { opacity: .35; }
.spec-line { margin: 4px 0 10px; font: 400 12px/1.5 var(--mono); }
.spec-note { margin: 10px 0 0; font-size: 13px; line-height: 1.5; opacity: .85; }
.key.k-tr { background: #ffb000; border-radius: 50%; border: 0; }
.keys { display: flex; flex-wrap: wrap; gap: 2px 14px; font: 400 11px/1.7 var(--mono); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 0; }
.keys span { white-space: nowrap; }

.btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 0; font: 400 17px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; background: var(--blue); color: var(--bg); cursor: pointer; }
.btn:hover { background: var(--blue-deep); color: var(--bg); }
.btn-grey { background: var(--grey-btn); color: var(--blue); }
.btn-grey:hover { background: var(--grey-btn-hover); color: var(--blue); }
.btn.full { width: 100%; margin-top: 12px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--blue); color: var(--bg); padding: 10px 16px; font: 400 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; z-index: 20; }

/* ---------- sections below ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sec { padding-top: 96px; }
.giant { font: 200 clamp(60px, 11vw, 160px)/0.86 var(--display); text-transform: uppercase; text-align: center; margin: 0 0 36px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.panel > p { margin: 0; padding: 16px 18px 20px; font-size: 16px; }
.note { max-width: 62ch; margin: 32px auto 0; text-align: center; font-size: 16px; }
.sub { max-width: 62ch; margin: 0 auto 32px; text-align: center; }
.targets { width: 100%; border-collapse: collapse; font-size: 16px; }
.targets th, .targets td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--blue-line); vertical-align: top; }
.targets tr:last-child td { border-bottom: 0; }
.targets th { font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.targets td:first-child button { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font: 400 18px/1.2 var(--display); text-transform: uppercase; letter-spacing: .04em; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.targets td:last-child { font: 400 13px var(--mono); white-space: nowrap; }

footer { margin-top: 104px; border-top: 5px solid var(--blue); padding: 24px 16px 32px; }
footer p { max-width: 1180px; margin: 0 auto; font: 400 11px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 980px) {
    .tool { grid-template-columns: 1fr; max-width: 680px; }
    .viewer .stage { width: 100%; }
    .grid { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .frame { border-width: 4px; }
    .top { flex-wrap: wrap; padding: 18px 14px 10px; gap: 14px; justify-content: space-between; }
    .top nav { order: 3; flex-basis: 100%; justify-content: space-between; gap: 8px; }
    .top nav a { font-size: 15px; }
    .sec { padding-top: 72px; }
    footer { margin-top: 80px; }
    .targets th:nth-child(2), .targets td:nth-child(2) { display: none; }
}

/* detector switch in the viewer and the panel about the chosen target */
.panel-body .seg.seg6 { min-width: 0; }
.seg button.best:not([aria-checked="true"]) { text-decoration: underline; text-underline-offset: 3px; }
.tinfo .panel-body p { margin: 0; font-size: 15px; line-height: 1.5; }
.tinfo .facts { margin-top: 10px !important; font: 400 12px/1.5 var(--mono) !important; letter-spacing: .03em; }

/* the story, three reading levels, after the layout of Menard's sky map: map first, words below */
.story-tabs { max-width: 560px; margin: 0 auto; grid-template-columns: repeat(3, 1fr); }
.story-tabs button[aria-selected="true"] { background: var(--blue); color: var(--bg); }
.story-lede { max-width: 62ch; margin: 22px auto 30px; text-align: center; font-size: 16px; }
.chapters { display: grid; gap: 16px; max-width: 820px; margin: 0 auto; }
.chapter-body { padding: 4px 20px 6px; }
.chapter-body p { margin: 14px 0; font-size: 17px; line-height: 1.6; max-width: 70ch; }
.chapter-body sub, .chapter-body sup { font-size: .72em; line-height: 0; }
.cite { font: 400 12px var(--mono); white-space: nowrap; }
.cite a { text-decoration: none; }
.cite a:hover { text-decoration: underline; }
.honest { max-width: 820px; margin: 16px auto 0; }
.honest dl { display: grid; grid-template-columns: 130px 1fr; margin: 0; }
.honest dt, .honest dd { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--blue-line); }
.honest dt { font: 600 11px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.honest dd { font-size: 16px; }
.honest dt:last-of-type, .honest dd:last-of-type { border-bottom: 0; }
.refs ol { margin: 0; padding: 14px 20px 14px 46px; font-size: 15px; line-height: 1.5; }
.refs li { margin: 6px 0; scroll-margin-top: 90px; }
.refs li:target { background: var(--blue-soft); }
@media (max-width: 640px) {
    .honest dl { grid-template-columns: 1fr; }
    .honest dt { border-bottom: 0; padding-bottom: 0; }
    .chapter-body { padding: 2px 14px 4px; }
}

/* interactive figures inside the story chapters */
.sfig { margin: 6px 20px 20px; padding: 16px; border: 1px solid var(--blue-line); background: var(--blue-soft); }
.fig-svg { display: block; width: 100%; height: auto; max-width: 560px; margin: 0 auto; overflow: visible; }
.fig-square { max-width: 300px; }
.f-pix { fill: var(--blue); }
.f-star { fill: var(--blue); }
.f-starhot { fill: #ff4040; stroke: var(--bg); stroke-width: 2; }
.f-tick line { stroke: #ff4040; stroke-width: 2.5; }
.f-band { fill: var(--blue); opacity: .14; }
.f-band2 { fill: var(--blue); opacity: .3; }
.f-axis { stroke: var(--blue); stroke-width: 1; }
.f-faint { stroke: var(--bg); stroke-width: 1; opacity: .5; }
.f-curve { fill: none; stroke: var(--blue); stroke-width: 2.5; }
.f-peak { stroke: #ff4040; stroke-width: 1.5; stroke-dasharray: 4 4; }
.f-lab { fill: var(--blue); font: 400 11px var(--mono); }
.f-iconpath { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fig-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin-top: 14px; }
.fig-controls3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.fig-slider { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; min-width: 220px; font: 400 12px var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.fig-slider input { accent-color: var(--blue); width: 100%; }
.fig-slider output { min-width: 5ch; text-align: right; font-variant-numeric: tabular-nums; }
.fig-btn { min-height: 34px; padding: 6px 12px; font-size: 15px; }
.fig-readout { margin: 12px auto 0; max-width: 62ch; text-align: center; font: 400 13px/1.5 var(--mono); }
.sfig figcaption { margin: 14px auto 0; max-width: 64ch; font-size: 14px; line-height: 1.5; opacity: .85; text-align: center; }
.fig-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.chip { display: inline-grid; gap: 2px; padding: 7px 11px; border: 1px solid var(--blue); background: transparent; color: var(--blue); cursor: pointer; font: 400 14px/1.2 var(--text); text-align: left; }
.chip small { font: 400 11px var(--mono); opacity: .8; }
.chip:hover { background: var(--blue-soft); }
.chip[aria-pressed="true"] { background: var(--blue); color: var(--bg); }
.fig-seg { max-width: 420px; margin: 0 auto 12px; }
.fig-steps { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--blue); }
.fig-steps button { display: grid; gap: 2px; justify-items: center; padding: 10px 4px; border: 0; background: transparent; color: var(--blue); cursor: pointer; font: 400 17px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; }
.fig-steps button span { font: 400 11px var(--mono); }
.fig-steps button + button { border-left: 1px solid var(--blue); }
.fig-steps button:hover { background: var(--blue-soft); }
.fig-steps button[aria-selected="true"] { background: var(--blue); color: var(--bg); }
.fig-step-panel { display: grid; grid-template-columns: 60px 1fr; gap: 16px; align-items: center; margin-top: 14px; min-height: 76px; }
.fig-step-panel p { margin: 0; font-size: 16px; }
.fig-icon { width: 60px; height: 60px; }
.fig-bars { display: grid; gap: 10px; }
.fig-bar { display: grid; grid-template-columns: 150px 1fr auto auto; align-items: center; gap: 12px; }
.fig-bar-name { font: 400 17px/1.1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.fig-bar-track { height: 14px; border: 1px solid var(--blue-line); background: var(--bg); }
.fig-bar-track i { display: block; height: 100%; background: var(--blue); }
.fig-bar-val { font: 400 12px var(--mono); white-space: nowrap; }
@media (max-width: 640px) {
    .sfig { margin: 4px 10px 14px; padding: 12px; }
    .fig-controls3 { grid-template-columns: 1fr; }
    .fig-slider { min-width: 0; width: 100%; }
    .fig-steps button { font-size: 13px; padding: 8px 2px; }
    .fig-bar { grid-template-columns: 1fr auto; }
    .fig-bar-track { grid-column: 1 / -1; order: 3; }
    .fig-bar-val { order: 4; }
}

/* chapters as dropdowns, so the page reads as titles first */
details.chapter > summary .panel-bar span:first-child { font: 400 20px/1.1 var(--display); letter-spacing: .04em; }
details.chapter > summary .panel-bar { padding-top: 12px; padding-bottom: 4px; }
.hook { margin: 0; padding: 0 16px 14px; font-size: 16px; }
details.chapter > summary:hover { background: var(--blue-soft); }
details.chapter[open] > summary .hook { padding-bottom: 12px; border-bottom: 1px solid var(--blue-line); }
details.chapter[open] .sfig { margin-top: 18px; }

/* real images from Wikimedia Commons beside the words */
.chapter-main { display: grid; grid-template-columns: 1fr 300px; gap: 8px 24px; align-items: start; padding-right: 20px; }
.photo { margin: 18px 0 18px; }
.photo img { display: block; width: 100%; height: auto; border: 1px solid var(--blue-line); }
.photo figcaption { margin-top: 8px; font-size: 13px; line-height: 1.45; }
.photo .credit { display: block; margin-top: 4px; font: 400 11px var(--mono); opacity: .8; }
.plate-blink { width: 100%; aspect-ratio: 460 / 455; border: 1px solid var(--blue-line); background-repeat: no-repeat;
    background-size: calc(100% * 960 / 460) auto; background-position: 0 61.1%; }
.plate-blink.second { background-position: 98.8% 61.1%; }
.plate-btn { margin-top: 8px; width: 100%; }
@media (max-width: 860px) {
    .chapter-main { grid-template-columns: 1fr; padding: 0 14px; }
    .chapter-main .chapter-body { padding: 0; }
    .photo { max-width: 420px; margin: 0 auto 18px; }
}

/* NASA and ESA pictures of the five targets */
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tcard { display: grid; align-content: start; gap: 8px; padding: 10px; border: 1px solid var(--blue-line); background: var(--bg); }
.tmedia { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.tcard h4 { margin: 2px 0 0; font: 400 20px/1.1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.tcard .fig-bar-track { height: 10px; }
.tcard-val { margin: 0; font: 400 12px var(--mono); }
.tcard-cap { margin: 0; font-size: 13px; line-height: 1.45; }
.tcard .credit, .tinfo-pic figcaption { display: block; margin-top: 4px; font: 400 11px var(--mono); opacity: .8; }
.tcard .fig-btn { width: 100%; margin-top: 2px; }
.tinfo-pic { margin: 0 0 12px; }
.tinfo-pic .tmedia { aspect-ratio: 16 / 10; }
.spec-plot .pt.wing { fill: none !important; stroke: var(--blue); stroke-width: 1.2; }
.spec-plot .pt.wing.on { stroke: #ffb000; stroke-width: 2; }
.spec-tabs { margin-bottom: 8px; }
.spec-plot .lc-line { fill: none; stroke: #ffb000; stroke-width: 1.5; }
.spec-plot .lc-med { fill: #ffb000; stroke: var(--blue); stroke-width: 1; }
.fake-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.fake-range { display: grid; gap: 2px; margin-top: 8px; }
.fake-range > span { display: flex; justify-content: space-between; gap: 8px; }
.fake-range output { font: 400 12px var(--mono); text-transform: none; }
.fake-range input, .fake-range input:focus { width: 100%; height: auto; padding: 0; border: 0; background: none; box-shadow: none; accent-color: #ff4fd8; }
.fake-range input:disabled { opacity: .35; }
/* next field and report */
.fieldnav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 14px 14px; border-top: 1px solid var(--blue-line); }
.fieldnav .label { margin: 0 4px 0 0; }
.fieldnav .rep { margin-left: auto; background: var(--blue); color: var(--bg); }
.fieldnav-hint { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; line-height: 1.45; opacity: .85; }
.viewer.is-full .fieldnav { display: none; }

/* exoplanet host lookup in the 'your own position' panel */
.exo-find { padding-bottom: 0; }
.exo-row { display: flex; gap: 6px; margin-top: 6px; }
.exo-row input { flex: 1; min-width: 0; height: 36px; padding: 0 8px; background: var(--surface); border: 1px solid var(--blue-line); border-radius: 0; color: var(--blue); font: 400 14px var(--mono); }
.exo-row input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 1px var(--blue); }
.exo-row .mini { min-height: 36px; }
.exo-list { list-style: none; margin: 6px 0 10px; padding: 0; max-height: 240px; overflow-y: auto; }
.exo-list:empty { display: none; }
.exo-list button { display: block; width: 100%; text-align: left; padding: 6px 8px; border: 0; border-bottom: 1px solid var(--blue-line); background: transparent; color: inherit; font: 13px var(--mono); cursor: pointer; }
.exo-list button:hover, .exo-list button:focus-visible { background: var(--blue-soft); }
.exo-list b { color: var(--blue); font-weight: 600; }
.exo-list small { display: block; opacity: .75; font-size: 11px; }
.exo-dlg { width: min(1100px, calc(100vw - 32px)); height: min(820px, calc(100vh - 32px)); padding: 0; border: 1px solid var(--blue); background: var(--bg); color: var(--blue); }
.exo-dlg[open] { display: flex; flex-direction: column; }
.exo-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.exo-dlg .spec-note { margin: 6px 12px; }
.exo-dlg iframe { flex: 1; width: 100%; border: 0; background: #fff; }
