:root {
  --navy: #02061f;
  --deep: #00043d;
  --aurora: #81d742;
  --mist: #d5def8;
  --paper: #f4f6ff;
  --muted: #b7c4ea;
  --line: rgba(200, 214, 255, 0.16);
  --card: rgba(4, 10, 42, 0.78);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --alert: #ff7a8a;
  --watch: #ffc44d;
  --info: #8eb4ff;
  --quiet: #81d742;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--paper);
  background: var(--navy);
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 50% at 50% 115%, rgba(129, 215, 66, 0.2), transparent 55%),
    radial-gradient(45% 35% at 8% 0%, rgba(80, 120, 255, 0.2), transparent 55%),
    radial-gradient(40% 30% at 92% 8%, rgba(129, 215, 66, 0.1), transparent 50%),
    linear-gradient(180deg, #010318 0%, var(--deep) 50%, #011018 100%);
}

.top {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
}
nav { display: flex; gap: 1.25rem; }
nav a, footer a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid rgba(129, 215, 66, 0.45);
  font-size: 0.95rem;
  font-weight: 600;
}
nav a[aria-current="page"] { color: var(--aurora); border-bottom-color: var(--aurora); }
nav a:hover, footer a:hover { color: var(--aurora); }

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 4rem;
}
.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--aurora);
}
h1 {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.3rem);
  letter-spacing: -0.04em;
  line-height: 1;
}
.lede {
  max-width: 42rem;
  color: var(--mist);
  line-height: 1.65;
  font-size: 1.08rem;
  margin: 1.1rem 0 2rem;
}

.status {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem 1.6rem;
  padding: 1.35rem 1.5rem 1.45rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  backdrop-filter: blur(12px);
}
.status__level {
  grid-row: span 2;
  align-self: start;
  min-width: 6.6rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--level, var(--quiet)) 18%, transparent);
  color: var(--level, var(--quiet));
  border: 1px solid color-mix(in srgb, var(--level, var(--quiet)) 45%, transparent);
}
.status[data-level="ALERT"] { --level: var(--alert); }
.status[data-level="WATCH"] { --level: var(--watch); }
.status[data-level="INFO"] { --level: var(--info); }
.status[data-level="QUIET"] { --level: var(--quiet); }
.status h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
#status-why {
  margin: 0.5rem 0 0;
  color: var(--mist);
  line-height: 1.5;
  max-width: 46rem;
}
.stats {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.2rem, 1fr));
  gap: 0.95rem 1.2rem;
  margin: 0.2rem 0 0;
}
.stats div { margin: 0; }
.stats dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.stats dd { margin: 0.2rem 0 0; font-size: 1.08rem; font-weight: 700; line-height: 1.25; }

.globe, .list-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.globe {
  margin: 1.5rem 0 0;
  padding: 1.2rem 1.25rem 1.2rem;
}
.globe figcaption {
  display: block;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.globe figcaption strong {
  color: var(--paper);
  font-family: var(--font-display);
  display: block;
  margin-bottom: 0.2rem;
}
.globe figcaption span {
  display: block;
  max-width: 42rem;
}
.globe__row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(14rem, 0.55fr);
  gap: 1.1rem;
  align-items: stretch;
}
.sun-stage {
  position: relative;
  min-height: 380px;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 55%, rgba(255, 160, 40, 0.16), transparent 58%);
}
.sun-canvas { display: block; width: 100%; height: auto; }
.sun-labels { position: absolute; inset: 0; pointer-events: none; }
.sun-pin {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 236, 210, 0.92);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(2, 6, 31, 0.9);
  transition: opacity 0.2s;
  pointer-events: none;
}
.sun-legend {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
  max-height: 520px;
  overflow: auto;
}
.sun-legend li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--mist);
}
.sun-legend li span {
  display: block;
  font-family: var(--font-display);
  color: var(--paper);
  margin-bottom: 0.1rem;
}
.sun-legend li[data-level="ALERT"] span { color: var(--alert); }
.sun-legend li[data-level="WATCH"] span { color: var(--watch); }
.sun-legend li[data-level="INFO"] span { color: var(--info); }
.sun-legend li[data-level="QUIET"] span { color: var(--quiet); }
.list-wrap .meta {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 1.35rem 0.95rem;
}
.list-wrap .meta dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem 1.2rem;
  margin: 0;
}
.meta dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.meta dd { margin: 0.2rem 0 0; font-weight: 600; line-height: 1.35; }

