/*
  AstraVeris Remote Observatory public pages (docs/ux-redesign.md sections 1 and 3). Dark only.
  Same tokens as the app (web/src/styles/tokens.css): Inter for text, Space Grotesk for titles,
  one gold accent, 12 px cards, 8 px controls. Content runs full width up to 1600 px.
  Banned here: coloured side borders, status dots, underline tabs. States are coloured words,
  values sit in tinted cells, notices are full-width tinted bars.
*/
:root {
  color-scheme: dark;
  --c-page: #0e0e14;
  --c-panel: #16161e;
  --c-raised: #1e1e28;
  --c-sunken: #0a0a0f;
  --c-band: #111118;
  --c-hover: rgba(255, 255, 255, 0.04);
  --c-hairline: rgba(255, 255, 255, 0.08);
  --c-hairline-strong: rgba(255, 255, 255, 0.14);
  --c-text: #ededf0;
  --c-text-2: #a0a0b0;
  --c-text-3: #7a7a8a;
  --c-accent: #d4a843;
  --c-accent-hover: #e2b955;
  --c-accent-ink: #15120a;
  --c-accent-soft: rgba(212, 168, 67, 0.14);
  --c-good: #3ddc84;
  --c-caution: #e8b04a;
  --c-bad: #f0605a;
  --c-info: #5aa9f0;
  --c-good-soft: rgba(61, 220, 132, 0.14);
  --c-caution-soft: rgba(232, 176, 74, 0.15);
  --c-bad-soft: rgba(240, 96, 90, 0.15);
  --c-info-soft: rgba(90, 169, 240, 0.13);
  --c-idle-soft: rgba(255, 255, 255, 0.06);
  --sky-day: #3a4766;
  --sky-civil: #2b3352;
  --sky-nautical: #1d2240;
  --sky-astro: #14162c;
  --sky-dark: #08080f;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "Cascadia Code", monospace;
  --r-card: 12px;
  --r-control: 8px;
  --content-max: 1600px;
  --gutter: 32px;
  --header-h: 64px;
  --band-y: 56px;
}

@media (max-width: 1100px) {
  :root {
    --gutter: 24px;
    --band-y: 44px;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
    --band-y: 36px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  font-size: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--c-page);
  color: var(--c-text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--c-accent);
  text-decoration: none;
}

a:hover {
  color: var(--c-accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  line-height: 1.2;
  overflow-wrap: break-word;
  color: var(--c-text);
}

h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 44px);
  letter-spacing: -0.015em;
}

h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.01em;
}

h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 17px;
}

h4 {
  font-size: 15px;
  font-weight: 600;
}

p {
  margin: 0 0 12px;
}

ul,
ol {
  margin: 0 0 12px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: -3px;
}

.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-width: 0;
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 80;
  padding: 8px 12px;
  border-radius: var(--r-control);
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font-weight: 600;
}

.skip:focus {
  top: 8px;
}

.muted {
  color: var(--c-text-2);
}

.faint {
  color: var(--c-text-3);
}

.small {
  font-size: 13px;
}

.mono {
  font-family: var(--font-mono);
}

