:root {
  --bg: #f4fbff;
  --bg-soft: #e9f6ff;
  --surface: #ffffff;
  --surface-2: #f8fdff;
  --text: #0f2740;
  --muted: #4f7091;
  --line: #d2e8f9;
  --primary: #0ea5e9;
  --primary-strong: #0284c7;
  --success: #16a34a;
  --warning: #ca8a04;
  --danger: #dc2626;
  --shadow: 0 16px 45px rgba(14, 77, 146, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, #c9ecff 0%, transparent 45%),
    radial-gradient(circle at 95% 0%, #d7f8ff 0%, transparent 35%),
    linear-gradient(180deg, #f7fcff 0%, #ecf8ff 100%);
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
}

.header-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #0369a1;
}

.nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
  border-radius: 999px;
  color: #15517b;
}

.nav a:hover,
.nav a.active {
  background: #dff4ff;
  color: #0b77ac;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.1rem 1rem 3.2rem;
}

.hero {
  background: linear-gradient(135deg, #ffffff 0%, #f1fbff 45%, #e4f7ff 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 2rem;
}

.badge {
  display: inline-block;
  border: 1px solid #9fdbff;
  background: #ecf9ff;
  color: #056c9c;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

h1, h2, h3 { margin: 0; }

h1 { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.1; }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); }

.lead {
  margin-top: 0.9rem;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.65;
}

.section {
  margin-top: 1.7rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-link {
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(12, 65, 114, 0.06);
  padding: 1rem;
}

.stat-value { font-size: 2rem; font-weight: 800; color: #0284c7; }
.stat-label { font-size: 0.88rem; color: var(--muted); margin-top: 0.2rem; }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th, td {
  text-align: left;
  padding: 0.72rem 0.75rem;
  border-bottom: 1px solid #e4f2fb;
  font-size: 0.9rem;
}

th { color: #3b6489; font-weight: 700; }

tbody tr:hover { background: #f5fbff; }

.status {
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.status.completed { color: var(--success); background: #def7e8; }
.status.upcoming { color: #0369a1; background: #dff4ff; }
.status.ongoing { color: var(--warning); background: #fff7d6; }
.status.delayed { color: var(--danger); background: #fee5e5; }

.chip {
  display: inline-block;
  background: #eff8ff;
  border: 1px solid #cce9ff;
  color: #0a6e9f;
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  margin: 0.2rem 0.2rem 0 0;
}

.muted { color: var(--muted); }
.mono { font-family: Consolas, "Courier New", monospace; }

.button {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-strong); }
.button.ghost { border-color: #9edaff; color: #0a6997; background: #ebf8ff; }

.footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
}

.footer-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem;
  color: #3f6588;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cta {
  background: linear-gradient(110deg, #e6f8ff 0%, #f1fbff 42%, #dcf5ff 100%);
}

.timeline {
  border-left: 3px solid #b4e4ff;
  margin-left: 0.35rem;
  padding-left: 1rem;
}

.timeline-item { margin: 0.85rem 0; }
.timeline-item h3 { font-size: 1rem; }

.moon-photo-card {
  overflow: hidden;
}

.moon-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #d4e9fb;
  margin-bottom: 0.7rem;
  background: #e8f4ff;
}

.moon-map-svg {
  width: min(100%, 560px);
  display: block;
  margin: 0.8rem auto 0.2rem;
}

.moon-photo-map {
  width: min(100%, 860px);
  border-radius: 14px;
  background: #000;
}

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

@media (max-width: 700px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 1.25rem; }
}

/* ---- Professional polish layer ---- */
:root {
  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 8% -10%, #e0e7ff 0%, transparent 45%),
    radial-gradient(circle at 96% 0%, #ede9fe 0%, transparent 35%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  background-attachment: fixed;
}
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; color: #0f172a; }
.site-header {
  background: linear-gradient(90deg, #0f172a, #1e1b4b);
  border-bottom: none;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.25);
}
.brand { color: #fff; font-size: 1.15rem; }
.brand::before { content: "\1F319  "; }
.nav a { color: #c7d2fe; transition: all .2s ease; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,0.14); color: #fff; }
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #312e81 60%, #4f46e5 100%);
  color: #fff;
  border: none;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(49, 46, 129, 0.35);
}
.hero h1, .hero h2, .hero h3, .hero p, .hero .muted { color: #fff; }
.hero .muted { opacity: .8; }
.card, .panel, [class*="card"] {
  border-radius: 16px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover, [class*="card"]:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12); }
button, .btn, .button {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
button:hover, .btn:hover, .button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(79, 70, 229, 0.4); }
img { border-radius: 12px; }
table { border-collapse: collapse; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.stat-value { background: linear-gradient(135deg,#6366f1,#8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.button.primary { background: linear-gradient(135deg,#6366f1,#4f46e5); }
.button.ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.35); box-shadow: none; }
.chip { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.hero .chip { background: rgba(255,255,255,0.15); color: #e0e7ff; border-color: rgba(255,255,255,0.3); }
.nav a { font-size: 0.86rem; padding: 0.4rem 0.6rem; }
.site-footer, footer { color: var(--muted); }
.brand { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.brand::before { content: "\1F319"; }
.badge { background: rgba(255,255,255,0.15); color: #e0e7ff; border-color: rgba(255,255,255,0.3); }
.hero .button.primary { background: #fff; color: #3730a3; box-shadow: none; }

/* ---- Single-line navigation ---- */
.header-wrap { max-width: 1480px; flex-wrap: nowrap; gap: 1.25rem; padding: 0.8rem 1.25rem; }
.brand { flex: 0 0 auto; font-size: 1.05rem; }
.nav { flex: 1 1 auto; flex-wrap: nowrap; justify-content: flex-end; gap: 0.15rem; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: 0 0 auto; white-space: nowrap; position: relative;
  font-size: 0.84rem; font-weight: 500; letter-spacing: .01em;
  padding: 0.5rem 0.7rem; border-radius: 8px; background: transparent;
}
.nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 0; height: 2px;
  background: linear-gradient(90deg, #818cf8, #c4b5fd); border-radius: 2px;
  transform: translateX(-50%); transition: width .2s ease;
}
.nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav a:hover::after { width: 55%; }
.nav a.active { background: rgba(129,140,248,0.22); color: #fff; font-weight: 600; }
.nav a.active::after { width: 55%; }
@media (max-width: 1100px) { .nav a { padding: 0.5rem 0.5rem; font-size: 0.8rem; } }

/* ---- Distance metric boxes ---- */
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-grid .card {
  display: flex; flex-direction: column; justify-content: center; gap: .35rem;
  padding: 1.2rem 1.3rem; border-top: 3px solid #6366f1;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
}
.metric-grid .stat-value {
  white-space: nowrap; font-size: clamp(1.05rem, 1.7vw, 1.55rem); font-weight: 800;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2;
  background: none; -webkit-text-fill-color: initial; color: #3730a3;
}
.metric-grid .stat-label {
  white-space: nowrap; margin: 0; font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: #64748b;
}
@media (max-width: 900px) { .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .metric-grid { grid-template-columns: 1fr; } }

.metric-grid .stat-note { margin: .35rem 0 0; font-size: .78rem; line-height: 1.4; color: #64748b; }
