/* ═══════════════════════════════════════════════════════════════════════════
   Artemis II Mission Tracker — Stylesheet
   Dark theme · Space control room aesthetic · Accessible · Mobile-first
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & base ──────────────────────────────────────────────────────── */

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

:root {
  /* Modern Space-Age Sci-Fi Palette — Deep space, neon accents, and glassmorphism */
  --bg:           #05070a; /* Deep space black */
  --bg-surface:   #0d1117; /* Dark matter grey */
  --bg-card:      rgba(22, 27, 34, 0.4); /* Translucent glass base */
  --bg-card-glass: rgba(13, 17, 23, 0.7);
  --bg-highlight: rgba(48, 54, 61, 0.5);

  --text:         #c9d1d9; /* Soft silver */
  --text-muted:   #8b949e;
  --text-bright:  #f0f6fc; /* Stellar white */

  --accent:       #00f2ff; /* Electric Cyan (HUD style) */
  --accent-blue:  #58a6ff; /* Star blue */
  --accent-purple: #bc8cff; /* Nebula purple */
  --accent-glow:  rgba(0, 242, 255, 0.3);
  
  --success:      #39ff14; /* Neon Green */
  --success-glow: rgba(57, 255, 20, 0.2);
  --warning:      #ffe100; /* Solar Yellow */
  --danger:       #ff3131; /* Pulsar Red */

  --border:       rgba(48, 54, 61, 0.8);
  --border-glow:  rgba(0, 242, 255, 0.2);
  --focus-ring:   #00f2ff;

  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  --font-display: 'Orbitron', sans-serif; /* For headers */

  --max-width:    1440px;
  --gap:          2rem;
  --card-radius:  12px; /* Sleek, rounded modern corners */
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:    0 8px 32px rgba(0,0,0,0.6);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.8);
  
  --glass-filter: blur(12px) saturate(180%);
  --site-header-height: 3rem;
  --mission-status-height: 2.15rem;
  --sticky-stack-height: calc(var(--site-header-height) + var(--mission-status-height));
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

[id] {
  scroll-margin-top: calc(var(--site-header-height) + 0.75rem);
}

.mission-status-bar ~ main[id],
.mission-status-bar ~ main [id] {
  scroll-margin-top: calc(var(--sticky-stack-height) + 0.75rem);
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(0, 242, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 0% 0%, rgba(188, 140, 255, 0.05) 0%, transparent 30%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Modern Background Effects ─────────────────────────────────────────── */

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3%3Ffilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: 10000;
}

/* Starfield Parallax Simulation */
.star-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  perspective: 600px;
  z-index: -1;
  pointer-events: none;
}

.star-field::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
    radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 160px 120px, #ddd, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: starMove 120s linear infinite;
  opacity: 0.3;
}

@keyframes starMove {
  from { transform: translateY(0); }
  to { transform: translateY(-100px); }
}

/* ── HUD Scanline Effect ──────────────────────────────────────────────── */

.scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 242, 255, 0.05);
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
  z-index: 9999;
  pointer-events: none;
  animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
  from { transform: translateY(-100%); }
  to { transform: translateY(100vh); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 450ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* ── Focus ─────────────────────────────────────────────────────────────── */

:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Skip nav ──────────────────────────────────────────────────────────── */

.skip-nav {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--accent);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 6px 0;
}

.skip-nav:focus {
  left: 0;
}

/* ── Layout ────────────────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 50rem;
  margin-bottom: 1.5rem;
}

/* ── Typography ────────────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  color: var(--text-bright);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2rem;
  font-weight: 800;
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

h3 { font-size: 1.15rem; }

a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  height: 2rem;
  transition: color 0.2s ease;
}

a:hover, a:focus-visible {
  color: var(--text-bright);
}

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card-glass);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  box-shadow: var(--shadow-md);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-bright);
  text-decoration: none;
  letter-spacing: 0.08em;
  line-height: 1.05;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.site-title:hover {
  text-shadow: 0 0 15px var(--accent-glow);
}

.site-title span {
  color: var(--accent);
}

.site-title::before {
  content: '';
  width: 18px;
  height: 18px;
  background: var(--accent);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  filter: drop-shadow(0 0 8px var(--accent));
  animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
  from { opacity: 0.6; filter: drop-shadow(0 0 4px var(--accent)); }
  to { opacity: 1; filter: drop-shadow(0 0 12px var(--accent)); }
}

/* ── Data status indicator ─────────────────────────────────────────────── */

.data-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
  font-family: var(--font-mono);
  background: rgba(0,0,0,0.3);
  color: var(--text-muted);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.data-status--live {
  color: var(--success);
  border-color: var(--success-glow);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.1);
}

.data-status--live::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: neon-blink 1.5s infinite ease-in-out;
}