.nowrap {
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.error-text {
  color: var(--c-bad);
}

.lead {
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--c-text-2);
  max-width: 62ch;
  line-height: 1.55;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.eyebrow .icon {
  width: 16px;
  height: 16px;
}

/* Tone words: green good, amber caution, red bad, blue info, grey idle. */
.tone-ok,
.tone-good {
  color: var(--c-good);
}

.tone-warn,
.tone-caution {
  color: var(--c-caution);
}

.tone-bad {
  color: var(--c-bad);
}

.tone-info {
  color: var(--c-info);
}

.tone-idle {
  color: var(--c-text-2);
}

/* ── Header: brand, icon plus word nav (the app's look), sign in, open app ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(14, 14, 20, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 -1px 0 var(--c-hairline);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-right: 8px;
  color: var(--c-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
}

.brand:hover {
  color: var(--c-text);
  text-decoration: none;
}

.brand-mark {
  width: 20px;
  height: 20px;
  fill: var(--c-accent);
}

/* Wordmark: the name over a small "Remote Observatory" line, narrower than one long line. */
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-sub {
  margin-top: 2px;
  color: var(--c-accent);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--r-control);
  color: var(--c-text-2);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.nav-link .icon {
  width: 17px;
  height: 17px;
}

.nav-link:hover {
  color: var(--c-text);
  background: var(--c-hover);
  text-decoration: none;
}

.nav-link[aria-current="page"],
.nav-link[aria-current="page"]:hover {
  color: var(--c-accent);
  background: rgba(212, 168, 67, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
}

.menu {
  display: none;
  position: relative;
}

.menu > summary {
  list-style: none;
  cursor: pointer;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(300px, calc(100vw - 32px));
  background: var(--c-raised);
  border-radius: var(--r-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  padding: 6px;
  display: flex;
  flex-direction: column;
}

.menu-panel .nav-link {
  height: 40px;
}

.menu-sep {
  height: 1px;
  background: var(--c-hairline);
  margin: 6px 4px;
}

@media (max-width: 1180px) {
  .nav .nav-link .icon {
    display: none;
  }
}

@media (max-width: 1020px) {
  .nav,
  .header-actions .hide-narrow {
    display: none;
  }

  .menu {
    display: block;
  }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--c-raised);
  box-shadow: inset 0 0 0 1px var(--c-hairline-strong);
  color: var(--c-text);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  max-width: 100%;
}

.btn:hover {
  background: #262632;
  color: var(--c-text);
  text-decoration: none;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: var(--c-accent);
  box-shadow: none;
  color: var(--c-accent-ink);
}

.btn-primary:hover {
  background: var(--c-accent-hover);
  color: var(--c-accent-ink);
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--c-text-2);
}

.btn-ghost:hover {
  background: var(--c-hover);
  color: var(--c-text);
}

.btn-small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-large {
  min-height: 48px;
  padding: 0 22px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--c-raised);
  box-shadow: inset 0 0 0 1px var(--c-hairline-strong);
  color: var(--c-text);
  cursor: pointer;
}

.icon-btn:hover {
  background: #262632;
}

.icon-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
}

/* ── Bars (notices): one soft tint, an icon, the text. No side border. ── */
.bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--r-control);
  background: var(--c-info-soft);
  color: var(--c-text);
  margin: 0 0 16px;
}

.bar > .icon {
  margin-top: 2px;
  color: var(--c-info);
}

.bar p {
  margin: 0;
}

.bar-warn {
  background: var(--c-caution-soft);
}

.bar-warn > .icon {
  color: var(--c-caution);
}

.bar-ok {
  background: var(--c-good-soft);
}

.bar-ok > .icon {
  color: var(--c-good);
}

.bar-idle {
  background: var(--c-idle-soft);
}

.bar-idle > .icon {
  color: var(--c-text-2);
}

/* ── Bands and layout ── */
.band {
  padding: var(--band-y) 0;
}

.band-alt {
  background: var(--c-band);
}

.band-tight {
  padding-top: 24px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--c-text-2);
  max-width: 70ch;
}

.section-head .head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.page-head {
  padding: 32px 0 20px;
}

.page-head h1 {
  margin-bottom: 10px;
}

.page-head .lead {
  margin-bottom: 0;
}

.head-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.split-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 40px;
  align-items: start;
}

.main-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 32px;
  align-items: start;
}

@media (max-width: 1280px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-aside {
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  }
}