.list-wrap { margin-top: 1.5rem; padding: 0.5rem 0 0.8rem; }
.list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 1.35rem 0.55rem;
}
.list-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.25rem; }
#list-count { margin: 0; color: var(--muted); font-size: 0.95rem; }
.event {
  display: grid;
  gap: 0.45rem;
  padding: 1.15rem 1.35rem 1.25rem;
  border-top: 1px solid var(--line);
}
.event__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.event__level {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--level);
}
.event[data-level="ALERT"] { --level: var(--alert); }
.event[data-level="WATCH"] { --level: var(--watch); }
.event[data-level="INFO"] { --level: var(--info); }
.event[data-level="QUIET"] { --level: var(--quiet); }
.event h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.3;
  max-width: 46rem;
}
.event__why {
  margin: 0;
  color: var(--mist);
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 48rem;
}
.event__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.7rem 1rem;
  margin: 0.45rem 0 0;
}
.event__facts dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.event__facts dd { margin: 0.15rem 0 0; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--mist);
}
.event__more {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.event__more summary {
  cursor: pointer;
  color: var(--mist);
  font-weight: 600;
}
.event__more summary:hover { color: var(--aurora); }
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.2rem;
  margin: 0.7rem 0 0;
  line-height: 1.5;
}
.details h4 {
  margin: 0 0 0.25rem;
  color: var(--paper);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.details p { margin: 0; }
.details a { color: var(--paper); }
.show-more {
  display: block;
  width: calc(100% - 2.7rem);
  margin: 0.4rem 1.35rem 0.6rem;
  font: inherit;
  font-weight: 700;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
}
.show-more:hover { color: var(--aurora); border-color: var(--aurora); }

footer {
  max-width: 1080px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
footer p { margin: 0.3rem 0; }

.enlil {
  margin: 1.5rem 0 0;
  padding: 1.2rem 1.25rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.enlil__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.enlil__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.enlil__head p {
  margin: 0.4rem 0 0;
  color: var(--mist);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 44rem;
}
#enlil-count { margin: 0; color: var(--muted); font-size: 0.95rem; }
.enlil__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  gap: 1.1rem;
}
.helios, .enlil-movie { margin: 0; }
.helios figcaption, .enlil-movie figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.helios figcaption strong, .enlil-movie figcaption strong {
  color: var(--paper);
  font-family: var(--font-display);
}
#helios svg { width: 100%; height: auto; display: block; }
.enlil-controls {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.45rem 0 0.75rem;
}
.enlil-controls button {
  font: inherit;
  font-weight: 700;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.9rem;
  cursor: pointer;
}
.enlil-controls button:hover { color: var(--aurora); border-color: var(--aurora); }
.enlil-controls input[type="range"] { flex: 1; }
.enlil-movie img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  background: #010318;
}
#enlil-movie-meta {
  margin: 0.5rem 0 0.85rem;
  color: var(--mist);
  font-size: 0.92rem;
  line-height: 1.45;
}
.enlil-runs {
  list-style: none;
  margin: 0.5rem 0 0.9rem;
  padding: 0.8rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.55rem 1.3rem;
  border-top: 1px solid var(--line);
}
.enlil-runs li { color: var(--mist); font-size: 0.92rem; line-height: 1.4; }
.enlil-runs li span { display: block; color: var(--muted); }
.enlil-runs a { color: var(--paper); text-decoration: none; font-weight: 700; }
.enlil-runs li[data-earth="1"] a { color: var(--watch); }