@keyframes neon-blink {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

.data-status--mock {
  color: var(--warning);
  border-color: var(--warning);
}

.data-status--prelaunch {
  color: var(--text-muted);
  border-color: var(--border);
}

/* ── Mission Status Bar (Secondary Nav) ────────────────────────── */

.mission-status-bar {
  position: sticky;
  top: var(--site-header-height);
  z-index: 90;
  background: var(--bg-card-glass);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border-bottom: 1px solid var(--border);
  min-height: var(--mission-status-height);
  padding: 0.2rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.mission-status-bar::-webkit-scrollbar {
  display: none;
}

.status-bar-container {
  display: flex;
  align-items: stretch;
  min-width: 100%;
  width: max-content;
}

.status-widget {
  display: flex;
  flex-direction:row;
  flex: 0 0 auto;
  gap: 0.1rem;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  border-right: 1px solid var(--border);
  position: relative;
}

.status-widget:last-child {
  border-right: none;
}

.status-label {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.05;
  font-family: var(--font-display);
}

.status-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.15;
  transition: all 0.3s ease;
}

.status-value--live {
  color: var(--success);
  text-shadow: 0 0 10px var(--success-glow);
}

.status-value--phase { color: var(--accent); }
.status-value--day { color: var(--accent-purple); }
.status-value--dsn { color: var(--accent-blue); }
.status-value--go { color: var(--success); }
.status-value--countdown { color: var(--warning); }

.status-widget::after {
  content: '';
  position: absolute;
  bottom: -0.15rem;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.status-widget:hover::after {
  width: 100%;
}

.status-widget:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ── Navigation ────────────────────────────────────────────────────────── */

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.site-nav a {
  display: flex;
  align-items: center;
  padding: 0.22rem 0.65rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.15;
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
  background: rgba(0, 242, 255, 0.05);
}

.site-nav a:hover::after {
  width: 70%;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: rgba(0, 242, 255, 0.1);
}

.site-nav a[aria-current="page"]::after {
  width: 70%;
}

/* ── Hamburger toggle ─────────────────────────────────────────────────── */

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.nav-toggle:hover {
  background: var(--bg-card);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  /* overflow: hidden; */
  min-height: 60vh;
  display: flex;
  align-items: center;
  background: var(--bg);
}

.hero__bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit:cover;
  object-position: center 30%;
  z-index: 0;
  filter: saturate(0.5) brightness(1) contrast(2);
  opacity: 0.5;
  transition: transform 10s ease-out;
}

.hero:hover .hero__bg-img {
  transform: scale(1.1);
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at center, transparent 50%, var(--bg) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
}

.hero__phase {
  display: inline-block;
  background: rgba(0, 242, 255, 0.1);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  padding: 0.75rem 2rem;
  border: 1px solid var(--accent-glow);
  border-radius: 30px;
  margin-bottom: 2rem;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 20px var(--accent-glow);
  animation: float 3s infinite ease-in-out;

}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero__status {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
}

.hero__met {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 900;
  color: var(--text-bright);
  letter-spacing: -0.05em;
  line-height: 0.9;
  margin-bottom: 2rem;
  text-shadow: 0 0 30px rgba(0, 242, 255, 0.4);
}

.hero__met-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  opacity: 0.8;
}

/* ── Dashboard Grid ────────────────────────────────────────────────────── */

.dash-card {
  background: var(--bg-card-glass);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
}

.dash-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
  background: rgba(22, 27, 34, 0.6);
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.dash-card__label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
  display: block;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.dash-primary {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.dash-secondary {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-purple);
  margin-top: 1rem;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.dash-card--primary {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(0, 242, 255, 0.05), rgba(188, 140, 255, 0.05));
}

.dash-card--primary .dash-primary {
  font-size: 2.5rem;
  color: var(--text-bright);
  text-shadow: 0 0 20px var(--accent-glow);
}

/* ── Milestones section (NEW) ─────────────────────────────────────────── */

.milestones-track {
  padding: 3rem 0;
  background: radial-gradient(circle at 50% -20%, var(--bg-highlight), transparent 70%);
  border-bottom: 1px solid var(--border);
}

.milestones-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.milestones-title {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.milestones-progress-badge {
  background: var(--bg-highlight);
  border: 1px solid var(--border-light);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--accent-light);
}

.milestones-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
}

/* Vertical Timeline Fallback for single column / mobile */
@media (max-width: 768px) {
  .milestones-list {
    grid-template-columns: 1fr;
    border-left: 2px solid var(--border);
    margin-left: 1rem;
    padding-left: 2rem;
    gap: 2rem;
  }
}

.milestone-card {
  position: relative;
  padding: 1.25rem;
  background: var(--bg-card-glass);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.milestone-card:hover {
  border-color: var(--border-light);
}

.milestone-card--completed {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.05);
}

.milestone-card--active {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-4px);
}

.milestone-card__status {
  position: absolute;
  top: -10px;
  right: 1.25rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.status-completed { background: var(--success); color: #fff; }
.status-next { background: var(--accent); color: #fff; animation: pulse-status 2s infinite; }
.status-upcoming { background: var(--border-light); color: var(--text-muted); }

.milestone-card__title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-bright);
}

.milestone-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.milestone-card__met {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-light);
  background: rgba(59, 130, 246, 0.1);
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
}

@keyframes pulse-status {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.milestones-loader {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem;
  color: var(--text-muted);
  font-style: italic;
}

.glass-panel {
  background: var(--bg-card-glass);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 20px var(--border-glow);
}

/* ── Mission Ops Dashboard (NEW) ────────────────────────────────────── */

.ops-dashboard {
  padding: 4rem 0;
  background: transparent;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.ops-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.ops-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 242, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.ops-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.ops-icon { 
  font-size: 1.5rem;
  filter: drop-shadow(0 0 5px var(--accent));
}

.ops-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-bright);
}