@media (max-width: 880px) {
  .grid-2,
  .grid-3,
  .split-aside,
  .head-split,
  .main-aside {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.panel {
  background: var(--c-panel);
  border-radius: var(--r-card);
  padding: 24px;
  min-width: 0;
}

.panel > :last-child {
  margin-bottom: 0;
}

.panel h3:first-child,
.panel h2:first-child {
  margin-top: 0;
}

@media (max-width: 760px) {
  .panel {
    padding: 18px;
  }
}

.checks {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 8px;
}

.checks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.checks .icon {
  color: var(--c-accent);
  margin-top: 3px;
  width: 16px;
  height: 16px;
}

.plain-list {
  padding-left: 1.2em;
  margin: 0 0 16px;
}

.plain-list li {
  margin-bottom: 8px;
}

/* ── Hero (Starfront): full-bleed photo, 56 px headline, two buttons ── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(460px, calc(100vh - 168px), 720px);
  max-height: 720px;
  overflow: hidden;
  background: var(--c-sunken);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 62% 50%;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(10, 10, 15, 0.94) 0%, rgba(10, 10, 15, 0.82) 34%, rgba(10, 10, 15, 0.35) 64%, rgba(10, 10, 15, 0.1) 100%),
    linear-gradient(0deg, rgba(14, 14, 20, 1) 0%, rgba(14, 14, 20, 0) 22%);
}

.hero-body {
  position: relative;
  z-index: 2;
  padding-top: 48px;
  padding-bottom: 56px;
}

.hero-body > * {
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.hero .lead {
  color: #d2d2da;
  font-size: clamp(16px, 1.35vw, 19px);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hero-facts strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
}

.hero-facts span {
  color: #b9b9c6;
  font-size: 13px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #c9c9d3;
  font-size: 14px;
}

.hero-note .icon {
  color: var(--c-accent);
  width: 16px;
  height: 16px;
}

.photo-credit {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(237, 237, 240, 0.72);
}

.photo-credit a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(237, 237, 240, 0.35);
  text-underline-offset: 2px;
}

.hero .photo-credit {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: 12px;
  max-width: min(520px, calc(100% - 2 * var(--gutter)));
  text-align: right;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

@media (max-width: 760px) {
  .hero {
    min-height: 0;
    max-height: none;
    align-items: flex-end;
  }

  .hero::before {
    background: linear-gradient(0deg, rgba(14, 14, 20, 1) 0%, rgba(14, 14, 20, 0.86) 45%, rgba(14, 14, 20, 0.45) 100%);
  }

  .hero-body {
    padding-top: 120px;
    padding-bottom: 64px;
  }

  .hero-facts {
    gap: 12px 20px;
  }

  .hero-facts strong {
    font-size: 20px;
  }

  .hero .btn-large {
    flex: 1 1 auto;
  }

  .hero .photo-credit {
    left: var(--gutter);
    text-align: left;
  }
}

/* ── Two ways to join (50/50 split) ── */
.join {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.join-card {
  display: flex;
  flex-direction: column;
  background: var(--c-panel);
  border-radius: var(--r-card);
  padding: 28px;
  min-width: 0;
}

.join-card .join-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  margin-bottom: 16px;
}

.join-card h2,
.join-card h3 {
  margin-bottom: 6px;
}

.join-price {
  color: var(--c-text-2);
  margin-bottom: 14px;
}

.join-price strong {
  color: var(--c-text);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
}

.join-card .checks {
  margin-bottom: 22px;
}

.join-card .actions {
  margin-top: auto;
}

@media (max-width: 880px) {
  .join {
    grid-template-columns: minmax(0, 1fr);
  }

  .join-card {
    padding: 20px;
  }
}

/* ── Carousel: photos at their own shape, captions under, scroll by swipe or buttons ── */
.carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 4px max(var(--gutter), calc((100% - var(--content-max)) / 2 + var(--gutter))) 12px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--content-max)) / 2 + var(--gutter)));
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.slide {
  --h: 340px;
  flex: none;
  width: calc(var(--h) * var(--r, 1));
  min-width: 240px;
  scroll-snap-align: start;
}

.slide figure {
  margin: 0;
}

.slide img {
  width: 100%;
  height: var(--h);
  object-fit: cover;
  border-radius: var(--r-card);
  background: var(--c-panel);
}

