:root {
  --bg: #070b14;
  --bg-elevated: rgba(15, 23, 42, 0.72);
  --bg-card: rgba(17, 25, 44, 0.84);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(56, 189, 248, 0.34);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --primary: #38bdf8;
  --primary-strong: #0ea5e9;
  --accent: #3b82f6;
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.14);
  --emerald: #34d399;
  --emerald-bg: rgba(16, 185, 129, 0.14);
  --shadow-lg: 0 24px 64px -16px rgba(2, 6, 23, 0.75);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Ambient Background */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 0.9) 15%, transparent 78%);
}

.bg-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.45;
}

.bg-glow--primary {
  width: 520px;
  height: 520px;
  top: -160px;
  left: -100px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.48), transparent 70%);
}

.bg-glow--accent {
  width: 480px;
  height: 480px;
  bottom: -140px;
  right: -80px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
}

/* Layout Shell */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 28px 24px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand__mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  flex-shrink: 0;
}

.brand__mark svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 20px rgba(14, 165, 233, 0.25));
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__text strong {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand__text small {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--amber-bg);
  border: 1px solid rgba(245, 158, 11, 0.32);
  color: #fcd34d;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: pulse-amber 2s infinite;
}

/* Hero Card */
.hero-card {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 28px;
  padding: 36px;
  border-radius: var(--radius-xl);
  background: linear-gradient(165deg, rgba(20, 30, 52, 0.88), rgba(11, 18, 34, 0.92));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  align-items: stretch;
}

.hero-card__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.eyebrow__tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #7dd3fc;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.eyebrow__sep {
  opacity: 0.45;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #ffffff 10%, #bae6fd 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0 0 28px;
  color: var(--text-soft);
  font-size: 1rem;
  max-width: 54ch;
}

/* Actions */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary-strong), var(--accent));
  color: #ffffff;
  box-shadow: 0 10px 26px -8px rgba(14, 165, 233, 0.6);
}

.btn--primary:hover {
  box-shadow: 0 14px 32px -8px rgba(56, 189, 248, 0.72);
  transform: translateY(-1px);
}

.btn--ghost {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--border);
  color: var(--text-soft);
}

.btn--ghost:hover {
  border-color: var(--border-strong);
  color: #ffffff;
  background: rgba(30, 41, 59, 0.8);
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.is-spinning {
  animation: spin 0.8s linear infinite;
}

.live-feedback {
  margin: 14px 0 0;
  min-height: 22px;
  font-size: 0.85rem;
  color: #7dd3fc;
}

/* Progress Panel */
.progress-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(10, 16, 30, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-panel__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.panel-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.panel-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.progress-percent {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-strong), #60a5fa, var(--emerald));
  background-size: 200% 100%;
  animation: shimmer 3s ease infinite;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.timeline__badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.timeline__item.is-done .timeline__badge {
  background: var(--emerald-bg);
  color: var(--emerald);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.timeline__item.is-active .timeline__badge {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.timeline__item.is-pending .timeline__badge {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-sky 1.6s infinite;
}

.timeline__body {
  flex: 1;
  min-width: 0;
}

.timeline__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline__row strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.timeline__item.is-pending .timeline__row strong {
  color: var(--text-soft);
}

.timeline__body p {
  margin: 3px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.tag--done {
  background: var(--emerald-bg);
  color: var(--emerald);
}

.tag--active {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

.tag--pending {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

/* Highlights Grid */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.feature-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.feature-card__meta::after {
  content: "";
  width: 24px;
  height: 1px;
  background: rgba(56, 189, 248, 0.45);
}

.feature-card h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Footer */
.footer {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer strong {
  color: var(--text-soft);
}

.health-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.8rem;
}

.health-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}

/* Animations */
@keyframes pulse-amber {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.65);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

@keyframes pulse-sky {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.6;
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
    padding: 26px;
  }

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

@media (max-width: 520px) {
  .shell {
    padding: 20px 16px 28px;
  }

  .hero-card {
    padding: 20px;
    border-radius: 20px;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-pill__dot,
  .spinner-dot,
  .progress-fill,
  .is-spinning {
    animation: none;
  }

  .btn,
  .feature-card {
    transition: none;
  }
}
