@import url("fonts.css");

/* ============================================================
   Plumbing only. Nothing here is a design decision — no colour,
   no typeface, no layout. Each site writes its own visual system
   on top; this file only carries the things that must be right
   on every site and are invisible when they are.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* A sideways-scrollable page drags position:fixed elements out of view on
     phones. Clip rather than scroll. (clip, not hidden: hidden would make html
     a scroll container and break scroll-padding and sticky.) */
  overflow-x: clip;
}

body { margin: 0; }
/* Lock scrolling on the ROOT, not on body. html already has overflow-x:clip,
   so overflow:hidden on body turns body into its own scroll container — a
   position:sticky header then sticks to body and is thrown off-screen (with
   its close button) when the menu opens after scrolling. site.js puts
   .is-locked on <html> directly; a :has() selector was tried first and its
   style invalidation visibly lagged behind the menu opening. */
html.is-locked { overflow: hidden; }
/* [hidden] must win. A rule like `.gallery-more { display:flex }` outranks the
   browser's own `[hidden] { display:none }`, which left an empty "Show 0 more"
   button on screen whenever a gallery had nothing further to reveal. */
[hidden] { display: none !important; }

img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
/* A <button> inherits the user agent's grey `buttonface` unless something says
   otherwise. An outline/ghost button that sets only border-color and color then
   renders as light-grey with (often white) text on it — invisible. Reset here;
   any variant that wants a fill sets one and wins on specificity. */