.slide figcaption {
  padding: 10px 2px 0;
  font-size: 13px;
  color: var(--c-text-2);
}

.slide figcaption strong {
  display: block;
  color: var(--c-text);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slide figcaption .photo-credit {
  display: block;
  margin-top: 6px;
  color: var(--c-text-3);
}

.slide a.slide-link {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 760px) {
  .slide {
    --h: 240px;
    min-width: 200px;
  }
}

.carousel-buttons {
  display: none;
  gap: 8px;
}

.js .carousel-buttons {
  display: flex;
}

/* ── Pricing cards (Telescope Live): price, then spec rows with dotted leaders ── */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.plans-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Two plans fill the first row; the add-ons card takes the whole second row. */
  .plan-addons {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }
}

.plan {
  display: flex;
  flex-direction: column;
  background: var(--c-panel);
  border-radius: var(--r-card);
  padding: 24px;
  min-width: 0;
}

.plan-kicker {
  color: var(--c-text-2);
  font-size: 13px;
  margin: 0 0 2px;
}

.plan h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 14px;
}

.plan-price {
  margin: 0;
  color: var(--c-text-2);
}

.plan-price .amount {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.1;
  color: var(--c-text);
  letter-spacing: -0.02em;
}

.plan-rate {
  color: var(--c-text-2);
  font-size: 13px;
  margin: 4px 0 18px;
}

.plan .leaders {
  margin-bottom: 20px;
}

.plan .actions {
  margin-top: auto;
}

.leaders {
  margin: 0;
  display: grid;
  gap: 9px;
}

.leaders > div {
  display: flex;
  align-items: baseline;
  min-width: 0;
}

.leaders dt {
  display: flex;
  align-items: baseline;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--c-text-2);
  font-size: 14px;
}

.leaders dt::after {
  content: "";
  flex: 1 1 auto;
  min-width: 12px;
  margin: 0 8px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.24);
  transform: translateY(-4px);
}

.leaders dd {
  margin: 0;
  flex: 0 0 auto;
  max-width: 58%;
  text-align: right;
  font-size: 14px;
  font-weight: 500;
}

.leaders .leader-note {
  display: block;
  color: var(--c-text-3);
  font-size: 12px;
  font-weight: 400;
}

.addon-list > div + div {
  padding-top: 9px;
  box-shadow: inset 0 1px 0 var(--c-hairline);
}

.addon-list dt {
  flex-direction: column;
  align-items: flex-start;
}

.addon-list dt::after {
  display: none;
}

.addon-list dt strong {
  color: var(--c-text);
  font-weight: 500;
}

.addon-list dd {
  white-space: normal;
  padding-left: 16px;
}

/* ── Steps ── */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.steps-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.steps-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (width >= 1500px) {
  .steps-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .steps,
  .steps-4,
  .steps-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .steps,
  .steps-4,
  .steps-6 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.step {
  background: var(--c-panel);
  border-radius: var(--r-card);
  padding: 22px;
  min-width: 0;
}

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.step-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 34px;
  line-height: 1;
  color: var(--c-accent);
}

.step-top .icon {
  width: 22px;
  height: 22px;
  color: var(--c-text-2);
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  color: var(--c-text-2);
  margin: 0;
}

.numbered {
  padding-left: 1.3em;
  margin: 0 0 16px;
}

.numbered li {
  margin-bottom: 10px;
  padding-left: 4px;
}

.numbered li::marker {
  color: var(--c-accent);
  font-weight: 600;
}

/* ── FAQ accordion ── */
.faq {
  display: grid;
  gap: 8px;
}

.faq details {
  background: var(--c-panel);
  border-radius: var(--r-card);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--c-text-2);
  transition: transform 0.15s ease;
}

.faq details[open] summary .icon {
  transform: rotate(180deg);
}

.faq .faq-a {
  padding: 0 20px 18px;
  color: var(--c-text-2);
  max-width: 80ch;
}