.ops-main-item {
  margin-bottom: 2rem;
}

.ops-activity-type {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.2em;
}

.ops-activity-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.2;
}

.ops-activity-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.ops-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.ops-metric {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ops-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.ops-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
}

/* Progress Tracks */
.ops-progress-container {
  margin-top: auto;
}

.ops-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-display);
}

.ops-progress-label {
  color: var(--accent);
  font-family: var(--font-mono);
}

.ops-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.ops-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent));
  box-shadow: 0 0 10px var(--accent-glow);
  border-radius: 10px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Next Milestone / Countdown */
.ops-countdown-value {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--warning);
  text-shadow: 0 0 20px rgba(255, 225, 0, 0.3);
  text-align: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  letter-spacing: -0.05em;
}

@media (max-width: 500px) {
  .ops-countdown-value { font-size: 2rem; }
}

.ops-next-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.ops-next-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.ops-next-met {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────────────────────────────── */

.hero__crew-activity {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.hero__crew-now {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
}

.hero__crew-next {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.hero__crew-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
}

.hero__crew-link:hover,
.hero__crew-link:focus-visible {
  color: var(--text-bright);
  text-decoration: underline;
}

/* ── Dashboard ─────────────────────────────────────────────────────────── */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}

.dash-card {
  background: var(--bg-card-glass);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.dash-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.3;
}

/* ── Primary metrics grid (Speed, Distance, Altitude) ─────────────── */

.dashboard-grid--primary {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  margin-bottom: 3rem;
}

.dash-card--primary {
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, rgba(0, 242, 255, 0.03), rgba(188, 140, 255, 0.03));
}

.dash-card--primary .dash-primary {
  font-size: 2.2rem;
  color: var(--text-bright);
  text-shadow: 0 0 20px var(--accent-glow);
}

.dash-card--primary .dash-card__label {
  font-size: 0.8rem;
  color: var(--accent);
}

.dash-card__label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: block;
}

/* ── Collapsible metric explanations ─────────────────────────────────── */

.dash-explain {
  display: inline;
}

.dash-explain__toggle {
  cursor: pointer;
  list-style: none;            /* hide default marker */
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.25rem;
}

/* Remove default marker in WebKit/Blink */
.dash-explain__toggle::-webkit-details-marker {
  display: none;
}

/* Custom disclosure triangle */
.dash-explain__toggle::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4.5px solid var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.dash-explain[open] > .dash-explain__toggle::after {
  transform: rotate(180deg);
}

/* Focus ring for keyboard navigation */
.dash-explain__toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Explanation text */
.dash-explain__text {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.55;
  color: var(--text);
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: #000;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  text-align: left;
}

/* Visible extent inside Earth View collapsible */
.dash-extent {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: #000;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-blue);
  border-radius: 2px;
  text-align: left;
}

/* Reset default dd margin for dashboard */
.dash-card dd {
  margin: 0;
}

.dash-primary {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-bright);
  display: block;
  line-height: 1.3;
  text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.dash-secondary {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-light);
  display: block;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-tertiary {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Space-weather status variants on dash-cards ─────────────────────── */

.dash-card--nominal { border-top: 3px solid var(--success) !important; }
.dash-card--elevated { border-top: 3px solid var(--warning) !important; }
.dash-card--severe  { border-top: 3px solid var(--danger) !important; }

.dash-primary .comms-dot {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
  box-shadow: 0 0 10px currentColor;
}

.dash-card__events {
  margin-top: 1rem;
  text-align: left;
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
}

.dash-card__events:empty {
  display: none;
}

.sw-detail-collapse {
  margin-top: 0.5rem;
}

.sw-detail-toggle {
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sw-detail-toggle::-webkit-details-marker {
  display: none;
}

.sw-detail-toggle::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  transition: transform 0.2s ease;
}

.sw-detail-collapse[open] > .sw-detail-toggle::after {
  transform: rotate(180deg);
}

/* ── Timeline: Tab bar ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 30px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px var(--accent-glow);
  background: var(--text-bright);
  border-color: var(--text-bright);
}

.btn--secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
}

.btn--secondary:hover {
  background: rgba(0, 242, 255, 0.1);
  color: var(--text-bright);
  border-color: var(--accent);
}

#timeline-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.timeline-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 8px;
}

.timeline-tab:hover {
  color: var(--text-bright);
  border-color: var(--accent-blue);
  background: rgba(88, 166, 255, 0.1);
}

.timeline-tab--active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.timeline-tab--current-phase {
  color: var(--accent-light);
}

.timeline-tab--current-phase.timeline-tab--active {
  color: var(--text-bright);
}

.timeline-tab--past-phase {
  opacity: 0.85;
}

/* ── Timeline: Tab panels ─────────────────────────────────────────────── */

.timeline-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
  padding: 0.75rem 0;
  animation: timeline-slide-down 0.2s ease;
}

@keyframes timeline-slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Timeline: Steps (collapsible) ────────────────────────────────────── */

.timeline-step {
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.timeline-step:last-child {
  border-bottom: none;
}

.timeline-step__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1.25rem;
  min-height: 48px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
  gap: 0.75rem;
}

.timeline-step__toggle:hover,
.timeline-step__toggle:focus-visible {
  background: rgba(26, 45, 77, 0.5);
}

