/* Committed to one visual world: Earth seen from space. Painted explicitly for both host themes. */
:root{
  --bg:#05070D; --panel:#0D111B; --panel-2:#121828; --rule:#222A3C; --rule-soft:#1A2130;
  --ink:#E8ECF4; --ink-2:#A2ACBF; --ink-3:#66718A; --hi:#FFFFFF;
  --con:#E4573B; --cul:#C08AE0; --sci:#4FB0EA; --dis:#F0B63A;
  --shadow:0 1px 2px rgba(0,0,0,.6), 0 14px 44px rgba(0,0,0,.55);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--ink); overflow:hidden;
  font-family:"IBM Plex Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:14px; -webkit-font-smoothing:antialiased;
}
#app{display:flex; flex-direction:column; height:100dvh}

/* One line, as short as it can be: the name, the moment, the four categories, and the volume. Everything that
   was explaining itself in the header is gone — the globe is what people came for. */
header{
  display:flex; align-items:center; gap:14px; flex-wrap:nowrap;
  padding:5px 14px; border-bottom:1px solid var(--rule); flex:0 0 auto; background:var(--panel);
}
.brand{font-family:Fraunces,Georgia,serif; font-size:14.5px; font-weight:600; letter-spacing:-.01em; white-space:nowrap}
.now{
  font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:11.5px; letter-spacing:.08em;
  color:var(--ink-2); font-variant-numeric:tabular-nums; display:flex; align-items:baseline; gap:7px; white-space:nowrap;
}
.now .nowlab{font-size:8.5px; letter-spacing:.16em; color:var(--dis); border:1px solid var(--dis); border-radius:3px; padding:0 4px}
.now b{font-family:Fraunces,Georgia,serif; font-size:16px; font-weight:500; letter-spacing:-.01em; color:var(--ink)}
.now .nowsub{display:none}                       /* the rail and the fading cards say this without words */
.spacer{flex:1}

/* volume: an icon and a short slider, no label */
.vol{display:flex; align-items:center; gap:6px}
.vol button{
  display:flex; align-items:center; justify-content:center; width:26px; height:26px; padding:0;
  border:1px solid var(--rule); border-radius:50%; background:var(--panel-2); color:var(--ink-3); cursor:pointer;
}
.vol button:hover{color:var(--ink)}
.vol button[aria-pressed="true"]{color:var(--ink); border-color:var(--ink-3)}
.vol button[aria-pressed="true"] #mute{display:none}
.vol button[aria-pressed="false"] #waves{display:none}
.vol input[type=range]{
  -webkit-appearance:none; appearance:none; width:64px; height:14px; background:transparent; cursor:pointer; margin:0;
}
.vol input[type=range]::-webkit-slider-runnable-track{height:3px; background:var(--rule); border-radius:2px}
.vol input[type=range]::-moz-range-track{height:3px; background:var(--rule); border-radius:2px}
.vol input[type=range]::-webkit-slider-thumb{-webkit-appearance:none; width:11px; height:11px; border-radius:50%; background:var(--ink-2); margin-top:-4px}
.vol input[type=range]::-moz-range-thumb{width:11px; height:11px; border-radius:50%; background:var(--ink-2); border:none}
@media (max-width:900px){ .vol input[type=range]{display:none} }
.pmedia{margin:10px 0 4px}
.pmedia audio,.pmedia video{width:100%; display:block; border-radius:6px}
.pmedia .mcredit{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:9.5px; letter-spacing:.06em; color:var(--ink-3); margin-top:4px}
.pmedia .mcredit a{color:var(--ink-3)}
.filters{display:flex; gap:5px}
.f{
  display:inline-flex; align-items:center; gap:6px; cursor:pointer; user-select:none;
  border:1px solid var(--rule); background:var(--panel-2); color:var(--ink);
  border-radius:20px; padding:2px 11px 2px 3px; font-size:12px; font-weight:500; transition:opacity .15s; font-family:inherit;
  white-space:nowrap;
}
.f img{width:20px; height:20px; display:block}
@media (max-width:1100px){ .f{font-size:0; gap:0; padding:3px} }   /* icons only when the bar gets tight */
.f[aria-pressed="false"]{opacity:.32}
.f:hover{color:var(--ink)}