.faq .faq-a p {
  margin: 0;
}

/* ── Night bar, events (Starfront) and the forecast grid (Clear Outside) ── */
.nightbar {
  position: relative;
  height: 44px;
  border-radius: var(--r-control);
  overflow: hidden;
  background: var(--sky-day);
  margin: 0 0 26px;
}

.nightbar .seg {
  position: absolute;
  top: 0;
  bottom: 0;
}

.seg-day {
  background: var(--sky-day);
}

.seg-civil {
  background: var(--sky-civil);
}

.seg-nautical {
  background: var(--sky-nautical);
}

.seg-astro {
  background: var(--sky-astro);
}

.seg-dark {
  background: var(--sky-dark);
}

.nightbar .now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--c-accent);
}

.nightbar .now span {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-accent);
  white-space: nowrap;
}

.nightbar-wrap {
  position: relative;
}

.nightbar-ticks {
  position: relative;
  height: 18px;
  margin-top: -22px;
  margin-bottom: 8px;
}

.nightbar-ticks span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--c-text-3);
  white-space: nowrap;
}

.events {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 12px;
}

.events-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1280px) {
  .events-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .events-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.event {
  background: var(--c-panel);
  border-radius: var(--r-card);
  padding: 16px 18px;
  min-width: 0;
}

.event-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-text-2);
  font-size: 13px;
  font-weight: 600;
}

.event-head .icon {
  width: 16px;
  height: 16px;
}

.event-time {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 4px 0 6px;
}

.event-time strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.event-time .countdown {
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 600;
}

.event.is-past {
  background: rgba(22, 22, 30, 0.55);
}

.event.is-past .event-time strong,
.event.is-past .countdown {
  color: var(--c-text-3);
}

.event.is-next {
  background: #1b1a20;
  box-shadow: inset 0 0 0 1px rgba(212, 168, 67, 0.35);
}

.event p {
  margin: 0;
  color: var(--c-text-2);
  font-size: 14px;
}

.fgrid-box {
  overflow-x: auto;
  max-width: 100%;
  border-radius: var(--r-card);
  background: var(--c-panel);
  padding: 12px;
}

.fgrid {
  border-collapse: separate;
  border-spacing: 3px;
  font-size: 13px;
  min-width: 100%;
}

.fgrid th {
  text-align: left;
  font-weight: 500;
  color: var(--c-text-2);
  padding: 0 10px 0 4px;
  white-space: nowrap;
  font-size: 12px;
}

.fgrid thead th {
  text-align: center;
  padding: 2px 0 4px;
  min-width: 44px;
}

.fgrid td {
  text-align: center;
  min-width: 44px;
  height: 34px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.fgrid thead th.is-now {
  color: var(--c-accent);
}

.fgrid td.is-now {
  box-shadow: inset 0 0 0 2px var(--c-accent);
}

.cell-good {
  background: var(--c-good-soft);
  color: #b9f3d0;
}

.cell-caution {
  background: var(--c-caution-soft);
  color: #f6dba6;
}

.cell-bad {
  background: var(--c-bad-soft);
  color: #f9b9b5;
}

.cell-none {
  background: var(--c-idle-soft);
  color: var(--c-text-3);
}

.cell-plain {
  background: var(--c-idle-soft);
  color: var(--c-text);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--c-text-2);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  display: inline-block;
  width: 22px;
  height: 14px;
  border-radius: 3px;
}

/* ── Status (Starfront): the roof as one large coloured word ── */
.status-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 880px) {
  .status-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

.roof-panel {
  background: var(--c-panel);
  border-radius: var(--r-card);
  padding: 28px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.roof-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-text-2);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}