.timeline-step__toggle::after {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.timeline-step__toggle[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.timeline-step__name {
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
}

.timeline-step__time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 0.1rem;
}

.timeline-step__time-date {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-step__time-countdown {
  font-size: 0.72rem;
  font-family: var(--font-sans);
  color: var(--accent-light);
  white-space: nowrap;
}

/* ── Step states ──────────────────────────────────────────────────────── */

.timeline-step--current {
  border-left-color: var(--accent);
  background: var(--bg-highlight);
  box-shadow: inset 4px 0 0 var(--accent);
}

.timeline-step--current .timeline-step__name {
  color: #fff;
  font-weight: 800;
}

.timeline-step--current .timeline-step__time {
  color: var(--accent-light);
}

.timeline-step--past .timeline-step__name {
  color: var(--text-muted);
}

.timeline-step--past .timeline-step__time {
  color: var(--text-muted);
}

.timeline-step--future .timeline-step__name {
  color: var(--text-muted);
}

.timeline-step--future .timeline-step__time {
  color: var(--text-muted);
}

/* ── Step expanded content ────────────────────────────────────────────── */

.timeline-step__content {
  padding: 0 1.25rem 1rem 1.25rem;
  animation: timeline-slide-down 0.2s ease;
}

.timeline-step--current .timeline-step__content {
  padding-left: calc(1.25rem - 3px);
}

.timeline-step__desc {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

.timeline-step__countdown {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--accent-light);
  margin-bottom: 0.75rem;
}

.timeline-step__detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.timeline-step__detail p {
  margin: 0 0 0.5rem;
}

.timeline-step__subheading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.75rem 0 0.35rem;
}

.timeline-step__facts {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 0.5rem;
}

.timeline-step__facts li {
  margin-bottom: 0.25rem;
}

.timeline-step__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-step__links a {
  font-size: 0.8rem;
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0;
}

.timeline-step__links a:hover,
.timeline-step__links a:focus-visible {
  color: var(--text-bright);
}

/* ── Planned (untimed) activities ─────────────────────────────────────── */

.timeline-planned-activities {
  border-top: 2px dashed var(--border-light);
  margin-top: 0.25rem;
  padding-top: 0.5rem;
}

.timeline-planned-activities__heading {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1.25rem 0.25rem;
}

.timeline-step--untimed {
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--border);
  opacity: 0.85;
}

.timeline-step--untimed:last-child {
  border-bottom: none;
}

.timeline-step--untimed .timeline-step__toggle {
  padding: 0.6rem 1.25rem;
  min-height: 44px;
}

.timeline-step--untimed .timeline-step__name {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timeline-step__day-label {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.8;
}

.timeline-step--untimed .timeline-step__toggle:hover .timeline-step__name,
.timeline-step--untimed .timeline-step__toggle:focus-visible .timeline-step__name {
  color: var(--text);
}

/* ── Crew cards ────────────────────────────────────────────────────────── */

.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 2.5rem;
  list-style: none;
}

.crew-card {
  background: var(--bg-card-glass);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 2.5rem 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.crew-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-purple);
  box-shadow: 0 0 30px rgba(188, 140, 255, 0.2);
}

.crew-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-purple));
}

.crew-card__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.crew-card__role {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.crew-card__bio {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Spacecraft specs ──────────────────────────────────────────────────── */

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 2.5rem;
}

.spec-card {
  background: var(--bg-card-glass);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 2.5rem 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.spec-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-blue);
  box-shadow: 0 0 30px rgba(88, 166, 255, 0.2);
}