button { background: transparent; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Reveal-on-scroll. The JS failsafe shows everything if the observer
   never runs, so content can never be stranded invisible. */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease, ease), transform .7s var(--ease, ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

@media print {
  .site-header, .lightbox, .skip-link, .gallery-more, .filters, .map-consent, .callbar { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff !important; color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .75em; color: #555; }
}

/* ============================================================
   Nunki Observatory — "Under Sagittarius"
   Night palette from the logo (navy, sky blue); one red accent,
   the observer's red torch, for live and active states only.
   Instrument Serif (display) · Geist (text) · Geist Mono (data)
   ============================================================ */
:root {
  --night: #06080e;
  --deep: #0a0e18;
  --panel: #0f1524;
  --panel-2: #141b2d;
  --line: rgba(190, 205, 240, .14);
  --line-2: rgba(190, 205, 240, .26);
  --text: #e8ecf5;
  --muted: #a3adc2;
  --faint: #7d889f;
  --sky: #5fb0f0;            /* the logo's bright blue, lifted for dark ground */
  --navy: #1b3a73;
  --red: #ff5f4f;            /* red light */
  --red-deep: #c2382b;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --head: 100px;
  color-scheme: dark;
}

html { background: var(--night); scroll-padding-top: calc(var(--head) + 12px); }
body {
  background: var(--night);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-color: rgba(95, 176, 240, .55); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: #fff; text-decoration-color: var(--sky); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--navy); color: #fff; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 1; letter-spacing: 0; }
.label {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}
.display { font: 400 clamp(3.2rem, 9vw, 7.6rem)/.92 var(--serif); letter-spacing: -.015em; margin: 0 0 1.2rem; }
.h1 { font: 400 clamp(2.5rem, 6vw, 4.6rem)/1 var(--serif); letter-spacing: -.01em; margin: 0 0 .9rem; text-wrap: balance; }
.h2 { font: 400 clamp(2rem, 3.8vw, 3.1rem)/1.05 var(--serif); margin: 0 0 1rem; text-wrap: balance; }
.h3 { font: 600 1.05rem/1.3 var(--sans); letter-spacing: .01em; margin: 0 0 .6rem; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 46rem; }
.prose { max-width: 40rem; }
.prose p { margin-bottom: 1.05em; }
.fine, .credit { font-size: .82rem; color: var(--faint); }
.ico { width: 1.15em; height: 1.15em; flex: none; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; padding: .6rem 1rem; background: var(--text); color: var(--night); border-radius: 6px; }
.skip-link:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 46px; padding: .7rem 1.25rem;
  border: 1px solid var(--line-2); border-radius: 999px;
  font: 500 .95rem/1 var(--sans); text-decoration: none; color: var(--text);
  transition: background .25s var(--ease), border-color .25s, color .25s;
}
.btn:hover { background: rgba(255, 255, 255, .06); border-color: var(--text); color: #fff; }
.btn-red { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }
.btn-red:hover { background: var(--red); border-color: var(--red); }
.btn-ghost { background: rgba(6, 8, 14, .35); backdrop-filter: blur(6px); }
.more { display: inline-flex; align-items: center; gap: .5rem; font: 500 .95rem/1.2 var(--sans); text-decoration: none; color: var(--sky); }
.more:hover { color: #fff; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 95, 79, .6); animation: pulse 2.4s infinite; display: inline-block; flex: none; }
.label .live-dot { margin-right: .6rem; vertical-align: 1px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 95, 79, .55); } 70% { box-shadow: 0 0 0 9px rgba(255, 95, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 95, 79, 0); } }

/* ============================================================ header */
.site-header { position: sticky; top: 0; z-index: 100; }
.site-header::before {        /* the glass lives on ::before so the open menu is not clipped by a filter */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(6, 8, 14, .78); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line); transition: background .3s, border-color .3s;
}
.bar { height: var(--head); display: flex; align-items: center; gap: 1.5rem; width: min(1440px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.brand { display: block; flex: none; line-height: 0; }
.brand img { width: 184px; height: auto; }
.quick { display: flex; gap: .25rem; list-style: none; margin-left: auto; }
.quick a { display: block; padding: .55rem .9rem; border-radius: 999px; font: 500 .92rem/1 var(--sans); text-decoration: none; color: var(--muted); }
.quick a:hover, .quick a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-toggle {
  display: inline-flex; align-items: center; gap: .55rem; flex: none;
  height: 46px; padding: 0 1rem 0 .7rem; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer;
  font: 500 .92rem/1 var(--sans); color: var(--text);
}
.nav-toggle:hover { border-color: var(--text); }
.toggle-chart { width: 44px; height: 27px; }
.toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .toggle-word { display: none; }
.nav-toggle[aria-expanded="true"] .toggle-close { display: inline; }
.skymenu-note .mono { text-transform: none; letter-spacing: .02em; }
.toggle-chart .chart-lines line { stroke: var(--muted); stroke-width: 2.4; }
.toggle-chart .star { fill: var(--text); }
.toggle-chart .star.is-nunki { fill: var(--red); }

/* home: the header floats on the photograph until the page scrolls */
.is-home .site-header { position: fixed; inset: 0 0 auto; }
.is-home .site-header:not(.is-stuck):not(.is-open)::before { background: linear-gradient(rgba(6, 8, 14, .6), rgba(6, 8, 14, 0)); backdrop-filter: none; border-color: transparent; }

/* ---------- the sky menu (Teapot) ---------- */
.skymenu {
  position: fixed; inset: var(--head) 0 0; z-index: -2;
  background: radial-gradient(120% 90% at 70% 10%, #0f1830 0%, var(--night) 60%);
  border-top: 1px solid var(--line);
  overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
}
.site-header.is-open .skymenu { visibility: visible; opacity: 1; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.skymenu-in { width: min(1200px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(1.5rem, 5vh, 4rem) 0 3rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2rem 4rem; align-items: center; }
.skymenu .label { grid-column: 1 / -1; margin: 0; }
.skymenu-list { list-style: none; display: grid; gap: .1rem; }
.skymenu-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.nav-name { font: 400 clamp(1.9rem, 3.4vw, 2.7rem)/1.1 var(--serif); }
.nav-star { font: 400 .8rem/1 var(--mono); color: var(--faint); white-space: nowrap; }
.skymenu-list a:hover .nav-name, .skymenu-list a:focus-visible .nav-name, .skymenu-list a[aria-current="page"] .nav-name { color: #fff; }
.skymenu-list a[aria-current="page"] .nav-star, .skymenu-list a:hover .nav-star { color: var(--red); }
.skymenu-chart { width: 100%; height: auto; }
.skymenu-chart .chart-lines line { stroke: rgba(150, 175, 230, .35); stroke-width: 1.2; }
.skymenu-chart .star { fill: var(--text); transition: fill .2s, r .2s; }
.skymenu-chart .star.is-nunki, .skymenu-chart .star.is-lit { fill: var(--red); }
html.is-locked body { overflow: hidden; }

/* ============================================================ home */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; align-items: end; isolation: isolate; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; margin: 0; z-index: -2; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 64% 50%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6, 8, 14, .82) 0%, rgba(6, 8, 14, .45) 42%, rgba(6, 8, 14, 0) 70%), linear-gradient(0deg, var(--night) 0%, rgba(6, 8, 14, 0) 32%); }
.hero-in { padding: calc(var(--head) + 18vh) 0 clamp(4rem, 12vh, 8rem); }
.hero-in .label { color: var(--text); opacity: .85; }
.hero-lede { font-size: clamp(1.1rem, 1.8vw, 1.35rem); max-width: 31rem; color: #d7deeb; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-credit { position: absolute; right: var(--gutter); bottom: 1.4rem; margin: 0; font-size: .78rem; color: var(--muted); }
.hero-credit a { text-decoration: none; }

.story { padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5rem); }
.story-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.story-photo { margin: 0; }
.story-photo img { width: 100%; border-radius: 4px; }
.sig { font: 400 1.6rem/1 var(--serif); color: var(--muted); margin-top: 1.4rem; }
.milestones { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 1.5rem; margin-top: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line-2); }
.milestones li { position: relative; padding-top: 1.6rem; }
.milestones li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--text); }
.milestones li:last-child::before { background: var(--red); }
.ms-date { display: block; font-size: .85rem; color: var(--sky); margin-bottom: .5rem; }
.milestones p { font-size: .95rem; color: var(--muted); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.latest { padding: clamp(3rem, 7vw, 6rem) 0; background: var(--deep); border-block: 1px solid var(--line); }

.tonight { padding: clamp(4rem, 9vw, 7rem) 0; }
.tonight-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.tonight-text > p { color: var(--muted); max-width: 32rem; }

.shelf-list { padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); border-top: 1px solid var(--line); }
.shelf-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(2rem, 6vw, 6rem); }
.shelf-grid > div > p { color: var(--muted); }
.shelf-index { list-style: none; columns: 2; column-gap: 2.5rem; }
.shelf-index li { break-inside: avoid; }
.shelf-index a { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 1.05rem; }
.shelf-index a .mono { color: var(--faint); font-size: .85rem; }
.shelf-index a:hover .mono { color: var(--red); }

