
    /* ---- Page layout ---- */
    body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #F8FAFC; color: #0F172A; }

    /* ---- Hero ---- */
    .challenge-hero {
      background: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%);
      color: white;
      padding: 3.5rem 1.5rem 3rem;
      text-align: center;
    }
    .challenge-hero .breadcrumb {
      font-size: 0.8rem;
      color: #93C5FD;
      margin-bottom: 1rem;
    }
    .challenge-hero .breadcrumb a { color: #93C5FD; text-decoration: none; }
    .challenge-hero .breadcrumb a:hover { text-decoration: underline; }
    .challenge-hero h1 {
      font-size: clamp(1.5rem, 4vw, 2.25rem);
      font-weight: 800;
      line-height: 1.3;
      margin-bottom: 0.75rem;
    }
    .challenge-hero p {
      font-size: 1rem;
      color: #BFDBFE;
      max-width: 560px;
      margin: 0 auto 1.5rem;
      line-height: 1.7;
    }
    .hero-badges {
      display: flex;
      gap: 0.75rem;
      justify-content: center;
      flex-wrap: wrap;
      margin-bottom: 1.5rem;
    }
    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      background: rgba(255,255,255,0.15);
      border: 1px solid rgba(255,255,255,0.25);
      padding: 0.35rem 0.9rem;
      border-radius: 50px;
      font-size: 0.8rem;
      font-weight: 500;
    }
    .challenge-time {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      background: rgba(255,255,255,0.1);
      border-radius: 8px;
      padding: 0.6rem 1.25rem;
      font-size: 0.875rem;
      color: #DBEAFE;
    }

    /* ---- Progress bar ---- */
    .progress-section {
      background: white;
      border-bottom: 1px solid #E2E8F0;
      padding: 1.25rem 1.5rem;
      position: sticky;
      top: 76px;
      z-index: 100;
    }
    .progress-inner {
      max-width: 800px;
      margin: 0 auto;
    }
    .progress-label {
      display: flex;
      justify-content: space-between;
      font-size: 0.8rem;
      color: #64748B;
      margin-bottom: 0.5rem;
      font-weight: 500;
    }
    .progress-bar-track {
      height: 8px;
      background: #E2E8F0;
      border-radius: 4px;
      overflow: hidden;
    }
    .progress-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, #2563EB, #3B82F6);
      border-radius: 4px;
      transition: width 0.5s ease;
    }

    /* ---- Steps container ---- */
    .steps-container {
      max-width: 800px;
      margin: 2rem auto;
      padding: 0 1.5rem;
    }

    /* ---- Step card ---- */
    .step-card {
      background: white;
      border: 2px solid #E2E8F0;
      border-radius: 16px;
      padding: 2rem;
      margin-bottom: 1.25rem;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }
    .step-card.completed {
      border-color: #10B981;
      background: #F0FDF4;
    }
    .step-card.active {
      border-color: #2563EB;
      box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    }
    .step-card.locked {
      opacity: 0.6;
    }
    .step-card-header {
      display: flex;
      align-items: flex-start;
      gap: 1.25rem;
      margin-bottom: 1rem;
    }
    .step-num-badge {
      flex-shrink: 0;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: #E2E8F0;
      color: #64748B;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 1rem;
      transition: all 0.3s;
    }
    .step-card.active .step-num-badge {
      background: #2563EB;
      color: white;
    }
    .step-card.completed .step-num-badge {
      background: #10B981;
      color: white;
    }
    .step-num-badge svg { width: 20px; height: 20px; fill: currentColor; }
    .step-card-meta { flex: 1; }
    .step-card-meta h2 {
      font-size: 1.1rem;
      font-weight: 700;
      color: #0F172A;
      margin: 0 0 0.3rem;
    }
    .step-card.completed .step-card-meta h2 { color: #065F46; }
    .step-card-meta .step-tool-tag {
      display: inline-block;
      background: #EFF6FF;
      color: #1D4ED8;
      border-radius: 4px;
      padding: 0.15rem 0.6rem;
      font-size: 0.75rem;
      font-weight: 600;
    }
    .step-card.completed .step-tool-tag {
      background: #DCFCE7;
      color: #15803D;
    }
    .step-card p.step-desc {
      font-size: 0.9rem;
      color: #475569;
      line-height: 1.7;
      margin: 1rem 0;
    }
    .step-card.completed p.step-desc { color: #166534; }

    .step-tips {
      background: #F8FAFC;
      border: 1px solid #E2E8F0;
      border-radius: 8px;
      padding: 0.875rem 1rem;
      margin: 1rem 0;
      font-size: 0.85rem;
      color: #475569;
    }
    .step-card.completed .step-tips {
      background: #DCFCE7;
      border-color: #A7F3D0;
      color: #166534;
    }
    .step-tips strong { color: #334155; display: block; margin-bottom: 0.25rem; font-size: 0.8rem; }
    .step-card.completed .step-tips strong { color: #065F46; }

    .step-actions {
      display: flex;
      gap: 0.75rem;
      flex-wrap: wrap;
      align-items: center;
    }
    .btn-open-tool {
      background: linear-gradient(135deg, #2563EB, #1E40AF);
      color: white;
      border: none;
      padding: 0.7rem 1.5rem;
      border-radius: 8px;
      font-size: 0.9rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
    }
    .btn-open-tool:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    }
    .btn-open-tool:disabled {
      background: #94A3B8;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }
    .btn-done {
      background: white;
      color: #10B981;
      border: 2px solid #10B981;
      padding: 0.65rem 1.25rem;
      border-radius: 8px;
      font-size: 0.9rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
    }
    .btn-done:hover {
      background: #F0FDF4;
    }
    .btn-done:disabled {
      border-color: #D1D5DB;
      color: #9CA3AF;
      cursor: not-allowed;
    }
    .step-completed-badge {
      display: none;
      align-items: center;
      gap: 0.5rem;
      color: #10B981;
      font-weight: 700;
      font-size: 0.9rem;
    }
    .step-card.completed .step-completed-badge { display: flex; }
    .step-card.completed .btn-open-tool { display: none; }
    .step-card.completed .btn-done { display: none; }

    /* ---- Completion section ---- */
    .completion-section {
      background: white;
      border: 2px solid #10B981;
      border-radius: 16px;
      padding: 2.5rem 2rem;
      text-align: center;
      margin: 1.25rem 0 2rem;
      display: none;
    }
    .completion-section.visible { display: block; }
    .completion-emoji { font-size: 3rem; margin-bottom: 0.75rem; }
    .completion-section h2 {
      font-size: 1.5rem;
      font-weight: 800;
      color: #065F46;
      margin-bottom: 0.5rem;
    }
    .completion-section p {
      color: #166534;
      font-size: 0.95rem;
      line-height: 1.7;
      margin-bottom: 1.5rem;
    }
    .completion-btns {
      display: flex;
      gap: 0.75rem;
      justify-content: center;
      flex-wrap: wrap;
    }
    .completion-btn-primary {
      background: #10B981;
      color: white;
      border: none;
      padding: 0.85rem 2rem;
      border-radius: 8px;
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      text-decoration: none;
      display: inline-block;
      transition: background 0.2s;
    }
    .completion-btn-primary:hover { background: #059669; }
    .completion-btn-secondary {
      background: white;
      color: #2563EB;
      border: 2px solid #2563EB;
      padding: 0.85rem 2rem;
      border-radius: 8px;
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      text-decoration: none;
      display: inline-block;
      transition: all 0.2s;
    }
    .completion-btn-secondary:hover { background: #EFF6FF; }

    /* ---- Sidebar tip ---- */
    .challenge-tip {
      background: #EFF6FF;
      border: 1px solid #BFDBFE;
      border-radius: 12px;
      padding: 1.25rem 1.5rem;
      margin: 0 0 1.5rem;
    }
    .challenge-tip h3 { font-size: 0.9rem; font-weight: 700; color: #1E3A5F; margin-bottom: 0.5rem; }
    .challenge-tip p { font-size: 0.85rem; color: #1D4ED8; margin: 0; line-height: 1.6; }

    /* ---- Reset link ---- */
    .reset-link {
      text-align: center;
      margin-bottom: 3rem;
    }
    .reset-link button {
      background: none;
      border: none;
      color: #94A3B8;
      font-size: 0.8rem;
      cursor: pointer;
      text-decoration: underline;
    }
    .reset-link button:hover { color: #64748B; }

    @media (max-width: 600px) {
      .step-card { padding: 1.5rem 1.25rem; }
      .step-card-header { gap: 1rem; }
      .step-actions { flex-direction: column; align-items: stretch; }
      .btn-open-tool, .btn-done { justify-content: center; }
      .progress-section { top: 60px; }
    }
  