.spec-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--text-bright);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.spec-card__desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.spec-card__list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 2rem;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.spec-card__list dt {
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.spec-card__list dd {
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ── News ──────────────────────────────────────────────────────────────── */

.news-list {
  display: grid;
  gap: 2rem;
}

.news-item {
  background: var(--bg-card-glass);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 2.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.news-item:hover {
  transform: scale(1.01);
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
}

.news-item:hover {
  background: var(--bg-highlight);
  border-color: var(--border-light);
}

.news-item__title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.news-item__title a {
  color: #fff;
  text-decoration: none;
}

.news-item__title a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

.news-item__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--accent-light);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

.news-item__source {
  color: #fff;
  background: var(--accent-blue);
  padding: 2px 6px;
  border-radius: 2px;
}

.news-item__summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.news-error {
  color: var(--danger);
  padding: 1rem;
  text-align: center;
  font-size: 0.95rem;
}

.btn--retry-news {
  margin-left: 0.5rem;
  padding: 0.3rem 0.8rem;
  background: var(--bg-highlight);
  color: var(--text);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn--retry-news:hover,
.btn--retry-news:focus-visible {
  background: var(--accent);
  color: var(--text-bright);
}

/* ── Live stream ───────────────────────────────────────────────────────── */

.livestream-placeholder {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 3rem 2rem;
  text-align: center;
}

.livestream-placeholder p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  min-height: 48px;
  font-size: 0.8rem;
  font-weight: 900;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  box-shadow: 0 4px 0 #b91c1c, 0 8px 15px rgba(0,0,0,0.4); /* 3D button effect */
}

.btn:hover, .btn:focus-visible {
  background: var(--accent-light);
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b91c1c, 0 4px 10px rgba(0,0,0,0.4);
}

.btn--secondary {
  background: var(--accent-blue);
  box-shadow: 0 4px 0 #072d6b, 0 8px 15px rgba(0,0,0,0.4);
}

.btn--secondary:hover, .btn--secondary:focus-visible {
  background: #1e40af;
  box-shadow: 0 2px 0 #072d6b, 0 4px 10px rgba(0,0,0,0.4);
}

/* ── About ─────────────────────────────────────────────────────────────── */

.about-text {
  max-width: 50rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.about-text p + p {
  margin-top: 1rem;
}

/* ── Sources page ──────────────────────────────────────────────────────── */

.sources-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  margin-top: 2rem;
}

@media (min-width: 700px) {
  .sources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.source-card {
  background: var(--bg-card-glass);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.source-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.source-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.source-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.source-card__meta > div {
  display: flex;
  gap: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

.source-card__meta dt {
  color: var(--text-muted);
  font-weight: 600;
  min-width: 7rem;
  flex-shrink: 0;
}

.source-card__meta dd {
  color: var(--text);
}

.source-card__meta code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--bg-highlight);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  word-break: break-all;
}

.source-card__credit {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.sources-fallback-list {
  list-style: none;
  padding: 0;
  margin-top: 0.75rem;
}

.sources-fallback-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.sources-fallback-list li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer {
  padding: 4rem 0 3rem;
  margin-top: 4rem;
  background: #000;
  border-top: 2px solid var(--accent-blue);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.footer-logo {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
}

.footer-mission {
  color: #fff;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-tagline {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.footer-copy {
  line-height: 1.6;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-status-panel {
  background: #111;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.footer-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.footer-status-label {
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.footer-status-value {
  font-family: var(--font-mono);
  color: var(--success); /* LED Green for status values */
  font-weight: 700;
  text-shadow: 0 0 5px var(--success-glow);
}

.footer-status-value.status--online {
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Mobile Footer ─────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-nav {
    align-items: center;
  }

  .footer-status-panel {
    max-width: 320px;
    margin: 0 auto;
  }
}

/* ── Visually hidden (screen reader only) ──────────────────────────────── */

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

/* ── Crew Activity wide card ─────────────────────────────────────────── */

.dash-card--wide {
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--card-radius);
  padding: 1.25rem;
}

/* ── Crew Activity card link ─────────────────────────────────────────── */

.dash-card__link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.dash-card__link:hover,
.dash-card__link:focus-visible {
  color: var(--text-bright);
  text-decoration: underline;
}

/* ── Crew Schedule page ─────────────────────────────────────────────── */

.schedule-day {
  margin-bottom: 2rem;
}
.schedule-day__heading {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.schedule-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.schedule-item {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0 1rem;
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--card-radius);
  padding: 0.75rem 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.schedule-item--current {
  border-left-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}
.schedule-item--past {
  opacity: 0.5;
}
.schedule-item__time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.1rem;
}
.schedule-item--current .schedule-item__time {
  color: var(--accent-light);
}
.schedule-item__body {
  min-width: 0;
}
.schedule-item__label {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 0.9rem;
  line-height: 1.4;
}
.schedule-item--current .schedule-item__label::before {
  content: '\25B6\00a0';
  color: var(--accent);
  font-size: 0.7rem;
}
.schedule-item__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .schedule-item {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ── Comms Status ────────────────────────────────────────────────────── */

.comms-status-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.comms-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.comms-dot--green {
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
}

.comms-dot--yellow {
  background: var(--warning);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.comms-dot--red {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
  animation: pulse-dot 1.5s infinite;
}

.comms-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0;
}

.comms-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
}

@media (forced-colors: active) {
  .comms-status-card {
    border: 2px solid CanvasText;
  }
  .comms-dot {
    border: 2px solid CanvasText;
  }
}

/* ── Dashboard disclaimer ─────────────────────────────────────────── */

.dash-disclaimer {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1.25rem;
  line-height: 1.5;
}

/* ── Spacecraft Telemetry (AROW) ─────────────────────────────────────── */

.arow-section[hidden] { display: none; }

.dashboard-grid--telem {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.dash-card--telem {
  border-top-color: var(--accent);
}

.dash-card--telem .dash-primary {
  font-size: 1.1rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.telem-sub {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.6rem;
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

.telem-sub dt {
  color: var(--text-muted);
  font-weight: 500;
}

.telem-sub dd {
  font-family: var(--font-mono);
  color: var(--text-bright);
}

.arow-attribution {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1.25rem;
  line-height: 1.5;
}

.arow-attribution a {
  color: var(--accent);
}

/* ── Deep Space Network ──────────────────────────────────────────────── */

.dsn-orion {
  margin-bottom: 2rem;
}

.dsn-loading {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

.dsn-no-contact {
  color: var(--warning);
  font-weight: 600;
  font-size: 0.95rem;
}

.dsn-tracking {
  color: var(--success);
  font-weight: 600;
  font-size: 0.95rem;
}

.dsn-error {
  color: var(--danger);
  font-size: 0.9rem;
}

.dsn-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.5rem;
}

.dsn-dish-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  margin-top: 0.75rem;
}

.dsn-dish-card--orion {
  border-color: var(--success);
  border-left: 3px solid var(--success);
}

.dsn-dish-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.dsn-dish-name {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
}

.dsn-dish-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dsn-mode-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
  line-height: 1;
}

.dsn-dish-details {
  font-size: 0.85rem;
}

.dsn-dish-details p {
  margin: 0.2rem 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.dsn-compact-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 0.5rem;
}

.dsn-compact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.dsn-compact-item--orion {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.06);
}

.dsn-compact-dish {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-bright);
  flex-shrink: 0;
}

.dsn-compact-station {
  color: var(--text-muted);
  flex-shrink: 0;
}

.dsn-compact-sc {
  color: var(--accent-light);
  font-weight: 600;
  margin-left: auto;
}

.dsn-attribution {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

@media (max-width: 480px) {
  .dsn-dish-details p {
    margin: 0.15rem 0;
  }

  .dsn-compact-list {
    grid-template-columns: 1fr;
  }
}

/* ── Audio Radar ──────────────────────────────────────────────────────── */

.audio-radar-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.audio-radar-summary {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  list-style: none;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-bright);
  transition: background 0.2s ease;
}

.audio-radar-summary::-webkit-details-marker { display: none; }
.audio-radar-summary::marker { content: ''; }

.audio-radar-summary:hover {
  background: rgba(26, 45, 77, 0.5);
}

.audio-radar-summary::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  margin-left: auto;
}

.audio-radar-panel[open] > .audio-radar-summary::after {
  transform: rotate(45deg);
}

.audio-radar-controls {
  padding: 0 1.25rem 1.25rem;
  animation: timeline-slide-down 0.25s ease;
}

.audio-radar-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.audio-control-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.audio-control-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  min-width: 6rem;
  flex-shrink: 0;
}

.audio-control-row input[type="range"] {
  flex: 1;
  min-width: 100px;
  max-width: 240px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border-light);
  border-radius: 2px;
  outline: none;
}

.audio-control-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px var(--accent-glow);
}

.audio-control-row input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 6px var(--accent-glow);
}