.kp-forecast {
  margin: 1.5rem 0 0;
  padding: 1.2rem 1.25rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.kp-forecast figcaption {
  display: block;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 0.7rem;
}
.kp-forecast figcaption strong {
  color: var(--paper);
  font-family: var(--font-display);
  display: block;
  margin-bottom: 0.2rem;
}
.kp-forecast figcaption span {
  display: block;
  max-width: 46rem;
}
#kp-plot { overflow-x: auto; }
#kp-plot p {
  margin: 0;
  color: var(--mist);
}
#kp-plot svg { width: 100%; min-width: 36rem; height: auto; display: block; }
#kp-plot text { font-family: var(--font-body); }
.kp-grid { stroke: rgba(200, 214, 255, 0.1); stroke-width: 1; }
.kp-dayline { stroke: rgba(200, 214, 255, 0.22); stroke-width: 1; }
.kp-now { stroke: var(--paper); stroke-width: 1.4; stroke-dasharray: 3 4; }
.kp-tick {
  fill: var(--muted);
  font-size: 9px;
}
.kp-day {
  fill: var(--paper);
  font-size: 12px;
  font-weight: 700;
}
.kp-legend-n {
  fill: #021018;
  font-size: 9px;
  font-weight: 700;
}
.kp-onbar {
  fill: #021018;
  font-size: 11px;
  font-weight: 700;
}
.kp-over {
  fill: var(--paper);
  font-size: 11px;
  font-weight: 700;
}

.doc h2 {
  margin: 2.4rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  letter-spacing: -0.03em;
}
.doc h2:first-child { margin-top: 0; }
.doc > p, .doc li {
  color: var(--mist);
  line-height: 1.65;
  max-width: 44rem;
}
.doc > p { margin: 0 0 1rem; }
.doc a { color: var(--paper); }
.doc a:hover { color: var(--aurora); }

.steps {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.steps li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.85rem 1rem;
  max-width: none;
  padding: 1.05rem 1.15rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.steps strong {
  display: block;
  font-family: var(--font-display);
  color: var(--paper);
  font-size: 1.08rem;
  margin-bottom: 0.25rem;
}
.step-n {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--aurora);
  font-size: 1.15rem;
  padding-top: 0.1rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.85rem;
  margin: 0.4rem 0 1.4rem;
  padding: 0;
}
.facts > div {
  margin: 0;
  padding: 1rem 1.15rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.facts dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.facts dd {
  margin: 0.35rem 0 0;
  color: var(--mist);
  line-height: 1.55;
}
.facts dd b { color: var(--paper); }

.pa-fig {
  margin: 1.2rem 0 1.6rem;
  padding: 1.1rem 1.2rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.pa-fig figcaption {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.pa-fig figcaption strong {
  display: block;
  color: var(--paper);
  font-family: var(--font-display);
  margin-bottom: 0.2rem;
}
.pa-fig svg { width: min(100%, 26rem); height: auto; display: block; }

.refs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.refs li {
  max-width: none;
  padding: 1rem 1.15rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.refs cite {
  display: block;
  font-style: normal;
  font-family: var(--font-display);
  color: var(--paper);
  font-size: 1.02rem;
  margin-bottom: 0.3rem;
}
.refs p { margin: 0; color: var(--mist); line-height: 1.55; }
.refs a { color: var(--paper); }

.note {
  margin: 1.2rem 0 0;
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--mist);
  line-height: 1.6;
  max-width: 44rem;
}
.note strong { color: var(--paper); }

@media (max-width: 820px) {
  .status, .details, .globe__row, .enlil__grid { grid-template-columns: 1fr; }
  .status__level { grid-row: auto; width: fit-content; }
  .stats { grid-column: 1; }
}
