/* ============ Hero: today's sky ============ */
.today {
  padding-block: var(--space-md) var(--space-xl);
}

.today__rule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  padding: 0.8rem var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(14, 26, 22, 0.72);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--fog);
}
.today__rule .place-name { color: var(--paper); }

.today__grid {
  display: grid;
  gap: var(--space-lg);
  padding-top: var(--space-md);
}
@media (min-width: 62rem) {
  .today__grid {
    grid-template-columns: minmax(0, 1.22fr) minmax(22rem, 0.78fr);
    gap: clamp(2rem, 4vw, 4.5rem);
    align-items: center;
  }
}

.today__grid > div { min-width: 0; }
.today .hero-plate { order: -1; }

.today__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.5rem, 7vw, 6.8rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin: var(--space-xs) 0 var(--space-md);
}
.today__title em {
  display: block;
  font-style: italic;
  color: var(--azure);
  font-size: 0.58em;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.today__lead {
  max-width: 42ch;
  color: var(--paper-dim);
  font-size: var(--step-1);
  line-height: 1.55;
}

.today__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-block: var(--space-md) var(--space-lg);
}

.today__index {
  padding: var(--space-md);
  margin-top: var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}
.today__index .index-factors { display: none; }
.today__index .disclosure { margin-top: var(--space-sm); }

/* The homepage is a decision summary. The full eight-step ladder remains on
   the dedicated sky page. */
.today .twilight-ladder li[data-key="civilDusk"],
.today .twilight-ladder li[data-key="nauticalDusk"],
.today .twilight-ladder li[data-key="nauticalDawn"],
.today .twilight-ladder li[data-key="civilDawn"] { display: none; }

/* The hero photograph: flush, uncropped on mobile, tall crop on desktop. */
.hero-plate { position: relative; min-width: 0; }
.hero-plate img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 42%;
  background: var(--ink-800);
  border-radius: var(--radius-panel);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}
@media (min-width: 62rem) {
  .hero-plate img { aspect-ratio: 16 / 11; }
}
.hero-plate figcaption {
  margin-top: var(--space-sm);
  display: grid;
  gap: 0.2rem;
  border-top: none;
  padding: var(--space-sm) var(--space-xs) 0;
}
.hero-plate .plate-object {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--paper);
  line-height: 1.15;
}
.hero-plate .plate-tech {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--step--2);
  color: var(--fog);
  letter-spacing: 0.02em;
}

/* ============ Conditions strip ============ */
.conditions-strip {
  border: 0;
  padding: 0;
}

.home-conditions .split-data > * {
  min-width: 0;
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(7, 16, 13, 0.46);
}
.home-conditions .split-data > :last-child { border-left: 1px solid var(--line); }
.home-conditions [data-moon-panel] .spec-list { display: none; }

/* Cloud layers as a stacked bar — low cloud is what actually stops you. */
.cloud-bars { display: grid; gap: 0.45rem; }
.cloud-bars li {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr) 2.8rem;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--step--2);
  color: var(--fog);
}
.cloud-bar { height: 3px; background: var(--ink-700); position: relative; }
.cloud-bar__seg { position: absolute; inset: 0 auto 0 0; background: var(--fog); }
.cloud-bars li[data-layer="low"] .cloud-bar__seg { background: var(--paper-dim); }
.cloud-bars .cloud-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--paper-dim);
}