.audio-value-label {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 3rem;
}

.btn--audio {
  font-size: 0.9rem;
  padding: 0.6rem 1.25rem;
  min-height: 44px;
}

.btn--audio[aria-pressed="true"] {
  background: var(--danger);
}

.btn--audio-sm {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  min-height: 44px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: background 0.2s ease;
}

.btn--audio-sm:hover,
.btn--audio-sm:focus-visible {
  background: var(--accent-light);
  color: var(--bg);
}

.btn--audio-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--border);
}

.audio-control-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.audio-control-fieldset legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  padding: 0 0.35rem;
}

.audio-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  min-height: 44px;
  padding: 0.4rem 0;
  margin-right: 0.75rem;
}

.audio-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.audio-status {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.audio-view-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.audio-view-fieldset legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  padding: 0 0.35rem;
}

.audio-radio-label {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
  padding: 0.4rem 0;
}

.audio-radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.audio-radio-desc {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

/* ── Audio Help Panel ─────────────────────────────────────────────────── */

.audio-help-panel {
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.audio-help-panel > summary {
  list-style: none;
  min-height: 44px;
}

.audio-help-panel > summary::-webkit-details-marker { display: none; }
.audio-help-panel > summary::marker { content: ''; }

.audio-help-content {
  padding: 1rem;
  animation: timeline-slide-down 0.2s ease;
}

.audio-help-content h3 {
  font-size: 0.9rem;
  color: var(--text-bright);
  margin: 1rem 0 0.4rem;
}

.audio-help-content h3:first-child {
  margin-top: 0;
}

.audio-help-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

.audio-help-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
}

.audio-help-content ul li {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 0.15rem 0;
}

.audio-help-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.audio-help-dl dt {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.audio-help-dl dd {
  color: var(--text-muted);
  margin: 0;
}

.btn--preview-sound {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  min-height: 44px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn--preview-sound:hover,
.btn--preview-sound:focus-visible {
  background: var(--accent-light);
  color: var(--bg);
}

/* ── Stream grid ──────────────────────────────────────────────────────── */

.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stream-card {
  background: var(--bg-card-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stream-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.stream-card h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
}

.stream-card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.stream-embed {
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.stream-embed iframe {
  display: block;
  aspect-ratio: 16/9;
  width: 100%;
  height: auto;
  border: 0;
}

.dash-card__est {
  font-size: 0.7em;
  color: var(--text-muted);
  font-weight: normal;
}

.audio-milestone-status {
  /* inherit from .audio-status */
  font-size: 0.8rem;
  font-family: var(--font-mono);
  
}

/* ── Space Weather (event cards rendered by JS) ──────────────────────── */

.sw-class-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.sw-class-tag--c {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.sw-class-tag--m {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.sw-class-tag--x {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.sw-event-list {
  display: grid;
  gap: 0.5rem;
}

.sw-event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--card-radius);
  padding: 0.85rem 1rem;
}

.sw-event-card--c {
  border-left-color: var(--success);
}

.sw-event-card--m {
  border-left-color: var(--warning);
}

.sw-event-card--x {
  border-left-color: var(--danger);
}

.sw-event-card--cme {
  border-left-color: var(--accent);
}

.sw-event-card--storm {
  border-left-color: var(--warning);
}

.sw-event-card--sep {
  border-left-color: var(--danger);
}

.sw-event-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.sw-event-class {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
}

.sw-event-time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sw-event-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.75rem;
  font-size: 0.82rem;
}

.sw-event-details dt {
  font-weight: 600;
  color: var(--text);
}

.sw-event-details dd {
  color: var(--text-muted);
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.sw-none {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}

.sw-attribution {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .sw-event-details {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .sw-event-details dt {
    margin-top: 0.4rem;
  }
}

@media (forced-colors: active) {
  .sw-event-card {
    border: 2px solid CanvasText;
  }
  .sw-class-tag {
    border: 1px solid CanvasText;
  }
}

/* ── News Item Highlights ────────────────────────────────────────────── */
.news-item--highlight {
  border-left: 3px solid var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
}

.news-item--highlight .news-item__title a {
  color: var(--accent-light);
}

.news-item__source-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

/* ── Space Weather Highlights ────────────────────────────────────────── */
.dash-card--severe .dash-explain__text {
  color: var(--danger);
}

.dash-card--elevated .dash-explain__text {
  color: var(--warning);
}

@keyframes flash-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.comms-dot--red {
  animation: flash-red 2s infinite;
}

/* ── Crew Page Highlights ────────────────────────────────────────────── */
.crew-card__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-light);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.75rem 0;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

.crew-card__status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* ── Live Schedule Header ───────────────────────────────────────────── */
.live-schedule-header {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15), rgba(var(--bg-rgb), 0.5));
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.live-schedule-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.live-schedule-title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.live-schedule-desc {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.live-schedule-meta {
  color: var(--accent-light);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  opacity: 0.8;
}

/* ── Live Systems Monitor ───────────────────────────────────────────── */
.live-monitor {
  background: rgba(var(--bg-rgb), 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.live-monitor__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.2);
  padding-bottom: 0.75rem;
}

.live-monitor__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.live-monitor__card h4 {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-monitor__stat {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-light);
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
}

.live-monitor__awaiting {
  text-align: center;
  color: var(--fg-muted);
  padding: 2rem;
  font-style: italic;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  :root {
    --site-header-height: 2.85rem;
    --mission-status-height: 2rem;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }

  .hero { padding: 3rem 0 2rem; }
  .hero__status { font-size: 1.1rem; }
  .hero__met { font-size: 2rem; }
  .dash-primary { font-size: 1.3rem; }


  /* Header layout: title + hamburger on one row */
  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.35rem 0.5rem;
  }

  .site-title {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.98rem;
  }

  .data-status {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    height: auto;
    padding: 0.2rem 0.55rem;
    font-size: 0.62rem;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-toggle {
    display: flex;
    grid-column: 3;
    grid-row: 1;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    justify-content: flex-start;
    padding: 0.625rem 0.85rem;
    min-height: 44px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
  }

  .site-nav li:last-child a {
    border-bottom: none;
  }

  .status-widget {
    padding: 0.15rem 0.8rem;
  }

  .status-label {
    font-size: 0.5rem;
  }

  .status-value {
    font-size: 0.72rem;
  }

  /* Fix #5: Card label font sizes — minimum ~12.5px for readability */
  .dash-card__label {
    font-size: 0.78rem;
  }
  .dash-card--primary .dash-card__label {
    font-size: 0.82rem;
  }

  /* Fix #6: Timeline tab scroll indicator */
  #timeline-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  #timeline-tabs::-webkit-scrollbar {
    display: none;
  }
  #timeline-tabs::after {
    content: '';
    position: sticky;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2rem;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    flex-shrink: 0;
  }

  .timeline-tab {
    font-size: 0.75rem;
    padding: 0.5rem 0.65rem;
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid,
  .dashboard-grid--primary {
    grid-template-columns: 1fr 1fr;
  }

  .dash-card--primary .dash-primary {
    font-size: 1.5rem;
  }

  .crew-grid {
    grid-template-columns: 1fr;
  }

  .livestream-placeholder {
    padding: 2rem 1rem;
  }
}

@media (max-width: 600px) {
  .dashboard-grid,
  .dashboard-grid--primary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --gap: 1rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .hero__status {
    font-size: 1rem;
  }

  .hero__met {
    font-size: 1.5rem;
  }

  .dash-primary {
    font-size: 1.15rem;
  }

  .dash-card {
    padding: 1rem;
  }

  .timeline-tab {
    font-size: 0.7rem;
    padding: 0.4rem 0.5rem;
  }

  /* Fix #7: Improve timeline step layout at narrow widths */
  .timeline-step__toggle {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
  }
  .timeline-step__time {
    align-items: flex-start;
    flex-direction: row;
    gap: 0.5rem;
  }

  .timeline-step__time-date {
    font-size: 0.72rem;
  }

  .timeline-step__time-countdown {
    font-size: 0.68rem;
    white-space: normal;
  }

  .timeline-step__content {
    padding: 0 0.75rem 0.75rem;
  }

  .audio-help-dl {
    grid-template-columns: 1fr;
  }

  .spec-card {
    padding: 1.25rem;
  }

  .spec-card__list {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .spec-card__list dt {
    margin-top: 0.5rem;
  }

  .stream-grid {
    grid-template-columns: 1fr;
  }

  /* Fix #9: Trajectory SVG label readability on mobile */
  .traj-label {
    font-size: 16px;
  }
  .traj-orion-label {
    font-size: 15px;
  }
  .trajectory-svg {
    max-height: 140px;
  }

  /* Fix #19: Viewport-aware sparkline height */
  .sparkline-svg {
    height: 24px;
  }
}

/* Fix #4 + #10: 375px breakpoint for iPhone SE / small phones + MET overflow */
@media (max-width: 375px) {
  :root {
    --gap: 0.75rem;
  }
  .hero__met {
    font-size: 1.25rem;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .hero__phase {
    font-size: 0.7rem;
    padding: 0.3rem 0.9rem;
  }
  .dash-primary {
    font-size: 1rem;
  }
  .dash-card--primary .dash-primary {
    font-size: 1.25rem;
  }
  .comms-text {
    font-size: 0.85rem;
  }
}

/* Fix #20: Safe-area-inset padding for notched phones */
@supports (padding: env(safe-area-inset-left)) {
  .container {
    padding-left: max(var(--gap), env(safe-area-inset-left));
    padding-right: max(var(--gap), env(safe-area-inset-right));
  }
  .site-footer {
    padding-bottom: max(2.5rem, calc(2.5rem + env(safe-area-inset-bottom)));
  }
}

/* ── Reduced motion ────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Sparkline mini-charts ─────────────────────────────────────────── */

.sparkline-svg {
  display: block;
  width: 100%;
  height: 30px;
  margin-top: 0.5rem;
  overflow: visible;
}

.sparkline-svg polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Moon progress bar ────────────────────────────────────────────── */

.moon-progress {
  margin-top: 0.6rem;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.moon-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1s ease;
}

/* ── Trajectory SVG visualization ─────────────────────────────────── */

.trajectory-viz {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  padding: 0 var(--gap);
}

.trajectory-svg {
  width: 100%;
  height: auto;
  max-height: 200px;
}

.traj-earth {
  fill: var(--accent);
  opacity: 0.7;
}

.traj-moon {
  fill: var(--text-muted);
  opacity: 0.8;
}

.traj-path {
  stroke: var(--border-light);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  opacity: 0.5;
}

.traj-orion {
  fill: var(--accent-light);
}

.traj-label {
  fill: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
}

.traj-orion-label {
  fill: var(--accent-light);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .moon-progress__fill {
    transition: none;
  }
}

/* ── High contrast mode support ────────────────────────────────────────── */

@media (forced-colors: active) {
  .data-status::before {
    background: CanvasText;
  }
  .data-status--live::before {
    background: Highlight;
  }
  .dash-card,
  .crew-card,
  .spec-card,
  .news-item,
  .livestream-placeholder,
  .dsn-dish-card,
  .dsn-compact-item,
  .stream-card,
  .stream-describe-inline,
  .schedule-item {
    border: 2px solid CanvasText;
  }
  .schedule-item--current {
    border-left: 3px solid Highlight;
  }
  .timeline-tab--active {
    border-bottom: 3px solid Highlight;
  }
  .timeline-panel {
    border: 2px solid CanvasText;
  }
  .timeline-step--current {
    border-left: 3px solid Highlight;
  }
  .btn {
    border: 2px solid ButtonText;
  }
  .skip-nav:focus {
    outline: 3px solid Highlight;
  }
  .hero__phase {
    border: 2px solid CanvasText;
  }
  .nav-toggle {
    border: 2px solid ButtonText;
  }
  .timeline-step {
    border-bottom: 1px solid CanvasText;
  }
  .data-status {
    border: 2px solid CanvasText;
  }
  :focus-visible {
    outline: 3px solid Highlight;
  }
}

/* Fix #15: Back-to-top floating button for mobile */
.back-to-top {
  display: none;
}

@media (max-width: 768px) {
  .back-to-top {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    text-decoration: none;
  }
  .back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Fix #17: Space weather compact collapse on mobile */
@media (max-width: 768px) {
  .sw-mobile-collapse {
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    margin-bottom: 1rem;
  }
  .sw-mobile-collapse > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-light);
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  .sw-mobile-collapse > summary::-webkit-details-marker {
    display: none;
  }
  .sw-mobile-collapse > summary::after {
    content: '';
    width: 0.4rem;
    height: 0.4rem;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    margin-left: auto;
  }
  .sw-mobile-collapse[open] > summary::after {
    transform: rotate(45deg);
  }
  .sw-cards-collapsible {
    display: none;
  }
  .sw-mobile-collapse[open] .sw-cards-collapsible {
    display: grid;
  }
}

/* ── Story / Blog post page ───────────────────────────────────────────── */

img.story-hero {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  display: block;
  margin: 0 auto 2rem;
  border-radius: 8px;
}

.story-credit {
  font-size: 0.85rem;
  opacity: 0.5;
  text-align: right;
  margin-top: 0.25rem;
  margin-bottom: 2rem;
}

.story-text {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.story-text h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-bright);
}

.story-text h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-bright);
}

.story-text p {
  margin-bottom: 1.25rem;
}

.story-text em {
  font-style: italic;
}

.story-text .story-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 2.5rem 0;
}

.story-text .story-footer {
  font-size: 1rem;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .story-text {
    font-size: 1rem;
  }
  .story-text h1 {
    font-size: 1.5rem;
  }
  .story-text h2 {
    font-size: 1.2rem;
  }
}