#stage{flex:1; position:relative; min-height:0; display:flex}
#globewrap{flex:1; position:relative; min-width:0; background:var(--bg)}
canvas{display:block; cursor:grab; touch-action:none}
canvas.drag{cursor:grabbing}

#tip{
  position:absolute; pointer-events:none; z-index:5; opacity:0; transition:opacity .12s;
  background:var(--panel); border:1px solid var(--rule); border-radius:6px;
  padding:6px 10px; box-shadow:var(--shadow); max-width:300px; line-height:1.35;
  transform:translate(-50%,-150%);
}
#tip.on{opacity:1}
#tip .tt{font-size:12.5px; font-weight:500}
#tip .ty{font-size:10.5px; color:var(--ink-3); letter-spacing:.06em; margin-top:2px; font-family:"IBM Plex Mono",ui-monospace,monospace}

.hint,.count,.note,.credit,.skydate{
  position:absolute; font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:10.5px;
  letter-spacing:.09em; color:var(--ink-3); pointer-events:none; line-height:1.7;
}
.hint{left:16px; bottom:12px; max-width:22%; font-size:9.5px; opacity:.7}
.count{right:16px; bottom:12px; text-align:right; max-width:22%; font-size:9.5px; opacity:.7}
.count em{font-style:normal; color:var(--dis)}
.hint em{font-style:normal; color:var(--dis)}
.credit{right:20px; top:14px; font-size:9.5px; text-align:right; opacity:.8}
.skydate{right:20px; top:14px; font-size:9.5px; text-align:right; opacity:.7}
.about-btn{position:absolute; right:20px; bottom:58px; width:26px; height:26px; border-radius:50%; border:1px solid var(--rule); background:rgba(13,17,27,.8); color:var(--ink-3); font:500 12px "IBM Plex Mono",monospace; cursor:pointer}
.about-btn:hover{color:var(--ink)}
.about{position:absolute; right:20px; bottom:92px; width:320px; z-index:7; background:var(--panel); border:1px solid var(--rule); border-radius:8px; padding:16px 18px; box-shadow:var(--shadow); display:none; font-size:12.5px; line-height:1.55; color:var(--ink-2)}
.about.on{display:block}
.about b{color:var(--ink); font-family:Fraunces,Georgia,serif; font-size:15px}
.about p{margin:8px 0 0}
.note{
  left:20px; top:14px; font-size:10px;
  background:rgba(5,7,13,.75); padding:5px 12px; border-radius:20px; border:1px solid var(--rule);
}