/* ============ Section: events ============ */
.home-events__lead {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.home-events .event-timeline > li:nth-child(n + 4) { display: none; }
.home-events .event-note { display: none; }
@media (min-width: 52rem) {
  .home-events__lead {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

/* ============ Section: sky map preview ============ */
.home-map { padding-block: clamp(2.5rem, 5vw, 4rem); }
.map-preview {
  display: grid;
  gap: var(--space-sm);
}
.map-preview__frame {
  position: relative;
  height: clamp(17rem, 32vw, 23rem);
  border: var(--border);
  background:
    radial-gradient(circle at 30% 35%, #101f1b, var(--surface-sunken) 72%);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-panel);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
}
.map-preview__frame .aladin-host { position: absolute; inset: 0; }
.map-preview__frame .local-sky-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
.map-preview__frame[data-dragging="true"] .local-sky-canvas { cursor: grabbing; }
.map-preview__frame .local-map-controls {
  position: absolute;
  z-index: 3;
  top: var(--space-sm);
  right: var(--space-sm);
  display: grid;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--ink-900) 88%, transparent);
}
.map-preview__frame .local-map-controls button {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: calc(var(--radius-control) - 2px);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--step-0);
}
.map-preview__frame .local-map-controls button:hover,
.map-preview__frame .local-map-controls button:focus-visible {
  color: var(--ink-900);
  background: var(--azure-bright);
}
.map-preview__placeholder {
  text-align: center;
  padding: var(--space-lg);
  max-width: 34ch;
}
.map-preview__placeholder p {
  font-size: var(--step--1);
  color: var(--fog);
  margin-block: var(--space-xs) var(--space-md);
}
.map-preview__copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-sm);
  color: var(--fog);
  font-size: var(--step--1);
}
.map-preview__copy p { max-width: 72ch; }
.map-preview__copy a { flex: 0 0 auto; }
@media (max-width: 42rem) {
  .map-preview__frame { height: 17rem; }
  .map-preview__copy { align-items: flex-start; flex-direction: column; }
}

/* ============ Section: APOD ============ */
.apod {
  display: grid;
  gap: var(--space-lg);
}
@media (min-width: 64rem) {
  .apod {
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.55fr);
    gap: var(--space-xl);
    align-items: start;
  }
}
.apod__media img,
.apod__media iframe {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: none;
  background: var(--ink-800);
  border-radius: var(--radius-panel);
}
.apod__body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1.15;
  margin-bottom: var(--space-sm);
}
.apod__text {
  font-size: var(--step--1);
  line-height: 1.65;
  color: var(--paper-dim);
  max-width: 46ch;
}

/* ============ Section: featured photography ============ */
/* Two plates at different scales, offset — a spread, not a row of cards. */
.plate-spread { display: grid; gap: var(--space-xl); }
@media (min-width: 60rem) {
  .plate-spread {
    grid-template-columns: repeat(12, 1fr);
    align-items: start;
  }
  .plate-spread > :nth-child(1) { grid-column: 1 / 8; }
  .plate-spread > :nth-child(2) { grid-column: 9 / -1; margin-top: var(--space-2xl); }
}
.plate-spread img {
  width: 100%;
  object-fit: cover;
  background: var(--ink-800);
  border-radius: var(--radius-panel);
  border: 1px solid var(--line);
  transition: transform var(--dur-slow) var(--ease-out), filter var(--dur-slow);
}
.plate-spread figure:hover img { transform: scale(1.012); filter: saturate(1.08); }
.plate-spread > :nth-child(1) img { aspect-ratio: 3 / 2; }
.plate-spread > :nth-child(2) img { aspect-ratio: 4 / 5; }

/* ============ Section: latest log entry ============ */
.log-excerpt__meta {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--step--2);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--fog-deep);
  margin-bottom: var(--space-xs);
}
.log-excerpt h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-4);
  line-height: 1.05;
  margin-bottom: var(--space-md);
}

/* ============ Section: solar + NEO ============ */
.data-pair { display: grid; gap: var(--space-xl); }
@media (min-width: 56rem) {
  .data-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-pair > :last-child { border-left: 1px solid var(--line); padding-left: var(--space-xl); }
}
.home-data .data-pair > * {
  min-width: 0;
  padding: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(7, 16, 13, 0.48);
}
.home-data .data-pair > :last-child { border-left: 1px solid var(--line); padding-left: var(--space-lg); }

@media (max-width: 39.99rem) {
  .today__rule [data-place-coords] { display: none; }
  .today__rule .segmented { margin-left: 0; }
  .today__title { font-size: clamp(3.6rem, 17vw, 5.2rem); }
  .today__lead { font-size: var(--step-0); }
  .hero-plate img { aspect-ratio: 16 / 11; }
  .section-rule__note { display: none; }
}
