/* ── Progress Page ── */

.progress-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Hero */
.progress-hero {
  text-align: center;
  padding: 80px 0 48px;
}

.progress-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--pastel-peach), var(--pastel-yellow));
  color: var(--text);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.progress-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.progress-hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Giant Progress Bar */
.progress-giant {
  padding: 0 0 64px;
}

.giant-bar-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.giant-bar-label-left,
.giant-bar-label-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90px;
  flex-shrink: 0;
}

.giant-pct {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
  width: 90px;
  text-align: center;
}

.giant-target {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1;
}

.giant-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.giant-bar-track {
  flex: 1;
  max-width: 700px;
  height: 48px;
  background: #f0ecf7;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(30, 27, 46, 0.06);
  display: flex;
}

.giant-bar-segment.fully {
  background: #86efac;
  height: 100%;
  width: 0%;
  transition: width 0.05s linear;
}

.giant-bar-segment.partial {
  background: #fde68a;
  height: 100%;
  width: 0%;
  transition: width 0.05s linear;
}

.giant-bar-segment.stub {
  background: #fda4af;
  height: 100%;
  width: 0%;
  transition: width 0.05s linear;
}

.giant-bar-legend {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

.legend-dot.fully { background: #86efac; }
.legend-dot.partial { background: #fde68a; }
.legend-dot.stub { background: #fda4af; }
.legend-dot.missing { background: #e8e4f0; }

/* Stats */
.progress-stats {
  padding: 0 0 64px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.25s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card.total {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #f5f3ff, #fdf2f8);
  border-color: var(--pastel-lavender);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.stat-number.fully { color: #16a34a; }
.stat-number.partial { color: #d97706; }
.stat-number.stub { color: #e11d48; }
.stat-number.missing { color: var(--text-light); }

.stat-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

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

/* Breakdown Sections */
.progress-breakdown {
  padding: 0 0 64px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.breakdown-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.breakdown-header.fully {
  background: rgba(134, 239, 172, 0.1);
  border: 1px solid rgba(134, 239, 172, 0.25);
}

.breakdown-header.partial {
  background: rgba(253, 230, 138, 0.12);
  border: 1px solid rgba(253, 230, 138, 0.3);
}

.breakdown-header.stub {
  background: rgba(253, 164, 175, 0.1);
  border: 1px solid rgba(253, 164, 175, 0.25);
}

.breakdown-header.missing {
  background: rgba(148, 144, 163, 0.08);
  border: 1px solid rgba(148, 144, 163, 0.2);
}

.breakdown-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.breakdown-header.fully .breakdown-icon {
  background: #dcfce7;
  color: #16a34a;
}

.breakdown-header.partial .breakdown-icon {
  background: #fef3c7;
  color: #d97706;
}

.breakdown-header.stub .breakdown-icon {
  background: #ffe4e6;
  color: #e11d48;
}

.breakdown-header.missing .breakdown-icon {
  background: #f0ecf7;
  color: var(--text-muted);
}

.breakdown-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.breakdown-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Module Cards (fully / stub) */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.module-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.module-card.fully {
  border-left: 3px solid #86efac;
}

.module-card.stub {
  border-left: 3px solid #fda4af;
}

.module-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.module-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Module Detail Cards (partial) */
.module-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.module-detail-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  border-left: 3px solid #fde68a;
  transition: all 0.2s;
}

.module-detail-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.module-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.module-detail-header .module-name {
  font-size: 1.05rem;
}

.module-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: #d97706;
  background: rgba(253, 230, 138, 0.15);
  padding: 3px 10px;
  border-radius: 20px;
}

.module-works,
.module-missing {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 4px;
}

.works-label,
.missing-label {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}

.works-label { color: #16a34a; }
.missing-label { color: #e11d48; }

/* Missing Modules Tags */
.missing-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.missing-tag {
  display: inline-block;
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  background: rgba(148, 144, 163, 0.06);
  border: 1px solid rgba(148, 144, 163, 0.15);
  border-radius: 8px;
  transition: all 0.2s;
}

.missing-tag:hover {
  background: rgba(148, 144, 163, 0.1);
  border-color: rgba(148, 144, 163, 0.25);
  color: var(--text-muted);
}

/* Known Gaps */
.known-gaps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gap-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.5;
}

.gap-module {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.gap-detail {
  color: var(--text-muted);
}

/* CTA */
.progress-cta {
  padding: 0 0 80px;
}

.progress-cta-box {
  text-align: center;
  background: linear-gradient(135deg, #f5f3ff, #fdf2f8, #eff6ff);
  border: 1.5px solid var(--pastel-lavender);
  border-radius: var(--radius);
  padding: 56px 40px;
}

.progress-cta-box h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.progress-cta-box p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
  line-height: 1.7;
}

.progress-cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .progress-page {
    padding: 0 16px;
  }

  .progress-hero {
    padding: 60px 0 32px;
  }

  .giant-bar-container {
    flex-direction: column;
    gap: 12px;
  }

  .giant-bar-label-left,
  .giant-bar-label-right {
    flex-direction: row;
    gap: 8px;
  }

  .giant-bar-track {
    width: 100%;
    height: 36px;
  }

  .giant-pct {
    font-size: 2.2rem;
  }

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

  .stat-card.total {
    grid-column: 1 / -1;
  }

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

  .progress-cta-box {
    padding: 40px 24px;
  }

  .breakdown-header {
    flex-direction: column;
    gap: 12px;
  }

  .module-detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card.total {
    grid-column: 1;
  }

  .giant-bar-legend {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .missing-tag {
    font-size: 0.75rem;
    padding: 5px 10px;
  }
}