/* the panel floats over the stars on the right: the globe is never squeezed or moved */
#panel{
  position:absolute; top:12px; right:12px; bottom:12px; width:min(330px, 30vw); z-index:6;
  border:1px solid var(--rule); border-radius:12px; background:rgba(13,17,27,.9); backdrop-filter:blur(8px);
  overflow-y:auto; padding:16px 18px 24px; display:none; box-shadow:var(--shadow);
}
#panel.on{display:block}
@media (max-width:820px){ #panel{top:8px; right:8px; bottom:8px; width:min(330px,86%)} }
.pclose{float:right; border:none; background:none; color:var(--ink-3); cursor:pointer; font-size:16px; line-height:1; padding:2px 4px; margin:-2px -4px 0 0}
.pclose:hover{color:var(--ink)}
.pcat{display:flex; align-items:center; gap:8px; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-2); margin-bottom:12px}
.pcat img{width:22px; height:22px}
#panel h2{font-family:Fraunces,Georgia,serif; font-weight:600; font-size:22px; line-height:1.18; margin:0 0 8px; letter-spacing:-.012em; text-wrap:balance}
.pmeta{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:11px; letter-spacing:.06em; color:var(--ink-3); text-transform:uppercase; line-height:1.6; margin-bottom:16px}
.pdesc{font-size:14px; line-height:1.6; color:var(--ink-2); margin:0 0 18px}
.plink{display:inline-block; font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--ink); text-decoration:none; border-bottom:1px solid var(--rule); padding-bottom:2px}
.plink:hover{border-color:var(--ink)}
.imgslot{height:128px; border:1px dashed var(--rule); border-radius:6px; background:var(--panel-2); display:flex; align-items:center; justify-content:center; margin-bottom:16px; font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:10px; letter-spacing:.09em; color:var(--ink-3); text-align:center; padding:0 18px; line-height:1.6}
.pimg{margin:0 0 14px}
.pimg img{display:block; width:100%; max-height:220px; object-fit:cover; border-radius:6px; background:var(--panel-2)}
.pimg figcaption{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:9.5px; letter-spacing:.06em; color:var(--ink-3); margin-top:6px; line-height:1.5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.pimg figcaption a{color:var(--ink-3)}
.imgslot{height:96px}
.elsewhere{margin-top:24px; padding-top:16px; border-top:1px solid var(--rule)}
.elsewhere > p{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:10.5px; letter-spacing:.09em; text-transform:uppercase; color:var(--ink-3); margin:0 0 10px}
.ew{display:grid; grid-template-columns:22px 1fr; gap:10px; align-items:start; width:100%; background:none; border:none; text-align:left; cursor:pointer; padding:7px 0; color:inherit; border-bottom:1px solid var(--rule-soft); font:inherit}
.ew:last-child{border-bottom:none}
.ew img{width:22px; height:22px; margin-top:1px}
.ew b{display:block; font-size:13px; font-weight:500; line-height:1.35}
.ew span{display:block; font-size:11px; color:var(--ink-3); margin-top:1px}
.ew:hover b{text-decoration:underline}

#rail{flex:0 0 auto; border-top:1px solid var(--rule); background:var(--panel); padding:8px 14px 10px; user-select:none; display:flex; align-items:center; gap:12px}
/* the transport, film-player style, left of the rail */
.transport{display:flex; align-items:center; gap:4px; flex:0 0 auto}
.transport button{width:32px; height:30px; border-radius:15px; border:1px solid var(--rule); background:var(--panel-2); color:var(--ink); font-size:9px; letter-spacing:-1px; line-height:1; cursor:pointer; padding:0; font-family:"IBM Plex Sans",sans-serif}
.transport button:hover{border-color:var(--ink-3)}
.transport #playBtn{width:36px; height:36px; border-radius:50%; font-size:13px; letter-spacing:0}
.transport #playBtn[aria-pressed="true"]{background:var(--ink); color:var(--bg)}
.transport .rate{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:10px; letter-spacing:.08em; color:var(--ink-2); min-width:92px; margin-left:6px; white-space:nowrap}
.track{flex:1 1 auto; min-width:0}
.track{position:relative; display:flex; height:40px; border:1px solid var(--rule); border-radius:5px; background:var(--panel-2); overflow:hidden; cursor:pointer}
.era{flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; border-right:1px solid var(--rule-soft); position:relative}
.era:last-child{border-right:none}
.era .yr{font-size:10.5px; color:var(--ink); white-space:nowrap; font-variant-numeric:tabular-nums}
.era .nm{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:8px; letter-spacing:.1em; color:var(--ink-3); white-space:nowrap}
@media (max-width:900px){ .era .nm{display:none} .era .yr{font-size:9px} }
#handle{position:absolute; top:-1px; height:42px; border:1px solid rgba(255,255,255,.35); border-right:3px solid var(--dis); border-radius:4px 2px 2px 4px; background:linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.18)); pointer-events:none; transition:left .13s ease, width .13s ease;
  display:flex; align-items:center; justify-content:center; font-size:11.5px; color:var(--ink); font-variant-numeric:tabular-nums; white-space:nowrap; overflow:visible}
