/* Tonight's Sky. Reuses the homepage's dark conditions board (.conditions/.readouts in site.css);
   this file adds the header, moon art, cloud strip, launch list and meteor table. */

.sky-head { background: var(--marsh-950); color: var(--sand-50); padding: 2.5rem 0 2rem; position: relative; overflow: hidden; }
/* A light scatter of stars, pure CSS so it costs nothing to load */
.sky-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 64%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 48%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 78% 26%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 70%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 86%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 94% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 78%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 92%, #fff 50%, transparent 51%);
}
.sky-head .wrap { position: relative; }
.sky-head .label { color: var(--marsh-300); }
.sky-head h1 { margin: .4rem 0 .5rem; font-size: clamp(3rem, 13vw, 5.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: .95; }
.sky-head h1 em { font-weight: 300; color: var(--marsh-300); }
.sky-date { margin: 0 0 1rem; font-family: var(--font-label); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #dfe5d8; }
.sky-lede { max-width: 40rem; margin: 0; font-size: 1.125rem; color: #e3e8dc; }

.sky-board { padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.08); }
.sky-board .big .pill { font-size: 1.25rem; padding: .2rem .8rem; }
.moon-row { display: flex; gap: 1rem; align-items: center; margin-top: .5rem; }
.moon-art svg { display: block; width: 72px; height: 72px; }
.moon-row .big { margin-top: 0; font-size: 1.5rem; }

/* Cloud cover strip: one bar per hour from sunset to sunrise */
.clouds { margin-top: 1.5rem; }
.clouds .label { color: var(--marsh-300); font-size: .75rem; margin: 0 0 .6rem; }
.cloud-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; align-items: end; height: 110px; padding-bottom: 1.4rem; position: relative; }
.cloud-bar { position: relative; height: 100%; display: flex; align-items: flex-end; }
.cloud-bar i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: #c9d3c2; min-height: 3px; }
.cloud-bar.is-dark::before { content: ""; position: absolute; inset: 0 0 0 0; background: rgba(255,255,255,.05); border-radius: 3px; }
.cloud-bar span { position: absolute; bottom: -1.35rem; left: 50%; transform: translateX(-50%); font-family: var(--font-label); font-size: .6875rem; color: #b9c4b2; white-space: nowrap; }
.cloud-bar b { position: absolute; bottom: calc(var(--h) + 2px); left: 50%; transform: translateX(-50%); font-size: .625rem; font-weight: 700; color: #dfe5d8; }
.cloud-key { margin: .4rem 0 0; font-size: .875rem; color: #b9c4b2; }
.key-dark { display: inline-block; width: 12px; height: 12px; border-radius: 2px; background: rgba(255,255,255,.12); vertical-align: -1px; margin: 0 .2rem 0 .4rem; }
@media (max-width: 559px) { .cloud-bar b { display: none; } .cloud-bar:nth-child(odd) span { visibility: hidden; } }

/* Launch list */
.launches { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.launch-item { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.15rem; display: grid; gap: .25rem; }
.launch-when { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; }
.launch-count { font-family: var(--font-label); font-weight: 700; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.launch-date { font-weight: 700; color: var(--ink); }
.launch-name { margin: 0; font-size: 1.125rem; font-weight: 800; color: var(--marsh-950); line-height: 1.3; }
.launch-meta { margin: 0; font-size: .9375rem; color: var(--ink-mid); }
.launch-loading, .launch-note { color: var(--ink-mid); font-size: 1rem; }
.launch-note { margin: 1rem 0 0; }

/* Meteor calendar */
.table-wrap { overflow-x: auto; }
.meteor-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); font-size: 1rem; }
.meteor-table th { text-align: left; font-family: var(--font-label); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); padding: .75rem .8rem; border-bottom: 2px solid var(--rule); white-space: nowrap; }
.meteor-table td { padding: .75rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.meteor-table tr:last-child td { border-bottom: 0; }
.meteor-table td:first-child { font-weight: 700; }
.meteor-table .is-next td { background: var(--marsh-100); }
.meteor-table .next-tag { display: inline-block; margin-left: .4rem; font-family: var(--font-label); font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--marsh-900); color: #fff; border-radius: 3px; padding: .05rem .35rem; vertical-align: .1em; }
.moon-cell { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.moon-cell svg { width: 22px; height: 22px; flex-shrink: 0; }

/* Night tips */
.night-tips { display: grid; gap: 1rem; }
@media (min-width: 768px) { .night-tips { grid-template-columns: 1fr 1fr; } }
.tip { display: flex; gap: .85rem; align-items: flex-start; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.15rem; }
.tip .material-symbols-outlined { color: var(--marsh-500); font-size: 1.6rem; flex-shrink: 0; }
.tip p { margin: 0; color: var(--ink-mid); line-height: 1.5; }
.tip strong { color: var(--ink); }
.sky-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.5rem; }