.roof-state {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.roof-detail {
  font-size: 17px;
  color: var(--c-text);
  margin: 0 0 6px;
  max-width: 60ch;
}

.roof-reading {
  color: var(--c-text-2);
  font-size: 13px;
  margin: 0;
}

.allsky-panel {
  background: var(--c-panel);
  border-radius: var(--r-card);
  padding: 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.allsky-panel img {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  background: var(--c-sunken);
}

.allsky-panel figure {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.allsky-panel figcaption,
.allsky-panel .empty-line {
  margin-top: 10px;
  color: var(--c-text-2);
  font-size: 13px;
}

.allsky-panel .empty-icon {
  width: 32px;
  height: 32px;
  color: var(--c-text-3);
}

.sensors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (width >= 1500px) {
  .sensors {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .sensors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sensor {
  border-radius: var(--r-control);
  padding: 12px 14px;
  min-width: 0;
}

.sensor-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-text-2);
  font-weight: 500;
}

.sensor-label .icon {
  width: 14px;
  height: 14px;
}

.sensor-value {
  display: block;
  font-size: 18px;
  font-weight: 600;
  margin-top: 2px;
}

.status-foot {
  margin: 12px 0 0;
  color: var(--c-text-3);
  font-size: 13px;
}

.log {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--c-panel);
  border-radius: var(--r-card);
}

.log li {
  display: grid;
  grid-template-columns: 120px 110px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 12px 18px;
  align-items: baseline;
}

.log li + li {
  box-shadow: inset 0 1px 0 var(--c-hairline);
}

.log time {
  color: var(--c-text-2);
  font-size: 13px;
}

.log .word {
  font-weight: 600;
}

.log .reason {
  color: var(--c-text-2);
}

@media (max-width: 600px) {
  .log li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .log .reason {
    grid-column: 1 / -1;
  }
}

/* ── Tables ── */
.table-box {
  overflow-x: auto;
  max-width: 100%;
  background: var(--c-panel);
  border-radius: var(--r-card);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 14px;
  box-shadow: inset 0 -1px 0 var(--c-hairline);
  white-space: nowrap;
}

.table thead th {
  color: var(--c-text-2);
  font-weight: 500;
  font-size: 12px;
}

.table tbody tr:last-child td {
  box-shadow: none;
}

.table td.num {
  text-align: right;
}

.table td.cell-good {
  color: #b9f3d0;
}

/* ── Target cards (Telescopius): picture with the title over it, then facts ── */
.targets-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (max-width: 1100px) {
  .targets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .targets-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tcard {
  background: var(--c-panel);
  border-radius: var(--r-card);
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tcard-media {
  position: relative;
  aspect-ratio: 5 / 2;
  overflow: hidden;
  background: #1a1a24;
}

/* Absolute, so a tall picture never stretches the card: every card has the same picture band. */
.tcard-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tcard-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 12, 0.75) 0%, rgba(8, 8, 12, 0) 55%);
}

.tcard-title {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tcard-title .target-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.tcard-title .target-sub {
  font-size: 12px;
  color: #cfcfda;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.tcard-body {
  padding: 12px 14px 14px;
  display: grid;
  gap: 6px;
}

.tstats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--c-text);
}

.tstats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.tstats .icon {
  width: 14px;
  height: 14px;
  color: var(--c-text-2);
}

.tcard-body .why {
  margin: 0;
  color: var(--c-text-2);
  font-size: 13px;
}

.tcard-credit {
  margin: 0;
  color: var(--c-text-3);
  font-size: 11px;
}

.credit-line {
  margin: 14px 0 0;
  color: var(--c-text-3);
  font-size: 12px;
}

/* ── Justified image rows (AstroBin) ── */
.justified {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.justified::after {
  content: "";
  flex-grow: 999;
}

.jrow-item {
  --rh: 220px;
  position: relative;
  flex: var(--r) 1 calc(var(--r) * var(--rh));
  aspect-ratio: var(--r);
  max-height: calc(var(--rh) * 1.6);
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--c-panel);
}

.jrow-item a {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--c-text);
}