/* ============================================================ page heads, crumbs */
.page-head { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem .6rem; font: 400 .82rem/1.4 var(--mono); color: var(--faint); margin-bottom: 1.4rem; }
.crumbs li + li::before { content: "/"; margin-right: .6rem; color: var(--line-2); }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--text); }

/* ============================================================ galleries */
.gallery { padding-bottom: clamp(4rem, 8vw, 7rem); }
.group + .group { margin-top: clamp(3rem, 6vw, 4.5rem); }
.group .h2 { padding-bottom: .9rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 42vw), 1fr)); gap: clamp(.9rem, 2vw, 1.6rem); }
.mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1000px) { .mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { margin: 0; min-width: 0; }
.tile, .tile-link { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 4px; overflow: hidden; cursor: zoom-in; background: var(--panel); aspect-ratio: 3 / 2; }
.tile img, .tile-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; }
.tile .ico { position: absolute; right: .6rem; bottom: .6rem; width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: rgba(6, 8, 14, .7); color: #fff; opacity: 0; transition: opacity .25s; }
.tile:hover img, .tile:focus-visible img, .tile-link:hover img { transform: scale(1.035); }
.tile:hover .ico, .tile:focus-visible .ico { opacity: 1; }
.card figcaption { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .1rem 0; }
.card figcaption a { font-weight: 500; text-decoration: none; line-height: 1.35; }
.card figcaption a:hover { text-decoration: underline; }
.card-meta { font-size: .8rem; color: var(--faint); }
.tile-link { cursor: pointer; }

/* gallery index + travel trips: photo cards with a frosted band */
.shelves, .trips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: clamp(1rem, 2vw, 1.5rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.trips { padding-bottom: 0; }
.shelf, .trip { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; text-decoration: none; background: var(--panel); isolation: isolate; }
.shelf img, .trip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .7s var(--ease); }
.shelf:hover img, .trip:hover img { transform: scale(1.04); }
.shelf-name, .trip-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem 1rem .9rem; font: 400 1.7rem/1.05 var(--serif); color: #fff;
  background: linear-gradient(0deg, rgba(6, 8, 14, .85), rgba(6, 8, 14, .55) 60%, rgba(6, 8, 14, 0)); }