.track.slider{cursor:grab}
.track.slider .tick{position:absolute; bottom:0; width:1px; height:6px; background:var(--rule)}
.track.slider .tick.major{height:100%; background:var(--rule-soft)}
.track.slider .tick.major span{position:absolute; left:5px; top:5px; font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:9.5px; letter-spacing:.08em; color:var(--ink-3)}
.track.slider #handle{background:rgba(255,255,255,.16); backdrop-filter:blur(2px)}
:focus-visible{outline:2px solid var(--hi); outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* the line under the globe: "28 Dec 2004 · X, while Y" — text only, one line, the globe stays in view */
.ticker{position:absolute; left:50%; bottom:12px; transform:translateX(-50%); max-width:min(820px, 60%); z-index:4; display:none;
  background:rgba(13,17,27,.82); border:1px solid var(--rule); border-radius:14px; padding:6px 14px; font-size:12.5px; line-height:1.4;
  color:var(--ink); backdrop-filter:blur(6px); align-items:baseline; gap:10px}
.ticker.on{display:flex}
.ticker .tk{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:9.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--dis); flex:0 0 auto}
.ticker .tw{font-family:Fraunces,Georgia,serif; font-style:italic; font-size:13px; color:var(--ink-3); flex:0 0 auto}
.ticker .ts{min-width:0; cursor:pointer}                    /* wraps rather than cuts: a cut line is no line */
.ticker .ts:hover{color:var(--hi)}
.ticker .ts em{font-style:normal; font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:9px; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-3); margin-left:7px; white-space:nowrap}

/* vertical controls on the globe: spin speed (left), time playback (right) */
.vctl{position:absolute; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; align-items:center; gap:8px; z-index:4;
  padding:10px 6px; border:1px solid var(--rule); border-radius:18px; background:rgba(13,17,27,.72); backdrop-filter:blur(6px)}
.vctl.left{left:16px} .vctl.right{right:16px}
.vctl .vlab,.vctl .vval{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:9px; letter-spacing:.12em; color:var(--ink-3); white-space:nowrap}
.vctl .vval{color:var(--ink-2); font-size:9.5px; text-align:center; line-height:1.3}
.vctl input[type=range]{-webkit-appearance:none; appearance:none; writing-mode:vertical-lr; direction:rtl; width:22px; height:150px; background:transparent; cursor:pointer; margin:0}
.vctl input[type=range]::-webkit-slider-runnable-track{width:3px; height:100%; background:var(--rule); border-radius:2px}
.vctl input[type=range]::-moz-range-track{width:3px; height:100%; background:var(--rule); border-radius:2px}
.vctl input[type=range]::-webkit-slider-thumb{-webkit-appearance:none; width:14px; height:14px; border-radius:50%; background:var(--hi); margin-left:-5.5px}
.vctl input[type=range]::-moz-range-thumb{width:14px; height:14px; border-radius:50%; background:var(--hi); border:none}
.vctl button{width:30px; height:30px; border-radius:50%; border:1px solid var(--rule); background:var(--panel-2); color:var(--ink); font-size:12px; cursor:pointer}
.vctl button[aria-pressed="true"]{background:var(--ink); color:var(--bg)}
@media (max-width:760px){ .vctl{display:none} }