.jrow-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jrow-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 10px 8px;
  background: linear-gradient(0deg, rgba(8, 8, 12, 0.85), rgba(8, 8, 12, 0));
  font-size: 12px;
  color: #d6d6de;
  min-width: 0;
}

.jrow-cap strong {
  display: block;
  font-size: 13px;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jrow-cap span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .justified {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .justified::after {
    display: none;
  }

  .jrow-item {
    aspect-ratio: 1;
    max-height: none;
    overflow: visible;
    background: none;
  }

  .jrow-item img {
    aspect-ratio: 1;
    height: auto;
    border-radius: 6px;
  }

  .jrow-cap {
    position: static;
    padding: 4px 0 0;
    background: none;
  }
}

/* ── Empty state: one centred line and one button ── */
.empty {
  text-align: center;
  padding: 56px 20px;
  background: var(--c-panel);
  border-radius: var(--r-card);
}

.empty .icon {
  width: 36px;
  height: 36px;
  color: var(--c-text-3);
  margin-bottom: 12px;
}

.empty h2,
.empty h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 6px;
}

.empty p {
  color: var(--c-text-2);
  max-width: 56ch;
  margin: 0 auto 16px;
}

/* ── Share page (AstroBin viewer): image on black, details panel on the right ── */
.viewer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  min-height: calc(100vh - var(--header-h));
}

.viewer-stage {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

.viewer-stage .island {
  width: 100%;
  height: 100%;
}

.viewer-stage .shared {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(100vh - var(--header-h));
  padding: 12px;
}

.viewer-stage .shared img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.viewer-side {
  background: var(--c-panel);
  padding: 28px 24px;
  min-width: 0;
}

.viewer-side h1 {
  font-size: clamp(24px, 2vw, 30px);
}

.viewer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--c-text-2);
  font-size: 13px;
  margin-bottom: 18px;
}

.viewer-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.viewer-meta .icon {
  width: 14px;
  height: 14px;
}

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 6px;
  margin-bottom: 18px;
}

.strip div {
  background: var(--c-raised);
  border-radius: var(--r-control);
  padding: 10px 12px;
}

.strip dt {
  font-size: 11px;
  color: var(--c-text-2);
}

.strip dd {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
}

.side-section {
  padding: 16px 0;
  box-shadow: inset 0 1px 0 var(--c-hairline);
}

.side-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  margin-bottom: 8px;
}

.side-section > summary::-webkit-details-marker {
  display: none;
}

.side-section > summary .icon {
  color: var(--c-text-2);
  transition: transform 0.15s ease;
}

.side-section[open] > summary .icon {
  transform: rotate(180deg);
}

.side-section h2 {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

@media (max-width: 960px) {
  .viewer-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .viewer-stage .shared {
    height: auto;
    max-height: 78vh;
  }
}

/* ── Forms on the page (planner search) ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  min-width: 0;
}

.field label,
.field .label {
  font-size: 13px;
  color: var(--c-text-2);
  font-weight: 500;
}

input[type="search"],
input[type="text"],
select {
  font: inherit;
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-raised);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--c-hairline-strong);
  border-radius: var(--r-control);
  min-height: 40px;
  padding: 8px 12px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.search-row {
  display: flex;
  gap: 8px;
}

.search-row input {
  flex: 1 1 auto;
}

.filter-col {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

@media (max-width: 880px) {
  .filter-col {
    position: static;
  }
}

.place-results {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  background: var(--c-raised);
  border-radius: var(--r-control);
}

.place-results li a {
  display: block;
  padding: 9px 12px;
}

.place-results li + li {
  box-shadow: inset 0 1px 0 var(--c-hairline);
}

/* ── Footer: link columns, data and photo credits ── */
.site-footer {
  background: var(--c-sunken);
  box-shadow: inset 0 1px 0 var(--c-hairline);
  padding: 48px 0 28px;
  color: var(--c-text-2);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) minmax(0, 2fr);
  gap: 32px;
}

@media (max-width: 1180px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-about,
  .footer-credits-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--c-text);
  font-size: 17px;
  margin-bottom: 8px;
}