.shelf .card-meta, .trip .card-meta { position: absolute; top: .8rem; right: .8rem; padding: .3rem .6rem; border-radius: 999px; background: rgba(6, 8, 14, .7); color: var(--text); backdrop-filter: blur(6px); }

/* ============================================================ photo page */
.photo-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.4rem; }
.keyline { color: var(--sky); font-size: .9rem; margin: 0; }
.photo-stage { background: #000; border-block: 1px solid var(--line); }
.shot { margin: 0; }
.photo-stage .shot-tile { aspect-ratio: auto; border-radius: 0; background: #000; cursor: zoom-in; }
.photo-stage .shot-tile img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; }
.photo-stage .shot-tile:hover img { transform: none; }
.photo-body { display: grid; gap: clamp(2rem, 5vw, 4rem); padding: clamp(2rem, 5vw, 3.5rem) 0; }
.photo-body.has-log { grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); align-items: start; }
.photo-text > * + * { margin-top: 2rem; }
.caption { font: 400 1.5rem/1.35 var(--serif); color: var(--text); max-width: 36rem; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 1rem; }
.shot-sm .shot-tile { aspect-ratio: auto; background: #000; }
.shot-sm .shot-tile img { width: 100%; height: auto; object-fit: contain; }
.shot-sm figcaption { font-size: .82rem; color: var(--faint); padding-top: .5rem; }
.about .prose p { color: #cdd4e2; }
.about .prose a { color: var(--text); }
.log { position: sticky; top: calc(var(--head) + 1.2rem); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1.3rem 1.4rem 1.1rem; }
.log .label { color: var(--red); }
.log dl { margin: 0; }
.log-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .8rem; padding: .62rem 0; border-top: 1px solid var(--line); }
.log dt { font: 400 .74rem/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.log dd { margin: 0; font: 400 .9rem/1.5 var(--mono); color: var(--text); overflow-wrap: anywhere; }
.moon-icon { display: inline-block; width: 26px; height: 26px; margin-right: .5rem; vertical-align: middle; border-radius: 50%; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: 1.4rem 0 clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.pager a { text-decoration: none; }
.pager-prev, .pager-next { display: flex; flex-direction: column; gap: .2rem; font: 400 1.25rem/1.2 var(--serif); }
.pager-prev .label, .pager-next .label { margin: 0; font-size: 11px; }
.pager-next { text-align: right; }
.pager-up { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.1rem; border: 1px solid var(--line-2); border-radius: 999px; font: 500 .9rem/1 var(--sans); white-space: nowrap; }
.pager-up:hover { border-color: var(--text); }

/* ============================================================ live */
.live-head .label { display: flex; align-items: center; }
.live { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.live-fig { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.live-img { display: block; background: #000; line-height: 0; }
.live-img img { width: 100%; height: auto; }
.live-fig figcaption { display: flex; flex-direction: column; gap: .2rem; padding: .85rem 1rem 1rem; }
.live-title { font-weight: 600; }
.live-status { font-size: .8rem; color: var(--sky); }
.live-status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: .5rem; border-radius: 50%; background: var(--red); vertical-align: 1px; }
.live-fig.is-stale .live-status { color: #ffb3a8; }
.live-fig.is-stale .live-status::before { background: var(--faint); }
.live-fig.is-stale .live-img img { opacity: .55; }
.live-fig.is-missing .live-img { min-height: 120px; }
.live-fig.is-missing .live-status { color: var(--faint); }
.live-note { font-size: .85rem; color: var(--muted); }
.live-big .live-img img { max-height: 78vh; object-fit: contain; }
.live-actions { margin-top: 1rem; }
.live-side { display: grid; gap: 1.2rem; }
.moon-card, .weather-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1.3rem; }
.weather-card p { color: var(--muted); font-size: .95rem; }
.weather-card a { color: var(--text); display: inline-flex; align-items: center; gap: .4rem; }
.moon { display: flex; align-items: center; gap: 1.2rem; }
.moon-disc { width: 112px; height: 112px; flex: none; }
.moon-dark { fill: #1a2032; stroke: rgba(255, 255, 255, .08); }
.moon-lit { fill: #ece8da; }
.moon-text { display: flex; flex-direction: column; gap: .2rem; margin: 0; }
.moon-name { font: 400 1.7rem/1.1 var(--serif); }
.moon-text .mono { font-size: .82rem; color: var(--muted); }
.moon-inline { margin: 1.6rem 0; }
.moon-inline .moon-disc { width: 76px; height: 76px; }
.live-grid { padding: clamp(3rem, 6vw, 5rem) 0 0; }
.live-grid .h3 { margin-top: 2.4rem; margin-bottom: 1rem; }
.live-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.live-cards.sqm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.forecast { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem; align-items: center; padding: clamp(3rem, 6vw, 5rem) 0; }
.forecast p { color: var(--muted); }
.forecast a { color: var(--text); display: inline-flex; align-items: center; gap: .4rem; }
.forecast-img { display: block; background: var(--panel); border-radius: 6px; overflow: hidden; line-height: 0; }
.forecast-img img { width: 100%; height: auto; }
.sun-band { padding: 0 0 clamp(4rem, 8vw, 6rem); }
.sun-band > p { color: var(--muted); }
.suns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1.5rem; }
.sun { margin: 0; }
.sun a { display: block; line-height: 0; border-radius: 50%; overflow: hidden; background: #000; }
.sun img { width: 100%; height: auto; }
.sun figcaption { text-align: center; padding-top: .6rem; font-size: .8rem; color: var(--faint); }
.spaceweather { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center; margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 2rem; border-top: 1px solid var(--line); }
.spaceweather p { color: var(--muted); }
.spaceweather a { color: var(--text); display: inline-flex; align-items: center; gap: .4rem; }
.swx { display: block; line-height: 0; border-radius: 6px; overflow: hidden; background: var(--panel); max-width: 560px; }
.swx img { width: 100%; height: auto; }

/* ============================================================ news, links */
.news { max-width: 54rem; padding-bottom: clamp(4rem, 8vw, 7rem); }
.news-year { font: 400 2.6rem/1 var(--serif); color: var(--faint); margin: 2.6rem 0 .4rem; }
.news-year:first-child { margin-top: 0; }
.news-item { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1.2rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.news-item time { font-size: .85rem; color: var(--sky); padding-top: .2rem; }
.news-item p { margin: 0; }
.news-shots { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .9rem; }
.news-shot { width: 200px; max-width: 45%; }
.links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 6vw, 5rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.link-list { list-style: none; }
.link-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.link-name { font-weight: 500; }
.link-host { font-size: .8rem; color: var(--faint); text-align: right; overflow-wrap: anywhere; }
.link-list a:hover .link-host { color: var(--sky); }

/* ============================================================ footer */
.site-footer { background: var(--deep); border-top: 1px solid var(--line); padding: clamp(3rem, 7vw, 5rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.chart { width: 100%; height: auto; max-width: 720px; }
.chart .chart-lines line { stroke: rgba(150, 175, 230, .3); stroke-width: 1.1; }
.chart .star { fill: var(--text); }
.chart .star.is-nunki { fill: var(--red); }
.chart-link { text-decoration: none; }
.chart-label { font: 400 21px/1 var(--serif); fill: var(--text); }
.chart-star { font: 400 10.5px/1 var(--mono); fill: var(--faint); letter-spacing: .04em; }
.chart-link:hover .chart-label, .chart-link:focus-visible .chart-label { fill: #fff; text-decoration: underline; }
.chart-link:hover .star, .chart-link[aria-current="page"] .star { fill: var(--red); }
.chart-link[aria-current="page"] .chart-label { fill: var(--red); }
.chart-list { display: none; list-style: none; }
.footer-contact p { color: var(--muted); }
.contact-lines { display: grid; gap: .55rem; justify-items: start; }
.contact-lines a, .contact-lines span { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); }
.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 2rem; margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--faint); }
.colophon p { margin: 0; }

/* ============================================================ lightbox */
.lightbox { position: fixed; inset: 0; z-index: 400; display: none; background: rgba(3, 4, 8, .97); opacity: 0; transition: opacity .26s; }
.lightbox.is-open { display: block; }
.lightbox.is-visible { opacity: 1; }
.lb-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: clamp(3.5rem, 6vw, 4.5rem) clamp(.5rem, 6vw, 5rem); }
.lb-figure { margin: 0; display: grid; justify-items: center; gap: .8rem; max-width: 100%; }
.lb-img { max-width: 100%; max-height: calc(100vh - 9rem); width: auto; height: auto; transition: opacity .2s; }
.lb-img.is-loading { opacity: .3; }
.lb-caption { font: 400 1.2rem/1.3 var(--serif); color: var(--text); text-align: center; }
.lb-counter { position: absolute; left: 1.2rem; top: 1.1rem; margin: 0; font: 400 .85rem/1 var(--mono); color: var(--muted); }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(6, 8, 14, .7); cursor: pointer; display: grid; place-items: center; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-btn:hover { border-color: var(--text); }
.lb-btn:disabled { display: none; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-close { right: 1rem; top: .8rem; }

/* entrance for gallery tiles revealed by "show more" (not used yet, kept for site.js) */
.is-entering { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.nf { min-height: 50vh; }

/* ============================================================ responsive */
@media (max-width: 1100px) {
  .quick { display: none; }
  .nav-toggle { margin-left: auto; }
  .photo-body.has-log { grid-template-columns: 1fr; }
  .log { position: static; }
  .milestones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.5rem; border-top: 0; }
  .milestones li { border-top: 1px solid var(--line-2); }
}
@media (max-width: 900px) {
  :root { --head: 80px; }
  .brand img { width: 136px; }
  .skymenu-in { grid-template-columns: 1fr; gap: 1.2rem; padding-top: 1.4rem; }
  .skymenu-chart { order: -1; max-width: 360px; justify-self: center; }
  .story-grid, .tonight-grid, .shelf-grid, .live, .forecast, .spaceweather, .footer-grid, .links { grid-template-columns: 1fr; }
  .live-cards.sqm { grid-template-columns: 1fr; }
  .shelf-index { columns: 1; }
  .chart { display: none; }
  .chart-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
  .chart-list a { display: block; padding: .55rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 400 1.35rem/1.2 var(--serif); }
  .hero-in { padding-top: calc(var(--head) + 30vh); }
  .hero::after { background: linear-gradient(0deg, var(--night) 0%, rgba(6, 8, 14, .75) 45%, rgba(6, 8, 14, .1) 80%); }
  .hero-credit { position: static; padding: 0 var(--gutter) 1rem; }
  .hero { align-items: end; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .toggle-word, .nav-toggle[aria-expanded="true"] .toggle-close { display: none; }
  .nav-toggle { padding: 0 .75rem; }
  .milestones { grid-template-columns: 1fr; }
  .live-cards { grid-template-columns: 1fr; }
  .suns { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
  .news-item { grid-template-columns: 1fr; gap: .3rem; }
  .log-row { grid-template-columns: 1fr; gap: .1rem; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-up { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card figcaption a { font-size: .92rem; }
  .moon-disc { width: 88px; height: 88px; }
}