/* the panel: hero, headline, tiny description, read more, concurrent events elsewhere */
.hero img,.hero video{display:block; width:100%; max-height:240px; object-fit:cover; border-radius:6px; background:var(--panel-2)}
.hero audio{width:100%; margin-top:6px}
.hero{overflow:hidden; border-radius:6px}
.hero img.kb{animation:kb 14s ease-in-out infinite alternate}
@keyframes kb{from{transform:scale(1.02) translate(0,0)} to{transform:scale(1.12) translate(-2.5%,1.5%)}}
.mcredit{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:9.5px; letter-spacing:.06em; color:var(--ink-3); margin:6px 0 12px; line-height:1.5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.mcredit a{color:var(--ink-3)}
.concurrent{margin-top:22px; padding-top:14px; border-top:1px solid var(--rule)}
.concurrent > p{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:10.5px; letter-spacing:.09em; text-transform:uppercase; color:var(--ink-3); margin:0 0 10px}
.crow{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.nb{display:block; width:100%; padding:0; background:none; border:1px solid var(--rule-soft); border-radius:6px; overflow:hidden; text-align:left; cursor:pointer; color:inherit; font:inherit}
.nb img{display:block; width:100%; height:78px; object-fit:cover; background:var(--panel-2)}
.nb img.kb{animation:kb 12s ease-in-out infinite alternate}
.nb img.ic{object-fit:contain; padding:20px; opacity:.7}
.nb b{display:block; font-size:11px; font-weight:500; line-height:1.3; padding:6px 7px 0; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical}
.nb span{display:block; font-size:9.5px; color:var(--ink-3); padding:2px 7px 7px; line-height:1.3}
.nb:hover{border-color:var(--ink-3)}
/* meanwhile rows: place first, then the gap, then what happened — one line of geography per row */
.mw{display:grid; grid-template-columns:64px 1fr; gap:10px; align-items:start; width:100%; padding:7px 0; background:none; border:none; border-bottom:1px solid var(--rule-soft); text-align:left; cursor:pointer; color:inherit; font:inherit}
.mw:last-child{border-bottom:none}
.mw img{display:block; width:64px; height:48px; object-fit:cover; border-radius:4px; background:var(--panel-2)}
.mw img.kb{animation:kb 12s ease-in-out infinite alternate}
.mw img.ic{object-fit:contain; padding:10px; opacity:.6}
.mwt{display:block; min-width:0}
.mwt em{font-style:normal; font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--dis)}
.mwt i{font-style:normal; font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:9.5px; letter-spacing:.06em; color:var(--ink-3)}
.mwt em + i{margin-left:8px}
.mwt b{display:block; font-size:12.5px; font-weight:500; line-height:1.3; margin-top:2px}
.mw:hover b{text-decoration:underline}
/* side controls: small and out of the Earth's way */
.vctl{padding:7px 4px; gap:6px; opacity:.55; transition:opacity .2s}
.vctl:hover,.vctl:focus-within{opacity:1}
.vctl input[type=range]{height:96px; width:18px}
.vctl button{width:26px; height:26px; font-size:10px}
.vctl.left{left:10px} .vctl.right{right:10px}

/* the NOW mark on the rail: date sits at the right edge of the lookback band */
/* the NOW mark is one month wide; its label hangs to the right of it, or to the left near the end of the rail */
#handle{min-width:4px}
#handle .hnow{position:absolute; left:100%; margin-left:8px; top:50%; transform:translateY(-50%); font:500 11.5px "IBM Plex Mono",ui-monospace,monospace; color:var(--ink); background:rgba(13,17,27,.85); border:1px solid var(--rule); padding:2px 6px; border-radius:3px; white-space:nowrap}
#handle .hnow.before{left:auto; right:100%; margin-left:0; margin-right:8px}
/* side controls: readable against the stars */
.vctl{opacity:.92; background:rgba(13,17,27,.9); border-color:rgba(255,255,255,.28)}
.vctl .vlab{color:var(--ink); font-weight:500}
.vctl .vval{color:var(--ink-2)}
.vctl input[type=range]::-webkit-slider-runnable-track{background:rgba(255,255,255,.35)}
.vctl input[type=range]::-moz-range-track{background:rgba(255,255,255,.35)}
.vctl input[type=range]::-webkit-slider-thumb{background:var(--dis); box-shadow:0 0 0 3px rgba(13,17,27,.9)}
.vctl input[type=range]::-moz-range-thumb{background:var(--dis)}