.footer-head {
  color: var(--c-text);
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-links,
.footer-credits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--c-text-2);
}

.footer-links a:hover {
  color: var(--c-text);
}

.footer-credits li {
  margin-bottom: 8px;
  font-size: 13px;
}

.footer-credits a {
  color: var(--c-text-2);
  text-decoration: underline;
  text-decoration-color: rgba(160, 160, 176, 0.4);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 32px;
  padding-top: 20px;
  box-shadow: inset 0 1px 0 var(--c-hairline);
  color: var(--c-text-3);
  font-size: 13px;
}

.footer-base p {
  margin: 0;
}

/* ── Photo credits list (landing) ── */
.credits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 8px 24px;
  font-size: 13px;
  color: var(--c-text-2);
}

.credits-list strong {
  color: var(--c-text);
  font-weight: 500;
}

.credits-list a {
  color: var(--c-text-2);
  text-decoration: underline;
  text-decoration-color: rgba(160, 160, 176, 0.4);
}

details.credits > summary {
  cursor: pointer;
  color: var(--c-text-2);
  font-size: 13px;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

details.credits > summary::-webkit-details-marker {
  display: none;
}

/* ── Tonight strip on the landing page ── */
.tonight-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .tonight-strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

.big-word {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.15;
  margin: 0 0 8px;
}

.figure-photo {
  margin: 0;
}

.figure-photo img {
  width: 100%;
  height: auto;
  max-height: 440px;
  border-radius: var(--r-card);
  object-fit: contain;
  object-position: left center;
  background: transparent;
}

.figure-photo figcaption {
  margin-top: 8px;
}

.figure-photo .photo-credit {
  color: var(--c-text-3);
}

.island {
  min-width: 0;
}

/* ── Small helpers ── */
.h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 30px);
}

.h3,
h2.h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.reserve-aside {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.planner-layout {
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
}

@media (max-width: 880px) {
  .planner-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.log-simple li {
  grid-template-columns: minmax(0, 1fr);
}

.reserve-steps .step {
  padding: 18px 20px;
}

.reserve-steps .step-num {
  font-size: 28px;
}

/* ── Reserve: a compact three-step line over the form ── */
.stepper {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stepper li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-control);
  background: var(--c-panel);
  min-width: 0;
}

.stepper-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-weight: 700;
  font-size: 13px;
}

.stepper strong {
  display: block;
  font-size: 14px;
}

.stepper li > span:last-child span {
  display: block;
  font-size: 12px;
  color: var(--c-text-2);
  line-height: 1.4;
}

@media (max-width: 700px) {
  .stepper {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Founding places: a bar instead of a paragraph ── */
.founding-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 24px 40px;
  align-items: center;
}

.founding-band h2 {
  margin-bottom: 4px;
}

.founding-bar {
  min-width: 0;
}

.founding-track {
  height: 10px;
  border-radius: 5px;
  background: var(--c-raised);
  overflow: hidden;
}

.founding-track span {
  display: block;
  height: 100%;
  min-width: 6px;
  background: var(--c-accent);
}

.founding-bar p {
  margin: 10px 0 0;
  color: var(--c-text-2);
}

.founding-bar strong {
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
}

@media (max-width: 880px) {
  .founding-band {
    grid-template-columns: minmax(0, 1fr);
  }
}

.night-live {
  margin-bottom: 20px;
}

/* ── Real Seestar results: an even grid of square tiles, so rows always fill ── */
.result-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.result-grid .jrow-item {
  flex: none;
  aspect-ratio: 1;
  max-height: none;
}

@media (max-width: 1200px) {
  .result-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .result-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* A Seestar result beside text: a 4:3 crop, so a portrait frame doesn't leave a gap beside it. */
.figure-result img {
  aspect-ratio: 4 / 3;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.grid-fill {
  align-items: stretch;
}

.panel .founding-bar {
  margin-top: 18px;
}
